@arach/arc-iso 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- (function(K,G){typeof exports=="object"&&typeof module<"u"?G(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],G):(K=typeof globalThis<"u"?globalThis:K||self,G(K.ArcIso={},K.React))})(this,(function(K,G){"use strict";const gt=30*(Math.PI/180),Wt=Math.cos(gt),Nt=Math.sin(gt);function m(t,o,a=0){return{screenX:(t-o)*Wt,screenY:-(t+o)*Nt-a}}function et(t,o,a,i=0,s=0,f=0){const x={frontBottom:m(t,0,0),rightBottom:m(t,o,0),backBottom:m(0,o,0),leftBottom:m(0,0,0),frontTop:m(t,0,a),rightTop:m(t,o,a),backTop:m(0,o,a),leftTop:m(0,0,a)},b=$=>({x:$.screenX+i,y:$.screenY+s}),k=Object.fromEntries(Object.entries(x).map(([$,w])=>[$,b(w)])),u=($,w,A,v)=>{if(v<=0){const H=m(0,0,A),z=m($,0,A),T=m($,w,A),B=m(0,w,A);return`M ${H.screenX+i},${H.screenY+s} L ${z.screenX+i},${z.screenY+s} L ${T.screenX+i},${T.screenY+s} L ${B.screenX+i},${B.screenY+s} Z`}const F=Math.min($,w)/2,Y=Math.min(v,F),P=8,L=[],Z=(H,z,T,B)=>{for(let J=0;J<=P;J++){const E=T+(B-T)*(J/P),p=H+Y*Math.cos(E),n=z+Y*Math.sin(E),h=m(p,n,A);L.push(`${h.screenX+i},${h.screenY+s}`)}};return Z(Y,Y,Math.PI,Math.PI*1.5),Z($-Y,Y,Math.PI*1.5,Math.PI*2),Z($-Y,w-Y,0,Math.PI*.5),Z(Y,w-Y,Math.PI*.5,Math.PI),`M ${L[0]} L ${L.slice(1).join(" L ")} Z`},l=$=>`M ${$.map(w=>`${w.x},${w.y}`).join(" L ")} Z`,O=($,w,A,v,F,Y)=>{const L=[];for(let T=0;T<6;T++){const B=F+(Y-F)*(T/6),J=F+(Y-F)*((T+1)/6),E=(B+J)/2,p=Math.cos(E),n=Math.sin(E),M=p*-.577+n*-.577+0*.577,nt=.3+Math.max(0,M+.4)*.5,ot=m($+A*Math.cos(B),w+A*Math.sin(B),0),W=m($+A*Math.cos(J),w+A*Math.sin(J),0),Q=m($+A*Math.cos(B),w+A*Math.sin(B),v),tt=m($+A*Math.cos(J),w+A*Math.sin(J),v),ft=`M ${ot.screenX+i},${ot.screenY+s} L ${W.screenX+i},${W.screenY+s} L ${tt.screenX+i},${tt.screenY+s} L ${Q.screenX+i},${Q.screenY+s} Z`;L.push({path:ft,intensity:nt})}return L},d=Math.min(f,Math.min(t,o)/2),c=u(t,o,a,d);let S,y,_,g,C,N;if(d>0){const $=[{x:m(0,d,0).screenX+i,y:m(0,d,0).screenY+s},{x:m(0,o-d,0).screenX+i,y:m(0,o-d,0).screenY+s},{x:m(0,o-d,a).screenX+i,y:m(0,o-d,a).screenY+s},{x:m(0,d,a).screenX+i,y:m(0,d,a).screenY+s}];S=l($);const w=[{x:m(d,0,0).screenX+i,y:m(d,0,0).screenY+s},{x:m(t-d,0,0).screenX+i,y:m(t-d,0,0).screenY+s},{x:m(t-d,0,a).screenX+i,y:m(t-d,0,a).screenY+s},{x:m(d,0,a).screenX+i,y:m(d,0,a).screenY+s}];y=l(w),_=O(d,d,d,a,Math.PI,Math.PI*1.5),g=O(t-d,d,d,a,Math.PI*1.5,Math.PI*2),C=O(d,o-d,d,a,Math.PI*.5,Math.PI),N=O(t-d,o-d,d,a,0,Math.PI*.5)}else{const $=[k.leftBottom,k.backBottom,k.backTop,k.leftTop],w=[k.leftBottom,k.frontBottom,k.frontTop,k.leftTop];S=l($),y=l(w),_=[],g=[],C=[],N=[]}const R=`M ${k.leftBottom.x},${k.leftBottom.y} L ${k.frontBottom.x},${k.frontBottom.y} L ${k.rightBottom.x},${k.rightBottom.y} L ${k.backBottom.x},${k.backBottom.y} Z`;return{top:c,left:S,right:y,cornerFrontLeft:_,cornerFrontRight:g,cornerBackLeft:C,cornerBackRight:N,outline:R}}function It(t,o=60,a=50){return{top:`hsl(${t}, ${o}%, ${Math.min(a+15,95)}%)`,right:`hsl(${t}, ${o}%, ${a}%)`,left:`hsl(${t}, ${o}%, ${Math.max(a-15,15)}%)`}}const $t={violet:{hue:270,saturation:60,lightness:55},blue:{hue:220,saturation:70,lightness:50},cyan:{hue:190,saturation:80,lightness:45},emerald:{hue:155,saturation:65,lightness:45},amber:{hue:40,saturation:90,lightness:50},rose:{hue:350,saturation:70,lightness:55},slate:{hue:220,saturation:15,lightness:50},zinc:{hue:240,saturation:5,lightness:50}};function Ft(t){const o=$t[t]||$t.slate;return It(o.hue,o.saturation,o.lightness)}var ht={exports:{}},it={};var jt;function Bt(){if(jt)return it;jt=1;var t=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function a(i,s,f){var x=null;if(f!==void 0&&(x=""+f),s.key!==void 0&&(x=""+s.key),"key"in s){f={};for(var b in s)b!=="key"&&(f[b]=s[b])}else f=s;return s=f.ref,{$$typeof:t,type:i,key:x,ref:s!==void 0?s:null,props:f}}return it.Fragment=o,it.jsx=a,it.jsxs=a,it}var ct={};var St;function Dt(){return St||(St=1,process.env.NODE_ENV!=="production"&&(function(){function t(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===P?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case _:return"Fragment";case C:return"Profiler";case g:return"StrictMode";case w:return"Suspense";case A:return"SuspenseList";case Y:return"Activity"}if(typeof n=="object")switch(typeof n.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case y:return"Portal";case R:return n.displayName||"Context";case N:return(n._context.displayName||"Context")+".Consumer";case $:var h=n.render;return n=n.displayName,n||(n=h.displayName||h.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case v:return h=n.displayName||null,h!==null?h:t(n.type)||"Memo";case F:h=n._payload,n=n._init;try{return t(n(h))}catch{}}return null}function o(n){return""+n}function a(n){try{o(n);var h=!1}catch{h=!0}if(h){h=console;var M=h.error,I=typeof Symbol=="function"&&Symbol.toStringTag&&n[Symbol.toStringTag]||n.constructor.name||"Object";return M.call(h,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",I),o(n)}}function i(n){if(n===_)return"<>";if(typeof n=="object"&&n!==null&&n.$$typeof===F)return"<...>";try{var h=t(n);return h?"<"+h+">":"<...>"}catch{return"<...>"}}function s(){var n=L.A;return n===null?null:n.getOwner()}function f(){return Error("react-stack-top-frame")}function x(n){if(Z.call(n,"key")){var h=Object.getOwnPropertyDescriptor(n,"key").get;if(h&&h.isReactWarning)return!1}return n.key!==void 0}function b(n,h){function M(){T||(T=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",h))}M.isReactWarning=!0,Object.defineProperty(n,"key",{get:M,configurable:!0})}function k(){var n=t(this.type);return B[n]||(B[n]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),n=this.props.ref,n!==void 0?n:null}function u(n,h,M,I,nt,ot){var W=M.ref;return n={$$typeof:S,type:n,key:h,props:M,_owner:I},(W!==void 0?W:null)!==null?Object.defineProperty(n,"ref",{enumerable:!1,get:k}):Object.defineProperty(n,"ref",{enumerable:!1,value:null}),n._store={},Object.defineProperty(n._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(n,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(n,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:nt}),Object.defineProperty(n,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ot}),Object.freeze&&(Object.freeze(n.props),Object.freeze(n)),n}function l(n,h,M,I,nt,ot){var W=h.children;if(W!==void 0)if(I)if(H(W)){for(I=0;I<W.length;I++)O(W[I]);Object.freeze&&Object.freeze(W)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else O(W);if(Z.call(h,"key")){W=t(n);var Q=Object.keys(h).filter(function(ft){return ft!=="key"});I=0<Q.length?"{key: someKey, "+Q.join(": ..., ")+": ...}":"{key: someKey}",p[W+I]||(Q=0<Q.length?"{"+Q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
1
+ (function(K,H){typeof exports=="object"&&typeof module<"u"?H(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],H):(K=typeof globalThis<"u"?globalThis:K||self,H(K.ArcIso={},K.React))})(this,(function(K,H){"use strict";const gt=30*(Math.PI/180),Wt=Math.cos(gt),It=Math.sin(gt);function m(t,o,a=0){return{screenX:(t-o)*Wt,screenY:-(t+o)*It-a}}function et(t,o,a,i=0,s=0,f=0){const x={frontBottom:m(t,0,0),rightBottom:m(t,o,0),backBottom:m(0,o,0),leftBottom:m(0,0,0),frontTop:m(t,0,a),rightTop:m(t,o,a),backTop:m(0,o,a),leftTop:m(0,0,a)},b=$=>({x:$.screenX+i,y:$.screenY+s}),k=Object.fromEntries(Object.entries(x).map(([$,w])=>[$,b(w)])),u=($,w,P,E)=>{if(E<=0){const G=m(0,0,P),z=m($,0,P),T=m($,w,P),D=m(0,w,P);return`M ${G.screenX+i},${G.screenY+s} L ${z.screenX+i},${z.screenY+s} L ${T.screenX+i},${T.screenY+s} L ${D.screenX+i},${D.screenY+s} Z`}const F=Math.min($,w)/2,Y=Math.min(E,F),A=8,L=[],Z=(G,z,T,D)=>{for(let J=0;J<=A;J++){const v=T+(D-T)*(J/A),p=G+Y*Math.cos(v),n=z+Y*Math.sin(v),h=m(p,n,P);L.push(`${h.screenX+i},${h.screenY+s}`)}};return Z(Y,Y,Math.PI,Math.PI*1.5),Z($-Y,Y,Math.PI*1.5,Math.PI*2),Z($-Y,w-Y,0,Math.PI*.5),Z(Y,w-Y,Math.PI*.5,Math.PI),`M ${L[0]} L ${L.slice(1).join(" L ")} Z`},l=$=>`M ${$.map(w=>`${w.x},${w.y}`).join(" L ")} Z`,O=($,w,P,E,F,Y)=>{const L=[];for(let T=0;T<6;T++){const D=F+(Y-F)*(T/6),J=F+(Y-F)*((T+1)/6),v=(D+J)/2,p=Math.cos(v),n=Math.sin(v),R=p*-.577+n*-.577+0*.577,nt=.3+Math.max(0,R+.4)*.5,ot=m($+P*Math.cos(D),w+P*Math.sin(D),0),N=m($+P*Math.cos(J),w+P*Math.sin(J),0),Q=m($+P*Math.cos(D),w+P*Math.sin(D),E),tt=m($+P*Math.cos(J),w+P*Math.sin(J),E),ft=`M ${ot.screenX+i},${ot.screenY+s} L ${N.screenX+i},${N.screenY+s} L ${tt.screenX+i},${tt.screenY+s} L ${Q.screenX+i},${Q.screenY+s} Z`;L.push({path:ft,intensity:nt})}return L},d=Math.min(f,Math.min(t,o)/2),c=u(t,o,a,d);let S,y,M,g,C,W;if(d>0){const $=[{x:m(0,d,0).screenX+i,y:m(0,d,0).screenY+s},{x:m(0,o-d,0).screenX+i,y:m(0,o-d,0).screenY+s},{x:m(0,o-d,a).screenX+i,y:m(0,o-d,a).screenY+s},{x:m(0,d,a).screenX+i,y:m(0,d,a).screenY+s}];S=l($);const w=[{x:m(d,0,0).screenX+i,y:m(d,0,0).screenY+s},{x:m(t-d,0,0).screenX+i,y:m(t-d,0,0).screenY+s},{x:m(t-d,0,a).screenX+i,y:m(t-d,0,a).screenY+s},{x:m(d,0,a).screenX+i,y:m(d,0,a).screenY+s}];y=l(w),M=O(d,d,d,a,Math.PI,Math.PI*1.5),g=O(t-d,d,d,a,Math.PI*1.5,Math.PI*2),C=O(d,o-d,d,a,Math.PI*.5,Math.PI),W=O(t-d,o-d,d,a,0,Math.PI*.5)}else{const $=[k.leftBottom,k.backBottom,k.backTop,k.leftTop],w=[k.leftBottom,k.frontBottom,k.frontTop,k.leftTop];S=l($),y=l(w),M=[],g=[],C=[],W=[]}const _=`M ${k.leftBottom.x},${k.leftBottom.y} L ${k.frontBottom.x},${k.frontBottom.y} L ${k.rightBottom.x},${k.rightBottom.y} L ${k.backBottom.x},${k.backBottom.y} Z`;return{top:c,left:S,right:y,cornerFrontLeft:M,cornerFrontRight:g,cornerBackLeft:C,cornerBackRight:W,outline:_}}function Ft(t,o=60,a=50){return{top:`hsl(${t}, ${o}%, ${Math.min(a+15,95)}%)`,right:`hsl(${t}, ${o}%, ${a}%)`,left:`hsl(${t}, ${o}%, ${Math.max(a-15,15)}%)`}}const $t={violet:{hue:270,saturation:60,lightness:55},blue:{hue:220,saturation:70,lightness:50},cyan:{hue:190,saturation:80,lightness:45},emerald:{hue:155,saturation:65,lightness:45},amber:{hue:40,saturation:90,lightness:50},rose:{hue:350,saturation:70,lightness:55},slate:{hue:220,saturation:15,lightness:50},zinc:{hue:240,saturation:5,lightness:50}};function Dt(t){const o=$t[t]||$t.slate;return Ft(o.hue,o.saturation,o.lightness)}var ht={exports:{}},it={};var jt;function Bt(){if(jt)return it;jt=1;var t=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function a(i,s,f){var x=null;if(f!==void 0&&(x=""+f),s.key!==void 0&&(x=""+s.key),"key"in s){f={};for(var b in s)b!=="key"&&(f[b]=s[b])}else f=s;return s=f.ref,{$$typeof:t,type:i,key:x,ref:s!==void 0?s:null,props:f}}return it.Fragment=o,it.jsx=a,it.jsxs=a,it}var ct={};var St;function Xt(){return St||(St=1,process.env.NODE_ENV!=="production"&&(function(){function t(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===A?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case M:return"Fragment";case C:return"Profiler";case g:return"StrictMode";case w:return"Suspense";case P:return"SuspenseList";case Y:return"Activity"}if(typeof n=="object")switch(typeof n.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case y:return"Portal";case _:return n.displayName||"Context";case W:return(n._context.displayName||"Context")+".Consumer";case $:var h=n.render;return n=n.displayName,n||(n=h.displayName||h.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case E:return h=n.displayName||null,h!==null?h:t(n.type)||"Memo";case F:h=n._payload,n=n._init;try{return t(n(h))}catch{}}return null}function o(n){return""+n}function a(n){try{o(n);var h=!1}catch{h=!0}if(h){h=console;var R=h.error,I=typeof Symbol=="function"&&Symbol.toStringTag&&n[Symbol.toStringTag]||n.constructor.name||"Object";return R.call(h,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",I),o(n)}}function i(n){if(n===M)return"<>";if(typeof n=="object"&&n!==null&&n.$$typeof===F)return"<...>";try{var h=t(n);return h?"<"+h+">":"<...>"}catch{return"<...>"}}function s(){var n=L.A;return n===null?null:n.getOwner()}function f(){return Error("react-stack-top-frame")}function x(n){if(Z.call(n,"key")){var h=Object.getOwnPropertyDescriptor(n,"key").get;if(h&&h.isReactWarning)return!1}return n.key!==void 0}function b(n,h){function R(){T||(T=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",h))}R.isReactWarning=!0,Object.defineProperty(n,"key",{get:R,configurable:!0})}function k(){var n=t(this.type);return D[n]||(D[n]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),n=this.props.ref,n!==void 0?n:null}function u(n,h,R,I,nt,ot){var N=R.ref;return n={$$typeof:S,type:n,key:h,props:R,_owner:I},(N!==void 0?N:null)!==null?Object.defineProperty(n,"ref",{enumerable:!1,get:k}):Object.defineProperty(n,"ref",{enumerable:!1,value:null}),n._store={},Object.defineProperty(n._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(n,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(n,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:nt}),Object.defineProperty(n,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ot}),Object.freeze&&(Object.freeze(n.props),Object.freeze(n)),n}function l(n,h,R,I,nt,ot){var N=h.children;if(N!==void 0)if(I)if(G(N)){for(I=0;I<N.length;I++)O(N[I]);Object.freeze&&Object.freeze(N)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else O(N);if(Z.call(h,"key")){N=t(n);var Q=Object.keys(h).filter(function(ft){return ft!=="key"});I=0<Q.length?"{key: someKey, "+Q.join(": ..., ")+": ...}":"{key: someKey}",p[N+I]||(Q=0<Q.length?"{"+Q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
2
  let props = %s;
3
3
  <%s {...props} />
4
4
  React keys must be passed directly to JSX without using spread:
5
5
  let props = %s;
6
- <%s key={someKey} {...props} />`,I,W,Q,W),p[W+I]=!0)}if(W=null,M!==void 0&&(a(M),W=""+M),x(h)&&(a(h.key),W=""+h.key),"key"in h){M={};for(var tt in h)tt!=="key"&&(M[tt]=h[tt])}else M=h;return W&&b(M,typeof n=="function"?n.displayName||n.name||"Unknown":n),u(n,W,M,s(),nt,ot)}function O(n){d(n)?n._store&&(n._store.validated=1):typeof n=="object"&&n!==null&&n.$$typeof===F&&(n._payload.status==="fulfilled"?d(n._payload.value)&&n._payload.value._store&&(n._payload.value._store.validated=1):n._store&&(n._store.validated=1))}function d(n){return typeof n=="object"&&n!==null&&n.$$typeof===S}var c=G,S=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),R=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),P=Symbol.for("react.client.reference"),L=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=Object.prototype.hasOwnProperty,H=Array.isArray,z=console.createTask?console.createTask:function(){return null};c={react_stack_bottom_frame:function(n){return n()}};var T,B={},J=c.react_stack_bottom_frame.bind(c,f)(),E=z(i(f)),p={};ct.Fragment=_,ct.jsx=function(n,h,M){var I=1e4>L.recentlyCreatedOwnerStacks++;return l(n,h,M,!1,I?Error("react-stack-top-frame"):J,I?z(i(n)):E)},ct.jsxs=function(n,h,M){var I=1e4>L.recentlyCreatedOwnerStacks++;return l(n,h,M,!0,I?Error("react-stack-top-frame"):J,I?z(i(n)):E)}})()),ct}var Tt;function Xt(){return Tt||(Tt=1,process.env.NODE_ENV==="production"?ht.exports=Bt():ht.exports=Dt()),ht.exports}var e=Xt();const kt='"JetBrains Mono", "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace',zt=.78,r=t=>Math.round(t*zt*10)/10,vt={id:"solid",name:"Solid",description:"Shaded isometric boxes",technical:!1,paper:{from:"transparent",to:"transparent",edge:"transparent",grid:"transparent",grain:0},ink:{line:"rgba(0,0,0,0.3)",hidden:"rgba(0,0,0,0.2)",hatch:"transparent",text:"#ffffff",muted:"rgba(255,255,255,0.6)",accent:"#3b82f6"},face:{top:"transparent",right:"transparent",left:"transparent"},hatchOpacity:{top:0,right:0,left:0},font:kt,strokeWidth:.5},Ut={solid:vt,blueprint:{id:"blueprint",name:"Blueprint",description:"Sepia engineering plate on parchment",technical:!0,paper:{from:"#f0e6d0",to:"#ddceac",edge:"#b09a74",grid:"#c6b48f",grain:.055},ink:{line:"#4a3826",hidden:"#96805f",hatch:"#6d563c",text:"#3b2c1d",muted:"#8a7455",accent:"#a8412a"},face:{top:"#f4ebd7",right:"#e6dabb",left:"#d6c6a2"},hatchOpacity:{top:.3,right:.55,left:.85},font:kt,strokeWidth:1},cyanotype:{id:"cyanotype",name:"Cyanotype",description:"White linework on classic blueprint blue",technical:!0,paper:{from:"#123256",to:"#0b1f3a",edge:"#3f6d9f",grid:"#27507f",grain:.07},ink:{line:"#e6f0fb",hidden:"#78a2cc",hatch:"#a6c6e5",text:"#f2f8ff",muted:"#8fb2d6",accent:"#ffc857"},face:{top:"#1b4675",right:"#153a61",left:"#0f2b49"},hatchOpacity:{top:.28,right:.5,left:.78},font:kt,strokeWidth:1}};function Gt(t){return Ut[t]||vt}const Ht={violet:"cross",blue:"lines",sky:"lines",cyan:"dashes",emerald:"dots",amber:"dense",orange:"dense",rose:"cross",zinc:"plain",slate:"plain"};function Et(t){return Ht[t||"zinc"]||"lines"}const Jt={plain:"PLAIN",lines:"HATCH-A",cross:"HATCH-X",dense:"HATCH-D",dots:"STIPPLE",dashes:"BROKEN"};function wt(t,o,a,i=0,s=0){const f=(g,C,N)=>{const R=m(g,C,N);return{x:R.screenX+i,y:R.screenY+s}},x=f(0,0,0),b=f(t,0,0),k=f(t,o,0),u=f(0,o,0),l=f(0,0,a),O=f(t,0,a),d=f(t,o,a),c=f(0,o,a),S=g=>`M ${g.map(C=>`${C.x},${C.y}`).join(" L ")} Z`,y=(g,C)=>`M ${g.x},${g.y} L ${C.x},${C.y}`,_=[x,b,k,u,l,O,d,c];return{top:S([l,O,d,c]),right:S([x,b,O,l]),left:S([x,u,c,l]),visible:[S([x,b,O,d,c,u]),y(l,O),y(l,c),y(l,x)].join(" "),hidden:[y(k,b),y(k,u),y(k,d)].join(" "),topCenter:{x:(l.x+d.x)/2,y:(l.y+d.y)/2},topApex:{x:d.x,y:d.y},minX:Math.min(..._.map(g=>g.x)),minY:Math.min(..._.map(g=>g.y)),maxX:Math.max(..._.map(g=>g.x)),maxY:Math.max(..._.map(g=>g.y))}}function pt(t){return String(t).padStart(2,"0")}const Zt={top:["n30","p30"],right:["n30","v"],left:["p30","v"]},Vt={n30:-30,p30:30,v:90},Kt=[{key:"line",spacing:6.2,strokeWidth:.55},{key:"dense",spacing:3.1,strokeWidth:.45},{key:"dash",spacing:6.2,strokeWidth:.55,dash:"2.6 2.6"}],lt=22;function Ot(t,o,a){const[i,s]=Zt[a];switch(o){case"plain":return[];case"lines":return[`${t}-line-${i}`];case"cross":return[`${t}-line-${i}`,`${t}-line-${s}`];case"dense":return[`${t}-dense-${i}`];case"dashes":return[`${t}-dash-${i}`];case"dots":return[`${t}-dot`];default:return[`${t}-line-${i}`]}}const Ct=t=>`${t}-paper`,Mt=t=>`${t}-grain`,Qt=(t,o="line")=>`${t}-arrow-${o}`,qt=t=>[`${t}-grid-n30`,`${t}-grid-p30`];function bt({uid:t,style:o,gridTransform:a=""}){return e.jsxs("defs",{children:[Kt.flatMap(i=>Object.entries(Vt).map(([s,f])=>e.jsx("pattern",{id:`${t}-${i.key}-${s}`,width:i.spacing,height:i.spacing,patternUnits:"userSpaceOnUse",patternTransform:`rotate(${f})`,children:e.jsx("line",{x1:-1,y1:i.spacing/2,x2:i.spacing+1,y2:i.spacing/2,stroke:o.ink.hatch,strokeWidth:i.strokeWidth,strokeDasharray:i.dash})},`${i.key}-${s}`))),e.jsx("pattern",{id:`${t}-dot`,width:4.5,height:4.5,patternUnits:"userSpaceOnUse",children:e.jsx("circle",{cx:2.25,cy:2.25,r:.55,fill:o.ink.hatch})}),[{id:`${t}-grid-n30`,angle:-30},{id:`${t}-grid-p30`,angle:30}].map(({id:i,angle:s})=>e.jsx("pattern",{id:i,width:lt,height:lt,patternUnits:"userSpaceOnUse",patternTransform:`${a} rotate(${s})`.trim(),children:e.jsx("line",{x1:-1,y1:lt/2,x2:lt+1,y2:lt/2,stroke:o.paper.grid,strokeWidth:.5})},i)),e.jsxs("linearGradient",{id:Ct(t),x1:"0",y1:"0",x2:"0.35",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:o.paper.from}),e.jsx("stop",{offset:"100%",stopColor:o.paper.to})]}),e.jsxs("filter",{id:Mt(t),x:"0%",y:"0%",width:"100%",height:"100%",children:[e.jsx("feTurbulence",{type:"fractalNoise",baseFrequency:"0.85",numOctaves:3,stitchTiles:"stitch"}),e.jsx("feColorMatrix",{type:"saturate",values:"0"})]}),["line","accent"].map(i=>e.jsx("marker",{id:Qt(t,i),markerWidth:"10",markerHeight:"10",refX:"8",refY:"4",orient:"auto",markerUnits:"userSpaceOnUse",children:e.jsx("path",{d:"M 1 1 L 8 4 L 1 7",fill:"none",stroke:i==="accent"?o.ink.accent:o.ink.line,strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})},i))]})}function te({style:t,rect:o,pan:a,zoom:i=1,className:s="absolute inset-0 w-full h-full pointer-events-none"}){const f=G.useId().replace(/:/g,""),x=a?`translate(${a.x} ${a.y}) scale(${i})`:i!==1?`scale(${i})`:"",b=o?{x:o.x,y:o.y,width:o.width,height:o.height}:{x:0,y:0,width:"100%",height:"100%"};return e.jsxs("svg",{className:s,"aria-hidden":"true",children:[e.jsx(bt,{uid:f,style:t,gridTransform:x}),e.jsx("rect",{...b,fill:`url(#${Ct(f)})`}),qt(f).map(k=>e.jsx("rect",{...b,fill:`url(#${k})`,opacity:.6},k)),t.paper.grain>0&&e.jsx("rect",{...b,filter:`url(#${Mt(f)})`,opacity:t.paper.grain})]})}const ut=r(10),ee=9,Rt=(t,o)=>t.length>o?`${t.slice(0,o-1)}…`:t;function ne({style:t,plate:o,rows:a,title:i,tally:s,className:f="absolute inset-0 w-full h-full pointer-events-none"}){const x=G.useId().replace(/:/g,""),b=a.slice(0,ee),k=a.length-b.length,u={x:o.minX+ut,y:o.minY+ut,width:o.maxX-o.minX-ut*2,height:o.maxY-o.minY-ut*2},l={fontFamily:t.font,letterSpacing:"0.08em"},O=r(236),d=r(13),c=r(16),S=c+Math.max(b.length,1)*d+(k>0?d:0),y=u.x+r(14),_=u.y+r(14),g=r(264),C=r(74),N=r(126),R=u.x+u.width-g-r(14),$=u.y+u.height-C-r(14);return e.jsxs("svg",{className:f,style:{overflow:"visible"},"aria-hidden":"true",children:[e.jsx(bt,{uid:x,style:t}),e.jsx("rect",{x:o.minX,y:o.minY,width:o.maxX-o.minX,height:o.maxY-o.minY,fill:"none",stroke:t.paper.edge,strokeWidth:1.4}),e.jsx("rect",{x:u.x,y:u.y,width:u.width,height:u.height,fill:"none",stroke:t.paper.edge,strokeWidth:.6,opacity:.75}),[[u.x,u.y,1,1],[u.x+u.width,u.y,-1,1],[u.x,u.y+u.height,1,-1],[u.x+u.width,u.y+u.height,-1,-1]].map(([w,A,v,F],Y)=>e.jsx("path",{d:`M ${w+v*r(16)} ${A} L ${w} ${A} L ${w} ${A+F*r(16)}`,fill:"none",stroke:t.ink.line,strokeWidth:1.2},Y)),b.length>0&&e.jsxs("g",{children:[e.jsx("rect",{x:y,y:_,width:O,height:S,fill:t.paper.from,fillOpacity:.55,stroke:t.ink.line,strokeWidth:.8}),e.jsx("line",{x1:y,y1:_+c,x2:y+O,y2:_+c,stroke:t.ink.line,strokeWidth:.8}),e.jsx("text",{x:y+r(8),y:_+r(11),fill:t.ink.text,fontSize:r(8),fontWeight:600,style:l,children:"COMPONENT INDEX"}),e.jsxs("text",{x:y+O-r(8),y:_+r(11),textAnchor:"end",fill:t.ink.muted,fontSize:r(8),style:l,children:[pt(a.length)," ITEMS"]}),b.map((w,A)=>{const v=_+c+A*d,F=Et(w.color),Y=Ot(x,F,"top");return e.jsxs("g",{children:[e.jsx("text",{x:y+r(8),y:v+r(9.5),fill:t.ink.muted,fontSize:r(7.5),style:l,children:pt(w.n)}),e.jsx("rect",{x:y+r(28),y:v+r(3),width:r(14),height:r(7),fill:t.face.right,stroke:t.ink.line,strokeWidth:.4}),Y.map(P=>e.jsx("rect",{x:y+r(28),y:v+r(3),width:r(14),height:r(7),fill:`url(#${P})`,opacity:.85},P)),e.jsx("text",{x:y+r(50),y:v+r(9.5),fill:t.ink.text,fontSize:r(7.5),style:l,children:Rt((w.name||"").toUpperCase(),18)}),e.jsx("text",{x:y+O-r(8),y:v+r(9.5),textAnchor:"end",fill:t.ink.muted,fontSize:r(7),style:l,children:Jt[F]})]},w.n)}),k>0&&e.jsx("text",{x:y+r(8),y:_+c+b.length*d+r(9.5),fill:t.ink.muted,fontSize:r(7.5),style:l,children:`+ ${k} NOT LISTED`})]}),e.jsxs("g",{children:[e.jsx("rect",{x:R,y:$,width:g,height:C,fill:t.paper.from,fillOpacity:.55,stroke:t.ink.line,strokeWidth:.8}),e.jsx("line",{x1:R,y1:$+r(30),x2:R+g,y2:$+r(30),stroke:t.ink.line,strokeWidth:.8}),e.jsx("line",{x1:R,y1:$+r(52),x2:R+g,y2:$+r(52),stroke:t.ink.line,strokeWidth:.5}),e.jsx("line",{x1:R+N,y1:$+r(30),x2:R+N,y2:$+C,stroke:t.ink.line,strokeWidth:.5}),e.jsx("text",{x:R+r(9),y:$+r(12),fill:t.ink.muted,fontSize:r(6.5),style:l,children:"DRAWING TITLE"}),e.jsx("text",{x:R+r(9),y:$+r(24),fill:t.ink.text,fontSize:r(10),fontWeight:600,style:l,children:Rt((i||"UNTITLED ASSEMBLY").toUpperCase(),26)}),e.jsx("text",{x:R+r(9),y:$+r(43),fill:t.ink.muted,fontSize:r(6.5),style:l,children:"PROJECTION"}),e.jsx("text",{x:R+N-r(9),y:$+r(43),textAnchor:"end",fill:t.ink.text,fontSize:r(7),style:l,children:"ISOMETRIC 30°"}),e.jsx("text",{x:R+r(9),y:$+r(65),fill:t.ink.muted,fontSize:r(6.5),style:l,children:"SCALE"}),e.jsx("text",{x:R+N-r(9),y:$+r(65),textAnchor:"end",fill:t.ink.text,fontSize:r(7),style:l,children:"1:1"}),e.jsx("text",{x:R+N+r(9),y:$+r(43),fill:t.ink.muted,fontSize:r(6.5),style:l,children:"QTY"}),e.jsx("text",{x:R+g-r(9),y:$+r(43),textAnchor:"end",fill:t.ink.text,fontSize:r(7),style:l,children:s||`${pt(a.length)} CMP`}),e.jsx("text",{x:R+N+r(9),y:$+r(65),fill:t.ink.muted,fontSize:r(6.5),style:l,children:"SHEET"}),e.jsx("text",{x:R+g-r(9),y:$+r(65),textAnchor:"end",fill:t.ink.text,fontSize:r(7),style:l,children:"1 OF 1"})]})]})}function oe({uid:t,style:o,box:a,color:i,tag:s,selected:f=!1,opacity:x,onClick:b,onPointerDown:k}){const u=Et(i),l=f?o.ink.accent:o.ink.line,O=f?o.ink.accent:o.ink.text,d=[{face:"left",path:a.left},{face:"right",path:a.right},{face:"top",path:a.top}];return e.jsxs("g",{className:b||k?"cursor-pointer":void 0,opacity:x,onClick:b,onPointerDown:k,children:[d.map(({face:c,path:S})=>e.jsxs("g",{children:[e.jsx("path",{d:S,fill:o.face[c]}),Ot(t,u,c).map(y=>e.jsx("path",{d:S,fill:`url(#${y})`,opacity:o.hatchOpacity[c]},y))]},c)),e.jsx("path",{d:a.hidden,fill:"none",stroke:o.ink.hidden,strokeWidth:o.strokeWidth*.55,strokeDasharray:"3.5 3",opacity:.85}),e.jsx("path",{d:a.visible,fill:"none",stroke:l,strokeWidth:f?o.strokeWidth*1.7:o.strokeWidth,strokeLinejoin:"round",strokeLinecap:"round"}),s!=null&&e.jsx("text",{x:a.topCenter.x,y:a.topCenter.y+r(3),textAnchor:"middle",fill:O,fontSize:r(8),fontWeight:600,fontFamily:o.font,style:{letterSpacing:"0.1em"},pointerEvents:"none",children:pt(s)})]})}function re({style:t,box:o,name:a,subtitle:i,selected:s=!1,opacity:f}){const x=s?t.ink.accent:t.ink.line,b=s?t.ink.accent:t.ink.text,k=(a||"").toUpperCase(),u=(i||"").toUpperCase(),l=o.minY-r(11),O=l-r(4),d=u?l-r(15):l-r(4),c=Math.max(k.length*r(5.6),u.length*r(4.4),r(24));return e.jsxs("g",{pointerEvents:"none",opacity:f,children:[e.jsx("line",{x1:o.topCenter.x,y1:o.topCenter.y-r(6),x2:o.topCenter.x,y2:l,stroke:x,strokeWidth:t.strokeWidth*.6}),e.jsx("line",{x1:o.topCenter.x-c/2,y1:l,x2:o.topCenter.x+c/2,y2:l,stroke:x,strokeWidth:t.strokeWidth*.6}),e.jsx("text",{x:o.topCenter.x,y:d,textAnchor:"middle",fill:b,fontSize:r(9.5),fontWeight:600,fontFamily:t.font,stroke:t.paper.from,strokeWidth:r(3),paintOrder:"stroke",strokeLinejoin:"round",style:{letterSpacing:"0.12em"},children:k}),u&&e.jsx("text",{x:o.topCenter.x,y:O,textAnchor:"middle",fill:t.ink.muted,fontSize:r(7.5),fontFamily:t.font,stroke:t.paper.from,strokeWidth:r(2.5),paintOrder:"stroke",strokeLinejoin:"round",style:{letterSpacing:"0.1em"},children:u})]})}const _t='"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace',se={blue:{top:"#3b82f6",side:"#2563eb",front:"#1d4ed8"},violet:{top:"#8b5cf6",side:"#7c3aed",front:"#6d28d9"},cyan:{top:"#06b6d4",side:"#0891b2",front:"#0e7490"},emerald:{top:"#10b981",side:"#059669",front:"#047857"},amber:{top:"#f59e0b",side:"#d97706",front:"#b45309"},rose:{top:"#f43f5e",side:"#e11d48",front:"#be123c"},slate:{top:"#475569",side:"#334155",front:"#1e293b"}},ae={blue:{top:"#93c5fd",side:"#60a5fa",front:"#3b82f6"},violet:{top:"#c4b5fd",side:"#a78bfa",front:"#8b5cf6"},cyan:{top:"#67e8f9",side:"#22d3ee",front:"#06b6d4"},emerald:{top:"#6ee7b7",side:"#34d399",front:"#10b981"},amber:{top:"#fcd34d",side:"#fbbf24",front:"#f59e0b"},rose:{top:"#fda4af",side:"#fb7185",front:"#f43f5e"},slate:{top:"#e2e8f0",side:"#cbd5e1",front:"#94a3b8"}};function xt(t,o,a){const i=u=>{const l=u.replace("#","");return{r:parseInt(l.substring(0,2),16),g:parseInt(l.substring(2,4),16),b:parseInt(l.substring(4,6),16)}},s=i(t),f=i(o),x=Math.round(s.r+(f.r-s.r)*a),b=Math.round(s.g+(f.g-s.g)*a),k=Math.round(s.b+(f.b-s.b)*a);return`rgb(${x},${b},${k})`}function ie({x:t,y:o,z:a,children:i,fontSize:s=8,color:f="#1e293b",shadow:x}){const b=m(t,o,a);return e.jsx("g",{transform:`translate(${b.screenX}, ${b.screenY})`,filter:x,children:e.jsx("g",{transform:"matrix(0.866, -0.5, 0.866, 0.5, 0, 0)",children:e.jsx("text",{x:0,y:0,textAnchor:"middle",fill:f,fontSize:s,fontWeight:600,fontFamily:_t,style:{textTransform:"uppercase",letterSpacing:"0.06em"},children:i})})})}function ce({width:t,depth:o,elevation:a,color:i,opacity:s,borderColor:f,theme:x,isGround:b}){const u=et(t,o,b?8:2,0,0),l=m(0,0,a);return e.jsxs("g",{transform:`translate(${l.screenX}, ${l.screenY})`,children:[b&&e.jsx("g",{transform:"translate(4, 4)",opacity:.2,children:e.jsx("path",{d:u.top,fill:"#000"})}),e.jsx("path",{d:u.top,fill:i,opacity:s}),b&&e.jsxs(e.Fragment,{children:[e.jsx("path",{d:u.left,fill:x==="dark"?"#0f172a":"#cbd5e1",opacity:.8}),e.jsx("path",{d:u.right,fill:x==="dark"?"#1e293b":"#94a3b8",opacity:.8})]}),e.jsx("path",{d:u.top,fill:"none",stroke:f||(x==="dark"?"#475569":"#94a3b8"),strokeWidth:b?1.5:.75,opacity:b?1:.6})]})}function le({config:t,options:o={},className:a,style:i,onNodeClick:s,onLayerClick:f}){const{interactive:x=!0,animate:b=!0,showLabels:k=!0,expandOnHover:u=!0}=o,{theme:l,canvas:O,origin:d,tiers:c,floorSize:S,nodes:y,cornerRadius:_=0}=t,g=Gt(t.style),C=g.technical,N=G.useId().replace(/:/g,""),R=l==="dark"?se:ae,$=C?g.paper.to:l==="dark"?"#0f172a":"#fafafa",w=C?g.ink.text:l==="dark"?"#e2e8f0":"#1e293b",A=C?g.ink.muted:l==="dark"?"#64748b":"#94a3b8",v=G.useMemo(()=>{const E=y.map((n,h)=>({node:n,i:h})).sort((n,h)=>n.node.tier-h.node.tier||n.node.y-h.node.y||n.node.x-h.node.x),p=new Map;return E.forEach(({i:n},h)=>p.set(n,h+1)),p},[y]),F={minX:16,minY:16,maxX:O.width-16,maxY:O.height-16},[Y,P]=G.useState(new Set);G.useEffect(()=>{b?(P(new Set),c.forEach((E,p)=>{setTimeout(()=>{P(n=>new Set([...n,p]))},p*150+100)})):P(new Set(c.map((E,p)=>p)))},[t.id,b,c.length]);const[L,Z]=G.useState(null),[H,z]=G.useState(null),[T,B]=G.useState(null),J=[...y].sort((E,p)=>{const n=c[E.tier]?.elevation||0,h=c[p.tier]?.elevation||0;if(n!==h)return n-h;const M=E.x+E.width+(E.y+E.depth);return p.x+p.width+(p.y+p.depth)-M});return e.jsx("div",{className:a,style:{display:"inline-block",...i},children:e.jsxs("svg",{width:O.width,height:O.height,style:{backgroundColor:$},onClick:()=>{x&&(B(null),z(null))},children:[e.jsxs("defs",{children:[e.jsx("pattern",{id:`grid-${t.id}`,width:"24",height:"24",patternUnits:"userSpaceOnUse",children:e.jsx("circle",{cx:"12",cy:"12",r:"0.5",fill:l==="dark"?"#1e293b":"#e2e8f0"})}),e.jsx("filter",{id:`glow-${t.id}`,x:"-20%",y:"-20%",width:"140%",height:"140%",children:e.jsx("feDropShadow",{dx:"0",dy:"4",stdDeviation:"8",floodColor:l==="dark"?"#60a5fa":"#3b82f6",floodOpacity:"0.3"})}),e.jsxs("radialGradient",{id:`bg-${t.id}`,cx:"48%",cy:"34%",r:"82%",children:[e.jsx("stop",{offset:"0%",stopColor:l==="dark"?"#16203a":"#ffffff"}),e.jsx("stop",{offset:"55%",stopColor:l==="dark"?"#0e1526":"#f2f5f9"}),e.jsx("stop",{offset:"100%",stopColor:l==="dark"?"#080d18":"#e7ecf2"})]}),e.jsx("filter",{id:`contact-${t.id}`,x:"-60%",y:"-60%",width:"220%",height:"220%",children:e.jsx("feGaussianBlur",{stdDeviation:"5"})}),e.jsxs("linearGradient",{id:`sheen-${t.id}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:"#ffffff",stopOpacity:"0.18"}),e.jsx("stop",{offset:"55%",stopColor:"#ffffff",stopOpacity:"0.04"}),e.jsx("stop",{offset:"100%",stopColor:"#ffffff",stopOpacity:"0"})]}),e.jsxs("linearGradient",{id:`shade-${t.id}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:"#000000",stopOpacity:"0"}),e.jsx("stop",{offset:"100%",stopColor:"#000000",stopOpacity:"0.24"})]}),e.jsx("filter",{id:`label-${t.id}`,x:"-40%",y:"-40%",width:"180%",height:"180%",children:e.jsx("feDropShadow",{dx:"0",dy:"0.5",stdDeviation:"0.7",floodColor:"#000000",floodOpacity:"0.7"})})]}),C?e.jsxs(e.Fragment,{children:[e.jsx(bt,{uid:N,style:g}),e.jsx(te,{style:g,rect:{x:0,y:0,width:O.width,height:O.height},className:""})]}):e.jsxs(e.Fragment,{children:[e.jsx("rect",{width:"100%",height:"100%",fill:`url(#bg-${t.id})`}),e.jsx("rect",{width:"100%",height:"100%",fill:`url(#grid-${t.id})`,opacity:"0.5"})]}),e.jsx("g",{transform:`translate(${d.x}, ${d.y})`,children:c.map((E,p)=>{const n=J.filter(j=>j.tier===p),h=Y.has(p),M=x&&(H===p||H===null&&T===null&&L===p),I=x&&(H!==null||L!==null||T!==null),nt=T?.tier===p,ot=I&&!M&&!nt,W=h?0:60,Q=h?1:0,tt=M&&u?{x:10,y:-34}:{x:0,y:0},ft=M?1.03:1,yt=m(S.width/2,S.depth/2,E.elevation),Lt=E.offset||{x:0,y:0};return e.jsxs("g",{"data-tier":p,onMouseEnter:()=>x&&Z(p),onMouseLeave:()=>x&&Z(null),onClick:j=>{x&&(j.stopPropagation(),B(null),z(D=>D===p?null:p),f?.(p))},style:{transform:`translate(${Lt.x+tt.x}px, ${Lt.y+tt.y}px) translate(${yt.screenX}px, ${yt.screenY+W}px) scale(${ft}) translate(${-yt.screenX}px, ${-yt.screenY}px)`,transition:"transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease-out",opacity:Q*(ot?.35:1),filter:M?`url(#glow-${t.id})`:"none",cursor:x?"pointer":"default"},children:[C?e.jsx(fe,{width:S.width,depth:S.depth,elevation:p===0?-2:E.elevation,ink:p===0?g.ink.line:g.ink.hidden,isGround:p===0}):e.jsx(ce,{width:S.width,depth:S.depth,elevation:p===0?-2:E.elevation,color:E.floorColor||(l==="dark"?"#0f172a":"#f8fafc"),opacity:E.floorOpacity||(p===0?.95:.5),borderColor:E.borderColor,theme:l,isGround:p===0}),C&&n.map((j,D)=>{const at=E.elevation+5,rt=m(j.x,j.y,at),U=wt(j.width,j.depth,j.height,rt.screenX,rt.screenY),X=T?.tier===p&&T?.index===D,st=x&&T!==null&&!X;return e.jsx(oe,{uid:N,style:g,box:U,color:j.color,tag:v.get(y.indexOf(j)),selected:X,opacity:(j.opacity??1)*(st?.3:1),onClick:x?()=>{if(z(null),B(dt=>dt&&dt.tier===p&&dt.index===D?null:{tier:p,index:D}),s?.(j,{tier:p,index:D}),j.link)try{window.open(j.link,"_blank")}catch{}}:void 0},`tech-${D}`)}),C&&k&&n.map((j,D)=>{const at=E.elevation+5,rt=m(j.x,j.y,at),U=wt(j.width,j.depth,j.height,rt.screenX,rt.screenY),X=T?.tier===p&&T?.index===D,st=x&&T!==null&&!X;return e.jsx(re,{style:g,box:U,name:j.label,selected:X,opacity:st?.3:1},`tech-label-${D}`)}),!C&&n.map((j,D)=>{const at=E.elevation+5,rt=m(j.x,j.y,at),U=et(j.width,j.depth,j.height,rt.screenX,rt.screenY,_),X=R[j.color]||R.slate,st=T?.tier===p&&T?.index===D,dt=x&&T!==null&&!st,Yt=m(j.x-3,j.y-3,E.elevation),ue=et(j.width+6,j.depth+6,0,Yt.screenX,Yt.screenY,_).top;return e.jsxs("g",{"data-node":`${p}-${D}`,opacity:(j.opacity??1)*(dt?.3:1),onClick:x?V=>{if(V.stopPropagation(),z(null),B(q=>q&&q.tier===p&&q.index===D?null:{tier:p,index:D}),s?.(j,{tier:p,index:D}),j.link)try{window.open(j.link,"_blank")}catch{}}:void 0,style:{cursor:x?"pointer":"default",transition:"opacity 0.3s ease-out"},children:[e.jsx("path",{d:ue,fill:"#000000",opacity:.3,filter:`url(#contact-${t.id})`}),U.cornerBackRight?.map((V,q)=>e.jsx("path",{d:V.path,fill:xt(X.front,X.side,V.intensity)},`cbr-${q}`)),U.cornerBackLeft?.map((V,q)=>e.jsx("path",{d:V.path,fill:xt(X.side,X.front,V.intensity)},`cbl-${q}`)),e.jsx("path",{d:U.left,fill:X.side}),e.jsx("path",{d:U.left,fill:`url(#shade-${t.id})`}),e.jsx("path",{d:U.right,fill:X.front}),e.jsx("path",{d:U.right,fill:`url(#shade-${t.id})`}),U.cornerFrontRight?.map((V,q)=>e.jsx("path",{d:V.path,fill:xt(X.front,X.side,V.intensity)},`cfr-${q}`)),U.cornerFrontLeft?.map((V,q)=>e.jsx("path",{d:V.path,fill:xt(X.front,X.side,V.intensity)},`cfl-${q}`)),e.jsx("path",{d:U.top,fill:X.top}),e.jsx("path",{d:U.top,fill:`url(#sheen-${t.id})`}),e.jsx("path",{d:U.top,fill:"none",stroke:st?"#ffffff":"rgba(255,255,255,0.28)",strokeWidth:st?1.4:.75,strokeLinejoin:"round"}),k&&j.label&&e.jsx(ie,{x:j.x+j.width/2,y:j.y+j.depth/2,z:at+j.height+2,fontSize:j.width>70?9:8,color:w,shadow:`url(#label-${t.id})`,children:j.label})]},D)}),k&&e.jsx("text",{x:m(-25,S.depth/2,E.elevation+15).screenX-35,y:m(-25,S.depth/2,E.elevation+15).screenY,fill:A,fontSize:9,fontWeight:500,fontFamily:_t,opacity:C?.9:.6,style:{letterSpacing:"0.05em",textTransform:C?"uppercase":"none"},children:E.name})]},p)})}),C&&e.jsx(ne,{style:g,plate:F,rows:y.map((E,p)=>({n:v.get(p)||p+1,name:E.label,subtitle:c[E.tier]?.name,color:E.color})).sort((E,p)=>E.n-p.n),title:t.title,tally:`${String(y.length).padStart(2,"0")} CMP / ${String(c.length).padStart(2,"0")} TIER`,className:""})]})})}function fe({width:t,depth:o,elevation:a,ink:i,isGround:s}){const f=m(0,0,a),x=et(t,o,0,f.screenX,f.screenY).top;return e.jsx("path",{d:x,fill:"none",stroke:i,strokeWidth:s?1:.7,strokeDasharray:s?void 0:"5 4",opacity:s?.9:.7})}const Pt='"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace',de={blue:{top:"#3b82f6",side:"#2563eb",front:"#1d4ed8"},violet:{top:"#8b5cf6",side:"#7c3aed",front:"#6d28d9"},cyan:{top:"#06b6d4",side:"#0891b2",front:"#0e7490"},emerald:{top:"#10b981",side:"#059669",front:"#047857"},amber:{top:"#f59e0b",side:"#d97706",front:"#b45309"},rose:{top:"#f43f5e",side:"#e11d48",front:"#be123c"},slate:{top:"#475569",side:"#334155",front:"#1e293b"}},he={blue:{top:"#93c5fd",side:"#60a5fa",front:"#3b82f6"},violet:{top:"#c4b5fd",side:"#a78bfa",front:"#8b5cf6"},cyan:{top:"#67e8f9",side:"#22d3ee",front:"#06b6d4"},emerald:{top:"#6ee7b7",side:"#34d399",front:"#10b981"},amber:{top:"#fcd34d",side:"#fbbf24",front:"#f59e0b"},rose:{top:"#fda4af",side:"#fb7185",front:"#f43f5e"},slate:{top:"#e2e8f0",side:"#cbd5e1",front:"#94a3b8"}};function mt(t,o,a){const i=u=>{const l=u.replace("#","");return{r:parseInt(l.substring(0,2),16),g:parseInt(l.substring(2,4),16),b:parseInt(l.substring(4,6),16)}},s=i(t),f=i(o),x=Math.round(s.r+(f.r-s.r)*a),b=Math.round(s.g+(f.g-s.g)*a),k=Math.round(s.b+(f.b-s.b)*a);return`rgb(${x},${b},${k})`}function At(t){const{theme:o,canvas:a,origin:i,tiers:s,floorSize:f,nodes:x,cornerRadius:b=0}=t,k=o==="dark"?de:he,u=o==="dark"?"#0f172a":"#fafafa",l=o==="dark"?"#e2e8f0":"#1e293b",O=o==="dark"?"#64748b":"#94a3b8",d=[...x].sort((S,y)=>{const _=s[S.tier]?.elevation||0,g=s[y.tier]?.elevation||0;return _!==g?_-g:y.x+y.width+(y.y+y.depth)-(S.x+S.width+(S.y+S.depth))});let c=`<svg xmlns="http://www.w3.org/2000/svg" width="${a.width}" height="${a.height}" style="background:${u}">`;c+=`<defs>
6
+ <%s key={someKey} {...props} />`,I,N,Q,N),p[N+I]=!0)}if(N=null,R!==void 0&&(a(R),N=""+R),x(h)&&(a(h.key),N=""+h.key),"key"in h){R={};for(var tt in h)tt!=="key"&&(R[tt]=h[tt])}else R=h;return N&&b(R,typeof n=="function"?n.displayName||n.name||"Unknown":n),u(n,N,R,s(),nt,ot)}function O(n){d(n)?n._store&&(n._store.validated=1):typeof n=="object"&&n!==null&&n.$$typeof===F&&(n._payload.status==="fulfilled"?d(n._payload.value)&&n._payload.value._store&&(n._payload.value._store.validated=1):n._store&&(n._store.validated=1))}function d(n){return typeof n=="object"&&n!==null&&n.$$typeof===S}var c=H,S=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),W=Symbol.for("react.consumer"),_=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),A=Symbol.for("react.client.reference"),L=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=Object.prototype.hasOwnProperty,G=Array.isArray,z=console.createTask?console.createTask:function(){return null};c={react_stack_bottom_frame:function(n){return n()}};var T,D={},J=c.react_stack_bottom_frame.bind(c,f)(),v=z(i(f)),p={};ct.Fragment=M,ct.jsx=function(n,h,R){var I=1e4>L.recentlyCreatedOwnerStacks++;return l(n,h,R,!1,I?Error("react-stack-top-frame"):J,I?z(i(n)):v)},ct.jsxs=function(n,h,R){var I=1e4>L.recentlyCreatedOwnerStacks++;return l(n,h,R,!0,I?Error("react-stack-top-frame"):J,I?z(i(n)):v)}})()),ct}var Tt;function zt(){return Tt||(Tt=1,process.env.NODE_ENV==="production"?ht.exports=Bt():ht.exports=Xt()),ht.exports}var e=zt();const Ut=["solid","blueprint","cyanotype"],kt='"JetBrains Mono", "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace',Ht=.78,r=t=>Math.round(t*Ht*10)/10,Et={id:"solid",name:"Solid",description:"Shaded isometric boxes",technical:!1,paper:{from:"transparent",to:"transparent",edge:"transparent",grid:"transparent",grain:0},ink:{line:"rgba(0,0,0,0.3)",hidden:"rgba(0,0,0,0.2)",hatch:"transparent",text:"#ffffff",muted:"rgba(255,255,255,0.6)",accent:"#3b82f6"},face:{top:"transparent",right:"transparent",left:"transparent"},hatchOpacity:{top:0,right:0,left:0},font:kt,strokeWidth:.5},vt={solid:Et,blueprint:{id:"blueprint",name:"Blueprint",description:"Sepia engineering plate on parchment",technical:!0,paper:{from:"#f0e6d0",to:"#ddceac",edge:"#b09a74",grid:"#c6b48f",grain:.055},ink:{line:"#4a3826",hidden:"#96805f",hatch:"#6d563c",text:"#3b2c1d",muted:"#8a7455",accent:"#a8412a"},face:{top:"#f4ebd7",right:"#e6dabb",left:"#d6c6a2"},hatchOpacity:{top:.3,right:.55,left:.85},font:kt,strokeWidth:1},cyanotype:{id:"cyanotype",name:"Cyanotype",description:"White linework on classic blueprint blue",technical:!0,paper:{from:"#123256",to:"#0b1f3a",edge:"#3f6d9f",grid:"#27507f",grain:.07},ink:{line:"#e6f0fb",hidden:"#78a2cc",hatch:"#a6c6e5",text:"#f2f8ff",muted:"#8fb2d6",accent:"#ffc857"},face:{top:"#1b4675",right:"#153a61",left:"#0f2b49"},hatchOpacity:{top:.28,right:.5,left:.78},font:kt,strokeWidth:1}};function Gt(t){return vt[t]||Et}Ut.filter(t=>vt[t].technical)[0];const Jt={violet:"cross",blue:"lines",sky:"lines",cyan:"dashes",emerald:"dots",amber:"dense",orange:"dense",rose:"cross",zinc:"plain",slate:"plain"};function wt(t){return Jt[t||"zinc"]||"lines"}const Zt={plain:"PLAIN",lines:"HATCH-A",cross:"HATCH-X",dense:"HATCH-D",dots:"STIPPLE",dashes:"BROKEN"};function Ot(t,o,a,i=0,s=0){const f=(g,C,W)=>{const _=m(g,C,W);return{x:_.screenX+i,y:_.screenY+s}},x=f(0,0,0),b=f(t,0,0),k=f(t,o,0),u=f(0,o,0),l=f(0,0,a),O=f(t,0,a),d=f(t,o,a),c=f(0,o,a),S=g=>`M ${g.map(C=>`${C.x},${C.y}`).join(" L ")} Z`,y=(g,C)=>`M ${g.x},${g.y} L ${C.x},${C.y}`,M=[x,b,k,u,l,O,d,c];return{top:S([l,O,d,c]),right:S([x,b,O,l]),left:S([x,u,c,l]),visible:[S([x,b,O,d,c,u]),y(l,O),y(l,c),y(l,x)].join(" "),hidden:[y(k,b),y(k,u),y(k,d)].join(" "),topCenter:{x:(l.x+d.x)/2,y:(l.y+d.y)/2},topApex:{x:d.x,y:d.y},minX:Math.min(...M.map(g=>g.x)),minY:Math.min(...M.map(g=>g.y)),maxX:Math.max(...M.map(g=>g.x)),maxY:Math.max(...M.map(g=>g.y))}}function pt(t){return String(t).padStart(2,"0")}const Vt={top:["n30","p30"],right:["n30","v"],left:["p30","v"]},Kt={n30:-30,p30:30,v:90},Qt=[{key:"line",spacing:6.2,strokeWidth:.55},{key:"dense",spacing:3.1,strokeWidth:.45},{key:"dash",spacing:6.2,strokeWidth:.55,dash:"2.6 2.6"}],lt=22;function Ct(t,o,a){const[i,s]=Vt[a];switch(o){case"plain":return[];case"lines":return[`${t}-line-${i}`];case"cross":return[`${t}-line-${i}`,`${t}-line-${s}`];case"dense":return[`${t}-dense-${i}`];case"dashes":return[`${t}-dash-${i}`];case"dots":return[`${t}-dot`];default:return[`${t}-line-${i}`]}}const Rt=t=>`${t}-paper`,_t=t=>`${t}-grain`,qt=(t,o="line")=>`${t}-arrow-${o}`,te=t=>[`${t}-grid-n30`,`${t}-grid-p30`];function bt({uid:t,style:o,gridTransform:a=""}){return e.jsxs("defs",{children:[Qt.flatMap(i=>Object.entries(Kt).map(([s,f])=>e.jsx("pattern",{id:`${t}-${i.key}-${s}`,width:i.spacing,height:i.spacing,patternUnits:"userSpaceOnUse",patternTransform:`rotate(${f})`,children:e.jsx("line",{x1:-1,y1:i.spacing/2,x2:i.spacing+1,y2:i.spacing/2,stroke:o.ink.hatch,strokeWidth:i.strokeWidth,strokeDasharray:i.dash})},`${i.key}-${s}`))),e.jsx("pattern",{id:`${t}-dot`,width:4.5,height:4.5,patternUnits:"userSpaceOnUse",children:e.jsx("circle",{cx:2.25,cy:2.25,r:.55,fill:o.ink.hatch})}),[{id:`${t}-grid-n30`,angle:-30},{id:`${t}-grid-p30`,angle:30}].map(({id:i,angle:s})=>e.jsx("pattern",{id:i,width:lt,height:lt,patternUnits:"userSpaceOnUse",patternTransform:`${a} rotate(${s})`.trim(),children:e.jsx("line",{x1:-1,y1:lt/2,x2:lt+1,y2:lt/2,stroke:o.paper.grid,strokeWidth:.5})},i)),e.jsxs("linearGradient",{id:Rt(t),x1:"0",y1:"0",x2:"0.35",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:o.paper.from}),e.jsx("stop",{offset:"100%",stopColor:o.paper.to})]}),e.jsxs("filter",{id:_t(t),x:"0%",y:"0%",width:"100%",height:"100%",children:[e.jsx("feTurbulence",{type:"fractalNoise",baseFrequency:"0.85",numOctaves:3,stitchTiles:"stitch"}),e.jsx("feColorMatrix",{type:"saturate",values:"0"})]}),["line","accent"].map(i=>e.jsx("marker",{id:qt(t,i),markerWidth:"10",markerHeight:"10",refX:"8",refY:"4",orient:"auto",markerUnits:"userSpaceOnUse",children:e.jsx("path",{d:"M 1 1 L 8 4 L 1 7",fill:"none",stroke:i==="accent"?o.ink.accent:o.ink.line,strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})},i))]})}function ee({style:t,rect:o,pan:a,zoom:i=1,className:s="absolute inset-0 w-full h-full pointer-events-none"}){const f=H.useId().replace(/:/g,""),x=a?`translate(${a.x} ${a.y}) scale(${i})`:i!==1?`scale(${i})`:"",b=o?{x:o.x,y:o.y,width:o.width,height:o.height}:{x:0,y:0,width:"100%",height:"100%"};return e.jsxs("svg",{className:s,"aria-hidden":"true",children:[e.jsx(bt,{uid:f,style:t,gridTransform:x}),e.jsx("rect",{...b,fill:`url(#${Rt(f)})`}),te(f).map(k=>e.jsx("rect",{...b,fill:`url(#${k})`,opacity:.6},k)),t.paper.grain>0&&e.jsx("rect",{...b,filter:`url(#${_t(f)})`,opacity:t.paper.grain})]})}const ut=r(10),ne=9,Mt=(t,o)=>t.length>o?`${t.slice(0,o-1)}…`:t;function oe({style:t,plate:o,rows:a,title:i,tally:s,className:f="absolute inset-0 w-full h-full pointer-events-none"}){const x=H.useId().replace(/:/g,""),b=a.slice(0,ne),k=a.length-b.length,u={x:o.minX+ut,y:o.minY+ut,width:o.maxX-o.minX-ut*2,height:o.maxY-o.minY-ut*2},l={fontFamily:t.font,letterSpacing:"0.08em"},O=r(236),d=r(13),c=r(16),S=c+Math.max(b.length,1)*d+(k>0?d:0),y=u.x+r(14),M=u.y+r(14),g=r(264),C=r(74),W=r(126),_=u.x+u.width-g-r(14),$=u.y+u.height-C-r(14);return e.jsxs("svg",{className:f,style:{overflow:"visible"},"aria-hidden":"true",children:[e.jsx(bt,{uid:x,style:t}),e.jsx("rect",{x:o.minX,y:o.minY,width:o.maxX-o.minX,height:o.maxY-o.minY,fill:"none",stroke:t.paper.edge,strokeWidth:1.4}),e.jsx("rect",{x:u.x,y:u.y,width:u.width,height:u.height,fill:"none",stroke:t.paper.edge,strokeWidth:.6,opacity:.75}),[[u.x,u.y,1,1],[u.x+u.width,u.y,-1,1],[u.x,u.y+u.height,1,-1],[u.x+u.width,u.y+u.height,-1,-1]].map(([w,P,E,F],Y)=>e.jsx("path",{d:`M ${w+E*r(16)} ${P} L ${w} ${P} L ${w} ${P+F*r(16)}`,fill:"none",stroke:t.ink.line,strokeWidth:1.2},Y)),b.length>0&&e.jsxs("g",{children:[e.jsx("rect",{x:y,y:M,width:O,height:S,fill:t.paper.from,fillOpacity:.55,stroke:t.ink.line,strokeWidth:.8}),e.jsx("line",{x1:y,y1:M+c,x2:y+O,y2:M+c,stroke:t.ink.line,strokeWidth:.8}),e.jsx("text",{x:y+r(8),y:M+r(11),fill:t.ink.text,fontSize:r(8),fontWeight:600,style:l,children:"COMPONENT INDEX"}),e.jsxs("text",{x:y+O-r(8),y:M+r(11),textAnchor:"end",fill:t.ink.muted,fontSize:r(8),style:l,children:[pt(a.length)," ITEMS"]}),b.map((w,P)=>{const E=M+c+P*d,F=wt(w.color),Y=Ct(x,F,"top");return e.jsxs("g",{children:[e.jsx("text",{x:y+r(8),y:E+r(9.5),fill:t.ink.muted,fontSize:r(7.5),style:l,children:pt(w.n)}),e.jsx("rect",{x:y+r(28),y:E+r(3),width:r(14),height:r(7),fill:t.face.right,stroke:t.ink.line,strokeWidth:.4}),Y.map(A=>e.jsx("rect",{x:y+r(28),y:E+r(3),width:r(14),height:r(7),fill:`url(#${A})`,opacity:.85},A)),e.jsx("text",{x:y+r(50),y:E+r(9.5),fill:t.ink.text,fontSize:r(7.5),style:l,children:Mt((w.name||"").toUpperCase(),18)}),e.jsx("text",{x:y+O-r(8),y:E+r(9.5),textAnchor:"end",fill:t.ink.muted,fontSize:r(7),style:l,children:Zt[F]})]},w.n)}),k>0&&e.jsx("text",{x:y+r(8),y:M+c+b.length*d+r(9.5),fill:t.ink.muted,fontSize:r(7.5),style:l,children:`+ ${k} NOT LISTED`})]}),e.jsxs("g",{children:[e.jsx("rect",{x:_,y:$,width:g,height:C,fill:t.paper.from,fillOpacity:.55,stroke:t.ink.line,strokeWidth:.8}),e.jsx("line",{x1:_,y1:$+r(30),x2:_+g,y2:$+r(30),stroke:t.ink.line,strokeWidth:.8}),e.jsx("line",{x1:_,y1:$+r(52),x2:_+g,y2:$+r(52),stroke:t.ink.line,strokeWidth:.5}),e.jsx("line",{x1:_+W,y1:$+r(30),x2:_+W,y2:$+C,stroke:t.ink.line,strokeWidth:.5}),e.jsx("text",{x:_+r(9),y:$+r(12),fill:t.ink.muted,fontSize:r(6.5),style:l,children:"DRAWING TITLE"}),e.jsx("text",{x:_+r(9),y:$+r(24),fill:t.ink.text,fontSize:r(10),fontWeight:600,style:l,children:Mt((i||"UNTITLED ASSEMBLY").toUpperCase(),26)}),e.jsx("text",{x:_+r(9),y:$+r(43),fill:t.ink.muted,fontSize:r(6.5),style:l,children:"PROJECTION"}),e.jsx("text",{x:_+W-r(9),y:$+r(43),textAnchor:"end",fill:t.ink.text,fontSize:r(7),style:l,children:"ISOMETRIC 30°"}),e.jsx("text",{x:_+r(9),y:$+r(65),fill:t.ink.muted,fontSize:r(6.5),style:l,children:"SCALE"}),e.jsx("text",{x:_+W-r(9),y:$+r(65),textAnchor:"end",fill:t.ink.text,fontSize:r(7),style:l,children:"1:1"}),e.jsx("text",{x:_+W+r(9),y:$+r(43),fill:t.ink.muted,fontSize:r(6.5),style:l,children:"QTY"}),e.jsx("text",{x:_+g-r(9),y:$+r(43),textAnchor:"end",fill:t.ink.text,fontSize:r(7),style:l,children:s||`${pt(a.length)} CMP`}),e.jsx("text",{x:_+W+r(9),y:$+r(65),fill:t.ink.muted,fontSize:r(6.5),style:l,children:"SHEET"}),e.jsx("text",{x:_+g-r(9),y:$+r(65),textAnchor:"end",fill:t.ink.text,fontSize:r(7),style:l,children:"1 OF 1"})]})]})}function re({uid:t,style:o,box:a,color:i,tag:s,selected:f=!1,opacity:x,onClick:b,onPointerDown:k}){const u=wt(i),l=f?o.ink.accent:o.ink.line,O=f?o.ink.accent:o.ink.text,d=[{face:"left",path:a.left},{face:"right",path:a.right},{face:"top",path:a.top}];return e.jsxs("g",{className:b||k?"cursor-pointer":void 0,opacity:x,onClick:b,onPointerDown:k,children:[d.map(({face:c,path:S})=>e.jsxs("g",{children:[e.jsx("path",{d:S,fill:o.face[c]}),Ct(t,u,c).map(y=>e.jsx("path",{d:S,fill:`url(#${y})`,opacity:o.hatchOpacity[c]},y))]},c)),e.jsx("path",{d:a.hidden,fill:"none",stroke:o.ink.hidden,strokeWidth:o.strokeWidth*.55,strokeDasharray:"3.5 3",opacity:.85}),e.jsx("path",{d:a.visible,fill:"none",stroke:l,strokeWidth:f?o.strokeWidth*1.7:o.strokeWidth,strokeLinejoin:"round",strokeLinecap:"round"}),s!=null&&e.jsx("text",{x:a.topCenter.x,y:a.topCenter.y+r(3),textAnchor:"middle",fill:O,fontSize:r(8),fontWeight:600,fontFamily:o.font,style:{letterSpacing:"0.1em"},pointerEvents:"none",children:pt(s)})]})}function se({style:t,box:o,name:a,subtitle:i,selected:s=!1,opacity:f}){const x=s?t.ink.accent:t.ink.line,b=s?t.ink.accent:t.ink.text,k=(a||"").toUpperCase(),u=(i||"").toUpperCase(),l=o.minY-r(11),O=l-r(4),d=u?l-r(15):l-r(4),c=Math.max(k.length*r(5.6),u.length*r(4.4),r(24));return e.jsxs("g",{pointerEvents:"none",opacity:f,children:[e.jsx("line",{x1:o.topCenter.x,y1:o.topCenter.y-r(6),x2:o.topCenter.x,y2:l,stroke:x,strokeWidth:t.strokeWidth*.6}),e.jsx("line",{x1:o.topCenter.x-c/2,y1:l,x2:o.topCenter.x+c/2,y2:l,stroke:x,strokeWidth:t.strokeWidth*.6}),e.jsx("text",{x:o.topCenter.x,y:d,textAnchor:"middle",fill:b,fontSize:r(9.5),fontWeight:600,fontFamily:t.font,stroke:t.paper.from,strokeWidth:r(3),paintOrder:"stroke",strokeLinejoin:"round",style:{letterSpacing:"0.12em"},children:k}),u&&e.jsx("text",{x:o.topCenter.x,y:O,textAnchor:"middle",fill:t.ink.muted,fontSize:r(7.5),fontFamily:t.font,stroke:t.paper.from,strokeWidth:r(2.5),paintOrder:"stroke",strokeLinejoin:"round",style:{letterSpacing:"0.1em"},children:u})]})}const At='"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace',ae={blue:{top:"#3b82f6",side:"#2563eb",front:"#1d4ed8"},violet:{top:"#8b5cf6",side:"#7c3aed",front:"#6d28d9"},cyan:{top:"#06b6d4",side:"#0891b2",front:"#0e7490"},emerald:{top:"#10b981",side:"#059669",front:"#047857"},amber:{top:"#f59e0b",side:"#d97706",front:"#b45309"},rose:{top:"#f43f5e",side:"#e11d48",front:"#be123c"},slate:{top:"#475569",side:"#334155",front:"#1e293b"}},ie={blue:{top:"#93c5fd",side:"#60a5fa",front:"#3b82f6"},violet:{top:"#c4b5fd",side:"#a78bfa",front:"#8b5cf6"},cyan:{top:"#67e8f9",side:"#22d3ee",front:"#06b6d4"},emerald:{top:"#6ee7b7",side:"#34d399",front:"#10b981"},amber:{top:"#fcd34d",side:"#fbbf24",front:"#f59e0b"},rose:{top:"#fda4af",side:"#fb7185",front:"#f43f5e"},slate:{top:"#e2e8f0",side:"#cbd5e1",front:"#94a3b8"}};function xt(t,o,a){const i=u=>{const l=u.replace("#","");return{r:parseInt(l.substring(0,2),16),g:parseInt(l.substring(2,4),16),b:parseInt(l.substring(4,6),16)}},s=i(t),f=i(o),x=Math.round(s.r+(f.r-s.r)*a),b=Math.round(s.g+(f.g-s.g)*a),k=Math.round(s.b+(f.b-s.b)*a);return`rgb(${x},${b},${k})`}function ce({x:t,y:o,z:a,children:i,fontSize:s=8,color:f="#1e293b",shadow:x}){const b=m(t,o,a);return e.jsx("g",{transform:`translate(${b.screenX}, ${b.screenY})`,filter:x,children:e.jsx("g",{transform:"matrix(0.866, -0.5, 0.866, 0.5, 0, 0)",children:e.jsx("text",{x:0,y:0,textAnchor:"middle",fill:f,fontSize:s,fontWeight:600,fontFamily:At,style:{textTransform:"uppercase",letterSpacing:"0.06em"},children:i})})})}function le({width:t,depth:o,elevation:a,color:i,opacity:s,borderColor:f,theme:x,isGround:b}){const u=et(t,o,b?8:2,0,0),l=m(0,0,a);return e.jsxs("g",{transform:`translate(${l.screenX}, ${l.screenY})`,children:[b&&e.jsx("g",{transform:"translate(4, 4)",opacity:.2,children:e.jsx("path",{d:u.top,fill:"#000"})}),e.jsx("path",{d:u.top,fill:i,opacity:s}),b&&e.jsxs(e.Fragment,{children:[e.jsx("path",{d:u.left,fill:x==="dark"?"#0f172a":"#cbd5e1",opacity:.8}),e.jsx("path",{d:u.right,fill:x==="dark"?"#1e293b":"#94a3b8",opacity:.8})]}),e.jsx("path",{d:u.top,fill:"none",stroke:f||(x==="dark"?"#475569":"#94a3b8"),strokeWidth:b?1.5:.75,opacity:b?1:.6})]})}function fe({config:t,options:o={},className:a,style:i,onNodeClick:s,onLayerClick:f}){const{interactive:x=!0,animate:b=!0,showLabels:k=!0,expandOnHover:u=!0}=o,{theme:l,canvas:O,origin:d,tiers:c,floorSize:S,nodes:y,cornerRadius:M=0}=t,g=Gt(t.style),C=g.technical,W=H.useId().replace(/:/g,""),_=l==="dark"?ae:ie,$=C?g.paper.to:l==="dark"?"#0f172a":"#fafafa",w=C?g.ink.text:l==="dark"?"#e2e8f0":"#1e293b",P=C?g.ink.muted:l==="dark"?"#64748b":"#94a3b8",E=H.useMemo(()=>{const v=y.map((n,h)=>({node:n,i:h})).sort((n,h)=>n.node.tier-h.node.tier||n.node.y-h.node.y||n.node.x-h.node.x),p=new Map;return v.forEach(({i:n},h)=>p.set(n,h+1)),p},[y]),F={minX:16,minY:16,maxX:O.width-16,maxY:O.height-16},[Y,A]=H.useState(new Set);H.useEffect(()=>{b?(A(new Set),c.forEach((v,p)=>{setTimeout(()=>{A(n=>new Set([...n,p]))},p*150+100)})):A(new Set(c.map((v,p)=>p)))},[t.id,b,c.length]);const[L,Z]=H.useState(null),[G,z]=H.useState(null),[T,D]=H.useState(null),J=[...y].sort((v,p)=>{const n=c[v.tier]?.elevation||0,h=c[p.tier]?.elevation||0;if(n!==h)return n-h;const R=v.x+v.width+(v.y+v.depth);return p.x+p.width+(p.y+p.depth)-R});return e.jsx("div",{className:a,style:{display:"inline-block",...i},children:e.jsxs("svg",{width:O.width,height:O.height,style:{backgroundColor:$},onClick:()=>{x&&(D(null),z(null))},children:[e.jsxs("defs",{children:[e.jsx("pattern",{id:`grid-${t.id}`,width:"24",height:"24",patternUnits:"userSpaceOnUse",children:e.jsx("circle",{cx:"12",cy:"12",r:"0.5",fill:l==="dark"?"#1e293b":"#e2e8f0"})}),e.jsx("filter",{id:`glow-${t.id}`,x:"-20%",y:"-20%",width:"140%",height:"140%",children:e.jsx("feDropShadow",{dx:"0",dy:"4",stdDeviation:"8",floodColor:l==="dark"?"#60a5fa":"#3b82f6",floodOpacity:"0.3"})}),e.jsxs("radialGradient",{id:`bg-${t.id}`,cx:"48%",cy:"34%",r:"82%",children:[e.jsx("stop",{offset:"0%",stopColor:l==="dark"?"#16203a":"#ffffff"}),e.jsx("stop",{offset:"55%",stopColor:l==="dark"?"#0e1526":"#f2f5f9"}),e.jsx("stop",{offset:"100%",stopColor:l==="dark"?"#080d18":"#e7ecf2"})]}),e.jsx("filter",{id:`contact-${t.id}`,x:"-60%",y:"-60%",width:"220%",height:"220%",children:e.jsx("feGaussianBlur",{stdDeviation:"5"})}),e.jsxs("linearGradient",{id:`sheen-${t.id}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:"#ffffff",stopOpacity:"0.18"}),e.jsx("stop",{offset:"55%",stopColor:"#ffffff",stopOpacity:"0.04"}),e.jsx("stop",{offset:"100%",stopColor:"#ffffff",stopOpacity:"0"})]}),e.jsxs("linearGradient",{id:`shade-${t.id}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:"#000000",stopOpacity:"0"}),e.jsx("stop",{offset:"100%",stopColor:"#000000",stopOpacity:"0.24"})]}),e.jsx("filter",{id:`label-${t.id}`,x:"-40%",y:"-40%",width:"180%",height:"180%",children:e.jsx("feDropShadow",{dx:"0",dy:"0.5",stdDeviation:"0.7",floodColor:"#000000",floodOpacity:"0.7"})})]}),C?e.jsxs(e.Fragment,{children:[e.jsx(bt,{uid:W,style:g}),e.jsx(ee,{style:g,rect:{x:0,y:0,width:O.width,height:O.height},className:""})]}):e.jsxs(e.Fragment,{children:[e.jsx("rect",{width:"100%",height:"100%",fill:`url(#bg-${t.id})`}),e.jsx("rect",{width:"100%",height:"100%",fill:`url(#grid-${t.id})`,opacity:"0.5"})]}),e.jsx("g",{transform:`translate(${d.x}, ${d.y})`,children:c.map((v,p)=>{const n=J.filter(j=>j.tier===p),h=Y.has(p),R=x&&(G===p||G===null&&T===null&&L===p),I=x&&(G!==null||L!==null||T!==null),nt=T?.tier===p,ot=I&&!R&&!nt,N=h?0:60,Q=h?1:0,tt=R&&u?{x:10,y:-34}:{x:0,y:0},ft=R?1.03:1,yt=m(S.width/2,S.depth/2,v.elevation),Yt=v.offset||{x:0,y:0};return e.jsxs("g",{"data-tier":p,onMouseEnter:()=>x&&Z(p),onMouseLeave:()=>x&&Z(null),onClick:j=>{x&&(j.stopPropagation(),D(null),z(B=>B===p?null:p),f?.(p))},style:{transform:`translate(${Yt.x+tt.x}px, ${Yt.y+tt.y}px) translate(${yt.screenX}px, ${yt.screenY+N}px) scale(${ft}) translate(${-yt.screenX}px, ${-yt.screenY}px)`,transition:"transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease-out",opacity:Q*(ot?.35:1),filter:R?`url(#glow-${t.id})`:"none",cursor:x?"pointer":"default"},children:[C?e.jsx(de,{width:S.width,depth:S.depth,elevation:p===0?-2:v.elevation,ink:p===0?g.ink.line:g.ink.hidden,isGround:p===0}):e.jsx(le,{width:S.width,depth:S.depth,elevation:p===0?-2:v.elevation,color:v.floorColor||(l==="dark"?"#0f172a":"#f8fafc"),opacity:v.floorOpacity||(p===0?.95:.5),borderColor:v.borderColor,theme:l,isGround:p===0}),C&&n.map((j,B)=>{const at=v.elevation+5,rt=m(j.x,j.y,at),U=Ot(j.width,j.depth,j.height,rt.screenX,rt.screenY),X=T?.tier===p&&T?.index===B,st=x&&T!==null&&!X;return e.jsx(re,{uid:W,style:g,box:U,color:j.color,tag:E.get(y.indexOf(j)),selected:X,opacity:(j.opacity??1)*(st?.3:1),onClick:x?()=>{if(z(null),D(dt=>dt&&dt.tier===p&&dt.index===B?null:{tier:p,index:B}),s?.(j,{tier:p,index:B}),j.link)try{window.open(j.link,"_blank")}catch{}}:void 0},`tech-${B}`)}),C&&k&&n.map((j,B)=>{const at=v.elevation+5,rt=m(j.x,j.y,at),U=Ot(j.width,j.depth,j.height,rt.screenX,rt.screenY),X=T?.tier===p&&T?.index===B,st=x&&T!==null&&!X;return e.jsx(se,{style:g,box:U,name:j.label,selected:X,opacity:st?.3:1},`tech-label-${B}`)}),!C&&n.map((j,B)=>{const at=v.elevation+5,rt=m(j.x,j.y,at),U=et(j.width,j.depth,j.height,rt.screenX,rt.screenY,M),X=_[j.color]||_.slate,st=T?.tier===p&&T?.index===B,dt=x&&T!==null&&!st,Nt=m(j.x-3,j.y-3,v.elevation),xe=et(j.width+6,j.depth+6,0,Nt.screenX,Nt.screenY,M).top;return e.jsxs("g",{"data-node":`${p}-${B}`,opacity:(j.opacity??1)*(dt?.3:1),onClick:x?V=>{if(V.stopPropagation(),z(null),D(q=>q&&q.tier===p&&q.index===B?null:{tier:p,index:B}),s?.(j,{tier:p,index:B}),j.link)try{window.open(j.link,"_blank")}catch{}}:void 0,style:{cursor:x?"pointer":"default",transition:"opacity 0.3s ease-out"},children:[e.jsx("path",{d:xe,fill:"#000000",opacity:.3,filter:`url(#contact-${t.id})`}),U.cornerBackRight?.map((V,q)=>e.jsx("path",{d:V.path,fill:xt(X.front,X.side,V.intensity)},`cbr-${q}`)),U.cornerBackLeft?.map((V,q)=>e.jsx("path",{d:V.path,fill:xt(X.side,X.front,V.intensity)},`cbl-${q}`)),e.jsx("path",{d:U.left,fill:X.side}),e.jsx("path",{d:U.left,fill:`url(#shade-${t.id})`}),e.jsx("path",{d:U.right,fill:X.front}),e.jsx("path",{d:U.right,fill:`url(#shade-${t.id})`}),U.cornerFrontRight?.map((V,q)=>e.jsx("path",{d:V.path,fill:xt(X.front,X.side,V.intensity)},`cfr-${q}`)),U.cornerFrontLeft?.map((V,q)=>e.jsx("path",{d:V.path,fill:xt(X.front,X.side,V.intensity)},`cfl-${q}`)),e.jsx("path",{d:U.top,fill:X.top}),e.jsx("path",{d:U.top,fill:`url(#sheen-${t.id})`}),e.jsx("path",{d:U.top,fill:"none",stroke:st?"#ffffff":"rgba(255,255,255,0.28)",strokeWidth:st?1.4:.75,strokeLinejoin:"round"}),k&&j.label&&e.jsx(ce,{x:j.x+j.width/2,y:j.y+j.depth/2,z:at+j.height+2,fontSize:j.width>70?9:8,color:w,shadow:`url(#label-${t.id})`,children:j.label})]},B)}),k&&e.jsx("text",{x:m(-25,S.depth/2,v.elevation+15).screenX-35,y:m(-25,S.depth/2,v.elevation+15).screenY,fill:P,fontSize:9,fontWeight:500,fontFamily:At,opacity:C?.9:.6,style:{letterSpacing:"0.05em",textTransform:C?"uppercase":"none"},children:v.name})]},p)})}),C&&e.jsx(oe,{style:g,plate:F,rows:y.map((v,p)=>({n:E.get(p)||p+1,name:v.label,subtitle:c[v.tier]?.name,color:v.color})).sort((v,p)=>v.n-p.n),title:t.title,tally:`${String(y.length).padStart(2,"0")} CMP / ${String(c.length).padStart(2,"0")} TIER`,className:""})]})})}function de({width:t,depth:o,elevation:a,ink:i,isGround:s}){const f=m(0,0,a),x=et(t,o,0,f.screenX,f.screenY).top;return e.jsx("path",{d:x,fill:"none",stroke:i,strokeWidth:s?1:.7,strokeDasharray:s?void 0:"5 4",opacity:s?.9:.7})}const Pt='"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace',he={blue:{top:"#3b82f6",side:"#2563eb",front:"#1d4ed8"},violet:{top:"#8b5cf6",side:"#7c3aed",front:"#6d28d9"},cyan:{top:"#06b6d4",side:"#0891b2",front:"#0e7490"},emerald:{top:"#10b981",side:"#059669",front:"#047857"},amber:{top:"#f59e0b",side:"#d97706",front:"#b45309"},rose:{top:"#f43f5e",side:"#e11d48",front:"#be123c"},slate:{top:"#475569",side:"#334155",front:"#1e293b"}},pe={blue:{top:"#93c5fd",side:"#60a5fa",front:"#3b82f6"},violet:{top:"#c4b5fd",side:"#a78bfa",front:"#8b5cf6"},cyan:{top:"#67e8f9",side:"#22d3ee",front:"#06b6d4"},emerald:{top:"#6ee7b7",side:"#34d399",front:"#10b981"},amber:{top:"#fcd34d",side:"#fbbf24",front:"#f59e0b"},rose:{top:"#fda4af",side:"#fb7185",front:"#f43f5e"},slate:{top:"#e2e8f0",side:"#cbd5e1",front:"#94a3b8"}};function mt(t,o,a){const i=u=>{const l=u.replace("#","");return{r:parseInt(l.substring(0,2),16),g:parseInt(l.substring(2,4),16),b:parseInt(l.substring(4,6),16)}},s=i(t),f=i(o),x=Math.round(s.r+(f.r-s.r)*a),b=Math.round(s.g+(f.g-s.g)*a),k=Math.round(s.b+(f.b-s.b)*a);return`rgb(${x},${b},${k})`}function Lt(t){const{theme:o,canvas:a,origin:i,tiers:s,floorSize:f,nodes:x,cornerRadius:b=0}=t,k=o==="dark"?he:pe,u=o==="dark"?"#0f172a":"#fafafa",l=o==="dark"?"#e2e8f0":"#1e293b",O=o==="dark"?"#64748b":"#94a3b8",d=[...x].sort((S,y)=>{const M=s[S.tier]?.elevation||0,g=s[y.tier]?.elevation||0;return M!==g?M-g:y.x+y.width+(y.y+y.depth)-(S.x+S.width+(S.y+S.depth))});let c=`<svg xmlns="http://www.w3.org/2000/svg" width="${a.width}" height="${a.height}" style="background:${u}">`;c+=`<defs>
7
7
  <pattern id="grid" width="24" height="24" patternUnits="userSpaceOnUse">
8
8
  <circle cx="12" cy="12" r="0.5" fill="${o==="dark"?"#1e293b":"#e2e8f0"}"/>
9
9
  </pattern>
@@ -16,4 +16,4 @@ React keys must be passed directly to JSX without using spread:
16
16
  <linearGradient id="sheen" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#ffffff" stop-opacity="0.18"/><stop offset="55%" stop-color="#ffffff" stop-opacity="0.04"/><stop offset="100%" stop-color="#ffffff" stop-opacity="0"/></linearGradient>
17
17
  <linearGradient id="shade" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#000000" stop-opacity="0"/><stop offset="100%" stop-color="#000000" stop-opacity="0.24"/></linearGradient>
18
18
  <filter id="labelshadow" x="-40%" y="-40%" width="180%" height="180%"><feDropShadow dx="0" dy="0.5" stdDeviation="0.7" flood-color="#000000" flood-opacity="0.7"/></filter>
19
- </defs>`,c+='<rect width="100%" height="100%" fill="url(#bg)"/>',c+='<rect width="100%" height="100%" fill="url(#grid)" opacity="0.5"/>',c+=`<g transform="translate(${i.x},${i.y})">`;for(let S=0;S<s.length;S++){const y=s[S],_=d.filter(v=>v.tier===S),g=y.offset||{x:0,y:0};c+=`<g transform="translate(${g.x},${g.y})">`;const C=S===0?8:2,N=et(f.width,f.depth,C,0,0),R=m(0,0,S===0?-2:y.elevation),$=y.floorColor||(o==="dark"?"#0f172a":"#f8fafc"),w=y.floorOpacity||(S===0?.95:.5);c+=`<g transform="translate(${R.screenX},${R.screenY})">`,S===0&&(c+=`<g transform="translate(4,4)" opacity="0.2"><path d="${N.top}" fill="#000"/></g>`),c+=`<path d="${N.top}" fill="${$}" opacity="${w}"/>`,S===0&&(c+=`<path d="${N.left}" fill="${o==="dark"?"#0f172a":"#cbd5e1"}" opacity="0.8"/>`,c+=`<path d="${N.right}" fill="${o==="dark"?"#1e293b":"#94a3b8"}" opacity="0.8"/>`),c+=`<path d="${N.top}" fill="none" stroke="${y.borderColor||(o==="dark"?"#475569":"#94a3b8")}" stroke-width="${S===0?1.5:.75}" opacity="${S===0?1:.6}"/>`,c+="</g>";for(const v of _){const F=y.elevation+5,Y=m(v.x,v.y,F),P=et(v.width,v.depth,v.height,Y.screenX,Y.screenY,b),L=k[v.color]||k.slate,Z=v.opacity??1;c+=`<g opacity="${Z}">`;const H=m(v.x-3,v.y-3,y.elevation),z=et(v.width+6,v.depth+6,0,H.screenX,H.screenY,b).top;if(c+=`<path d="${z}" fill="#000000" opacity="0.3" filter="url(#contact)"/>`,P.cornerBackRight)for(const T of P.cornerBackRight)c+=`<path d="${T.path}" fill="${mt(L.front,L.side,T.intensity)}"/>`;if(P.cornerBackLeft)for(const T of P.cornerBackLeft)c+=`<path d="${T.path}" fill="${mt(L.side,L.front,T.intensity)}"/>`;if(c+=`<path d="${P.left}" fill="${L.side}"/>`,c+=`<path d="${P.left}" fill="url(#shade)"/>`,c+=`<path d="${P.right}" fill="${L.front}"/>`,c+=`<path d="${P.right}" fill="url(#shade)"/>`,P.cornerFrontRight)for(const T of P.cornerFrontRight)c+=`<path d="${T.path}" fill="${mt(L.front,L.side,T.intensity)}"/>`;if(P.cornerFrontLeft)for(const T of P.cornerFrontLeft)c+=`<path d="${T.path}" fill="${mt(L.front,L.side,T.intensity)}"/>`;if(c+=`<path d="${P.top}" fill="${L.top}"/>`,c+=`<path d="${P.top}" fill="url(#sheen)"/>`,c+=`<path d="${P.top}" fill="none" stroke="rgba(255,255,255,0.28)" stroke-width="0.75" stroke-linejoin="round"/>`,v.label){const T=m(v.x+v.width/2,v.y+v.depth/2,F+v.height+2),B=v.width>70?9:8;c+=`<g transform="translate(${T.screenX},${T.screenY})" filter="url(#labelshadow)">`,c+='<g transform="matrix(0.866,-0.5,0.866,0.5,0,0)">',c+=`<text x="0" y="0" text-anchor="middle" fill="${l}" font-size="${B}" font-weight="600" font-family='${Pt}' style="text-transform:uppercase;letter-spacing:0.06em">${v.label}</text>`,c+="</g></g>"}c+="</g>"}const A=m(-25,f.depth/2,y.elevation+15);c+=`<text x="${A.screenX-35}" y="${A.screenY}" fill="${O}" font-size="9" font-weight="500" font-family='${Pt}' opacity="0.6" style="letter-spacing:0.05em">${y.name}</text>`,c+="</g>"}return c+="</g></svg>",c}function pe(t,o){t.innerHTML=At(o)}K.ArcDiagram=le,K.getColorShading=Ft,K.isoBox=et,K.isoToScreen=m,K.renderToElement=pe,K.renderToString=At,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})}));
19
+ </defs>`,c+='<rect width="100%" height="100%" fill="url(#bg)"/>',c+='<rect width="100%" height="100%" fill="url(#grid)" opacity="0.5"/>',c+=`<g transform="translate(${i.x},${i.y})">`;for(let S=0;S<s.length;S++){const y=s[S],M=d.filter(E=>E.tier===S),g=y.offset||{x:0,y:0};c+=`<g transform="translate(${g.x},${g.y})">`;const C=S===0?8:2,W=et(f.width,f.depth,C,0,0),_=m(0,0,S===0?-2:y.elevation),$=y.floorColor||(o==="dark"?"#0f172a":"#f8fafc"),w=y.floorOpacity||(S===0?.95:.5);c+=`<g transform="translate(${_.screenX},${_.screenY})">`,S===0&&(c+=`<g transform="translate(4,4)" opacity="0.2"><path d="${W.top}" fill="#000"/></g>`),c+=`<path d="${W.top}" fill="${$}" opacity="${w}"/>`,S===0&&(c+=`<path d="${W.left}" fill="${o==="dark"?"#0f172a":"#cbd5e1"}" opacity="0.8"/>`,c+=`<path d="${W.right}" fill="${o==="dark"?"#1e293b":"#94a3b8"}" opacity="0.8"/>`),c+=`<path d="${W.top}" fill="none" stroke="${y.borderColor||(o==="dark"?"#475569":"#94a3b8")}" stroke-width="${S===0?1.5:.75}" opacity="${S===0?1:.6}"/>`,c+="</g>";for(const E of M){const F=y.elevation+5,Y=m(E.x,E.y,F),A=et(E.width,E.depth,E.height,Y.screenX,Y.screenY,b),L=k[E.color]||k.slate,Z=E.opacity??1;c+=`<g opacity="${Z}">`;const G=m(E.x-3,E.y-3,y.elevation),z=et(E.width+6,E.depth+6,0,G.screenX,G.screenY,b).top;if(c+=`<path d="${z}" fill="#000000" opacity="0.3" filter="url(#contact)"/>`,A.cornerBackRight)for(const T of A.cornerBackRight)c+=`<path d="${T.path}" fill="${mt(L.front,L.side,T.intensity)}"/>`;if(A.cornerBackLeft)for(const T of A.cornerBackLeft)c+=`<path d="${T.path}" fill="${mt(L.side,L.front,T.intensity)}"/>`;if(c+=`<path d="${A.left}" fill="${L.side}"/>`,c+=`<path d="${A.left}" fill="url(#shade)"/>`,c+=`<path d="${A.right}" fill="${L.front}"/>`,c+=`<path d="${A.right}" fill="url(#shade)"/>`,A.cornerFrontRight)for(const T of A.cornerFrontRight)c+=`<path d="${T.path}" fill="${mt(L.front,L.side,T.intensity)}"/>`;if(A.cornerFrontLeft)for(const T of A.cornerFrontLeft)c+=`<path d="${T.path}" fill="${mt(L.front,L.side,T.intensity)}"/>`;if(c+=`<path d="${A.top}" fill="${L.top}"/>`,c+=`<path d="${A.top}" fill="url(#sheen)"/>`,c+=`<path d="${A.top}" fill="none" stroke="rgba(255,255,255,0.28)" stroke-width="0.75" stroke-linejoin="round"/>`,E.label){const T=m(E.x+E.width/2,E.y+E.depth/2,F+E.height+2),D=E.width>70?9:8;c+=`<g transform="translate(${T.screenX},${T.screenY})" filter="url(#labelshadow)">`,c+='<g transform="matrix(0.866,-0.5,0.866,0.5,0,0)">',c+=`<text x="0" y="0" text-anchor="middle" fill="${l}" font-size="${D}" font-weight="600" font-family='${Pt}' style="text-transform:uppercase;letter-spacing:0.06em">${E.label}</text>`,c+="</g></g>"}c+="</g>"}const P=m(-25,f.depth/2,y.elevation+15);c+=`<text x="${P.screenX-35}" y="${P.screenY}" fill="${O}" font-size="9" font-weight="500" font-family='${Pt}' opacity="0.6" style="letter-spacing:0.05em">${y.name}</text>`,c+="</g>"}return c+="</g></svg>",c}function ue(t,o){t.innerHTML=Lt(o)}K.ArcDiagram=fe,K.getColorShading=Dt,K.isoBox=et,K.isoToScreen=m,K.renderToElement=ue,K.renderToString=Lt,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})}));