PageSourceSearch

https://ninefengshui.ai/_next/static/chunks/5249-bc50ac97139b391e.js

js ninefengshui.ai collected 2026-10-05 12:34:21 UTC 27,461 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5249],{25249:(e,t,l)=>{l.r(t),l.d(t,{NormalizedGrid:()=>L});var s=l(91700),a=l(59444),n=l(65933),r=l(82467),i=l(5661),o=l(14399),d=l(23379),c=l(84227),h=l(93897),m=l(62036),x=l(66859),p=l(96624),u=l(11192),f=l(62851),g=l(70099),b=l(3083),j=l(28024);let w={kitchen:r.A,toilet:i.A};function v(e){let t,l,n,r,d=(0,a.c)(6),{className:c}=e;return d[0]!==c?(t=(0,j.cn)("flex items-center gap-1",c),d[0]=c,d[1]=t):t=d[1],d[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,s.jsx)(o.A,{className:"w-5 h-5"}),n=(0,s.jsx)(i.A,{className:"w-4 h-4"}),d[2]=l,d[3]=n):(l=d[2],n=d[3]),d[4]!==t?(r=(0,s.jsxs)("div",{className:t,children:[l,n]}),d[4]=t,d[5]=r):r=d[5],r}function N(e){let t,l,n,o,d=(0,a.c)(6),{className:c}=e;return d[0]!==c?(t=(0,j.cn)("flex items-center gap-1",c),d[0]=c,d[1]=t):t=d[1],d[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,s.jsx)(r.A,{className:"w-5 h-5"}),n=(0,s.jsx)(i.A,{className:"w-4 h-4"}),d[2]=l,d[3]=n):(l=d[2],n=d[3]),d[4]!==t?(o=(0,s.jsxs)("div",{className:t,children:[l,n]}),d[4]=t,d[5]=o):o=d[5],o}function y(e){let t,l,n,i,d=(0,a.c)(6),{className:c}=e;return d[0]!==c?(t=(0,j.cn)("flex items-center gap-1",c),d[0]=c,d[1]=t):t=d[1],d[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,s.jsx)(o.A,{className:"w-5 h-5"}),n=(0,s.jsx)(r.A,{className:"w-4 h-4"}),d[2]=l,d[3]=n):(l=d[2],n=d[3]),d[4]!==t?(i=(0,s.jsxs)("div",{className:t,children:[l,n]}),d[4]=t,d[5]=i):i=d[5],i}let M={kitchen:r.A,toilet:i.A,bedroom:e=>(0,s.jsx)(o.A,{...e}),entrance:d.A,livingRoom:c.A},k={nw:{row:0,col:0},n:{row:0,col:1},ne:{row:0,col:2},w:{row:1,col:0},c:{row:1,col:1},e:{row:1,col:2},sw:{row:2,col:0},s:{row:2,col:1},se:{row:2,col:2}},$=Object.fromEntries(Object.entries(k).map(([e,t])=>[`${t.row},${t.col}`,e])),C=["top","bottom","left","right"],_=e=>[...e].sort((e,t)=>C.indexOf(e)-C.indexOf(t)),X=e=>"number"==typeof e&&e>0&&e<1?e:2===e?1/3:2/3,z={nw:{symbol:"☰",zhName:"乾",enName:"Qian"},n:{symbol:"☵",zhName:"坎",enName:"Kan"},ne:{symbol:"☶",zhName:"艮",enName:"Gen"},w:{symbol:"☱",zhName:"兑",enName:"Dui"},c:{symbol:"☯",zhName:"中",enName:"Center"},e:{symbol:"☳",zhName:"震",enName:"Zhen"},sw:{symbol:"☷",zhName:"坤",enName:"Kun"},s:{symbol:"☲",zhName:"离",enName:"Li"},se:{symbol:"☴",zhName:"巽",enName:"Xun"}};function Y(e){let t,l,n,r,i,o,d,c,h=(0,a.c)(9),{className:m}=e;return h[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,s.jsx)("path",{d:"M3 10.5L12 3l9 7.5"}),l=(0,s.jsx)("path",{d:"M5 9v11h4"}),n=(0,s.jsx)("path",{d:"M15 20h4V9"}),r=(0,s.jsx)("path",{d:"M5 20h4"}),i=(0,s.jsx)("path",{d:"M15 20h4"}),o=(0,s.jsx)("path",{d:"M10 17v3",strokeDasharray:"2 2"}),d=(0,s.jsx)("path",{d:"M14 17v3",strokeDasharray:"2 2"}),h[0]=t,h[1]=l,h[2]=n,h[3]=r,h[4]=i,h[5]=o,h[6]=d):(t=h[0],l=h[1],n=h[2],r=h[3],i=h[4],o=h[5],d=h[6]),h[7]!==m?(c=(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:m,children:[t,l,n,r,i,o,d]}),h[7]=m,h[8]=c):c=h[8],c}function A(e,t,l=0){let s=(0,f.Jf)(e,t,l),a=p.DG[s];return{symbol:a.trigram,zhName:a.nameZh.replace("宫",""),enName:a.nameEn.replace(" Palace","")}}function L({shape:e,traceImage:t=null,displayAspectRatio:l=null,traceFit:a="contain",roomLayout:r={},onCellClick:i,selectable:d=!1,selectedRoom:c=null,locale:p,fillLevels:f={},fillLevelVariants:C={},fillLevelDepths:L={},onFillLevelClick:B,showFillLevelSelector:R=!1,autoProtrudingPalaces:O=new Set,rotation:P=0,onRotateLeft:D,onRotateRight:F,showRotationControls:S=!1,showTrigrams:E=!1,northOffset:W=0,onNorthOffsetChange:V,showRoomTypeSelector:T=!1,cellRoomAssignment:G={},onCellRoomClick:H,showBedroomAssignmentSelector:I=!1,bedroomAssignments:K={},activeBedroomAssignment:Z=null,onBedroomAssignmentClick:J,showRoomDisplay:Q=!1,showTrigramsWithRooms:q=!1,showMainDoorSelector:U=!1,mainDoor:ee=null,onSelectMainDoor:et,disableMainDoorSelection:el=!1,mainDoorDisplayPalace:es=null,mainDoorDisplayIsConvex:ea=!1,showNorthIndicator:en,hideNorthIndicator:er=!1,breathingHint:ei,showBreathingHint:eo=!0,forceMinSize:ed,maxSize:ec,staticGridContent:eh}){let em,ex,ep,eu,ef,eg,eb,ej,ew,ev,eN,ey,{t:eM}=(0,g.B)(p),ek=e.effectiveBbox||{minRow:0,maxRow:2,minCol:0,maxCol:2,width:3,height:3},e$=["nw","n","ne","e","c","se","s","sw","w"],eC=Object.values(e.cells).filter(e=>"convexCorner"===e.role).map(e=>e.id),e_=eC.length>0,eX=ed??180,ez=ec??380,eY=Object.values(e.cells).filter(e=>"convexCorner"===e.role),eA=t=>"c"===t?[]:e.convexCells[t]?.outwardEdges??[],eL=eY.some(e=>{let t=eA(e.id);return t.length>
10?t.includes("left"):k[e.id].col<ek.minCol}),eB=eY.some(e=>{let t=eA(e.id);return t.length>0?t.includes("right"):k[e.id].col>ek.maxCol}),eR=eY.some(e=>{let t=eA(e.id);return t.length>0?t.includes("top"):k[e.id].row<ek.minRow}),eO=eY.some(e=>{let t=eA(e.id);return t.length>0?t.includes("bottom"):k[e.id].row>ek.maxRow}),eP=e=>{let t,l="protruding"===f[e],s=1===eA(e).length,a="number"==typeof(t=L[`convex_${e}`])&&Number.isFinite(t)&&t>0?t>=1?t:Math.max(.1,t):0;return R?a>0?a:1.5:l&&s?1.5+a:a>0?a:1.5},eD=Math.max(0,...eY.filter(e=>{let t=eA(e.id);return t.length>0?t.includes("left"):k[e.id].col<ek.minCol}).map(e=>eP(e.id))),eF=Math.max(0,...eY.filter(e=>{let t=eA(e.id);return t.length>0?t.includes("right"):k[e.id].col>ek.maxCol}).map(e=>eP(e.id))),eS=Math.max(0,...eY.filter(e=>{let t=eA(e.id);return t.length>0?t.includes("top"):k[e.id].row<ek.minRow}).map(e=>eP(e.id))),eE=Math.max(0,...eY.filter(e=>{let t=eA(e.id);return t.length>0?t.includes("bottom"):k[e.id].row>ek.maxRow}).map(e=>eP(e.id))),eW=ek.width,eV=ek.height;if(l&&Number.isFinite(l)&&l>0){let e,t;l>=1?(e=ez,t=ez/l):(t=ez,e=ez*l);let s=eX+24+2,a=Math.max(s/e,s/t,1);e*=a,t*=a;let n=26+ +(2+(+!!eR+ +!!eO)),r=(eX-2)/3,i=Math.max(r/(eu=(e-(26+ +(2+(+!!eL+ +!!eB))))/(3+eD+eF)),r/(ef=(t-n)/(3+eS+eE)),1);eu*=i,ef*=i,ex=3*eu+2,ep=3*ef+2}else{let e,t,l=eW/eV;l>=1?(e=ez,t=ez/l):(t=ez,e=ez*l),ex=Math.max(e,eX),ep=Math.max(t,eX),eu=(ex-2)/3,ef=(ep-2)/3}let eT=e=>{let t=k[e],l=eP(e);return t.col<ek.minCol||t.col>ek.maxCol?eu*l:t.row<ek.minRow||t.row>ek.maxRow?ef*l:Math.max(eu,ef)},eG=Math.max(0,...eY.filter(e=>{let t=eA(e.id);return t.length>0?t.includes("left"):k[e.id].col<ek.minCol}).map(e=>eT(e.id))),eH=Math.max(0,...eY.filter(e=>{let t=eA(e.id);return t.length>0?t.includes("right"):k[e.id].col>ek.maxCol}).map(e=>eT(e.id))),eI=Math.max(0,...eY.filter(e=>{let t=eA(e.id);return t.length>0?t.includes("top"):k[e.id].row<ek.minRow}).map(e=>eT(e.id))),eK=Math.max(0,...eY.filter(e=>{let t=eA(e.id);return t.length>0?t.includes("bottom"):k[e.id].row>ek.maxRow}).map(e=>eT(e.id))),eZ=eL?eG+1:0,eJ=eB?eH+1:0,eQ=eR?eI+1:0,eq=eO?eK+1:0,eU=ex+24+2+eZ+eJ,e0=ep+24+2+eQ+eq,e1="fill"===a?"object-fill":"object-contain",e2=l&&Number.isFinite(l)&&l>0?eU:Math.max(eU,e0),e3=l&&Number.isFinite(l)&&l>0?e0:Math.max(eU,e0),e5=e=>{let t,l,s,a,n,r,i,o,d,c,h,m=k[e],x=(l=13+(t=k[e]).col*(eu+1),s=13+t.row*(ef+1),a=f[e]||"full",r=(n=C[e])?_(n.split("+").filter(Boolean))[0]??null:null,i="partial"===a?X(L[e]):1,o=l,d=s,c=eu,h=ef,"partial"===a&&(("left"===r||"right"===r)&&(c=eu*i,"left"===r&&(o=l+eu-c)),("top"===r||"bottom"===r)&&(h=ef*i,"top"===r&&(d=s+ef-h))),{left:o,top:d,width:c,height:h}),p=eA(e),u=p.length>0?p.includes("top"):m.row<ek.minRow,g=p.length>0?p.includes("bottom"):m.row>ek.maxRow,b=p.length>0?p.includes("left"):m.col<ek.minCol,j=p.length>0?p.includes("right"):m.col>ek.maxCol,w=eP(e),v=b||j?eu*w:x.width,N=u||g?ef*w:x.height,y=u?12-N:g?13+3*(ef+1):x.top;return{left:(b?12-v:j?13+3*(eu+1):x.left)+(u||g?2:0),top:y+(b||j?2:0),width:v,height:N,isAboveBbox:u,isBelowBbox:g,isLeftOfBbox:b,isRightOfBbox:j}},e4=e_?(eg=13+ex,eb=13+ep,ej=13,ew=13,ev=eg,eN=eb,eC.forEach(e=>{let t=e5(e);ej=Math.min(ej,t.left),ew=Math.min(ew,t.top),ev=Math.max(ev,t.left+t.width),eN=Math.max(eN,t.top+t.height)}),{left:ej,top:ew,width:Math.max(1,ev-ej),height:Math.max(1,eN-ew)}):null,e9=(e,t=!1,l=!1,a=!1)=>{if(l)return{className:"",icon:null,label:null,isAutoProtruding:!1};let r=f[e]||"full";if("full"===r)return{className:t?"bg-fengshui-filled border-2 border-solid border-fengshui-filled text-white":"bg-fengshui-filled border-2 border-fengshui-filled text-white",icon:(0,s.jsx)(n.P.div,{initial:{opacity:0}
1,animate:{opacity:1},transition:{duration:.3},children:(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-5 h-5 text-white/80",children:[(0,s.jsx)("path",{d:"M3 10.5L12 3l9 7.5"}),(0,s.jsx)("path",{d:"M5 9v11h4"}),(0,s.jsx)("path",{d:"M15 20h4V9"}),(0,s.jsx)("path",{d:"M5 20h4"}),(0,s.jsx)("path",{d:"M15 20h4"}),(0,s.jsx)("path",{d:"M10 17v3",strokeDasharray:"2 2"}),(0,s.jsx)("path",{d:"M14 17v3",strokeDasharray:"2 2"})]})}),label:R?eM("step2b.full"):null,isAutoProtruding:!1};if("protruding"===r)return{className:"bg-fengshui-filled border-2 border-fengshui-filled text-white",icon:(0,s.jsx)(n.P.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},children:(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-5 h-5 text-orange-300",children:[(0,s.jsx)("path",{d:"M3 10.5L12 3l9 7.5"}),(0,s.jsx)("path",{d:"M5 9v11h4"}),(0,s.jsx)("path",{d:"M15 20h4V9"}),(0,s.jsx)("path",{d:"M5 20h4"}),(0,s.jsx)("path",{d:"M15 20h4"}),(0,s.jsx)("path",{d:"M10 17v3",strokeDasharray:"2 2"}),(0,s.jsx)("path",{d:"M14 17v3",strokeDasharray:"2 2"})]})}),label:R?eM("step2b.protruding"):null,isAutoProtruding:a};if("partial"===r){let t=L[e]??1;return{className:"bg-fengshui-filled border-2 border-fengshui-filled text-white",icon:(0,s.jsx)(Y,{className:"w-6 h-6 text-amber-300"}),label:R?eM(2===t?"step2b.partialSevere":"step2b.partial"):null,isAutoProtruding:!1}}return{className:"bg-fengshui-filled border-2 border-fengshui-filled text-white",icon:(0,s.jsx)(n.P.div,{initial:{opacity:0}
1,animate:{opacity:1},transition:{duration:.3},children:(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-5 h-5 text-white/80",children:[(0,s.jsx)("path",{d:"M3 10.5L12 3l9 7.5"}),(0,s.jsx)("path",{d:"M5 9v11h4"}),(0,s.jsx)("path",{d:"M15 20h4V9"}),(0,s.jsx)("path",{d:"M5 20h4"}),(0,s.jsx)("path",{d:"M15 20h4"}),(0,s.jsx)("path",{d:"M10 17v3",strokeDasharray:"2 2"}),(0,s.jsx)("path",{d:"M14 17v3",strokeDasharray:"2 2"})]})}),label:R?eM("step2b.full"):null,isAutoProtruding:!1}},e6=T||Q||q,e8=e=>e?"n"===e?"top":"s"===e?"bottom":"e"===e?"right":"w"===e?"left":null:null,e7=(e,t=0)=>{let l="rgba(234,179,8,0.85)",s=.5*(1===t);switch(e){case"top":return{top:0,left:`${100*s}%`,width:"50%",height:"8px",backgroundColor:l};case"bottom":return{bottom:0,left:`${100*s}%`,width:"50%",height:"8px",backgroundColor:l};case"left":return{left:0,top:`${100*s}%`,width:"8px",height:"50%",backgroundColor:l};case"right":return{right:0,top:`${100*s}%`,width:"8px",height:"50%",backgroundColor:l};default:return{}}},te=(e,t=!1)=>{let l=G[e];return l?"bedroom"===l?{icon:()=>(0,s.jsx)(o.A,{className:"w-6 h-6 text-white"}),label:eM("step3b.bedroom"),roomType:l}:"bedroom_toilet"===l?{icon:()=>(0,s.jsx)(v,{className:"text-white"}),label:eM("step3b.bedroom_toilet"),roomType:l}:"kitchen_toilet"===l?{icon:()=>(0,s.jsx)(N,{className:"text-white"}),label:eM("step3b.kitchen_toilet"),roomType:l}:"kitchen_bedroom"===l?{icon:()=>(0,s.jsx)(y,{className:"text-white"}),label:eM("step3b.kitchen_bedroom"),roomType:l}:{icon:w[l],label:eM(`step3b.${l}`),roomType:l}:null},tt=(e,t=!1)=>{let l=K[e];if(!l||0===l.length)return null;let a=l.slice(0,2),n=l.length-a.length,r=t?`rotate(-${P}deg)`:void 0,i=(0,s.jsxs)("div",{className:(0,j.cn)("pointer-events-none absolute flex flex-wrap items-center justify-center gap-1","bottom-1 left-1 right-1"),children:[a.map(e=>(0,s.jsx)("span",{className:"rounded-full bg-amber-300/90 text-amber-950 text-[9px] font-semibold px-1.5 py-0.5",children:e.label},e.id)),n>0&&(0,s.jsxs)("span",{className:"rounded-full bg-amber-900/70 text-amber-100 text-[9px] font-semibold px-1.5 py-0.5",children:["+",n]})]});return t?(0,s.jsx)("div",{className:"pointer-events-none absolute inset-0",style:{transform:r,transformOrigin:"center"},children:i}):i},tl=e.newPalaceCoverages,ts="ring-1 ring-amber-300/35 ring-inset",ta="ring-2 ring-amber-300/80 ring-inset shadow-[0_0_12px_rgba(199,139,60,0.35)]",tn=Number.isFinite(ey=(Number(W)%360+360)%360)?ey:0,tr=(em=Math.round(tn),"zh"===p?0===em?"正北 0\xb0":em<=180?`北偏东 ${em}\xb0`:`北偏西 ${360-em}\xb0`:"es"===p?0===em?"Norte exacto 0\xb0":em<=180?`${em}\xb0 al este del norte`:`${360-em}\xb0 al oeste del norte`:0===em?"Due north 0\xb0":em<=180?`${em}\xb0 east of north`:`${360-em}\xb0 west of north`),ti=Math.round(Math.max(-45,Math.min(45,tn<=180?tn:tn-360))),to=er?S:(en??!1)||S||E,td=er?S:(en??!1)||S||E,tc=eo?ei||(S?eM("step3.rotateHint"):null):null,th=R?{type:"spring",stiffness:520,damping:28}:{type:"spring",stiffness:260,damping:20},tm=R?{type:"spring",stiffness:520,damping:28,scaleX:{type:"spring",stiffness:520,damping:28},scaleY:{type:"spring",stiffness:520,damping:28}}:{type:"spring",stiffness:400,damping:25,scaleX:{stiffness:260,damping:20},scaleY:{stiffness:260,damping:20}};return(0,s.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[to&&(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[td&&(0,s.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 bg-primary/10 rounded-full",children:[(0,s.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-l-transparent border-r-[6px] border-r-transparent border-b-[10px] border-b-red-500"}),(0,s.jsx)("span",{className:"text-sm font-bold text-primary",children:tr})]}),S&&V&&(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,s.jsxs)("div",{className:"w-full max-w-xs",children:[(0,s.jsx)("input",{type:"range",min:-45,max:45,step:1,value:ti,onChange:e=>{let t=Number(e.target.value);Number.isFinite(t)&&V((Math.round(t)%360+360)%360)},className:"w-full accent-primary","aria-label":"Orientation angle"}),(0,s.jsxs)("div",{className:"mt-1 grid grid-cols-3 text-[11px] text-muted-foreground",children:[(0,s.jsx)("span",{className:"text-left",children:eM("step3.northWest")}),(0,s.jsx)("span",{className:"text-center",children:eM("step3.northExact")}),(0,s.jsx)("span",{className:"text-right",children:eM("step3.northEast")})]})]}),(0,s.jsx)("div",{className:"text-[11px] text-muted-foreground",children:tr})]})]}),(0,s.jsxs)("div",{className:"flex w-full max-w-full flex-col items-center gap-3 md:flex-row md:items-center md:gap-6",children:[S&&(0,s.jsxs)("div",{className:"flex items-center justify-center gap-3 md:hidden",children:[(0,s.jsx)(b.$,{variant:"outline",size:"icon",onClick:D,className:"h-10 w-10 rounded-full bg-transparent hover:bg-primary/10",children:(0,s.jsx)(h.A,{className:"h-5 w-5"})}),(0,s.jsx)(b.$,{variant:"outline",size:"icon",onClick:F,className:"h-10 w-10 rounded-full bg-transparent hover:bg-primary/10",children:(0,s.jsx)(m.A,{className:"h-5 w-5"})})]}),S&&(0,s.jsx)(b.$,{variant:"outline",size:"icon",onClick:D,className:"hidden h-12 w-12 rounded-full bg-transparent hover:bg-primary/10 md:inline-flex",children:(0,s.jsx)(h.A,{className:"w-6 h-6"})}),(0,s.jsxs)("div",{className:"relative flex items-center justify-center",style:{width:`${e2}px`,height:`${e3}px`},children:[tc&&(0,s.jsxs)("div",{className:"pointer-events-none absolute right-2 bottom-full mb-3 left-auto mt-0 hidden translate-x-0 translate-y-0 z-10 w-[190p
1x] max-w-[85vw] rounded-2xl border border-[#d3c9bb] bg-[#ffffff] px-3 py-2 text-sm text-slate-700 shadow-lg shadow-black/10 backdrop-blur-md sm:w-[220px] lg:w-[280px] dark:border-slate-700/60 dark:bg-slate-900/80 dark:text-slate-200 md:left-full md:right-auto md:-top-3 md:mt-0 md:block md:translate-x-0 md:bottom-auto md:mb-0",children:[(0,s.jsx)("span",{className:"absolute left-1/2 bottom-0 h-2 w-2 -translate-x-1/2 translate-y-1/2 rotate-45 border-t border-r border-[#d3c9bb] bg-[#ffffff] dark:border-slate-700/60 dark:bg-slate-900/80 md:left-0 md:top-4 md:-translate-x-1/2 md:translate-y-0 md:border-b md:border-l md:border-t-0 md:border-r-0"}),(0,s.jsx)("span",{className:"whitespace-pre-line leading-relaxed",children:tc})]}),(0,s.jsx)(n.P.div,{className:"flex items-center justify-center relative",style:{paddingLeft:eZ,paddingRight:eJ,paddingTop:eQ,paddingBottom:eq},initial:{rotate:P},animate:{rotate:P},transition:{type:"spring",stiffness:200,damping:20},children:(0,s.jsxs)("div",{className:"relative",children:[e_&&t&&e4?(0,s.jsx)("div",{className:"absolute pointer-events-none z-0",style:{left:`${e4.left}px`,top:`${e4.top}px`,width:`${e4.width}px`,height:`${e4.height}px`},"aria-hidden":"true",children:(0,s.jsx)("div",{className:"absolute inset-0 overflow-hidden rounded-lg",children:(0,s.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",style:{transform:`translate(${t.offsetX}px, ${t.offsetY}px) scale(${t.scale}) rotate(${t.rotation}deg)`,transformOrigin:"center"},children:(0,s.jsx)("img",{src:t.src,alt:"",className:(0,j.cn)("block w-full h-full select-none",e1),draggable:!1,style:{opacity:t.opacity}})})})}):null,eh?null:eC.map(e=>{var l;let a,r,i,o,d,c,h,m,x,p,u,g,b,w,v,N,y,M,$,z,Y,A,O,D,F,W,V,K,q,en,er,ei,eo,ed,ec,eh;return h=e5(l=e),x=e9(m=`convex_${l}`,!0),p=t&&x.className?.includes("bg-fengshui-filled")?"bg-fengshui-filled/70":"",u=f[m]||"full",g=C[m],b="partial"===u||"protruding"===u&&!!g,w=h.isAboveBbox,v=h.isBelowBbox,N=h.isLeftOfBbox,y=h.isRightOfBbox,M=h.width,$=h.height,z=h.top,Y=h.left,A=eP(l),D=!(O=w||v)&&(N||y),F=(r=(a=k[l]).row<ek.minRow,i=a.row>ek.maxRow,o=a.col<ek.minCol,d=a.col>ek.maxCol,c=r?"bottom":i?"top":o?"right":d?"left":null,_(["top","bottom","left","right"].filter(e=>e!==c))),W=b?F.includes(g)?g:F[0]:void 0,V=X(L[l]),q=Math.max((K={scaleX:b&&D&&("left"===W||"right"===W)?V:1,scaleY:b&&O&&("top"===W||"bottom"===W)?V:1,origin:`${b&&("left"===W||"right"===W)?"left"===W?"right":"left":N?"right":y?"left":"center"} ${b&&("top"===W||"bottom"===W)?"top"===W?"bottom":"top":w?"bottom":v?"top":"center"}`}).scaleX,K.scaleY),en=S||E||T||I||Q||R,er=e6?te(m,en):null,ei="bedroom"===G[m]||"bedroom_toilet"===G[m]||"kitchen_bedroom"===G[m],eo=U&&ea&&es===l?e8(ee?.facing):null,ed=ee?.edgeSlot??0,ec=eo?e7(eo,ed):null,eh=R||T||I&&ei||U&&!el,(0,s.jsxs)(n.P.div,{onClick:()=>(e=>{let t=`convex_${e}`;if(U&&et&&!el)return void et(e,e,!0);if(I&&J){("bedroom"===G[t]||"bedroom_toilet"===G[t]||"kitchen_bedroom"===G[t])&&J(t);return}T&&H?H(t):R&&B&&B(t)})(l),className:(0,j.cn)("absolute box-border rounded-none p-1.5 flex flex-col items-center justify-center gap-0.5 overflow-hidden",x.className||"bg-fengshui-filled/80 border-2 border-dashed border-amber-400 text-white",p,eh&&"cursor-pointer hover:brightness-110",I&&ei&&ts,I&&Z===m&&ta),style:{width:`${M}px`,height:`${$}px`,top:`${z}px`,left:`${Y}px`,zIndex:q>1?2:1,transformOrigin:K.origin},initial:{opacity:0,scaleX:K.scaleX,scaleY:K.scaleY},animate:{opacity:1,scaleX:K.scaleX,scaleY:K.scaleY},whileHover:eh?{scaleX:1.05*K.scaleX,scaleY:1.05*K.scaleY}:void 0,whileTap:eh?{scaleX:.95*K.scaleX,scaleY:.95*K.scaleY}:void 0,transition:R?{type:"spring",scaleX:th,scaleY:th}:{type:"spring",delay:.2,scaleX:th,scaleY:th},children:[ec&&(0,s.jsx)("div",{className:"pointer-events-none absolute",style:ec}),(0,s.jsx)("div",{className:"relative z-10",style:{transform:`scaleX(${1/(D&&A>1?1/A:1)}) scaleY(${1/(O&&A>1?1/A:1)})`,transformOrigin:"center"},children:(0,s.jsx)("div",{className:"flex flex-col items-center gap-1",style:{transform:en?`rotate(-${P}deg)`:void 0}
1,children:e6&&er?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(er.icon,{className:"w-6 h-6 text-white"}),(0,s.jsx)("span",{className:"text-[10px] font-bold",children:er.label})]}):(0,s.jsxs)(s.Fragment,{children:[x.icon||(0,s.jsx)(n.P.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},children:(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-5 h-5 text-white/80",children:[(0,s.jsx)("path",{d:"M3 10.5L12 3l9 7.5"}),(0,s.jsx)("path",{d:"M5 9v11h4"}),(0,s.jsx)("path",{d:"M15 20h4V9"}),(0,s.jsx)("path",{d:"M5 20h4"}),(0,s.jsx)("path",{d:"M15 20h4"}),(0,s.jsx)("path",{d:"M10 17v3",strokeDasharray:"2 2"}),(0,s.jsx)("path",{d:"M14 17v3",strokeDasharray:"2 2"})]})}),x.label&&(0,s.jsx)("span",{className:"text-[10px] font-bold",children:x.label})]})})}),tt(m,en)]},l)}),(0,s.jsxs)("div",{className:(0,j.cn)("relative",eh?"overflow-hidden bg-transparent p-0":"grid rounded-xl border bg-border/50 p-3 shadow-sm"),style:{gridTemplateColumns:eh?void 0:`repeat(3, ${eu}px)`,gridTemplateRows:eh?void 0:`repeat(3, ${ef}px)`,gap:eh?void 0:"1px",width:`${ex+24}px`,height:`${ep+24}px`},children:[eh?(0,s.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:eh}):null,!e_&&t?(0,s.jsx)("div",{className:(0,j.cn)("absolute inset-3 pointer-events-none z-0","overflow-hidden"),"aria-hidden":"true",children:(0,s.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",style:{transform:`translate(${t.offsetX}px, ${t.offsetY}px) scale(${t.scale}) rotate(${t.rotation}deg)`,transformOrigin:"center"},children:(0,s.jsx)("img",{src:t.src,alt:"",className:(0,j.cn)("block w-full h-full select-none",e1),draggable:!1,style:{opacity:t.opacity}})})}):null,eh?null:["nw","n","ne","w","c","e","sw","s","se"].map((l,a)=>{let o=(e=>{for(let[t,l]of Object.entries(r))if(l===e)return t;return null})(l);o&&M[o];let h=tl?.[l],m=h?.role||"normal",g="missingPalace"===m,b="bedroom"===G[l]||"bedroom_toilet"===G[l]||"kitchen_bedroom"===G[l],w=U&&!ea&&es===l&&"convexCorner"!==m,v=O.has(l),N=(R||d||T||I&&b||U&&!el&&e$.includes(l))&&!g&&!(R&&v),y=((t,l,s=!1,a=!1,n)=>{let r,i,o,d,c,h,m,x,p,u=f[t]||"full";if(l||s||a||"full"===u||"protruding"===u)return{scaleX:1,scaleY:1,origin:"center"};let{insetEdges:g}=(r=k[t.startsWith("convex_")?t.replace("convex_",""):t],i=new Set,o=new Set,d=r.row>0?$[`${r.row-1},${r.col}`]:null,c=r.row<2?$[`${r.row+1},${r.col}`]:null,h=r.col>0?$[`${r.row},${r.col-1}`]:null,m=r.col<2?$[`${r.row},${r.col+1}`]:null,(x=(t,l)=>{if(!l){i.add(t),o.add(t);return}"missingPalace"===(t=>{if(!t)return null;let l=e.newPalaceCoverages?.[t]?.role;return l||(e.cells?.[t]?.role??null)})(l)&&i.add(t)})("top",d),x("bottom",c),x("left",h),x("right",m),{insetEdges:i,protrudingEdges:o}),b=(e=>{if(!e)return[];let t=_(e.split("+").filter(Boolean));return t.length>0?[t[0]]:[]})(n).filter(e=>g.has(e)),j=b.length>0?new Set(b):(p=[...g]).length<=1||0===p.length?g:new Set([_(p)[0]]),w=L[t]??1,v="partial"===u?X(w):1,N=j.has("left")||j.has("right"),y=j.has("top")||j.has("bottom"),M=j.has("left")&&!j.has("right")?"right":j.has("right")&&!j.has("left")?"left":"center",C=j.has("top")&&!j.has("bottom")?"bottom":j.has("bottom")&&!j.has("top")?"top":"center";return{scaleX:N?v:1,scaleY:y?v:1,origin:`${M} ${C}`}})(l,g,!1,v,C[l]),Y=Math.max(y.scaleX,y.scaleY),D=e9(l,!1,g,v),F=t&&D.className?.includes("bg-fengshui-filled")?"bg-fengshui-filled/70":"",V=E?A(l,P,W):z[l],K=S||E||T||I||R,Q=e6?te(l,K):null,en=A(l,P,W),er=e8(ee?.facing),ei=ee?.edgeSlot??0,eo=w&&ee?.facing?(0,u.nM)(l,ee.facing,f,C,L):null,ed=w&&er?eo?((e,t,l)=>{let s="rgba(234,179,8,0.85)",a=Math.max(0,Math.min(1,t)),n=Math.max(.12,Math.min(1,l));switch(e){case"top":return{top:0,left:`${100*a}%`,width:`${100*n}%`,height:"8px",backgroundColor:s};case"bottom":return{bottom:0,left:`${100*a}%`,width:`${100*n}%`,height:"8px",backgroundColor:s};case"left":return{left:0,top:`${100*a}%`,width:"8px",height:`${100*n}%`,backgroundColor:s};case"right":return{right:0,top:`${100*a}%`,width:"8px",height:`${100*n}%`,backgroundColor:s};default:return{}}})(eo.edge,eo.start,eo.size):e7(er,ei):null;return(0,s.jsxs)(n.P.div,{onClick:()=>((e,t)=>{if(!t&&!(R&&O.has(e))){if(U&&et&&!el&&e$.includes(e))return void et(e,e,!1);if(I&&J){("bedroom"===G[e]||"bedroom_toilet"===G[e]||"kitchen_bedroom"===G[e])&&J(e);return}T&&H?H(e):R&&B?B(e):d&&i&&i(e)}})(l,g),className:(0,j.cn)("relative z-10 rounded-none p-2 flex flex-col items-center justify-center gap-0.5 transition-all duration-200 overflow-hidden",g?"bg-muted/30 border-2 border-dashed border-muted-foreground
1/30":D.className,F,N&&"cursor-pointer hover:brightness-110",c&&o===c&&"ring-2 ring-primary ring-offset-2",I&&b&&ts,I&&Z===l&&ta),style:{zIndex:Y>1?2:1,transformOrigin:y.origin},whileHover:N?{scaleX:1.02*y.scaleX,scaleY:1.02*y.scaleY}:void 0,whileTap:N?{scaleX:.98*y.scaleX,scaleY:.98*y.scaleY}:void 0,transition:tm,initial:{opacity:0,y:10,scaleX:y.scaleX,scaleY:y.scaleY},animate:{opacity:1,y:0,scaleX:y.scaleX,scaleY:y.scaleY},children:[ed&&(0,s.jsx)("div",{className:"pointer-events-none absolute",style:ed}),(0,s.jsx)("div",{className:"flex flex-col items-center gap-0.5",style:{transform:S||E||T||I||q||R?`rotate(-${P}deg)`:void 0},children:g?(0,s.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,s.jsx)(n.P.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},children:(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-5 h-5 text-red-400",children:[(0,s.jsx)("path",{d:"M3 10.5L12 3l9 7.5"}),(0,s.jsx)("path",{d:"M5 9v11h4"}),(0,s.jsx)("path",{d:"M15 20h4V9"}),(0,s.jsx)("path",{d:"M5 20h4"}),(0,s.jsx)("path",{d:"M15 20h4"}),(0,s.jsx)("path",{d:"M10 17v3",strokeDasharray:"2 2"}),(0,s.jsx)("path",{d:"M14 17v3",strokeDasharray:"2 2"})]})}),(0,s.jsx)("span",{className:"text-[10px] font-bold text-red-500",children:eM("step1.empty")})]}):(0,s.jsx)(s.Fragment,{children:q?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-lg leading-none",children:en.symbol}),(0,s.jsx)("span",{className:"text-[9px] font-medium leading-none opacity-80",children:"zh"===p?en.zhName:en.enName}),Q&&(0,s.jsxs)("div",{className:"flex flex-col items-center mt-0.5 pt-0.5 border-t border-white/30",children:[(0,s.jsx)(Q.icon,{className:"w-4 h-4"}),(0,s.jsx)("span",{className:"text-[8px] opacity-70",children:Q.label})]})]}):E?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-xl leading-none",children:V.symbol}),(0,s.jsx)("span",{className:"text-[10px] font-medium leading-none",children:"zh"===p?V.zhName:V.enName})]}):e6?Q?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Q.icon,{className:"w-6 h-6"}),(0,s.jsx)("span",{className:"text-[10px] font-medium leading-none opacity-80",children:Q.label})]}):T?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-lg leading-none",children:D.icon}),(0,s.jsx)("span",{className:"text-[10px] font-medium leading-none opacity-80",children:eM("step3b.none")})]}):(0,s.jsx)("span",{className:"text-lg leading-none",children:D.icon}):R?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-lg leading-none",children:D.icon}),(0,s.jsx)("span",{className:"text-[10px] font-medium leading-none",children:D.label}),v&&(0,s.jsx)("div",{className:"absolute top-1 right-1",children:(0,s.jsx)(x.A,{className:"w-3 h-3 text-purple-200"})})]}):(0,s.jsx)("span",{className:"text-lg leading-none",children:D.icon})})}),tt(l,K)]},l)})]})]})})]}),S&&(0,s.jsx)(b.$,{variant:"outline",size:"icon",onClick:F,className:"hidden h-12 w-12 rounded-full bg-transparent hover:bg-primary/10 md:inline-flex",children:(0,s.jsx)(m.A,{className:"w-6 h-6"})})]})]})}}}]);

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.