{"version":3,"file":"WatchDemoButton.Df6fp0iZ.mjs","names":["useState","useRef","_Fragment","__esmMin","init_ssg_sandbox_shims","window","_e","Ha","de","init_jsx_runtime","init_npm_react_dom_18_3_1","c","init_npm_react_18_3_1","ce","init_framer_DDfsYcI0","ControlType","addPropertyControls","WatchDemoButton","props","open","setOpen","triggerRef","onKey","prev","modal","title","videoId","caption","l","label","init_WatchDemoButton"],"sources":["https:/framerusercontent.com/modules/sehUQAuXyeQMq0U3gYdb/wERbdKaGWNnc1sGSUZZT/WatchDemoButton.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{createPortal}from\"react-dom\";import{addPropertyControls,ControlType}from\"framer\";// \"Watch the Demo\" button for the acqverity.com hero.\n// Opens the demo in an on-page player. Nothing loads from YouTube until the\n// visitor presses the button; the player then loads from youtube-nocookie.com.\n/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function WatchDemoButton(props){const{videoId,label,title,caption,color}=props;const[open,setOpen]=useState(false);// The \"Watch the Demo\" button, so keyboard focus can go back to it\n// when the video closes.\nconst triggerRef=useRef(null);useEffect(()=>{if(!open)return;const onKey=e=>{if(e.key===\"Escape\")setOpen(false);};const prev=document.body.style.overflow;document.body.style.overflow=\"hidden\";window.addEventListener(\"keydown\",onKey);return()=>{document.body.style.overflow=prev;window.removeEventListener(\"keydown\",onKey);// Video closed (Escape, ×, or a click outside): return focus\n// to the button that opened it.\nif(triggerRef.current)triggerRef.current.focus();};},[open]);const css=`\n.acq-watch{display:inline-flex;align-items:center;justify-content:center;gap:8px;\npadding:14px 22px;border:0;border-radius:6px;background:transparent;cursor:pointer;\nfont-family:Inter,\"Inter Placeholder\",sans-serif;font-size:14px;font-weight:600;\nline-height:16.8px;white-space:nowrap;transition:background-color .15s ease}\n.acq-watch:hover{background:rgba(255,255,255,.08)}\n.acq-watch:focus-visible{outline:2px solid #5FC3CC;outline-offset:2px}\n.acq-watch-x{position:absolute;top:-44px;right:0;width:36px;height:36px;border:0;\nborder-radius:18px;background:rgba(255,255,255,.12);color:#fff;font-size:22px;\nline-height:36px;cursor:pointer;font-family:Inter,sans-serif}\n.acq-watch-x:hover{background:rgba(255,255,255,.22)}\n.acq-watch-x:focus-visible{outline:2px solid #5FC3CC;outline-offset:2px}`;const backdrop={position:\"fixed\",inset:0,zIndex:2147483e3,background:\"rgba(6, 18, 32, 0.88)\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:\"60px 16px 16px\",boxSizing:\"border-box\"};const frame={position:\"relative\",width:\"min(960px, 100%)\",maxHeight:\"100%\"};const player={position:\"relative\",width:\"100%\",aspectRatio:\"16 / 9\",background:\"#0B1F2E\",borderRadius:8,overflow:\"hidden\",boxShadow:\"0 20px 60px rgba(0,0,0,.45)\"};const modal=open&&typeof document!==\"undefined\"?/*#__PURE__*/createPortal(/*#__PURE__*/_jsx(\"div\",{style:backdrop,role:\"dialog\",\"aria-modal\":\"true\",\"aria-label\":title,onClick:()=>setOpen(false),children:/*#__PURE__*/_jsxs(\"div\",{style:frame,onClick:e=>e.stopPropagation(),children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"acq-watch-x\",\"aria-label\":\"Close video\",autoFocus:true,onClick:()=>setOpen(false),children:\"\\xd7\"}),/*#__PURE__*/_jsx(\"div\",{style:player,children:/*#__PURE__*/_jsx(\"iframe\",{src:`https://www.youtube-nocookie.com/embed/${videoId}?autoplay=1&rel=0&modestbranding=1&playsinline=1&iv_load_policy=3`,title:title,allow:\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\",allowFullScreen:true,style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",border:0}})}),caption?/*#__PURE__*/_jsx(\"p\",{style:{margin:\"12px 0 0\",color:\"rgba(255,255,255,.75)\",fontFamily:'Inter, \"Inter Placeholder\", sans-serif',fontSize:13,lineHeight:1.4,textAlign:\"center\"},children:caption}):null]})}),document.body):null;return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:css}),/*#__PURE__*/_jsxs(\"button\",{ref:triggerRef,type:\"button\",className:\"acq-watch\",style:{color,width:\"100%\",boxSizing:\"border-box\"},\"aria-haspopup\":\"dialog\",onClick:()=>setOpen(true),children:[/*#__PURE__*/_jsxs(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 16 16\",\"aria-hidden\":\"true\",style:{flex:\"none\"},children:[/*#__PURE__*/_jsx(\"circle\",{cx:\"8\",cy:\"8\",r:\"7.25\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"1.5\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M6.5 5.2 L11 8 L6.5 10.8 Z\",fill:\"currentColor\"})]}),label]}),modal]});}WatchDemoButton.defaultProps={videoId:\"PspF7Nne8TU\",label:\"Watch the Demo (1:30)\",title:\"AcqVerity for MAS – Product Demo\",caption:\"Demonstration environment with fictional data.\",color:\"#FFFFFF\"};addPropertyControls(WatchDemoButton,{videoId:{type:ControlType.String,title:\"Video ID\"},label:{type:ControlType.String,title:\"Label\"},title:{type:ControlType.String,title:\"Title\"},caption:{type:ControlType.String,title:\"Caption\"},color:{type:ControlType.Color,title:\"Color\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WatchDemoButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WatchDemoButton.map"],"mappings":"A,6NAMG,SAAwBiB,EAAgB,EAAM,CAAC,GAAK,CAAC,UAAQ,QAAM,QAAM,UAAQ,SAAOC,EAAW,CAACC,EAAKC,GAASpB,EAAS,EAAK,EAE7HqB,EAAWpB,EAAO,IAAI,EAAEY,MAAc,CAAC,GAAG,CAACM,EAAK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