@mlightcad/cad-simple-viewer-cli 1.6.1 → 1.6.3
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.
- package/LICENSE +21 -21
- package/README.md +139 -139
- package/dist-runner/assets/cad-html-plugin-zvPRf0De.js +863 -0
- package/dist-runner/assets/{cad-pdf-plugin-CqZVmSm2.js → cad-pdf-plugin-DCIpBYfq.js} +2 -2
- package/dist-runner/assets/{cad-svg-plugin-BvSmrelr.js → cad-svg-plugin-3gvPtroY.js} +7 -7
- package/dist-runner/assets/index-BAGroFfI.js +5626 -0
- package/dist-runner/index.html +12 -12
- package/dist-runner/viewer-runtime.iife.js +280 -159
- package/dist-runner/workers/libredwg-parser-worker.js +1 -1
- package/examples/batch-export-html.mjs +105 -105
- package/examples/batch-export-png.mjs +103 -103
- package/examples/create-drawing-dxf.scr +15 -15
- package/examples/create-drawing-png.scr +19 -19
- package/examples/create-shapes-dxf.scr +17 -17
- package/examples/export-dxf.scr +5 -5
- package/examples/export-html.scr +10 -9
- package/examples/export-png.scr +9 -9
- package/examples/freeze-layer-png.scr +15 -15
- package/examples/index.json +87 -87
- package/package.json +7 -7
- package/dist-runner/assets/cad-html-plugin-k7CVaAuj.js +0 -675
- package/dist-runner/assets/index-BvxDFe8e.js +0 -5451
|
@@ -1,675 +0,0 @@
|
|
|
1
|
-
import{v as _e,F as Ye,u as zt,d as y,w as dt,g as B,e as Qe,a as T,X as Xe,l as Ge,q as We,b as Je,_ as qe,D as ae,m as Ke,c as ne,P as tr,L as er,f as rr,M as ar,h as Ot,i as nr,A as or,S as ir,j as lr,k as sr,n as cr,o as dr,p as ur,r as Nt,s as mr,t as pr,x as hr,y as fr,z as gr,B as wr,C as br,E as vr,G as xr,H as yr,I as kr,J as Ar,K as Cr,N as Mr,O as Lr,Q as zr,R as Sr,T as Pr,U as Ir,V as D,W as xt,Y as $e,Z as $r,$ as yt,a0 as Br,a1 as jr,a2 as Hr,a3 as Fr}from"./index-BvxDFe8e.js";import{a4 as co,a5 as uo}from"./index-BvxDFe8e.js";const mt=2;var I=Uint8Array,P=Uint16Array,_t=Int32Array,Yt=new I([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Qt=new I([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),oe=new I([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Be=function(t,e){for(var r=new P(31),a=0;a<31;++a)r[a]=e+=1<<t[a-1];for(var n=new _t(r[30]),a=1;a<30;++a)for(var o=r[a];o<r[a+1];++o)n[o]=o-r[a]<<5|a;return{b:r,r:n}},je=Be(Yt,2),Ur=je.b,Ht=je.r;Ur[28]=258,Ht[258]=28;var Vr=Be(Qt,0),ie=Vr.r,Ft=new P(32768);for(var x=0;x<32768;++x){var X=(x&43690)>>1|(x&21845)<<1;X=(X&52428)>>2|(X&13107)<<2,X=(X&61680)>>4|(X&3855)<<4,Ft[x]=((X&65280)>>8|(X&255)<<8)>>1}var ut=(function(t,e,r){for(var a=t.length,n=0,o=new P(e);n<a;++n)t[n]&&++o[t[n]-1];var i=new P(e);for(n=1;n<e;++n)i[n]=i[n-1]+o[n-1]<<1;var l;if(r){l=new P(1<<e);var s=15-e;for(n=0;n<a;++n)if(t[n])for(var c=n<<4|t[n],d=e-t[n],u=i[t[n]-1]++<<d,m=u|(1<<d)-1;u<=m;++u)l[Ft[u]>>s]=c}else for(l=new P(a),n=0;n<a;++n)t[n]&&(l[n]=Ft[i[t[n]-1]++]>>15-t[n]);return l}),J=new I(288);for(var x=0;x<144;++x)J[x]=8;for(var x=144;x<256;++x)J[x]=9;for(var x=256;x<280;++x)J[x]=7;for(var x=280;x<288;++x)J[x]=8;var ft=new I(32);for(var x=0;x<32;++x)ft[x]=5;var Tr=ut(J,9,0),Dr=ut(ft,5,0),He=function(t){return(t+7)/8|0},Fe=function(t,e,r){return(r==null||r>t.length)&&(r=t.length),new I(t.subarray(e,r))},_=function(t,e,r){r<<=e&7;var a=e/8|0;t[a]|=r,t[a+1]|=r>>8},st=function(t,e,r){r<<=e&7;var a=e/8|0;t[a]|=r,t[a+1]|=r>>8,t[a+2]|=r>>16},St=function(t,e){for(var r=[],a=0;a<t.length;++a)t[a]&&r.push({s:a,f:t[a]});var n=r.length,o=r.slice();if(!n)return{t:Ve,l:0};if(n==1){var i=new I(r[0].s+1);return i[r[0].s]=1,{t:i,l:1}}r.sort(function($,H){return $.f-H.f}),r.push({s:-1,f:25001});var l=r[0],s=r[1],c=0,d=1,u=2;for(r[0]={s:-1,f:l.f+s.f,l,r:s};d!=n-1;)l=r[r[c].f<r[u].f?c++:u++],s=r[c!=d&&r[c].f<r[u].f?c++:u++],r[d++]={s:-1,f:l.f+s.f,l,r:s};for(var m=o[0].s,a=1;a<n;++a)o[a].s>m&&(m=o[a].s);var h=new P(m+1),w=Ut(r[d-1],h,0);if(w>e){var a=0,p=0,A=w-e,E=1<<A;for(o.sort(function(H,L){return h[L.s]-h[H.s]||H.f-L.f});a<n;++a){var N=o[a].s;if(h[N]>e)p+=E-(1<<w-h[N]),h[N]=e;else break}for(p>>=A;p>0;){var G=o[a].s;h[G]<e?p-=1<<e-h[G]++-1:++a}for(;a>=0&&p;--a){var j=o[a].s;h[j]==e&&(--h[j],++p)}w=e}return{t:new I(h),l:w}},Ut=function(t,e,r){return t.s==-1?Math.max(Ut(t.l,e,r+1),Ut(t.r,e,r+1)):e[t.s]=r},le=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new P(++e),a=0,n=t[0],o=1,i=function(s){r[a++]=s},l=1;l<=e;++l)if(t[l]==n&&l!=e)++o;else{if(!n&&o>2){for(;o>138;o-=138)i(32754);o>2&&(i(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(i(n),--o;o>6;o-=6)i(8304);o>2&&(i(o-3<<5|8208),o=0)}for(;o--;)i(n);o=1,n=t[l]}return{c:r.subarray(0,a),n:e}},ct=function(t,e){for(var r=0,a=0;a<e.length;++a)r+=t[a]*e[a];return r},Ue=function(t,e,r){var a=r.length,n=He(e+2);t[n]=a&255,t[n+1]=a>>8,t[n+2]=t[n]^255,t[n+3]=t[n+1]^255;for(var o=0;o<a;++o)t[n+o+4]=r[o];return(n+4+a)*8},se=function(t,e,r,a,n,o,i,l,s,c,d){_(e,d++,r),++n[256];for(var u=St(n,15),m=u.t,h=u.l,w=St(o,15),p=w.t,A=w.l,E=le(m),N=E.c,G=E.n,j=le(p),$=j.c,H=j.n,L=new P(19),v=0;v<N.length;++v)++L[N[v]&31];for(var v=0;v<$.length;++v)++L[$[v]&31];for(var f=St(L,7),z=f.t,q=f.l,S=19;S>4&&!z[oe[S-1]];--S);var K=c+5<<3,F=ct(n,J)+ct(o,ft)+i,U=ct(n,m)+ct(o,p)+i+14+3*S+ct(L,z)+2*L[16]+3*L[17]+7*L[18];if(s>=0&&K<=F&&K<=U)return Ue(e,d,t.subarray(s,s+c));var R,C,V,Q;if(_(e,d,1+(U<F)),d+=2,U<F){R=ut(m,h,0),C=m,V=ut(p,A,0),Q=p;var At=ut(z,q,0);_(e,d,G-257),_(e,d+5,H-1),_(e,d+10,S-4),d+=14;for(var v=0;v<S;++v)_(e,d+3*v,z[oe[v]]);d+=3*S;for(var Z=[N,$],lt=0;lt<2;++lt)for(var tt=Z[lt],v=0;v<tt.length;++v){var O=tt[v]&31;_(e,d,At[O]),d+=z[O],O>15&&(_(e,d,tt[v]>>5&127),d+=tt[v]>>12)}}else R=Tr,C=J,V=Dr,Q=ft;for(var v=0;v<l;++v){var M=a[v];if(M>255){var O=M>>18&31;st(e,d,R[O+257]),d+=C[O+257],O>7&&(_(e,d,M>>23&31),d+=Yt[O]);var et=M&31;st(e,d,V[et]),d+=Q[et],et>3&&(st(e,d,M>>5&8191),d+=Qt[et])}else st(e,d,R[M]),d+=C[M]}return st(e,d,R[256]),d+C[256]},Er=new _t([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Ve=new I(0),Rr=function(t,e,r,a,n,o){var i=o.z||t.length,l=new I(a+i+5*(1+Math.ceil(i/7e3))+n),s=l.subarray(a,l.length-n),c=o.l,d=(o.r||0)&7;if(e){d&&(s[0]=o.r>>3);for(var u=Er[e-1],m=u>>13,h=u&8191,w=(1<<r)-1,p=o.p||new P(32768),A=o.h||new P(w+1),E=Math.ceil(r/3),N=2*E,G=function(Lt){return(t[Lt]^t[Lt+1]<<E^t[Lt+2]<<N)&w},j=new _t(25e3),$=new P(288),H=new P(32),L=0,v=0,f=o.i||0,z=0,q=o.w||0,S=0;f+2<i;++f){var K=G(f),F=f&32767,U=A[K];if(p[F]=U,A[K]=F,q<=f){var R=i-f;if((L>7e3||z>24576)&&(R>423||!c)){d=se(t,s,0,j,$,H,v,z,S,f-S,d),z=L=v=0,S=f;for(var C=0;C<286;++C)$[C]=0;for(var C=0;C<30;++C)H[C]=0}var V=2,Q=0,At=h,Z=F-U&32767;if(R>2&&K==G(f-Z))for(var lt=Math.min(m,R)-1,tt=Math.min(32767,f),O=Math.min(258,R);Z<=tt&&--At&&F!=U;){if(t[f+V]==t[f+V-Z]){for(var M=0;M<O&&t[f+M]==t[f+M-Z];++M);if(M>V){if(V=M,Q=Z,M>lt)break;for(var et=Math.min(Z,M-2),Kt=0,C=0;C<et;++C){var Ct=f-Z+C&32767,Ne=p[Ct],te=Ct-Ne&32767;te>Kt&&(Kt=te,U=Ct)}}}F=U,U=p[F],Z+=F-U&32767}if(Q){j[z++]=268435456|Ht[V]<<18|ie[Q];var ee=Ht[V]&31,re=ie[Q]&31;v+=Yt[ee]+Qt[re],++$[257+ee],++H[re],q=f+V,++L}else j[z++]=t[f],++$[t[f]]}}for(f=Math.max(f,q);f<i;++f)j[z++]=t[f],++$[t[f]];d=se(t,s,c,j,$,H,v,z,S,f-S,d),c||(o.r=d&7|s[d/8|0]<<3,d-=7,o.h=A,o.p=p,o.i=f,o.w=q)}else{for(var f=o.w||0;f<i+c;f+=65535){var Mt=f+65535;Mt>=i&&(s[d/8|0]=c,Mt=i),d=Ue(s,d+1,t.subarray(f,Mt))}o.i=i}return Fe(l,0,a+He(d)+n)},Zr=(function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var r=e,a=9;--a;)r=(r&1&&-306674912)^r>>>1;t[e]=r}return t})(),Or=function(){var t=-1;return{p:function(e){for(var r=t,a=0;a<e.length;++a)r=Zr[r&255^e[a]]^r>>>8;t=r},d:function(){return~t}}},Nr=function(t,e,r,a,n){if(!n&&(n={l:1},e.dictionary)){var o=e.dictionary.subarray(-32768),i=new I(o.length+t.length);i.set(o),i.set(t,o.length),t=i,n.w=o.length}return Rr(t,e.level==null?6:e.level,e.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,r,a,n)},Vt=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},_r=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&Vt(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var a=0;a<=r.length;++a)t[a+10]=r.charCodeAt(a)}},Yr=function(t){return 10+(t.filename?t.filename.length+1:0)};function Qr(t,e){e||(e={});var r=Or(),a=t.length;r.p(t);var n=Nr(t,e,Yr(e),8),o=n.length;return _r(n,e),Vt(n,o-8,r.d()),Vt(n,o-4,a),n}var ce=typeof TextEncoder<"u"&&new TextEncoder,Xr=typeof TextDecoder<"u"&&new TextDecoder,Gr=0;try{Xr.decode(Ve,{stream:!0}),Gr=1}catch{}function Wr(t,e){var r;if(ce)return ce.encode(t);for(var a=t.length,n=new I(t.length+(t.length>>1)),o=0,i=function(d){n[o++]=d},r=0;r<a;++r){if(o+5>n.length){var l=new I(o+8+(a-r<<1));l.set(n),n=l}var s=t.charCodeAt(r);s<128||e?i(s):s<2048?(i(192|s>>6),i(128|s&63)):s>55295&&s<57344?(s=65536+(s&1047552)|t.charCodeAt(++r)&1023,i(240|s>>18),i(128|s>>12&63),i(128|s>>6&63),i(128|s&63)):(i(224|s>>12),i(128|s>>6&63),i(128|s&63))}return Fe(n,0,o)}const Jr="gzip";function qr(t){return{bytes:Qr(t),compression:Jr}}const Kr=1480934209,de=1,ue=2,me=4,pe=8,he=1,fe=2,ge=4,we=8,be=16,ta=32;function ea(t){if(t.version!==mt)throw new Error(`Unsupported snapshot version: ${t.version}`);const e=new oa;e.writeU32(Kr),e.writeU8(mt),e.writeU8(0),e.writeU8(0),e.writeU8(0),e.writeJson(t.meta),e.writeJson(t.layers),e.writeString(t.activeLayoutBtrId),e.writeU32(t.layouts.length);for(const r of t.layouts)ra(e,r);return e.toUint8Array()}function ra(t,e){t.writeString(e.btrId),t.writeString(e.name),t.writeU8(e.isModelSpace?1:0),t.writeJson(e.osnap??null),t.writeU32(e.lineBatches.length);for(const r of e.lineBatches)aa(t,r);t.writeU32(e.meshBatches.length);for(const r of e.meshBatches)na(t,r)}function aa(t,e){t.writeString(e.layer),t.writeU32(e.color>>>0),t.writeF64(e.offset[0]),t.writeF64(e.offset[1]),t.writeF64(e.offset[2]),t.writeFloat32Array(e.positions);let r=0;e.indices&&e.indices.length>0&&(r|=de),e.linePattern&&(r|=ue),e.lineDistances&&e.lineDistances.length>0&&(r|=me),e.lineWidth!=null&&e.lineWidth>0&&(r|=pe),t.writeU8(r),r&de&&t.writeUint32Array(e.indices),r&ue&&t.writeJson(e.linePattern),r&me&&t.writeFloat32Array(e.lineDistances),r&pe&&t.writeF32(e.lineWidth)}function na(t,e){t.writeString(e.layer),t.writeU32(e.color>>>0),t.writeF64(e.offset[0]),t.writeF64(e.offset[1]),t.writeF64(e.offset[2]),t.writeFloat32Array(e.positions);let r=0;e.indices&&e.indices.length>0&&(r|=he),e.hatchPattern&&(r|=fe),e.gradientFill&&(r|=ge),e.gradientPositions&&e.gradientPositions.length>0&&(r|=we),e.side!=null&&(r|=be),e.points&&(r|=ta),t.writeU8(r),r&he&&t.writeUint32Array(e.indices),r&fe&&t.writeJson(e.hatchPattern),r&ge&&t.writeJson(e.gradientFill),r&we&&t.writeFloat32Array(e.gradientPositions),r&be&&t.writeU8(e.side)}class oa{constructor(){this.chunks=[],this.length=0}writeU8(e){const r=new Uint8Array(1);r[0]=e&255,this.chunks.push(r),this.length+=1}writeU32(e){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,e>>>0,!0),this.chunks.push(r),this.length+=4}writeF32(e){const r=new Uint8Array(4);new DataView(r.buffer).setFloat32(0,e,!0),this.chunks.push(r),this.length+=4}writeF64(e){const r=new Uint8Array(8);new DataView(r.buffer).setFloat64(0,e,!0),this.chunks.push(r),this.length+=8}writeBytes(e){this.chunks.push(e),this.length+=e.length}writeString(e){const r=Wr(e);this.writeU32(r.length),this.writeBytes(r)}writeJson(e){this.writeString(JSON.stringify(e))}writeFloat32Array(e){this.alignTo(4);const r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);this.writeU32(r.length),this.writeBytes(r)}writeUint32Array(e){this.alignTo(4);const r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);this.writeU32(r.length),this.writeBytes(r)}alignTo(e){const r=this.length%e;if(r===0)return;const a=e-r;for(let n=0;n<a;n++)this.writeU8(0)}toUint8Array(){const e=new Uint8Array(this.length);let r=0;for(const a of this.chunks)e.set(a,r),r+=a.length;return e}}const ia="application/vnd.mlightcad.acex-snapshot+binary";function la(t){if(t.version!==mt)throw new Error(`Unsupported snapshot version: ${t.version}`);const e=ea(t),r=qr(e);return{payload:ca(r.bytes),compression:r.compression}}function sa(){return ia}function ca(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function it(t,e,r){if(r<=0)return new Float32Array(0);const a=new Float32Array(r);for(let n=0;n<r;n++)a[n]=t[e+n];return a}function da(t,e,r){if(r<=0)return new Uint32Array(0);const a=new Uint32Array(r);for(let n=0;n<r;n++)a[n]=t[e+n];return a}function Te(t,e){if(e.length===0)return{positions:t,indices:e};let r=0;for(let n=0;n<e.length;n++){const o=e[n];o>r&&(r=o)}const a=(r+1)*3;return a>=t.length?{positions:t,indices:e}:{positions:it(t,0,a),indices:e}}function ve(t,e){return t+e}const rt={x:0,y:0,z:0};function ua(t){t.updateMatrixWorld(!0);const e=t.matrixWorld.elements;return rt.x=e[12],rt.y=e[13],rt.z=e[14],[rt.x,rt.y,rt.z]}function ma(t,e){const r=e.elements,a=t.positions;if(a.length===0)return{positions:new Float32Array(0),indices:t.indices};const n=new Float32Array(a.length);for(let o=0;o<a.length;o+=3){const i=a[o],l=a[o+1],s=a[o+2];n[o]=r[0]*i+r[4]*l+r[8]*s+r[12],n[o+1]=r[1]*i+r[5]*l+r[9]*s+r[13],n[o+2]=r[2]*i+r[6]*l+r[10]*s+r[14]}return{positions:n,indices:t.indices?new Uint32Array(t.indices):void 0}}function pa(t){const e=t.positions;if(e.length<3)return{slice:t,offset:[0,0,0]};let r=1/0,a=1/0,n=1/0,o=-1/0,i=-1/0,l=-1/0;for(let d=0;d<e.length;d+=3){const u=e[d],m=e[d+1],h=e[d+2];r=Math.min(r,u),a=Math.min(a,m),n=Math.min(n,h),o=Math.max(o,u),i=Math.max(i,m),l=Math.max(l,h)}const s=[(r+o)/2,(a+i)/2,(n+l)/2],c=new Float32Array(e.length);for(let d=0;d<e.length;d+=3)c[d]=e[d]-s[0],c[d+1]=e[d+1]-s[1],c[d+2]=e[d+2]-s[2];return{slice:{positions:c,indices:t.indices?new Uint32Array(t.indices):void 0},offset:s}}function ha(t,e,r={}){t.updateMatrixWorld(!0);const a=ma(e,t.matrixWorld);return r.preserveWorldSpaceForPatternFill?{slice:a,offset:[0,0,0]}:pa(a)}function Xt(t){const e=t;if(e.isShaderMaterial===!0||t.type==="ShaderMaterial")return e}function fa(t){var e;const r=Xt(t);if(!r)return;const a=r.uniforms.pattern,n=r.uniforms.patternLength;if(!a||!n)return;const o=a.value;if(!(!Array.isArray(o)||o.length===0))return{pattern:[...o],patternLength:Number(n.value),viewportScale:Number(((e=r.uniforms.u_viewportScale)==null?void 0:e.value)??1)}}function ga(t){var e;const r=Xt(t);if(!r)return;const a=r.uniforms.u_patternLines;if(!a)return;const n=a.value;if(!(!Array.isArray(n)||n.length===0))return{patternAngle:Number(((e=r.uniforms.u_patternAngle)==null?void 0:e.value)??0),patternLines:n.map(ba)}}function wa(t){var e,r,a,n,o;const i=Xt(t);if(!i||i.uniforms.u_patternLines)return;const l=(e=i.uniforms.u_startColor)==null?void 0:e.value,s=(r=i.uniforms.u_endColor)==null?void 0:r.value,c=i.uniforms.u_gradientType;if(!(!(l!=null&&l.getHex)||c==null))return{startColor:l.getHex(),endColor:((a=s==null?void 0:s.getHex)==null?void 0:a.call(s))??l.getHex(),angle:Number(((n=i.uniforms.u_angle)==null?void 0:n.value)??0),shift:Number(((o=i.uniforms.u_shift)==null?void 0:o.value)??0),gradientType:Number(c.value)}}function ba(t){return{angle:t.angle,base:[t.base.x,t.base.y],offset:[t.offset.x,t.offset.y],dashLengths:[...t.dashLengths],patternLength:t.patternLength}}function De(t){const e=t.length/3;if(e<2)return new Float32Array(0);const r=new Float32Array(e);for(let a=0;a<e;a+=2){a===0?r[a]=0:r[a]=r[a-1];const n=t[a*3],o=t[a*3+1],i=t[a*3+2]??0,l=t[(a+1)*3],s=t[(a+1)*3+1],c=t[(a+1)*3+2]??0,d=l-n,u=s-o,m=c-i;r[a+1]=r[a]+Math.sqrt(d*d+u*u+m*m)}return r}function va(t,e){const r=t.getAttribute(e);if(!r||r.count===0)return;const a=r.itemSize;if(t.getIndex()){const d=r.array;return it(d,0,r.count*a)}const n=t.drawRange,o=r.count,i=Math.max(0,Math.min(Math.floor(n.start),o)),l=Math.max(0,o-i),s=!Number.isFinite(n.count)||n.count<=0?l:Math.min(Math.floor(n.count),l);if(s<=0)return;const c=r.array;return it(c,i*a,s*a)}function xa(t,e){const r=Math.atan2(e[1],e[0]),a=(o,i)=>[e[0]*o+e[4]*i+e[12],e[1]*o+e[5]*i+e[13]],n=(o,i)=>[e[0]*o+e[4]*i,e[1]*o+e[5]*i];return{patternAngle:t.patternAngle+r,patternLines:t.patternLines.map(o=>({angle:o.angle+r,base:a(o.base[0],o.base[1]),offset:n(o.offset[0],o.offset[1]),dashLengths:[...o.dashLengths],patternLength:o.patternLength}))}}function Tt(t,e){return!Number.isFinite(t)||t<0?0:Math.min(Math.floor(t),e)}function Dt(t,e,r){const a=Math.max(0,e-r);return!Number.isFinite(t)||t<=0?a:Math.min(Math.floor(t),a)}function xe(t){const e=t.getAttribute("position");if(!e)return{positions:new Float32Array(0)};const r=t.drawRange,a=e.array,n=e.itemSize,o=t.getIndex();if(o){const s=it(a,0,e.count*n),c=o.array,d=Tt(r.start,o.count),u=Dt(r.count,o.count,d),m=da(c,d,u);return Te(s,m)}const i=Tt(r.start,e.count),l=Dt(r.count,e.count,i);return{positions:it(a,i*n,l*n)}}function Et(t){return Sr(t.flags)&&Pr(t.flags)}function Gt(t,e){const r=e.getAttribute("position");if(!r)return{positions:new Float32Array(0)};const a=r.itemSize,n=r.array,o=e.getIndex(),{count:i}=t.mappingStats;if(o){const s=it(n,0,r.count*a),c=o.array,d=[];for(let u=0;u<i;u++){let m;try{m=t.getGeometryRangeAt(u)}catch{continue}const h=m.indexStart??0,w=m.indexCount??0;if(!(!Et(m)||w<=0))for(let p=0;p<w;p++)d.push(c[h+p])}return d.length===0?{positions:new Float32Array(0)}:Te(s,new Uint32Array(d))}const l=[];for(let s=0;s<i;s++){let c;try{c=t.getGeometryRangeAt(s)}catch{continue}if(!Et(c)||c.vertexCount<=0)continue;const d=c.vertexStart*a,u=c.vertexCount*a;for(let m=0;m<u;m++)l.push(n[d+m])}return{positions:new Float32Array(l)}}function gt(t,e,r){t.push(e.getX(r),e.getY(r),e.getZ(r))}function ya(t,e){const r=e.getAttribute("instanceStart"),a=e.getAttribute("instanceEnd");if(!r||!a)return{positions:new Float32Array(0)};const{count:n}=t.mappingStats,o=[];for(let i=0;i<n;i++){let l;try{l=t.getGeometryRangeAt(i)}catch{continue}if(!Et(l)||l.vertexCount<=0)continue;const s=l.vertexStart,c=s+l.vertexCount;for(let d=s;d<c;d++)gt(o,r,d),gt(o,a,d)}return{positions:new Float32Array(o)}}function ka(t,e){const r=t.instanceCount;if(Number.isFinite(r)&&r>=0)return Math.min(Math.floor(r),e);const a=t.drawRange,n=Tt(a.start,e);return Dt(a.count,e,n)}function Aa(t){const e=t.getAttribute("instanceStart"),r=t.getAttribute("instanceEnd");if(!e||!r||e.count===0)return{positions:new Float32Array(0)};const a=ka(t,e.count);if(a<=0)return{positions:new Float32Array(0)};const n=[];for(let o=0;o<a;o++)gt(n,e,o),gt(n,r,o);return{positions:new Float32Array(n)}}function Pt(t){return nr(t)}function Ee(t){if(t instanceof lr)return t.linewidth}function It(t){if("material"in t){const e=t.userData.originalMaterial??t.material;return Array.isArray(e)?e[0]:e}return t.material}function ot(t){var e;const r=or(t),a=r.layer??"0",n=t;let o=n.color!=null?n.color.getHex():r.color??16777215;const i=fa(t),l=ga(t),s=wa(t);if(t instanceof ir||t.type==="ShaderMaterial"){const c=(e=t.uniforms.u_color)==null?void 0:e.value;c!=null&&c.getHex?o=c.getHex():s&&(o=s.startColor)}return{color:o,layer:a,linePattern:i,hatchPattern:l,gradientFill:s,side:l||s?t.side:void 0}}function Ca(t,e){if(!e)return;const r=t.userData.bakedWorldMatrix;return!r||r.length<16?e:xa(e,r)}function kt(t){return ua(t)}function $t(t,e,r={}){const a=ha(t,e,r);return{...a.slice,offset:a.offset}}function Wt(t,e,r,a,n){const o=ot(e),i=Ca(r,o.hatchPattern),l=o.gradientFill?va(t,"gradientPosition"):void 0;return{layer:o.layer,color:o.color,offset:n,hatchPattern:i,gradientFill:o.gradientFill,gradientPositions:l,side:o.side,...a}}function Ma(t){const e=ya(t,t.geometry);if(e.positions.length===0)return;const{color:r,layer:a}=ot(t.material),n=Ee(t.material);return{layer:a,color:r,offset:kt(t),lineWidth:n,...e}}function La(t){const e=Gt(t,t.geometry);if(e.positions.length===0)return;const{color:r,layer:a,linePattern:n}=ot(t.material),o=n?De(e.positions):void 0;return{layer:a,color:r,offset:kt(t),linePattern:n,lineDistances:o,...e}}function za(t){const e=Gt(t,t.geometry);if(e.positions.length!==0)return Wt(t.geometry,t.material,t,e,kt(t))}function Sa(t){const e=Gt(t,t.geometry);if(e.positions.length!==0)return{points:!0,...Wt(t.geometry,t.material,t,e,kt(t))}}function ye(t){const e=[],r=[];return t.traverse(a=>{if(!(Je(a)||qe(a))){if(a instanceof ae){const n=La(a);n&&e.push(n);return}if(a instanceof Ke){const n=Ma(a);n&&e.push(n);return}if(a instanceof ne){const n=za(a);n&&r.push(n);return}if(a instanceof tr){const n=Sa(a);n&&r.push(n);return}if(a instanceof er){if(!Pt(a))return;const n=Aa(a.geometry);if(n.positions.length===0)return;const o=It(a),{color:i,layer:l}=ot(o),{offset:s,...c}=$t(a,n);e.push({layer:l,color:i,offset:s,lineWidth:Ee(o),...c})}else if(a instanceof rr&&!(a instanceof ae)){if(!Pt(a))return;const n=xe(a.geometry);if(n.positions.length===0)return;const o=It(a),{color:i,layer:l,linePattern:s}=ot(o),{offset:c,...d}=$t(a,n),u=s?De(d.positions):void 0;e.push({layer:l,color:i,offset:c,linePattern:s,lineDistances:u,...d})}else if(a instanceof ar&&!(a instanceof ne)){if(!Pt(a))return;const n=xe(a.geometry);if(n.positions.length===0)return;const o=It(a),i=ot(o),{offset:l,...s}=$t(a,n,{preserveWorldSpaceForPatternFill:!!i.hatchPattern});r.push(Wt(a.geometry,o,a,s,l))}}}),{lineBatches:e,meshBatches:r}}function ke(t,e){const r=t.extmin,a=t.extmax;return{title:e==null?void 0:e.title,extents:{minX:r.x,minY:r.y,maxX:a.x,maxY:a.y},units:{insunits:t.insunits,lunits:t.lunits,luprec:t.luprec,aunits:t.aunits,auprec:t.auprec,measurement:t.measurement,ltscale:t.ltscale,angbase:t.angbase,angdir:t.angdir},background:(e==null?void 0:e.background)??0}}function Jt(t){return t.z>=0?1:-1}const Pa=1e6;function k(t,e){const r=new D(e.x,e.y,e.z??0).applyMatrix4(t);return{x:r.x,y:r.y}}function Ia(t){const e=t.elements;return new Ot(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])}function wt(t,e){return new Ot().multiplyMatrices(t,Ia(e))}function qt(t,e){const r=new D(e.x,e.y,e.z??0).transformDirection(t).normalize();return{x:r.x,y:r.y}}function Rt(t){const e=new D(t.elements[0],t.elements[1],t.elements[2]).length(),r=new D(t.elements[4],t.elements[5],t.elements[6]).length();return xt.equal(e,r,$e*Math.max(e,r,1))}function $a(t,e){const r=t.tables.blockTable.getIdAt(e);if(r)return r;for(const n of t.tables.blockTable.newIterator())if(n.objectId===e)return n;const a=t.tables.blockTable.modelSpace;if(a.objectId===e)return a}function Ba(t){if(t instanceof Ir)return!0;const e=t;return(e.type==="LINE"||e.type==="Line")&&e.startPoint!=null&&e.endPoint!=null}function ja(t,e,r,a){Y(t,e,r,a.startPoint,a.endPoint)}function Re(t,e){return t.blockTableRecord??(t.blockName?e.tables.blockTable.getAt(t.blockName):void 0)}function Ha(t,e){const r=t.dimBlockId;return r?e.tables.blockTable.getAt(r):void 0}function Fa(t,e){const r=Re(t,e);if(r)return r;const a=t.owningBlockRecordId;return a?e.tables.blockTable.getAt(a):void 0}function Ze(t){return t.getFullInsertionTransform()}function Ua(t){for(const e of t.newIterator())return!0;return!1}function Va(t){return typeof t.getFullInsertionTransform=="function"&&"blockTableRecord"in t}function Y(t,e,r,a,n){const o=k(r,a),i=k(r,n),l={kind:"line",layer:e,x0:o.x,y0:o.y,x1:i.x,y1:i.y};t.push(l)}function Ae(t,e,r,a,n,o){const i=k(r,a),l=qt(r,n),s=Math.hypot(l.x,l.y)||1,c=l.x/s,d=l.y/s,u=Pa,m=o?i.x-c*u:i.x,h=o?i.y-d*u:i.y,w=i.x+c*u,p=i.y+d*u;t.push({kind:"line",layer:e,x0:m,y0:h,x1:w,y1:p})}function W(t,e,r,a,n){if(a.length<2)return;const o=n?a.length:a.length-1;for(let i=0;i<o;i++)Y(t,e,r,a[i],a[(i+1)%a.length])}function Ta(t,e,r,a){const n=[a.startPosition];for(const o of a.segments)n.push(o.position);W(t,e,r,n,a.closed)}function Da(t,e,r){if(r.vertices.length>=2)return r.vertices;if(r.vertices.length===0)return[];const a=r.vertices[0],n=e.lastLeaderLinePoint??e.landingPoint??t.landingPoint??t.contentBasePosition;if(!n)return r.vertices;const o=a.x-n.x,i=a.y-n.y,l=(a.z??0)-(n.z??0);return Math.hypot(o,i,l)<=$e?r.vertices:[a,n]}function Ea(t,e,r,a){var n,o;for(const l of a.leaders)for(const s of l.leaderLines){const c=Da(a,l,s);W(t,e,r,c,!1)}const i=l=>{if(!l)return;const s=k(r,l);t.push({kind:"point",layer:e,x:s.x,y:s.y})};i(a.contentBasePosition),i((n=a.mtextContent)==null?void 0:n.anchorPoint),i((o=a.blockContent)==null?void 0:o.position)}function Ra(t,e,r,a){const n=a.numberOfVertices;if(n<2)return;const o=a.elevation,i=a.closed?n:n-1;for(let l=0;l<i;l++){const s=a.getPointAt(l),c=a.getPointAt((l+1)%n),d=a.getBulgeAt(l),u={x:s.x,y:s.y,z:o},m={x:c.x,y:c.y,z:o};if(xt.isPositive(Math.abs(d))){const h=k(r,u),w=k(r,m),p=new yt(h,w,d),A=p.center;t.push({kind:"arc",layer:e,cx:A.x,cy:A.y,r:p.radius,startAngle:p.startAngle,endAngle:p.endAngle,normalSign:p.clockwise?-1:1})}else Y(t,e,r,u,m)}}function Za(t,e,r,a,n,o){const i=k(r,a),l=new D(r.elements[0],r.elements[1],r.elements[2]).length(),s={kind:"circle",layer:e,cx:i.x,cy:i.y,r:n*l,normalSign:Jt(o)};t.push(s)}function Oa(t,e,r,a){const n=k(r,a.center),o=new D(r.elements[0],r.elements[1],r.elements[2]).length(),i={kind:"arc",layer:e,cx:n.x,cy:n.y,r:a.radius*o,startAngle:a.startAngle,endAngle:a.endAngle,normalSign:Jt(a.normal)};t.push(i)}function Bt(t,e,r,a){const n=k(r,a.center),o=a._geo,i=(o==null?void 0:o.majorAxis)??{x:1,y:0,z:0},l=qt(r,i),s=Math.hypot(l.x,l.y)||1,c=new D(r.elements[0],r.elements[1],r.elements[2]).length(),d=new D(r.elements[4],r.elements[5],r.elements[6]).length(),u={kind:"ellipse",layer:e,cx:n.x,cy:n.y,majorX:l.x/s,majorY:l.y/s,majorR:a.majorAxisRadius*c,minorR:a.minorAxisRadius*d,startAngle:a.startAngle,endAngle:a.endAngle,closed:a.closed,normalSign:Jt(a.normal)};t.push(u)}function Na(t,e,r,a){var n,o;const i=a._geo;if(!((n=i==null?void 0:i.controlPoints)!=null&&n.length))return;const l=[];for(const c of i.controlPoints){const d=k(r,c);l.push(d.x,d.y)}const s={kind:"spline",layer:e,controlPoints:l,degree:i.degree??3,knots:[...i.knots??[]],weights:[...i.weights??[]],closed:i.closed??!1};if((o=i.fitPoints)!=null&&o.length){s.fitPoints=[];for(const c of i.fitPoints){const d=k(r,c);s.fitPoints.push(d.x,d.y)}}t.push(s)}function _a(t,e,r,a){var n;const o=(n=a._geo)==null?void 0:n.vertices,i=o&&o.length>1?o.map(c=>({x:c.x,y:c.y,bulge:c.bulge})):Array.from({length:a.numberOfVertices},(c,d)=>{const u=a.getPoint2dAt(d);return{x:u.x,y:u.y,bulge:0}}),l=i.length;if(l<2)return;const s=a.closed?l:l-1;for(let c=0;c<s;c++){const d=i[c],u=i[(c+1)%l],m=d.bulge??0;if(xt.isPositive(Math.abs(m))){const h=k(r,{x:d.x,y:d.y,z:0}),w=k(r,{x:u.x,y:u.y,z:0}),p=new yt(h,w,m),A=p.center;t.push({kind:"arc",layer:e,cx:A.x,cy:A.y,r:p.radius,startAngle:p.startAngle,endAngle:p.endAngle,normalSign:p.clockwise?-1:1})}else Y(t,e,r,{x:d.x,y:d.y,z:0},{x:u.x,y:u.y,z:0})}}function Ya(t,e,r,a,n){if(Rt(r)){const o=k(r,{x:a.center.x,y:a.center.y,z:n}),i=new D(r.elements[0],r.elements[1],r.elements[2]).length();t.push({kind:"arc",layer:e,cx:o.x,cy:o.y,r:a.radius*i,startAngle:a.startAngle,endAngle:a.endAngle,normalSign:a.clockwise?-1:1});return}Y(t,e,r,{x:a.startPoint.x,y:a.startPoint.y,z:n},{x:a.endPoint.x,y:a.endPoint.y,z:n})}function Qa(t,e,r,a,n){const o=k(r,{x:a.center.x,y:a.center.y,z:n}),i=qt(r,{x:Math.cos(a.rotation),y:Math.sin(a.rotation),z:0}),l=Math.hypot(i.x,i.y)||1,s=new D(r.elements[0],r.elements[1],r.elements[2]).length(),c=new D(r.elements[4],r.elements[5],r.elements[6]).length();t.push({kind:"ellipse",layer:e,cx:o.x,cy:o.y,majorX:i.x/l,majorY:i.y/l,majorR:a.majorAxisRadius*s,minorR:a.minorAxisRadius*c,startAngle:a.startAngle,endAngle:a.endAngle,closed:!1,normalSign:a.clockwise?-1:1})}function Xa(t,e,r,a,n){var o;const i=a.numberOfVertices;if(i<2)return;const l=a.closed?i:i-1;for(let s=0;s<l;s++){const c=a.getPointAt(s),d=a.getPointAt((s+1)%i),u=((o=a.vertices[s])==null?void 0:o.bulge)??0,m={x:c.x,y:c.y,z:n},h={x:d.x,y:d.y,z:n};if(xt.isPositive(Math.abs(u))){const w=k(r,m),p=k(r,h),A=new yt(w,p,u),E=A.center;t.push({kind:"arc",layer:e,cx:E.x,cy:E.y,r:A.radius,startAngle:A.startAngle,endAngle:A.endAngle,normalSign:A.clockwise?-1:1})}else Y(t,e,r,m,h)}}function Ga(t,e,r,a,n){if(a instanceof Br){Xa(t,e,r,a,n);return}if(a instanceof jr)for(const o of a.curves)o instanceof Hr?Y(t,e,r,{x:o.startPoint.x,y:o.startPoint.y,z:n},{x:o.endPoint.x,y:o.endPoint.y,z:n}):o instanceof yt?Ya(t,e,r,o,n):o instanceof Fr&&Qa(t,e,r,o,n)}function Wa(t,e,r,a){var n;const o=(n=a._geo)==null?void 0:n.loops;if(!(o!=null&&o.length))return;const i=a.elevation;for(const l of o)Ga(t,e,r,l,i)}function Ja(t,e,r,a){const n=wt(r,Ze(a)),o=[0];for(let c=0;c<a.numColumns;c++)o.push(o[c]+a.columnWidth(c));const i=[0];for(let c=0;c<a.numRows;c++)i.push(i[c]-a.rowHeight(c));const l=o[o.length-1],s=i[i.length-1];for(const c of i)Y(t,e,n,{x:0,y:c,z:0},{x:l,y:c,z:0});for(const c of o)Y(t,e,n,{x:c,y:0,z:0},{x:c,y:s,z:0})}function qa(t,e,r,a,n,o,i){const l=Zt(t.layer,r);if(i&&!i(l))return;const s=Fa(t,o);if(s&&!n.has(s.objectId)&&Ua(s)){n.add(s.objectId);const d=wt(e,Ze(t));bt(s,d,l,a,n,o,i),n.delete(s.objectId);return}Ja(a,l,e,t);const c=k(e,t.position);a.push({kind:"point",layer:l,x:c.x,y:c.y})}function Ka(t,e,r,a){let n=a.boundaryPath();if(n.length>1){const i=n[0],l=n[n.length-1];i.x===l.x&&i.y===l.y&&(i.z??0)===(l.z??0)&&(n=n.slice(0,-1))}n.length>=2&&W(t,e,r,n,!0);const o=k(r,a.position);t.push({kind:"point",layer:e,x:o.x,y:o.y})}function Zt(t,e){return t==="0"?e:t}function tn(t,e,r,a,n,o,i){if(!t.visibility)return;const l=Zt(t.layer,r);if(!(i&&!i(l))){if(t instanceof sr){qa(t,e,r,a,n,o,i);return}if(Va(t)){const s=Re(t,o);if(!s||n.has(s.objectId))return;n.add(s.objectId);const c=wt(e,t.getFullInsertionTransform()),d=Zt(t.layer,r);bt(s,c,d,a,n,o,i),n.delete(s.objectId);return}if(t instanceof cr){const s=t,c=Ha(s,o);if(!c||n.has(c.objectId))return;n.add(c.objectId);const d=wt(e,s.getFullDimBlockTransform());bt(c,d,l,a,n,o,i),n.delete(c.objectId);return}if(Ba(t)){ja(a,l,e,t);return}if(t instanceof dr){Rt(e)?Za(a,l,e,t.center,t.radius,t.normal):Bt(a,l,e,en(t));return}if(t instanceof ur){Rt(e)?Oa(a,l,e,t):Bt(a,l,e,rn(t));return}if(t instanceof Nt){Bt(a,l,e,t);return}if(t instanceof mr){Na(a,l,e,t);return}if(t instanceof pr){_a(a,l,e,t);return}if(t instanceof hr){Ra(a,l,e,t);return}if(t instanceof fr){const s=[];for(let c=0;c<t.numberOfVertices;c++)s.push(t.getPointAt(c));W(a,l,e,s,t.closed);return}if(t instanceof gr){Wa(a,l,e,t);return}if(t instanceof wr){Ae(a,l,e,t.basePoint,t.unitDir,!1);return}if(t instanceof br){Ae(a,l,e,t.basePoint,t.unitDir,!0);return}if(t instanceof vr){const s=[t.getPointAt(0),t.getPointAt(1),t.getPointAt(2),t.getPointAt(3)];W(a,l,e,s,!0);return}if(t instanceof xr){const s=t.subGetGripPoints();s.length>=2&&W(a,l,e,s,s.length>=3);return}if(t instanceof yr){const s=t.vertices;s.length>=2&&W(a,l,e,s,!1);return}if(t instanceof kr){Ta(a,l,e,t);return}if(t instanceof Ar){Ea(a,l,e,t);return}if(t instanceof Cr){const s=k(e,t.position);a.push({kind:"point",layer:l,x:s.x,y:s.y});return}if(t instanceof Mr){const s=k(e,t.location);a.push({kind:"point",layer:l,x:s.x,y:s.y});return}if(t instanceof Lr){Ka(a,l,e,t);return}if(t instanceof zr){const s=k(e,t.position);a.push({kind:"point",layer:l,x:s.x,y:s.y})}}}function bt(t,e,r,a,n,o,i){for(const l of t.newIterator())tn(l,e,r,a,n,o,i)}function en(t){return new Nt(t.center,t.normal,{x:1,y:0,z:0},t.radius,t.radius,0,$r)}function rn(t){return new Nt(t.center,t.normal,{x:1,y:0,z:0},t.radius,t.radius,t.startAngle,t.endAngle)}function Ce(t,e,r={}){const a=$a(t,e);if(!a)return{primitives:[]};const n=[],o=new Ot;return bt(a,o,"0",n,new Set,t,r.includeLayer),{primitives:n}}const an=["en","zh","cs","tr"];function nn(t){if(t==null||t==="")return null;const e=t.toLowerCase().replace("_","-");for(const r of an)if(e===r||e.startsWith(`${r}-`))return r;return null}const on='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M9.3333 14.125 5.875 10.6667V14.125H9.3333Zm4.7917-3.4583-3.4583 3.4583H14.125V10.6667ZM10.6667 5.875 14.125 9.3333V5.875H10.6667ZM5.875 9.3333 9.3333 5.875H5.875V9.3333Zm9.2083 5.475c1.2333-1.3 1.9083-3.0333 1.9083-4.825-.0083-3.325-2.35-6.1833-5.6083-6.8417C8.125 2.4833 4.85 4.2 3.55 7.2583c-1.3 3.0583-.275 6.6083 2.4583 8.5 2.725 1.8917 6.4167 1.6 8.8167-.6917.0917-.0833.175-.175.2583-.2583Zm1.2583.5917 2.575 2.575c-.3167.3167-.625.625-.9417.9417-.8583-.8583-1.7167-1.7167-2.575-2.575-3.4083 2.9-8.4917 2.5917-11.525-.6917S.9417 7.275 4.1083 4.1083C7.2667.9417 12.3667.8417 15.65 3.875s3.5917 8.1167.6917 11.525Z"/></svg>',ln='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M3.75 9.25h12.5v1.5H3.75v-1.5ZM2.25 6.5h1.5v7h-1.5v-7ZM16.25 6.5h1.5v7h-1.5v-7Z"/></svg>',sn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><polygon fill="currentColor" points="5.74 7.13 7 9.5 4.15 7.72 3.2 7.12 3 7 7 4.5 6.17 6.05 5.67 7 5.74 7.13"/><polygon fill="currentColor" points="16 12.5 13.5 16.5 12.66 15.15 11.92 13.97 11 12.5 12 13.03 12.98 13.55 13.5 13.83 16 12.5"/><rect fill="currentColor" x="2" y="2.5" width="1" height="15"/><rect fill="currentColor" x="3" y="16.5" width="15" height="1"/><path fill="currentColor" d="M14,13c0,.18,0,.37,0,.55v0a6.82,6.82,0,0,1-.32,1.57l-.74-1.18L13,13.5c0-.14,0-.31,0-.47v0a6,6,0,0,0-6-6,6.74,6.74,0,0,0-1.26.13l-.29.07a5.61,5.61,0,0,0-1.3.52l-1-.6a7.07,7.07,0,0,1,2-.88,6.78,6.78,0,0,1,1-.19A7.7,7.7,0,0,1,7,6a7,7,0,0,1,7,7Z"/></svg>',cn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><rect fill="currentColor" x="2" y="16" width="2" height="2"/><rect fill="currentColor" x="16" y="2" width="2" height="2"/><rect fill="currentColor" x="6.1" y="6.11" width="2" height="2"/><path fill="currentColor" d="M4.99,9.11c-1.15,1.74-1.94,3.74-2.24,5.89h.81c.32-2.18,1.16-4.18,2.39-5.89h-.96Z"/><path fill="currentColor" d="M9.1,5v.96c1.71-1.23,3.72-2.07,5.9-2.4v-.81c-2.16,.3-4.16,1.09-5.9,2.24Z"/></svg>',dn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M4 4h12v12H4V4Zm1.5 1.5v9h9v-9h-9Z"/><circle fill="currentColor" cx="4" cy="4" r="1.5"/><circle fill="currentColor" cx="16" cy="4" r="1.5"/><circle fill="currentColor" cx="4" cy="16" r="1.5"/><circle fill="currentColor" cx="16" cy="16" r="1.5"/></svg>',un='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M9.25 2h1.5v5.25H16v1.5h-5.25V16h-1.5v-7.25H4v-1.5h5.25V2Z"/><circle fill="currentColor" cx="10" cy="10" r="1.75"/></svg>';function ht(...t){return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" aria-hidden="true">${t.map(e=>`<path fill="currentColor" d="${e}"/>`).join("")}</svg>`}const mn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="m434.8 137.65-149.36-68.1c-16.19-7.4-42.69-7.4-58.88 0L77.3 137.65c-17.6 8-17.6 21.09 0 29.09l148 67.5c16.89 7.7 44.69 7.7 61.58 0l148-67.5c17.52-8 17.52-21.1-.08-29.09M160 308.52l-82.7 37.11c-17.6 8-17.6 21.1 0 29.1l148 67.5c16.89 7.69 44.69 7.69 61.58 0l148-67.5c17.6-8 17.6-21.1 0-29.1l-79.94-38.47"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="m160 204.48-82.8 37.16c-17.6 8-17.6 21.1 0 29.1l148 67.49c16.89 7.7 44.69 7.7 61.58 0l148-67.49c17.7-8 17.7-21.1.1-29.1L352 204.48"/></svg>',pn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M10.09 3.53 16.09 6.97 10.09 10.29 4.18 7 10.09 3.56M10.09 2.4 2.17 7 3.31 7.65 10.09 11.45 17 7.62 18.17 7 10.08 2.37 10.09 2.4Z"/><path fill="currentColor" d="M10.25 14.83 18.17 10.22 17 9.57 10.22 13.57 3.32 9.59 2.17 10.22 10.25 14.83Z"/><path fill="currentColor" d="M10.25 17.63 18.17 13 17 12.37 10.22 16.37 3.32 12.38 2.17 13 10.25 17.63Z"/></svg>',hn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M10.09 5.15 16.09 8.59 10.09 11.91 4.18 8.59 10.09 5.15ZM10.09 4 2.17 8.61 3.31 9.25 10.09 13.06 17 9.24 18.16 8.61 10.08 4 10.09 4Z"/><path fill="currentColor" d="M10.25 16.46 18.17 11.85 17 11.2 10.22 15.2 3.32 11.21 2.17 11.85 10.25 16.46Z"/><path fill="currentColor" d="M3.5 3.5 16.5 16.5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/></svg>',fn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" d="m18.5 10 4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301 14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725 16.676 16.676 0 0 1 3.524 17.273l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877 16.165 16.165 0 0 0 11.91 6.001L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"/></svg>',gn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" aria-hidden="true"><path fill="currentColor" d="M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357 357 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a352 352 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357 357 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088l-24.512 11.968a294 294 0 0 0-34.816 20.096l-22.656 15.36l-116.224-25.088l-65.28 113.152l79.68 88.192l-1.92 27.136a293 293 0 0 0 0 40.192l1.92 27.136l-79.808 88.192l65.344 113.152l116.224-25.024l22.656 15.296a294 294 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152l24.448-11.904a288 288 0 0 0 34.752-20.096l22.592-15.296l116.288 25.024l65.28-113.152l-79.744-88.192l1.92-27.136a293 293 0 0 0 0-40.256l-1.92-27.136l79.808-88.128l-65.344-113.152l-116.288 24.96l-22.592-15.232a288 288 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384a192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256a128 128 0 0 0 0-256"/></svg>',wn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M3 2H2v16h16v-1H8v-5H3V2zm0 11v4h4v-4H3z"/></svg>',bn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M16.98 11L18.5 11L18.5 10L16.98 10C16.86 8.13 16.05 6.44 14.8 5.2L16.88 2.83L16.12 2.17L14.05 4.54C12.79 3.57 11.21 3 9.5 3C5.36 3 2 6.36 2 10.5C2 14.64 5.36 18 9.5 18C13.47 18 16.73 14.91 16.98 11ZM15.98 10C15.86 8.43 15.18 7.01 14.14 5.95L10.6 10L15.98 10ZM13.39 5.29L8.4 11L15.98 11C15.73 14.36 12.92 17 9.5 17C5.91 17 3 14.09 3 10.5C3 6.91 5.91 4 9.5 4C10.96 4 12.31 4.48 13.39 5.29Z"/></svg>',vn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M10 6.5 5.5 11h9L10 6.5Z"/></svg>',xn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M1.5 7h17v6h-17ZM4.25 7h1v2.5h-1ZM7.5 7h.75v1.5H7.5ZM10.25 7h1v2.5h-1ZM13.5 7h.75v1.5H13.5ZM16.25 7h1v2.5h-1Z"/></svg>',yn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none" aria-hidden="true"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M12.4 3.25H5.5A2.25 2.25 0 0 0 3.25 5.5v9A2.25 2.25 0 0 0 5.5 16.75h9A2.25 2.25 0 0 0 16.75 14.5V8.6"/><g transform="rotate(45 13.2 6.7)"><rect x="11.7" y="1.55" width="3" height="7.45" rx="1.45"/><path d="M11.7 3.2h3"/><path d="M11.7 9 13.2 12.15 14.7 9"/><rect x="12.8" y="7.05" width="0.8" height="1.2" rx="0.4"/></g></g></svg>',kn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" aria-hidden="true"><path d="M35.29108325386048,15C37.125226253860475,12.309847399999999,36.958467253860476,9.335468299999999,34.79083925386047,7.0296237C32.62321825386047,4.53162557,29.455148253860475,4.33947164,27.120786253860473,6.4531626C24.953160253860474,4.53162512,21.951835253860473,4.53162512,19.950952253860475,6.4531626C17.783325253860475,4.53162512,14.782001253860473,4.53162512,12.781115753860474,6.4531626C10.446751353860474,4.3394711,7.111944153860474,4.53162512,4.944319853860474,7.0296228C2.9434360238604738,9.335468299999999,2.7767065138604736,12.3098459,4.610849853860474,15C2.9434466638604735,17.497998000000003,2.9434466638604735,22.694155,4.610849853860474,25C2.7767063338604734,27.690151,2.9434360238604738,30.664532,5.111060153860474,32.970377C7.278683453860474,35.468374,10.446751353860474,35.660526000000004,12.781114853860474,33.546839C14.013456253860474,34.639273,15.515264253860474,35.110636,16.949504253860475,34.960924L17.384031253860474,33.278093Q15.695761253860473,33.903341,13.886703253860473,32.299662C13.250737453860474,31.735897,12.292436853860474,31.740944,11.662447253860474,32.311378000000005Q10.430524553860474,33.426844,9.001459353860474,33.325500000000005Q7.535682953860474,33.22155,6.369870153860473,31.878052C6.355376453860474,31.861349,6.3405518538604735,31.844936,6.325405153860474,31.828825Q3.8021785638604735,29.144703,5.9879074538604735,25.938877C6.383556653860474,25.358576,6.372957753860474,24.592518,5.961405753860474,24.023384Q5.026963953860474,22.731148,5.026963953860474,20.072058Q5.026963953860474,17.378647,5.997069853860474,15.925296C6.374311253860474,15.360136,6.3706860538604735,14.6225471,5.987907653860473,14.0611229Q3.8149851238604735,10.8740788,6.203129753860473,8.1219487Q7.366510153860474,6.7812542,8.914587753860474,6.6747454Q10.427746053860474,6.570639,11.662447253860474,7.6886220000000005C12.311335753860474,8.2761691,13.304180353860474,8.261601,13.935551253860474,7.655268899999999Q16.267856253860472,5.41545445,18.845364253860474,7.700341C19.495353253860472,8.2765367,20.478888253860475,8.2569213,21.105388253860475,7.6552677Q23.437688253860475,5.41545364,26.015201253860475,7.7003412C26.651166253860474,8.2641058,27.609466253860475,8.2590561,28.239455253860474,7.6886208Q29.471375253860472,6.5731552,30.900443253860473,6.6745013Q32.36622125386047,6.7784510000000004,33.532031253860474,8.1219487C33.546527253860475,8.1386516,33.56135125386047,8.1550651,33.576497253860474,8.1711793Q36.099740253860475,10.8553152,33.91402525386047,14.0611248C33.75512825386048,14.2941837,33.65797725386047,14.5637598,33.631677253860474,14.8446045Q33.79909825386048,14.8235569,33.975852253860474,14.8257475Q34.933356253860474,14.8375826,35.59989625386047,15.52399L35.66519325386047,15.591235C35.550366253860474,15.381103,35.425664253860475,15.183288,35.29108325386048,15ZM35.966336253860476,26.182783L34.676930253860476,27.463251Q35.393826253860475,29.732494,33.53202725386048,31.878052C33.517697253860476,31.894566,33.50369225386048,31.911364,33.490022253860474,31.928431Q32.454415253860475,33.221331,30.964744253860474,33.325373Q30.004237253860474,33.392458000000005,29.149894253860474,32.951971L27.929481253860473,34.163925C30.176993253860473,35.589745,33.01140925386048,35.191897999999995,34.790837253860474,32.970377C36.64204925386047,30.837021,37.033868253860476,28.496355,35.966336253860476,26.182783Z" fill="currentColor"></path><path d="M18.34860205776758,36.08124306176758L19.51047686176758,31.58106006176758C19.601237461767578,31.22952606176758,20.042625161767578,31.109528061767577,20.301013961767577,31.36614306176758L23.55426316176758,34.59704206176758C23.808096861767577,34.84913206176758,23.69668006176758,35.27922206176758,23.35186196176758,35.378357061767574L18.936737541767577,36.647640061767575C18.586058351767576,36.74845306176758,18.257926098767577,36.43245106176758,18.34860205776758,36.08124306176758ZM21.15253496176758,30.02545706176758L24.88609836176758,33.73337206176758C25.07032536176758,33.91633406176758,25.36901856176758,33.91633406176758,25.553247461767576,33.73337206176758L36.52849006176758,22.833516161767577C36.710360061767574,22.65290166176758,36.71303206176758,22.36089566176758,36.534500061767574,22.17702746176758L32.941582061767576,18.47663122176758C32.75926806176758,18.288860715767576,32.45763906176758,18.28513235576758,32.27067206176758,18.46833832176758L21.15478106176758,29.36067706176758C20.96843986176758,29.543269061767578,20.96743176176758,29.84162706176758,21.15253496176758,30.02545706176758Z" fill="currentColor"></path></svg>',An=ht("M160 826.88 273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64zM296 800 147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z","M352 512h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32m0-192h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32"),Cn=ht("m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64z"),Mn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path d="M1.666717529296875,15.833333L1.666717529296875,4.1666666C1.666717529296875,3.24619204,2.412909569296875,2.5,3.333384129296875,2.5L16.666717529296875,2.5C17.587192529296875,2.5,18.333383529296874,3.24619204,18.333383529296874,4.1666666L18.333383529296874,9.127090500000001L17.500050529296875,8.268899000000001L17.500050529296875,4.1666666Q17.500050529296875,3.33333331,16.666717529296875,3.33333331L3.333384129296875,3.33333331Q2.500050839296875,3.33333331,2.500050839296875,4.1666666L2.500050839296875,15.833333Q2.500050839296875,16.666666,3.333384129296875,16.666666L8.404951129296876,16.666666L8.189774029296874,17.5L3.333384129296875,17.5C2.412909569296875,17.5,1.666717529296875,16.753808,1.666717529296875,15.833333ZM13.575839529296875,17.5L16.666717529296875,17.5C17.587192529296875,17.5,18.333383529296874,16.753808,18.333383529296874,15.833333L18.333383529296874,12.775434L17.500050529296875,13.602991L17.500050529296875,15.833333Q17.500050529296875,16.666666,16.666717529296875,16.666666L14.414989529296875,16.666666L13.575839529296875,17.5Z" fill="currentColor"></path><path d="M9.174291491940625,18.04064271171875L9.755228874140625,15.79055121171875C9.800609174140625,15.61478421171875,10.021303054140626,15.55478481171875,10.150497434140625,15.683092611718749L11.777121994140625,17.29854201171875C11.904038894140625,17.42458721171875,11.848330494140626,17.639632211718748,11.675921394140625,17.68919941171875L9.468359234140625,18.32384111171875C9.293019634140625,18.37424751171875,9.128953513140624,18.216246611718752,9.174291491940625,18.04064271171875ZM10.576257894140625,15.012749711718751L12.443039694140625,16.86670681171875C12.535153194140625,16.95818801171875,12.684499694140625,16.95818801171875,12.776614194140624,16.86670681171875L18.264235494140625,11.41677901171875C18.355170294140628,11.32647181171875,18.356506394140624,11.18046881171875,18.267240494140623,11.08853471171875L16.470781294140625,9.23833659271875C16.379624394140624,9.14445133871875,16.228809794140624,9.14258715871875,16.135326394140627,9.23419014371875L10.577380994140626,14.68035941171875C10.484210394140625,14.77165551171875,10.483706394140626,14.92083451171875,10.576257894140625,15.012749711718751Z" fill="currentColor"></path></svg>',Ln='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path d="M17.366041494140624,8.13321261171875C16.667592494140624,4.38473101171875,13.396319494140625,1.66668701171875,9.583322994140625,1.66668701171875C5.211068394140625,1.66668701171875,1.666656494140625,5.21109891171875,1.666656494140625,9.58335351171875C1.6666564941406257,13.42974001171875,4.431342794140625,16.71955701171875,8.220290194140624,17.381800011718752L8.429374694140625,16.57206001171875C5.009032494140625,16.00730701171875,2.499989804140625,13.05000701171875,2.499989804140625,9.58335351171875C2.499989804140625,5.67133621171875,5.671305694140625,2.50002032171875,9.583322994140625,2.50002032171875C12.822601494140624,2.50002032171875,15.649155494140626,4.69743511171875,16.447924494140626,7.83668611171875Q16.522337494140626,7.82859321171875,16.600395494140624,7.82956071171875Q17.046328494140624,7.83507251171875,17.366041494140624,8.13321261171875Z" fill="currentColor"></path><path d="M9.174291491940625,18.04064271171875L9.755228874140625,15.79055121171875C9.800609174140625,15.61478421171875,10.021303054140626,15.55478481171875,10.150497434140625,15.683092611718749L11.777121994140625,17.29854201171875C11.904038894140625,17.42458721171875,11.848330494140626,17.639632211718748,11.675921394140625,17.68919941171875L9.468359234140625,18.32384111171875C9.293019634140625,18.37424751171875,9.128953513140624,18.216246611718752,9.174291491940625,18.04064271171875ZM10.576257894140625,15.012749711718751L12.443039694140625,16.86670681171875C12.535153194140625,16.95818801171875,12.684499694140625,16.95818801171875,12.776614194140624,16.86670681171875L18.264235494140625,11.41677901171875C18.355170294140628,11.32647181171875,18.356506394140624,11.18046881171875,18.267240494140623,11.08853471171875L16.470781294140625,9.23833659271875C16.379624394140624,9.14445133871875,16.228809794140624,9.14258715871875,16.135326394140627,9.23419014371875L10.577380994140626,14.68035941171875C10.484210394140625,14.77165551171875,10.483706394140626,14.92083451171875,10.576257894140625,15.012749711718751Z" fill="currentColor"></path></svg>',zn=ht("M754.752 480H160a32 32 0 1 0 0 64h594.752L521.344 777.344a32 32 0 0 0 45.312 45.312l288-288a32 32 0 0 0 0-45.312l-288-288a32 32 0 1 0-45.312 45.312z"),Sn=ht("M624 475.968V640h144a128 128 0 0 1 128 128H128a128 128 0 0 1 128-128h144V475.968a192 192 0 1 1 224 0M128 896v-64h768v64z"),Me=ht("M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"),Pn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none" aria-hidden="true"><path stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" d="M4.5 2h6.4L15.5 6.6V16.5A1.5 1.5 0 0 1 14 18H4.5A1.5 1.5 0 0 1 3 16.5V3.5A1.5 1.5 0 0 1 4.5 2z"/><path stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" d="M10.9 2v4.6h4.6"/><path stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M10 5.8v6M7.2 9.6 10 12.5l2.8-2.9"/></svg>',In='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none" aria-hidden="true"><path stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" d="M15.5 2H9.1L4.5 6.6V16.5A1.5 1.5 0 0 0 6 18h9.5A1.5 1.5 0 0 0 17 16.5V3.5A1.5 1.5 0 0 0 15.5 2z"/><path stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" d="M9.1 2v4.6H4.5"/><path stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M10 14.2V8M7.2 10.4 10 7.5l2.8 2.9"/></svg>',$n='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" aria-hidden="true"><path fill="currentColor" d="M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"/></svg>',g={zoomExtent:on,measureDistance:ln,measureAngle:sn,measureArc:cn,measureArea:dn,measureCoordinate:un,clearMeasurements:Me,layer:mn,layerOn:pn,layerOff:hn,language:fn,setting:gn,orthoMode:wn,polarTracking:bn,chevronUp:vn,measure:xn,annotation:yn,markupCloud:kn,markupCallout:An,markupText:Cn,markupRect:Mn,markupCircle:Ln,markupArrow:zn,markupStamp:Sn,markupImport:Pn,markupExport:In,markupShow:$n,clearMarkups:Me};function b(t,e,r){const a=Object.entries(r).map(([n,o])=>`${n}="${jt(o)}"`).join(" ");return`<button type="button" class="mlcad-tool-btn" title="${jt(e)}" aria-label="${jt(e)}" ${a}>${t}</button>`}function jt(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<")}const Bn=[90,45,30,23,18,10,5];function Oe(){return`<button type="button" class="mlcad-tool-btn mlcad-lang-btn" id="mlcad-lang-btn" data-i18n-key="toolbar.languageSwitch" data-i18n-attr="title aria-label" title="Switch language" aria-label="Switch language">
|
|
2
|
-
${g.language}
|
|
3
|
-
<span class="mlcad-lang-badge" id="mlcad-lang-badge">EN</span>
|
|
4
|
-
</button>`}function jn(){const t=Bn.map(e=>`<button type="button" class="mlcad-tool-btn mlcad-settings-option-btn mlcad-polar-angle-btn" data-polar-ang="${e}" title="${e}°" aria-label="${e}°"><span class="mlcad-settings-option-indicator" aria-hidden="true"></span><span class="mlcad-settings-option-text">${e}°</span></button>`).join("");return`
|
|
5
|
-
<div id="mlcad-settings-wrap" hidden>
|
|
6
|
-
<div id="mlcad-settings-strip" role="toolbar" data-i18n-attr="aria-label" data-i18n-key="settings.toolbar" aria-label="Settings">
|
|
7
|
-
${b(g.orthoMode,"Orthogonal mode",{id:"mlcad-ortho-btn","data-toggle":"ortho","data-i18n-key":"settings.ortho","data-i18n-attr":"title aria-label"})}
|
|
8
|
-
${b(g.polarTracking,"Polar tracking",{id:"mlcad-polar-btn","data-toggle":"polar","data-i18n-key":"settings.polar","data-i18n-attr":"title aria-label"})}
|
|
9
|
-
${Oe()}
|
|
10
|
-
</div>
|
|
11
|
-
<div id="mlcad-polar-angles" role="group" data-i18n-attr="aria-label" data-i18n-key="settings.polarAngles" aria-label="Polar tracking angles" hidden>
|
|
12
|
-
${t}
|
|
13
|
-
</div>
|
|
14
|
-
</div>`}const Hn=`
|
|
15
|
-
:root {
|
|
16
|
-
--mlcad-ui-bg: rgba(24, 26, 30, 0.94);
|
|
17
|
-
--mlcad-ui-bg-elevated: rgba(32, 35, 40, 0.98);
|
|
18
|
-
--mlcad-ui-border: rgba(255, 255, 255, 0.1);
|
|
19
|
-
--mlcad-ui-text: #e8eaed;
|
|
20
|
-
--mlcad-ui-muted: #9aa0a6;
|
|
21
|
-
--mlcad-accent: #08e8de;
|
|
22
|
-
--mlcad-accent-active: #1a8cff;
|
|
23
|
-
--mlcad-measure-accent: #08e8de;
|
|
24
|
-
--mlcad-measure-accent-border: rgba(8, 232, 222, 0.45);
|
|
25
|
-
--mlcad-measure-accent-fill: rgba(8, 232, 222, 0.2);
|
|
26
|
-
--mlcad-markup-accent: #e53935;
|
|
27
|
-
--mlcad-markup-accent-border: rgba(229, 57, 53, 0.45);
|
|
28
|
-
--mlcad-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
|
|
29
|
-
--mlcad-toolbar-width: 44px;
|
|
30
|
-
--mlcad-drawer-width: 220px;
|
|
31
|
-
--mlcad-drawer-gap: 8px;
|
|
32
|
-
--mlcad-ui-inset: 12px;
|
|
33
|
-
--mlcad-z-chrome: 7;
|
|
34
|
-
--mlcad-z-measure: 5;
|
|
35
|
-
--mlcad-z-markup: 6;
|
|
36
|
-
}
|
|
37
|
-
html, body {
|
|
38
|
-
margin: 0; height: 100%; overflow: hidden;
|
|
39
|
-
background: #121418;
|
|
40
|
-
font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
|
|
41
|
-
color: var(--mlcad-ui-text);
|
|
42
|
-
}
|
|
43
|
-
#mlcad-root { position: relative; width: 100%; height: 100%; }
|
|
44
|
-
#mlcad-root canvas {
|
|
45
|
-
display: block;
|
|
46
|
-
width: 100%;
|
|
47
|
-
height: 100%;
|
|
48
|
-
touch-action: none;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
#mlcad-sidebar {
|
|
52
|
-
position: absolute;
|
|
53
|
-
left: var(--mlcad-ui-inset);
|
|
54
|
-
top: 50%;
|
|
55
|
-
z-index: var(--mlcad-z-chrome);
|
|
56
|
-
transform: translateY(-50%);
|
|
57
|
-
display: flex;
|
|
58
|
-
align-items: flex-start;
|
|
59
|
-
gap: var(--mlcad-drawer-gap);
|
|
60
|
-
max-width: calc(100% - 2 * var(--mlcad-ui-inset));
|
|
61
|
-
box-sizing: border-box;
|
|
62
|
-
pointer-events: none;
|
|
63
|
-
}
|
|
64
|
-
#mlcad-sidebar > * { pointer-events: auto; }
|
|
65
|
-
|
|
66
|
-
#mlcad-toolbar {
|
|
67
|
-
flex-shrink: 0;
|
|
68
|
-
display: flex; flex-direction: column; gap: 4px;
|
|
69
|
-
padding: 6px;
|
|
70
|
-
background: var(--mlcad-ui-bg);
|
|
71
|
-
border: 1px solid var(--mlcad-ui-border);
|
|
72
|
-
border-radius: 8px;
|
|
73
|
-
box-shadow: var(--mlcad-shadow);
|
|
74
|
-
backdrop-filter: blur(12px);
|
|
75
|
-
}
|
|
76
|
-
.mlcad-tool-btn {
|
|
77
|
-
position: relative;
|
|
78
|
-
display: flex; align-items: center; justify-content: center;
|
|
79
|
-
width: var(--mlcad-toolbar-width); height: var(--mlcad-toolbar-width);
|
|
80
|
-
margin: 0; padding: 0;
|
|
81
|
-
border: 1px solid transparent;
|
|
82
|
-
border-radius: 6px;
|
|
83
|
-
background: transparent;
|
|
84
|
-
color: var(--mlcad-ui-text);
|
|
85
|
-
cursor: pointer;
|
|
86
|
-
transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
|
|
87
|
-
}
|
|
88
|
-
.mlcad-tool-btn:hover {
|
|
89
|
-
background: rgba(255, 255, 255, 0.08);
|
|
90
|
-
border-color: var(--mlcad-ui-border);
|
|
91
|
-
}
|
|
92
|
-
.mlcad-tool-btn.active,
|
|
93
|
-
.mlcad-tool-btn.is-menu-open {
|
|
94
|
-
background: rgba(26, 140, 255, 0.22);
|
|
95
|
-
border-color: rgba(26, 140, 255, 0.55);
|
|
96
|
-
color: #fff;
|
|
97
|
-
}
|
|
98
|
-
.mlcad-tool-btn svg {
|
|
99
|
-
width: 20px; height: 20px; display: block; flex-shrink: 0;
|
|
100
|
-
}
|
|
101
|
-
/* Flyout mark: opaque corner triangle (cad-simple-ui-plugin is-left style). */
|
|
102
|
-
.mlcad-tool-btn.has-children::after {
|
|
103
|
-
content: '';
|
|
104
|
-
position: absolute;
|
|
105
|
-
right: 1px;
|
|
106
|
-
bottom: 1px;
|
|
107
|
-
width: 6px;
|
|
108
|
-
height: 6px;
|
|
109
|
-
background: currentColor;
|
|
110
|
-
clip-path: polygon(100% 100%, 0 100%, 100% 0);
|
|
111
|
-
pointer-events: none;
|
|
112
|
-
}
|
|
113
|
-
.mlcad-dropdown {
|
|
114
|
-
position: fixed;
|
|
115
|
-
z-index: 40;
|
|
116
|
-
min-width: 180px;
|
|
117
|
-
padding: 4px;
|
|
118
|
-
background: var(--mlcad-ui-bg-elevated);
|
|
119
|
-
border: 1px solid var(--mlcad-ui-border);
|
|
120
|
-
border-radius: 8px;
|
|
121
|
-
box-shadow: var(--mlcad-shadow);
|
|
122
|
-
backdrop-filter: blur(12px);
|
|
123
|
-
}
|
|
124
|
-
.mlcad-dropdown-item {
|
|
125
|
-
display: flex;
|
|
126
|
-
align-items: center;
|
|
127
|
-
gap: 8px;
|
|
128
|
-
width: 100%;
|
|
129
|
-
box-sizing: border-box;
|
|
130
|
-
margin: 0;
|
|
131
|
-
padding: 6px 8px;
|
|
132
|
-
border: none;
|
|
133
|
-
border-radius: 5px;
|
|
134
|
-
background: transparent;
|
|
135
|
-
color: var(--mlcad-ui-text);
|
|
136
|
-
font-size: 12px;
|
|
137
|
-
font-weight: 500;
|
|
138
|
-
text-align: left;
|
|
139
|
-
cursor: pointer;
|
|
140
|
-
}
|
|
141
|
-
.mlcad-dropdown-item:hover {
|
|
142
|
-
background: rgba(255, 255, 255, 0.08);
|
|
143
|
-
}
|
|
144
|
-
.mlcad-dropdown-item.active,
|
|
145
|
-
.mlcad-dropdown-item.is-toggled {
|
|
146
|
-
background: rgba(26, 140, 255, 0.22);
|
|
147
|
-
color: #fff;
|
|
148
|
-
}
|
|
149
|
-
.mlcad-dropdown-icon {
|
|
150
|
-
display: inline-flex;
|
|
151
|
-
width: 18px;
|
|
152
|
-
height: 18px;
|
|
153
|
-
flex-shrink: 0;
|
|
154
|
-
align-items: center;
|
|
155
|
-
justify-content: center;
|
|
156
|
-
}
|
|
157
|
-
.mlcad-dropdown-icon svg {
|
|
158
|
-
width: 18px;
|
|
159
|
-
height: 18px;
|
|
160
|
-
display: block;
|
|
161
|
-
}
|
|
162
|
-
.mlcad-dropdown-label {
|
|
163
|
-
overflow: hidden;
|
|
164
|
-
text-overflow: ellipsis;
|
|
165
|
-
white-space: nowrap;
|
|
166
|
-
}
|
|
167
|
-
.mlcad-dropdown-separator {
|
|
168
|
-
height: 1px;
|
|
169
|
-
margin: 4px 6px;
|
|
170
|
-
background: var(--mlcad-ui-border);
|
|
171
|
-
}
|
|
172
|
-
#mlcad-toolbar-toggle {
|
|
173
|
-
height: calc(var(--mlcad-toolbar-width) / 2);
|
|
174
|
-
margin-top: -4px;
|
|
175
|
-
margin-bottom: -4px;
|
|
176
|
-
border-radius: 4px;
|
|
177
|
-
}
|
|
178
|
-
#mlcad-toolbar-toggle svg {
|
|
179
|
-
width: calc(var(--mlcad-toolbar-width) / 2);
|
|
180
|
-
height: calc(var(--mlcad-toolbar-width) / 2);
|
|
181
|
-
}
|
|
182
|
-
.mlcad-tool-separator {
|
|
183
|
-
height: 1px;
|
|
184
|
-
margin: 4px 8px;
|
|
185
|
-
background: var(--mlcad-ui-border);
|
|
186
|
-
}
|
|
187
|
-
.mlcad-lang-btn { position: relative; }
|
|
188
|
-
.mlcad-lang-badge {
|
|
189
|
-
position: absolute; right: 3px; bottom: 3px;
|
|
190
|
-
min-width: 14px; height: 14px; padding: 0 3px;
|
|
191
|
-
border-radius: 3px;
|
|
192
|
-
background: rgba(8, 232, 222, 0.2);
|
|
193
|
-
border: 1px solid rgba(8, 232, 222, 0.45);
|
|
194
|
-
color: var(--mlcad-accent);
|
|
195
|
-
font-size: 9px; font-weight: 700; line-height: 12px;
|
|
196
|
-
letter-spacing: -0.02em;
|
|
197
|
-
pointer-events: none;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
#mlcad-layer-drawer {
|
|
201
|
-
flex-shrink: 1;
|
|
202
|
-
min-width: 0;
|
|
203
|
-
width: var(--mlcad-drawer-width);
|
|
204
|
-
max-height: min(420px, calc(100vh - 48px));
|
|
205
|
-
display: flex; flex-direction: column;
|
|
206
|
-
background: var(--mlcad-ui-bg-elevated);
|
|
207
|
-
border: 1px solid var(--mlcad-ui-border);
|
|
208
|
-
border-radius: 8px;
|
|
209
|
-
box-shadow: var(--mlcad-shadow);
|
|
210
|
-
backdrop-filter: blur(12px);
|
|
211
|
-
overflow: hidden;
|
|
212
|
-
}
|
|
213
|
-
#mlcad-layer-drawer[hidden] { display: none; }
|
|
214
|
-
|
|
215
|
-
.mlcad-drawer-header {
|
|
216
|
-
display: flex; align-items: center; justify-content: space-between;
|
|
217
|
-
gap: 6px; padding: 8px 10px;
|
|
218
|
-
border-bottom: 1px solid var(--mlcad-ui-border);
|
|
219
|
-
font-size: 13px; font-weight: 600;
|
|
220
|
-
}
|
|
221
|
-
.mlcad-drawer-close {
|
|
222
|
-
width: 28px; height: 28px; padding: 0;
|
|
223
|
-
border: none; border-radius: 4px;
|
|
224
|
-
background: transparent; color: var(--mlcad-ui-muted);
|
|
225
|
-
cursor: pointer; font-size: 18px; line-height: 1;
|
|
226
|
-
}
|
|
227
|
-
.mlcad-drawer-close:hover {
|
|
228
|
-
background: rgba(255, 255, 255, 0.08); color: var(--mlcad-ui-text);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.mlcad-layer-actions {
|
|
232
|
-
display: flex; gap: 4px; padding: 6px 8px;
|
|
233
|
-
border-bottom: 1px solid var(--mlcad-ui-border);
|
|
234
|
-
}
|
|
235
|
-
.mlcad-layer-action-btn {
|
|
236
|
-
flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
|
|
237
|
-
min-height: 30px; padding: 4px 8px;
|
|
238
|
-
border: 1px solid var(--mlcad-ui-border);
|
|
239
|
-
border-radius: 5px;
|
|
240
|
-
background: rgba(255, 255, 255, 0.04);
|
|
241
|
-
color: var(--mlcad-ui-text);
|
|
242
|
-
font-size: 12px; cursor: pointer;
|
|
243
|
-
}
|
|
244
|
-
.mlcad-layer-action-btn:hover { background: rgba(255, 255, 255, 0.1); }
|
|
245
|
-
.mlcad-layer-action-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
|
|
246
|
-
|
|
247
|
-
#mlcad-layer-list {
|
|
248
|
-
flex: 1; overflow: auto; padding: 4px 0;
|
|
249
|
-
}
|
|
250
|
-
.mlcad-layer-item {
|
|
251
|
-
display: grid;
|
|
252
|
-
grid-template-columns: auto auto 1fr auto;
|
|
253
|
-
align-items: center; gap: 6px;
|
|
254
|
-
padding: 5px 8px;
|
|
255
|
-
font-size: 12px; cursor: pointer;
|
|
256
|
-
}
|
|
257
|
-
.mlcad-layer-item:hover { background: rgba(255, 255, 255, 0.05); }
|
|
258
|
-
.mlcad-layer-item input { margin: 0; cursor: pointer; }
|
|
259
|
-
.mlcad-layer-swatch {
|
|
260
|
-
width: 12px; height: 12px; border-radius: 2px;
|
|
261
|
-
border: 1px solid rgba(255, 255, 255, 0.28);
|
|
262
|
-
}
|
|
263
|
-
.mlcad-layer-name {
|
|
264
|
-
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
265
|
-
}
|
|
266
|
-
.mlcad-layer-zoom {
|
|
267
|
-
display: flex; align-items: center; justify-content: center;
|
|
268
|
-
width: 22px; height: 22px; padding: 0;
|
|
269
|
-
border: 1px solid transparent; border-radius: 4px;
|
|
270
|
-
background: transparent; color: var(--mlcad-ui-muted);
|
|
271
|
-
cursor: pointer;
|
|
272
|
-
}
|
|
273
|
-
.mlcad-layer-zoom svg {
|
|
274
|
-
width: 14px; height: 14px; display: block;
|
|
275
|
-
}
|
|
276
|
-
.mlcad-layer-zoom:hover:not(:disabled) {
|
|
277
|
-
color: var(--mlcad-accent);
|
|
278
|
-
border-color: var(--mlcad-ui-border);
|
|
279
|
-
background: rgba(255, 255, 255, 0.06);
|
|
280
|
-
}
|
|
281
|
-
.mlcad-layer-zoom:disabled { opacity: 0.35; cursor: not-allowed; }
|
|
282
|
-
|
|
283
|
-
#mlcad-status-bar {
|
|
284
|
-
position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: var(--mlcad-z-chrome);
|
|
285
|
-
display: flex; align-items: center; min-height: 28px; padding: 0 12px;
|
|
286
|
-
border: 1px solid var(--mlcad-ui-border);
|
|
287
|
-
border-radius: 6px;
|
|
288
|
-
background: var(--mlcad-ui-bg);
|
|
289
|
-
color: var(--mlcad-ui-muted);
|
|
290
|
-
font-size: 12px;
|
|
291
|
-
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
|
|
292
|
-
backdrop-filter: blur(10px);
|
|
293
|
-
pointer-events: none;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-settings-wrap,
|
|
297
|
-
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-measure-strip-wrap,
|
|
298
|
-
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-markup-strip-wrap,
|
|
299
|
-
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-layer-drawer {
|
|
300
|
-
display: none !important;
|
|
301
|
-
}
|
|
302
|
-
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-toolbar .mlcad-tool-btn:not(#mlcad-toolbar-toggle) {
|
|
303
|
-
display: none;
|
|
304
|
-
}
|
|
305
|
-
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-toolbar .mlcad-tool-separator {
|
|
306
|
-
display: none;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
#mlcad-settings-wrap,
|
|
310
|
-
#mlcad-measure-strip-wrap,
|
|
311
|
-
#mlcad-markup-strip-wrap {
|
|
312
|
-
flex-shrink: 0;
|
|
313
|
-
min-width: 0;
|
|
314
|
-
display: flex;
|
|
315
|
-
flex-direction: row;
|
|
316
|
-
align-items: flex-start;
|
|
317
|
-
gap: var(--mlcad-drawer-gap);
|
|
318
|
-
}
|
|
319
|
-
#mlcad-settings-wrap[hidden],
|
|
320
|
-
#mlcad-measure-strip-wrap[hidden],
|
|
321
|
-
#mlcad-markup-strip-wrap[hidden] { display: none; }
|
|
322
|
-
|
|
323
|
-
#mlcad-settings-strip,
|
|
324
|
-
#mlcad-measure-strip,
|
|
325
|
-
#mlcad-markup-strip {
|
|
326
|
-
flex-shrink: 0;
|
|
327
|
-
display: flex;
|
|
328
|
-
flex-direction: column;
|
|
329
|
-
align-items: stretch;
|
|
330
|
-
gap: 4px;
|
|
331
|
-
padding: 6px;
|
|
332
|
-
background: var(--mlcad-ui-bg);
|
|
333
|
-
border: 1px solid var(--mlcad-ui-border);
|
|
334
|
-
border-radius: 8px;
|
|
335
|
-
box-shadow: var(--mlcad-shadow);
|
|
336
|
-
backdrop-filter: blur(12px);
|
|
337
|
-
}
|
|
338
|
-
#mlcad-measure-strip .mlcad-tool-separator,
|
|
339
|
-
#mlcad-markup-strip .mlcad-tool-separator {
|
|
340
|
-
margin: 2px 4px;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
#mlcad-polar-angles {
|
|
344
|
-
flex-shrink: 0;
|
|
345
|
-
display: inline-flex;
|
|
346
|
-
flex-direction: column;
|
|
347
|
-
align-items: stretch;
|
|
348
|
-
gap: 4px;
|
|
349
|
-
padding: 6px;
|
|
350
|
-
max-width: min(280px, calc(100vw - 2 * var(--mlcad-ui-inset) - 3 * var(--mlcad-toolbar-width) - 3 * var(--mlcad-drawer-gap)));
|
|
351
|
-
background: var(--mlcad-ui-bg);
|
|
352
|
-
border: 1px solid var(--mlcad-ui-border);
|
|
353
|
-
border-radius: 8px;
|
|
354
|
-
box-shadow: var(--mlcad-shadow);
|
|
355
|
-
backdrop-filter: blur(12px);
|
|
356
|
-
}
|
|
357
|
-
#mlcad-polar-angles[hidden] { display: none; }
|
|
358
|
-
|
|
359
|
-
.mlcad-color-input {
|
|
360
|
-
position: absolute;
|
|
361
|
-
width: 0;
|
|
362
|
-
height: 0;
|
|
363
|
-
opacity: 0;
|
|
364
|
-
pointer-events: none;
|
|
365
|
-
}
|
|
366
|
-
.mlcad-settings-option-btn {
|
|
367
|
-
width: 100%;
|
|
368
|
-
box-sizing: border-box;
|
|
369
|
-
height: var(--mlcad-toolbar-width);
|
|
370
|
-
justify-content: flex-start;
|
|
371
|
-
gap: 8px;
|
|
372
|
-
padding: 0 10px;
|
|
373
|
-
font-size: 11px;
|
|
374
|
-
font-weight: 500;
|
|
375
|
-
}
|
|
376
|
-
.mlcad-settings-option-indicator {
|
|
377
|
-
flex-shrink: 0;
|
|
378
|
-
width: 10px;
|
|
379
|
-
height: 10px;
|
|
380
|
-
border: 1px solid var(--mlcad-ui-muted);
|
|
381
|
-
border-radius: 2px;
|
|
382
|
-
box-sizing: border-box;
|
|
383
|
-
transition: background 0.15s ease, border-color 0.15s ease;
|
|
384
|
-
}
|
|
385
|
-
.mlcad-settings-option-btn.active .mlcad-settings-option-indicator {
|
|
386
|
-
background: var(--mlcad-accent);
|
|
387
|
-
border-color: var(--mlcad-accent);
|
|
388
|
-
}
|
|
389
|
-
.mlcad-settings-option-text {
|
|
390
|
-
overflow: hidden;
|
|
391
|
-
text-overflow: ellipsis;
|
|
392
|
-
white-space: nowrap;
|
|
393
|
-
pointer-events: none;
|
|
394
|
-
line-height: 1.2;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
#mlcad-measure-overlays {
|
|
398
|
-
position: absolute;
|
|
399
|
-
inset: 0;
|
|
400
|
-
pointer-events: none;
|
|
401
|
-
z-index: var(--mlcad-z-measure);
|
|
402
|
-
overflow: hidden;
|
|
403
|
-
}
|
|
404
|
-
.mlcad-measure-canvas {
|
|
405
|
-
position: absolute;
|
|
406
|
-
left: 0;
|
|
407
|
-
top: 0;
|
|
408
|
-
pointer-events: none;
|
|
409
|
-
}
|
|
410
|
-
.mlcad-measure-dot {
|
|
411
|
-
position: absolute;
|
|
412
|
-
width: 10px;
|
|
413
|
-
height: 10px;
|
|
414
|
-
border-radius: 50%;
|
|
415
|
-
background: var(--mlcad-measure-accent);
|
|
416
|
-
border: 2px solid rgba(255, 255, 255, 0.9);
|
|
417
|
-
box-sizing: border-box;
|
|
418
|
-
transform: translate(-50%, -50%);
|
|
419
|
-
pointer-events: none;
|
|
420
|
-
}
|
|
421
|
-
.mlcad-measure-badge {
|
|
422
|
-
position: absolute;
|
|
423
|
-
padding: 3px 10px;
|
|
424
|
-
border-radius: 14px;
|
|
425
|
-
background: var(--mlcad-ui-bg-elevated);
|
|
426
|
-
border: 1px solid var(--mlcad-measure-accent-border);
|
|
427
|
-
color: var(--mlcad-measure-accent);
|
|
428
|
-
font-size: 12px;
|
|
429
|
-
font-weight: 600;
|
|
430
|
-
white-space: nowrap;
|
|
431
|
-
transform: translate(-50%, -50%);
|
|
432
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
|
|
433
|
-
pointer-events: none;
|
|
434
|
-
}
|
|
435
|
-
.mlcad-measure-badge--coordinate {
|
|
436
|
-
transform: translate(-50%, calc(-50% - 16px));
|
|
437
|
-
}
|
|
438
|
-
.mlcad-measure-dot.mlcad-measure-selected {
|
|
439
|
-
box-shadow:
|
|
440
|
-
0 0 0 2px rgba(255, 213, 79, 0.75),
|
|
441
|
-
0 0 10px rgba(255, 213, 79, 0.95),
|
|
442
|
-
0 0 18px rgba(255, 213, 79, 0.55);
|
|
443
|
-
}
|
|
444
|
-
.mlcad-measure-badge.mlcad-measure-selected {
|
|
445
|
-
outline: 2px solid rgba(255, 213, 79, 0.85);
|
|
446
|
-
outline-offset: 1px;
|
|
447
|
-
box-shadow:
|
|
448
|
-
0 0 0 2px rgba(255, 213, 79, 0.4),
|
|
449
|
-
0 0 12px rgba(255, 213, 79, 0.75),
|
|
450
|
-
0 2px 8px rgba(0, 0, 0, 0.35);
|
|
451
|
-
}
|
|
452
|
-
.mlcad-measure-canvas.mlcad-measure-selected {
|
|
453
|
-
filter:
|
|
454
|
-
drop-shadow(0 0 1.5px #ffd54f)
|
|
455
|
-
drop-shadow(0 0 4px rgba(255, 213, 79, 0.95))
|
|
456
|
-
drop-shadow(0 0 8px rgba(255, 213, 79, 0.55));
|
|
457
|
-
}
|
|
458
|
-
.mlcad-measure-live-label {
|
|
459
|
-
position: absolute;
|
|
460
|
-
pointer-events: none;
|
|
461
|
-
color: var(--mlcad-measure-accent);
|
|
462
|
-
font-size: 12px;
|
|
463
|
-
font-weight: 600;
|
|
464
|
-
text-shadow: 0 0 4px #000, 0 1px 3px #000;
|
|
465
|
-
transform: translate(-50%, -120%);
|
|
466
|
-
display: none;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
#mlcad-markup-overlays {
|
|
470
|
-
position: absolute;
|
|
471
|
-
inset: 0;
|
|
472
|
-
pointer-events: none;
|
|
473
|
-
z-index: var(--mlcad-z-markup);
|
|
474
|
-
overflow: hidden;
|
|
475
|
-
}
|
|
476
|
-
.mlcad-markup-canvas {
|
|
477
|
-
position: absolute;
|
|
478
|
-
left: 0;
|
|
479
|
-
top: 0;
|
|
480
|
-
pointer-events: none;
|
|
481
|
-
}
|
|
482
|
-
.mlcad-markup-badge,
|
|
483
|
-
.mlcad-markup-stamp {
|
|
484
|
-
position: absolute;
|
|
485
|
-
padding: 3px 10px;
|
|
486
|
-
border-radius: 14px;
|
|
487
|
-
background: var(--mlcad-ui-bg-elevated);
|
|
488
|
-
border: 1px solid var(--mlcad-markup-accent-border);
|
|
489
|
-
color: var(--mlcad-markup-accent);
|
|
490
|
-
font-size: 12px;
|
|
491
|
-
font-weight: 600;
|
|
492
|
-
white-space: pre-wrap;
|
|
493
|
-
max-width: 240px;
|
|
494
|
-
min-width: 80px;
|
|
495
|
-
min-height: 1.75em;
|
|
496
|
-
box-sizing: border-box;
|
|
497
|
-
transform: translate(-50%, -50%);
|
|
498
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
|
|
499
|
-
pointer-events: auto;
|
|
500
|
-
cursor: grab;
|
|
501
|
-
touch-action: none;
|
|
502
|
-
user-select: none;
|
|
503
|
-
}
|
|
504
|
-
.mlcad-markup-stamp {
|
|
505
|
-
border-radius: 4px;
|
|
506
|
-
border-width: 2px;
|
|
507
|
-
text-transform: uppercase;
|
|
508
|
-
letter-spacing: 0.04em;
|
|
509
|
-
font-size: 11px;
|
|
510
|
-
white-space: nowrap;
|
|
511
|
-
min-width: 0;
|
|
512
|
-
}
|
|
513
|
-
.mlcad-markup-dot {
|
|
514
|
-
position: absolute;
|
|
515
|
-
width: 10px;
|
|
516
|
-
height: 10px;
|
|
517
|
-
border-radius: 50%;
|
|
518
|
-
background: var(--mlcad-markup-accent);
|
|
519
|
-
border: 2px solid rgba(255, 255, 255, 0.9);
|
|
520
|
-
box-sizing: border-box;
|
|
521
|
-
transform: translate(-50%, -50%);
|
|
522
|
-
pointer-events: auto;
|
|
523
|
-
cursor: grab;
|
|
524
|
-
touch-action: none;
|
|
525
|
-
}
|
|
526
|
-
.mlcad-markup-dot.mlcad-markup-selected {
|
|
527
|
-
box-shadow:
|
|
528
|
-
0 0 0 2px rgba(255, 213, 79, 0.75),
|
|
529
|
-
0 0 10px rgba(255, 213, 79, 0.95),
|
|
530
|
-
0 0 18px rgba(255, 213, 79, 0.55);
|
|
531
|
-
}
|
|
532
|
-
.mlcad-markup-badge.mlcad-markup-selected,
|
|
533
|
-
.mlcad-markup-stamp.mlcad-markup-selected {
|
|
534
|
-
outline: 2px solid rgba(255, 213, 79, 0.85);
|
|
535
|
-
outline-offset: 1px;
|
|
536
|
-
box-shadow:
|
|
537
|
-
0 0 0 2px rgba(255, 213, 79, 0.4),
|
|
538
|
-
0 0 12px rgba(255, 213, 79, 0.75),
|
|
539
|
-
0 2px 8px rgba(0, 0, 0, 0.35);
|
|
540
|
-
}
|
|
541
|
-
.mlcad-markup-canvas.mlcad-markup-selected {
|
|
542
|
-
filter:
|
|
543
|
-
drop-shadow(0 0 1.5px #ffd54f)
|
|
544
|
-
drop-shadow(0 0 4px rgba(255, 213, 79, 0.95))
|
|
545
|
-
drop-shadow(0 0 8px rgba(255, 213, 79, 0.55));
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
#mlcad-loading {
|
|
549
|
-
position: fixed; inset: 0; z-index: 100;
|
|
550
|
-
display: flex; align-items: center; justify-content: center;
|
|
551
|
-
background: #121418;
|
|
552
|
-
transition: opacity 0.35s ease, visibility 0.35s ease;
|
|
553
|
-
}
|
|
554
|
-
#mlcad-loading.mlcad-loading--done {
|
|
555
|
-
opacity: 0; visibility: hidden; pointer-events: none;
|
|
556
|
-
}
|
|
557
|
-
.mlcad-loading-spinner {
|
|
558
|
-
width: 48px; height: 48px; box-sizing: border-box;
|
|
559
|
-
border: 3px solid rgba(255, 255, 255, 0.12);
|
|
560
|
-
border-top-color: var(--mlcad-accent);
|
|
561
|
-
border-radius: 50%;
|
|
562
|
-
animation: mlcad-spin 0.85s linear infinite;
|
|
563
|
-
}
|
|
564
|
-
@keyframes mlcad-spin { to { transform: rotate(360deg); } }
|
|
565
|
-
|
|
566
|
-
@media (max-width: ${We}px) {
|
|
567
|
-
:root {
|
|
568
|
-
--mlcad-drawer-width: min(200px, calc(100vw - 2 * var(--mlcad-ui-inset) - var(--mlcad-toolbar-width) - var(--mlcad-drawer-gap)));
|
|
569
|
-
--mlcad-ui-inset: 8px;
|
|
570
|
-
}
|
|
571
|
-
#mlcad-sidebar {
|
|
572
|
-
left: var(--mlcad-ui-inset);
|
|
573
|
-
right: var(--mlcad-ui-inset);
|
|
574
|
-
width: auto;
|
|
575
|
-
}
|
|
576
|
-
#mlcad-layer-drawer {
|
|
577
|
-
margin-left: auto;
|
|
578
|
-
max-width: calc(100vw - 2 * var(--mlcad-ui-inset) - var(--mlcad-toolbar-width) - var(--mlcad-drawer-gap));
|
|
579
|
-
}
|
|
580
|
-
.mlcad-layer-action-btn {
|
|
581
|
-
min-height: 28px;
|
|
582
|
-
padding: 3px 6px;
|
|
583
|
-
font-size: 11px;
|
|
584
|
-
gap: 4px;
|
|
585
|
-
}
|
|
586
|
-
.mlcad-layer-action-btn svg { width: 12px; height: 12px; }
|
|
587
|
-
.mlcad-layer-zoom {
|
|
588
|
-
width: 20px;
|
|
589
|
-
height: 20px;
|
|
590
|
-
}
|
|
591
|
-
.mlcad-layer-zoom svg {
|
|
592
|
-
width: 12px;
|
|
593
|
-
height: 12px;
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
`;function Fn(t,e="measure"){const r=e==="measure"?Un():"",a=e==="measure"?Vn():"",n=e==="measure"?En():"",o=e==="view"?Oe():"",i="",l=e==="measure"?`${Tn()}${Dn()}`:"";return`
|
|
597
|
-
<div id="mlcad-loading" aria-hidden="true" style="background:${t}">
|
|
598
|
-
<div class="mlcad-loading-spinner"></div>
|
|
599
|
-
</div>
|
|
600
|
-
<div id="mlcad-root">
|
|
601
|
-
<aside id="mlcad-sidebar">
|
|
602
|
-
<nav id="mlcad-toolbar" data-i18n-attr="aria-label" data-i18n-key="toolbar.viewerTools" aria-label="Viewer tools">
|
|
603
|
-
${b(g.zoomExtent,"Zoom extents",{"data-action":"fit","data-i18n-key":"toolbar.zoomExtents","data-i18n-attr":"title aria-label"})}
|
|
604
|
-
${e==="measure"?vt():""}
|
|
605
|
-
${r}
|
|
606
|
-
${a}
|
|
607
|
-
${e==="measure"?vt():""}
|
|
608
|
-
${b(g.layer,"Layers",{id:"mlcad-layers-btn","aria-haspopup":"dialog","aria-expanded":"false","data-i18n-key":"toolbar.layers","data-i18n-attr":"title aria-label"})}
|
|
609
|
-
${n}
|
|
610
|
-
${o}
|
|
611
|
-
${b(g.chevronUp,"Collapse toolbar",{id:"mlcad-toolbar-toggle","aria-expanded":"true","data-i18n-key":"toolbar.collapse","data-i18n-attr":"title aria-label"})}
|
|
612
|
-
</nav>
|
|
613
|
-
${l}
|
|
614
|
-
${e==="measure"?jn():""}
|
|
615
|
-
<div id="mlcad-layer-drawer" role="dialog" data-i18n-attr="aria-label" data-i18n-key="layers.title" aria-label="Layers" hidden>
|
|
616
|
-
<div class="mlcad-drawer-header">
|
|
617
|
-
<span data-i18n-key="layers.title" data-i18n-text>Layers</span>
|
|
618
|
-
<button type="button" class="mlcad-drawer-close" id="mlcad-layer-close" data-i18n-key="layers.close" data-i18n-attr="aria-label" aria-label="Close layers">×</button>
|
|
619
|
-
</div>
|
|
620
|
-
<div class="mlcad-layer-actions">
|
|
621
|
-
<button type="button" class="mlcad-layer-action-btn" id="mlcad-layer-show-all">
|
|
622
|
-
${g.layerOn}<span data-i18n-key="layers.showAll" data-i18n-text>Show all</span>
|
|
623
|
-
</button>
|
|
624
|
-
<button type="button" class="mlcad-layer-action-btn" id="mlcad-layer-hide-all">
|
|
625
|
-
${g.layerOff}<span data-i18n-key="layers.hideAll" data-i18n-text>Hide all</span>
|
|
626
|
-
</button>
|
|
627
|
-
</div>
|
|
628
|
-
<div id="mlcad-layer-list"></div>
|
|
629
|
-
</div>
|
|
630
|
-
</aside>
|
|
631
|
-
${e==="measure"?'<footer id="mlcad-status-bar" aria-live="polite"></footer>':""}
|
|
632
|
-
</div>
|
|
633
|
-
${i}`}function vt(){return'<div class="mlcad-tool-separator" aria-hidden="true"></div>'}function Un(){return b(g.measure,"Measurement",{id:"mlcad-measure-menu-btn","aria-haspopup":"true","aria-expanded":"false","data-action":"measure-menu","data-i18n-key":"toolbar.measure","data-i18n-attr":"title aria-label"}).replace('class="mlcad-tool-btn"','class="mlcad-tool-btn has-children"')}function Vn(){return b(g.annotation,"Review",{id:"mlcad-markup-menu-btn","aria-haspopup":"true","aria-expanded":"false","data-action":"markup-menu","data-i18n-key":"toolbar.annotation","data-i18n-attr":"title aria-label"}).replace('class="mlcad-tool-btn"','class="mlcad-tool-btn has-children"')}function Tn(){return`<div id="mlcad-measure-strip-wrap" hidden>
|
|
634
|
-
<div id="mlcad-measure-strip" role="toolbar" data-i18n-attr="aria-label" data-i18n-key="toolbar.measure" aria-label="Measurement">
|
|
635
|
-
${b(g.measureDistance,"Measure distance",{"data-action":"measure","data-measure-mode":"distance","data-i18n-key":"toolbar.measureDistance","data-i18n-attr":"title aria-label"})}
|
|
636
|
-
${b(g.measureAngle,"Measure angle",{"data-action":"measure","data-measure-mode":"angle","data-i18n-key":"toolbar.measureAngle","data-i18n-attr":"title aria-label"})}
|
|
637
|
-
${b(g.measureArc,"Measure arc length",{"data-action":"measure","data-measure-mode":"arc","data-i18n-key":"toolbar.measureArc","data-i18n-attr":"title aria-label"})}
|
|
638
|
-
${b(g.measureArea,"Measure area",{"data-action":"measure","data-measure-mode":"area","data-i18n-key":"toolbar.measureArea","data-i18n-attr":"title aria-label"})}
|
|
639
|
-
${b(g.measureCoordinate,"Measure coordinates",{"data-action":"measure","data-measure-mode":"coordinate","data-i18n-key":"toolbar.measureCoordinate","data-i18n-attr":"title aria-label"})}
|
|
640
|
-
${b(g.markupShow,"Hide measurements",{"data-action":"measure-visibility","data-i18n-key":"toolbar.measureHide","data-i18n-attr":"title aria-label"})}
|
|
641
|
-
${b(g.clearMeasurements,"Clear measurements",{"data-action":"clear-measurements","data-i18n-key":"toolbar.clearMeasurements","data-i18n-attr":"title aria-label"})}
|
|
642
|
-
${vt()}
|
|
643
|
-
${b(g.markupImport,"Import measurements",{"data-action":"measure-import","data-i18n-key":"toolbar.measureImport","data-i18n-attr":"title aria-label"})}
|
|
644
|
-
${b(g.markupExport,"Export measurements",{"data-action":"measure-export","data-i18n-key":"toolbar.measureExport","data-i18n-attr":"title aria-label"})}
|
|
645
|
-
</div>
|
|
646
|
-
</div>`}function Dn(){return`<div id="mlcad-markup-strip-wrap" hidden>
|
|
647
|
-
<div id="mlcad-markup-strip" role="toolbar" data-i18n-attr="aria-label" data-i18n-key="toolbar.annotation" aria-label="Review">
|
|
648
|
-
${b(g.markupCloud,"Cloud",{"data-action":"markup","data-markup-mode":"cloud","data-i18n-key":"toolbar.markupCloud","data-i18n-attr":"title aria-label"})}
|
|
649
|
-
${b(g.markupCallout,"Callout",{"data-action":"markup","data-markup-mode":"callout","data-i18n-key":"toolbar.markupCallout","data-i18n-attr":"title aria-label"})}
|
|
650
|
-
${b(g.markupText,"Text",{"data-action":"markup","data-markup-mode":"text","data-i18n-key":"toolbar.markupText","data-i18n-attr":"title aria-label"})}
|
|
651
|
-
${b(g.markupRect,"Rectangle",{"data-action":"markup","data-markup-mode":"rect","data-i18n-key":"toolbar.markupRect","data-i18n-attr":"title aria-label"})}
|
|
652
|
-
${b(g.markupCircle,"Circle",{"data-action":"markup","data-markup-mode":"circle","data-i18n-key":"toolbar.markupCircle","data-i18n-attr":"title aria-label"})}
|
|
653
|
-
${b(g.markupArrow,"Arrow",{"data-action":"markup","data-markup-mode":"arrow","data-i18n-key":"toolbar.markupArrow","data-i18n-attr":"title aria-label"})}
|
|
654
|
-
${b(g.markupStamp,"Stamp",{"data-action":"markup","data-markup-mode":"stamp","data-i18n-key":"toolbar.markupStamp","data-i18n-attr":"title aria-label"})}
|
|
655
|
-
${b(g.markupShow,"Hide markups",{"data-action":"markup-visibility","data-i18n-key":"toolbar.markupHide","data-i18n-attr":"title aria-label"})}
|
|
656
|
-
${b(g.clearMarkups,"Clear markups",{"data-action":"clear-markups","data-i18n-key":"toolbar.clearMarkups","data-i18n-attr":"title aria-label"})}
|
|
657
|
-
${vt()}
|
|
658
|
-
${b(g.markupImport,"Import markups",{"data-action":"markup-import","data-i18n-key":"toolbar.markupImport","data-i18n-attr":"title aria-label"})}
|
|
659
|
-
${b(g.markupExport,"Export markups",{"data-action":"markup-export","data-i18n-key":"toolbar.markupExport","data-i18n-attr":"title aria-label"})}
|
|
660
|
-
</div>
|
|
661
|
-
</div>`}function En(){return b(g.setting,"Settings",{id:"mlcad-settings-btn","aria-haspopup":"true","aria-expanded":"false","data-i18n-key":"toolbar.settings","data-i18n-attr":"title aria-label"}).replace('class="mlcad-tool-btn"','class="mlcad-tool-btn has-children"')}function Le(t,e){const r=e.title??t.meta.title??"CAD Drawing",a=la(t),n=e.viewerRuntime,o=sa(),i=a.compression,l=`#${t.meta.background.toString(16).padStart(6,"0")}`,s=nn(t.meta.locale)??"en",c=t.meta.viewerMode??"measure";return`<!DOCTYPE html>
|
|
662
|
-
<html lang="${s}">
|
|
663
|
-
<head>
|
|
664
|
-
<meta charset="utf-8" />
|
|
665
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
666
|
-
<meta name="generator" content="mlightcad-cad-html-plugin" />
|
|
667
|
-
<title>${Rn(r)}</title>
|
|
668
|
-
<style>${Hn}</style>
|
|
669
|
-
</head>
|
|
670
|
-
<body>
|
|
671
|
-
${Fn(l,c)}
|
|
672
|
-
<script id="mlcad-snapshot" type="${o}+${i};base64">${a.payload}<\/script>
|
|
673
|
-
<script>${Zn(n)}<\/script>
|
|
674
|
-
</body>
|
|
675
|
-
</html>`}function Rn(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function Zn(t){return t.replace(/<\/script/gi,"<\\/script")}const On=400;function nt(t={}){return{exportInvisibleLayers:t.exportInvisibleLayers!==!1,initialView:t.initialView??"fit",viewerMode:t.viewerMode??"measure"}}function Nn(t){const e=t.activeLayoutView,r=e.center,a=e.trCamera.zoom,n=Math.max(e.height,1),o=a*(2*On)/n;return{centerX:r.x,centerY:r.y,zoom:o}}const _n="./viewer-runtime.iife.js";let pt={};function Yn(t){pt={...pt,...t}}function Qn(){return{...pt}}function Xn(t){return t!=null?String(t):pt.viewerRuntimeUrl!=null?String(pt.viewerRuntimeUrl):_n}function Gn(){return{minX:0,minY:0,maxX:0,maxY:0,valid:!1}}function Wn(t,e,r){if(e.length<3)return;const a=r[0],n=r[1];for(let o=0;o+2<e.length;o+=3){const i=ve(e[o],a),l=ve(e[o+1],n);t.valid?(i<t.minX&&(t.minX=i),i>t.maxX&&(t.maxX=i),l<t.minY&&(t.minY=l),l>t.maxY&&(t.maxY=l)):(t.minX=t.maxX=i,t.minY=t.maxY=l,t.valid=!0)}}function ze(t,e){Wn(t,e.positions,e.offset)}function Jn(t){return t.valid?{minX:t.minX,minY:t.minY,maxX:t.maxX,maxY:t.maxY}:null}function qn(t,e){const r=Gn();for(const a of t)ze(r,a);for(const a of e)ze(r,a);return Jn(r)}class Kn{build(e,r,a={}){return this.buildSync(e,r,a)}async buildAsync(e,r,a={}){await T();const n=a.exportInvisibleLayers!==!1,o=n?void 0:c=>at(e,c,n),i=ke(r,{title:a.title,background:a.background}),l=[];e.layers.forEach(c=>{at(e,c.name,n)&&l.push({name:c.name,color:c.color.RGB??16777215,visible:!c.isOff&&!c.isFrozen})});const s=[];for(const[c,d]of e.layouts){const u=[],m=[];for(const[,h]of d.layers){if(!at(e,h.name,n))continue;const w=ye(h.internalObject);u.push(...w.lineBatches),m.push(...w.meshBatches),await T()}s.push({btrId:c,name:Ie(r,c),isModelSpace:c===e.modelSpaceBtrId,lineBatches:u,meshBatches:m,osnap:Pe(a)?Ce(r,c,{includeLayer:o}):void 0}),await T()}return{version:mt,meta:Se(i,a,s,e.activeLayoutBtrId||e.modelSpaceBtrId),layers:l,layouts:s,activeLayoutBtrId:e.activeLayoutBtrId||e.modelSpaceBtrId}}buildSync(e,r,a){const n=a.exportInvisibleLayers!==!1,o=n?void 0:c=>at(e,c,n),i=ke(r,{title:a.title,background:a.background}),l=[];e.layers.forEach(c=>{at(e,c.name,n)&&l.push({name:c.name,color:c.color.RGB??16777215,visible:!c.isOff&&!c.isFrozen})});const s=[];return e.layouts.forEach((c,d)=>{const u=[],m=[];for(const[,h]of c.layers){if(!at(e,h.name,n))continue;const w=ye(h.internalObject);u.push(...w.lineBatches),m.push(...w.meshBatches)}s.push({btrId:d,name:Ie(r,d),isModelSpace:d===e.modelSpaceBtrId,lineBatches:u,meshBatches:m,osnap:Pe(a)?Ce(r,d,{includeLayer:o}):void 0})}),{version:mt,meta:Se(i,a,s,e.activeLayoutBtrId||e.modelSpaceBtrId),layers:l,layouts:s,activeLayoutBtrId:e.activeLayoutBtrId||e.modelSpaceBtrId}}}function Se(t,e,r,a){const n=r.find(l=>l.btrId===a)??r[0],o=n?qn(n.lineBatches,n.meshBatches):null,i=e.initialView??"fit";return{title:t.title,createdAt:new Date().toISOString(),extents:t.extents,viewExtents:o??void 0,units:t.units,background:t.background,locale:e.locale??y.currentLocale,initialView:i,viewState:i==="current"?e.viewState:void 0,viewerMode:e.viewerMode??"measure"}}function Pe(t){return(t.viewerMode??"measure")==="measure"}function at(t,e,r){if(r)return!0;const a=t.layers.get(e);return a?!a.isOff&&!a.isFrozen:!0}function Ie(t,e){for(const r of t.tables.blockTable.newIterator())if(r.objectId===e)return r.name;return e}class to{constructor(e={}){this.options=e,this._snapshotBuilder=new Kn}async prepareAcTrView2dForHtmlExport(e,r={}){if(!e||!("cadScene"in e)||!e.cadScene)throw new Error("CAD scene is not available. Open a drawing before exporting to HTML.");if(!(e instanceof Qe))throw new Error("HTML export requires a 2D CAD view. Open a drawing before exporting.");const a=nt(r);return await e.ensureEntitiesConvertedForExport({includeInvisibleLayers:a.exportInvisibleLayers}),await T(),e}async convert(e,r={},a){const n=dt.instance,o=nt(r);await n.withBusyIndicator(async()=>{await T();const i=n.curDocument,l=await this.prepareAcTrView2dForHtmlExport(a??n.curView,o),s=e||i.fileName||i.docTitle,c=await this._snapshotBuilder.buildAsync(l.cadScene,i.database,{title:Xe(s),background:l.backgroundColor,exportInvisibleLayers:o.exportInvisibleLayers,initialView:o.initialView,viewerMode:o.viewerMode,viewState:o.initialView==="current"?Nn(l):void 0});await T();const d=await this.loadViewerRuntime();await T();const u=Le(c,{title:c.meta.title,viewerRuntime:d});await T(),this.downloadHtml(u,Ge(s,"html"))})}async packSnapshot(e,r){await dt.instance.withBusyIndicator(async()=>{await T();const a=await this.loadViewerRuntime();await T();const n=Le(e,{title:e.meta.title,viewerRuntime:a});await T(),this.downloadHtml(n,r)})}async loadViewerRuntime(){const e=Xn(this.options.viewerRuntimeUrl),r=await fetch(e);if(!r.ok)throw new Error(`Failed to load HTML viewer runtime from "${e}" (${r.status}). Install @mlightcad/cad-html-plugin, copy viewer-runtime.iife.js to your app assets, and set viewerRuntimeUrl on registerLazyHtmlPlugin / createHtmlPlugin / AcApHtmlConvertor.`);return r.text()}downloadHtml(e,r){const a=new Blob([e],{type:"text/html;charset=utf-8"}),n=URL.createObjectURL(a),o=document.createElement("a");o.href=n,o.download=r,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.setTimeout(()=>URL.revokeObjectURL(n),6e4)}}class eo extends Ye{constructor(e={}){super(),this.pluginOptions=e}async execute(e){const r=await this.promptOptions();r&&await new to(this.pluginOptions).convert(e.doc.fileName||e.doc.docTitle,r,e.view)}async promptOptions(){const e=await this.promptExportInvisibleLayers();if(e===void 0)return;const r=await this.promptInitialView();if(r===void 0)return;const a=await this.promptViewerMode();if(a!==void 0)return nt({exportInvisibleLayers:e,initialView:r,viewerMode:a})}async promptExportInvisibleLayers(){const e=nt(),r=new zt(y.t("jig.chtml.exportInvisibleLayers"));r.allowNone=!0;const a=r.keywords.add(y.t("jig.chtml.keywords.yes.display"),y.t("jig.chtml.keywords.yes.global"),y.t("jig.chtml.keywords.yes.local")),n=r.keywords.add(y.t("jig.chtml.keywords.no.display"),y.t("jig.chtml.keywords.no.global"),y.t("jig.chtml.keywords.no.local"));r.keywords.default=e.exportInvisibleLayers?a:n;const o=await dt.instance.editor.getKeywords(r);if(o.status!==B.Cancel){if(o.status===B.None)return e.exportInvisibleLayers;if(o.status===B.OK||o.status===B.Keyword)return o.stringResult?o.stringResult==="Yes":e.exportInvisibleLayers}}async promptInitialView(){const e=nt(),r=new zt(y.t("jig.chtml.initialView"));r.allowNone=!0;const a=r.keywords.add(y.t("jig.chtml.keywords.extents.display"),y.t("jig.chtml.keywords.extents.global"),y.t("jig.chtml.keywords.extents.local")),n=r.keywords.add(y.t("jig.chtml.keywords.current.display"),y.t("jig.chtml.keywords.current.global"),y.t("jig.chtml.keywords.current.local"));r.keywords.default=e.initialView==="current"?n:a;const o=await dt.instance.editor.getKeywords(r);if(o.status!==B.Cancel){if(o.status===B.None)return e.initialView;if(o.status===B.OK||o.status===B.Keyword)return o.stringResult?o.stringResult==="Current"?"current":"fit":e.initialView}}async promptViewerMode(){const e=nt(),r=new zt(y.t("jig.chtml.viewerMode"));r.allowNone=!0;const a=r.keywords.add(y.t("jig.chtml.keywords.view.display"),y.t("jig.chtml.keywords.view.global"),y.t("jig.chtml.keywords.view.local")),n=r.keywords.add(y.t("jig.chtml.keywords.measure.display"),y.t("jig.chtml.keywords.measure.global"),y.t("jig.chtml.keywords.measure.local"));r.keywords.default=e.viewerMode==="view"?a:n;const o=await dt.instance.editor.getKeywords(r);if(o.status!==B.Cancel){if(o.status===B.None)return e.viewerMode;if(o.status===B.OK||o.status===B.Keyword)return o.stringResult?o.stringResult==="View"?"view":"measure":e.viewerMode}}}const ro="1.6.1",ao={version:ro};class no{constructor(e={}){this.options=e,this.name="HtmlPlugin",this.version=ao.version,this.description="HTML export (-chtml) command",this.registeredCommands=[]}onLoad(e,r){const a=_e.SYSTEMT_COMMAND_GROUP_NAME,n=new eo(this.options);r.addCommand(a,"-chtml","-chtml",n),this.registeredCommands.push({group:a,name:"-chtml"}),r.lookupGlobalCmd("chtml")||(r.addCommand(a,"chtml","chtml",n),this.registeredCommands.push({group:a,name:"chtml"}))}onUnload(e,r){for(const a of this.registeredCommands)r.removeCmd(a.group,a.name);this.registeredCommands=[]}}async function io(t={}){return t.viewerRuntimeUrl!=null&&Yn(t),new no(Qn())}export{Jr as ACEX_SNAPSHOT_COMPRESSION,mt as ACEX_SNAPSHOT_VERSION,eo as AcApExportHtmlCmd,to as AcApHtmlConvertor,Kn as AcApHtmlSnapshotBuilder,_n as DEFAULT_HTML_VIEWER_RUNTIME_URL,co as HTML_PLUGIN_NAME,uo as HTML_PLUGIN_TRIGGERS,Ce as buildOsnapCatalog,ke as buildViewerMetadata,Nn as captureAcApHtmlViewState,ye as collectBatchesFromObject3D,qr as compressSnapshotBinary,Yn as configureHtmlPlugin,io as createHtmlPlugin,la as encodeSnapshot,ea as encodeSnapshotBinary,ya as exportActiveBatchedLine2Slice,Gt as exportActiveBatchedSlice,xe as exportBufferGeometrySlice,Qn as getHtmlPluginOptions,Le as packHtml,nt as resolveAcApHtmlExportOptions,nn as resolveAcExHtmlLocale,Xn as resolveViewerRuntimeUrl,sa as snapshotMimeType};
|