{"version":3,"file":"ArrowIn.CV2aMF87.mjs","names":["React.useRef","__esmMin","init_ssg_sandbox_shims","de","c","init_jsx_runtime","init_npm_react_18_3_1","ce","window","addPropertyControls","init_framer_D1IzEvwH","RenderTarget","ControlType","pillsExitProgress","boundary","boundaryId","rect","vh","up","clamp01","EXIT_TOP_START","down","EXIT_BOTTOM_START","ArrowIn","side","props","color","follow","rest","REST","start","START","ref","spin","onCanvas","el","inner","reduced","set","offset","entry","targetFor","smooth","r","centre","p","BOTTOM_EDGE","TOP_REST_PX","x","v","last","frame","running","step","dt","now","target","h","i","a","DAMPING","MASS","wake","scrolled","onScroll","io","e","entries","GLYPH","init_ArrowIn","t"],"sources":["https:/framerusercontent.com/modules/Qiu5j18MumGVC66vhMkY/t53ZabgTC75ov5e8OFdl/ArrowIn.js"],"sourcesContent":["// Arrow In — the site's cover arrow as one component so every placement behaves identically\n// (Jordan, 2026-10-10: \"turn the arrow into a component so that everywhere that it is placed it acts like this.\n// Always pointing in, never pointing out\" … \"should this be tied to viewport rather than simply animation, like\n// with the pills\"). Two placements exist: `left` rests south-east, `right` rests south-west.\n//\n// The angle is scrubbed off the arrow's position in the viewport, every frame. Entering from the bottom edge it\n// holds a quarter turn OUTWARD of its rest (left: north-east, right: north-west) and turns in as it rises, reaching\n// rest by the middle of the screen (reversible while in the lower half). Entering from the top edge it turns in\n// within the first 80px and then stays in. Already on screen at load: it starts out and swings in by itself. Scrolling either way gives the\n// mirror image, and reversing mid-way reverses the turn. The house spring (stiffness 500, damping 103, mass 1 — the\n// curve measured on the quote arrow's original effect) chases the position target, so the motion stays smooth and\n// never overshoots. It never fades, slides or scales.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";// The glyph is the site's own arrow asset (framerusercontent …EoS1WVGwJtmDaSZRurTMsnyZ87U.svg), drawn pointing\n// north-east in a 64 × 64 box.\nconst GLYPH=\"M63.897.058 63.894 64l-13.599-.01.003-40.694L9.659 63.93.042 54.313l40.655-40.656-40.694.003L0 .055Z\";const REST={left:90,right:180}// rotation of the glyph at rest\n;const START={left:-90,right:90}// offset from rest at the screen edges\n;const STIFFNESS=500;const DAMPING=103;const MASS=1;// Position → progress. Entering from the BOTTOM (scrolling down): start pose until the arrow's centre is\n// BOTTOM_EDGE of the viewport height up from the bottom, fully at rest by BOTTOM_REST (the middle of the screen).\n// Entering from the TOP (scrolling up): rest within TOP_REST_PX of the top edge — short on purpose, because the\n// quote arrow sits in a sticky frame pinned 51px from the top and must never be left pointing out while pinned.\nconst BOTTOM_EDGE=.12;const BOTTOM_REST=.5;const TOP_REST_PX=80;// Follow \"pills\" (Jordan, 2026-10-13, the News column): an arrow pinned in a sticky column never travels through the\n// viewport, so instead of its own position it follows the pill cluster's scroll choreography — the same exit\n// progress the pills use (the boundary element's top/bottom against 0.78 / 0.2 of the viewport). Progress 0 = pills\n// home = rest; progress 1 = pills gone = the start pose, pointing out. At load it starts out and swings in.\nconst EXIT_TOP_START=.78;const EXIT_TOP_END=.2;const EXIT_BOTTOM_START=.22;const EXIT_BOTTOM_END=.8;function pillsExitProgress(boundaryId){const boundary=document.getElementById(boundaryId);if(!boundary)return 0;const rect=boundary.getBoundingClientRect();const vh=Math.max(1,window.innerHeight);const up=clamp01((vh*EXIT_TOP_START-rect.bottom)/Math.max(1,vh*(EXIT_TOP_START-EXIT_TOP_END)));const down=clamp01((rect.top-vh*EXIT_BOTTOM_START)/Math.max(1,vh*(EXIT_BOTTOM_END-EXIT_BOTTOM_START)));return Math.max(up,down);}const clamp01=v=>v<0?0:v>1?1:v;const smooth=t=>t*t*(3-2*t);/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 64\n * @framerIntrinsicHeight 64\n */export default function ArrowIn(props){const side=props.side===\"right\"?\"right\":\"left\";const color=props.color||\"#000000\";const follow=props.follow===\"pills\"?\"pills\":props.follow===\"arrival\"?\"arrival\":\"position\";const boundaryId=(props.boundaryId||\"news-pill-master\").trim();const rest=REST[side];const start=START[side];const ref=React.useRef(null)// static box: measured, never transformed\n;const spin=React.useRef(null)// inner box: the one that turns\n;const onCanvas=RenderTarget.current()===RenderTarget.canvas||RenderTarget.current()===RenderTarget.thumbnail;React.useEffect(()=>{const el=ref.current,inner=spin.current;if(!el||!inner||onCanvas||typeof window===\"undefined\")return;const reduced=window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches;const set=offset=>{inner.style.transform=`rotate(${rest+offset}deg)`;};if(reduced){set(0);return;}// Which edge the arrow came in through decides the scrub. From the BOTTOM: start pose at the edge, rest by\n// mid-screen (reversible while it is in that lower half). From the TOP: rest within TOP_REST_PX, then rest\n// all the way down. Already on screen at load (Jordan, 2026-10-10: \"on its first load, it should start like\n// this, but without movement shift downward\"): it starts at the start pose and swings in on its own.\nlet entry=null;const targetFor=()=>{if(follow===\"pills\")return start*smooth(pillsExitProgress(boundaryId));// Swing on arrival (Jordan, 2026-10-29, the phone chapter arrows: \"the first load should automatically cause it\n// to move from north whatever to south whatever … encourage them to continue reading\"): the moment it is on\n// screen it swings in on its own; off screen it resets to the start pose, ready to swing again.\nif(follow===\"arrival\")return entry?0:start;const r=el.getBoundingClientRect();const vh=window.innerHeight||1;const centre=r.top+r.height/2;if(entry===\"bottom\"){const p=clamp01(((vh-centre)/vh-BOTTOM_EDGE)/(BOTTOM_REST-BOTTOM_EDGE));return start*(1-smooth(p));}if(entry===\"top\")return start*(1-smooth(clamp01(centre/TOP_REST_PX)));return start;};let x=start,v=0,last=performance.now(),frame=null,running=false;set(x);const step=now=>{const dt=Math.min(.064,(now-last)/1e3);last=now;const target=targetFor();const n=4,h=dt/n;for(let i=0;i<n;i++){const a=(-STIFFNESS*(x-target)-DAMPING*v)/MASS;v+=a*h;x+=v*h;}if(Math.abs(x-target)<.02&&Math.abs(v)<.2){x=target;v=0;set(x);frame=null;running=false;return;}set(x);frame=requestAnimationFrame(step);};const wake=()=>{if(!running){running=true;last=performance.now();frame=requestAnimationFrame(step);}};// Until the page has been scrolled, anything that becomes visible was there at load: it counts as having\n// come in from the top and swings in on its own.\nlet scrolled=false;const onScroll=()=>{scrolled=true;wake();};const io=new IntersectionObserver(entries=>{for(const e of entries){if(follow===\"pills\")continue;if(e.isIntersecting){if(entry===null){const vh=window.innerHeight||1;const centre=e.boundingClientRect.top+e.boundingClientRect.height/2;entry=scrolled&&centre>vh/2?\"bottom\":\"top\";}}else{entry=null;x=start;v=0;set(x);}}wake();},{threshold:0});window.addEventListener(\"scroll\",onScroll,{passive:true});window.addEventListener(\"resize\",wake);io.observe(el);return()=>{if(frame!==null)cancelAnimationFrame(frame);window.removeEventListener(\"scroll\",onScroll);window.removeEventListener(\"resize\",wake);io.disconnect();};},[rest,start,onCanvas,follow,boundaryId]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,\"data-arrow-in\":side,style:{...props.style,width:\"100%\",height:\"100%\"},children:/*#__PURE__*/_jsx(\"div\",{ref:spin,\"data-arrow-in-spin\":\"\",style:{width:\"100%\",height:\"100%\",transform:`rotate(${rest}deg)`,transformOrigin:\"50% 50%\",willChange:\"transform\"},children:/*#__PURE__*/_jsx(\"svg\",{viewBox:\"0 0 64 64\",width:\"100%\",height:\"100%\",style:{display:\"block\"},\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:GLYPH,fill:color})})})});}ArrowIn.defaultProps={side:\"left\",color:\"#000000\",follow:\"position\",boundaryId:\"news-pill-master\"};addPropertyControls(ArrowIn,{side:{type:ControlType.Enum,title:\"Side\",options:[\"left\",\"right\"],optionTitles:[\"Left (rests south-east)\",\"Right (rests south-west)\"],defaultValue:\"left\"},color:{type:ControlType.Color,title:\"Colour\",defaultValue:\"#000000\"},follow:{type:ControlType.Enum,title:\"Follow\",options:[\"position\",\"pills\",\"arrival\"],optionTitles:[\"Viewport position\",\"News pills\",\"Swing on arrival\"],defaultValue:\"position\",description:\"Viewport position: turns as the arrow travels through the screen (every Home instance). News pills: for an arrow pinned in a sticky column — turns out as the pills dance off and back in as they return.\"},boundaryId:{type:ControlType.String,title:\"Boundary\",defaultValue:\"news-pill-master\",hidden:p=>p.follow!==\"pills\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ArrowIn\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicWidth\":\"64\",\"framerIntrinsicHeight\":\"64\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ArrowIn.map"],"mappings":"A,uMAwBoG,SAASa,EAAkB,EAAW,CAAC,IAAMC,EAAS,SAAS,eAAeC,CAAU,EAAE,GAAG,CAACD,EAAS,MAAO,GAAE,IAAME,EAAKF,EAAS,sBAAsB,EAAQG,EAAG,KAAK,IAAI,EAAET,EAAO,WAAW,EAAQU,EAAGC,GAASF,EAAGG,EAAeJ,EAAK,QAAQ,KAAK,IAAI,EAAEC,EAAI,iBAA4B,CAAC,EAAQI,EAAKF,GAASH,EAAK,IAAIC,EAAGK,GAAmB,KAAK,IAAI,EAAEL,EAAI,iBAAkC,CAAC,EAAE,OAAO,KAAK,IAAIC,EAAGG,CAAI,CAAE,CAKpgB,SAAwBE,EAAQ,EAAM,CAAC,IAAMC,EAAKC,EAAM,OAAO,QAAQ,QAAQ,OAAaC,EAAMD,EAAM,OAAO,UAAgBE,EAAOF,EAAM,SAAS,QAAQ,QAAQA,EAAM,SAAS,UAAU,UAAU,WAAiBV,GAAYU,EAAM,YAAY,mBAAA,CAAoB,KAAK,EAAQG,EAAKC,EAAKL,GAAYM,EAAMC,EAAMP,GAAYQ,EAAIhC,EAAa,IAAI,EACvViC,EAAKjC,EAAa,IAAI,EACtBkC,EAASvB,EAAa,QAAQ,IAAIA,EAAa,QAAQA,EAAa,QAAQ,IAAIA,EAAa,UAS0mB,OAThmBJ,MAAoB,CAAC,IA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