PageSourceSearch

https://framercoder.com/assets/index-BhEhaWVo.js

js framercoder.com collected 2026-10-06 04:39:54 UTC 3,485 bytes, 9 lines download raw bytes

vendor: 2,154 bytes, lines 1-9
1import{r as s,O as W,j as y,a1 as b,a7 as I,an as A,ao as D,a9 as H,ap as K}from"./main-CHlnGfW4.js";function k(e,o){if(typeof e=="function")return e(o);e!=null&&(e.current=o)}function U(...e){return o=>{let t=!1;const r=e.map(i=>{const n=k(i,o);return!t&&typeof n=="function"&&(t=!0),n});if(t)return()=>{for(let i=0;i<r.length;i++){const n=r[i];typeof n=="function"?n():k(e[i],null)}}}}function B(...e){return s.useCallback(U(...e),e)}class F extends s.Component{getSnapshotBeforeUpdate(o){const t=this.props.childRef.current;if(t&&o.isPresent&&!this.props.isPresent){const r=t.offsetParent,i=b(r)&&r.offsetWidth||0,n=this.props.sizeRef.current;n.height=t.offsetHeight||0,n.width=t.offsetWidth||0,n.top=t.offsetTop,n.left=t.offsetLeft,n.right=i-n.width-n.left}return null}componentDidUpdate(){}render(){return this.props.children}}function G({children:e,isPresent:o,anchorX:t,root:r}){const i=s.useId(),n=s.useRef(null),h=s.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:x}=s.useContext(W),E=B(n,e?.ref);return s.useInsertionEffect(()=>{const{width:f,height:g,top:c,left:a,right:d}=h.current;if(o||!n.current||!f||!g)return;const m=t==="left"?`left: ${a}`:`right: ${d}`;n.current.dataset.motionPopId=i;const l=document.createElement("style");x&&(l.nonce=x);const P=r??document.head;return P.appendChild(l),l.sheet&&l.sheet.insertRule(`
2          [data-motion-pop-id="${i}"] {
3            position: absolute !important;
4            width: ${f}px !important;
5            height: ${g}px !important;
6            ${m}px !important;
7            top: ${c}px !important;
8          }
9        `),()=>{P.contains(l)&&P.removeChild(l)}},[o]),y.jsx(F,{isPresent:o,childRef:n,sizeRef:h,children:s.cloneElement(e,{ref:E})})}const O=({children:e,initial:o,isPresent:t,onExitComplete:r,custom:i,presenceAffectsLayout:n,mode:h,anchorX:x,root:E})=>{const f=I(V),g=s.useId();let c=!0,a=s.useMemo(()=>(c=!1,{id:g,initial:o,isPresent:t,custom:i,onExitComplete:d=>{f.set(d,!0);for(const m of f.values())if(!m)return;r&&r()},register:d=>(f.set(d,!1),()=>f.delete(d))}),[t,f,r]);return n&&c&&(a={...a}),s.useMemo(()=>{f.forEach((d,m)=>f.set(m,!1))},[t]),s.useEffect(()=>
9{!t&&!f.size&&r&&r()},[t]),h==="popLayout"&&(e=y.jsx(G,{isPresent:t,anchorX:x,root:E,children:e})),y.jsx(A.Provider,{value:a,children:e})};function V(){return new Map}const w=e=>e.key||"";function z(e){const o=[];return s.Children.forEach(e,t=>{s.isValidElement(t)&&o.push(t)}),o}const _=({children:e,custom:o,initial:t=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:n="sync",propagate:h=!1,anchorX:x="left",root:E})=>{const[f,g]=D(h),c=s.useMemo(()=>z(e),[e]),a=h&&!f?[]:c.map(w),d=s.useRef(!0),m=s.useRef(c),l=I(()=>new Map),[P,L]=s.useState(c),[C,v]=s.useState(c);H(()=>{d.current=!1,m.current=c;for(let p=0;p<C.length;p++){const u=w(C[p]);a.includes(u)?l.delete(u):l.get(u)!==!0&&l.set(u,!1)}},[C,a.length,a.join("-")]);const M=[];if(c!==P){let p=[...c];for(let u=0;u<C.length;u++){const R=C[u],j=w(R);a.includes(j)||(p.splice(u,0,R),M.push(R))}return n==="wait"&&M.length&&(p=M),v(z(p)),L(c),null}const{forceRender:S}=s.useContext(K);return y.jsx(y.Fragment,{children:C.map(p=>{const u=w(p),R=h&&!f?!1:c===C||a.includes(u),j=()=>{if(l.has(u))l.set(u,!0);else return;let $=!0;l.forEach(T=>{T||($=!1)}),$&&(S?.(),v(m.current),h&&g?.(),r&&r())};return y.jsx(O,{isPresent:R,initial:!d.current||t?void 0:!1,custom:o,presenceAffectsLayout:i,mode:n,root:E,onExitComplete:R?void 0:j,anchorX:x,children:p},u)})})};export{_ as A};

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.