1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[32976],{18569:(e,t,n)=>{n.d(t,{G:()=>a});var s=n(95155);function a(e){let{rating:t,toneClass:n="bg-section-collections"}=e;return(0,s.jsx)("span",{className:"flex items-center gap-0.5","aria-hidden":!0,children:[0,1,2,3].map(e=>(0,s.jsx)("span",{className:["w-1.5 h-1.5 rounded-full",e<t?n:"bg-content-muted/30"].join(" ")},e))})}},32976:(e,t,n)=>{n.r(t),n.d(t,{CelestialDetailSheet:()=>W});var s=n(95155),a=n(12115),r=n(18955),l=n(36809),i=n(26497),c=n(93739),o=n(91169),u=n(65229),d=n(61362),m=n(57828),x=n(95664),p=n(27937),h=n(14817),f=n(47937),g=n(16485),y=n(39324),b=n(95740),v=n(37494),j=n(36100),N=n(15239),w=n(52619),M=n.n(w),k=n(67909),A=n(20063),C=n(31372),S=n(46291),D=n(55468),E=n(55603),F=n(63501),R=n(18569),L=n(42526),P=n(91659);function q(e){let{rows:t,highlightIndex:n,skyLabel:a,nakedEyeLabel:r}=e;return(0,s.jsx)("div",{className:"space-y-1.5",children:t.map((e,t)=>{let l=t===n;return(0,s.jsxs)("p",{className:["text-xs leading-relaxed",l?"rounded-md border border-section-collections/40 bg-section-collections/10 px-2 py-1.5 text-content-secondary":"text-content-secondary"].join(" "),children:[(0,s.jsxs)("span",{className:"font-medium text-content-primary",children:[0===e.apertureMm?r:"".concat(e.apertureMm,"mm"),e.magnification?" ".concat(e.magnification,"x"):""]}),(0,s.jsxs)("span",{className:"text-content-muted",children:[" / ",a(e.skyClass)]}),e.hint?" â ".concat(e.hint):""]},t)})})}function z(e){var t;let{guide:n,skyClass:a,skyLabelOf:l,skyLabel:i,nakedEyeLabel:c}=e,o=(0,r.c)("collections.celestialDetailSheet"),{owned:u,status:d}=(0,P.D)(),m=function(e){let t=null;for(let n of e){let e=n.apertureMm;"number"==typeof e&&Number.isFinite(e)&&!(e<=0)&&(null==t||e>t)&&(t=e)}return t}(u),x=function(e,t,n){let s=!e||null==t||null==e.entryApertureMm||t>=e.entryApertureMm;if(!e||0===e.byAperture.length||null==t)return{index:null,reachable:s,apertureMm:t};let a=e.byAperture.map((e,t)=>({b:e,i:t})).filter(e=>{let{b:t}=e;return null==n||t.skyClass===n});if(0===a.length)return{index:null,reachable:s,apertureMm:t};let r=a.filter(e=>{let{b:n}=e;return n.apertureMm<=t});return{index:(r.length>0?r.reduce((e,t)=>t.b.apertureMm>e.b.apertureMm?t:e):a.reduce((e,t)=>t.b.apertureMm<e.b.apertureMm?t:e)).i,reachable:s,apertureMm:t}}(n,m,a);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(q,{rows:n.byAperture,highlightIndex:x.index,skyLabel:i,nakedEyeLabel:c}),"ready"===d&&(0,s.jsxs)("div",{className:"rounded-lg bg-surface-overlay px-3 py-2 space-y-0.5",children:[(0,s.jsxs)("p",{className:"flex items-center gap-1.5 text-3xs font-semibold uppercase tracking-widest text-content-muted",children:[(0,s.jsx)(h.A,{className:"h-3 w-3","aria-hidden":!0}),o("yourGear")]}),null==m?(0,s.jsxs)("p",{className:"text-xs text-content-secondary leading-relaxed",children:[o("gearUnknown")," ",(0,s.jsx)(M(),{href:"/gear",className:"text-brand-primary hover:underline",children:o("gearRegister")})]}):(0,s.jsx)("p",{className:["text-xs leading-relaxed",x.reachable?"text-state-success":"text-content-secondary"].join(" "),children:x.reachable?o("gearReachable",{aperture:m}):o("gearBelowEntry",{entry:null!=(t=n.entryApertureMm)?t:0,aperture:m})}),l&&(0,s.jsx)("p",{className:"text-3xs text-content-muted",children:o("gearSkyFromLog",{sky:l})})]})]})}function _(e){let{guide:t,isAuthenticated:n,recentSkyQuality:a,skyQualityLabel:l,skyLabel:i,nakedEyeLabel:c}=e,o=(0,r.c)("collections.celestialDetailSheet");if(0===t.byAperture.length)return null;let u=null==a?null:a<=2?"urban":a<=4?"rural":null,d=null!=a?l(a):null;return(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)("p",{className:"text-3xs font-semibold uppercase tracking-widest text-content-muted",children:o("byAperture")}),n?(0,s.jsx)(z,{guide:t,skyClass:u,skyLabelOf:d,skyLabel:i,nakedEyeLabel:c}):(0,s.jsx)(q,{rows:t.byAperture,highlightIndex:null,skyLabel:i,nakedEyeLabel:c})]})}var I=n(71837);function B(e){let{slug:t,label:l}=e,i=(0,r.c)("collections.celestialDetailSheet"),[c,o]=(0,a.useState)(null),[u,d]=(0,a.useState)(!1),m=(0,a.useRef)(t);return(m.current=t,(0,a.useEffect)(()=>{let e=!0;return o(null),d(!1),(async()=>{try{let[s,a]=await Promise.all([n.e(3681).then(n.t.bind(n,3681,19)),n.e(88887).then(n.t.bind(n,88887,19))]);if(!e||m.current!==t)return;let r=s.default.find(e=>e.tag===t);if(!r)return void d(!0);let l=a.default;o(function(e,t,n){var s,a;let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=null!=(s=r.fieldDeg)?s:6.5,i=null!=(a=r.maxVmag)?a:6,c=l/2,o=[];for(let s=0;s+3<n.length;s+=4){let a=n[s+2];if(a>i||Math.abs(n[s+1]-t)>1.5*c)continue;let r=(0,I.gy)(n[s],n[s+1],e,t);r&&(Math.abs(r.xiDeg)>c||Math.abs(r.etaDeg)>c||o.push({x:.5-r.xiDeg/l,y:.5-r.etaDeg/l,vmag:a,weight:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6;return Math.max(0,Math.min(1,(t-e)/(t+1)))}(a,i)}))}o.sort((e,t)=>
1e.vmag-t.vmag);let u=r.limit;return null!=u&&o.length>u?o.slice(0,u):o}(r.ra,r.dec,l.data,{limit:160}))}catch(t){e&&d(!0)}})(),()=>{e=!1}},[t]),u)?null:(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)("p",{className:"text-3xs font-semibold uppercase tracking-widest text-content-muted",children:i("finderChart")}),(0,s.jsxs)("div",{className:"relative overflow-hidden rounded-lg border border-surface-border bg-surface-base",children:[(0,s.jsxs)("svg",{viewBox:"0 0 1 1",className:"block h-auto w-full",role:"img","aria-label":i("finderChartAlt",{name:l,field:6.5}),children:[(0,s.jsx)("circle",{cx:"0.5",cy:"0.5",r:"0.49",className:"fill-none stroke-surface-border",strokeWidth:"0.004"}),null==c?void 0:c.map((e,t)=>(0,s.jsx)("circle",{cx:e.x,cy:e.y,r:.005+.02*e.weight,className:"fill-content-primary",opacity:.35+.65*e.weight},t)),(0,s.jsx)("circle",{cx:"0.5",cy:"0.5",r:"0.045",fill:"none",className:"stroke-section-collections",strokeWidth:"0.005",strokeDasharray:"0.0550 0.0157"}),(0,s.jsx)("text",{x:"0.5",y:"0.055",textAnchor:"middle",className:"fill-content-muted",fontSize:"0.05",children:i("finderNorth")}),(0,s.jsx)("text",{x:"0.045",y:"0.52",textAnchor:"middle",className:"fill-content-muted",fontSize:"0.05",children:i("finderEast")})]}),null===c&&(0,s.jsx)("div",{className:"absolute inset-0 animate-pulse bg-surface-overlay/60","aria-hidden":!0})]}),(0,s.jsx)("p",{className:"text-3xs text-content-muted leading-relaxed",children:i("finderChartNote",{field:6.5})})]})}let U={const:"æåº§",asterism:"ã¢ã¹ããªãºã "},T=(0,k.default)(()=>Promise.all([n.e(61831),n.e(13064),n.e(81877),n.e(1854),n.e(46832),n.e(24349)]).then(n.bind(n,72471)),{loadableGenerated:{webpack:()=>[72471]},ssr:!1});function W(e){var t,n,w,k,P,q,z;let{item:I,isOwned:W,isAuthenticated:O=!1,onClose:Q,groupContext:Y=null,returnTo:V=null}=e,H=(0,A.useRouter)(),K=(0,r.c)("collections.celestialDetailSheet"),X=(0,r.c)("collections"),$=(0,r.c)("collections.observation"),J=(0,l.Ym)(),Z=(0,r.k)(),ee=(null==I?void 0:I.kind)==="ngc"||(null==I?void 0:I.kind)==="ic",et={overview:K("tabOverview"),visual:K("tabVisual"),guide:K("tabGuide")},en=(null==I?void 0:I.visual)?["overview","visual","guide"]:["overview","guide"],[es,ea]=(0,a.useState)([]),[er,el]=(0,a.useState)([]),[ei,ec]=(0,a.useState)(0),[eo,eu]=(0,a.useState)(!1),[ed,em]=(0,a.useState)("overview"),[ex,ep]=(0,a.useState)(!1),[eh,ef]=(0,a.useState)(null),eg=(0,a.useCallback)(e=>ef(e),[]);(0,a.useEffect)(()=>{em("overview"),ep(!1)},[null==I?void 0:I.slug]),(0,a.useEffect)(()=>{if(!I)return;let e=e=>{"Escape"!==e.key||ex||Q()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[I,Q,ex]);let ey=(0,a.useRef)(null);return(0,a.useEffect)(()=>{if(!I)return;let e=e=>{var t;let n=e.target;!(!n||(null==(t=ey.current)?void 0:t.contains(n))||n.closest("[data-catalog-card]"))&&(ex||n.closest('[data-sp-overlay="open"]')||Q())};return document.addEventListener("pointerdown",e),()=>document.removeEventListener("pointerdown",e)},[I,Q,ex]),(0,a.useEffect)(()=>{if(!I)return;let e=!1;return eu(!0),ea([]),(0,C.fetchWithAuth)("/api/collections/".concat(encodeURIComponent(I.slug),"/photos?limit=6")).then(e=>e.json()).then(t=>{var n;e||ea(null!=(n=t.photos)?n:[])}).catch(()=>{}).finally(()=>{e||eu(!1)}),()=>{e=!0}},[null==I?void 0:I.slug]),(0,a.useEffect)(()=>{if(!I||!O){el([]),ec(0);return}let e=!1;return el([]),ec(0),(0,C.fetchWithAuth)("/api/collections/".concat(encodeURIComponent(I.slug),"/photos/mine?limit=6"),{cache:"no-store"}).then(e=>e.ok?e.json():null).then(t=>{var n;!e&&t&&(el(Array.isArray(t.photos)?t.photos:[]),ec(Number(null!=(n=t.total)?n:0)))}).catch(()=>{}),()=>{e=!0}},[null==I?void 0:I.slug,O]),(0,s.jsx)(i.N,{children:I&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.P.div,{className:"fixed inset-0 z-40 bg-scrim backdrop-blur-sm md:hidden",initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},onClick:Q},"overlay"),(0,s.jsxs)(c.P.div,{ref:ey,role:"dialog","aria-modal":"true","aria-label":(0,D._l)(I,J),className:"fixed z-50 flex flex-col bg-surface-raised inset-x-0 bottom-0 rounded-t-2xl max-h-[85dvh] md:inset-x-auto md:right-0 md:top-0 md:bottom-0 md:w-[360px] md:rounded-none md:max-h-full md:border-l md:border-surface-border",initial:{y:"100%",opacity:0},animate:{y:0,opacity:1},exit:{y:"100%",opacity:0},transition:{type:"spring",stiffness:300,damping:30},children:[(0,s.jsxs)("div",{className:"px-4 pt-4 pb-3 shrink-0 space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between",children:[(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("h2",{className:"text-base font-bold text-content-primary leading-tight truncate",children:(0,D._l)(I,J)}),(0,s.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium ".concat(S.eQ[I.rarity].badge),children:X(S.Fb[I.rarity])})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 mt-0.5 flex-wrap",children:[I.labelEn&&(0,D._l)(I,J)!==I.labelEn&&(0,s.jsx)("p",{className:"text-xs text-content-muted",children:I.labelEn}),(null!=(t=I.type)?t:I.kind)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-content-muted/40",children:"\xb7"}),(0,s.jsx)("span",{className:"text-xs text-content-muted",children:null!=(k=U[null!=(n=I.type)?n:I.kind])?k:null!=(w=I.type)?w:I.kind})]}),null!=I.captureCount&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-content-muted/40",children:"\xb7"}),(0,s.jsxs)("span",{className:"flex items-center gap-1 text-xs text-content-muted",children:[(0,s.jsx)(o.A,{className:"w-3 h-3"}),K("captureCountPeople",{count:Z.number(I.captureCount)})]})]})]})]}),(0,s.jsx)("button",{onClick:Q,"aria-label":K("close"),className:"ml-3 mt-0.5 flex-shrink-0 rounded-full p-1.5 text-content-muted hover:bg-surface-overlay hover:text-content-primary transition-colors",children:(0,s.jsx)(u.A,{className:"w-4 h-4"})})]}),W?(0,s.jsxs)(c.P.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},transition:{duration:.2,delay:.05},className:"flex items-center gap-2",children:[(0,s.jsxs)("span",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-state-success/10 border border-state-success/25 text-state-success text-2xs font-medium",children:[(0,s.jsx)(d.A,{className:"w-3 h-3"}),K("captured")]}),I.firstCapturedAt&&(0,s.jsx)("span",{className:"text-3xs text-content-muted",children:K("capturedDate",{year:new Date(I.firstCapturedAt).getFullYear(),month:new Date(I.firstCapturedAt).getMonth()+1})})]}):I.seen?(0,s.jsx)(c.P.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},transition:{duration:.2,delay:.05},className:"flex items-center gap-2",children:(0,s.jsxs)("span",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-section-collections/10 border border-section-collections/25 text-section-collections text-2xs font-medium",children:[(0,s.jsx)(m.A,{className:"w-3 h-3"}),K("seen")]})}):null]}),(0,s.jsx)("div",{className:"flex border-b border-surface-border shrink-0 px-1",children:en.map(e=>(0,s.jsx)("button",{onClick:()=>em(e),className:["px-3 py-2 text-xs font-medium transition-colors border-b-2 -mb-px",ed===e?"border-brand-primary text-content-primary":"border-transparent text-content-muted hover:text-content-secondary"].join(" "),children:et[e]},e))}),(0,s.jsx)("div",{className:"flex-1 overflow-y-auto min-h-0 scrollbar-none",children:(0,s.jsxs)(i.N,{mode:"wait",children:["overview"===ed&&(0,s.jsxs)(c.P.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.12},className:"px-4 py-3 space-y-3",children:[Y&&(0,s.jsxs)("div",{className:"rounded-lg border border-surface-border bg-surface-overlay px-3 py-2.5 space-y-1.5",children:[(0,s.jsx)("p",{className:"text-3xs font-semibold uppercase tracking-widest text-content-muted",children:K("groupRecord.label")}),(0,s.jsxs)("div",{className:"flex items-center gap-3 text-xs text-content-secondary tabular-nums",children:[(0,s.jsxs)("span",{className:"flex items-center gap-1",title:K("groupRecord.seenCount"),children:[(0,s.jsx)(m.A,{className:"w-3.5 h-3.5 text-section-collections"}),K("groupRecord.seenOf",{count:Y.seenCount,total:Y.memberCount})]}),(0,s.jsxs)("span",{className:"flex items-center gap-1",title:K("groupRecord.capturedCount"),children:[(0,s.jsx)(x.A,{className:"w-3.5 h-3.5 text-state-success"}),K("groupRecord.capturedOf",{count:Y.capturedCount,total:Y.memberCount})]})]}),Y.firstBy&&(0,s.jsx)("p",{className:"text-2xs text-content-muted",children:K("groupRecord.firstBy",{name:null!=(P=Y.firstBy.displayName)?P:K("groupRecord.unknownMember"),date:Z.dateTime(new Date(Y.firstBy.at),{year:"numeric",month:"numeric",day:"numeric"})})})]}),(0,s.jsx)(L._,{slug:I.slug,isAuthenticated:O,historyLimit:3,onRecentSkyQuality:eg}),er.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,s.jsx)("p",{className:"text-3xs font-semibold uppercase tracking-widest text-content-muted",children:K("myPhotos")}),ei>er.length&&(0,s.jsx)("span",{className:"text-2xs tabular-nums text-content-muted",children:K("myPhotosCount",{count:ei})})]}),(0,s.jsx)("div",{className:"grid grid-cols-3 gap-1",children:er.slice(0,6).map(e=>(0,s.jsx)(M(),{href:"/photos/".concat(e.id),className:"aspect-square relative rounded-lg overflow-hidden bg-surface-overlay hover:opacity-80 transition-opacity",children:(0,s.jsx)(N.default,{unoptimized:!0,src:(0,E.c_)(e.thumbUrl),alt:K("myPhotoAlt"),fill:!0,sizes:"100px",className:"object-cover"})},e.id))})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,s.jsx)("p",{className:"text-3xs font-semibold uppercase tracking-widest text-content-muted",children:Y?K("publicPhotos"):K("communityPhotos")}),V?(0,s.jsxs)("button",{type:"button",onClick:()=>(0,E.hB)(H,"collections",I.slug,{query:{returnTo:V}}),className:"flex items-center gap-0.5 text-xs text-brand-primary hover:underline",children:[K("seeMore")," ",(0,s.jsx)(p.A,{className:"w-3 h-3"})]}):(0,s.jsxs)(M(),{href:"/collections/".concat(encodeURIComponent(I.slug)),className:"flex items-center gap-0.5 text-xs text-brand-primary hover:underline",children:[K("seeMore")," ",(0,s.jsx)(p.A,{className:"w-3 h-3"})]})]}),Y&&(0,s.jsx)("p",{className:"mb-1.5 text-2xs text-content-muted",children:K("publicPhotosNote")}),eo?(0,s.jsx)("div",{className:"grid grid-cols-3 gap-1",children:[void 0,void 0,void 0].map((e,t)=>(0,s.jsx)("div",{className:"aspect-square rounded-lg bg-surface-overlay animate-pulse"},t))}):es.length>0?(0,s.jsx)("div",{className:"grid grid-cols-3 gap-1",children:es.slice(0,3).map(e=>(0,s.jsx)(M(),{href:"/photos/".concat(e.id),className:"aspect-square relative rounded-lg overflow-hidden bg-surface-overlay hover:opacity-80 transition-opacity",children:(0,s.jsx)(N.default,{unoptimized:!0,src:(0,E.c_)(e.thumbUrl),alt:e.username?K("photoByAlt",{username:e.username}):K("communityPhotoAlt"),fill:!0,sizes:"100px",className:"object-cover"})},e.id))}):V?(0,s.jsx)("button",{type:"button",onClick:()=>(0,E.hB)(H,"collections",I.slug,{query:{returnTo:V}}),className:"flex w-full items-center justify-center h-16 rounded-lg bg-surface-overlay text-xs text-content-muted hover:text-content-secondary hover:bg-surface-border transition-colors",children:K("beFirstShooter")}):(0,s.jsx)(M(),{href:"/collections/".concat(encodeURIComponent(I.slug)),className:"flex items-center justify-center h-16 rounded-lg bg-surface-overlay text-xs text-content-muted hover:text-content-secondary hover:bg-surface-border transition-colors",children:K("beFirstShooter")})]}),I.description&&(0,s.jsx)("p",{className:"text-xs text-content-secondary leading-relaxed bg-surface-overlay rounded-lg px-3 py-2.5",children:I.description}),I.visualFeatures&&(0,s.jsxs)("div",{className:"flex items-start gap-2",children:[(0,s.jsx)(m.A,{className:"w-4 h-4 text-content-muted mt-0.5 shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-medium text-content-primary mb-0.5",children:K("visualFeatures")}),(0,s.jsx)("p",{className:"text-xs text-content-secondary leading-relaxed",children:I.visualFeatures})]})]}),I.astronomicalFeatures&&(0,s.jsxs)("div",{className:"flex items-start gap-2",children:[(0,s.jsx)(h.A,{className:"w-4 h-4 text-content-muted mt-0.5 shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-medium text-content-primary mb-0.5",children:K("astronomicalFeatures")}),(0,s.jsx)("p",{className:"text-xs text-content-secondary leading-relaxed",children:I.astronomicalFeatures}),I.sources&&I.sources.length>0&&(0,s.jsx)("ul",{className:"mt-1.5 space-y-0.5",children:I.sources.map((e,t)=>(0,s.jsx)("li",{className:"text-3xs text-content-muted leading-relaxed before:content-['['] after:content-[']']",children:e},t))})]})]}),I.mythology&&(0,s.jsxs)("div",{className:"flex items-start gap-2",children:[(0,s.jsx)(f.A,{className:"w-4 h-4 text-content-muted mt-0.5 shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-medium text-content-primary mb-0.5",children:K("mythology")}),(0,s.jsx)("p",{className:"text-xs text-content-secondary leading-relaxed",children:I.mythology})]})]}),null!=I.captureRate&&I.captureRate>0&&(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between text-xs text-content-muted",children:[(0,s.jsx)("span",{children:K("captureRate")}),(0,s.jsxs)("span",{className:"tabular-nums font-medium",children:[(100*I.captureRate).toFixed(1),"%"]})]}),(0,s.jsx)("div",{className:"h-1.5 bg-surface-border rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-brand-primary rounded-full transition-all",style:{width:"".concat(Math.min(100*I.captureRate,100),"%")}})})]}),!I.astronomicalFeatures&&I.sources&&I.sources.length>0&&(0,s.jsxs)("div",{className:"pt-1",children:[(0,s.jsx)("p",{className:"text-3xs font-semibold uppercase tracking-widest text-content-muted mb-1.5",children:K("sources")}),(0,s.jsx)("ul",{className:"space-y-1",children:I.sources.map((e,t)=>(0,s.jsx)("li",{className:"text-3xs text-content-muted leading-relaxed before:content-['['] after:content-[']']",children:e},t))})]}),(0,F.A)(I)&&(0,s.jsxs)("div",{className:"pt-1",children:[(0,s.jsx)("p",{className:"text-3xs font-semibold uppercase tracking-widest text-content-muted mb-1.5",children:K("refImageCredit")}),(0,s.jsx)("p",{className:"text-3xs text-content-muted leading-relaxed",children:(0,F.B)(I)})]})]}
1,"overview"),"visual"===ed&&I.visual&&(0,s.jsxs)(c.P.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.12},className:"px-4 py-3 space-y-3",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[null!=I.visual.entryApertureMm&&(0,s.jsx)(G,{icon:m.A,label:K("specEntryAperture"),value:0===I.visual.entryApertureMm?K("nakedEye"):"".concat(I.visual.entryApertureMm,"mm")}),null!=I.visual.topApertureMm&&(0,s.jsx)(G,{icon:h.A,label:K("specTopAperture"),value:"".concat(I.visual.topApertureMm,"mm").concat(I.visual.topMagnification?" / ".concat(I.visual.topMagnification,"x"):"")})]}),["urban","rural"].map(e=>{let t=I.visual[e];return(0,s.jsxs)("div",{className:"bg-surface-overlay rounded-lg px-3 py-2.5",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-1",children:[(0,s.jsx)("span",{className:"text-3xs font-medium uppercase tracking-wider text-content-muted",children:K("urban"===e?"skyUrban":"skyRural")}),(0,s.jsx)(R.G,{rating:t.rating})]}),(0,s.jsxs)("p",{className:"text-xs text-content-secondary leading-relaxed",children:[K("rating".concat(t.rating)),t.hint?" â ".concat(t.hint):""]})]},e)}),(0,s.jsx)(B,{slug:I.slug,label:(0,D._l)(I,J)}),(0,s.jsx)(_,{guide:I.visual,isAuthenticated:O,recentSkyQuality:eh,skyQualityLabel:e=>$("skyQuality".concat(e)),skyLabel:e=>K("urban"===e?"skyUrban":"skyRural"),nakedEyeLabel:K("nakedEye")}),(0,s.jsx)("button",{type:"button",onClick:()=>em("overview"),className:"w-full rounded-lg border border-section-collections/40 bg-section-collections/10 px-3 py-2 text-xs font-medium text-content-primary transition-colors hover:bg-section-collections/20",children:K("recordFromVisual")}),(0,s.jsx)("p",{className:"text-3xs text-content-muted leading-relaxed pt-1",children:K("visualDisclaimer")})]},"visual"),"guide"===ed&&(0,s.jsxs)(c.P.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.12},className:"px-4 py-3 space-y-3",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(null!=I.bestMonthStart||null!=I.culminationMonth)&&(0,s.jsx)(G,{icon:g.A,label:K("specObservationPeriod"),value:null!=I.bestMonthStart&&null!=I.bestMonthEnd?K("specMonthRange",{start:I.bestMonthStart,end:I.bestMonthEnd}):K("specCulmination",{month:null!=(q=I.culminationMonth)?q:""})}),null!=I.focalLengthMin&&null!=I.focalLengthMax&&(0,s.jsx)(G,{icon:x.A,label:K("specFocalLength"),value:"".concat(I.focalLengthMin,"ã").concat(I.focalLengthMax,"mm")}),(I.exposureFixedSec||I.exposureTrackedSec)&&(0,s.jsx)(G,{icon:y.A,label:K("specExposure"),value:I.exposureTrackedSec?K("specExposureTracked",{start:I.exposureTrackedSec[0],end:I.exposureTrackedSec[1]}):I.exposureFixedSec?K("specExposureFixed",{start:I.exposureFixedSec[0],end:I.exposureFixedSec[1]}):"â"}),null!=I.magnitude&&(0,s.jsx)(G,{icon:b.A,label:K("specMagnitude"),value:"".concat(I.magnitude," mag")}),null!=I.angularSizeArcmin&&(0,s.jsx)(G,{icon:v.A,label:K("specAngularSize"),value:I.angularSizeArcmin>=60?"".concat((I.angularSizeArcmin/60).toFixed(1),"\xb0"):"".concat(I.angularSizeArcmin,"â²")})]}),(I.shootingMemo||I.shootingNote)&&(0,s.jsx)("p",{className:"text-xs text-content-secondary leading-relaxed bg-surface-overlay rounded-lg px-3 py-2.5 whitespace-pre-line",children:null!=(z=I.shootingMemo)?z:I.shootingNote}),ee&&(0,s.jsx)("p",{className:"text-3xs text-content-muted leading-relaxed",children:X("shootingGuideNote")})]},"guide")]})}),(0,s.jsxs)("div",{className:"shrink-0 px-4 py-3 border-t border-surface-border space-y-2",children:[(0,s.jsxs)(M(),{href:"/upload?target=".concat(encodeURIComponent(I.slug)),className:"flex items-center justify-center gap-2 w-full px-4 py-2.5 rounded-lg bg-brand-primary text-content-inverted text-sm font-medium hover:bg-brand-hover transition-colors",children:[(0,s.jsx)(x.A,{className:"w-4 h-4"}),K("shootAndRegister")]}),O&&(0,s.jsxs)("button",{type:"button",onClick:()=>ep(!0),className:"flex items-center justify-center gap-2 w-full px-4 py-2 rounded-lg border border-surface-border text-content-secondary text-sm font-medium hover:bg-surface-overlay hover:text-content-primary transition-colors",children:[(0,s.jsx)(j.A,{className:"w-4 h-4"}),K("addToPlan")]})]}),ex&&(0,s.jsx)(T,{slug:I.slug,name:(0,D._l)(I,J),onClose:()=>ep(!1)}),(0,s.jsx)("div",{className:"h-[env(safe-area-inset-bottom)] md:hidden shrink-0"})]},"panel")]})})}function G(e){let{icon:t,label:n,value:a}=e;return(0,s.jsxs)("div",{className:"flex flex-col gap-1 bg-surface-overlay rounded-lg px-3 py-2.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-content-muted",children:[(0,s.jsx)(t,{className:"w-3.5 h-3.5 shrink-0"}),(0,s.jsx)("span",{className:"text-3xs font-medium uppercase tracking-wider",children:n})]}),(0,s.jsx)("span",{className:"text-xs font-medium text-content-primary leading-snug",children:a})]})}},71837:(e,t,n)=>{n.d(t,{$W:()=>x,Dw:()=>m,EK:()=>i,HI:()=>r,P:()=>o,Rf:()=>p,UC:()=>c,gy:()=>l,oX:()=>a});let s=Math.PI/180;function a(e,t){return"".concat(Math.round(e/.2),"_").concat(Math.round(t/.2))}function r(e){if(!e||1!==e.v||"tan13"!==e.basis)return null;let t=Array.isArray(e.coef)?e.coef.map(Number):null,n=[e.raDeg,e.decDeg,e.rotRad,e.cx,e.cy,e.thetaMaxDeg].map(Number);if(!t||3!==t.length||t.some(e=>!Number.isFinite(e))||n.some(e=>!Number.isFinite(e)))return null;let s=Number(e.paritySign);if(1!==s&&-1!==s||n[0]<0||n[0]>=360||Math.abs(n[1])>90||!(n[5]>0&&n[5]<=75)||t.some(e=>Math.abs(e)>1e5))return null;let a=e.sky,r=Array.isArray(a)&&32===a.length&&a.every(e=>Number.isFinite(Number(e))&&Number(e)>0&&1.001>=Number(e))?a.map(e=>Math.min(1,Number(e))):null,l=e.vis,i=null;if(Array.isArray(l)&&l.length>0&&l.length<=500)for(let e of(i=new Set,l)){if(!Array.isArray(e)||2!==e.length){i=null;break}let t=Number(e[0]),n=Number(e[1]);if(!Number.isFinite(t)||!Number.isFinite(n)){i=null;break}let s=Math.round(t/.2),a=Math.round(n/.2);for(let e=-1;e<=1;e++)for(let t=-1;t<=1;t++)i.add("".concat(s+e,"_").concat(a+t))}return{coef:t,raDeg:n[0],decDeg:n[1],rotRad:n[2],paritySign:s,cx:n[3],cy:n[4],thetaMaxDeg:n[5],sky:r,visKeys:i}}function l(e,t,n,a){let r=n*s,l=a*s,i=e*s,c=t*s,o=Math.sin(l),u=Math.cos(l),d=Math.sin(c),m=Math.cos(c),x=Math.cos(i-r),p=o*d+u*m*x;
1return p<=0?null:{xiDeg:m*Math.sin(i-r)/p/s,etaDeg:(u*d-o*m*x)/p/s}}function i(e,t,n){var a,l,i,c,o,u,m,x,p,g,y;let b=null!=(m=h(e.imageWidth))?m:h(t),v=null!=(x=h(e.imageHeight))?x:h(n);if(!b||!v||b<=0||v<=0)return null;let j=null!=(p=h(e.crpix1))?p:(b+1)/2,N=null!=(g=h(e.crpix2))?g:(v+1)/2,w=h(e.cd11),M=h(e.cd12),k=h(e.cd21),A=h(e.cd22),C=null!=w&&null!=M&&null!=k&&null!=A;if(!C){let t=h(e.pixscaleArcsec);if(!t||t<=0)return null;let n=function(e,t,n){let a=e/3600,r="flipped"===n?a:-a,l=-a,i=t*s,c=Math.cos(i),o=Math.sin(i);return{cd11:r*c,cd12:-l*o,cd21:r*o,cd22:l*c}}(t,null!=(y=h(e.orientationDeg))?y:0,e.parity);w=n.cd11,M=n.cd12,k=n.cd21,A=n.cd22}let S=w*A-M*k;if(!Number.isFinite(S)||0===S)return null;let D=h(e.crval1),E=h(e.crval2),F=null!=D?D:e.raCenterDeg,R=null!=E?E:e.decCenterDeg,L=C&&null!=D&&null!=E&&(Math.abs(D-e.raCenterDeg)>1e-9||Math.abs(E-e.decCenterDeg)>1e-9);return{ra0Deg:F,dec0Deg:R,cd11:w,cd12:M,cd21:k,cd22:A,det:S,crpix1:j,crpix2:N,width:b,height:v,flipY:C&&!L,radial:r(e.radial),sipAp:f(null==(a=e.sip)?void 0:a.ap),sipBp:f(null==(l=e.sip)?void 0:l.bp),refineCx:d(null==(c=e.sip)||null==(i=c.refine)?void 0:i.cx),refineCy:d(null==(u=e.sip)||null==(o=u.refine)?void 0:o.cy)}}function c(e,t,n){return u(e,t,n,!0)}function o(e,t,n){return u(e,t,n,!1)}function u(e,t,n,s){if(n.radial)return function(e,t,n,s){let a=Math.PI/180,r=(e,t)=>{let n=e*a,s=t*a;return[Math.cos(s)*Math.cos(n),Math.cos(s)*Math.sin(n),Math.sin(s)]},l=r(s.raDeg,s.decDeg),i=Math.hypot(l[0],l[1]);if(i<1e-9)return null;let c=[-l[1]/i,l[0]/i,0],o=[l[1]*c[2]-l[2]*c[1],l[2]*c[0]-l[0]*c[2],l[0]*c[1]-l[1]*c[0]],u=r(e,t),d=Math.acos(Math.max(-1,Math.min(1,u[0]*l[0]+u[1]*l[1]+u[2]*l[2])));if(d>(s.thetaMaxDeg+3)*a)return null;let m=Math.atan2(u[0]*o[0]+u[1]*o[1]+u[2]*o[2],u[0]*c[0]+u[1]*c[1]+u[2]*c[2]),x=s.coef[0]*Math.tan(d)+s.coef[1]*d+s.coef[2]*d**3,p=m*s.paritySign+s.rotRad;return{x:(s.cx+x*Math.cos(p))/n.width,y:(s.cy+x*Math.sin(p))/n.height}}(e,t,n,n.radial);let a=l(e,t,n.ra0Deg,n.dec0Deg);if(!a)return null;let{xiDeg:r,etaDeg:i}=a,c=(n.cd22*r-n.cd12*i)/n.det,o=(-n.cd21*r+n.cd11*i)/n.det,u=n.crpix1+c+(s?g(n.sipAp,c,o):0),d=n.crpix2+o+(s?g(n.sipBp,c,o):0),m=(u-.5)/n.width,x=n.flipY?1-(d-.5)/n.height:(d-.5)/n.height;if(s&&n.refineCx&&n.refineCy){let e=2*m-1,t=2*x-1,s=[1,e,t,e*e,e*t,t*t,e**3,e*e*t,e*t*t,t**3],a=0,r=0;for(let e=0;e<10;e++)a+=n.refineCx[e]*s[e],r+=n.refineCy[e]*s[e];m+=a,x+=r}return{x:m,y:x}}function d(e){return Array.isArray(e)&&10===e.length&&e.every(e=>"number"==typeof e&&Number.isFinite(e)&&.5>=Math.abs(e))?e:null}function m(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=e=>!!e&&e.x>=-s&&e.x<=1+s&&e.y>=-s&&e.y<=1+s;return a(o(e,t,n))&&a(c(e,t,n))}function x(e,t){let n=c(e[0][0],e[0][1],t),s=c(e[1][0],e[1][1],t);return n&&s?{x1:n.x,y1:n.y,x2:s.x,y2:s.y}:null}function p(e,t,n,a){let r=t*s,l=a*s;return Math.acos(Math.max(-1,Math.min(1,Math.sin(r)*Math.sin(l)+Math.cos(r)*Math.cos(l)*Math.cos(e*s-n*s))))/s}function h(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function f(e){if(!Array.isArray(e))return null;let t=[];for(let n of e)if(Array.isArray(n)&&3===n.length&&n.every(e=>"number"==typeof e&&Number.isFinite(e))){let[e,s,a]=n;Number.isInteger(e)&&Number.isInteger(s)&&e>=0&&s>=0&&e+s<=6&&t.push([e,s,a])}return t.length?t:null}function g(e,t,n){if(!e)return 0;let s=0;for(let[a,r,l]of e)s+=l*Math.pow(t,a)*Math.pow(n,r);return s}},91659:(e,t,n)=>{n.d(t,{D:()=>g,P:()=>x});var s=n(12115),a=n(31372);let r={status:"idle",data:[]},l=r,i=null,c=!1,o=0,u=new Set;function d(e){l=e,u.forEach(e=>e())}function m(){if(i)return i;let e=o;return d({status:"loading",data:l.data}),i=(async()=>{try{let t=await (0,a.fetchWithAuth)("/api/user-equipment?showRetired=false");if(!t.ok)throw Error("user-equipment ".concat(t.status));let n=await t.json(),s=Array.isArray(null==n?void 0:n.equipment)?n.equipment.filter(e=>{var t;return null==e||null==(t=e.equipment)?void 0:t.id}).map(e=>{var t;return{id:e.equipment.id,category:e.equipment.category,name:e.equipment.name,nickname:null!=(t=e.nickname)?t:null,apertureMm:"number"==typeof e.equipment.apertureMm?e.equipment.apertureMm:null}}):[];e===o&&d({status:"ready",data:s})}catch(t){e===o&&d({status:"error",data:[]})}finally{i=null,c&&(c=!1,u.size>0?m():(o++,l=r))}})()}function x(){if(i){c=!0;return}if(0===u.size){o++,l=r,c=!1;return}m()}{let e=()=>void(o++,c=!1,d(r));window.addEventListener("starry:logged-in",e),window.addEventListener("starry:logged-out",e),window.addEventListener("starry:auth-changed",e),window.addEventListener("storage",t=>{("starry:auth-ping"===t.key||"starry:auth-changed"===t.key)&&e()})}function p(e){return u.add(e),()=>{u.delete(e)}}function h(){return l}function f(){return r}
1function g(){let e=(0,s.useSyncExternalStore)(p,h,f);(0,s.useEffect)(()=>{"idle"===e.status&&m()},[e.status]);let t=(0,s.useCallback)(()=>{"loading"!==l.status&&m()},[]);return{owned:e.data,status:e.status,retry:t}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.