PageSourceSearch

https://to-md.org/assets/useCompositeListItem-CIkrUWnT.js

js to-md.org collected 2026-10-08 08:30:47 UTC 37,902 bytes, 1 lines download raw bytes

vendor: 4,284 bytes, line 1
1import{Lg as e,Rg as t,Ug as n,zg as r}from"./messages-B7vy2gX4.js";import{B as i,C as a,E as o,P as s,S as c,_ as l,a as u,b as d,c as f,d as p,f as m,g as h,h as g,k as _,l as v,m as y,o as b,p as x,s as S,u as C,v as w,w as T,z as E}from"./button-scB-LEnO.js";import{A as D,O as ee,U as O,V as k,_ as A,b as j,j as M,k as N,l as te,o as P,t as ne,v as re,w as ie,y as ae}from"./createBaseUIEventDetails-DqK8p_0w.js";import{At as F,Bt as oe,C as se,Ct as I,Dt as L,Et as R,Ft as z,Gt as B,Ht as V,I as ce,It as H,K as U,L as le,Lt as W,Mt as G,Nt as K,Ot as ue,Pt as q,Rt as J,St as Y,Tt as de,V as fe,Vt as pe,_t as me,bt as X,dt as he,ft as ge,gt as _e,ht as ve,jt as Z,kt as ye,lt as be,mt as xe,pt as Se,ut as Ce,v as we,vt as Te,wt as Ee,xt as Q,yt as De}from"./useOpenInteractionType-BwaDuis4.js";var $=n(r(),1);function Oe(e,t,n){let{reference:r,floating:i}=e,a=K(t),o=Ee(t),s=R(o),c=G(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(I(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function ke(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Q(t,e),p=Z(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=H(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=H(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ae=50,je=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ke},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Oe(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Ae&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Oe(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Me=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Q(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=G(r),_=K(o),v=G(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[F(o)]:L(o)),x=p!==`none`;!d&&x&&b.push(...ye(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=de(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==K(t))||T.every(e=>K(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=K(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>
vendor: 4,160 bytes, line 1
1e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Ne(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pe(e){return J.some(t=>e[t]>=0)}var Fe=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Q(e,t);switch(i){case`referenceHidden`:{let e=Ne(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Pe(e)}}}case`escaped`:{let e=Ne(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Pe(e)}}}default:return{}}}}},Ie=new Set([`left`,`top`]);async function Le(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=G(n),s=I(n),c=K(n)===`y`,l=Ie.has(o)?-1:1,u=a&&c?-1:1,d=Q(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Re=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Le(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},ze=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Q(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=K(G(i)),p=ue(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=De(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=De(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Be=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Q(e,t),u={x:n,y:r},d=K(i),f=ue(d),p=u[f],m=u[d],h=Q(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Ie.has(G(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Ve=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Q(e,t),u=await o.detectOverflow(t,l),d=G(i),f=I(i),p=K(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=z(h-u[g],v),x=z(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=q(u.left,0),t=q(u.right,0),n=q(u.top,0),r=q(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:q(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:q(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function He(e){let t=b(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=l(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=W(n)!==a||W(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ue(e){return h(e)?e:e.contextElement}function We(e){let t=Ue(e);if(!l(t))return X(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=He(t),o=(a?W(n.width):n.width)/r,s=(a?W(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ge=X(0);function Ke(e){let t=y(e);
vendor: 5,679 bytes, line 1
1return!T()||!t.visualViewport?Ge:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==y(e)?!1:t}function Je(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ue(e),o=X(1);t&&(r?h(r)&&(o=We(r)):o=We(e));let s=qe(a,n,r)?Ke(a):X(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=y(a),t=r&&h(r)?y(r):r,n=e,i=v(n);for(;i&&r&&t!==n;){let e=We(i),t=i.getBoundingClientRect(),r=b(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=y(i),i=v(n)}}return H({width:u,height:d,x:c,y:l})}function Ye(e,t){let n=p(e).scrollLeft;return t?t.left+n:Je(f(e)).left+n}function Xe(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ye(e,n),y:n.top+t.scrollTop}}function Ze(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,o=i===`fixed`,s=f(r),c=t?a(t.floating):!1;if(r===s||c&&o)return n;let u={scrollLeft:0,scrollTop:0},m=X(1),h=X(0),g=l(r);if((g||!g&&!o)&&((C(r)!==`body`||d(s))&&(u=p(r)),g)){let e=Je(r);m=We(r),h.x=e.x+r.clientLeft,h.y=e.y+r.clientTop}let _=s&&!g&&!o?Xe(s,u):X(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-u.scrollLeft*m.x+h.x+_.x,y:n.y*m.y-u.scrollTop*m.y+h.y+_.y}}function Qe(e){return Array.from(e.getClientRects())}function $e(e){let t=f(e),n=p(e),r=e.ownerDocument.body,i=q(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=q(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Ye(e),s=-n.scrollTop;return b(r).direction===`rtl`&&(o+=q(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var et=25;function tt(e,t){let n=y(e),r=f(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=T();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Ye(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=et&&(a-=o)}else l<=et&&(a+=l);return{width:a,height:o,x:s,y:c}}function nt(e,t){let n=Je(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=l(e)?We(e):X(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function rt(e,t,n){let r;if(t===`viewport`)r=tt(e,n);else if(t===`document`)r=$e(f(e));else if(h(t))r=nt(t,n);else{let n=Ke(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return H(r)}function it(e,t){let n=x(e);return n===t||!h(n)||w(n)?!1:b(n).position===`fixed`||it(n,t)}function at(e,t){let n=t.get(e);if(n)return n;let r=m(e,[],!1).filter(e=>h(e)&&C(e)!==`body`),i=null,a=b(e).position===`fixed`,o=a?x(e):e;for(;h(o)&&!w(o);){let t=b(o),n=g(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||d(o)&&!n&&it(e,o))?r=r.filter(e=>e!==o):i=t,o=x(o)}return t.set(e,r),r}function ot(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,o=[...n===`clippingAncestors`?a(t)?[]:at(t,this._c):[].concat(n),r],s=rt(t,o[0],i),c=s.top,l=s.right,u=s.bottom,d=s.left;for(let e=1;e<o.length;e++){let n=rt(t,o[e],i);c=q(n.top,c),l=z(n.right,l),u=z(n.bottom,u),d=q(n.left,d)}return{width:l-d,height:u-c,x:d,y:c}}function st(e){let{width:t,height:n}=He(e);return{width:t,height:n}}function ct(e,t,n){let r=l(t),i=f(t),a=n===`fixed`,o=Je(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=X(0);function u(){c.x=Ye(i)}if(r||!r&&!a)if((C(t)!==`body`||d(i))&&(s=p(t)),r){let e=Je(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&u();a&&!r&&i&&u();let m=i&&!r&&!a?Xe(i,s):X(0);return{x:o.left+s.scrollLeft-c.x-m.x,y:o.top+s.scrollTop-c.y-m.y,width:o.width,height:o.height}}function lt(e){return b(e).position===`static`}function ut(e,t){if(!l(e)||b(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return f(e)===n&&(n=n.ownerDocument.body),n}function dt(e,t){let n=y(e);if(a(e))return n;if(!l(e)){let t=x(e);for(;t&&!w(t);){if(h(t)&&!lt(t))return t;t=x(t)}return n}let r=ut(e,t);for(;r&&c(r)&&lt(r);)r=ut(r,t);return r&&w(r)&&lt(r)&&!g(r)?n:r||S(e)||n}var ft=async function(e){let t=this.getOffsetParent||dt,n=this.getDimensions,r=await n(e.floating);return{reference:ct(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function pt(e){return b(e).direction===`rtl`}var mt={convertOffsetParentRelativeRectToViewportRelativeRect:Ze,getDocumentElement:f,getClippingRect:ot,getOffsetParent:dt,getElementRects:ft,getClientRects:Qe,getDimensions:st,getScale:We,isElement:h,isRTL:pt};function ht(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gt(e,t){let n=null,r,i=f(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Y(d),h=Y(i.clientWidth-(u+f)),g=Y(i.clientHeight-(d+p)),_=Y(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:q(0,z(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!ht(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function _t(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ue(e),u=i||a?[...l?m(l):[],...t?m(t):[]]:[];
vendor: 3,465 bytes, line 1
1u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?gt(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let h,g=c?Je(e):null;c&&_();function _(){let t=Je(e);g&&!ht(g,t)&&n(),g=t,h=requestAnimationFrame(_)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(h)}}var vt=Re,yt=ze,bt=Me,xt=Ve,St=Fe,Ct=Be,wt=(e,t,n)=>{let r=new Map,i={platform:mt,...n},a={...i.platform,_c:r};return je(e,t,{...i,platform:a})},Tt=n(t(),1),Et=typeof document<`u`?$.useLayoutEffect:function(){};function Dt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Dt(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Dt(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ot(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function kt(e,t){let n=Ot(e);return Math.round(t*n)/n}function At(e){let t=$.useRef(e);return Et(()=>{t.current=e}),t}function jt(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=$.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=$.useState(r);Dt(f,r)||p(r);let[m,h]=$.useState(null),[g,_]=$.useState(null),v=$.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=$.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=$.useRef(null),C=$.useRef(null),w=$.useRef(u),T=c!=null,E=At(c),D=At(i),ee=At(l),O=$.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),wt(S.current,C.current,e).then(e=>{let t={...e,isPositioned:ee.current!==!1};k.current&&!Dt(w.current,t)&&(w.current=t,Tt.flushSync(()=>{d(t)}))})},[f,t,n,D,ee]);Et(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let k=$.useRef(!1);Et(()=>(k.current=!0,()=>{k.current=!1}),[]),Et(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,O);O()}},[b,x,O,E,T]);let A=$.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),j=$.useMemo(()=>({reference:b,floating:x}),[b,x]),M=$.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=kt(j.floating,u.x),r=kt(j.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ot(j.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,j.floating,u.x,u.y]);return $.useMemo(()=>({...u,update:O,refs:A,elements:j,floatingStyles:M}),[u,O,A,j,M])}var Mt=(e,t)=>{let n=vt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Nt=(e,t)=>{let n=yt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Pt=(e,t)=>({fn:Ct(e).fn,options:[e,t]}),Ft=(e,t)=>{let n=bt(e);return{name:n.name,fn:n.fn,options:[e,t]}},It=(e,t)=>
1{let n=xt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lt=(e,t)=>{let n=St(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Rt(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=O(),a=ce()!=null,o=E(()=>new se({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new we,floatingId:i,nested:a,noEmit:!1})).current;return u(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=h(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.context.noEmit=!1,o}function zt(e={}){let{nodeId:t,externalTree:n}=e,r=Rt(e),i=e.rootContext||r,a={reference:i.useState(`referenceElement`),floating:i.useState(`floatingElement`),domReference:i.useState(`domReferenceElement`)},[o,s]=$.useState(null),c=$.useRef(null),l=le(n);u(()=>{a.domReference&&(c.current=a.domReference)},[a.domReference]);let d=jt({...e,elements:{...a,...o&&{reference:o}}}),f=$.useCallback(e=>{let t=h(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),d.refs.setReference(t)},[d.refs]),[p,m]=$.useState(null),[g,_]=$.useState(null);i.useSyncedValue(`referenceElement`,p),i.useSyncedValue(`domReferenceElement`,h(p)?p:null),i.useSyncedValue(`floatingElement`,g);let v=$.useCallback(e=>{(h(e)||e===null)&&(c.current=e,m(e)),(h(d.refs.reference.current)||d.refs.reference.current===null||e!==null&&!h(e))&&d.refs.setReference(e)},[d.refs,m]),y=$.useCallback(e=>{_(e),d.refs.setFloating(e)},[d.refs]),b=$.useMemo(()=>({...d.refs,setReference:v,setFloating:y,setPositionReference:f,domReference:c}),[d.refs,v,y,f]),x=$.useMemo(()=>({...d.elements,domReference:a.domReference}),[d.elements,a.domReference]),S=i.useState(`open`),C=i.useState(`floatingId`),w=$.useMemo(()=>({...d,dataRef:i.context.dataRef,open:S,onOpenChange:i.setOpen,events:i.context.events,floatingId:C,refs:b,elements:x,nodeId:t,rootStore:i}),[d,b,x,t,i,S,C]);return u(()=>{i.context.dataRef.current.floatingContext=w;let e=l?.nodesRef.current.find(e=>e.id===t);e&&(e.context=w)}),$.useMemo(()=>({...d,context:w,refs:b,elements:x,rootStore:i}),[d,b,x,w,i])}var Bt=`Escape`;function Vt(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Ht(e,t){return Vt(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function Ut(e,t,n){return Vt(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Wt(e,t,n){return Vt(t,n?e===N:e===D,e===ee)}function Gt(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===Bt:Vt(t,n?e===D:e===N,e===M)}function Kt(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),s=n.context.dataRef,{listRef:c,activeIndex:d,onNavigate:f=()=>{},enabled:p=!0,selectedIndex:m=null,allowEscape:h=!1,loopFocus:g=!1,nested:_=!1,rtl:v=!1,virtual:y=!1,focusItemOnOpen:b=`auto`,focusItemOnHover:x=!0,openOnArrowKeyDown:S=!0,disabledIndices:C=void 0,orientation:w=`vertical`,parentOrientation:T,cols:E=1,id:D,resetOnPointerLeave:ee=!0,externalTree:O}=t,M=U(ae(i)),N=ce(),F=le(O);u(()=>{s.current.orientation=w},[s,w]);let se=ie(a),I=$.useRef(b),L=$.useRef(m??-1),R=$.useRef(null),z=$.useRef(!0),B=o(e=>{f(L.current===-1?null:L.current,e)}),H=$.useRef(B),W=$.useRef(!!i),G=$.useRef(r),K=$.useRef(!1),ue=$.useRef(!1),q=U(C),J=U(r),Y=U(m),de=U(ee),X=o(()=>{function e(e){y?F?.events.emit(`virtualfocus`,e):fe(e,{sync:K.current,preventScroll:!0})}let t=c.current[L.current],n=ue.current;t&&e(t),(K.current?e=>e():requestAnimationFrame)(()=>{let r=c.current[L.current]||t;r&&(t||e(r),Z&&(n||!z.current)&&r.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});u(()=>{p&&(r&&i?(L.current=m??-1,I.current&&m!=null&&(ue.current=!0,B())):W.current&&(L.current=-1,H.current()))},[p,r,i,m,B]),u(()=>{if(p){if(!r){K.current=!1;return}if(i)if(d==null){if(K.current=!1,Y.current!=null)return;if(W.current&&(L.current=-1,X()),(!G.current||!W.current)&&I.current&&(R.current!=null||I.current===!0&&R.current==null)){let e=0,t=()=>{c.current[0]==null?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(L.current=R.current==null||Ut(R.current,w,v)||_?ve(c):xe(c),R.current=null,B())};t()}}else me(c,d)||(L.current=d,X(),ue.current=!1)}},[p,r,i,d,Y,_,c,w,v,B,X,q]),u(()=>{if(!p||i||!F||y||!W.current)return;let e=F.nodesRef.current,t=e.find(e=>e.id===N)?.context?.elements.floating,n=A(k(i)),r=e.some(e=>e.context&&re(e.context.elements.floating,n));t&&!r&&z.current&&t.focus({preventScroll:!0})},[p,i,F,N,y]),u(()=>{H.current=B,G.current=r,W.current=!!i}),u(()=>{r||(R.current=null,I.current=b)},[r,b]);let _e=d!=null,Z=$.useMemo(()=>{function e(e){if(!J.current)return;let t=c.current.indexOf(e.currentTarget);t!==-1&&L.current!==t&&(L.current=t,B(e))}return{onFocus(t){K.current=!0,e(t)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(t){K.current=!0,ue.current=!1,x&&e(t)},onPointerLeave(e){if(!J.current||!z.current||e.pointerType===`touch`)return;K.current=!0;let t=e.relatedTarget;if(!(!x||c.current.includes(t))&&de.current&&(fe(null,{sync:!0}),L.current=-1,B(e),!y)){let e=M.current,t=A(k(e));e&&re(e,t)&&e.focus({preventScroll:!0})}}}},[J,M,x,c,B,de,y]),ye=$.useCallback(()=>T??F?.nodesRef.current.find(e=>e.id===N)?.context?.dataRef?.current.orientation,[N,F,T]),we=o(e
1=>{if(z.current=!1,K.current=!0,e.which===229||!J.current&&e.currentTarget===M.current)return;if(_&&Gt(e.key,w,v,E)){Ht(e.key,ye())||V(e),n.setOpen(!1,ne(te,e.nativeEvent)),l(a)&&(y?F?.events.emit(`virtualfocus`,a):a.focus());return}let t=L.current,i=ve(c,C),o=xe(c,C);if(se||(e.key===`Home`&&(V(e),L.current=i,B(e)),e.key===`End`&&(V(e),L.current=o,B(e))),E>1){let t=Array.from({length:c.current.length},()=>({width:1,height:1})),n=be(t,E,!1),r=n.findIndex(e=>e!=null&&!Te(c,e,C)),a=n.reduce((e,t,n)=>t!=null&&!Te(c,t,C)?n:e,-1),s=n[Se({current:n.map(e=>e==null?null:c.current[e])},{event:e,orientation:w,loopFocus:g,rtl:v,cols:E,disabledIndices:ge([...(typeof C==`function`?null:C)||c.current.map((e,t)=>Te(c,t,C)?t:void 0),void 0],n),minIndex:r,maxIndex:a,prevIndex:he(L.current>o?i:L.current,t,n,E,e.key===`ArrowDown`?`bl`:e.key===(v?`ArrowLeft`:`ArrowRight`)?`tr`:`tl`),stopEvent:!0})];if(s!=null&&(L.current=s,B(e)),w===`both`)return}if(Ht(e.key,w)){if(V(e),r&&!y&&A(e.currentTarget.ownerDocument)===e.currentTarget){L.current=Ut(e.key,w,v)?i:o,B(e);return}Ut(e.key,w,v)?g?t>=o?h&&t!==c.current.length?L.current=-1:(K.current=!1,L.current=i):L.current=Ce(c,{startingIndex:t,disabledIndices:C}):L.current=Math.min(o,Ce(c,{startingIndex:t,disabledIndices:C})):g?t<=i?h&&t!==-1?L.current=c.current.length:(K.current=!1,L.current=o):L.current=Ce(c,{startingIndex:t,decrement:!0,disabledIndices:C}):L.current=Math.max(i,Ce(c,{startingIndex:t,decrement:!0,disabledIndices:C})),me(c,L.current)&&(L.current=-1),B(e)}}),Ee=$.useMemo(()=>y&&r&&_e&&{"aria-activedescendant":`${D}-${d}`},[y,r,_e,D,d]),Q=$.useMemo(()=>({"aria-orientation":w===`both`?void 0:w,...se?{}:Ee,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&r&&!y){let t=j(e.nativeEvent);if(t&&!re(M.current,t))return;V(e),n.setOpen(!1,ne(P,e.nativeEvent)),l(a)&&a.focus();return}we(e)},onPointerMove(){z.current=!0}}),[Ee,we,M,w,se,n,r,y,a]),De=$.useMemo(()=>{function e(e){b===`auto`&&oe(e.nativeEvent)&&(I.current=!y)}function t(e){I.current=b,b===`auto`&&pe(e.nativeEvent)&&(I.current=!0)}return{onKeyDown(e){let t=n.select(`open`);z.current=!1;let r=e.key.startsWith(`Arrow`),i=Wt(e.key,ye(),v),a=Ht(e.key,w),o=(_?i:a)||e.key===`Enter`||e.key.trim()===``;if(y&&t)return we(e);if(!(!t&&!S&&r)){if(o){let t=Ht(e.key,ye());R.current=_&&t?null:e.key}if(_){i&&(V(e),t?(L.current=ve(c,q.current),B(e)):n.setOpen(!0,ne(te,e.nativeEvent,e.currentTarget)));return}a&&(Y.current!=null&&(L.current=Y.current),V(e),!t&&S?n.setOpen(!0,ne(te,e.nativeEvent,e.currentTarget)):we(e),t&&B(e))}},onFocus(e){n.select(`open`)&&!y&&(L.current=-1,B(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[we,q,b,c,_,B,n,S,w,ye,v,Y,y]),Oe=$.useMemo(()=>({...Ee,...De}),[Ee,De]);return $.useMemo(()=>p?{reference:Oe,floating:Q,item:Z,trigger:De}:{},[p,Oe,Q,De,Z])}function qt(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,i=n.useState(`open`),{listRef:a,elementsRef:s,activeIndex:c,onMatch:l,onTypingChange:d,enabled:f=!0,resetMs:p=750,selectedIndex:m=null}=t,h=B(),g=$.useRef(``),_=$.useRef(m??c??-1),v=$.useRef(null);u(()=>{!i&&m!==null||(h.clear(),v.current=null,g.current!==``&&(g.current=``))},[i,m,h]),u(()=>{i&&g.current===``&&(_.current=m??c??-1)},[i,m,c]);let y=o(e=>{e?r.current.typing||(r.current.typing=e,d?.(e)):r.current.typing&&(r.current.typing=e,d?.(e))}),b=o(e=>{function t(e){let t=s?.current[e];return!t||_e(t)}function n(e,n,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){let r=(i+n)%e.length;if(!(!e[r]?.toLocaleLowerCase().startsWith(a)||!t(r)))return r}return-1}let r=a.current;if(g.current.length>0&&e.key===` `&&(V(e),y(!0)),g.current.length>0&&g.current[0]!==` `&&n(r,g.current)===-1&&e.key!==` `&&y(!1),r==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;i&&e.key!==` `&&(V(e),y(!0));let o=g.current===``;o&&(_.current=m??c??-1),r.every(e=>e?e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase():!0)&&g.current===e.key&&(g.current=``,_.current=v.current),g.current+=e.key,h.start(p,()=>{g.current=``,_.current=v.current,y(!1)});let u=((o?m??c??-1:_.current)??0)+1,d=n(r,g.current,u);d===-1?e.key!==` `&&(g.current=``,y(!1)):(l?.(d),v.current=d)}),x=o(e=>{let t=e.relatedTarget,r=n.select(`domReferenceElement`),i=n.select(`floatingElement`),a=re(r,t),o=re(i,t);a||o||(h.clear(),g.current=``,_.current=v.current,y(!1))}),S=$.useMemo(()=>({onKeyDown:b,onBlur:x}),[b,x]),C=$.useMemo(()=>({onKeyDown:b,onBlur:x}),[b,x]);return $.useMemo(()=>f?{reference:S,floating:C}:{}
1,[f,S,C])}function Jt(e){let t=e.getBoundingClientRect(),n=window.getComputedStyle(e,`::before`),r=window.getComputedStyle(e,`::after`);if(!(n.content!==`none`||r.content!==`none`))return t;let i=parseFloat(n.width)||0,a=parseFloat(n.height)||0,o=parseFloat(r.width)||0,s=parseFloat(r.height)||0,c=Math.max(t.width,i,o),l=Math.max(t.height,a,s),u=c-t.width,d=l-t.height;return{left:t.left-u/2,right:t.right+u/2,top:t.top-d/2,bottom:t.bottom+d/2}}var Yt=$.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Xt(){return $.useContext(Yt)}var Zt=e();function Qt(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=o(i),s=$.useRef(0),c=E(en).current,l=E($t).current,[d,f]=$.useState(0),p=$.useRef(d),m=o((e,t)=>{l.set(e,t??null),p.current+=1,f(p.current)}),h=o(e=>{l.delete(e),p.current+=1,f(p.current)}),g=$.useMemo(()=>{let e=new Map;return Array.from(l.keys()).filter(e=>e.isConnected).sort(tn).forEach((t,n)=>{let r=l.get(t)??{};e.set(t,{...r,index:n})}),e},[l,d]);u(()=>{if(typeof MutationObserver!=`function`||g.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&&(p.current+=1,f(p.current))});return g.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[g]),u(()=>{p.current===d&&(n.current.length!==g.size&&(n.current.length=g.size),r&&r.current.length!==g.size&&(r.current.length=g.size),s.current=g.size),a(g)},[a,g,n,r,d]),u(()=>()=>{n.current=[]},[n]),u(()=>()=>{r&&(r.current=[])},[r]);let _=o(e=>(c.add(e),()=>{c.delete(e)}));u(()=>{c.forEach(e=>e(g))},[c,g]);let v=$.useMemo(()=>({register:m,unregister:h,subscribeMapChange:_,elementsRef:n,labelsRef:r,nextIndexRef:s}),[m,h,_,n,r,s]);return(0,Zt.jsx)(Yt.Provider,{value:v,children:t})}function $t(){return new Map}function en(){return new Set}function tn(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}var nn=$.createContext(void 0);function rn(){return $.useContext(nn)?.direction??`ltr`}var an=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=Q(e,t)||{};if(l==null)return{};let f=Z(u),p={x:n,y:r},m=Ee(i),h=R(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),ee=Math.min(f[y],E),O=D,k=w-g[h]-ee,A=w/2-g[h]/2+T,j=De(O,A,k),M=!c.arrow&&I(i)!=null&&A!==j&&a.reference[h]/2-(A<O?D:ee)-g[h]/2<0,N=M?A<O?A-O:A-k:0;return{[m]:p[m]+N,data:{[m]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),on=(e,t)=>({...an(e),options:[e,t]}),sn={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await Lt().fn(e)).data?.referenceHidden||a}}}},cn={sideX:`left`,sideY:`top`},ln={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=y(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:cn};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=k(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=G(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:cn.sideX,g=f===`top`?`bottom`:cn.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};
1function un(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 dn(e,t,n){let{rects:r,placement:i}=e;return{side:un(t,G(i),n),align:I(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function fn(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:d=!1,arrowPadding:f=5,disableAnchorTracking:p=!1,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shiftCrossAxis:v=!1,nodeId:y,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:S}=e,[C,w]=$.useState(null);!g&&C!==null&&w(null);let T=_.side||`flip`,E=_.align||`flip`,D=_.fallbackAxisSide||`end`,ee=typeof t==`function`?t:void 0,O=o(ee),A=ee?O:t,j=U(t),M=rn()===`rtl`,N=C||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":M?`left`:`right`,"inline-start":M?`right`:`left`}[r],te=a===`center`?N:`${N}-${a}`,P=l,ne=+(r===`bottom`),re=+(r===`top`),ie=+(r===`right`),ae=+(r===`left`);typeof P==`number`?P={top:P+ne,right:P+ae,bottom:P+re,left:P+ie}:P&&={top:(P.top||0)+ne,right:(P.right||0)+ae,bottom:(P.bottom||0)+re,left:(P.left||0)+ie};let F={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:P},oe=$.useRef(null),se=U(i),L=U(s),R=[Mt(e=>{let t=dn(e,r,M),n=typeof se.current==`function`?se.current(t):se.current,i=typeof L.current==`function`?L.current(t):L.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[typeof i==`function`?0:i,typeof s==`function`?0:s,M,r])],z=E===`none`&&T!==`shift`,B=!z&&(d||v||T===`shift`),V=T===`none`?null:Ft({...F,padding:{top:P.top+1,right:P.right+1,bottom:P.bottom+1,left:P.left+1},mainAxis:!v&&T===`flip`,crossAxis:E===`flip`?`alignment`:!1,fallbackAxisSideDirection:D}),ce=z?null:Nt(e=>{let t=k(e.elements.floating).documentElement;return{...F,rootBoundary:v?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:E!==`none`,crossAxis:B,limiter:d||v?void 0:Pt(e=>{if(!oe.current)return{};let{width:t,height:n}=oe.current.getBoundingClientRect(),r=K(G(e.placement)),i=r===`y`?t:n,a=r===`y`?P.left+P.right:P.top+P.bottom;return{offset:i/2+a/2}})}},[F,d,v,P,E]);T===`shift`||E===`shift`||a===`center`?R.push(ce,V):R.push(V,ce),R.push(It({...F,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=window.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`)}}),on(()=>({element:oe.current||document.createElement(`div`),padding:f,offsetParent:`floating`}),[f]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=G(a),l=K(c),u=oe.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(dn(e,r,M)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,B&&l===`y`&&b?S:x),{}}},sn,b),u(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[g,h]);let H=$.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<`u`,layoutShift:!p&&typeof IntersectionObserver<`u`}),[p]),{refs:le,elements:W,x:ue,y:q,middlewareData:J,update:Y,placement:de,context:fe,isPositioned:pe,floatingStyles:me}=zt({rootContext:h,placement:te,middleware:R,strategy:n,whileElementsMounted:m?void 0:(...e)=>_t(...e,H),nodeId:y,externalTree:S}),{sideX:X,sideY:he}=J.adaptiveOrigin||cn,ge=pe?n:`fixed`,_e=$.useMemo(()=>{let e=b?{position:ge,[X]:ue,[he]:q}:{position:ge,...me};return pe||(e.opacity=0),e},[b,ge,X,ue,he,q,me,pe]),ve=$.useRef(null);u(()=>{if(!g)return;let e=j.current,t=typeof e==`function`?e():e,n=(pn(t)?t.current:t)||null;n!==ve.current&&(le.setPositionReference(n),ve.current=n)},[g,le,A,j]),$.useEffect(()=>{if(!g)return;let e=j.current;typeof e!=`function`&&pn(e)&&e.current!==ve.current&&(le.setPositionReference(e.current),ve.current=e.current)},[g,le,A,j]),$.useEffect(()=>{if(m&&g&&W.domReference&&W.floating)return _t(W.domReference,W.floating,Y,H)},[m,g,W,Y,H]);let Z=G(de),ye=un(r,Z,M),be=I(de)||`center`,xe=!!J.hide?.referenceHidden;u(()=>{x&&g&&pe&&w(Z)},[x,g,pe,Z]);let Se=$.useMemo(()=>
1({position:`absolute`,top:J.arrow?.y,left:J.arrow?.x}),[J.arrow]),Ce=J.arrow?.centerOffset!==0;return $.useMemo(()=>({positionerStyles:_e,arrowStyles:Se,arrowRef:oe,arrowUncentered:Ce,side:ye,align:be,physicalSide:Z,anchorHidden:xe,refs:le,context:fe,isPositioned:pe,update:Y}),[_e,Se,oe,Ce,ye,be,Z,xe,le,fe,pe,Y])}function pn(e){return e!=null&&`current`in e}function mn(e){return e===`starting`?_:s}var hn=$.createContext(void 0);function gn(e){let t=$.useContext(hn);if(t===void 0&&!e)throw Error(i(69));return t}var _n=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function vn(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:d,nextIndexRef:f}=Xt(),p=$.useRef(-1),[m,h]=$.useState(a??(i===_n.GuessFromOrder?()=>{if(p.current===-1){let e=f.current;f.current+=1,p.current=e}return p.current}:-1)),g=$.useRef(null),_=$.useCallback(e=>{if(g.current=e,m!==-1&&e!==null&&(l.current[m]=e,d)){let n=t!==void 0;d.current[m]=n?t:r?.current?.textContent??e.textContent}},[m,l,d,t,r]);return u(()=>{if(a!=null)return;let e=g.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),u(()=>{if(a==null)return c(e=>{let t=g.current?e.get(g.current)?.index:null;t!=null&&h(t)})},[a,c,h]),$.useMemo(()=>({ref:_,index:m}),[m,_])}export{fn as a,Qt as c,Kt as d,Rt as f,mn as i,Jt as l,vn as n,ln as o,mt as p,gn as r,rn as s,_n as t,qt as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.