{"version":3,"file":"SampleReview.C2k-aJDG.mjs","names":["React.useRef","__esmMin","init_ssg_sandbox_shims","window","de","init_jsx_runtime","J","c","p","init_npm_react_18_3_1","ce","addPropertyControls","init_framer_D1IzEvwH","ControlType","rememberSampleRequest","event","link","sampleHash","sampleEvent","requestedUntil","takeSampleRequest","until","withSampleReviewLink","Component","props","SampleReview","ref","details","frame","reveal","bounds","previewOpen","style","label","items","i","item","note","init_SampleReview"],"sources":["https:/framerusercontent.com/modules/bDVeNVDShIfSqYfn1HM6/naLXe5ei0rs9tPgOjXpg/SampleReview.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const sampleHash=\"#sample-review\";const sampleEvent=\"northboost:sample-review\";let requestedUntil=0;function rememberSampleRequest(event){if(event.button!==0||event.metaKey||event.ctrlKey||event.shiftKey||event.altKey)return;if(!window.matchMedia(\"(max-width: 809px)\").matches)return;const link=event.target instanceof Element?event.target.closest(\"a[href]\"):null;if(!link||link.origin!==window.location.origin||link.hash!==sampleHash||link.target===\"_blank\")return;// Framer can scroll to a section without putting its hash in the preview iframe's URL.\nrequestedUntil=Date.now()+15e3;try{window.sessionStorage.setItem(sampleEvent,String(requestedUntil));}catch{// Same-document navigation still has the in-memory request.\n}window.dispatchEvent(new Event(sampleEvent));}function takeSampleRequest(){let until=requestedUntil;requestedUntil=0;try{until=Math.max(until,Number(window.sessionStorage.getItem(sampleEvent))||0);window.sessionStorage.removeItem(sampleEvent);}catch{// Storage is optional.\n}return until>Date.now();}export function withSampleReviewLink(Component){return /*#__PURE__*/React.forwardRef(function SampleLink(props,ref){React.useEffect(()=>{document.addEventListener(\"click\",rememberSampleRequest,true);return()=>document.removeEventListener(\"click\",rememberSampleRequest,true);},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref});});}/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function SampleReview({style,label=\"See a sample review\",items=[],note=\"\",previewOpen=false}){const ref=React.useRef(null);React.useEffect(()=>{const details=ref.current;if(!details)return;let frame=0;function reveal(){window.cancelAnimationFrame(frame);frame=window.requestAnimationFrame(()=>{if(!details||!details.getClientRects().length)return;const fromLink=takeSampleRequest();if(!fromLink&&window.location.hash!==sampleHash)return;details.open=true;details.scrollIntoView({block:\"start\",behavior:\"auto\"});});}reveal();window.addEventListener(\"pageshow\",reveal);window.addEventListener(\"hashchange\",reveal);window.addEventListener(\"popstate\",reveal);window.addEventListener(sampleEvent,reveal);return()=>{window.cancelAnimationFrame(frame);window.removeEventListener(\"pageshow\",reveal);window.removeEventListener(\"hashchange\",reveal);window.removeEventListener(\"popstate\",reveal);window.removeEventListener(sampleEvent,reveal);};},[]);const keepOpenSampleInView=event=>{const details=event.currentTarget;if(!details.open||!details.getClientRects().length)return;const bounds=details.getBoundingClientRect();if(bounds.top<88||bounds.bottom>window.innerHeight){details.scrollIntoView({block:\"start\",behavior:\"auto\"});}};return /*#__PURE__*/_jsxs(\"details\",{ref:ref,onToggle:keepOpenSampleInView,open:previewOpen||undefined,style:{...style,boxSizing:\"border-box\",width:\"100%\",height:\"auto\",background:\"#1B2421\",color:\"#FFFFFF\",border:\"1px solid #397462\",borderRadius:12,fontFamily:\"Instrument Sans, sans-serif\",scrollMarginTop:100},children:[/*#__PURE__*/_jsx(\"summary\",{style:{cursor:\"pointer\",padding:18,fontSize:16,fontWeight:600,lineHeight:1.5,minHeight:48,boxSizing:\"border-box\"},children:label}),/*#__PURE__*/_jsxs(\"div\",{style:{padding:\"0 18px 20px\"},children:[/*#__PURE__*/_jsx(\"p\",{style:{margin:\"0 0 18px\",fontSize:13,color:\"#B8D7CB\"},children:\"Illustrative example\"}),items.map((item,i)=>/*#__PURE__*/_jsxs(\"section\",{style:{marginBottom:18},children:[/*#__PURE__*/_jsxs(\"h3\",{style:{fontSize:16,lineHeight:1.4,margin:\"0 0 6px\",fontWeight:600},children:[i+1,\". \",item.title]}),/*#__PURE__*/_jsx(\"p\",{style:{fontSize:14,lineHeight:1.5,color:\"#D5DDD9\",margin:0},children:item.description})]},i)),/*#__PURE__*/_jsx(\"p\",{style:{fontSize:13,lineHeight:1.5,color:\"#B8D7CB\",margin:0},children:note})]})]});}addPropertyControls(SampleReview,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"See a sample review\"},items:{type:ControlType.Array,title:\"Examples\",control:{type:ControlType.Object,controls:{title:{type:ControlType.String},description:{type:ControlType.String,displayTextArea:true}}}},note:{type:ControlType.String,title:\"Note\",displayTextArea:true},previewOpen:{type:ControlType.Boolean,title:\"Show expanded\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"withSampleReviewLink\":{\"type\":\"reactHoc\",\"name\":\"withSampleReviewLink\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"SampleReview\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SampleReview.map"],"mappings":"A,6MAA6O,SAASc,EAAsB,EAAM,CAAwF,GAApFC,EAAM,SAAS,GAAGA,EAAM,SAASA,EAAM,SAASA,EAAM,UAAUA,EAAM,QAAiB,CAACZ,EAAO,WAAW,oBAAoB,CAAC,CAAC,QAAQ,OAAO,IAAMa,EAAKD,EAAM,kBAAkB,QAAQA,EAAM,OAAO,QAAQ,SAAS,EAAE,KAAK,GAAIC,GAAMA,EAAK,SAASb,EAAO,SAAS,QAAQa,EAAK,OAAOC,GAAYD,EAAK,SAAS,SAC3kB,GAAe,KAAK,IAAI,EAAE,KAAK,GAAG,CAACb,EAAO,eAAe,QAAQe,EAAY,OAAOC,CAAc,CAAC,CAAE,MAAM,CAC3G,CAAChB,EAAO,cAAc,IAAI,MAAMe,CAAW,CAAC,CADlB,CACoB,CAAC,SAAS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