{"version":3,"file":"StackScale.jqX59n-8.mjs","names":["useRef","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","H","J","ce","de","window","init_framer_CKT6jEEQ","useIsStaticRenderer","boxOf","node","el","parent","isContents","layoutParent","cardsIn","cards","child","stack","titleOf","texts","box","t","naturalHeight","lead","card","pad","scale","items","c","gap","LEAD_GAP","content","sum","introAbove","container","introNear","setTail","section","px","clearTail","stackState","fill","mode","vh","n","boxes","inset","TOP_GAP","offset","intro","INTRO_GAP","moved","b","scaled","pins","heights","prevFit","room","nat","h","MIN_HEIGHT","i","tall","top","STRIP_PAD","lowest","cardHeights","DESKTOP","firstBottom","tops","sectionOf","lastBottom","below","tail","extra","DURATION","shown","travel","past","startY","START","arrived","clamp","y","follow","depth","reduce","a","step","useMergedRef","own","forwarded","setCardHeight","fitCard","min","on","stackCard","SCALE_STEP","MIN_WIDTH","setRef","ref","isStatic","raf","measure","reset","update","minWidth","me","inner","ty","natural","want","move","queue","onResize","Component","props","withStackCardCompactFlat","withStackCardFitFlat","withStickyIntro","stacked","withStickyColumnHeading","row","beside","init_StackScale","v"],"sources":["https:/framerusercontent.com/modules/WtrSxnho9pj0C7rtojcl/iQJ1jQeDBBHoE0IP5EL2/StackScale.js"],"sourcesContent":["import{createElement,forwardRef,useEffect,useRef}from\"react\";import{useIsStaticRenderer}from\"framer\";// Stacked cards that shrink as they pile up (stacking B, as tuned in the KEY Stacking Scale prototype; first used on\n// About Us, \"what a library opens\"). Separate from CardStack.tsx, which has its own stack for How We Work.\n// - each card pins a little lower than the one before it, just under that card's eyebrow + title, so every earlier\n//   title stays visible as a strip while the next card slides up over the rest of it\n// - withStackCardFill: each card fills the screen from its stop down to the section's padding at the bottom\n//   withStackCardCompact: each card keeps its own height (its bottom may run off screen while it's pinned)\n//   withStackCardFillFlat: like withStackCardFill, without the shrink\n//   withStackCardCompactFlat: like withStackCardCompact, without the shrink\n//   withStackCardFitFlat: each card keeps its own height when it fits under its stop, and is capped to the space\n//   left (down to the section's padding at the bottom) when it doesn't, so its bottom always shows before the\n//   next card slides over it; no shrink, and only from DESKTOP width up (How We Work)\n//   withStackWrapper: goes on a transparent wrapper around each card. The wrapper fills the screen (so the timing\n//   matches withStackCardFill) while, on desktop, the card inside hugs its content: its text column plus padding,\n//   or just tall enough to cover the bottom of the cards under it, so none of them peek out below\n// - each incoming card slides in over its usual travel plus DURATION of extra scroll, so the stacking plays slowly\n// - as a card comes in, every card under it shrinks a step from its top edge, so deeper cards are smaller\n// - every card after the first stays below the window until the first card has pinned\n// - the next section stays below the window until the last card lands (the section gets extra space at its bottom)\n// - once the last card reaches its stop, the whole pile scrolls away together, with a pinned intro beside or above it\n// Put the same override on every card; the cards must be the only visible children of their stack. The stack's top\n// padding (or TOP_GAP when it has none) is the gap above the first card and below every card once it's pinned.\nconst DURATION=.6// extra scroll per card, as a share of the window height\n;const SCALE_STEP=.04// how much a card shrinks for each card that lands on it\n;const START=1// the shrink starts when the incoming card's top is this far down the window (1 = bottom edge)\n;const STRIP_PAD=12// space below a title before the next card's edge\n;const MIN_HEIGHT=360// a card never gets shorter than this, however many strips are above it\n;const MIN_WIDTH=810// below this the cards just scroll, no stacking\n;const TOP_GAP=40// where the first card stops when its stack has no top padding\n;const INTRO_GAP=20// space between a pinned intro above the cards (e.g. on tablet) and the first card\n;const DESKTOP=1200// from this width, cards inside withStackWrapper hug their content\n;const LEAD_GAP=32// least space between items in a card's text column (it may be set to spread them apart)\n;const clamp=v=>Math.min(1,Math.max(0,v));// Published pages wrap a component that has per-breakpoint versions in a `display: contents` element (class\n// \"ssr-variant\"). It has no box of its own, so it's looked through: never used as a card's box or as the stack.\nconst isContents=el=>getComputedStyle(el).display===\"contents\";// The element that sits in the stack: the card itself, or the instance wrapper around it. A card whose settings\n// differ between breakpoints (e.g. a different photo on Larger Desktop) gets an extra `display: contents`\n// wrapper between it and its instance wrapper; that one is looked through, so the card still reaches the stack.\nfunction boxOf(el){let node=el;let parent=el.parentElement;while(parent&&parent.childElementCount===1){if(!isContents(parent))node=parent;parent=parent.parentElement;}return node;}// The nearest ancestor that actually lays things out\nfunction layoutParent(el){let node=el.parentElement;while(node&&isContents(node))node=node.parentElement;return node;}// The stack's cards in order, including ones inside `display: contents` wrappers\nfunction cardsIn(stack){const cards=[];for(const child of stack.children){if(isContents(child))cards.push(...cardsIn(child));else if(child.dataset.stackCard===\"1\")cards.push(child);}return cards;}// The card's title: its first heading-sized text (eyebrows are smaller), so the strip runs down to just under it\nfunction titleOf(box){const texts=box.querySelectorAll(\"h1, h2, h3, h4, h5, h6, p\");for(const t of texts)if(parseFloat(getComputedStyle(t).fontSize)>=24)return t;return box;}// A card's height when it hugs its content: its text column (\"lead\") plus the same space above and below it.\n// Summing the column's items keeps this independent of the card's current height.\nfunction naturalHeight(card,scale){const lead=card.querySelector('[data-framer-name=\"lead\"]');if(!lead)return card.offsetHeight;// measured on screen, so undo the current shrink\nconst pad=(lead.getBoundingClientRect().top-card.getBoundingClientRect().top)/scale;const items=[...lead.children].filter(c=>c.offsetHeight>0);const gap=Math.max(LEAD_GAP,parseFloat(getComputedStyle(lead).rowGap)||0);const content=items.reduce((sum,c)=>sum+c.offsetHeight,0)+gap*Math.max(0,items.length-1);return Math.ceil(content+pad*2);}// A withStickyIntro column placed above the stack (its container lays them out top to bottom), if there is one\nfunction introAbove(stack){const container=layoutParent(stack);if(!container||getComputedStyle(container).flexDirection!==\"column\")return null;return[...container.children].find(c=>c.dataset.stickyIntro===\"1\"&&c!==stack)??null;}// A withStickyIntro column next to the stack (beside it or above it), if there is one\nfunction introNear(stack){const container=layoutParent(stack);if(!container)return null;return[...container.children].find(c=>c.dataset.stickyIntro===\"1\"&&c!==stack)??null;}// The section the stack sits in; it gets extra space at its bottom (see tail below)\nconst sectionOf=stack=>stack.closest(\"section\")??stack;// Gives the section extra space at its bottom, on top of the padding it has from Framer (0 puts that back)\nfunction setTail(section,px){if(section.dataset.pb0===undefined){section.dataset.pb0=section.style.paddingBottom;section.dataset.pbBase=String(parseFloat(getComputedStyle(section).paddingBottom)||0);}section.dataset.tail=String(px);section.style.paddingBottom=px?+section.dataset.pbBase+px+\"px\":section.dataset.pb0;}function clearTail(section){if(section.dataset.pb0===undefined)return;section.style.paddingBottom=section.dataset.pb0;delete section.dataset.pb0;delete section.dataset.pbBase;delete section.dataset.tail;}// The whole pile is worked out the same way by every card, from where all the cards sit right now;\n// each card then applies only its own part\nfunction stackState(boxes,reduce,mode,step){const fill=mode===\"fill\"||mode===\"wrap\";const vh=window.innerHeight;const n=boxes.length;const stack=layoutParent(boxes[0]);const inset=parseFloat(getComputedStyle(stack).paddingTop)||TOP_GAP;// when a pinned intro sits above the cards (the layout stacks them, e.g. on tablet), the cards stop under it\nlet offset=inset;const intro=introAbove(stack);if(intro)offset=(parseFloat(intro.style.top)||0)+intro.offsetHeight+INTRO_GAP;const moved=boxes.map(b=>+(b.dataset.ty||0));const scaled=boxes.map(b=>+(b.dataset.s||1));// stops and heights: each card stops under the strips of the cards above it; filling cards also run down to the\n// inset (and never pin so low that their own bottom is off screen), compact cards keep their own height\nconst pins=[];const heights=[];let prevFit=0;boxes.forEach((b,i)=>{const room=vh-offset-inset;if(mode===\"fit\"){// a fitting card keeps its own height (measured without the cap) when it fits under its stop, and is\n// capped to the room when it doesn't, so its bottom shows before the next card slides over it. The last\n// card is never shorter than the one before it (up to its own height) and always stops at its usual spot,\n// under the strips above: nothing covers it, and its bottom comes into view as the pile scrolls away\nconst nat=+(b.dataset.nat||0)||b.offsetHeight;let h=nat>room?Math.max(MIN_HEIGHT,room):null;if(i>0&&i===n-1&&prevFit>(h??nat))h=Math.min(nat,prevFit);const tall=h??nat;heights.push(h);pins.push(i===n-1?offset:Math.min(offset,vh-tall-inset));prevFit=tall;}else{const h=fill?Math.max(MIN_HEIGHT,room):null;heights.push(h);pins.push(h!==null&&i<n-1?Math.min(offset,vh-h-inset):offset);}const top=b.getBoundingClientRect().top;offset+=(titleOf(b).getBoundingClientRect().bottom-top)/scaled[i]+STRIP_PAD;});// wrapped cards on desktop: each card hugs its content but reaches at least as low as the cards under it\nlet lowest=0;const cardHeights=boxes.map((b,i)=>{const card=b.firstElementChild;if(mode!==\"wrap\"||!card||window.innerWidth<DESKTOP)return null;const h=Math.max(naturalHeight(card,scaled[i]),lowest-pins[i]);lowest=Math.max(lowest,pins[i]+h);return h;});// a first card shorter than the window (e.g. a compact card on a tall screen) would leave the next card in view\n// below it, drifting up before the pile pins. The next card gets extra space above it, so it sits just under the\n// window's bottom edge when the first card reaches its stop and only starts sliding in from there\nconst gap=parseFloat(getComputedStyle(stack).rowGap)||0;const firstBottom=pins[0]+(heights[0]??boxes[0].offsetHeight)+gap;const lead=n>1?Math.max(0,Math.ceil(vh-firstBottom)):0;// layout tops: where each card sits without the moves below (scaling from the top edge never moves it)\nconst tops=boxes.map((b,i)=>b.getBoundingClientRect().top-moved[i]);// cards shorter than the window leave the section's background below the pinned pile, and the next section\n// would come up into view while the last card is still sliding in. The section gets just enough extra space at\n// its bottom that the next section reaches the window's bottom edge as the last card lands\nconst section=sectionOf(stack);const lastBottom=tops[n-1]+(heights[n-1]??boxes[n-1].offsetHeight);const below=section.getBoundingClientRect().bottom-lastBottom-+(section.dataset.tail||0);const tail=Math.max(0,Math.ceil(vh-pins[n-1]-(heights[n-1]??boxes[n-1].offsetHeight)-below));const extra=vh*DURATION;// each incoming card slides from the bottom of the window to its stop over its travel plus the extra scroll\nconst shown=tops.map((top,i)=>{const t=top-pins[i];const travel=Math.max(1,vh-pins[i]);if(i===0||t<=0)return top;return t>=travel+extra?top-extra:pins[i]+t*travel/(travel+extra);});// once the last card is past its stop, the cards above follow it up by the same amount\nconst past=Math.max(0,pins[n-1]-tops[n-1]);const startY=vh*START;const arrived=shown.map((y,i)=>i===0?0:clamp((startY-y)/Math.max(1,startY-pins[i])));return boxes.map((_,i)=>{const follow=i<n-1&&past>0?Math.min(0,pins[i]-past-tops[i]):0;const depth=reduce?0:arrived.slice(i+1).reduce((a,b)=>a+b,0);return{pin:pins[i],height:heights[i],cardHeight:cardHeights[i],margin:i===1&&lead?`calc(${DURATION*100}vh + ${lead}px)`:i?`${DURATION*100}vh`:\"\",move:follow+shown[i]-tops[i],past,tail,scale:Math.max(.5,1-step*depth)};});}function useMergedRef(forwarded){const own=useRef(null);const set=el=>{own.current=el;if(typeof forwarded===\"function\")forwarded(el);else if(forwarded)forwarded.current=el;};return[own,set];}// Sets the card's height, or puts back the height it had from Framer\nfunction setCardHeight(card,h){if(card.dataset.h0===undefined)card.dataset.h0=card.style.height;card.style.height=h===null?card.dataset.h0:h+\"px\";}// A filling card inside an instance wrapper fills that wrapper exactly; Framer may give it a minimum height\n// (e.g. 760px) that would otherwise make it spill past a shorter wrapper\nfunction fitCard(card,on){if(card.dataset.fit0===undefined)card.dataset.fit0=JSON.stringify([card.style.height,card.style.minHeight]);const[h,min]=JSON.parse(card.dataset.fit0);card.style.height=on?\"100%\":h;card.style.minHeight=on?\"0\":min;}function stackCard(Component,mode,step=SCALE_STEP,minWidth=MIN_WIDTH){return /*#__PURE__*/forwardRef((props,ref)=>{const[el,setRef]=useMergedRef(ref);const isStatic=useIsStaticRenderer();useEffect(()=>{const card=el.current;if(isStatic||!card)return;const box=boxOf(card);box.dataset.stackCard=\"1\";const reduce=window.matchMedia(\"(prefers-reduced-motion: reduce)\");let raf=0;// a fitting card's own height, measured with the cap taken off (on mount and whenever the window resizes)\nconst measure=()=>{if(mode!==\"fit\")return;box.style.height=\"\";if(card!==box)fitCard(card,false);box.dataset.nat=String(box.offsetHeight);};const reset=()=>{const parent=layoutParent(box);if(parent){clearTail(sectionOf(parent));const intro=introNear(parent);if(intro){intro.style.transform=\"\";intro.dataset.ty=\"0\";}}box.style.position=box.style.top=box.style.height=box.style.marginTop=\"\";if(mode===\"wrap\"&&box.firstElementChild)setCardHeight(box.firstElementChild,null);if((mode===\"fill\"||mode===\"fit\")&&card!==box)fitCard(card,false);box.style.transform=box.style.transformOrigin=\"\";box.dataset.ty=\"0\";box.dataset.s=\"1\";};const update=()=>{raf=0;if(window.innerWidth<minWidth)return reset();const stack=layoutParent(box);if(!stack)return;const boxes=cardsIn(stack);const i=boxes.indexOf(box);if(i<0)return;const me=stackState(boxes,reduce.matches,mode,step)[i];box.style.position=\"sticky\";box.style.top=me.pin+\"px\";box.style.height=me.height===null?\"\":me.height+\"px\";const inner=box.firstElementChild;if(mode===\"wrap\"&&inner)setCardHeight(inner,me.cardHeight);if(mode===\"fill\"&&card!==box)fitCard(card,true);if(mode===\"fit\"&&card!==box)fitCard(card,me.height!==null);box.style.marginTop=me.margin;box.style.transformOrigin=\"50% 0\";box.style.transform=[me.move?`translate3d(0, ${me.move.toFixed(2)}px, 0)`:\"\",me.scale<1?`scale(${me.scale.toFixed(4)})`:\"\"].join(\" \").trim();box.dataset.ty=String(me.move);box.dataset.s=String(me.scale);if(i===boxes.length-1)setTail(sectionOf(stack),me.tail);// a pinned intro (above the cards or beside them) leaves with the pile: once the last card has landed\n// it moves up by the same amount as the cards, whether or not it has come unstuck yet\nconst intro=i===0?introNear(stack):null;if(intro){const ty=+(intro.dataset.ty||0);const natural=intro.getBoundingClientRect().top-ty;const want=(parseFloat(intro.style.top)||0)-me.past;const move=me.past>0?Math.min(0,want-natural):0;intro.style.transform=move?`translate3d(0, ${move.toFixed(2)}px, 0)`:\"\";intro.dataset.ty=String(move);}};const queue=()=>{if(!raf)raf=requestAnimationFrame(update);};measure();update();// every card's size and stop depend on the others, so settle once they've all mounted and fonts loaded\nqueue();document.fonts?.ready.then(queue);window.addEventListener(\"scroll\",queue,{passive:true});const onResize=()=>{const parent=layoutParent(box);if(parent)clearTail(sectionOf(parent));measure();queue();};window.addEventListener(\"resize\",onResize);return()=>{cancelAnimationFrame(raf);window.removeEventListener(\"scroll\",queue);window.removeEventListener(\"resize\",onResize);delete box.dataset.stackCard;reset();};},[isStatic]);return /*#__PURE__*/createElement(Component,{...props,ref:setRef,style:{...props.style,willChange:\"transform\"}});});}// The `: ComponentType` return type is what makes Framer recognise these as overrides\nexport function withStackCardFill(Component){return stackCard(Component,\"fill\");}export function withStackCardFillFlat(Component){return stackCard(Component,\"fill\",0);}export function withStackCardCompactFlat(Component){return stackCard(Component,\"compact\",0);}// How We Work: stacks only from the Desktop breakpoint up (1200px); tablet and phone just scroll\nexport function withStackCardFitFlat(Component){return stackCard(Component,\"fit\",0,DESKTOP);}export function withStackCardCompact(Component){return stackCard(Component,\"compact\");}export function withStackWrapper(Component){return stackCard(Component,\"wrap\");}// A heading column beside a card stack: stays pinned TOP_GAP from the top until its section scrolls away\nexport function withStickyIntro(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[el,setRef]=useMergedRef(ref);const isStatic=useIsStaticRenderer();useEffect(()=>{const box=el.current;if(isStatic||!box)return;box.dataset.stickyIntro=\"1\";const update=()=>{const on=window.innerWidth>=MIN_WIDTH;// above the cards (stacked layout), its own top padding is dropped so the heading sits TOP_GAP down;\n// beside them, the column pins TOP_GAP down as it is\nconst stacked=getComputedStyle(box.parentElement).flexDirection===\"column\";const pad=stacked?parseFloat(getComputedStyle(box).paddingTop)||0:0;box.style.position=on?\"sticky\":\"\";box.style.top=on?Math.max(0,TOP_GAP-pad)+\"px\":\"\";box.style.alignSelf=on&&!stacked?\"flex-start\":\"\";};update();window.addEventListener(\"resize\",update);return()=>window.removeEventListener(\"resize\",update);},[isStatic]);return /*#__PURE__*/createElement(Component,{...props,ref:setRef});});}// A heading column beside content that just scrolls: stays pinned while it sits beside its neighbour, clear of the nav\n// bar (the column's own 32px top padding puts the heading just under it). When the layout stacks them (tablet, phone) it\n// scrolls with the page\nexport function withStickySideColumn(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[el,setRef]=useMergedRef(ref);const isStatic=useIsStaticRenderer();useEffect(()=>{const box=el.current;if(isStatic||!box)return;const update=()=>{const beside=getComputedStyle(box.parentElement).flexDirection===\"row\";box.style.position=beside?\"sticky\":\"\";box.style.top=beside?\"56px\":\"\";box.style.alignSelf=beside?\"flex-start\":\"\";};update();window.addEventListener(\"resize\",update);return()=>window.removeEventListener(\"resize\",update);},[isStatic]);return /*#__PURE__*/createElement(Component,{...props,ref:setRef});});}// A heading at the top of a side column whose other items scroll with the page: put it in a frame that fills the space\n// above them, and it pins just under the nav bar until it reaches the end of that frame. When the layout stacks the\n// column above its neighbour (tablet, phone) it scrolls with the page\nexport function withStickyColumnHeading(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[el,setRef]=useMergedRef(ref);const isStatic=useIsStaticRenderer();useEffect(()=>{const box=el.current;if(isStatic||!box)return;const update=()=>{// heading > its frame > the side column > the row holding the column and its neighbour\nconst row=box.parentElement?.parentElement?.parentElement;const beside=!!row&&getComputedStyle(row).flexDirection===\"row\";box.style.position=beside?\"sticky\":\"\";box.style.top=beside?\"88px\":\"\";};update();window.addEventListener(\"resize\",update);return()=>window.removeEventListener(\"resize\",update);},[isStatic]);return /*#__PURE__*/createElement(Component,{...props,ref:setRef});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withStickySideColumn\":{\"type\":\"reactHoc\",\"name\":\"withStickySideColumn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStickyColumnHeading\":{\"type\":\"reactHoc\",\"name\":\"withStickyColumnHeading\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStackCardCompactFlat\":{\"type\":\"reactHoc\",\"name\":\"withStackCardCompactFlat\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStackWrapper\":{\"type\":\"reactHoc\",\"name\":\"withStackWrapper\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStackCardFillFlat\":{\"type\":\"reactHoc\",\"name\":\"withStackCardFillFlat\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStackCardCompact\":{\"type\":\"reactHoc\",\"name\":\"withStackCardCompact\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStackCardFitFlat\":{\"type\":\"reactHoc\",\"name\":\"withStackCardFitFlat\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStickyIntro\":{\"type\":\"reactHoc\",\"name\":\"withStickyIntro\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStackCardFill\":{\"type\":\"reactHoc\",\"name\":\"withStackCardFill\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StackScale.map"],"mappings":"A,yLAoCA,SAASW,EAAM,EAAG,CAAC,IAAIC,EAAKC,EAAOC,EAAOD,EAAG,cAAc,KAAMC,GAAQA,EAAO,oBAAoB,GAAOC,EAAWD,CAAM,IAAE,EAAKA,GAAO,EAAOA,EAAO,cAAe,OAAOF,CAAK,CACnL,SAASI,EAAa,EAAG,CAAC,IAAIJ,EAAKC,EAAG,cAAc,KAAMD,GAAMG,EAAWH,CAAI,GAAE,EAAKA,EAAK,cAAc,OAAOA,CAAK,CACrH,SAASK,EAAQ,EAAM,CAAC,IAAMC,EAAM,CAAC,EAAE,IAAI,IAAMC,KAASC,EAAM,SAAaL,EAAWI,CAAK,EAAED,EAAM,KAAK,GAAGD,EAAQE,CAAK,CAAC,EAAUA,EAAM,QAAQ,YAAY,KAAID,EAAM,KAAKC,CAAK,EAAG,OAAOD,CAAM,CACnM,SAASG,EAAQ,EAAI,CAAC,IAAMC,EAAMC,EAAI,iBAAiB,2BAA2B,EAAE,IAAI,IAAMC,KAAKF,EAAM,GAAG,WAAW,iBAAiBE,CAAC,CAAC,CAAC,QAAQ,GAAG,GAAG,OAAOA,EAAE,OAAOD,CAAI,CAE7K,SAASE,EAAc,EAAK,EAAM,CAAC,IAAMC,EAAKC,EAAK,cAAc,2BAA2B,EAAE,GAAG,CAACD,EAAK,OAAOC,EAAK,aACnH,IAAMC,GAAKF,EAAK,sBAAsB,CAAC,CAAC,IAAIC,EAAK,sBAAsB,CAAC,CAAC,KAAKE,EAAYC,EAAM,CAAC,GAAGJ,EAAK,QAAQ,CAAC,CAAC,OAAO,GAAGK,EAAE,aAAa,CAAC,EAAQC,EAAI,KAAK,IAAIC,EAA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