{"version":3,"file":"LoopVideo.CerjMdz7.mjs","names":["useState","useRef","useEffect","_jsx","_jsxs","__esmMin","navigator","init_npm_react_18_3_1","window","_e","p","ce","de","init_ssg_sandbox_shims","addPropertyControls","init_framer_Cs0akqd9","ControlType","useIsStaticRenderer","webCut","url","key","WEB_CUTS","firstPaintTime","whenPageReady","afterPaint","AFTER_PAINT","wait","pageReady","resolve","started","go","ric","loaded","painted","check","po","MAX_WAIT","frSrcSet","clean","w","posterSrc","phoneSrcSet","phoneNow","max","saveData","c","LoopVideo","props","src","srcUrl","srcUrlHevc","srcUrlMobile","mobileMax","fit","radius","smooth","fade","poster","posterLink","posterMobile","stillMobileUrl","deferLoad","isStatic","phoneStill","desktopSrc","DEFAULT_SRC","hevcSrc","mobileSrc","posterUrl","posterMobileUrl","immediate","armed","setArmed","isPhone","setIsPhone","armedB","setArmedB","playing","setPlaying","a","b","st","mq","on","alive","v","v2","repick","s","va","vb","vids","armSecond","fallback","id","cur","nxt","sources","media","list","HEVC_TYPE","outer","stillDesktop","stillMobile","posterAttr","reveal","base","vkey","still","BLANK","phone","layer","init_LoopVideo","init_jsx_runtime"],"sources":["https:/framerusercontent.com/modules/IqBRRZKKMwNPq6uVzC54/iqDUUMh2TuwPITjOGs5Q/LoopVideo.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useEffect,useRef,useState}from\"react\";const DEFAULT_SRC=\"https://d2ol7oe51mr4n9.cloudfront.net/user_3FMPqLZy3N0UPmCIAVAvDMjs76h/686896df-7d80-4184-bc35-6c7593790470.mp4\";// Web cuts of heavy originals (2026-09-30, PageSpeed pass). Instances still\n// point at the originals, so they are swapped at render time instead of page\n// by page: the /about default was 16.3 MB at 14 Mbps for an 832x464 clip (now\n// 3.4 MB, same size), the /corporate hero a 4K 18.7 MB file (now 1080p, 1.3 MB).\n// A URL that matches none of these plays as given.\nconst WEB_CUTS={\"319ebca4-068e-461f-b826-422f9073086c\":DEFAULT_SRC,\"hf_20260911_084855_d3d1a405-dce9-4b38-83fe-9baeaacffdad\":\"https://d2ol7oe51mr4n9.cloudfront.net/user_3FMPqLZy3N0UPmCIAVAvDMjs76h/8776470e-8866-4d18-9f1f-2e9e867f1d7c.mp4\"};function webCut(url){for(const key in WEB_CUTS)if(url.indexOf(key)!==-1)return WEB_CUTS[key];return url;}/**\n * Loop Video — autoplaying, muted background video that fills its frame.\n * With `smooth` on, two stacked copies crossfade at the loop point so the\n * restart is invisible instead of a hard cut; off = native loop.\n *\n * `srcUrl` (string) overrides the File control — File controls can't be set\n * via the plugin. `posterUrl` does the same for the Poster image. `srcUrlMobile`\n * + `mobileMax` serve a portrait cut at and below the given viewport width.\n *\n * PERFORMANCE (2026-09-28, PageSpeed pass):\n *  - ONE download per device. The desktop and mobile cuts are <source>\n *    elements with media queries, so the browser picks the right file when it\n *    loads. Before, the server HTML always carried the desktop URL and phones\n *    swapped to the mobile cut after hydration, downloading BOTH (6.6 MB on\n *    the home hero). Crossing mobileMax later (rotation, resize) re-picks.\n *  - `deferLoad` (default on): the video starts once the page has loaded AND\n *    painted its first content, plus a second and an idle beat (never later\n *    than 6 s), instead of competing with the fonts, scripts and first paint\n *    for bandwidth, then fades in on its first frame. Set `poster` to show a\n *    still before that.\n *  - With `smooth`, the crossfade copy starts loading only once the first copy\n *    can play through (the same file, so it then comes from cache) instead of\n *    both copies downloading the same video at once.\n *  - Save-Data: the video is skipped (poster only).\n *  - `poster` / `posterMobile`: a still (ideally the cut's first frame) is\n *    shown with the page instead of a flat colour while the deferred video\n *    waits. One still is the <video>'s own poster attribute, so the first\n *    frame takes over in place (and LCP counts the still, see below). With a\n *    separate mobile still it is a <picture> BEHIND the video with the same\n *    mobileMax switch, and the video fades in over it; framerusercontent\n *    stills get a 512/1024/2048 srcset (WebP/AVIF) there. Note: Chrome ignores\n *    a full-viewport image (and video) as a Largest Contentful Paint candidate\n *    - it treats it as background - so a full-bleed poster improves what\n *    people see, not the LCP number.\n *  - Poster in phone-still mode (2026-10-08): the desktop still is a <picture>\n *    that serves phones a blank, not the <video> poster attribute, which every\n *    viewport downloads, phones included, where the video never shows.\n *  - `srcUrlHevc` (2026-10-08): an HEVC (H.265) encode of the same cut, listed as the\n *    first <source> with its codecs string, so browsers that decode HEVC (Safari,\n *    Chrome and Edge with a hardware decoder, most phones) download it and the\n *    rest fall through to the H.264 Video URL. On the home hero that is 2.8 MB at\n *    42.3 dB instead of 3.6 MB at 40.3 dB (PSNR vs the master).\n *  - `afterPaint` (2026-10-08): the wait after the first paint, in ms (default\n *    1000, as before). The home hero uses 300 so its motion starts sooner; the\n *    request still starts after the first paint, so it stays out of the LCP.\n *  - `stillMobileUrl` (2026-10-07): phones (at and below mobileMax) show this\n *    still INSTEAD of the video and never download it; wider screens play the\n *    video as before. The still is server-rendered, so it paints with the page,\n *    at low fetch priority so it never delays the headline. Expects a 9:16\n *    portrait frame (see phoneSrcSet). Desktop gets a 1 px\n *    placeholder from the same <picture>, so it downloads nothing extra.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 640\n * @framerIntrinsicHeight 540\n * @framerDisableUnlink\n */// Resolves once the page has loaded AND painted its first content, plus\n// AFTER_PAINT ms (or the instance's afterPaint) and an idle beat, or after\n// MAX_WAIT ms at the latest. One promise per wait, shared by every instance\n// that uses it.\n//\n// The load event alone was not enough (measured live, 2026-09-28): in\n// Lighthouse's run it can land just BEFORE the first paint, so the video\n// request started 10-120 ms ahead of it and the whole file (3 MB on home,\n// 16-18 MB on /about and /corporate) was counted into the simulated LCP.\n// Requests that start after the first paint are left out of it.\nconst MAX_WAIT=6e3;const AFTER_PAINT=1e3;const pageReady={};function firstPaintTime(){try{const e=performance.getEntriesByName(\"first-contentful-paint\")[0];return e?e.startTime:-1;}catch(e){return 0;}}function whenPageReady(afterPaint=AFTER_PAINT){const wait=Math.max(0,Math.round(afterPaint));if(pageReady[wait])return pageReady[wait];pageReady[wait]=new Promise(resolve=>{if(typeof window===\"undefined\")return resolve();let started=false;const go=()=>{if(started)return;started=true;const ric=window.requestIdleCallback;if(typeof ric===\"function\")ric(()=>resolve(),{timeout:800});else setTimeout(resolve,200);};let loaded=document.readyState===\"complete\";let painted=firstPaintTime();const check=()=>{if(!loaded||painted<0)return;setTimeout(go,Math.max(0,painted+wait-performance.now()));};if(!loaded)window.addEventListener(\"load\",()=>{loaded=true;check();},{once:true});if(painted<0){// Browsers without paint timing fall back to the load event alone.\nconst types=typeof PerformanceObserver!==\"undefined\"&&PerformanceObserver.supportedEntryTypes||[];if(types.indexOf(\"paint\")===-1)painted=0;else{try{const po=new PerformanceObserver(()=>{const t=firstPaintTime();if(t<0)return;painted=t;po.disconnect();check();});po.observe({type:\"paint\",buffered:true});}catch(e){painted=0;}}}check();setTimeout(go,MAX_WAIT);});return pageReady[wait];}function frSrcSet(url){if(!/^https:\\/\\/framerusercontent\\.com\\/images\\//.test(url))return undefined;const clean=url.split(\"?\")[0];return[512,1024,2048].map(w=>`${clean}?scale-down-to=${w} ${w}w`).join(\", \");}// The poster attribute takes one URL (no srcset), so a framerusercontent still\n// gets the CDN's resized copy (WebP/AVIF, never upscaled) rather than the original.\nfunction posterSrc(url){if(!/^https:\\/\\/framerusercontent\\.com\\/images\\//.test(url))return url;return`${url.split(\"?\")[0]}?scale-down-to=2048`;}// The phone still is a 9:16 portrait frame. framerusercontent's scale-down-to\n// caps the LONG side, so its 1024 copy is only 576 px wide; frSrcSet's \"1024w\"\n// would make a 1.75x phone pick it and look soft. Real widths instead, with\n// the 1080 px original as the top entry.\nfunction phoneSrcSet(url){if(!/^https:\\/\\/framerusercontent\\.com\\/images\\//.test(url))return undefined;const clean=url.split(\"?\")[0];return`${clean}?scale-down-to=1024 576w, ${clean} 1080w`;}// Main profile, level 4.0: what AVFoundation writes for 1080p HEVC (hvc1, Safari-safe).\nconst HEVC_TYPE='video/mp4; codecs=\"hvc1.1.6.L120.B0\"';// 1x1 transparent GIF: what a <picture> serves wide screens when the still is phone-only.\nconst BLANK=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\";function phoneNow(max){return typeof window!==\"undefined\"&&!!window.matchMedia&&window.matchMedia(`(max-width: ${max}px)`).matches;}function saveData(){const c=typeof navigator!==\"undefined\"?navigator.connection:null;return!!(c&&c.saveData);}export default function LoopVideo(props){const{src,srcUrl=\"\",srcUrlHevc=\"\",srcUrlMobile=\"\",mobileMax=810,fit=\"cover\",radius=0,smooth=true,fade=1,poster=\"\",posterUrl:posterLink=\"\",posterMobile=\"\",stillMobileUrl=\"\",deferLoad=true,afterPaint=AFTER_PAINT}=props;const isStatic=useIsStaticRenderer();const phoneStill=(stillMobileUrl||\"\").trim();const desktopSrc=webCut((srcUrl||\"\").trim()||src||DEFAULT_SRC);const hevcSrc=(srcUrlHevc||\"\").trim();// With a phone still the video only ever plays above mobileMax, so the\n// mobile cut is never needed.\nconst mobileSrc=phoneStill?\"\":webCut((srcUrlMobile||\"\").trim());const posterUrl=(posterLink||\"\").trim()||(poster||\"\").trim();const posterMobileUrl=(posterMobile||\"\").trim();const immediate=isStatic||!deferLoad&&!phoneStill;const[armed,setArmed]=useState(immediate);// Phone-still mode only: true at and below mobileMax. Starts false on the\n// server and the client alike (no hydration mismatch); the still is in the\n// server HTML either way, so phones see it before this is known.\nconst[isPhone,setIsPhone]=useState(false);const[armedB,setArmedB]=useState(immediate);const[playing,setPlaying]=useState(isStatic);const a=useRef(null);const b=useRef(null);const st=useRef({active:0,switching:false,armedB:immediate});st.current.armedB=armedB;// 0. Phone-still mode: track which side of mobileMax the viewport is on.\nuseEffect(()=>{if(!phoneStill||isStatic||typeof window===\"undefined\"||!window.matchMedia)return;const mq=window.matchMedia(`(max-width: ${mobileMax}px)`);const on=()=>setIsPhone(mq.matches);on();mq.addEventListener?mq.addEventListener(\"change\",on):mq.addListener(on);return()=>{mq.removeEventListener?mq.removeEventListener(\"change\",on):mq.removeListener(on);};},[phoneStill,isStatic,mobileMax]);// 1. Attach the sources once the page has loaded (unless Save-Data). In\n// phone-still mode, never on a phone; a phone rotated or resized past\n// mobileMax arms it then.\nuseEffect(()=>{if(armed||saveData())return;if(phoneStill&&!isStatic&&phoneNow(mobileMax))return;if(!deferLoad){setArmed(true);return;}let alive=true;whenPageReady(afterPaint).then(()=>{if(alive)setArmed(true);});return()=>{alive=false;};},[armed,isPhone,phoneStill,isStatic,mobileMax,deferLoad,afterPaint]);// 2. Start playback and fade in on the first frame. A phone-still page that\n// shrinks to phone width pauses instead (the still shows through).\nuseEffect(()=>{if(!armed||isStatic)return;const v=a.current;if(!v)return;if(isPhone){try{v.pause();}catch(e){}const v2=b.current;if(v2)try{v2.pause();}catch(e){}return;}const on=()=>setPlaying(true);v.addEventListener(\"playing\",on);const p=v.play();if(p&&p.catch)p.catch(()=>{});return()=>v.removeEventListener(\"playing\",on);},[armed,isStatic,isPhone]);// 3. Re-pick the cut when the viewport crosses mobileMax.\nuseEffect(()=>{if(!armed||isStatic||!mobileSrc||typeof window===\"undefined\"||!window.matchMedia)return;const mq=window.matchMedia(`(max-width: ${mobileMax}px)`);const repick=()=>{const s=st.current;s.active=0;s.switching=false;const va=a.current,vb=b.current;if(vb){try{vb.pause();if(st.current.armedB)vb.load();}catch(e){}vb.style.opacity=\"0\";}if(va){va.style.opacity=\"1\";try{va.load();}catch(e){}const p=va.play();if(p&&p.catch)p.catch(()=>{});}};mq.addEventListener?mq.addEventListener(\"change\",repick):mq.addListener(repick);return()=>{mq.removeEventListener?mq.removeEventListener(\"change\",repick):mq.removeListener(repick);};},[armed,isStatic,mobileSrc,mobileMax]);// 4. Smooth loop: crossfade to the second copy just before the end.\nuseEffect(()=>{if(isStatic||!smooth||!armed)return;const vids=[a.current,b.current];if(!vids[0]||!vids[1])return;const s=st.current;s.active=0;s.switching=false;vids[0].style.opacity=\"1\";vids[1].style.opacity=\"0\";const armSecond=()=>setArmedB(true);vids[0].addEventListener(\"canplaythrough\",armSecond,{once:true});const fallback=setTimeout(armSecond,8e3);const tick=()=>{const cur=vids[s.active],nxt=vids[1-s.active];if(!cur||!nxt||s.switching)return;if(cur.duration&&cur.duration-cur.currentTime<=Math.max(.3,fade)){// Crossfade copy not ready yet: loop the current one with a cut.\nif(!s.armedB||nxt.readyState<2){if(cur.ended||cur.duration-cur.currentTime<.08){try{cur.currentTime=0;}catch(e){}const p=cur.play();if(p&&p.catch)p.catch(()=>{});}return;}s.switching=true;try{nxt.currentTime=0;}catch(e){}const p=nxt.play();if(p&&p.catch)p.catch(()=>{});// The copy waits parked at 1x1 px (see the render below) and takes\n// the full frame the moment it starts fading in.\nnxt.style.width=\"100%\";nxt.style.height=\"100%\";nxt.style.opacity=\"1\";cur.style.opacity=\"0\";setTimeout(()=>{cur.pause();s.active=1-s.active;s.switching=false;},Math.max(.3,fade)*1e3);}};const id=setInterval(tick,100);return()=>{clearInterval(id);clearTimeout(fallback);vids[0]&&vids[0].removeEventListener(\"canplaythrough\",armSecond);};},[isStatic,smooth,armed,fade]);// Desktop cut first with a media query, portrait cut as the fallback: a\n// browser that ignores `media` still gets the desktop file (today's\n// behaviour), every current browser gets the right one.\n// With an HEVC file it goes first, with its codecs string: a browser that cannot\n// decode it skips to the H.264 source that follows (same media query).\nconst sources=on=>{if(!on)return null;const media=mobileSrc?`(min-width: ${mobileMax+.02}px)`:undefined;const list=[];if(hevcSrc)list.push(/*#__PURE__*/_jsx(\"source\",{src:hevcSrc,type:HEVC_TYPE,media:media},\"h\"));list.push(/*#__PURE__*/_jsx(\"source\",{src:desktopSrc,media:media},\"d\"));if(mobileSrc)list.push(/*#__PURE__*/_jsx(\"source\",{src:mobileSrc},\"m\"));return list;};const outer={position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",borderRadius:radius,...props.style};// The still behind the video (see PERFORMANCE). Never lazy: it is the\n// first thing the hero paints.\nconst stillDesktop=posterUrl||posterMobileUrl;// posterMobile no longer needs a mobile cut (2026-09-30): a portrait crop of\n// the same video's first frame is a far lighter still for phones than the\n// landscape poster, and with cover it lines up with the video exactly.\nconst stillMobile=posterMobileUrl&&posterMobileUrl!==stillDesktop?posterMobileUrl:\"\";// One still rides on the <video> itself (2026-09-30, PageSpeed pass). Chrome\n// then counts the poster as that element's single LCP candidate, painted with\n// the page, and the first video frame does not count again. As a separate\n// <img> the still was recorded at its first-paint size (the /partners hero\n// was still loading, 214 px tall) and the first frame, 1.3 s later in the\n// full-size box, replaced it as the LCP (12.7 s simulated on a phone). A\n// separate mobile still needs media queries, which the poster attribute\n// lacks, so that case keeps the <picture>.\n// Phone-still mode keeps the <picture> (see the header): a poster attribute\n// cannot be made viewport-conditional.\nconst posterAttr=stillDesktop&&!stillMobile&&!phoneStill?posterSrc(stillDesktop):\"\";const shown=(playing||!!posterAttr)&&!isPhone;const reveal={position:\"absolute\",inset:0,opacity:shown?1:0,transition:isStatic?\"none\":\"opacity .6s ease\"};const base={width:\"100%\",height:\"100%\",objectFit:fit,display:\"block\"};// A <video> ignores a changed <source src> until load() is called, so a URL\n// swap left the old clip playing on the Framer canvas (2026-09-29). Keying\n// the elements on the URLs remounts them, and the new file loads.\nconst vkey=`${hevcSrc}|${desktopSrc}|${mobileSrc}`;const still=!stillDesktop||posterAttr?null:/*#__PURE__*/_jsxs(\"picture\",{children:[phoneStill?/*#__PURE__*/_jsx(\"source\",{media:`(max-width: ${mobileMax}px)`,srcSet:BLANK}):null,stillMobile?/*#__PURE__*/_jsx(\"source\",{media:`(max-width: ${mobileMax}px)`,srcSet:frSrcSet(stillMobile)||stillMobile,sizes:\"100vw\"}):null,/*#__PURE__*/_jsx(\"img\",{src:stillDesktop,srcSet:frSrcSet(stillDesktop),sizes:frSrcSet(stillDesktop)?\"100vw\":undefined,alt:\"\",decoding:\"async\",draggable:false,style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:fit,display:\"block\"}})]});// Phone-still mode: the still sits under everything, phones only.\nconst phone=!phoneStill?null:/*#__PURE__*/_jsxs(\"picture\",{children:[/*#__PURE__*/_jsx(\"source\",{media:`(min-width: ${mobileMax+.02}px)`,srcSet:BLANK}),/*#__PURE__*/_jsx(\"img\",{src:phoneStill,srcSet:phoneSrcSet(phoneStill),sizes:phoneSrcSet(phoneStill)?\"100vw\":undefined,alt:\"\",decoding:\"async\",draggable:false,...{fetchpriority:\"low\"},style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:fit,display:\"block\"}})]});if(isStatic||!smooth){return /*#__PURE__*/_jsxs(\"div\",{style:outer,children:[phone,still,/*#__PURE__*/_jsx(\"div\",{style:reveal,children:/*#__PURE__*/_jsx(\"video\",{ref:a,autoPlay:true,loop:true,muted:true,playsInline:true,preload:armed?\"auto\":\"none\",poster:posterAttr||undefined,style:base,children:sources(armed)},vkey)})]});}const layer={...base,position:\"absolute\",inset:0,transition:`opacity ${Math.max(.3,fade)}s ease`};return /*#__PURE__*/_jsxs(\"div\",{style:outer,children:[phone,still,/*#__PURE__*/_jsxs(\"div\",{style:reveal,children:[/*#__PURE__*/_jsx(\"video\",{ref:a,autoPlay:true,muted:true,playsInline:true,preload:armed?\"auto\":\"none\",poster:posterAttr||undefined,style:{...layer,opacity:1},children:sources(armed)},vkey+\"|a\"),/*#__PURE__*/_jsx(\"video\",{ref:b,muted:true,playsInline:true,preload:armedB?\"auto\":\"none\",style:{...layer,opacity:0,width:1,height:1},children:sources(armedB)},vkey+\"|b\")]})]});}addPropertyControls(LoopVideo,{src:{type:ControlType.File,title:\"Video\",allowedFileTypes:[\"mp4\",\"webm\",\"mov\"]},srcUrl:{type:ControlType.String,title:\"Video URL\",defaultValue:\"\"},srcUrlHevc:{type:ControlType.String,title:\"Video URL (HEVC)\",defaultValue:\"\",description:\"Optional H.265 encode of the same cut, served to browsers that can decode it. The H.264 Video URL stays as the fallback.\"},srcUrlMobile:{type:ControlType.String,title:\"Mobile URL\",defaultValue:\"\"},mobileMax:{type:ControlType.Number,title:\"Mobile max px\",defaultValue:810,min:320,max:1200},fit:{type:ControlType.Enum,title:\"Fit\",options:[\"cover\",\"contain\"],defaultValue:\"cover\"},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:0,min:0,max:48},smooth:{type:ControlType.Boolean,title:\"Smooth loop\",defaultValue:true},fade:{type:ControlType.Number,title:\"Crossfade (s)\",defaultValue:1,min:.3,max:3,step:.1},poster:{type:ControlType.Image,title:\"Poster\",description:\"The cut's first frame, shown with the page and behind the video until it plays.\"},posterUrl:{type:ControlType.String,title:\"Poster URL\",defaultValue:\"\",description:\"A link to the still; overrides Poster, as Video URL does for Video.\"},posterMobile:{type:ControlType.Image,title:\"Poster (mobile)\",description:\"First frame of the mobile cut, or a portrait crop of the main video's first frame; used at and below Mobile max px.\"},stillMobileUrl:{type:ControlType.String,title:\"Mobile still URL\",defaultValue:\"\",description:\"Phones show this still instead of the video and never download it. Leave empty to play the video on phones.\"},deferLoad:{type:ControlType.Boolean,title:\"Load after page\",defaultValue:true,description:\"Starts the video after the page has loaded, so it never competes with the first paint. Off = load immediately.\"},afterPaint:{type:ControlType.Number,title:\"Wait after paint\",defaultValue:1e3,min:0,max:3e3,step:50,unit:\"ms\",description:\"How long after the page's first paint the video starts loading.\",hidden:p=>!p.deferLoad}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LoopVideo\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LoopVideo.map"],"mappings":"A,mNAKgP,SAASkB,EAAOC,EAAI,CAAC,IAAI,IAAMC,KAAOC,EAAS,GAAGF,EAAI,QAAQC,CAAG,IAAI,GAAG,OAAOC,EAASD,GAAK,OAAOD,CAAI,CAmE5R,SAASG,GAAgB,CAAC,GAAG,CAAC,IAAM,EAAE,YAAY,iBAAiB,wBAAwB,CAAC,CAAC,GAAG,OAAO,EAAE,EAAE,UAAU,EAAG,MAA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