1import{t as f,r as l,b as Ze,aa as Je,g as o,j as e,O as ee,ag as d,bg as je,ae as De,a8 as Te,C as Ue,aQ as Fe,aR as ze,S as We,N as Me,K as _e,R as $e,bh as Xe,bi as es,bj as ss,bk as as,M as ts,X as we,e as se,a2 as cs,Z as rs,ah as ls,i as ye,d as is}from"./index-DxpMJHht.js";import{A as ns}from"./AdminLayout-0d316vlG.js";import{I as P}from"./input-BM87a4su.js";import{B as de}from"./badge-DsT5f29h.js";import{D as ae,a as te,b as ce,c as re,d as le}from"./useComposition-XW7wi1uU.js";import{L as S}from"./label-N5PEA7-o.js";import{T as ds}from"./textarea-s21c5pGe.js";import{S as os}from"./switch-CjwOTAC6.js";import{c as Ee}from"./compressPropertyImage-DGPij8tx.js";import{T as ms,a as xs,b as fe}from"./tabs-Zc2A4MFN.js";import{S as oe,a as me,b as xe,c as he,d as C}from"./select-DmrdHioO.js";import{F as hs}from"./filter-DpyHu4Ln.js";import{A as us}from"./arrow-up-down-DTta35kr.js";import{T as ps}from"./trophy-CyGJU16u.js";import{Z as gs}from"./zap-Hez7l0EJ.js";import{E as js}from"./eye-off-4r_urtck.js";import{S as Le}from"./square-pen-CJUCca7r.js";import{I as Ae}from"./image-BqmIyipE.js";import{T as ge}from"./trash-2-BXORPUbj.js";import{U as Be}from"./upload-CBENvaWW.js";import{S as Re}from"./square-check-big-BODJoe4A.js";import{L as As}from"./layout-grid-DLl9cxNd.js";import{F as Bs}from"./file-image-C2d4m8EI.js";import"./users-pO4YXYoT.js";import"./message-square-BL6WhYih.js";import"./credit-card-CBqiWxzd.js";import"./scroll-text-S2xX2Zri.js";import"./brain-BILY2OXr.js";import"./shield-check-B-c2fWxU.js";import"./code-xml-CbOybmm2.js";import"./link-2-CKikx1IH.js";import"./index-B3jfGoxH.js";import"./usePersistFn-D0m5YWYz.js";import"./index-Dd2B6ZeX.js";import"./index-BrCzSc1v.js";import"./index-DpvxDjfc.js";const ue={title:"",developer:"",address:"",completionDate:"",totalBlocks:"",totalUnits:"",minArea:"",maxArea:"",unitTypes:"",facilities:"",coverImage:"",contentHtml:"",isNewProject:!1};function la(){const B=f.useUtils(),b=l.useRef(null),[F]=Ze(),y=Je(),x=()=>{if(new URLSearchParams(y).get("type")==="new")return!0},[N,j]=l.useState(""),[k,D]=l.useState(()=>x()),[I,a]=l.useState("all"),[_,V]=l.useState("all"),[Q,T]=l.useState("all"),[O,U]=l.useState("default"),[q,w]=l.useState(1);l.useEffect(()=>{D(x()),w(1)},[F,y]);const G=20,[g,L]=l.useState(!1),[R,z]=l.useState(null),[m,v]=l.useState(ue),[K,$]=l.useState(""),[Y,Z]=l.useState(!1),[J,W]=l.useState(null),[c,u]=l.useState(null),[E,r]=l.useState(""),[i,p]=l.useState(!1),[t,h]=l.useState(""),[A,H]=l.useState(!1),{data:X,isLoading:Oe}=f.admin.brochures.list.useQuery({search:N||void 0,isNewProject:k,status:I==="all"?void 0:I,buildingType:_==="all"?void 0:_,completenessFilter:Q==="all"?void 0:Q,sortBy:O,page:q,pageSize:G}),be=f.admin.brochures.create.useMutation({onSuccess:()=>{o.success("æ¨æ¸å·²æ°å¢"),B.admin.brochures.list.invalidate(),L(!1),v(ue),$("")},onError:s=>o.error("æ°å¢å¤±æ",{description:s.message})}),Ne=f.admin.brochures.update.useMutation({onSuccess:()=>{o.success("æ¨æ¸å·²æ´æ°"),B.admin.brochures.list.invalidate(),L(!1),z(null),v(ue),$("")},onError:s=>o.error("æ´æ°å¤±æ",{description:s.message})}),ke=f.admin.brochures.delete.useMutation({onSuccess:()=>{o.success("æ¨æ¸å·²åªé¤ï¼è»åªé¤ï¼"),B.admin.brochures.list.invalidate(),W(null)},onError:s=>o.error("åªé¤å¤±æ",{description:s.message})}),qe=f.admin.brochures.uploadCover.useMutation({onSuccess:s=>{v(n=>({...n,coverImage:s.url})),$(s.url),Z(!1),o.success("å°é¢åçå·²ä¸å³")},onError:s=>{Z(!1),o.error("ä¸å³å¤±æ",{description:s.message})}});f.admin.brochures.update.useMutation({onSuccess:()=>{B.admin.brochures.list.invalidate()}});const ie=f.admin.brochures.toggleStatus.useMutation({onSuccess:s=>{B.admin.brochures.list.invalidate(),o.success(s.status==="active"?"æ¨æ¸å·²æ¿æ´»ï¼å端å¯è¦":"æ¨æ¸å·²è¨çºå¾ æ¿æ´»ï¼å端ä¸å¯è¦")},onError:s=>o.error("çæ åæå¤±æ",{description:s.message})}),Ce=f.admin.brochures.geocodeBrochure.useMutation({onSuccess:s=>{alert(`åæ¨æ´æ°æåï¼ 2${s.formattedAddress} 3(${s.latitude.toFixed(6)}, ${s.longitude.toFixed(6)}
3)`),B.admin.brochures.list.invalidate()},onError:s=>{alert(`åæ¨æ´æ°å¤±æ: ${s.message}`)}});function He(){z(null),v(ue),$(""),L(!0)}function Ye(s){z(s.id),v({title:s.title??"",developer:s.developer??"",address:s.address??"",completionDate:s.completionDate??"",totalBlocks:s.totalBlocks!=null?String(s.totalBlocks):"",totalUnits:s.totalUnits!=null?String(s.totalUnits):"",minArea:s.minArea!=null?String(s.minArea):"",maxArea:s.maxArea!=null?String(s.maxArea):"",unitTypes:s.unitTypes??"",facilities:s.facilities??"",coverImage:s.coverImage??"",contentHtml:s.contentHtml??"",isNewProject:s.isNewProject??!1}),$(s.coverImage??""),L(!0)}async function Ve(s){const n=s.target.files?.[0];if(n){if(n.size>10*1024*1024){o.error("åçé大",{description:"è«é¸æ 10MB 以ä¸çåç"});return}Z(!0);try{const{base64:M}=await Ee(n);qe.mutate({base64:M,mimeType:"image/jpeg"})}catch{o.error("åçå£ç¸®å¤±æï¼è«é試"),Z(!1)}s.target.value=""}}function Qe(){const s={title:m.title.trim(),developer:m.developer||void 0,address:m.address||void 0,completionDate:m.completionDate||void 0,totalBlocks:m.totalBlocks?parseInt(m.totalBlocks):void 0,totalUnits:m.totalUnits?parseInt(m.totalUnits):void 0,minArea:m.minArea||void 0,maxArea:m.maxArea||void 0,unitTypes:m.unitTypes||void 0,facilities:m.facilities||void 0,coverImage:m.coverImage||void 0,contentHtml:m.contentHtml||void 0,isNewProject:m.isNewProject};if(!s.title){o.error("è«å¡«å¯«æ¨æ¸å稱");return}R?Ne.mutate({id:R,...s}):be.mutate(s)}const Se=X?.items??[],ne=X?.total??0,Pe=X?.activeCount??0,Ie=X?.pendingCount??0,ve=Math.ceil(ne/G);return e.jsxs(ns,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:258",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:259",className:"p-6 space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:261",className:"flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:262",className:"flex items-center gap-3",children:[e.jsx(ee,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:263",className:"w-6 h-6 text-amber-500"}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:264",children:[e.jsx("h1",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:265",className:"text-xl font-bold text-white",children:"æ¨æ¸ç®¡ç"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:266",className:"text-sm text-slate-400",children:"ç®¡çæ°ç¤æ¨æ¸åå±èè³æå"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:269",className:"flex gap-2",children:[e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:270",onClick:()=>p(!0),variant:"outline",className:"border-amber-500 text-amber-500 hover:bg-amber-500/10",children:[e.jsx(je,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:275",className:"w-4 h-4 mr-2"}),"徿¸ææºå°å
¥"]}),e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:278",onClick:He,className:"bg-amber-500 hover:bg-amber-600 text-black font-semibold",children:[e.jsx(De,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:279",className:"w-4 h-4 mr-2"}),"æ°å¢æ¨æ¸"]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:286",className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:287",className:`bg-slate-800 border rounded-lg p-4 cursor-pointer transition-all ${I==="all"?"border-amber-500 bg-amber-500/10":"border-slate-700 hover:border-slate-600"}`,onClick:()=>{a("all"),w(1)},children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:293",className:"flex items-center gap-2 mb-1",children:[e.jsx(ee,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:294",className:"w-4 h-4 text-slate-400"}),e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:295",className:"text-sm text-slate-400",children:"å
¨é¨æ¨æ¸"})]}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:297",className:"text-2xl font-bold text-white",children:Pe+Ie}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:298",className:"text-xs text-slate-500 mt-1",children:"黿æ¥çå
¨é¨"})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:300",className:`bg-slate-800 border rounded-lg p-4 cursor-pointer transition-all ${I==="active"?"border-green-500 bg-green-500/10":"border-slate-700 hover:border-slate-600"}`,onClick:()=>{a("active"),w(1)},children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:306",className:"flex items-center gap-2 mb-1",children:[e.jsx(Te,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:307",className:"w-4 h-4 text-green-400"}),e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:308",className:"text-sm text-green-400",children:"å·²æ¿æ´»"})]}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:310",className:"text-2xl font-bold text-green-400",children:Pe}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:311",className:"text-xs text-slate-500 mt-1",children:"æçå¯¦æ¸æï¼åç«¯å¯æç´¢"})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:313",className:`bg-slate-800 border rounded-lg p-4 cursor-pointer transition-all ${I==="pending"?"border-yellow-500 bg-yellow-500/10":"border-slate-700 hover:border-slate-600"}`,onClick:()=>{a("pending"),w(1)},children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:319",className:"flex items-center gap-2 mb-1",children:[e.jsx(Ue,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:320",className:"w-4 h-4 text-yellow-400"}),e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:321",className:"text-sm text-yellow-400",children:"å¾
æ¿æ´»"})]}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:323",className:"text-2xl font-bold text-yellow-400",children:Ie}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:324",className:"text-xs text-slate-500 mt-1",children:"åªææ®¼ï¼å端ä¸å¯è¦"})]})]}),e.jsx(Fe,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:329",className:"bg-slate-800 border-slate-700",children:e.jsxs(ze,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:330",className:"p-4 space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:332",className:"flex flex-wrap gap-3 items-center",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:333",className:"relative flex-1 min-w-[200px]",children:[e.jsx(We,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:334",className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:335",placeholder:"æå°æ¨æ¸å稱...",value:N,onChange:s=>{j(s.target.value),w(1)},className:"pl-9 bg-slate-700 border-slate-600 text-white placeholder:text-slate-400"})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:342",className:"flex gap-2",children:[e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:343",size:"sm",variant:k===void 0?"default":"outline",onClick:()=>{D(void 0),w(1)},className:k===void 0?"bg-amber-500 text-black":"border-slate-600 text-slate-300 hover:bg-slate-700",children:"å
¨é¨"}),e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:351",
3size:"sm",variant:k===!0?"default":"outline",onClick:()=>{D(!0),w(1)},className:k===!0?"bg-amber-500 text-black":"border-slate-600 text-slate-300 hover:bg-slate-700",children:[e.jsx(Me,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:357",className:"w-3 h-3 mr-1"}),"æ°ç¤è³è¨"]}),e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:360",size:"sm",variant:k===!1?"default":"outline",onClick:()=>{D(!1),w(1)},className:k===!1?"bg-amber-500 text-black":"border-slate-600 text-slate-300 hover:bg-slate-700",children:[e.jsx(_e,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:366",className:"w-3 h-3 mr-1"}),"ä¸è¬æ¨æ¸"]})]}),e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:370",size:"sm",variant:"outline",onClick:()=>{j(""),D(void 0),a("all"),V("all"),T("all"),U("default"),w(1)},className:"border-slate-600 text-slate-400 hover:bg-slate-700",children:[e.jsx($e,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:384",className:"w-3 h-3 mr-1"}),"éç½®"]}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:386",className:"text-slate-400 text-sm ml-auto",children:[I==="all"&&e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:387",children:["å
± ",ne," æ¬"]}),I==="active"&&e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:388",className:"text-green-400",children:["å·²æ¿æ´» ",ne," æ¬"]}),I==="pending"&&e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:389",className:"text-yellow-400",children:["å¾
æ¿æ´» ",ne," æ¬"]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:393",className:"flex flex-wrap gap-2 items-center",children:[e.jsx(hs,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:394",className:"w-3.5 h-3.5 text-slate-500"}),e.jsxs(oe,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:396",value:I,onValueChange:s=>{a(s),w(1)},children:[e.jsx(me,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:397",className:"w-28 h-8 bg-slate-700 border-slate-600 text-slate-300 text-xs",children:e.jsx(xe,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:398",placeholder:"çæ
"})}),e.jsxs(he,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:400",className:"bg-slate-800 border-slate-700",children:[e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:401",value:"all",className:"text-slate-300 text-xs",children:"å
¨é¨çæ
"}),e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:402",value:"active",className:"text-green-400 text-xs",children:"â
å·²æ¿æ´»"}),e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:403",value:"pending",className:"text-yellow-400 text-xs",children:"â³ å¾
æ¿æ´»"})]})]}),e.jsxs(oe,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:407",value:_,onValueChange:s=>{V(s),w(1)},children:[e.jsx(me,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:408",className:"w-28 h-8 bg-slate-700 border-slate-600 text-slate-300 text-xs",children:e.jsx(xe,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:409",placeholder:"é¡å¥"})}),e.jsxs(he,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:411",className:"bg-slate-800 border-slate-700",children:[e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:412",value:"all",className:"text-slate-300 text-xs",children:"å
¨é¨é¡å¥"}),e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:413",value:"residential",className:"text-blue-400 text-xs",children:"ä½å®
é¡"}),e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:414",value:"office",className:"text-purple-400 text-xs",children:"坫忍"}),e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:415",value:"industrial",className:"text-orange-400 text-xs",children:"å·¥æ¥"}),e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:416",value:"tong_lau",className:"text-green-400 text-xs",children:"忍"})]})]}),e.jsxs(oe,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:420",value:Q,onValueChange:s=>{T(s),w(1)},children:[e.jsx(me,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:421",className:"w-36 h-8 bg-slate-700 border-slate-600 text-slate-300 text-xs",children:e.jsx(xe,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:422",placeholder:"æ¸æå®æ´åº¦"})}),e.jsxs(he,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:424",className:"bg-slate-800 border-slate-700",children:[e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:425",value:"all",className:"text-slate-300 text-xs",children:"å
¨é¨å®æ´åº¦"}),e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:426",value:"high",className:"text-orange-400 text-xs",children:"ð é«å®æ´åº¦ â¥80%"}),e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:427",value:"medium",className:"text-blue-400 text-xs",children:"ð ä¸ç 40-79%"}),e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:428",value:"low",className:"text-slate-400 text-xs",children:"â ï¸ ä½å®æ´åº¦ <40%"}),e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:429",value:"missing_cover",className:"text-red-400 text-xs",children:"缺å°é¢å"}),e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:430",value:"missing_units",className:"text-red-400 text-xs",children:"缺å®å
æ¸æ"}),e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:431",value:"missing_coords",className:"text-red-400 text-xs",children:"ç¼ºåæ¨"}),e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:432",value:"missing_floorplans",className:"text-red-400 text-xs",children:"缺平é¢å"})]})]}),e.jsxs(oe,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:436",value:O,onValueChange:s=>{U(s),w(1)},children:[e.jsxs(me,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:437",className:"w-36 h-8 bg-slate-700 border-slate-600 text-slate-300 text-xs",children:[e.jsx(us,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:438",className:"w-3 h-3 mr-1"}),e.jsx(xe,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:439",placeholder:"æåº"})]}),e.jsxs(he,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:441",className:"bg-slate-800 border-slate-700",children:[e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:442",value:"default",className:"text-slate-300 text-xs",children:"é è¨ï¼å®å
æ¸âï¼"}),e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:443",value:"units_desc",className:"text-slate-300 text-xs",children:"å®å
æ¸ å¤âå°"}),e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:444",value:"completeness_desc",className:"text-slate-300 text-xs",children:"宿´åº¦ é«âä½"}),e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:445",value:"completeness_asc",className:"text-slate-300 text-xs",children:"宿´åº¦ ä½âé«"}),e.jsx(C,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:446",value:"created_desc",className:"text-slate-300 text-xs",children:"ææ°å»ºç«"})]})]})]})]})}),e.jsx(Fe,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:454",className:"bg-slate-800 border-slate-700",children:e.jsx(ze,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:455",className:"p-0",children:Oe?e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:457",className:"p-8 text-center text-slate-400",children:"è¼å
¥ä¸..."}):Se.length===0?e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:459",className:"p-8 text-center text-slate-400",children:[e.jsx(ee,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:460",className:"w-12 h-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:461",children:"æ«ç¡æ¨æ¸è³æ"})]}):e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:464",className:"overflow-x-auto",children:e.jsxs("table",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:465",className:"w-full",children:[e.jsx("thead",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:466",children:e.jsxs("tr",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:467",className:"border-b border-slate-700 text-slate-400 text-sm",children:[e.jsx("th",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:468",className:"text-left p-4 font-medium",children:"å°é¢"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:469",className:"text-left p-4 font-medium",children:"æ¨æ¸å稱"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:470",className:"text-left p-4 font-medium",children:"ç¼å±å"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:471",className:"text-left p-4 font-medium",children:"é¡å¥"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:472",className:"text-left p-4 font-medium",children:"é¢ç©"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:473",className:"text-left p-4 font-medium",children:"å®å
æ¸"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:474",className:"text-left p-4 font-medium",children:"宿´åº¦"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:475",className:"text-left p-4 font-medium",children:"ç覽"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:476",className:"text-left p-4 font-medium",children:"æ¨æ¸çæ
"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:477",className:"text-left p-4 font-medium",children:"æä½"})]})}),e.jsx("tbody",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:480",children:Se.map(s=>e.jsxs("tr",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:482",className:"border-b border-slate-700/50 hover:bg-slate-700/30 transition-colors",children:[e.jsx("td",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:483",className:"p-4",children:s.coverImage?e.jsx("img",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:485",src:s.coverImage,alt:s.title,className:"w-12 h-16 object-cover rounded"}):e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:487",className:"w-12 h-16 bg-slate-700 rounded flex items-center justify-center",children:e.jsx(ee,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:488",className:"w-5 h-5 text-slate-500"})})}),e.jsxs("td",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:492",className:"p-4",children:[e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:493",className:"font-medium text-white max-w-[200px] truncate",children:s.title}),s.address&&e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:494",className:"text-xs text-slate-400 mt-0.5 truncate max-w-[200px]",children:s.address}),e.jsx(bs,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:495",brochureId:s.id})]}),e.jsx("td",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:497",className:"p-4 text-slate-300 text-sm",children:s.developer||"â"}),e.jsx("td",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:498",className:"p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:499",className:"flex flex-col gap-1",children:[s.isNewProject&&e.jsxs(de,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:501",className:"bg-amber-500/20 text-amber-400 border-amber-500/30",children:[e.jsx(Me,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:502",className:"w-3 h-3 mr-1"}),"æ°ç¤"]}),e.jsx(de,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:505",variant:"outline",className:s.buildingType==="residential"?"border-blue-500/50 text-blue-400":s.buildingType==="office"?"border-purple-500/50 text-purple-400":s.buildingType==="industrial"?"border-orange-500/50 text-orange-400":s.buildingType==="tong_lau"?"border-green-500/50 text-green-400":"border-slate-600 text-slate-400",children:s.buildingType==="residential"?"ä½å®
é¡":s.buildingType==="office"?"坫忍":s.buildingType==="industrial"?"å·¥æ¥":s.buildingType==="tong_lau"?"忍":"ä¸è¬"})]})}),e.jsx("td",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:519",className:"p-4 text-slate-300 text-sm",children:s.minArea&&s.maxArea?`${s.minArea}â${s.maxArea} å`:s.minArea?`${s.minArea} å`:"â"}),e.jsx("td",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:522",className:"p-4 text-slate-300 text-sm",children:s.unitCount>0?e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:524",className:"text-blue-400 font-medium",children:s.unitCount.toLocaleStr
3ing()}):e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:525",className:"text-slate-600",children:"â"})}),e.jsx("td",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:527",className:"p-4 min-w-[120px]",children:(()=>{const n=s.completenessScore??0,M=s.completenessDetail??{},Ge=n>=80?"bg-orange-500":n>=40?"bg-blue-400":"bg-slate-500",Ke=n>=80?"text-orange-400":n>=40?"text-blue-400":"text-slate-500";return e.jsx(Xe,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:534",children:e.jsxs(es,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:535",children:[e.jsx(ss,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:536",asChild:!0,children:e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:537",className:"flex flex-col gap-1 cursor-default",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:538",className:"flex items-center gap-1",children:[n>=80&&e.jsx(ps,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:539",className:"w-3 h-3 text-orange-400"}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:540",className:`text-xs font-semibold ${Ke}`,children:[n,"%"]})]}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:542",className:"w-20 h-1.5 bg-slate-700 rounded-full overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:543",className:`h-full rounded-full transition-all ${Ge}`,style:{width:`${n}%`}})}),n>=80&&e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:545",className:"text-[10px] text-orange-400",children:"æçæ¨æ¸"})]})}),e.jsxs(as,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:548",className:"bg-slate-900 border-slate-700 text-xs space-y-1",children:[e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:549",className:"font-medium text-white mb-1",children:"æ¸æå®æ´åº¦æç´°"}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:550",className:"grid grid-cols-2 gap-x-3 gap-y-0.5",children:[e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:551",className:M.hasCover?"text-green-400":"text-slate-500",children:[M.hasCover?"â":"â"," å°é¢å (20å)"]}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:552",className:M.hasUnits?"text-green-400":"text-slate-500",children:[M.hasUnits?"â":"â"," å®å
æ¸æ (25å)"]}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:553",className:M.hasFloorPlans?"text-green-400":"text-slate-500",children:[M.hasFloorPlans?"â":"â"," å¹³é¢å (20å)"]}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:554",className:M.hasAddress?"text-green-400":"text-slate-500",children:[M.hasAddress?"â":"â"," å°å (10å)"]}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:555",className:M.hasDeveloper?"text-green-400":"text-slate-500",children:[M.hasDeveloper?"â":"â"," ç¼å±å (10å)"]}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:556",className:M.hasCoords?"text-green-400":"text-slate-500",children:[M.hasCoords?"â":"â"," 忍 (15å)"]})]})]})]})})})()}),e.jsx("td",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:564",className:"p-4 text-slate-300 text-sm",children:s.viewCount??0}),e.jsx("td",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:565",className:"p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:566",className:"flex flex-col gap-1.5",children:[s.status==="active"?e.jsxs(de,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:569",className:"bg-green-500/20 text-green-400 border-green-500/30 text-xs w-fit",children:[e.jsx(Te,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:570",className:"w-3 h-3 mr-1"}),"å·²æ¿æ´»"]}):e.jsxs(de,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:573",className:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30 text-xs w-fit",children:[e.jsx(Ue,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:574",className:"w-3 h-3 mr-1"}),"å¾
æ¿æ´»"]}),s.status==="pending"?e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:579",size:"sm",variant:"ghost",onClick:()=>ie.mutate({id:s.id,status:"active"}),disabled:ie.isPending,className:"text-green-400 hover:text-green-300 hover:bg-green-400/10 text-xs h-6 px-2",title:"æåæ¿æ´»ï¼å端å¯è¦",children:[e.jsx(gs,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:587",className:"w-3 h-3 mr-1"}),"æ¿æ´»"]}):e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:590",size:"sm",variant:"ghost",onClick:()=>ie.mutate({id:s.id,status:"pending"}),disabled:ie.isPending,className:"text-yellow-400 hover:text-yellow-300 hover:bg-yellow-400/10 text-xs h-6 px-2",title:"è¨çºå¾
æ¿æ´»ï¼å端ä¸å¯è¦",children:[e.jsx(js,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:598",className:"w-3 h-3 mr-1"}),"åç¨"]})]})}),e.jsx("td",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:603",className:"p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:604",className:"flex items-center gap-1",children:[e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:605",size:"sm",variant:"ghost",onClick:()=>{h(s.title),p(!0)},className:"text-amber-400 hover:text-amber-300 hover:bg-amber-400/10",title:"徿¸ææºå°å
¥åç/æ¸æ",children:e.jsx(je,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:612",className:"w-4 h-4"})}),e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:614",size:"sm",variant:"ghost",onClick:()=>Ye(s),className:"text-blue-400 hover:text-blue-300 hover:bg-blue-400/10",title:"ç·¨è¼¯æ¨æ¸",children:e.jsx(Le,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:621",className:"w-4 h-4"})}),e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:623",size:"sm",variant:"ghost",onClick:()=>s.address&&Ce.mutate({brochureId:s.id}),disabled:!s.address||Ce.isPending,className:"text-teal-400 hover:text-teal-300 hover:bg-teal-400/10",title:s.address?`æ´æ°åæ¨: ${s.address}`:"æ²æå°åï¼ç¡æ³æ´æ°åæ¨",children:e.jsx(ts,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:631",className:"w-4 h-4"})}),e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:633",size:"sm",variant:"ghost",onClick:()=>{u(s.id),r(s.title)},className:"text-purple-400 hover:text-purple-300 hover:bg-purple-400/10",title:"管çå¹³é¢å/æ¶åå",children:e.jsx(Ae,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:640",className:"w-4 h-4"})}),e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:642",size:"sm",variant:"ghost",onClick:()=>W(s.id),className:"text-red-400 hover:text-red-300 hover:bg-red-400/10",title:"åªé¤æ¨æ¸",children:e.jsx(ge,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:649",className:"w-4 h-4"})})]})})]},s.id))})]})})})}),ve>1&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:664",className:"flex justify-center gap-2",children:[e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:665",size:"sm",variant:"outline",disabled:q<=1,onClick:()=>w(s=>s-1),className:"border-slate-600 text-slate-300 hover:bg-slate-700",children:"ä¸ä¸é "}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:674",className:"flex items-center text-slate-400 text-sm px-3",children:[q," / ",ve]}),e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:677",size:"sm",variant:"outline",disabled:q>=ve,onClick:()=>w(s=>s+1),className:"border-slate-600 text-slate-300 hover:bg-slate-700",children:"ä¸ä¸é "})]})]}),e.jsx(ae,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:691",open:g,onOpenChange:L,children:e.jsxs(te,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:692",className:"bg-slate-800 border-slate-700 text-white max-w-2xl max-h-[90vh] overflow-y-auto",children:[e.jsx(ce,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:693",children:e.jsxs(re,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:694",className:"text-white flex items-center gap-2",children:[e.jsx(ee,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:695",className:"w-5 h-5 text-amber-500"}),R?"ç·¨è¼¯æ¨æ¸":"æ°å¢æ¨æ¸"]})}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:699",className:"space-y-4 py-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:701",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:702",className:"text-slate-300 mb-2 block",children:"å°é¢åç"}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:703",className:"flex items-start gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:704",className:"w-24 h-32 bg-slate-700 rounded border-2 border-dashed border-slate-600 flex items-center justify-center cursor-pointer hover:border-amber-500 transition-colors overflow-hidden",onClick:()=>b.current?.click(),children:K?e.jsx("img",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:709",src:K,alt:"å°é¢",className:"w-full h-full object-cover"}):e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:711",className:"text-center",children:[e.jsx(Be,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:712",className:"w-6 h-6 text-slate-400 mx-auto mb-1"}),e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:713",className:"text-xs text-slate-400",children:"ä¸å³å°é¢"})]})}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:717",className:"flex-1 space-y-2",children:[e.jsx("input",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:718",ref:b,type:"file",accept:"image/*",className:"hidden",onChange:Ve}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:719",className:"flex flex-wrap gap-2",children:[e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:720",size:"sm",variant:"outline",onClick:()=>b.current?.click(),disabled:Y,className:"border-slate-600 text-slate-300 hover:bg-slate-700",children:[e.jsx(Be,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:727",className:"w-3 h-3 mr-1"}),Y?"ä¸å³ä¸...":"æ¬å°ä¸å³"]}),R&&e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:731",size:"sm",variant:"outline",onClick:()=>H(!0),className:"border-amber-600 text-amber-400 hover:bg-amber-500/10",children:[e.jsx(Ae,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:737",className:"w-3 h-3 mr-1"}),"å¾å·²ä¸å³åç鏿"]})]}),K&&e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:743",size:"sm",variant:"ghost",onClick:()=>{v(s=>({...s,coverImage:""})),$("")},className:"text-red-400 hover:text-red-300",children:[e.jsx(we,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:749",className:"w-3 h-3 mr-1"}),"ç§»é¤"]}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:752",className:"text-xs text-slate-500",children:"建è°å°ºå¯¸ 400Ã600ï¼æå¤§ 5MB"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:758",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:759",className:"text-slate-300 mb-1 block",children:"æ¨æ¸å稱 *"}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:760",value:m.title,onChange:s=>v(n=>({...n,title:s.target.value}
3)),placeholder:"ä¾ï¼å¸æ¯å³° The Imperial Cullinan",className:"bg-slate-700 border-slate-600 text-white"})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:769",className:"flex items-center justify-between p-3 bg-slate-700/50 rounded-lg",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:770",children:[e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:771",className:"text-white text-sm font-medium",children:"æ°ç¤è³è¨"}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:772",className:"text-slate-400 text-xs",children:"æ¨è¨çºæ°ç¤ï¼æå¨æ°ç¤è³è¨åé¡é¡¯ç¤º"})]}),e.jsx(os,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:774",checked:m.isNewProject,onCheckedChange:s=>v(n=>({...n,isNewProject:s}))})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:781",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:782",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:783",className:"text-slate-300 mb-1 block",children:"ç¼å±å"}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:784",value:m.developer,onChange:s=>v(n=>({...n,developer:s.target.value})),placeholder:"ä¾ï¼æ°é´»åºå°ç¢",className:"bg-slate-700 border-slate-600 text-white"})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:791",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:792",className:"text-slate-300 mb-1 block",children:"é è¨è½ææ¥æ"}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:793",value:m.completionDate,onChange:s=>v(n=>({...n,completionDate:s.target.value})),placeholder:"ä¾ï¼2026年第ä¸å£",className:"bg-slate-700 border-slate-600 text-white"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:802",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:803",className:"text-slate-300 mb-1 block",children:"å°å"}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:804",value:m.address,onChange:s=>v(n=>({...n,address:s.target.value})),placeholder:"ä¾ï¼æ¾³éæ°¹ä»å¥§æå¹å
大馬路",className:"bg-slate-700 border-slate-600 text-white"})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:813",className:"grid grid-cols-4 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:814",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:815",className:"text-slate-300 mb-1 block text-xs",children:"座æ¸"}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:816",type:"number",value:m.totalBlocks,onChange:s=>v(n=>({...n,totalBlocks:s.target.value})),placeholder:"3",className:"bg-slate-700 border-slate-600 text-white"})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:824",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:825",className:"text-slate-300 mb-1 block text-xs",children:"å®ä½æ¸"}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:826",type:"number",value:m.totalUnits,onChange:s=>v(n=>({...n,totalUnits:s.target.value})),placeholder:"500",className:"bg-slate-700 border-slate-600 text-white"})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:834",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:835",className:"text-slate-300 mb-1 block text-xs",children:"æå°é¢ç©(å)"}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:836",value:m.minArea,onChange:s=>v(n=>({...n,minArea:s.target.value})),placeholder:"500",className:"bg-slate-700 border-slate-600 text-white"})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:843",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:844",className:"text-slate-300 mb-1 block text-xs",children:"æå¤§é¢ç©(å)"}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:845",value:m.maxArea,onChange:s=>v(n=>({...n,maxArea:s.target.value})),placeholder:"1200",className:"bg-slate-700 border-slate-600 text-white"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:855",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:856",className:"text-slate-300 mb-1 block",children:"æ¶å"}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:857",value:m.unitTypes,onChange:s=>v(n=>({...n,unitTypes:s.target.value}
3)),placeholder:"ä¾ï¼1æ¿ã2æ¿ã3æ¿ã4æ¿",className:"bg-slate-700 border-slate-600 text-white"})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:864",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:865",className:"text-slate-300 mb-1 block",children:"è¨æ½"}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:866",value:m.facilities,onChange:s=>v(n=>({...n,facilities:s.target.value})),placeholder:"ä¾ï¼æ¸¸æ³³æ± ãå¥èº«å®¤ãææãåè»å ´",className:"bg-slate-700 border-slate-600 text-white"})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:875",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:876",className:"text-slate-300 mb-1 block",children:"詳細ä»ç´¹"}),e.jsx(ds,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:877",value:m.contentHtml,onChange:s=>v(n=>({...n,contentHtml:s.target.value})),placeholder:"æ¨æ¸è©³ç´°ä»ç´¹å
§å®¹...",rows:5,className:"bg-slate-700 border-slate-600 text-white resize-none"})]})]}),e.jsxs(le,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:886",className:"gap-2",children:[e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:887",variant:"outline",onClick:()=>L(!1),className:"border-slate-600 text-slate-300 hover:bg-slate-700",children:"åæ¶"}),e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:894",onClick:Qe,disabled:be.isPending||Ne.isPending,className:"bg-amber-500 hover:bg-amber-600 text-black font-semibold",children:be.isPending||Ne.isPending?"å²åä¸...":R?"å²åæ´æ¹":"æ°å¢æ¨æ¸"})]})]})}),A&&R&&e.jsx(vs,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:907",brochureId:R,onSelect:s=>{v(n=>({...n,coverImage:s})),$(s),H(!1)},onClose:()=>H(!1)}),e.jsx(ae,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:919",open:J!==null,onOpenChange:()=>W(null),children:e.jsxs(te,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:920",className:"bg-slate-800 border-slate-700 text-white max-w-sm",children:[e.jsx(ce,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:921",children:e.jsx(re,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:922",className:"text-white",children:"確èªåªé¤"})}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:924",className:"text-slate-300 text-sm",children:"確å®è¦åªé¤æ¤æ¨æ¸åï¼æ¤æä½ä¸å¯æ¢å¾©ã"}),e.jsxs(le,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:925",className:"gap-2",children:[e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:926",variant:"outline",onClick:()=>W(null),className:"border-slate-600 text-slate-300 hover:bg-slate-700",children:"åæ¶"}),e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:933",onClick:()=>J&&ke.mutate({id:J}),disabled:ke.isPending,className:"bg-red-500 hover:bg-red-600 text-white",children:"確èªåªé¤"})]})]})}),i&&e.jsx(fs,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:946",onClose:()=>{p(!1),h("")},initialTitle:t,onImported:()=>{p(!1),h(""),B.admin.brochures.list.invalidate()},onImportedWithId:s=>{p(!1),B.admin.brochures.list.invalidate().then(()=>{u(s),r("å°å
¥çæ¨æ¸")})}}),c!==null&&e.jsx(Ns,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:968",brochureId:c,brochureTitle:E,onClose:()=>u(null)})]})}function bs({brochureId:B}){const{data:b}=f.brochures.watermarkProgress.useQuery({brochureId:B},{refetchInterval:N=>{const j=N.state.data;return!j||j.total===0||!j.isProcessing&&j.pending===0?!1:3e3}});if(!b||b.total===0||!b.isProcessing&&b.pending===0&&b.failed===0)return null;const F=Math.round(b.done/b.total*100),y=b.failed>0,x=b.isProcessing||b.pending>0;return e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:998",className:"mt-1 w-full max-w-[200px]",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:999",className:"flex items-center justify-between mb-0.5",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1000",className:`text-xs ${y?"text-orange-400":x?"text-amber-400":"text-green-400"}`,children:x?`廿°´å° ${b.done}/${b.total}`:y?`${b.failed} 張失æ`:"宿"}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1005",className:"text-xs text-slate-400",children:[F,"%"]})]}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1007",className:"w-full bg-slate-700 rounded-full h-1.5",children:e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1008",className:`h-1.5 rounded-full transition-all duration-500 ${y?"bg-orange-500":x?"bg-amber-500 animate-pulse":"bg-green-500"}`,style:{width:`${F}%`}})})]})}const pe={floor_plan:"å¹³é¢å",unit_plan:"æ¶åå",brochure_main:"æ¨æ¸ä¸»å",other:"å
¶ä»"};function Ns({brochureId:B,brochureTitle:b,onClose:F}){const y=f.useUtils(),[x,N]=l.useState(null),[j,k]=l.useState({planType:"floor_plan",blockName:"",floor:"",caption:"",imageUrl:"",sequence:""}),[D,I]=l.useState(!1),[a,_]=l.useState(null),[V,Q]=l.useState(!1),[T,O]=l.useState(!1),[U,q]=l.useState(new Set),w=l.useRef(null),G=l.useRef(null),{data:g,isLoading:L}=f.admin.brochures.listFloorPlans.useQuery({brochureId:B}),R=f.admin.brochures.uploadFloorPlanImage.useMutation({onSuccess:c=>{x?N(u=>u&&{...u,imageUrl:c.url}):k(u=>({...u,imageUrl:c.url})),Q(!1),o.success("åçå·²ä¸å³")},onError:c=>{Q(!1),o.error("ä¸å³å¤±æ",{description:c.message})}}),z=f.admin.brochures.createFloorPlan.useMutation({onSuccess:()=>{o.success("å·²æ°å¢å¹³é¢å"),y.admin.brochures.listFloorPlans.invalidate({brochureId:B}),k({planType:"floor_plan",blockName:"",floor:"",caption:"",imageUrl:"",sequence:""}),I(!1)},onError:c=>o.error("æ°å¢å¤±æ",{description:c.message})}),m=f.admin.brochures.updateFloorPlan.useMutation({onSuccess:()=>{o.success("å·²æ´æ°å¹³é¢å"),y.admin.brochures.listFloorPlans.invalidate({brochureId:B}),N(null)},onError:c=>o.error("æ´æ°å¤±æ",{description:c.message})}),v=f.admin.brochures.deleteFloorPlan.useMutation({onSuccess:()=>{o.success("å·²åªé¤å¹³é¢å"),y.admin.brochures.listFloorPlans.invalidate({brochureId:B})},onError:c=>o.error("åªé¤å¤±æ",{description:c.message})}),K=f.admin.brochures.deletePhoto.useMutation({onSuccess:()=>{o.success("å·²åªé¤åç"),y.admin.brochures.listFloorPlans.invalidate({brochureId:B})},onError:c=>o.error("åªé¤å¤±æ",{description:c.message})}),$=f.admin.brochures.batchDeletePhotos.useMutation({onSuccess:c=>{o.success(`å·²åªé¤ ${c.deleted} å¼µåç`),y.admin.brochures.listFloorPlans.invalidate({brochureId:B}),q(new Set),O(!1)},onError:c=>o.error("æ¹éåªé¤å¤±æ",{description:c.message})}),Y=f.admin.brochures.retryFloorPlanWatermark.useMutation({onSuccess:()=>{o.success("已鿰å å
¥å»æ°´å°éåï¼è«ç¨å"),setTimeout(()=>y.admin.brochures.listFloorPlans.invalidate({brochureId:B}),3e3)},onError:c=>o.error("é試失æ",{description:c.message})});async function Z(c,u=!1){const E=c.target.files?.[0];if(E){if(E.size>
315*1024*1024){o.error("åçé大ï¼è«é¸ 15MB 以ä¸");return}Q(!0);try{const{base64:r}=await Ee(E);R.mutate({base64:r,mimeType:"image/jpeg"})}catch{o.error("åçå£ç¸®å¤±æï¼è«é試"),Q(!1)}c.target.value=""}}function J(){if(!j.imageUrl){o.error("è«å
ä¸å³åç");return}z.mutate({brochureId:B,planType:j.planType,blockName:j.blockName||void 0,floor:j.floor||void 0,caption:j.caption||void 0,imageUrl:j.imageUrl,sequence:j.sequence?parseInt(j.sequence):void 0})}function W(){x&&m.mutate({id:x.id,planType:x.planType,blockName:x.blockName||null,floor:x.floor||null,caption:x.caption||null,imageUrl:x.imageUrl,sequence:x.sequence?parseInt(x.sequence):null})}return e.jsxs(e.Fragment,{children:[e.jsx(ae,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1157",open:!0,onOpenChange:F,children:e.jsxs(te,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1158",className:"bg-slate-800 border-slate-700 text-white max-w-4xl max-h-[90vh] overflow-y-auto",children:[e.jsxs(ce,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1159",children:[e.jsxs(re,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1160",className:"text-white flex items-center gap-2",children:[e.jsx(As,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1161",className:"w-5 h-5 text-purple-400"}),"å¹³é¢å/æ¶åå管ç",g&&e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1163",className:"text-sm font-normal text-slate-400 ml-1",children:["å
± ",g.length," å¼µ"]})]}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1165",className:"text-slate-400 text-sm",children:b})]}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1169",className:"flex items-center justify-between gap-2",children:T?e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1171",className:"flex items-center gap-2 flex-1",children:[e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1172",size:"sm",variant:"outline",onClick:()=>{if(!g)return;const c=new Set(g.map(u=>u.id));q(U.size===g.length?new Set:c)},className:"border-slate-600 text-slate-300 hover:bg-slate-700 text-xs",children:g&&U.size===g.length?"å
¨ä¸é¸":"å
¨é¸"}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1184",className:"text-slate-400 text-sm",children:["å·²é¸ ",U.size," å¼µ"]}),U.size>0&&e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1186",size:"sm",variant:"ghost",onClick:()=>{window.confirm(`確å®åªé¤é¸ä¸ç ${U.size} å¼µåçï¼æ¤æä½ä¸å¯æ¢å¾©ã`)&&$.mutate({ids:Array.from(U)})},disabled:$.isPending,className:"text-red-400 hover:text-red-300 hover:bg-red-400/10 text-xs",children:[e.jsx(ge,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1196",className:"w-3 h-3 mr-1"}),$.isPending?"åªé¤ä¸...":`åªé¤é¸ä¸ (${U.size})`]}),e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1200",size:"sm",variant:"ghost",onClick:()=>{O(!1),q(new Set)},className:"text-slate-400 hover:text-slate-300 text-xs ml-auto",children:"åæ¶"})]}):e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1210",className:"flex items-center gap-2 ml-auto",children:[e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1211",size:"sm",variant:"outline",onClick:()=>O(!0),className:"border-slate-600 text-slate-300 hover:bg-slate-700 text-xs",children:"âï¸ è¤é¸"}),e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1219",size:"sm",onClick:()=>I(c=>!c),className:"bg-purple-600 hover:bg-purple-700 text-white",children:[e.jsx(De,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1224",className:"w-4 h-4 mr-1"}),D?"åæ¶æ°å¢":"æ°å¢å¹³é¢å"]})]})}),D&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1233",className:"bg-slate-700/50 rounded-lg p-4 space-y-3 border border-purple-500/30",children:[e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1234",className:"text-purple-300 font-medium text-sm",children:"æ°å¢å¹³é¢å"}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1235",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1236",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1237",className:"text-slate-300 text-xs mb-1 block",children:"é¡å"}),e.jsx("select",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1238",value:j.planType,onCh
3ange:c=>k(u=>({...u,planType:c.target.value})),className:"w-full bg-slate-700 border border-slate-600 text-white rounded px-2 py-1.5 text-sm",children:Object.entries(pe).map(([c,u])=>e.jsx("option",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1243",value:c,children:u},c))})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1246",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1247",className:"text-slate-300 text-xs mb-1 block",children:"座æ¸ï¼å¦ï¼1座ã2座ï¼"}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1248",value:j.blockName,onChange:c=>k(u=>({...u,blockName:c.target.value})),placeholder:"1座",className:"bg-slate-700 border-slate-600 text-white text-sm h-8"})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1250",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1251",className:"text-slate-300 text-xs mb-1 block",children:"æ¨å±¤è¯´æï¼å¦ï¼6-13Fï¼"}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1252",value:j.floor,onChange:c=>k(u=>({...u,floor:c.target.value})),placeholder:"6-13F",className:"bg-slate-700 border-slate-600 text-white text-sm h-8"})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1254",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1255",className:"text-slate-300 text-xs mb-1 block",children:"æåºè"}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1256",value:j.sequence,onChange:c=>k(u=>({...u,sequence:c.target.value})),placeholder:"1",type:"number",className:"bg-slate-700 border-slate-600 text-white text-sm h-8"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1259",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1260",className:"text-slate-300 text-xs mb-1 block",children:"èªªææ¨é¡ï¼å¦ï¼1座-6-13&15-16æ¨ï¼"}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1261",value:j.caption,onChange:c=>k(u=>({...u,caption:c.target.value})),placeholder:"åç說æ...",className:"bg-slate-700 border-slate-600 text-white text-sm h-8"})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1263",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1264",className:"text-slate-300 text-xs mb-1 block",children:"åç"}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1265",className:"flex gap-2 items-center",children:[j.imageUrl?e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1267",className:"relative",children:[e.jsx("img",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1268",src:j.imageUrl,alt:"preview",className:"h-20 w-auto rounded border border-slate-600 object-contain"}),e.jsx("button",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1269",onClick:()=>k(c=>({...c,imageUrl:""})),className:"absolute -top-1 -right-1 bg-red-500 rounded-full p-0.5",children:e.jsx(we,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1269",className:"w-3 h-3"})})]}):e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1272",size:"sm",variant:"outline",onClick:()=>w.current?.click(),disabled:V,className:"border-slate-600 text-slate-300",children:[e.jsx(Be,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1273",className:"w-3 h-3 mr-1"}),V?"ä¸å³ä¸...":"鏿åç"]}),e.jsx("input",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1276",ref:w,type:"file",accept:"image/*",className:"hidden",onChange:Z})]})]}),e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1279",onClick:J,disabled:z.isPending||V,className:"bg-purple-600 hover:bg-purple-700 text-white w-full",children:z.isPending?"æ°å¢ä¸...":"ç¢ºèªæ°å¢"})]}),L?e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1287",className:"text-center text-slate-400 py-8",children:"è¼å
¥ä¸..."}):!g||g.length===0?e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1289",className:"text-center text-slate-400 py-8",children:[e.jsx(Bs,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1290",className:"w-12 h-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1291",children:"æ«ç¡å¹³é¢åè³æ"})]}):e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1294",className:"space-y-6",children:["floor_plan","unit_plan","brochure_main","other"].map(c=>{const u=g.filter(r=>r.planType===c);if(u.length===0)return null;const E={floor_plan:"text-blue-300 border-blue-500/30 bg-blue-500/10",unit_plan:"text-green-300 border-green-500/30 bg-green-500/10",brochure_main:"text-amber-300 border-amber-500/30 bg-amber-500/10",other:"text-slate-300 border-slate-500/30 bg-slate-500/10"};return e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1305",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1306",className:`flex items-center gap-2 mb-3 px-2 py-1.5 rounded-md border ${E[c]}`,children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1307",className:"text-sm font-semibold",children:pe[c]}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1308",className:"text-xs opacity-70",children:["(",u.length," å¼µ)"]})]}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1310",className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:u.map(r=>e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1312",className:`bg-slate-700/50 rounded-lg overflow-hidden border group transition-all ${T?U.has(r.id)?"border-purple-500 ring-2 ring-purple-500/50 cursor-pointer":"border-slate-600 cursor-pointer hover:border-purple-400/50":"border-slate-600"}`,onClick:T?()=>q(i=>{const p=new Set(i);return p.has(r.id)?p.delete(r.id):p.add(r.id),p}):void 0,children:x?.id===r.id?e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1329",className:"p-3 space-y-2",children:[e.jsx("img",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1330",src:x.imageUrl,alt:"",className:"w-full h-32 object-contain bg-slate-800 rounded"}),e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1331",size:"sm",variant:"outline",onClick:()=>G.current?.click(),disabled:V,className:"w-full border-slate-500 text-slate-300 text-xs",children:[e.jsx(Be,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1332",className:"w-3 h-3 mr-1"}),V?"ä¸å³ä¸...":"æ´æåç"]}),e.jsx("input",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1334",ref:G,type:"file",accept:"image/*",className:"hidden",onChange:i=>Z(i,!0)}),e.jsx("select",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1335",value:x.planType,onCh
3ange:i=>N(p=>p&&{...p,planType:i.target.value}),className:"w-full bg-slate-700 border border-slate-600 text-white rounded px-2 py-1 text-xs",children:Object.entries(pe).map(([i,p])=>e.jsx("option",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1340",value:i,children:p},i))}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1342",value:x.blockName,onChange:i=>N(p=>p&&{...p,blockName:i.target.value}),placeholder:"座æ¸",className:"bg-slate-700 border-slate-600 text-white text-xs h-7"}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1343",value:x.floor,onChange:i=>N(p=>p&&{...p,floor:i.target.value}),placeholder:"æ¨å±¤",className:"bg-slate-700 border-slate-600 text-white text-xs h-7"}),e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1344",value:x.caption,onChange:i=>N(p=>p&&{...p,caption:i.target.value}),placeholder:"èªªææ¨é¡",className:"bg-slate-700 border-slate-600 text-white text-xs h-7"}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1345",className:"flex gap-1",children:[e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1346",size:"sm",onClick:W,disabled:m.isPending,className:"flex-1 bg-purple-600 hover:bg-purple-700 text-white text-xs",children:"å²å"}),e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1347",size:"sm",variant:"outline",onClick:()=>N(null),className:"flex-1 border-slate-600 text-slate-300 text-xs",children:"åæ¶"})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1353",className:"relative",children:[r.watermarkStatus==="pending"||r.watermarkStatus==="processing"?e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1356",className:"w-full h-36 bg-slate-800 flex flex-col items-center justify-center gap-2",children:[e.jsx(se,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1357",className:"w-8 h-8 text-amber-400 animate-spin"}),e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1358",className:"text-xs text-amber-400",children:"廿°´å°èçä¸..."})]}):r.watermarkStatus==="failed"&&r.id>0?e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1361",className:"w-full h-36 bg-slate-800 flex flex-col items-center justify-center gap-2 relative",children:[e.jsx("img",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1362",src:r.originalImageUrl||r.imageUrl,alt:r.caption??"",className:"w-full h-36 object-contain bg-slate-800 cursor-zoom-in hover:opacity-90 transition-opacity",onClick:()=>_((g??[]).findIndex(i=>i.id===r.id))}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1363",className:"absolute bottom-1 left-1 right-1 flex items-center gap-1",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1364",className:"flex-1 text-center text-xs bg-orange-500/80 text-white px-1 py-0.5 rounded",children:"廿°´å°å¤±æ"}),e.jsxs("button",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1365",onClick:()=>Y.mutate({floorPlanId:r.id}),disabled:Y.isPending,className:"text-xs bg-blue-500/80 hover:bg-blue-500 text-white px-1.5 py-0.5 rounded flex items-center gap-0.5 shrink-0",children:[e.jsx($e,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1370",className:"w-2.5 h-2.5"}),"é試"]})]})]}):e.jsx("img",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1375",src:r.imageUrl,alt:r.caption??"",className:`w-full h-36 object-contain bg-slate-800 hover:opacity-90 transition-opacity ${T?"cursor-pointer":"cursor-zoom-in"}`,onClick:i=>{if(T){i.stopPropagation();return}_((g??[]).findIndex(p=>p.id===r.id))}}),T&&e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1379",className:"absolute top-1 right-1",children:e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1380",className:`w-5 h-5 rounded border-2 flex items-center justify-center ${U.has(r.id)?"bg-purple-500 border-purple-500":"bg-slate-800/70 border-slate-400"}`,children:U.has(r.id)&&e.jsx("svg",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1386",className:"w-3 h-3 text-white",f
3ill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:e.jsx("path",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1387",strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})})})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1394",className:"p-2",children:[e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1395",className:"text-white text-xs font-medium truncate",children:r.caption||"æ æ¨é¡"}),r.blockName&&e.jsxs("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1396",className:"text-slate-400 text-xs",children:[r.blockName,r.floor?` · ${r.floor}`:""]}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1397",className:"flex gap-1 mt-2",children:r.id>0?e.jsxs(e.Fragment,{children:[e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1400",size:"sm",variant:"ghost",onClick:()=>N({id:r.id,planType:r.planType,blockName:r.blockName??"",floor:r.floor??"",caption:r.caption??"",imageUrl:r.imageUrl,sequence:r.sequence!=null?String(r.sequence):""}),className:"flex-1 text-blue-400 hover:text-blue-300 hover:bg-blue-400/10 text-xs h-7",children:[e.jsx(Le,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1406",className:"w-3 h-3 mr-1"}),"編輯"]}),e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1408",size:"sm",variant:"ghost",onClick:()=>v.mutate({id:r.id}),disabled:v.isPending,className:"flex-1 text-red-400 hover:text-red-300 hover:bg-red-400/10 text-xs h-7",children:[e.jsx(ge,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1415",className:"w-3 h-3 mr-1"}),"åªé¤"]})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1420",className:"text-xs text-slate-500 px-1 py-1",children:"ä¾èªå°å
¥"}),e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1421",size:"sm",variant:"ghost",onClick:()=>K.mutate({id:-r.id}),disabled:K.isPending,className:"flex-1 text-red-400 hover:text-red-300 hover:bg-red-400/10 text-xs h-7",children:[e.jsx(ge,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1428",className:"w-3 h-3 mr-1"}),"åªé¤"]})]})})]})]})},r.id))})]},c)})}),e.jsx(le,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1445",children:e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1446",variant:"outline",onClick:F,className:"border-slate-600 text-slate-300 hover:bg-slate-700",children:"éé"})})]})}),a!==null&&g&&g.length>0&&(()=>{const c=g[a],u=c.watermarkStatus==="failed"&&c.originalImageUrl||c.imageUrl,E=()=>_(i=>i!==null?(i-1+g.length)%g.length:null),r=()=>_(i=>i!==null?(i+1)%g.length:null);return e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1460",className:"fixed inset-0 z-[200] bg-black/90 flex items-center justify-center",onClick:()=>_(null),onKeyDown:i=>{i.key==="Escape"&&_(null),i.key==="ArrowLeft"&&E(),i.key==="ArrowRight"&&r()},tabIndex:0,ref:i=>i?.focus(),children:[e.jsx("button",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1472",className:"absolute top-4 right-4 text-white bg-black/50 hover:bg-black/80 rounded-full w-10 h-10 flex items-center justify-center text-xl z-10",onClick:i=>{i.stopPropagation(),_(null)},children:e.jsx(we,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1476",className:"w-5 h-5"})}),g.length>1&&e.jsx("button",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1480",className:"absolute left-4 top-1/2 -translate-y-1/2 text-white bg-black/50 hover:bg-black/80 rounded-full w-10 h-10 flex items-center justify-center z-10",onClick:i=>{i.stopPropagation(),E()},children:e.jsx(ye,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1484",className:"w-5 h-5 rotate-90"})}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1488",className:"max-w-[90vw] max-h-[90vh] flex flex-col items-center gap-3",onClick:i=>i.stopPropagation(),children:[e.jsx("img",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1489",src:u,alt:c.caption??"",className:"max-w-[90vw] max-h-[80vh] object-contain rounded-lg shadow-2xl"}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1494",className:"text-white text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1495",className:"font-medium",children:c.caption||"ç¡æ¨é¡"}),c.blockName&&e.jsxs("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1496",className:"text-slate-400 text-sm",children:[c.blockName,c.floor?` · ${c.floor}`:""]}),e.jsxs("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1497",className:"text-slate-400 text-xs mt-1",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1498",className:"bg-slate-700 px-1.5 py-0.5 rounded mr-2",children:pe[c.planType]??c.planType}),a+1," / ",g.length]})]})]}),g.length>1&&e.jsx("button",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1505",className:"absolute right-4 top-1/2 -translate-y-1/2 text-white bg-black/50 hover:bg-black/80 rounded-full w-10 h-10 flex items-center justify-center z-10",onClick:i=>{i.stopPropagation(),r()},children:e.jsx(ye,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1509",className:"w-5 h-5 -rotate-90"})})]})})()]})}function vs({brochureId:B,onSelect:b,onClose:F}){const{data:y,isLoading:x}=f.admin.brochures.listFloorPlans.useQuery({brochureId:B});return e.jsx(ae,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1533",open:!0,onOpenChange:F,children:e.jsxs(te,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1534",className:"bg-slate-800 border-slate-700 text-white max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsx(ce,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1535",children:e.jsxs(re,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1536",className:"text-white flex items-center gap-2",children:[e.jsx(Ae,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1537",className:"w-5 h-5 text-amber-500"}),"鏿å°é¢åç"]})}),x?e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1542",className:"py-8 flex justify-center",children:e.jsx(se,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1543",className:"w-8 h-8 text-amber-500 animate-spin"})}):!y||y.length===0?e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1546",className:"py-8 text-center text-slate-400",children:[e.jsx(Ae,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1547",className:"w-12 h-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1548",children:"æ¤æ¨æ¸å°æªä¸å³ä»»ä½åç"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1549",className:"text-xs mt-1",children:"è«å
å¨ãå¹³é¢å管çãä¸ä¸å³åçï¼æééã徿¸ææºå°å
¥ãå°å
¥åçã"})]}):e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1552",className:"grid grid-cols-3 gap-3",children:y.map(N=>e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1554",className:"cursor-pointer rounded-lg overflow-hidden border-2 border-transparent hover:border-amber-500 transition-all group",onClick:()=>b(N.imageUrl),children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1559",className:"relative",children:[e.jsx("img",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1560",src:N.imageUrl,alt:N.caption??"",className:"w-full h-28 object-cover"}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1561",className:"absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-all flex items-center justify-center",children:e.jsx(Re,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1562",className:"w-8 h-8 text-white opacity-0 group-hover:opacity-100 transition-all"})}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1564",className:"absolute top-1 left-1",children:e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1565",className:"bg-slate-900/80 text-white text-xs px-1.5 py-0.5 rounded",children:N.planType==="unit_plan"?"æ¶åå":N.planType==="floor_plan"?"å¹³é¢å":N.planType==="brochure_main"?"æ¨æ¸ä¸»å":"å
¶ä»"})})]}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1570",className:"p-1.5 bg-slate-700",children:e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1571",className:"text-white text-xs truncate",children:N.caption||"ç¡æ¨é¡"})})]},N.id))}),e.jsx(le,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1577",children:e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1578",variant:"outline",onClick:F,className:"border-slate-600 text-slate-300 hover:bg-slate-700",children:"åæ¶"})})]})})}function fs({onClose:B,onImported:b,onImportedWithId:F,initialTitle:y}){const[x,N]=l.useState("malimalihome"),[j,k]=l.useState(""),[D,I]=l.useState("input"),[a,_]=l.useState(null),[V,Q]=l.useState(!0),[T,O]=l.useState(new Set),[U,q]=l.useState(!1),[w,G]=l.useState(0),g=l.useRef(null),[L,R]=l.useState([]),[z,m]=l.useState(null),[v,K]=l.useState(!1);function $(t){G(0);const A=90/(Math.ceil(t/8)*1.2*10);g.current=setInterval(()=>{G(H=>{const X=H+A;return X>=90?90:X})},100)}function Y(t){g.current&&(clearInterval(g.current),g.current=null),t&&G(100)}l.useEffect(()=>()=>{g.current&&clearInterval(g.current)},[]),l.useEffect(()=>{y&&k(y)},[y]);const Z=f.useUtils(),J=f.admin.brochures.previewImport.useMutation({onSuccess:async t=>{const h=t;if(_(h),O(new Set(h.images.map((A,H)=>H))),m(null),R([]),I("preview"),h.name){K(!0);try{const A=await Z.admin.brochures.searchByName.fetch({name:h.name});A?.items?.length&&(R(A.items),m(A.items[0].id))}catch{}finally{K(!1)}}},onError:t=>{o.error(`æå失æï¼${t.message}`)}}),W=f.admin.brochures.mergeImport.useMutation({onSuccess:t=>{Y(!0);const h=t;o.success(h.message||"åä½µæåï¼"),setTimeout(()=>{b(),F&&h.brochureId&&F(h.brochureId)},800)},onError:t=>{Y(!1),o.error(`å併失æï¼${t.message}`),I("preview")}}),c=f.admin.brochures.confirmImport.useMutation({onSuccess:t=>{Y(!0);const h=t;o.success(h.message||"å°å
¥æåï¼"),setTimeout(()=>{b(),F&&h.brochureId&&F(h.brochureId)},800)},onError:t=>{Y(!1),o.error(`å°å
¥å¤±æï¼${t.message}`),I("preview")}}),u={malimalihome:"輸å
¥ URLï¼https://www.malimalihome.net/building/detail/2ï¼ãç´æ¸å IDï¼å¦ 2ï¼ææ¨ç¤å稱ï¼å¦ ç¿æéå³°ï¼",centanet:"https://mo.centanet.com/EstatesHandBook/details?id=25e71208-09ea-c95b-e368-08de83d09c02",url:"輸å
¥ä»»ææ¨æ¸é é¢ URL"};
3function E(){if(!j.trim()){o.error("è«è¼¸å
¥ URL æ ID");return}J.mutate({source:x,url:j.trim()})}function r(t){O(h=>{const A=new Set(h);return A.has(t)?A.delete(t):A.add(t),A})}function i(){if(!a)return;const t=a.images.filter((A,H)=>T.has(H)),h=t.map(A=>({url:A.url,caption:A.caption??"",planType:A.planType??"floor_plan"}));I("importing"),$(t.length),z!==null?W.mutate({targetBrochureId:z,source:a.source,name:a.name,address:a.address,developer:a.developer,blockCount:a.blockCount,totalUnits:a.totalUnits,floors:a.floors,completionYear:a.completionYear,privateParking:a.privateParking!=null?String(a.privateParking):void 0,motorcycleParking:a.motorcycleParking!=null?String(a.motorcycleParking):void 0,managementFee:a.managementFee,minArea:a.minArea,maxArea:a.maxArea,description:a.description,sellingPoints:a.sellingPoints,estateInfo:a.estateInfo,images:h}):c.mutate({source:a.source,name:a.name,address:a.address,developer:a.developer,blockCount:a.blockCount,totalUnits:a.totalUnits,floors:a.floors,completionYear:a.completionYear,privateParking:a.privateParking!=null?String(a.privateParking):void 0,motorcycleParking:a.motorcycleParking!=null?String(a.motorcycleParking):void 0,managementFee:a.managementFee,minArea:a.minArea,maxArea:a.maxArea,description:a.description,sellingPoints:a.sellingPoints,estateInfo:a.estateInfo,images:h,createNewBrochure:!0})}const p={brochure_main:"æ¨æ¸ä¸»å",floor_plan:"å¹³é¢å",unit_plan:"æ¶åå",facility_photo:"å¨éè¨æ½",location_map:"ä½ç½®å",other:"å
¶ä»"};return e.jsx(ae,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1835",open:!0,onOpenChange:B,children:e.jsxs(te,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1836",className:"bg-slate-800 border-slate-700 text-white max-w-3xl max-h-[90vh] overflow-y-auto",children:[e.jsx(ce,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1837",children:e.jsxs(re,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1838",className:"text-white flex items-center gap-2",children:[e.jsx(je,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1839",className:"w-5 h-5 text-amber-500"}),"徿¸ææºå°å
¥æ¨æ¸"]})}),D==="input"&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1845",className:"space-y-5 py-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1847",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1848",className:"text-slate-300 mb-2 block",children:"é¸ææ¸æä¾æº"}),e.jsx(ms,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1849",value:x,onValueChange:t=>{N(t),k(t==="centanet"?"https://mo.centanet.com/EstatesHandBook/details?id=25e71208-09ea-c95b-e368-08de83d09c02":"")},children:e.jsxs(xs,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1850",className:"bg-slate-700 w-full",children:[e.jsx(fe,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1851",value:"malimalihome",className:"flex-1 text-xs data-[state=active]:bg-amber-500 data-[state=active]:text-black",children:"æ¾³éé¦é¸å°ç¢"}),e.jsx(fe,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1854",value:"centanet",className:"flex-1 text-xs data-[state=active]:bg-amber-500 data-[state=active]:text-black",children:"ä¸åå°ç¢æ¾³é"}),e.jsx(fe,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1857",value:"url",className:"flex-1 text-xs data-[state=active]:bg-amber-500 data-[state=active]:text-black",children:"èªå®ç¾© URL"})]})})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1865",className:"bg-slate-700/50 rounded-lg p-3 text-sm text-slate-300 space-y-1",children:[x==="malimalihome"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1868",className:"font-medium text-amber-400",children:"æ¾³éé¦é¸å°ç¢"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1869",children:"æ¯ææåï¼æ¨ç¤å稱ãå°åãç¼å±åãéé表ï¼å»ºç¯é¢ç©/實ç¨é¢ç©ï¼ãå¹³é¢åï¼éæ¨é¡ï¼"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1870",className:"text-slate-400 text-xs",children:"URL æ ¼å¼ï¼https://www.malimalihome.net/building/detail/[ID]ï¼æè¼¸å
¥ç´æ¸å IDï¼æè¼¸å
¥æ¨ç¤å稱æç´¢"})]}),x==="centanet"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1875",className:"font-medium text-amber-400",children:"ä¸åå°ç¢æ¾³é"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1876",children:"æ¯ææåï¼æ¨ç¤å稱ãååãå°åã座æãå®ä½æ¸ã層æ¸ã管çè²»ãè»ä½æ¸ãå
¥ä¼æ¥æãå±èç°¡ä»ãå±èè³£é»ãå±èä¿¡æ¯è¡¨æ ¼ãæ¶ååãå¨éè¨æ½åãä½ç½®åãææå"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1877",className:"text-slate-400 text-xs",children:"URL æ ¼å¼ï¼https://mo.centanet.com/EstatesHandBook/details?id=[UUID]"})]}),x==="url"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1882",className:"font-medium text-amber-400",children:"èªå®ç¾© URL"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1883",children:"輸å
¥ä»»ææ¨æ¸é é¢ URLï¼ç³»çµ±å°å試æååºæ¬è³æååç"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1889",children:[e.jsx(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1890",className:"text-slate-300 mb-2 block",children:x==="malimalihome"?"æ¨ç¤ URLãID æå稱":"æ¨ç¤é é¢ URL"}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1893",className:"flex gap-2",children:[e.jsx(P,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1894",value:j,onChange:t=>k(t.target.value),placeholder:u[x],className:"bg-slate-700 border-slate-600 text-white placeholder:text-slate-500 flex-1",onKeyDown:t=>t.key==="Enter"&&E()}),e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1901",onClick:E,disabled:J.isPending,className:"bg-amber-500 hover:bg-amber-600 text-black font-semibold whitespace-nowrap",children:J.isPending?e.jsxs(e.Fragment,{children:[e.jsx(se,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1907",className:"w-4 h-4 mr-2 animate-spin"}),"æåä¸..."]}):e.jsxs(e.Fragment,{children:[e.jsx(cs,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1909",className:"w-4 h-4 mr-2"}),"é 覽æå"]})})]})]}),x==="malimalihome"&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1917",className:"text-xs text-slate-400",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1918",children:"å¿«éç¯ä¾ï¼"}),[{id:"2",name:"ä¸ç´è±ªåº"},{id:"5",name:"åç£å£¹è"},{id:"10",name:"ç°å®è±ªåº"}].map(t=>e.jsx("button",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1920",onClick:()=>k(`https://www.malimalihome.net/building/detail/${t.id}`),className:"ml-2 text-amber-400 hover:text-amber-300 underline",children:t.name},t.id))]})]}),D==="preview"&&a&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1934",className:"space-y-4 py-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1936",className:"bg-slate-700/50 rounded-lg p-4 space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1937",className:"flex items-center justify-between",children:[e.jsxs("h3",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1938",className:"font-semibold text-amber-400 flex items-center gap-2",children:[e.jsx(_e,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1939",className:"w-4 h-4"}),"æåçµæé 覽"]}),e.jsxs("a",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1942",href:a.sourceUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-slate-400 hover:text-amber-400 flex items-center gap-1",children:[e.jsx(rs,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1943",className:"w-3 h-3"}),"æ¥çåé é¢"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1946",className:"grid grid-cols-2 gap-2 text-sm",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1947",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1947",className:"text-slate-400",children:"æ¨ç¤å稱ï¼"}),e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1947",className:"text-white font-medium",children:a.name})]}),a.address&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1948",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1948",className:"text-slate-400",children:"å°åï¼"}),e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1948",className:"text-white",children:a.address})]}),a.developer&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1949",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1949",className:"text-slate-400",children:"ç¼å±åï¼"}),e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1949",className:"text-white",children:a.developer})]}),a.blockCount&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1950",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1950",className:"text-slate-400",children:"座æ¸ï¼"}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1950",className:"text-white",children:[a.blockCount," 座"]})]}),a.totalUnits&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1951",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1951",className:"text-slate-400",children:"總å®ä½ï¼"}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1951",className:"text-white",children:[a.totalUnits," å"]})]}),a.floors&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1952",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1952",className:"text-slate-400",children:"æ¨å±¤ï¼"}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1952",className:"text-white",children:[a.floors," 層"]})]}),a.completionYear&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1953",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1953",className:"text-slate-400",children:"å
¥ä¼ï¼"}),e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1953",className:"text-white",children:a.completionYear})]}),a.privateParking&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1954",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1954",className:"text-slate-400",children:"ç§å®¶è»ä½ï¼"}),e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1954",className:"text-white",children:a.privateParking})]}),a.motorcycleParking&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1955",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1955",className:"text-slate-400",children:"é»å®è»ä½ï¼"}),e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1955",className:"text-white",children:a.motorcycleParking})]}),a.managementFee&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1956",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1956",className:"text-slate-400",children:"管çè²»ï¼"}),e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1956",className:"text-white",children:a.managementFee})]}),(a.minArea||a.maxArea)&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1958",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1958",className:"text-slate-400",children:"é¢ç©ï¼"}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1958",className:"text-white",children:[a.minArea,"â",a.maxArea," å"]})]})]}),a.description&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1964",className:"bg-slate-600/40 rounded-lg p-3 text-sm",children:[e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1965",className:"text-amber-400 font-medium mb-1",children:"å±èç°¡ä»"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1966",className:"text-slate-300 text-xs leading-relaxed line-clamp-4",children:a.description})]}),a.sellingPoints&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1972",className:"bg-slate-600/40 rounded-lg p-3 text-sm",children:[e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1973",className:"text-amber-400 font-medium mb-1",children:"å±èè³£é»"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1974",className:"text-slate-300 text-xs leading-relaxed line-clamp-4",children:a.sellingPoints})]}),a.estateInfo&&(()=>{try{const t=JSON.parse(a.estateInfo),h=Object.entries(t).filter(([,A])=>A&&A!=="-");return h.length===0?null:e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1985",className:"bg-slate-600/40 rounded-lg p-3",children:[e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:198
36",className:"text-amber-400 font-medium mb-2 text-sm",children:"å±èä¿¡æ¯"}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1987",className:"grid grid-cols-2 gap-x-4 gap-y-1",children:h.map(([A,H])=>e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1989",className:"text-xs",children:[e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1990",className:"text-slate-400",children:[A,"ï¼"]}),e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:1991",className:"text-slate-200",children:String(H)})]},A))})]})}catch{return null}})(),a.units&&a.units.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2002",children:[e.jsxs("button",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2003",onClick:()=>q(!U),className:"flex items-center gap-1 text-xs text-amber-400 hover:text-amber-300",children:[U?e.jsx(ls,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2007",className:"w-3 h-3"}):e.jsx(ye,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2007",className:"w-3 h-3"}),"éé表 (",a.units.length," æ¢è¨é)"]}),U&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2011",className:"mt-2 max-h-40 overflow-y-auto",children:[e.jsxs("table",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2012",className:"w-full text-xs",children:[e.jsx("thead",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2013",children:e.jsxs("tr",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2014",className:"text-slate-400 border-b border-slate-600",children:[e.jsx("th",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2015",className:"text-left py-1",children:"座"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2016",className:"text-left py-1",children:"æ¨å±¤"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2017",className:"text-left py-1",children:"å®ä½"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2018",className:"text-left py-1",children:"建ç¯é¢ç©"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2019",className:"text-left py-1",children:"實ç¨é¢ç©"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2020",className:"text-left py-1",children:"éé"})]})}),e.jsx("tbody",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2023",children:a.units.slice(0,50).map((t,h)=>e.jsxs("tr",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2025",className:"border-b border-slate-700/50 text-slate-300",children:[e.jsx("td",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2026",className:"py-1",children:t.block||"â"}),e.jsx("td",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2027",className:"py-1",children:t.floor||"â"}),e.jsx("td",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2028",className:"py-1",children:t.unit||"â"}),e.jsx("td",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2029",className:"py-1",children:t.grossArea?`${t.grossArea} å`:"â"}),e.jsx("td",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2030",className:"py-1",children:t.salableArea?`${t.salableArea} å`:"â"}),e.jsx("td",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2031",className:"py-1",children:t.roomType||"â"})]},h))})]}),a.units.length>50&&e.jsxs("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2036",className:"text-xs text-slate-500 mt-1",children:["åªé¡¯ç¤ºå 50 æ¢ï¼å
± ",a.units.length," æ¢"]})]})]})]}),a.images.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2045",className:"space-y-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2046",className:"flex items-center justify-between",children:[e.jsxs(S,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2047",className:"text-slate-300",children:["鏿è¦å°å
¥çåçï¼",T.size,"/",a.images.length," å·²é¸ï¼"]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2050",className:"flex gap-2",children:[e.jsx("button",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2051",onClick:()=>O(new Set(a.images.map((t,h)=>h))),className:"text-xs text-amber-400 hover:text-amber-300",children:"å
¨é¸"}),e.jsx("button",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2052",onClick:()=>O(new Set),className:"text-xs text-slate-400 hover:text-slate-300",children:"å
¨ä¸é¸"})]})]}),T.size>40&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2057",className:"flex items-start gap-2 bg-amber-900/30 border border-amber-700/50 rounded-lg px-3 py-2",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2058",className:"text-amber-400 text-sm mt-0.5",children:"â ï¸"}),e.jsxs("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2059",className:"text-xs text-amber-300",children:["å»ºè°æ¯æ¬¡é¸æ ",e.jsx("strong",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2060",children:"40 張以å
§"}),"以é¿å
è¶
æãç®åå·²é¸ ",T.size," å¼µï¼å¯åå
©æ¹å°å
¥ï¼ç¬¬ä¸æ¹å°å
¥å¾ï¼åæ¶å¾é¸ãèªååµå»ºæ°æ¨æ¸ã䏦鏿å©é¤åç追å å°å
¥å°å䏿¨æ¸ã"]})]}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2064",className:"grid grid-cols-3 gap-2 max-h-64 overflow-y-auto",children:a.images.map((t,h)=>e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2066",onClick:()=>r(h),className:`relative cursor-pointer rounded-lg overflow-hidden border-2 transition-all ${T.has(h
3)?"border-amber-500":"border-slate-600 opacity-50"}`,children:[e.jsx("img",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2073",src:t.url,alt:t.caption||"",className:"w-full h-24 object-cover"}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2074",className:"absolute inset-0 bg-black/40 flex items-end p-1",children:e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2075",className:"text-white text-xs leading-tight line-clamp-2",children:t.caption||"ç¡æ¨é¡"})}),T.has(h)&&e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2078",className:"absolute top-1 right-1 bg-amber-500 rounded-full w-5 h-5 flex items-center justify-center",children:e.jsx(Re,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2079",className:"w-3 h-3 text-black"})}),t.planType&&e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2083",className:"absolute top-1 left-1 bg-black/60 rounded px-1 py-0.5 text-xs text-slate-300",children:p[t.planType]||t.planType})]},h))})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2094",className:"bg-slate-700/50 rounded-lg p-4 space-y-3",children:[e.jsx("h3",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2095",className:"text-sm font-medium text-slate-300",children:"å°å
¥é¸é
"}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2098",className:"flex items-start gap-2 bg-green-900/30 border border-green-700/50 rounded-lg p-3",children:[e.jsx(is,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2099",className:"w-4 h-4 text-green-400 mt-0.5 flex-shrink-0"}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2100",children:[e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2101",className:"text-sm text-green-300 font-medium",children:"å·²èªåå»é¤æ°´å°"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2102",className:"text-xs text-slate-400 mt-0.5",children:"ä¸åå°ç¢ï¼èªåå»é¤ URL åæ¸æ°´å°ï¼?w=xxxï¼ï¼ç´æ¥ä½¿ç¨ååãmalimalihomeï¼ç´æ¥ä½¿ç¨åå§é«æ¸
åçã"})]})]}),v?e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2110",className:"flex items-center gap-2 text-xs text-slate-400",children:[e.jsx(se,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2111",className:"w-3 h-3 animate-spin"}),"æ£å¨æç´¢å忍æ¸..."]}):L.length>0?e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2115",className:"space-y-2",children:[e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2116",className:"flex items-center gap-2",children:e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2117",className:"text-xs font-medium text-amber-400",children:["â ï¸ ç¼ç¾ ",L.length," æ¬å忍æ¸ï¼è«é¸æèçæ¹å¼ï¼"]})}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2120",className:"space-y-1.5",children:[L.map(t=>e.jsxs("label",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2122",className:`flex items-center gap-3 p-2.5 rounded-lg cursor-pointer border transition-all ${z===t.id?"border-amber-500 bg-amber-900/20":"border-slate-600 bg-slate-700/30 hover:border-slate-500"}`,children:[e.jsx("input",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2130",type:"radio",name:"merge-target",checked:z===t.id,onChange:()=>m(t.id),className:"accent-amber-500"}),t.coverImage&&e.jsx("img",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2138",src:t.coverImage,alt:"",className:"w-10 h-10 object-cover rounded flex-shrink-0"}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2140",className:"flex-1 min-w-0",children:[e.jsxs("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2141",className:"text-sm text-white font-medium",children:["åä½µå°ï¼",t.title]}),e.jsxs("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2142",className:"text-xs text-slate-400 truncate",children:[t.developer||""," ",t.address||""]}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2143",className:"text-xs text-slate-500",children:"å°å
¥ä¸éè¤åç + è£é½ç©ºç½æ¬ä½"})]})]},t.id)),e.jsxs("label",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2148",className:`flex items-center gap-3 p-2.5 rounded-lg cursor-pointer border transition-all ${z===null?"border-blue-500 bg-blue-900/20":"border-slate-600 bg-slate-700/30 hover:border-slate-500"}`,children:[e.jsx("input",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2155",type:"radio",name:"merge-target",checked:z===null,onChange:()=>m(null),className:"accent-blue-500"}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2162",className:"flex-1",children:[e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2163",className:"text-sm text-white font-medium",children:"åµå»ºå
¨æ°æ¨æ¸"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2164",className:"text-xs text-slate-400",children:"å³ä½¿å·²æå忍æ¸ï¼ä»åµå»ºæ°è¨é"})]})]})]})]}):e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2170",className:"flex items-center gap-2 text-xs text-green-400",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2171",children:"â"})," æªç¼ç¾å忍æ¸ï¼å°åµå»ºæ°æ¨æ¸"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2176",className:"flex gap-2 justify-between",children:[e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2177",variant:"outline",onClick:()=>I("input"),className:"border-slate-600 text-slate-300 hover:bg-slate-700",children:"â è¿åä¿®æ¹"}),e.jsxs(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2184",onClick:i,disabled:T.size===0,className:"bg-amber-500 hover:bg-amber-600 text-black font-semibold",children:[e.jsx(je,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2189",className:"w-4 h-4 mr-2"}),"確èªå°å
¥ ",T.size," å¼µåç"]})]})]}),D==="importing"&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2197",className:"py-10 flex flex-col items-center gap-5 px-4",children:[e.jsx(se,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2198",className:"w-12 h-12 text-amber-500 animate-spin"}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2199",className:"w-full space-y-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2200",className:"flex justify-between text-sm",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2201",className:"text-white font-medium",children:"æ£å¨å°å
¥æ¨æ¸è³æ..."}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2202",className:"text-amber-400 font-mono",children:[Math.round(w),"%"]})]}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2205",className:"w-full bg-slate-700 rounded-full h-3 overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2206",className:"h-full bg-gradient-to-r from-amber-500 to-amber-400 rounded-full transition-all duration-100",style:{width:`${w}%`}})}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2211",className:"text-slate-400 text-xs text-center",children:w<90?"並è¡ä¸è¼åç並ä¸å³è³ Go853 CDNï¼æ¯æ¹ 8 張並è¡ï¼...":w<100?"åçä¸å³å®æï¼æ£å¨å¯«å
¥æ¸æåº«...":"å°å
¥å®æï¼"})]})]}),D==="input"&&e.jsx(le,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2223",children:e.jsx(d,{"data-loc":"client/src/pages/admin/AdminBrochures.tsx:2224",variant:"outline",onClick:B,className:"border-slate-600 text-slate-300 hover:bg-slate-700",children:"åæ¶"})})]})})}export{la as default};
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.