mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
83 lines
35 KiB
JavaScript
83 lines
35 KiB
JavaScript
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="f5cac791d009713cb86ce941810e43fba4976300e3e5f0310074b65d585e42f2";import{dt as e,du as t,b1 as o,dv as n,dw as a,q as i,dx as r,dy as s,dz as l,dA as c,a7 as d,dB as h,ak as p,bU as f,bT as u,dC as m,al as g,T as y,dD as x,cN as w,dE as v,A as b,w as M,dF as $,dG as S,dH as k,dI as I,dJ as z}from"./houseplan-card-D6Qc0AL6.js";const P=e=>`${Number(e[0].toFixed(4))} ${Number(e[1].toFixed(4))}`;function j(e){let t=0;for(let o=0;o<e.length;o++){const n=e[o],a=e[(o+1)%e.length];t+=n[0]*a[1]-a[0]*n[1]}return t/2}function N(e,t){const o=function(e){const t=(Array.isArray(e)?e:[]).filter(e=>Array.isArray(e)&&Number.isFinite(e[0])&&Number.isFinite(e[1])).map(e=>[Number(e[0]),Number(e[1])]),o=t[t.length-1];return t.length>1&&t[0][0]===o[0]&&t[0][1]===o[1]&&t.pop(),t}(e);if(o.length<3)return[];const n=!t;return j(o)>0===n?o:[...o].reverse()}function C(e,t,n){return e.length?`M ${e.map(e=>P(o(e,n,t))).join(" L ")} Z`:""}function O(e,t,o){const n=t[1]-e[1],a=-(t[0]-e[0]),i=o.rotDeg*Math.PI/180;return n*Math.sin(i)+a*Math.cos(i)}function B(t,n,a=e){if(!Number.isFinite(n)||n<0)throw new Error("invalid floor edge height");const i=(t||[]).map(e=>(e||[]).map((e,t)=>function(e,t){const o=N(e,t);if(!o.length)return o;let n=0;for(let e=1;e<o.length;e++)(o[e][0]<o[n][0]||o[e][0]===o[n][0]&&o[e][1]<o[n][1])&&(n=e);return[...o.slice(n),...o.slice(0,n)]}(e,t>0)).filter(e=>e.length>=3&&Math.abs(j(e))>=1e-9)).filter(e=>e.length&&j(e[0])>0);i.sort((e,t)=>{const o=e[0][0],n=t[0][0];return o[0]-n[0]||o[1]-n[1]||Math.abs(j(t[0]))-Math.abs(j(e[0]))});const r=[],s=[];let l=0;for(let e=0;e<i.length;e++){const t=i[e];for(const e of t)r.push(C(e,a,0));const c=t[0];l+=c.length;for(let t=0;t<c.length;t++){const i=c[t],r=c[(t+1)%c.length];if(O(i,r,a)<=1e-9)continue;const l=o(i,0,a),d=o(r,0,a),h=o(r,-n,a),p=o(i,-n,a);s.push({d:`M ${P(l)} L ${P(d)} L ${P(h)} L ${P(p)} Z`,depth:Math.max(p[1],h[1]),component:e,edge:t,planEdge:[i,r]})}}return s.sort((e,t)=>e.depth-t.depth||e.component-t.component||e.edge-t.edge),{footprintPath:r.join(" "),sides:s,componentCount:i.length,edgeCount:l}}function A(e,t){return e^=Math.round(64*(Number.isFinite(t)?t:0)),Math.imul(e,16777619)>>>0}const T=Object.freeze({revision:1,leafThicknessRatio:.04,frameThicknessRatio:.055,gateTurnDeg:10,gateTopRatio:.88,windowBottomRatio:.27,windowTopRatio:.78,doorTopRatio:.92});T.leafThicknessRatio,T.frameThicknessRatio;const F=e=>e.every(Number.isFinite);function H(e,t){return Object.freeze([Object.is(e,-0)?0:e,Object.is(t,-0)?0:t])}function R(e,t){return[e[0]+t[0],e[1]+t[1]]}function L(e,t){return[e[0]-t[0],e[1]-t[1]]}function G(e,t){return[e[0]*t,e[1]*t]}function V(e,t,o,n){const a=e[0]*o,i=e[1]*n,r=t*Math.PI/180;return[a*Math.cos(r)-i*Math.sin(r),a*Math.sin(r)+i*Math.cos(r)]}function E(e,t,o,a,i,r,s){const l=e.flipH?-1:1,c="gate"===e.type?1:e.flipV?-1:1,d=n(e.type,e.flipV,e.angle,e.face);return{leaf:t,hinge:R([e.x+d.ox,e.y+d.oy],V(o,e.angle,l,c)),closedVector:V(a,e.angle,l,c),quarterVector:V([-a[1],a[0]],e.angle,l,c),turnDeg:i,bottom:r,top:s}}const W=e=>`${Number(e[0].toFixed(4))} ${Number(e[1].toFixed(4))}`;function q(e,t,n,a,i={}){const r=n.map(e=>o(e.point,e.z,a));return Object.freeze({kind:e,material:t,d:`M ${r.map(W).join(" L ")} Z`,depth:Math.max(...r.map(e=>e[1])),...i})}function D(e,t,o,n,a,i,r,s={}){return q(e,t,[{point:o,z:a},{point:n,z:a},{point:n,z:i},{point:o,z:i}],r,s)}function _(t,n,a=e){const i=Math.max(0,Math.min(1,Number.isFinite(n)?n:0));return t.leaves.map(e=>{const n=function(e,t){const o=e.turnDeg*t*Math.PI/180;return[e.hinge[0]+e.closedVector[0]*Math.cos(o)+e.quarterVector[0]*Math.sin(o),e.hinge[1]+e.closedVector[1]*Math.cos(o)+e.quarterVector[1]*Math.sin(o)]}(e,i),r=o(e.hinge,e.bottom,a),s=o(n,e.bottom,a),l=o(n,e.top,a),c=o(e.hinge,e.top,a),d="window"===t.type?"light-window":"matte-leaf",h="window"===t.type?Object.freeze([D("window-insert","light-window",e.hinge,n,e.bottom,e.top,a)]):function(e,t,o,n){const a=L(t,e.hinge),i=Math.hypot(a[0],a[1]);if(!(i>1e-9&&o>0))return Object.freeze([]);const r=H(-a[1]*o/(2*i),a[0]*o/(2*i)),s=R(e.hinge,r),l=R(t,r),c=L(e.hinge,r),d=L(t,r),h=[D("leaf-back","matte-leaf",d,c,e.bottom,e.top,n),D("leaf-front","matte-leaf",s,l,e.bottom,e.top,n),D("leaf-edge","matte-leaf",c,s,e.bottom,e.top,n,{edge:"hinge"}),D("leaf-edge","matte-leaf",l,d,e.bottom,e.top,n,{edge:"tip"}),q("leaf-top","matte-leaf",[{point:s,z:e.top},{point:c,z:e.top},{point:d,z:e.top},{point:l,z:e.top}],n)];return Object.freeze(h.sort((e,t)=>e.depth-t.depth||e.kind.localeCompare(t.kind)||String(e.edge||"").localeCompare(String(t.edge||""))))}(e,n,t.leafThickness,a);return Object.freeze({id:t.id,sourceIndex:t.sourceIndex,type:t.type,leaf:e.leaf,d:`M ${W(r)} L ${W(s)} L ${W(l)} L ${W(c)} Z`,shadowD:`M ${W(o(e.hinge,0,a))} L ${W(o(n,0,a))}`,depth:Math.max(r[1],s[1]),material:d,thickness:"window"===t.type?0:t.leafThickness,surfaces:h})})}const U=1e-9,K=e=>e.length>=2&&Number.isFinite(e[0])&&Number.isFinite(e[1]);function Z(e){let t=0;for(let o=0;o<e.length;o++){const n=e[o],a=e[(o+1)%e.length];t+=n[0]*a[1]-a[0]*n[1]}return t/2}function J(e){return e.length>=3&&e.every(K)&&Math.abs(Z(e))>U}function Q(e,t,o){const n=o[0]-t[0],a=o[1]-t[1],i=n*n+a*a,r=i?Math.max(0,Math.min(1,((e[0]-t[0])*n+(e[1]-t[1])*a)/i)):0;return Math.hypot(e[0]-t[0]-r*n,e[1]-t[1]-r*a)}function X(e,t,o=1e-7){for(let n=0;n<t.length;n++)if(Q(e,t[n],t[(n+1)%t.length])<=o)return!0;return!1}function Y(e,t){let o=!1;for(let n=0,a=t.length-1;n<t.length;a=n++){const i=t[n],r=t[a];i[1]>e[1]!=r[1]>e[1]&&e[0]<(r[0]-i[0])*(e[1]-i[1])/(r[1]-i[1])+i[0]&&(o=!o)}return o}function ee(e){return Math.max(0,Math.abs(Z(e.outer))-(e.holes||[]).reduce((e,t)=>e+Math.abs(Z(t)),0))}function te(e){return!!e.id&&J(e.outer)&&(e.holes||[]).every(J)&&ee(e)>U}function oe(e,t){if(!te(t)||X(e,t.outer)||!Y(e,t.outer))return!1;for(const o of t.holes||[])if(X(e,o)||Y(e,o))return!1;return!0}function ne(e){if(!te(e))return null;if(e.safePoint&&oe(e.safePoint,e))return[e.safePoint[0],e.safePoint[1]];const t=e.outer.map(e=>e[0]),o=e.outer.map(e=>e[1]),n=Math.min(...t),a=Math.max(...t),i=Math.min(...o),r=Math.max(...o),s=[[(n+a)/2,(i+r)/2],[t.reduce((e,t)=>e+t,0)/t.length,o.reduce((e,t)=>e+t,0)/o.length]];for(let t=0;t<e.outer.length;t++){const o=e.outer[(t+e.outer.length-1)%e.outer.length],n=e.outer[t],a=e.outer[(t+1)%e.outer.length];s.push([(o[0]+n[0]+a[0])/3,(o[1]+n[1]+a[1])/3])}let l=null,c=-1/0;const d=t=>{if(!oe(t,e))return;const o=function(e,t){let o=1/0;for(const n of[t.outer,...t.holes||[]])for(let t=0;t<n.length;t++)o=Math.min(o,Q(e,n[t],n[(t+1)%n.length]));return o}(t,e);o>c+U&&(l=t,c=o)};s.forEach(d);for(let e=1;e<16;e++)for(let t=1;t<16;t++)d([n+(a-n)*e/16,i+(r-i)*t/16]);return l}function ae(t,n,a,i=e,r=[0,0]){if(!K(t)||!K(n)||n[0]<0||n[1]<0||!Number.isFinite(a)||!K(r))throw new Error("invalid isometric overlay plate");return[[t[0]-n[0],t[1]-n[1]],[t[0]+n[0],t[1]-n[1]],[t[0]+n[0],t[1]+n[1]],[t[0]-n[0],t[1]+n[1]]].map(e=>{const t=o(e,a,i);return[t[0]+r[0],t[1]+r[1]]})}function ie(e,t,o){return(t[0]-e[0])*(o[1]-e[1])-(t[1]-e[1])*(o[0]-e[0])}function re(e,t,o,n){const a=ie(e,t,o),i=ie(e,t,n),r=ie(o,n,e),s=ie(o,n,t);return(a>U&&i<-U||a<-U&&i>U)&&(r>U&&s<-U||r<-U&&s>U)||(Math.abs(a)<=U&&Q(o,e,t)<=U||Math.abs(i)<=U&&Q(n,e,t)<=U||Math.abs(r)<=U&&Q(e,o,n)<=U||Math.abs(s)<=U&&Q(t,o,n)<=U)}function se(e,t,o,n){return re(e,t,o,n)?0:Math.min(Q(e,o,n),Q(t,o,n),Q(o,e,t),Q(n,e,t))}function le(e,t,o){if(e.some(e=>function(e,t){return!!Y(e,t.outer)&&!(t.holes||[]).some(t=>Y(e,t))}(e,t)))return!0;if(t.outer.some(t=>Y(t,e)))return!0;for(const n of[t.outer,...t.holes||[]])for(let t=0;t<e.length;t++){const a=(t+1)%e.length;for(let i=0;i<n.length;i++){const r=(i+1)%n.length;if(se(e[t],e[a],n[i],n[r])<=o+U)return!0}}return!1}function ce(e){return J(e.outer)&&(e.holes||[]).every(J)}function de(e,t,o){if(!oe(e,o)||!oe(t,o))return!1;for(const n of[o.outer,...o.holes||[]])for(let o=0;o<n.length;o++)if(re(e,t,n[o],n[(o+1)%n.length]))return!1;return!0}function he(e,t,o){const n=t[0]-e[0],a=t[1]-e[1];return{from:e,to:t,visible:o,length:Math.hypot(n,a),angleDeg:180*Math.atan2(a,n)/Math.PI}}function pe(n){const i=n.camera||e,r=n.wallHeight??t,s=n.visualOffset??a,l=n.sceneUnitsPerCssPixel??1,c=n.safetyGapCssPx??4,d=n.maxNudgeCssPx??48;if(!K(n.floorAnchor)||!K(n.plateHalfSize)||n.plateHalfSize[0]<0||n.plateHalfSize[1]<0||!Number.isFinite(r)||r<0||!Number.isFinite(s)||s<0||!Number.isFinite(l)||l<=0||!Number.isFinite(c)||c<0||!Number.isFinite(d)||d<0)throw new Error("invalid isometric overlay input");const h=[n.floorAnchor[0],n.floorAnchor[1]],p=o(h,0,i),f=(u=n.kind,!n.showBorders||"device"!==u&&"room-label"!==u&&"opening-lock"!==u?"floor":"raised");var u;if("floor"===f){return{plane:f,owner:null,floorAnchor:h,floorScene:p,raisedScene:p,visualScene:p,plate:[],nudgeScene:[0,0],nudgeCss:[0,0],nudgeDistanceCss:0,nudged:!1,nearWallBefore:!1,nearWallAfter:!1,cleared:!0,capped:!1,grounding:{center:p,visible:!1},tether:he(p,p,!1),status:"ok",reason:null}}const m=r+s,g=o(h,m,i),y=function(e){if(!K(e.floorAnchor))return null;const t=e.rooms.filter(te),o=e.preferredRoomId&&t.find(t=>t.id===e.preferredRoomId)||null;let n=null;return"device"===e.kind?(o&&oe(e.floorAnchor,o)&&(n=o),n||(n=t.filter(t=>oe(e.floorAnchor,t)).sort((e,t)=>ee(e)-ee(t)||((e,t)=>e<t?-1:e>t?1:0)(e.id,t.id))[0]||null)):n=o,n?{id:n.id,area:ee(n),safePoint:ne(n)}:null}(n),x=n.wallSilhouettes.every(ce),w=c*l,v=ae(h,n.plateHalfSize,m,i),b=e=>n.wallSilhouettes.some(t=>le(e,t,w)),M=!x||b(v);let $=0,S=[0,0],k=!1,I=x?"ok":"degraded",z=x?null:"invalid-wall-geometry";if(x&&M)if(y)if(y.safePoint){const e=n.rooms.find(e=>e.id===y.id)||null,t=o(y.safePoint,m,i),a=t[0]-g[0],r=t[1]-g[1],s=Math.hypot(a,r);if(s<=U)I="degraded",z="invalid-safe-point";else{const t=a/s,o=r/s,n=Math.min(d,s/l),i=e=>{const n=[t*e*l,o*e*l];return b(v.map(e=>[e[0]+n[0],e[1]+n[1]]))};let c=null,p=0,f=!1;const u=Math.ceil(n);for(let t=1;t<=u;t++){const o=Math.min(n,t),a=o*l/s,r=[h[0]+(y.safePoint[0]-h[0])*a,h[1]+(y.safePoint[1]-h[1])*a];if(!e||!de(h,r,e)){f=!0;break}if(!i(o)){c=o;break}p=o}if(null!==c){let e=p,t=c;for(let o=0;o<28;o++){const o=(e+t)/2;i(o)?e=o:t=o}$=t}else $=p,k=!0,I="degraded",z=f?"owner-boundary":"nudge-cap";S=[t*$*l,o*$*l]}}else I="degraded",z="invalid-safe-point";else I="degraded",z="missing-owner";const P=[g[0]+S[0],g[1]+S[1]],j=ae(h,n.plateHalfSize,m,i,S),N=!x||b(j),C=$>U,O=C||M||N||!!n.hovered||!!n.focused||!!n.selected;return{plane:f,owner:y,floorAnchor:h,floorScene:p,raisedScene:g,visualScene:P,plate:j,nudgeScene:S,nudgeCss:[S[0]/l,S[1]/l],nudgeDistanceCss:$,nudged:C,nearWallBefore:M,nearWallAfter:N,cleared:!N,capped:k,grounding:{center:p,visible:!1!==n.filtersSupported},tether:he(p,P,O),status:I,reason:z}}const fe="f5cac791d009713cb86ce941810e43fba4976300e3e5f0310074b65d585e42f2",ue=e=>"wall-side"===e.layer?0:"wall-top"===e.layer?1:2,me=e=>{if("wall-side"===e.layer)return`${e.face.polygon}:${e.face.ring}:${e.face.edge}`;if("wall-top"===e.layer)return String(e.face.component);const t=e.surface;return`${t.sourceIndex}:${t.leaf??-1}:${t.kind}:${t.jamb??-1}:${t.edge??""}:${t.id}:${t.material}`};function ge(e,t){const o=[...e.sides.map(e=>({layer:"wall-side",depth:e.depth,face:e})),...e.topFaces.map(e=>({layer:"wall-top",depth:e.depth,face:e})),...t.map(e=>({layer:"opening",depth:e.depth,surface:e}))];return o.sort((e,t)=>e.depth-t.depth||ue(e)-ue(t)||me(e).localeCompare(me(t))),Object.freeze(o)}const ye=Object.freeze({textLatinAdvance:.72,textWideAsciiAdvance:1,textWideAdvance:1.1,textSpaceAdvance:.4,textWidthSafety:1.08,deviceShellInset:.134375,deviceShellGap:.1,deviceSectionGap:.08,deviceBadgeMinWidth:.7875,deviceBadgeHeight:.7875,deviceBadgeInlinePadding:.28,deviceValueInlinePadding:.32,deviceAuxiliaryExtent:.7,deviceLqiFontSize:.38,deviceLqiTop:.734375,deviceLqiBelowBottomBadgeTop:1.571875,devicePadding:.08,roomNameLineHeight:1.25,roomAreaLinkWidth:1.1,roomMetricsTopGap:.15,roomMetricFontSize:.75,roomMetricLineHeight:1.25,roomMetricIconWidth:1.05,roomMetricInnerGap:.12,roomMetricRowGap:.55,roomMetricMinWidth:11,roomPadding:.4,openingLockHalfSize:.62,roomMetricTextCharacters:Object.freeze({temperature:10,humidity:8,lqi:6,light:24})});function xe(e){return[...String(e)].reduce((e,t)=>/\s/.test(t)?e+ye.textSpaceAdvance:/[MW@#%&]/.test(t)?e+ye.textWideAsciiAdvance:e+(t.codePointAt(0)>255?ye.textWideAdvance:ye.textLatinAdvance),0)*ye.textWidthSafety}function we(e,t){return xe(e)*I(t||e)}function ve(e,t){return[Math.max(Math.abs(e.left),Math.abs(e.right))+t,Math.max(Math.abs(e.top),Math.abs(e.bottom))+t]}function be(e){if("opening-lock"===e.kind){const t=(Number.isFinite(e.size)&&e.size>0?e.size:0)*ye.openingLockHalfSize;return[t,t]}if("room-label"===e.kind){const t=Number.isFinite(e.font)&&e.font>0?e.font:0,o=w(e.room.settings?.name_scale),n=w(e.room.settings?.label_scale),a=(xe(e.room.name||"")+(e.room.area?ye.roomAreaLinkWidth:0))*o,i=ye.roomNameLineHeight*o,r=[e.display.labelTemp?ye.roomMetricTextCharacters.temperature:0,e.display.labelHum?ye.roomMetricTextCharacters.humidity:0,e.display.labelLqi&&e.room.area?ye.roomMetricTextCharacters.lqi:0,e.display.labelLight?ye.roomMetricTextCharacters.light:0].filter(e=>e>0),s=ye.roomMetricFontSize*n,l=r.length?Math.max(ye.roomMetricMinWidth,r.reduce((e,t)=>e+ye.roomMetricIconWidth+ye.roomMetricInnerGap+t*ye.textLatinAdvance*ye.textWidthSafety,0)+(r.length-1)*ye.roomMetricRowGap)*s:0,c=r.length?s*ye.roomMetricLineHeight:0,d=ve({left:-Math.max(a,l)/2,right:Math.max(a,l)/2,top:-i/2,bottom:r.length?i/2+ye.roomMetricsTopGap+c:i/2},ye.roomPadding);return[d[0]*t,d[1]*t]}const t=Number.isFinite(e.core)&&e.core>0?e.core:0,o=e.presentation,n=null==o.valueText?1:Math.max(1,we(o.valueText,o.valueFullText||o.valueText)+ye.deviceValueInlinePadding),a=[];o.valueBadge&&a.push(Math.max(ye.deviceBadgeMinWidth,we(o.valueBadge.text,o.valueBadge.fullText||o.valueBadge.text)+ye.deviceBadgeInlinePadding));for(const e of v(o)){const t=e.text+e.suffix;a.push(Math.max(ye.deviceBadgeMinWidth,we(t,t)+ye.deviceBadgeInlinePadding))}const i=o.valueBadge?.position||"right";let r;if(!a.length||"left"!==i&&"right"!==i)if(a.length){const e=a.reduce((e,t)=>e+t,0)+(a.length-1)*ye.deviceSectionGap,t=Math.max(n,e),o=1+ye.deviceShellGap+ye.deviceBadgeHeight;r="bottom"===i?{left:-t/2-ye.deviceShellInset,right:t/2+ye.deviceShellInset,top:-.5-ye.deviceShellInset,bottom:-.5+o+ye.deviceShellInset}:{left:-t/2-ye.deviceShellInset,right:t/2+ye.deviceShellInset,top:.5-o-ye.deviceShellInset,bottom:.5+ye.deviceShellInset}}else r={left:-.5-ye.deviceShellInset,right:-.5+n+ye.deviceShellInset,top:-.5-ye.deviceShellInset,bottom:.5+ye.deviceShellInset};else{const e=Math.max(...a),t=a.length*ye.deviceBadgeHeight+(a.length-1)*ye.deviceSectionGap,o=n+ye.deviceShellGap+e,s=Math.max(1,t);r="right"===i?{left:-.5-ye.deviceShellInset,right:-.5+o+ye.deviceShellInset,top:-s/2-ye.deviceShellInset,bottom:s/2+ye.deviceShellInset}:{left:.5-o-ye.deviceShellInset,right:.5+ye.deviceShellInset,top:-s/2-ye.deviceShellInset,bottom:s/2+ye.deviceShellInset}}const s=ye.deviceAuxiliaryExtent;if(r.left=Math.min(r.left,-s),r.right=Math.max(r.right,s),r.top=Math.min(r.top,-s),r.bottom=Math.max(r.bottom,s),o.pulse.animated){const e=Math.max(1,o.pulse.diameterScale)/2;r.left=Math.min(r.left,-e),r.right=Math.max(r.right,e),r.top=Math.min(r.top,-e),r.bottom=Math.max(r.bottom,e)}if(null!=o.lqiText){const e="bottom"===o.valueBadge?.position?ye.deviceLqiBelowBottomBadgeTop:ye.deviceLqiTop,t=xe(o.lqiText)*ye.deviceLqiFontSize/2;r.left=Math.min(r.left,-t),r.right=Math.max(r.right,t),r.bottom=Math.max(r.bottom,e+ye.deviceLqiFontSize)}const l=ve(r,ye.devicePadding);return[l[0]*t,l[1]*t]}function Me(e,t){return e.flatMap((e,o)=>e.orphanReason?[]:[{id:String(e.id||o),sourceIndex:o,type:e.type,x:e.rx,y:e.ry,angle:Number(e.angle)||0,length:e.rlen>0?e.rlen:.9*t,flipH:!!e.flip_h,flipV:!!e.flip_v}])}function $e(e){return{id:e.id,x:e.x,y:e.y,w:e.w,h:e.h,poly:e.poly,wall_ids:e.wall_ids}}function Se(e,t){const o=e?.partitionHost;if(!o)return null;const n="gate"===t.type?!t.flipV:t.flipV;return{sourceIndex:t.sourceIndex,hostId:o.host.id,t:o.t,depth:o.depth,face:u(o,n)}}function ke(o,n=T){const a=Me(o.openings,o.coordinateScale),r=a.map(e=>Se(o.openings[e.sourceIndex],e)),u=i(t,o.cellCm),m=i(s,o.cellCm),g=i(l,o.cellCm);return{key:`${o.space.id}|${function(e){let t=2166136261;const o=e=>{if("number"!=typeof e)if("string"!=typeof e)if("boolean"!=typeof e)if(Array.isArray(e)){t=A(t,e.length);for(const t of e)o(t)}else{if(e&&"object"==typeof e){const t=e;for(const e of Object.keys(t).sort())o(e),o(t[e]);return}t=A(t,-1)}else t=A(t,e?1:0);else for(const o of e)t=A(t,o.codePointAt(0)||0);else t=A(t,e)};return o(e),t.toString(36)}({rooms:o.space.rooms.map($e),walls:o.walls,openCuts:o.openCuts,openings:a,openingHosts:r,openingGeometryPolicy:n,partitions:o.space.partitions,roomDrafts:o.space.room_drafts,columns:o.space.wall_columns,cellCm:o.cellCm,gridPitch:o.gridPitch,wallKeyPitch:o.wallKeyPitch,camera:e,wallHeight:u,raisedHeight:g,floorEdgeHeight:m,algorithm:4})}`,build:()=>{o.onBuild();const i=c(o.space,o.cellCm,o.gridPitch,2e-4*o.gridPitch,o.partitionCuts()).all,s=o.roomOpenings(),l=o.walls.length||i.length?d(o.space.rooms,o.walls,o.openCuts,s,o.wallKeyPitch,o.cellCm,o.gridPitch,o.coordinateScale,i):null;if(l&&("failed-core"===l.status||"not-applicable"===l.status))throw new Error("wall boolean geometry failed");const m=l?.paperGeom??h(o.space.rooms,o.walls,o.openCuts,o.wallKeyPitch,o.cellCm,o.gridPitch,o.coordinateScale);if(!m)throw new Error("floor boolean geometry failed");const g=l?.openingIndex||p(o.space.rooms,o.walls,o.openCuts,o.wallKeyPitch,o.cellCm,o.gridPitch,o.coordinateScale),y=a.map((e,a)=>{const i=r[a],s="gate"===e.type?!e.flipV:e.flipV,l=i?i.face:o.walls.length||"gate"===e.type?f(g,{x:e.x,y:e.y,angle:e.angle,length:e.length,flip_v:s}):{ox:0,oy:0,cm:0,side:-1};return function(e,o=t,n=T){const a=e.face.cm??0;if(!F([e.x,e.y,e.angle,e.length,e.face.ox,e.face.oy,a,o])||!(e.length>0)||!(o>0)||-1!==e.face.side&&1!==e.face.side||a<0)throw new Error("invalid isometric opening input");const i=e.length/2,r=e.angle*Math.PI/180,s=H(Math.cos(r),Math.sin(r)),l=H(-Math.sin(r),Math.cos(r)),c=H(e.x,e.y),d=H(e.x-s[0]*i,e.y-s[1]*i),h=H(e.x+s[0]*i,e.y+s[1]*i),p=H(e.face.ox,e.face.oy),f=H(d[0]+p[0],d[1]+p[1]),u=H(h[0]+p[0],h[1]+p[1]),m=H(d[0]-p[0],d[1]-p[1]),g=H(h[0]-p[0],h[1]-p[1]),y=Object.freeze({center:c,tangent:s,normal:l,start:d,end:h}),x=Object.freeze({side:e.face.side,cm:a,depth:2*Math.hypot(e.face.ox,e.face.oy),offset:p,selectedStart:f,selectedEnd:u,oppositeStart:m,oppositeEnd:g}),w="passage"===e.type?[]:[Object.freeze({jamb:0,center:d,selected:f,opposite:m}),Object.freeze({jamb:1,center:h,selected:u,opposite:g})];let v;if("passage"===e.type)v=[];else if("gate"===e.type){const t=e.face.side*n.gateTurnDeg;v=[E(e,0,[-i,0],[i,0],t,0,o*n.gateTopRatio),E(e,1,[i,0],[-i,0],-t,0,o*n.gateTopRatio)]}else v="window"===e.type?[E(e,0,[-i,0],[i,0],-90,o*n.windowBottomRatio,o*n.windowTopRatio),E(e,1,[i,0],[-i,0],90,o*n.windowBottomRatio,o*n.windowTopRatio)]:[E(e,0,[-i,0],[e.length,0],-90,0,o*n.doorTopRatio)];return Object.freeze({id:e.id,sourceIndex:e.sourceIndex,type:e.type,wallHeight:o,leafThickness:o*n.leafThicknessRatio,frameThickness:o*n.frameThicknessRatio,axis:y,face:x,reveals:Object.freeze(w),leaves:Object.freeze(v.map(e=>Object.freeze({...e,hinge:H(e.hinge[0],e.hinge[1]),closedVector:H(e.closedVector[0],e.closedVector[1]),quarterVector:H(e.quarterVector[0],e.quarterVector[1])})))})}({...e,face:l},u,n)}),x=Object.freeze(y);return{walls:l?.components.flatMap(e=>e.geom)||[],floor:m,openings:x,openingSurfaces:Object.freeze(x.flatMap(t=>function(t,o=e){if("passage"===t.type)return Object.freeze([]);const n=[];if(t.face.depth>1e-9)for(const e of t.reveals)n.push(D("jamb-reveal","reveal",e.selected,e.opposite,0,t.wallHeight,o,{jamb:e.jamb}));if("window"!==t.type||!t.leaves.length)return Object.freeze(n.sort((e,t)=>e.depth-t.depth||e.kind.localeCompare(t.kind)||(e.jamb??0)-(t.jamb??0)));const a=Math.min(...t.leaves.map(e=>e.bottom)),i=Math.max(...t.leaves.map(e=>e.top)),r=Math.min(t.frameThickness,Math.hypot(t.axis.end[0]-t.axis.start[0],t.axis.end[1]-t.axis.start[1])/4,(i-a)/4),s=R(t.axis.start,G(t.axis.tangent,r)),l=L(t.axis.end,G(t.axis.tangent,r)),c=t.face.depth>1e-9?[t.face.offset,H(-t.face.offset[0],-t.face.offset[1])]:[t.face.offset];for(const e of c){const c=R(t.axis.start,e),d=R(t.axis.end,e),h=R(s,e),p=R(l,e);n.push(D("window-frame-side","light-frame",c,h,a,i,o,{jamb:0}),D("window-frame-side","light-frame",p,d,a,i,o,{jamb:1}),D("window-frame-top","light-frame",h,p,Math.max(a,i-r),i,o))}return t.face.depth>1e-9&&n.push(q("window-sill","light-sill",[{point:t.face.selectedStart,z:a},{point:t.face.selectedEnd,z:a},{point:t.face.oppositeEnd,z:a},{point:t.face.oppositeStart,z:a}],o)),Object.freeze(n.sort((e,t)=>e.depth-t.depth||e.kind.localeCompare(t.kind)||(e.jamb??0)-(t.jamb??0)))}(t).map(e=>Object.freeze({...e,id:t.id,sourceIndex:t.sourceIndex,type:t.type}))))}}}}const Ie=e=>Array.isArray(e)?e:[];function ze(e,t){const n=e=>Ie(e).flatMap(e=>Array.isArray(e)&&Number.isFinite(e[0])&&Number.isFinite(e[1])?[o([Number(e[0]),Number(e[1])],t)]:[]);return Ie(e).flatMap(e=>{const t=Ie(e);if(!t.length)return[];const o=n(t[0]);if(o.length<3)return[];return[{outer:o,holes:t.slice(1).map(n).filter(e=>e.length>=3)}]})}function Pe(n){const a=i(t,n.cellCm),r=i(s,n.cellCm),c=i(l,n.cellCm),d=$(n.cache,n.source.key);let h=d.hit?d.value:void 0;if(!h){const i=n.source.build(),s=function(n,a=e,i=t){if(!Number.isFinite(i)||i<0)throw new Error("invalid wall height");const r=[],s=[],l=[],c=[];let d=0;for(let e=0;e<(n||[]).length;e++){const t=n[e],h=[];let p=-1/0;for(let n=0;n<(t||[]).length;n++){const s=N(t[n],n>0);if(s.length<3||Math.abs(j(s))<1e-9)continue;const f=C(s,a,i);r.push(f),h.push(f),p=Math.max(p,...s.map(e=>o(e,i,a)[1])),d+=s.length;for(let t=0;t<s.length;t++){const r=s[t],d=s[(t+1)%s.length],h=o(r,0,a),p=o(d,0,a);if(c.push(`M ${P(h)} L ${P(p)}`),O(r,d,a)<=1e-9)continue;const f=o(d,i,a),u=o(r,i,a),m=Object.freeze([h,p,f,u]);l.push({d:`M ${m.map(P).join(" L ")} Z`,points:m,depth:Math.max(h[1],p[1]),polygon:e,ring:n,edge:t})}}h.length&&s.push({d:h.join(" "),depth:p,component:e})}return l.sort((e,t)=>e.depth-t.depth||e.polygon-t.polygon||e.ring-t.ring||e.edge-t.edge),s.sort((e,t)=>e.depth-t.depth||e.component-t.component),{topPath:r.join(" "),topFaces:s,sides:l,contactPath:c.join(" "),edgeCount:d}}(i.walls,e,a),l=ze(i.walls,a);h={geometry:s,floor:B(i.floor,r),wallSilhouettes:Object.freeze([...l,...s.sides.map(e=>({outer:e.points}))]),openings:i.openings,openingSurfaces:i.openingSurfaces},S(n.cache,n.source.key,h,8)}const p=function(e){let t=1/0,o=1/0,n=-1/0,a=-1/0;const i=(e,i=0)=>{t=Math.min(t,e[0]-i),o=Math.min(o,e[1]-i),n=Math.max(n,e[0]+i),a=Math.max(a,e[1]+i)};for(const t of e)if("passage"!==t.type){i(t.axis.start),i(t.axis.end),i(t.face.selectedStart),i(t.face.selectedEnd),i(t.face.oppositeStart),i(t.face.oppositeEnd);for(const e of t.leaves){const o=Math.hypot(e.closedVector[0],e.closedVector[1])+t.leafThickness/2;i(e.hinge,o)}}return F([t,o,n,a])?{x:t,y:o,w:n-t,h:a-o}:null}(h.openings),f=p?je(n.liveFrame,p):n.liveFrame,u=k({rect:f,wallHeight:a,openingHeight:a,floorDepth:r,raisedHeight:c});return{key:n.source.key,...h,frame:u}}const je=(e,t)=>{const o=Math.min(e.x,t.x),n=Math.min(e.y,t.y);return{x:o,y:n,w:Math.max(e.x+e.w,t.x+t.w)-o,h:Math.max(e.y+e.h,t.y+t.h)-n}},Ne=e=>{if(!e.length||!e.every(e=>Number.isFinite(e[0])&&Number.isFinite(e[1])))return null;const t=e.map(e=>e[0]),o=e.map(e=>e[1]),n=Math.min(...t),a=Math.min(...o);return{x:n,y:a,w:Math.max(...t)-n,h:Math.max(...o)-a}},Ce=(e,t)=>{const o=e.placement,n=t?o.visualScene:o.raisedScene,[a,i]=e.screenHalfSize,r=t?o.plate:o.plate.map(e=>[e[0]-o.nudgeScene[0],e[1]-o.nudgeScene[1]]);return[o.floorScene,...r,[n[0]-a,n[1]-i],[n[0]+a,n[1]-i],[n[0]+a,n[1]+i],[n[0]-a,n[1]+i]]},Oe=(e,t)=>void 0===t?e:e.filter(e=>e.placement.owner?.id===t);function Be(e,t){return e?Ne(Oe(e.entries,t).flatMap(e=>Ce(e,!0))):null}function Ae(e){const t=Oe(e.entries,e.ownerId),o=Ne(t.flatMap(e=>Ce(e,!1))),n=o?je(e.baseBounds,o):e.baseBounds,a=e.targetView(n);if(!(a&&a.w>0&&a.h>0&&[a.x,a.y,a.w,a.h].every(Number.isFinite)))return null;const i=e.stageSize;if(!(o&&i&&i.width>0&&i.height>0))return{bounds:n,view:a};const r=e=>Math.max(e.w/i.width,e.h/i.height),s=t=>{const n=48*t,a={x:o.x-n,y:o.y-n,w:o.w+2*n,h:o.h+2*n},i=je(e.baseBounds,a),r=e.targetView(i);return r&&[r.x,r.y,r.w,r.h].every(Number.isFinite)&&r.w>0&&r.h>0?{bounds:i,view:r}:null};let l=0,c=Math.max(r(a),Number.EPSILON),d=s(c);for(let e=0;d&&r(d.view)>c*(1+1e-10)&&e<24;e++)l=c,c*=2,d=s(c);if(!d)return null;for(let e=0;e<40;e++){const e=(l+c)/2,t=s(e);if(!t)return null;r(t.view)<=e?(c=e,d=t):l=e}return d}const Te=new WeakMap;function Fe(e){const t=Te.get(e.rooms);if(t)return t;const o=e.rooms.flatMap((e,t)=>{const o=y(e);return o&&o.length>=3?[{room:e,index:t,poly:o}]:[]}),n=Object.freeze(o.map(({room:e,index:t,poly:n})=>{const a=x(n,o.filter(e=>e.index!==t).map(e=>e.poly)),i={id:e.id||`room-index-${t}`,outer:n.map(e=>[e[0],e[1]]),holes:a.map(e=>e.map(e=>[e[0],e[1]]))};return{room:e,overlayRoom:{...i,safePoint:ne(i)||void 0}}}));return Te.set(e.rooms,n),n}function He(e){const o=e.stageSize&&e.stageSize.width>0&&e.stageSize.height>0?Math.max(e.view.w/e.stageSize.width,e.view.h/e.stageSize.height):Math.max(e.view.w,e.view.h)/1e3,n=Fe(e.space),s=n.map(e=>e.overlayRoom),l=i(t,e.cellCm),c=i(a,e.cellCm),d=new Map,h=new Map,p=new Map,f=[],u=e.iconPct*r(e.space)*e.kioskIconScale/100,m=e.deviceBasePct*r(e.space)*e.kioskIconScale/100,g=(t,n,a,i,r,d=!1)=>pe({kind:t,floorAnchor:a,rooms:s,preferredRoomId:r,showBorders:!0,wallSilhouettes:e.wallSilhouettes,plateHalfSize:i,wallHeight:l,visualOffset:c,sceneUnitsPerCssPixel:o,filtersSupported:e.layers.shadows,hovered:!0,selected:d});for(const t of e.devices){const o=e.positionOf(t),a=e.presentationOf(t,e.showLqi),i=m*a.scale,r=be({kind:"device",core:i,presentation:a}),s=t.marker?.room_id||n.find(e=>!!t.area&&e.room.area===t.area)?.overlayRoom.id||null,l=g("device",t.id,[o.x,o.y],r,s,e.selectedDeviceId===t.id);d.set(t.id,l),f.push({id:t.id,kind:"device",placement:l,groundRadius:Math.max(.32*i,2),screenHalfSize:r})}for(const{room:t,overlayRoom:o}of n){if(!e.display.showNames||!t.name)continue;const n=e.labelPositionOf(t,e.space.id),a=.5*u*(e.labelScaleOf(t)*e.kioskFontScale*e.display.cardFontScale),i=be({kind:"room-label",font:a,room:t,display:e.display}),r=g("room-label",o.id,[n.x,n.y],i,o.id,e.focusedRoomId===t.id);h.set(t,r),f.push({id:o.id,kind:"room-label",placement:r,groundRadius:Math.max(.75*a,2),screenHalfSize:i})}const y=e.openings.filter(t=>!t.orphanReason&&("door"===t.type||"gate"===t.type)&&"string"==typeof t.lock&&!!t.lock&&e.openingEntityAvailable(t.lock));if(y.length){const t=e.openingWallIndex();for(const o of y){const n=Le(o,t,e.cellCm),a=n.floorAnchor,i=.62*u,r=be({kind:"opening-lock",size:i}),s=g("opening-lock",String(o.id),a,r,n.preferredRoomId,e.selectedOpeningId===o.id);p.set(String(o.id),s),f.push({id:String(o.id),kind:"opening-lock",placement:s,groundRadius:Math.max(.28*i,2),screenHalfSize:r})}}return{devices:d,rooms:h,locks:p,entries:Object.freeze(f)}}function Re(e,t,o){return Le(e,t,o).floorAnchor}function Le(e,t,o){const n=!e.flip_v,a="gate"===e.type?e.partitionHost?u(e.partitionHost,n):f(t,{x:e.rx,y:e.ry,angle:e.angle,length:e.rlen,flip_v:n}):null,[i,r]=m({x:e.rx,y:e.ry,angle:e.angle,flipV:!!e.flip_v,gateFace:a},o);if(e.partitionHost)return{floorAnchor:i,preferredRoomId:null};const s=g(t,{x:e.rx,y:e.ry,angle:e.angle,length:e.rlen},!0),l=r?"negative":"positive";return{floorAnchor:i,preferredRoomId:s[l]?.roomId||null}}function Ge(e){let t=!1;try{t="undefined"!=typeof CSS&&"function"==typeof CSS.supports&&CSS.supports("filter","blur(1px)")}catch{t=!1}let o=!1;try{o="function"==typeof matchMedia&&matchMedia("(forced-colors: active)").matches}catch{o=!0}return function(e){const t=!!e.showBorders;return{structural:t,panels:t&&!e.hideOpenings,shadows:t&&e.filtersSupported&&!e.forcedColors,materialNuance:t&&e.filtersSupported&&!e.forcedColors,floorSymbols:!e.hideOpenings&&!t}}({showBorders:e.showBorders,hideOpenings:e.hideOpenings,filtersSupported:t,forcedColors:o})}function Ve(e,t,o,n){if(!e.panels||!t)return[];return t.openings.flatMap(e=>{const t=o[e.sourceIndex];return t?_(e,n(t)):[]}).sort((e,t)=>e.depth-t.depth||e.sourceIndex-t.sourceIndex||e.leaf-t.leaf)}function Ee(e){const t=Ge(e.display),o=t.panels?Ve(t,e.scene,e.openings,e.amountOf):[],n=e.overlays(t),a=t=>({layers:t,panels:o,overlays:n,underlay:Ke(t,e.scene?.floor,e.cellCm),shadows:Ze(t,o,e.scene?.geometry,e.cellCm),walls:Je(e.projection,t,e.scene,o,e.cellCm),grounds:_e(n,t,e.cellCm),raised:Ue(n,t)});try{return a(t)}catch(e){if(!t.shadows&&!t.materialNuance)throw e;return a({...t,shadows:!1,materialNuance:!1})}}const We=()=>M``;function qe(e){return`translate(${i(4,e)} ${i(8,e)})`}function De(e,t,o){const n=z(o);return M`<defs>
|
|
${"walls"===t&&e.materialNuance?M`
|
|
<linearGradient id="hp-iso-wall-side" data-hp-iso-material-def x1="0" y1="0" x2="0" y2="1">
|
|
<stop offset="0" class="iso-side-hi"></stop><stop offset="1" class="iso-side-lo"></stop>
|
|
</linearGradient>
|
|
<linearGradient id="hp-iso-wall-top" data-hp-iso-material-def x1="0" y1="0" x2="1" y2="1">
|
|
<stop offset="0" class="iso-top-hi"></stop><stop offset="1" class="iso-top-lo"></stop>
|
|
</linearGradient>
|
|
<pattern id="hp-iso-wall-texture" data-hp-iso-material-def patternUnits="userSpaceOnUse"
|
|
width="${12*n}" height="${12*n}">
|
|
<circle class="iso-texture-mark" cx="${2*n}" cy="${2*n}"
|
|
r="${.55*n}"></circle>
|
|
<path class="iso-texture-line" d="M ${5*n} ${10*n}
|
|
l ${5*n} ${-5*n}"></path>
|
|
</pattern>`:b}
|
|
${"underlay"===t&&e.materialNuance?M`
|
|
<pattern id="hp-iso-floor-texture" data-hp-iso-material-def patternUnits="userSpaceOnUse"
|
|
width="${14*n}" height="${14*n}">
|
|
<circle class="iso-texture-mark" cx="${3*n}" cy="${3*n}"
|
|
r="${.5*n}"></circle>
|
|
</pattern>`:b}
|
|
${"underlay"===t&&e.shadows?M`
|
|
<filter id="hp-iso-ambient-shadow" data-hp-iso-material-def x="-12%" y="-12%" width="124%" height="130%">
|
|
<feGaussianBlur stdDeviation="${7*n}"></feGaussianBlur>
|
|
</filter>`:b}
|
|
${"shadows"===t&&e.shadows?M`
|
|
<filter id="hp-iso-contact-shadow" data-hp-iso-material-def x="-8%" y="-20%" width="116%" height="140%">
|
|
<feGaussianBlur stdDeviation="${2.5*n}"></feGaussianBlur>
|
|
</filter>
|
|
<filter id="hp-iso-leaf-shadow" data-hp-iso-material-def x="-12%" y="-30%" width="124%" height="160%">
|
|
<feGaussianBlur stdDeviation="${2*n}"></feGaussianBlur>
|
|
</filter>`:b}
|
|
${"overlays"===t&&e.shadows?M`
|
|
<filter id="hp-iso-overlay-ground" data-hp-iso-material-def x="-45%" y="-80%" width="190%" height="260%">
|
|
<feGaussianBlur stdDeviation="${3*n}"></feGaussianBlur>
|
|
</filter>`:b}
|
|
${"overlays"===t&&e.materialNuance?M`
|
|
<pattern id="hp-iso-overlay-texture" data-hp-iso-material-def patternUnits="userSpaceOnUse"
|
|
width="${10*n}" height="${10*n}">
|
|
<circle class="iso-texture-mark" cx="${2.5*n}" cy="${2.5*n}"
|
|
r="${.45*n}"></circle>
|
|
</pattern>`:b}
|
|
</defs>`}function _e(e,t,o){return e?M`${De(t,"overlays",o)}
|
|
<g class="iso-overlay-grounds" data-hp="iso-overlay-grounds"
|
|
aria-hidden="true" pointer-events="none">${e.entries.map(e=>{if(!t.shadows||!e.placement.grounding.visible)return b;const[n,a]=e.placement.grounding.center;return M`<ellipse class="iso-overlay-ground"
|
|
data-hp-iso-overlay-kind=${e.kind} data-id=${e.id}
|
|
cx=${n} cy=${a} rx=${e.groundRadius} ry=${Math.max(1,.32*e.groundRadius)}
|
|
transform=${qe(o)}></ellipse>`})}</g>`:We()}function Ue(e,t){return e?M`<g class="iso-raised-overlays" data-hp="iso-raised-overlays"
|
|
aria-hidden="true" pointer-events="none">
|
|
<g class="iso-overlay-tethers">${e.entries.map(e=>{const t=e.placement.tether;return t.visible?M`<line class="iso-overlay-tether"
|
|
data-hp-iso-overlay-kind=${e.kind} data-id=${e.id}
|
|
x1=${t.from[0]} y1=${t.from[1]}
|
|
x2=${t.to[0]} y2=${t.to[1]}></line>`:b})}</g>
|
|
<g class="iso-overlay-plates">${e.entries.map(e=>{const o=e.placement.plate.map(e=>`${e[0]},${e[1]}`).join(" ");return o?M`<g data-hp-iso-overlay-kind=${e.kind} data-id=${e.id}
|
|
data-hp-iso-raised="true" data-hp-iso-nudged=${String(e.placement.nudged)}>
|
|
<polygon class="iso-overlay-plate iso-overlay-${e.kind}" points=${o}></polygon>
|
|
${t.materialNuance?M`<polygon class="iso-overlay-plate-texture" points=${o}></polygon>`:b}
|
|
</g>`:b})}</g>
|
|
</g>`:We()}function Ke(e,t,o){return e.structural&&t?M`<g class="iso-underlay" data-hp="iso-underlay" aria-hidden="true" pointer-events="none">
|
|
${De(e,"underlay",o)}
|
|
${e.shadows&&t.footprintPath?M`<path class="iso-ambient-shadow" d=${t.footprintPath}
|
|
transform=${qe(o)}></path>`:b}
|
|
<g class="iso-floor-edge">${t.sides.map(t=>M`<path class="iso-floor-side" d=${t.d} data-component=${t.component}
|
|
data-edge=${t.edge}></path>${e.materialNuance?M`<path class="iso-material-texture iso-floor-texture" d=${t.d}></path>`:b}`)}</g>
|
|
</g>`:We()}function Ze(e,t,o,n){return e.shadows&&o?M`<g class="iso-shadows" data-hp="iso-shadows" aria-hidden="true" pointer-events="none">
|
|
${De(e,"shadows",n)}
|
|
<path class="iso-contact-shadow" d=${o.contactPath}
|
|
transform=${qe(n)}></path>
|
|
<g class="iso-leaf-shadows">${t.map(e=>M`<path class="iso-leaf-shadow" d=${e.shadowD}
|
|
data-id=${e.id} data-leaf=${e.leaf}
|
|
transform=${qe(n)}></path>`)}</g>
|
|
</g>`:We()}function Je(e,t,o,n,a){if("iso"!==e||!t.structural||!o)return We();const i=t.panels?[...o.openingSurfaces,...n.flatMap(e=>e.surfaces.map(t=>({...t,id:e.id,sourceIndex:e.sourceIndex,type:e.type,leaf:e.leaf})))]:[],r=ge(o.geometry,i);return M`<g class="iso-walls" data-hp="iso-walls" data-fingerprint=${o.key}>
|
|
${De(t,"walls",a)}
|
|
<g class=${t.panels?"iso-wall-depth-queue iso-openings":"iso-wall-depth-queue"}
|
|
data-hp=${t.panels?"iso-openings":b}
|
|
aria-hidden="true" pointer-events="none">${r.map(e=>{if("wall-side"===e.layer){const o=e.face;return M`<path class="iso-wall-side" d=${o.d} data-edge=${o.edge}></path>${t.materialNuance?M`<path class="iso-material-texture iso-wall-texture" d=${o.d}></path>`:b}`}if("wall-top"===e.layer){const o=e.face;return M`<path class="iso-wall-top" d=${o.d} data-component=${o.component}
|
|
fill-rule="evenodd"></path>${t.materialNuance?M`<path class="iso-material-texture iso-wall-texture" d=${o.d}
|
|
fill-rule="evenodd"></path>`:b}`}const o=e.surface;return M`<path class="iso-opening-panel iso-${o.type} iso-opening-${o.kind} iso-material-${o.material}"
|
|
d=${o.d} data-id=${o.id} data-kind=${o.type}
|
|
data-surface=${o.kind} data-leaf=${o.leaf??b}></path>${t.materialNuance?M`<path class="iso-material-texture iso-wall-texture iso-opening-texture"
|
|
d=${o.d}></path>`:b}`})}</g>
|
|
</g>`}export{ye as ISO_RAISED_FOOTPRINT,fe as ISO_SCENE_RUNTIME_FINGERPRINT,He as buildIsoOverlayRenderScene,ge as buildIsoWallDepthQueue,ke as createIsoStructuralSource,qe as isoFixedLightTransform,Re as isoOpeningLockAnchor,Le as isoOpeningLockPlacement,Fe as isoOverlayRooms,Be as isoOverlaySceneBounds,be as isoRaisedOverlayHalfSize,Me as isoSourceOpenings,Se as isoStructuralOpeningHost,$e as isoStructuralRoomGeometry,ze as isoWallSilhouettesOf,_e as renderIsoOverlayGrounds,Ue as renderIsoRaisedOverlays,Ze as renderIsoShadows,Ke as renderIsoUnderlay,Je as renderIsoWalls,Ge as resolveIsoDecorationLayers,Ee as resolveIsoFramePresentation,Ve as resolveIsoOpeningPanels,Ae as resolveIsoOverlayFitEnvelope,Pe as resolveIsoScene};
|