{"version":3,"file":"FontstandCanvasTest.DMwuiKya.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/0sfjvLTiu7uzmr8PT7Nq/6Xd8MEzlT5UwnCFBv2wn/FontstandCanvasTest.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,useRef}from\"react\";import{RenderTarget}from\"framer\";const websiteCSS='\\n/* ABC Diatype only: preserve Framer size, weight, tracking and line-height. */\\n:is([style*=\"ABC Diatype Editor\"],\\n[style*=\"ABC Diatype Unlicensed Trial\"],\\n[data-styles-preset=\"oIAefa3OM\"],\\n[data-styles-preset=\"FnNAbi2XA\"],\\n[data-styles-preset=\"rKfsxRzk4\"],\\n[data-styles-preset=\"J6umfaw8v\"],\\n[data-styles-preset=\"RFQ0bmZ5f\"],\\n[data-styles-preset=\"ZWrUe6LJP\"],\\n[data-styles-preset=\"SJODZVb18\"],\\n[data-styles-preset=\"Kxn1iuwwg\"],\\n[data-styles-preset=\"Oqk1z9uHj\"],\\n[data-styles-preset=\"mv6JFfKjS\"],\\n[data-styles-preset=\"lXnG5olPN\"],\\n[data-styles-preset=\"nvWwoNDSb\"],\\n[data-styles-preset=\"FdrwYuMBe\"],\\n[data-styles-preset=\"W7XVhR_Uh\"],\\n[data-styles-preset=\"gWGJ0mWHs\"],\\n[data-styles-preset=\"GCFXdVeN2\"],\\n[data-styles-preset=\"kegQZJXpu\"],\\n[data-styles-preset=\"kZ2q5e7vM\"],\\n[data-styles-preset=\"RSTcS3eOs\"],\\n[data-styles-preset=\"oH7cbZ9c3\"],\\n[data-styles-preset=\"etrzopQ_o\"],\\n[data-styles-preset=\"btal7GAzw\"],\\n[data-styles-preset=\"NLaq56cbv\"],\\n[data-styles-preset=\"BaZ3Z_lSR\"],\\n[data-styles-preset=\"Vy0pZ_3Ni\"],\\n[data-styles-preset=\"r_E19NUny\"],\\n[data-styles-preset=\"ScgaKfgws\"],\\n[data-styles-preset=\"gHXA3FaGP\"],\\n[data-styles-preset=\"ttVvM6rjY\"],\\n[data-styles-preset=\"xS7mWRjBK\"],\\n[data-styles-preset=\"ooPIvwyvN\"],\\n[data-styles-preset=\"VILzMePqg\"],\\n[data-styles-preset=\"opNnTlq9k\"],\\n[data-styles-preset=\"CqMdREZUB\"],\\n[data-styles-preset=\"uNgzg_QTs\"],\\n[data-styles-preset=\"Wn9ZxBprn\"],\\n[data-styles-preset=\"OvUjAmHDd\"],\\n[data-styles-preset=\"CfuiIgNkH\"],\\n[data-styles-preset=\"j8T5VxNIT\"],\\n[data-styles-preset=\"u3Y1hNSgk\"],\\n[data-styles-preset=\"Oh0Jwk0g3\"],\\n[data-styles-preset=\"oZ89Ujn4d\"],\\n[data-styles-preset=\"FbVjtcMwQ\"],\\n[data-styles-preset=\"YO6yx3mlY\"],\\n[data-styles-preset=\"BdbVgmZdL\"],\\n[data-styles-preset=\"pciu24etA\"],\\n[data-styles-preset=\"siQzYltgE\"],\\n[data-styles-preset=\"qr1QQyN2x\"],\\n[data-styles-preset=\"SNGvTc5mi\"],\\n[data-styles-preset=\"ehMv_iCvf\"],\\n[data-styles-preset=\"L7ujDSu4r\"],\\n[data-styles-preset=\"O_HFrfVsf\"],\\n[data-styles-preset=\"vpQXbKuys\"],\\n[data-styles-preset=\"zw7Zf29Ox\"],\\n[data-styles-preset=\"tx2BdQyMr\"],\\n[data-styles-preset=\"E0XU8qlt6\"],\\n[data-styles-preset=\"dmRvNMyBS\"],\\n[data-styles-preset=\"UTnBigudf\"],\\n[data-styles-preset=\"cOiPhpe0F\"]) {\\n --framer-font-family: \"ABC Diatype\", sans-serif !important;\\n font-family: \"ABC Diatype\", sans-serif !important;\\n}\\n';const editorCSS='@font-face {font-family:\"ABC Diatype Editor\";src:url(\"https://framerusercontent.com/assets/2JLUUkKHeQB7XlY1ZIKlgv447A.woff2\") format(\"woff2\");font-weight:400;font-style:normal;font-display:swap;}\\n@font-face {font-family:\"ABC Diatype Editor\";src:url(\"https://framerusercontent.com/assets/PCwz5a1FroMs7CNXw9XVRPSLirc.woff2\") format(\"woff2\");font-weight:500;font-style:normal;font-display:swap;}\\n'+websiteCSS.replaceAll('\"ABC Diatype\", sans-serif','\"ABC Diatype Editor\", sans-serif');/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function FontstandFonts({style}){const[status,setStatus]=useState(\"loading\");const isCanvas=RenderTarget.current()===RenderTarget.canvas;const root=useRef(null);useEffect(()=>{if(!isCanvas||!root.current)return;let cancelled=false;const doc=root.current.ownerDocument;Promise.all([doc.fonts.load('400 16px \"ABC Diatype Editor\"'),doc.fonts.load('500 16px \"ABC Diatype Editor\"')]).then(faces=>{if(!cancelled)setStatus(faces.every(list=>list.length>0)?\"editor-loaded\":\"error\");},()=>{if(!cancelled)setStatus(\"error\");});return()=>{cancelled=true;};},[isCanvas]);return /*#__PURE__*/_jsxs(\"div\",{ref:root,\"data-fontstand-status\":status,\"aria-hidden\":\"true\",style:{...style,position:\"relative\",width:0,height:0,pointerEvents:\"none\"},children:[!isCanvas&&/*#__PURE__*/_jsx(\"link\",{onError:()=>setStatus(\"error\"),onLoad:event=>{const doc=event.currentTarget.ownerDocument;Promise.all([doc.fonts.load('400 16px \"ABC Diatype\"'),doc.fonts.load('500 16px \"ABC Diatype\"')]).then(faces=>setStatus(faces.every(list=>list.length>0)?\"loaded\":\"error\"),()=>setStatus(\"error\"));},rel:\"stylesheet\",href:\"https://webfonts.fontstand.com/WF-100062-99e870507f2590132632fcbdcb19e9e9.css\"}),/*#__PURE__*/_jsx(\"style\",{children:isCanvas?editorCSS:websiteCSS})]});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FontstandFonts\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FontstandCanv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