PageSourceSearch

https://ideaevolver.com/assets/mobileActionClasses-BbRVeEUe.js

js ideaevolver.com collected 2026-10-02 00:31:25 UTC 4,016 bytes, 1 lines download raw bytes

1import{a as e}from"./rolldown-runtime-BEU_UCik.js";import{r as t}from"./vendor-auth-DAuWozuU.js";import{c as r}from"./vendor-react-IBcu1n3d.js";import{a as o}from"./vendor-query-Ct_3YD9H.js";var n=e(t()),s=e(r()),c=o();function a({isOpen:e,onClose:t,children:r,...o}){const[a,u]=(0,n.useState)(!1),[i,l]=(0,n.useState)(null),d=(0,n.useRef)(null),f=(0,n.useRef)(null),p=(0,n.useRef)(null),m=(0,n.useRef)(t),v=(0,n.useRef)(!1),h=(0,n.useRef)(e);(0,n.useEffect)(()=>{m.current=t},[t]),(0,n.useEffect)(()=>{h.current=e},[e]),(0,n.useEffect)(()=>{null!=r&&l(r)},[r]);const b=(0,n.useCallback)(()=>{try{d.current?.matches(":popover-open")&&d.current.hidePopover()}catch(e){}u(!1),l(null),h.current&&m.current()},[]);(0,n.useEffect)(()=>{e?(v.current=!1,u(!0)):(f.current&&(f.current.scrollTop<=0?b():f.current.scrollTo({top:0,behavior:"auto"})),v.current||b())},[e,b]),(0,n.useEffect)(()=>{if(!a)return;const e=d.current,t=f.current,r=p.current;if(!e||!t||!r)return;try{e.matches(":popover-open")||e.showPopover()}catch(n){console.warn("Popover API not supported or error showing popover",n)}const o=requestAnimationFrame(()=>{t.scrollTo({top:t.scrollHeight,behavior:"auto"})});return()=>cancelAnimationFrame(o)},[a]),(0,n.useEffect)(()=>{if(!a)return;const e=f.current,t=p.current,r=d.current;if(!e||!t||!r)return;if(window.CSS&&"function"==typeof window.CSS.supports&&window.CSS.supports("animation-timeline","scroll()"))return;let o,n=t.offsetHeight;"undefined"!=typeof ResizeObserver&&(o=new ResizeObserver(e=>{for(const t of e)n=t.borderBoxSize?.[0]?.blockSize??t.contentRect.height}),o.observe(t));const s=()=>
1{if(0===n&&(n=t.offsetHeight),0===n)return;const o=Math.min(1,Math.max(0,e.scrollTop/n));r.style.setProperty("--sheet-backdrop",o)};return e.addEventListener("scroll",s,{passive:!0}),s(),()=>{e.removeEventListener("scroll",s),o&&o.disconnect()}},[a]),(0,n.useEffect)(()=>{if(!a)return;const e=f.current,t=p.current;if(!e||!t)return;const r=()=>{const t=e.scrollTop;t>10&&(v.current=!0),t<=0&&v.current&&b()};let o;return e.addEventListener("scroll",r,{passive:!0}),r(),"undefined"!=typeof IntersectionObserver&&(o=new IntersectionObserver(e=>{const t=e.at(-1);t&&(t.isIntersecting&&(v.current=!0),v.current&&!t.isIntersecting&&b())},{threshold:[0,1]}),o.observe(t)),()=>{e.removeEventListener("scroll",r),o&&o.disconnect()}},[a,b]),(0,n.useEffect)(()=>{if(!a)return;const e=e=>{"Escape"===e.key&&f.current?.scrollTo({top:0,behavior:"auto"})};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[a]),(0,n.useEffect)(()=>{if(!a)return void(document.body.style.overflow="");const e=window.matchMedia("(max-width: 767px)"),t=e=>{document.body.style.overflow=e.matches?"hidden":""};return t(e),e.addEventListener("change",t),()=>{e.removeEventListener("change",t),document.body.style.overflow=""}},[a]);const w=e=>{e.target!==d.current&&e.target!==f.current||(e.stopPropagation(),f.current?.scrollTo({top:0,behavior:"auto"}))};return a?(0,s.createPortal)((0,c.jsx)("div",{ref:d,popover:"manual",className:"bottom-sheet-popover md:hidden","data-testid":"mobile-bottom-sheet-backdrop",onClick:w,children:(0,c.jsxs)("div",{ref:f,className:"bottom-sheet-scroller",onClick:w,children:[(0,c.jsx)("div",{className:"bottom-sheet-spacer"}),(0,c.jsxs)("div",{ref:p,className:"bottom-sheet-panel",role:"dialog","aria-modal":"true",tabIndex:-1,onClick:e=>e.stopPropagation(),"data-testid":"mobile-bottom-sheet-panel",...o,children:[(0,c.jsx)("div",{className:"w-10 h-1.5 rounded-full bg-deep-space/20 dark:bg-white/20 mx-auto mb-5 shrink-0"}),r??i]})]})}),document.body):null}var u="flex items-center gap-3 px-4 py-3.5 rounded-xl text-base font-karla font-medium text-deep-space/80 dark:text-white/80 active:bg-solar-100 dark:active:bg-trusty-blue/20 hover:text-solar-600 dark:hover:text-trusty-blue hover:bg-solar-50 dark:hover:bg-trusty-blue/10 transition-all duration-200 cursor-pointer w-full text-left",i="w-4 opacity-70 flex-shrink-0 text-center";export{i as n,a as r,u as t};

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.