vendor: 4,123 bytes, line 1
1import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{t as n}from"./jsx-runtime-CFwixLRt.js";import{t as r}from"./compiler-runtime-KOEWgTh7.js";import{S as i,T as a,g as o,h as s,m as c,y as l}from"./transition-CCm9qPvO.js";var u=e=>e?.ownerDocument??document,d=e=>e&&`window`in e&&e.window===e?e:u(e).defaultView||window;function f(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function p(e){return f(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&`host`in e}var m=!1;function h(){return m}function g(e,t){if(!h())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n=n.tagName===`SLOT`&&n.assignedSlot?n.assignedSlot.parentNode:p(n)?n.host:n.parentNode}return!1}var _=(e=document)=>{if(!h())return e.activeElement;let t=e.activeElement;for(;t&&`shadowRoot`in t&&t.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t};function v(e){if(h()&&e.target instanceof Element&&e.target.shadowRoot){if(`composedPath`in e)return e.composedPath()[0]??null;if(`composedPath`in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return e.target}function ee(e){if(te())e.focus({preventScroll:!0});else{let t=ne(e);e.focus(),re(t)}}var y=null;function te(){if(y==null){y=!1;try{document.createElement(`div`).focus({get preventScroll(){return y=!0,!0}})}catch{}}return y}function ne(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function re(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var b=e(t(),1),ie=typeof document<`u`?b.useLayoutEffect:()=>{};function x(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function ae(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function S(e){let t=(0,b.useRef)({isFocused:!1,observer:null});return ie(()=>{let e=t.current;return()=>{e.observer&&=(e.observer.disconnect(),null)}},[]),(0,b.useCallback)(n=>{let r=v(n);if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){t.current.isFocused=!0;let n=r;n.addEventListener(`focusout`,r=>{if(t.current.isFocused=!1,n.disabled){let t=x(r);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){t.current.observer?.disconnect();let e=n===_()?null:_();n.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:e})),n.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:e}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:[`disabled`]})}},[e])}function C(e){if(typeof window>`u`||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function w(e){return typeof window<`u`&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function T(e){let t=null;return()=>(t??=e(),t)}var E=T(function(){return w(/^Mac/i)}),oe=T(function(){return w(/^iPad/i)||E()&&navigator.maxTouchPoints>1}),se=T(function(){return C(/AppleWebKit/i)&&!ce()}),ce=T(function(){return C(/Chrome/i)}),le=T(function(){return C(/Android/i)}),ue=T(function(){return C(/Firefox/i)});function de(e){return e.pointerType===``&&e.isTrusted?!0:le()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function D(e,t,n=!0){let{metaKey:r,ctrlKey:i,altKey:a,shiftKey:o}=t;ue()&&window.event?.type?.startsWith(`key`)&&e.target===`_blank`&&(E()?r=!0:i=!0);let s=se()&&E()&&!oe()?new KeyboardEvent(`keydown`,{keyIdentifier:`Enter`,metaKey:r,ctrlKey:i,altKey:a,shift
1Key:o}):new MouseEvent(`click`,{metaKey:r,ctrlKey:i,altKey:a,shiftKey:o,detail:1,bubbles:!0,cancelable:!0});D.isOpening=n,ee(e),e.dispatchEvent(s),D.isOpening=!1}D.isOpening=!1;var O=null,k=new Set,A=new Map,j=!1,M=!1,fe={Tab:!0,Escape:!0};function N(e,t){for(let n of k)n(e,t)}function pe(e){return!(e.metaKey||!E()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}function P(e){j=!0,!D.isOpening&&pe(e)&&(O=`keyboard`,N(`keyboard`,e))}function F(e){O=`pointer`,`pointerType`in e&&e.pointerType,(e.type===`mousedown`||e.type===`pointerdown`)&&(j=!0,N(`pointer`,e))}function I(e){!D.isOpening&&de(e)&&(j=!0,O=`virtual`)}function L(e){let t=d(v(e)),n=u(v(e));v(e)===t||v(e)===n||!e.isTrusted||(!j&&!M&&(O=`virtual`,N(`virtual`,e)),j=!1,M=!1)}function R(){j=!1,M=!0}function z(e){if(typeof window>`u`||typeof document>`u`)return;let t=d(e),n=u(e);if(A.get(t))return;let r=t.HTMLElement.prototype.focus;Reflect.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){j=!0,r.apply(this,arguments)}}),n.addEventListener(`keydown`,P,!0),n.addEventListener(`keyup`,P,!0),n.addEventListener(`click`,I,!0),t.addEventListener(`focus`,L,!0),t.addEventListener(`blur`,R,!1),typeof PointerEvent<`u`&&(n.addEventListener(`pointerdown`,F,!0),n.addEventListener(`pointermove`,F,!0),n.addEventListener(`pointerup`,F,!0)),t.addEventListener(`beforeunload`,()=>{B(e)},{once:!0}),A.set(t,{focus:r})}var B=(e,t)=>{let n=d(e),r=u(e);t&&r.removeEventListener(`DOMContentLoaded`,t),A.has(n)&&(Reflect.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:A.get(n).focus}),r.removeEventListener(`keydown`,P,!0),r.removeEventListener(`keyup`,P,!0),r.removeEventListener(`click`,I,!0),n.removeEventListener(`focus`,L,!0),n.removeEventListener(`blur`,R,!1),typeof PointerEvent<`u`&&(r.removeEventListener(`pointerdown`,F,!0),r.removeEventListener(`pointermove`,F,!0),r.removeEventListener(`pointerup`,F,!0)),A.delete(n))};function me(e){let t=u(e),n;return t.readyState===`loading`?(n=()=>{z(e)},t.addEventListener(`DOMContentLoaded`,n)):z(e),()=>B(e,n)}typeof document<`u`&&me();function V(){return O!==`pointer`}var he=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function ge(e,t,n){let r=n?v(n):void 0,i=u(r),a=d(r),o=a===void 0?HTMLInputElement:a.HTMLInputElement,s=a===void 0?HTMLTextAreaElement:a.HTMLTextAreaElement,c=a===void 0?HTMLElement:a.HTMLElement,l=a===void 0?KeyboardEvent:a.KeyboardEvent,f=_(i);return e=e||f instanceof o&&!he.has(f.type)||f instanceof s||f instanceof c&&f.isContentEditable,!(e&&t===`keyboard`&&n instanceof l&&!fe[n.key])}function _e(e,t,n){z(),(0,b.useEffect)(()=>{if(n?.enabled===!1)return;let t=(t,r)=>{ge(!!n?.isTextInput,t,r)&&e(V())};return k.add(t),()=>{k.delete(t)}},t)}function ve(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e,a=(0,b.useCallback)(e=>{if(v(e)===e.currentTarget)return r&&r(e),i&&i(!1),!0},[r,i]),o=S(a),s=(0,b.useCallback)(e=>{let t=v(e),r=u(t),a=r?_(r):_();t===e.currentTarget&&t===a&&(n&&n(e),i&&i(!0),o(e))},[i,n,o]);return{focusProps:{onFocus:!t&&(n||i||r)?s:void 0,onBlur:!t&&(r||i)?a:void 0}}}function ye(){let e=(0,b.useRef)(new Map),t=(0,b.useCallback)((t,n,r,i)=>{let a=i?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:a,options:i}),t.addEventListener(n,a,i)},[]),n=(0,b.useCallback)((t,n,r,i)=>{let a=e.current.get(r)?.fn||r;t.removeEventListener(n,a,i),e.current.delete(r)},[]),r=(0,b.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,b.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function be(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=(0,b.useRef)({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:s}=ye(),c=(0,b.useCallback)(e=>{g(e.currentTarget,v(e))&&a.current.isFocusWithin&&!g(e.currentTarget,e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),n&&n(e),i&&i(!1))},[n,i,a,s]),l=S(c),d=(0,b.useCallback)(e=>{if(!g(e.currentTarget,v(e)))return;let t=v(e),n=u(t),s=_(n);if(!a.current.isFocusWithin&&s===t){r&&r(e),i&&i(!0),a.current.isFocusWithin=!0,l(e);let t=e.currentTarget;o(n,`focus`,e=>{let r=v(e);if(a.current.isFocusWithin&&!g(t,r)){let e=new n.defaultView.FocusEvent(`blur`,{relatedTarget:r});ae(e,t);let i=x(e);c(i)}},{capture:!0})}},[r,i,l,o,c]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}
1:{focusWithinProps:{onFocus:d,onBlur:c}}}function H(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=(0,b.useRef)({isFocused:!1,isFocusVisible:t||V()}),[a,o]=(0,b.useState)(!1),[s,c]=(0,b.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),l=(0,b.useCallback)(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),u=(0,b.useCallback)(e=>{i.current.isFocused=e,i.current.isFocusVisible=V(),o(e),l()},[l]);_e(e=>{i.current.isFocusVisible=e,l()},[n,a],{enabled:a,isTextInput:n});let{focusProps:d}=ve({isDisabled:r,onFocusChange:u}),{focusWithinProps:f}=be({isDisabled:!r,onFocusWithinChange:u});return{isFocused:a,isFocusVisible:s,focusProps:r?f:d}}var U=!1,W=0;function xe(){U=!0,setTimeout(()=>{U=!1},500)}function G(e){e.pointerType===`touch`&&xe()}function Se(){let e=u(null);if(e!==void 0)return W===0&&typeof PointerEvent<`u`&&e.addEventListener(`pointerup`,G),W++,()=>{W--,!(W>0)&&typeof PointerEvent<`u`&&e.removeEventListener(`pointerup`,G)}}function K(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,o]=(0,b.useState)(!1),s=(0,b.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:``,target:null}).current;(0,b.useEffect)(Se,[]);let{addGlobalListener:c,removeAllGlobalListeners:l}=ye(),{hoverProps:d,triggerHoverEnd:f}=(0,b.useMemo)(()=>{let e=(e,r)=>{if(s.pointerType=r,i||r===`touch`||s.isHovered||!g(e.currentTarget,v(e)))return;s.isHovered=!0;let l=e.currentTarget;s.target=l,c(u(v(e)),`pointerover`,e=>{s.isHovered&&s.target&&!g(s.target,v(e))&&a(e,e.pointerType)},{capture:!0}),t&&t({type:`hoverstart`,target:l,pointerType:r}),n&&n(!0),o(!0)},a=(e,t)=>{let i=s.target;s.pointerType=``,s.target=null,!(t===`touch`||!s.isHovered||!i)&&(s.isHovered=!1,l(),r&&r({type:`hoverend`,target:i,pointerType:t}),n&&n(!1),o(!1))},d={};return typeof PointerEvent<`u`&&(d.onPointerEnter=t=>{U&&t.pointerType===`mouse`||e(t,t.pointerType)},d.onPointerLeave=e=>{!i&&g(e.currentTarget,v(e))&&a(e,e.pointerType)}),{hoverProps:d,triggerHoverEnd:a}},[t,n,r,i,s,c,l]);return(0,b.useEffect)(()=>{i&&f({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:d,isHovered:a}}function q(e){return a.isServer?null:e==null?document:e?.ownerDocument??document}function J(e){return a.isServer?null:e==null?document:(e?.getRootNode)?.call(e)??document}function Y(e){return J(e)?.activeElement??null}function Ce(e){return Y(e)===e}function we(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Te(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function X({disabled:e=!1}={}){let t=(0,b.useRef)(null),[n,r]=(0,b.useState)(!1),a=i(),o=l(()=>{t.current=null,r(!1),a.dispose()}),s=l(e=>{if(a.dispose(),t.current===null){t.current=e.currentTarget,r(!0);{let n=q(e.currentTarget);a.addEventListener(n,`pointerup`,o,!1),a.addEventListener(n,`pointermove`,e=>{if(t.current){let n=we(e);r(Te(n,t.current.getBoundingClientRect()))}},!1),a.addEventListener(n,`pointercancel`,o,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:s,onPointerUp:o,onClick:o}}}function Z(e){return(0,b.useMemo)(()=>e,Object.values(e))}var Ee=(0,b.createContext)(void 0);function Q(){return(0,b.useContext)(Ee)}function De({value:e,children:t}){return b.createElement(Ee.Provider,{value:e},t)}var Oe=`button`;function ke(e,t){let n=Q(),{disabled:r=n||!1,autoFocus:i=!1,...a}=e,{isFocusVisible:o,focusProps:l}=H({autoFocus:i}),{isHovered:u,hoverProps:d}=K({isDisabled:r}),{pressed:f,pressProps:p}=X({disabled:r}),m=s({ref:t,type:a.type??`button`,disabled:r||void 0,autoFocus:i},l,d,p),h=Z({disabled:r,hover:u,focus:o,active:f,autofocus:i});return c()({ourProps:m,theirProps:a,slot:h,defaultTag:Oe,name:`Button`})}var Ae=o(ke),je=r(),$=n();function Me(e){let t=(0,je.c)(6),{className:n,testId:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(`circle`,{cx:`8`,cy:`8`,r:`7`,style:{fill:`none`,stroke:`currentcolor`,strokeWidth:1.5,strokeDasharray:60,strokeDashoffset:50}}),t[0]=i):i=t[0];let a;t[1]===r?a=t[2]:(a=(0,$.jsx)(`svg`,{viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,className:`w-full h-full animate-spin`,"data-testid":r,children:i}),t[1]=r,t[2]=a);let o;return t[3]!==n||t[4]!==a?(o=(0,$.jsx)(`div`,{className:n,children:a}),t[3]=n,t[4]=a,t[5]=o):o=t[5],o}function Ne(e){return e.join()}var Pe=e=>[`string`,`number`,`bigint`,`boolean`].includes(typeof e);function Fe(e){return typeof e==`string`?e.trim().length>0:!1}function Ie(e){return typeof e==`number`?typeof e==`number`:!1}export{Me as a,De as c,Ce as d,Y as f,H as g,K as h,Ne as i,Z as l,J as m,Fe as n,Ae as o,q as p,Pe as r,Q as s,Ie as t,X as u}; 2//# sourceMappingURL=utilities-DZ1BtqgC.js.map
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.