3 lines
16 KiB
JavaScript
3 lines
16 KiB
JavaScript
module.exports=[12576,(a,b,c)=>{"use strict";b.exports=a.r(81232).vendored["react-ssr"].ReactServerDOMTurbopackClient},11964,a=>{"use strict";function b(a,[b,c]){return Math.min(c,Math.max(b,a))}a.s(["clamp",()=>b])},57624,a=>{"use strict";let b=(0,a.i(37111).default)("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);a.s(["Upload",()=>b],57624)},21254,22772,a=>{"use strict";var b=a.i(37111);let c=(0,b.default)("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);a.s(["CircleUser",()=>c],21254);let d=(0,b.default)("CircleUserRound",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);a.s(["CircleUserRound",()=>d],22772)},98414,91969,a=>{"use strict";var b=a.i(6155),c=a.i(12348);function d({className:a,...d}){return(0,b.jsx)("textarea",{"data-slot":"textarea",className:(0,c.cn)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),...d})}a.s(["Textarea",()=>d],98414);let e=(0,a.i(37111).default)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",()=>e],91969)},76715,a=>{"use strict";let b=(0,a.i(37111).default)("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);a.s(["ZoomIn",()=>b],76715)},51038,a=>{"use strict";let b=(0,a.i(37111).default)("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);a.s(["User",()=>b],51038)},18951,a=>{"use strict";let b=(0,a.i(37111).default)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);a.s(["Users",()=>b],18951)},57003,a=>{"use strict";let b=(0,a.i(37111).default)("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);a.s(["default",()=>b])},87240,75525,a=>{"use strict";var b=a.i(6155),c=a.i(61660),d=a.i(52401),d=d,e=a.i(12348);function f({...a}){return(0,b.jsx)(c.Root,{"data-slot":"dialog",...a})}function g({...a}){return(0,b.jsx)(c.Trigger,{"data-slot":"dialog-trigger",...a})}function h({...a}){return(0,b.jsx)(c.Portal,{"data-slot":"dialog-portal",...a})}function i({className:a,...d}){return(0,b.jsx)(c.Overlay,{"data-slot":"dialog-overlay",className:(0,e.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",a),...d})}function j({className:a,children:f,showCloseButton:g=!0,...j}){return(0,b.jsxs)(h,{"data-slot":"dialog-portal",children:[(0,b.jsx)(i,{}),(0,b.jsxs)(c.Content,{"data-slot":"dialog-content",className:(0,e.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",a),...j,children:[f,g&&(0,b.jsxs)(c.Close,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,b.jsx)(d.default,{}),(0,b.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function k({className:a,...c}){return(0,b.jsx)("div",{"data-slot":"dialog-header",className:(0,e.cn)("flex flex-col gap-2 text-center sm:text-left",a),...c})}function l({className:a,...c}){return(0,b.jsx)("div",{"data-slot":"dialog-footer",className:(0,e.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",a),...c})}function m({className:a,...d}){return(0,b.jsx)(c.Title,{"data-slot":"dialog-title",className:(0,e.cn)("text-lg leading-none font-semibold",a),...d})}function n({className:a,...d}){return(0,b.jsx)(c.Description,{"data-slot":"dialog-description",className:(0,e.cn)("text-muted-foreground text-sm",a),...d})}a.s(["Dialog",()=>f,"DialogContent",()=>j,"DialogDescription",()=>n,"DialogFooter",()=>l,"DialogHeader",()=>k,"DialogTitle",()=>m,"DialogTrigger",()=>g],87240);let o=(0,a.i(37111).default)("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);a.s(["Edit",()=>o],75525)},18116,a=>{"use strict";var b=a.i(57003);a.s(["Calendar",()=>b.default])},12174,a=>{"use strict";var b=a.i(6155),c=a.i(31483),d=a.i(14672),e=a.i(43181),f=a.i(74719),g=a.i(30100),h=a.i(8895),i=a.i(91969),j=a.i(75525),k=a.i(68538),l=a.i(37111);let m=(0,l.default)("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),n=(0,l.default)("Printer",[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]);var o=a.i(21254),p=a.i(22772),q=a.i(80218),r=a.i(38076),s=a.i(54297),t=a.i(36636),u=a.i(33671),v=a.i(30665),w=a.i(6364);function x(){let{id:a}=(0,d.useParams)(),{getMember:l,updateMember:x,deleteMember:y}=(0,e.useFamily)(),{showConfirm:z}=(0,w.useDialog)(),A=(0,d.useRouter)(),[B,C]=(0,s.useState)(!1),[D,E]=(0,s.useState)(void 0),F=l(a);if((0,s.useEffect)(()=>{F?.avatarImageId?t.db.images.get(F.avatarImageId).then(a=>{if(a){let b=URL.createObjectURL(a.blob);return E(b),()=>URL.revokeObjectURL(b)}}):E(void 0)},[F?.avatarImageId]),!F)return(0,b.jsxs)("div",{className:"min-h-screen flex flex-col bg-background",children:[(0,b.jsx)(f.SiteHeader,{}),(0,b.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-4",children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:"Member not found"}),(0,b.jsx)(h.Button,{onClick:()=>A.push("/members"),children:"Back to List"})]})]});let G=async()=>{await z("确定要删除这位成员吗?这将同时删除其关联关系。","删除成员","destructive")&&(y(F.id),A.push("/members"))};return B?(0,b.jsxs)("div",{className:"min-h-screen flex flex-col bg-background",children:[(0,b.jsx)(f.SiteHeader,{}),(0,b.jsxs)("div",{className:"container mx-auto py-8",children:[(0,b.jsxs)("div",{className:"mb-6 flex items-center gap-2",children:[(0,b.jsxs)(h.Button,{variant:"ghost",onClick:()=>C(!1),children:[(0,b.jsx)(i.ArrowLeft,{className:"mr-2 h-4 w-4"})," 返回"]}),(0,b.jsxs)("h1",{className:"text-2xl font-bold font-serif",children:["编辑成员: ",F.fullName]})]}),(0,b.jsx)(g.MemberForm,{initialData:F,onSubmit:a=>{x(a.id,a),C(!1)},onCancel:()=>C(!1)})]})]}):(0,b.jsxs)("div",{className:"min-h-screen flex flex-col bg-background",children:[(0,b.jsx)(f.SiteHeader,{}),(0,b.jsxs)("main",{className:"container mx-auto py-8 px-4 md:px-6",children:[(0,b.jsxs)("div",{className:"flex flex-col md:flex-row justify-between items-start gap-6 mb-8 border-b border-border pb-8",children:[(0,b.jsxs)("div",{className:"flex items-start gap-6",children:[(0,b.jsx)("div",{className:"h-32 w-32 rounded-lg bg-muted flex items-center justify-center border-2 border-primary/20 overflow-hidden",children:D?(0,b.jsx)("img",{src:D,alt:F.fullName,className:"h-full w-full object-cover"}):"FEMALE"===F.gender?(0,b.jsx)(p.CircleUserRound,{className:"h-20 w-20 text-pink-400"}):(0,b.jsx)(o.CircleUser,{className:"h-20 w-20 text-blue-400"})}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,b.jsx)("h1",{className:"text-4xl font-bold font-serif text-foreground",children:F.fullName}),(0,b.jsxs)("span",{className:"px-2 py-1 bg-primary/10 text-primary text-sm font-medium rounded-full border border-primary/20",children:[F.generation,"世"]})]}),(0,b.jsxs)("div",{className:"space-y-1 text-muted-foreground",children:[F.courtesyName&&(0,b.jsxs)("p",{children:["字:",(0,b.jsx)("span",{className:"text-foreground",children:F.courtesyName})]}),F.artName&&(0,b.jsxs)("p",{children:["号:",(0,b.jsx)("span",{className:"text-foreground",children:F.artName})]}),F.ancestralHome&&(0,b.jsxs)("p",{children:["籍贯:",F.ancestralHome]})]})]})]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(h.Button,{variant:"outline",size:"icon",onClick:()=>window.print(),children:(0,b.jsx)(n,{className:"h-4 w-4"})}),(0,b.jsx)(h.Button,{variant:"outline",size:"icon",children:(0,b.jsx)(m,{className:"h-4 w-4"})}),(0,b.jsxs)(h.Button,{variant:"outline",onClick:()=>C(!0),className:"gap-2",children:[(0,b.jsx)(j.Edit,{className:"h-4 w-4"})," 编辑"]}),(0,b.jsx)(h.Button,{variant:"destructive",size:"icon",onClick:G,children:(0,b.jsx)(k.Trash,{className:"h-4 w-4"})})]})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[(0,b.jsxs)("div",{className:"lg:col-span-2 space-y-8",children:[(0,b.jsxs)("section",{children:[(0,b.jsxs)("h2",{className:"text-2xl font-serif font-bold mb-4 flex items-center gap-2",children:[(0,b.jsx)("span",{className:"w-1 h-6 bg-primary rounded-full"}),"生平事迹"]}),(0,b.jsx)("div",{className:"prose prose-stone dark:prose-invert max-w-none bg-card p-6 rounded-lg border border-border shadow-sm",children:F.bio?(0,b.jsx)("p",{className:"whitespace-pre-line leading-relaxed",children:F.bio}):(0,b.jsx)("p",{className:"text-muted-foreground italic",children:"暂无生平记录..."})})]}),F.photoIds&&F.photoIds.length>0&&(0,b.jsxs)("section",{children:[(0,b.jsxs)("h2",{className:"text-2xl font-serif font-bold mb-4 flex items-center gap-2",children:[(0,b.jsx)(q.Images,{className:"h-6 w-6 text-primary"}),"照片墙"]}),(0,b.jsx)("div",{className:"bg-card p-6 rounded-lg border border-border shadow-sm",children:(0,b.jsx)(u.PhotoGallery,{photoIds:F.photoIds,onChange:a=>x(F.id,{photoIds:a}),readonly:!1})})]}),F.stories&&F.stories.length>0&&(0,b.jsxs)("section",{children:[(0,b.jsxs)("h2",{className:"text-2xl font-serif font-bold mb-4 flex items-center gap-2",children:[(0,b.jsx)(r.BookOpen,{className:"h-6 w-6 text-primary"}),"家族故事"]}),(0,b.jsx)("div",{className:"bg-card p-6 rounded-lg border border-border shadow-sm",children:(0,b.jsx)(v.StoryManager,{stories:F.stories,onChange:a=>x(F.id,{stories:a}),readonly:!1})})]}),(0,b.jsxs)("section",{children:[(0,b.jsxs)("h2",{className:"text-2xl font-serif font-bold mb-4 flex items-center gap-2",children:[(0,b.jsx)("span",{className:"w-1 h-6 bg-secondary rounded-full"}),"家族关系"]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"bg-card p-4 rounded-lg border border-border",children:[(0,b.jsx)("h3",{className:"font-medium text-muted-foreground mb-2 text-sm uppercase tracking-wider",children:"父亲 (Father)"}),F.fatherId?(0,b.jsx)(c.default,{href:`/members/${F.fatherId}`,className:"text-lg font-serif font-bold hover:underline text-primary",children:l(F.fatherId)?.fullName||F.fatherId}):(0,b.jsx)("span",{className:"text-muted-foreground",children:"-"})]}),(0,b.jsxs)("div",{className:"bg-card p-4 rounded-lg border border-border",children:[(0,b.jsx)("h3",{className:"font-medium text-muted-foreground mb-2 text-sm uppercase tracking-wider",children:"母亲 (Mother)"}),F.motherId?(0,b.jsx)(c.default,{href:`/members/${F.motherId}`,className:"text-lg font-serif font-bold hover:underline text-primary",children:l(F.motherId)?.fullName||F.motherId}):(0,b.jsx)("span",{className:"text-muted-foreground",children:"-"})]}),(0,b.jsxs)("div",{className:"bg-card p-4 rounded-lg border border-border",children:[(0,b.jsx)("h3",{className:"font-medium text-muted-foreground mb-2 text-sm uppercase tracking-wider",children:"配偶 (Spouse)"}),(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:F.spouseIds?.length>0?F.spouseIds.map(a=>(0,b.jsx)(c.default,{href:`/members/${a}`,className:"px-3 py-1 bg-muted rounded hover:bg-muted/80 text-sm font-medium",children:l(a)?.fullName||a},a)):(0,b.jsx)("span",{className:"text-muted-foreground",children:"无记录"})})]}),(0,b.jsxs)("div",{className:"bg-card p-4 rounded-lg border border-border",children:[(0,b.jsx)("h3",{className:"font-medium text-muted-foreground mb-2 text-sm uppercase tracking-wider",children:"子女 (Children)"}),(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:F.childrenIds?.length>0?F.childrenIds.map(a=>(0,b.jsx)(c.default,{href:`/members/${a}`,className:"px-3 py-1 bg-muted rounded hover:bg-muted/80 text-sm font-medium",children:l(a)?.fullName||a},a)):(0,b.jsx)("span",{className:"text-muted-foreground",children:"无记录"})})]})]})]})]}),(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"bg-card rounded-lg border border-border p-6 shadow-sm",children:[(0,b.jsx)("h3",{className:"font-serif font-bold text-lg mb-4 border-b border-border pb-2",children:"详细信息"}),(0,b.jsxs)("dl",{className:"space-y-4 text-sm",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:"出生日期"}),(0,b.jsx)("dd",{className:"font-medium",children:F.birthDate||"-"})]}),F.deathDate&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:"逝世日期"}),(0,b.jsx)("dd",{className:"font-medium",children:F.deathDate})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:"谥号"}),(0,b.jsx)("dd",{className:"font-medium",children:F.posthumousName||"-"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:"墓地"}),(0,b.jsx)("dd",{className:"font-medium",children:F.burialPlace||"-"})]})]}),F.generationName&&(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:"字辈"}),(0,b.jsx)("dd",{className:"font-medium",children:F.generationName})]})]})]}),(F.phone||F.telephone||F.email||F.address)&&(0,b.jsxs)("div",{className:"bg-card rounded-lg border border-border p-6 shadow-sm",children:[(0,b.jsx)("h3",{className:"font-serif font-bold text-lg mb-4 border-b border-border pb-2",children:"联系方式"}),(0,b.jsxs)("dl",{className:"space-y-4 text-sm",children:[F.phone&&(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:"手机号"}),(0,b.jsx)("dd",{className:"font-medium",children:(0,b.jsx)("a",{href:`tel:${F.phone}`,className:"hover:text-primary",children:F.phone})})]}),F.telephone&&(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:"固定电话"}),(0,b.jsx)("dd",{className:"font-medium",children:(0,b.jsx)("a",{href:`tel:${F.telephone}`,className:"hover:text-primary",children:F.telephone})})]}),F.email&&(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:"邮箱"}),(0,b.jsx)("dd",{className:"font-medium",children:(0,b.jsx)("a",{href:`mailto:${F.email}`,className:"hover:text-primary",children:F.email})})]}),F.address&&(0,b.jsxs)("div",{children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:"现居地址"}),(0,b.jsx)("dd",{className:"font-medium",children:F.address})]})]})]})]})]})]})]})}a.s(["default",()=>x],12174)}];
|
|
|
|
//# sourceMappingURL=Documents_go-new_chinese-family-tree_f083e7ff._.js.map
|