@mlightcad/cad-simple-viewer-cli 1.6.1 → 1.6.2
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/dist-runner/assets/cad-html-plugin-DMBhuyxU.js +699 -0
- package/dist-runner/assets/{cad-pdf-plugin-CqZVmSm2.js → cad-pdf-plugin-D1C1ESem.js} +2 -2
- package/dist-runner/assets/{cad-svg-plugin-BvSmrelr.js → cad-svg-plugin-BA-XSK8e.js} +6 -6
- package/dist-runner/assets/{index-BvxDFe8e.js → index-4dCU3rib.js} +402 -247
- package/dist-runner/index.html +1 -1
- package/dist-runner/viewer-runtime.iife.js +257 -156
- package/dist-runner/workers/libredwg-parser-worker.js +1 -1
- package/examples/export-html.scr +2 -1
- package/package.json +7 -7
- package/dist-runner/assets/cad-html-plugin-k7CVaAuj.js +0 -675
|
@@ -0,0 +1,699 @@
|
|
|
1
|
+
import{k as qe,j as ta,p as It,d as k,w as ct,g as S,r as ea,a as U,_ as aa,x as ra,y as na,b as oa,c as ia,D as oe,m as la,F as ie,P as sa,L as ca,e as da,M as ua,A as ma,l as pa,f as Yt,h as ha,i as Te,S as fa,n as ga,o as wa,q as ba,s as xa,t as va,u as Xt,v as ya,z as ka,B as Ca,C as Aa,E as Ma,G as La,H as za,I as Pa,J as Ia,K as $a,N as Sa,O as Ha,Q as Va,R as ja,T as Ba,U as Fa,V as Ta,W as Za,X as Ra,Y as D,Z as yt,$ as Ze,a0 as Ua,a1 as ht,a2 as Da,a3 as Oa,a4 as Ea,a5 as Na}from"./index-4dCU3rib.js";import{a6 as Ro,a7 as Uo}from"./index-4dCU3rib.js";const ut=3;var I=Uint8Array,P=Uint16Array,_t=Int32Array,Qt=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]),Gt=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]),le=new I([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Re=function(t,e){for(var a=new P(31),r=0;r<31;++r)a[r]=e+=1<<t[r-1];for(var n=new _t(a[30]),r=1;r<30;++r)for(var o=a[r];o<a[r+1];++o)n[o]=o-a[r]<<5|r;return{b:a,r:n}},Ue=Re(Qt,2),Ya=Ue.b,Ft=Ue.r;Ya[28]=258,Ft[258]=28;var Xa=Re(Gt,0),se=Xa.r,Tt=new P(32768);for(var b=0;b<32768;++b){var _=(b&43690)>>1|(b&21845)<<1;_=(_&52428)>>2|(_&13107)<<2,_=(_&61680)>>4|(_&3855)<<4,Tt[b]=((_&65280)>>8|(_&255)<<8)>>1}var dt=(function(t,e,a){for(var r=t.length,n=0,o=new P(e);n<r;++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(a){l=new P(1<<e);var s=15-e;for(n=0;n<r;++n)if(t[n])for(var d=n<<4|t[n],c=e-t[n],u=i[t[n]-1]++<<c,p=u|(1<<c)-1;u<=p;++u)l[Tt[u]>>s]=d}else for(l=new P(r),n=0;n<r;++n)t[n]&&(l[n]=Tt[i[t[n]-1]++]>>15-t[n]);return l}),J=new I(288);for(var b=0;b<144;++b)J[b]=8;for(var b=144;b<256;++b)J[b]=9;for(var b=256;b<280;++b)J[b]=7;for(var b=280;b<288;++b)J[b]=8;var gt=new I(32);for(var b=0;b<32;++b)gt[b]=5;var _a=dt(J,9,0),Qa=dt(gt,5,0),De=function(t){return(t+7)/8|0},Oe=function(t,e,a){return(a==null||a>t.length)&&(a=t.length),new I(t.subarray(e,a))},E=function(t,e,a){a<<=e&7;var r=e/8|0;t[r]|=a,t[r+1]|=a>>8},lt=function(t,e,a){a<<=e&7;var r=e/8|0;t[r]|=a,t[r+1]|=a>>8,t[r+2]|=a>>16},$t=function(t,e){for(var a=[],r=0;r<t.length;++r)t[r]&&a.push({s:r,f:t[r]});var n=a.length,o=a.slice();if(!n)return{t:Ne,l:0};if(n==1){var i=new I(a[0].s+1);return i[a[0].s]=1,{t:i,l:1}}a.sort(function($,V){return $.f-V.f}),a.push({s:-1,f:25001});var l=a[0],s=a[1],d=0,c=1,u=2;for(a[0]={s:-1,f:l.f+s.f,l,r:s};c!=n-1;)l=a[a[d].f<a[u].f?d++:u++],s=a[d!=c&&a[d].f<a[u].f?d++:u++],a[c++]={s:-1,f:l.f+s.f,l,r:s};for(var p=o[0].s,r=1;r<n;++r)o[r].s>p&&(p=o[r].s);var m=new P(p+1),y=Zt(a[c-1],m,0);if(y>e){var r=0,x=0,Y=y-e,Q=1<<Y;for(o.sort(function(V,M){return m[M.s]-m[V.s]||V.f-M.f});r<n;++r){var O=o[r].s;if(m[O]>e)x+=Q-(1<<y-m[O]),m[O]=e;else break}for(x>>=Y;x>0;){var G=o[r].s;m[G]<e?x-=1<<e-m[G]++-1:++r}for(;r>=0&&x;--r){var H=o[r].s;m[H]==e&&(--m[H],++x)}y=e}return{t:new I(m),l:y}},Zt=function(t,e,a){return t.s==-1?Math.max(Zt(t.l,e,a+1),Zt(t.r,e,a+1)):e[t.s]=a},ce=function(t){for(var e=t.length;e&&!t[--e];);for(var a=new P(++e),r=0,n=t[0],o=1,i=function(s){a[r++]=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:a.subarray(0,r),n:e}},st=function(t,e){for(var a=0,r=0;r<e.length;++r)a+=t[r]*e[r];return a},Ee=function(t,e,a){var r=a.length,n=De(e+2);t[n]=r&255,t[n+1]=r>>8,t[n+2]=t[n]^255,t[n+3]=t[n+1]^255;for(var o=0;o<r;++o)t[n+o+4]=a[o];return(n+4+r)*8},de=function(t,e,a,r,n,o,i,l,s,d,c){E(e,c++,a),++n[256];for(var u=$t(n,15),p=u.t,m=u.l,y=$t(o,15),x=y.t,Y=y.l,Q=ce(p),O=Q.c,G=Q.n,H=ce(x),$=H.c,V=H.n,M=new P(19),w=0;w<O.length;++w)++M[O[w]&31];for(var w=0;w<$.length;++w)++M[$[w]&31];for(var f=$t(M,7),L=f.t,K=f.l,z=19;z>4&&!L[le[z-1]];--z);var q=d+5<<3,j=st(n,J)+st(o,gt)+i,B=st(n,p)+st(o,x)+i+14+3*z+st(M,L)+2*M[16]+3*M[17]+7*M[18];if(s>=0&&q<=j&&q<=B)return Ee(e,c,t.subarray(s,s+d));var T,C,F,X;if(E(e,c,1+(B<j)),c+=2,B<j){T=dt(p,m,0),C=p,F=dt(x,Y,0),X=x;var Mt=dt(L,K,0);E(e,c,G-257),E(e,c+5,V-1),E(e,c+10,z-4),c+=14;for(var w=0;w<z;++w)E(e,c+3*w,L[le[w]]);c+=3*z;for(var Z=[O,$],it=0;it<2;++it)for(var tt=Z[it],w=0;w<tt.length;++w){var R=tt[w]&31;E(e,c,Mt[R]),c+=L[R],R>15&&(E(e,c,tt[w]>>5&127),c+=tt[w]>>12)}}else T=_a,C=J,F=Qa,X=gt;for(var w=0;w<l;++w){var A=r[w];if(A>255){var R=A>>18&31;lt(e,c,T[R+257]),c+=C[R+257],R>7&&(E(e,c,A>>23&31),c+=Qt[R]);var et=A&31;lt(e,c,F[et]),c+=X[et],et>3&&(lt(e,c,A>>5&8191),c+=Gt[et])}else lt(e,c,T[A]),c+=C[A]}return lt(e,c,T[256]),c+C[256]},Ga=new _t([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Ne=new I(0),Wa=function(t,e,a,r,n,o){var i=o.z||t.length,l=new I(r+i+5*(1+Math.ceil(i/7e3))+n),s=l.subarray(r,l.length-n),d=o.l,c=(o.r||0)&7;if(e){c&&(s[0]=o.r>>3);for(var u=Ga[e-1],p=u>>13,m=u&8191,y=(1<<a)-1,x=o.p||new P(32768),Y=o.h||new P(y+1),Q=Math.ceil(a/3),O=2*Q,G=function(Pt){return(t[Pt]^t[Pt+1]<<Q^t[Pt+2]<<O)&y},H=new _t(25e3),$=new P(288),V=new P(32),M=0,w=0,f=o.i||0,L=0,K=o.w||0,z=0;f+2<i;++f){var q=G(f),j=f&32767,B=Y[q];if(x[j]=B,Y[q]=j,K<=f){var T=i-f;if((M>7e3||L>24576)&&(T>423||!d)){c=de(t,s,0,H,$,V,w,L,z,f-z,c),L=M=w=0,z=f;for(var C=0;C<286;++C)$[C]=0;for(var C=0;C<30;++C)V[C]=0}var F=2,X=0,Mt=m,Z=j-B&32767;if(T>2&&q==G(f-Z))for(var it=Math.min(p,T)-1,tt=Math.min(32767,f),R=Math.min(258,T);Z<=tt&&--Mt&&j!=B;){if(t[f+F]==t[f+F-Z]){for(var A=0;A<R&&t[f+A]==t[f+A-Z];++A);if(A>F){if(F=A,X=Z,A>it)break;for(var et=Math.min(Z,A-2),ee=0,C=0;C<et;++C){var Lt=f-Z+C&32767,Ke=x[Lt],ae=Lt-Ke&32767;ae>ee&&(ee=ae,B=Lt)}}}j=B,B=x[j],Z+=j-B&32767}if(X){H[L++]=268435456|Ft[F]<<18|se[X];var re=Ft[F]&31,ne=se[X]&31;w+=Qt[re]+Gt[ne],++$[257+re],++V[ne],K=f+F,++M}else H[L++]=t[f],++$[t[f]]}}for(f=Math.max(f,K);f<i;++f)H[L++]=t[f],++$[t[f]];c=de(t,s,d,H,$,V,w,L,z,f-z,c),d||(o.r=c&7|s[c/8|0]<<3,c-=7,o.h=Y,o.p=x,o.i=f,o.w=K)}else{for(var f=o.w||0;f<i+d;f+=65535){var zt=f+65535;zt>=i&&(s[c/8|0]=d,zt=i),c=Ee(s,c+1,t.subarray(f,zt))}o.i=i}return Oe(l,0,r+De(c)+n)},Ja=(function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var a=e,r=9;--r;)a=(a&1&&-306674912)^a>>>1;t[e]=a}return t})(),Ka=function(){var t=-1;return{p:function(e){for(var a=t,r=0;r<e.length;++r)a=Ja[a&255^e[r]]^a>>>8;t=a},d:function(){return~t}}},qa=function(t,e,a,r,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 Wa(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,a,r,n)},Rt=function(t,e,a){for(;a;++e)t[e]=a,a>>>=8},tr=function(t,e){var a=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&&Rt(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),a){t[3]=8;for(var r=0;r<=a.length;++r)t[r+10]=a.charCodeAt(r)}},er=function(t){return 10+(t.filename?t.filename.length+1:0)};function ar(t,e){e||(e={});var a=Ka(),r=t.length;a.p(t);var n=qa(t,e,er(e),8),o=n.length;return tr(n,e),Rt(n,o-8,a.d()),Rt(n,o-4,r),n}var ue=typeof TextEncoder<"u"&&new TextEncoder,rr=typeof TextDecoder<"u"&&new TextDecoder,nr=0;try{rr.decode(Ne,{stream:!0}),nr=1}catch{}function or(t,e){var a;if(ue)return ue.encode(t);for(var r=t.length,n=new I(t.length+(t.length>>1)),o=0,i=function(c){n[o++]=c},a=0;a<r;++a){if(o+5>n.length){var l=new I(o+8+(r-a<<1));l.set(n),n=l}var s=t.charCodeAt(a);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(++a)&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 Oe(n,0,o)}const ir="gzip";function lr(t){return{bytes:ar(t),compression:ir}}const sr=1480934209,me=1,pe=2,he=4,fe=8,ge=16,we=1,be=2,xe=4,ve=8,ye=16,cr=32,ke=64;function dr(t){if(t.version!==ut)throw new Error(`Unsupported snapshot version: ${t.version}`);const e=new hr;e.writeU32(sr),e.writeU8(ut),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 a of t.layouts)ur(e,a);return e.toUint8Array()}function ur(t,e){t.writeString(e.btrId),t.writeString(e.name),t.writeU8(e.isModelSpace?1:0),t.writeJson(e.osnap??null),t.writeJson(e.viewports??null),t.writeU32(e.lineBatches.length);for(const a of e.lineBatches)mr(t,a);t.writeU32(e.meshBatches.length);for(const a of e.meshBatches)pr(t,a)}function mr(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 a=0;e.indices&&e.indices.length>0&&(a|=me),e.linePattern&&(a|=pe),e.lineDistances&&e.lineDistances.length>0&&(a|=he),e.lineWidth!=null&&e.lineWidth>0&&(a|=fe),e.renderOrder!=null&&e.renderOrder!==0&&(a|=ge),t.writeU8(a),a&me&&t.writeUint32Array(e.indices),a&pe&&t.writeJson(e.linePattern),a&he&&t.writeFloat32Array(e.lineDistances),a&fe&&t.writeF32(e.lineWidth),a&ge&&t.writeI32(e.renderOrder)}function pr(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 a=0;e.indices&&e.indices.length>0&&(a|=we),e.hatchPattern&&(a|=be),e.gradientFill&&(a|=xe),e.gradientPositions&&e.gradientPositions.length>0&&(a|=ve),e.side!=null&&(a|=ye),e.points&&(a|=cr),e.renderOrder!=null&&e.renderOrder!==0&&(a|=ke),t.writeU8(a),a&we&&t.writeUint32Array(e.indices),a&be&&t.writeJson(e.hatchPattern),a&xe&&t.writeJson(e.gradientFill),a&ve&&t.writeFloat32Array(e.gradientPositions),a&ye&&t.writeU8(e.side),a&ke&&t.writeI32(e.renderOrder)}class hr{constructor(){this.chunks=[],this.length=0}writeU8(e){const a=new Uint8Array(1);a[0]=e&255,this.chunks.push(a),this.length+=1}writeU32(e){const a=new Uint8Array(4);new DataView(a.buffer).setUint32(0,e>>>0,!0),this.chunks.push(a),this.length+=4}writeI32(e){const a=new Uint8Array(4);new DataView(a.buffer).setInt32(0,e|0,!0),this.chunks.push(a),this.length+=4}writeF32(e){const a=new Uint8Array(4);new DataView(a.buffer).setFloat32(0,e,!0),this.chunks.push(a),this.length+=4}writeF64(e){const a=new Uint8Array(8);new DataView(a.buffer).setFloat64(0,e,!0),this.chunks.push(a),this.length+=8}writeBytes(e){this.chunks.push(e),this.length+=e.length}writeString(e){const a=or(e);this.writeU32(a.length),this.writeBytes(a)}writeJson(e){this.writeString(JSON.stringify(e))}writeFloat32Array(e){this.alignTo(4);const a=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);this.writeU32(a.length),this.writeBytes(a)}writeUint32Array(e){this.alignTo(4);const a=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);this.writeU32(a.length),this.writeBytes(a)}alignTo(e){const a=this.length%e;if(a===0)return;const r=e-a;for(let n=0;n<r;n++)this.writeU8(0)}toUint8Array(){const e=new Uint8Array(this.length);let a=0;for(const r of this.chunks)e.set(r,a),a+=r.length;return e}}const fr="application/vnd.mlightcad.acex-snapshot+binary";function gr(t){if(t.version!==ut)throw new Error(`Unsupported snapshot version: ${t.version}`);const e=dr(t),a=lr(e);return{payload:br(a.bytes),compression:a.compression}}function wr(){return fr}function br(t){let e="";for(let a=0;a<t.length;a++)e+=String.fromCharCode(t[a]);return btoa(e)}function ot(t,e,a){if(a<=0)return new Float32Array(0);const r=new Float32Array(a);for(let n=0;n<a;n++)r[n]=t[e+n];return r}function xr(t,e,a){if(a<=0)return new Uint32Array(0);const r=new Uint32Array(a);for(let n=0;n<a;n++)r[n]=t[e+n];return r}function Ye(t,e){if(e.length===0)return{positions:t,indices:e};let a=0;for(let n=0;n<e.length;n++){const o=e[n];o>a&&(a=o)}const r=(a+1)*3;return r>=t.length?{positions:t,indices:e}:{positions:ot(t,0,r),indices:e}}function Ce(t,e){return t+e}const at={x:0,y:0,z:0};function vr(t){t.updateMatrixWorld(!0);const e=t.matrixWorld.elements;return at.x=e[12],at.y=e[13],at.z=e[14],[at.x,at.y,at.z]}function yr(t,e){const a=e.elements,r=t.positions;if(r.length===0)return{positions:new Float32Array(0),indices:t.indices};const n=new Float32Array(r.length);for(let o=0;o<r.length;o+=3){const i=r[o],l=r[o+1],s=r[o+2];n[o]=a[0]*i+a[4]*l+a[8]*s+a[12],n[o+1]=a[1]*i+a[5]*l+a[9]*s+a[13],n[o+2]=a[2]*i+a[6]*l+a[10]*s+a[14]}return{positions:n,indices:t.indices?new Uint32Array(t.indices):void 0}}function kr(t){const e=t.positions;if(e.length<3)return{slice:t,offset:[0,0,0]};let a=1/0,r=1/0,n=1/0,o=-1/0,i=-1/0,l=-1/0;for(let c=0;c<e.length;c+=3){const u=e[c],p=e[c+1],m=e[c+2];a=Math.min(a,u),r=Math.min(r,p),n=Math.min(n,m),o=Math.max(o,u),i=Math.max(i,p),l=Math.max(l,m)}const s=[(a+o)/2,(r+i)/2,(n+l)/2],d=new Float32Array(e.length);for(let c=0;c<e.length;c+=3)d[c]=e[c]-s[0],d[c+1]=e[c+1]-s[1],d[c+2]=e[c+2]-s[2];return{slice:{positions:d,indices:t.indices?new Uint32Array(t.indices):void 0},offset:s}}function Cr(t,e,a={}){t.updateMatrixWorld(!0);const r=yr(e,t.matrixWorld);return a.preserveWorldSpaceForPatternFill?{slice:r,offset:[0,0,0]}:kr(r)}function Wt(t){const e=t;if(e.isShaderMaterial===!0||t.type==="ShaderMaterial")return e}function Ar(t){var e;const a=Wt(t);if(!a)return;const r=a.uniforms.pattern,n=a.uniforms.patternLength;if(!r||!n)return;const o=r.value;if(!(!Array.isArray(o)||o.length===0))return{pattern:[...o],patternLength:Number(n.value),viewportScale:Number(((e=a.uniforms.u_viewportScale)==null?void 0:e.value)??1)}}function Mr(t){var e;const a=Wt(t);if(!a)return;const r=a.uniforms.u_patternLines;if(!r)return;const n=r.value;if(!(!Array.isArray(n)||n.length===0))return{patternAngle:Number(((e=a.uniforms.u_patternAngle)==null?void 0:e.value)??0),patternLines:n.map(zr)}}function Lr(t){var e,a,r,n,o;const i=Wt(t);if(!i||i.uniforms.u_patternLines)return;const l=(e=i.uniforms.u_startColor)==null?void 0:e.value,s=(a=i.uniforms.u_endColor)==null?void 0:a.value,d=i.uniforms.u_gradientType;if(!(!(l!=null&&l.getHex)||d==null))return{startColor:l.getHex(),endColor:((r=s==null?void 0:s.getHex)==null?void 0:r.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(d.value)}}function zr(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 Xe(t){const e=t.length/3;if(e<2)return new Float32Array(0);const a=new Float32Array(e);for(let r=0;r<e;r+=2){r===0?a[r]=0:a[r]=a[r-1];const n=t[r*3],o=t[r*3+1],i=t[r*3+2]??0,l=t[(r+1)*3],s=t[(r+1)*3+1],d=t[(r+1)*3+2]??0,c=l-n,u=s-o,p=d-i;a[r+1]=a[r]+Math.sqrt(c*c+u*u+p*p)}return a}function Pr(t,e){const a=t.getAttribute(e);if(!a||a.count===0)return;const r=a.itemSize;if(t.getIndex()){const c=a.array;return ot(c,0,a.count*r)}const n=t.drawRange,o=a.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 d=a.array;return ot(d,i*r,s*r)}function Ir(t,e){const a=Math.atan2(e[1],e[0]),r=(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+a,patternLines:t.patternLines.map(o=>({angle:o.angle+a,base:r(o.base[0],o.base[1]),offset:n(o.offset[0],o.offset[1]),dashLengths:[...o.dashLengths],patternLength:o.patternLength}))}}function Ut(t,e){return!Number.isFinite(t)||t<0?0:Math.min(Math.floor(t),e)}function Dt(t,e,a){const r=Math.max(0,e-a);return!Number.isFinite(t)||t<=0?r:Math.min(Math.floor(t),r)}function Ae(t){const e=t.getAttribute("position");if(!e)return{positions:new Float32Array(0)};const a=t.drawRange,r=e.array,n=e.itemSize,o=t.getIndex();if(o){const s=ot(r,0,e.count*n),d=o.array,c=Ut(a.start,o.count),u=Dt(a.count,o.count,c),p=xr(d,c,u);return Ye(s,p)}const i=Ut(a.start,e.count),l=Dt(a.count,e.count,i);return{positions:ot(r,i*n,l*n)}}function Ot(t){return Ta(t.flags)&&Za(t.flags)}function Jt(t,e){const a=e.getAttribute("position");if(!a)return{positions:new Float32Array(0)};const r=a.itemSize,n=a.array,o=e.getIndex(),{count:i}=t.mappingStats;if(o){const s=ot(n,0,a.count*r),d=o.array,c=[];for(let u=0;u<i;u++){let p;try{p=t.getGeometryRangeAt(u)}catch{continue}const m=p.indexStart??0,y=p.indexCount??0;if(!(!Ot(p)||y<=0))for(let x=0;x<y;x++)c.push(d[m+x])}return c.length===0?{positions:new Float32Array(0)}:Ye(s,new Uint32Array(c))}const l=[];for(let s=0;s<i;s++){let d;try{d=t.getGeometryRangeAt(s)}catch{continue}if(!Ot(d)||d.vertexCount<=0)continue;const c=d.vertexStart*r,u=d.vertexCount*r;for(let p=0;p<u;p++)l.push(n[c+p])}return{positions:new Float32Array(l)}}function wt(t,e,a){t.push(e.getX(a),e.getY(a),e.getZ(a))}function $r(t,e){const a=e.getAttribute("instanceStart"),r=e.getAttribute("instanceEnd");if(!a||!r)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(!Ot(l)||l.vertexCount<=0)continue;const s=l.vertexStart,d=s+l.vertexCount;for(let c=s;c<d;c++)wt(o,a,c),wt(o,r,c)}return{positions:new Float32Array(o)}}function Sr(t,e){const a=t.instanceCount;if(Number.isFinite(a)&&a>=0)return Math.min(Math.floor(a),e);const r=t.drawRange,n=Ut(r.start,e);return Dt(r.count,e,n)}function Hr(t){const e=t.getAttribute("instanceStart"),a=t.getAttribute("instanceEnd");if(!e||!a||e.count===0)return{positions:new Float32Array(0)};const r=Sr(t,e.count);if(r<=0)return{positions:new Float32Array(0)};const n=[];for(let o=0;o<r;o++)wt(n,e,o),wt(n,a,o);return{positions:new Float32Array(n)}}function St(t){return ha(t)}function _e(t){if(t instanceof ga)return t.linewidth}function Ht(t){if("material"in t){const e=t.userData.originalMaterial??t.material;return Array.isArray(e)?e[0]:e}return t.material}function nt(t){var e;const a=Te(t),r=a.layer??"0",n=t;let o=n.color!=null?n.color.getHex():a.color??16777215;const i=Ar(t),l=Mr(t),s=Lr(t);if(t instanceof fa||t.type==="ShaderMaterial"){const d=(e=t.uniforms.u_color)==null?void 0:e.value;d!=null&&d.getHex?o=d.getHex():s&&(o=s.startColor)}return{color:o,layer:r,linePattern:i,hatchPattern:l,gradientFill:s,side:l||s?t.side:void 0}}function Vr(t,e){const a=Te(e).drawOrder??t.renderOrder;return a===0?void 0:a}function mt(t,e,a){const r=Vr(e,a);r!=null&&(t.renderOrder=r)}function jr(t,e){if(!e)return;const a=t.userData.bakedWorldMatrix;return!a||a.length<16?e:Ir(e,a)}function kt(t){return vr(t)}function Vt(t,e,a={}){const r=Cr(t,e,a);return{...r.slice,offset:r.offset}}function Kt(t,e,a,r,n){const o=nt(e),i=jr(a,o.hatchPattern),l=o.gradientFill?Pr(t,"gradientPosition"):void 0,s={layer:o.layer,color:o.color,offset:n,hatchPattern:i,gradientFill:o.gradientFill,gradientPositions:l,side:o.side,...r};return mt(s,a,e),s}function Br(t){const e=$r(t,t.geometry);if(e.positions.length===0)return;const{color:a,layer:r}=nt(t.material),n=_e(t.material),o={layer:r,color:a,offset:kt(t),lineWidth:n,...e};return mt(o,t,t.material),o}function Fr(t){const e=Jt(t,t.geometry);if(e.positions.length===0)return;const{color:a,layer:r,linePattern:n}=nt(t.material),o=n?Xe(e.positions):void 0,i={layer:r,color:a,offset:kt(t),linePattern:n,lineDistances:o,...e};return mt(i,t,t.material),i}function Tr(t){const e=Jt(t,t.geometry);if(e.positions.length!==0)return Kt(t.geometry,t.material,t,e,kt(t))}function Zr(t){const e=Jt(t,t.geometry);if(e.positions.length!==0)return{points:!0,...Kt(t.geometry,t.material,t,e,kt(t))}}function Rr(t){const e=[],a=[];return t.traverse(r=>{if(!(oa(r)||ia(r))){if(r instanceof oe){const n=Fr(r);n&&e.push(n);return}if(r instanceof la){const n=Br(r);n&&e.push(n);return}if(r instanceof ie){const n=Tr(r);n&&a.push(n);return}if(r instanceof sa){const n=Zr(r);n&&a.push(n);return}if(r instanceof ca){if(!St(r))return;const n=Hr(r.geometry);if(n.positions.length===0)return;const o=Ht(r),{color:i,layer:l}=nt(o),{offset:s,...d}=Vt(r,n),c={layer:l,color:i,offset:s,lineWidth:_e(o),...d};mt(c,r,o),e.push(c)}else if(r instanceof da&&!(r instanceof oe)){if(!St(r))return;const n=Ae(r.geometry);if(n.positions.length===0)return;const o=Ht(r),{color:i,layer:l,linePattern:s}=nt(o),{offset:d,...c}=Vt(r,n),u=s?Xe(c.positions):void 0,p={layer:l,color:i,offset:d,linePattern:s,lineDistances:u,...c};mt(p,r,o),e.push(p)}else if(r instanceof ua&&!(r instanceof ie)){if(!St(r))return;const n=Ae(r.geometry);if(n.positions.length===0)return;const o=Ht(r),i=nt(o),{offset:l,...s}=Vt(r,n,{preserveWorldSpaceForPatternFill:!!i.hatchPattern});a.push(Kt(r.geometry,o,r,s,l))}}}),{lineBatches:e,meshBatches:a}}function Me(t,e){const a=t.extmin,r=t.extmax;return{title:e==null?void 0:e.title,extents:{minX:a.x,minY:a.y,maxX:r.x,maxY:r.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 Le(t,e,a,r,n){return Math.atan2(r-e,n*(a-t))}function qt(t){return t.z>=0?1:-1}function Ct(t,e,a){if(!(a.radius>0)||!Number.isFinite(a.radius))return;const r=a.clockwise?-1:1,n=a.center.x,o=a.center.y;t.push({kind:"arc",layer:e,cx:n,cy:o,r:a.radius,startAngle:Le(n,o,a.startPoint.x,a.startPoint.y,r),endAngle:Le(n,o,a.endPoint.x,a.endPoint.y,r),normalSign:r})}const Ur=1e6;function v(t,e){const a=new D(e.x,e.y,e.z??0).applyMatrix4(t);return{x:a.x,y:a.y}}function Dr(t){const e=t.elements;return new Yt(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 bt(t,e){return new Yt().multiplyMatrices(t,Dr(e))}function te(t,e){const a=new D(e.x,e.y,e.z??0).transformDirection(t).normalize();return{x:a.x,y:a.y}}function Et(t){const e=new D(t.elements[0],t.elements[1],t.elements[2]).length(),a=new D(t.elements[4],t.elements[5],t.elements[6]).length();return yt.equal(e,a,Ze*Math.max(e,a,1))}function Or(t,e){const a=t.tables.blockTable.getIdAt(e);if(a)return a;for(const n of t.tables.blockTable.newIterator())if(n.objectId===e)return n;const r=t.tables.blockTable.modelSpace;if(r.objectId===e)return r}function Er(t){if(t instanceof Ra)return!0;const e=t;return(e.type==="LINE"||e.type==="Line")&&e.startPoint!=null&&e.endPoint!=null}function Nr(t,e,a,r){N(t,e,a,r.startPoint,r.endPoint)}function Qe(t,e){return t.blockTableRecord??(t.blockName?e.tables.blockTable.getAt(t.blockName):void 0)}function Yr(t,e){const a=t.dimBlockId;return a?e.tables.blockTable.getAt(a):void 0}function Xr(t,e){const a=Qe(t,e);if(a)return a;const r=t.owningBlockRecordId;return r?e.tables.blockTable.getAt(r):void 0}function Ge(t){return t.getFullInsertionTransform()}function _r(t){for(const e of t.newIterator())return!0;return!1}function Qr(t){return typeof t.getFullInsertionTransform=="function"&&"blockTableRecord"in t}function N(t,e,a,r,n){const o=v(a,r),i=v(a,n),l={kind:"line",layer:e,x0:o.x,y0:o.y,x1:i.x,y1:i.y};t.push(l)}function ze(t,e,a,r,n,o){const i=v(a,r),l=te(a,n),s=Math.hypot(l.x,l.y)||1,d=l.x/s,c=l.y/s,u=Ur,p=o?i.x-d*u:i.x,m=o?i.y-c*u:i.y,y=i.x+d*u,x=i.y+c*u;t.push({kind:"line",layer:e,x0:p,y0:m,x1:y,y1:x})}function W(t,e,a,r,n){if(r.length<2)return;const o=n?r.length:r.length-1;for(let i=0;i<o;i++)N(t,e,a,r[i],r[(i+1)%r.length])}function Gr(t,e,a,r){const n=[r.startPosition];for(const o of r.segments)n.push(o.position);W(t,e,a,n,r.closed)}function Wr(t,e,a){if(a.vertices.length>=2)return a.vertices;if(a.vertices.length===0)return[];const r=a.vertices[0],n=e.lastLeaderLinePoint??e.landingPoint??t.landingPoint??t.contentBasePosition;if(!n)return a.vertices;const o=r.x-n.x,i=r.y-n.y,l=(r.z??0)-(n.z??0);return Math.hypot(o,i,l)<=Ze?a.vertices:[r,n]}function Jr(t,e,a,r){var n,o;for(const l of r.leaders)for(const s of l.leaderLines){const d=Wr(r,l,s);W(t,e,a,d,!1)}const i=l=>{if(!l)return;const s=v(a,l);t.push({kind:"point",layer:e,x:s.x,y:s.y})};i(r.contentBasePosition),i((n=r.mtextContent)==null?void 0:n.anchorPoint),i((o=r.blockContent)==null?void 0:o.position)}function Kr(t,e,a,r){const n=r.numberOfVertices;if(n<2)return;const o=r.elevation,i=r.closed?n:n-1;for(let l=0;l<i;l++){const s=r.getPointAt(l),d=r.getPointAt((l+1)%n),c=r.getBulgeAt(l),u={x:s.x,y:s.y,z:o},p={x:d.x,y:d.y,z:o};if(yt.isPositive(Math.abs(c))){const m=v(a,u),y=v(a,p);Ct(t,e,new ht(m,y,c))}else N(t,e,a,u,p)}}function qr(t,e,a,r,n,o){const i=v(a,r),l=new D(a.elements[0],a.elements[1],a.elements[2]).length(),s={kind:"circle",layer:e,cx:i.x,cy:i.y,r:n*l,normalSign:qt(o)};t.push(s)}function tn(t,e,a,r){const n=v(a,r.center),o=new D(a.elements[0],a.elements[1],a.elements[2]).length(),i={kind:"arc",layer:e,cx:n.x,cy:n.y,r:r.radius*o,startAngle:r.startAngle,endAngle:r.endAngle,normalSign:qt(r.normal)};t.push(i)}function jt(t,e,a,r){const n=v(a,r.center),o=r._geo,i=(o==null?void 0:o.majorAxis)??{x:1,y:0,z:0},l=te(a,i),s=Math.hypot(l.x,l.y)||1,d=new D(a.elements[0],a.elements[1],a.elements[2]).length(),c=new D(a.elements[4],a.elements[5],a.elements[6]).length(),u={kind:"ellipse",layer:e,cx:n.x,cy:n.y,majorX:l.x/s,majorY:l.y/s,majorR:r.majorAxisRadius*d,minorR:r.minorAxisRadius*c,startAngle:r.startAngle,endAngle:r.endAngle,closed:r.closed,normalSign:qt(r.normal)};t.push(u)}function en(t,e,a,r){var n,o;const i=r._geo;if(!((n=i==null?void 0:i.controlPoints)!=null&&n.length))return;const l=[];for(const d of i.controlPoints){const c=v(a,d);l.push(c.x,c.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 d of i.fitPoints){const c=v(a,d);s.fitPoints.push(c.x,c.y)}}t.push(s)}function an(t,e,a,r){var n;const o=(n=r._geo)==null?void 0:n.vertices,i=o&&o.length>1?o.map(d=>({x:d.x,y:d.y,bulge:d.bulge})):Array.from({length:r.numberOfVertices},(d,c)=>{const u=r.getPoint2dAt(c);return{x:u.x,y:u.y,bulge:0}}),l=i.length;if(l<2)return;const s=r.closed?l:l-1;for(let d=0;d<s;d++){const c=i[d],u=i[(d+1)%l],p=c.bulge??0;if(yt.isPositive(Math.abs(p))){const m=v(a,{x:c.x,y:c.y,z:0}),y=v(a,{x:u.x,y:u.y,z:0});Ct(t,e,new ht(m,y,p))}else N(t,e,a,{x:c.x,y:c.y,z:0},{x:u.x,y:u.y,z:0})}}function rn(t,e,a,r,n){if(Et(a)){const o=v(a,{x:r.startPoint.x,y:r.startPoint.y,z:n}),i=v(a,{x:r.endPoint.x,y:r.endPoint.y,z:n}),l=a.elements[0]*a.elements[5]-a.elements[4]*a.elements[1],s=(r.clockwise?-1:1)*Math.tan(r.deltaAngle/4)*(l<0?-1:1);Ct(t,e,new ht(o,i,s));return}N(t,e,a,{x:r.startPoint.x,y:r.startPoint.y,z:n},{x:r.endPoint.x,y:r.endPoint.y,z:n})}function nn(t,e,a,r,n){const o=v(a,{x:r.center.x,y:r.center.y,z:n}),i=te(a,{x:Math.cos(r.rotation),y:Math.sin(r.rotation),z:0}),l=Math.hypot(i.x,i.y)||1,s=new D(a.elements[0],a.elements[1],a.elements[2]).length(),d=new D(a.elements[4],a.elements[5],a.elements[6]).length();t.push({kind:"ellipse",layer:e,cx:o.x,cy:o.y,majorX:i.x/l,majorY:i.y/l,majorR:r.majorAxisRadius*s,minorR:r.minorAxisRadius*d,startAngle:r.startAngle,endAngle:r.endAngle,closed:!1,normalSign:r.clockwise?-1:1})}function on(t,e,a,r,n){var o;const i=r.numberOfVertices;if(i<2)return;const l=r.closed?i:i-1;for(let s=0;s<l;s++){const d=r.getPointAt(s),c=r.getPointAt((s+1)%i),u=((o=r.vertices[s])==null?void 0:o.bulge)??0,p={x:d.x,y:d.y,z:n},m={x:c.x,y:c.y,z:n};if(yt.isPositive(Math.abs(u))){const y=v(a,p),x=v(a,m);Ct(t,e,new ht(y,x,u))}else N(t,e,a,p,m)}}function ln(t,e,a,r,n){if(r instanceof Da){on(t,e,a,r,n);return}if(r instanceof Oa)for(const o of r.curves)o instanceof Ea?N(t,e,a,{x:o.startPoint.x,y:o.startPoint.y,z:n},{x:o.endPoint.x,y:o.endPoint.y,z:n}):o instanceof ht?rn(t,e,a,o,n):o instanceof Na&&nn(t,e,a,o,n)}function sn(t,e,a,r){var n;const o=(n=r._geo)==null?void 0:n.loops;if(!(o!=null&&o.length))return;const i=r.elevation;for(const l of o)ln(t,e,a,l,i)}function cn(t,e,a,r){const n=bt(a,Ge(r)),o=[0];for(let d=0;d<r.numColumns;d++)o.push(o[d]+r.columnWidth(d));const i=[0];for(let d=0;d<r.numRows;d++)i.push(i[d]-r.rowHeight(d));const l=o[o.length-1],s=i[i.length-1];for(const d of i)N(t,e,n,{x:0,y:d,z:0},{x:l,y:d,z:0});for(const d of o)N(t,e,n,{x:d,y:0,z:0},{x:d,y:s,z:0})}function dn(t,e,a,r,n,o,i){const l=Nt(t.layer,a);if(i&&!i(l))return;const s=Xr(t,o);if(s&&!n.has(s.objectId)&&_r(s)){n.add(s.objectId);const c=bt(e,Ge(t));xt(s,c,l,r,n,o,i),n.delete(s.objectId);return}cn(r,l,e,t);const d=v(e,t.position);r.push({kind:"point",layer:l,x:d.x,y:d.y})}function un(t,e,a,r){let n=r.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,a,n,!0);const o=v(a,r.position);t.push({kind:"point",layer:e,x:o.x,y:o.y})}function Nt(t,e){return t==="0"?e:t}function mn(t,e,a,r,n,o,i){if(!t.visibility)return;const l=Nt(t.layer,a);if(!(i&&!i(l))){if(t instanceof wa){dn(t,e,a,r,n,o,i);return}if(Qr(t)){const s=Qe(t,o);if(!s||n.has(s.objectId))return;n.add(s.objectId);const d=bt(e,t.getFullInsertionTransform()),c=Nt(t.layer,a);xt(s,d,c,r,n,o,i),n.delete(s.objectId);return}if(t instanceof ba){const s=t,d=Yr(s,o);if(!d||n.has(d.objectId))return;n.add(d.objectId);const c=bt(e,s.getFullDimBlockTransform());xt(d,c,l,r,n,o,i),n.delete(d.objectId);return}if(Er(t)){Nr(r,l,e,t);return}if(t instanceof xa){Et(e)?qr(r,l,e,t.center,t.radius,t.normal):jt(r,l,e,pn(t));return}if(t instanceof va){Et(e)?tn(r,l,e,t):jt(r,l,e,hn(t));return}if(t instanceof Xt){jt(r,l,e,t);return}if(t instanceof ya){en(r,l,e,t);return}if(t instanceof ka){an(r,l,e,t);return}if(t instanceof Ca){Kr(r,l,e,t);return}if(t instanceof Aa){const s=[];for(let d=0;d<t.numberOfVertices;d++)s.push(t.getPointAt(d));W(r,l,e,s,t.closed);return}if(t instanceof Ma){sn(r,l,e,t);return}if(t instanceof La){ze(r,l,e,t.basePoint,t.unitDir,!1);return}if(t instanceof za){ze(r,l,e,t.basePoint,t.unitDir,!0);return}if(t instanceof Pa){const s=[t.getPointAt(0),t.getPointAt(1),t.getPointAt(2),t.getPointAt(3)];W(r,l,e,s,!0);return}if(t instanceof Ia){const s=t.subGetGripPoints();s.length>=2&&W(r,l,e,s,s.length>=3);return}if(t instanceof $a){const s=t.vertices;s.length>=2&&W(r,l,e,s,!1);return}if(t instanceof Sa){Gr(r,l,e,t);return}if(t instanceof Ha){Jr(r,l,e,t);return}if(t instanceof Va){const s=v(e,t.position);r.push({kind:"point",layer:l,x:s.x,y:s.y});return}if(t instanceof ja){const s=v(e,t.location);r.push({kind:"point",layer:l,x:s.x,y:s.y});return}if(t instanceof Ba){un(r,l,e,t);return}if(t instanceof Fa){const s=v(e,t.position);r.push({kind:"point",layer:l,x:s.x,y:s.y})}}}function xt(t,e,a,r,n,o,i){for(const l of t.newIterator())mn(l,e,a,r,n,o,i)}function pn(t){return new Xt(t.center,t.normal,{x:1,y:0,z:0},t.radius,t.radius,0,Ua)}function hn(t){return new Xt(t.center,t.normal,{x:1,y:0,z:0},t.radius,t.radius,t.startAngle,t.endAngle)}function fn(t,e,a={}){const r=Or(t,e);if(!r)return{primitives:[]};const n=[],o=new Yt;return xt(r,o,"0",n,new Set,t,a.includeLayer),{primitives:n}}const We=["en","zh","cs","tr"],gn={en:"EN",zh:"中",cs:"CS",tr:"TR"};function wn(t){if(t==null||t==="")return null;const e=t.toLowerCase().replace("_","-");for(const a of We)if(e===a||e.startsWith(`${a}-`))return a;return null}const bn='<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>',xn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M10.4379 15.2979h.002l4.86-4.86-9.722-4.86 4.86 9.72Zm7.562-5.298-3.434 3.434 3.2 3.2-1.132 1.132-3.2-3.2-3.434 3.434-7.6-15.6 15.6 7.6Z"/></svg>',vn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M15.08 12.8537l.002-.002V5.5897c0-.422-.652-.414-.652 0v3.466c0 .938-1.482.95-1.482 0v-4.83c0-.414-.6381-.414-.6381 0h-.014v4.83c.014.95-1.482.95-1.482 0V3.4437c0-.42-.638-.414-.638 0v5.612c0 .95-1.494.95-1.494 0V4.2317c0-.408-.64-.42-.64 0v6.756c0 .802-1.094 1.088-1.494.388-.26-.446-.518-.892-.776-1.338-.338-.482-1.1-.15-.794.38.326.566.652 1.132.978 1.698.006.012.014.026.02.04.552.946 1.106 1.89 1.658 2.834.19.3.422.578.666.802h-.006c.672.61 1.528.964 2.418 1.052.888.06 1.7921-.124 2.5601-.612.3-.19.572-.416.816-.68.326-.368.57-.776.734-1.204.176-.482.258-.97.258-1.494Zm-.91-8.608-.004-.002c.958-.38 2.058.244 2.058 1.346v7.266c0 .652-.108 1.29-.332 1.894-.216.564-.53 1.114-.964 1.576-.318.34-.666.632-1.046.884-.978.612-2.1461.862-3.2601.774-1.128-.102-2.228-.564-3.098-1.352-.326-.292-.612-.646-.87-1.034-.558-.96-1.114-1.92-1.672-2.88l-.012-.028c-.326-.568-.652-1.138-.978-1.706-.59-1.018.068-2.186 1.156-2.336.536-.074 1.126.116 1.562.72.026.028.04.062.054.096.04.074.082.146.122.218V4.2337c0-1.176 1.244-1.788 2.202-1.278.42-1.278 2.378-1.264 2.792-.014.9721-.51 2.2221.102 2.2221 1.284v.06c.022-.014.046-.026.068-.04Z"/></svg>',yn='<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>',kn='<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>',An='<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>',Mn='<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 At(...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 Ln='<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>',zn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><rect x="2" y="2" width="8.2" height="5" rx="1.2" fill="currentColor"/><rect x="2" y="8.5" width="8.2" height="9.5" rx="1.2" fill="currentColor"/><rect x="11.7" y="2" width="6.3" height="10" rx="1.2" fill="currentColor"/><rect x="11.7" y="13.5" width="6.3" height="4.5" rx="1.2" fill="currentColor"/></svg>',Pn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M15.0833 14.8083c1.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-.6917C.8417 12.3667.9417 7.275 4.1083 4.1083 7.2667.9417 12.3667.8417 15.65 3.875s3.5917 8.1167.6917 11.525Zm-3.55-2.6083V7.2083H7.2083v5.5833h5.5833ZM5.875 5.875h8.25v8.25H5.875V5.875Z"/></svg>',In='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M10 2.6 18 9.8h-2.1V17h-4.4v-4.4H8.5V17H4.1V9.8H2L10 2.6Zm0 1.8L5.3 9.8V15.8h2V11.4h5.4v4.4h2V9.8L10 4.4Z"/></svg>',$n='<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>',Sn='<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>',Hn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M2.25 2.25h4.878v4.878H2.25V2.25Zm.978.978v2.924h2.924V3.228H3.228Z"/><path fill="currentColor" d="M5.175 20.773V7.128H4.204V21.75H21.75V4.204H7.128v.971H20.773v15.598H5.175Z"/></svg>',Vn='<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>',jn='<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>',Bn='<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>',Fn='<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>',Tn='<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>',Zn='<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>',Rn=At("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"),Un='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M10 2.2 17.2 17.6h-2.8l-1.45-4.2H7.05L5.6 17.6H2.8L10 2.2Zm0 4.3L8.2 11.2h3.6L10 6.5Z"/></svg>',Dn='<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>',On='<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>',En=At("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"),Nn=At("M624 475.968V640h144a128 128 0 0 1 128 128H128a128 128 0 0 1 128-128h144V475.968a192 192 0 1 1 224 0M128 896v-64h768v64z"),Pe=At("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"),Yn='<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>',Xn='<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>',h={select:xn,pan:vn,zoomExtent:bn,measureDistance:yn,measureAngle:kn,measureArc:Cn,measureArea:An,measureCoordinate:Mn,clearMeasurements:Pe,layer:Ln,layout:zn,zoomWindow:Pn,zoomOriginal:In,layerOn:$n,layerOff:Sn,osnap:Hn,orthoMode:Vn,polarTracking:jn,chevronUp:Bn,measure:Fn,annotation:Tn,markupCloud:Zn,markupCallout:Rn,markupText:Un,markupRect:Dn,markupCircle:On,markupArrow:En,markupStamp:Nn,markupImport:Yn,markupExport:Xn,markupShow:_n,clearMarkups:Pe};function g(t,e,a){const r=Object.entries(a).map(([n,o])=>`${n}="${Bt(o)}"`).join(" ");return`<button type="button" class="mlcad-tool-btn" title="${Bt(e)}" aria-label="${Bt(e)}" ${r}>${t}</button>`}function Bt(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<")}const Qn=[90,45,30,23,18,10,5];function Gn(){return'<button type="button" class="mlcad-tool-btn has-children" id="mlcad-lang-btn" aria-haspopup="true" aria-expanded="false" data-children-ui="toolbar" data-i18n-key="toolbar.language" data-i18n-attr="title aria-label" title="Language" aria-label="Language"><span class="mlcad-locale-option-badge" id="mlcad-lang-badge">EN</span></button>'}const Wn={en:"toolbar.localeEn",zh:"toolbar.localeZh",cs:"toolbar.localeCs",tr:"toolbar.localeTr"},Jn={en:"English",zh:"中文",cs:"Čeština",tr:"Türkçe"};function Kn(){return`<div id="mlcad-locale-strip-wrap" hidden>
|
|
2
|
+
<div id="mlcad-locale-strip" role="toolbar" data-i18n-attr="aria-label" data-i18n-key="toolbar.language" aria-label="Language">
|
|
3
|
+
${We.map(t=>{const e=Jn[t],a=Wn[t],r=gn[t];return`<button type="button" class="mlcad-tool-btn mlcad-locale-option" data-locale="${t}" data-i18n-key="${a}" data-i18n-attr="title aria-label" title="${e}" aria-label="${e}"><span class="mlcad-locale-option-badge">${r}</span></button>`}).join("")}
|
|
4
|
+
</div>
|
|
5
|
+
</div>`}function qn(){const t=Qn.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`
|
|
6
|
+
<div id="mlcad-snap-strip-wrap" hidden>
|
|
7
|
+
<div id="mlcad-snap-strip" role="toolbar" data-i18n-attr="aria-label" data-i18n-key="toolbar.snap" aria-label="Object snap">
|
|
8
|
+
${g(h.orthoMode,"Orthogonal mode",{id:"mlcad-ortho-btn","data-toggle":"ortho","data-i18n-key":"settings.ortho","data-i18n-attr":"title aria-label"})}
|
|
9
|
+
${g(h.polarTracking,"Polar tracking",{id:"mlcad-polar-btn","data-toggle":"polar","data-i18n-key":"settings.polar","data-i18n-attr":"title aria-label"})}
|
|
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 to=`
|
|
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
|
+
max-width: min(280px, calc(100vw - 24px));
|
|
118
|
+
max-height: min(360px, calc(100vh - 24px));
|
|
119
|
+
overflow-y: auto;
|
|
120
|
+
padding: 4px;
|
|
121
|
+
background: var(--mlcad-ui-bg-elevated);
|
|
122
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
123
|
+
border-radius: 8px;
|
|
124
|
+
box-shadow: var(--mlcad-shadow);
|
|
125
|
+
backdrop-filter: blur(12px);
|
|
126
|
+
}
|
|
127
|
+
.mlcad-dropdown-item {
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
gap: 8px;
|
|
131
|
+
width: 100%;
|
|
132
|
+
box-sizing: border-box;
|
|
133
|
+
margin: 0;
|
|
134
|
+
padding: 6px 8px;
|
|
135
|
+
border: none;
|
|
136
|
+
border-radius: 5px;
|
|
137
|
+
background: transparent;
|
|
138
|
+
color: var(--mlcad-ui-text);
|
|
139
|
+
font-size: 12px;
|
|
140
|
+
font-weight: 500;
|
|
141
|
+
text-align: left;
|
|
142
|
+
cursor: pointer;
|
|
143
|
+
}
|
|
144
|
+
.mlcad-dropdown-item:hover {
|
|
145
|
+
background: rgba(255, 255, 255, 0.08);
|
|
146
|
+
}
|
|
147
|
+
.mlcad-dropdown-item.active,
|
|
148
|
+
.mlcad-dropdown-item.is-toggled {
|
|
149
|
+
background: rgba(26, 140, 255, 0.22);
|
|
150
|
+
color: #fff;
|
|
151
|
+
}
|
|
152
|
+
.mlcad-dropdown-icon {
|
|
153
|
+
display: inline-flex;
|
|
154
|
+
width: 18px;
|
|
155
|
+
height: 18px;
|
|
156
|
+
flex-shrink: 0;
|
|
157
|
+
align-items: center;
|
|
158
|
+
justify-content: center;
|
|
159
|
+
}
|
|
160
|
+
.mlcad-dropdown-icon svg {
|
|
161
|
+
width: 18px;
|
|
162
|
+
height: 18px;
|
|
163
|
+
display: block;
|
|
164
|
+
}
|
|
165
|
+
.mlcad-dropdown-label {
|
|
166
|
+
overflow: hidden;
|
|
167
|
+
text-overflow: ellipsis;
|
|
168
|
+
white-space: nowrap;
|
|
169
|
+
}
|
|
170
|
+
.mlcad-dropdown-separator {
|
|
171
|
+
height: 1px;
|
|
172
|
+
margin: 4px 6px;
|
|
173
|
+
background: var(--mlcad-ui-border);
|
|
174
|
+
}
|
|
175
|
+
#mlcad-toolbar-toggle {
|
|
176
|
+
height: calc(var(--mlcad-toolbar-width) / 2);
|
|
177
|
+
margin-top: -4px;
|
|
178
|
+
margin-bottom: -4px;
|
|
179
|
+
border-radius: 4px;
|
|
180
|
+
}
|
|
181
|
+
#mlcad-toolbar-toggle svg {
|
|
182
|
+
width: calc(var(--mlcad-toolbar-width) / 2);
|
|
183
|
+
height: calc(var(--mlcad-toolbar-width) / 2);
|
|
184
|
+
}
|
|
185
|
+
.mlcad-tool-separator {
|
|
186
|
+
height: 1px;
|
|
187
|
+
margin: 4px 8px;
|
|
188
|
+
background: var(--mlcad-ui-border);
|
|
189
|
+
}
|
|
190
|
+
.mlcad-locale-option-badge {
|
|
191
|
+
font-size: 10px;
|
|
192
|
+
font-weight: 700;
|
|
193
|
+
line-height: 1;
|
|
194
|
+
}
|
|
195
|
+
#mlcad-lang-btn .mlcad-locale-option-badge {
|
|
196
|
+
font-size: 12px;
|
|
197
|
+
}
|
|
198
|
+
#mlcad-zoom-window-rect {
|
|
199
|
+
position: fixed;
|
|
200
|
+
z-index: 25;
|
|
201
|
+
box-sizing: border-box;
|
|
202
|
+
pointer-events: none;
|
|
203
|
+
border: 1px dashed var(--mlcad-accent, #08e8de);
|
|
204
|
+
background: rgba(8, 232, 222, 0.12);
|
|
205
|
+
}
|
|
206
|
+
#mlcad-zoom-window-rect[hidden] { display: none; }
|
|
207
|
+
|
|
208
|
+
#mlcad-layer-drawer {
|
|
209
|
+
flex-shrink: 1;
|
|
210
|
+
min-width: 0;
|
|
211
|
+
width: var(--mlcad-drawer-width);
|
|
212
|
+
max-height: min(420px, calc(100vh - 48px));
|
|
213
|
+
display: flex; flex-direction: column;
|
|
214
|
+
background: var(--mlcad-ui-bg-elevated);
|
|
215
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
216
|
+
border-radius: 8px;
|
|
217
|
+
box-shadow: var(--mlcad-shadow);
|
|
218
|
+
backdrop-filter: blur(12px);
|
|
219
|
+
overflow: hidden;
|
|
220
|
+
}
|
|
221
|
+
#mlcad-layer-drawer[hidden] { display: none; }
|
|
222
|
+
|
|
223
|
+
.mlcad-drawer-header {
|
|
224
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
225
|
+
gap: 6px; padding: 8px 10px;
|
|
226
|
+
border-bottom: 1px solid var(--mlcad-ui-border);
|
|
227
|
+
font-size: 13px; font-weight: 600;
|
|
228
|
+
}
|
|
229
|
+
.mlcad-drawer-close {
|
|
230
|
+
width: 28px; height: 28px; padding: 0;
|
|
231
|
+
border: none; border-radius: 4px;
|
|
232
|
+
background: transparent; color: var(--mlcad-ui-muted);
|
|
233
|
+
cursor: pointer; font-size: 18px; line-height: 1;
|
|
234
|
+
}
|
|
235
|
+
.mlcad-drawer-close:hover {
|
|
236
|
+
background: rgba(255, 255, 255, 0.08); color: var(--mlcad-ui-text);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.mlcad-layer-actions {
|
|
240
|
+
display: flex; gap: 4px; padding: 6px 8px;
|
|
241
|
+
border-bottom: 1px solid var(--mlcad-ui-border);
|
|
242
|
+
}
|
|
243
|
+
.mlcad-layer-action-btn {
|
|
244
|
+
flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
|
|
245
|
+
min-height: 30px; padding: 4px 8px;
|
|
246
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
247
|
+
border-radius: 5px;
|
|
248
|
+
background: rgba(255, 255, 255, 0.04);
|
|
249
|
+
color: var(--mlcad-ui-text);
|
|
250
|
+
font-size: 12px; cursor: pointer;
|
|
251
|
+
}
|
|
252
|
+
.mlcad-layer-action-btn:hover { background: rgba(255, 255, 255, 0.1); }
|
|
253
|
+
.mlcad-layer-action-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
|
|
254
|
+
|
|
255
|
+
#mlcad-layer-list {
|
|
256
|
+
flex: 1; overflow: auto; padding: 4px 0;
|
|
257
|
+
}
|
|
258
|
+
.mlcad-layer-item {
|
|
259
|
+
display: grid;
|
|
260
|
+
grid-template-columns: auto auto 1fr auto;
|
|
261
|
+
align-items: center; gap: 6px;
|
|
262
|
+
padding: 5px 8px;
|
|
263
|
+
font-size: 12px; cursor: pointer;
|
|
264
|
+
}
|
|
265
|
+
.mlcad-layer-item:hover { background: rgba(255, 255, 255, 0.05); }
|
|
266
|
+
.mlcad-layer-item input { margin: 0; cursor: pointer; }
|
|
267
|
+
.mlcad-layer-swatch {
|
|
268
|
+
width: 12px; height: 12px; border-radius: 2px;
|
|
269
|
+
border: 1px solid rgba(255, 255, 255, 0.28);
|
|
270
|
+
}
|
|
271
|
+
.mlcad-layer-name {
|
|
272
|
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
273
|
+
}
|
|
274
|
+
.mlcad-layer-zoom {
|
|
275
|
+
display: flex; align-items: center; justify-content: center;
|
|
276
|
+
width: 22px; height: 22px; padding: 0;
|
|
277
|
+
border: 1px solid transparent; border-radius: 4px;
|
|
278
|
+
background: transparent; color: var(--mlcad-ui-muted);
|
|
279
|
+
cursor: pointer;
|
|
280
|
+
}
|
|
281
|
+
.mlcad-layer-zoom svg {
|
|
282
|
+
width: 14px; height: 14px; display: block;
|
|
283
|
+
}
|
|
284
|
+
.mlcad-layer-zoom:hover:not(:disabled) {
|
|
285
|
+
color: var(--mlcad-accent);
|
|
286
|
+
border-color: var(--mlcad-ui-border);
|
|
287
|
+
background: rgba(255, 255, 255, 0.06);
|
|
288
|
+
}
|
|
289
|
+
.mlcad-layer-zoom:disabled { opacity: 0.35; cursor: not-allowed; }
|
|
290
|
+
|
|
291
|
+
#mlcad-status-bar {
|
|
292
|
+
position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: var(--mlcad-z-chrome);
|
|
293
|
+
display: flex; align-items: center; min-height: 28px; padding: 0 12px;
|
|
294
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
295
|
+
border-radius: 6px;
|
|
296
|
+
background: var(--mlcad-ui-bg);
|
|
297
|
+
color: var(--mlcad-ui-muted);
|
|
298
|
+
font-size: 12px;
|
|
299
|
+
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
|
|
300
|
+
backdrop-filter: blur(10px);
|
|
301
|
+
pointer-events: none;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-snap-strip-wrap,
|
|
305
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-measure-strip-wrap,
|
|
306
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-markup-strip-wrap,
|
|
307
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-zoom-strip-wrap,
|
|
308
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-locale-strip-wrap,
|
|
309
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-layer-drawer {
|
|
310
|
+
display: none !important;
|
|
311
|
+
}
|
|
312
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-toolbar .mlcad-tool-btn:not(#mlcad-toolbar-toggle) {
|
|
313
|
+
display: none;
|
|
314
|
+
}
|
|
315
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-toolbar .mlcad-tool-separator {
|
|
316
|
+
display: none;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
#mlcad-snap-strip-wrap,
|
|
320
|
+
#mlcad-measure-strip-wrap,
|
|
321
|
+
#mlcad-markup-strip-wrap,
|
|
322
|
+
#mlcad-zoom-strip-wrap,
|
|
323
|
+
#mlcad-locale-strip-wrap {
|
|
324
|
+
flex-shrink: 0;
|
|
325
|
+
min-width: 0;
|
|
326
|
+
display: flex;
|
|
327
|
+
flex-direction: row;
|
|
328
|
+
align-items: flex-start;
|
|
329
|
+
gap: var(--mlcad-drawer-gap);
|
|
330
|
+
}
|
|
331
|
+
#mlcad-snap-strip-wrap[hidden],
|
|
332
|
+
#mlcad-measure-strip-wrap[hidden],
|
|
333
|
+
#mlcad-markup-strip-wrap[hidden],
|
|
334
|
+
#mlcad-zoom-strip-wrap[hidden],
|
|
335
|
+
#mlcad-locale-strip-wrap[hidden] { display: none; }
|
|
336
|
+
|
|
337
|
+
#mlcad-snap-strip,
|
|
338
|
+
#mlcad-measure-strip,
|
|
339
|
+
#mlcad-markup-strip,
|
|
340
|
+
#mlcad-zoom-strip,
|
|
341
|
+
#mlcad-locale-strip {
|
|
342
|
+
flex-shrink: 0;
|
|
343
|
+
display: flex;
|
|
344
|
+
flex-direction: column;
|
|
345
|
+
align-items: stretch;
|
|
346
|
+
gap: 4px;
|
|
347
|
+
padding: 6px;
|
|
348
|
+
background: var(--mlcad-ui-bg);
|
|
349
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
350
|
+
border-radius: 8px;
|
|
351
|
+
box-shadow: var(--mlcad-shadow);
|
|
352
|
+
backdrop-filter: blur(12px);
|
|
353
|
+
}
|
|
354
|
+
#mlcad-measure-strip .mlcad-tool-separator,
|
|
355
|
+
#mlcad-markup-strip .mlcad-tool-separator {
|
|
356
|
+
margin: 2px 4px;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
#mlcad-polar-angles {
|
|
360
|
+
flex-shrink: 0;
|
|
361
|
+
display: inline-flex;
|
|
362
|
+
flex-direction: column;
|
|
363
|
+
align-items: stretch;
|
|
364
|
+
gap: 4px;
|
|
365
|
+
padding: 6px;
|
|
366
|
+
max-width: min(280px, calc(100vw - 2 * var(--mlcad-ui-inset) - 3 * var(--mlcad-toolbar-width) - 3 * var(--mlcad-drawer-gap)));
|
|
367
|
+
background: var(--mlcad-ui-bg);
|
|
368
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
369
|
+
border-radius: 8px;
|
|
370
|
+
box-shadow: var(--mlcad-shadow);
|
|
371
|
+
backdrop-filter: blur(12px);
|
|
372
|
+
}
|
|
373
|
+
#mlcad-polar-angles[hidden] { display: none; }
|
|
374
|
+
|
|
375
|
+
.mlcad-color-input {
|
|
376
|
+
position: absolute;
|
|
377
|
+
width: 0;
|
|
378
|
+
height: 0;
|
|
379
|
+
opacity: 0;
|
|
380
|
+
pointer-events: none;
|
|
381
|
+
}
|
|
382
|
+
.mlcad-settings-option-btn {
|
|
383
|
+
width: 100%;
|
|
384
|
+
box-sizing: border-box;
|
|
385
|
+
height: var(--mlcad-toolbar-width);
|
|
386
|
+
justify-content: flex-start;
|
|
387
|
+
gap: 8px;
|
|
388
|
+
padding: 0 10px;
|
|
389
|
+
font-size: 11px;
|
|
390
|
+
font-weight: 500;
|
|
391
|
+
}
|
|
392
|
+
.mlcad-settings-option-indicator {
|
|
393
|
+
flex-shrink: 0;
|
|
394
|
+
width: 10px;
|
|
395
|
+
height: 10px;
|
|
396
|
+
border: 1px solid var(--mlcad-ui-muted);
|
|
397
|
+
border-radius: 2px;
|
|
398
|
+
box-sizing: border-box;
|
|
399
|
+
transition: background 0.15s ease, border-color 0.15s ease;
|
|
400
|
+
}
|
|
401
|
+
.mlcad-settings-option-btn.active .mlcad-settings-option-indicator {
|
|
402
|
+
background: var(--mlcad-accent);
|
|
403
|
+
border-color: var(--mlcad-accent);
|
|
404
|
+
}
|
|
405
|
+
.mlcad-settings-option-text {
|
|
406
|
+
overflow: hidden;
|
|
407
|
+
text-overflow: ellipsis;
|
|
408
|
+
white-space: nowrap;
|
|
409
|
+
pointer-events: none;
|
|
410
|
+
line-height: 1.2;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
#mlcad-measure-overlays {
|
|
414
|
+
position: absolute;
|
|
415
|
+
inset: 0;
|
|
416
|
+
pointer-events: none;
|
|
417
|
+
z-index: var(--mlcad-z-measure);
|
|
418
|
+
overflow: hidden;
|
|
419
|
+
}
|
|
420
|
+
.mlcad-measure-canvas {
|
|
421
|
+
position: absolute;
|
|
422
|
+
left: 0;
|
|
423
|
+
top: 0;
|
|
424
|
+
pointer-events: none;
|
|
425
|
+
}
|
|
426
|
+
.mlcad-measure-dot {
|
|
427
|
+
position: absolute;
|
|
428
|
+
width: 10px;
|
|
429
|
+
height: 10px;
|
|
430
|
+
border-radius: 50%;
|
|
431
|
+
background: var(--mlcad-measure-accent);
|
|
432
|
+
border: 2px solid rgba(255, 255, 255, 0.9);
|
|
433
|
+
box-sizing: border-box;
|
|
434
|
+
transform: translate(-50%, -50%);
|
|
435
|
+
pointer-events: none;
|
|
436
|
+
}
|
|
437
|
+
.mlcad-measure-badge {
|
|
438
|
+
position: absolute;
|
|
439
|
+
padding: 3px 10px;
|
|
440
|
+
border-radius: 14px;
|
|
441
|
+
background: var(--mlcad-ui-bg-elevated);
|
|
442
|
+
border: 1px solid var(--mlcad-measure-accent-border);
|
|
443
|
+
color: var(--mlcad-measure-accent);
|
|
444
|
+
font-size: 12px;
|
|
445
|
+
font-weight: 600;
|
|
446
|
+
white-space: nowrap;
|
|
447
|
+
transform: translate(-50%, -50%);
|
|
448
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
|
|
449
|
+
pointer-events: none;
|
|
450
|
+
}
|
|
451
|
+
.mlcad-measure-badge--coordinate {
|
|
452
|
+
transform: translate(-50%, calc(-50% - 16px));
|
|
453
|
+
}
|
|
454
|
+
.mlcad-measure-dot.mlcad-measure-selected {
|
|
455
|
+
box-shadow:
|
|
456
|
+
0 0 0 2px rgba(255, 213, 79, 0.75),
|
|
457
|
+
0 0 10px rgba(255, 213, 79, 0.95),
|
|
458
|
+
0 0 18px rgba(255, 213, 79, 0.55);
|
|
459
|
+
}
|
|
460
|
+
.mlcad-measure-badge.mlcad-measure-selected {
|
|
461
|
+
outline: 2px solid rgba(255, 213, 79, 0.85);
|
|
462
|
+
outline-offset: 1px;
|
|
463
|
+
box-shadow:
|
|
464
|
+
0 0 0 2px rgba(255, 213, 79, 0.4),
|
|
465
|
+
0 0 12px rgba(255, 213, 79, 0.75),
|
|
466
|
+
0 2px 8px rgba(0, 0, 0, 0.35);
|
|
467
|
+
}
|
|
468
|
+
.mlcad-measure-canvas.mlcad-measure-selected {
|
|
469
|
+
filter:
|
|
470
|
+
drop-shadow(0 0 1.5px #ffd54f)
|
|
471
|
+
drop-shadow(0 0 4px rgba(255, 213, 79, 0.95))
|
|
472
|
+
drop-shadow(0 0 8px rgba(255, 213, 79, 0.55));
|
|
473
|
+
}
|
|
474
|
+
.mlcad-measure-live-label {
|
|
475
|
+
position: absolute;
|
|
476
|
+
pointer-events: none;
|
|
477
|
+
color: var(--mlcad-measure-accent);
|
|
478
|
+
font-size: 12px;
|
|
479
|
+
font-weight: 600;
|
|
480
|
+
text-shadow: 0 0 4px #000, 0 1px 3px #000;
|
|
481
|
+
transform: translate(-50%, -120%);
|
|
482
|
+
display: none;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
#mlcad-markup-overlays {
|
|
486
|
+
position: absolute;
|
|
487
|
+
inset: 0;
|
|
488
|
+
pointer-events: none;
|
|
489
|
+
z-index: var(--mlcad-z-markup);
|
|
490
|
+
overflow: hidden;
|
|
491
|
+
}
|
|
492
|
+
.mlcad-markup-canvas {
|
|
493
|
+
position: absolute;
|
|
494
|
+
left: 0;
|
|
495
|
+
top: 0;
|
|
496
|
+
pointer-events: none;
|
|
497
|
+
}
|
|
498
|
+
.mlcad-markup-badge,
|
|
499
|
+
.mlcad-markup-stamp {
|
|
500
|
+
position: absolute;
|
|
501
|
+
padding: 3px 10px;
|
|
502
|
+
border-radius: 14px;
|
|
503
|
+
background: var(--mlcad-ui-bg-elevated);
|
|
504
|
+
border: 1px solid var(--mlcad-markup-accent-border);
|
|
505
|
+
color: var(--mlcad-markup-accent);
|
|
506
|
+
font-size: 12px;
|
|
507
|
+
font-weight: 600;
|
|
508
|
+
white-space: pre-wrap;
|
|
509
|
+
max-width: 240px;
|
|
510
|
+
min-width: 80px;
|
|
511
|
+
min-height: 1.75em;
|
|
512
|
+
box-sizing: border-box;
|
|
513
|
+
transform: translate(-50%, -50%);
|
|
514
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
|
|
515
|
+
pointer-events: auto;
|
|
516
|
+
cursor: grab;
|
|
517
|
+
touch-action: none;
|
|
518
|
+
user-select: none;
|
|
519
|
+
}
|
|
520
|
+
.mlcad-markup-stamp {
|
|
521
|
+
border-radius: 4px;
|
|
522
|
+
border-width: 2px;
|
|
523
|
+
text-transform: uppercase;
|
|
524
|
+
letter-spacing: 0.04em;
|
|
525
|
+
font-size: 11px;
|
|
526
|
+
white-space: nowrap;
|
|
527
|
+
min-width: 0;
|
|
528
|
+
}
|
|
529
|
+
.mlcad-markup-dot {
|
|
530
|
+
position: absolute;
|
|
531
|
+
width: 10px;
|
|
532
|
+
height: 10px;
|
|
533
|
+
border-radius: 50%;
|
|
534
|
+
background: var(--mlcad-markup-accent);
|
|
535
|
+
border: 2px solid rgba(255, 255, 255, 0.9);
|
|
536
|
+
box-sizing: border-box;
|
|
537
|
+
transform: translate(-50%, -50%);
|
|
538
|
+
pointer-events: auto;
|
|
539
|
+
cursor: grab;
|
|
540
|
+
touch-action: none;
|
|
541
|
+
}
|
|
542
|
+
.mlcad-markup-dot.mlcad-markup-selected {
|
|
543
|
+
box-shadow:
|
|
544
|
+
0 0 0 2px rgba(255, 213, 79, 0.75),
|
|
545
|
+
0 0 10px rgba(255, 213, 79, 0.95),
|
|
546
|
+
0 0 18px rgba(255, 213, 79, 0.55);
|
|
547
|
+
}
|
|
548
|
+
.mlcad-markup-badge.mlcad-markup-selected,
|
|
549
|
+
.mlcad-markup-stamp.mlcad-markup-selected {
|
|
550
|
+
outline: 2px solid rgba(255, 213, 79, 0.85);
|
|
551
|
+
outline-offset: 1px;
|
|
552
|
+
box-shadow:
|
|
553
|
+
0 0 0 2px rgba(255, 213, 79, 0.4),
|
|
554
|
+
0 0 12px rgba(255, 213, 79, 0.75),
|
|
555
|
+
0 2px 8px rgba(0, 0, 0, 0.35);
|
|
556
|
+
}
|
|
557
|
+
.mlcad-markup-canvas.mlcad-markup-selected {
|
|
558
|
+
filter:
|
|
559
|
+
drop-shadow(0 0 1.5px #ffd54f)
|
|
560
|
+
drop-shadow(0 0 4px rgba(255, 213, 79, 0.95))
|
|
561
|
+
drop-shadow(0 0 8px rgba(255, 213, 79, 0.55));
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
#mlcad-loading {
|
|
565
|
+
position: fixed; inset: 0; z-index: 100;
|
|
566
|
+
display: flex; align-items: center; justify-content: center;
|
|
567
|
+
background: #121418;
|
|
568
|
+
transition: opacity 0.35s ease, visibility 0.35s ease;
|
|
569
|
+
}
|
|
570
|
+
#mlcad-loading.mlcad-loading--done {
|
|
571
|
+
opacity: 0; visibility: hidden; pointer-events: none;
|
|
572
|
+
}
|
|
573
|
+
.mlcad-loading-spinner {
|
|
574
|
+
width: 48px; height: 48px; box-sizing: border-box;
|
|
575
|
+
border: 3px solid rgba(255, 255, 255, 0.12);
|
|
576
|
+
border-top-color: var(--mlcad-accent);
|
|
577
|
+
border-radius: 50%;
|
|
578
|
+
animation: mlcad-spin 0.85s linear infinite;
|
|
579
|
+
}
|
|
580
|
+
@keyframes mlcad-spin { to { transform: rotate(360deg); } }
|
|
581
|
+
|
|
582
|
+
@media (max-width: ${na}px) {
|
|
583
|
+
:root {
|
|
584
|
+
--mlcad-drawer-width: min(200px, calc(100vw - 2 * var(--mlcad-ui-inset) - var(--mlcad-toolbar-width) - var(--mlcad-drawer-gap)));
|
|
585
|
+
--mlcad-ui-inset: 8px;
|
|
586
|
+
}
|
|
587
|
+
#mlcad-sidebar {
|
|
588
|
+
left: var(--mlcad-ui-inset);
|
|
589
|
+
right: var(--mlcad-ui-inset);
|
|
590
|
+
width: auto;
|
|
591
|
+
}
|
|
592
|
+
#mlcad-layer-drawer {
|
|
593
|
+
margin-left: auto;
|
|
594
|
+
max-width: calc(100vw - 2 * var(--mlcad-ui-inset) - var(--mlcad-toolbar-width) - var(--mlcad-drawer-gap));
|
|
595
|
+
}
|
|
596
|
+
.mlcad-layer-action-btn {
|
|
597
|
+
min-height: 28px;
|
|
598
|
+
padding: 3px 6px;
|
|
599
|
+
font-size: 11px;
|
|
600
|
+
gap: 4px;
|
|
601
|
+
}
|
|
602
|
+
.mlcad-layer-action-btn svg { width: 12px; height: 12px; }
|
|
603
|
+
.mlcad-layer-zoom {
|
|
604
|
+
width: 20px;
|
|
605
|
+
height: 20px;
|
|
606
|
+
}
|
|
607
|
+
.mlcad-layer-zoom svg {
|
|
608
|
+
width: 12px;
|
|
609
|
+
height: 12px;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
`;function eo(t,e="measure",a=!0){const r=e==="measure"?oo():"",n=e==="measure"?io():"",o=e==="measure"?co():"",i=Gn(),l="",s=`${no()}${e==="measure"?`${lo()}${so()}${qn()}`:""}${Kn()}`;return`
|
|
613
|
+
<div id="mlcad-loading" aria-hidden="true" style="background:${t}">
|
|
614
|
+
<div class="mlcad-loading-spinner"></div>
|
|
615
|
+
</div>
|
|
616
|
+
<div id="mlcad-root">
|
|
617
|
+
<aside id="mlcad-sidebar">
|
|
618
|
+
<nav id="mlcad-toolbar" data-i18n-attr="aria-label" data-i18n-key="toolbar.viewerTools" aria-label="Viewer tools">
|
|
619
|
+
${g(h.select,"Select",{"data-action":"select","aria-pressed":"false","data-i18n-key":"toolbar.select","data-i18n-attr":"title aria-label"})}
|
|
620
|
+
${g(h.pan,"Pan",{"data-action":"pan","aria-pressed":"true","data-i18n-key":"toolbar.pan","data-i18n-attr":"title aria-label"})}
|
|
621
|
+
${ro()}
|
|
622
|
+
${e==="measure"?vt():""}
|
|
623
|
+
${r}
|
|
624
|
+
${n}
|
|
625
|
+
${e==="measure"?vt():""}
|
|
626
|
+
${g(h.layer,"Layers",{id:"mlcad-layers-btn","aria-haspopup":"dialog","aria-expanded":"false","data-i18n-key":"toolbar.layers","data-i18n-attr":"title aria-label"})}
|
|
627
|
+
${a?ao():""}
|
|
628
|
+
${o}
|
|
629
|
+
${i}
|
|
630
|
+
${g(h.chevronUp,"Collapse toolbar",{id:"mlcad-toolbar-toggle","aria-expanded":"true","data-i18n-key":"toolbar.collapse","data-i18n-attr":"title aria-label"})}
|
|
631
|
+
</nav>
|
|
632
|
+
${s}
|
|
633
|
+
<div id="mlcad-layer-drawer" role="dialog" data-i18n-attr="aria-label" data-i18n-key="layers.title" aria-label="Layers" hidden>
|
|
634
|
+
<div class="mlcad-drawer-header">
|
|
635
|
+
<span data-i18n-key="layers.title" data-i18n-text>Layers</span>
|
|
636
|
+
<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>
|
|
637
|
+
</div>
|
|
638
|
+
<div class="mlcad-layer-actions">
|
|
639
|
+
<button type="button" class="mlcad-layer-action-btn" id="mlcad-layer-show-all">
|
|
640
|
+
${h.layerOn}<span data-i18n-key="layers.showAll" data-i18n-text>Show all</span>
|
|
641
|
+
</button>
|
|
642
|
+
<button type="button" class="mlcad-layer-action-btn" id="mlcad-layer-hide-all">
|
|
643
|
+
${h.layerOff}<span data-i18n-key="layers.hideAll" data-i18n-text>Hide all</span>
|
|
644
|
+
</button>
|
|
645
|
+
</div>
|
|
646
|
+
<div id="mlcad-layer-list"></div>
|
|
647
|
+
</div>
|
|
648
|
+
</aside>
|
|
649
|
+
<footer id="mlcad-status-bar" aria-live="polite"></footer>
|
|
650
|
+
</div>
|
|
651
|
+
${l}`}function vt(){return'<div class="mlcad-tool-separator" aria-hidden="true"></div>'}function ao(){return g(h.layout,"Layout",{id:"mlcad-layout-menu-btn","aria-haspopup":"menu","aria-expanded":"false","data-action":"layout-menu","data-i18n-key":"toolbar.layout","data-i18n-attr":"title aria-label","data-children-ui":"menu"}).replace('class="mlcad-tool-btn"','class="mlcad-tool-btn has-children"')}function ro(){return g(h.zoomExtent,"Zoom",{id:"mlcad-zoom-menu-btn","aria-haspopup":"true","aria-expanded":"false","data-action":"zoom-menu","data-i18n-key":"toolbar.zoom","data-i18n-attr":"title aria-label","data-children-ui":"toolbar"}).replace('class="mlcad-tool-btn"','class="mlcad-tool-btn has-children"')}function no(){return`<div id="mlcad-zoom-strip-wrap" hidden>
|
|
652
|
+
<div id="mlcad-zoom-strip" role="toolbar" data-i18n-attr="aria-label" data-i18n-key="toolbar.zoom" aria-label="Zoom">
|
|
653
|
+
${g(h.zoomExtent,"Zoom extents",{"data-action":"fit","data-i18n-key":"toolbar.zoomExtents","data-i18n-attr":"title aria-label"})}
|
|
654
|
+
${g(h.zoomWindow,"Zoom window",{"data-action":"zoom-window","aria-pressed":"false","data-i18n-key":"toolbar.zoomWindow","data-i18n-attr":"title aria-label"})}
|
|
655
|
+
${g(h.zoomOriginal,"Original view",{"data-action":"zoom-original","data-i18n-key":"toolbar.zoomOriginal","data-i18n-attr":"title aria-label"})}
|
|
656
|
+
</div>
|
|
657
|
+
</div>`}function oo(){return g(h.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","data-children-ui":"sticky-toolbar"}).replace('class="mlcad-tool-btn"','class="mlcad-tool-btn has-children"')}function io(){return g(h.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","data-children-ui":"sticky-toolbar"}).replace('class="mlcad-tool-btn"','class="mlcad-tool-btn has-children"')}function lo(){return`<div id="mlcad-measure-strip-wrap" hidden>
|
|
658
|
+
<div id="mlcad-measure-strip" role="toolbar" data-i18n-attr="aria-label" data-i18n-key="toolbar.measure" aria-label="Measurement">
|
|
659
|
+
${g(h.measureDistance,"Measure distance",{"data-action":"measure","data-measure-mode":"distance","data-i18n-key":"toolbar.measureDistance","data-i18n-attr":"title aria-label"})}
|
|
660
|
+
${g(h.measureAngle,"Measure angle",{"data-action":"measure","data-measure-mode":"angle","data-i18n-key":"toolbar.measureAngle","data-i18n-attr":"title aria-label"})}
|
|
661
|
+
${g(h.measureArc,"Measure arc length",{"data-action":"measure","data-measure-mode":"arc","data-i18n-key":"toolbar.measureArc","data-i18n-attr":"title aria-label"})}
|
|
662
|
+
${g(h.measureArea,"Measure area",{"data-action":"measure","data-measure-mode":"area","data-i18n-key":"toolbar.measureArea","data-i18n-attr":"title aria-label"})}
|
|
663
|
+
${g(h.measureCoordinate,"Measure coordinates",{"data-action":"measure","data-measure-mode":"coordinate","data-i18n-key":"toolbar.measureCoordinate","data-i18n-attr":"title aria-label"})}
|
|
664
|
+
${g(h.markupShow,"Hide measurements",{"data-action":"measure-visibility","data-i18n-key":"toolbar.measureHide","data-i18n-attr":"title aria-label"})}
|
|
665
|
+
${g(h.clearMeasurements,"Clear measurements",{"data-action":"clear-measurements","data-i18n-key":"toolbar.clearMeasurements","data-i18n-attr":"title aria-label"})}
|
|
666
|
+
${vt()}
|
|
667
|
+
${g(h.markupImport,"Import measurements",{"data-action":"measure-import","data-i18n-key":"toolbar.measureImport","data-i18n-attr":"title aria-label"})}
|
|
668
|
+
${g(h.markupExport,"Export measurements",{"data-action":"measure-export","data-i18n-key":"toolbar.measureExport","data-i18n-attr":"title aria-label"})}
|
|
669
|
+
</div>
|
|
670
|
+
</div>`}function so(){return`<div id="mlcad-markup-strip-wrap" hidden>
|
|
671
|
+
<div id="mlcad-markup-strip" role="toolbar" data-i18n-attr="aria-label" data-i18n-key="toolbar.annotation" aria-label="Review">
|
|
672
|
+
${g(h.markupCloud,"Cloud",{"data-action":"markup","data-markup-mode":"cloud","data-i18n-key":"toolbar.markupCloud","data-i18n-attr":"title aria-label"})}
|
|
673
|
+
${g(h.markupCallout,"Callout",{"data-action":"markup","data-markup-mode":"callout","data-i18n-key":"toolbar.markupCallout","data-i18n-attr":"title aria-label"})}
|
|
674
|
+
${g(h.markupText,"Text",{"data-action":"markup","data-markup-mode":"text","data-i18n-key":"toolbar.markupText","data-i18n-attr":"title aria-label"})}
|
|
675
|
+
${g(h.markupRect,"Rectangle",{"data-action":"markup","data-markup-mode":"rect","data-i18n-key":"toolbar.markupRect","data-i18n-attr":"title aria-label"})}
|
|
676
|
+
${g(h.markupCircle,"Circle",{"data-action":"markup","data-markup-mode":"circle","data-i18n-key":"toolbar.markupCircle","data-i18n-attr":"title aria-label"})}
|
|
677
|
+
${g(h.markupArrow,"Arrow",{"data-action":"markup","data-markup-mode":"arrow","data-i18n-key":"toolbar.markupArrow","data-i18n-attr":"title aria-label"})}
|
|
678
|
+
${g(h.markupStamp,"Stamp",{"data-action":"markup","data-markup-mode":"stamp","data-i18n-key":"toolbar.markupStamp","data-i18n-attr":"title aria-label"})}
|
|
679
|
+
${g(h.markupShow,"Hide markups",{"data-action":"markup-visibility","data-i18n-key":"toolbar.markupHide","data-i18n-attr":"title aria-label"})}
|
|
680
|
+
${g(h.clearMarkups,"Clear markups",{"data-action":"clear-markups","data-i18n-key":"toolbar.clearMarkups","data-i18n-attr":"title aria-label"})}
|
|
681
|
+
${vt()}
|
|
682
|
+
${g(h.markupImport,"Import markups",{"data-action":"markup-import","data-i18n-key":"toolbar.markupImport","data-i18n-attr":"title aria-label"})}
|
|
683
|
+
${g(h.markupExport,"Export markups",{"data-action":"markup-export","data-i18n-key":"toolbar.markupExport","data-i18n-attr":"title aria-label"})}
|
|
684
|
+
</div>
|
|
685
|
+
</div>`}function co(){return g(h.osnap,"Object snap",{id:"mlcad-snap-menu-btn","aria-haspopup":"true","aria-expanded":"false","data-action":"snap-menu","data-i18n-key":"toolbar.snap","data-i18n-attr":"title aria-label","data-children-ui":"sticky-toolbar"}).replace('class="mlcad-tool-btn"','class="mlcad-tool-btn has-children"')}function Ie(t,e){const a=e.title??t.meta.title??"CAD Drawing",r=gr(t),n=e.viewerRuntime,o=wr(),i=r.compression,l=`#${t.meta.background.toString(16).padStart(6,"0")}`,s=wn(t.meta.locale)??"en",d=t.meta.viewerMode??"measure",c=t.meta.exportLayouts!==!1;return`<!DOCTYPE html>
|
|
686
|
+
<html lang="${s}">
|
|
687
|
+
<head>
|
|
688
|
+
<meta charset="utf-8" />
|
|
689
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
690
|
+
<meta name="generator" content="mlightcad-cad-html-plugin" />
|
|
691
|
+
<title>${uo(a)}</title>
|
|
692
|
+
<style>${to}</style>
|
|
693
|
+
</head>
|
|
694
|
+
<body>
|
|
695
|
+
${eo(l,d,c)}
|
|
696
|
+
<script id="mlcad-snapshot" type="${o}+${i};base64">${r.payload}<\/script>
|
|
697
|
+
<script>${mo(n)}<\/script>
|
|
698
|
+
</body>
|
|
699
|
+
</html>`}function uo(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function mo(t){return t.replace(/<\/script/gi,"<\\/script")}const po=400;function rt(t={}){return{exportInvisibleLayers:t.exportInvisibleLayers!==!1,exportLayouts:t.exportLayouts!==!1,initialView:t.initialView??"fit",viewerMode:t.viewerMode??"measure"}}function ho(t){const e=t.activeLayoutView,a=e.center,r=e.trCamera.zoom,n=Math.max(e.height,1),o=r*(2*po)/n;return{centerX:a.x,centerY:a.y,zoom:o}}const fo="./viewer-runtime.iife.js";let pt={};function go(t){pt={...pt,...t}}function wo(){return{...pt}}function bo(t){return t!=null?String(t):pt.viewerRuntimeUrl!=null?String(pt.viewerRuntimeUrl):fo}function xo(){return{minX:0,minY:0,maxX:0,maxY:0,valid:!1}}function vo(t,e,a){if(e.length<3)return;const r=a[0],n=a[1];for(let o=0;o+2<e.length;o+=3){const i=Ce(e[o],r),l=Ce(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 $e(t,e){vo(t,e.positions,e.offset)}function yo(t){return t.valid?{minX:t.minX,minY:t.minY,maxX:t.maxX,maxY:t.maxY}:null}function ko(t,e){const a=xo();for(const r of t)$e(a,r);for(const r of e)$e(a,r);return yo(a)}function Je(t,e){return t?e?{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}:t:e??null}function Co(t){if(!t||t.length===0)return null;let e=null;for(const a of t)e=Je(e,a.paper);return e}function Ao(t){return Je(ko(t.lineBatches,t.meshBatches),Co(t.viewports))}function Mo(t,e,a){if(a)return;const r=Lo(t,e);if(!(r!=null&&r.newIterator))return;const n=[];for(const o of r.newIterator()){if(!(o instanceof ma)||pa.isDefaultPaperSpaceViewport(o)||typeof o.toGiViewport!="function")continue;const i=o.toGiViewport(),l=i.box,s=i.viewBox,d=Se(l),c=Se(s);if(!d||!c)continue;const u=Number.isFinite(i.viewTwistAngle)?i.viewTwistAngle:o.viewTwistAngle;n.push(Number.isFinite(u)&&Math.abs(u)>1e-12?{paper:d,model:c,twist:u}:{paper:d,model:c})}return n.length>0?n:void 0}function Se(t){if(typeof t.isEmpty=="function"&&t.isEmpty())return;const e=t.min.x,a=t.min.y,r=t.max.x,n=t.max.y;if(!(!Number.isFinite(e)||!Number.isFinite(a)||!Number.isFinite(r)||!Number.isFinite(n)||r-e<=0||n-a<=0))return{minX:e,minY:a,maxX:r,maxY:n}}function Lo(t,e){var a;const r=(a=t.tables)==null?void 0:a.blockTable;if(!r)return;const n=typeof r.getIdAt=="function"?r.getIdAt(e):void 0;if(n)return n;if(typeof r.newIterator=="function"){for(const i of r.newIterator())if(i.objectId===e)return i}const o=r.modelSpace;if((o==null?void 0:o.objectId)===e)return o}class zo{build(e,a,r={}){return this.buildSync(e,a,r)}async buildAsync(e,a,r={}){await U();const n=r.exportInvisibleLayers!==!1,o=r.exportLayouts!==!1,i=n?void 0:m=>ft(e,m,n),l=Me(a,{title:r.title,background:r.background}),s=[];e.layers.forEach(m=>{ft(e,m.name,n)&&s.push({name:m.name,color:m.color.RGB??16777215,visible:!m.isOff&&!m.isFrozen})});const d=Ve(a),c=new Map(d.map(m=>[m.blockTableRecordId,m.name])),u=Be(e,o),p=[];for(const m of je(e,d,o))p.push(Fe(e,a,m,c,r,i)),await U();return{version:ut,meta:He(l,r,p,u),layers:s,layouts:p,activeLayoutBtrId:u}}buildSync(e,a,r){const n=r.exportInvisibleLayers!==!1,o=r.exportLayouts!==!1,i=n?void 0:m=>ft(e,m,n),l=Me(a,{title:r.title,background:r.background}),s=[];e.layers.forEach(m=>{ft(e,m.name,n)&&s.push({name:m.name,color:m.color.RGB??16777215,visible:!m.isOff&&!m.isFrozen})});const d=Ve(a),c=new Map(d.map(m=>[m.blockTableRecordId,m.name])),u=Be(e,o),p=[];for(const m of je(e,d,o))p.push(Fe(e,a,m,c,r,i));return{version:ut,meta:He(l,r,p,u),layers:s,layouts:p,activeLayoutBtrId:u}}}function He(t,e,a,r){const n=a.find(l=>l.btrId===r)??a[0],o=n?Ao(n):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??k.currentLocale,initialView:i,viewState:i==="current"?e.viewState:void 0,viewerMode:e.viewerMode??"measure",exportLayouts:e.exportLayouts!==!1}}function Po(t){return(t.viewerMode??"measure")==="measure"}function ft(t,e,a){if(a)return!0;const r=t.layers.get(e);return r?!r.isOff&&!r.isFrozen:!0}function Ve(t){var e;const a=(e=t.objects)==null?void 0:e.layout;if(!(a!=null&&a.newIterator))return[];const r=[];for(const n of a.newIterator()){const o=n.blockTableRecordId;o&&r.push({name:n.layoutName||o,tabOrder:n.tabOrder??0,blockTableRecordId:o})}return r.sort((n,o)=>n.tabOrder-o.tabOrder),r}function je(t,e,a){if(!a)return t.modelSpaceBtrId?[t.modelSpaceBtrId]:[];const r=new Set,n=[];for(const o of e)r.has(o.blockTableRecordId)||(r.add(o.blockTableRecordId),n.push(o.blockTableRecordId));for(const o of t.layouts.keys())r.has(o)||(r.add(o),n.push(o));return n}function Be(t,e){return e&&t.activeLayoutBtrId||t.modelSpaceBtrId}function Fe(t,e,a,r,n,o){const i=[],l=[],s=t.layouts.get(a);if(s)for(const[,c]of s.layers){if(o&&!o(c.name))continue;const u=Rr(c.internalObject);i.push(...u.lineBatches),l.push(...u.meshBatches)}const d=a===t.modelSpaceBtrId;return{btrId:a,name:r.get(a)??Io(e,a),isModelSpace:d,lineBatches:i,meshBatches:l,osnap:Po(n)?fn(e,a,{includeLayer:o}):void 0,viewports:Mo(e,a,d)}}function Io(t,e){var a;const r=(a=t.tables)==null?void 0:a.blockTable;if(r!=null&&r.newIterator){for(const n of r.newIterator())if(n.objectId===e)return n.name}return e}class $o{constructor(e={}){this.options=e,this._snapshotBuilder=new zo}async prepareAcTrView2dForHtmlExport(e,a={}){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 ea))throw new Error("HTML export requires a 2D CAD view. Open a drawing before exporting.");const r=rt(a),n={includeInvisibleLayers:r.exportInvisibleLayers,includeLayouts:r.exportLayouts};return await e.ensureEntitiesConvertedForExport(n),await U(),e}async convert(e,a={},r){const n=ct.instance,o=rt(a);await n.withBusyIndicator(async()=>{await U();const i=n.curDocument,l=await this.prepareAcTrView2dForHtmlExport(r??n.curView,o),s=e||i.fileName||i.docTitle,d=await this._snapshotBuilder.buildAsync(l.cadScene,i.database,{title:aa(s),background:l.backgroundColor,exportInvisibleLayers:o.exportInvisibleLayers,exportLayouts:o.exportLayouts,initialView:o.initialView,viewerMode:o.viewerMode,viewState:o.initialView==="current"&&(o.exportLayouts||l.activeLayoutBtrId===l.modelSpaceBtrId)?ho(l):void 0});await U();const c=await this.loadViewerRuntime();await U();const u=Ie(d,{title:d.meta.title,viewerRuntime:c});await U(),this.downloadHtml(u,ra(s,"html"))})}async packSnapshot(e,a){await ct.instance.withBusyIndicator(async()=>{await U();const r=await this.loadViewerRuntime();await U();const n=Ie(e,{title:e.meta.title,viewerRuntime:r});await U(),this.downloadHtml(n,a)})}async loadViewerRuntime(){const e=bo(this.options.viewerRuntimeUrl),a=await fetch(e);if(!a.ok)throw new Error(`Failed to load HTML viewer runtime from "${e}" (${a.status}). Install @mlightcad/cad-html-plugin, copy viewer-runtime.iife.js to your app assets, and set viewerRuntimeUrl on registerLazyHtmlPlugin / createHtmlPlugin / AcApHtmlConvertor.`);return a.text()}downloadHtml(e,a){const r=new Blob([e],{type:"text/html;charset=utf-8"}),n=URL.createObjectURL(r),o=document.createElement("a");o.href=n,o.download=a,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.setTimeout(()=>URL.revokeObjectURL(n),6e4)}}class So extends ta{constructor(e={}){super(),this.pluginOptions=e}async execute(e){const a=await this.promptOptions();a&&await new $o(this.pluginOptions).convert(e.doc.fileName||e.doc.docTitle,a,e.view)}async promptOptions(){const e=rt(),a=await this.promptYesNo("jig.chtml.exportInvisibleLayers",e.exportInvisibleLayers);if(a===void 0)return;const r=await this.promptYesNo("jig.chtml.exportLayouts",e.exportLayouts);if(r===void 0)return;const n=await this.promptInitialView();if(n===void 0)return;const o=await this.promptViewerMode();if(o!==void 0)return rt({exportInvisibleLayers:a,exportLayouts:r,initialView:n,viewerMode:o})}async promptYesNo(e,a){const r=new It(k.t(e));r.allowNone=!0;const n=r.keywords.add(k.t("jig.chtml.keywords.yes.display"),k.t("jig.chtml.keywords.yes.global"),k.t("jig.chtml.keywords.yes.local")),o=r.keywords.add(k.t("jig.chtml.keywords.no.display"),k.t("jig.chtml.keywords.no.global"),k.t("jig.chtml.keywords.no.local"));r.keywords.default=a?n:o;const i=await ct.instance.editor.getKeywords(r);if(i.status!==S.Cancel){if(i.status===S.None)return a;if(i.status===S.OK||i.status===S.Keyword)return i.stringResult?i.stringResult==="Yes":a}}async promptInitialView(){const e=rt(),a=new It(k.t("jig.chtml.initialView"));a.allowNone=!0;const r=a.keywords.add(k.t("jig.chtml.keywords.extents.display"),k.t("jig.chtml.keywords.extents.global"),k.t("jig.chtml.keywords.extents.local")),n=a.keywords.add(k.t("jig.chtml.keywords.current.display"),k.t("jig.chtml.keywords.current.global"),k.t("jig.chtml.keywords.current.local"));a.keywords.default=e.initialView==="current"?n:r;const o=await ct.instance.editor.getKeywords(a);if(o.status!==S.Cancel){if(o.status===S.None)return e.initialView;if(o.status===S.OK||o.status===S.Keyword)return o.stringResult?o.stringResult==="Current"?"current":"fit":e.initialView}}async promptViewerMode(){const e=rt(),a=new It(k.t("jig.chtml.viewerMode"));a.allowNone=!0;const r=a.keywords.add(k.t("jig.chtml.keywords.view.display"),k.t("jig.chtml.keywords.view.global"),k.t("jig.chtml.keywords.view.local")),n=a.keywords.add(k.t("jig.chtml.keywords.measure.display"),k.t("jig.chtml.keywords.measure.global"),k.t("jig.chtml.keywords.measure.local"));a.keywords.default=e.viewerMode==="view"?r:n;const o=await ct.instance.editor.getKeywords(a);if(o.status!==S.Cancel){if(o.status===S.None)return e.viewerMode;if(o.status===S.OK||o.status===S.Keyword)return o.stringResult?o.stringResult==="View"?"view":"measure":e.viewerMode}}}const Ho="1.6.2",Vo={version:Ho};class jo{constructor(e={}){this.options=e,this.name="HtmlPlugin",this.version=Vo.version,this.description="HTML export (-chtml) command",this.registeredCommands=[]}onLoad(e,a){const r=qe.SYSTEMT_COMMAND_GROUP_NAME,n=new So(this.options);a.addCommand(r,"-chtml","-chtml",n),this.registeredCommands.push({group:r,name:"-chtml"}),a.lookupGlobalCmd("chtml")||(a.addCommand(r,"chtml","chtml",n),this.registeredCommands.push({group:r,name:"chtml"}))}onUnload(e,a){for(const r of this.registeredCommands)a.removeCmd(r.group,r.name);this.registeredCommands=[]}}async function Fo(t={}){return t.viewerRuntimeUrl!=null&&go(t),new jo(wo())}export{ir as ACEX_SNAPSHOT_COMPRESSION,ut as ACEX_SNAPSHOT_VERSION,So as AcApExportHtmlCmd,$o as AcApHtmlConvertor,zo as AcApHtmlSnapshotBuilder,fo as DEFAULT_HTML_VIEWER_RUNTIME_URL,Ro as HTML_PLUGIN_NAME,Uo as HTML_PLUGIN_TRIGGERS,fn as buildOsnapCatalog,Me as buildViewerMetadata,ho as captureAcApHtmlViewState,Rr as collectBatchesFromObject3D,lr as compressSnapshotBinary,go as configureHtmlPlugin,Fo as createHtmlPlugin,gr as encodeSnapshot,dr as encodeSnapshotBinary,$r as exportActiveBatchedLine2Slice,Jt as exportActiveBatchedSlice,Ae as exportBufferGeometrySlice,wo as getHtmlPluginOptions,Ve as listDatabaseLayouts,Ie as packHtml,rt as resolveAcApHtmlExportOptions,wn as resolveAcExHtmlLocale,bo as resolveViewerRuntimeUrl,wr as snapshotMimeType};
|