{"version":3,"file":"Instagram.BfiaVv2D.mjs","names":["useMemo","id"],"sources":["https:/framerusercontent.com/modules/HGu8PKPDwAHu4uSgLoYR/8ScWawSL1gtbsgAxdHrd/Instagram.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";import{containerStyles}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";import{emptyStateStyle,stateParagraphStyle,stateTitleStyle}from\"https://framer.com/m/framer/integrations-styles.js@0.2.0\";const instagramRegex=/^https?:\\/\\/www\\.instagram\\.com\\/p\\/([^\\/]+)/;/**\n * INSTAGRAM\n *\n * @framerIntrinsicWidth 300\n * @framerIntrinsicHeight 410\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */ export default function Instagram({url,style,...props}){const id=useMemo(()=>{var ref;const[,id]=(ref=url.match(instagramRegex))!==null&&ref!==void 0?ref:[null,null];return id;},[url]);return url&&id?/*#__PURE__*/ _jsx(motion.iframe,{style:{...containerStyles,...style},src:`https://www.instagram.com/p/${id}/embed/`,frameBorder:0,width:\"100%\",height:\"100%\",scrolling:\"no\",...props}):/*#__PURE__*/ _jsxs(motion.div,{style:{...emptyStateStyle,...style},...props,children:[/*#__PURE__*/ _jsx(\"h1\",{style:stateTitleStyle,children:\"Instagram\"}),url?/*#__PURE__*/ _jsx(\"p\",{style:stateParagraphStyle,children:\"This post URL doesn’t seem correct.\"}):/*#__PURE__*/ _jsx(\"p\",{style:stateParagraphStyle,children:\"Set a post URL in the Properties.\"})]});};addPropertyControls(Instagram,{url:{title:\"URL\",type:ControlType.String,placeholder:\"https://www.instagram.com/p/***\",defaultValue:\"https://www.instagram.com/p/CteMsH8M67r/\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Instagram\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"300\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"410\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Instagram.map"],"mappings":"uaAQI,SAAwB,EAAU,CAAC,MAAI,QAAM,GAAG,GAAO,CAAC,IAAM,EAAGA,MAAY,CAAS,GAAK,EAAEC,GAAS,EAAI,MAAM,EAAe,EAA2B,CAAC,KAAK,KAAK,CAAC,OAAOA,GAAK,CAAC,EAAI,CAAC,CAAC,OAAO,GAAK,EAAiB,EAAK,EAAO,OAAO,CAAC,MAAM,CAAC,GAAG,EAAgB,GAAG,EAAM,CAAC,IAAI,+BAA+B,EAAG,SAAS,YAAY,EAAE,MAAM,OAAO,OAAO,OAAO,UAAU,KAAK,GAAG,EAAM,CAAC,CAAe,EAAM,EAAO,IAAI,CAAC,MAAM,CAAC,GAAG,EAAgB,GAAG,EAAM,CAAC,GAAG,EAAM,SAAS,CAAe,EAAK,KAAK,CAAC,MAAM,EAAgB,SAAS,YAAY,CAAC,CAAC,EAAkB,EAAK,IAAI,CAAC,MAAM,EAAoB,SAAS,sCAAsC,CAAC,CAAe,EAAK,IAAI,CAAC,MAAM,EAAoB,SAAS,oCAAoC,CAAC,CAAC,CAAC,CAAC,oBARlrB,IAA2B,IAAoD,IAAkC,IAAkF,IAA0H,CAAM,EAAe,+CAQmW,EAAoB,EAAU,CAAC,IAAI,CAAC,MAAM,MAAM,KAAK,EAAY,OAAO,YAAY,kCAAkC,aAAa,2CAA2C,CAAC,CAAC"}