{"version":3,"file":"PlateSource.D1eM6UXJ.mjs","names":["useEffect","_jsxs","_jsx","__esmMin","p","c","init_jsx_runtime","init_npm_react_18_3_1","ce","addPropertyControls","init_framer_BWzg2IRg","ControlType","registerPlate","notifyPlates","init_BellatrixKit","isCanvas","pad","sourceAttrs","DEFAULT_PLATES","PlateSource","props","n","d","img","num","v","f","str","plate","init_PlateSource"],"sources":["https:/framerusercontent.com/modules/vHpEKRQFhn15drXvVRzW/tIN8RoGWJS9apbxA9GGT/PlateSource.js"],"sourcesContent":["// Bellatrix — Plate Source. Put one instance inside a Collection List of the \"Plates\" CMS\n// collection and bind its controls to the fields. Each item registers itself, so the hero,\n// chart, index, strip, archive and detail panel all read the CMS. Keep the list near the top of\n// the page. It renders nothing on the published site.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{DEFAULT_PLATES,registerPlate,notifyPlates,isCanvas,pad,sourceAttrs}from\"https://framerusercontent.com/modules/YXvrPk0bFPU1T43i8r0l/KUER1nl1jEvGeeUbpFrL/BellatrixKit.js\";/**\r\n * @framerSupportedLayoutWidth any\r\n * @framerSupportedLayoutHeight any\r\n */export default function PlateSource(props){const n=Math.max(1,Math.round(Number(props.number)||1));const d=DEFAULT_PLATES[(n-1)%DEFAULT_PLATES.length];const img=typeof props.image===\"string\"?props.image:props.image?.src;const num=(v,f)=>v===undefined||v===null||v===\"\"||isNaN(Number(v))?f:Number(v);const str=(v,f)=>typeof v===\"string\"&&v.trim()?v:f;const plate={image:img||d.image,alt:typeof props.image===\"object\"&&props.image?.alt||str(props.title,d.title),title:str(props.title,d.title),star:str(props.star,d.star),group:str(props.group,d.group||\"\"),greek:str(props.greek,d.greek),ra:num(props.ra,d.ra),dec:num(props.dec,d.dec),mag:num(props.mag,d.mag),distance:str(props.distance,d.distance),medium:str(props.medium,d.medium),year:str(props.year,d.year),caption:str(props.caption,d.caption),palette:str(props.palette,d.palette),slug:props.slug||\"\",link:props.slug?(props.base||\"/plates/\")+props.slug:\"\",client:props.client||\"\",services:props.services||\"\"};registerPlate(n,plate);useEffect(()=>{notifyPlates();},[JSON.stringify(plate)]);if(isCanvas())return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",minHeight:24,display:\"flex\",alignItems:\"center\",gap:8,padding:\"0 8px\",font:\"500 10px/1.3 'IBM Plex Mono',monospace\",textTransform:\"uppercase\",color:\"#0c0c0c\",background:\"#e2e0d9\",borderLeft:\"3px solid #ff3b1c\",overflow:\"hidden\",whiteSpace:\"nowrap\"},children:[\"Plate source \",pad(n),\" \\xb7 \",plate.title]});return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",...sourceAttrs(\"plates\",n,plate),style:{width:0,height:0,overflow:\"hidden\"}});}PlateSource.displayName=\"Plate Source\";addPropertyControls(PlateSource,{number:{type:ControlType.Number,title:\"Number\",defaultValue:1,min:1,max:99,step:1},image:{type:ControlType.ResponsiveImage,title:\"Image\"},title:{type:ControlType.String,title:\"Title\"},slug:{type:ControlType.String,title:\"Slug\"},star:{type:ControlType.String,title:\"Star\"},group:{type:ControlType.String,title:\"Group\"},greek:{type:ControlType.String,title:\"Greek\"},ra:{type:ControlType.Number,title:\"Ra\",min:0,max:24,step:1e-4},dec:{type:ControlType.Number,title:\"Dec\",min:-90,max:90,step:.001},mag:{type:ControlType.Number,title:\"Mag\",min:-2,max:8,step:.01},distance:{type:ControlType.String,title:\"Distance\"},medium:{type:ControlType.String,title:\"Medium\"},year:{type:ControlType.String,title:\"Year\"},caption:{type:ControlType.String,title:\"Caption\",displayTextArea:true},palette:{type:ControlType.String,title:\"Palette\"},client:{type:ControlType.String,title:\"Client\"},services:{type:ControlType.String,title:\"Services\"},base:{type:ControlType.String,title:\"Base\",defaultValue:\"/plates/\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PlateSource\",\"slots\":[],\"annotations\":{\"framer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