PageSourceSearch

https://imageto.video/assets/useButton-QBftl_xj.js

js imageto.video collected 2026-10-05 00:45:18 UTC 10,827 bytes, 1 lines download raw bytes

1import{a as e,n as t}from"./jsx-runtime-C27Mmbu5.js";function n(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var r=n(`https://base-ui.com/production-error`,`Base UI`),i=e(t()),a={};function o(e,t){let n=i.useRef(a);return n.current===a&&(n.current=e(t)),n}function s(e,t,n,r){let i=o(l).current;return u(i,e,t,n,r)&&f(i,[e,t,n,r]),i.callback}function c(e){let t=o(l).current;return d(t,e)&&f(t,e),t.callback}function l(){return{callback:null,cleanup:null,refs:[]}}function u(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function d(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function f(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var p=19;function m(e){return p>=e}function h(e){if(!i.isValidElement(e))return null;let t=e,n=t.props;return(m(19)?n?.ref:t.ref)??null}function g(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function ee(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function te(e,t){return typeof e==`function`?e(t):e}function ne(e,t){return typeof e==`function`?e(t):e}var _={};function v(e,t,n,r,i){let a={...b(e,_)};return t&&(a=y(a,t)),n&&(a=y(a,n)),r&&(a=y(a,r)),i&&(a=y(a,i)),a}function re(e){if(e.length===0)return _;if(e.length===1)return b(e[0],_);let t={...b(e[0],_)};for(let n=1;n<e.length;n+=1)t=y(t,e[n]);return t}function y(e,t){return oe(t)?t(e):ie(e,t)}function ie(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=g(e.style,r);break;case`className`:e[n]=S(e.className,r);break;default:ae(n,r)?e[n]=se(e[n],r):e[n]=r}}return e}function ae(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function oe(e){return typeof e==`function`}function b(e,t){return oe(e)?e(t):e??_}function se(e,t){return t?e?n=>{if(ce(n)){let r=n;x(r);let i=t(r);return r.baseUIHandlerPrevented||e?.(r),i}let r=t(n);return e?.(n),r}:t:e}function x(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function S(e,t){return t?e?t+` `+e:t:e}function ce(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function le(){}var ue=Object.freeze([]),C=Object.freeze({}),de={style:{transition:`none`}},fe=`data-base-ui-click-trigger`,pe={fallbackAxisSide:`none`},me={fallbackAxisSide:`end`},he={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0};function ge(e,t,n={}){let r=t.render,i=_e(t,n);return n.enabled===!1?null:ye(e,r,i,n.state??C)}function _e(e,t={}){let{className:n,style:r,render:i}=e,{state:a=C,ref:o,props:l,stateAttributesMapping:u,enabled:d=!0}=t,f=d?te(n,a):void 0,p=d?ne(r,a):void 0,m=d?ee(a,u):C,_=d?g(m,Array.isArray(l)?re(l):l)??C:C;return typeof document<`u`&&(d?Array.isArray(o)?_.ref=c([_.ref,h(i),...o]):_.ref=s(_.ref,h(i),o):s(null,null)),d?(f!==void 0&&(_.className=S(_.className,f)),p!==void 0&&(_.style=g(_.style,p)),_):C}var ve=Symbol.for(`react.lazy`);function ye(e,t,n,a){if(t){if(typeof t==`function`)return t(n,a);let e=v(n,t.props);e.ref=n.ref;let r=t;return r?.$$typeof===ve&&(r=i.Children.toArray(t)[0]),i.cloneElement(r,e)}if(e&&typeof e==`string`)return be(e,n);throw Error(r(8))}function be(e,t){return e===`button`?(0,i.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,i.createElement)(`img`,{alt:``,...t,key:t.key}):i.createElement(e,t)}var w=i[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],xe=w&&w!==i.useLayoutEffect?w:e=>e();function T(e){let t=o(Se).current;return t.next=e,xe(t.effect),t.trampoline}function Se(){let e={next:void 0,callback:Ce,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Ce(){}var we={...i},E=0;function Te(e,t=`mui`){let[n,r]=i.useState(e),a=e||n;return i.useEffect(()=>{n??(E+=1,r(`${t}-${E}`))},[n,t]),a}var D=we.useId;function O(e,t){if(D!==void 0){let n=D();return e??(t?`${t}-${n}`:n)}return Te(e,t)}function Ee(e){return O(e,`base-ui`)}function k(){return typeof window<`u`}function A(e){return N(e)?(e.nodeName||``).toLowerCase():`#document`}function j(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function M(e){return((N(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function N(e){return k()?e instanceof Node||e instanceof j(e).Node:!1}function P(e){return k()?e instanceof Element||e instanceof j(e).Element:!1}function F(e){return k()?e instanceof HTMLElement||e instanceof j(e).HTMLElement:!1}function I(e){return!k()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof j(e).ShadowRoot}function L(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function De(e){return/^(table|td|th)$/.test(A(e))}function R(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Oe=/transform|translate|scale|rotate|perspective|filter/,ke=/paint|layout|strict|content/,z=e=>!!e&&e!==`none`,B;function V(e){let t=P(e)?W(e):e;return z(t.transform)||z(t.translate)||z(t.scale)||z(t.rotate)||z(t.perspective)||!H()&&(z(t.backdropFilter)||z(t.filter))||Oe.test(t.willChange||``)||ke.test(t.contain||``)}function Ae(e){let t=G(e);for(;F(t)&&!U(t);){if(V(t))return t;if(R(t))return null;t=G(t)}return null}function H(){return B??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),B}function U(e){return/^(html|body|#document)$/.test(A(e))}function W(e){return j(e).getComputedStyle(e)}function je(e){return P(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function G(e){if(A(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||I(e)&&e.host||M(e);return I(t)?t.host:t}function K(e){let t=G(e);return U(t)?e.ownerDocument?e.ownerDocument.body:e.body:F(t)&&L(t)?t:K(t)}function q(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=K(e),i=r===e.ownerDocument?.body,a=j(r);if(i){let e=J(a);
1return t.concat(a,a.visualViewport||[],L(r)?r:[],e&&n?q(e):[])}else return t.concat(r,q(r,[],n))}function J(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Y=typeof navigator<`u`,X=Re(),Z=Be(),Q=ze(),Me=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),Ne=X.platform===`MacIntel`&&X.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(X.platform);Y&&/firefox/i.test(Q);var Pe=Y&&/apple/i.test(navigator.vendor);Y&&/Edg/i.test(Q);var Fe=Y&&/android/i.test(Z)||/android/i.test(Q),Ie=Y&&Z.toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints,Le=Q.includes(`jsdom/`);function Re(){if(!Y)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function ze(){if(!Y)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function Be(){if(!Y)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}var Ve=typeof document<`u`?i.useLayoutEffect:()=>{},He=`none`,Ue=`trigger-press`,We=`trigger-hover`,Ge=`trigger-focus`,Ke=`outside-press`,qe=`item-press`,Je=`close-press`,Ye=`focus-out`,Xe=`escape-key`,Ze=`list-navigation`,Qe=`cancel-open`,$e=`sibling-open`,et=`disabled`,tt=`imperative-action`,nt=`window-resize`;function rt(e,t,n,r){let i=!1,a=!1,o=r??C;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var it=i.createContext(void 0);function at(e=!1){let t=i.useContext(it);if(t===void 0&&!e)throw Error(r(16));return t}function ot(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:a=0,isNativeButton:o}=e,s=r&&t!==!1,c=r&&t===!1;return{props:i.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=a,!o&&n&&(e.tabIndex=t?a:-1)),(o&&(t||s)||!o&&n)&&(e[`aria-disabled`]=n),o&&(!t||c)&&(e.disabled=n),e},[r,n,t,s,c,o,a])}}function st(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:a=!0,composite:o}=e,s=i.useRef(null),c=at(!0),l=o??c!==void 0,{props:u}=ot({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:a}),d=i.useCallback(()=>{let e=s.current;$(e)&&l&&t&&u.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,u.disabled,l]);return Ve(d,[d]),{getButtonProps:i.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:i,onKeyDown:o,onPointerDown:s,...c}=e;return v({type:a?`button`:void 0,onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(x(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,i=e.currentTarget,s=$(i),c=!a&&ct(i),u=r&&(a?s:!c),d=e.key===`Enter`,f=e.key===` `,p=i.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&l&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),c||a&&s?(i.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!a&&(f||d)&&e.preventDefault(),!a&&d&&n?.(e))},onKeyUp(e){if(!t){if(x(e),i?.(e),e.target===e.currentTarget&&a&&l&&$(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!a&&!l&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},a?void 0:{role:`button`},u,c)},[t,u,l,a]),buttonRef:T(e=>{s.current=e,d()})}}function $(e){return F(e)&&e.tagName===`BUTTON`}function ct(e){return!!(e?.tagName===`A`&&e?.href)}export{he as $,A,L as B,Ie as C,Ae as D,W as E,V as F,Ee as G,De as H,P as I,ge as J,O as K,F as L,q as M,G as N,M as O,j as P,me as Q,U as R,Le as S,Me as T,R as U,I as V,H as W,de as X,fe as Y,pe as Z,Ue as _,Je as a,s as at,Fe as b,Ye as c,Ze as d,ue as et,He as f,We as g,Ge as h,Qe as i,m as it,je as j,J as k,tt as l,$e as m,at as n,le as nt,et as o,o as ot,Ke as p,T as q,rt as r,v as rt,Xe as s,r as st,st as t,C as tt,qe as u,nt as v,Pe as w,Ne as x,Ve as y,N as z};

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.