@docsearch/js 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/esm/docsearch.d.ts +1 -1
- package/dist/esm/docsearch.js +6 -6
- package/dist/esm/docsearch.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/umd/docsearch.js +3 -3
- package/dist/umd/docsearch.js.map +1 -1
- package/dist/umd/index.js +3 -3
- package/dist/umd/index.js.map +1 -1
- package/package.json +3 -3
package/dist/umd/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @docsearch/js 5.0.
|
|
2
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.docsearch=t())})(this,function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);function f(e){"@babel/helpers - typeof";return f=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},f(e)}function p(e,t){if(f(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(f(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function m(e){var t=p(e,`string`);return f(t)==`symbol`?t:t+``}function h(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?g(Object(n),!0).forEach(function(t){h(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}let v={"Ctrl/Cmd+K":!0,"/":!0};function y(e){return _(_({},v),e)}let b=`Ctrl`;function x(){return/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)}function S(e){e&&e.parentNode&&e.remove()}function C(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`&&typeof e!=`function`?i=t[a]:o[a]=t[a];return arguments.length>2&&(o.children=arguments.length>3?Oe.call(arguments,2):n),w(e,o,r,i,null)}function w(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++he:i,__i:-1,__u:0};return i==null&&L.vnode!=null&&L.vnode(a),a}function T(){return{current:null}}function E(e){return e.children}function D(e,t){this.props=e,this.context=t,this.__g=0}function O(e,t){if(t==null)return e.__?O(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?O(e):null}function k(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=n.__e;break}return k(e)}}function A(e){(8&e.__g||!(e.__g|=8)||!ge.push(e)||ve++)&&_e==L.debounceRendering||((_e=L.debounceRendering)||queueMicrotask)(j)}function j(){for(var e,t,n,r,i,a,o,s,c=1;ge.length;)ge.length>c&&ge.sort(ye),e=ge.shift(),c=ge.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=ke({},r)).__v=r.__v+1,L.vnode&&L.vnode(n),ie(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i==null?O(r):i,!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,oe(a,n,o),n.__e!=i&&k(n)));ve=0}function M(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||Ee,b=t.length;for(c=N(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?Te:y[m.__i]||Te,m.__i=f,_=ie(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&I(p.ref,null,m),u.push(m.ref,m.__c||h,m)),g==null&&h!=null&&(g=h),(v=!!(4&m.__u))||p.__k===m.__k?c=P(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function N(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(c=a+f,(o=e.__k[a]=typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?w(null,o,null,null,null):De(o)?w(E,{children:o},null,null,null):o.constructor==null&&o.__b>0?w(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,s=null,(l=o.__i=te(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=O(s)),le(s,s));return r}function P(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=P(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=O(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ee(e,t){return t=t||[],e==null||typeof e==`boolean`||(De(e)?e.some(function(e){ee(e,t)}):t.push(e)),t}function te(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function F(e,t,n){t[0]==`-`?e.setProperty(t,n==null?``:n):e[t]=n==null?``:n}function ne(e,t,n,r,i){var a;n:if(t==`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||F(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||F(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(be,`$1`)),(t=t.slice(2))[0].toLowerCase()!=t[0]&&(t=t.toLowerCase()),e.__l||(e.__l={}),e.__l[t+a]=n,n?r?n.l=r.l:(n.l=xe,e.addEventListener(t,a?Ce:Se,a)):e.removeEventListener(t,a?Ce:Se,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n==null?``:n;break n}catch(e){}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function re(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=xe++;else if(t.u<n.l)return;return n(L.event?L.event(t):t)}}}function ie(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,C,w,T,O,k,A,j,N,P,ee,te=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),n.__c.__z&&(s=t.__e=n.__e=(a=n.__c.__z)[0],n.__c.__z=null)),(d=L.__b)&&d(t);n:if(typeof te==`function`)try{if(v=t.props,y=`prototype`in te&&te.prototype.render,b=(d=te.contextType)&&r[d.__c],x=d?b?b.props.value:d.__:r,n.__c?2&(f=t.__c=n.__c).__g&&(f.__g|=1,_=!0):(y?t.__c=f=new te(v,x):(t.__c=f=new D(v,x),f.constructor=te,f.render=ue),b&&b.sub(f),f.props=v,f.state||(f.state={}),f.context=x,f.__n=r,p=!0,f.__g|=8,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&te.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=ke({},f.__s)),ke(f.__s,te.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&te.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&te.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),!(4&f.__g)&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),C=0;C<f._sb.length;C++)f.__h.push(f._sb[C]);f._sb=[],f.__h.length&&o.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__g&=-5,w=L.__r,T=0,y){for(f.state=f.__s,f.__g&=-9,w&&w(t),d=f.render(f.props,f.state,f.context),O=0;O<f._sb.length;O++)f.__h.push(f._sb[O]);f._sb=[]}else do f.__g&=-9,w&&w(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(8&f.__g&&++T<25);f.state=f.__s,f.getChildContext!=null&&(r=ke({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),k=d,d!=null&&d.type===E&&d.key==null&&(k=se(d.props.children)),s=M(e,De(k)?k:[k],t,n,r,i,a,o,s,c,l,u),t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__g&=-4)}catch(e){if(t.__v=null,c||a!=null)if(e.then){for(A=0,j=!1,t.__u|=c?160:128,t.__c.__z=[],N=0;N<a.length;N++)(P=a[N])==null||j||(P.nodeType==8&&P.data==`$s`?(A>0&&t.__c.__z.push(P),A++,a[N]=null):P.nodeType==8&&P.data==`/$s`?(--A>0&&t.__c.__z.push(P),j=A===0,s=a[N],a[N]=null):A>0&&(t.__c.__z.push(P),a[N]=null));if(!j){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__c.__z=[s]}t.__e=s}else{for(ee=a.length;ee--;)S(a[ee]);ae(t)}else t.__e=n.__e,t.__k=n.__k,e.then||ae(t);L.__e(e,t,n)}else s=t.__e=ce(n.__e,t,n,r,i,a,o,c,l,u);return(d=L.diffed)&&d(t),128&t.__u?void 0:s}function ae(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(ae)}function oe(e,t,n){for(var r=0;r<n.length;r++)I(n[r],n[++r],n[++r]);L.__c&&L.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){L.__e(e,t.__v)}})}function se(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:De(e)?e.map(se):ke({},e)}function ce(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v=n.props,y=t.props,b=t.type;if(b==`svg`?i=`http://www.w3.org/2000/svg`:b==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||(i=`http://www.w3.org/1999/xhtml`),a!=null){for(u=0;u<a.length;u++)if((m=a[u])&&`setAttribute`in m==!!b&&(b?m.localName==b:m.nodeType==3)){e=m,a[u]=null;break}}if(e==null){if(b==null)return l.createTextNode(y);e=l.createElementNS(i,b,y.is&&y),s&&(L.__m&&L.__m(t,a),s=!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a=a&&Oe.call(e.childNodes),v=n.props||Te,!s&&a!=null)for(v={},u=0;u<e.attributes.length;u++)v[(m=e.attributes[u]).name]=m.value;for(u in v)if(m=v[u],u!=`children`){if(u==`dangerouslySetInnerHTML`)f=m;else if(!(u in y)){if(u==`value`&&`defaultValue`in y||u==`checked`&&`defaultChecked`in y)continue;ne(e,u,null,m,i)}}for(u in _=1&n.__u,y)m=y[u],u==`children`?p=m:u==`dangerouslySetInnerHTML`?d=m:u==`value`?h=m:u==`checked`?g=m:s&&typeof m!=`function`||v[u]===m&&!_||ne(e,u,m,v[u],i);if(d)s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(f&&(e.innerHTML=``),M(b==`template`?e.content:e,De(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&O(n,0),s,c,l),a!=null)for(u=a.length;u--;)S(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||ne(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&ne(e,u,g,v[u],i))}return e}function I(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){L.__e(e,n)}}function le(e,t,n){var r,i;if(L.unmount&&L.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||I(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){L.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&le(r[i],t,n||typeof e.type!=`function`);n||S(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function ue(e,t,n){return this.constructor(e,n)}function de(e,t){var n,r,i,a;t==document&&(t=document.documentElement),L.__&&L.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=C(E,null,[e]),i=[],a=[],ie(t,e,r||Te,Te,t.namespaceURI,r?null:t.firstChild?Oe.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),oe(i,e,a)}function fe(e,t){e.__u|=32,de(e,t)}function pe(e,t,n){var r,i,a,o=ke({},e.props);for(a in t)a==`key`?r=t[a]:a==`ref`&&typeof e.type!=`function`?i=t[a]:o[a]=t[a];return arguments.length>2&&(o.children=arguments.length>3?Oe.call(arguments,2):n),w(e.type,o,r||e.key,i||e.ref,null)}function me(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__g|=4,A(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c=`__cC`+we++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}var L,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae=o((()=>{Te={},Ee=[],De=Array.isArray,Oe=Ee.slice,ke=Object.assign,L={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=8&i.__g),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=8&i.__g),o)return void(i.__g|=2)}catch(t){e=t}}throw ve=0,e}},he=0,D.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ke({},this.state);typeof e==`function`&&(e=e(ke({},n),this.props)),e&&ke(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),A(this))},D.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),A(this))},D.prototype.render=E,ge=[],ve=0,ye=function(e,t){return e.__v.__b-t.__v.__b},be=/(PointerCapture)$|Capture$/i,xe=0,Se=re(!1),Ce=re(!0),we=0}));function je(e,t){tt.__h&&tt.__h(Ye,e,$e||t),$e=0;var n=Ye.__H||(Ye.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Me(e){return $e=1,Ne(qe,e)}function Ne(e,t,n){var r=je(Je++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):qe(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);Qe(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Ye,!Ye.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,Qe(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};Ye.__f=!0;var a=Ye.shouldComponentUpdate,o=Ye.componentWillUpdate;Ye.componentWillUpdate=function(e,t,n){if(4&this.__g){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},Ye.shouldComponentUpdate=i}return r.__N||r.__}function Pe(e,t){var n=je(Je++,3);!tt.__s&&Ke(n.__H,t)&&(n.__=e,n.u=t,Ye.__H.__h.push(n))}function Fe(e,t){var n=je(Je++,4);!tt.__s&&Ke(n.__H,t)&&(n.__=e,n.u=t,Ye.__h.push(n))}function R(e){return $e=5,z(function(){return{current:e}},[])}function Ie(e,t,n){$e=6,Fe(function(){if(typeof e==`function`){var n=e(t());return function(){e(null),n&&typeof n==`function`&&n()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function z(e,t){var n=je(Je++,7);return Ke(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Le(e,t){return $e=8,z(function(){return e},t)}function Re(e){var t=Ye.context[e.__c],n=je(Je++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Ye)),t.props.value):e.__}function ze(e,t){tt.useDebugValue&&tt.useDebugValue(t?t(e):e)}function Be(e){var t=je(Je++,10),n=Me();return t.__=e,Ye.componentDidCatch||(Ye.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function Ve(){var e=je(Je++,11);if(!e.__){for(var t=Ye.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__=`P`+n[0]+`-`+n[1]++}return e.__}function He(){for(var e;e=et.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(We),e.__H.__h.forEach(Ge),e.__H.__h=[]}catch(t){e.__H.__h=[],tt.__e(t,e.__v)}}function Ue(e){var t,n=function(){clearTimeout(r),ct&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);ct&&(t=requestAnimationFrame(n))}function We(e){var t=Ye,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),Ye=t}function Ge(e){var t=Ye;e.__c=e.__(),Ye=t}function Ke(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!Qe(t,e[n])})}function qe(e,t){return typeof t==`function`?t(e):t}var Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt=o((()=>{Ae(),Qe=Object.is,$e=0,et=[],tt=L,nt=tt.__b,rt=tt.__r,it=tt.diffed,at=tt.__c,ot=tt.unmount,st=tt.__,tt.__b=function(e){Ye=null,nt&&nt(e)},tt.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),st&&st(e,t)},tt.__r=function(e){rt&&rt(e),Je=0;var t=(Ye=e.__c).__H;t&&(Xe===Ye?(t.__h=[],Ye.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(We),t.__h.forEach(Ge),t.__h=[],Je=0)),Xe=Ye},tt.diffed=function(e){it&&it(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(et.push(t)!==1&&Ze===tt.requestAnimationFrame||((Ze=tt.requestAnimationFrame)||Ue)(He)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),Xe=Ye=null},tt.__c=function(e,t){t.some(function(e){try{e.__h.forEach(We),e.__h=e.__h.filter(function(e){return!e.__||Ge(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],tt.__e(n,e.__v)}}),at&&at(e,t)},tt.unmount=function(e){ot&&ot(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{We(e)}catch(e){t=e}}),n.__H=void 0,t&&tt.__e(t,n.__v))},ct=typeof requestAnimationFrame==`function`})),ut=c({Children:()=>Gt,Component:()=>D,Fragment:()=>E,PureComponent:()=>_t,StrictMode:()=>ln,Suspense:()=>St,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>on,cloneElement:()=>It,createContext:()=>me,createElement:()=>C,createFactory:()=>Mt,createPortal:()=>Et,createRef:()=>T,default:()=>B,findDOMNode:()=>Rt,flushSync:()=>cn,forwardRef:()=>yt,hydrate:()=>Ot,isElement:()=>un,isFragment:()=>Pt,isMemo:()=>Ft,isValidElement:()=>Nt,lazy:()=>Ct,memo:()=>vt,render:()=>Dt,startTransition:()=>pt,unmountComponentAtNode:()=>Lt,unstable_batchedUpdates:()=>zt,useCallback:()=>Le,useContext:()=>Re,useDebugValue:()=>ze,useDeferredValue:()=>mt,useEffect:()=>Pe,useErrorBoundary:()=>Be,useId:()=>Ve,useImperativeHandle:()=>Ie,useInsertionEffect:()=>Bt,useLayoutEffect:()=>Fe,useMemo:()=>z,useReducer:()=>Ne,useRef:()=>R,useState:()=>Me,useSyncExternalStore:()=>dt,useTransition:()=>ht,version:()=>sn});function dt(e,t){var n=t(),r=Me({t:{__:n,u:t}}),i=r[0].t,a=r[1];return Fe(function(){i.__=n,i.u=t,ft(i)&&a({t:i})},[e,n,t]),Pe(function(){return ft(i)&&a({t:i}),e(function(){ft(i)&&a({t:i})})},[e]),n}function ft(e){var t=e.u,n=e.__;try{var r=t();return!Object.is(n,r)}catch(e){return!0}}function pt(e){e()}function mt(e){return e}function ht(){return[!1,pt]}function gt(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function _t(e,t){this.props=e,this.context=t}function vt(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:gt(this.props,e)}function r(t){return this.shouldComponentUpdate=n,C(e,t)}return r.displayName=`Memo(`+(e.displayName||e.name)+`)`,r.prototype.isReactComponent=!0,r.type=e,r}function yt(e){function t(t){var n=Vt({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Ut,t.render=e,t.prototype.isReactComponent=!0,t.displayName=`ForwardRef(`+(e.displayName||e.name)+`)`,t}function bt(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=Vt({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__g|=4,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return bt(e,t,n)})),e}function xt(e,t,n){return e&&n&&(typeof e.type==`string`&&(e.__u|=1),e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return xt(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__g|=4,e.__c.__P=n)),e}function St(){this.__u=0,this.o=null,this.__b=null}function Ct(e){var t,n,r;function i(i){if(t||(t=e()).then(function(e){n=e.default||e},function(e){r=e}),r)throw r;if(!n)throw t;return C(n,i)}return i.displayName=`Lazy`,i}function wt(e){return this.getChildContext=function(){return e.context},e.children}function Tt(e){var t=this,n=e.i;if(t.componentWillUnmount=function(){de(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),!t.l){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},ownerDocument:n.ownerDocument,insertBefore:function(e,n){this.childNodes.push(e),t.i.insertBefore(e,n)}}}de(C(wt,{context:t.context},e.__v),t.l)}function Et(e,t){var n=C(Tt,{__v:e,i:t});return n.containerInfo=t,n}function Dt(e,t,n){return t.__k==null&&(t.textContent=``),de(e,t),typeof n==`function`&&n(),e?e.__c:null}function Ot(e,t,n){return fe(e,t),typeof n==`function`&&n(),e?e.__c:null}function kt(){}function At(){return this.cancelBubble}function jt(){return this.defaultPrevented}function Mt(e){return C.bind(null,e)}function Nt(e){return!!e&&e.$$typeof===Jt}function Pt(e){return Nt(e)&&e.type===E}function Ft(e){return!!e&&!!e.displayName&&(typeof e.displayName==`string`||e.displayName instanceof String)&&e.displayName.startsWith(`Memo(`)}function It(e){return Nt(e)?pe.apply(null,arguments):e}function Lt(e){return!!e.__k&&(de(null,e),!0)}function Rt(e){return e&&(e.__v&&e.__v.__e||e.nodeType===1&&e)||null}function zt(e,t){return e(t)}var Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,B,V=o((()=>{Ae(),lt(),lt(),Bt=Fe,Vt=Object.assign,Ht=/^(-|f[lo].*[^se]$|g.{5,}[^ps]$|z|o[pr]|(W.{5})?[lL]i.*(t|mp)$|an|(bo|s).{4}Im|sca|m.{6}[ds]|ta|c.*[st]$|wido|ini)/,(_t.prototype=new D).isPureReactComponent=!0,_t.prototype.shouldComponentUpdate=function(e,t){return gt(this.props,e)||gt(this.state,t)},Ut=Symbol.for(`react.forward_ref`),Wt=function(e,t,n){return e==null?null:ee(ee(e).map(t.bind(n)))},Gt={map:Wt,forEach:Wt,count:function(e){return e?ee(e).length:0},only:function(e){var t=ee(e);if(t.length!==1)throw`Children.only`;return t[0]},toArray:ee},Kt=L.__e,L.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Kt(e,t,n,r)},qt=L.unmount,L.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),qt&&qt(e)},(St.prototype=new D).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=!1,a=function(){i||(i=!0,n.__R=null,o())};n.__R=a;var o=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=xt(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},St.prototype.componentWillUnmount=function(){this.o=[]},St.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=bt(this.__b,n,r.__O=r.__P)}this.__b=null}return[C(E,null,t.__a?null:e.children),t.__a&&C(E,null,e.fallback)]},Jt=Symbol.for(`react.element`),Yt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Xt=/[A-Z0-9]/g,Zt=typeof document<`u`,Qt=function(e){return/fil|che|rad/.test(e)},D.prototype.isReactComponent={},[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(D.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}),$t=L.event,L.event=function(e){return $t&&(e=$t(e)),e.persist=kt,e.isPropagationStopped=At,e.isDefaultPrevented=jt,e.nativeEvent=e},tn={enumerable:!1,configurable:!0,get:function(){return this.class}},nn=L.vnode,L.vnode=function(e){if(typeof e.type==`string`)(function(e){var t=e.props,n=e.type,r={},i=n.indexOf(`-`)===-1;for(var a in t){var o=t[a];if(!(a===`value`&&`defaultValue`in t&&o==null||Zt&&a===`children`&&n===`noscript`||a===`class`||a===`className`)){if(a===`style`&&typeof o==`object`)for(var s in o)typeof o[s]!=`number`||Ht.test(s)||(o[s]+=`px`);else if(a===`defaultValue`&&`value`in t&&t.value==null)a=`value`;else if(a===`download`&&!0===o)o=``;else if(a===`translate`&&o===`no`)o=!1;else if(a[0]===`o`&&a[1]===`n`){var c=a.toLowerCase();c===`ondoubleclick`?a=`ondblclick`:c!==`onchange`||n!==`input`&&n!==`textarea`||Qt(t.type)?c===`onfocus`?a=`onfocusin`:c===`onblur`&&(a=`onfocusout`):c=a=`oninput`,c===`oninput`&&r[a=c]&&(a=`oninputCapture`)}else i&&Yt.test(a)?a=a.replace(Xt,`-$&`).toLowerCase():o===null&&(o=void 0);r[a]=o}}n==`select`&&r.multiple&&Array.isArray(r.value)&&(r.value=ee(t.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),n==`select`&&r.defaultValue!=null&&(r.value=ee(t.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value})),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",tn)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r})(e);else if(typeof e.type==`function`&&(`ref`in e.props&&`prototype`in e.type&&e.type.prototype.render&&(e.ref=e.props.ref,delete e.props.ref),e.type.defaultProps)){var t=Vt({},e.props);for(var n in e.type.defaultProps)t[n]===void 0&&(t[n]=e.type.defaultProps[n]);e.props=t}e.$$typeof=Jt,nn&&nn(e)},rn=L.__r,L.__r=function(e){rn&&rn(e),en=e.__c},an=L.diffed,L.diffed=function(e){an&&an(e);var t=e.props,n=e.__e;n!=null&&e.type===`textarea`&&`value`in t&&t.value!==n.value&&(n.value=t.value==null?``:t.value),en=null},on={ReactCurrentDispatcher:{current:{readContext:function(e){return en.__n[e.__c].props.value},useCallback:Le,useContext:Re,useDebugValue:ze,useDeferredValue:mt,useEffect:Pe,useId:Ve,useImperativeHandle:Ie,useInsertionEffect:Bt,useLayoutEffect:Fe,useMemo:z,useReducer:Ne,useRef:R,useState:Me,useSyncExternalStore:dt,useTransition:ht}}},sn=`18.3.1`,cn=function(e,t){return e(t)},ln=E,un=Nt,B={useState:Me,useId:Ve,useReducer:Ne,useEffect:Pe,useLayoutEffect:Fe,useInsertionEffect:Bt,useTransition:ht,useDeferredValue:mt,useSyncExternalStore:dt,startTransition:pt,useRef:R,useImperativeHandle:Ie,useMemo:z,useCallback:Le,useContext:Re,useDebugValue:ze,version:`18.3.1`,Children:Gt,render:Dt,hydrate:Ot,unmountComponentAtNode:Lt,createPortal:Et,createElement:C,createContext:me,createFactory:Mt,cloneElement:It,createRef:T,Fragment:E,isValidElement:Nt,isElement:un,isFragment:Pt,isMemo:Ft,findDOMNode:Rt,Component:D,PureComponent:_t,memo:vt,forwardRef:yt,flushSync:cn,unstable_batchedUpdates:zt,StrictMode:ln,Suspense:St,lazy:Ct,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:on}}));V();function dn({size:e=20,color:t=`currentColor`}){return B.createElement(`svg`,{width:e,height:e,className:`DocSearch-Search-Icon`,viewBox:`0 0 24 24`,"aria-hidden":`true`},B.createElement(`circle`,{cx:`11`,cy:`11`,r:`8`,stroke:t,fill:`none`,strokeWidth:`1.4`}),B.createElement(`path`,{d:`m21 21-4.3-4.3`,stroke:t,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`}))}function fn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function pn(e,t){if(e==null)return{};var n,r,i=fn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}V();let mn=({theme:e})=>{Pe(()=>{if(!e)return;let t=document.documentElement.dataset.theme;if(e!==t)return document.documentElement.dataset.theme=e,()=>{t===void 0?delete document.documentElement.dataset.theme:document.documentElement.dataset.theme=t}},[e])};V();function hn(){let[e,t]=Me(null);Pe(()=>{typeof navigator<`u`&&(x()?t(`⌘`):t(b))},[]);let[n,r,i]=e===`Ctrl`?[b,`Control`,`Ctrl`]:[`Meta`,`Meta`,`⌘`];return{actionKeyReactsTo:n,actionKeyAltText:r,actionKeyLabel:i,key:e}}let gn=[`translations`,`keyboardShortcuts`],_n=B.forwardRef((e,t)=>{let{translations:n={},keyboardShortcuts:r}=e,i=pn(e,gn),{buttonText:a=`Search`,buttonAriaLabel:o=`Search`}=n,s=y(r),{actionKeyReactsTo:c,actionKeyAltText:l,actionKeyLabel:u,key:d}=hn();mn({theme:i.theme});let f=s[`Ctrl/Cmd+K`],p=`${l}+k`;return B.createElement(`button`,_(_({type:`button`,className:`DocSearch DocSearch-Button`,"aria-label":f?`${o} (${p})`:o,"aria-keyshortcuts":f?p:void 0},i),{},{ref:t}),B.createElement(`span`,{className:`DocSearch-Button-Container`},B.createElement(dn,null),B.createElement(`span`,{className:`DocSearch-Button-Placeholder`},a)),B.createElement(`span`,{className:`DocSearch-Button-Keys`},d!==null&&f&&B.createElement(B.Fragment,null,B.createElement(vn,{reactsToKey:c},u),B.createElement(vn,{reactsToKey:`k`},`K`))))});function vn({reactsToKey:e,children:t}){let[n,r]=Me(!1);return Pe(()=>{if(!e)return;function t(t){t.key===e&&r(!0)}function n(t){(t.key===e||t.key===`Meta`)&&r(!1)}return window.addEventListener(`keydown`,t),window.addEventListener(`keyup`,n),()=>{window.removeEventListener(`keydown`,t),window.removeEventListener(`keyup`,n)}},[e]),B.createElement(`kbd`,{className:n?`DocSearch-Button-Key DocSearch-Button-Key--pressed`:`DocSearch-Button-Key`+(e===`Ctrl`?` DocSearch-Button-Key--ctrl`:``)},t)}let yn=`5.0.0`;function bn(e,t){this.v=e,this.k=t}function xn(e){return new bn(e,0)}function Sn(e){return function(){return new Cn(e.apply(this,arguments))}}function Cn(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof bn;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`?`return`:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(a.done?`return`:`normal`,n)},function(e){r(`throw`,e)})}catch(e){i(`throw`,e)}}function i(e,i){switch(e){case`return`:t.resolve({value:i,done:!0});break;case`throw`:t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}Cn.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},Cn.prototype.next=function(e){return this._invoke(`next`,e)},Cn.prototype.throw=function(e){return this._invoke(`throw`,e)},Cn.prototype.return=function(e){return this._invoke(`return`,e)};function wn(e){var t,n,r,i=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&(t=e[n])!=null)return t.call(e);if(r&&(t=e[r])!=null)return new Tn(t.call(e));n=`@@asyncIterator`,r=`@@iterator`}throw TypeError(`Object is not async iterable`)}function Tn(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return Tn=function(e){this.s=e,this.n=e.next},Tn.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new Tn(e)}function En(e){"@babel/helpers - typeof";return En=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},En(e)}function Dn(e,t){if(En(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(En(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function On(e){var t=Dn(e,`string`);return En(t)==`symbol`?t:t+``}function H(e,t,n){return(t=On(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?kn(Object(n),!0).forEach(function(t){H(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function An(e){var t={},n=!1;function r(t,r){return n=!0,r=new Promise(function(n){n(e[t](r))}),{done:!1,value:new bn(r,1)}}return t[typeof Symbol<`u`&&Symbol.iterator||`@@iterator`]=function(){return this},t.next=function(e){return n?(n=!1,e):r(`next`,e)},typeof e.throw==`function`&&(t.throw=function(e){if(n)throw n=!1,e;return r(`throw`,e)}),typeof e.return==`function`&&(t.return=function(e){return n?(n=!1,e):r(`return`,e)}),t}function jn(e){let t,n=`algolia-client-js-${e.key}`;function r(){return t===void 0&&(t=e.localStorage||window.localStorage),t}function i(){return JSON.parse(r().getItem(n)||`{}`)}function a(e){r().setItem(n,JSON.stringify(e))}function o(){return new Promise(e=>setTimeout(e,0))}function s(){let t=e.timeToLive?e.timeToLive*1e3:null,n=i(),r=new Date().getTime(),a=!1;return{namespace:Object.fromEntries(Object.entries(n).filter(([,e])=>!e||e.timestamp===void 0||t&&e.timestamp+t<r?(a=!0,!1):!0)),changed:a}}return{get(e,t,n={miss:()=>Promise.resolve()}){return o().then(()=>{let{namespace:r,changed:i}=s(),o=r[JSON.stringify(e)];return i&&a(r),o?o.value:t().then(e=>n.miss(e).then(()=>e))})},set(e,t){return o().then(()=>{let a=i();return a[JSON.stringify(e)]={timestamp:new Date().getTime(),value:t},r().setItem(n,JSON.stringify(a)),t})},delete(e){return o().then(()=>{let t=i();delete t[JSON.stringify(e)],r().setItem(n,JSON.stringify(t))})},clear(){return Promise.resolve().then(()=>{r().removeItem(n)})}}}function Mn(){return{get(e,t,n={miss:()=>Promise.resolve()}){return t().then(e=>Promise.all([e,n.miss(e)])).then(([e])=>e)},set(e,t){return Promise.resolve(t)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}}function Nn(e){let t=[...e.caches],n=t.shift();return n===void 0?Mn():{get(e,r,i={miss:()=>Promise.resolve()}){return n.get(e,r,i).catch(()=>Nn({caches:t}).get(e,r,i))},set(e,r){return n.set(e,r).catch(()=>Nn({caches:t}).set(e,r))},delete(e){return n.delete(e).catch(()=>Nn({caches:t}).delete(e))},clear(){return n.clear().catch(()=>Nn({caches:t}).clear())}}}function Pn(e={serializable:!0}){let t={};return{get(n,r,i={miss:()=>Promise.resolve()}){let a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);let o=r();return o.then(e=>i.miss(e)).then(()=>o)},set(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}function Fn(e){let t={value:`Algolia for JavaScript (${e})`,add(e){let n=`; ${e.segment}${e.version===void 0?``:` (${e.version})`}`;return t.value.indexOf(n)===-1&&(t.value=`${t.value}${n}`),t}};return t}function In(e,t,n=`WithinHeaders`){let r={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers(){return n===`WithinHeaders`?r:{}},queryParameters(){return n===`WithinQueryParameters`?r:{}}}}function Ln({algoliaAgents:e,client:t,version:n}){let r=Fn(n).add({segment:t,version:n});return e.forEach(e=>r.add(e)),r}function Rn(){return{debug(e,t){return Promise.resolve()},info(e,t){return Promise.resolve()},error(e,t){return Promise.resolve()}}}var zn=10*1024*1024;function Bn(e){return Vn.apply(this,arguments)}function Vn(){return Vn=Sn(function*(e){let t=e.getReader();try{for(;;){let{done:e,value:n}=yield xn(t.read());if(e)return;yield n}}finally{t.releaseLock()}}),Vn.apply(this,arguments)}function Hn(e){return Symbol.asyncIterator in e?e:Bn(e)}function Un(e){return Wn.apply(this,arguments)}function Wn(){return Wn=Sn(function*(e){let t=new TextDecoder(`utf-8`),n=[],r=0,i=!1,a=!0;var o=!1,s=!1,c;try{for(var l=wn(Hn(e)),u;o=!(u=yield xn(l.next())).done;o=!1){let e=u.value;{let o=t.decode(e,{stream:!0}),s=0;for(i&&(i=!1,o.length>0&&o[0]===`
|
|
1
|
+
/*! @docsearch/js 5.0.1 (UNRELEASED e9f932b) | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */
|
|
2
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.docsearch=t())})(this,function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);function f(e){"@babel/helpers - typeof";return f=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},f(e)}function p(e,t){if(f(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(f(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function m(e){var t=p(e,`string`);return f(t)==`symbol`?t:t+``}function h(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?g(Object(n),!0).forEach(function(t){h(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}let v={"Ctrl/Cmd+K":!0,"/":!0};function y(e){return _(_({},v),e)}let b=`Ctrl`;function x(){return/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)}function S(e){e&&e.parentNode&&e.remove()}function C(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`&&typeof e!=`function`?i=t[a]:o[a]=t[a];return arguments.length>2&&(o.children=arguments.length>3?Oe.call(arguments,2):n),w(e,o,r,i,null)}function w(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++he:i,__i:-1,__u:0};return i==null&&L.vnode!=null&&L.vnode(a),a}function T(){return{current:null}}function E(e){return e.children}function D(e,t){this.props=e,this.context=t,this.__g=0}function O(e,t){if(t==null)return e.__?O(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?O(e):null}function k(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=n.__e;break}return k(e)}}function A(e){(8&e.__g||!(e.__g|=8)||!ge.push(e)||ve++)&&_e==L.debounceRendering||((_e=L.debounceRendering)||queueMicrotask)(j)}function j(){for(var e,t,n,r,i,a,o,s,c=1;ge.length;)ge.length>c&&ge.sort(ye),e=ge.shift(),c=ge.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=ke({},r)).__v=r.__v+1,L.vnode&&L.vnode(n),ie(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i==null?O(r):i,!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,oe(a,n,o),n.__e!=i&&k(n)));ve=0}function M(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||Ee,b=t.length;for(c=N(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?Te:y[m.__i]||Te,m.__i=f,_=ie(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&I(p.ref,null,m),u.push(m.ref,m.__c||h,m)),g==null&&h!=null&&(g=h),(v=!!(4&m.__u))||p.__k===m.__k?c=P(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function N(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(c=a+f,(o=e.__k[a]=typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?w(null,o,null,null,null):De(o)?w(E,{children:o},null,null,null):o.constructor==null&&o.__b>0?w(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,s=null,(l=o.__i=te(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=O(s)),le(s,s));return r}function P(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=P(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=O(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ee(e,t){return t=t||[],e==null||typeof e==`boolean`||(De(e)?e.some(function(e){ee(e,t)}):t.push(e)),t}function te(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function F(e,t,n){t[0]==`-`?e.setProperty(t,n==null?``:n):e[t]=n==null?``:n}function ne(e,t,n,r,i){var a;n:if(t==`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||F(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||F(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(be,`$1`)),(t=t.slice(2))[0].toLowerCase()!=t[0]&&(t=t.toLowerCase()),e.__l||(e.__l={}),e.__l[t+a]=n,n?r?n.l=r.l:(n.l=xe,e.addEventListener(t,a?Ce:Se,a)):e.removeEventListener(t,a?Ce:Se,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n==null?``:n;break n}catch(e){}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function re(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=xe++;else if(t.u<n.l)return;return n(L.event?L.event(t):t)}}}function ie(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,C,w,T,O,k,A,j,N,P,ee,te=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),n.__c.__z&&(s=t.__e=n.__e=(a=n.__c.__z)[0],n.__c.__z=null)),(d=L.__b)&&d(t);n:if(typeof te==`function`)try{if(v=t.props,y=`prototype`in te&&te.prototype.render,b=(d=te.contextType)&&r[d.__c],x=d?b?b.props.value:d.__:r,n.__c?2&(f=t.__c=n.__c).__g&&(f.__g|=1,_=!0):(y?t.__c=f=new te(v,x):(t.__c=f=new D(v,x),f.constructor=te,f.render=ue),b&&b.sub(f),f.props=v,f.state||(f.state={}),f.context=x,f.__n=r,p=!0,f.__g|=8,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&te.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=ke({},f.__s)),ke(f.__s,te.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&te.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&te.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),!(4&f.__g)&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),C=0;C<f._sb.length;C++)f.__h.push(f._sb[C]);f._sb=[],f.__h.length&&o.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__g&=-5,w=L.__r,T=0,y){for(f.state=f.__s,f.__g&=-9,w&&w(t),d=f.render(f.props,f.state,f.context),O=0;O<f._sb.length;O++)f.__h.push(f._sb[O]);f._sb=[]}else do f.__g&=-9,w&&w(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(8&f.__g&&++T<25);f.state=f.__s,f.getChildContext!=null&&(r=ke({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),k=d,d!=null&&d.type===E&&d.key==null&&(k=se(d.props.children)),s=M(e,De(k)?k:[k],t,n,r,i,a,o,s,c,l,u),t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__g&=-4)}catch(e){if(t.__v=null,c||a!=null)if(e.then){for(A=0,j=!1,t.__u|=c?160:128,t.__c.__z=[],N=0;N<a.length;N++)(P=a[N])==null||j||(P.nodeType==8&&P.data==`$s`?(A>0&&t.__c.__z.push(P),A++,a[N]=null):P.nodeType==8&&P.data==`/$s`?(--A>0&&t.__c.__z.push(P),j=A===0,s=a[N],a[N]=null):A>0&&(t.__c.__z.push(P),a[N]=null));if(!j){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__c.__z=[s]}t.__e=s}else{for(ee=a.length;ee--;)S(a[ee]);ae(t)}else t.__e=n.__e,t.__k=n.__k,e.then||ae(t);L.__e(e,t,n)}else s=t.__e=ce(n.__e,t,n,r,i,a,o,c,l,u);return(d=L.diffed)&&d(t),128&t.__u?void 0:s}function ae(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(ae)}function oe(e,t,n){for(var r=0;r<n.length;r++)I(n[r],n[++r],n[++r]);L.__c&&L.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){L.__e(e,t.__v)}})}function se(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:De(e)?e.map(se):ke({},e)}function ce(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v=n.props,y=t.props,b=t.type;if(b==`svg`?i=`http://www.w3.org/2000/svg`:b==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||(i=`http://www.w3.org/1999/xhtml`),a!=null){for(u=0;u<a.length;u++)if((m=a[u])&&`setAttribute`in m==!!b&&(b?m.localName==b:m.nodeType==3)){e=m,a[u]=null;break}}if(e==null){if(b==null)return l.createTextNode(y);e=l.createElementNS(i,b,y.is&&y),s&&(L.__m&&L.__m(t,a),s=!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a=a&&Oe.call(e.childNodes),v=n.props||Te,!s&&a!=null)for(v={},u=0;u<e.attributes.length;u++)v[(m=e.attributes[u]).name]=m.value;for(u in v)if(m=v[u],u!=`children`){if(u==`dangerouslySetInnerHTML`)f=m;else if(!(u in y)){if(u==`value`&&`defaultValue`in y||u==`checked`&&`defaultChecked`in y)continue;ne(e,u,null,m,i)}}for(u in _=1&n.__u,y)m=y[u],u==`children`?p=m:u==`dangerouslySetInnerHTML`?d=m:u==`value`?h=m:u==`checked`?g=m:s&&typeof m!=`function`||v[u]===m&&!_||ne(e,u,m,v[u],i);if(d)s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(f&&(e.innerHTML=``),M(b==`template`?e.content:e,De(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&O(n,0),s,c,l),a!=null)for(u=a.length;u--;)S(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||ne(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&ne(e,u,g,v[u],i))}return e}function I(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){L.__e(e,n)}}function le(e,t,n){var r,i;if(L.unmount&&L.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||I(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){L.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&le(r[i],t,n||typeof e.type!=`function`);n||S(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function ue(e,t,n){return this.constructor(e,n)}function de(e,t){var n,r,i,a;t==document&&(t=document.documentElement),L.__&&L.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=C(E,null,[e]),i=[],a=[],ie(t,e,r||Te,Te,t.namespaceURI,r?null:t.firstChild?Oe.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),oe(i,e,a)}function fe(e,t){e.__u|=32,de(e,t)}function pe(e,t,n){var r,i,a,o=ke({},e.props);for(a in t)a==`key`?r=t[a]:a==`ref`&&typeof e.type!=`function`?i=t[a]:o[a]=t[a];return arguments.length>2&&(o.children=arguments.length>3?Oe.call(arguments,2):n),w(e.type,o,r||e.key,i||e.ref,null)}function me(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__g|=4,A(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c=`__cC`+we++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}var L,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae=o((()=>{Te={},Ee=[],De=Array.isArray,Oe=Ee.slice,ke=Object.assign,L={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=8&i.__g),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=8&i.__g),o)return void(i.__g|=2)}catch(t){e=t}}throw ve=0,e}},he=0,D.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ke({},this.state);typeof e==`function`&&(e=e(ke({},n),this.props)),e&&ke(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),A(this))},D.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),A(this))},D.prototype.render=E,ge=[],ve=0,ye=function(e,t){return e.__v.__b-t.__v.__b},be=/(PointerCapture)$|Capture$/i,xe=0,Se=re(!1),Ce=re(!0),we=0}));function je(e,t){tt.__h&&tt.__h(Ye,e,$e||t),$e=0;var n=Ye.__H||(Ye.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Me(e){return $e=1,Ne(qe,e)}function Ne(e,t,n){var r=je(Je++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):qe(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);Qe(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Ye,!Ye.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,Qe(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};Ye.__f=!0;var a=Ye.shouldComponentUpdate,o=Ye.componentWillUpdate;Ye.componentWillUpdate=function(e,t,n){if(4&this.__g){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},Ye.shouldComponentUpdate=i}return r.__N||r.__}function Pe(e,t){var n=je(Je++,3);!tt.__s&&Ke(n.__H,t)&&(n.__=e,n.u=t,Ye.__H.__h.push(n))}function Fe(e,t){var n=je(Je++,4);!tt.__s&&Ke(n.__H,t)&&(n.__=e,n.u=t,Ye.__h.push(n))}function R(e){return $e=5,z(function(){return{current:e}},[])}function Ie(e,t,n){$e=6,Fe(function(){if(typeof e==`function`){var n=e(t());return function(){e(null),n&&typeof n==`function`&&n()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function z(e,t){var n=je(Je++,7);return Ke(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Le(e,t){return $e=8,z(function(){return e},t)}function Re(e){var t=Ye.context[e.__c],n=je(Je++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Ye)),t.props.value):e.__}function ze(e,t){tt.useDebugValue&&tt.useDebugValue(t?t(e):e)}function Be(e){var t=je(Je++,10),n=Me();return t.__=e,Ye.componentDidCatch||(Ye.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function Ve(){var e=je(Je++,11);if(!e.__){for(var t=Ye.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__=`P`+n[0]+`-`+n[1]++}return e.__}function He(){for(var e;e=et.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(We),e.__H.__h.forEach(Ge),e.__H.__h=[]}catch(t){e.__H.__h=[],tt.__e(t,e.__v)}}function Ue(e){var t,n=function(){clearTimeout(r),ct&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);ct&&(t=requestAnimationFrame(n))}function We(e){var t=Ye,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),Ye=t}function Ge(e){var t=Ye;e.__c=e.__(),Ye=t}function Ke(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!Qe(t,e[n])})}function qe(e,t){return typeof t==`function`?t(e):t}var Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt=o((()=>{Ae(),Qe=Object.is,$e=0,et=[],tt=L,nt=tt.__b,rt=tt.__r,it=tt.diffed,at=tt.__c,ot=tt.unmount,st=tt.__,tt.__b=function(e){Ye=null,nt&&nt(e)},tt.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),st&&st(e,t)},tt.__r=function(e){rt&&rt(e),Je=0;var t=(Ye=e.__c).__H;t&&(Xe===Ye?(t.__h=[],Ye.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(We),t.__h.forEach(Ge),t.__h=[],Je=0)),Xe=Ye},tt.diffed=function(e){it&&it(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(et.push(t)!==1&&Ze===tt.requestAnimationFrame||((Ze=tt.requestAnimationFrame)||Ue)(He)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),Xe=Ye=null},tt.__c=function(e,t){t.some(function(e){try{e.__h.forEach(We),e.__h=e.__h.filter(function(e){return!e.__||Ge(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],tt.__e(n,e.__v)}}),at&&at(e,t)},tt.unmount=function(e){ot&&ot(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{We(e)}catch(e){t=e}}),n.__H=void 0,t&&tt.__e(t,n.__v))},ct=typeof requestAnimationFrame==`function`})),ut=c({Children:()=>Gt,Component:()=>D,Fragment:()=>E,PureComponent:()=>_t,StrictMode:()=>ln,Suspense:()=>St,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>on,cloneElement:()=>It,createContext:()=>me,createElement:()=>C,createFactory:()=>Mt,createPortal:()=>Et,createRef:()=>T,default:()=>B,findDOMNode:()=>Rt,flushSync:()=>cn,forwardRef:()=>yt,hydrate:()=>Ot,isElement:()=>un,isFragment:()=>Pt,isMemo:()=>Ft,isValidElement:()=>Nt,lazy:()=>Ct,memo:()=>vt,render:()=>Dt,startTransition:()=>pt,unmountComponentAtNode:()=>Lt,unstable_batchedUpdates:()=>zt,useCallback:()=>Le,useContext:()=>Re,useDebugValue:()=>ze,useDeferredValue:()=>mt,useEffect:()=>Pe,useErrorBoundary:()=>Be,useId:()=>Ve,useImperativeHandle:()=>Ie,useInsertionEffect:()=>Bt,useLayoutEffect:()=>Fe,useMemo:()=>z,useReducer:()=>Ne,useRef:()=>R,useState:()=>Me,useSyncExternalStore:()=>dt,useTransition:()=>ht,version:()=>sn});function dt(e,t){var n=t(),r=Me({t:{__:n,u:t}}),i=r[0].t,a=r[1];return Fe(function(){i.__=n,i.u=t,ft(i)&&a({t:i})},[e,n,t]),Pe(function(){return ft(i)&&a({t:i}),e(function(){ft(i)&&a({t:i})})},[e]),n}function ft(e){var t=e.u,n=e.__;try{var r=t();return!Object.is(n,r)}catch(e){return!0}}function pt(e){e()}function mt(e){return e}function ht(){return[!1,pt]}function gt(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function _t(e,t){this.props=e,this.context=t}function vt(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:gt(this.props,e)}function r(t){return this.shouldComponentUpdate=n,C(e,t)}return r.displayName=`Memo(`+(e.displayName||e.name)+`)`,r.prototype.isReactComponent=!0,r.type=e,r}function yt(e){function t(t){var n=Vt({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Ut,t.render=e,t.prototype.isReactComponent=!0,t.displayName=`ForwardRef(`+(e.displayName||e.name)+`)`,t}function bt(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=Vt({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__g|=4,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return bt(e,t,n)})),e}function xt(e,t,n){return e&&n&&(typeof e.type==`string`&&(e.__u|=1),e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return xt(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__g|=4,e.__c.__P=n)),e}function St(){this.__u=0,this.o=null,this.__b=null}function Ct(e){var t,n,r;function i(i){if(t||(t=e()).then(function(e){n=e.default||e},function(e){r=e}),r)throw r;if(!n)throw t;return C(n,i)}return i.displayName=`Lazy`,i}function wt(e){return this.getChildContext=function(){return e.context},e.children}function Tt(e){var t=this,n=e.i;if(t.componentWillUnmount=function(){de(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),!t.l){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},ownerDocument:n.ownerDocument,insertBefore:function(e,n){this.childNodes.push(e),t.i.insertBefore(e,n)}}}de(C(wt,{context:t.context},e.__v),t.l)}function Et(e,t){var n=C(Tt,{__v:e,i:t});return n.containerInfo=t,n}function Dt(e,t,n){return t.__k==null&&(t.textContent=``),de(e,t),typeof n==`function`&&n(),e?e.__c:null}function Ot(e,t,n){return fe(e,t),typeof n==`function`&&n(),e?e.__c:null}function kt(){}function At(){return this.cancelBubble}function jt(){return this.defaultPrevented}function Mt(e){return C.bind(null,e)}function Nt(e){return!!e&&e.$$typeof===Jt}function Pt(e){return Nt(e)&&e.type===E}function Ft(e){return!!e&&!!e.displayName&&(typeof e.displayName==`string`||e.displayName instanceof String)&&e.displayName.startsWith(`Memo(`)}function It(e){return Nt(e)?pe.apply(null,arguments):e}function Lt(e){return!!e.__k&&(de(null,e),!0)}function Rt(e){return e&&(e.__v&&e.__v.__e||e.nodeType===1&&e)||null}function zt(e,t){return e(t)}var Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,B,V=o((()=>{Ae(),lt(),lt(),Bt=Fe,Vt=Object.assign,Ht=/^(-|f[lo].*[^se]$|g.{5,}[^ps]$|z|o[pr]|(W.{5})?[lL]i.*(t|mp)$|an|(bo|s).{4}Im|sca|m.{6}[ds]|ta|c.*[st]$|wido|ini)/,(_t.prototype=new D).isPureReactComponent=!0,_t.prototype.shouldComponentUpdate=function(e,t){return gt(this.props,e)||gt(this.state,t)},Ut=Symbol.for(`react.forward_ref`),Wt=function(e,t,n){return e==null?null:ee(ee(e).map(t.bind(n)))},Gt={map:Wt,forEach:Wt,count:function(e){return e?ee(e).length:0},only:function(e){var t=ee(e);if(t.length!==1)throw`Children.only`;return t[0]},toArray:ee},Kt=L.__e,L.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Kt(e,t,n,r)},qt=L.unmount,L.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),qt&&qt(e)},(St.prototype=new D).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=!1,a=function(){i||(i=!0,n.__R=null,o())};n.__R=a;var o=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=xt(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},St.prototype.componentWillUnmount=function(){this.o=[]},St.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=bt(this.__b,n,r.__O=r.__P)}this.__b=null}return[C(E,null,t.__a?null:e.children),t.__a&&C(E,null,e.fallback)]},Jt=Symbol.for(`react.element`),Yt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Xt=/[A-Z0-9]/g,Zt=typeof document<`u`,Qt=function(e){return/fil|che|rad/.test(e)},D.prototype.isReactComponent={},[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(D.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}),$t=L.event,L.event=function(e){return $t&&(e=$t(e)),e.persist=kt,e.isPropagationStopped=At,e.isDefaultPrevented=jt,e.nativeEvent=e},tn={enumerable:!1,configurable:!0,get:function(){return this.class}},nn=L.vnode,L.vnode=function(e){if(typeof e.type==`string`)(function(e){var t=e.props,n=e.type,r={},i=n.indexOf(`-`)===-1;for(var a in t){var o=t[a];if(!(a===`value`&&`defaultValue`in t&&o==null||Zt&&a===`children`&&n===`noscript`||a===`class`||a===`className`)){if(a===`style`&&typeof o==`object`)for(var s in o)typeof o[s]!=`number`||Ht.test(s)||(o[s]+=`px`);else if(a===`defaultValue`&&`value`in t&&t.value==null)a=`value`;else if(a===`download`&&!0===o)o=``;else if(a===`translate`&&o===`no`)o=!1;else if(a[0]===`o`&&a[1]===`n`){var c=a.toLowerCase();c===`ondoubleclick`?a=`ondblclick`:c!==`onchange`||n!==`input`&&n!==`textarea`||Qt(t.type)?c===`onfocus`?a=`onfocusin`:c===`onblur`&&(a=`onfocusout`):c=a=`oninput`,c===`oninput`&&r[a=c]&&(a=`oninputCapture`)}else i&&Yt.test(a)?a=a.replace(Xt,`-$&`).toLowerCase():o===null&&(o=void 0);r[a]=o}}n==`select`&&r.multiple&&Array.isArray(r.value)&&(r.value=ee(t.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),n==`select`&&r.defaultValue!=null&&(r.value=ee(t.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value})),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",tn)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r})(e);else if(typeof e.type==`function`&&(`ref`in e.props&&`prototype`in e.type&&e.type.prototype.render&&(e.ref=e.props.ref,delete e.props.ref),e.type.defaultProps)){var t=Vt({},e.props);for(var n in e.type.defaultProps)t[n]===void 0&&(t[n]=e.type.defaultProps[n]);e.props=t}e.$$typeof=Jt,nn&&nn(e)},rn=L.__r,L.__r=function(e){rn&&rn(e),en=e.__c},an=L.diffed,L.diffed=function(e){an&&an(e);var t=e.props,n=e.__e;n!=null&&e.type===`textarea`&&`value`in t&&t.value!==n.value&&(n.value=t.value==null?``:t.value),en=null},on={ReactCurrentDispatcher:{current:{readContext:function(e){return en.__n[e.__c].props.value},useCallback:Le,useContext:Re,useDebugValue:ze,useDeferredValue:mt,useEffect:Pe,useId:Ve,useImperativeHandle:Ie,useInsertionEffect:Bt,useLayoutEffect:Fe,useMemo:z,useReducer:Ne,useRef:R,useState:Me,useSyncExternalStore:dt,useTransition:ht}}},sn=`18.3.1`,cn=function(e,t){return e(t)},ln=E,un=Nt,B={useState:Me,useId:Ve,useReducer:Ne,useEffect:Pe,useLayoutEffect:Fe,useInsertionEffect:Bt,useTransition:ht,useDeferredValue:mt,useSyncExternalStore:dt,startTransition:pt,useRef:R,useImperativeHandle:Ie,useMemo:z,useCallback:Le,useContext:Re,useDebugValue:ze,version:`18.3.1`,Children:Gt,render:Dt,hydrate:Ot,unmountComponentAtNode:Lt,createPortal:Et,createElement:C,createContext:me,createFactory:Mt,cloneElement:It,createRef:T,Fragment:E,isValidElement:Nt,isElement:un,isFragment:Pt,isMemo:Ft,findDOMNode:Rt,Component:D,PureComponent:_t,memo:vt,forwardRef:yt,flushSync:cn,unstable_batchedUpdates:zt,StrictMode:ln,Suspense:St,lazy:Ct,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:on}}));V();function dn({size:e=20,color:t=`currentColor`}){return B.createElement(`svg`,{width:e,height:e,className:`DocSearch-Search-Icon`,viewBox:`0 0 24 24`,"aria-hidden":`true`},B.createElement(`circle`,{cx:`11`,cy:`11`,r:`8`,stroke:t,fill:`none`,strokeWidth:`1.4`}),B.createElement(`path`,{d:`m21 21-4.3-4.3`,stroke:t,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`}))}function fn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function pn(e,t){if(e==null)return{};var n,r,i=fn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}V();let mn=({theme:e})=>{Pe(()=>{if(!e)return;let t=document.documentElement.dataset.theme;if(e!==t)return document.documentElement.dataset.theme=e,()=>{t===void 0?delete document.documentElement.dataset.theme:document.documentElement.dataset.theme=t}},[e])};V();function hn(){let[e,t]=Me(null);Pe(()=>{typeof navigator<`u`&&(x()?t(`⌘`):t(b))},[]);let[n,r,i]=e===`Ctrl`?[b,`Control`,`Ctrl`]:[`Meta`,`Meta`,`⌘`];return{actionKeyReactsTo:n,actionKeyAltText:r,actionKeyLabel:i,key:e}}let gn=[`translations`,`keyboardShortcuts`],_n=B.forwardRef((e,t)=>{let{translations:n={},keyboardShortcuts:r}=e,i=pn(e,gn),{buttonText:a=`Search`,buttonAriaLabel:o=`Search`}=n,s=y(r),{actionKeyReactsTo:c,actionKeyAltText:l,actionKeyLabel:u,key:d}=hn();mn({theme:i.theme});let f=s[`Ctrl/Cmd+K`],p=`${l}+k`;return B.createElement(`button`,_(_({type:`button`,className:`DocSearch DocSearch-Button`,"aria-label":f?`${o} (${p})`:o,"aria-keyshortcuts":f?p:void 0},i),{},{ref:t}),B.createElement(`span`,{className:`DocSearch-Button-Container`},B.createElement(dn,null),B.createElement(`span`,{className:`DocSearch-Button-Placeholder`},a)),B.createElement(`span`,{className:`DocSearch-Button-Keys`},d!==null&&f&&B.createElement(B.Fragment,null,B.createElement(vn,{reactsToKey:c},u),B.createElement(vn,{reactsToKey:`k`},`K`))))});function vn({reactsToKey:e,children:t}){let[n,r]=Me(!1);return Pe(()=>{if(!e)return;function t(t){t.key===e&&r(!0)}function n(t){(t.key===e||t.key===`Meta`)&&r(!1)}return window.addEventListener(`keydown`,t),window.addEventListener(`keyup`,n),()=>{window.removeEventListener(`keydown`,t),window.removeEventListener(`keyup`,n)}},[e]),B.createElement(`kbd`,{className:n?`DocSearch-Button-Key DocSearch-Button-Key--pressed`:`DocSearch-Button-Key`+(e===`Ctrl`?` DocSearch-Button-Key--ctrl`:``)},t)}let yn=`5.0.1`;function bn(e,t){this.v=e,this.k=t}function xn(e){return new bn(e,0)}function Sn(e){return function(){return new Cn(e.apply(this,arguments))}}function Cn(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof bn;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`?`return`:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(a.done?`return`:`normal`,n)},function(e){r(`throw`,e)})}catch(e){i(`throw`,e)}}function i(e,i){switch(e){case`return`:t.resolve({value:i,done:!0});break;case`throw`:t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}Cn.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},Cn.prototype.next=function(e){return this._invoke(`next`,e)},Cn.prototype.throw=function(e){return this._invoke(`throw`,e)},Cn.prototype.return=function(e){return this._invoke(`return`,e)};function wn(e){var t,n,r,i=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&(t=e[n])!=null)return t.call(e);if(r&&(t=e[r])!=null)return new Tn(t.call(e));n=`@@asyncIterator`,r=`@@iterator`}throw TypeError(`Object is not async iterable`)}function Tn(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return Tn=function(e){this.s=e,this.n=e.next},Tn.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new Tn(e)}function En(e){"@babel/helpers - typeof";return En=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},En(e)}function Dn(e,t){if(En(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(En(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function On(e){var t=Dn(e,`string`);return En(t)==`symbol`?t:t+``}function H(e,t,n){return(t=On(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?kn(Object(n),!0).forEach(function(t){H(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function An(e){var t={},n=!1;function r(t,r){return n=!0,r=new Promise(function(n){n(e[t](r))}),{done:!1,value:new bn(r,1)}}return t[typeof Symbol<`u`&&Symbol.iterator||`@@iterator`]=function(){return this},t.next=function(e){return n?(n=!1,e):r(`next`,e)},typeof e.throw==`function`&&(t.throw=function(e){if(n)throw n=!1,e;return r(`throw`,e)}),typeof e.return==`function`&&(t.return=function(e){return n?(n=!1,e):r(`return`,e)}),t}function jn(e){let t,n=`algolia-client-js-${e.key}`;function r(){return t===void 0&&(t=e.localStorage||window.localStorage),t}function i(){return JSON.parse(r().getItem(n)||`{}`)}function a(e){r().setItem(n,JSON.stringify(e))}function o(){return new Promise(e=>setTimeout(e,0))}function s(){let t=e.timeToLive?e.timeToLive*1e3:null,n=i(),r=new Date().getTime(),a=!1;return{namespace:Object.fromEntries(Object.entries(n).filter(([,e])=>!e||e.timestamp===void 0||t&&e.timestamp+t<r?(a=!0,!1):!0)),changed:a}}return{get(e,t,n={miss:()=>Promise.resolve()}){return o().then(()=>{let{namespace:r,changed:i}=s(),o=r[JSON.stringify(e)];return i&&a(r),o?o.value:t().then(e=>n.miss(e).then(()=>e))})},set(e,t){return o().then(()=>{let a=i();return a[JSON.stringify(e)]={timestamp:new Date().getTime(),value:t},r().setItem(n,JSON.stringify(a)),t})},delete(e){return o().then(()=>{let t=i();delete t[JSON.stringify(e)],r().setItem(n,JSON.stringify(t))})},clear(){return Promise.resolve().then(()=>{r().removeItem(n)})}}}function Mn(){return{get(e,t,n={miss:()=>Promise.resolve()}){return t().then(e=>Promise.all([e,n.miss(e)])).then(([e])=>e)},set(e,t){return Promise.resolve(t)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}}function Nn(e){let t=[...e.caches],n=t.shift();return n===void 0?Mn():{get(e,r,i={miss:()=>Promise.resolve()}){return n.get(e,r,i).catch(()=>Nn({caches:t}).get(e,r,i))},set(e,r){return n.set(e,r).catch(()=>Nn({caches:t}).set(e,r))},delete(e){return n.delete(e).catch(()=>Nn({caches:t}).delete(e))},clear(){return n.clear().catch(()=>Nn({caches:t}).clear())}}}function Pn(e={serializable:!0}){let t={};return{get(n,r,i={miss:()=>Promise.resolve()}){let a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);let o=r();return o.then(e=>i.miss(e)).then(()=>o)},set(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}function Fn(e){let t={value:`Algolia for JavaScript (${e})`,add(e){let n=`; ${e.segment}${e.version===void 0?``:` (${e.version})`}`;return t.value.indexOf(n)===-1&&(t.value=`${t.value}${n}`),t}};return t}function In(e,t,n=`WithinHeaders`){let r={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers(){return n===`WithinHeaders`?r:{}},queryParameters(){return n===`WithinQueryParameters`?r:{}}}}function Ln({algoliaAgents:e,client:t,version:n}){let r=Fn(n).add({segment:t,version:n});return e.forEach(e=>r.add(e)),r}function Rn(){return{debug(e,t){return Promise.resolve()},info(e,t){return Promise.resolve()},error(e,t){return Promise.resolve()}}}var zn=10*1024*1024;function Bn(e){return Vn.apply(this,arguments)}function Vn(){return Vn=Sn(function*(e){let t=e.getReader();try{for(;;){let{done:e,value:n}=yield xn(t.read());if(e)return;yield n}}finally{t.releaseLock()}}),Vn.apply(this,arguments)}function Hn(e){return Symbol.asyncIterator in e?e:Bn(e)}function Un(e){return Wn.apply(this,arguments)}function Wn(){return Wn=Sn(function*(e){let t=new TextDecoder(`utf-8`),n=[],r=0,i=!1,a=!0;var o=!1,s=!1,c;try{for(var l=wn(Hn(e)),u;o=!(u=yield xn(l.next())).done;o=!1){let e=u.value;{let o=t.decode(e,{stream:!0}),s=0;for(i&&(i=!1,o.length>0&&o[0]===`
|
|
3
3
|
`&&(s=1));s<o.length;){let e=o.indexOf(`\r`,s),t=o.indexOf(`
|
|
4
4
|
`,s);if(e===-1&&t===-1){let e=o.slice(s);if(n.push(e),r+=e.length,r>zn)throw Error(`SSE line buffer exceeded 10MB`);break}let c,l;e!==-1&&(t===-1||e<t)?(c=e,e+1<o.length?l=o[e+1]===`
|
|
5
5
|
`?2:1:(i=!0,l=1)):(c=t,l=1);let u=o.slice(s,c);n.push(u);let d=n.length===1?n[0]:n.join(``);n.length=0,r=0,a&&(d.startsWith(``)&&(d=d.slice(1)),a=!1),yield d,s=c+l}}}}catch(e){s=!0,c=e}finally{try{o&&l.return!=null&&(yield xn(l.return()))}finally{if(s)throw c}}let d=t.decode();if(d&&n.push(d),n.length>0){let e=n.join(``);a&&e.startsWith(``)&&(e=e.slice(1)),yield e}}),Wn.apply(this,arguments)}var Gn=class{constructor(){H(this,`data`,[]),H(this,`eventType`,``),H(this,`lastEventId`,null),H(this,`retry`,null)}decode(e){if(e===``)return this.dispatch();if(e[0]===`:`)return null;let t=e.indexOf(`:`),n,r;switch(t===-1?(n=e,r=``):(n=e.slice(0,t),r=e.slice(t+1),r[0]===` `&&(r=r.slice(1))),n){case`data`:this.data.push(r);break;case`event`:this.eventType=r;break;case`id`:r.includes(`\0`)||(this.lastEventId=r);break;case`retry`:/^[0-9]+$/.test(r)&&(this.retry=parseInt(r,10));break}return null}dispatch(){let e=this.eventType;if(this.eventType=``,this.data.length===0)return null;let t={data:this.data.join(`
|
|
@@ -23,7 +23,7 @@ var Au=s((e=>{var t=(V(),d(ut));function n(e,t){return e===t&&(e!==0||1/e==1/t)|
|
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
25
|
*/
|
|
26
|
-
var t=(V(),d(ut)),n=ju();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Nu=s(((e,t)=>{t.exports=Mu()}));V();let Pu=[],Fu;function Iu(){return Fu}function Lu(e){Pu.push(e)}function Ru(e){let t=(t,n)=>{let r=ei(Bu).current,i;try{Fu=r;for(let e of Pu)e.before(r);i=e(t,n);for(let e of Pu)e.after(r);r.didInitialize=!0}finally{Fu=void 0}return i};return t.displayName=e.displayName||e.name,t}function zu(e){return yt(Ru(e))}function Bu(){return{didInitialize:!1}}V();var Vu=ju(),Hu=Nu();let Uu=ci(19)?Ku:qu;function Wu(e,t,n,r,i){return Uu(e,t,n,r,i)}function Gu(e,t,n,r,i){let a=Le(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Vu.useSyncExternalStore)(e.subscribe,a,a)}Lu({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Vu.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Ku(e,t,n,r,i){let a=Iu();if(!a)return Gu(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function qu(e,t,n,r,i){return(0,Hu.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Ju=class{constructor(e){H(this,`subscribe`,e=>(this.listeners.add(e),()=>{this.listeners.delete(e)})),H(this,`getSnapshot`,()=>this.state),this.state=e,this.listeners=new Set,this.updateTick=0}setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState(U(U({},this.state),e));return}}set(e,t){Object.is(this.state[e],t)||this.setState(U(U({},this.state),{},{[e]:t}))}notifyAll(){let e=U({},this.state);this.setState(e)}use(e,t,n,r){return Wu(this,e,t,n,r)}};V();var Yu=class extends Ju{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){ze(e);let n=this;W(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;W(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;W(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){ze(e);let n=this,r=t!==void 0;W(()=>{r&&!Object.is(n.state[e],t)&&n.setState(U(U({},n.state),{},{[e]:t}))},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return ze(e),Wu(this,this.selectors[e],t,n,r)}useContextCallback(e,t){ze(e);let n=La(t==null?di:t);this.context[e]=n}useStateSetter(e){let t=R(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}};let Xu=[`syncOnly`,`nested`,`onOpenChange`,`triggerElements`],Zu={open:G(e=>e.open),transitionStatus:G(e=>e.transitionStatus),domReferenceElement:G(e=>e.domReferenceElement),referenceElement:G(e=>{var t;return(t=e.positionReference)==null?e.referenceElement:t}),floatingElement:G(e=>e.floatingElement),floatingId:G(e=>e.floatingId)};var Qu=class extends Yu{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i}=e,a=vr(e,Xu);super(U(U({},a),{},{positionReference:a.referenceElement,domReferenceElement:a.referenceElement}),{onOpenChange:r,dataRef:{current:{}},events:Qc(),nested:n,triggerElements:i},Zu),H(this,`syncOpenEvent`,(e,t)=>{(!e||!this.state.open||t!=null&&qo(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)}),H(this,`dispatchOpenChange`,(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)}),H(this,`setOpen`,(e,t)=>{var n,r;if(this.syncOnly){var i,a;(i=(a=this.context).onOpenChange)==null||i.call(a,e,t);return}this.dispatchOpenChange(e,t),(n=(r=this.context).onOpenChange)==null||n.call(r,e,t)}),this.syncOnly=t}};V();function $u(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=R(null);r===void 0&&f.current===null&&(f.current=new Qu({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r==null?f.current:r;return t.useSyncedValue(`floatingId`,i),W(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};ma(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}V();let ed={tabIndex:-1,"data-base-ui-focusable":``};function td(e){return t=>t!==`touch`||e.current}function nd(e,t,n=!1){let r=bo(),i=nl()!=null,a=R(null);e===void 0&&a.current===null&&(a.current=t(r,i));let o=e==null?a.current:e;return $u({popupStore:o,treatPopupAsFloatingElement:n,floatingRootContext:o.state.floatingRootContext,floatingId:r,nested:i,onOpenChange:o.setOpen}),{store:o,internalStore:a.current}}function rd(e,t){let n=R(null),r=R(null);return Le(i=>{if(e===void 0)return;let a=!1;if(n.current!==null){let e=n.current,i=r.current,o=t.context.triggerElements.getById(e);i&&o===i&&(t.context.triggerElements.delete(e),a=!0),n.current=null,r.current=null}if(i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i),a=!0),a){let e=t.context.triggerElements.size;t.select(`open`)&&t.state.triggerCount!==e&&t.set(`triggerCount`,e)}},[t,e])}function id(e,t,n,r=!1){var i;t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);let a=(i=n==null?void 0:n.id)==null?null:i;(a||t)&&(e.activeTriggerId=a,e.activeTriggerElement=n==null?null:n)}function ad(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function od(e,t,n,r){ku(()=>{t===void 0&&e.state.open===!1&&n&&(e.state=U(U({},e.state),{},{open:!0,activeTriggerId:r,preventUnmountingOnClose:!1}))})}function sd(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=rd(e,n),o=La(t=>{if(a(t),!t)return;let i=n.select(`open`),o=n.select(`activeTriggerId`);if(o===e){n.update(U({activeTriggerElement:t},i?r:null));return}o==null&&i&&n.update(U({activeTriggerId:e,activeTriggerElement:t},r))});return W(()=>{i&&n.update(U({activeTriggerElement:t.current},r))},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function cd(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState(`open`);W(()=>{if(!r){e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let t=e.context.triggerElements.size,i={};e.state.triggerCount!==t&&(i.triggerCount=t);let a=e.select(`activeTriggerId`),o=null;if(a){let t=e.context.triggerElements.getById(a);t?t!==e.state.activeTriggerElement&&(i.activeTriggerElement=t):o=a}if(!o&&!a&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;i.activeTriggerId=e,i.activeTriggerElement=n}}(i.triggerCount!==void 0||i.activeTriggerId!==void 0||i.activeTriggerElement!==void 0)&&e.update(i),o&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===o&&!e.context.triggerElements.getById(o)){let t=wo(`none`);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,e.useState(`triggerCount`),n])}function ld(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=Mo(e),o=t.useState(`preventUnmountingOnClose`),s=!e&&o;t.useSyncedValues({mounted:r,transitionStatus:a,preventUnmountingOnClose:s});let c=La(()=>{var e,r;i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n==null||n(),(e=(r=t.context).onOpenChangeComplete)==null||e.call(r,!1)});return Fo({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:a}}function ud(e,t){e.useSyncedValues(t),W(()=>()=>{e.update({activeTriggerProps:pi,inactiveTriggerProps:pi,popupProps:pi})},[e])}function dd(e,t){W(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),W(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var fd=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function pd(){return new Qu({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new fd,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function md(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:pd(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:pi,inactiveTriggerProps:pi,popupProps:pi}}function hd(e,t,n=!1){return new Qu({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}let gd=G(e=>{var t;return(t=e.triggerIdProp)==null?e.activeTriggerId:t}),_d=G(e=>{var t;return(t=e.openProp)==null?e.open:t}),vd=G(e=>{var t,n;return((t=(n=e.popupElement)==null?void 0:n.id)==null?e.floatingId:t)||void 0});function yd(e,t){return t!==void 0&&_d(e)&&gd(e)===t}function bd(e,t){return yd(e,t)?!0:t!==void 0&&_d(e)&&gd(e)==null&&e.triggerCount===1}let xd={open:_d,mounted:G(e=>e.mounted),transitionStatus:G(e=>e.transitionStatus),floatingRootContext:G(e=>e.floatingRootContext),triggerCount:G(e=>e.triggerCount),preventUnmountingOnClose:G(e=>e.preventUnmountingOnClose),payload:G(e=>e.payload),activeTriggerId:gd,activeTriggerElement:G(e=>e.mounted?e.activeTriggerElement:null),popupId:vd,isTriggerActive:G((e,t)=>t!==void 0&&gd(e)===t),isOpenedByTrigger:G((e,t)=>yd(e,t)),isMountedByTrigger:G((e,t)=>t!==void 0&&gd(e)===t&&e.mounted),triggerProps:G((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:G((e,t)=>bd(e,t)?vd(e):void 0),popupProps:G(e=>e.popupProps),popupElement:G(e=>e.popupElement),positionerElement:G(e=>e.positionerElement)};function Sd(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=bo(),a=nl()!=null,o=ei(()=>{var e,o;return new Qu({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:(e=r.reference)==null?null:e,floatingElement:(o=r.floating)==null?null:o,triggerElements:new fd,floatingId:i,syncOnly:!1,nested:a})}).current;return W(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=ma(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}V();function Cd(e={}){let{nodeId:t,externalTree:n}=e,r=Sd(e),i=e.rootContext||r,a=i.useState(`referenceElement`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.useState(`open`),l=i.useState(`floatingId`),[u,d]=Me(null),[f,p]=Me(void 0),[m,h]=Me(void 0),g=R(null),_=rl(n),v=z(()=>({reference:a,floating:o,domReference:s}),[a,o,s]),y=Su(U(U({},e),{},{elements:U(U({},v),u&&{reference:u})})),b=ma(f)?f:null,x=m===void 0?i.state.floatingElement:m;i.useSyncedValue(`referenceElement`,f==null?null:f),i.useSyncedValue(`domReferenceElement`,f===void 0?s:b),i.useSyncedValue(`floatingElement`,x);let S=Le(e=>{let t=ma(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),y.refs.setReference(t)},[y.refs]),C=Le(e=>{(ma(e)||e===null)&&(g.current=e,p(e)),(ma(y.refs.reference.current)||y.refs.reference.current===null||e!==null&&!ma(e))&&y.refs.setReference(e)},[y.refs,p]),w=Le(e=>{h(e),y.refs.setFloating(e)},[y.refs]),T=z(()=>U(U({},y.refs),{},{setReference:C,setFloating:w,setPositionReference:S,domReference:g}),[y.refs,C,w,S]),E=z(()=>U(U({},y.elements),{},{domReference:s}),[y.elements,s]),D=z(()=>U(U({},y),{},{dataRef:i.context.dataRef,open:c,onOpenChange:i.setOpen,events:i.context.events,floatingId:l,refs:T,elements:E,nodeId:t,rootStore:i}),[y,T,E,t,i,c,l]);return W(()=>{s&&(g.current=s)},[s]),W(()=>{i.context.dataRef.current.floatingContext=D;let e=_==null?void 0:_.nodesRef.current.find(e=>e.id===t);e&&(e.context=D)}),z(()=>U(U({},y),{},{context:D,refs:T,elements:E,rootStore:i}),[y,T,E,D,i])}V();let wd=no&&oo;function Td(e,t={}){let{enabled:n=!0,delay:r}=t,i=`rootStore`in e?e.rootStore:e,{events:a,dataRef:o}=i.context,s=R(!1),c=R(null),l=R(!0),u=Vo();Pe(()=>{let e=i.select(`domReferenceElement`);if(!n)return;let t=da(e);function r(){let e=i.select(`domReferenceElement`);!i.select(`open`)&&ha(e)&&e===Xo(gs(e))&&(s.current=!0)}function a(){l.current=!0}function o(){l.current=!1}return ps(fs(t,`blur`,r),wd&&fs(t,`keydown`,a,!0),wd&&fs(t,`pointerdown`,o,!0))},[i,n]),Pe(()=>{if(!n)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=i.select(`domReferenceElement`);ma(e)&&(c.current=e,s.current=!0)}}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,n,i]);let d=z(()=>{function e(){s.current=!1,c.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(s.current){if(c.current===n)return;e()}let a=Qo(t.nativeEvent);if(ma(a)){if(wd&&!t.relatedTarget){if(!l.current&&!ns(a))return}else if(!as(a))return}let o=$o(t.relatedTarget,i.context.triggerElements),{nativeEvent:d,currentTarget:f}=t,p=typeof r==`function`?r():r;if(i.select(`open`)&&o||p===0||p===void 0){i.setOpen(!0,wo(na,d,f));return}u.start(p,()=>{s.current||i.setOpen(!0,wo(na,d,f))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=ma(n)&&n.hasAttribute(Dc(`focus-guard`))&&n.getAttribute(`data-type`)===`outside`;u.start(0,()=>{var e;let t=i.select(`domReferenceElement`),s=Xo(gs(t));!n&&s===t||Zo((e=o.current.floatingContext)==null?void 0:e.refs.floating.current,s)||Zo(t,s)||a||$o(n==null?s:n,i.context.triggerElements)||i.setOpen(!1,wo(na,r))})}}},[o,r,i,u]);return z(()=>n?{reference:d,trigger:d}:{},[n,d])}var Ed=class e{constructor(){H(this,`dispose`,()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()}),H(this,`disposeEffect`,()=>this.dispose),this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Bo,this.restTimeout=new Bo,this.handleCloseOptions=void 0}static create(){return new e}};let Dd=new WeakMap;function Od(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;if(t&&Dd.get(t)===e){var n,r,i;(n=e.pointerEventsScopeElement)==null||n.style.removeProperty(`pointer-events`),(r=e.pointerEventsReferenceElement)==null||r.style.removeProperty(`pointer-events`),(i=e.pointerEventsFloatingElement)==null||i.style.removeProperty(`pointer-events`),Dd.delete(t)}e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function kd(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Dd.get(n);a&&a!==e&&Od(a),Od(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Dd.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Ad(e){let t=e.context.dataRef.current,n=ei(()=>{var e;return(e=t.hoverInteractionState)==null?Ed.create():e}).current;return t.hoverInteractionState||(t.hoverInteractionState=n),Oo(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}V();function jd(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=`rootStore`in e?e.rootStore:e,o=a.useState(`open`),s=a.useState(`floatingElement`),c=a.useState(`domReferenceElement`),{dataRef:l}=a.context,u=rl(),d=nl(),f=Ad(a),p=Vo(),m=La(()=>{var e;return us((e=l.current.openEvent)==null?void 0:e.type,f.interactedInside)}),h=La(()=>{var e;return ds((e=l.current.openEvent)==null?void 0:e.type)}),g=La(()=>{Od(f)});W(()=>{o||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[o,f,g]),Pe(()=>g,[g]),W(()=>{var e;if(n&&o&&(e=f.handleCloseOptions)!=null&&e.blockPointerEvents&&h()&&ma(c)&&s){var t,r,i,a,l,p,m;let e=c,n=s,o=gs(s),h=u==null||(t=u.nodesRef.current.find(e=>e.id===d))==null||(t=t.context)==null?void 0:t.elements.floating;h&&(h.style.pointerEvents=``);let _=f.pointerEventsScopeElement===n?null:f.pointerEventsScopeElement,v=h===n?null:h,y=(r=(i=(a=(l=(p=f.handleCloseOptions)==null||(m=p.getScope)==null?void 0:m.call(p))==null?_:l)==null?v:a)==null?e.closest(`[data-rootownerid]`):i)==null?o.body:r;return kd(f,{scopeElement:y,referenceElement:e,floatingElement:n}),()=>{g()}}},[n,o,c,s,f,h,u,d,g]),Pe(()=>{if(!n)return;function e(){return!!(u&&d&&Tc(u.nodesRef.current,d).length>0)}function t(e){let t=cs(r,`close`,f.pointerType),n=()=>{a.setOpen(!1,wo(ta,e)),u==null||u.events.emit(`floating.closed`,e)};t?f.openChangeTimeout.start(t,n):(f.openChangeTimeout.clear(),n())}function o(e){let t=Qo(e);if(!rs(t)){f.interactedInside=!1;return}f.interactedInside=(t==null?void 0:t.closest(`[aria-haspopup]`))!=null}function c(){f.openChangeTimeout.clear(),p.clear(),u==null||u.events.off(`floating.closed`,v),g()}function _(n){var r,o;if(e()&&u){u.events.on(`floating.closed`,v);return}if($o(n.relatedTarget,a.context.triggerElements))return;let s=(r=(o=l.current.floatingContext)==null?void 0:o.nodeId)==null?i:r,c=n.relatedTarget;if(!(u&&s&&ma(c)&&Tc(u.nodesRef.current,s,!1).some(e=>{var t;return Zo((t=e.context)==null?void 0:t.elements.floating,c)}))){if(f.handler){f.handler(n);return}g(),h()&&!m()&&t(n)}}function v(t){!u||!d||e()||p.start(0,()=>{u.events.off(`floating.closed`,v),a.setOpen(!1,wo(ta,t)),u.events.emit(`floating.closed`,t)})}let y=s;return ps(y&&fs(y,`mouseenter`,c),y&&fs(y,`mouseleave`,_),y&&fs(y,`pointerdown`,o,!0),()=>{u==null||u.events.off(`floating.closed`,v)})},[n,s,a,l,r,i,h,m,g,f,u,d,p])}V();let Md={current:null};function Nd(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=Md,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p}=t,m=`rootStore`in e?e.rootStore:e,{dataRef:h,events:g}=m.context,_=rl(l),v=Ad(m),y=R(!1),b=ms(i),x=ms(r),S=ms(o),C=ms(n),w=ms(p),T=ms(f),E=La(()=>{var e;return us((e=h.current.openEvent)==null?void 0:e.type,v.interactedInside)}),D=La(()=>{var e;return((e=w.current)==null?void 0:e.call(w))!==!1}),O=La((e,t,n)=>{let r=m.context.triggerElements;if(r.hasElement(t))return!e||!Zo(e,t);if(!ma(n))return!1;let i=n;return r.hasMatchingElement(e=>Zo(e,i))&&(!e||!Zo(e,i))}),k=La(()=>{v.handler&&(gs(m.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),v.handler=void 0)}),A=La(()=>{Od(v)});if(u){var j;v.handleCloseOptions=(j=b.current)==null?void 0:j.__options}return Pe(()=>k,[k]),Pe(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===ta,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),Pe(()=>{var e;if(!n)return;function t(e,t=!0){let n=cs(x.current,`close`,v.pointerType);n?v.openChangeTimeout.start(n,()=>{m.setOpen(!1,wo(ta,e)),_==null||_.events.emit(`floating.closed`,e)}):t&&(v.openChangeTimeout.clear(),m.setOpen(!1,wo(ta,e)),_==null||_.events.emit(`floating.closed`,e))}let r=(e=c.current)==null?u?m.select(`domReferenceElement`):null:e;if(!ma(r))return;function i(e){var t,n,r;if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!Ko(v.pointerType))return;let i=ls(S.current),o=cs(x.current,`open`,v.pointerType),s=Qo(e),c=(t=e.currentTarget)==null?null:t,l=m.select(`domReferenceElement`),u=c;if(ma(s)&&!m.context.triggerElements.hasElement(s)){for(let e of m.context.triggerElements.elements())if(Zo(e,s)){u=e;break}}ma(c)&&ma(l)&&!m.context.triggerElements.hasElement(c)&&Zo(c,l)&&(u=l);let d=u!=null&&O(l,u,s),f=m.select(`open`),p=(n=(r=T.current)==null?void 0:r.call(T))==null?m.select(`transitionStatus`)===`ending`:n,h=!f&&p&&y.current,g=!d&&ma(u)&&ma(l)&&Zo(l,u)&&h,_=i>0&&!o,b=d&&(f||h)||g,C=!f||d;if(b){D()&&m.setOpen(!0,wo(ta,e,u));return}_||(o?v.openChangeTimeout.start(o,()=>{C&&D()&&m.setOpen(!0,wo(ta,e,u))}):C&&D()&&m.setOpen(!0,wo(ta,e,u)))}function o(e){var n;if(E()){A();return}k();let r=gs(m.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=(n=h.current.floatingContext)==null?d==null?void 0:d():n;if(!$o(e.relatedTarget,m.context.triggerElements)){if(b.current&&i){m.select(`open`)||v.openChangeTimeout.clear();let n=c.current;v.handler=b.current(U(U({},i),{},{tree:_,x:e.clientX,y:e.clientY,onClose(){A(),k(),C.current&&!E()&&n===m.select(`domReferenceElement`)&&t(e,!0)}})),r.addEventListener(`mousemove`,v.handler),v.handler(e);return}(v.pointerType!==`touch`||!Zo(m.select(`floatingElement`),e.relatedTarget))&&t(e)}}return s?ps(fs(r,`mousemove`,i,{once:!0}),fs(r,`mouseenter`,i),fs(r,`mouseleave`,o)):ps(fs(r,`mouseenter`,i),fs(r,`mouseleave`,o))},[k,A,h,x,m,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D]),z(()=>{if(!n)return;function e(e){v.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){var t;let{nativeEvent:n}=e,r=e.currentTarget,i=m.select(`domReferenceElement`),o=m.select(`open`),s=O(i,r,e.target);if(a&&!Ko(v.pointerType))return;if(o&&s&&(t=v.handleCloseOptions)!=null&&t.blockPointerEvents){let e=m.select(`floatingElement`);if(e){var c,l,u;let t=(c=(l=v.handleCloseOptions)==null||(u=l.getScope)==null?void 0:u.call(l))==null?r.ownerDocument.body:c;kd(v,{scopeElement:t,referenceElement:r,floatingElement:e})}}let d=ls(S.current);if(o&&!s||d===0||!s&&v.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;v.restTimeout.clear();function f(){if(v.restTimeoutPending=!1,E())return;let e=m.select(`open`);!v.blockMouseMove&&(!e||s)&&D()&&m.setOpen(!0,wo(ta,n,r))}v.pointerType===`touch`?cn(()=>{f()}):s&&o?f():(v.restTimeoutPending=!0,v.restTimeout.start(d,f))}}},[n,v,E,O,a,m,S,D])}V();function Pd(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Fd(e,t){return Pd(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function Id(e,t,n){return Pd(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Ld(e,t,n){return Pd(t,n?e===Jo:e===Yo,e===`ArrowDown`)}function Rd(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:Pd(t,n?e===Yo:e===Jo,e===`ArrowUp`)}function zd(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,parentOrientation:_,id:v,resetOnPointerLeave:y=!0,externalTree:b,grid:x}=t,S=x!=null,C=`rootStore`in e?e.rootStore:e,w=C.useState(`open`),T=C.useState(`floatingElement`),E=C.useState(`domReferenceElement`),D=C.context.dataRef,O=os(T),k=is(E),A=ms(O),j=nl(),M=rl(b),N=R(f),P=R(o==null?-1:o),ee=R(null),te=R(!0),F=La(e=>{i(P.current===-1?null:P.current,e)}),ne=R(!!T),re=R(w),ie=R(!1),ae=R(!1),oe=R(null),se=ms(h),ce=ms(w),I=ms(o),le=ms(y),ue=jo(),de=jo(),fe=La(()=>{function e(e){d?M==null||M.events.emit(`virtualfocus`,e):oe.current=kc(e,{sync:ie.current,preventScroll:!0})}let t=n.current[P.current],r=ae.current;t&&e(t),(ie.current?e=>e():e=>ue.request(e))(()=>{let i=n.current[P.current]||t;if(i&&(t||e(i),_e&&(r||!te.current))){var a;(a=i.scrollIntoView)==null||a.call(i,{block:`nearest`,inline:`nearest`})}})});W(()=>{D.current.orientation=g},[D,g]),W(()=>{a&&(w&&T?(P.current=o==null?-1:o,N.current&&o!=null&&(ae.current=!0,F())):ne.current&&(P.current=-1,F()))},[a,w,T,o,F]),W(()=>{if(a){if(!w){ie.current=!1;return}if(T)if(r==null){if(ie.current=!1,I.current!=null)return;if(ne.current&&(P.current=-1,fe()),(!re.current||!ne.current)&&N.current&&(ee.current!=null||N.current===!0&&ee.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>de.request(e):queueMicrotask)(t),e+=1):(P.current=ee.current==null||Id(ee.current,g,u)||l?Ys(n):Xs(n),ee.current=null,F())};t()}}else Js(n.current,r)||(P.current=r,fe(),ae.current=!1)}},[a,w,T,r,I,l,n,g,u,F,fe,de]),W(()=>{var e,t;if(!a||T||!M||d||!ne.current)return;let n=M.nodesRef.current,r=(e=n.find(e=>e.id===j))==null||(e=e.context)==null?void 0:e.elements.floating,i=Xo(gs((t=E==null?r:E)==null?null:t)),o=n.some(e=>e.context&&Zo(e.context.elements.floating,i));r&&!o&&te.current&&r.focus({preventScroll:!0})},[a,T,E,M,j,d]),W(()=>{re.current=w,ne.current=!!T}),W(()=>{w||(ee.current=null,N.current=f)},[w,f]);let pe=r!=null,me=La(e=>{if(!ce.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(P.current!==t||r!==t)&&(P.current=t,F(e))}),L=La(()=>{var e;return _==null?M==null||(e=M.nodesRef.current.find(e=>e.id===j))==null||(e=e.context)==null||(e=e.dataRef)==null?void 0:e.current.orientation:_}),he=La(()=>Ys(n,se.current)),ge=La(e=>{if(te.current=!1,ie.current=!0,e.which===229||!ce.current&&e.currentTarget===A.current)return;if(l&&Rd(e.key,g,u,S)){Fd(e.key,L())||Ho(e),C.setOpen(!1,wo(aa,e.nativeEvent)),ha(E)&&(d?M==null||M.events.emit(`virtualfocus`,E):E.focus());return}let t=P.current,r=Ys(n,h),i=Xs(n,h);if(k||(e.key===`Home`&&(Ho(e),P.current=r,F(e)),e.key===`End`&&(Ho(e),P.current=i,F(e))),x!=null){let t=x(e,P.current,n,g,c,u,h,r,i);if(t!=null&&(P.current=t,F(e)),g===`both`)return}if(Fd(e.key,g)){if(Ho(e),w&&!d&&Xo(e.currentTarget.ownerDocument)===e.currentTarget){P.current=Id(e.key,g,u)?r:i,F(e);return}Id(e.key,g,u)?c?t>=i?s&&t!==n.current.length?P.current=-1:(ie.current=!1,P.current=r):P.current=Zs(n.current,{startingIndex:t,disabledIndices:h}):P.current=Math.min(i,Zs(n.current,{startingIndex:t,disabledIndices:h})):c?t<=r?s&&t!==-1?P.current=n.current.length:(ie.current=!1,P.current=i):P.current=Zs(n.current,{startingIndex:t,decrement:!0,disabledIndices:h}):P.current=Math.max(r,Zs(n.current,{startingIndex:t,decrement:!0,disabledIndices:h})),Js(n.current,P.current)&&(P.current=-1),F(e)}}),_e=z(()=>({onFocus(e){ie.current=!0,me(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){ie.current=!0,ae.current=!1,p&&me(e)},onPointerLeave(e){var t;if(!ce.current||!te.current||e.pointerType===`touch`)return;ie.current=!0;let r=e.relatedTarget;if(!(!p||n.current.includes(r))&&le.current&&((t=oe.current)==null||t.call(oe),oe.current=null,P.current=-1,F(e),!d)){let e=A.current,t=Xo(gs(e));e&&Zo(e,t)&&e.focus({preventScroll:!0})}}}),[me,ce,A,p,n,F,le,d]),ve=z(()=>d&&w&&pe&&{"aria-activedescendant":`${v}-${r}`},[d,w,pe,v,r]),ye=z(()=>U(U({"aria-orientation":g===`both`?void 0:g},k?{}:ve),{},{onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&w&&!d){let t=Qo(e.nativeEvent);if(t&&!Zo(A.current,t))return;Ho(e),C.setOpen(!1,wo(ia,e.nativeEvent)),ha(E)&&E.focus();return}ge(e)},onPointerMove(){te.current=!0}}),[ve,ge,A,g,k,C,w,d,E]),be=z(()=>{function e(e){C.setOpen(!0,wo(aa,e.nativeEvent,e.currentTarget))}function t(e){f===`auto`&&Wo(e.nativeEvent)&&(N.current=!d)}function n(e){N.current=f,f===`auto`&&Go(e.nativeEvent)&&(N.current=!0)}return{onKeyDown(t){let n=C.select(`open`);te.current=!1;let r=t.key.startsWith(`Arrow`),i=Ld(t.key,L(),u),a=Fd(t.key,g),o=(l?i:a)||t.key===`Enter`||t.key.trim()===``;if(d&&n)return ge(t);if(!(!n&&!m&&r)){if(o){let e=Fd(t.key,L());ee.current=l&&e?null:t.key}if(l){i&&(Ho(t),n?(P.current=he(),F(t)):e(t));return}a&&(I.current!=null&&(P.current=I.current),Ho(t),!n&&m?e(t):ge(t),n&&F(t))}},onFocus(e){C.select(`open`)&&!d&&(P.current=-1,F(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[ge,f,he,l,F,C,m,g,L,u,I,d]),xe=z(()=>U(U({},ve),be),[ve,be]);return z(()=>a?{reference:xe,floating:ye,item:_e,trigger:be}:{},[a,xe,ye,be,_e])}V();function Bd(e,t){var n;let{listRef:r,elementsRef:i,activeIndex:a,onMatch:o,disabledIndices:s,onTyping:c,enabled:l=!0,resetMs:u=750,selectedIndex:d=null}=t,f=`rootStore`in e?e.rootStore:e,p=f.useState(`open`),m=Vo(),h=R(``),g=R((n=d==null?a:d)==null?-1:n),_=R(null),v=La(e=>{var t;function n(e){let t=i==null?void 0:i.current[e];return!t||ec(t)}function l(e){return n(e)?s==null||!Qs(fi,e,s):!1}function f(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length,a=e[n];if(!(!(a!=null&&a.toLowerCase().startsWith(i))||!l(n)))return n}return-1}let v=r.current;if(h.current.length>0&&e.key===` `&&(Ho(e),c==null||c(!0)),h.current.length>0&&h.current[0]!==` `&&f(v,h.current)===-1&&e.key!==` `&&(c==null||c(!1)),v==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;p&&e.key!==` `&&(Ho(e),c==null||c(!0));let y=h.current===``;if(y){var b;g.current=(b=d==null?a:d)==null?-1:b}v.every((e,t)=>{var n,r;return e&&l(t)?((n=e[0])==null?void 0:n.toLowerCase())!==((r=e[1])==null?void 0:r.toLowerCase()):!0})&&h.current===e.key&&(h.current=``,g.current=_.current),h.current+=e.key,m.start(u,()=>{h.current=``,g.current=_.current,c==null||c(!1)});let x=y?(t=d==null?a:d)==null?-1:t:g.current,S=(x==null?0:x)+1,C=f(v,h.current,S);C===-1?e.key!==` `&&(h.current=``,c==null||c(!1)):(o==null||o(C),_.current=C)}),y=La(e=>{let t=e.relatedTarget,n=f.select(`domReferenceElement`),r=f.select(`floatingElement`);Zo(n,t)||Zo(r,t)||(m.clear(),h.current=``,g.current=_.current,c==null||c(!1))});W(()=>{!p&&d!==null||(m.clear(),_.current=null,h.current!==``&&(h.current=``))},[p,d,m]),W(()=>{if(p&&h.current===``){var e;g.current=(e=d==null?a:d)==null?-1:e}},[p,d,a]);let b=z(()=>({onKeyDown:v,onBlur:y}),[v,y]);return z(()=>l?{reference:b,floating:b}:{},[l,b])}let Vd=.5;function Hd(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Ud(e,t,n,r,i,a,o,s,c,l){let u=!1;return Hd(e,t,n,r,i,a)&&(u=!u),Hd(e,t,i,a,o,s)&&(u=!u),Hd(e,t,o,s,c,l)&&(u=!u),Hd(e,t,c,l,n,r)&&(u=!u),u}function Wd(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Gd(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Kd(e={}){let{blockPointerEvents:t=!1}=e,n=new Bo,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r==null?void 0:r.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*.010000000000000002;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=Qo(r),g=r.type===`mouseleave`,_=Zo(u,h),v=Zo(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&ma(r.relatedTarget)&&Zo(u,r.relatedTarget))return;function y(){return!!(s&&Tc(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=Gd(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Gd(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Gd(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Gd(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!Wd(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Vd/2:Vd*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Vd+1,o=C||T?S.bottom-Vd:S.top,s=C?T?S.bottom-Vd:S.top:S.bottom-Vd;M=Ud(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Vd/2:Vd*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Vd,o=C||T?S.top+Vd:S.bottom,s=C?T?S.top+Vd:S.bottom:S.top+Vd;M=Ud(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Vd/2:Vd*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Vd+1,o=w||E?S.right-Vd:S.left,s=w?E?S.right-Vd:S.left:S.right-Vd;M=Ud(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Vd/2:Vd*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Vd,o=w||E?S.left+Vd:S.right,s=w?E?S.left+Vd:S.right:S.left+Vd;M=Ud(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options=U(U({},e),{},{blockPointerEvents:t}),r}V();let qd=me(void 0);function Jd(e){let t=Re(qd);if(t===void 0&&!e)throw Error(Jr(69));return t}let Yd=new Set([`ArrowLeft`,`ArrowRight`]),Xd=new Set([`ArrowUp`,`ArrowDown`]),Zd=new Set([...Yd,...Xd]),Qd=new Set([...Zd,`Home`,`End`]);function $d(e){return e===`starting`?Hc:pi}V();let ef=[`render`,`className`,`style`,`finalFocus`],tf=U(U({},Zi),Vi),nf=yt(function(e,t){let{render:n,className:r,style:i,finalFocus:a}=e,o=vr(e,ef),{store:s}=Qr(),{side:c,align:l}=Xr(),u=Jd(!0)!=null,d=s.useState(`open`),f=s.useState(`transitionStatus`),p=s.useState(`popupProps`),m=s.useState(`mounted`),h=s.useState(`instantType`),g=s.useState(`activeTriggerElement`),_=s.useState(`parent`),v=s.useState(`lastOpenChangeReason`),y=s.useState(`rootId`),b=s.useState(`floatingRootContext`),x=s.useState(`floatingTreeRoot`),S=s.useState(`closeDelay`),C=s.useState(`activeTriggerElement`),w=s.useState(`hoverEnabled`),T=s.useState(`disabled`),E=s.useState(`openMethod`),D=_.type===`context-menu`;Fo({open:d,ref:s.context.popupRef,onComplete(){if(d){var e,t;(e=(t=s.context).onOpenChangeComplete)==null||e.call(t,!0)}}}),Pe(()=>{function e(e){s.setOpen(!1,wo(e.reason,e.domEvent))}return x.events.on(`close`,e),()=>{x.events.off(`close`,e)}},[x.events,s]),jd(b,{enabled:w&&!T&&!D&&_.type!==`menubar`,closeDelay:S});let O=Le(e=>{s.set(`popupElement`,e)},[s]),k=Mi(`div`,e,{state:{transitionStatus:f,side:c,align:l,open:d,nested:_.type===`menu`,instant:h},ref:[t,s.context.popupRef,O],stateAttributesMapping:tf,props:[p,{onKeyDown(e){u&&Qd.has(e.key)&&e.stopPropagation()}},$d(f),o,{"data-rootownerid":y}]}),A=_.type===void 0||D;return(g||_.type===`menubar`&&v!==`outside-press`)&&(A=!0),Eo(ml,{context:b,openInteractionType:E,modal:D,disabled:!m,returnFocus:a===void 0?A:a,initialFocus:_.type!==`menu`,restoreFocus:!0,externalTree:_.type===`menubar`?void 0:x,previousFocusableElement:C,nextFocusableElement:_.type===void 0?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:_.type===void 0?s.context.beforeContentFocusGuardRef:void 0,children:k})});V();let rf=me(void 0);function af(){let e=Re(rf);if(e===void 0)throw Error(Jr(32));return e}V();let of=[`keepMounted`],sf=yt(function(e,t){let{keepMounted:n=!1}=e,r=vr(e,of),{store:i}=Qr();return i.useState(`mounted`)||n?Eo(rf.Provider,{value:n,children:Eo(Zc,U({ref:t},r))}):null});function cf(e){return ci(19)?e:e?`true`:void 0}V();let lf=me(void 0);function uf(){var e;let t=Re(lf);return(e=t==null?void 0:t.direction)==null?`ltr`:e}let df=e=>({name:`arrow`,options:e,async fn(t){var n,r;let{x:i,y:a,placement:o,rects:s,platform:c,elements:l,middlewareData:u}=t,{element:d,padding:f=0,offsetParent:p=`real`}=Os(e,t)||{};if(d==null)return{};let m=Ks(f),h={x:i,y:a},g=Ps(o),_=Ms(g),v=await c.getDimensions(d),y=g===`y`,b=y?`top`:`left`,x=y?`bottom`:`right`,S=y?`clientHeight`:`clientWidth`,C=s.reference[_]+s.reference[g]-h[g]-s.floating[_],w=h[g]-s.reference[g],T=p===`real`?await((n=c.getOffsetParent)==null?void 0:n.call(c,d)):l.floating,E=l.floating[S]||s.floating[_];(!E||!await((r=c.isElement)==null?void 0:r.call(c,T)))&&(E=l.floating[S]||s.floating[_]);let D=C/2-w/2,O=E/2-v[_]/2-1,k=Math.min(m[b],O),A=Math.min(m[x],O),j=k,M=E-v[_]-A,N=E/2-v[_]/2+D,P=Ds(j,N,M),ee=!u.arrow&&As(o)!=null&&N!==P&&s.reference[_]/2-(N<j?k:A)-v[_]/2<0,te=ee?N<j?N-j:N-M:0;return{[g]:h[g]+te,data:U({[g]:P,centerOffset:N-P-te},ee&&{alignmentOffset:te}),reset:ee}}}),ff=(e,t)=>U(U({},df(e)),{},{options:[e,t]}),pf=Ou().fn,mf={name:`hide`,async fn(e){var t;let{width:n,height:r,x:i,y:a}=e.rects.reference,o=n===0&&r===0&&i===0&&a===0;return{data:{referenceHidden:((t=(await pf(e)).data)==null?void 0:t.referenceHidden)||o}}}},hf={sideX:`left`,sideY:`top`},gf={name:`adaptiveOrigin`,async fn(e){var t,n;let{x:r,y:i,rects:{floating:a},elements:{floating:o},platform:s,strategy:c,placement:l}=e,u=da(o),d=u.getComputedStyle(o);if(!(d.transitionDuration!==`0s`&&d.transitionDuration!==``))return{x:r,y:i,data:hf};let f=await((t=s.getOffsetParent)==null?void 0:t.call(s,o)),p={width:0,height:0};if(c===`fixed`&&u!=null&&u.visualViewport)p={width:u.visualViewport.width,height:u.visualViewport.height};else if(f===u){let e=gs(o);p={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await((n=s.isElement)==null?void 0:n.call(s,f))&&(p=await s.getDimensions(f));let m=ks(l),h=r,g=i;m===`left`&&(h=p.width-(r+a.width)),m===`top`&&(g=p.height-(i+a.height));let _=m===`left`?`right`:hf.sideX,v=m===`top`?`bottom`:hf.sideY;return{x:h,y:g,data:{sideX:_,sideY:v}}}};V();function _f(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function vf(e,t,n){let{rects:r,placement:i}=e;return{side:_f(t,ks(i),n),align:As(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function yf(e){var t,n;let{anchor:r,positionMethod:i=`absolute`,side:a=`bottom`,sideOffset:o=0,align:s=`center`,alignOffset:c=0,collisionBoundary:l,collisionPadding:u=5,sticky:d=!1,arrowPadding:f=5,disableAnchorTracking:p=!1,inline:m,keepMounted:h=!1,floatingRootContext:g,mounted:_,collisionAvoidance:v,shiftCrossAxis:y=!1,nodeId:b,adaptiveOrigin:x,lazyFlip:S=!1,externalTree:C}=e,[w,T]=Me(null);!_&&w!==null&&T(null);let E=v.side||`flip`,D=v.align||`flip`,O=v.fallbackAxisSide||`end`,k=typeof r==`function`?r:void 0,A=La(k),j=k?A:r,M=ms(r),N=ms(_),P=uf()===`rtl`,ee=w||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":P?`left`:`right`,"inline-start":P?`right`:`left`}[a],te=s===`center`?ee:`${ee}-${s}`,F=u,ne=+(a===`bottom`),re=+(a===`top`),ie=+(a===`right`),ae=+(a===`left`);typeof F==`number`?F={top:F+ne,right:F+ae,bottom:F+re,left:F+ie}:F&&(F={top:(F.top||0)+ne,right:(F.right||0)+ae,bottom:(F.bottom||0)+re,left:(F.left||0)+ie});let oe={boundary:l===`clipping-ancestors`?`clippingAncestors`:l,padding:F},se=R(null),ce=ms(o),I=ms(c),le=typeof o==`function`?0:o,ue=typeof c==`function`?0:c,de=[];m&&de.push(m),de.push(Cu(e=>{let t=vf(e,a,P),n=typeof ce.current==`function`?ce.current(t):ce.current,r=typeof I.current==`function`?I.current(t):I.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[le,ue,P,a]));let fe=D===`none`&&E!==`shift`,pe=!fe&&(d||y||E===`shift`),me=E===`none`?null:Eu(U(U({},oe),{},{padding:{top:F.top+1,right:F.right+1,bottom:F.bottom+1,left:F.left+1},mainAxis:!y&&E===`flip`,crossAxis:D===`flip`&&`alignment`,fallbackAxisSideDirection:O})),L=fe?null:wu(e=>{let t=gs(e.elements.floating).documentElement;return U(U({},oe),{},{rootBoundary:y?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:D!==`none`,crossAxis:pe,limiter:d||y?void 0:Tu(e=>{if(!se.current)return{};let{width:t,height:n}=se.current.getBoundingClientRect(),r=Ns(ks(e.placement)),i=r===`y`?t:n,a=r===`y`?F.left+F.right:F.top+F.bottom;return{offset:i/2+a/2}})})},[oe,d,y,F,D]);E===`shift`||D===`shift`||s===`center`?de.push(L,me):de.push(me,L),de.push(Du(U(U({},oe),{},{apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!N.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=da(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}})),ff(e=>({element:se.current||gs(e.elements.floating).createElement(`div`),padding:f,offsetParent:`floating`}),[f]),{name:`transformOrigin`,fn(e){var t,n,r;let{elements:i,middlewareData:s,placement:c,rects:l,y:u}=e,d=ks(c),f=Ns(d),p=se.current,m=((t=s.arrow)==null?void 0:t.x)||0,h=((n=s.arrow)==null?void 0:n.y)||0,g=(p==null?void 0:p.clientWidth)||0,_=(p==null?void 0:p.clientHeight)||0,v=m+g/2,y=h+_/2,b=Math.abs(((r=s.shift)==null?void 0:r.y)||0),x=l.reference.height/2,S=typeof o==`function`?o(vf(e,a,P)):o,C=b>S,w={top:`${v}px calc(100% + ${S}px)`,bottom:`${v}px ${-S}px`,left:`calc(100% + ${S}px) ${y}px`,right:`${-S}px ${y}px`}[d],T=`${v}px ${l.reference.y+x-u}px`;return i.floating.style.setProperty(`--transform-origin`,pe&&f===`y`&&C?T:w),{}}},mf,x),W(()=>{!_&&g&&g.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[_,g]);let he=z(()=>({elementResize:!p&&typeof ResizeObserver<`u`,layoutShift:!p&&typeof IntersectionObserver<`u`}),[p]),{refs:ge,elements:_e,x:ve,y:ye,middlewareData:be,update:xe,placement:Se,context:Ce,isPositioned:we,floatingStyles:Te}=Cd({rootContext:g,open:h?_:void 0,placement:te,middleware:de,strategy:i,whileElementsMounted:h?void 0:(...e)=>lu(...e,he),nodeId:b,externalTree:C}),{sideX:Ee,sideY:De}=be.adaptiveOrigin||hf,Oe=we?i:`fixed`,ke=z(()=>{let e=x?{position:Oe,[Ee]:ve,[De]:ye}:U({position:Oe},Te);return we||(e.opacity=0),e},[x,Oe,Ee,ve,De,ye,Te,we]),Ae=R(null);W(()=>{if(!_)return;let e=M.current,t=typeof e==`function`?e():e,n=(bf(t)?t.current:t)||null;n!==Ae.current&&(ge.setPositionReference(n),Ae.current=n)},[_,ge,j,M]),Pe(()=>{if(!_)return;let e=M.current;typeof e!=`function`&&bf(e)&&e.current!==Ae.current&&(ge.setPositionReference(e.current),Ae.current=e.current)},[_,ge,j,M]),Pe(()=>{if(h&&_&&_e.reference&&_e.floating)return lu(_e.reference,_e.floating,xe,he)},[h,_,_e,xe,he]);let je=ks(Se),Ne=_f(a,je,P),Fe=As(Se)||`center`,Ie=!!((t=be.hide)!=null&&t.referenceHidden);W(()=>{S&&_&&we&&T(je)},[S,_,we,je]);let Le=z(()=>{var e,t;return{position:`absolute`,top:(e=be.arrow)==null?void 0:e.y,left:(t=be.arrow)==null?void 0:t.x}},[be.arrow]),Re=((n=be.arrow)==null?void 0:n.centerOffset)!==0;return z(()=>({positionerStyles:ke,arrowStyles:Le,arrowRef:se,arrowUncentered:Re,side:Ne,align:Fe,physicalSide:je,anchorHidden:Ie,refs:ge,context:Ce,isPositioned:we,update:xe}),[ke,Le,se,Re,Ne,Fe,je,Ie,ge,Ce,we,xe])}function bf(e){return e!=null&&`current`in e}V();function xf(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=La(i),o=R(0),s=ei(Cf).current,c=ei(Sf).current,[l,u]=Me(0),d=R(l),f=La((e,t)=>{c.set(e,t==null?null:t),d.current+=1,u(d.current)}),p=La(e=>{c.delete(e),d.current+=1,u(d.current)}),m=z(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(wf).forEach((t,n)=>{var r;let i=(r=c.get(t))==null?{}:r;e.set(t,U(U({},i),{},{index:n}))}),e},[c,l]);W(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),W(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),W(()=>()=>{n.current=[]},[n]),W(()=>()=>{r&&(r.current=[])},[r]);let h=La(e=>(s.add(e),()=>{s.delete(e)}));W(()=>{s.forEach(e=>e(m))},[s,m]);let g=z(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return Eo(po.Provider,{value:g,children:t})}function Sf(){return new Map}function Cf(){return new Set}function wf(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}V();let Tf=[`cutout`],Ef=yt(function(e,t){let{cutout:n}=e,r=vr(e,Tf),i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return Eo(`div`,U(U({ref:t,role:`presentation`,"data-base-ui-inert":``},r),{},{style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}}))});function Df(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c=U({},n);return s&&(c.pointerEvents=`none`),Mi(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},$d(r),i],stateAttributesMapping:Zi})}let Of={},kf={},Af=``;function jf(e){if(typeof document>`u`)return!1;let t=gs(e);return da(t).innerWidth-t.documentElement.clientWidth>0}function Mf(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=gs(e),n=t.documentElement,r=t.body,i=_a(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Nf(e){let t=gs(e),n=t.documentElement,r=t.body,i=_a(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Pf(e){var t,n;let r=gs(e),i=r.documentElement,a=r.body,o=da(i),s=0,c=0,l=!1,u=Ao.create();if(oo&&((t=(n=o.visualViewport)==null?void 0:n.scale)==null?1:t)!==1)return()=>{};function d(){let t=o.getComputedStyle(i),n=o.getComputedStyle(a),r=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;s=i.scrollTop,c=i.scrollLeft,Of={scrollbarGutter:i.style.scrollbarGutter,overflowY:i.style.overflowY,overflowX:i.style.overflowX},Af=i.style.scrollBehavior,kf={position:a.style.position,height:a.style.height,width:a.style.width,boxSizing:a.style.boxSizing,overflowY:a.style.overflowY,overflowX:a.style.overflowX,scrollBehavior:a.style.scrollBehavior};let u=i.scrollHeight>i.clientHeight,d=i.scrollWidth>i.clientWidth,f=t.overflowY===`scroll`||n.overflowY===`scroll`,p=t.overflowX===`scroll`||n.overflowX===`scroll`,m=Math.max(0,o.innerWidth-a.clientWidth),h=Math.max(0,o.innerHeight-a.clientHeight),g=parseFloat(n.marginTop)+parseFloat(n.marginBottom),_=parseFloat(n.marginLeft)+parseFloat(n.marginRight),v=_a(i)?i:a;if(l=Mf(e),l){i.style.scrollbarGutter=r,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(i.style,{scrollbarGutter:r,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(i.style.overflowY=`scroll`),(d||p)&&(i.style.overflowX=`scroll`),Object.assign(a.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),a.scrollTop=s,a.scrollLeft=c,i.setAttribute(`data-base-ui-scroll-locked`,``),i.style.scrollBehavior=`unset`}function f(){Object.assign(i.style,Of),Object.assign(a.style,kf),l||(i.scrollTop=s,i.scrollLeft=c,i.removeAttribute(`data-base-ui-scroll-locked`),i.style.scrollBehavior=Af)}function p(){f(),u.request(d)}d();let m=fs(o,`resize`,p);return()=>{u.cancel(),f(),typeof o.removeEventListener==`function`&&m()}}let Ff=new class{constructor(){H(this,`lockCount`,0),H(this,`restore`,null),H(this,`timeoutLock`,Bo.create()),H(this,`timeoutUnlock`,Bo.create()),H(this,`release`,()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)}),H(this,`unlock`,()=>{if(this.lockCount===0&&this.restore){var e;(e=this.restore)==null||e.call(this),this.restore=null}})}acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}lock(e){if(this.lockCount===0||this.restore!==null)return;let t=gs(e).documentElement,n=da(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=di;return}let r=$a||!jf(e);this.restore=r?Nf(e):Pf(e)}};function If(e=!0,t=null){W(()=>{if(e)return Ff.acquire(t)},[e,t])}V();function Lf(e,t,n,r){let[i,a]=Me(!1);W(()=>{if(!e||!t||n==null){a(!1);return}let r=gs(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-20)},[e,t,n]),If(e&&(!t||i),r)}V();let Rf=[`anchor`,`positionMethod`,`className`,`render`,`side`,`align`,`sideOffset`,`alignOffset`,`collisionBoundary`,`collisionPadding`,`arrowPadding`,`sticky`,`disableAnchorTracking`,`collisionAvoidance`,`style`],zf=yt(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Uc,style:g}=e,_=vr(e,Rf),{store:v}=Qr(),y=af(),b=$i(!0),x=v.useState(`parent`),S=v.useState(`floatingRootContext`),C=v.useState(`floatingTreeRoot`),w=v.useState(`mounted`),T=v.useState(`open`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`activeTriggerElement`),k=v.useState(`transitionStatus`),A=v.useState(`positionerElement`),j=v.useState(`instantType`),M=v.useState(`hasViewport`),N=v.useState(`lastOpenChangeReason`),P=v.useState(`floatingNodeId`),ee=v.useState(`floatingParentNodeId`),te=S.useState(`domReferenceElement`),F=R(null),ne=Po(A,!1,!1),re=n,ie=c,ae=l,oe=s,se=h;if(x.type===`context-menu`){var ce,I;if(re=n==null?(ce=x.context)==null?void 0:ce.anchor:n,oe=(I=oe)==null?`start`:I,!o&&oe!==`center`){var le,ue;ae=(le=e.alignOffset)==null?2:le,ie=(ue=e.sideOffset)==null?-5:ue}}let de=o,fe=oe;if(x.type===`menu`){var pe,me,L;de=(pe=de)==null?`inline-end`:pe,fe=(me=fe)==null?`start`:me,se=(L=e.collisionAvoidance)==null?Wc:L}else if(x.type===`menubar`){var he,ge;de=(he=de)==null?x.context.orientation===`vertical`?`inline-end`:`bottom`:he,fe=(ge=fe)==null?`start`:ge}let _e=x.type===`context-menu`,ve=yf({anchor:re,floatingRootContext:S,positionMethod:b?`fixed`:r,mounted:w,side:de,sideOffset:ie,align:fe,alignOffset:ae,arrowPadding:_e?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:P,keepMounted:y,disableAnchorTracking:m,collisionAvoidance:se,shiftCrossAxis:_e&&!(`side`in se&&se.side===`flip`),externalTree:C,adaptiveOrigin:M?gf:void 0});Pe(()=>{function e(e){e.open&&(e.parentNodeId===P&&v.set(`hoverEnabled`,!1),e.nodeId!==P&&e.parentNodeId===v.select(`floatingParentNodeId`)&&v.setOpen(!1,wo(oa)))}return C.events.on(`menuopenchange`,e),()=>{C.events.off(`menuopenchange`,e)}},[v,C.events,P]),Pe(()=>{if(v.select(`floatingParentNodeId`)==null)return;function e(e){var t;if(e.open||e.nodeId!==v.select(`floatingParentNodeId`))return;let n=(t=e.reason)==null?oa:t;v.setOpen(!1,wo(n))}return C.events.on(`menuopenchange`,e),()=>{C.events.off(`menuopenchange`,e)}},[C.events,v]);let ye=Vo();Pe(()=>{T||ye.clear()},[T,ye]),Pe(()=>{function e(e){if(!(!T||e.nodeId!==v.select(`floatingParentNodeId`)))if(e.target&&O&&O!==e.target){let e=v.select(`closeDelay`);e>0?ye.isStarted()||ye.start(e,()=>{v.setOpen(!1,wo(oa))}):v.setOpen(!1,wo(oa))}else ye.clear()}return C.events.on(`itemhover`,e),()=>{C.events.off(`itemhover`,e)}},[C.events,T,O,v,ye]),Pe(()=>{let e={open:T,nodeId:P,parentNodeId:ee,reason:v.select(`lastOpenChangeReason`)};C.events.emit(`menuopenchange`,e)},[C.events,T,v,P,ee]),W(()=>{let e=te,t=F.current;if(e&&(F.current=e),t&&e&&e!==t){v.set(`instantType`,void 0);let e=new AbortController;return ne(()=>{v.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[te,ne,v]);let be={open:T,side:ve.side,align:ve.align,anchorHidden:ve.anchorHidden,nested:x.type===`menu`,instant:j},xe=x.type===`menubar`&&x.context.modal;Lf(T&&(xe||E&&N!==`trigger-hover`),D===`touch`,A,O);let Se=Df(e,be,{styles:ve.positionerStyles,transitionStatus:k,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!w,inert:!T}),Ce=w&&x.type!==`menu`&&(x.type!==`menubar`&&E&&N!==`trigger-hover`||x.type===`menubar`&&x.context.modal),we=null;return x.type===`menubar`?we=x.context.contentElement:x.type===void 0&&(we=O),Eo(Yr.Provider,{value:ve,children:[Ce&&Eo(Ef,{ref:x.type===`context-menu`||x.type===`nested-context-menu`?x.context.internalBackdropRef:null,inert:cf(!T),cutout:we}),Eo(al,{id:P,children:Eo(xf,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,children:Se})})]})});V();let Bf=me(void 0);function Vf(){let e=Re(Bf);if(e===void 0)throw Error(Jr(34));return e}V();let Hf=[`render`,`className`,`value`,`defaultValue`,`onValueChange`,`disabled`,`style`,`aria-labelledby`],Uf=vt(yt(function(e,t){let{render:n,className:r,value:i,defaultValue:a,onValueChange:o,disabled:s=!1,style:c,"aria-labelledby":l}=e,u=vr(e,Hf),[d,f]=Me(void 0),[p,m]=ca({controlled:i,default:a,name:`MenuRadioGroup`}),h=La((e,t)=>{o==null||o(e,t),!t.isCanceled&&m(e)}),g=Mi(`div`,e,{state:{disabled:s},ref:t,props:U({role:`group`,"aria-labelledby":l==null?d:l,"aria-disabled":s||void 0},u)}),_=z(()=>({value:p,setValue:h,disabled:s}),[p,h,s]);return Eo(Io.Provider,{value:f,children:Eo(Bf.Provider,{value:_,children:g})})}));V();let Wf=me(void 0);function Gf(){let e=Re(Wf);if(e===void 0)throw Error(Jr(35));return e}V();let Kf=[`render`,`className`,`id`,`label`,`nativeButton`,`disabled`,`closeOnClick`,`value`,`style`],qf=yt(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,value:l,style:u}=e,d=vr(e,Kf),f=go({label:a}),p=Xr(!0),m=xo(i),{store:h}=Qr(),g=h.useState(`isActive`,f.index),_=h.useState(`itemProps`),{value:v,setValue:y,disabled:b}=Vf(),x=b||s,S=v===l,{getItemProps:C,itemRef:w}=fo({closeOnClick:c,disabled:x,highlighted:g,id:m,store:h,nativeButton:o,nodeId:p==null?void 0:p.context.nodeId,itemMetadata:uo}),T=z(()=>({disabled:x,highlighted:g,checked:S}),[x,g,S]);function E(e){let t=wo(ra,e.nativeEvent,void 0,{preventUnmountOnClose(){}});y(l,t)}let D=Mi(`div`,e,{state:T,stateAttributesMapping:Co,props:[_,{role:`menuitemradio`,"aria-checked":S,onClick:E},d,C],ref:[w,t,f.ref]});return Eo(Wf.Provider,{value:T,children:D})});V();let Jf=[`render`,`className`,`style`,`keepMounted`],Yf=yt(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1}=e,o=vr(e,Jf),s=Gf(),c=R(null),{transitionStatus:l,setMounted:u}=Mo(s.checked);return Fo({open:s.checked,ref:c,onComplete(){s.checked||u(!1)}}),Mi(`span`,e,{state:{checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l},stateAttributesMapping:Co,ref:[t,c],props:U({"aria-hidden":!0},o),enabled:a||s.checked})});V();let Xf=me(null);function Zf(e){let t=Re(Xf);if(t===null&&!e)throw Error(Jr(5));return t}V();function Qf(e){let t=R(``),n=Le(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:Le(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}V();function $f(e,t){let n=R(e),r=La(t);W(()=>{n.current!==e&&r(n.current)},[e,r]),W(()=>{n.current=e},[e])}V();function ep(e,t){let{onClick:n,onPointerDown:r}=Qf(La((n,r)=>{(typeof e==`function`?e():e)||t(r||($a?`touch`:``))}));return z(()=>({onClick:n,onPointerDown:r}),[n,r])}function tp(e){let[t,n]=Me(null),r=ep(e,n);return $f(e,t=>{t&&!e&&n(null)}),z(()=>({openMethod:t,triggerProps:r}),[t,r])}V();let np=U(U({},xd),{},{disabled:G(e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled),modal:G(e=>{var t;return(e.parent.type===void 0||e.parent.type===`context-menu`)&&((t=e.modal)==null||t)}),openMethod:G(e=>e.openMethod),allowMouseEnter:G(e=>e.allowMouseEnter),highlightItemOnHover:G(e=>e.highlightItemOnHover),stickIfOpen:G(e=>e.stickIfOpen),parent:G(e=>e.parent),rootId:G(e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId),activeIndex:G(e=>e.activeIndex),isActive:G((e,t)=>e.activeIndex===t),hoverEnabled:G(e=>e.hoverEnabled),instantType:G(e=>e.instantType),lastOpenChangeReason:G(e=>e.openChangeReason),floatingTreeRoot:G(e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot),floatingNodeId:G(e=>e.floatingNodeId),floatingParentNodeId:G(e=>e.floatingParentNodeId),itemProps:G(e=>e.itemProps),closeDelay:G(e=>e.closeDelay),hasViewport:G(e=>e.hasViewport),keyboardEventRelay:G(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)})});var rp=class e extends Yu{constructor(e){super(U(U({},ip()),e),{positionerRef:T(),popupRef:T(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:T(),beforeContentFocusGuardRef:T(),onOpenChangeComplete:void 0,triggerElements:new fd},np),H(this,`unsubscribeParentListener`,null),this.unsubscribeParentListener=this.observe(`parent`,e=>{var t;if((t=this.unsubscribeParentListener)==null||t.call(this),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);t===i&&n===a&&r===o||(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}static useStore(t,n){let r=ei(()=>new e(n)).current;return t==null?r:t}};function ip(){return U(U({},md()),{},{disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new $c,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:pi,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1})}V();let ap=me(void 0);function op(){return Re(ap)}V();let sp=Ru(function(e){var t;let{children:n,open:r,onOpenChange:i,onOpenChangeComplete:a,defaultOpen:o=!1,disabled:s=!1,modal:c,loopFocus:l=!0,orientation:u=`vertical`,actionsRef:d,closeParentOnEsc:f=!1,handle:p,triggerId:m,defaultTriggerId:h=null,highlightItemOnHover:g=!0}=e,_=$i(!0),v=Qr(!0),y=Zf(!0),b=op(),x=z(()=>b&&v?{type:`menu`,store:v.store}:y?{type:`menubar`,context:y}:_&&!v?{type:`context-menu`,context:_}:{type:void 0},[_,v,y,b]),S=rp.useStore(p==null?void 0:p.store,{open:o,openProp:r,activeTriggerId:h,triggerIdProp:m,parent:x});od(S,r,o,h),S.useControlledProp(`openProp`,r),S.useControlledProp(`triggerIdProp`,m),S.useContextCallback(`onOpenChangeComplete`,a);let C=bo(),w=bo(),T=S.useState(`floatingTreeRoot`),E=il(T),D=nl(),O=S.useState(`open`),k=S.useState(`activeTriggerElement`),A=S.useState(`positionerElement`),j=S.useState(`hoverEnabled`),M=S.useState(`disabled`),N=S.useState(`lastOpenChangeReason`),P=S.useState(`parent`),ee=S.useState(`activeIndex`),te=S.useState(`payload`),F=S.useState(`floatingParentNodeId`),ne=R(null),re=R(P.type!==`context-menu`),ie=Vo(),ae=R(!0),oe=Vo(),se=F!=null,{openMethod:ce,triggerProps:I}=tp(O);S.useSyncedValues({disabled:s,highlightItemOnHover:g,modal:P.type===void 0?c:void 0,openMethod:ce,rootId:C}),cd(S);let{forceUnmount:le}=ld(O,S,()=>{S.update({allowMouseEnter:!1,stickIfOpen:!0})});W(()=>{_&&!v?S.update({parent:{type:`context-menu`,context:_},floatingNodeId:E,floatingParentNodeId:D}):v&&S.update({floatingNodeId:E,floatingParentNodeId:D})},[_,v,E,D,S]),Pe(()=>{if(O||(ne.current=null),P.type===`context-menu`){if(!O){ie.clear(),re.current=!1;return}ie.start(500,()=>{re.current=!0})}},[ie,O,P.type]),W(()=>{!O&&!j&&S.set(`hoverEnabled`,!0)},[O,j,S]);let ue=La((e,t)=>{var n;let r=t.reason;if(O===e&&t.trigger===k&&N===r)return;let a=ad(t);if(!e&&t.trigger==null&&(t.trigger=k==null?void 0:k),i==null||i(e,t),t.isCanceled)return;S.state.floatingRootContext.dispatchOpenChange(e,t);let o=t.event;if(e===!1&&(o==null?void 0:o.type)===`click`&&o.pointerType===`touch`&&!ae.current)return;e&&r===`trigger-focus`?(ae.current=!1,oe.start(300,()=>{ae.current=!0})):(ae.current=!0,oe.clear());let s=(r===`trigger-press`||r===`item-press`)&&o.detail===0&&(o==null?void 0:o.isTrusted),c=!e&&(r===`escape-key`||r==null),l={open:e,openChangeReason:r};ne.current=(n=t.event)==null?null:n,id(l,e,t.trigger,a()),S.update(l),P.type===`menubar`&&(r===`trigger-focus`||r===`focus-out`||r===`trigger-hover`||r===`list-navigation`||r===`sibling-open`)?S.set(`instantType`,`group`):s||c?S.set(`instantType`,s?`click`:`dismiss`):S.set(`instantType`,void 0)}),de=$u({popupStore:S,floatingId:w,nested:D!=null,onOpenChange:ue}),fe=de.context.events;Pe(()=>{let e=({open:e,eventDetails:t})=>ue(e,t);return fe.on(`setOpen`,e),()=>{fe==null||fe.off(`setOpen`,e)}},[fe,ue]);let pe=Le(()=>{S.setOpen(!1,wo(sa))},[S]);Ie(d,()=>({unmount:le,close:pe}),[le,pe]);let me;P.type===`context-menu`&&(me=P.context),Ie(me==null?void 0:me.positionerRef,()=>A,[A]),Ie(me==null?void 0:me.actionsRef,()=>({setOpen:ue}),[ue]);let L=vl(de,{enabled:!M,bubbles:{escapeKey:f&&P.type===`menu`},outsidePress(){var e;return P.type!==`context-menu`||((e=ne.current)==null?void 0:e.type)===`contextmenu`||re.current},externalTree:se?T:void 0}),he=uf(),ge=Le(e=>{S.select(`activeIndex`)!==e&&S.set(`activeIndex`,e)},[S]),_e=zd(de,{enabled:!M,listRef:S.context.itemDomElements,activeIndex:ee,nested:P.type!==void 0,loopFocus:l,orientation:u,parentOrientation:P.type===`menubar`?P.context.orientation:void 0,rtl:he===`rtl`,disabledIndices:fi,onNavigate:ge,openOnArrowKeyDown:P.type!==`context-menu`,externalTree:se?T:void 0,focusItemOnHover:g}),ve=Le(e=>{S.context.typingRef.current=e},[S]),ye=Bd(de,{enabled:!M,listRef:S.context.itemLabels,elementsRef:S.context.itemDomElements,activeIndex:ee,resetMs:500,onMatch:e=>{O&&e!==ee&&S.set(`activeIndex`,e)},onTyping:ve});ud(S,{floatingRootContext:de,activeTriggerProps:z(()=>{let e=vi(ye.reference,_e.reference,L.reference,{onMouseMove(){S.set(`allowMouseEnter`,!0)}},I);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=O,e},[S,ye.reference,_e.reference,L.reference,I,O]),inactiveTriggerProps:z(()=>{let e=vi(_e.trigger,L.trigger,I);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[_e.trigger,L.trigger,I]),popupProps:z(()=>vi(ed,{id:w,role:`menu`,"aria-labelledby":k==null?void 0:k.id,onMouseMove(){S.set(`allowMouseEnter`,!0),P.type===`menu`&&S.set(`hoverEnabled`,!1)},onClick(){S.select(`hoverEnabled`)&&S.set(`hoverEnabled`,!1)},onKeyDown(e){let t=S.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},ye.floating,_e.floating,L.floating),[k,w,P.type,S,ye.floating,_e.floating,L.floating]),itemProps:(t=_e.item)==null?pi:t});let be=z(()=>({store:S,parent:x}),[S,x]),xe=Eo(Zr.Provider,{value:be,children:typeof n==`function`?n({payload:te}):n});return P.type===void 0||P.type===`context-menu`?Eo(ol,{externalTree:T,children:xe}):xe});function cp(e){let t=e.getBoundingClientRect(),n=da(e);if(co)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(!(r.content!==`none`||i.content!==`none`))return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}V();function lp(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Va(),{ref:i,index:a}=go(e),o=n===a,s=R(null),c=ti(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}let up=[`render`,`className`,`style`,`state`,`props`,`refs`,`metadata`,`stateAttributesMapping`,`tag`];function dp(e){let{render:t,className:n,style:r,state:i=pi,props:a=fi,refs:o=fi,metadata:s,stateAttributesMapping:c,tag:l=`div`}=e,u=vr(e,up),{compositeProps:d,compositeRef:f}=lp({metadata:s});return Mi(l,e,{state:i,ref:[...o,f],props:[d,...a,u],stateAttributesMapping:c})}function fp(e){if(ha(e)&&e.hasAttribute(`data-rootownerid`)){var t;return(t=e.getAttribute(`data-rootownerid`))==null?void 0:t}if(!Da(e))return fp(Aa(e))}V();function pp(e,t){let n=R(null);function r(t){cn(()=>{e.setOpen(!1,wo(ia,t.nativeEvent,t.currentTarget))});let r=xc(n.current);r==null||r.focus()}function i(n){let r=e.select(`positionerElement`);if(r&&Sc(n,r)){var i;(i=e.context.beforeContentFocusGuardRef.current)==null||i.focus()}else{cn(()=>{e.setOpen(!1,wo(ia,n.nativeEvent,n.currentTarget))});let i=bc(e.context.triggerFocusTargetRef.current||t.current);for(;i!==null&&Zo(r,i);){let e=i;if(i=_c(i),i===e)break}i==null||i.focus()}}return{preFocusGuardRef:n,handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}V();function mp(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=R(!1);return z(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,gs(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:pi,[t,n,r])}V();let hp=[`render`,`className`,`style`,`disabled`,`nativeButton`,`id`,`openOnHover`,`delay`,`closeDelay`,`handle`,`payload`],gp=zu(function(e,t){var n;let{render:r,className:i,style:a,disabled:o=!1,nativeButton:s=!0,id:c,openOnHover:l,delay:u=100,closeDelay:d=0,handle:f,payload:p}=e,m=vr(e,hp),h=Qr(!0),g=(n=f==null?void 0:f.store)==null?h==null?void 0:h.store:n;if(!g)throw Error(Jr(85));let _=xo(c),v=g.useState(`isTriggerActive`,_),y=g.useState(`floatingRootContext`),b=g.useState(`isOpenedByTrigger`,_),x=g.useState(`triggerPopupId`,_),S=R(null),C=vp(),w=Va(!0),T=rl(),D=z(()=>T==null?new $c:T,[T]),{registerTrigger:O,isMountedByThisTrigger:k}=sd(_,S,g,{payload:p,closeDelay:d,parent:C,floatingTreeRoot:D,floatingNodeId:il(D),floatingParentNodeId:nl(),keyboardEventRelay:w==null?void 0:w.relayKeyboardEvent}),A=C.type===`menubar`,j=g.useState(`disabled`),M=o||j||A&&C.context.disabled,{getButtonProps:N,buttonRef:P}=Wa({disabled:M,native:s});Pe(()=>{!b&&C.type===void 0&&(g.context.allowMouseUpTriggerRef.current=!1)},[g,b,C.type]);let ee=R(null),te=Vo(),F=La(e=>{if(!ee.current)return;te.clear(),g.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if(Zo(ee.current,t)||Zo(g.select(`positionerElement`),t)||t===ee.current||t!=null&&fp(t)===g.select(`rootId`))return;let n=cp(ee.current);e.clientX>=n.left-2&&e.clientX<=n.right+2&&e.clientY>=n.top-2&&e.clientY<=n.bottom+2||D.events.emit(`close`,{domEvent:e,reason:`cancel-open`})});Pe(()=>{b&&g.select(`lastOpenChangeReason`)===`trigger-hover`&&gs(ee.current).addEventListener(`mouseup`,F,{once:!0})},[b,F,g]);let ne=A&&C.context.hasSubmenuOpen,re=Nd(y,{enabled:(l==null?ne:l)&&!M&&C.type!==`context-menu`&&(!A||ne&&!k),handleClose:Kd({blockPointerEvents:!A}),mouseOnly:!0,move:!1,restMs:C.type===void 0?u:void 0,delay:{close:d},triggerElementRef:S,externalTree:D,isActiveTrigger:v,isClosing:()=>g.select(`transitionStatus`)===`ending`}),ie=_p(b,g.select(`lastOpenChangeReason`)),ae=hl(y,{enabled:!M&&C.type!==`context-menu`,event:b&&A?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:C.type===void 0&&ie}),oe=Td(y,{enabled:!M&&ne}),se=mp({open:b,enabled:A,mouseDownAction:`open`}),ce=z(()=>vi(oe.reference,ae.reference),[oe.reference,ae.reference]),I=g.useState(`triggerProps`,k),{preFocusGuardRef:le,handlePreFocusGuardFocus:ue,handleFocusTargetFocus:de}=pp(g,S),fe={disabled:M,open:b},pe=[ee,t,P,O,S],me=[ce,re==null?pi:re,I,{"aria-haspopup":`menu`,"aria-controls":x,id:_,onMouseDown:e=>{g.select(`open`)||(te.start(200,()=>{g.context.allowMouseUpTriggerRef.current=!0}),gs(e.currentTarget).addEventListener(`mouseup`,F,{once:!0}))}},A?{role:`menuitem`}:{},se,m,N],L=Mi(`button`,e,{enabled:!A,stateAttributesMapping:Xi,state:fe,ref:pe,props:me});return A?Eo(dp,{tag:`button`,render:r,className:i,style:a,state:fe,refs:pe,props:me,stateAttributesMapping:Xi}):b?Eo(E,{children:[Eo(ys,{ref:le,onFocus:ue},`${_}-pre-focus-guard`),Eo(E,{children:L},_),Eo(ys,{ref:g.context.triggerFocusTargetRef,onFocus:de},`${_}-post-focus-guard`)]}):Eo(E,{children:L},_)});function _p(e,t){let n=Vo(),[r,i]=Me(!1);return W(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function vp(){let e=$i(!0),t=Qr(!0),n=Zf(!0);return z(()=>n?{type:`menubar`,context:n}:e&&!t?{type:`context-menu`,context:e}:{type:void 0},[e,t,n])}V();function yp(e){return`${e.charAt(0).toLocaleUpperCase()}${e.substring(1)}`}let bp={askAI:`askAI`,favoriteSearches:`favoriteSearches`,recentConversations:`recentConversations`,recentSearches:`recentSearches`};function xp(e,t){return e.collections.find(e=>(e==null?void 0:e.source.sourceId)===t)}function Sp(e){return e.replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/&/g,`&`)}let Cp=[`lvl0`,`lvl1`,`lvl2`,`lvl3`,`lvl4`,`lvl5`,`lvl6`];function wp(e){let t=e.type===`content`||e.type===`askAI`?Cp.length:Cp.indexOf(e.type);return Cp.slice(0,t).map(t=>e.hierarchy[t]?Sp(e.hierarchy[t]):null).filter(Boolean).join(` > `)}let Tp=new Map;function Ep(e){let t=Tp.get(e);if(t)return t;let n=e.replace(/\[(\w+)\]/g,`.$1`).replace(/^\/./,``).split(`.`);return Tp.set(e,n),n}function Dp(e,t){return Ep(t).reduce((e,t)=>{if(e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,t))return e[t]},e)}function Op(e,t,n){return e.reduce((e,r)=>{let i=t(r);return e.hasOwnProperty(i)||(e[i]=[]),e[i].length<(n||5)&&e[i].push(r),e},{})}function kp(e){return e}function Ap(e){return e.button===1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function jp(e){return!e||e.trim().length===0}function Mp(...e){}let Np=/(<mark>|<\/mark>)/g,Pp=RegExp(Np.source);function Fp(e){var t,n;let r=e;if(!r.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;let i=r.__docsearch_parent?(t=r.__docsearch_parent)==null||(t=t._highlightResult)==null||(t=t.hierarchy)==null?void 0:t.lvl0:(n=e._highlightResult)==null||(n=n.hierarchy)==null?void 0:n.lvl0;return i?i.value&&Pp.test(i.value)?i.value.replace(Np,``):i.value:e.hierarchy.lvl0}function Ip(e){typeof e.scrollTo==`function`?e.scrollTo({top:0,behavior:`smooth`}):e.scrollTop=0}function Lp(){return B.createElement(`svg`,{className:`DocSearch-Hit-Select-Icon`,width:`20`,height:`20`,viewBox:`0 0 20 20`},B.createElement(`g`,{stroke:`currentColor`,fill:`none`,fillRule:`evenodd`,strokeLinecap:`round`,strokeLinejoin:`round`},B.createElement(`path`,{d:`M18 3v4c0 2-2 4-4 4H2`}),B.createElement(`path`,{d:`M8 17l-6-6 6-6`})))}function Rp(){return B.createElement(`svg`,{width:`40`,height:`40`,viewBox:`0 0 20 20`,fill:`none`,fillRule:`evenodd`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`},B.createElement(`path`,{d:`M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0`}))}function zp(){return B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`64`,height:`64`,viewBox:`0 0 24 24`,fill:`none`,stroke:`#5a5e9a`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},B.createElement(`path`,{d:`m13.5 8.5-5 5`}),B.createElement(`path`,{d:`m8.5 8.5 5 5`}),B.createElement(`circle`,{cx:`11`,cy:`11`,r:`8`}),B.createElement(`path`,{d:`m21 21-4.3-4.3`}))}function Bp(){return B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},B.createElement(`path`,{d:`M12 17v5`}),B.createElement(`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`}))}function Vp(){return B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},B.createElement(`polyline`,{points:`6 9 12 15 18 9`}))}function Hp(){return B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},B.createElement(`polyline`,{points:`20 6 9 17 4 12`}))}function Up(e=[]){let t=new Map;for(let n of e){let e=n.key.trim().toLowerCase();if(!(e.length===0||t.has(e))){if(t.size>=5)break;t.set(e,n)}}return Array.from(t.values())}function Wp(e){return e.label?e.label:e.key.replace(/[._-]+/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}function Gp(e){let t={};for(let r of e){var n;let e=(n=r.searchParameters)==null?void 0:n.facetFilters;for(let n of Array.isArray(e)?e:[e]){if(typeof n!=`string`)continue;let e=n.indexOf(`:`);if(e<=0)continue;let r=n.slice(0,e),i=n.slice(e+1);r&&i&&(t[r]=i)}}return t}let Kp=[`className`,`type`];function qp({children:e}){return B.createElement(`div`,{className:`DocSearch-Chip`},e)}function Jp(e){let{className:t,type:n=`button`}=e,r=pn(e,Kp),i=`DocSearch-Chip-Dismiss${t?` ${t}`:``}`;return B.createElement(`button`,_({type:n,className:i,tabIndex:0},r),B.createElement(jr,{"aria-hidden":`true`}))}qp.Dismiss=Jp;let Yp=[`className`],Xp=[`align`,`alignOffset`,`side`,`sideOffset`,`collisionBoundary`,`container`],Zp=[`className`,`children`],Qp=[`className`];function $p(e){let t=Ar({},(kr(e),e));return B.createElement(sp,t)}$p.Trigger=B.forwardRef((e,t)=>{let{className:n}=e,r=pn(e,Yp),i=`DocSearch-Menu-Trigger${n?` ${n}`:``}`;return B.createElement(gp,_({className:i,ref:t},r))});function em(e){let{align:t=`start`,alignOffset:n=0,side:r=`bottom`,sideOffset:i=4,collisionBoundary:a=`clipping-ancestors`,container:o}=e,s=pn(e,Xp);return B.createElement(sf,{container:o},B.createElement(zf,{className:`DocSearch-Menu-Positioner`,align:t,alignOffset:n,side:r,sideOffset:i,collisionBoundary:a},B.createElement(nf,_({className:`DocSearch-Menu-Popup`},s))))}$p.Popup=em;function tm(e){let t=Ar({},(kr(e),e));return B.createElement(Uf,t)}$p.RadioGroup=tm;function nm(e){let{className:t,children:n}=e,r=pn(e,Zp),i=`DocSearch-Menu-Item DocSearch-Menu-RadioItem${t?` ${t}`:``}`;return B.createElement(qf,_({className:i,closeOnClick:!0},r),B.createElement(`span`,{className:`DocSearch-Menu-RadioItem-Indicator`},B.createElement(Yf,null,B.createElement(Hp,null))),n)}$p.RadioItem=nm;function rm(e){let{className:t}=e,n=pn(e,Qp),r=`DocSearch-Menu-GroupLabel${t?` ${t}`:``}`;return B.createElement(zo,_({className:r},n))}$p.GroupLabel=rm;let im=B.memo(function({facet:e,selectedValue:t,defaultValueLabel:n,onSelectionChange:r,registerTrigger:i,menuTriggerSelectedAriaLabel:a}){let o=Wp(e),s=B.useCallback(t=>{r(e.key,t)},[e.key,r]),c=B.useCallback(t=>{i(e.key,t)},[e.key,i]);return B.createElement($p,null,B.createElement($p.Trigger,{ref:c,"data-has-selection":!!t,"aria-label":t?`${o}, ${t} ${a}`:o},B.createElement(`span`,null,yp(o)),B.createElement(Vp,null)),B.createElement($p.Popup,null,B.createElement($p.RadioGroup,{value:t,onValueChange:s},B.createElement($p.RadioItem,{value:``,label:`${n} ${o}`},n),e.values.map(e=>B.createElement($p.RadioItem,{key:e,value:e,label:e},yp(e))))))}),am=B.memo(function({facetKey:e,facetLabel:t,value:n,dismissAriaLabel:r,onDismiss:i}){let a=B.useCallback(t=>{i(e,t)},[e,i]);return B.createElement(qp,null,yp(n),B.createElement(qp.Dismiss,{"aria-label":`${r} ${yp(n)} (${t})`,onClick:a}))}),om=B.memo(function({facets:e,selections:t,onSelectionChange:n,clearSelections:r,translations:i={}}){let{defaultValueLabel:a=`All`,facetMenuTriggerAriaLabel:o=`selected`,clearAllLabel:s=`Clear all`,facetsAriaLabel:c=`Search filters`,selectedFacetsAriaLabel:l=`Selected search filters`,clearFacetAriaLabel:u=`Clear filter:`}=i,d=B.useMemo(()=>new Set(e.map(e=>e.key)),[e]),f=B.useMemo(()=>Object.entries(t).filter(([e,t])=>!!t&&d.has(e)),[t,d]),p=B.useRef(new Map),m=B.useCallback((e,t)=>{t?p.current.set(e,t):p.current.delete(e)},[]),h=B.useCallback((e,t)=>{let r=t.currentTarget,i=r.closest(`.DocSearch-FacetSelectionBar`);if(i){var a,o;let t=Array.from(i.querySelectorAll(`.DocSearch-Chip-Dismiss`)),n=t.indexOf(r),s=(a=(o=t[n+1])==null?t[n-1]:o)==null?p.current.get(e):a;s==null||s.focus()}n(e,``)},[n]),g=B.useCallback(()=>{var e;(e=p.current.values().next().value)==null||e.focus(),r()},[r]),_=B.useMemo(()=>new Map(e.map(e=>[e.key,Wp(e)])),[e]);return e.length===0?null:B.createElement(B.Fragment,null,B.createElement(`div`,{className:`DocSearch-FacetBar`,role:`group`,"aria-label":c},e.map(e=>{var r;let i=(r=t[e.key])==null?``:r;return B.createElement(im,{key:e.key,facet:e,selectedValue:i,defaultValueLabel:a,registerTrigger:m,menuTriggerSelectedAriaLabel:o,onSelectionChange:n})})),f.length>0&&B.createElement(`div`,{className:`DocSearch-FacetSelectionBar`,role:`group`,"aria-label":l},f.map(([e,t])=>{var n;return B.createElement(am,{key:e,facetKey:e,facetLabel:(n=_.get(e))==null?e:n,value:t,dismissAriaLabel:u,onDismiss:h})}),B.createElement(`button`,{type:`button`,className:`DocSearch-FacetSelectionBar-Action`,onClick:g},s)))}),sm=[`actionsBeforeClose`,`autoFocus`,`clearButtonAriaLabel`,`clearButtonTitle`,`closeButtonAriaLabel`,`closeButtonText`,`hideInput`,`inputOverlay`,`inputProps`,`inputRef`,`isFromSelection`,`leadingElement`,`onClose`,`placeholder`,`searchInputLabel`,`state`];function cm(e){let{actionsBeforeClose:t,autoFocus:n,clearButtonAriaLabel:r,clearButtonTitle:i,closeButtonAriaLabel:a,closeButtonText:o,hideInput:s,inputOverlay:c,inputProps:l,inputRef:u,isFromSelection:d,leadingElement:f,onClose:p,placeholder:m,searchInputLabel:h,state:g}=e,v=pn(e,sm),{onReset:y}=v.getFormProps({inputElement:u.current});B.useEffect(()=>{n&&u.current&&u.current.focus()},[n,u]),B.useEffect(()=>{d&&u.current&&u.current.select()},[d,u]);let b=v.getInputProps({inputElement:u.current,autoFocus:n,maxLength:512}),x=g.status===`stalled`;return B.createElement(`form`,{className:`DocSearch-Form`,onSubmit:e=>{e.preventDefault()},onReset:y},f||(x?B.createElement(`div`,{className:`DocSearch-LoadingIndicator`},B.createElement(Er,null)):B.createElement(`label`,_({className:`DocSearch-MagnifierLabel`},v.getLabelProps()),B.createElement(dn,null),B.createElement(`span`,{className:`DocSearch-VisuallyHiddenForAccessibility`},h))),c,B.createElement(`input`,_(_(_({className:`DocSearch-Input`,ref:u},b),l),{},{placeholder:m,hidden:s})),B.createElement(`div`,{className:`DocSearch-Actions`},t,B.createElement(`button`,{type:`button`,title:o,className:`DocSearch-Action DocSearch-Close`,"aria-label":a,onClick:p},B.createElement(jr,null))))}function lm({state:e,containerRef:t,modalRef:n,formElementRef:r,dropdownRef:i,getRootProps:a,onClose:o,showDropdown:s,searchBox:c,filterBar:l,screenState:u,footer:d}){return B.createElement(`div`,_(_({ref:t},a({"aria-expanded":!0})),{},{className:[`DocSearch`,`DocSearch-Container`,e.status===`stalled`&&`DocSearch-Container--Stalled`,e.status===`error`&&`DocSearch-Container--Errored`].filter(Boolean).join(` `),role:`button`,tabIndex:0,onMouseDown:e=>{e.target===e.currentTarget&&o()}}),B.createElement(`div`,{className:`DocSearch-Modal`,ref:n},B.createElement(`header`,{className:`DocSearch-SearchBar`,ref:r},c),l,s&&B.createElement(`div`,{className:`DocSearch-Dropdown`,ref:i},u),B.createElement(`footer`,{className:`DocSearch-Footer`},d)))}function um(e){return B.createElement(`svg`,{width:`20`,height:`20`,"aria-label":e.ariaLabel,viewBox:`0 0 24 24`,role:`img`},B.createElement(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.4`},e.children))}function dm({translations:e={},isAskAiActive:t=!1,footerAction:n}){let{selectText:r=`Select`,selectKeyAriaLabel:i=`Enter key`,submitQuestionText:a=`Submit question`,navigateText:o=`Navigate`,navigateUpKeyAriaLabel:s=`Arrow up`,navigateDownKeyAriaLabel:c=`Arrow down`,closeText:l=`Close`,backToSearchText:u=`Back to search`,closeKeyAriaLabel:d=`Escape key`,poweredByText:f=`Powered by`}=e,p=n!=null&&typeof n!=`boolean`;return B.createElement(B.Fragment,null,B.createElement(`ul`,{className:`DocSearch-Commands`},B.createElement(`li`,null,B.createElement(`kbd`,{className:`DocSearch-Commands-Key`},B.createElement(um,{ariaLabel:c},B.createElement(`path`,{d:`M12 5v14`}),B.createElement(`path`,{d:`m19 12-7 7-7-7`}))),B.createElement(`kbd`,{className:`DocSearch-Commands-Key`},B.createElement(um,{ariaLabel:s},B.createElement(`path`,{d:`m5 12 7-7 7 7`}),B.createElement(`path`,{d:`M12 19V5`}))),B.createElement(`span`,{className:`DocSearch-Label`},o)),B.createElement(`li`,null,B.createElement(`kbd`,{className:`DocSearch-Commands-Key`},B.createElement(um,{ariaLabel:i},B.createElement(`polyline`,{points:`9 10 4 15 9 20`}),B.createElement(`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`}))),B.createElement(`span`,{className:`DocSearch-Label`},t?a:r)),B.createElement(`li`,null,B.createElement(`kbd`,{className:`DocSearch-Commands-Key`},B.createElement(`span`,{className:`DocSearch-Escape-Key`},`ESC`)),B.createElement(`span`,{className:`DocSearch-Label`,"aria-label":d},t?u:l))),B.createElement(`div`,{className:`DocSearch-Footer-Actions`},p&&B.createElement(`div`,{className:`DocSearch-Footer-Action`},n),B.createElement(`div`,{className:`DocSearch-Logo`},B.createElement(Ir,{translations:{poweredByText:f}}))))}function fm({hit:e,children:t}){return B.createElement(`a`,{href:e.url},t)}function pm({facets:e,indexes:t,searchClient:n}){let[r,i]=B.useState({}),a=e.map(e=>e.key).join(`,`),o=JSON.stringify(t.map(e=>{var t;return[e.name,(t=e.searchParameters)==null?null:t]}));return B.useEffect(()=>{let e=!0,r=a?a.split(`,`):[];return r.length===0||t.length===0||n.search({requests:t.map(e=>({indexName:e.name,query:``,hitsPerPage:0,facets:r}))}).then(({results:t})=>{if(!e)return;let n=r.reduce((e,t)=>(e[t]=[],e),{});t.forEach(e=>{var t;Object.entries((t=e.facets)==null?{}:t).forEach(([e,t])=>{n[e]&&(n[e]=Array.from(new Set([...n[e],...Object.keys(t)])).sort())})}),i(n)}).catch(()=>{e&&i({})}),()=>{e=!1}},[a,o,n]),r}function mm({facets:e,indexes:t,searchClient:n,onSelectionsChange:r}){let i=B.useMemo(()=>Up(e),[e]),a=B.useRef(i),o=pm({facets:i,indexes:t,searchClient:n}),[s,c]=B.useState(()=>Gp(t)),l=B.useRef(s),u=B.useRef(r),d=B.useMemo(()=>i.map(e=>{var t;return _(_({},e),{},{values:(t=o[e.key])==null?[]:t})}).filter(e=>e.values.length>0),[o,i]);B.useLayoutEffect(()=>{a.current=i,u.current=r});let f=B.useCallback(e=>{var t;l.current=e,c(e),(t=u.current)==null||t.call(u)},[]);return{visibleFacets:d,facetSelections:s,facetSelectionsRef:l,handleFacetSelectionChange:B.useCallback((e,t)=>{if(l.current[e]===t)return;let n=_({},l.current);n[e]=t,f(n)},[f]),clearFacetSelections:B.useCallback(()=>{if(Object.keys(l.current).length===0)return;let e={};for(let t of a.current)l.current[t.key]&&(e[t.key]=``);f(e)},[f])}}function hm(e){return B.useCallback(t=>{if(!e.context.algoliaInsightsPlugin||!t.__autocomplete_id)return;let n=t;e.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch({eventName:`Item Selected`,index:n.__autocomplete_indexName,items:[n],positions:[t.__autocomplete_id],queryID:n.__autocomplete_queryID})},[e.context.algoliaInsightsPlugin])}function gm(e){let t=B.useRef(typeof window<`u`?window.getSelection().toString().slice(0,512):``).current;return{initialQuery:B.useRef(e||t).current,initialQueryFromSelection:t}}function _m({getEnvironmentProps:e,panelElement:t,formElement:n,inputElement:r}){B.useEffect(()=>{if(!(t&&n&&r))return;let{onTouchStart:i,onTouchMove:a}=e({panelElement:t,formElement:n,inputElement:r});return window.addEventListener(`touchstart`,i),window.addEventListener(`touchmove`,a),()=>{window.removeEventListener(`touchstart`,i),window.removeEventListener(`touchmove`,a)}},[e,t,n,r])}function vm({container:e}){B.useEffect(()=>{if(!e)return;let t=e.querySelectorAll(`a[href]:not([disabled]), button:not([disabled]), input:not([disabled])`),n=t[0],r=t[t.length-1];function i(e){e.key===`Tab`&&(e.shiftKey?document.activeElement===n&&(e.preventDefault(),r.focus()):document.activeElement===r&&(e.preventDefault(),n.focus()))}return e.addEventListener(`keydown`,i),()=>{e.removeEventListener(`keydown`,i)}},[e])}function ym({initialScrollY:e,modalRef:t,theme:n}){mn({theme:n}),B.useEffect(()=>(document.body.classList.add(`DocSearch--active`),()=>{var t,n;document.body.classList.remove(`DocSearch--active`),(t=(n=window).scrollTo)==null||t.call(n,0,e)}),[e]),B.useEffect(()=>{Br()},[]),B.useLayoutEffect(()=>{let e=window.innerWidth-document.body.clientWidth;return document.body.style.marginInlineEnd=`${e}px`,()=>{document.body.style.marginInlineEnd=`0px`}},[]),B.useEffect(()=>{function e(){if(t.current){let e=window.innerHeight*.01;t.current.style.setProperty(`--docsearch-vh`,`${e}px`)}}return e(),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[t])}function bm({getEnvironmentProps:e,containerRef:t,dropdownRef:n,formElementRef:r,inputRef:i,initialScrollY:a,modalRef:o,theme:s}){_m({getEnvironmentProps:e,panelElement:n.current,formElement:r.current,inputElement:i.current}),vm({container:t.current}),ym({initialScrollY:a,modalRef:o,theme:s})}function xm(){return{containerRef:B.useRef(null),modalRef:B.useRef(null),formElementRef:B.useRef(null),dropdownRef:B.useRef(null),inputRef:B.useRef(null)}}function Sm({initialQuery:e,inputRef:t,refresh:n}){B.useEffect(()=>{e.length>0&&(n(),t.current&&t.current.focus())},[e,t,n])}function Cm(e){let t=e.hierarchy,n=[`lvl6`,`lvl5`,`lvl4`,`lvl3`,`lvl2`,`lvl1`,`lvl0`].find(e=>t[e]);return _(_({},e),{},{type:n||`lvl0`,content:null})}function wm({favoriteSearches:e,recentSearches:t,disableUserPersonalization:n}){return B.useCallback(function(r){if(n)return;let i=r.type===`content`?r.__docsearch_parent||Cm(r):r;i&&e.getAll().findIndex(e=>e.objectID===i.objectID)===-1&&t.add(i)},[e,t,n])}function Tm({defaultIndexName:e,recentSearchesLimit:t,recentSearchesWithFavoritesLimit:n}){let r=B.useRef(Wr({key:`__DOCSEARCH_FAVORITE_SEARCHES__${e}`,limit:10})).current;return{favoriteSearches:r,recentSearches:B.useRef(Wr({key:`__DOCSEARCH_RECENT_SEARCHES__${e}`,limit:r.getAll().length===0?t:n})).current}}function Em({title:e,subText:t}){return B.createElement(`div`,{className:`DocSearch-Hit-content-wrapper`},B.createElement(`span`,{className:`DocSearch-Hit-title`},e),B.createElement(`span`,{className:`DocSearch-Hit-path`},t))}let Dm=1e3,Om=Dm*60,km=Om*60,Am=[[km*24,`day`],[km,`hour`],[Om,`minute`],[Dm,`second`]];function jm(e,t=Date.now()){let[n]=Me(()=>{var n;let r=Math.abs(Number(t)-Number(e)),[i,a]=(n=Am.find(([e])=>r>=e))==null?Am[Am.length-1]:n;return[Math.floor(r/i),a]}),r=z(()=>{let e=typeof navigator<`u`?navigator.language:void 0,[t,r]=n;return new Intl.RelativeTimeFormat(e,{style:`long`}).format(t*-1,r)},[n]);return e?r:null}let Mm=[`hit`,`attribute`,`tagName`];function Nm(e,t){return t.split(`.`).reduce((e,t)=>e!=null&&e[t]?e[t]:null,e)}function Pm(e){let{hit:t,attribute:n,tagName:r=`span`}=e;return C(r,_(_({},pn(e,Mm)),{},{dangerouslySetInnerHTML:{__html:Nm(t,`_snippetResult.${n}.value`)||Nm(t,n)}}))}function Fm(e){var t;let{askAiResultsTitle:n=`Ask AI Assistant`}=e.translations||{},r=B.useId(),i=B.useMemo(()=>e.title?Sp(e.title):null,[e.title]);return!e.collection||e.collection.items.length===0?null:e.collection.source.sourceId===bp.askAI?B.createElement(`section`,{className:`DocSearch-Hits`},B.createElement(`h2`,{id:r,className:`DocSearch-Hit-source`},n),B.createElement(`ul`,_(_({className:`DocSearch-Hits-padded`},e.getListProps({source:e.collection.source})),{},{"aria-labelledby":r}),e.collection.items.map(t=>B.createElement(Rm,_({key:t.objectID,item:t,translations:e.translations},e))))):e.collection.source.sourceId===bp.recentConversations?B.createElement(`section`,{className:`DocSearch-Hits`},B.createElement(`div`,{className:`DocSearch-Hit-source`},B.createElement(Dr,null),i),B.createElement(`ul`,_({className:`DocSearch-Hits-padded`},e.getListProps({source:e.collection.source})),e.collection.items.map((t,n)=>B.createElement(Im,_({key:[e.title,t.objectID].join(`:`),item:t,index:n},e))))):B.createElement(`section`,{className:`DocSearch-Hits`},B.createElement(`div`,{className:`DocSearch-Hit-source`},(t=e.sourceIcon)==null?null:t,i),B.createElement(`ul`,_({className:`DocSearch-Hits-padded`},e.getListProps({source:e.collection.source})),e.collection.items.map((t,n)=>B.createElement(Im,_({key:[e.title,t.objectID].join(`:`),item:t,index:n},e)))))}function Im({item:e,index:t,renderIcon:n,renderAction:r,getItemProps:i,onItemClick:a,collection:o,hitComponent:s,translations:c={},renderResultBadge:l}){let u=s,{recentConversationTimestampFallback:d=`A while ago`}=c,f=e.type===`content`?`content`:`hierarchy.${e.type}`,p=wp(e);return B.createElement(`li`,_({className:[`DocSearch-Hit`,e.__docsearch_parent&&`DocSearch-Hit--Child`].filter(Boolean).join(` `)},i({item:e,source:o.source,onClick(t){a(e,t)}})),B.createElement(u,{hit:e},B.createElement(`div`,{className:`DocSearch-Hit-Container`},n({item:e,index:t}),e.type===`lvl0`&&B.createElement(Em,{title:B.createElement(Pm,{hit:e,attribute:`hierarchy.lvl0`}),subText:B.createElement(Pm,{hit:e,attribute:`content`})}),e.type===`askAI`?B.createElement(Lm,{item:e,relativeDateFallbackText:d}):B.createElement(Em,{title:B.createElement(Pm,{hit:e,attribute:f}),subText:p}),l==null?void 0:l({item:e}),r({item:e}))))}function Lm({item:e,relativeDateFallbackText:t}){let n=jm(e.hierarchy.lvl2?new Date(e.hierarchy.lvl2):null);return B.createElement(Em,{title:Sp(e.hierarchy.lvl1||``),subText:n||t})}function Rm({item:e,getItemProps:t,onItemClick:n,collection:r}){return e.query?B.createElement(`li`,_({className:`DocSearch-Hit`},t({item:e,source:r.source,onClick(t){n(e,t)}})),B.createElement(`div`,{className:`DocSearch-Hit--AskAI`},B.createElement(`div`,{className:`DocSearch-Hit-AskAIButton DocSearch-Hit-Container`},B.createElement(`div`,{className:` DocSearch-Hit-AskAIButton-icon DocSearch-Hit-icon`},B.createElement(Dr,null)),B.createElement(`div`,{className:`DocSearch-Hit-AskAIButton-title`},B.createElement(`span`,{className:`DocSearch-Hit-AskAIButton-title-query`},e.query))))):null}let zm=[`translations`];function Bm(e){let{translations:t={}}=e,n=pn(e,zm),{recentSearchesTitle:r=`Recently viewed docs`,saveRecentSearchButtonTitle:i=`Pin this search`,removeRecentSearchButtonTitle:a=`Remove this search from history`,favoriteSearchesTitle:o=`Pinned`,removeFavoriteSearchButtonTitle:s=`Remove this saved search`}=t,c=xp(n.state,`favoriteSearches`),l=xp(n.state,`recentSearches`);return B.createElement(B.Fragment,null,c&&B.createElement(Fm,_(_({},n),{},{title:o,collection:c,sourceIcon:B.createElement(Bp,null),renderIcon:({item:e})=>B.createElement(`div`,{className:`DocSearch-Hit-icon`},B.createElement(Nr,{type:e.type})),renderAction:({item:e})=>B.createElement(`div`,{className:`DocSearch-Hit-action`},B.createElement(`button`,{className:`DocSearch-Hit-action-button`,title:s,type:`submit`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.favoriteSearches.remove(e),n.refresh()}},B.createElement(jr,null)))})),l&&B.createElement(Fm,_(_({},n),{},{title:r,collection:l,sourceIcon:B.createElement(Or,null),renderIcon:({item:e})=>B.createElement(`div`,{className:`DocSearch-Hit-icon`},B.createElement(Nr,{type:e.type})),renderAction:({item:e})=>B.createElement(B.Fragment,null,B.createElement(`div`,{className:`DocSearch-Hit-action`},B.createElement(`button`,{className:`DocSearch-Hit-action-button DocSearch-Hit-action-button--pin`,title:i,type:`submit`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.favoriteSearches.add(e),n.recentSearches.remove(e),n.refresh()}},B.createElement(Bp,null))),B.createElement(`div`,{className:`DocSearch-Hit-action`},B.createElement(`button`,{className:`DocSearch-Hit-action-button`,title:a,type:`submit`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.recentSearches.remove(e),n.refresh()}},B.createElement(jr,null))))})))}function Vm({translations:e={}}){let{titleText:t=`Unable to fetch results`,helpText:n=`You might want to check your network connection.`}=e;return B.createElement(`div`,{className:`DocSearch-ErrorScreen`},B.createElement(`div`,{className:`DocSearch-Screen-Icon`},B.createElement(Rp,null)),B.createElement(`p`,{className:`DocSearch-Title`},t),B.createElement(`p`,{className:`DocSearch-Help`},n))}let Hm=[`translations`];function Um(e){let{translations:t={}}=e,n=pn(e,Hm),{noResultsText:r=`No results found for`,suggestedQueryText:i=`Try searching for`,reportMissingResultsText:a=`Believe this query should return results?`,reportMissingResultsLinkText:o=`Let us know.`}=t,s=n.state.context.searchSuggestions;return B.createElement(`div`,{className:`DocSearch-NoResults ${n.canHandleAskAi?`DocSearch-NoResults--withAskAi`:``}`},B.createElement(`div`,{className:`DocSearch-Screen-Icon`},B.createElement(zp,null)),B.createElement(`p`,{className:`DocSearch-Title`},r,` "`,B.createElement(`strong`,null,n.state.query),`"`),s&&s.length>0&&B.createElement(`div`,{className:`DocSearch-NoResults-Prefill-List`},B.createElement(`p`,{className:`DocSearch-Help`},i,`:`),B.createElement(`div`,{className:`DocSearch-NoResults-Prefill-List-Items`},s.slice(0,3).reduce((e,t)=>[...e,B.createElement(`p`,{key:t},B.createElement(dn,{size:16}),B.createElement(`button`,{className:`DocSearch-Prefill`,key:t,type:`button`,onClick:()=>{n.setQuery(t.toLowerCase()+` `),n.refresh(),n.inputRef.current.focus()}},t))],[]))),n.getMissingResultsUrl&&B.createElement(`p`,{className:`DocSearch-Help`},`${a} `,B.createElement(`a`,{href:n.getMissingResultsUrl({query:n.state.query}),target:`_blank`,rel:`noopener noreferrer`},o)))}function Wm(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`}function Gm({item:e,resultBadgeKey:t,translations:n={}}){if(!t)return null;let r=Dp(e,t);if(r==null)return null;let{resultBadgeLabelText:i=`Category`}=n,a=null;if(Wm(r))a=String(r).trim();else if(Array.isArray(r)){let e=r.filter(Wm).map(e=>String(e).trim());a=e.length>0?e.join(`, `):null}return a===null||a.length===0?null:B.createElement(`div`,{className:`DocSearch-Hit-badge`},B.createElement(`span`,{className:`DocSearch-VisuallyHiddenForAccessibility`},`${i}: ${a}`),B.createElement(`span`,{"aria-hidden":`true`},a))}let Km=[`translations`,`resultBadgeKey`];function qm(e){let{translations:t={},resultBadgeKey:n}=e,r=pn(e,Km),i=B.useCallback(()=>B.createElement(`div`,{className:`DocSearch-Hit-action`},B.createElement(Lp,null)),[]),a=B.useCallback(({item:e})=>B.createElement(Gm,{item:e,resultBadgeKey:n,translations:{resultBadgeLabelText:t.resultBadgeLabelText}}),[n,t.resultBadgeLabelText]);return B.createElement(`div`,{className:`DocSearch-Dropdown-Container`},r.state.collections.map(e=>{if(e.items.length===0)return null;let n=Fp(e.items[0]);return B.createElement(Fm,_(_({},r),{},{key:e.source.sourceId,translations:t,title:n,collection:e,renderIcon:({item:t,index:n})=>{var r;return B.createElement(B.Fragment,null,t.__docsearch_parent&&B.createElement(`svg`,{className:`DocSearch-Hit-Tree`,viewBox:`0 0 24 54`},B.createElement(`g`,{stroke:`currentColor`,fill:`none`,fillRule:`evenodd`,strokeLinecap:`round`,strokeLinejoin:`round`},t.__docsearch_parent===((r=e.items[n+1])==null?void 0:r.__docsearch_parent)?B.createElement(`path`,{d:`M8 6v42M20 27H8.3`}):B.createElement(`path`,{d:`M8 6v21M20 27H8.3`}))),B.createElement(`div`,{className:`DocSearch-Hit-icon`},B.createElement(Nr,{type:t.type})))},renderAction:i,renderResultBadge:a}))}),r.resultsFooterComponent&&B.createElement(`section`,{className:`DocSearch-HitsFooter`},B.createElement(r.resultsFooterComponent,{state:r.state})))}function Jm(e,t){let n=Object.entries(t),r=new Set(n.map(([e])=>e)),i=[];for(let[e,t]of n)t!==``&&i.push(`${e}:${t}`);if(r.size===0)return e;let a=[];return e&&Array.isArray(e)?a=e:e&&(a=[e]),[...a.filter(e=>{if(typeof e!=`string`)return!0;let t=e.indexOf(`:`),n=e.slice(0,t);return t<=0||!r.has(n)}),...i]}function Ym({recentSearches:e,favoriteSearches:t,saveRecentSearch:n,onClose:r,disableUserPersonalization:i}){return i?[]:[{sourceId:bp.favoriteSearches,onSelect({item:e,event:t}){n(e),Ap(t)||r()},getItemUrl({item:e}){return e.url},getItems(){return t.getAll()}},{sourceId:bp.recentSearches,onSelect({item:e,event:t}){n(e),Ap(t)||r()},getItemUrl({item:e}){return e.url},getItems(){return e.getAll()}}]}async function Xm({query:e,state:t,setContext:n,setStatus:r,searchClient:i,indexes:a,insights:o,appId:s,apiKey:c,maxResultsPerGroup:l,transformItems:u=kp,saveRecentSearch:d,onClose:f,facetSelections:p}){let m=o;try{let{results:r}=await i.search({requests:a.map(t=>{var n,r,i,a,o,s,c;let l=t.name,u=t.searchParameters,d=Jm(u==null?void 0:u.facetFilters,p.current);return _(_({query:e,indexName:l,attributesToRetrieve:(n=u==null?void 0:u.attributesToRetrieve)==null?[`hierarchy.lvl0`,`hierarchy.lvl1`,`hierarchy.lvl2`,`hierarchy.lvl3`,`hierarchy.lvl4`,`hierarchy.lvl5`,`hierarchy.lvl6`,`content`,`type`,`url`]:n,attributesToSnippet:(r=u==null?void 0:u.attributesToSnippet)==null?[`hierarchy.lvl1:15`,`hierarchy.lvl2:15`,`hierarchy.lvl3:15`,`hierarchy.lvl4:15`,`hierarchy.lvl5:15`,`hierarchy.lvl6:15`,`content:15`]:r,snippetEllipsisText:(i=u==null?void 0:u.snippetEllipsisText)==null?`…`:i,highlightPreTag:(a=u==null?void 0:u.highlightPreTag)==null?`<mark>`:a,highlightPostTag:(o=u==null?void 0:u.highlightPostTag)==null?`</mark>`:o,hitsPerPage:(s=u==null?void 0:u.hitsPerPage)==null?20:s,clickAnalytics:(c=u==null?void 0:u.clickAnalytics)==null?m:c},u),d?{facetFilters:d}:{})})});return r.flatMap(e=>{let r=e,{hits:i,nbHits:a}=r,o=Op(u(i),e=>Fp(e),l);if(t.context.searchSuggestions.length<Object.keys(o).length){var p;n({searchSuggestions:_(_({},(p=t.context.searchSuggestions)==null?[]:p),Object.keys(o))})}if(a){let e=t.context.nbHits;n({nbHits:(e==null?0:e)+a})}let h={};return m&&(h={__autocomplete_indexName:r.index,__autocomplete_queryID:r.queryID,__autocomplete_algoliaCredentials:{appId:s,apiKey:c}}),Object.values(o).map((e,t)=>({sourceId:`hits_${r.index}_${t}`,onSelect({item:e,event:t}){d(e),Ap(t)||f()},getItemUrl({item:e}){return e.url},getItems(){return Object.values(Op(e,e=>e.hierarchy.lvl1,l)).map(e=>e.map(t=>{let n=null,r=e.find(e=>e.type===`lvl1`&&e.hierarchy.lvl1===t.hierarchy.lvl1);return t.type!==`lvl1`&&r&&(n=r),_(_({},t),{},{__docsearch_parent:n},h)})).flat()}}))})}catch(e){throw e.name===`RetryError`&&r(`error`),e}}function Zm({indices:e}){if(!Array.isArray(e)||e.length<1)throw Error("Must supply at least one `indices` entry for DocSearch");return e.map(e=>typeof e==`string`?{name:e}:e)}V();let Qm=me(void 0);function $m(e){let t=Re(Qm);if(t===void 0&&!e)throw Error(Jr(47));return t}V();function eh(){return U(U({},md()),{},{disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1})}let th=U(U({},xd),{},{disabled:G(e=>e.disabled),instantType:G(e=>e.instantType),openMethod:G(e=>e.openMethod),openChangeReason:G(e=>e.openChangeReason),modal:G(e=>e.modal),focusManagerModal:G(e=>e.focusManagerModal),stickIfOpen:G(e=>e.stickIfOpen),titleElementId:G(e=>e.titleElementId),descriptionElementId:G(e=>e.descriptionElementId),openOnHover:G(e=>e.openOnHover),closeDelay:G(e=>e.closeDelay),hasViewport:G(e=>e.hasViewport)});var nh=class e extends Yu{constructor(e,t,n=!1){let r=U(U({},eh()),e),i=new fd;r.open&&(e==null?void 0:e.mounted)===void 0&&(r.mounted=!0),r.floatingRootContext=hd(i,t,n),super(r,{popupRef:T(),backdropRef:T(),internalBackdropRef:T(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:T(),beforeContentFocusGuardRef:T(),stickIfOpenTimeout:new Bo,triggerElements:i},th),H(this,`setOpen`,(e,t)=>{var n,r;let i=t.reason===ta,a=t.reason===`trigger-press`&&t.event.detail===0,o=!e&&(t.reason===`escape-key`||t.reason==null),s=ad(t),c=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&c!=null){var l,u;t.trigger=(l=(u=this.context.triggerElements.getById(c))==null?this.select(`activeTriggerElement`):u)==null?void 0:l}if((n=(r=this.context).onOpenChange)==null||n.call(r,e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let d=()=>{let n={open:e,openChangeReason:t.reason};id(n,e,t.trigger,s()),this.update(n)};i?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),cn(d)):d(),a||o?this.set(`instantType`,a?`click`:`dismiss`):t.reason===`focus-out`?this.set(`instantType`,`focus`):this.set(`instantType`,void 0)}),H(this,`disposeEffect`,()=>this.context.stickIfOpenTimeout.disposeEffect())}static useStore(t,n){let{store:r,internalStore:i}=nd(t,(t,r)=>new e(n,t,r));return Pe(()=>i==null?void 0:i.disposeEffect(),[i]),r}};V();function rh({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=nh.useStore(s==null?void 0:s.store,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});od(u,n,r,l),u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`),m=nl()!=null;u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),dd(u,d),cd(u);let{forceUnmount:h}=ld(d,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});u.useSyncedValues({modal:o,nested:m}),Pe(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]);let g=Le(()=>{u.setOpen(!1,wo(sa))},[u]);Ie(e.actionsRef,()=>({unmount:h,close:g}),[h,g]);let _=d||f,v=z(()=>({store:u}),[u]);return Eo(Qm.Provider,{value:v,children:[_&&Eo(ah,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})}function ih(e){return $m(!0)?Eo(rh,{props:e}):Eo(ol,{children:Eo(rh,{props:e})})}function ah({store:e,modal:t}){var n,r;let i=vl(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}});return ud(e,{activeTriggerProps:(n=i.reference)==null?pi:n,inactiveTriggerProps:(r=i.trigger)==null?pi:r,popupProps:z(()=>vi(ed,i.floating),[i.floating])}),null}V();let oh=[`render`,`className`,`style`,`disabled`,`nativeButton`,`handle`,`payload`,`openOnHover`,`delay`,`closeDelay`,`id`],sh=yt(function(e,t){var n;let{render:r,className:i,style:a,disabled:o=!1,nativeButton:s=!0,handle:c,payload:l,openOnHover:u=!1,delay:d=300,closeDelay:f=0,id:p}=e,m=vr(e,oh),h=$m(!0),g=(n=c==null?void 0:c.store)==null?h==null?void 0:h.store:n;if(!g)throw Error(Jr(74));let _=xo(p),v=g.useState(`isTriggerActive`,_),y=g.useState(`floatingRootContext`),b=g.useState(`isOpenedByTrigger`,_),x=g.useState(`triggerPopupId`,_),S=R(null),{registerTrigger:C,isMountedByThisTrigger:w}=sd(_,S,g,{payload:l,disabled:o,openOnHover:u,closeDelay:f}),T=g.useState(`openChangeReason`),D=g.useState(`stickIfOpen`),O=g.useState(`openMethod`),k=g.useState(`focusManagerModal`),A=Nd(y,{enabled:!o&&y!=null&&u&&(O!==`touch`||T!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:Kd(),restMs:d,delay:{close:f},triggerElementRef:S,isActiveTrigger:v,isClosing:()=>g.select(`transitionStatus`)===`ending`}),j=hl(y,{enabled:y!=null,stickIfOpen:D}),M=ep(()=>g.select(`open`),e=>{g.set(`openMethod`,e)}),N=g.useState(`triggerProps`,w),{getButtonProps:P,buttonRef:ee}=Wa({disabled:o,native:s}),te={open(e){return e&&T===`trigger-press`?Xi.open(e):Yi.open(e)}},{preFocusGuardRef:F,handlePreFocusGuardFocus:ne,handleFocusTargetFocus:re}=pp(g,S),ie=Mi(`button`,e,{state:{disabled:o,open:b},ref:[ee,t,C,S],props:[j.reference,A,N,M,{"data-base-ui-click-trigger":``,id:_,"aria-haspopup":`dialog`,"aria-expanded":b,"aria-controls":x},m,P],stateAttributesMapping:te});return w&&!k?Eo(E,{children:[Eo(ys,{ref:F,onFocus:ne}),Eo(E,{children:ie},_),Eo(ys,{ref:g.context.triggerFocusTargetRef,onFocus:re})]}):Eo(E,{children:ie},_)});V();let ch=me(void 0);function lh(){let e=Re(ch);if(e===void 0)throw Error(Jr(45));return e}V();let uh=[`keepMounted`],dh=yt(function(e,t){let{keepMounted:n=!1}=e,r=vr(e,uh),{store:i}=$m();return i.useState(`mounted`)||n?Eo(ch.Provider,{value:n,children:Eo(Zc,U({ref:t},r))}):null});V();let fh=me(void 0);function ph(){let e=Re(fh);if(!e)throw Error(Jr(46));return e}V();let mh=[`render`,`className`,`style`,`anchor`,`positionMethod`,`side`,`align`,`sideOffset`,`alignOffset`,`collisionBoundary`,`collisionPadding`,`arrowPadding`,`sticky`,`disableAnchorTracking`,`collisionAvoidance`],hh=yt(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o=`absolute`,side:s=`bottom`,align:c=`center`,sideOffset:l=0,alignOffset:u=0,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f=5,arrowPadding:p=5,sticky:m=!1,disableAnchorTracking:h=!1,collisionAvoidance:g=Wc}=e,_=vr(e,mh),{store:v}=$m(),y=lh(),b=il(),x=v.useState(`floatingRootContext`),S=v.useState(`mounted`),C=v.useState(`open`),w=v.useState(`openChangeReason`),T=v.useState(`activeTriggerElement`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`positionerElement`),k=v.useState(`instantType`),A=v.useState(`transitionStatus`),j=v.useState(`hasViewport`),M=R(null),N=Po(O,!1,!1),P=yf({anchor:a,floatingRootContext:x,positionMethod:o,mounted:S,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:b,collisionAvoidance:g,adaptiveOrigin:j?gf:void 0}),ee=x.useState(`domReferenceElement`);W(()=>{let e=ee,t=M.current;if(e&&(M.current=e),t&&e&&e!==t){v.set(`instantType`,void 0);let e=new AbortController;return N(()=>{v.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[ee,N,v]),Lf(C&&E===!0&&w!==`trigger-hover`,D===`touch`,O,T);let te=Le(e=>{v.set(`positionerElement`,e)},[v]),F=Df(e,{open:C,side:P.side,align:P.align,anchorHidden:P.anchorHidden,instant:k},{styles:P.positionerStyles,transitionStatus:A,props:_,refs:[t,te],hidden:!S,inert:!C});return Eo(fh.Provider,{value:P,children:[S&&E===!0&&w!==`trigger-hover`&&Eo(Ef,{ref:v.context.internalBackdropRef,inert:cf(!C),cutout:T}),Eo(al,{id:b,children:F})]})});V();let gh=me(void 0);function _h(){let[e,t]=Me(0),n=La(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:z(()=>({register:n}),[n]),hasClosePart:e>0}}function vh(e){let{value:t,children:n}=e;return Eo(gh.Provider,{value:t,children:n})}function yh(){let e=Re(gh);W(()=>e==null?void 0:e.register(),[e])}V();let bh=[`render`,`className`,`style`,`initialFocus`,`finalFocus`],xh=U(U({},Zi),Vi),Sh=yt(function(e,t){var n;let{render:r,className:i,style:a,initialFocus:o,finalFocus:s}=e,c=vr(e,bh),{store:l}=$m(),u=ph(),d=Jd(!0)!=null,{context:f,hasClosePart:p}=_h(),m=l.useState(`open`),h=l.useState(`openMethod`),g=l.useState(`instantType`),_=l.useState(`transitionStatus`),v=l.useState(`popupProps`),y=l.useState(`titleElementId`),b=l.useState(`descriptionElementId`),x=l.useState(`modal`),S=l.useState(`mounted`),C=l.useState(`openChangeReason`),w=l.useState(`activeTriggerElement`),T=l.useState(`floatingRootContext`),E=T.useState(`floatingId`),D=l.useState(`disabled`),O=l.useState(`openOnHover`),k=l.useState(`closeDelay`),A=(n=c.id)==null?E:n;Fo({open:m,ref:l.context.popupRef,onComplete(){if(m){var e,t;(e=(t=l.context).onOpenChangeComplete)==null||e.call(t,!0)}}}),jd(T,{enabled:O&&!D,closeDelay:k});let j=o===void 0?td(l.context.popupRef):o,M=x!==!1&&p;l.useSyncedValue(`focusManagerModal`,M);let N=Le(e=>{l.set(`popupElement`,e)},[l]),P=Mi(`div`,e,{state:{open:m,side:u.side,align:u.align,instant:g,transitionStatus:_},ref:[t,l.context.popupRef,N],props:[v,U(U({id:A,role:`dialog`},ed),{},{"aria-labelledby":y,"aria-describedby":b,onKeyDown(e){d&&Qd.has(e.key)&&e.stopPropagation()}}),$d(_),c],stateAttributesMapping:xh});return Eo(ml,{context:T,openInteractionType:h,modal:M,disabled:!S||C===`trigger-hover`,initialFocus:j,returnFocus:s,restoreFocus:`popup`,previousFocusableElement:ha(w)?w:void 0,nextFocusableElement:l.context.triggerFocusTargetRef,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:Eo(vh,{value:f,children:P})})});V();let Ch=[`render`,`className`,`style`],wh=yt(function(e,t){let{render:n,className:r,style:i}=e,a=vr(e,Ch),{store:o}=$m(),s=o.useState(`open`),{arrowRef:c,side:l,align:u,arrowUncentered:d,arrowStyles:f}=ph();return Mi(`div`,e,{state:{open:s,side:l,align:u,uncentered:d},ref:[t,c],props:[{style:f,"aria-hidden":!0},a],stateAttributesMapping:Zi})});V();let Th=[`render`,`className`,`style`],Eh=yt(function(e,t){let{render:n,className:r,style:i}=e,a=vr(e,Th),{store:o}=$m(),s=xo(a.id);return o.useSyncedValueWithCleanup(`titleElementId`,s),Mi(`h2`,e,{ref:t,props:[{id:s},a]})});V();let Dh=[`render`,`className`,`style`,`disabled`,`nativeButton`],Oh=yt(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0}=e,s=vr(e,Dh),{buttonRef:c,getButtonProps:l}=Wa({disabled:a,focusableWhenDisabled:!1,native:o}),{store:u}=$m();return yh(),Mi(`button`,e,{ref:[t,c],props:[{onClick(e){u.setOpen(!1,wo(`close-press`,e.nativeEvent))}},s,l]})});var kh;function Ah(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var jh=Ah();function Mh(e){jh=e}var Nh={exec:()=>null};function Ph(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Ih.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Fh=(()=>{try{return!0}catch(e){return!1}})(),Ih={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:RegExp(`[\\p{L}\\p{N}]`,`u`),escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},Lh=/^(?:[ \t]*(?:\n|$))+/,Rh=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,zh=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Bh=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Vh=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Hh=/(?:[*+-]|\d{1,9}[.)])/,Uh=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wh=Ph(Uh).replace(/bull/g,Hh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Gh=Ph(Uh).replace(/bull/g,Hh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Kh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,qh=/^[^\n]+/,Jh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Yh=Ph(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Jh).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Xh=Ph(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Hh).getRegex(),Zh=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Qh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$h=Ph(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Qh).replace(`tag`,Zh).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),eg=Ph(Kh).replace(`hr`,Bh).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Zh).getRegex(),tg={blockquote:Ph(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,eg).getRegex(),code:Rh,def:Yh,fences:zh,heading:Vh,hr:Bh,html:$h,lheading:Wh,list:Xh,newline:Lh,paragraph:eg,table:Nh,text:qh},ng=Ph(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Bh).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Zh).getRegex(),rg=U(U({},tg),{},{lheading:Gh,table:ng,paragraph:Ph(Kh).replace(`hr`,Bh).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,ng).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Zh).getRegex()}),ig=U(U({},tg),{},{html:Ph(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Qh).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Nh,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ph(Kh).replace(`hr`,Bh).replace(`heading`,` *#{1,6} *[^
|
|
26
|
+
var t=(V(),d(ut)),n=ju();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Nu=s(((e,t)=>{t.exports=Mu()}));V();let Pu=[],Fu;function Iu(){return Fu}function Lu(e){Pu.push(e)}function Ru(e){let t=(t,n)=>{let r=ei(Bu).current,i;try{Fu=r;for(let e of Pu)e.before(r);i=e(t,n);for(let e of Pu)e.after(r);r.didInitialize=!0}finally{Fu=void 0}return i};return t.displayName=e.displayName||e.name,t}function zu(e){return yt(Ru(e))}function Bu(){return{didInitialize:!1}}V();var Vu=ju(),Hu=Nu();let Uu=ci(19)?Ku:qu;function Wu(e,t,n,r,i){return Uu(e,t,n,r,i)}function Gu(e,t,n,r,i){let a=Le(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Vu.useSyncExternalStore)(e.subscribe,a,a)}Lu({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Vu.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Ku(e,t,n,r,i){let a=Iu();if(!a)return Gu(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function qu(e,t,n,r,i){return(0,Hu.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Ju=class{constructor(e){H(this,`subscribe`,e=>(this.listeners.add(e),()=>{this.listeners.delete(e)})),H(this,`getSnapshot`,()=>this.state),this.state=e,this.listeners=new Set,this.updateTick=0}setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState(U(U({},this.state),e));return}}set(e,t){Object.is(this.state[e],t)||this.setState(U(U({},this.state),{},{[e]:t}))}notifyAll(){let e=U({},this.state);this.setState(e)}use(e,t,n,r){return Wu(this,e,t,n,r)}};V();var Yu=class extends Ju{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){ze(e);let n=this;W(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;W(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;W(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){ze(e);let n=this,r=t!==void 0;W(()=>{r&&!Object.is(n.state[e],t)&&n.setState(U(U({},n.state),{},{[e]:t}))},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return ze(e),Wu(this,this.selectors[e],t,n,r)}useContextCallback(e,t){ze(e);let n=La(t==null?di:t);this.context[e]=n}useStateSetter(e){let t=R(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}};let Xu=[`syncOnly`,`nested`,`onOpenChange`,`triggerElements`],Zu={open:G(e=>e.open),transitionStatus:G(e=>e.transitionStatus),domReferenceElement:G(e=>e.domReferenceElement),referenceElement:G(e=>{var t;return(t=e.positionReference)==null?e.referenceElement:t}),floatingElement:G(e=>e.floatingElement),floatingId:G(e=>e.floatingId)};var Qu=class extends Yu{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i}=e,a=vr(e,Xu);super(U(U({},a),{},{positionReference:a.referenceElement,domReferenceElement:a.referenceElement}),{onOpenChange:r,dataRef:{current:{}},events:Qc(),nested:n,triggerElements:i},Zu),H(this,`syncOpenEvent`,(e,t)=>{(!e||!this.state.open||t!=null&&qo(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)}),H(this,`dispatchOpenChange`,(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)}),H(this,`setOpen`,(e,t)=>{var n,r;if(this.syncOnly){var i,a;(i=(a=this.context).onOpenChange)==null||i.call(a,e,t);return}this.dispatchOpenChange(e,t),(n=(r=this.context).onOpenChange)==null||n.call(r,e,t)}),this.syncOnly=t}};V();function $u(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=R(null);r===void 0&&f.current===null&&(f.current=new Qu({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r==null?f.current:r;return t.useSyncedValue(`floatingId`,i),W(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};ma(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}V();let ed={tabIndex:-1,"data-base-ui-focusable":``};function td(e){return t=>t!==`touch`||e.current}function nd(e,t,n=!1){let r=bo(),i=nl()!=null,a=R(null);e===void 0&&a.current===null&&(a.current=t(r,i));let o=e==null?a.current:e;return $u({popupStore:o,treatPopupAsFloatingElement:n,floatingRootContext:o.state.floatingRootContext,floatingId:r,nested:i,onOpenChange:o.setOpen}),{store:o,internalStore:a.current}}function rd(e,t){let n=R(null),r=R(null);return Le(i=>{if(e===void 0)return;let a=!1;if(n.current!==null){let e=n.current,i=r.current,o=t.context.triggerElements.getById(e);i&&o===i&&(t.context.triggerElements.delete(e),a=!0),n.current=null,r.current=null}if(i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i),a=!0),a){let e=t.context.triggerElements.size;t.select(`open`)&&t.state.triggerCount!==e&&t.set(`triggerCount`,e)}},[t,e])}function id(e,t,n,r=!1){var i;t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);let a=(i=n==null?void 0:n.id)==null?null:i;(a||t)&&(e.activeTriggerId=a,e.activeTriggerElement=n==null?null:n)}function ad(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function od(e,t,n,r){ku(()=>{t===void 0&&e.state.open===!1&&n&&(e.state=U(U({},e.state),{},{open:!0,activeTriggerId:r,preventUnmountingOnClose:!1}))})}function sd(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=rd(e,n),o=La(t=>{if(a(t),!t)return;let i=n.select(`open`),o=n.select(`activeTriggerId`);if(o===e){n.update(U({activeTriggerElement:t},i?r:null));return}o==null&&i&&n.update(U({activeTriggerId:e,activeTriggerElement:t},r))});return W(()=>{i&&n.update(U({activeTriggerElement:t.current},r))},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function cd(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState(`open`);W(()=>{if(!r){e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let t=e.context.triggerElements.size,i={};e.state.triggerCount!==t&&(i.triggerCount=t);let a=e.select(`activeTriggerId`),o=null;if(a){let t=e.context.triggerElements.getById(a);t?t!==e.state.activeTriggerElement&&(i.activeTriggerElement=t):o=a}if(!o&&!a&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;i.activeTriggerId=e,i.activeTriggerElement=n}}(i.triggerCount!==void 0||i.activeTriggerId!==void 0||i.activeTriggerElement!==void 0)&&e.update(i),o&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===o&&!e.context.triggerElements.getById(o)){let t=wo(`none`);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,e.useState(`triggerCount`),n])}function ld(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=Mo(e),o=t.useState(`preventUnmountingOnClose`),s=!e&&o;t.useSyncedValues({mounted:r,transitionStatus:a,preventUnmountingOnClose:s});let c=La(()=>{var e,r;i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n==null||n(),(e=(r=t.context).onOpenChangeComplete)==null||e.call(r,!1)});return Fo({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:a}}function ud(e,t){e.useSyncedValues(t),W(()=>()=>{e.update({activeTriggerProps:pi,inactiveTriggerProps:pi,popupProps:pi})},[e])}function dd(e,t){W(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),W(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var fd=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function pd(){return new Qu({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new fd,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function md(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:pd(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:pi,inactiveTriggerProps:pi,popupProps:pi}}function hd(e,t,n=!1){return new Qu({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}let gd=G(e=>{var t;return(t=e.triggerIdProp)==null?e.activeTriggerId:t}),_d=G(e=>{var t;return(t=e.openProp)==null?e.open:t}),vd=G(e=>{var t,n;return((t=(n=e.popupElement)==null?void 0:n.id)==null?e.floatingId:t)||void 0});function yd(e,t){return t!==void 0&&_d(e)&&gd(e)===t}function bd(e,t){return yd(e,t)?!0:t!==void 0&&_d(e)&&gd(e)==null&&e.triggerCount===1}let xd={open:_d,mounted:G(e=>e.mounted),transitionStatus:G(e=>e.transitionStatus),floatingRootContext:G(e=>e.floatingRootContext),triggerCount:G(e=>e.triggerCount),preventUnmountingOnClose:G(e=>e.preventUnmountingOnClose),payload:G(e=>e.payload),activeTriggerId:gd,activeTriggerElement:G(e=>e.mounted?e.activeTriggerElement:null),popupId:vd,isTriggerActive:G((e,t)=>t!==void 0&&gd(e)===t),isOpenedByTrigger:G((e,t)=>yd(e,t)),isMountedByTrigger:G((e,t)=>t!==void 0&&gd(e)===t&&e.mounted),triggerProps:G((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:G((e,t)=>bd(e,t)?vd(e):void 0),popupProps:G(e=>e.popupProps),popupElement:G(e=>e.popupElement),positionerElement:G(e=>e.positionerElement)};function Sd(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=bo(),a=nl()!=null,o=ei(()=>{var e,o;return new Qu({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:(e=r.reference)==null?null:e,floatingElement:(o=r.floating)==null?null:o,triggerElements:new fd,floatingId:i,syncOnly:!1,nested:a})}).current;return W(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=ma(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}V();function Cd(e={}){let{nodeId:t,externalTree:n}=e,r=Sd(e),i=e.rootContext||r,a=i.useState(`referenceElement`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.useState(`open`),l=i.useState(`floatingId`),[u,d]=Me(null),[f,p]=Me(void 0),[m,h]=Me(void 0),g=R(null),_=rl(n),v=z(()=>({reference:a,floating:o,domReference:s}),[a,o,s]),y=Su(U(U({},e),{},{elements:U(U({},v),u&&{reference:u})})),b=ma(f)?f:null,x=m===void 0?i.state.floatingElement:m;i.useSyncedValue(`referenceElement`,f==null?null:f),i.useSyncedValue(`domReferenceElement`,f===void 0?s:b),i.useSyncedValue(`floatingElement`,x);let S=Le(e=>{let t=ma(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),y.refs.setReference(t)},[y.refs]),C=Le(e=>{(ma(e)||e===null)&&(g.current=e,p(e)),(ma(y.refs.reference.current)||y.refs.reference.current===null||e!==null&&!ma(e))&&y.refs.setReference(e)},[y.refs,p]),w=Le(e=>{h(e),y.refs.setFloating(e)},[y.refs]),T=z(()=>U(U({},y.refs),{},{setReference:C,setFloating:w,setPositionReference:S,domReference:g}),[y.refs,C,w,S]),E=z(()=>U(U({},y.elements),{},{domReference:s}),[y.elements,s]),D=z(()=>U(U({},y),{},{dataRef:i.context.dataRef,open:c,onOpenChange:i.setOpen,events:i.context.events,floatingId:l,refs:T,elements:E,nodeId:t,rootStore:i}),[y,T,E,t,i,c,l]);return W(()=>{s&&(g.current=s)},[s]),W(()=>{i.context.dataRef.current.floatingContext=D;let e=_==null?void 0:_.nodesRef.current.find(e=>e.id===t);e&&(e.context=D)}),z(()=>U(U({},y),{},{context:D,refs:T,elements:E,rootStore:i}),[y,T,E,D,i])}V();let wd=no&&oo;function Td(e,t={}){let{enabled:n=!0,delay:r}=t,i=`rootStore`in e?e.rootStore:e,{events:a,dataRef:o}=i.context,s=R(!1),c=R(null),l=R(!0),u=Vo();Pe(()=>{let e=i.select(`domReferenceElement`);if(!n)return;let t=da(e);function r(){let e=i.select(`domReferenceElement`);!i.select(`open`)&&ha(e)&&e===Xo(gs(e))&&(s.current=!0)}function a(){l.current=!0}function o(){l.current=!1}return ps(fs(t,`blur`,r),wd&&fs(t,`keydown`,a,!0),wd&&fs(t,`pointerdown`,o,!0))},[i,n]),Pe(()=>{if(!n)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=i.select(`domReferenceElement`);ma(e)&&(c.current=e,s.current=!0)}}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,n,i]);let d=z(()=>{function e(){s.current=!1,c.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(s.current){if(c.current===n)return;e()}let a=Qo(t.nativeEvent);if(ma(a)){if(wd&&!t.relatedTarget){if(!l.current&&!ns(a))return}else if(!as(a))return}let o=$o(t.relatedTarget,i.context.triggerElements),{nativeEvent:d,currentTarget:f}=t,p=typeof r==`function`?r():r;if(i.select(`open`)&&o||p===0||p===void 0){i.setOpen(!0,wo(na,d,f));return}u.start(p,()=>{s.current||i.setOpen(!0,wo(na,d,f))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=ma(n)&&n.hasAttribute(Dc(`focus-guard`))&&n.getAttribute(`data-type`)===`outside`;u.start(0,()=>{var e;let t=i.select(`domReferenceElement`),s=Xo(gs(t));!n&&s===t||Zo((e=o.current.floatingContext)==null?void 0:e.refs.floating.current,s)||Zo(t,s)||a||$o(n==null?s:n,i.context.triggerElements)||i.setOpen(!1,wo(na,r))})}}},[o,r,i,u]);return z(()=>n?{reference:d,trigger:d}:{},[n,d])}var Ed=class e{constructor(){H(this,`dispose`,()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()}),H(this,`disposeEffect`,()=>this.dispose),this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Bo,this.restTimeout=new Bo,this.handleCloseOptions=void 0}static create(){return new e}};let Dd=new WeakMap;function Od(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;if(t&&Dd.get(t)===e){var n,r,i;(n=e.pointerEventsScopeElement)==null||n.style.removeProperty(`pointer-events`),(r=e.pointerEventsReferenceElement)==null||r.style.removeProperty(`pointer-events`),(i=e.pointerEventsFloatingElement)==null||i.style.removeProperty(`pointer-events`),Dd.delete(t)}e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function kd(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Dd.get(n);a&&a!==e&&Od(a),Od(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Dd.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Ad(e){let t=e.context.dataRef.current,n=ei(()=>{var e;return(e=t.hoverInteractionState)==null?Ed.create():e}).current;return t.hoverInteractionState||(t.hoverInteractionState=n),Oo(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}V();function jd(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=`rootStore`in e?e.rootStore:e,o=a.useState(`open`),s=a.useState(`floatingElement`),c=a.useState(`domReferenceElement`),{dataRef:l}=a.context,u=rl(),d=nl(),f=Ad(a),p=Vo(),m=La(()=>{var e;return us((e=l.current.openEvent)==null?void 0:e.type,f.interactedInside)}),h=La(()=>{var e;return ds((e=l.current.openEvent)==null?void 0:e.type)}),g=La(()=>{Od(f)});W(()=>{o||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[o,f,g]),Pe(()=>g,[g]),W(()=>{var e;if(n&&o&&(e=f.handleCloseOptions)!=null&&e.blockPointerEvents&&h()&&ma(c)&&s){var t,r,i,a,l,p,m;let e=c,n=s,o=gs(s),h=u==null||(t=u.nodesRef.current.find(e=>e.id===d))==null||(t=t.context)==null?void 0:t.elements.floating;h&&(h.style.pointerEvents=``);let _=f.pointerEventsScopeElement===n?null:f.pointerEventsScopeElement,v=h===n?null:h,y=(r=(i=(a=(l=(p=f.handleCloseOptions)==null||(m=p.getScope)==null?void 0:m.call(p))==null?_:l)==null?v:a)==null?e.closest(`[data-rootownerid]`):i)==null?o.body:r;return kd(f,{scopeElement:y,referenceElement:e,floatingElement:n}),()=>{g()}}},[n,o,c,s,f,h,u,d,g]),Pe(()=>{if(!n)return;function e(){return!!(u&&d&&Tc(u.nodesRef.current,d).length>0)}function t(e){let t=cs(r,`close`,f.pointerType),n=()=>{a.setOpen(!1,wo(ta,e)),u==null||u.events.emit(`floating.closed`,e)};t?f.openChangeTimeout.start(t,n):(f.openChangeTimeout.clear(),n())}function o(e){let t=Qo(e);if(!rs(t)){f.interactedInside=!1;return}f.interactedInside=(t==null?void 0:t.closest(`[aria-haspopup]`))!=null}function c(){f.openChangeTimeout.clear(),p.clear(),u==null||u.events.off(`floating.closed`,v),g()}function _(n){var r,o;if(e()&&u){u.events.on(`floating.closed`,v);return}if($o(n.relatedTarget,a.context.triggerElements))return;let s=(r=(o=l.current.floatingContext)==null?void 0:o.nodeId)==null?i:r,c=n.relatedTarget;if(!(u&&s&&ma(c)&&Tc(u.nodesRef.current,s,!1).some(e=>{var t;return Zo((t=e.context)==null?void 0:t.elements.floating,c)}))){if(f.handler){f.handler(n);return}g(),h()&&!m()&&t(n)}}function v(t){!u||!d||e()||p.start(0,()=>{u.events.off(`floating.closed`,v),a.setOpen(!1,wo(ta,t)),u.events.emit(`floating.closed`,t)})}let y=s;return ps(y&&fs(y,`mouseenter`,c),y&&fs(y,`mouseleave`,_),y&&fs(y,`pointerdown`,o,!0),()=>{u==null||u.events.off(`floating.closed`,v)})},[n,s,a,l,r,i,h,m,g,f,u,d,p])}V();let Md={current:null};function Nd(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=Md,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p}=t,m=`rootStore`in e?e.rootStore:e,{dataRef:h,events:g}=m.context,_=rl(l),v=Ad(m),y=R(!1),b=ms(i),x=ms(r),S=ms(o),C=ms(n),w=ms(p),T=ms(f),E=La(()=>{var e;return us((e=h.current.openEvent)==null?void 0:e.type,v.interactedInside)}),D=La(()=>{var e;return((e=w.current)==null?void 0:e.call(w))!==!1}),O=La((e,t,n)=>{let r=m.context.triggerElements;if(r.hasElement(t))return!e||!Zo(e,t);if(!ma(n))return!1;let i=n;return r.hasMatchingElement(e=>Zo(e,i))&&(!e||!Zo(e,i))}),k=La(()=>{v.handler&&(gs(m.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),v.handler=void 0)}),A=La(()=>{Od(v)});if(u){var j;v.handleCloseOptions=(j=b.current)==null?void 0:j.__options}return Pe(()=>k,[k]),Pe(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===ta,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),Pe(()=>{var e;if(!n)return;function t(e,t=!0){let n=cs(x.current,`close`,v.pointerType);n?v.openChangeTimeout.start(n,()=>{m.setOpen(!1,wo(ta,e)),_==null||_.events.emit(`floating.closed`,e)}):t&&(v.openChangeTimeout.clear(),m.setOpen(!1,wo(ta,e)),_==null||_.events.emit(`floating.closed`,e))}let r=(e=c.current)==null?u?m.select(`domReferenceElement`):null:e;if(!ma(r))return;function i(e){var t,n,r;if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!Ko(v.pointerType))return;let i=ls(S.current),o=cs(x.current,`open`,v.pointerType),s=Qo(e),c=(t=e.currentTarget)==null?null:t,l=m.select(`domReferenceElement`),u=c;if(ma(s)&&!m.context.triggerElements.hasElement(s)){for(let e of m.context.triggerElements.elements())if(Zo(e,s)){u=e;break}}ma(c)&&ma(l)&&!m.context.triggerElements.hasElement(c)&&Zo(c,l)&&(u=l);let d=u!=null&&O(l,u,s),f=m.select(`open`),p=(n=(r=T.current)==null?void 0:r.call(T))==null?m.select(`transitionStatus`)===`ending`:n,h=!f&&p&&y.current,g=!d&&ma(u)&&ma(l)&&Zo(l,u)&&h,_=i>0&&!o,b=d&&(f||h)||g,C=!f||d;if(b){D()&&m.setOpen(!0,wo(ta,e,u));return}_||(o?v.openChangeTimeout.start(o,()=>{C&&D()&&m.setOpen(!0,wo(ta,e,u))}):C&&D()&&m.setOpen(!0,wo(ta,e,u)))}function o(e){var n;if(E()){A();return}k();let r=gs(m.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=(n=h.current.floatingContext)==null?d==null?void 0:d():n;if(!$o(e.relatedTarget,m.context.triggerElements)){if(b.current&&i){m.select(`open`)||v.openChangeTimeout.clear();let n=c.current;v.handler=b.current(U(U({},i),{},{tree:_,x:e.clientX,y:e.clientY,onClose(){A(),k(),C.current&&!E()&&n===m.select(`domReferenceElement`)&&t(e,!0)}})),r.addEventListener(`mousemove`,v.handler),v.handler(e);return}(v.pointerType!==`touch`||!Zo(m.select(`floatingElement`),e.relatedTarget))&&t(e)}}return s?ps(fs(r,`mousemove`,i,{once:!0}),fs(r,`mouseenter`,i),fs(r,`mouseleave`,o)):ps(fs(r,`mouseenter`,i),fs(r,`mouseleave`,o))},[k,A,h,x,m,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D]),z(()=>{if(!n)return;function e(e){v.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){var t;let{nativeEvent:n}=e,r=e.currentTarget,i=m.select(`domReferenceElement`),o=m.select(`open`),s=O(i,r,e.target);if(a&&!Ko(v.pointerType))return;if(o&&s&&(t=v.handleCloseOptions)!=null&&t.blockPointerEvents){let e=m.select(`floatingElement`);if(e){var c,l,u;let t=(c=(l=v.handleCloseOptions)==null||(u=l.getScope)==null?void 0:u.call(l))==null?r.ownerDocument.body:c;kd(v,{scopeElement:t,referenceElement:r,floatingElement:e})}}let d=ls(S.current);if(o&&!s||d===0||!s&&v.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;v.restTimeout.clear();function f(){if(v.restTimeoutPending=!1,E())return;let e=m.select(`open`);!v.blockMouseMove&&(!e||s)&&D()&&m.setOpen(!0,wo(ta,n,r))}v.pointerType===`touch`?cn(()=>{f()}):s&&o?f():(v.restTimeoutPending=!0,v.restTimeout.start(d,f))}}},[n,v,E,O,a,m,S,D])}V();function Pd(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Fd(e,t){return Pd(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function Id(e,t,n){return Pd(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Ld(e,t,n){return Pd(t,n?e===Jo:e===Yo,e===`ArrowDown`)}function Rd(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:Pd(t,n?e===Yo:e===Jo,e===`ArrowUp`)}function zd(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,parentOrientation:_,id:v,resetOnPointerLeave:y=!0,externalTree:b,grid:x}=t,S=x!=null,C=`rootStore`in e?e.rootStore:e,w=C.useState(`open`),T=C.useState(`floatingElement`),E=C.useState(`domReferenceElement`),D=C.context.dataRef,O=os(T),k=is(E),A=ms(O),j=nl(),M=rl(b),N=R(f),P=R(o==null?-1:o),ee=R(null),te=R(!0),F=La(e=>{i(P.current===-1?null:P.current,e)}),ne=R(!!T),re=R(w),ie=R(!1),ae=R(!1),oe=R(null),se=ms(h),ce=ms(w),I=ms(o),le=ms(y),ue=jo(),de=jo(),fe=La(()=>{function e(e){d?M==null||M.events.emit(`virtualfocus`,e):oe.current=kc(e,{sync:ie.current,preventScroll:!0})}let t=n.current[P.current],r=ae.current;t&&e(t),(ie.current?e=>e():e=>ue.request(e))(()=>{let i=n.current[P.current]||t;if(i&&(t||e(i),_e&&(r||!te.current))){var a;(a=i.scrollIntoView)==null||a.call(i,{block:`nearest`,inline:`nearest`})}})});W(()=>{D.current.orientation=g},[D,g]),W(()=>{a&&(w&&T?(P.current=o==null?-1:o,N.current&&o!=null&&(ae.current=!0,F())):ne.current&&(P.current=-1,F()))},[a,w,T,o,F]),W(()=>{if(a){if(!w){ie.current=!1;return}if(T)if(r==null){if(ie.current=!1,I.current!=null)return;if(ne.current&&(P.current=-1,fe()),(!re.current||!ne.current)&&N.current&&(ee.current!=null||N.current===!0&&ee.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>de.request(e):queueMicrotask)(t),e+=1):(P.current=ee.current==null||Id(ee.current,g,u)||l?Ys(n):Xs(n),ee.current=null,F())};t()}}else Js(n.current,r)||(P.current=r,fe(),ae.current=!1)}},[a,w,T,r,I,l,n,g,u,F,fe,de]),W(()=>{var e,t;if(!a||T||!M||d||!ne.current)return;let n=M.nodesRef.current,r=(e=n.find(e=>e.id===j))==null||(e=e.context)==null?void 0:e.elements.floating,i=Xo(gs((t=E==null?r:E)==null?null:t)),o=n.some(e=>e.context&&Zo(e.context.elements.floating,i));r&&!o&&te.current&&r.focus({preventScroll:!0})},[a,T,E,M,j,d]),W(()=>{re.current=w,ne.current=!!T}),W(()=>{w||(ee.current=null,N.current=f)},[w,f]);let pe=r!=null,me=La(e=>{if(!ce.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(P.current!==t||r!==t)&&(P.current=t,F(e))}),L=La(()=>{var e;return _==null?M==null||(e=M.nodesRef.current.find(e=>e.id===j))==null||(e=e.context)==null||(e=e.dataRef)==null?void 0:e.current.orientation:_}),he=La(()=>Ys(n,se.current)),ge=La(e=>{if(te.current=!1,ie.current=!0,e.which===229||!ce.current&&e.currentTarget===A.current)return;if(l&&Rd(e.key,g,u,S)){Fd(e.key,L())||Ho(e),C.setOpen(!1,wo(aa,e.nativeEvent)),ha(E)&&(d?M==null||M.events.emit(`virtualfocus`,E):E.focus());return}let t=P.current,r=Ys(n,h),i=Xs(n,h);if(k||(e.key===`Home`&&(Ho(e),P.current=r,F(e)),e.key===`End`&&(Ho(e),P.current=i,F(e))),x!=null){let t=x(e,P.current,n,g,c,u,h,r,i);if(t!=null&&(P.current=t,F(e)),g===`both`)return}if(Fd(e.key,g)){if(Ho(e),w&&!d&&Xo(e.currentTarget.ownerDocument)===e.currentTarget){P.current=Id(e.key,g,u)?r:i,F(e);return}Id(e.key,g,u)?c?t>=i?s&&t!==n.current.length?P.current=-1:(ie.current=!1,P.current=r):P.current=Zs(n.current,{startingIndex:t,disabledIndices:h}):P.current=Math.min(i,Zs(n.current,{startingIndex:t,disabledIndices:h})):c?t<=r?s&&t!==-1?P.current=n.current.length:(ie.current=!1,P.current=i):P.current=Zs(n.current,{startingIndex:t,decrement:!0,disabledIndices:h}):P.current=Math.max(r,Zs(n.current,{startingIndex:t,decrement:!0,disabledIndices:h})),Js(n.current,P.current)&&(P.current=-1),F(e)}}),_e=z(()=>({onFocus(e){ie.current=!0,me(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){ie.current=!0,ae.current=!1,p&&me(e)},onPointerLeave(e){var t;if(!ce.current||!te.current||e.pointerType===`touch`)return;ie.current=!0;let r=e.relatedTarget;if(!(!p||n.current.includes(r))&&le.current&&((t=oe.current)==null||t.call(oe),oe.current=null,P.current=-1,F(e),!d)){let e=A.current,t=Xo(gs(e));e&&Zo(e,t)&&e.focus({preventScroll:!0})}}}),[me,ce,A,p,n,F,le,d]),ve=z(()=>d&&w&&pe&&{"aria-activedescendant":`${v}-${r}`},[d,w,pe,v,r]),ye=z(()=>U(U({"aria-orientation":g===`both`?void 0:g},k?{}:ve),{},{onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&w&&!d){let t=Qo(e.nativeEvent);if(t&&!Zo(A.current,t))return;Ho(e),C.setOpen(!1,wo(ia,e.nativeEvent)),ha(E)&&E.focus();return}ge(e)},onPointerMove(){te.current=!0}}),[ve,ge,A,g,k,C,w,d,E]),be=z(()=>{function e(e){C.setOpen(!0,wo(aa,e.nativeEvent,e.currentTarget))}function t(e){f===`auto`&&Wo(e.nativeEvent)&&(N.current=!d)}function n(e){N.current=f,f===`auto`&&Go(e.nativeEvent)&&(N.current=!0)}return{onKeyDown(t){let n=C.select(`open`);te.current=!1;let r=t.key.startsWith(`Arrow`),i=Ld(t.key,L(),u),a=Fd(t.key,g),o=(l?i:a)||t.key===`Enter`||t.key.trim()===``;if(d&&n)return ge(t);if(!(!n&&!m&&r)){if(o){let e=Fd(t.key,L());ee.current=l&&e?null:t.key}if(l){i&&(Ho(t),n?(P.current=he(),F(t)):e(t));return}a&&(I.current!=null&&(P.current=I.current),Ho(t),!n&&m?e(t):ge(t),n&&F(t))}},onFocus(e){C.select(`open`)&&!d&&(P.current=-1,F(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[ge,f,he,l,F,C,m,g,L,u,I,d]),xe=z(()=>U(U({},ve),be),[ve,be]);return z(()=>a?{reference:xe,floating:ye,item:_e,trigger:be}:{},[a,xe,ye,be,_e])}V();function Bd(e,t){var n;let{listRef:r,elementsRef:i,activeIndex:a,onMatch:o,disabledIndices:s,onTyping:c,enabled:l=!0,resetMs:u=750,selectedIndex:d=null}=t,f=`rootStore`in e?e.rootStore:e,p=f.useState(`open`),m=Vo(),h=R(``),g=R((n=d==null?a:d)==null?-1:n),_=R(null),v=La(e=>{var t;function n(e){let t=i==null?void 0:i.current[e];return!t||ec(t)}function l(e){return n(e)?s==null||!Qs(fi,e,s):!1}function f(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length,a=e[n];if(!(!(a!=null&&a.toLowerCase().startsWith(i))||!l(n)))return n}return-1}let v=r.current;if(h.current.length>0&&e.key===` `&&(Ho(e),c==null||c(!0)),h.current.length>0&&h.current[0]!==` `&&f(v,h.current)===-1&&e.key!==` `&&(c==null||c(!1)),v==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;p&&e.key!==` `&&(Ho(e),c==null||c(!0));let y=h.current===``;if(y){var b;g.current=(b=d==null?a:d)==null?-1:b}v.every((e,t)=>{var n,r;return e&&l(t)?((n=e[0])==null?void 0:n.toLowerCase())!==((r=e[1])==null?void 0:r.toLowerCase()):!0})&&h.current===e.key&&(h.current=``,g.current=_.current),h.current+=e.key,m.start(u,()=>{h.current=``,g.current=_.current,c==null||c(!1)});let x=y?(t=d==null?a:d)==null?-1:t:g.current,S=(x==null?0:x)+1,C=f(v,h.current,S);C===-1?e.key!==` `&&(h.current=``,c==null||c(!1)):(o==null||o(C),_.current=C)}),y=La(e=>{let t=e.relatedTarget,n=f.select(`domReferenceElement`),r=f.select(`floatingElement`);Zo(n,t)||Zo(r,t)||(m.clear(),h.current=``,g.current=_.current,c==null||c(!1))});W(()=>{!p&&d!==null||(m.clear(),_.current=null,h.current!==``&&(h.current=``))},[p,d,m]),W(()=>{if(p&&h.current===``){var e;g.current=(e=d==null?a:d)==null?-1:e}},[p,d,a]);let b=z(()=>({onKeyDown:v,onBlur:y}),[v,y]);return z(()=>l?{reference:b,floating:b}:{},[l,b])}let Vd=.5;function Hd(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Ud(e,t,n,r,i,a,o,s,c,l){let u=!1;return Hd(e,t,n,r,i,a)&&(u=!u),Hd(e,t,i,a,o,s)&&(u=!u),Hd(e,t,o,s,c,l)&&(u=!u),Hd(e,t,c,l,n,r)&&(u=!u),u}function Wd(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Gd(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Kd(e={}){let{blockPointerEvents:t=!1}=e,n=new Bo,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r==null?void 0:r.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*.010000000000000002;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=Qo(r),g=r.type===`mouseleave`,_=Zo(u,h),v=Zo(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&ma(r.relatedTarget)&&Zo(u,r.relatedTarget))return;function y(){return!!(s&&Tc(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=Gd(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Gd(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Gd(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Gd(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!Wd(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Vd/2:Vd*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Vd+1,o=C||T?S.bottom-Vd:S.top,s=C?T?S.bottom-Vd:S.top:S.bottom-Vd;M=Ud(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Vd/2:Vd*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Vd,o=C||T?S.top+Vd:S.bottom,s=C?T?S.top+Vd:S.bottom:S.top+Vd;M=Ud(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Vd/2:Vd*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Vd+1,o=w||E?S.right-Vd:S.left,s=w?E?S.right-Vd:S.left:S.right-Vd;M=Ud(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Vd/2:Vd*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Vd,o=w||E?S.left+Vd:S.right,s=w?E?S.left+Vd:S.right:S.left+Vd;M=Ud(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options=U(U({},e),{},{blockPointerEvents:t}),r}V();let qd=me(void 0);function Jd(e){let t=Re(qd);if(t===void 0&&!e)throw Error(Jr(69));return t}let Yd=new Set([`ArrowLeft`,`ArrowRight`]),Xd=new Set([`ArrowUp`,`ArrowDown`]),Zd=new Set([...Yd,...Xd]),Qd=new Set([...Zd,`Home`,`End`]);function $d(e){return e===`starting`?Hc:pi}V();let ef=[`render`,`className`,`style`,`finalFocus`],tf=U(U({},Zi),Vi),nf=yt(function(e,t){let{render:n,className:r,style:i,finalFocus:a}=e,o=vr(e,ef),{store:s}=Qr(),{side:c,align:l}=Xr(),u=Jd(!0)!=null,d=s.useState(`open`),f=s.useState(`transitionStatus`),p=s.useState(`popupProps`),m=s.useState(`mounted`),h=s.useState(`instantType`),g=s.useState(`activeTriggerElement`),_=s.useState(`parent`),v=s.useState(`lastOpenChangeReason`),y=s.useState(`rootId`),b=s.useState(`floatingRootContext`),x=s.useState(`floatingTreeRoot`),S=s.useState(`closeDelay`),C=s.useState(`activeTriggerElement`),w=s.useState(`hoverEnabled`),T=s.useState(`disabled`),E=s.useState(`openMethod`),D=_.type===`context-menu`;Fo({open:d,ref:s.context.popupRef,onComplete(){if(d){var e,t;(e=(t=s.context).onOpenChangeComplete)==null||e.call(t,!0)}}}),Pe(()=>{function e(e){s.setOpen(!1,wo(e.reason,e.domEvent))}return x.events.on(`close`,e),()=>{x.events.off(`close`,e)}},[x.events,s]),jd(b,{enabled:w&&!T&&!D&&_.type!==`menubar`,closeDelay:S});let O=Le(e=>{s.set(`popupElement`,e)},[s]),k=Mi(`div`,e,{state:{transitionStatus:f,side:c,align:l,open:d,nested:_.type===`menu`,instant:h},ref:[t,s.context.popupRef,O],stateAttributesMapping:tf,props:[p,{onKeyDown(e){u&&Qd.has(e.key)&&e.stopPropagation()}},$d(f),o,{"data-rootownerid":y}]}),A=_.type===void 0||D;return(g||_.type===`menubar`&&v!==`outside-press`)&&(A=!0),Eo(ml,{context:b,openInteractionType:E,modal:D,disabled:!m,returnFocus:a===void 0?A:a,initialFocus:_.type!==`menu`,restoreFocus:!0,externalTree:_.type===`menubar`?void 0:x,previousFocusableElement:C,nextFocusableElement:_.type===void 0?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:_.type===void 0?s.context.beforeContentFocusGuardRef:void 0,children:k})});V();let rf=me(void 0);function af(){let e=Re(rf);if(e===void 0)throw Error(Jr(32));return e}V();let of=[`keepMounted`],sf=yt(function(e,t){let{keepMounted:n=!1}=e,r=vr(e,of),{store:i}=Qr();return i.useState(`mounted`)||n?Eo(rf.Provider,{value:n,children:Eo(Zc,U({ref:t},r))}):null});function cf(e){return ci(19)?e:e?`true`:void 0}V();let lf=me(void 0);function uf(){var e;let t=Re(lf);return(e=t==null?void 0:t.direction)==null?`ltr`:e}let df=e=>({name:`arrow`,options:e,async fn(t){var n,r;let{x:i,y:a,placement:o,rects:s,platform:c,elements:l,middlewareData:u}=t,{element:d,padding:f=0,offsetParent:p=`real`}=Os(e,t)||{};if(d==null)return{};let m=Ks(f),h={x:i,y:a},g=Ps(o),_=Ms(g),v=await c.getDimensions(d),y=g===`y`,b=y?`top`:`left`,x=y?`bottom`:`right`,S=y?`clientHeight`:`clientWidth`,C=s.reference[_]+s.reference[g]-h[g]-s.floating[_],w=h[g]-s.reference[g],T=p===`real`?await((n=c.getOffsetParent)==null?void 0:n.call(c,d)):l.floating,E=l.floating[S]||s.floating[_];(!E||!await((r=c.isElement)==null?void 0:r.call(c,T)))&&(E=l.floating[S]||s.floating[_]);let D=C/2-w/2,O=E/2-v[_]/2-1,k=Math.min(m[b],O),A=Math.min(m[x],O),j=k,M=E-v[_]-A,N=E/2-v[_]/2+D,P=Ds(j,N,M),ee=!u.arrow&&As(o)!=null&&N!==P&&s.reference[_]/2-(N<j?k:A)-v[_]/2<0,te=ee?N<j?N-j:N-M:0;return{[g]:h[g]+te,data:U({[g]:P,centerOffset:N-P-te},ee&&{alignmentOffset:te}),reset:ee}}}),ff=(e,t)=>U(U({},df(e)),{},{options:[e,t]}),pf=Ou().fn,mf={name:`hide`,async fn(e){var t;let{width:n,height:r,x:i,y:a}=e.rects.reference,o=n===0&&r===0&&i===0&&a===0;return{data:{referenceHidden:((t=(await pf(e)).data)==null?void 0:t.referenceHidden)||o}}}},hf={sideX:`left`,sideY:`top`},gf={name:`adaptiveOrigin`,async fn(e){var t,n;let{x:r,y:i,rects:{floating:a},elements:{floating:o},platform:s,strategy:c,placement:l}=e,u=da(o),d=u.getComputedStyle(o);if(!(d.transitionDuration!==`0s`&&d.transitionDuration!==``))return{x:r,y:i,data:hf};let f=await((t=s.getOffsetParent)==null?void 0:t.call(s,o)),p={width:0,height:0};if(c===`fixed`&&u!=null&&u.visualViewport)p={width:u.visualViewport.width,height:u.visualViewport.height};else if(f===u){let e=gs(o);p={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await((n=s.isElement)==null?void 0:n.call(s,f))&&(p=await s.getDimensions(f));let m=ks(l),h=r,g=i;m===`left`&&(h=p.width-(r+a.width)),m===`top`&&(g=p.height-(i+a.height));let _=m===`left`?`right`:hf.sideX,v=m===`top`?`bottom`:hf.sideY;return{x:h,y:g,data:{sideX:_,sideY:v}}}};V();function _f(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function vf(e,t,n){let{rects:r,placement:i}=e;return{side:_f(t,ks(i),n),align:As(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function yf(e){var t,n;let{anchor:r,positionMethod:i=`absolute`,side:a=`bottom`,sideOffset:o=0,align:s=`center`,alignOffset:c=0,collisionBoundary:l,collisionPadding:u=5,sticky:d=!1,arrowPadding:f=5,disableAnchorTracking:p=!1,inline:m,keepMounted:h=!1,floatingRootContext:g,mounted:_,collisionAvoidance:v,shiftCrossAxis:y=!1,nodeId:b,adaptiveOrigin:x,lazyFlip:S=!1,externalTree:C}=e,[w,T]=Me(null);!_&&w!==null&&T(null);let E=v.side||`flip`,D=v.align||`flip`,O=v.fallbackAxisSide||`end`,k=typeof r==`function`?r:void 0,A=La(k),j=k?A:r,M=ms(r),N=ms(_),P=uf()===`rtl`,ee=w||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":P?`left`:`right`,"inline-start":P?`right`:`left`}[a],te=s===`center`?ee:`${ee}-${s}`,F=u,ne=+(a===`bottom`),re=+(a===`top`),ie=+(a===`right`),ae=+(a===`left`);typeof F==`number`?F={top:F+ne,right:F+ae,bottom:F+re,left:F+ie}:F&&(F={top:(F.top||0)+ne,right:(F.right||0)+ae,bottom:(F.bottom||0)+re,left:(F.left||0)+ie});let oe={boundary:l===`clipping-ancestors`?`clippingAncestors`:l,padding:F},se=R(null),ce=ms(o),I=ms(c),le=typeof o==`function`?0:o,ue=typeof c==`function`?0:c,de=[];m&&de.push(m),de.push(Cu(e=>{let t=vf(e,a,P),n=typeof ce.current==`function`?ce.current(t):ce.current,r=typeof I.current==`function`?I.current(t):I.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[le,ue,P,a]));let fe=D===`none`&&E!==`shift`,pe=!fe&&(d||y||E===`shift`),me=E===`none`?null:Eu(U(U({},oe),{},{padding:{top:F.top+1,right:F.right+1,bottom:F.bottom+1,left:F.left+1},mainAxis:!y&&E===`flip`,crossAxis:D===`flip`&&`alignment`,fallbackAxisSideDirection:O})),L=fe?null:wu(e=>{let t=gs(e.elements.floating).documentElement;return U(U({},oe),{},{rootBoundary:y?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:D!==`none`,crossAxis:pe,limiter:d||y?void 0:Tu(e=>{if(!se.current)return{};let{width:t,height:n}=se.current.getBoundingClientRect(),r=Ns(ks(e.placement)),i=r===`y`?t:n,a=r===`y`?F.left+F.right:F.top+F.bottom;return{offset:i/2+a/2}})})},[oe,d,y,F,D]);E===`shift`||D===`shift`||s===`center`?de.push(L,me):de.push(me,L),de.push(Du(U(U({},oe),{},{apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!N.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=da(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}})),ff(e=>({element:se.current||gs(e.elements.floating).createElement(`div`),padding:f,offsetParent:`floating`}),[f]),{name:`transformOrigin`,fn(e){var t,n,r;let{elements:i,middlewareData:s,placement:c,rects:l,y:u}=e,d=ks(c),f=Ns(d),p=se.current,m=((t=s.arrow)==null?void 0:t.x)||0,h=((n=s.arrow)==null?void 0:n.y)||0,g=(p==null?void 0:p.clientWidth)||0,_=(p==null?void 0:p.clientHeight)||0,v=m+g/2,y=h+_/2,b=Math.abs(((r=s.shift)==null?void 0:r.y)||0),x=l.reference.height/2,S=typeof o==`function`?o(vf(e,a,P)):o,C=b>S,w={top:`${v}px calc(100% + ${S}px)`,bottom:`${v}px ${-S}px`,left:`calc(100% + ${S}px) ${y}px`,right:`${-S}px ${y}px`}[d],T=`${v}px ${l.reference.y+x-u}px`;return i.floating.style.setProperty(`--transform-origin`,pe&&f===`y`&&C?T:w),{}}},mf,x),W(()=>{!_&&g&&g.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[_,g]);let he=z(()=>({elementResize:!p&&typeof ResizeObserver<`u`,layoutShift:!p&&typeof IntersectionObserver<`u`}),[p]),{refs:ge,elements:_e,x:ve,y:ye,middlewareData:be,update:xe,placement:Se,context:Ce,isPositioned:we,floatingStyles:Te}=Cd({rootContext:g,open:h?_:void 0,placement:te,middleware:de,strategy:i,whileElementsMounted:h?void 0:(...e)=>lu(...e,he),nodeId:b,externalTree:C}),{sideX:Ee,sideY:De}=be.adaptiveOrigin||hf,Oe=we?i:`fixed`,ke=z(()=>{let e=x?{position:Oe,[Ee]:ve,[De]:ye}:U({position:Oe},Te);return we||(e.opacity=0),e},[x,Oe,Ee,ve,De,ye,Te,we]),Ae=R(null);W(()=>{if(!_)return;let e=M.current,t=typeof e==`function`?e():e,n=(bf(t)?t.current:t)||null;n!==Ae.current&&(ge.setPositionReference(n),Ae.current=n)},[_,ge,j,M]),Pe(()=>{if(!_)return;let e=M.current;typeof e!=`function`&&bf(e)&&e.current!==Ae.current&&(ge.setPositionReference(e.current),Ae.current=e.current)},[_,ge,j,M]),Pe(()=>{if(h&&_&&_e.reference&&_e.floating)return lu(_e.reference,_e.floating,xe,he)},[h,_,_e,xe,he]);let je=ks(Se),Ne=_f(a,je,P),Fe=As(Se)||`center`,Ie=!!((t=be.hide)!=null&&t.referenceHidden);W(()=>{S&&_&&we&&T(je)},[S,_,we,je]);let Le=z(()=>{var e,t;return{position:`absolute`,top:(e=be.arrow)==null?void 0:e.y,left:(t=be.arrow)==null?void 0:t.x}},[be.arrow]),Re=((n=be.arrow)==null?void 0:n.centerOffset)!==0;return z(()=>({positionerStyles:ke,arrowStyles:Le,arrowRef:se,arrowUncentered:Re,side:Ne,align:Fe,physicalSide:je,anchorHidden:Ie,refs:ge,context:Ce,isPositioned:we,update:xe}),[ke,Le,se,Re,Ne,Fe,je,Ie,ge,Ce,we,xe])}function bf(e){return e!=null&&`current`in e}V();function xf(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=La(i),o=R(0),s=ei(Cf).current,c=ei(Sf).current,[l,u]=Me(0),d=R(l),f=La((e,t)=>{c.set(e,t==null?null:t),d.current+=1,u(d.current)}),p=La(e=>{c.delete(e),d.current+=1,u(d.current)}),m=z(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(wf).forEach((t,n)=>{var r;let i=(r=c.get(t))==null?{}:r;e.set(t,U(U({},i),{},{index:n}))}),e},[c,l]);W(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),W(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),W(()=>()=>{n.current=[]},[n]),W(()=>()=>{r&&(r.current=[])},[r]);let h=La(e=>(s.add(e),()=>{s.delete(e)}));W(()=>{s.forEach(e=>e(m))},[s,m]);let g=z(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return Eo(po.Provider,{value:g,children:t})}function Sf(){return new Map}function Cf(){return new Set}function wf(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}V();let Tf=[`cutout`],Ef=yt(function(e,t){let{cutout:n}=e,r=vr(e,Tf),i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return Eo(`div`,U(U({ref:t,role:`presentation`,"data-base-ui-inert":``},r),{},{style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}}))});function Df(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c=U({},n);return s&&(c.pointerEvents=`none`),Mi(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},$d(r),i],stateAttributesMapping:Zi})}let Of={},kf={},Af=``;function jf(e){if(typeof document>`u`)return!1;let t=gs(e);return da(t).innerWidth-t.documentElement.clientWidth>0}function Mf(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=gs(e),n=t.documentElement,r=t.body,i=_a(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Nf(e){let t=gs(e),n=t.documentElement,r=t.body,i=_a(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Pf(e){var t,n;let r=gs(e),i=r.documentElement,a=r.body,o=da(i),s=0,c=0,l=!1,u=Ao.create();if(oo&&((t=(n=o.visualViewport)==null?void 0:n.scale)==null?1:t)!==1)return()=>{};function d(){let t=o.getComputedStyle(i),n=o.getComputedStyle(a),r=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;s=i.scrollTop,c=i.scrollLeft,Of={scrollbarGutter:i.style.scrollbarGutter,overflowY:i.style.overflowY,overflowX:i.style.overflowX},Af=i.style.scrollBehavior,kf={position:a.style.position,height:a.style.height,width:a.style.width,boxSizing:a.style.boxSizing,overflowY:a.style.overflowY,overflowX:a.style.overflowX,scrollBehavior:a.style.scrollBehavior};let u=i.scrollHeight>i.clientHeight,d=i.scrollWidth>i.clientWidth,f=t.overflowY===`scroll`||n.overflowY===`scroll`,p=t.overflowX===`scroll`||n.overflowX===`scroll`,m=Math.max(0,o.innerWidth-a.clientWidth),h=Math.max(0,o.innerHeight-a.clientHeight),g=parseFloat(n.marginTop)+parseFloat(n.marginBottom),_=parseFloat(n.marginLeft)+parseFloat(n.marginRight),v=_a(i)?i:a;if(l=Mf(e),l){i.style.scrollbarGutter=r,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(i.style,{scrollbarGutter:r,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(i.style.overflowY=`scroll`),(d||p)&&(i.style.overflowX=`scroll`),Object.assign(a.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),a.scrollTop=s,a.scrollLeft=c,i.setAttribute(`data-base-ui-scroll-locked`,``),i.style.scrollBehavior=`unset`}function f(){Object.assign(i.style,Of),Object.assign(a.style,kf),l||(i.scrollTop=s,i.scrollLeft=c,i.removeAttribute(`data-base-ui-scroll-locked`),i.style.scrollBehavior=Af)}function p(){f(),u.request(d)}d();let m=fs(o,`resize`,p);return()=>{u.cancel(),f(),typeof o.removeEventListener==`function`&&m()}}let Ff=new class{constructor(){H(this,`lockCount`,0),H(this,`restore`,null),H(this,`timeoutLock`,Bo.create()),H(this,`timeoutUnlock`,Bo.create()),H(this,`release`,()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)}),H(this,`unlock`,()=>{if(this.lockCount===0&&this.restore){var e;(e=this.restore)==null||e.call(this),this.restore=null}})}acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}lock(e){if(this.lockCount===0||this.restore!==null)return;let t=gs(e).documentElement,n=da(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=di;return}let r=$a||!jf(e);this.restore=r?Nf(e):Pf(e)}};function If(e=!0,t=null){W(()=>{if(e)return Ff.acquire(t)},[e,t])}V();function Lf(e,t,n,r){let[i,a]=Me(!1);W(()=>{if(!e||!t||n==null){a(!1);return}let r=gs(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-20)},[e,t,n]),If(e&&(!t||i),r)}V();let Rf=[`anchor`,`positionMethod`,`className`,`render`,`side`,`align`,`sideOffset`,`alignOffset`,`collisionBoundary`,`collisionPadding`,`arrowPadding`,`sticky`,`disableAnchorTracking`,`collisionAvoidance`,`style`],zf=yt(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Uc,style:g}=e,_=vr(e,Rf),{store:v}=Qr(),y=af(),b=$i(!0),x=v.useState(`parent`),S=v.useState(`floatingRootContext`),C=v.useState(`floatingTreeRoot`),w=v.useState(`mounted`),T=v.useState(`open`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`activeTriggerElement`),k=v.useState(`transitionStatus`),A=v.useState(`positionerElement`),j=v.useState(`instantType`),M=v.useState(`hasViewport`),N=v.useState(`lastOpenChangeReason`),P=v.useState(`floatingNodeId`),ee=v.useState(`floatingParentNodeId`),te=S.useState(`domReferenceElement`),F=R(null),ne=Po(A,!1,!1),re=n,ie=c,ae=l,oe=s,se=h;if(x.type===`context-menu`){var ce,I;if(re=n==null?(ce=x.context)==null?void 0:ce.anchor:n,oe=(I=oe)==null?`start`:I,!o&&oe!==`center`){var le,ue;ae=(le=e.alignOffset)==null?2:le,ie=(ue=e.sideOffset)==null?-5:ue}}let de=o,fe=oe;if(x.type===`menu`){var pe,me,L;de=(pe=de)==null?`inline-end`:pe,fe=(me=fe)==null?`start`:me,se=(L=e.collisionAvoidance)==null?Wc:L}else if(x.type===`menubar`){var he,ge;de=(he=de)==null?x.context.orientation===`vertical`?`inline-end`:`bottom`:he,fe=(ge=fe)==null?`start`:ge}let _e=x.type===`context-menu`,ve=yf({anchor:re,floatingRootContext:S,positionMethod:b?`fixed`:r,mounted:w,side:de,sideOffset:ie,align:fe,alignOffset:ae,arrowPadding:_e?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:P,keepMounted:y,disableAnchorTracking:m,collisionAvoidance:se,shiftCrossAxis:_e&&!(`side`in se&&se.side===`flip`),externalTree:C,adaptiveOrigin:M?gf:void 0});Pe(()=>{function e(e){e.open&&(e.parentNodeId===P&&v.set(`hoverEnabled`,!1),e.nodeId!==P&&e.parentNodeId===v.select(`floatingParentNodeId`)&&v.setOpen(!1,wo(oa)))}return C.events.on(`menuopenchange`,e),()=>{C.events.off(`menuopenchange`,e)}},[v,C.events,P]),Pe(()=>{if(v.select(`floatingParentNodeId`)==null)return;function e(e){var t;if(e.open||e.nodeId!==v.select(`floatingParentNodeId`))return;let n=(t=e.reason)==null?oa:t;v.setOpen(!1,wo(n))}return C.events.on(`menuopenchange`,e),()=>{C.events.off(`menuopenchange`,e)}},[C.events,v]);let ye=Vo();Pe(()=>{T||ye.clear()},[T,ye]),Pe(()=>{function e(e){if(!(!T||e.nodeId!==v.select(`floatingParentNodeId`)))if(e.target&&O&&O!==e.target){let e=v.select(`closeDelay`);e>0?ye.isStarted()||ye.start(e,()=>{v.setOpen(!1,wo(oa))}):v.setOpen(!1,wo(oa))}else ye.clear()}return C.events.on(`itemhover`,e),()=>{C.events.off(`itemhover`,e)}},[C.events,T,O,v,ye]),Pe(()=>{let e={open:T,nodeId:P,parentNodeId:ee,reason:v.select(`lastOpenChangeReason`)};C.events.emit(`menuopenchange`,e)},[C.events,T,v,P,ee]),W(()=>{let e=te,t=F.current;if(e&&(F.current=e),t&&e&&e!==t){v.set(`instantType`,void 0);let e=new AbortController;return ne(()=>{v.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[te,ne,v]);let be={open:T,side:ve.side,align:ve.align,anchorHidden:ve.anchorHidden,nested:x.type===`menu`,instant:j},xe=x.type===`menubar`&&x.context.modal;Lf(T&&(xe||E&&N!==`trigger-hover`),D===`touch`,A,O);let Se=Df(e,be,{styles:ve.positionerStyles,transitionStatus:k,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!w,inert:!T}),Ce=w&&x.type!==`menu`&&(x.type!==`menubar`&&E&&N!==`trigger-hover`||x.type===`menubar`&&x.context.modal),we=null;return x.type===`menubar`?we=x.context.contentElement:x.type===void 0&&(we=O),Eo(Yr.Provider,{value:ve,children:[Ce&&Eo(Ef,{ref:x.type===`context-menu`||x.type===`nested-context-menu`?x.context.internalBackdropRef:null,inert:cf(!T),cutout:we}),Eo(al,{id:P,children:Eo(xf,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,children:Se})})]})});V();let Bf=me(void 0);function Vf(){let e=Re(Bf);if(e===void 0)throw Error(Jr(34));return e}V();let Hf=[`render`,`className`,`value`,`defaultValue`,`onValueChange`,`disabled`,`style`,`aria-labelledby`],Uf=vt(yt(function(e,t){let{render:n,className:r,value:i,defaultValue:a,onValueChange:o,disabled:s=!1,style:c,"aria-labelledby":l}=e,u=vr(e,Hf),[d,f]=Me(void 0),[p,m]=ca({controlled:i,default:a,name:`MenuRadioGroup`}),h=La((e,t)=>{o==null||o(e,t),!t.isCanceled&&m(e)}),g=Mi(`div`,e,{state:{disabled:s},ref:t,props:U({role:`group`,"aria-labelledby":l==null?d:l,"aria-disabled":s||void 0},u)}),_=z(()=>({value:p,setValue:h,disabled:s}),[p,h,s]);return Eo(Io.Provider,{value:f,children:Eo(Bf.Provider,{value:_,children:g})})}));V();let Wf=me(void 0);function Gf(){let e=Re(Wf);if(e===void 0)throw Error(Jr(35));return e}V();let Kf=[`render`,`className`,`id`,`label`,`nativeButton`,`disabled`,`closeOnClick`,`value`,`style`],qf=yt(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,value:l,style:u}=e,d=vr(e,Kf),f=go({label:a}),p=Xr(!0),m=xo(i),{store:h}=Qr(),g=h.useState(`isActive`,f.index),_=h.useState(`itemProps`),{value:v,setValue:y,disabled:b}=Vf(),x=b||s,S=v===l,{getItemProps:C,itemRef:w}=fo({closeOnClick:c,disabled:x,highlighted:g,id:m,store:h,nativeButton:o,nodeId:p==null?void 0:p.context.nodeId,itemMetadata:uo}),T=z(()=>({disabled:x,highlighted:g,checked:S}),[x,g,S]);function E(e){let t=wo(ra,e.nativeEvent,void 0,{preventUnmountOnClose(){}});y(l,t)}let D=Mi(`div`,e,{state:T,stateAttributesMapping:Co,props:[_,{role:`menuitemradio`,"aria-checked":S,onClick:E},d,C],ref:[w,t,f.ref]});return Eo(Wf.Provider,{value:T,children:D})});V();let Jf=[`render`,`className`,`style`,`keepMounted`],Yf=yt(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1}=e,o=vr(e,Jf),s=Gf(),c=R(null),{transitionStatus:l,setMounted:u}=Mo(s.checked);return Fo({open:s.checked,ref:c,onComplete(){s.checked||u(!1)}}),Mi(`span`,e,{state:{checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l},stateAttributesMapping:Co,ref:[t,c],props:U({"aria-hidden":!0},o),enabled:a||s.checked})});V();let Xf=me(null);function Zf(e){let t=Re(Xf);if(t===null&&!e)throw Error(Jr(5));return t}V();function Qf(e){let t=R(``),n=Le(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:Le(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}V();function $f(e,t){let n=R(e),r=La(t);W(()=>{n.current!==e&&r(n.current)},[e,r]),W(()=>{n.current=e},[e])}V();function ep(e,t){let{onClick:n,onPointerDown:r}=Qf(La((n,r)=>{(typeof e==`function`?e():e)||t(r||($a?`touch`:``))}));return z(()=>({onClick:n,onPointerDown:r}),[n,r])}function tp(e){let[t,n]=Me(null),r=ep(e,n);return $f(e,t=>{t&&!e&&n(null)}),z(()=>({openMethod:t,triggerProps:r}),[t,r])}V();let np=U(U({},xd),{},{disabled:G(e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled),modal:G(e=>{var t;return(e.parent.type===void 0||e.parent.type===`context-menu`)&&((t=e.modal)==null||t)}),openMethod:G(e=>e.openMethod),allowMouseEnter:G(e=>e.allowMouseEnter),highlightItemOnHover:G(e=>e.highlightItemOnHover),stickIfOpen:G(e=>e.stickIfOpen),parent:G(e=>e.parent),rootId:G(e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId),activeIndex:G(e=>e.activeIndex),isActive:G((e,t)=>e.activeIndex===t),hoverEnabled:G(e=>e.hoverEnabled),instantType:G(e=>e.instantType),lastOpenChangeReason:G(e=>e.openChangeReason),floatingTreeRoot:G(e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot),floatingNodeId:G(e=>e.floatingNodeId),floatingParentNodeId:G(e=>e.floatingParentNodeId),itemProps:G(e=>e.itemProps),closeDelay:G(e=>e.closeDelay),hasViewport:G(e=>e.hasViewport),keyboardEventRelay:G(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)})});var rp=class e extends Yu{constructor(e){super(U(U({},ip()),e),{positionerRef:T(),popupRef:T(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:T(),beforeContentFocusGuardRef:T(),onOpenChangeComplete:void 0,triggerElements:new fd},np),H(this,`unsubscribeParentListener`,null),this.unsubscribeParentListener=this.observe(`parent`,e=>{var t;if((t=this.unsubscribeParentListener)==null||t.call(this),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);t===i&&n===a&&r===o||(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}static useStore(t,n){let r=ei(()=>new e(n)).current;return t==null?r:t}};function ip(){return U(U({},md()),{},{disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new $c,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:pi,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1})}V();let ap=me(void 0);function op(){return Re(ap)}V();let sp=Ru(function(e){var t;let{children:n,open:r,onOpenChange:i,onOpenChangeComplete:a,defaultOpen:o=!1,disabled:s=!1,modal:c,loopFocus:l=!0,orientation:u=`vertical`,actionsRef:d,closeParentOnEsc:f=!1,handle:p,triggerId:m,defaultTriggerId:h=null,highlightItemOnHover:g=!0}=e,_=$i(!0),v=Qr(!0),y=Zf(!0),b=op(),x=z(()=>b&&v?{type:`menu`,store:v.store}:y?{type:`menubar`,context:y}:_&&!v?{type:`context-menu`,context:_}:{type:void 0},[_,v,y,b]),S=rp.useStore(p==null?void 0:p.store,{open:o,openProp:r,activeTriggerId:h,triggerIdProp:m,parent:x});od(S,r,o,h),S.useControlledProp(`openProp`,r),S.useControlledProp(`triggerIdProp`,m),S.useContextCallback(`onOpenChangeComplete`,a);let C=bo(),w=bo(),T=S.useState(`floatingTreeRoot`),E=il(T),D=nl(),O=S.useState(`open`),k=S.useState(`activeTriggerElement`),A=S.useState(`positionerElement`),j=S.useState(`hoverEnabled`),M=S.useState(`disabled`),N=S.useState(`lastOpenChangeReason`),P=S.useState(`parent`),ee=S.useState(`activeIndex`),te=S.useState(`payload`),F=S.useState(`floatingParentNodeId`),ne=R(null),re=R(P.type!==`context-menu`),ie=Vo(),ae=R(!0),oe=Vo(),se=F!=null,{openMethod:ce,triggerProps:I}=tp(O);S.useSyncedValues({disabled:s,highlightItemOnHover:g,modal:P.type===void 0?c:void 0,openMethod:ce,rootId:C}),cd(S);let{forceUnmount:le}=ld(O,S,()=>{S.update({allowMouseEnter:!1,stickIfOpen:!0})});W(()=>{_&&!v?S.update({parent:{type:`context-menu`,context:_},floatingNodeId:E,floatingParentNodeId:D}):v&&S.update({floatingNodeId:E,floatingParentNodeId:D})},[_,v,E,D,S]),Pe(()=>{if(O||(ne.current=null),P.type===`context-menu`){if(!O){ie.clear(),re.current=!1;return}ie.start(500,()=>{re.current=!0})}},[ie,O,P.type]),W(()=>{!O&&!j&&S.set(`hoverEnabled`,!0)},[O,j,S]);let ue=La((e,t)=>{var n;let r=t.reason;if(O===e&&t.trigger===k&&N===r)return;let a=ad(t);if(!e&&t.trigger==null&&(t.trigger=k==null?void 0:k),i==null||i(e,t),t.isCanceled)return;S.state.floatingRootContext.dispatchOpenChange(e,t);let o=t.event;if(e===!1&&(o==null?void 0:o.type)===`click`&&o.pointerType===`touch`&&!ae.current)return;e&&r===`trigger-focus`?(ae.current=!1,oe.start(300,()=>{ae.current=!0})):(ae.current=!0,oe.clear());let s=(r===`trigger-press`||r===`item-press`)&&o.detail===0&&(o==null?void 0:o.isTrusted),c=!e&&(r===`escape-key`||r==null),l={open:e,openChangeReason:r};ne.current=(n=t.event)==null?null:n,id(l,e,t.trigger,a()),S.update(l),P.type===`menubar`&&(r===`trigger-focus`||r===`focus-out`||r===`trigger-hover`||r===`list-navigation`||r===`sibling-open`)?S.set(`instantType`,`group`):s||c?S.set(`instantType`,s?`click`:`dismiss`):S.set(`instantType`,void 0)}),de=$u({popupStore:S,floatingId:w,nested:D!=null,onOpenChange:ue}),fe=de.context.events;Pe(()=>{let e=({open:e,eventDetails:t})=>ue(e,t);return fe.on(`setOpen`,e),()=>{fe==null||fe.off(`setOpen`,e)}},[fe,ue]);let pe=Le(()=>{S.setOpen(!1,wo(sa))},[S]);Ie(d,()=>({unmount:le,close:pe}),[le,pe]);let me;P.type===`context-menu`&&(me=P.context),Ie(me==null?void 0:me.positionerRef,()=>A,[A]),Ie(me==null?void 0:me.actionsRef,()=>({setOpen:ue}),[ue]);let L=vl(de,{enabled:!M,bubbles:{escapeKey:f&&P.type===`menu`},outsidePress(){var e;return P.type!==`context-menu`||((e=ne.current)==null?void 0:e.type)===`contextmenu`||re.current},externalTree:se?T:void 0}),he=uf(),ge=Le(e=>{S.select(`activeIndex`)!==e&&S.set(`activeIndex`,e)},[S]),_e=zd(de,{enabled:!M,listRef:S.context.itemDomElements,activeIndex:ee,nested:P.type!==void 0,loopFocus:l,orientation:u,parentOrientation:P.type===`menubar`?P.context.orientation:void 0,rtl:he===`rtl`,disabledIndices:fi,onNavigate:ge,openOnArrowKeyDown:P.type!==`context-menu`,externalTree:se?T:void 0,focusItemOnHover:g}),ve=Le(e=>{S.context.typingRef.current=e},[S]),ye=Bd(de,{enabled:!M,listRef:S.context.itemLabels,elementsRef:S.context.itemDomElements,activeIndex:ee,resetMs:500,onMatch:e=>{O&&e!==ee&&S.set(`activeIndex`,e)},onTyping:ve});ud(S,{floatingRootContext:de,activeTriggerProps:z(()=>{let e=vi(ye.reference,_e.reference,L.reference,{onMouseMove(){S.set(`allowMouseEnter`,!0)}},I);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=O,e},[S,ye.reference,_e.reference,L.reference,I,O]),inactiveTriggerProps:z(()=>{let e=vi(_e.trigger,L.trigger,I);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[_e.trigger,L.trigger,I]),popupProps:z(()=>vi(ed,{id:w,role:`menu`,"aria-labelledby":k==null?void 0:k.id,onMouseMove(){S.set(`allowMouseEnter`,!0),P.type===`menu`&&S.set(`hoverEnabled`,!1)},onClick(){S.select(`hoverEnabled`)&&S.set(`hoverEnabled`,!1)},onKeyDown(e){let t=S.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},ye.floating,_e.floating,L.floating),[k,w,P.type,S,ye.floating,_e.floating,L.floating]),itemProps:(t=_e.item)==null?pi:t});let be=z(()=>({store:S,parent:x}),[S,x]),xe=Eo(Zr.Provider,{value:be,children:typeof n==`function`?n({payload:te}):n});return P.type===void 0||P.type===`context-menu`?Eo(ol,{externalTree:T,children:xe}):xe});function cp(e){let t=e.getBoundingClientRect(),n=da(e);if(co)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(!(r.content!==`none`||i.content!==`none`))return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}V();function lp(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Va(),{ref:i,index:a}=go(e),o=n===a,s=R(null),c=ti(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}let up=[`render`,`className`,`style`,`state`,`props`,`refs`,`metadata`,`stateAttributesMapping`,`tag`];function dp(e){let{render:t,className:n,style:r,state:i=pi,props:a=fi,refs:o=fi,metadata:s,stateAttributesMapping:c,tag:l=`div`}=e,u=vr(e,up),{compositeProps:d,compositeRef:f}=lp({metadata:s});return Mi(l,e,{state:i,ref:[...o,f],props:[d,...a,u],stateAttributesMapping:c})}function fp(e){if(ha(e)&&e.hasAttribute(`data-rootownerid`)){var t;return(t=e.getAttribute(`data-rootownerid`))==null?void 0:t}if(!Da(e))return fp(Aa(e))}V();function pp(e,t){let n=R(null);function r(t){cn(()=>{e.setOpen(!1,wo(ia,t.nativeEvent,t.currentTarget))});let r=xc(n.current);r==null||r.focus()}function i(n){let r=e.select(`positionerElement`);if(r&&Sc(n,r)){var i;(i=e.context.beforeContentFocusGuardRef.current)==null||i.focus()}else{cn(()=>{e.setOpen(!1,wo(ia,n.nativeEvent,n.currentTarget))});let i=bc(e.context.triggerFocusTargetRef.current||t.current);for(;i!==null&&Zo(r,i);){let e=i;if(i=_c(i),i===e)break}i==null||i.focus()}}return{preFocusGuardRef:n,handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}V();function mp(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=R(!1);return z(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,gs(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:pi,[t,n,r])}V();let hp=[`render`,`className`,`style`,`disabled`,`nativeButton`,`id`,`openOnHover`,`delay`,`closeDelay`,`handle`,`payload`],gp=zu(function(e,t){var n;let{render:r,className:i,style:a,disabled:o=!1,nativeButton:s=!0,id:c,openOnHover:l,delay:u=100,closeDelay:d=0,handle:f,payload:p}=e,m=vr(e,hp),h=Qr(!0),g=(n=f==null?void 0:f.store)==null?h==null?void 0:h.store:n;if(!g)throw Error(Jr(85));let _=xo(c),v=g.useState(`isTriggerActive`,_),y=g.useState(`floatingRootContext`),b=g.useState(`isOpenedByTrigger`,_),x=g.useState(`triggerPopupId`,_),S=R(null),C=vp(),w=Va(!0),T=rl(),D=z(()=>T==null?new $c:T,[T]),{registerTrigger:O,isMountedByThisTrigger:k}=sd(_,S,g,{payload:p,closeDelay:d,parent:C,floatingTreeRoot:D,floatingNodeId:il(D),floatingParentNodeId:nl(),keyboardEventRelay:w==null?void 0:w.relayKeyboardEvent}),A=C.type===`menubar`,j=g.useState(`disabled`),M=o||j||A&&C.context.disabled,{getButtonProps:N,buttonRef:P}=Wa({disabled:M,native:s});Pe(()=>{!b&&C.type===void 0&&(g.context.allowMouseUpTriggerRef.current=!1)},[g,b,C.type]);let ee=R(null),te=Vo(),F=La(e=>{if(!ee.current)return;te.clear(),g.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if(Zo(ee.current,t)||Zo(g.select(`positionerElement`),t)||t===ee.current||t!=null&&fp(t)===g.select(`rootId`))return;let n=cp(ee.current);e.clientX>=n.left-2&&e.clientX<=n.right+2&&e.clientY>=n.top-2&&e.clientY<=n.bottom+2||D.events.emit(`close`,{domEvent:e,reason:`cancel-open`})});Pe(()=>{b&&g.select(`lastOpenChangeReason`)===`trigger-hover`&&gs(ee.current).addEventListener(`mouseup`,F,{once:!0})},[b,F,g]);let ne=A&&C.context.hasSubmenuOpen,re=Nd(y,{enabled:(l==null?ne:l)&&!M&&C.type!==`context-menu`&&(!A||ne&&!k),handleClose:Kd({blockPointerEvents:!A}),mouseOnly:!0,move:!1,restMs:C.type===void 0?u:void 0,delay:{close:d},triggerElementRef:S,externalTree:D,isActiveTrigger:v,isClosing:()=>g.select(`transitionStatus`)===`ending`}),ie=_p(b,g.select(`lastOpenChangeReason`)),ae=hl(y,{enabled:!M&&C.type!==`context-menu`,event:b&&A?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:C.type===void 0&&ie}),oe=Td(y,{enabled:!M&&ne}),se=mp({open:b,enabled:A,mouseDownAction:`open`}),ce=z(()=>vi(oe.reference,ae.reference),[oe.reference,ae.reference]),I=g.useState(`triggerProps`,k),{preFocusGuardRef:le,handlePreFocusGuardFocus:ue,handleFocusTargetFocus:de}=pp(g,S),fe={disabled:M,open:b},pe=[ee,t,P,O,S],me=[ce,re==null?pi:re,I,{"aria-haspopup":`menu`,"aria-controls":x,id:_,onMouseDown:e=>{g.select(`open`)||(te.start(200,()=>{g.context.allowMouseUpTriggerRef.current=!0}),gs(e.currentTarget).addEventListener(`mouseup`,F,{once:!0}))}},A?{role:`menuitem`}:{},se,m,N],L=Mi(`button`,e,{enabled:!A,stateAttributesMapping:Xi,state:fe,ref:pe,props:me});return A?Eo(dp,{tag:`button`,render:r,className:i,style:a,state:fe,refs:pe,props:me,stateAttributesMapping:Xi}):b?Eo(E,{children:[Eo(ys,{ref:le,onFocus:ue},`${_}-pre-focus-guard`),Eo(E,{children:L},_),Eo(ys,{ref:g.context.triggerFocusTargetRef,onFocus:de},`${_}-post-focus-guard`)]}):Eo(E,{children:L},_)});function _p(e,t){let n=Vo(),[r,i]=Me(!1);return W(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function vp(){let e=$i(!0),t=Qr(!0),n=Zf(!0);return z(()=>n?{type:`menubar`,context:n}:e&&!t?{type:`context-menu`,context:e}:{type:void 0},[e,t,n])}V();function yp(e){return`${e.charAt(0).toLocaleUpperCase()}${e.substring(1)}`}let bp={askAI:`askAI`,favoriteSearches:`favoriteSearches`,recentConversations:`recentConversations`,recentSearches:`recentSearches`};function xp(e,t){return e.collections.find(e=>(e==null?void 0:e.source.sourceId)===t)}function Sp(e){return e.replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/&/g,`&`)}let Cp=[`lvl0`,`lvl1`,`lvl2`,`lvl3`,`lvl4`,`lvl5`,`lvl6`];function wp(e){let t=e.type===`content`||e.type===`askAI`?Cp.length:Cp.indexOf(e.type);return Cp.slice(0,t).map(t=>e.hierarchy[t]?Sp(e.hierarchy[t]):null).filter(Boolean).join(` > `)}let Tp=new Map;function Ep(e){let t=Tp.get(e);if(t)return t;let n=e.replace(/\[(\w+)\]/g,`.$1`).replace(/^\/./,``).split(`.`);return Tp.set(e,n),n}function Dp(e,t){return Ep(t).reduce((e,t)=>{if(e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,t))return e[t]},e)}function Op(e,t,n){return e.reduce((e,r)=>{let i=t(r);return e.hasOwnProperty(i)||(e[i]=[]),e[i].length<(n||5)&&e[i].push(r),e},{})}function kp(e){return e}function Ap(e){return e.button===1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function jp(e){return!e||e.trim().length===0}function Mp(...e){}let Np=/(<mark>|<\/mark>)/g,Pp=RegExp(Np.source);function Fp(e){var t,n;let r=e;if(!r.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;let i=r.__docsearch_parent?(t=r.__docsearch_parent)==null||(t=t._highlightResult)==null||(t=t.hierarchy)==null?void 0:t.lvl0:(n=e._highlightResult)==null||(n=n.hierarchy)==null?void 0:n.lvl0;return i?i.value&&Pp.test(i.value)?i.value.replace(Np,``):i.value:e.hierarchy.lvl0}function Ip(e){typeof e.scrollTo==`function`?e.scrollTo({top:0,behavior:`smooth`}):e.scrollTop=0}function Lp(){return B.createElement(`svg`,{className:`DocSearch-Hit-Select-Icon`,width:`20`,height:`20`,viewBox:`0 0 20 20`},B.createElement(`g`,{stroke:`currentColor`,fill:`none`,fillRule:`evenodd`,strokeLinecap:`round`,strokeLinejoin:`round`},B.createElement(`path`,{d:`M18 3v4c0 2-2 4-4 4H2`}),B.createElement(`path`,{d:`M8 17l-6-6 6-6`})))}function Rp(){return B.createElement(`svg`,{width:`40`,height:`40`,viewBox:`0 0 20 20`,fill:`none`,fillRule:`evenodd`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`},B.createElement(`path`,{d:`M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0`}))}function zp(){return B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`64`,height:`64`,viewBox:`0 0 24 24`,fill:`none`,stroke:`#5a5e9a`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},B.createElement(`path`,{d:`m13.5 8.5-5 5`}),B.createElement(`path`,{d:`m8.5 8.5 5 5`}),B.createElement(`circle`,{cx:`11`,cy:`11`,r:`8`}),B.createElement(`path`,{d:`m21 21-4.3-4.3`}))}function Bp(){return B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},B.createElement(`path`,{d:`M12 17v5`}),B.createElement(`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`}))}function Vp(){return B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},B.createElement(`polyline`,{points:`6 9 12 15 18 9`}))}function Hp(){return B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},B.createElement(`polyline`,{points:`20 6 9 17 4 12`}))}function Up(e=[]){let t=new Map;for(let n of e){let e=n.key.trim().toLowerCase();if(!(e.length===0||t.has(e))){if(t.size>=5)break;t.set(e,n)}}return Array.from(t.values())}function Wp(e){return e.label?e.label:e.key.replace(/[._-]+/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}function Gp(e){let t={};for(let r of e){var n;let e=(n=r.searchParameters)==null?void 0:n.facetFilters;for(let n of Array.isArray(e)?e:[e]){if(typeof n!=`string`)continue;let e=n.indexOf(`:`);if(e<=0)continue;let r=n.slice(0,e),i=n.slice(e+1);r&&i&&(t[r]=i)}}return t}let Kp=[`className`,`type`];function qp({children:e}){return B.createElement(`div`,{className:`DocSearch-Chip`},e)}function Jp(e){let{className:t,type:n=`button`}=e,r=pn(e,Kp),i=`DocSearch-Chip-Dismiss${t?` ${t}`:``}`;return B.createElement(`button`,_({type:n,className:i,tabIndex:0},r),B.createElement(jr,{"aria-hidden":`true`}))}qp.Dismiss=Jp;let Yp=[`className`],Xp=[`align`,`alignOffset`,`side`,`sideOffset`,`collisionBoundary`,`container`],Zp=[`className`,`children`],Qp=[`className`];function $p(e){let t=Ar({},(kr(e),e));return B.createElement(sp,t)}$p.Trigger=B.forwardRef((e,t)=>{let{className:n}=e,r=pn(e,Yp),i=`DocSearch-Menu-Trigger${n?` ${n}`:``}`;return B.createElement(gp,_({className:i,ref:t},r))});function em(e){let{align:t=`start`,alignOffset:n=0,side:r=`bottom`,sideOffset:i=4,collisionBoundary:a=`clipping-ancestors`,container:o}=e,s=pn(e,Xp);return B.createElement(sf,{container:o},B.createElement(zf,{className:`DocSearch-Menu-Positioner`,align:t,alignOffset:n,side:r,sideOffset:i,collisionBoundary:a},B.createElement(nf,_({className:`DocSearch-Menu-Popup`},s))))}$p.Popup=em;function tm(e){let t=Ar({},(kr(e),e));return B.createElement(Uf,t)}$p.RadioGroup=tm;function nm(e){let{className:t,children:n}=e,r=pn(e,Zp),i=`DocSearch-Menu-Item DocSearch-Menu-RadioItem${t?` ${t}`:``}`;return B.createElement(qf,_({className:i,closeOnClick:!0},r),B.createElement(`span`,{className:`DocSearch-Menu-RadioItem-Indicator`},B.createElement(Yf,null,B.createElement(Hp,null))),n)}$p.RadioItem=nm;function rm(e){let{className:t}=e,n=pn(e,Qp),r=`DocSearch-Menu-GroupLabel${t?` ${t}`:``}`;return B.createElement(zo,_({className:r},n))}$p.GroupLabel=rm;let im=B.memo(function({facet:e,selectedValue:t,defaultValueLabel:n,onSelectionChange:r,registerTrigger:i,menuTriggerSelectedAriaLabel:a}){let o=Wp(e),s=B.useCallback(t=>{r(e.key,t)},[e.key,r]),c=B.useCallback(t=>{i(e.key,t)},[e.key,i]);return B.createElement($p,null,B.createElement($p.Trigger,{ref:c,"data-has-selection":!!t,"aria-label":t?`${o}, ${t} ${a}`:o},B.createElement(`span`,null,yp(o)),B.createElement(Vp,null)),B.createElement($p.Popup,null,B.createElement($p.RadioGroup,{value:t,onValueChange:s},B.createElement($p.RadioItem,{value:``,label:`${n} ${o}`},n),e.values.map(e=>B.createElement($p.RadioItem,{key:e,value:e,label:e},yp(e))))))}),am=B.memo(function({facetKey:e,facetLabel:t,value:n,dismissAriaLabel:r,onDismiss:i}){let a=B.useCallback(t=>{i(e,t)},[e,i]);return B.createElement(qp,null,yp(n),B.createElement(qp.Dismiss,{"aria-label":`${r} ${yp(n)} (${t})`,onClick:a}))}),om=B.memo(function({facets:e,selections:t,onSelectionChange:n,clearSelections:r,translations:i={}}){let{defaultValueLabel:a=`All`,facetMenuTriggerAriaLabel:o=`selected`,clearAllLabel:s=`Clear all`,facetsAriaLabel:c=`Search filters`,selectedFacetsAriaLabel:l=`Selected search filters`,clearFacetAriaLabel:u=`Clear filter:`}=i,d=B.useMemo(()=>new Set(e.map(e=>e.key)),[e]),f=B.useMemo(()=>Object.entries(t).filter(([e,t])=>!!t&&d.has(e)),[t,d]),p=B.useRef(new Map),m=B.useCallback((e,t)=>{t?p.current.set(e,t):p.current.delete(e)},[]),h=B.useCallback((e,t)=>{let r=t.currentTarget,i=r.closest(`.DocSearch-FacetSelectionBar`);if(i){var a,o;let t=Array.from(i.querySelectorAll(`.DocSearch-Chip-Dismiss`)),n=t.indexOf(r),s=(a=(o=t[n+1])==null?t[n-1]:o)==null?p.current.get(e):a;s==null||s.focus()}n(e,``)},[n]),g=B.useCallback(()=>{var e;(e=p.current.values().next().value)==null||e.focus(),r()},[r]),_=B.useMemo(()=>new Map(e.map(e=>[e.key,Wp(e)])),[e]);return e.length===0?null:B.createElement(B.Fragment,null,B.createElement(`div`,{className:`DocSearch-FacetBar`,role:`group`,"aria-label":c},e.map(e=>{var r;let i=(r=t[e.key])==null?``:r;return B.createElement(im,{key:e.key,facet:e,selectedValue:i,defaultValueLabel:a,registerTrigger:m,menuTriggerSelectedAriaLabel:o,onSelectionChange:n})})),f.length>0&&B.createElement(`div`,{className:`DocSearch-FacetSelectionBar`,role:`group`,"aria-label":l},f.map(([e,t])=>{var n;return B.createElement(am,{key:e,facetKey:e,facetLabel:(n=_.get(e))==null?e:n,value:t,dismissAriaLabel:u,onDismiss:h})}),B.createElement(`button`,{type:`button`,className:`DocSearch-FacetSelectionBar-Action`,onClick:g},s)))}),sm=[`actionsBeforeClose`,`autoFocus`,`clearButtonAriaLabel`,`clearButtonTitle`,`closeButtonAriaLabel`,`closeButtonText`,`hideInput`,`inputOverlay`,`inputProps`,`inputRef`,`isFromSelection`,`leadingElement`,`onClose`,`placeholder`,`searchInputLabel`,`state`];function cm(e){let{actionsBeforeClose:t,autoFocus:n,clearButtonAriaLabel:r,clearButtonTitle:i,closeButtonAriaLabel:a,closeButtonText:o,hideInput:s,inputOverlay:c,inputProps:l,inputRef:u,isFromSelection:d,leadingElement:f,onClose:p,placeholder:m,searchInputLabel:h,state:g}=e,v=pn(e,sm),{onReset:y}=v.getFormProps({inputElement:u.current});B.useEffect(()=>{n&&u.current&&u.current.focus()},[n,u]),B.useEffect(()=>{d&&u.current&&u.current.select()},[d,u]);let b=v.getInputProps({inputElement:u.current,autoFocus:n,maxLength:512}),x=g.status===`stalled`;return B.createElement(`form`,{className:`DocSearch-Form`,onSubmit:e=>{e.preventDefault()},onReset:y},f||(x?B.createElement(`div`,{className:`DocSearch-LoadingIndicator`},B.createElement(Er,null)):B.createElement(`label`,_({className:`DocSearch-MagnifierLabel`},v.getLabelProps()),B.createElement(dn,null),B.createElement(`span`,{className:`DocSearch-VisuallyHiddenForAccessibility`},h))),c,B.createElement(`input`,_(_(_({className:`DocSearch-Input`,ref:u},b),l),{},{placeholder:m,hidden:s})),B.createElement(`div`,{className:`DocSearch-Actions`},t,B.createElement(`button`,{type:`button`,title:o,className:`DocSearch-Action DocSearch-Close`,"aria-label":a,onClick:p},B.createElement(jr,null))))}function lm({state:e,containerRef:t,modalRef:n,formElementRef:r,dropdownRef:i,getRootProps:a,onClose:o,showDropdown:s,searchBox:c,filterBar:l,screenState:u,footer:d}){return B.createElement(`div`,_(_({ref:t},a({"aria-expanded":!0})),{},{className:[`DocSearch`,`DocSearch-Container`,e.status===`stalled`&&`DocSearch-Container--Stalled`,e.status===`error`&&`DocSearch-Container--Errored`].filter(Boolean).join(` `),role:`button`,tabIndex:0,onMouseDown:e=>{e.target===e.currentTarget&&o()}}),B.createElement(`div`,{className:`DocSearch-Modal`,ref:n},B.createElement(`header`,{className:`DocSearch-SearchBar`,ref:r},c),l,s&&B.createElement(`div`,{className:`DocSearch-Dropdown`,ref:i},u),B.createElement(`footer`,{className:`DocSearch-Footer`},d)))}function um(e){return B.createElement(`svg`,{width:`20`,height:`20`,"aria-label":e.ariaLabel,viewBox:`0 0 24 24`,role:`img`},B.createElement(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.4`},e.children))}function dm({translations:e={},isAskAiActive:t=!1,footerAction:n}){let{selectText:r=`Select`,selectKeyAriaLabel:i=`Enter key`,submitQuestionText:a=`Submit question`,navigateText:o=`Navigate`,navigateUpKeyAriaLabel:s=`Arrow up`,navigateDownKeyAriaLabel:c=`Arrow down`,closeText:l=`Close`,backToSearchText:u=`Back to search`,closeKeyAriaLabel:d=`Escape key`,poweredByText:f=`Powered by`}=e,p=n!=null&&typeof n!=`boolean`;return B.createElement(B.Fragment,null,B.createElement(`ul`,{className:`DocSearch-Commands`},B.createElement(`li`,null,B.createElement(`kbd`,{className:`DocSearch-Commands-Key`},B.createElement(um,{ariaLabel:c},B.createElement(`path`,{d:`M12 5v14`}),B.createElement(`path`,{d:`m19 12-7 7-7-7`}))),B.createElement(`kbd`,{className:`DocSearch-Commands-Key`},B.createElement(um,{ariaLabel:s},B.createElement(`path`,{d:`m5 12 7-7 7 7`}),B.createElement(`path`,{d:`M12 19V5`}))),B.createElement(`span`,{className:`DocSearch-Label`},o)),B.createElement(`li`,null,B.createElement(`kbd`,{className:`DocSearch-Commands-Key`},B.createElement(um,{ariaLabel:i},B.createElement(`polyline`,{points:`9 10 4 15 9 20`}),B.createElement(`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`}))),B.createElement(`span`,{className:`DocSearch-Label`},t?a:r)),B.createElement(`li`,null,B.createElement(`kbd`,{className:`DocSearch-Commands-Key`},B.createElement(`span`,{className:`DocSearch-Escape-Key`},`ESC`)),B.createElement(`span`,{className:`DocSearch-Label`,"aria-label":d},t?u:l))),B.createElement(`div`,{className:`DocSearch-Footer-Actions`},p&&B.createElement(`div`,{className:`DocSearch-Footer-Action`},n),B.createElement(`div`,{className:`DocSearch-Logo`},B.createElement(Ir,{translations:{poweredByText:f}}))))}function fm({hit:e,children:t}){return B.createElement(`a`,{href:e.url},t)}function pm({facets:e,indexes:t,searchClient:n}){let[r,i]=B.useState({}),a=e.map(e=>e.key).join(`,`),o=JSON.stringify(t.map(e=>{var t;return[e.name,(t=e.searchParameters)==null?null:t]}));return B.useEffect(()=>{let e=!0,r=a?a.split(`,`):[];return r.length===0||t.length===0||n.search({requests:t.map(e=>({indexName:e.name,query:``,hitsPerPage:0,facets:r}))}).then(({results:t})=>{if(!e)return;let n=r.reduce((e,t)=>(e[t]=[],e),{});t.forEach(e=>{var t;Object.entries((t=e.facets)==null?{}:t).forEach(([e,t])=>{n[e]&&(n[e]=Array.from(new Set([...n[e],...Object.keys(t)])).sort((e,t)=>e.localeCompare(t,void 0,{sensitivity:`base`})))})}),i(n)}).catch(()=>{e&&i({})}),()=>{e=!1}},[a,o,n]),r}function mm({facets:e,indexes:t,searchClient:n,onSelectionsChange:r}){let i=B.useMemo(()=>Up(e),[e]),a=B.useRef(i),o=pm({facets:i,indexes:t,searchClient:n}),[s,c]=B.useState(()=>Gp(t)),l=B.useRef(s),u=B.useRef(r),d=B.useMemo(()=>i.map(e=>{var t;return _(_({},e),{},{values:(t=o[e.key])==null?[]:t})}).filter(e=>e.values.length>0),[o,i]);B.useLayoutEffect(()=>{a.current=i,u.current=r});let f=B.useCallback(e=>{var t;l.current=e,c(e),(t=u.current)==null||t.call(u)},[]);return{visibleFacets:d,facetSelections:s,facetSelectionsRef:l,handleFacetSelectionChange:B.useCallback((e,t)=>{if(l.current[e]===t)return;let n=_({},l.current);n[e]=t,f(n)},[f]),clearFacetSelections:B.useCallback(()=>{if(Object.keys(l.current).length===0)return;let e={};for(let t of a.current)l.current[t.key]&&(e[t.key]=``);f(e)},[f])}}function hm(e){return B.useCallback(t=>{if(!e.context.algoliaInsightsPlugin||!t.__autocomplete_id)return;let n=t;e.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch({eventName:`Item Selected`,index:n.__autocomplete_indexName,items:[n],positions:[t.__autocomplete_id],queryID:n.__autocomplete_queryID})},[e.context.algoliaInsightsPlugin])}function gm(e){let t=B.useRef(typeof window<`u`?window.getSelection().toString().slice(0,512):``).current;return{initialQuery:B.useRef(e||t).current,initialQueryFromSelection:t}}function _m({getEnvironmentProps:e,panelElement:t,formElement:n,inputElement:r}){B.useEffect(()=>{if(!(t&&n&&r))return;let{onTouchStart:i,onTouchMove:a}=e({panelElement:t,formElement:n,inputElement:r});return window.addEventListener(`touchstart`,i),window.addEventListener(`touchmove`,a),()=>{window.removeEventListener(`touchstart`,i),window.removeEventListener(`touchmove`,a)}},[e,t,n,r])}function vm({container:e}){B.useEffect(()=>{if(!e)return;let t=e.querySelectorAll(`a[href]:not([disabled]), button:not([disabled]), input:not([disabled])`),n=t[0],r=t[t.length-1];function i(e){e.key===`Tab`&&(e.shiftKey?document.activeElement===n&&(e.preventDefault(),r.focus()):document.activeElement===r&&(e.preventDefault(),n.focus()))}return e.addEventListener(`keydown`,i),()=>{e.removeEventListener(`keydown`,i)}},[e])}function ym({initialScrollY:e,modalRef:t,theme:n}){mn({theme:n}),B.useEffect(()=>(document.body.classList.add(`DocSearch--active`),()=>{var t,n;document.body.classList.remove(`DocSearch--active`),(t=(n=window).scrollTo)==null||t.call(n,0,e)}),[e]),B.useEffect(()=>{Br()},[]),B.useLayoutEffect(()=>{let e=window.innerWidth-document.body.clientWidth;return document.body.style.marginInlineEnd=`${e}px`,()=>{document.body.style.marginInlineEnd=`0px`}},[]),B.useEffect(()=>{function e(){if(t.current){let e=window.innerHeight*.01;t.current.style.setProperty(`--docsearch-vh`,`${e}px`)}}return e(),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[t])}function bm({getEnvironmentProps:e,containerRef:t,dropdownRef:n,formElementRef:r,inputRef:i,initialScrollY:a,modalRef:o,theme:s}){_m({getEnvironmentProps:e,panelElement:n.current,formElement:r.current,inputElement:i.current}),vm({container:t.current}),ym({initialScrollY:a,modalRef:o,theme:s})}function xm(){return{containerRef:B.useRef(null),modalRef:B.useRef(null),formElementRef:B.useRef(null),dropdownRef:B.useRef(null),inputRef:B.useRef(null)}}function Sm({initialQuery:e,inputRef:t,refresh:n}){B.useEffect(()=>{e.length>0&&(n(),t.current&&t.current.focus())},[e,t,n])}function Cm(e){let t=e.hierarchy,n=[`lvl6`,`lvl5`,`lvl4`,`lvl3`,`lvl2`,`lvl1`,`lvl0`].find(e=>t[e]);return _(_({},e),{},{type:n||`lvl0`,content:null})}function wm({favoriteSearches:e,recentSearches:t,disableUserPersonalization:n}){return B.useCallback(function(r){if(n)return;let i=r.type===`content`?r.__docsearch_parent||Cm(r):r;i&&e.getAll().findIndex(e=>e.objectID===i.objectID)===-1&&t.add(i)},[e,t,n])}function Tm({defaultIndexName:e,recentSearchesLimit:t,recentSearchesWithFavoritesLimit:n}){let r=B.useRef(Wr({key:`__DOCSEARCH_FAVORITE_SEARCHES__${e}`,limit:10})).current;return{favoriteSearches:r,recentSearches:B.useRef(Wr({key:`__DOCSEARCH_RECENT_SEARCHES__${e}`,limit:r.getAll().length===0?t:n})).current}}function Em({title:e,subText:t}){return B.createElement(`div`,{className:`DocSearch-Hit-content-wrapper`},B.createElement(`span`,{className:`DocSearch-Hit-title`},e),B.createElement(`span`,{className:`DocSearch-Hit-path`},t))}let Dm=1e3,Om=Dm*60,km=Om*60,Am=[[km*24,`day`],[km,`hour`],[Om,`minute`],[Dm,`second`]];function jm(e,t=Date.now()){let[n]=Me(()=>{var n;let r=Math.abs(Number(t)-Number(e)),[i,a]=(n=Am.find(([e])=>r>=e))==null?Am[Am.length-1]:n;return[Math.floor(r/i),a]}),r=z(()=>{let e=typeof navigator<`u`?navigator.language:void 0,[t,r]=n;return new Intl.RelativeTimeFormat(e,{style:`long`}).format(t*-1,r)},[n]);return e?r:null}let Mm=[`hit`,`attribute`,`tagName`];function Nm(e,t){return t.split(`.`).reduce((e,t)=>e!=null&&e[t]?e[t]:null,e)}function Pm(e){let{hit:t,attribute:n,tagName:r=`span`}=e;return C(r,_(_({},pn(e,Mm)),{},{dangerouslySetInnerHTML:{__html:Nm(t,`_snippetResult.${n}.value`)||Nm(t,n)}}))}function Fm(e){var t;let{askAiResultsTitle:n=`Ask AI Assistant`}=e.translations||{},r=B.useId(),i=B.useMemo(()=>e.title?Sp(e.title):null,[e.title]);return!e.collection||e.collection.items.length===0?null:e.collection.source.sourceId===bp.askAI?B.createElement(`section`,{className:`DocSearch-Hits`},B.createElement(`h2`,{id:r,className:`DocSearch-Hit-source`},n),B.createElement(`ul`,_(_({className:`DocSearch-Hits-padded`},e.getListProps({source:e.collection.source})),{},{"aria-labelledby":r}),e.collection.items.map(t=>B.createElement(Rm,_({key:t.objectID,item:t,translations:e.translations},e))))):e.collection.source.sourceId===bp.recentConversations?B.createElement(`section`,{className:`DocSearch-Hits`},B.createElement(`div`,{className:`DocSearch-Hit-source`},B.createElement(Dr,null),i),B.createElement(`ul`,_({className:`DocSearch-Hits-padded`},e.getListProps({source:e.collection.source})),e.collection.items.map((t,n)=>B.createElement(Im,_({key:[e.title,t.objectID].join(`:`),item:t,index:n},e))))):B.createElement(`section`,{className:`DocSearch-Hits`},B.createElement(`div`,{className:`DocSearch-Hit-source`},(t=e.sourceIcon)==null?null:t,i),B.createElement(`ul`,_({className:`DocSearch-Hits-padded`},e.getListProps({source:e.collection.source})),e.collection.items.map((t,n)=>B.createElement(Im,_({key:[e.title,t.objectID].join(`:`),item:t,index:n},e)))))}function Im({item:e,index:t,renderIcon:n,renderAction:r,getItemProps:i,onItemClick:a,collection:o,hitComponent:s,translations:c={},renderResultBadge:l}){let u=s,{recentConversationTimestampFallback:d=`A while ago`}=c,f=e.type===`content`?`content`:`hierarchy.${e.type}`,p=wp(e);return B.createElement(`li`,_({className:[`DocSearch-Hit`,e.__docsearch_parent&&`DocSearch-Hit--Child`].filter(Boolean).join(` `)},i({item:e,source:o.source,onClick(t){a(e,t)}})),B.createElement(u,{hit:e},B.createElement(`div`,{className:`DocSearch-Hit-Container`},n({item:e,index:t}),e.type===`lvl0`&&B.createElement(Em,{title:B.createElement(Pm,{hit:e,attribute:`hierarchy.lvl0`}),subText:B.createElement(Pm,{hit:e,attribute:`content`})}),e.type===`askAI`?B.createElement(Lm,{item:e,relativeDateFallbackText:d}):B.createElement(Em,{title:B.createElement(Pm,{hit:e,attribute:f}),subText:p}),l==null?void 0:l({item:e}),r({item:e}))))}function Lm({item:e,relativeDateFallbackText:t}){let n=jm(e.hierarchy.lvl2?new Date(e.hierarchy.lvl2):null);return B.createElement(Em,{title:Sp(e.hierarchy.lvl1||``),subText:n||t})}function Rm({item:e,getItemProps:t,onItemClick:n,collection:r}){return e.query?B.createElement(`li`,_({className:`DocSearch-Hit`},t({item:e,source:r.source,onClick(t){n(e,t)}})),B.createElement(`div`,{className:`DocSearch-Hit--AskAI`},B.createElement(`div`,{className:`DocSearch-Hit-AskAIButton DocSearch-Hit-Container`},B.createElement(`div`,{className:` DocSearch-Hit-AskAIButton-icon DocSearch-Hit-icon`},B.createElement(Dr,null)),B.createElement(`div`,{className:`DocSearch-Hit-AskAIButton-title`},B.createElement(`span`,{className:`DocSearch-Hit-AskAIButton-title-query`},e.query))))):null}let zm=[`translations`];function Bm(e){let{translations:t={}}=e,n=pn(e,zm),{recentSearchesTitle:r=`Recently viewed docs`,saveRecentSearchButtonTitle:i=`Pin this search`,removeRecentSearchButtonTitle:a=`Remove this search from history`,favoriteSearchesTitle:o=`Pinned`,removeFavoriteSearchButtonTitle:s=`Remove this saved search`}=t,c=xp(n.state,`favoriteSearches`),l=xp(n.state,`recentSearches`);return B.createElement(B.Fragment,null,c&&B.createElement(Fm,_(_({},n),{},{title:o,collection:c,sourceIcon:B.createElement(Bp,null),renderIcon:({item:e})=>B.createElement(`div`,{className:`DocSearch-Hit-icon`},B.createElement(Nr,{type:e.type})),renderAction:({item:e})=>B.createElement(`div`,{className:`DocSearch-Hit-action`},B.createElement(`button`,{className:`DocSearch-Hit-action-button`,title:s,type:`submit`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.favoriteSearches.remove(e),n.refresh()}},B.createElement(jr,null)))})),l&&B.createElement(Fm,_(_({},n),{},{title:r,collection:l,sourceIcon:B.createElement(Or,null),renderIcon:({item:e})=>B.createElement(`div`,{className:`DocSearch-Hit-icon`},B.createElement(Nr,{type:e.type})),renderAction:({item:e})=>B.createElement(B.Fragment,null,B.createElement(`div`,{className:`DocSearch-Hit-action`},B.createElement(`button`,{className:`DocSearch-Hit-action-button DocSearch-Hit-action-button--pin`,title:i,type:`submit`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.favoriteSearches.add(e),n.recentSearches.remove(e),n.refresh()}},B.createElement(Bp,null))),B.createElement(`div`,{className:`DocSearch-Hit-action`},B.createElement(`button`,{className:`DocSearch-Hit-action-button`,title:a,type:`submit`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.recentSearches.remove(e),n.refresh()}},B.createElement(jr,null))))})))}function Vm({translations:e={}}){let{titleText:t=`Unable to fetch results`,helpText:n=`You might want to check your network connection.`}=e;return B.createElement(`div`,{className:`DocSearch-ErrorScreen`},B.createElement(`div`,{className:`DocSearch-Screen-Icon`},B.createElement(Rp,null)),B.createElement(`p`,{className:`DocSearch-Title`},t),B.createElement(`p`,{className:`DocSearch-Help`},n))}let Hm=[`translations`];function Um(e){let{translations:t={}}=e,n=pn(e,Hm),{noResultsText:r=`No results found for`,suggestedQueryText:i=`Try searching for`,reportMissingResultsText:a=`Believe this query should return results?`,reportMissingResultsLinkText:o=`Let us know.`}=t,s=n.state.context.searchSuggestions;return B.createElement(`div`,{className:`DocSearch-NoResults ${n.canHandleAskAi?`DocSearch-NoResults--withAskAi`:``}`},B.createElement(`div`,{className:`DocSearch-Screen-Icon`},B.createElement(zp,null)),B.createElement(`p`,{className:`DocSearch-Title`},r,` "`,B.createElement(`strong`,null,n.state.query),`"`),s&&s.length>0&&B.createElement(`div`,{className:`DocSearch-NoResults-Prefill-List`},B.createElement(`p`,{className:`DocSearch-Help`},i,`:`),B.createElement(`div`,{className:`DocSearch-NoResults-Prefill-List-Items`},s.slice(0,3).reduce((e,t)=>[...e,B.createElement(`p`,{key:t},B.createElement(dn,{size:16}),B.createElement(`button`,{className:`DocSearch-Prefill`,key:t,type:`button`,onClick:()=>{n.setQuery(t.toLowerCase()+` `),n.refresh(),n.inputRef.current.focus()}},t))],[]))),n.getMissingResultsUrl&&B.createElement(`p`,{className:`DocSearch-Help`},`${a} `,B.createElement(`a`,{href:n.getMissingResultsUrl({query:n.state.query}),target:`_blank`,rel:`noopener noreferrer`},o)))}function Wm(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`}function Gm({item:e,resultBadgeKey:t,translations:n={}}){if(!t)return null;let r=Dp(e,t);if(r==null)return null;let{resultBadgeLabelText:i=`Category`}=n,a=null;if(Wm(r))a=String(r).trim();else if(Array.isArray(r)){let e=r.filter(Wm).map(e=>String(e).trim());a=e.length>0?e.join(`, `):null}return a===null||a.length===0?null:B.createElement(`div`,{className:`DocSearch-Hit-badge`},B.createElement(`span`,{className:`DocSearch-VisuallyHiddenForAccessibility`},`${i}: ${a}`),B.createElement(`span`,{"aria-hidden":`true`},a))}let Km=[`translations`,`resultBadgeKey`];function qm(e){let{translations:t={},resultBadgeKey:n}=e,r=pn(e,Km),i=B.useCallback(()=>B.createElement(`div`,{className:`DocSearch-Hit-action`},B.createElement(Lp,null)),[]),a=B.useCallback(({item:e})=>B.createElement(Gm,{item:e,resultBadgeKey:n,translations:{resultBadgeLabelText:t.resultBadgeLabelText}}),[n,t.resultBadgeLabelText]);return B.createElement(`div`,{className:`DocSearch-Dropdown-Container`},r.state.collections.map(e=>{if(e.items.length===0)return null;let n=Fp(e.items[0]);return B.createElement(Fm,_(_({},r),{},{key:e.source.sourceId,translations:t,title:n,collection:e,renderIcon:({item:t,index:n})=>{var r;return B.createElement(B.Fragment,null,t.__docsearch_parent&&B.createElement(`svg`,{className:`DocSearch-Hit-Tree`,viewBox:`0 0 24 54`},B.createElement(`g`,{stroke:`currentColor`,fill:`none`,fillRule:`evenodd`,strokeLinecap:`round`,strokeLinejoin:`round`},t.__docsearch_parent===((r=e.items[n+1])==null?void 0:r.__docsearch_parent)?B.createElement(`path`,{d:`M8 6v42M20 27H8.3`}):B.createElement(`path`,{d:`M8 6v21M20 27H8.3`}))),B.createElement(`div`,{className:`DocSearch-Hit-icon`},B.createElement(Nr,{type:t.type})))},renderAction:i,renderResultBadge:a}))}),r.resultsFooterComponent&&B.createElement(`section`,{className:`DocSearch-HitsFooter`},B.createElement(r.resultsFooterComponent,{state:r.state})))}function Jm(e,t){let n=Object.entries(t),r=new Set(n.map(([e])=>e)),i=[];for(let[e,t]of n)t!==``&&i.push(`${e}:${t}`);if(r.size===0)return e;let a=[];return e&&Array.isArray(e)?a=e:e&&(a=[e]),[...a.filter(e=>{if(typeof e!=`string`)return!0;let t=e.indexOf(`:`),n=e.slice(0,t);return t<=0||!r.has(n)}),...i]}function Ym({recentSearches:e,favoriteSearches:t,saveRecentSearch:n,onClose:r,disableUserPersonalization:i}){return i?[]:[{sourceId:bp.favoriteSearches,onSelect({item:e,event:t}){n(e),Ap(t)||r()},getItemUrl({item:e}){return e.url},getItems(){return t.getAll()}},{sourceId:bp.recentSearches,onSelect({item:e,event:t}){n(e),Ap(t)||r()},getItemUrl({item:e}){return e.url},getItems(){return e.getAll()}}]}async function Xm({query:e,state:t,setContext:n,setStatus:r,searchClient:i,indexes:a,insights:o,appId:s,apiKey:c,maxResultsPerGroup:l,transformItems:u=kp,saveRecentSearch:d,onClose:f,facetSelections:p}){let m=o;try{let{results:r}=await i.search({requests:a.map(t=>{var n,r,i,a,o,s,c;let l=t.name,u=t.searchParameters,d=Jm(u==null?void 0:u.facetFilters,p.current);return _(_({query:e,indexName:l,attributesToRetrieve:(n=u==null?void 0:u.attributesToRetrieve)==null?[`hierarchy.lvl0`,`hierarchy.lvl1`,`hierarchy.lvl2`,`hierarchy.lvl3`,`hierarchy.lvl4`,`hierarchy.lvl5`,`hierarchy.lvl6`,`content`,`type`,`url`]:n,attributesToSnippet:(r=u==null?void 0:u.attributesToSnippet)==null?[`hierarchy.lvl1:15`,`hierarchy.lvl2:15`,`hierarchy.lvl3:15`,`hierarchy.lvl4:15`,`hierarchy.lvl5:15`,`hierarchy.lvl6:15`,`content:15`]:r,snippetEllipsisText:(i=u==null?void 0:u.snippetEllipsisText)==null?`…`:i,highlightPreTag:(a=u==null?void 0:u.highlightPreTag)==null?`<mark>`:a,highlightPostTag:(o=u==null?void 0:u.highlightPostTag)==null?`</mark>`:o,hitsPerPage:(s=u==null?void 0:u.hitsPerPage)==null?20:s,clickAnalytics:(c=u==null?void 0:u.clickAnalytics)==null?m:c},u),d?{facetFilters:d}:{})})});return r.flatMap(e=>{let r=e,{hits:i,nbHits:a}=r,o=Op(u(i),e=>Fp(e),l);if(t.context.searchSuggestions.length<Object.keys(o).length){var p;n({searchSuggestions:_(_({},(p=t.context.searchSuggestions)==null?[]:p),Object.keys(o))})}if(a){let e=t.context.nbHits;n({nbHits:(e==null?0:e)+a})}let h={};return m&&(h={__autocomplete_indexName:r.index,__autocomplete_queryID:r.queryID,__autocomplete_algoliaCredentials:{appId:s,apiKey:c}}),Object.values(o).map((e,t)=>({sourceId:`hits_${r.index}_${t}`,onSelect({item:e,event:t}){d(e),Ap(t)||f()},getItemUrl({item:e}){return e.url},getItems(){return Object.values(Op(e,e=>e.hierarchy.lvl1,l)).map(e=>e.map(t=>{let n=null,r=e.find(e=>e.type===`lvl1`&&e.hierarchy.lvl1===t.hierarchy.lvl1);return t.type!==`lvl1`&&r&&(n=r),_(_({},t),{},{__docsearch_parent:n},h)})).flat()}}))})}catch(e){throw e.name===`RetryError`&&r(`error`),e}}function Zm({indices:e}){if(!Array.isArray(e)||e.length<1)throw Error("Must supply at least one `indices` entry for DocSearch");return e.map(e=>typeof e==`string`?{name:e}:e)}V();let Qm=me(void 0);function $m(e){let t=Re(Qm);if(t===void 0&&!e)throw Error(Jr(47));return t}V();function eh(){return U(U({},md()),{},{disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1})}let th=U(U({},xd),{},{disabled:G(e=>e.disabled),instantType:G(e=>e.instantType),openMethod:G(e=>e.openMethod),openChangeReason:G(e=>e.openChangeReason),modal:G(e=>e.modal),focusManagerModal:G(e=>e.focusManagerModal),stickIfOpen:G(e=>e.stickIfOpen),titleElementId:G(e=>e.titleElementId),descriptionElementId:G(e=>e.descriptionElementId),openOnHover:G(e=>e.openOnHover),closeDelay:G(e=>e.closeDelay),hasViewport:G(e=>e.hasViewport)});var nh=class e extends Yu{constructor(e,t,n=!1){let r=U(U({},eh()),e),i=new fd;r.open&&(e==null?void 0:e.mounted)===void 0&&(r.mounted=!0),r.floatingRootContext=hd(i,t,n),super(r,{popupRef:T(),backdropRef:T(),internalBackdropRef:T(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:T(),beforeContentFocusGuardRef:T(),stickIfOpenTimeout:new Bo,triggerElements:i},th),H(this,`setOpen`,(e,t)=>{var n,r;let i=t.reason===ta,a=t.reason===`trigger-press`&&t.event.detail===0,o=!e&&(t.reason===`escape-key`||t.reason==null),s=ad(t),c=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&c!=null){var l,u;t.trigger=(l=(u=this.context.triggerElements.getById(c))==null?this.select(`activeTriggerElement`):u)==null?void 0:l}if((n=(r=this.context).onOpenChange)==null||n.call(r,e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let d=()=>{let n={open:e,openChangeReason:t.reason};id(n,e,t.trigger,s()),this.update(n)};i?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),cn(d)):d(),a||o?this.set(`instantType`,a?`click`:`dismiss`):t.reason===`focus-out`?this.set(`instantType`,`focus`):this.set(`instantType`,void 0)}),H(this,`disposeEffect`,()=>this.context.stickIfOpenTimeout.disposeEffect())}static useStore(t,n){let{store:r,internalStore:i}=nd(t,(t,r)=>new e(n,t,r));return Pe(()=>i==null?void 0:i.disposeEffect(),[i]),r}};V();function rh({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=nh.useStore(s==null?void 0:s.store,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});od(u,n,r,l),u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`),m=nl()!=null;u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),dd(u,d),cd(u);let{forceUnmount:h}=ld(d,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});u.useSyncedValues({modal:o,nested:m}),Pe(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]);let g=Le(()=>{u.setOpen(!1,wo(sa))},[u]);Ie(e.actionsRef,()=>({unmount:h,close:g}),[h,g]);let _=d||f,v=z(()=>({store:u}),[u]);return Eo(Qm.Provider,{value:v,children:[_&&Eo(ah,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})}function ih(e){return $m(!0)?Eo(rh,{props:e}):Eo(ol,{children:Eo(rh,{props:e})})}function ah({store:e,modal:t}){var n,r;let i=vl(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}});return ud(e,{activeTriggerProps:(n=i.reference)==null?pi:n,inactiveTriggerProps:(r=i.trigger)==null?pi:r,popupProps:z(()=>vi(ed,i.floating),[i.floating])}),null}V();let oh=[`render`,`className`,`style`,`disabled`,`nativeButton`,`handle`,`payload`,`openOnHover`,`delay`,`closeDelay`,`id`],sh=yt(function(e,t){var n;let{render:r,className:i,style:a,disabled:o=!1,nativeButton:s=!0,handle:c,payload:l,openOnHover:u=!1,delay:d=300,closeDelay:f=0,id:p}=e,m=vr(e,oh),h=$m(!0),g=(n=c==null?void 0:c.store)==null?h==null?void 0:h.store:n;if(!g)throw Error(Jr(74));let _=xo(p),v=g.useState(`isTriggerActive`,_),y=g.useState(`floatingRootContext`),b=g.useState(`isOpenedByTrigger`,_),x=g.useState(`triggerPopupId`,_),S=R(null),{registerTrigger:C,isMountedByThisTrigger:w}=sd(_,S,g,{payload:l,disabled:o,openOnHover:u,closeDelay:f}),T=g.useState(`openChangeReason`),D=g.useState(`stickIfOpen`),O=g.useState(`openMethod`),k=g.useState(`focusManagerModal`),A=Nd(y,{enabled:!o&&y!=null&&u&&(O!==`touch`||T!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:Kd(),restMs:d,delay:{close:f},triggerElementRef:S,isActiveTrigger:v,isClosing:()=>g.select(`transitionStatus`)===`ending`}),j=hl(y,{enabled:y!=null,stickIfOpen:D}),M=ep(()=>g.select(`open`),e=>{g.set(`openMethod`,e)}),N=g.useState(`triggerProps`,w),{getButtonProps:P,buttonRef:ee}=Wa({disabled:o,native:s}),te={open(e){return e&&T===`trigger-press`?Xi.open(e):Yi.open(e)}},{preFocusGuardRef:F,handlePreFocusGuardFocus:ne,handleFocusTargetFocus:re}=pp(g,S),ie=Mi(`button`,e,{state:{disabled:o,open:b},ref:[ee,t,C,S],props:[j.reference,A,N,M,{"data-base-ui-click-trigger":``,id:_,"aria-haspopup":`dialog`,"aria-expanded":b,"aria-controls":x},m,P],stateAttributesMapping:te});return w&&!k?Eo(E,{children:[Eo(ys,{ref:F,onFocus:ne}),Eo(E,{children:ie},_),Eo(ys,{ref:g.context.triggerFocusTargetRef,onFocus:re})]}):Eo(E,{children:ie},_)});V();let ch=me(void 0);function lh(){let e=Re(ch);if(e===void 0)throw Error(Jr(45));return e}V();let uh=[`keepMounted`],dh=yt(function(e,t){let{keepMounted:n=!1}=e,r=vr(e,uh),{store:i}=$m();return i.useState(`mounted`)||n?Eo(ch.Provider,{value:n,children:Eo(Zc,U({ref:t},r))}):null});V();let fh=me(void 0);function ph(){let e=Re(fh);if(!e)throw Error(Jr(46));return e}V();let mh=[`render`,`className`,`style`,`anchor`,`positionMethod`,`side`,`align`,`sideOffset`,`alignOffset`,`collisionBoundary`,`collisionPadding`,`arrowPadding`,`sticky`,`disableAnchorTracking`,`collisionAvoidance`],hh=yt(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o=`absolute`,side:s=`bottom`,align:c=`center`,sideOffset:l=0,alignOffset:u=0,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f=5,arrowPadding:p=5,sticky:m=!1,disableAnchorTracking:h=!1,collisionAvoidance:g=Wc}=e,_=vr(e,mh),{store:v}=$m(),y=lh(),b=il(),x=v.useState(`floatingRootContext`),S=v.useState(`mounted`),C=v.useState(`open`),w=v.useState(`openChangeReason`),T=v.useState(`activeTriggerElement`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`positionerElement`),k=v.useState(`instantType`),A=v.useState(`transitionStatus`),j=v.useState(`hasViewport`),M=R(null),N=Po(O,!1,!1),P=yf({anchor:a,floatingRootContext:x,positionMethod:o,mounted:S,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:b,collisionAvoidance:g,adaptiveOrigin:j?gf:void 0}),ee=x.useState(`domReferenceElement`);W(()=>{let e=ee,t=M.current;if(e&&(M.current=e),t&&e&&e!==t){v.set(`instantType`,void 0);let e=new AbortController;return N(()=>{v.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[ee,N,v]),Lf(C&&E===!0&&w!==`trigger-hover`,D===`touch`,O,T);let te=Le(e=>{v.set(`positionerElement`,e)},[v]),F=Df(e,{open:C,side:P.side,align:P.align,anchorHidden:P.anchorHidden,instant:k},{styles:P.positionerStyles,transitionStatus:A,props:_,refs:[t,te],hidden:!S,inert:!C});return Eo(fh.Provider,{value:P,children:[S&&E===!0&&w!==`trigger-hover`&&Eo(Ef,{ref:v.context.internalBackdropRef,inert:cf(!C),cutout:T}),Eo(al,{id:b,children:F})]})});V();let gh=me(void 0);function _h(){let[e,t]=Me(0),n=La(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:z(()=>({register:n}),[n]),hasClosePart:e>0}}function vh(e){let{value:t,children:n}=e;return Eo(gh.Provider,{value:t,children:n})}function yh(){let e=Re(gh);W(()=>e==null?void 0:e.register(),[e])}V();let bh=[`render`,`className`,`style`,`initialFocus`,`finalFocus`],xh=U(U({},Zi),Vi),Sh=yt(function(e,t){var n;let{render:r,className:i,style:a,initialFocus:o,finalFocus:s}=e,c=vr(e,bh),{store:l}=$m(),u=ph(),d=Jd(!0)!=null,{context:f,hasClosePart:p}=_h(),m=l.useState(`open`),h=l.useState(`openMethod`),g=l.useState(`instantType`),_=l.useState(`transitionStatus`),v=l.useState(`popupProps`),y=l.useState(`titleElementId`),b=l.useState(`descriptionElementId`),x=l.useState(`modal`),S=l.useState(`mounted`),C=l.useState(`openChangeReason`),w=l.useState(`activeTriggerElement`),T=l.useState(`floatingRootContext`),E=T.useState(`floatingId`),D=l.useState(`disabled`),O=l.useState(`openOnHover`),k=l.useState(`closeDelay`),A=(n=c.id)==null?E:n;Fo({open:m,ref:l.context.popupRef,onComplete(){if(m){var e,t;(e=(t=l.context).onOpenChangeComplete)==null||e.call(t,!0)}}}),jd(T,{enabled:O&&!D,closeDelay:k});let j=o===void 0?td(l.context.popupRef):o,M=x!==!1&&p;l.useSyncedValue(`focusManagerModal`,M);let N=Le(e=>{l.set(`popupElement`,e)},[l]),P=Mi(`div`,e,{state:{open:m,side:u.side,align:u.align,instant:g,transitionStatus:_},ref:[t,l.context.popupRef,N],props:[v,U(U({id:A,role:`dialog`},ed),{},{"aria-labelledby":y,"aria-describedby":b,onKeyDown(e){d&&Qd.has(e.key)&&e.stopPropagation()}}),$d(_),c],stateAttributesMapping:xh});return Eo(ml,{context:T,openInteractionType:h,modal:M,disabled:!S||C===`trigger-hover`,initialFocus:j,returnFocus:s,restoreFocus:`popup`,previousFocusableElement:ha(w)?w:void 0,nextFocusableElement:l.context.triggerFocusTargetRef,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:Eo(vh,{value:f,children:P})})});V();let Ch=[`render`,`className`,`style`],wh=yt(function(e,t){let{render:n,className:r,style:i}=e,a=vr(e,Ch),{store:o}=$m(),s=o.useState(`open`),{arrowRef:c,side:l,align:u,arrowUncentered:d,arrowStyles:f}=ph();return Mi(`div`,e,{state:{open:s,side:l,align:u,uncentered:d},ref:[t,c],props:[{style:f,"aria-hidden":!0},a],stateAttributesMapping:Zi})});V();let Th=[`render`,`className`,`style`],Eh=yt(function(e,t){let{render:n,className:r,style:i}=e,a=vr(e,Th),{store:o}=$m(),s=xo(a.id);return o.useSyncedValueWithCleanup(`titleElementId`,s),Mi(`h2`,e,{ref:t,props:[{id:s},a]})});V();let Dh=[`render`,`className`,`style`,`disabled`,`nativeButton`],Oh=yt(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0}=e,s=vr(e,Dh),{buttonRef:c,getButtonProps:l}=Wa({disabled:a,focusableWhenDisabled:!1,native:o}),{store:u}=$m();return yh(),Mi(`button`,e,{ref:[t,c],props:[{onClick(e){u.setOpen(!1,wo(`close-press`,e.nativeEvent))}},s,l]})});var kh;function Ah(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var jh=Ah();function Mh(e){jh=e}var Nh={exec:()=>null};function Ph(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Ih.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Fh=(()=>{try{return!0}catch(e){return!1}})(),Ih={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:RegExp(`[\\p{L}\\p{N}]`,`u`),escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},Lh=/^(?:[ \t]*(?:\n|$))+/,Rh=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,zh=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Bh=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Vh=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Hh=/(?:[*+-]|\d{1,9}[.)])/,Uh=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wh=Ph(Uh).replace(/bull/g,Hh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Gh=Ph(Uh).replace(/bull/g,Hh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Kh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,qh=/^[^\n]+/,Jh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Yh=Ph(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Jh).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Xh=Ph(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Hh).getRegex(),Zh=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Qh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$h=Ph(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Qh).replace(`tag`,Zh).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),eg=Ph(Kh).replace(`hr`,Bh).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Zh).getRegex(),tg={blockquote:Ph(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,eg).getRegex(),code:Rh,def:Yh,fences:zh,heading:Vh,hr:Bh,html:$h,lheading:Wh,list:Xh,newline:Lh,paragraph:eg,table:Nh,text:qh},ng=Ph(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Bh).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Zh).getRegex(),rg=U(U({},tg),{},{lheading:Gh,table:ng,paragraph:Ph(Kh).replace(`hr`,Bh).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,ng).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Zh).getRegex()}),ig=U(U({},tg),{},{html:Ph(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Qh).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Nh,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ph(Kh).replace(`hr`,Bh).replace(`heading`,` *#{1,6} *[^
|
|
27
27
|
]`).replace(`lheading`,Wh).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()}),ag=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,og=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,sg=/^( {2,}|\\)\n(?!\s*$)/,cg=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,lg=RegExp(`[\\p{P}\\p{S}]`,`u`),ug=RegExp(`[\\s\\p{P}\\p{S}]`,`u`),dg=RegExp(`[^\\s\\p{P}\\p{S}]`,`u`),fg=Ph(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,ug).getRegex(),pg=RegExp(`(?!~)[\\p{P}\\p{S}]`,`u`),mg=RegExp(`(?!~)[\\s\\p{P}\\p{S}]`,`u`),hg=RegExp(`(?:[^\\s\\p{P}\\p{S}]|~)`,`u`),gg=Ph(/link|precode-code|html/,`g`).replace(`link`,RegExp("\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)",``)).replace(`precode-`,Fh?"(?<!`)()":"(^^|[^`])").replace(`code`,RegExp("(?<b>`+)[^`]+\\k<b>(?!`)",``)).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),_g=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,vg=Ph(_g,`u`).replace(/punct/g,lg).getRegex(),yg=Ph(_g,`u`).replace(/punct/g,pg).getRegex(),bg=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,xg=Ph(bg,`gu`).replace(/notPunctSpace/g,dg).replace(/punctSpace/g,ug).replace(/punct/g,lg).getRegex(),Sg=Ph(bg,`gu`).replace(/notPunctSpace/g,hg).replace(/punctSpace/g,mg).replace(/punct/g,pg).getRegex(),Cg=Ph(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,dg).replace(/punctSpace/g,ug).replace(/punct/g,lg).getRegex(),wg=Ph(/\\(punct)/,`gu`).replace(/punct/g,lg).getRegex(),Tg=Ph(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Eg=Ph(Qh).replace(`(?:-->|$)`,`-->`).getRegex(),Dg=Ph(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,Eg).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Og=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,kg=Ph(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,Og).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ag=Ph(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Og).replace(`ref`,Jh).getRegex(),jg=Ph(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Jh).getRegex(),Mg=Ph(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Ag).replace(`nolink`,jg).getRegex(),Ng=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Pg={_backpedal:Nh,anyPunctuation:wg,autolink:Tg,blockSkip:gg,br:sg,code:og,del:Nh,emStrongLDelim:vg,emStrongRDelimAst:xg,emStrongRDelimUnd:Cg,escape:ag,link:kg,nolink:jg,punctuation:fg,reflink:Ag,reflinkSearch:Mg,tag:Dg,text:cg,url:Nh},Fg=U(U({},Pg),{},{link:Ph(/^!?\[(label)\]\((.*?)\)/).replace(`label`,Og).getRegex(),reflink:Ph(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,Og).getRegex()}),Ig=U(U({},Pg),{},{emStrongRDelimAst:Sg,emStrongLDelim:yg,url:Ph(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,Ng).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Ph(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,Ng).getRegex()}),Lg=U(U({},Ig),{},{br:Ph(sg).replace(`{2,}`,`*`).getRegex(),text:Ph(Ig.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()}),Rg={normal:tg,gfm:rg,pedantic:ig},zg={normal:Pg,gfm:Ig,breaks:Lg,pedantic:Fg},Bg={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},Vg=e=>Bg[e];function Hg(e,t){if(t){if(Ih.escapeTest.test(e))return e.replace(Ih.escapeReplace,Vg)}else if(Ih.escapeTestNoEncode.test(e))return e.replace(Ih.escapeReplaceNoEncode,Vg);return e}function Ug(e){try{e=encodeURI(e).replace(Ih.percentDecode,`%`)}catch(e){return null}return e}function Wg(e,t){var n;let r=e.replace(Ih.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Ih.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!((n=r.at(-1))!=null&&n.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push(``);for(;i<r.length;i++)r[i]=r[i].trim().replace(Ih.slashPipe,`|`);return r}function Gg(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Kg(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function qg(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function Jg(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
28
28
|
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
|
|
29
29
|
`)}var Yg=class{constructor(e){H(this,`options`,void 0),H(this,`rules`,void 0),H(this,`lexer`,void 0),this.options=e||jh}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:Gg(e,`
|