@flyfish-group/file-viewer 1.0.16 → 1.0.18

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.
Files changed (201) hide show
  1. package/README.md +17 -16
  2. package/dist/components/3MFLoader.js +1 -1
  3. package/dist/components/AMFLoader.js +1 -1
  4. package/dist/components/AudioViewer.js +1 -1
  5. package/dist/components/CadViewer.js +1 -1
  6. package/dist/components/CodeViewer.js +1 -1
  7. package/dist/components/ColladaLoader.js +1 -1
  8. package/dist/components/DrawingViewer.js +1 -1
  9. package/dist/components/EdaViewer.js +1 -1
  10. package/dist/components/EmailViewer.js +1 -1
  11. package/dist/components/EpubViewer.js +1 -1
  12. package/dist/components/FBXLoader.js +1 -1
  13. package/dist/components/GLTFLoader.js +1 -1
  14. package/dist/components/ImageViewer.js +1 -1
  15. package/dist/components/KMZLoader.js +1 -1
  16. package/dist/components/MarkdownViewer.js +1 -1
  17. package/dist/components/OBJLoader.js +1 -1
  18. package/dist/components/OfdViewer.js +1 -1
  19. package/dist/components/PCDLoader.js +1 -1
  20. package/dist/components/PLYLoader.js +1 -1
  21. package/dist/components/PdfView.js +3595 -3564
  22. package/dist/components/STLLoader.js +1 -1
  23. package/dist/components/TDSLoader.js +1 -1
  24. package/dist/components/USDLoader.js +1 -1
  25. package/dist/components/UmdViewer.js +2 -2
  26. package/dist/components/VRMLLoader.js +1 -1
  27. package/dist/components/VTKLoader.js +1 -1
  28. package/dist/components/XYZLoader.js +1 -1
  29. package/dist/components/XlsxTable.js +1 -1
  30. package/dist/components/___vite-browser-external_commonjs-proxy.js +1 -1
  31. package/dist/components/_commonjs-dynamic-modules.js +1 -1
  32. package/dist/components/_commonjsHelpers.js +1 -1
  33. package/dist/components/ar-SA-G6X2FPQ2.js +1 -1
  34. package/dist/components/arc.js +1 -1
  35. package/dist/components/architecture-7EHR7CIX.js +1 -1
  36. package/dist/components/architectureDiagram-3BPJPVTR.js +1 -1
  37. package/dist/components/az-AZ-76LH7QW2.js +1 -1
  38. package/dist/components/bg-BG-XCXSNQG7.js +1 -1
  39. package/dist/components/blockDiagram-GPEHLZMM.js +1 -1
  40. package/dist/components/bn-BD-2XOGV67Q.js +1 -1
  41. package/dist/components/c4Diagram-AAUBKEIU.js +1 -1
  42. package/dist/components/ca-ES-6MX7JW3Y.js +1 -1
  43. package/dist/components/cfb.js +1 -1
  44. package/dist/components/channel.js +1 -1
  45. package/dist/components/chunk-2J33WTMH.js +1 -1
  46. package/dist/components/chunk-4BX2VUAB.js +1 -1
  47. package/dist/components/chunk-55IACEB6.js +1 -1
  48. package/dist/components/chunk-727SXJPM.js +1 -1
  49. package/dist/components/chunk-AQP2D5EJ.js +1 -1
  50. package/dist/components/chunk-FMBD7UC4.js +1 -1
  51. package/dist/components/chunk-ND2GUHAM.js +1 -1
  52. package/dist/components/chunk-QZHKN3VN.js +1 -1
  53. package/dist/components/classDiagram-4FO5ZUOK.js +1 -1
  54. package/dist/components/classDiagram-v2-Q7XG4LA2.js +1 -1
  55. package/dist/components/cose-bilkent-S5V4N54A.js +1 -1
  56. package/dist/components/cs-CZ-2BRQDIVT.js +1 -1
  57. package/dist/components/cytoscape.esm.js +1 -1
  58. package/dist/components/da-DK-5WZEPLOC.js +1 -1
  59. package/dist/components/dagre-BM42HDAG.js +1 -1
  60. package/dist/components/de-DE-XR44H4JA.js +1 -1
  61. package/dist/components/defaultLocale.js +1 -1
  62. package/dist/components/diagram-2AECGRRQ.js +1 -1
  63. package/dist/components/diagram-5GNKFQAL.js +1 -1
  64. package/dist/components/diagram-KO2AKTUF.js +1 -1
  65. package/dist/components/diagram-LMA3HP47.js +1 -1
  66. package/dist/components/diagram-OG6HWLK6.js +1 -1
  67. package/dist/components/directory-open-01563666.js +1 -1
  68. package/dist/components/directory-open-4ed118d0.js +1 -1
  69. package/dist/components/docx-preview.js +2 -2
  70. package/dist/components/el-GR-BZB4AONW.js +1 -1
  71. package/dist/components/en-B4ZKOASM.js +1 -1
  72. package/dist/components/erDiagram-TEJ5UH35.js +1 -1
  73. package/dist/components/es-ES-U4NZUMDT.js +1 -1
  74. package/dist/components/eu-ES-A7QVB2H4.js +1 -1
  75. package/dist/components/eventmodeling-FCH6USID.js +1 -1
  76. package/dist/components/fa-IR-HGAKTJCU.js +1 -1
  77. package/dist/components/fflate.module.js +1 -1
  78. package/dist/components/fi-FI-Z5N7JZ37.js +1 -1
  79. package/dist/components/file-open-002ab408.js +1 -1
  80. package/dist/components/file-open-7c801643.js +1 -1
  81. package/dist/components/file-save-3189631c.js +1 -1
  82. package/dist/components/file-save-745eba88.js +1 -1
  83. package/dist/components/flowDiagram-I6XJVG4X.js +1 -1
  84. package/dist/components/fr-FR-RHASNOE6.js +1 -1
  85. package/dist/components/ganttDiagram-6RSMTGT7.js +1 -1
  86. package/dist/components/gitGraph-WXDBUCRP.js +1 -1
  87. package/dist/components/gitGraphDiagram-PVQCEYII.js +1 -1
  88. package/dist/components/gl-ES-HMX3MZ6V.js +1 -1
  89. package/dist/components/graph.js +1 -1
  90. package/dist/components/he-IL-6SHJWFNN.js +1 -1
  91. package/dist/components/hi-IN-IWLTKZ5I.js +1 -1
  92. package/dist/components/hu-HU-A5ZG7DT2.js +1 -1
  93. package/dist/components/id-ID-SAP4L64H.js +1 -1
  94. package/dist/components/image-GAAHSSAO.js +1 -1
  95. package/dist/components/image-blob-reduce.esm.js +1 -1
  96. package/dist/components/index10.js +1 -1
  97. package/dist/components/index11.js +1 -1
  98. package/dist/components/index12.js +1 -1
  99. package/dist/components/index13.js +1 -1
  100. package/dist/components/index14.js +1 -1
  101. package/dist/components/index15.js +1 -1
  102. package/dist/components/index16.js +1 -1
  103. package/dist/components/index17.js +1 -1
  104. package/dist/components/index18.js +1 -1
  105. package/dist/components/index19.js +1 -1
  106. package/dist/components/index2.js +1 -1
  107. package/dist/components/index20.js +1 -1
  108. package/dist/components/index21.js +2 -2
  109. package/dist/components/index22.js +1 -1
  110. package/dist/components/index23.js +1 -1
  111. package/dist/components/index24.js +1 -1
  112. package/dist/components/index3.js +1 -1
  113. package/dist/components/index4.js +1 -1
  114. package/dist/components/index5.js +1 -1
  115. package/dist/components/index6.js +1 -1
  116. package/dist/components/index7.js +1 -1
  117. package/dist/components/index8.js +1 -1
  118. package/dist/components/index9.js +1 -1
  119. package/dist/components/info-J43DQDTF.js +1 -1
  120. package/dist/components/infoDiagram-5YYISTIA.js +1 -1
  121. package/dist/components/init.js +1 -1
  122. package/dist/components/ishikawaDiagram-YF4QCWOH.js +1 -1
  123. package/dist/components/it-IT-JPQ66NNP.js +1 -1
  124. package/dist/components/ja-JP-DBVTYXUO.js +1 -1
  125. package/dist/components/journeyDiagram-JHISSGLW.js +1 -1
  126. package/dist/components/jszip.min.js +1 -1
  127. package/dist/components/kaa-6HZHGXH3.js +1 -1
  128. package/dist/components/kab-KAB-ZGHBKWFO.js +1 -1
  129. package/dist/components/kanban-definition-UN3LZRKU.js +1 -1
  130. package/dist/components/katex.js +1 -1
  131. package/dist/components/kk-KZ-P5N5QNE5.js +1 -1
  132. package/dist/components/km-KH-HSX4SM5Z.js +1 -1
  133. package/dist/components/ko-KR-MTYHY66A.js +1 -1
  134. package/dist/components/ku-TR-6OUDTVRD.js +1 -1
  135. package/dist/components/layout.js +1 -1
  136. package/dist/components/libarchive.js +1 -1
  137. package/dist/components/linear.js +1 -1
  138. package/dist/components/lt-LT-XHIRWOB4.js +1 -1
  139. package/dist/components/lv-LV-5QDEKY6T.js +1 -1
  140. package/dist/components/mermaid-parser.core.js +2 -2
  141. package/dist/components/mindmap-definition-RKZ34NQL.js +1 -1
  142. package/dist/components/mr-IN-CRQNXWMA.js +1 -1
  143. package/dist/components/my-MM-5M5IBNSE.js +1 -1
  144. package/dist/components/nb-NO-T6EIAALU.js +1 -1
  145. package/dist/components/nestedRender.js +1 -1
  146. package/dist/components/nl-NL-IS3SIHDZ.js +1 -1
  147. package/dist/components/nn-NO-6E72VCQL.js +1 -1
  148. package/dist/components/oc-FR-POXYY2M6.js +1 -1
  149. package/dist/components/ofd.js +1 -1
  150. package/dist/components/ordinal.js +1 -1
  151. package/dist/components/pa-IN-N4M65BXN.js +1 -1
  152. package/dist/components/packet-YPE3B663.js +1 -1
  153. package/dist/components/percentages-BXMCSKIN.js +1 -1
  154. package/dist/components/pica.js +1 -1
  155. package/dist/components/pie-LRSECV5Y.js +1 -1
  156. package/dist/components/pie.js +1 -1
  157. package/dist/components/pieDiagram-4H26LBE5.js +1 -1
  158. package/dist/components/pl-PL-T2D74RX3.js +1 -1
  159. package/dist/components/postal-mime.js +1 -1
  160. package/dist/components/pt-BR-5N22H2LF.js +1 -1
  161. package/dist/components/pt-PT-UZXXM6DQ.js +1 -1
  162. package/dist/components/quadrantDiagram-W4KKPZXB.js +1 -1
  163. package/dist/components/radar-GUYGQ44K.js +1 -1
  164. package/dist/components/requirementDiagram-4Y6WPE33.js +1 -1
  165. package/dist/components/ro-RO-JPDTUUEW.js +1 -1
  166. package/dist/components/rough.esm.js +1 -1
  167. package/dist/components/roundRect.js +1 -1
  168. package/dist/components/ru-RU-B4JR7IUQ.js +1 -1
  169. package/dist/components/sankeyDiagram-5OEKKPKP.js +1 -1
  170. package/dist/components/sequenceDiagram-3UESZ5HK.js +1 -1
  171. package/dist/components/si-LK-N5RQ5JYF.js +1 -1
  172. package/dist/components/sk-SK-C5VTKIMK.js +1 -1
  173. package/dist/components/sl-SI-NN7IZMDC.js +1 -1
  174. package/dist/components/stateDiagram-AJRCARHV.js +1 -1
  175. package/dist/components/stateDiagram-v2-BHNVJYJU.js +1 -1
  176. package/dist/components/subset-shared.chunk.js +1 -1
  177. package/dist/components/subset-worker.chunk.js +1 -1
  178. package/dist/components/sv-SE-XGPEYMSR.js +1 -1
  179. package/dist/components/ta-IN-2NMHFXQM.js +1 -1
  180. package/dist/components/th-TH-HPSO5L25.js +1 -1
  181. package/dist/components/time.js +1 -1
  182. package/dist/components/timeline-definition-PNZ67QCA.js +1 -1
  183. package/dist/components/tr-TR-DEFEU3FU.js +1 -1
  184. package/dist/components/transform.js +1 -1
  185. package/dist/components/treeView-BLDUP644.js +1 -1
  186. package/dist/components/treemap-LRROVOQU.js +1 -1
  187. package/dist/components/uk-UA-QMV73CPH.js +1 -1
  188. package/dist/components/vennDiagram-CIIHVFJN.js +1 -1
  189. package/dist/components/vi-VN-M7AON7JQ.js +1 -1
  190. package/dist/components/wardley-L42UT6IY.js +1 -1
  191. package/dist/components/wardleyDiagram-YWT4CUSO.js +1 -1
  192. package/dist/components/worker-ref.js +1 -1
  193. package/dist/components/xychartDiagram-2RQKCTM6.js +1 -1
  194. package/dist/components/zh-CN-LNUGB5OW.js +1 -1
  195. package/dist/components/zh-HK-E62DVLB3.js +1 -1
  196. package/dist/components/zh-TW-RAJ6MFWO.js +1 -1
  197. package/dist/index.d.ts +82 -1
  198. package/dist/index.mjs +1 -1
  199. package/dist/package/index.d.ts +1 -1
  200. package/dist/style.css +3 -3
  201. package/package.json +8 -1
@@ -1 +1 @@
1
- const aW=b;(function(c,d){const aS=b,e=c();while(!![]){try{const f=-parseInt(aS(0x2b4))/0x1+-parseInt(aS(0x201))/0x2+-parseInt(aS(0x21c))/0x3+-parseInt(aS(0x2f6))/0x4*(parseInt(aS(0x1d4))/0x5)+-parseInt(aS(0x1cf))/0x6*(-parseInt(aS(0x2e7))/0x7)+parseInt(aS(0x2cf))/0x8*(-parseInt(aS(0x1e5))/0x9)+parseInt(aS(0x2d3))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x9019d));function Pe(g,k,m=0x0,p=g['length']-0x1,v=De){for(;p>m;){if(p-m>0x258){const A=p-m+0x1,C=k-m+0x1,D=Math['log'](A),F=0.5*Math['exp'](0x2*D/0x3),I=0.5*Math['sqrt'](D*F*(A-F)/A)*(C-A/0x2<0x0?-0x1:0x1),L=Math['max'](m,Math['floor'](k-C*F/A+I)),M=Math['min'](p,Math['floor'](k+(A-C)*F/A+I));Pe(g,k,L,M,v);}const w=g[k];let x=m,z=p;for(_(g,m,k),v(g[p],w)>0x0&&_(g,m,p);x<z;){for(_(g,x,z),x++,z--;v(g[x],w)<0x0;)x++;for(;v(g[z],w)>0x0;)z--;}v(g[m],w)===0x0?_(g,m,z):(z++,_(g,z,p)),z<=k&&(m=z+0x1),k<=z&&(p=z-0x1);}}function _(c,d,f){const g=c[d];c[d]=c[f],c[f]=g;}function De(c,d){return c<d?-0x1:c>d?0x1:0x0;}class Le{constructor(c=0x9){const aT=b;this[aT(0x27a)]=Math['max'](0x4,c),this['_minEntries']=Math['max'](0x2,Math['ceil'](this[aT(0x27a)]*0.4)),this['clear']();}['all'](){const aU=b;return this[aU(0x2bb)](this['data'],[]);}['search'](d){const aV=b;let e=this['data'];const f=[];if(!G(d,e))return f;const g=this['toBBox'],h=[];for(;e;){for(let k=0x0;k<e['children'][aV(0x1d0)];k++){const l=e['children'][k],m=e[aV(0x2db)]?g(l):l;G(d,m)&&(e['leaf']?f['push'](l):te(d,m)?this['_all'](l,f):h['push'](l));}e=h['pop']();}return f;}[aW(0x2e4)](c){const aX=aW;let d=this['data'];if(!G(c,d))return!0x1;const e=[];for(;d;){for(let f=0x0;f<d[aX(0x1ab)]['length'];f++){const g=d['children'][f],h=d['leaf']?this['toBBox'](g):g;if(G(c,h)){if(d['leaf']||te(c,h))return!0x0;e['push'](g);}}d=e['pop']();}return!0x1;}[aW(0x1ae)](c){const aY=aW;if(!(c&&c['length']))return this;if(c['length']<this[aY(0x25e)]){for(let e=0x0;e<c[aY(0x1d0)];e++)this['insert'](c[e]);return this;}let d=this[aY(0x23b)](c['slice'](),0x0,c[aY(0x1d0)]-0x1,0x0);if(!this['data']['children']['length'])this[aY(0x228)]=d;else{if(this['data']['height']===d['height'])this['_splitRoot'](this['data'],d);else{if(this['data']['height']<d['height']){const f=this[aY(0x228)];this[aY(0x228)]=d,d=f;}this['_insert'](d,this['data']['height']-d['height']-0x1,!0x0);}}return this;}['insert'](c){const aZ=aW;return c&&this[aZ(0x268)](c,this['data'][aZ(0x2ea)]-0x1),this;}['clear'](){return this['data']=O([]),this;}['remove'](d,e){const b0=aW;if(!d)return this;let f=this[b0(0x228)];const g=this['toBBox'](d),k=[],m=[];let p,u,v;for(;f||k[b0(0x1d0)];){if(f||(f=k[b0(0x1fb)](),u=k[k['length']-0x1],p=m['pop'](),v=!0x0),f['leaf']){const w=Ne(d,f['children'],e);if(w!==-0x1)return f[b0(0x1ab)]['splice'](w,0x1),k['push'](f),this[b0(0x2b5)](k),this;}!v&&!f['leaf']&&te(f,g)?(k['push'](f),m['push'](p),p=0x0,u=f,f=f['children'][0x0]):u?(p++,f=u['children'][p],v=!0x1):f=null;}return this;}['toBBox'](c){return c;}[aW(0x28c)](c,d){const b1=aW;return c[b1(0x2d4)]-d[b1(0x2d4)];}['compareMinY'](c,d){return c['minY']-d['minY'];}['toJSON'](){return this['data'];}['fromJSON'](c){const b2=aW;return this[b2(0x228)]=c,this;}['_all'](c,d){const e=[];for(;c;)c['leaf']?d['push'](...c['children']):e['push'](...c['children']),c=e['pop']();return d;}['_build'](e,g,k,m){const b3=aW,p=k-g+0x1;let v=this['_maxEntries'],w;if(p<=v)return w=O(e['slice'](g,k+0x1)),R(w,this['toBBox']),w;m||(m=Math['ceil'](Math['log'](p)/Math[b3(0x2e3)](v)),v=Math['ceil'](p/Math['pow'](v,m-0x1))),w=O([]),w[b3(0x2db)]=!0x1,w['height']=m;const x=Math[b3(0x243)](p/v),z=x*Math['ceil'](Math['sqrt'](v));de(e,g,k,z,this['compareMinX']);for(let A=g;A<=k;A+=z){const C=Math['min'](A+z-0x1,k);de(e,A,C,x,this['compareMinY']);for(let D=A;D<=C;D+=x){const F=Math['min'](D+x-0x1,C);w['children'][b3(0x234)](this['_build'](e,D,F,m-0x1));}}return R(w,this['toBBox']),w;}[aW(0x294)](d,e,f,g){for(;g['push'](e),!(e['leaf']||g['length']-0x1===f);){let k=0x1/0x0,m=0x1/0x0,p;for(let v=0x0;v<e['children']['length'];v++){const w=e['children'][v],x=ee(w),z=Ye(d,w)-x;z<m?(m=z,k=x<k?x:k,p=w):z===m&&x<k&&(k=x,p=w);}e=p||e['children'][0x0];}return e;}[aW(0x268)](c,d,e){const b4=aW,f=e?c:this['toBBox'](c),g=[],h=this['_chooseSubtree'](f,this['data'],d,g);for(h['children']['push'](c),j(h,f);d>=0x0&&g[d]['children'][b4(0x1d0)]>this[b4(0x27a)];)this['_split'](g,d),d--;this[b4(0x2e2)](f,g,d);}['_split'](c,d){const b5=aW,e=c[d],f=e['children'][b5(0x1d0)],g=this['_minEntries'];this[b5(0x230)](e,g,f);const h=this['_chooseSplitIndex'](e,g,f),k=O(e['children']['splice'](h,e['children']['length']-h));k['height']=e['height'],k['leaf']=e['leaf'],R(e,this[b5(0x2d8)]),R(k,this['toBBox']),d?c[d-0x1][b5(0x1ab)]['push'](k):this['_splitRoot'](e,k);}['_splitRoot'](c,d){const b6=aW;this['data']=O([c,d]),this['data']['height']=c[b6(0x2ea)]+0x1,this['data'][b6(0x2db)]=!0x1,R(this[b6(0x228)],this['toBBox']);}['_chooseSplitIndex'](d,e,f){let g,k=0x1/0x0,m=0x1/0x0;for(let p=e;p<=f-e;p++){const v=$(d,0x0,p,this['toBBox']),w=$(d,p,f,this['toBBox']),x=ze(v,w),z=ee(v)+ee(w);x<k?(k=x,g=p,m=z<m?z:m):x===k&&z<m&&(m=z,g=p);}return g||f-e;}['_chooseSplitAxis'](c,d,e){const b7=aW,f=c['leaf']?this['compareMinX']:Be,g=c[b7(0x2db)]?this['compareMinY']:Xe,h=this['_allDistMargin'](c,d,e,f),k=this['_allDistMargin'](c,d,e,g);h<k&&c['children']['sort'](f);}['_allDistMargin'](d,e,f,g){const b8=aW;d['children'][b8(0x298)](g);const k=this['toBBox'],m=$(d,0x0,e,k),p=$(d,f-e,f,k);let u=U(m)+U(p);for(let v=e;v<f-e;v++){const w=d[b8(0x1ab)][v];j(m,d['leaf']?k(w):w),u+=U(m);}for(let x=f-e-0x1;x>=e;x--){const z=d['children'][x];j(p,d['leaf']?k(z):z),u+=U(p);}return u;}[aW(0x2e2)](c,d,e){for(let f=e;f>=0x0;f--)j(d[f],c);}['_condense'](c){const b9=aW;for(let d=c['length']-0x1,e;d>=0x0;d--)c[d]['children']['length']===0x0?d>0x0?(e=c[d-0x1]['children'],e['splice'](e[b9(0x1b1)](c[d]),0x1)):this['clear']():R(c[d],this['toBBox']);}}function Ne(c,d,f){const bb=aW;if(!f)return d[bb(0x1b1)](c);for(let g=0x0;g<d['length'];g++)if(f(c,d[g]))return g;return-0x1;}function R(c,d){$(c,0x0,c['children']['length'],d,c);}function $(c,d,f,g,h){const bc=aW;h||(h=O(null)),h['minX']=0x1/0x0,h[bc(0x2a8)]=0x1/0x0,h['maxX']=-0x1/0x0,h['maxY']=-0x1/0x0;for(let k=d;k<f;k++){const l=c['children'][k];j(h,c['leaf']?g(l):l);}return h;}function j(c,d){const bd=aW;return c[bd(0x2d4)]=Math['min'](c['minX'],d['minX']),c['minY']=Math[bd(0x229)](c['minY'],d['minY']),c['maxX']=Math[bd(0x2a3)](c['maxX'],d['maxX']),c['maxY']=Math['max'](c['maxY'],d[bd(0x269)]),c;}function Be(c,d){return c['minX']-d['minX'];}function Xe(c,d){return c['minY']-d['minY'];}function ee(c){const bf=aW;return(c['maxX']-c['minX'])*(c[bf(0x269)]-c['minY']);}function U(c){return c['maxX']-c['minX']+(c['maxY']-c['minY']);}function Ye(c,d){const bg=aW;return(Math['max'](d['maxX'],c['maxX'])-Math[bg(0x229)](d['minX'],c[bg(0x2d4)]))*(Math['max'](d['maxY'],c['maxY'])-Math['min'](d[bg(0x2a8)],c['minY']));}function ze(c,d){const bh=aW,f=Math[bh(0x2a3)](c[bh(0x2d4)],d['minX']),g=Math['max'](c['minY'],d['minY']),h=Math[bh(0x229)](c['maxX'],d['maxX']),i=Math[bh(0x229)](c['maxY'],d['maxY']);return Math['max'](0x0,h-f)*Math['max'](0x0,i-g);}function te(c,d){const bi=aW;return c[bi(0x2d4)]<=d[bi(0x2d4)]&&c['minY']<=d['minY']&&d['maxX']<=c['maxX']&&d['maxY']<=c['maxY'];}function G(c,d){const bj=aW;return d[bj(0x2d4)]<=c['maxX']&&d['minY']<=c['maxY']&&d['maxX']>=c['minX']&&d['maxY']>=c[bj(0x2a8)];}function O(c){return{'children':c,'height':0x1,'leaf':!0x0,'minX':0x1/0x0,'minY':0x1/0x0,'maxX':-0x1/0x0,'maxY':-0x1/0x0};}function de(c,d,f,g,h){const k=[d,f];for(;k['length'];){if(f=k['pop'](),d=k['pop'](),f-d<=g)continue;const l=d+Math['ceil']((f-d)/g/0x2)*g;Pe(c,l,d,f,h),k['push'](d,l,l,f);}}function Re(d){const bk=aW,f=d['replace'](/\r\n?/g,'\x0a'),g=[],h=f['length'];let k=0x0;for(;k<h;){for(;k<h&&f['charCodeAt'](k)===0xa;)k++;if(k>=h)break;let l=f['indexOf']('\x0a',k);l===-0x1&&(l=h);const m=f[bk(0x273)](k,l)['trim']();k=l+0x1;const p=parseInt(m,0xa);if(isNaN(p)){k<h&&(l=f[bk(0x1b1)]('\x0a',k),l===-0x1&&(l=h),k=l+0x1);continue;}if(k>=h)break;l=f['indexOf']('\x0a',k),l===-0x1&&(l=h);const u=f['substring'](k,l)['replace'](/\s+$/,'');k=l+0x1,g['push']({'code':p,'value':u});}return g;}function Oe(c,d,f){const bl=aW;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g[bl(0x236)]===bl(0x272))return d+0x1;if(g[bl(0x2c2)]===0x9){const h=g['value'];switch(d++,h){case'$ACADVER':d<c['length']&&(f['acadVersion']=c[d]['value'],d++);break;case'$EXTMIN':if(d<c[bl(0x1d0)]){const i=fe(c,d);f['extMin']=i[bl(0x25a)],d=i['nextIndex'];}break;case'$EXTMAX':if(d<c['length']){const k=fe(c,d);f['extMax']=k[bl(0x25a)],d=k['nextIndex'];}break;case'$INSUNITS':d<c['length']&&(f['insUnits']=parseInt(c[d]['value'],0xa),d++);break;case'$MEASUREMENT':d<c[bl(0x1d0)]&&(f[bl(0x282)]=parseInt(c[d][bl(0x236)],0xa),d++);break;case bl(0x231):d<c['length']&&(f['ltScale']=parseFloat(c[d]['value']),d++);break;case'$DWGCODEPAGE':d<c['length']&&(f[bl(0x1c8)]=c[d]['value'],d++);break;case bl(0x1f0):d<c['length']&&(f['handleSeed']=c[d]['value'],d++);break;default:for(;d<c[bl(0x1d0)]&&c[d]['code']!==0x9&&c[d]['code']!==0x0;)f[h]=c[d]['value'],d++;}}else d++;}return d;}function fe(c,d){const bm=aW,f={'x':0x0,'y':0x0,'z':0x0};for(;d<c[bm(0x1d0)];){const g=c[d]['code'];if(g===0xa)f['x']=parseFloat(c[d]['value']),d++;else{if(g===0x14)f['y']=parseFloat(c[d][bm(0x236)]),d++;else{if(g===0x1e)f['z']=parseFloat(c[d]['value']),d++;else break;}}}return{'point':f,'nextIndex':d};}function _e(c,d,f){const bn=aW;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g['value']==='ENDSEC')return d+0x1;if(g['code']===0x0&&g['value']===bn(0x2ee)){if(d++,d>=c['length'])break;const h=c[d]['value'];switch(d++,h){case'LAYER':d=$e(c,d,f['layers']);break;case'LTYPE':d=je(c,d,f[bn(0x1ac)]);break;case'STYLE':d=qe(c,d,f[bn(0x24d)]);break;default:d=We(c,d);break;}}else d++;}return d;}function We(c,d){const bo=aW;for(;d<c[bo(0x1d0)];){if(c[d][bo(0x2c2)]===0x0&&c[d][bo(0x236)]==='ENDTAB')return d+0x1;d++;}return d;}function $e(c,d,f){const bp=aW;for(;d<c[bp(0x1d0)];){const g=c[d];if(g['code']===0x0&&g['value']==='ENDTAB')return d+0x1;if(g['code']===0x0&&g[bp(0x236)]==='LAYER'){d++;const h={'name':'0','color':0x7,'lineType':'Continuous','flags':0x0,'lineWeight':-0x3,'isOff':!0x1,'isFrozen':!0x1,'isLocked':!0x1};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h['name']=i['value'];break;case 0x6:h['lineType']=i['value'];break;case 0x3e:h['color']=parseInt(i['value'],0xa);break;case 0x46:h['flags']=parseInt(i['value'],0xa);break;case 0x172:h[bp(0x2c7)]=parseInt(i[bp(0x236)],0xa);break;case 0x1a4:h['trueColor']=parseInt(i['value'],0xa);break;}d++;}f['set'](h['name'],h);}else d++;}return d;}function je(c,d,f){const bq=aW;for(;d<c[bq(0x1d0)];){const g=c[d];if(g['code']===0x0&&g[bq(0x236)]==='ENDTAB')return d+0x1;if(g[bq(0x2c2)]===0x0&&g['value']==='LTYPE'){d++;const h={'name':'','description':'','pattern':[],'totalLength':0x0};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h['name']=i['value'];break;case 0x3:h['description']=i['value'];break;case 0x28:h['totalLength']=parseFloat(i['value']);break;case 0x31:h['pattern']['push'](parseFloat(i['value']));break;}d++;}h['name']&&f['set'](h['name'],h);}else d++;}return d;}function qe(c,d,f){const br=aW;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g['value']===br(0x2ad))return d+0x1;if(g['code']===0x0&&g['value']==='STYLE'){d++;const h={'name':'','fontName':'','bigFontName':'','height':0x0,'widthFactor':0x1,'obliqueAngle':0x0};for(;d<c[br(0x1d0)]&&c[d]['code']!==0x0;){const i=c[d];switch(i[br(0x2c2)]){case 0x2:h['name']=i['value'];break;case 0x3:h['fontName']=i['value'];break;case 0x4:h['bigFontName']=i[br(0x236)];break;case 0x28:h['height']=parseFloat(i['value']);break;case 0x29:h['widthFactor']=parseFloat(i['value']);break;case 0x32:h['obliqueAngle']=parseFloat(i['value']);break;}d++;}h['name']&&f['set'](h['name'],h);}else d++;}return d;}function P(c){const bs=aW,d={'type':'','layer':'0','color':0x100,'lineType':'BYLAYER','lineTypeScale':0x1,'lineWeight':-0x1,'visible':!0x0,'extrusion':{'x':0x0,'y':0x0,'z':0x1}};for(const f of c)switch(f['code']){case 0x5:d['handle']=f['value'];break;case 0x8:d['layer']=f['value'];break;case 0x6:d['lineType']=f['value'];break;case 0x30:d['lineTypeScale']=parseFloat(f['value']);break;case 0x3c:d['visible']=f['value']==='0'||f[bs(0x236)]==='';break;case 0x3e:d['color']=parseInt(f['value'],0xa);break;case 0x172:d['lineWeight']=parseInt(f[bs(0x236)],0xa);break;case 0x1a4:d[bs(0x1a8)]=parseInt(f['value'],0xa);break;case 0xd2:d[bs(0x226)]['x']=parseFloat(f['value']);break;case 0xdc:d['extrusion']['y']=parseFloat(f['value']);break;case 0xe6:d['extrusion']['z']=parseFloat(f['value']);break;}return d;}function He(c){const bu=aW,d={...P(c),'type':'LINE','start':{'x':0x0,'y':0x0,'z':0x0},'end':{'x':0x0,'y':0x0,'z':0x0}};for(const f of c)switch(f['code']){case 0xa:d['start']['x']=parseFloat(f[bu(0x236)]);break;case 0x14:d['start']['y']=parseFloat(f['value']);break;case 0x1e:d[bu(0x1fa)]['z']=parseFloat(f['value']);break;case 0xb:d['end']['x']=parseFloat(f['value']);break;case 0x15:d['end']['y']=parseFloat(f['value']);break;case 0x1f:d['end']['z']=parseFloat(f['value']);break;}return d;}function Ve(c){const bv=aW,d={...P(c),'type':'CIRCLE','center':{'x':0x0,'y':0x0,'z':0x0},'radius':0x0};for(const f of c)switch(f['code']){case 0xa:d['center']['x']=parseFloat(f['value']);break;case 0x14:d['center']['y']=parseFloat(f['value']);break;case 0x1e:d['center']['z']=parseFloat(f[bv(0x236)]);break;case 0x28:d['radius']=parseFloat(f['value']);break;}return d;}function Ue(c){const bw=aW,d={...P(c),'type':'ARC','center':{'x':0x0,'y':0x0,'z':0x0},'radius':0x0,'startAngle':0x0,'endAngle':0x168};for(const f of c)switch(f['code']){case 0xa:d['center']['x']=parseFloat(f['value']);break;case 0x14:d[bw(0x1e8)]['y']=parseFloat(f[bw(0x236)]);break;case 0x1e:d['center']['z']=parseFloat(f['value']);break;case 0x28:d['radius']=parseFloat(f['value']);break;case 0x32:d[bw(0x1bd)]=parseFloat(f['value']);break;case 0x33:d['endAngle']=parseFloat(f['value']);break;}return d;}function Ge(c){const bx=aW,d={...P(c),'type':'LWPOLYLINE','vertices':[],'closed':!0x1,'constantWidth':0x0,'elevation':0x0};let f=null;for(const g of c)switch(g['code']){case 0x46:d['closed']=(parseInt(g['value'],0xa)&0x1)!==0x0;break;case 0x26:d['elevation']=parseFloat(g['value']);break;case 0x2b:d[bx(0x1fd)]=parseFloat(g['value']);break;case 0xa:f&&d['vertices'][bx(0x234)](f),f={'x':parseFloat(g['value']),'y':0x0,'bulge':0x0,'startWidth':0x0,'endWidth':0x0};break;case 0x14:f&&(f['y']=parseFloat(g['value']));break;case 0x28:f&&(f['startWidth']=parseFloat(g[bx(0x236)]));break;case 0x29:f&&(f['endWidth']=parseFloat(g['value']));break;case 0x2a:f&&(f['bulge']=parseFloat(g['value']));break;}return f&&d['vertices']['push'](f),d;}function b(c,d){c=c-0x1a1;const e=a();let f=e[c];return f;}function Ze(c){const d={...P(c),'type':'POLYLINE','vertices':[],'closed':!0x1,'is3d':!0x1};for(const f of c)switch(f['code']){case 0x46:{const g=parseInt(f['value'],0xa);d['closed']=(g&0x1)!==0x0,d['is3d']=(g&0x8)!==0x0;break;}}return d;}function Ke(c){const by=aW,d={...P(c),'type':'ELLIPSE','center':{'x':0x0,'y':0x0,'z':0x0},'majorAxis':{'x':0x1,'y':0x0,'z':0x0},'minorRatio':0x1,'startParam':0x0,'endParam':Math['PI']*0x2};for(const f of c)switch(f['code']){case 0xa:d['center']['x']=parseFloat(f['value']);break;case 0x14:d['center']['y']=parseFloat(f['value']);break;case 0x1e:d['center']['z']=parseFloat(f['value']);break;case 0xb:d['majorAxis']['x']=parseFloat(f['value']);break;case 0x15:d['majorAxis']['y']=parseFloat(f['value']);break;case 0x1f:d['majorAxis']['z']=parseFloat(f['value']);break;case 0x28:d['minorRatio']=parseFloat(f['value']);break;case 0x29:d['startParam']=parseFloat(f[by(0x236)]);break;case 0x2a:d['endParam']=parseFloat(f['value']);break;}return d;}function Qe(c){const bz=aW,d={...P(c),'type':'SPLINE','degree':0x3,'flags':0x0,'knots':[],'controlPoints':[],'fitPoints':[],'weights':[]};let f=null,g=null;for(const h of c)switch(h[bz(0x2c2)]){case 0x46:d['flags']=parseInt(h['value'],0xa);break;case 0x47:d['degree']=parseInt(h['value'],0xa);break;case 0x28:d[bz(0x1bf)]['push'](parseFloat(h[bz(0x236)]));break;case 0x29:d['weights']['push'](parseFloat(h['value']));break;case 0xa:f&&d['controlPoints']['push'](f),f={'x':parseFloat(h['value']),'y':0x0,'z':0x0};break;case 0x14:f&&(f['y']=parseFloat(h['value']));break;case 0x1e:f&&(f['z']=parseFloat(h[bz(0x236)]));break;case 0xb:g&&d[bz(0x1b4)]['push'](g),g={'x':parseFloat(h['value']),'y':0x0,'z':0x0};break;case 0x15:g&&(g['y']=parseFloat(h['value']));break;case 0x1f:g&&(g['z']=parseFloat(h['value']));break;case 0xc:d['startTangent']||(d[bz(0x2f0)]={'x':0x0,'y':0x0,'z':0x0}),d[bz(0x2f0)]['x']=parseFloat(h['value']);break;case 0x16:d[bz(0x2f0)]&&(d['startTangent']['y']=parseFloat(h['value']));break;case 0x20:d['startTangent']&&(d[bz(0x2f0)]['z']=parseFloat(h['value']));break;case 0xd:d['endTangent']||(d['endTangent']={'x':0x0,'y':0x0,'z':0x0}),d['endTangent']['x']=parseFloat(h['value']);break;case 0x17:d[bz(0x1b8)]&&(d['endTangent']['y']=parseFloat(h['value']));break;case 0x21:d[bz(0x1b8)]&&(d['endTangent']['z']=parseFloat(h[bz(0x236)]));break;}return f&&d[bz(0x1a9)]['push'](f),g&&d['fitPoints'][bz(0x234)](g),d;}function Je(c){const bA=aW,d={...P(c),'type':'TEXT','text':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'height':0x1,'rotation':0x0,'widthFactor':0x1,'obliqueAngle':0x0,'style':'STANDARD','hAlign':0x0,'vAlign':0x0,'generationFlags':0x0};for(const f of c)switch(f[bA(0x2c2)]){case 0x1:d['text']=f['value'];break;case 0xa:d[bA(0x281)]['x']=parseFloat(f['value']);break;case 0x14:d['insertionPoint']['y']=parseFloat(f['value']);break;case 0x1e:d['insertionPoint']['z']=parseFloat(f['value']);break;case 0xb:d['alignmentPoint']||(d['alignmentPoint']={'x':0x0,'y':0x0,'z':0x0}),d['alignmentPoint']['x']=parseFloat(f['value']);break;case 0x15:d['alignmentPoint']||(d['alignmentPoint']={'x':0x0,'y':0x0,'z':0x0}),d['alignmentPoint']['y']=parseFloat(f['value']);break;case 0x1f:d[bA(0x246)]||(d['alignmentPoint']={'x':0x0,'y':0x0,'z':0x0}),d['alignmentPoint']['z']=parseFloat(f['value']);break;case 0x28:d['height']=parseFloat(f['value']);break;case 0x29:d['widthFactor']=parseFloat(f['value']);break;case 0x32:d[bA(0x288)]=parseFloat(f['value']);break;case 0x33:d[bA(0x2d7)]=parseFloat(f['value']);break;case 0x7:d['style']=f['value'];break;case 0x47:d['generationFlags']=parseInt(f['value'],0xa);break;case 0x48:d['hAlign']=parseInt(f['value'],0xa);break;case 0x49:d[bA(0x208)]=parseInt(f['value'],0xa);break;}return d;}function et(c){const bB=aW,d={...P(c),'type':'MTEXT','text':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'height':0x1,'width':0x0,'attachmentPoint':0x1,'drawingDirection':0x1,'rotation':0x0,'lineSpacingStyle':0x1,'lineSpacingFactor':0x1,'style':'STANDARD','bgFill':0x0,'bgFillScale':1.5},f=[];for(const g of c)switch(g['code']){case 0x1:f['push'](g['value']);break;case 0x3:f['push'](g['value']);break;case 0x7:d['style']=g['value'];break;case 0xa:d['insertionPoint']['x']=parseFloat(g['value']);break;case 0x14:d['insertionPoint']['y']=parseFloat(g['value']);break;case 0x1e:d['insertionPoint']['z']=parseFloat(g[bB(0x236)]);break;case 0xb:d['textDirection']||(d['textDirection']={'x':0x0,'y':0x0,'z':0x0}),d['textDirection']['x']=parseFloat(g[bB(0x236)]);break;case 0x15:d['textDirection']||(d['textDirection']={'x':0x0,'y':0x0,'z':0x0}),d[bB(0x2e8)]['y']=parseFloat(g['value']);break;case 0x1f:d[bB(0x2e8)]||(d['textDirection']={'x':0x0,'y':0x0,'z':0x0}),d[bB(0x2e8)]['z']=parseFloat(g['value']);break;case 0x28:d[bB(0x2ea)]=parseFloat(g['value']);break;case 0x29:d['width']=parseFloat(g['value']);break;case 0x2c:d['lineSpacingFactor']=parseFloat(g['value']);break;case 0x32:d[bB(0x288)]=parseFloat(g['value']);break;case 0x47:d['attachmentPoint']=parseInt(g['value'],0xa);break;case 0x48:d['drawingDirection']=parseInt(g[bB(0x236)],0xa);break;case 0x49:d['lineSpacingStyle']=parseInt(g[bB(0x236)],0xa);break;case 0x5a:d['bgFill']=parseInt(g['value'],0xa);break;}return d['text']=f['join'](''),d;}function tt(c){const bC=aW,d={...P(c),'type':'INSERT','blockName':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'scaleX':0x1,'scaleY':0x1,'scaleZ':0x1,'rotation':0x0,'columnCount':0x1,'rowCount':0x1,'columnSpacing':0x0,'rowSpacing':0x0,'attribs':[]};for(const f of c)switch(f['code']){case 0x2:d[bC(0x244)]=f['value'];break;case 0xa:d['insertionPoint']['x']=parseFloat(f[bC(0x236)]);break;case 0x14:d[bC(0x281)]['y']=parseFloat(f['value']);break;case 0x1e:d['insertionPoint']['z']=parseFloat(f['value']);break;case 0x29:d['scaleX']=parseFloat(f[bC(0x236)]);break;case 0x2a:d['scaleY']=parseFloat(f[bC(0x236)]);break;case 0x2b:d['scaleZ']=parseFloat(f['value']);break;case 0x2c:d['columnSpacing']=parseFloat(f['value']);break;case 0x2d:d['rowSpacing']=parseFloat(f['value']);break;case 0x32:d['rotation']=parseFloat(f['value']);break;case 0x46:d['columnCount']=parseInt(f['value'],0xa)||0x1;break;case 0x47:d[bC(0x1c9)]=parseInt(f['value'],0xa)||0x1;break;}return d;}function at(c){const bD=aW,d={...P(c),'type':'DIMENSION','blockName':'','dimStyle':'STANDARD','dimType':0x0,'defPoint':{'x':0x0,'y':0x0,'z':0x0},'textMidpoint':{'x':0x0,'y':0x0,'z':0x0},'textOverride':'','rotation':0x0,'textRotation':0x0,'leaderLength':0x0};for(const f of c)switch(f['code']){case 0x1:d['textOverride']=f['value'];break;case 0x2:d['blockName']=f['value'];break;case 0x3:d['dimStyle']=f['value'];break;case 0xa:d['defPoint']['x']=parseFloat(f[bD(0x236)]);break;case 0x14:d['defPoint']['y']=parseFloat(f['value']);break;case 0x1e:d[bD(0x289)]['z']=parseFloat(f['value']);break;case 0xb:d[bD(0x20c)]['x']=parseFloat(f['value']);break;case 0x15:d[bD(0x20c)]['y']=parseFloat(f['value']);break;case 0x1f:d['textMidpoint']['z']=parseFloat(f['value']);break;case 0xd:d['defPoint2']||(d['defPoint2']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint2']['x']=parseFloat(f[bD(0x236)]);break;case 0x17:d['defPoint2']||(d[bD(0x205)]={'x':0x0,'y':0x0,'z':0x0}),d['defPoint2']['y']=parseFloat(f['value']);break;case 0x21:d['defPoint2']||(d['defPoint2']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint2']['z']=parseFloat(f['value']);break;case 0xe:d['defPoint3']||(d['defPoint3']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint3']['x']=parseFloat(f['value']);break;case 0x18:d['defPoint3']||(d['defPoint3']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint3']['y']=parseFloat(f[bD(0x236)]);break;case 0x22:d[bD(0x27b)]||(d['defPoint3']={'x':0x0,'y':0x0,'z':0x0}),d[bD(0x27b)]['z']=parseFloat(f['value']);break;case 0xf:d[bD(0x22b)]||(d['defPoint4']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint4']['x']=parseFloat(f['value']);break;case 0x19:d['defPoint4']||(d['defPoint4']={'x':0x0,'y':0x0,'z':0x0}),d[bD(0x22b)]['y']=parseFloat(f[bD(0x236)]);break;case 0x23:d['defPoint4']||(d['defPoint4']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint4']['z']=parseFloat(f['value']);break;case 0x10:d['defPoint5']||(d['defPoint5']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint5']['x']=parseFloat(f['value']);break;case 0x1a:d[bD(0x2f2)]||(d['defPoint5']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint5']['y']=parseFloat(f['value']);break;case 0x24:d['defPoint5']||(d[bD(0x2f2)]={'x':0x0,'y':0x0,'z':0x0}),d[bD(0x2f2)]['z']=parseFloat(f[bD(0x236)]);break;case 0x28:d[bD(0x1b6)]=parseFloat(f['value']);break;case 0x32:d['rotation']=parseFloat(f[bD(0x236)]);break;case 0x35:d['textRotation']=parseFloat(f['value']);break;case 0x46:d[bD(0x1ea)]=parseInt(f['value'],0xa);break;}return d;}function nt(c){const bE=aW,d={...P(c),'type':'HATCH','patternName':'','solidFill':!0x0,'associative':!0x1,'hatchStyle':0x0,'patternType':0x1,'patternAngle':0x0,'patternScale':0x1,'boundaryPaths':[]};let f=0x0;for(;f<c[bE(0x1d0)];){const g=c[f];switch(g['code']){case 0x2:d['patternName']=g['value'];break;case 0x29:d['patternScale']=parseFloat(g[bE(0x236)]);break;case 0x34:d['patternAngle']=parseFloat(g[bE(0x236)]);break;case 0x46:d['solidFill']=g['value']==='1';break;case 0x47:d['associative']=g['value']==='1';break;case 0x4b:d['hatchStyle']=parseInt(g['value'],0xa);break;case 0x4c:d['patternType']=parseInt(g['value'],0xa);break;case 0x5b:{const h=parseInt(g['value'],0xa);f++;for(let k=0x0;k<h&&f<c[bE(0x1d0)];k++){const l=rt(c,f);d['boundaryPaths']['push'](l['path']),f=l['nextIndex'];}continue;}}f++;}return d;}function rt(c,d){let f=0x0;return d<c['length']&&c[d]['code']===0x5c&&(f=parseInt(c[d]['value'],0xa),d++),(f&0x2)!==0x0?st(c,d,f):ot(c,d,f);}function st(c,d,f){const bF=aW,g={'type':'polyline','vertices':[],'bulges':[],'flags':f};let h=!0x1;d<c['length']&&c[d][bF(0x2c2)]===0x48&&(h=c[d][bF(0x236)]==='1',d++),d<c['length']&&c[d]['code']===0x49&&(g[bF(0x24b)]=c[d][bF(0x236)]==='1',d++);let k=0x0;d<c['length']&&c[d]['code']===0x5d&&(k=parseInt(c[d]['value'],0xa),d++);for(let l=0x0;l<k&&d<c[bF(0x1d0)];l++){const m={'x':0x0,'y':0x0};c[d]['code']===0xa&&(m['x']=parseFloat(c[d]['value']),d++),d<c['length']&&c[d]['code']===0x14&&(m['y']=parseFloat(c[d]['value']),d++),g['vertices']['push'](m),h&&d<c['length']&&c[d]['code']===0x2a?(g['bulges']['push'](parseFloat(c[d]['value'])),d++):h&&g['bulges']['push'](0x0);}for(;d<c['length']&&(c[d]['code']===0x61||c[d][bF(0x2c2)]===0x14a);)if(c[d]['code']===0x61){const p=parseInt(c[d]['value'],0xa);d++;for(let u=0x0;u<p&&d<c['length']&&c[d]['code']===0x14a;u++)d++;}else d++;return{'path':g,'nextIndex':d};}function ot(g,k,m){const bG=aW,p={'type':'edges','edges':[],'flags':m};let v=0x0;k<g['length']&&g[k]['code']===0x5d&&(v=parseInt(g[k]['value'],0xa),k++);for(let w=0x0;w<v&&k<g['length']&&g[k][bG(0x2c2)]===0x48;w++){const x=parseInt(g[k][bG(0x236)],0xa);switch(k++,x){case 0x1:{const z={'type':'line','start':{'x':0x0,'y':0x0},'end':{'x':0x0,'y':0x0}};k<g[bG(0x1d0)]&&g[k]['code']===0xa&&(z['start']['x']=parseFloat(g[k]['value']),k++),k<g[bG(0x1d0)]&&g[k]['code']===0x14&&(z['start']['y']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0xb&&(z['end']['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x15&&(z['end']['y']=parseFloat(g[k]['value']),k++),p['edges']['push'](z);break;}case 0x2:{const A={'type':bG(0x2ef),'center':{'x':0x0,'y':0x0},'radius':0x0,'startAngle':0x0,'endAngle':0x168,'ccw':!0x0};k<g[bG(0x1d0)]&&g[k][bG(0x2c2)]===0xa&&(A[bG(0x1e8)]['x']=parseFloat(g[k][bG(0x236)]),k++),k<g['length']&&g[k]['code']===0x14&&(A['center']['y']=parseFloat(g[k][bG(0x236)]),k++),k<g[bG(0x1d0)]&&g[k]['code']===0x28&&(A['radius']=parseFloat(g[k]['value']),k++),k<g[bG(0x1d0)]&&g[k]['code']===0x32&&(A['startAngle']=parseFloat(g[k]['value']),k++),k<g[bG(0x1d0)]&&g[k][bG(0x2c2)]===0x33&&(A[bG(0x2da)]=parseFloat(g[k]['value']),k++),k<g[bG(0x1d0)]&&g[k]['code']===0x49&&(A['ccw']=g[k]['value']==='1',k++),p[bG(0x241)]['push'](A);break;}case 0x3:{const C={'type':'ellipse','center':{'x':0x0,'y':0x0},'majorAxis':{'x':0x1,'y':0x0},'minorRatio':0x1,'startAngle':0x0,'endAngle':Math['PI']*0x2,'ccw':!0x0};k<g['length']&&g[k]['code']===0xa&&(C[bG(0x1e8)]['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x14&&(C['center']['y']=parseFloat(g[k][bG(0x236)]),k++),k<g['length']&&g[k][bG(0x2c2)]===0xb&&(C['majorAxis']['x']=parseFloat(g[k][bG(0x236)]),k++),k<g['length']&&g[k][bG(0x2c2)]===0x15&&(C['majorAxis']['y']=parseFloat(g[k]['value']),k++),k<g[bG(0x1d0)]&&g[k]['code']===0x28&&(C[bG(0x2dc)]=parseFloat(g[k][bG(0x236)]),k++),k<g['length']&&g[k]['code']===0x32&&(C['startAngle']=parseFloat(g[k][bG(0x236)]),k++),k<g['length']&&g[k][bG(0x2c2)]===0x33&&(C['endAngle']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k][bG(0x2c2)]===0x49&&(C['ccw']=g[k]['value']==='1',k++),p['edges']['push'](C);break;}case 0x4:{let D=0x3;const F=[],I=[];k<g['length']&&g[k]['code']===0x5e&&(D=parseInt(g[k]['value'],0xa),k++),k<g['length']&&g[k]['code']===0x49&&k++,k<g['length']&&g[k]['code']===0x4a&&k++;let L=0x0;k<g['length']&&g[k]['code']===0x5f&&(L=parseInt(g[k]['value'],0xa),k++);let M=0x0;k<g['length']&&g[k]['code']===0x60&&(M=parseInt(g[k]['value'],0xa),k++);for(let N=0x0;N<L&&k<g['length']&&g[k]['code']===0x28;N++)F['push'](parseFloat(g[k]['value'])),k++;for(let V=0x0;V<M&&k<g['length'];V++){const X={'x':0x0,'y':0x0};g[k]['code']===0xa&&(X['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x14&&(X['y']=parseFloat(g[k]['value']),k++),I[bG(0x234)](X);}p['edges']['push']({'type':'spline','degree':D,'knots':F,'controlPoints':I});break;}}}for(;k<g['length']&&(g[k]['code']===0x61||g[k][bG(0x2c2)]===0x14a);)if(g[k][bG(0x2c2)]===0x61){const Y=parseInt(g[k]['value'],0xa);k++;for(let a0=0x0;a0<Y&&k<g['length']&&g[k]['code']===0x14a;a0++)k++;}else k++;return{'path':p,'nextIndex':k};}function it(c){const bH=aW,d={...P(c),'type':'POINT','position':{'x':0x0,'y':0x0,'z':0x0}};for(const f of c)switch(f['code']){case 0xa:d['position']['x']=parseFloat(f['value']);break;case 0x14:d[bH(0x210)]['y']=parseFloat(f['value']);break;case 0x1e:d['position']['z']=parseFloat(f['value']);break;}return d;}function we(c,d,f){const bI=aW;for(;d<c['length'];){const g=c[d];if(g['code']!==0x0){d++;continue;}const h=g['value'];if(h==='ENDSEC'||h==='ENDBLK')return d+0x1;d++;const k=[];for(;d<c['length']&&c[d]['code']!==0x0;)k['push'](c[d]),d++;switch(h){case'LINE':f['push'](He(k));break;case bI(0x221):f['push'](Ve(k));break;case'ARC':f[bI(0x234)](Ue(k));break;case'LWPOLYLINE':f['push'](Ge(k));break;case'ELLIPSE':f['push'](Ke(k));break;case'SPLINE':f['push'](Qe(k));break;case'TEXT':f['push'](Je(k));break;case'MTEXT':f['push'](et(k));break;case bI(0x295):{const l=tt(k);k['some'](m=>m['code']===0x42&&m['value']==='1')&&(d=ct(c,d,l['attribs'])),f[bI(0x234)](l);break;}case bI(0x2c4):f['push'](at(k));break;case bI(0x2b0):f['push'](nt(k));break;case bI(0x2df):f[bI(0x234)](it(k));break;case'POLYLINE':{const m=Ze(k);d=lt(c,d,m['vertices']),f['push'](m);break;}}}return d;}function lt(c,d,f){const bJ=aW;for(;d<c['length'];){if(c[d]['code']!==0x0){d++;continue;}const g=c[d]['value'];if(g==='SEQEND')return d+0x1;if(g===bJ(0x272)||g==='ENDBLK')return d;if(g==='VERTEX'){d++;const h={'x':0x0,'y':0x0,'bulge':0x0,'startWidth':0x0,'endWidth':0x0};for(;d<c[bJ(0x1d0)]&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0xa:h['x']=parseFloat(i['value']);break;case 0x14:h['y']=parseFloat(i[bJ(0x236)]);break;case 0x2a:h['bulge']=parseFloat(i['value']);break;case 0x28:h['startWidth']=parseFloat(i[bJ(0x236)]);break;case 0x29:h['endWidth']=parseFloat(i['value']);break;}d++;}f['push'](h);}else{for(d++;d<c[bJ(0x1d0)]&&c[d]['code']!==0x0;)d++;}}return d;}function ct(c,d,f){const bK=aW;for(;d<c['length'];){if(c[d]['code']!==0x0){d++;continue;}const g=c[d][bK(0x236)];if(g==='SEQEND')return d+0x1;if(g==='ENDSEC'||g===bK(0x255))return d;if(g==='ATTRIB'){d++;const h={'tag':'','text':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'height':0x1,'rotation':0x0,'style':bK(0x257),'layer':'0','color':0x100};for(;d<c[bK(0x1d0)]&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x1:h['text']=i['value'];break;case 0x2:h['tag']=i['value'];break;case 0x7:h[bK(0x245)]=i[bK(0x236)];break;case 0x8:h['layer']=i[bK(0x236)];break;case 0xa:h[bK(0x281)]['x']=parseFloat(i[bK(0x236)]);break;case 0x14:h[bK(0x281)]['y']=parseFloat(i['value']);break;case 0x1e:h['insertionPoint']['z']=parseFloat(i[bK(0x236)]);break;case 0x28:h['height']=parseFloat(i['value']);break;case 0x32:h['rotation']=parseFloat(i['value']);break;case 0x3e:h['color']=parseInt(i['value'],0xa);break;}d++;}f['push'](h);}else{for(d++;d<c['length']&&c[d]['code']!==0x0;)d++;}}return d;}function ht(c,d,f){const bL=aW;for(;d<c['length'];){const g=c[d];if(g[bL(0x2c2)]===0x0&&g['value']==='ENDSEC')return d+0x1;if(g['code']===0x0&&g['value']==='BLOCK'){d++;const h={'name':'','basePoint':{'x':0x0,'y':0x0,'z':0x0},'entities':[],'flags':0x0};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h['name']=i['value'];break;case 0x8:break;case 0xa:h[bL(0x1b7)]['x']=parseFloat(i['value']);break;case 0x14:h['basePoint']['y']=parseFloat(i[bL(0x236)]);break;case 0x1e:h['basePoint']['z']=parseFloat(i[bL(0x236)]);break;case 0x46:h['flags']=parseInt(i['value'],0xa);break;}d++;}d=we(c,d,h['entities']),h['name']&&!h['name']['startsWith']('*Model_Space')&&!h[bL(0x1ef)]['startsWith'](bL(0x1fc))&&f['set'](h['name'],h);}else d++;}return d;}var pe='AutoCAD\x20Binary\x20DXF',ut={'ANSI_874':'windows-874','ANSI_932':aW(0x2d6),'ANSI_936':'gbk','ANSI_949':'euc-kr','ANSI_950':'big5','ANSI_1250':'windows-1250','ANSI_1251':'windows-1251','ANSI_1252':'windows-1252','ANSI_1253':'windows-1253','ANSI_1254':'windows-1254','ANSI_1255':'windows-1255','ANSI_1256':aW(0x2a9),'ANSI_1257':'windows-1257','ANSI_1258':'windows-1258'},dt='AC1021';function ft(){return{'acadVersion':'','insUnits':0x0,'measurement':0x0,'ltScale':0x1};}function be(c){return c['replace'](/\\U\+([0-9A-Fa-f]{4})/g,(d,f)=>String['fromCodePoint'](parseInt(f,0x10)));}function pt(d){const bM=aW;if(typeof d=='string')return be(d);const f=new Uint8Array(d);if(new TextDecoder('ascii')['decode'](f['slice'](0x0,pe['length']))===pe)throw new T(bM(0x21f));let g=new TextDecoder('utf-8')[bM(0x24f)](d);const h=g[bM(0x1ca)](/\$ACADVER[\s\S]*?\n\s*1\s*\n\s*(\S+)/)?.[0x1]??'';if(h&&h<dt){const i=g['match'](/\$DWGCODEPAGE[\s\S]*?\n\s*3\s*\n\s*(\S+)/)?.[0x1]??'',k=ut[i]??'windows-1252';k!=='utf-8'&&(g=new TextDecoder(k)['decode'](d));}return be(g);}function bt(c,d){for(;d<c['length'];){if(c[d]['code']===0x0&&c[d]['value']==='ENDSEC')return d+0x1;d++;}return d;}function mt(c){const bN=aW;c['layers']['has']('0')||c['layers']['set']('0',{'name':'0','color':0x7,'lineType':bN(0x219),'flags':0x0,'lineWeight':-0x3,'isOff':!0x1,'isFrozen':!0x1,'isLocked':!0x1});}function gt(c){const bO=aW;for(const [,d]of c[bO(0x1e4)])d['isOff']=d['color']<0x0,d['isOff']&&(d['color']=Math['abs'](d['color'])),d[bO(0x1a3)]=(d[bO(0x264)]&0x1)!==0x0,d['isLocked']=(d['flags']&0x4)!==0x0;}var T=class extends Error{constructor(c,d){super(c),this['cause']=d,this['name']='DxfParseError';}};function ae(c){const bP=aW;if(typeof c==bP(0x2b7)){if(c['length']===0x0)throw new T('Input\x20is\x20empty.\x20Expected\x20a\x20DXF\x20string\x20or\x20ArrayBuffer.');}else{if(c instanceof ArrayBuffer){if(c['byteLength']===0x0)throw new T('Input\x20ArrayBuffer\x20is\x20empty.');}else throw new T('Invalid\x20input\x20type.\x20Expected\x20a\x20string\x20or\x20ArrayBuffer.');}let d;try{d=pt(c);}catch(h){throw h instanceof T?h:new T('Failed\x20to\x20decode\x20DXF\x20input.',h);}let f;try{f=Re(d);}catch(k){throw new T('Failed\x20to\x20tokenize\x20DXF\x20content.',k);}if(f['length']===0x0)throw new T('DXF\x20content\x20produced\x20no\x20tokens.\x20The\x20input\x20may\x20not\x20be\x20a\x20valid\x20DXF\x20file.');const g={'header':ft(),'layers':new Map(),'lineTypes':new Map(),'styles':new Map(),'blocks':new Map(),'entities':[]};try{let l=0x0;for(;l<f[bP(0x1d0)];){const m=f[l];if(m['code']===0x0&&m['value']===bP(0x274)){if(l++,l>=f[bP(0x1d0)])break;const o=f[l][bP(0x236)];switch(l++,o){case'HEADER':l=Oe(f,l,g['header']);break;case'TABLES':l=_e(f,l,g);break;case'BLOCKS':l=ht(f,l,g['blocks']);break;case'ENTITIES':l=we(f,l,g['entities']);break;default:l=bt(f,l);break;}}else{if(m['code']===0x0&&m['value']==='EOF')break;l++;}}}catch(p){throw new T('Failed\x20to\x20parse\x20DXF\x20sections.',p);}return mt(g),gt(g),g;}var vt=['#000000','#FF0000','#FFFF00','#00FF00','#00FFFF','#0000FF','#FF00FF','#FFFFFF',aW(0x2e6),'#C0C0C0','#FF0000','#FF7F7F','#A50000','#A55252','#7F0000','#7F3F3F','#4C0000','#4C2626','#260000','#261313','#FF3F00','#FF9F7F','#A52900','#A56752','#7F1F00','#7F4F3F',aW(0x1cb),'#4C2F26','#260900','#261713','#FF7F00','#FFBF7F','#A55200',aW(0x233),'#7F3F00','#7F5F3F','#4C2600','#4C3926','#261300','#261C13','#FFBF00','#FFDF7F','#A57C00',aW(0x1e0),'#7F5F00','#7F6F3F','#4C3900','#4C4226','#261C00',aW(0x1ce),'#FFFF00','#FFFF7F','#A5A500','#A5A552','#7F7F00','#7F7F3F','#4C4C00','#4C4C26','#262600','#262613','#BFFF00',aW(0x1a1),'#7CA500','#91A552','#5F7F00','#6F7F3F','#394C00','#424C26','#1C2600','#212613','#7FFF00',aW(0x1ad),'#52A500','#7CA552',aW(0x21a),'#5F7F3F','#264C00','#394C26',aW(0x1d7),'#1C2613',aW(0x1bc),'#9FFF7F',aW(0x26b),'#67A552','#1F7F00','#4F7F3F','#134C00','#2F4C26','#092600','#172613','#00FF00','#7FFF7F','#00A500','#52A552',aW(0x2d9),'#3F7F3F','#004C00','#264C26','#002600','#132613','#00FF3F',aW(0x23c),'#00A529','#52A567','#007F1F','#3F7F4F','#004C13','#264C2F','#002609','#132617',aW(0x1e6),'#7FFFBF','#00A552','#52A57C',aW(0x21e),'#3F7F5F',aW(0x2c8),'#264C39',aW(0x283),'#13261C','#00FFBF','#7FFFDF','#00A57C','#52A591','#007F5F','#3F7F6F','#004C39','#264C42','#00261C',aW(0x299),'#00FFFF','#7FFFFF','#00A5A5',aW(0x202),'#007F7F','#3F7F7F','#004C4C',aW(0x1f3),'#002626','#132626','#00BFFF',aW(0x1e2),aW(0x2a7),'#5291A5','#005F7F','#3F6F7F','#00394C','#26424C','#001C26','#132126','#007FFF',aW(0x2be),'#0052A5','#527CA5','#003F7F',aW(0x1df),'#00264C',aW(0x26f),'#001326',aW(0x271),'#003FFF',aW(0x2b8),aW(0x2d0),aW(0x2eb),'#001F7F','#3F4F7F','#00134C','#262F4C','#000926','#131726',aW(0x1d1),'#7F7FFF','#0000A5',aW(0x2ce),'#00007F','#3F3F7F','#00004C','#26264C','#000026',aW(0x1f1),'#3F00FF','#9F7FFF',aW(0x223),'#6752A5','#1F007F',aW(0x258),aW(0x253),aW(0x238),aW(0x21b),'#171326',aW(0x1d2),'#BF7FFF','#5200A5',aW(0x216),'#3F007F','#5F3F7F','#26004C',aW(0x21d),'#130026','#1C1326','#BF00FF',aW(0x24c),'#7C00A5','#9152A5','#5F007F',aW(0x2a6),'#39004C','#42264C','#1C0026','#211326','#FF00FF','#FF7FFF','#A500A5','#A552A5',aW(0x1d8),'#7F3F7F','#4C004C','#4C264C','#260026','#261326','#FF00BF','#FF7FDF','#A5007C','#A55291','#7F005F','#7F3F6F',aW(0x1cc),'#4C2642','#26001C','#261321','#FF007F','#FF7FBF','#A50052','#A5527C','#7F003F','#7F3F5F','#4C0026','#4C2639','#260013','#26131C','#FF003F','#FF7F9F','#A50029','#A55267','#7F001F',aW(0x1f2),'#4C0013','#4C262F',aW(0x25f),'#261317','#333333',aW(0x2c3),'#696969','#828282',aW(0x2c5),'#FFFFFF'];function Ft(c){if(!(c===0x0||c===0x100)&&!(c<0x0||c>0xff))return vt[c];}var E={'dark':{'backgroundColor':'#1a1a2e','defaultEntityColor':'#ffffff','selectionColor':'#00ff88','measureColor':'#ffaa00','gridColor':'#333333','crosshairColor':'#555555'},'light':{'backgroundColor':'#ffffff','defaultEntityColor':'#000000','selectionColor':'#0066ff','measureColor':'#ff6600','gridColor':'#dddddd','crosshairColor':aW(0x240)}};function W(c,d,f){const bQ=aW;return[d*c[bQ(0x2cc)]+c['offsetX'],-f*c['scale']+c['offsetY']];}function q(c,d,f){const bR=aW;return[(d-c[bR(0x25b)])/c['scale'],-(f-c['offsetY'])/c['scale']];}function me(c,d){const bS=aW,f=window['devicePixelRatio']||0x1;c['setTransform'](d['scale']*f,0x0,0x0,-d['scale']*f,d[bS(0x25b)]*f,d['offsetY']*f);}function xt(g,k,m,v,w,x,z=0.05){const A=w-m,C=x-v;if(A<=0x0||C<=0x0)return{'scale':0x1,'offsetX':g/0x2,'offsetY':k/0x2};const D=g/A,F=k/C,I=Math['min'](D,F)*(0x1-z*0x2),L=(m+w)/0x2,M=(v+x)/0x2,N=g/0x2-L*I,V=k/0x2+M*I;return{'scale':I,'offsetX':N,'offsetY':V};}function kt(c,d,f,g,h=0.0001,k=0x186a0){const bT=aW,l=Math['max'](h,Math[bT(0x229)](k,c['scale']*g)),m=l/c['scale'];return{'scale':l,'offsetX':d-(d-c['offsetX'])*m,'offsetY':f-(f-c[bT(0x29b)])*m};}var yt=class{['transform']={'scale':0x1,'offsetX':0x0,'offsetY':0x0};['minScale'];[aW(0x297)];constructor(c){this['minScale']=c['minZoom'],this['maxScale']=c['maxZoom'];}[aW(0x249)](){return this['transform'];}[aW(0x29e)](c){this['transform']=c;}['pan'](c,d){this['transform']={...this['transform'],'offsetX':this['transform']['offsetX']+c,'offsetY':this['transform']['offsetY']+d};}['zoom'](c,d,f){const bU=aW;this[bU(0x227)]=kt(this['transform'],c,d,f,this['minScale'],this['maxScale']);}};function ge(c,d){const bV=aW;return c===0x7?d==='dark'?'#ffffff':'#000000':Ft(c)??bV(0x2b2);}function se(d,f,g,h){const bW=aW;if(d['trueColor']!==void 0x0){const l=d['trueColor']>>0x10&0xff,m=d['trueColor']>>0x8&0xff,p=d['trueColor']&0xff;return'rgb('+l+','+m+','+p+')';}if(d['color']===0x0)return h??E[g]['defaultEntityColor'];if(d['color']!==0x100)return ge(d['color'],g);const k=f['get'](d[bW(0x1e9)]);if(k){if(k['trueColor']!==void 0x0){const v=k[bW(0x1a8)]>>0x10&0xff,w=k['trueColor']>>0x8&0xff,x=k[bW(0x1a8)]&0xff;return bW(0x2ab)+v+','+w+','+x+')';}const u=Math['abs'](k['color']);return ge(u,g);}return E[g]['defaultEntityColor'];}function Pt(c,d){const bX=aW;c['beginPath'](),c[bX(0x20b)](d['start']['x'],d['start']['y']),c['lineTo'](d['end']['x'],d['end']['y']),c['stroke']();}function wt(c,d){const bY=aW;d['radius']<=0x0||(c['beginPath'](),c['arc'](d[bY(0x1e8)]['x'],d[bY(0x1e8)]['y'],d['radius'],0x0,Math['PI']*0x2),c['stroke']());}function It(c,d){const bZ=aW;if(d['radius']<=0x0)return;const f=d['startAngle']*Math['PI']/0xb4,g=d['endAngle']*Math['PI']/0xb4;c['beginPath'](),c[bZ(0x2ef)](d['center']['x'],d[bZ(0x1e8)]['y'],d['radius'],f,g,!0x1),c['stroke']();}function Mt(k,w,z,A,C){const c0=aW,D=z-k,I=A-w,L=Math['sqrt'](D*D+I*I);if(L<1e-10)return{'cx':k,'cy':w,'radius':0x0,'startAngle':0x0,'endAngle':0x0,'anticlockwise':!0x1};const M=Math[c0(0x218)](C)*L/0x2,N=((L/0x2)**0x2+M**0x2)/(0x2*M),V=(k+z)/0x2,X=(w+A)/0x2,Y=-I/L,a0=D/L,a1=N-M,a2=C>0x0?0x1:-0x1,a3=V+a2*a1*Y,a4=X+a2*a1*a0,a5=Math['atan2'](w-a4,k-a3),a6=Math['atan2'](A-a4,z-a3),a7=C<0x0;return{'cx':a3,'cy':a4,'radius':N,'startAngle':a5,'endAngle':a6,'anticlockwise':a7};}function H(c,d,f,g,h,k){const c1=aW,l=Mt(d,f,g,h,k);if(l['radius']<1e-10){c[c1(0x1be)](g,h);return;}c['arc'](l['cx'],l['cy'],l[c1(0x28f)],l['startAngle'],l['endAngle'],l['anticlockwise']);}function Tt(c,d){const c2=aW,f=d['vertices'];if(f['length']<0x2)return;c[c2(0x1c7)](),c['moveTo'](f[0x0]['x'],f[0x0]['y']);const g=d['closed']?f['length']:f['length']-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f[c2(0x1d0)]];Math['abs'](k[c2(0x250)])<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],k['bulge']);}c['stroke']();}function Et(c,d){const c3=aW,f=d['vertices'];if(f[c3(0x1d0)]<0x2)return;c['beginPath'](),c['moveTo'](f[0x0]['x'],f[0x0]['y']);const g=d['closed']?f['length']:f['length']-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f[c3(0x1d0)]],m=k['bulge']??0x0;Math['abs'](m)<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}c['stroke']();}function At(c,d){const c4=aW,f=Math['sqrt'](d['majorAxis']['x']**0x2+d['majorAxis']['y']**0x2+d['majorAxis']['z']**0x2);if(f<1e-10||d['minorRatio']<=0x0)return;const g=f*d['minorRatio'],h=Math['atan2'](d[c4(0x1a5)]['y'],d['majorAxis']['x']);c['beginPath'](),c[c4(0x27c)](d['center']['x'],d['center']['y'],f,g,h,d['startParam'],d['endParam'],!0x1),c['stroke']();}function St(k,w,x,z,A){const c5=aW,C=w['length']-0x1;let D=k;for(;D<C&&x[D+0x1]<=z;)D++;const F=[],I=[];for(let L=0x0;L<=k;L++){const M=D-k+L;F['push']({...w[M]}),I['push'](A?A[M]:0x1);}for(let N=0x1;N<=k;N++)for(let V=k;V>=N;V--){const X=D-k+V,Y=x[X+k-N+0x1]-x[X];if(Math[c5(0x218)](Y)<1e-10)continue;const a0=(z-x[X])/Y,a1=F[V],a2=F[V-0x1];if(A){const a3=I[V-0x1]*(0x1-a0),a4=I[V]*a0,a5=a3+a4;if(Math[c5(0x218)](a5)<1e-10)continue;a1['x']=(a2['x']*a3+a1['x']*a4)/a5,a1['y']=(a2['y']*a3+a1['y']*a4)/a5,a1['z']=(a2['z']*a3+a1['z']*a4)/a5,I[V]=a5;}else a1['x']=(0x1-a0)*a2['x']+a0*a1['x'],a1['y']=(0x1-a0)*a2['y']+a0*a1['y'],a1['z']=(0x1-a0)*a2['z']+a0*a1['z'];}return F[k]??{'x':0x0,'y':0x0,'z':0x0};}function Ct(g){const c6=aW;if(g[c6(0x1d0)]<0x2)return g['map'](v=>({'x':v['x'],'y':v['y']}));const k=[],m=g[c6(0x1d0)],p=0xa;for(let v=0x0;v<m-0x1;v++){const w=g[Math['max'](0x0,v-0x1)],x=g[v],z=g[Math['min'](m-0x1,v+0x1)],A=g[Math['min'](m-0x1,v+0x2)];for(let C=0x0;C<=(v===m-0x2?p:p-0x1);C++){const D=C/p,F=D*D,I=F*D,L=0.5*(0x2*x['x']+(-w['x']+z['x'])*D+(0x2*w['x']-0x5*x['x']+0x4*z['x']-A['x'])*F+(-w['x']+0x3*x['x']-0x3*z['x']+A['x'])*I),M=0.5*(0x2*x['y']+(-w['y']+z['y'])*D+(0x2*w['y']-0x5*x['y']+0x4*z['y']-A['y'])*F+(-w['y']+0x3*x['y']-0x3*z['y']+A['y'])*I);k['push']({'x':L,'y':M});}}return k;}function Ie(d,f){const c7=aW;if(d['degree']===0x1)return d['controlPoints']['map'](w=>({'x':w['x'],'y':w['y']}));if(d[c7(0x1a9)]['length']===0x0&&d['fitPoints']['length']>=0x2)return Ct(d[c7(0x1b4)]);if(d['controlPoints']['length']<d['degree']+0x1)return[];if(d['knots']['length']<d['controlPoints'][c7(0x1d0)]+d['degree']+0x1)return[];const g=[],k=d['knots'][d[c7(0x279)]],m=d['knots'][d['knots']['length']-d['degree']-0x1];if(m<=k)return[];const p=Math['max'](d['controlPoints'][c7(0x1d0)]*0xa,Math[c7(0x243)]((m-k)/f)),u=Math['min'](p,0x1388),v=d[c7(0x211)]['length']>0x0?d['weights']:void 0x0;for(let w=0x0;w<=u;w++){const x=k+(m-k)*(w/u),z=St(d['degree'],d[c7(0x1a9)],d['knots'],x,v);g['push']({'x':z['x'],'y':z['y']});}return g;}function Dt(c,d,f){const g=Ie(d,f);if(!(g['length']<0x2)){c['beginPath'](),c['moveTo'](g[0x0]['x'],g[0x0]['y']);for(let h=0x1;h<g['length'];h++)c['lineTo'](g[h]['x'],g[h]['y']);d['flags']&0x1&&c['closePath'](),c['stroke']();}}var Lt={'standard':'Arial,\x20sans-serif','arial':'Arial,\x20sans-serif','arial.ttf':'Arial,\x20sans-serif','romans.shx':'\x22Courier\x20New\x22,\x20monospace','simplex.shx':'\x22Courier\x20New\x22,\x20monospace','txt.shx':aW(0x262),'monotxt.shx':'monospace','isocp.shx':'\x22Courier\x20New\x22,\x20monospace','isocpeur.shx':aW(0x1d6),'times.ttf':'\x22Times\x20New\x20Roman\x22,\x20serif','timesnr.ttf':'\x22Times\x20New\x20Roman\x22,\x20serif','gothic.ttf':'\x22Century\x20Gothic\x22,\x20sans-serif'};function Me(c){const d=c['toLowerCase']()['trim']();return Lt[d]||'sans-serif';}function Nt(d,f,g){const c8=aW;if(!f['text']||f['height']<g*0x4)return;const k=f['hAlign']!==0x0||f['vAlign']!==0x0,l=k&&f['alignmentPoint']?f[c8(0x246)]['x']:f['insertionPoint']['x'],m=k&&f[c8(0x246)]?f['alignmentPoint']['y']:f['insertionPoint']['y'];if(d['save'](),d['translate'](l,m),d['scale'](0x1,-0x1),f['rotation']&&d[c8(0x1d9)](-f['rotation']*Math['PI']/0xb4),f['widthFactor']!==0x1&&d['scale'](f[c8(0x1a2)],0x1),f[c8(0x2d7)]){const w=Math['tan'](f['obliqueAngle']*Math['PI']/0xb4);d[c8(0x227)](0x1,0x0,w,0x1,0x0,0x0);}const p=(f['generationFlags']&0x2)!==0x0,u=(f['generationFlags']&0x4)!==0x0;p&&d[c8(0x2cc)](-0x1,0x1),u&&d['scale'](0x1,-0x1);const v=Me(f[c8(0x245)]||'Standard');switch(d['font']=f['height']+'px\x20'+v,f['hAlign']){case 0x0:d['textAlign']='left';break;case 0x1:d['textAlign']='center';break;case 0x2:d['textAlign']='right';break;case 0x3:d[c8(0x1ba)]='left';break;case 0x4:d['textAlign']='center';break;case 0x5:d[c8(0x1ba)]='left';break;default:d[c8(0x1ba)]='left';}switch(f['vAlign']){case 0x0:d['textBaseline']='alphabetic';break;case 0x1:d['textBaseline']='bottom';break;case 0x2:d['textBaseline']='middle';break;case 0x3:d['textBaseline']=c8(0x212);break;default:d[c8(0x225)]='alphabetic';}d['fillText'](f['text'],0x0,0x0),d['restore']();}function Bt(c){return c['replace'](/\\P/g,'\x0a')['replace'](/\\[fFHWQTCAaLlOoKk][^;]*;/g,'')['replace'](/\\\\/g,'\x5c')['replace'](/\\~/g,'\u00a0')['replace'](/\{/g,'')['replace'](/\}/g,'')['replace'](/\\S[^;]*;/g,'')['trim']();}function Xt(g,k,m){const c9=aW;if(!k['text']||k['height']<m*0x4)return;g['save'](),g['translate'](k['insertionPoint']['x'],k['insertionPoint']['y']),g['scale'](0x1,-0x1);const p=k['textDirection']?Math['atan2'](k['textDirection']['y'],k[c9(0x2e8)]['x']):(k['rotation']||0x0)*Math['PI']/0xb4;p&&g['rotate'](-p);const r=Bt(k['text'])['split']('\x0a'),v=k['height']*(k['lineSpacingFactor']||1.4),w=Me(k[c9(0x245)]||c9(0x1f8));g[c9(0x247)]=k['height']+c9(0x1fe)+w;const x=(k['attachmentPoint']-0x1)%0x3,z=Math['floor']((k['attachmentPoint']-0x1)/0x3),A=['left','center','right'];g['textAlign']=A[x]??'left';let C=0x0;const D=r['length']*v;switch(z){case 0x0:C=k['height'];break;case 0x1:C=k[c9(0x2ea)]-D/0x2;break;case 0x2:C=k['height']-D;break;}for(let F=0x0;F<r['length'];F++)g['fillText'](r[F],0x0,C+F*v);g['restore']();}var Yt=0x64;function zt(f,g,k,m=0x0){const cb=aW;if(m>Yt)return null;if(k['has'](f))return k['get'](f);const p=g['blocks']['get'](f);if(!p)return k['set'](f,null),null;k['set'](f,null);let v=0x1/0x0,w=0x1/0x0,x=-0x1/0x0,z=-0x1/0x0,A=!0x1;for(const D of p['entities']){let F;D['type']==='INSERT'?F=Te(D,g,k,m+0x1):F=B(D),F&&(A=!0x0,v=Math[cb(0x229)](v,F['minX']),w=Math['min'](w,F['minY']),x=Math['max'](x,F['maxX']),z=Math[cb(0x2a3)](z,F['maxY']));}const C=A?{'minX':v,'minY':w,'maxX':x,'maxY':z}:null;return k['set'](f,C),C;}function Te(a0,a1,a2,a3=0x0){const cc=aW,a4=zt(a0['blockName'],a1,a2,a3);if(!a4)return null;const a5=a1['blocks']['get'](a0['blockName']);if(!a5)return null;const a6=a5['basePoint']['x'],a7=a5['basePoint']['y'];let a8=a4['minX']-a6,a9=a4['minY']-a7,ab=a4[cc(0x2a5)]-a6,ac=a4['maxY']-a7;const ad=a0['scaleX'],af=a0['scaleY'];let ag=a8*ad,ah=ab*ad,ai=a9*af,aj=ac*af;if(ag>ah){const ax=ag;ag=ah,ah=ax;}if(ai>aj){const ay=ai;ai=aj,aj=ay;}const ak=(a0['rotation']||0x0)*Math['PI']/0xb4;if(Math['abs'](ak)<1e-10){const az=a0['insertionPoint']['x'],aA=a0['insertionPoint']['y'];let aB=ag+az,aC=ai+aA,aD=ah+az,aE=aj+aA;const aF=Math[cc(0x2a3)](0x1,a0['columnCount']),aG=Math['max'](0x1,a0['rowCount']);if(aF>0x1||aG>0x1){const aH=(aF-0x1)*a0['columnSpacing'],aI=(aG-0x1)*a0['rowSpacing'];aB=Math['min'](aB,aB+aH),aD=Math['max'](aD,aD+aH),aC=Math['min'](aC,aC+aI),aE=Math['max'](aE,aE+aI);}return{'minX':aB,'minY':aC,'maxX':aD,'maxY':aE};}const al=Math[cc(0x2bc)](ak),am=Math['sin'](ak),an=[{'x':ag,'y':ai},{'x':ah,'y':ai},{'x':ah,'y':aj},{'x':ag,'y':aj}],ao=a0[cc(0x281)]['x'],ap=a0['insertionPoint']['y'];let aq=0x1/0x0,ar=0x1/0x0,as=-0x1/0x0,au=-0x1/0x0;for(const aJ of an){const aK=aJ['x']*al-aJ['y']*am+ao,aL=aJ['x']*am+aJ['y']*al+ap;aq=Math['min'](aq,aK),ar=Math[cc(0x229)](ar,aL),as=Math['max'](as,aK),au=Math['max'](au,aL);}const av=Math['max'](0x1,a0[cc(0x1e7)]),aw=Math[cc(0x2a3)](0x1,a0['rowCount']);if(av>0x1||aw>0x1){const aM=(av-0x1)*a0['columnSpacing'],aN=(aw-0x1)*a0['rowSpacing'],aO=[{'x':0x0,'y':0x0},{'x':aM,'y':0x0},{'x':aM,'y':aN},{'x':0x0,'y':aN}];for(const aP of aO){const aQ=aP['x']*al-aP['y']*am,aR=aP['x']*am+aP['y']*al;aq=Math['min'](aq,aq+aQ),ar=Math['min'](ar,ar+aR),as=Math['max'](as,as+aQ),au=Math['max'](au,au+aR);}}return{'minX':aq,'minY':ar,'maxX':as,'maxY':au};}function Rt(d,f){const cd=aW;let g=0x1/0x0,k=0x1/0x0,l=-0x1/0x0,m=-0x1/0x0,p=!0x1;const u=f?new Map():void 0x0;for(const v of d){const w=f&&u?Ee(v,f,u):B(v);w&&(p=!0x0,g=Math['min'](g,w['minX']),k=Math['min'](k,w['minY']),l=Math['max'](l,w['maxX']),m=Math['max'](m,w[cd(0x269)]));}return p?{'minX':g,'minY':k,'maxX':l,'maxY':m}:null;}function Ee(c,d,f){const ce=aW;return c['type']===ce(0x295)?Te(c,d,f):B(c);}var Q=null;function Ot(c){const cf=aW,d=new Map();for(const [f,g]of c['blocks']){const h=new Array(g['entities']['length']);for(let i=0x0;i<g['entities']['length'];i++)h[i]=B(g['entities'][i]);d[cf(0x215)](f,h);}return d;}function _t(c){Q=c;}function ve(){Q=null;}function Wt(c,d){if(!Q)return;const f=Q['get'](c);if(!(!f||d>=f['length']))return f[d];}function B(c){const cg=aW;switch(c['type']){case'LINE':return{'minX':Math['min'](c['start']['x'],c['end']['x']),'minY':Math['min'](c['start']['y'],c['end']['y']),'maxX':Math[cg(0x2a3)](c['start']['x'],c['end']['x']),'maxY':Math['max'](c[cg(0x1fa)]['y'],c['end']['y'])};case cg(0x221):return{'minX':c['center']['x']-c['radius'],'minY':c['center']['y']-c['radius'],'maxX':c['center']['x']+c['radius'],'maxY':c['center']['y']+c[cg(0x28f)]};case cg(0x23a):return{'minX':c['center']['x']-c['radius'],'minY':c['center']['y']-c['radius'],'maxX':c['center']['x']+c[cg(0x28f)],'maxY':c['center']['y']+c['radius']};case'LWPOLYLINE':case'POLYLINE':{if(c[cg(0x2f3)]['length']===0x0)return null;let d=0x1/0x0,f=0x1/0x0,g=-0x1/0x0,h=-0x1/0x0;for(const k of c[cg(0x2f3)])d=Math['min'](d,k['x']),f=Math['min'](f,k['y']),g=Math['max'](g,k['x']),h=Math['max'](h,k['y']);return{'minX':d,'minY':f,'maxX':g,'maxY':h};}case'ELLIPSE':{const l=Math[cg(0x284)](c['majorAxis']['x']**0x2+c[cg(0x1a5)]['y']**0x2);return{'minX':c['center']['x']-l,'minY':c['center']['y']-l,'maxX':c[cg(0x1e8)]['x']+l,'maxY':c['center']['y']+l};}case cg(0x2c1):return{'minX':c['insertionPoint']['x'],'minY':c[cg(0x281)]['y'],'maxX':c[cg(0x281)]['x']+c['height']*c['text']['length']*0.6,'maxY':c['insertionPoint']['y']+c['height']};case'MTEXT':return{'minX':c[cg(0x281)]['x'],'minY':c['insertionPoint']['y']-c['height'],'maxX':c['insertionPoint']['x']+(c[cg(0x1b2)]||c['height']*0xa),'maxY':c[cg(0x281)]['y']+c['height']};case'SPLINE':{if(c['controlPoints'][cg(0x1d0)]===0x0)return null;let m=0x1/0x0,p=0x1/0x0,u=-0x1/0x0,v=-0x1/0x0;for(const w of c['controlPoints'])m=Math['min'](m,w['x']),p=Math[cg(0x229)](p,w['y']),u=Math['max'](u,w['x']),v=Math['max'](v,w['y']);return{'minX':m,'minY':p,'maxX':u,'maxY':v};}case'POINT':return{'minX':c['position']['x'],'minY':c['position']['y'],'maxX':c['position']['x'],'maxY':c['position']['y']};case'INSERT':return{'minX':c['insertionPoint']['x'],'minY':c['insertionPoint']['y'],'maxX':c['insertionPoint']['x'],'maxY':c[cg(0x281)]['y']};case'DIMENSION':return c['defPoint']?{'minX':Math['min'](c['defPoint']['x'],c[cg(0x205)]?.['x']??c['defPoint']['x'],c['defPoint3']?.['x']??c['defPoint']['x']),'minY':Math['min'](c['defPoint']['y'],c['defPoint2']?.['y']??c['defPoint']['y'],c['defPoint3']?.['y']??c['defPoint']['y']),'maxX':Math['max'](c[cg(0x289)]['x'],c['defPoint2']?.['x']??c[cg(0x289)]['x'],c['defPoint3']?.['x']??c['defPoint']['x']),'maxY':Math['max'](c['defPoint']['y'],c['defPoint2']?.['y']??c['defPoint']['y'],c['defPoint3']?.['y']??c['defPoint']['y'])}:null;case'HATCH':{let x=0x1/0x0,z=0x1/0x0,A=-0x1/0x0,C=-0x1/0x0,D=!0x1;for(const F of c['boundaryPaths'])if(F['vertices']){for(const I of F['vertices'])D=!0x0,x=Math['min'](x,I['x']),z=Math['min'](z,I['y']),A=Math['max'](A,I['x']),C=Math['max'](C,I['y']);}return D?{'minX':x,'minY':z,'maxX':A,'maxY':C}:null;}default:return null;}}var $t=new Set(['LINE','ARC','CIRCLE','LWPOLYLINE','POLYLINE','ELLIPSE','SPLINE']);function Ae(c){return $t['has'](c);}function jt(c,d){const ch=aW;c['moveTo'](d['start']['x'],d[ch(0x1fa)]['y']),c[ch(0x1be)](d['end']['x'],d['end']['y']);}function qt(c,d){const ci=aW;if(d[ci(0x28f)]<=0x0)return;const f=d['startAngle']*Math['PI']/0xb4,g=d['endAngle']*Math['PI']/0xb4;c['moveTo'](d[ci(0x1e8)]['x']+d['radius']*Math['cos'](f),d['center']['y']+d[ci(0x28f)]*Math['sin'](f)),c['arc'](d['center']['x'],d['center']['y'],d['radius'],f,g,!0x1);}function Ht(c,d){const cj=aW;d[cj(0x28f)]<=0x0||(c['moveTo'](d['center']['x']+d['radius'],d['center']['y']),c['arc'](d[cj(0x1e8)]['x'],d['center']['y'],d['radius'],0x0,Math['PI']*0x2));}function Vt(c,d){const f=d['vertices'];if(f['length']<0x2)return;c['moveTo'](f[0x0]['x'],f[0x0]['y']);const g=d['closed']?f['length']:f['length']-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f['length']];Math['abs'](k['bulge'])<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],k['bulge']);}}function Ut(c,d){const ck=aW,f=d['vertices'];if(f['length']<0x2)return;c['moveTo'](f[0x0]['x'],f[0x0]['y']);const g=d['closed']?f['length']:f['length']-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f['length']],m=k['bulge']??0x0;Math['abs'](m)<1e-10?c[ck(0x1be)](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}}function Gt(d,f){const cl=aW,g=Math['sqrt'](f[cl(0x1a5)]['x']**0x2+f['majorAxis']['y']**0x2+f['majorAxis']['z']**0x2);if(g<1e-10||f['minorRatio']<=0x0)return;const h=g*f['minorRatio'],k=Math['atan2'](f['majorAxis']['y'],f['majorAxis']['x']),l=Math['cos'](k),m=Math['sin'](k),p=Math['cos'](f['startParam']),u=Math['sin'](f[cl(0x1aa)]);d['moveTo'](f['center']['x']+g*l*p-h*m*u,f['center']['y']+g*m*p+h*l*u),d['ellipse'](f['center']['x'],f['center']['y'],g,h,k,f[cl(0x1aa)],f['endParam'],!0x1);}function Zt(c,d,f){const cm=aW,g=Ie(d,f);if(!(g['length']<0x2)){c['moveTo'](g[0x0]['x'],g[0x0]['y']);for(let h=0x1;h<g['length'];h++)c[cm(0x1be)](g[h]['x'],g[h]['y']);d['flags']&0x1&&c['closePath']();}}function Se(c,d,f){const cn=aW;switch(d['type']){case'LINE':jt(c,d);break;case'ARC':qt(c,d);break;case'CIRCLE':Ht(c,d);break;case'LWPOLYLINE':Vt(c,d);break;case'POLYLINE':Ut(c,d);break;case cn(0x1c5):Gt(c,d);break;case'SPLINE':Zt(c,d,f);break;}}var Kt=0x64,Qt=0.5;function Ce(k,z,A,I,L,M,N=0x0,X){const co=aW;if(N>Kt)return;const Y=A['blocks']['get'](z['blockName']);if(!Y)return;const a0=Math['max'](0x1,z[co(0x1e7)]),a1=Math['max'](0x1,z[co(0x1c9)]);for(let a2=0x0;a2<a1;a2++)for(let a3=0x0;a3<a0;a3++){k['save']();const a4=z['insertionPoint']['x']+a3*z['columnSpacing'],a5=z['insertionPoint']['y']+a2*z[co(0x2dd)];k['translate'](a4,a5),z['rotation']&&k[co(0x1d9)](z['rotation']*Math['PI']/0xb4),k['scale'](z['scaleX'],z['scaleY']),k['translate'](-Y['basePoint']['x'],-Y['basePoint']['y']);const a6=Math['max'](Math['abs'](z[co(0x28b)]),Math['abs'](z['scaleY'])),a7=M/(a6||0x1);let a8=null;const a9=Y['entities'];for(let ab=0x0;ab<a9['length'];ab++){const ac=a9[ab];if(ac[co(0x23d)]!=='INSERT'){const af=Wt(z['blockName'],ab),ag=af!==void 0x0?af:B(ac);if(ag){const ah=Math['max'](ag['maxX']-ag[co(0x2d4)],ag['maxY']-ag['minY']);if(ah>0x0&&ah/a7<Qt)continue;}}const ad=se(ac,A['layers'],L);ac['type']!=='INSERT'&&Ae(ac['type'])?(ad!==a8&&(a8!==null&&(k['stroke'](),X&&X['drawCalls']++),a8=ad,k['beginPath'](),k[co(0x27e)]=ad,k['lineWidth']=a7),Se(k,ac,a7),X&&(X['byType'][ac['type']]=(X['byType'][ac[co(0x23d)]]??0x0)+0x1)):(a8!==null&&(k[co(0x2d5)](),X&&X['drawCalls']++,a8=null),k['strokeStyle']=ad,k[co(0x1f4)]=ad,k['lineWidth']=a7,ac['type']===co(0x295)?Ce(k,ac,A,I,L,a7,N+0x1,X):J(k,ac,A,I,L,a7,X));}a8!==null&&(k['stroke'](),X&&X['drawCalls']++),k[co(0x2cb)]();}}function Jt(d,f,g,k,l,m,p){const cp=aW;if(f['blockName']){const u=g['blocks']['get'](f['blockName']);if(u){for(const v of u['entities']){const w=se(v,g['layers'],l);d['strokeStyle']=w,d['fillStyle']=w,d['lineWidth']=m,J(d,v,g,k,l,m,p);}return;}}f[cp(0x205)]&&f['defPoint3']&&(d['beginPath'](),d['moveTo'](f['defPoint2']['x'],f['defPoint2']['y']),d['lineTo'](f['defPoint']['x'],f['defPoint']['y']),d['stroke'](),d['beginPath'](),d[cp(0x20b)](f[cp(0x27b)]['x'],f['defPoint3']['y']),d[cp(0x1be)](f[cp(0x289)]['x'],f['defPoint']['y']),d['stroke']());}function ea(c,d){const cq=aW;if(d['boundaryPaths']['length']!==0x0){c['beginPath']();for(const f of d['boundaryPaths'])if(f['type']==='polyline'&&f['vertices']&&f['vertices']['length']>0x0){const g=f['vertices'][0x0];c[cq(0x20b)](g['x'],g['y']);for(let h=0x1;h<f['vertices']['length'];h++){const k=f[cq(0x2f3)][h-0x1],l=f['vertices'][h],m=f['bulges']?.[h-0x1]??0x0;Math['abs'](m)<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}f[cq(0x24b)]&&c['closePath']();}else{if(f['type']==='edges'&&f['edges'])for(let p=0x0;p<f['edges']['length'];p++){const u=f['edges'][p];if(u['type']==='line')p===0x0&&c[cq(0x20b)](u[cq(0x1fa)]['x'],u[cq(0x1fa)]['y']),c['lineTo'](u['end']['x'],u[cq(0x26a)]['y']);else{if(u['type']==='arc'){if(p===0x0){const v=u['center']['x']+u['radius']*Math['cos'](u['startAngle']*Math['PI']/0xb4),w=u['center']['y']+u['radius']*Math['sin'](u['startAngle']*Math['PI']/0xb4);c['moveTo'](v,w);}c[cq(0x2ef)](u['center']['x'],u['center']['y'],u['radius'],u['startAngle']*Math['PI']/0xb4,u['endAngle']*Math['PI']/0xb4,!u['ccw']);}}}}d['solidFill']&&(c['globalAlpha']=0.3,c['fill'](cq(0x2b1)),c['globalAlpha']=0x1),c['stroke']();}}function ta(c,d,f){const cr=aW,g=f*0x3;c['beginPath'](),c['arc'](d[cr(0x210)]['x'],d['position']['y'],g,0x0,Math['PI']*0x2),c['fill']();}function J(c,d,f,g,h,k,l){const cs=aW;switch(l&&(l[cs(0x206)]++,l[cs(0x1f6)][d[cs(0x23d)]]=(l[cs(0x1f6)][d['type']]??0x0)+0x1),d[cs(0x23d)]){case'LINE':Pt(c,d);break;case'CIRCLE':wt(c,d);break;case'ARC':It(c,d);break;case cs(0x1cd):Tt(c,d);break;case'POLYLINE':Et(c,d);break;case cs(0x1c5):At(c,d);break;case'SPLINE':Dt(c,d,k);break;case'TEXT':Nt(c,d,k);break;case'MTEXT':Xt(c,d,k);break;case'INSERT':Ce(c,d,f,g,h,k,0x0,l);break;case'DIMENSION':Jt(c,d,f,g,h,k,l);break;case'HATCH':ea(c,d);break;case'POINT':ta(c,d,k);break;}}function a(){const dI=['#004C26','emitter','now','restore','scale','listeners','#5252A5','8AwOyLH','#0029A5','renderEmpty','renderer','31006950OuosBd','minX','stroke','shift_jis','obliqueAngle','toBBox','#007F00','endAngle','leaf','minorRatio','rowSpacing','entities','POINT','preventDefault','buildDebugStats','_adjustParentBBoxes','log','collides','handlePointerUp','#808080','973JGpoPN','textDirection','loadedFileName','height','#5267A5','panTo','spatialIndexBuildTime','TABLE','arc','startTangent','getContext','defPoint5','vertices','measure','entitiesSkipped','1403084bQIbtj','#DFFF7F','widthFactor','isFrozen','visibility','majorAxis','lastX','\x20/\x20','trueColor','controlPoints','startParam','children','lineTypes','#BFFF7F','load','viewportBounds','render','indexOf','width','lastY','fitPoints','colorOverrides','leaderLength','basePoint','endTangent','atan2','textAlign','add','#3FFF00','startAngle','lineTo','knots','File:\x20','stopDebugLoop','from','emit','pointerup','ELLIPSE','text/javascript','beginPath','dwgCodePage','rowCount','match','#4C1300','#4C0039','LWPOLYLINE','#262113','38382TvICLV','length','#0000FF','#7F00FF','worker','15IPAXwm','loadGeneration','\x22Courier\x20New\x22,\x20monospace','#132600','#7F007F','rotate','inputHandler','blobUrl','theme','has','viewchange','#3F5F7F','#A59152','guardDestroyed','#7FDFFF','clear','layers','5679846rzinaX','#00FF7F','columnCount','center','layer','dimType','onPointerUp','showTimings','devicePixelRatio','hypot','name','$HANDSEED','#131326','#7F3F4F','#264C4C','fillStyle','contextmenu','byType','button','Standard','runConverters','start','pop','*Paper_Space','constantWidth','px\x20','onTouchMove','doRender','1346076lJYMhE','#52A5A5','spatialIndex','entityBBoxes','defPoint2','drawCalls','handleTouchEnd','vAlign','renderPending','identifier','moveTo','textMidpoint','entitiesDrawn','isArray','requestRender','position','weights','top','selectionColor','top-left','set','#7C52A5','resolve','abs','Continuous','#3F7F00','#090026','950943NVzJqp','#39264C','#007F3F','Binary\x20DXF\x20format\x20is\x20not\x20supported.\x20Please\x20export\x20as\x20ASCII\x20DXF.','lineWidth','CIRCLE','wheel','#2900A5','handleClick','textBaseline','extrusion','transform','data','min','viewer','defPoint4','visible','backgroundColor','totalLoadTime','text','_chooseSplitAxis','$LTSCALE','getWidth','#A57C52','push','camera','value','state','#2F264C','visibleCache','ARC','_build','#7FFF9F','type','arrayBuffer','LINE','#cccccc','edges','sin','ceil','blockName','style','alignmentPoint','font','parseWithOptionalWorker','getTransform','round','isClosed','#DF7FFF','styles','\x22use\x20strict\x22;(()=>{function\x20h(a){let\x20e=a.replace(/\x5cr\x5cn?/g,`\x0a`),t=[],r=e.length,n=0;for(;n<r;){for(;n<r&&e.charCodeAt(n)===10;)n++;if(n>=r)break;let\x20o=e.indexOf(`\x0a`,n);o===-1&&(o=r);let\x20c=e.substring(n,o).trim();n=o+1;let\x20s=parseInt(c,10);if(isNaN(s)){n<r&&(o=e.indexOf(`\x0a`,n),o===-1&&(o=r),n=o+1);continue}if(n>=r)break;o=e.indexOf(`\x0a`,n),o===-1&&(o=r);let\x20p=e.substring(n,o).replace(/\x5cs+$/,\x22\x22);n=o+1,t.push({code:s,value:p})}return\x20t}function\x20m(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDSEC\x22)return\x20e+1;if(r.code===9){let\x20n=r.value;switch(e++,n){case\x22$ACADVER\x22:e<a.length&&(t.acadVersion=a[e].value,e++);break;case\x22$EXTMIN\x22:if(e<a.length){let\x20o=v(a,e);t.extMin=o.point,e=o.nextIndex}break;case\x22$EXTMAX\x22:if(e<a.length){let\x20o=v(a,e);t.extMax=o.point,e=o.nextIndex}break;case\x22$INSUNITS\x22:e<a.length&&(t.insUnits=parseInt(a[e].value,10),e++);break;case\x22$MEASUREMENT\x22:e<a.length&&(t.measurement=parseInt(a[e].value,10),e++);break;case\x22$LTSCALE\x22:e<a.length&&(t.ltScale=parseFloat(a[e].value),e++);break;case\x22$DWGCODEPAGE\x22:e<a.length&&(t.dwgCodePage=a[e].value,e++);break;case\x22$HANDSEED\x22:e<a.length&&(t.handleSeed=a[e].value,e++);break;default:for(;e<a.length&&a[e].code!==9&&a[e].code!==0;)t[n]=a[e].value,e++}}else\x20e++}return\x20e}function\x20v(a,e){let\x20t={x:0,y:0,z:0};for(;e<a.length;){let\x20r=a[e].code;if(r===10)t.x=parseFloat(a[e].value),e++;else\x20if(r===20)t.y=parseFloat(a[e].value),e++;else\x20if(r===30)t.z=parseFloat(a[e].value),e++;else\x20break}return{point:t,nextIndex:e}}function\x20k(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDSEC\x22)return\x20e+1;if(r.code===0&&r.value===\x22TABLE\x22){if(e++,e>=a.length)break;let\x20n=a[e].value;switch(e++,n){case\x22LAYER\x22:e=H(a,e,t.layers);break;case\x22LTYPE\x22:e=O(a,e,t.lineTypes);break;case\x22STYLE\x22:e=_(a,e,t.styles);break;default:e=R(a,e);break}}else\x20e++}return\x20e}function\x20R(a,e){for(;e<a.length;){if(a[e].code===0&&a[e].value===\x22ENDTAB\x22)return\x20e+1;e++}return\x20e}function\x20H(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDTAB\x22)return\x20e+1;if(r.code===0&&r.value===\x22LAYER\x22){e++;let\x20n={name:\x220\x22,color:7,lineType:\x22Continuous\x22,flags:0,lineWeight:-3,isOff:!1,isFrozen:!1,isLocked:!1};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x206:n.lineType=o.value;break;case\x2062:n.color=parseInt(o.value,10);break;case\x2070:n.flags=parseInt(o.value,10);break;case\x20370:n.lineWeight=parseInt(o.value,10);break;case\x20420:n.trueColor=parseInt(o.value,10);break}e++}t.set(n.name,n)}else\x20e++}return\x20e}function\x20O(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDTAB\x22)return\x20e+1;if(r.code===0&&r.value===\x22LTYPE\x22){e++;let\x20n={name:\x22\x22,description:\x22\x22,pattern:[],totalLength:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x203:n.description=o.value;break;case\x2040:n.totalLength=parseFloat(o.value);break;case\x2049:n.pattern.push(parseFloat(o.value));break}e++}n.name&&t.set(n.name,n)}else\x20e++}return\x20e}function\x20_(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDTAB\x22)return\x20e+1;if(r.code===0&&r.value===\x22STYLE\x22){e++;let\x20n={name:\x22\x22,fontName:\x22\x22,bigFontName:\x22\x22,height:0,widthFactor:1,obliqueAngle:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x203:n.fontName=o.value;break;case\x204:n.bigFontName=o.value;break;case\x2040:n.height=parseFloat(o.value);break;case\x2041:n.widthFactor=parseFloat(o.value);break;case\x2050:n.obliqueAngle=parseFloat(o.value);break}e++}n.name&&t.set(n.name,n)}else\x20e++}return\x20e}function\x20l(a){let\x20e={type:\x22\x22,layer:\x220\x22,color:256,lineType:\x22BYLAYER\x22,lineTypeScale:1,lineWeight:-1,visible:!0,extrusion:{x:0,y:0,z:1}};for(let\x20t\x20of\x20a)switch(t.code){case\x205:e.handle=t.value;break;case\x208:e.layer=t.value;break;case\x206:e.lineType=t.value;break;case\x2048:e.lineTypeScale=parseFloat(t.value);break;case\x2060:e.visible=t.value===\x220\x22||t.value===\x22\x22;break;case\x2062:e.color=parseInt(t.value,10);break;case\x20370:e.lineWeight=parseInt(t.value,10);break;case\x20420:e.trueColor=parseInt(t.value,10);break;case\x20210:e.extrusion.x=parseFloat(t.value);break;case\x20220:e.extrusion.y=parseFloat(t.value);break;case\x20230:e.extrusion.z=parseFloat(t.value);break}return\x20e}function\x20D(a){let\x20t={...l(a),type:\x22LINE\x22,start:{x:0,y:0,z:0},end:{x:0,y:0,z:0}};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.start.x=parseFloat(r.value);break;case\x2020:t.start.y=parseFloat(r.value);break;case\x2030:t.start.z=parseFloat(r.value);break;case\x2011:t.end.x=parseFloat(r.value);break;case\x2021:t.end.y=parseFloat(r.value);break;case\x2031:t.end.z=parseFloat(r.value);break}return\x20t}function\x20F(a){let\x20t={...l(a),type:\x22CIRCLE\x22,center:{x:0,y:0,z:0},radius:0};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.center.x=parseFloat(r.value);break;case\x2020:t.center.y=parseFloat(r.value);break;case\x2030:t.center.z=parseFloat(r.value);break;case\x2040:t.radius=parseFloat(r.value);break}return\x20t}function\x20E(a){let\x20t={...l(a),type:\x22ARC\x22,center:{x:0,y:0,z:0},radius:0,startAngle:0,endAngle:360};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.center.x=parseFloat(r.value);break;case\x2020:t.center.y=parseFloat(r.value);break;case\x2030:t.center.z=parseFloat(r.value);break;case\x2040:t.radius=parseFloat(r.value);break;case\x2050:t.startAngle=parseFloat(r.value);break;case\x2051:t.endAngle=parseFloat(r.value);break}return\x20t}function\x20P(a){let\x20t={...l(a),type:\x22LWPOLYLINE\x22,vertices:[],closed:!1,constantWidth:0,elevation:0},r=null;for(let\x20n\x20of\x20a)switch(n.code){case\x2070:t.closed=(parseInt(n.value,10)&1)!==0;break;case\x2038:t.elevation=parseFloat(n.value);break;case\x2043:t.constantWidth=parseFloat(n.value);break;case\x2010:r&&t.vertices.push(r),r={x:parseFloat(n.value),y:0,bulge:0,startWidth:0,endWidth:0};break;case\x2020:r&&(r.y=parseFloat(n.value));break;case\x2040:r&&(r.startWidth=parseFloat(n.value));break;case\x2041:r&&(r.endWidth=parseFloat(n.value));break;case\x2042:r&&(r.bulge=parseFloat(n.value));break}return\x20r&&t.vertices.push(r),t}function\x20T(a){let\x20t={...l(a),type:\x22POLYLINE\x22,vertices:[],closed:!1,is3d:!1};for(let\x20r\x20of\x20a)if(r.code===70){let\x20n=parseInt(r.value,10);t.closed=(n&1)!==0,t.is3d=(n&8)!==0}return\x20t}function\x20w(a){let\x20t={...l(a),type:\x22ELLIPSE\x22,center:{x:0,y:0,z:0},majorAxis:{x:1,y:0,z:0},minorRatio:1,startParam:0,endParam:Math.PI*2};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.center.x=parseFloat(r.value);break;case\x2020:t.center.y=parseFloat(r.value);break;case\x2030:t.center.z=parseFloat(r.value);break;case\x2011:t.majorAxis.x=parseFloat(r.value);break;case\x2021:t.majorAxis.y=parseFloat(r.value);break;case\x2031:t.majorAxis.z=parseFloat(r.value);break;case\x2040:t.minorRatio=parseFloat(r.value);break;case\x2041:t.startParam=parseFloat(r.value);break;case\x2042:t.endParam=parseFloat(r.value);break}return\x20t}function\x20g(a){let\x20t={...l(a),type:\x22SPLINE\x22,degree:3,flags:0,knots:[],controlPoints:[],fitPoints:[],weights:[]},r=null,n=null;for(let\x20o\x20of\x20a)switch(o.code){case\x2070:t.flags=parseInt(o.value,10);break;case\x2071:t.degree=parseInt(o.value,10);break;case\x2040:t.knots.push(parseFloat(o.value));break;case\x2041:t.weights.push(parseFloat(o.value));break;case\x2010:r&&t.controlPoints.push(r),r={x:parseFloat(o.value),y:0,z:0};break;case\x2020:r&&(r.y=parseFloat(o.value));break;case\x2030:r&&(r.z=parseFloat(o.value));break;case\x2011:n&&t.fitPoints.push(n),n={x:parseFloat(o.value),y:0,z:0};break;case\x2021:n&&(n.y=parseFloat(o.value));break;case\x2031:n&&(n.z=parseFloat(o.value));break;case\x2012:t.startTangent||(t.startTangent={x:0,y:0,z:0}),t.startTangent.x=parseFloat(o.value);break;case\x2022:t.startTangent&&(t.startTangent.y=parseFloat(o.value));break;case\x2032:t.startTangent&&(t.startTangent.z=parseFloat(o.value));break;case\x2013:t.endTangent||(t.endTangent={x:0,y:0,z:0}),t.endTangent.x=parseFloat(o.value);break;case\x2023:t.endTangent&&(t.endTangent.y=parseFloat(o.value));break;case\x2033:t.endTangent&&(t.endTangent.z=parseFloat(o.value));break}return\x20r&&t.controlPoints.push(r),n&&t.fitPoints.push(n),t}function\x20I(a){let\x20t={...l(a),type:\x22TEXT\x22,text:\x22\x22,insertionPoint:{x:0,y:0,z:0},height:1,rotation:0,widthFactor:1,obliqueAngle:0,style:\x22STANDARD\x22,hAlign:0,vAlign:0,generationFlags:0};for(let\x20r\x20of\x20a)switch(r.code){case\x201:t.text=r.value;break;case\x2010:t.insertionPoint.x=parseFloat(r.value);break;case\x2020:t.insertionPoint.y=parseFloat(r.value);break;case\x2030:t.insertionPoint.z=parseFloat(r.value);break;case\x2011:t.alignmentPoint||(t.alignmentPoint={x:0,y:0,z:0}),t.alignmentPoint.x=parseFloat(r.value);break;case\x2021:t.alignmentPoint||(t.alignmentPoint={x:0,y:0,z:0}),t.alignmentPoint.y=parseFloat(r.value);break;case\x2031:t.alignmentPoint||(t.alignmentPoint={x:0,y:0,z:0}),t.alignmentPoint.z=parseFloat(r.value);break;case\x2040:t.height=parseFloat(r.value);break;case\x2041:t.widthFactor=parseFloat(r.value);break;case\x2050:t.rotation=parseFloat(r.value);break;case\x2051:t.obliqueAngle=parseFloat(r.value);break;case\x207:t.style=r.value;break;case\x2071:t.generationFlags=parseInt(r.value,10);break;case\x2072:t.hAlign=parseInt(r.value,10);break;case\x2073:t.vAlign=parseInt(r.value,10);break}return\x20t}function\x20A(a){let\x20t={...l(a),type:\x22MTEXT\x22,text:\x22\x22,insertionPoint:{x:0,y:0,z:0},height:1,width:0,attachmentPoint:1,drawingDirection:1,rotation:0,lineSpacingStyle:1,lineSpacingFactor:1,style:\x22STANDARD\x22,bgFill:0,bgFillScale:1.5},r=[];for(let\x20n\x20of\x20a)switch(n.code){case\x201:r.push(n.value);break;case\x203:r.push(n.value);break;case\x207:t.style=n.value;break;case\x2010:t.insertionPoint.x=parseFloat(n.value);break;case\x2020:t.insertionPoint.y=parseFloat(n.value);break;case\x2030:t.insertionPoint.z=parseFloat(n.value);break;case\x2011:t.textDirection||(t.textDirection={x:0,y:0,z:0}),t.textDirection.x=parseFloat(n.value);break;case\x2021:t.textDirection||(t.textDirection={x:0,y:0,z:0}),t.textDirection.y=parseFloat(n.value);break;case\x2031:t.textDirection||(t.textDirection={x:0,y:0,z:0}),t.textDirection.z=parseFloat(n.value);break;case\x2040:t.height=parseFloat(n.value);break;case\x2041:t.width=parseFloat(n.value);break;case\x2044:t.lineSpacingFactor=parseFloat(n.value);break;case\x2050:t.rotation=parseFloat(n.value);break;case\x2071:t.attachmentPoint=parseInt(n.value,10);break;case\x2072:t.drawingDirection=parseInt(n.value,10);break;case\x2073:t.lineSpacingStyle=parseInt(n.value,10);break;case\x2090:t.bgFill=parseInt(n.value,10);break}return\x20t.text=r.join(\x22\x22),t}function\x20z(a){let\x20t={...l(a),type:\x22INSERT\x22,blockName:\x22\x22,insertionPoint:{x:0,y:0,z:0},scaleX:1,scaleY:1,scaleZ:1,rotation:0,columnCount:1,rowCount:1,columnSpacing:0,rowSpacing:0,attribs:[]};for(let\x20r\x20of\x20a)switch(r.code){case\x202:t.blockName=r.value;break;case\x2010:t.insertionPoint.x=parseFloat(r.value);break;case\x2020:t.insertionPoint.y=parseFloat(r.value);break;case\x2030:t.insertionPoint.z=parseFloat(r.value);break;case\x2041:t.scaleX=parseFloat(r.value);break;case\x2042:t.scaleY=parseFloat(r.value);break;case\x2043:t.scaleZ=parseFloat(r.value);break;case\x2044:t.columnSpacing=parseFloat(r.value);break;case\x2045:t.rowSpacing=parseFloat(r.value);break;case\x2050:t.rotation=parseFloat(r.value);break;case\x2070:t.columnCount=parseInt(r.value,10)||1;break;case\x2071:t.rowCount=parseInt(r.value,10)||1;break}return\x20t}function\x20S(a){let\x20t={...l(a),type:\x22DIMENSION\x22,blockName:\x22\x22,dimStyle:\x22STANDARD\x22,dimType:0,defPoint:{x:0,y:0,z:0},textMidpoint:{x:0,y:0,z:0},textOverride:\x22\x22,rotation:0,textRotation:0,leaderLength:0};for(let\x20r\x20of\x20a)switch(r.code){case\x201:t.textOverride=r.value;break;case\x202:t.blockName=r.value;break;case\x203:t.dimStyle=r.value;break;case\x2010:t.defPoint.x=parseFloat(r.value);break;case\x2020:t.defPoint.y=parseFloat(r.value);break;case\x2030:t.defPoint.z=parseFloat(r.value);break;case\x2011:t.textMidpoint.x=parseFloat(r.value);break;case\x2021:t.textMidpoint.y=parseFloat(r.value);break;case\x2031:t.textMidpoint.z=parseFloat(r.value);break;case\x2013:t.defPoint2||(t.defPoint2={x:0,y:0,z:0}),t.defPoint2.x=parseFloat(r.value);break;case\x2023:t.defPoint2||(t.defPoint2={x:0,y:0,z:0}),t.defPoint2.y=parseFloat(r.value);break;case\x2033:t.defPoint2||(t.defPoint2={x:0,y:0,z:0}),t.defPoint2.z=parseFloat(r.value);break;case\x2014:t.defPoint3||(t.defPoint3={x:0,y:0,z:0}),t.defPoint3.x=parseFloat(r.value);break;case\x2024:t.defPoint3||(t.defPoint3={x:0,y:0,z:0}),t.defPoint3.y=parseFloat(r.value);break;case\x2034:t.defPoint3||(t.defPoint3={x:0,y:0,z:0}),t.defPoint3.z=parseFloat(r.value);break;case\x2015:t.defPoint4||(t.defPoint4={x:0,y:0,z:0}),t.defPoint4.x=parseFloat(r.value);break;case\x2025:t.defPoint4||(t.defPoint4={x:0,y:0,z:0}),t.defPoint4.y=parseFloat(r.value);break;case\x2035:t.defPoint4||(t.defPoint4={x:0,y:0,z:0}),t.defPoint4.z=parseFloat(r.value);break;case\x2016:t.defPoint5||(t.defPoint5={x:0,y:0,z:0}),t.defPoint5.x=parseFloat(r.value);break;case\x2026:t.defPoint5||(t.defPoint5={x:0,y:0,z:0}),t.defPoint5.y=parseFloat(r.value);break;case\x2036:t.defPoint5||(t.defPoint5={x:0,y:0,z:0}),t.defPoint5.z=parseFloat(r.value);break;case\x2040:t.leaderLength=parseFloat(r.value);break;case\x2050:t.rotation=parseFloat(r.value);break;case\x2053:t.textRotation=parseFloat(r.value);break;case\x2070:t.dimType=parseInt(r.value,10);break}return\x20t}function\x20N(a){let\x20t={...l(a),type:\x22HATCH\x22,patternName:\x22\x22,solidFill:!0,associative:!1,hatchStyle:0,patternType:1,patternAngle:0,patternScale:1,boundaryPaths:[]},r=0;for(;r<a.length;){let\x20n=a[r];switch(n.code){case\x202:t.patternName=n.value;break;case\x2041:t.patternScale=parseFloat(n.value);break;case\x2052:t.patternAngle=parseFloat(n.value);break;case\x2070:t.solidFill=n.value===\x221\x22;break;case\x2071:t.associative=n.value===\x221\x22;break;case\x2075:t.hatchStyle=parseInt(n.value,10);break;case\x2076:t.patternType=parseInt(n.value,10);break;case\x2091:{let\x20o=parseInt(n.value,10);r++;for(let\x20c=0;c<o&&r<a.length;c++){let\x20s=W(a,r);t.boundaryPaths.push(s.path),r=s.nextIndex}continue}}r++}return\x20t}function\x20W(a,e){let\x20t=0;return\x20e<a.length&&a[e].code===92&&(t=parseInt(a[e].value,10),e++),(t&2)!==0?X(a,e,t):Y(a,e,t)}function\x20X(a,e,t){let\x20r={type:\x22polyline\x22,vertices:[],bulges:[],flags:t},n=!1;e<a.length&&a[e].code===72&&(n=a[e].value===\x221\x22,e++),e<a.length&&a[e].code===73&&(r.isClosed=a[e].value===\x221\x22,e++);let\x20o=0;e<a.length&&a[e].code===93&&(o=parseInt(a[e].value,10),e++);for(let\x20c=0;c<o&&e<a.length;c++){let\x20s={x:0,y:0};a[e].code===10&&(s.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.y=parseFloat(a[e].value),e++),r.vertices.push(s),n&&e<a.length&&a[e].code===42?(r.bulges.push(parseFloat(a[e].value)),e++):n&&r.bulges.push(0)}for(;e<a.length&&(a[e].code===97||a[e].code===330);)if(a[e].code===97){let\x20c=parseInt(a[e].value,10);e++;for(let\x20s=0;s<c&&e<a.length&&a[e].code===330;s++)e++}else\x20e++;return{path:r,nextIndex:e}}function\x20Y(a,e,t){let\x20r={type:\x22edges\x22,edges:[],flags:t},n=0;e<a.length&&a[e].code===93&&(n=parseInt(a[e].value,10),e++);for(let\x20o=0;o<n&&e<a.length&&a[e].code===72;o++){let\x20c=parseInt(a[e].value,10);switch(e++,c){case\x201:{let\x20s={type:\x22line\x22,start:{x:0,y:0},end:{x:0,y:0}};e<a.length&&a[e].code===10&&(s.start.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.start.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===11&&(s.end.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===21&&(s.end.y=parseFloat(a[e].value),e++),r.edges.push(s);break}case\x202:{let\x20s={type:\x22arc\x22,center:{x:0,y:0},radius:0,startAngle:0,endAngle:360,ccw:!0};e<a.length&&a[e].code===10&&(s.center.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.center.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===40&&(s.radius=parseFloat(a[e].value),e++),e<a.length&&a[e].code===50&&(s.startAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===51&&(s.endAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===73&&(s.ccw=a[e].value===\x221\x22,e++),r.edges.push(s);break}case\x203:{let\x20s={type:\x22ellipse\x22,center:{x:0,y:0},majorAxis:{x:1,y:0},minorRatio:1,startAngle:0,endAngle:Math.PI*2,ccw:!0};e<a.length&&a[e].code===10&&(s.center.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.center.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===11&&(s.majorAxis.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===21&&(s.majorAxis.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===40&&(s.minorRatio=parseFloat(a[e].value),e++),e<a.length&&a[e].code===50&&(s.startAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===51&&(s.endAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===73&&(s.ccw=a[e].value===\x221\x22,e++),r.edges.push(s);break}case\x204:{let\x20s=3,p=[],b=[];e<a.length&&a[e].code===94&&(s=parseInt(a[e].value,10),e++),e<a.length&&a[e].code===73&&e++,e<a.length&&a[e].code===74&&e++;let\x20d=0;e<a.length&&a[e].code===95&&(d=parseInt(a[e].value,10),e++);let\x20x=0;e<a.length&&a[e].code===96&&(x=parseInt(a[e].value,10),e++);for(let\x20f=0;f<d&&e<a.length&&a[e].code===40;f++)p.push(parseFloat(a[e].value)),e++;for(let\x20f=0;f<x&&e<a.length;f++){let\x20y={x:0,y:0};a[e].code===10&&(y.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(y.y=parseFloat(a[e].value),e++),b.push(y)}r.edges.push({type:\x22spline\x22,degree:s,knots:p,controlPoints:b});break}default:break}}for(;e<a.length&&(a[e].code===97||a[e].code===330);)if(a[e].code===97){let\x20o=parseInt(a[e].value,10);e++;for(let\x20c=0;c<o&&e<a.length&&a[e].code===330;c++)e++}else\x20e++;return{path:r,nextIndex:e}}function\x20L(a){let\x20t={...l(a),type:\x22POINT\x22,position:{x:0,y:0,z:0}};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.position.x=parseFloat(r.value);break;case\x2020:t.position.y=parseFloat(r.value);break;case\x2030:t.position.z=parseFloat(r.value);break}return\x20t}function\x20u(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code!==0){e++;continue}let\x20n=r.value;if(n===\x22ENDSEC\x22||n===\x22ENDBLK\x22)return\x20e+1;e++;let\x20o=[];for(;e<a.length&&a[e].code!==0;)o.push(a[e]),e++;switch(n){case\x22LINE\x22:t.push(D(o));break;case\x22CIRCLE\x22:t.push(F(o));break;case\x22ARC\x22:t.push(E(o));break;case\x22LWPOLYLINE\x22:t.push(P(o));break;case\x22ELLIPSE\x22:t.push(w(o));break;case\x22SPLINE\x22:t.push(g(o));break;case\x22TEXT\x22:t.push(I(o));break;case\x22MTEXT\x22:t.push(A(o));break;case\x22INSERT\x22:{let\x20c=z(o);o.some(p=>p.code===66&&p.value===\x221\x22)&&(e=$(a,e,c.attribs)),t.push(c);break}case\x22DIMENSION\x22:t.push(S(o));break;case\x22HATCH\x22:t.push(N(o));break;case\x22POINT\x22:t.push(L(o));break;case\x22POLYLINE\x22:{let\x20c=T(o);e=V(a,e,c.vertices),t.push(c);break}default:break}}return\x20e}function\x20V(a,e,t){for(;e<a.length;){if(a[e].code!==0){e++;continue}let\x20r=a[e].value;if(r===\x22SEQEND\x22)return\x20e+1;if(r===\x22ENDSEC\x22||r===\x22ENDBLK\x22)return\x20e;if(r===\x22VERTEX\x22){e++;let\x20n={x:0,y:0,bulge:0,startWidth:0,endWidth:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x2010:n.x=parseFloat(o.value);break;case\x2020:n.y=parseFloat(o.value);break;case\x2042:n.bulge=parseFloat(o.value);break;case\x2040:n.startWidth=parseFloat(o.value);break;case\x2041:n.endWidth=parseFloat(o.value);break}e++}t.push(n)}else\x20for(e++;e<a.length&&a[e].code!==0;)e++}return\x20e}function\x20$(a,e,t){for(;e<a.length;){if(a[e].code!==0){e++;continue}let\x20r=a[e].value;if(r===\x22SEQEND\x22)return\x20e+1;if(r===\x22ENDSEC\x22||r===\x22ENDBLK\x22)return\x20e;if(r===\x22ATTRIB\x22){e++;let\x20n={tag:\x22\x22,text:\x22\x22,insertionPoint:{x:0,y:0,z:0},height:1,rotation:0,style:\x22STANDARD\x22,layer:\x220\x22,color:256};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x201:n.text=o.value;break;case\x202:n.tag=o.value;break;case\x207:n.style=o.value;break;case\x208:n.layer=o.value;break;case\x2010:n.insertionPoint.x=parseFloat(o.value);break;case\x2020:n.insertionPoint.y=parseFloat(o.value);break;case\x2030:n.insertionPoint.z=parseFloat(o.value);break;case\x2040:n.height=parseFloat(o.value);break;case\x2050:n.rotation=parseFloat(o.value);break;case\x2062:n.color=parseInt(o.value,10);break}e++}t.push(n)}else\x20for(e++;e<a.length&&a[e].code!==0;)e++}return\x20e}function\x20B(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDSEC\x22)return\x20e+1;if(r.code===0&&r.value===\x22BLOCK\x22){e++;let\x20n={name:\x22\x22,basePoint:{x:0,y:0,z:0},entities:[],flags:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x208:break;case\x2010:n.basePoint.x=parseFloat(o.value);break;case\x2020:n.basePoint.y=parseFloat(o.value);break;case\x2030:n.basePoint.z=parseFloat(o.value);break;case\x2070:n.flags=parseInt(o.value,10);break}e++}e=u(a,e,n.entities),n.name&&!n.name.startsWith(\x22*Model_Space\x22)&&!n.name.startsWith(\x22*Paper_Space\x22)&&t.set(n.name,n)}else\x20e++}return\x20e}var\x20C=\x22AutoCAD\x20Binary\x20DXF\x22,U={ANSI_874:\x22windows-874\x22,ANSI_932:\x22shift_jis\x22,ANSI_936:\x22gbk\x22,ANSI_949:\x22euc-kr\x22,ANSI_950:\x22big5\x22,ANSI_1250:\x22windows-1250\x22,ANSI_1251:\x22windows-1251\x22,ANSI_1252:\x22windows-1252\x22,ANSI_1253:\x22windows-1253\x22,ANSI_1254:\x22windows-1254\x22,ANSI_1255:\x22windows-1255\x22,ANSI_1256:\x22windows-1256\x22,ANSI_1257:\x22windows-1257\x22,ANSI_1258:\x22windows-1258\x22},G=\x22AC1021\x22;function\x20K(){return{acadVersion:\x22\x22,insUnits:0,measurement:0,ltScale:1}}function\x20j(a){return\x20a.replace(/\x5c\x5cU\x5c+([0-9A-Fa-f]{4})/g,(e,t)=>String.fromCodePoint(parseInt(t,16)))}function\x20q(a){if(typeof\x20a==\x22string\x22)return\x20j(a);let\x20e=new\x20Uint8Array(a);if(new\x20TextDecoder(\x22ascii\x22).decode(e.slice(0,C.length))===C)throw\x20new\x20i(\x22Binary\x20DXF\x20format\x20is\x20not\x20supported.\x20Please\x20export\x20as\x20ASCII\x20DXF.\x22);let\x20r=new\x20TextDecoder(\x22utf-8\x22).decode(a),o=r.match(/\x5c$ACADVER[\x5cs\x5cS]*?\x5cn\x5cs*1\x5cs*\x5cn\x5cs*(\x5cS+)/)?.[1]??\x22\x22;if(o&&o<G){let\x20s=r.match(/\x5c$DWGCODEPAGE[\x5cs\x5cS]*?\x5cn\x5cs*3\x5cs*\x5cn\x5cs*(\x5cS+)/)?.[1]??\x22\x22,p=U[s]??\x22windows-1252\x22;p!==\x22utf-8\x22&&(r=new\x20TextDecoder(p).decode(a))}return\x20j(r)}function\x20Q(a,e){for(;e<a.length;){if(a[e].code===0&&a[e].value===\x22ENDSEC\x22)return\x20e+1;e++}return\x20e}function\x20Z(a){a.layers.has(\x220\x22)||a.layers.set(\x220\x22,{name:\x220\x22,color:7,lineType:\x22Continuous\x22,flags:0,lineWeight:-3,isOff:!1,isFrozen:!1,isLocked:!1})}function\x20J(a){for(let[,e]of\x20a.layers)e.isOff=e.color<0,e.isOff&&(e.color=Math.abs(e.color)),e.isFrozen=(e.flags&1)!==0,e.isLocked=(e.flags&4)!==0}var\x20i=class\x20extends\x20Error{constructor(t,r){super(t);this.cause=r;this.name=\x22DxfParseError\x22}};function\x20M(a){if(typeof\x20a==\x22string\x22){if(a.length===0)throw\x20new\x20i(\x22Input\x20is\x20empty.\x20Expected\x20a\x20DXF\x20string\x20or\x20ArrayBuffer.\x22)}else\x20if(a\x20instanceof\x20ArrayBuffer){if(a.byteLength===0)throw\x20new\x20i(\x22Input\x20ArrayBuffer\x20is\x20empty.\x22)}else\x20throw\x20new\x20i(\x22Invalid\x20input\x20type.\x20Expected\x20a\x20string\x20or\x20ArrayBuffer.\x22);let\x20e;try{e=q(a)}catch(n){throw\x20n\x20instanceof\x20i?n:new\x20i(\x22Failed\x20to\x20decode\x20DXF\x20input.\x22,n)}let\x20t;try{t=h(e)}catch(n){throw\x20new\x20i(\x22Failed\x20to\x20tokenize\x20DXF\x20content.\x22,n)}if(t.length===0)throw\x20new\x20i(\x22DXF\x20content\x20produced\x20no\x20tokens.\x20The\x20input\x20may\x20not\x20be\x20a\x20valid\x20DXF\x20file.\x22);let\x20r={header:K(),layers:new\x20Map,lineTypes:new\x20Map,styles:new\x20Map,blocks:new\x20Map,entities:[]};try{let\x20n=0;for(;n<t.length;){let\x20o=t[n];if(o.code===0&&o.value===\x22SECTION\x22){if(n++,n>=t.length)break;let\x20c=t[n].value;switch(n++,c){case\x22HEADER\x22:n=m(t,n,r.header);break;case\x22TABLES\x22:n=k(t,n,r);break;case\x22BLOCKS\x22:n=B(t,n,r.blocks);break;case\x22ENTITIES\x22:n=u(t,n,r.entities);break;default:n=Q(t,n);break}}else{if(o.code===0&&o.value===\x22EOF\x22)break;n++}}}catch(n){throw\x20new\x20i(\x22Failed\x20to\x20parse\x20DXF\x20sections.\x22,n)}return\x20Z(r),J(r),r}self.onmessage=a=>{let{type:e,id:t,payload:r}=a.data;if(e===\x22parse\x22)try{let\x20n=M(r);postMessage({type:\x22result\x22,id:t,doc:n})}catch(n){let\x20o=n\x20instanceof\x20Error?n.message:String(n);postMessage({type:\x22error\x22,id:t,message:o})}};})();\x0a','decode','bulge','message','measureColor','#13004C','byteLength','ENDBLK','canvas','STANDARD','#4F3F7F','pending','point','offsetX','handleWheel','destroyed','_minEntries','#260009','isPanning','onTouchEnd','monospace','setPointerCapture','flags','midpoint','items','layerManager','_insert','maxY','end','#29A500','workerManager','mouseScreenX','clientX','#26394C','updateSize','#131C26','ENDSEC','substring','SECTION','currentSnap','cursor','onTouchStart','onPointerDown','degree','_maxEntries','defPoint3','ellipse','handleTouchStart','strokeStyle','endpoint','formatConverters','insertionPoint','measurement','#002613','sqrt','measureTool','startPan','toFixed','rotation','defPoint','doc','scaleX','compareMinX','fillRect','onerror','radius','debugOptions','handleSelect','fill','getWorker','_chooseSubtree','INSERT','getHeight','maxScale','sort','#132621','entityIndex','offsetY','crosshair','currentTool','setTransform','startDebugLoop','lastDebugStats','done','deactivate','max','measureText','maxX','#6F3F7F','#007CA5','minY','windows-1256','setColorOverride','rgb(','touches','ENDTAB','computeDocumentBounds','debug','HATCH','evenodd','#ffffff','debugRafId','726215bJAjzH','_condense','options','string','#7F9FFF','dark','onDocumentLoaded','_all','cos','parseTime','#7FBFFF','clientY','bind','TEXT','code','#505050','DIMENSION','#BEBEBE','loadBuffer','lineWeight'];a=function(){return dI;};return a();}var aa=0.5,na=class{constructor(c){const cu=aW;this['canvas']=c;const d=c[cu(0x2f1)]('2d',{'alpha':!0x1});if(!d)throw new Error('Failed\x20to\x20get\x202D\x20rendering\x20context.\x20The\x20canvas\x20may\x20already\x20have\x20a\x20different\x20context\x20type,\x20or\x20canvas\x20rendering\x20is\x20not\x20available\x20in\x20this\x20environment.');this['ctx']=d,this['updateSize']();}['ctx'];['width']=0x0;['height']=0x0;['getContext'](){return this['ctx'];}['getWidth'](){return this['width'];}[aW(0x296)](){return this['height'];}[aW(0x270)](){const cv=aW,c=window['devicePixelRatio']||0x1,d=this[cv(0x256)]['getBoundingClientRect']();this[cv(0x1b2)]=d['width'],this['height']=d[cv(0x2ea)],this['canvas']['width']=d['width']*c,this['canvas']['height']=d['height']*c;}[aW(0x1b0)](k,v,w,x,z,A,C){const cw=aW,D=this['ctx'],F=window['devicePixelRatio']||0x1,I={'entitiesDrawn':0x0,'entitiesSkipped':0x0,'drawCalls':0x0,'byType':{}};D['setTransform'](F,0x0,0x0,F,0x0,0x0),D['fillStyle']=E[w]['backgroundColor'],D[cw(0x28d)](0x0,0x0,this['width'],this['height']),me(D,v);const L=0x1/v['scale'];D['lineCap']=cw(0x24a),D['lineJoin']='round';let M=null;for(let N=0x0;N<k[cw(0x2de)]['length'];N++){const V=k['entities'][N];if(!V['visible']){I[cw(0x2f5)]++;continue;}if(!x['has'](V[cw(0x1e9)])){I['entitiesSkipped']++;continue;}if(A&&!A[cw(0x1dd)](N)){I['entitiesSkipped']++;continue;}if(C){const Y=C[N];if(Y){const a0=(Y['maxX']-Y['minX'])*v[cw(0x2cc)],a1=(Y['maxY']-Y['minY'])*v['scale'];if(Math['max'](a0,a1)<aa){I['entitiesSkipped']++;continue;}}}const X=se(V,k[cw(0x1e4)],w);Ae(V['type'])?(X!==M&&(M!==null&&(D['stroke'](),I[cw(0x206)]++),M=X,D[cw(0x1c7)](),D['strokeStyle']=X,D['lineWidth']=L),Se(D,V,L),I[cw(0x20d)]++,I['byType'][V['type']]=(I['byType'][V['type']]??0x0)+0x1):(M!==null&&(D['stroke'](),I['drawCalls']++,M=null),D['strokeStyle']=X,D['fillStyle']=X,D['lineWidth']=L,I['entitiesDrawn']++,J(D,V,k,v,w,L,I));}if(M!==null&&(D[cw(0x2d5)](),I['drawCalls']++),z>=0x0&&z<k['entities']['length']){const a2=k['entities'][z];me(D,v),D['strokeStyle']=E[w][cw(0x213)],D['fillStyle']=E[w][cw(0x213)],D['lineWidth']=L*0x3,J(D,a2,k,v,w,L);}return I;}[aW(0x2d1)](c){const cx=aW,d=this['ctx'],f=window[cx(0x1ed)]||0x1;d['setTransform'](f,0x0,0x0,f,0x0,0x0),d['fillStyle']=E[c]['backgroundColor'],d['fillRect'](0x0,0x0,this[cx(0x1b2)],this['height']);}['destroy'](){}},ra={'showFps':!0x0,'showRenderStats':!0x0,'showDocumentInfo':!0x0,'showTimings':!0x0,'showCamera':!0x0,'position':'top-left'};function ne(c){return{...ra,...c};}function sa(c){return c===0x0?'0\x20B':c<0x400?c+'\x20B':c<0x400*0x400?(c/0x400)['toFixed'](0x1)+'\x20KB':(c/(0x400*0x400))['toFixed'](0x1)+'\x20MB';}function oa(c){return c>=0x1?c['toFixed'](0x2)+'x':'1:'+(0x1/c)['toFixed'](0x1);}var ia='11px\x20monospace',Fe=0xf,xe=0x8,Z=0x8,S=0xa;function la(k,v,w,x,z,A){const cy=aW;k[cy(0x29e)](0x1,0x0,0x0,0x1,0x0,0x0);const C=[];if(x['showFps']&&C['push'](['FPS:\x20'+v['fps']+'\x20\x20Frame:\x20'+v['frameTime'][cy(0x287)](0x1)+'ms']),x['showRenderStats']){const Y=v['renderStats']['entitiesDrawn']+v['renderStats']['entitiesSkipped'],a0=['Drawn:\x20'+v['renderStats']['entitiesDrawn']+cy(0x1a7)+Y+'\x20\x20Calls:\x20'+v['renderStats'][cy(0x206)]],a1=Object['entries'](v['renderStats']['byType'])['sort'](([,a2],[,a3])=>a3-a2)['slice'](0x0,0x6)['map'](([a2,a3])=>a2+':\x20'+a3)['join']('\x20\x20');a1&&a0[cy(0x234)](a1),C[cy(0x234)](a0);}if(x['showDocumentInfo']){const a2=['Layers:\x20'+v['visibleLayerCount']+'\x20/\x20'+v['layerCount']+'\x20\x20Blocks:\x20'+v['blockCount']];v['dxfVersion']&&a2[cy(0x234)]('DXF:\x20'+v['dxfVersion']),v['fileName']&&a2['push'](cy(0x1c0)+v['fileName']),v['fileSize']>0x0&&a2[cy(0x234)]('Size:\x20'+sa(v['fileSize'])),C['push'](a2);}if(x[cy(0x1ec)]){const a3=[];v['parseTime']>0x0&&a3['push']('Parse:\x20'+v[cy(0x2bd)][cy(0x287)](0x0)+'ms'),v['spatialIndexBuildTime']>0x0&&a3['push']('Index:\x20'+v['spatialIndexBuildTime']['toFixed'](0x0)+'ms'),v[cy(0x22e)]>0x0&&a3['push']('Load:\x20'+v['totalLoadTime'][cy(0x287)](0x0)+'ms'),a3['length']>0x0&&C['push']([a3['join']('\x20\x20')]);}if(x['showCamera']){const a4=v[cy(0x1af)];C['push'](['Zoom:\x20'+oa(v['zoom'])+'\x20\x20Pixel:\x20'+v['pixelSize']['toFixed'](0x2),'View:\x20['+a4['minX']['toFixed'](0x0)+',\x20'+a4[cy(0x2a8)][cy(0x287)](0x0)+']\x20→\x20['+a4['maxX']['toFixed'](0x0)+',\x20'+a4['maxY'][cy(0x287)](0x0)+']']);}if(C['length']===0x0)return;k['font']=ia;const D=[];for(let a5=0x0;a5<C['length'];a5++){a5>0x0&&D['push']({'text':'','isSeparator':!0x0});for(const a6 of C[a5])D['push']({'text':a6,'isSeparator':!0x1});}let F=0x0;for(const a7 of D)if(!a7['isSeparator']){const a8=k['measureText'](a7['text'])['width'];a8>F&&(F=a8);}const I=F+Z*0x2;let L=Z*0x2;for(const a9 of D)L+=a9['isSeparator']?xe:Fe;let M,N;switch(x['position']){case cy(0x214):M=S,N=S;break;case'top-right':M=z-I-S,N=S;break;case'bottom-left':M=S,N=A-L-S;break;case'bottom-right':M=z-I-S,N=A-L-S;break;}const V=E[w];k['fillStyle']=w==='dark'?'rgba(0,\x200,\x200,\x200.75)':'rgba(255,\x20255,\x20255,\x200.85)',k['fillRect'](M,N,I,L),k['strokeStyle']=w==='dark'?'rgba(255,\x20255,\x20255,\x200.15)':'rgba(0,\x200,\x200,\x200.15)',k['lineWidth']=0x1,k['strokeRect'](M+0.5,N+0.5,I-0x1,L-0x1),k['fillStyle']=w==='dark'?V['defaultEntityColor']:'rgba(0,\x200,\x200,\x200.85)',k['textAlign']='left',k['textBaseline']='top';let X=N+Z;for(const ab of D)ab['isSeparator']?X+=xe:(k['fillText'](ab[cy(0x22f)],M+Z,X),X+=Fe);}var ca=class{[aW(0x1e4)]=new Map();['visibility']=new Map();['colorOverrides']=new Map();['visibleCache']=null;['setLayers'](c){this['layers']=new Map(c),this['visibility']['clear'](),this['colorOverrides']['clear'](),this['visibleCache']=null;for(const [d,f]of this['layers'])this['visibility']['set'](d,!f['isOff']&&!f['isFrozen']);}['getAllLayers'](){return Array['from'](this['layers']['values']());}['setVisible'](c,d){this['visibility']['set'](c,d),this['visibleCache']=null;}['isVisible'](c){return this['visibility']['get'](c)??!0x0;}['setColorOverride'](c,d){this['colorOverrides']['set'](c,d);}['getColorOverride'](c){return this['colorOverrides']['get'](c);}['getVisibleLayerNames'](){const cz=aW;if(this[cz(0x239)])return this['visibleCache'];const c=new Set();for(const [d,f]of this[cz(0x1a4)])f&&c['add'](d);return this['visibleCache']=c,c;}[aW(0x1e3)](){const cA=aW;this['layers']['clear'](),this[cA(0x1a4)]['clear'](),this[cA(0x1b5)]['clear'](),this['visibleCache']=null;}},ha=class{['listeners']=new Map();['on'](c,d){const cB=aW;this['listeners']['has'](c)||this[cB(0x2cd)][cB(0x215)](c,new Set()),this['listeners']['get'](c)[cB(0x1bb)](d);}['off'](c,d){this['listeners']['get'](c)?.['delete'](d);}['emit'](c,d){const cC=aW,f=this[cC(0x2cd)]['get'](c);if(f){for(const g of f)g(d);}}['removeAllListeners'](){this['listeners']['clear']();}},ua=class{constructor(c,d){const cD=aW;this[cD(0x256)]=c,this['viewer']=d,this['onPointerDown']=this['handlePointerDown'][cD(0x2c0)](this),this['onPointerMove']=this['handlePointerMove']['bind'](this),this['onPointerUp']=this['handlePointerUp'][cD(0x2c0)](this),this['onWheel']=this[cD(0x25c)][cD(0x2c0)](this),this[cD(0x277)]=this[cD(0x27d)]['bind'](this),this[cD(0x1ff)]=this['handleTouchMove']['bind'](this),this[cD(0x261)]=this[cD(0x207)]['bind'](this),this['onContextMenu']=f=>f['preventDefault'](),c['addEventListener']('pointerdown',this['onPointerDown']),c['addEventListener']('pointermove',this['onPointerMove']),c['addEventListener'](cD(0x1c4),this['onPointerUp']),c['addEventListener'](cD(0x222),this['onWheel'],{'passive':!0x1}),c['addEventListener']('touchstart',this['onTouchStart'],{'passive':!0x1}),c['addEventListener']('touchmove',this[cD(0x1ff)],{'passive':!0x1}),c['addEventListener']('touchend',this[cD(0x261)]),c['addEventListener'](cD(0x1f5),this['onContextMenu']);}['isPanning']=!0x1;['lastX']=0x0;[aW(0x1b3)]=0x0;['touches']=new Map();[aW(0x278)];['onPointerMove'];[aW(0x1eb)];['onWheel'];['onTouchStart'];['onTouchMove'];[aW(0x261)];['onContextMenu'];['destroy'](){const cE=aW;this['canvas']['removeEventListener']('pointerdown',this['onPointerDown']),this['canvas']['removeEventListener']('pointermove',this['onPointerMove']),this['canvas']['removeEventListener'](cE(0x1c4),this[cE(0x1eb)]),this['canvas']['removeEventListener']('wheel',this['onWheel']),this['canvas']['removeEventListener']('touchstart',this['onTouchStart']),this['canvas']['removeEventListener']('touchmove',this[cE(0x1ff)]),this['canvas']['removeEventListener']('touchend',this['onTouchEnd']),this[cE(0x256)]['removeEventListener']('contextmenu',this['onContextMenu']);}['handlePointerDown'](c){const cF=aW,d=this['viewer']['getTool'](),f=this['canvas']['getBoundingClientRect'](),g=c['clientX']-f['left'],h=c['clientY']-f['top'];c['button']===0x0&&d==='pan'?this['startPan'](c,g,h):c[cF(0x1f7)]===0x1?this[cF(0x286)](c,g,h):c['button']===0x0&&(d==='select'||d===cF(0x2f4))&&this['viewer']['handleClick'](g,h);}['startPan'](c,d,f){const cG=aW;this['isPanning']=!0x0,this['lastX']=d,this['lastY']=f,this['canvas'][cG(0x263)](c['pointerId']),this['canvas']['style']['cursor']='grabbing';}['handlePointerMove'](c){const cH=aW,d=this['canvas']['getBoundingClientRect'](),f=c['clientX']-d['left'],g=c['clientY']-d['top'];if(this['isPanning']){const h=f-this[cH(0x1a6)],i=g-this[cH(0x1b3)];this['lastX']=f,this['lastY']=g,this['viewer']['handlePan'](h,i);}else this['viewer']['handleMouseMove'](f,g);}[aW(0x2e5)](c){const cI=aW;this['isPanning']&&(this[cI(0x260)]=!0x1,this['canvas']['releasePointerCapture'](c['pointerId']),this['canvas']['style']['cursor']=this[cI(0x22a)]['getTool']()==='pan'?'grab':'crosshair');}['handleWheel'](c){const cJ=aW;c['preventDefault']();const d=this['canvas']['getBoundingClientRect'](),f=c['clientX']-d['left'],g=c[cJ(0x2bf)]-d['top'],h=-Math['sign'](c['deltaY']),k=this['viewer']['getZoomSpeed'](),l=h>0x0?k:0x1/k;this[cJ(0x22a)]['handleZoom'](f,g,l);}[aW(0x27d)](c){const cK=aW;c[cK(0x2e0)]();for(const d of Array['from'](c['changedTouches']))this['touches']['set'](d[cK(0x20a)],{'x':d['clientX'],'y':d['clientY']});}['handleTouchMove'](d){const cL=aW;if(d['preventDefault'](),this['touches']['size']===0x2&&d['touches'][cL(0x1d0)]===0x2){const f=d['touches'][0x0],g=d['touches'][0x1],k=Array['from'](this['touches']['values']()),m=Math['hypot'](k[0x0]['x']-k[0x1]['x'],k[0x0]['y']-k[0x1]['y']),p=Math['hypot'](f['clientX']-g['clientX'],f['clientY']-g['clientY']);if(m>0x0){const v=p/m,w=this['canvas']['getBoundingClientRect'](),x=(k[0x0]['x']+k[0x1]['x'])/0x2-w['left'],z=(k[0x0]['y']+k[0x1]['y'])/0x2-w['top'],A=(f['clientX']+g['clientX'])/0x2-w['left'],C=(f['clientY']+g['clientY'])/0x2-w['top'];this['viewer']['handleZoom'](x,z,v),this[cL(0x22a)]['handlePan'](A-x,C-z);}}else{if(this['touches']['size']===0x1&&d['touches']['length']===0x1){const D=d[cL(0x2ac)][0x0],F=this['touches']['get'](D['identifier']);F&&this['viewer']['handlePan'](D[cL(0x26e)]-F['x'],D['clientY']-F['y']);}}for(const I of Array['from'](d['changedTouches']))this['touches']['set'](I['identifier'],{'x':I[cL(0x26e)],'y':I['clientY']});}['handleTouchEnd'](c){const cM=aW;for(const d of Array[cM(0x1c2)](c['changedTouches']))this[cM(0x2ac)]['delete'](d['identifier']);}},da=0x5,fa=class{['tree']=new Le();['items']=[];[aW(0x204)]=[];['build'](c,d){const cN=aW;this['items']=[],this['entityBBoxes']=new Array(c['length'])['fill'](null);const f=d?new Map():void 0x0;for(let g=0x0;g<c['length'];g++){const h=c[g],i=d&&f?Ee(h,d,f):B(h);this['entityBBoxes'][g]=i,i&&this[cN(0x266)]['push']({...i,'entityIndex':g});}this['tree']['clear'](),this['tree']['load'](this['items']);}['search'](c,d,f,g){return this['tree']['search']({'minX':c,'minY':d,'maxX':f,'maxY':g});}['getEntityBBox'](c){return this['entityBBoxes'][c]??null;}['getEntityBBoxes'](){return this['entityBBoxes'];}['clear'](){const cO=aW;this['tree'][cO(0x1e3)](),this[cO(0x266)]=[],this[cO(0x204)]=[];}};function pa(g,k,m,p,v,w){const cP=aW,x=da/w,z=p['search'](g-x,k-x,g+x,k+x);let A=x,C=-0x1;for(let D=z['length']-0x1;D>=0x0;D--){const F=z[D],I=m[F['entityIndex']];if(!I||!v['has'](I['layer'])||!I[cP(0x22c)])continue;const L=ba(g,k,I);L<A&&(A=L,C=F[cP(0x29a)]);}return C;}function ba(d,f,g){const cQ=aW;switch(g['type']){case cQ(0x23f):return re(d,f,g['start']['x'],g['start']['y'],g['end']['x'],g[cQ(0x26a)]['y']);case'CIRCLE':return ma(d,f,g['center']['x'],g['center']['y'],g[cQ(0x28f)]);case'ARC':return ga(d,f,g['center']['x'],g['center']['y'],g['radius'],g[cQ(0x1bd)]*Math['PI']/0xb4,g[cQ(0x2da)]*Math['PI']/0xb4);case'LWPOLYLINE':case'POLYLINE':{let k=0x1/0x0;const l=g['vertices'],m=g['closed']?l[cQ(0x1d0)]:l['length']-0x1;for(let p=0x0;p<m;p++){const u=l[p],v=l[(p+0x1)%l['length']],w=re(d,f,u['x'],u['y'],v['x'],v['y']);k=Math['min'](k,w);}return k;}case'ELLIPSE':return Fa(d,f,g['center']['x'],g['center']['y'],g['majorAxis'],g[cQ(0x2dc)]);case'TEXT':case'MTEXT':{const x=B(g);return x?va(d,f,x['minX'],x['minY'],x[cQ(0x2a5)],x['maxY']):0x1/0x0;}case'POINT':return Math[cQ(0x1ee)](d-g['position']['x'],f-g[cQ(0x210)]['y']);case'SPLINE':{let z=0x1/0x0;const A=g['controlPoints'];for(let C=0x0;C<A['length']-0x1;C++){const D=re(d,f,A[C]['x'],A[C]['y'],A[C+0x1]['x'],A[C+0x1]['y']);z=Math['min'](z,D);}return z;}default:return 0x1/0x0;}}function re(d,f,g,k,m,p){const v=m-g,w=p-k,x=v*v+w*w;if(x===0x0)return Math['hypot'](d-g,f-k);let z=((d-g)*v+(f-k)*w)/x;z=Math['max'](0x0,Math['min'](0x1,z));const A=g+z*v,C=k+z*w;return Math['hypot'](d-A,f-C);}function ma(c,d,f,g,h){return Math['abs'](Math['hypot'](c-f,d-g)-h);}function ga(g,k,m,o,p,u,v){const cR=aW,w=(Math['atan2'](k-o,g-m)%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']),x=(u%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']),z=(v%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']);if(x<=z?w>=x&&w<=z:w>=x||w<=z)return Math['abs'](Math['hypot'](g-m,k-o)-p);const A=Math['hypot'](g-(m+p*Math['cos'](u)),k-(o+p*Math['sin'](u))),C=Math[cR(0x1ee)](g-(m+p*Math['cos'](v)),k-(o+p*Math['sin'](v)));return Math['min'](A,C);}function va(c,d,f,g,h,k){if(c>=f&&c<=h&&d>=g&&d<=k)return 0x0;const l=Math['max'](f-c,0x0,c-h),m=Math['max'](g-d,0x0,d-k);return Math['hypot'](l,m);}function Fa(g,k,v,w,x,z){const cS=aW,A=Math[cS(0x1b9)](x['y'],x['x']),C=Math['cos'](-A),D=Math['sin'](-A),F=(g-v)*C-(k-w)*D,I=(g-v)*D+(k-w)*C,L=Math[cS(0x284)](x['x']**0x2+x['y']**0x2),M=L*z;if(L<1e-10)return Math['hypot'](g-v,k-w);const N=I*(L/M),V=Math['hypot'](F,N);if(V<1e-10)return L;const X=F/V*L,Y=I/V*M;return Math['hypot'](F-X,I-Y);}var xa=class{['state']={'phase':'idle'};['currentSnap']=null;['activate'](){const cT=aW;this[cT(0x237)]={'phase':'first-point'},this[cT(0x275)]=null;}['deactivate'](){this['state']={'phase':'idle'},this['currentSnap']=null;}[aW(0x224)](d,f,g){const cU=aW,k=g?g[cU(0x25a)]:{'x':d,'y':f};switch(this['state']['phase']){case'first-point':return this['state']={'phase':'second-point','firstPoint':k,'firstSnap':g??void 0x0},null;case'second-point':{const l=this['state']['firstPoint'],m=k,p=m['x']-l['x'],u=m['y']-l['y'],v=Math['sqrt'](p*p+u*u),w=Math['atan2'](u,p)*0xb4/Math['PI'];return this['state']={'phase':'done','firstPoint':l,'secondPoint':m,'distance':v,'angle':w},{'distance':v,'angle':w,'deltaX':p,'deltaY':u,'points':[l,m]};}case cU(0x2a1):return this['state']={'phase':'second-point','firstPoint':k},null;default:return null;}}['handleMove'](c){this['currentSnap']=c;}};function ke(g,k,m,p,v,w=new Set(['endpoint','midpoint',aW(0x1e8)])){const cV=aW,x=0xa/v,z=[],A=p['search'](g-x,k-x,g+x,k+x);for(const C of A){const D=m[C['entityIndex']];if(!D)continue;const F=C['entityIndex'];switch(D['type']){case'LINE':{if(w['has']('endpoint')&&(y(z,D[cV(0x1fa)]['x'],D['start']['y'],cV(0x27f),F,g,k,x),y(z,D[cV(0x26a)]['x'],D['end']['y'],'endpoint',F,g,k,x)),w['has'](cV(0x265))){const I=(D[cV(0x1fa)]['x']+D['end']['x'])/0x2,L=(D['start']['y']+D['end']['y'])/0x2;y(z,I,L,cV(0x265),F,g,k,x);}break;}case cV(0x221):{if(w['has']('center')&&y(z,D['center']['x'],D['center']['y'],'center',F,g,k,x),w['has']('endpoint'))for(const M of[0x0,Math['PI']/0x2,Math['PI'],0x3*Math['PI']/0x2]){const N=D['center']['x']+D['radius']*Math[cV(0x2bc)](M),V=D['center']['y']+D['radius']*Math['sin'](M);y(z,N,V,'endpoint',F,g,k,x);}break;}case'ARC':{if(w['has']('center')&&y(z,D['center']['x'],D['center']['y'],'center',F,g,k,x),w['has']('endpoint')){const X=D[cV(0x1bd)]*Math['PI']/0xb4,Y=D[cV(0x2da)]*Math['PI']/0xb4;y(z,D['center']['x']+D['radius']*Math['cos'](X),D['center']['y']+D['radius']*Math[cV(0x242)](X),'endpoint',F,g,k,x),y(z,D['center']['x']+D['radius']*Math[cV(0x2bc)](Y),D[cV(0x1e8)]['y']+D[cV(0x28f)]*Math['sin'](Y),'endpoint',F,g,k,x);}break;}case cV(0x1cd):case'POLYLINE':{if(w['has']('endpoint')){for(const a0 of D['vertices'])y(z,a0['x'],a0['y'],cV(0x27f),F,g,k,x);}if(w['has']('midpoint'))for(let a1=0x0;a1<D['vertices']['length']-0x1;a1++){const a2=D['vertices'][a1],a3=D['vertices'][a1+0x1];y(z,(a2['x']+a3['x'])/0x2,(a2['y']+a3['y'])/0x2,'midpoint',F,g,k,x);}break;}case'ELLIPSE':{w['has']('center')&&y(z,D['center']['x'],D['center']['y'],cV(0x1e8),F,g,k,x);break;}case cV(0x2c1):{w[cV(0x1dd)](cV(0x27f))&&y(z,D['insertionPoint']['x'],D[cV(0x281)]['y'],'endpoint',F,g,k,x);break;}case'MTEXT':{w['has']('endpoint')&&y(z,D['insertionPoint']['x'],D[cV(0x281)]['y'],'endpoint',F,g,k,x);break;}}}return z['sort']((a4,a5)=>Math[cV(0x1ee)](a4['point']['x']-g,a4['point']['y']-k)-Math[cV(0x1ee)](a5['point']['x']-g,a5[cV(0x25a)]['y']-k)),z;}function y(c,d,f,g,h,k,l,m){Math['hypot'](d-k,f-l)<=m&&c['push']({'point':{'x':d,'y':f},'type':g,'entityIndex':h});}function ka(g,k,v,w,x,z){const cW=aW,A=E[z];g['setTransform'](0x1,0x0,0x0,0x1,0x0,0x0);const C=v['state'];if(v['currentSnap']){const [D,F]=W(k,v[cW(0x275)][cW(0x25a)]['x'],v[cW(0x275)]['point']['y']);ya(g,D,F,v['currentSnap']['type'],A['measureColor']);}if(C['phase']==='second-point'){const [I,L]=W(k,C['firstPoint']['x'],C['firstPoint']['y']);let M,N;if(v[cW(0x275)]){const [a0,a1]=W(k,v['currentSnap']['point']['x'],v['currentSnap']['point']['y']);M=a0,N=a1;}else M=w,N=x;g[cW(0x27e)]=A['measureColor'],g['lineWidth']=1.5,g['setLineDash']([0x6,0x3]),g['beginPath'](),g['moveTo'](I,L),g['lineTo'](M,N),g['stroke'](),g['setLineDash']([]),K(g,I,L,A['measureColor']),K(g,M,N,A['measureColor']);let V,X;v['currentSnap']?(V=v['currentSnap']['point']['x'],X=v['currentSnap']['point']['y']):[V,X]=q(k,w,x);const Y=Math['hypot'](V-C['firstPoint']['x'],X-C['firstPoint']['y']);ye(g,(I+M)/0x2,(L+N)/0x2,Y,z);}if(C['phase']==='done'){const [a2,a3]=W(k,C['firstPoint']['x'],C['firstPoint']['y']),[a4,a5]=W(k,C['secondPoint']['x'],C['secondPoint']['y']);g['strokeStyle']=A[cW(0x252)],g[cW(0x220)]=0x2,g['beginPath'](),g['moveTo'](a2,a3),g['lineTo'](a4,a5),g['stroke'](),K(g,a2,a3,A['measureColor']),K(g,a4,a5,A['measureColor']),ye(g,(a2+a4)/0x2,(a3+a5)/0x2,C['distance'],z);}}function ya(c,d,f,g,h){const cX=aW;c['strokeStyle']=h,c['lineWidth']=0x2;const i=0x8;switch(g){case'endpoint':c['strokeRect'](d-i/0x2,f-i/0x2,i,i);break;case'midpoint':c['beginPath'](),c['moveTo'](d,f-i/0x2),c['lineTo'](d+i/0x2,f+i/0x2),c['lineTo'](d-i/0x2,f+i/0x2),c['closePath'](),c['stroke']();break;case'center':c['beginPath'](),c['arc'](d,f,i/0x2,0x0,Math['PI']*0x2),c['stroke']();break;case'nearest':c['beginPath'](),c['moveTo'](d-i/0x2,f-i/0x2),c[cX(0x1be)](d+i/0x2,f+i/0x2),c['moveTo'](d+i/0x2,f-i/0x2),c['lineTo'](d-i/0x2,f+i/0x2),c['stroke']();break;}}function K(c,d,f,g){const cY=aW;c['fillStyle']=g,c['beginPath'](),c[cY(0x2ef)](d,f,0x4,0x0,Math['PI']*0x2),c[cY(0x292)]();}function ye(d,f,g,k,m){const cZ=aW,p=k[cZ(0x287)](0x4);d['font']='13px\x20monospace',d[cZ(0x1ba)]='center',d['textBaseline']='bottom';const v=d[cZ(0x2a4)](p),w=0x4,x=f-v['width']/0x2-w,z=g-0x14,A=v['width']+w*0x2,C=0x12;d['fillStyle']=m===cZ(0x2b9)?'rgba(0,0,0,0.8)':'rgba(255,255,255,0.9)',d['fillRect'](x,z,A,C),d[cZ(0x1f4)]=E[m]['measureColor'],d['fillText'](p,f,g-0x6);}var Pa=class{['worker']=null;['blobUrl']=null;['nextId']=0x1;['pending']=new Map();['getWorker'](){const d0=aW;return this['worker']?this['worker']:(this['blobUrl']=URL['createObjectURL'](new Blob([d0(0x24e)],{'type':d0(0x1c6)})),this['worker']=new Worker(this[d0(0x1db)]),this['worker']['onmessage']=c=>{const d1=d0,{type:d,id:f,doc:g,message:h}=c['data'],i=this['pending']['get'](f);i&&(this['pending']['delete'](f),d==='result'?i[d1(0x217)](this['reviveDocument'](g)):d==='error'&&i['reject'](new Error(h??'Worker\x20parse\x20failed')));},this[d0(0x1d3)][d0(0x28e)]=c=>{const d2=d0,d=new Error(c[d2(0x251)]??'Worker\x20error');for(const [,f]of this['pending'])f['reject'](d);this['pending']['clear'](),this['destroyWorker']();},this['worker']);}['parse'](c){return new Promise((d,f)=>{const d3=b,g=this['nextId']++;this['pending']['set'](g,{'resolve':d,'reject':f});let h;try{h=this[d3(0x293)]();}catch(l){this['pending']['delete'](g),f(l instanceof Error?l:new Error(String(l)));return;}const k={'type':'parse','id':g,'payload':c};try{c instanceof ArrayBuffer?h['postMessage'](k,[c]):h['postMessage'](k);}catch(m){this['pending']['delete'](g),f(m instanceof Error?m:new Error(String(m)));}});}['terminate'](){const d4=aW;this['destroyWorker']();const c=new Error('Worker\x20terminated');for(const [,d]of this['pending'])d['reject'](c);this[d4(0x259)]['clear']();}['destroyWorker'](){const d5=aW;this[d5(0x1d3)]&&(this['worker']['terminate'](),this['worker']=null),this['blobUrl']&&(URL['revokeObjectURL'](this['blobUrl']),this['blobUrl']=null);}['reviveDocument'](c){return{...c,'layers':this['ensureMap'](c['layers']),'lineTypes':this['ensureMap'](c['lineTypes']),'styles':this['ensureMap'](c['styles']),'blocks':this['ensureMap'](c['blocks'])};}['ensureMap'](c){return c instanceof Map?c:c&&typeof c=='object'?new Map(Object['entries'](c)):new Map();}},wa=class{['canvas'];['renderer'];['camera'];['layerManager'];['emitter'];['spatialIndex'];['measureTool'];[aW(0x28a)]=null;['options'];['currentTool'];['inputHandler'];['resizeObserver'];['formatConverters'];[aW(0x26c)]=null;['selectedEntityIndex']=-0x1;[aW(0x209)]=!0x1;['destroyed']=!0x1;['loadGeneration']=0x0;[aW(0x26d)]=0x0;['mouseScreenY']=0x0;['debugEnabled']=!0x1;['debugOptions'];['lastRenderStats']=null;['lastDebugStats']=null;['frameTimestamps']=[];['lastDoRenderTime']=0x0;['lastFrameTime']=0x0;['parseTime']=0x0;['spatialIndexBuildTime']=0x0;[aW(0x2e9)]=null;['loadedFileSize']=0x0;['debugRafId']=0x0;constructor(c,d){const d6=aW;this['canvas']=c,this['options']={'theme':d?.['theme']??'dark','backgroundColor':d?.['backgroundColor'],'antialias':d?.['antialias']??!0x0,'minZoom':d?.['minZoom']??0.0001,'maxZoom':d?.['maxZoom']??0x186a0,'zoomSpeed':d?.['zoomSpeed']??1.1,'initialTool':d?.['initialTool']??'pan'},this['formatConverters']=d?.[d6(0x280)]??[],d?.[d6(0x1d3)]&&(this[d6(0x26c)]=new Pa()),d?.[d6(0x2af)]?(this['debugEnabled']=!0x0,this['debugOptions']=ne(typeof d[d6(0x2af)]=='boolean'?void 0x0:d['debug'])):this[d6(0x290)]=ne(),this['renderer']=new na(c),this['camera']=new yt(this[d6(0x2b6)]),this['layerManager']=new ca(),this[d6(0x2c9)]=new ha(),this[d6(0x203)]=new fa(),this['measureTool']=new xa(),this['currentTool']=this[d6(0x2b6)]['initialTool'],this['inputHandler']=new ua(c,this),this['resizeObserver']=new ResizeObserver(()=>this['resize']()),this['resizeObserver']['observe'](c),c['style']['cursor']=this['getCursorForTool'](this['currentTool']),this['requestRender'](),this['debugEnabled']&&this['startDebugLoop']();}['guardDestroyed'](){if(this['destroyed'])throw new Error('CadViewer:\x20cannot\x20call\x20methods\x20on\x20a\x20destroyed\x20instance.');}async['runConverters'](c){const d7=aW;for(const d of this[d7(0x280)]){let f=!0x1;try{f=d['detect'](c);}catch{continue;}if(f)return d['convert'](c);}return null;}async['loadFile'](c){const d8=aW;this['guardDestroyed']();const d=++this['loadGeneration'];this['loadedFileName']=c['name'],this['loadedFileSize']=c['size'];const f=await c[d8(0x23e)]();if(this['destroyed']||d!==this['loadGeneration'])return;const g=await this['runConverters'](f);if(this['destroyed']||d!==this[d8(0x1d5)])return;const h=performance['now'](),i=g??f;this['doc']=await this['parseWithOptionalWorker'](i,d),!(this['destroyed']||d!==this['loadGeneration'])&&(this[d8(0x2bd)]=performance['now']()-h,this['onDocumentLoaded']());}async[aW(0x2c6)](c){const d9=aW;this['guardDestroyed']();const d=++this['loadGeneration'];this['loadedFileName']=null,this['loadedFileSize']=c['byteLength'];const f=await this[d9(0x1f9)](c);if(this[d9(0x25d)]||d!==this[d9(0x1d5)])return;const g=performance[d9(0x2ca)](),h=f??c;this[d9(0x28a)]=await this[d9(0x248)](h,d),!(this['destroyed']||d!==this['loadGeneration'])&&(this['parseTime']=performance['now']()-g,this['onDocumentLoaded']());}async['parseWithOptionalWorker'](c,d){const db=aW;if(!this['workerManager'])return ae(c);try{return await this[db(0x26c)]['parse'](c);}catch(f){if(this['destroyed']||d!==this['loadGeneration'])return null;throw f;}}['loadDocument'](c){const dc=aW;if(this['guardDestroyed'](),++this['loadGeneration'],this['loadedFileName']=null,this['loadedFileSize']=0x0,this['parseTime']=0x0,!c||!Array[dc(0x20e)](c['entities'])||!(c['layers']instanceof Map))throw new Error('CadViewer:\x20invalid\x20DxfDocument\x20—\x20expected\x20entities\x20array\x20and\x20layers\x20Map.');this['doc']=c,this['onDocumentLoaded']();}['loadString'](c){const dd=aW;this['guardDestroyed'](),++this[dd(0x1d5)],this['loadedFileName']=null,this['loadedFileSize']=c[dd(0x1d0)];const d=performance['now']();this['doc']=ae(c),this[dd(0x2bd)]=performance['now']()-d,this[dd(0x2ba)]();}['loadArrayBuffer'](c){const df=aW;this['guardDestroyed'](),++this['loadGeneration'],this['loadedFileName']=null,this['loadedFileSize']=c[df(0x254)];const d=performance[df(0x2ca)]();this['doc']=ae(c),this['parseTime']=performance['now']()-d,this['onDocumentLoaded']();}['clearDocument'](){const dg=aW;this[dg(0x1e1)](),++this['loadGeneration'],this['doc']=null,this['selectedEntityIndex']=-0x1,this[dg(0x203)]['clear'](),ve(),this['layerManager']['clear'](),this['measureTool']['deactivate'](),this[dg(0x20f)]();}['onDocumentLoaded'](){const dh=aW;if(!this['doc'])return;this['layerManager']['setLayers'](this[dh(0x28a)]['layers']);const c=performance['now']();this['spatialIndex']['build'](this['doc']['entities'],this['doc']),_t(Ot(this['doc'])),this['spatialIndexBuildTime']=performance['now']()-c,this['selectedEntityIndex']=-0x1,this['measureTool']['deactivate'](),this[dh(0x29d)]==='measure'&&this['measureTool']['activate'](),this['fitToView']();}['fitToView'](){const di=aW;if(this['guardDestroyed'](),!this['doc'])return;const c=this[di(0x2ae)]();if(!c)return;const d=this[di(0x256)]['getBoundingClientRect']();this['camera'][di(0x29e)](xt(d['width'],d['height'],c[di(0x2d4)],c['minY'],c['maxX'],c['maxY'])),this[di(0x20f)](),this['emitter'][di(0x1c3)]('viewchange',this[di(0x235)]['getTransform']());}['zoomTo'](c){const dj=aW;this[dj(0x1e1)]();const d=this['canvas']['getBoundingClientRect'](),f=d['width']/0x2,g=d['height']/0x2,h=c/this['camera']['getTransform']()['scale'];this[dj(0x235)]['zoom'](f,g,h),this['requestRender'](),this['emitter']['emit']('viewchange',this['camera'][dj(0x249)]());}[aW(0x2ec)](c,d){const dk=aW;this['guardDestroyed']();const f=this['canvas']['getBoundingClientRect'](),g=this['camera']['getTransform'](),h=c*g['scale']+g['offsetX'],k=-d*g[dk(0x2cc)]+g[dk(0x29b)],l=f['width']/0x2-h,m=f['height']/0x2-k;this['camera']['pan'](l,m),this[dk(0x20f)](),this['emitter']['emit']('viewchange',this['camera']['getTransform']());}['getViewTransform'](){const dl=aW;return{...this[dl(0x235)]['getTransform']()};}['getZoomSpeed'](){return this['options']['zoomSpeed'];}['getLayers'](){return this['layerManager']['getAllLayers']();}['setLayerVisible'](c,d){const dm=aW;this['guardDestroyed'](),this['layerManager']['setVisible'](c,d),this[dm(0x20f)]();}['setLayerColor'](c,d){const dn=aW;this['guardDestroyed'](),this['layerManager'][dn(0x2aa)](c,d),this['requestRender']();}['setTheme'](c){this['guardDestroyed'](),this['options']['theme']=c,this['requestRender']();}['getTheme'](){return this['options']['theme'];}['setBackgroundColor'](c){const dp=aW;this['guardDestroyed'](),this['options'][dp(0x22d)]=c,this['requestRender']();}['setTool'](c){const dq=aW;this['guardDestroyed'](),this[dq(0x29d)]==='measure'&&c!=='measure'&&this['measureTool'][dq(0x2a2)](),this['currentTool']=c,this['canvas']['style'][dq(0x276)]=this['getCursorForTool'](c),c==='measure'&&this['measureTool']['activate'](),c!=='select'&&(this['selectedEntityIndex']=-0x1),this['requestRender']();}['getTool'](){return this['currentTool'];}['getCursorForTool'](c){const dr=aW;switch(c){case'pan':return'grab';case'select':return'crosshair';case'measure':return dr(0x29c);}}['on'](c,d){this['emitter']['on'](c,d);}['off'](c,d){this['emitter']['off'](c,d);}['getDocument'](){return this['doc'];}['getEntities'](){const ds=aW;return this['doc']?.[ds(0x2de)]??[];}['resize'](){const du=aW;this['renderer'][du(0x270)](),this['requestRender']();}['destroy'](){const dv=aW;this['destroyed']=!0x0,this['stopDebugLoop'](),this[dv(0x1da)]['destroy'](),this['resizeObserver']['disconnect'](),this['renderer']['destroy'](),this['emitter']['removeAllListeners'](),this['spatialIndex']['clear'](),ve(),this['layerManager']['clear'](),this['workerManager']?.['terminate'](),this['workerManager']=null,this['doc']=null;}['requestRender'](){const dw=aW;if(!this['destroyed']){if(this[dw(0x2b3)]){this['doRender']();return;}this['renderPending']||(this['renderPending']=!0x0,requestAnimationFrame(()=>{const dx=dw;this['renderPending']=!0x1,!this['destroyed']&&this[dx(0x200)]();}));}}['doRender'](){const dy=aW;if(!this['doc']){this[dy(0x2d2)]['renderEmpty'](this['options']['theme']);return;}const d=this['camera']['getTransform'](),f=this['renderer']['getWidth'](),g=this['renderer'][dy(0x296)](),k=this['computeViewportBounds'](d,f,g),m=this['spatialIndex']['search'](k['minX'],k['minY'],k['maxX'],k['maxY']),p=new Set();for(let x=0x0;x<m[dy(0x1d0)];x++)p['add'](m[x]['entityIndex']);const u=performance['now'](),v=this[dy(0x2d2)][dy(0x1b0)](this['doc'],d,this[dy(0x2b6)]['theme'],this['layerManager']['getVisibleLayerNames'](),this['selectedEntityIndex'],p,this['spatialIndex']['getEntityBBoxes']());this['lastFrameTime']=performance['now']()-u,this['lastRenderStats']=v;const w=performance['now']();for(w-this['lastDoRenderTime']>=0x3&&this['frameTimestamps']['push'](w),this['lastDoRenderTime']=w;this['frameTimestamps']['length']>0x0&&this['frameTimestamps'][0x0]<w-0x3e8;)this['frameTimestamps']['shift']();if(this['currentTool']==='measure'&&this['measureTool']['state']['phase']!=='idle'){const z=this['renderer']['getContext']();ka(z,this['camera']['getTransform'](),this[dy(0x285)],this['mouseScreenX'],this['mouseScreenY'],this['options'][dy(0x1dc)]);}if(this['debugEnabled']){const A=this['renderer']['getContext'](),C=this['buildDebugStats']();this['lastDebugStats']=C,la(A,C,this['options']['theme'],this['debugOptions'],this['renderer'][dy(0x232)](),this[dy(0x2d2)]['getHeight']());}}['setDebug'](c){const dz=aW;this['guardDestroyed'](),typeof c=='boolean'?this['debugEnabled']=c:(this['debugEnabled']=!0x0,this['debugOptions']=ne(c)),this['debugEnabled']?this[dz(0x29f)]():(this[dz(0x1c1)](),this['requestRender']());}['startDebugLoop'](){if(this['debugRafId'])return;const c=()=>{if(!this['debugEnabled']||this['destroyed']){this['debugRafId']=0x0;return;}this['doRender'](),this['debugRafId']=requestAnimationFrame(c);};this['debugRafId']=requestAnimationFrame(c);}['stopDebugLoop'](){this['debugRafId']&&(cancelAnimationFrame(this['debugRafId']),this['debugRafId']=0x0);}['getDebugStats'](){const dA=aW;return this['debugEnabled']?this[dA(0x2a0)]:null;}[aW(0x2e1)](){const dB=aW,c=this['camera']['getTransform'](),d=this['renderer']['getWidth'](),f=this[dB(0x2d2)][dB(0x296)](),g=this['computeViewportBounds'](c,d,f);return{'fps':this['frameTimestamps']['length'],'frameTime':this['lastFrameTime'],'renderStats':this['lastRenderStats']??{'entitiesDrawn':0x0,'entitiesSkipped':0x0,'drawCalls':0x0,'byType':{}},'entityCount':this['doc']?.[dB(0x2de)]['length']??0x0,'layerCount':this['doc']?.['layers']['size']??0x0,'visibleLayerCount':this['layerManager']['getVisibleLayerNames']()['size'],'blockCount':this[dB(0x28a)]?.['blocks']['size']??0x0,'parseTime':this['parseTime'],'spatialIndexBuildTime':this['spatialIndexBuildTime'],'totalLoadTime':this['parseTime']+this[dB(0x2ed)],'zoom':c['scale'],'pixelSize':c['scale']>0x0?0x1/c[dB(0x2cc)]:0x0,'viewportBounds':g,'fileName':this['loadedFileName'],'fileSize':this['loadedFileSize'],'dxfVersion':this['doc']?.['header']['acadVersion']??null};}['computeViewportBounds'](c,d,f){const dC=aW,[g,h]=q(c,0x0,f),[k,l]=q(c,d,0x0);return{'minX':Math['min'](g,k),'minY':Math[dC(0x229)](h,l),'maxX':Math['max'](g,k),'maxY':Math[dC(0x2a3)](h,l)};}['handlePan'](c,d){const dD=aW;this[dD(0x235)]['pan'](c,d),this['requestRender'](),this[dD(0x2c9)]['emit']('viewchange',this[dD(0x235)]['getTransform']());}['handleZoom'](c,d,f){const dE=aW;this['camera']['zoom'](c,d,f),this['requestRender'](),this['emitter']['emit'](dE(0x1de),this['camera']['getTransform']());}['handleClick'](c,d){const dF=aW;if(!this['doc'])return;const f=this['camera']['getTransform'](),[g,h]=q(f,c,d);switch(this['currentTool']){case'select':this[dF(0x291)](g,h,c,d);break;case'measure':{const k=ke(g,h,this['doc']['entities'],this['spatialIndex'],f['scale']),l=k['length']>0x0?k[0x0]:null,m=this['measureTool']['handleClick'](g,h,l);this['requestRender'](),m&&this['emitter']['emit']('measure',m);break;}}}['handleMouseMove'](c,d){const dG=aW;if(this['mouseScreenX']=c,this['mouseScreenY']=d,this['currentTool']==='measure'&&this['doc']){const f=this['camera']['getTransform'](),[g,h]=q(f,c,d),i=ke(g,h,this['doc']['entities'],this['spatialIndex'],f['scale']);this[dG(0x285)]['handleMove'](i[0x0]??null),this['requestRender']();}}['handleSelect'](c,d,f,g){const dH=aW;if(!this['doc'])return;const h=pa(c,d,this['doc']['entities'],this['spatialIndex'],this[dH(0x267)]['getVisibleLayerNames'](),this[dH(0x235)]['getTransform']()['scale']);if(this['selectedEntityIndex']=h,this['requestRender'](),h>=0x0&&this['doc']){const i=this['doc'][dH(0x2de)][h];i&&this['emitter']['emit']('select',{'entity':i,'entityIndex':h,'worldPoint':{'x':c,'y':d},'screenPoint':{'x':f,'y':g}});}}['computeDocumentBounds'](){return this['doc']?this['doc']['header']['extMin']&&this['doc']['header']['extMax']?{'minX':this['doc']['header']['extMin']['x'],'minY':this['doc']['header']['extMin']['y'],'maxX':this['doc']['header']['extMax']['x'],'maxY':this['doc']['header']['extMax']['y']}:Rt(this['doc']['entities']):null;}};export{wa as CadViewer,yt as Camera,na as CanvasRenderer,T as DxfParseError,ha as EventEmitter,ca as LayerManager,xa as MeasureTool,fa as SpatialIndex,E as THEMES,Ft as aciToHex,me as applyTransform,Rt as computeEntitiesBounds,B as computeEntityBBox,J as drawEntity,ke as findSnaps,xt as fitToView,pa as hitTest,ae as parseDxf,la as renderDebugOverlay,ka as renderMeasureOverlay,se as resolveEntityColor,q as screenToWorld,W as worldToScreen,kt as zoomAtPoint};
1
+ const aT=b;(function(c,d){const aS=b,e=c();while(!![]){try{const f=-parseInt(aS(0x1ba))/0x1*(-parseInt(aS(0x196))/0x2)+-parseInt(aS(0x1ab))/0x3*(-parseInt(aS(0xf9))/0x4)+-parseInt(aS(0x160))/0x5+-parseInt(aS(0x18a))/0x6*(parseInt(aS(0x1ef))/0x7)+-parseInt(aS(0xef))/0x8+-parseInt(aS(0x216))/0x9*(-parseInt(aS(0x1d8))/0xa)+-parseInt(aS(0x1da))/0xb*(-parseInt(aS(0x207))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xb419c));function Pe(g,k,m=0x0,p=g[aT(0x206)]-0x1,v=De){const aU=aT;for(;p>m;){if(p-m>0x258){const A=p-m+0x1,C=k-m+0x1,D=Math[aU(0x10c)](A),F=0.5*Math[aU(0x15f)](0x2*D/0x3),I=0.5*Math[aU(0x1d2)](D*F*(A-F)/A)*(C-A/0x2<0x0?-0x1:0x1),L=Math[aU(0x151)](m,Math['floor'](k-C*F/A+I)),M=Math[aU(0x1ea)](p,Math['floor'](k+(A-C)*F/A+I));Pe(g,k,L,M,v);}const w=g[k];let x=m,z=p;for(_(g,m,k),v(g[p],w)>0x0&&_(g,m,p);x<z;){for(_(g,x,z),x++,z--;v(g[x],w)<0x0;)x++;for(;v(g[z],w)>0x0;)z--;}v(g[m],w)===0x0?_(g,m,z):(z++,_(g,z,p)),z<=k&&(m=z+0x1),k<=z&&(p=z-0x1);}}function _(c,d,f){const g=c[d];c[d]=c[f],c[f]=g;}function De(c,d){return c<d?-0x1:c>d?0x1:0x0;}class Le{constructor(c=0x9){const aV=aT;this[aV(0x1a3)]=Math['max'](0x4,c),this['_minEntries']=Math['max'](0x2,Math['ceil'](this[aV(0x1a3)]*0.4)),this['clear']();}[aT(0x1d0)](){return this['_all'](this['data'],[]);}['search'](d){const aW=aT;let e=this['data'];const f=[];if(!G(d,e))return f;const g=this['toBBox'],h=[];for(;e;){for(let k=0x0;k<e['children']['length'];k++){const l=e['children'][k],m=e['leaf']?g(l):l;G(d,m)&&(e['leaf']?f['push'](l):te(d,m)?this['_all'](l,f):h['push'](l));}e=h[aW(0x146)]();}return f;}[aT(0x188)](c){const aX=aT;let d=this['data'];if(!G(c,d))return!0x1;const e=[];for(;d;){for(let f=0x0;f<d[aX(0x1b4)][aX(0x206)];f++){const g=d['children'][f],h=d['leaf']?this['toBBox'](g):g;if(G(c,h)){if(d['leaf']||te(c,h))return!0x0;e['push'](g);}}d=e[aX(0x146)]();}return!0x1;}['load'](c){const aY=aT;if(!(c&&c['length']))return this;if(c['length']<this['_minEntries']){for(let e=0x0;e<c['length'];e++)this['insert'](c[e]);return this;}let d=this['_build'](c['slice'](),0x0,c['length']-0x1,0x0);if(!this['data']['children']['length'])this['data']=d;else{if(this['data']['height']===d['height'])this['_splitRoot'](this['data'],d);else{if(this['data']['height']<d['height']){const f=this['data'];this['data']=d,d=f;}this['_insert'](d,this['data'][aY(0x1cb)]-d[aY(0x1cb)]-0x1,!0x0);}}return this;}[aT(0x225)](c){const aZ=aT;return c&&this['_insert'](c,this['data'][aZ(0x1cb)]-0x1),this;}['clear'](){return this['data']=O([]),this;}['remove'](d,e){const b0=aT;if(!d)return this;let f=this['data'];const g=this['toBBox'](d),k=[],m=[];let p,u,v;for(;f||k['length'];){if(f||(f=k['pop'](),u=k[k[b0(0x206)]-0x1],p=m['pop'](),v=!0x0),f['leaf']){const w=Ne(d,f['children'],e);if(w!==-0x1)return f['children']['splice'](w,0x1),k['push'](f),this['_condense'](k),this;}!v&&!f['leaf']&&te(f,g)?(k['push'](f),m['push'](p),p=0x0,u=f,f=f['children'][0x0]):u?(p++,f=u['children'][p],v=!0x1):f=null;}return this;}['toBBox'](c){return c;}['compareMinX'](c,d){const b1=aT;return c['minX']-d[b1(0x1a8)];}['compareMinY'](c,d){return c['minY']-d['minY'];}[aT(0x190)](){return this['data'];}['fromJSON'](c){const b2=aT;return this[b2(0xf4)]=c,this;}[aT(0x1d7)](c,d){const b3=aT,e=[];for(;c;)c[b3(0x1b0)]?d['push'](...c['children']):e['push'](...c['children']),c=e['pop']();return d;}['_build'](e,g,k,m){const b4=aT,p=k-g+0x1;let v=this[b4(0x1a3)],w;if(p<=v)return w=O(e['slice'](g,k+0x1)),R(w,this['toBBox']),w;m||(m=Math['ceil'](Math['log'](p)/Math[b4(0x10c)](v)),v=Math['ceil'](p/Math['pow'](v,m-0x1))),w=O([]),w['leaf']=!0x1,w['height']=m;const x=Math['ceil'](p/v),z=x*Math['ceil'](Math['sqrt'](v));de(e,g,k,z,this['compareMinX']);for(let A=g;A<=k;A+=z){const C=Math['min'](A+z-0x1,k);de(e,A,C,x,this[b4(0x1d6)]);for(let D=A;D<=C;D+=x){const F=Math['min'](D+x-0x1,C);w['children']['push'](this['_build'](e,D,F,m-0x1));}}return R(w,this['toBBox']),w;}['_chooseSubtree'](d,e,f,g){const b5=aT;for(;g[b5(0x177)](e),!(e[b5(0x1b0)]||g['length']-0x1===f);){let k=0x1/0x0,m=0x1/0x0,p;for(let v=0x0;v<e['children'][b5(0x206)];v++){const w=e['children'][v],x=ee(w),z=Ye(d,w)-x;z<m?(m=z,k=x<k?x:k,p=w):z===m&&x<k&&(k=x,p=w);}e=p||e['children'][0x0];}return e;}['_insert'](c,d,e){const b6=aT,f=e?c:this['toBBox'](c),g=[],h=this[b6(0xec)](f,this[b6(0xf4)],d,g);for(h['children']['push'](c),j(h,f);d>=0x0&&g[d]['children']['length']>this['_maxEntries'];)this['_split'](g,d),d--;this['_adjustParentBBoxes'](f,g,d);}['_split'](c,d){const b7=aT,e=c[d],f=e['children']['length'],g=this[b7(0x16c)];this['_chooseSplitAxis'](e,g,f);const h=this['_chooseSplitIndex'](e,g,f),k=O(e['children'][b7(0x1b6)](h,e[b7(0x1b4)]['length']-h));k[b7(0x1cb)]=e['height'],k['leaf']=e['leaf'],R(e,this['toBBox']),R(k,this['toBBox']),d?c[d-0x1]['children']['push'](k):this['_splitRoot'](e,k);}[aT(0x1dc)](c,d){const b8=aT;this['data']=O([c,d]),this['data'][b8(0x1cb)]=c['height']+0x1,this[b8(0xf4)]['leaf']=!0x1,R(this['data'],this['toBBox']);}['_chooseSplitIndex'](d,e,f){let g,k=0x1/0x0,m=0x1/0x0;for(let p=e;p<=f-e;p++){const v=$(d,0x0,p,this['toBBox']),w=$(d,p,f,this['toBBox']),x=ze(v,w),z=ee(v)+ee(w);x<k?(k=x,g=p,m=z<m?z:m):x===k&&z<m&&(m=z,g=p);}return g||f-e;}[aT(0xdc)](c,d,e){const b9=aT,f=c['leaf']?this['compareMinX']:Be,g=c[b9(0x1b0)]?this['compareMinY']:Xe,h=this['_allDistMargin'](c,d,e,f),k=this[b9(0xda)](c,d,e,g);h<k&&c['children'][b9(0x153)](f);}['_allDistMargin'](d,e,f,g){d['children']['sort'](g);const k=this['toBBox'],m=$(d,0x0,e,k),p=$(d,f-e,f,k);let u=U(m)+U(p);for(let v=e;v<f-e;v++){const w=d['children'][v];j(m,d['leaf']?k(w):w),u+=U(m);}for(let x=f-e-0x1;x>=e;x--){const z=d['children'][x];j(p,d['leaf']?k(z):z),u+=U(p);}return u;}['_adjustParentBBoxes'](c,d,e){for(let f=e;f>=0x0;f--)j(d[f],c);}[aT(0x192)](c){const bb=aT;for(let d=c[bb(0x206)]-0x1,e;d>=0x0;d--)c[d][bb(0x1b4)]['length']===0x0?d>0x0?(e=c[d-0x1]['children'],e['splice'](e['indexOf'](c[d]),0x1)):this['clear']():R(c[d],this['toBBox']);}}function Ne(c,d,f){if(!f)return d['indexOf'](c);for(let g=0x0;g<d['length'];g++)if(f(c,d[g]))return g;return-0x1;}function R(c,d){const bc=aT;$(c,0x0,c[bc(0x1b4)]['length'],d,c);}function $(c,d,f,g,h){const bd=aT;h||(h=O(null)),h['minX']=0x1/0x0,h['minY']=0x1/0x0,h['maxX']=-0x1/0x0,h['maxY']=-0x1/0x0;for(let k=d;k<f;k++){const l=c['children'][k];j(h,c[bd(0x1b0)]?g(l):l);}return h;}function j(c,d){const bf=aT;return c['minX']=Math['min'](c['minX'],d['minX']),c['minY']=Math['min'](c[bf(0x19c)],d[bf(0x19c)]),c['maxX']=Math['max'](c['maxX'],d['maxX']),c['maxY']=Math['max'](c[bf(0x176)],d['maxY']),c;}function Be(c,d){return c['minX']-d['minX'];}function Xe(c,d){const bg=aT;return c['minY']-d[bg(0x19c)];}function ee(c){return(c['maxX']-c['minX'])*(c['maxY']-c['minY']);}function U(c){const bh=aT;return c['maxX']-c['minX']+(c[bh(0x176)]-c['minY']);}function Ye(c,d){const bi=aT;return(Math['max'](d['maxX'],c['maxX'])-Math['min'](d[bi(0x1a8)],c['minX']))*(Math['max'](d['maxY'],c[bi(0x176)])-Math['min'](d['minY'],c['minY']));}function ze(c,d){const bj=aT,f=Math['max'](c['minX'],d['minX']),g=Math['max'](c['minY'],d['minY']),h=Math['min'](c[bj(0x1f7)],d['maxX']),i=Math[bj(0x1ea)](c['maxY'],d[bj(0x176)]);return Math['max'](0x0,h-f)*Math['max'](0x0,i-g);}function te(c,d){const bk=aT;return c['minX']<=d['minX']&&c['minY']<=d['minY']&&d['maxX']<=c['maxX']&&d['maxY']<=c[bk(0x176)];}function G(c,d){const bl=aT;return d[bl(0x1a8)]<=c['maxX']&&d['minY']<=c['maxY']&&d[bl(0x1f7)]>=c['minX']&&d['maxY']>=c['minY'];}function O(c){return{'children':c,'height':0x1,'leaf':!0x0,'minX':0x1/0x0,'minY':0x1/0x0,'maxX':-0x1/0x0,'maxY':-0x1/0x0};}function de(c,d,f,g,h){const k=[d,f];for(;k['length'];){if(f=k['pop'](),d=k['pop'](),f-d<=g)continue;const l=d+Math['ceil']((f-d)/g/0x2)*g;Pe(c,l,d,f,h),k['push'](d,l,l,f);}}function Re(d){const bm=aT,f=d[bm(0x12e)](/\r\n?/g,'\x0a'),g=[],h=f['length'];let k=0x0;for(;k<h;){for(;k<h&&f['charCodeAt'](k)===0xa;)k++;if(k>=h)break;let l=f[bm(0x10d)]('\x0a',k);l===-0x1&&(l=h);const m=f['substring'](k,l)['trim']();k=l+0x1;const p=parseInt(m,0xa);if(isNaN(p)){k<h&&(l=f['indexOf']('\x0a',k),l===-0x1&&(l=h),k=l+0x1);continue;}if(k>=h)break;l=f[bm(0x10d)]('\x0a',k),l===-0x1&&(l=h);const u=f['substring'](k,l)['replace'](/\s+$/,'');k=l+0x1,g['push']({'code':p,'value':u});}return g;}function Oe(c,d,f){const bn=aT;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g['value']==='ENDSEC')return d+0x1;if(g['code']===0x9){const h=g[bn(0x1fc)];switch(d++,h){case'$ACADVER':d<c['length']&&(f['acadVersion']=c[d][bn(0x1fc)],d++);break;case'$EXTMIN':if(d<c['length']){const i=fe(c,d);f['extMin']=i['point'],d=i['nextIndex'];}break;case'$EXTMAX':if(d<c['length']){const k=fe(c,d);f['extMax']=k['point'],d=k[bn(0x127)];}break;case'$INSUNITS':d<c[bn(0x206)]&&(f['insUnits']=parseInt(c[d]['value'],0xa),d++);break;case'$MEASUREMENT':d<c['length']&&(f['measurement']=parseInt(c[d]['value'],0xa),d++);break;case'$LTSCALE':d<c[bn(0x206)]&&(f[bn(0x19a)]=parseFloat(c[d]['value']),d++);break;case'$DWGCODEPAGE':d<c[bn(0x206)]&&(f['dwgCodePage']=c[d]['value'],d++);break;case'$HANDSEED':d<c['length']&&(f['handleSeed']=c[d][bn(0x1fc)],d++);break;default:for(;d<c['length']&&c[d]['code']!==0x9&&c[d]['code']!==0x0;)f[h]=c[d]['value'],d++;}}else d++;}return d;}function fe(c,d){const bo=aT,f={'x':0x0,'y':0x0,'z':0x0};for(;d<c['length'];){const g=c[d][bo(0x13b)];if(g===0xa)f['x']=parseFloat(c[d]['value']),d++;else{if(g===0x14)f['y']=parseFloat(c[d]['value']),d++;else{if(g===0x1e)f['z']=parseFloat(c[d]['value']),d++;else break;}}}return{'point':f,'nextIndex':d};}function _e(c,d,f){const bp=aT;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g['value']===bp(0x179))return d+0x1;if(g['code']===0x0&&g['value']==='TABLE'){if(d++,d>=c['length'])break;const h=c[d]['value'];switch(d++,h){case'LAYER':d=$e(c,d,f['layers']);break;case bp(0x134):d=je(c,d,f['lineTypes']);break;case'STYLE':d=qe(c,d,f[bp(0x119)]);break;default:d=We(c,d);break;}}else d++;}return d;}function We(c,d){for(;d<c['length'];){if(c[d]['code']===0x0&&c[d]['value']==='ENDTAB')return d+0x1;d++;}return d;}function $e(c,d,f){const bq=aT;for(;d<c['length'];){const g=c[d];if(g[bq(0x13b)]===0x0&&g['value']===bq(0x214))return d+0x1;if(g['code']===0x0&&g['value']==='LAYER'){d++;const h={'name':'0','color':0x7,'lineType':'Continuous','flags':0x0,'lineWeight':-0x3,'isOff':!0x1,'isFrozen':!0x1,'isLocked':!0x1};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h['name']=i['value'];break;case 0x6:h['lineType']=i['value'];break;case 0x3e:h['color']=parseInt(i['value'],0xa);break;case 0x46:h['flags']=parseInt(i['value'],0xa);break;case 0x172:h['lineWeight']=parseInt(i[bq(0x1fc)],0xa);break;case 0x1a4:h[bq(0x18d)]=parseInt(i[bq(0x1fc)],0xa);break;}d++;}f['set'](h['name'],h);}else d++;}return d;}function je(c,d,f){const br=aT;for(;d<c['length'];){const g=c[d];if(g[br(0x13b)]===0x0&&g['value']==='ENDTAB')return d+0x1;if(g[br(0x13b)]===0x0&&g['value']==='LTYPE'){d++;const h={'name':'','description':'','pattern':[],'totalLength':0x0};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i[br(0x13b)]){case 0x2:h['name']=i['value'];break;case 0x3:h['description']=i[br(0x1fc)];break;case 0x28:h['totalLength']=parseFloat(i['value']);break;case 0x31:h['pattern']['push'](parseFloat(i['value']));break;}d++;}h[br(0x205)]&&f['set'](h['name'],h);}else d++;}return d;}function qe(c,d,f){const bs=aT;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g['value']==='ENDTAB')return d+0x1;if(g['code']===0x0&&g['value']==='STYLE'){d++;const h={'name':'','fontName':'','bigFontName':'','height':0x0,'widthFactor':0x1,'obliqueAngle':0x0};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h[bs(0x205)]=i['value'];break;case 0x3:h['fontName']=i[bs(0x1fc)];break;case 0x4:h['bigFontName']=i['value'];break;case 0x28:h[bs(0x1cb)]=parseFloat(i['value']);break;case 0x29:h[bs(0x1cf)]=parseFloat(i[bs(0x1fc)]);break;case 0x32:h['obliqueAngle']=parseFloat(i['value']);break;}d++;}h['name']&&f['set'](h['name'],h);}else d++;}return d;}function P(c){const bu=aT,d={'type':'','layer':'0','color':0x100,'lineType':'BYLAYER','lineTypeScale':0x1,'lineWeight':-0x1,'visible':!0x0,'extrusion':{'x':0x0,'y':0x0,'z':0x1}};for(const f of c)switch(f['code']){case 0x5:d['handle']=f['value'];break;case 0x8:d['layer']=f['value'];break;case 0x6:d['lineType']=f['value'];break;case 0x30:d[bu(0x1ed)]=parseFloat(f['value']);break;case 0x3c:d['visible']=f[bu(0x1fc)]==='0'||f['value']==='';break;case 0x3e:d[bu(0x1d5)]=parseInt(f[bu(0x1fc)],0xa);break;case 0x172:d['lineWeight']=parseInt(f['value'],0xa);break;case 0x1a4:d['trueColor']=parseInt(f['value'],0xa);break;case 0xd2:d['extrusion']['x']=parseFloat(f[bu(0x1fc)]);break;case 0xdc:d['extrusion']['y']=parseFloat(f['value']);break;case 0xe6:d['extrusion']['z']=parseFloat(f['value']);break;}return d;}function He(c){const bv=aT,d={...P(c),'type':'LINE','start':{'x':0x0,'y':0x0,'z':0x0},'end':{'x':0x0,'y':0x0,'z':0x0}};for(const f of c)switch(f['code']){case 0xa:d['start']['x']=parseFloat(f['value']);break;case 0x14:d['start']['y']=parseFloat(f['value']);break;case 0x1e:d['start']['z']=parseFloat(f['value']);break;case 0xb:d['end']['x']=parseFloat(f['value']);break;case 0x15:d['end']['y']=parseFloat(f['value']);break;case 0x1f:d[bv(0x12c)]['z']=parseFloat(f['value']);break;}return d;}function Ve(c){const bw=aT,d={...P(c),'type':'CIRCLE','center':{'x':0x0,'y':0x0,'z':0x0},'radius':0x0};for(const f of c)switch(f['code']){case 0xa:d['center']['x']=parseFloat(f['value']);break;case 0x14:d[bw(0x186)]['y']=parseFloat(f['value']);break;case 0x1e:d['center']['z']=parseFloat(f[bw(0x1fc)]);break;case 0x28:d['radius']=parseFloat(f['value']);break;}return d;}function Ue(c){const bx=aT,d={...P(c),'type':'ARC','center':{'x':0x0,'y':0x0,'z':0x0},'radius':0x0,'startAngle':0x0,'endAngle':0x168};for(const f of c)switch(f['code']){case 0xa:d['center']['x']=parseFloat(f['value']);break;case 0x14:d['center']['y']=parseFloat(f['value']);break;case 0x1e:d[bx(0x186)]['z']=parseFloat(f['value']);break;case 0x28:d['radius']=parseFloat(f['value']);break;case 0x32:d[bx(0x185)]=parseFloat(f['value']);break;case 0x33:d['endAngle']=parseFloat(f['value']);break;}return d;}function Ge(c){const by=aT,d={...P(c),'type':'LWPOLYLINE','vertices':[],'closed':!0x1,'constantWidth':0x0,'elevation':0x0};let f=null;for(const g of c)switch(g['code']){case 0x46:d[by(0x211)]=(parseInt(g[by(0x1fc)],0xa)&0x1)!==0x0;break;case 0x26:d['elevation']=parseFloat(g['value']);break;case 0x2b:d['constantWidth']=parseFloat(g['value']);break;case 0xa:f&&d['vertices']['push'](f),f={'x':parseFloat(g['value']),'y':0x0,'bulge':0x0,'startWidth':0x0,'endWidth':0x0};break;case 0x14:f&&(f['y']=parseFloat(g['value']));break;case 0x28:f&&(f[by(0x116)]=parseFloat(g['value']));break;case 0x29:f&&(f['endWidth']=parseFloat(g['value']));break;case 0x2a:f&&(f[by(0xe6)]=parseFloat(g['value']));break;}return f&&d['vertices']['push'](f),d;}function Ze(c){const d={...P(c),'type':'POLYLINE','vertices':[],'closed':!0x1,'is3d':!0x1};for(const f of c)switch(f['code']){case 0x46:{const g=parseInt(f['value'],0xa);d['closed']=(g&0x1)!==0x0,d['is3d']=(g&0x8)!==0x0;break;}}return d;}function Ke(c){const bz=aT,d={...P(c),'type':'ELLIPSE','center':{'x':0x0,'y':0x0,'z':0x0},'majorAxis':{'x':0x1,'y':0x0,'z':0x0},'minorRatio':0x1,'startParam':0x0,'endParam':Math['PI']*0x2};for(const f of c)switch(f[bz(0x13b)]){case 0xa:d['center']['x']=parseFloat(f['value']);break;case 0x14:d['center']['y']=parseFloat(f['value']);break;case 0x1e:d[bz(0x186)]['z']=parseFloat(f[bz(0x1fc)]);break;case 0xb:d['majorAxis']['x']=parseFloat(f['value']);break;case 0x15:d['majorAxis']['y']=parseFloat(f['value']);break;case 0x1f:d['majorAxis']['z']=parseFloat(f['value']);break;case 0x28:d['minorRatio']=parseFloat(f['value']);break;case 0x29:d['startParam']=parseFloat(f[bz(0x1fc)]);break;case 0x2a:d['endParam']=parseFloat(f[bz(0x1fc)]);break;}return d;}function Qe(c){const bA=aT,d={...P(c),'type':'SPLINE','degree':0x3,'flags':0x0,'knots':[],'controlPoints':[],'fitPoints':[],'weights':[]};let f=null,g=null;for(const h of c)switch(h['code']){case 0x46:d['flags']=parseInt(h['value'],0xa);break;case 0x47:d['degree']=parseInt(h['value'],0xa);break;case 0x28:d['knots']['push'](parseFloat(h['value']));break;case 0x29:d['weights']['push'](parseFloat(h['value']));break;case 0xa:f&&d['controlPoints']['push'](f),f={'x':parseFloat(h['value']),'y':0x0,'z':0x0};break;case 0x14:f&&(f['y']=parseFloat(h['value']));break;case 0x1e:f&&(f['z']=parseFloat(h['value']));break;case 0xb:g&&d['fitPoints']['push'](g),g={'x':parseFloat(h['value']),'y':0x0,'z':0x0};break;case 0x15:g&&(g['y']=parseFloat(h['value']));break;case 0x1f:g&&(g['z']=parseFloat(h['value']));break;case 0xc:d['startTangent']||(d['startTangent']={'x':0x0,'y':0x0,'z':0x0}),d['startTangent']['x']=parseFloat(h['value']);break;case 0x16:d['startTangent']&&(d['startTangent']['y']=parseFloat(h['value']));break;case 0x20:d['startTangent']&&(d[bA(0xf0)]['z']=parseFloat(h['value']));break;case 0xd:d['endTangent']||(d['endTangent']={'x':0x0,'y':0x0,'z':0x0}),d[bA(0x145)]['x']=parseFloat(h['value']);break;case 0x17:d['endTangent']&&(d[bA(0x145)]['y']=parseFloat(h['value']));break;case 0x21:d['endTangent']&&(d['endTangent']['z']=parseFloat(h['value']));break;}return f&&d['controlPoints']['push'](f),g&&d[bA(0x1c2)]['push'](g),d;}function Je(c){const bB=aT,d={...P(c),'type':'TEXT','text':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'height':0x1,'rotation':0x0,'widthFactor':0x1,'obliqueAngle':0x0,'style':bB(0x166),'hAlign':0x0,'vAlign':0x0,'generationFlags':0x0};for(const f of c)switch(f['code']){case 0x1:d['text']=f[bB(0x1fc)];break;case 0xa:d['insertionPoint']['x']=parseFloat(f['value']);break;case 0x14:d['insertionPoint']['y']=parseFloat(f['value']);break;case 0x1e:d['insertionPoint']['z']=parseFloat(f['value']);break;case 0xb:d['alignmentPoint']||(d[bB(0x226)]={'x':0x0,'y':0x0,'z':0x0}),d['alignmentPoint']['x']=parseFloat(f['value']);break;case 0x15:d['alignmentPoint']||(d['alignmentPoint']={'x':0x0,'y':0x0,'z':0x0}),d['alignmentPoint']['y']=parseFloat(f['value']);break;case 0x1f:d['alignmentPoint']||(d['alignmentPoint']={'x':0x0,'y':0x0,'z':0x0}),d['alignmentPoint']['z']=parseFloat(f['value']);break;case 0x28:d['height']=parseFloat(f['value']);break;case 0x29:d['widthFactor']=parseFloat(f[bB(0x1fc)]);break;case 0x32:d['rotation']=parseFloat(f['value']);break;case 0x33:d['obliqueAngle']=parseFloat(f['value']);break;case 0x7:d[bB(0x20a)]=f['value'];break;case 0x47:d['generationFlags']=parseInt(f['value'],0xa);break;case 0x48:d['hAlign']=parseInt(f['value'],0xa);break;case 0x49:d['vAlign']=parseInt(f['value'],0xa);break;}return d;}function et(c){const bC=aT,d={...P(c),'type':'MTEXT','text':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'height':0x1,'width':0x0,'attachmentPoint':0x1,'drawingDirection':0x1,'rotation':0x0,'lineSpacingStyle':0x1,'lineSpacingFactor':0x1,'style':bC(0x166),'bgFill':0x0,'bgFillScale':1.5},f=[];for(const g of c)switch(g['code']){case 0x1:f['push'](g['value']);break;case 0x3:f[bC(0x177)](g['value']);break;case 0x7:d['style']=g['value'];break;case 0xa:d['insertionPoint']['x']=parseFloat(g['value']);break;case 0x14:d['insertionPoint']['y']=parseFloat(g['value']);break;case 0x1e:d['insertionPoint']['z']=parseFloat(g['value']);break;case 0xb:d['textDirection']||(d['textDirection']={'x':0x0,'y':0x0,'z':0x0}),d['textDirection']['x']=parseFloat(g['value']);break;case 0x15:d['textDirection']||(d['textDirection']={'x':0x0,'y':0x0,'z':0x0}),d['textDirection']['y']=parseFloat(g['value']);break;case 0x1f:d['textDirection']||(d[bC(0x1d1)]={'x':0x0,'y':0x0,'z':0x0}),d['textDirection']['z']=parseFloat(g['value']);break;case 0x28:d['height']=parseFloat(g['value']);break;case 0x29:d[bC(0x227)]=parseFloat(g['value']);break;case 0x2c:d['lineSpacingFactor']=parseFloat(g[bC(0x1fc)]);break;case 0x32:d[bC(0x12f)]=parseFloat(g['value']);break;case 0x47:d['attachmentPoint']=parseInt(g['value'],0xa);break;case 0x48:d['drawingDirection']=parseInt(g['value'],0xa);break;case 0x49:d['lineSpacingStyle']=parseInt(g[bC(0x1fc)],0xa);break;case 0x5a:d['bgFill']=parseInt(g['value'],0xa);break;}return d[bC(0x161)]=f['join'](''),d;}function tt(c){const bD=aT,d={...P(c),'type':'INSERT','blockName':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'scaleX':0x1,'scaleY':0x1,'scaleZ':0x1,'rotation':0x0,'columnCount':0x1,'rowCount':0x1,'columnSpacing':0x0,'rowSpacing':0x0,'attribs':[]};for(const f of c)switch(f['code']){case 0x2:d['blockName']=f[bD(0x1fc)];break;case 0xa:d['insertionPoint']['x']=parseFloat(f['value']);break;case 0x14:d[bD(0x1fe)]['y']=parseFloat(f['value']);break;case 0x1e:d['insertionPoint']['z']=parseFloat(f['value']);break;case 0x29:d['scaleX']=parseFloat(f['value']);break;case 0x2a:d['scaleY']=parseFloat(f[bD(0x1fc)]);break;case 0x2b:d[bD(0x155)]=parseFloat(f[bD(0x1fc)]);break;case 0x2c:d[bD(0x1f2)]=parseFloat(f['value']);break;case 0x2d:d['rowSpacing']=parseFloat(f['value']);break;case 0x32:d['rotation']=parseFloat(f['value']);break;case 0x46:d[bD(0xf5)]=parseInt(f[bD(0x1fc)],0xa)||0x1;break;case 0x47:d[bD(0xe7)]=parseInt(f['value'],0xa)||0x1;break;}return d;}function at(c){const bE=aT,d={...P(c),'type':'DIMENSION','blockName':'','dimStyle':'STANDARD','dimType':0x0,'defPoint':{'x':0x0,'y':0x0,'z':0x0},'textMidpoint':{'x':0x0,'y':0x0,'z':0x0},'textOverride':'','rotation':0x0,'textRotation':0x0,'leaderLength':0x0};for(const f of c)switch(f['code']){case 0x1:d['textOverride']=f['value'];break;case 0x2:d['blockName']=f['value'];break;case 0x3:d['dimStyle']=f['value'];break;case 0xa:d[bE(0x15b)]['x']=parseFloat(f['value']);break;case 0x14:d['defPoint']['y']=parseFloat(f['value']);break;case 0x1e:d['defPoint']['z']=parseFloat(f['value']);break;case 0xb:d['textMidpoint']['x']=parseFloat(f['value']);break;case 0x15:d['textMidpoint']['y']=parseFloat(f['value']);break;case 0x1f:d['textMidpoint']['z']=parseFloat(f['value']);break;case 0xd:d[bE(0x1ac)]||(d['defPoint2']={'x':0x0,'y':0x0,'z':0x0}),d[bE(0x1ac)]['x']=parseFloat(f['value']);break;case 0x17:d['defPoint2']||(d['defPoint2']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint2']['y']=parseFloat(f['value']);break;case 0x21:d['defPoint2']||(d[bE(0x1ac)]={'x':0x0,'y':0x0,'z':0x0}),d['defPoint2']['z']=parseFloat(f['value']);break;case 0xe:d['defPoint3']||(d['defPoint3']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint3']['x']=parseFloat(f['value']);break;case 0x18:d['defPoint3']||(d['defPoint3']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint3']['y']=parseFloat(f['value']);break;case 0x22:d[bE(0x11e)]||(d[bE(0x11e)]={'x':0x0,'y':0x0,'z':0x0}),d['defPoint3']['z']=parseFloat(f['value']);break;case 0xf:d[bE(0x1b1)]||(d['defPoint4']={'x':0x0,'y':0x0,'z':0x0}),d[bE(0x1b1)]['x']=parseFloat(f['value']);break;case 0x19:d['defPoint4']||(d['defPoint4']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint4']['y']=parseFloat(f['value']);break;case 0x23:d['defPoint4']||(d['defPoint4']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint4']['z']=parseFloat(f['value']);break;case 0x10:d['defPoint5']||(d[bE(0x1dd)]={'x':0x0,'y':0x0,'z':0x0}),d['defPoint5']['x']=parseFloat(f['value']);break;case 0x1a:d[bE(0x1dd)]||(d['defPoint5']={'x':0x0,'y':0x0,'z':0x0}),d[bE(0x1dd)]['y']=parseFloat(f['value']);break;case 0x24:d['defPoint5']||(d['defPoint5']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint5']['z']=parseFloat(f['value']);break;case 0x28:d['leaderLength']=parseFloat(f['value']);break;case 0x32:d['rotation']=parseFloat(f['value']);break;case 0x35:d[bE(0x167)]=parseFloat(f['value']);break;case 0x46:d['dimType']=parseInt(f['value'],0xa);break;}return d;}function nt(c){const bF=aT,d={...P(c),'type':'HATCH','patternName':'','solidFill':!0x0,'associative':!0x1,'hatchStyle':0x0,'patternType':0x1,'patternAngle':0x0,'patternScale':0x1,'boundaryPaths':[]};let f=0x0;for(;f<c['length'];){const g=c[f];switch(g[bF(0x13b)]){case 0x2:d['patternName']=g['value'];break;case 0x29:d[bF(0x1f1)]=parseFloat(g['value']);break;case 0x34:d['patternAngle']=parseFloat(g[bF(0x1fc)]);break;case 0x46:d['solidFill']=g['value']==='1';break;case 0x47:d['associative']=g['value']==='1';break;case 0x4b:d[bF(0x12b)]=parseInt(g[bF(0x1fc)],0xa);break;case 0x4c:d['patternType']=parseInt(g['value'],0xa);break;case 0x5b:{const h=parseInt(g[bF(0x1fc)],0xa);f++;for(let k=0x0;k<h&&f<c[bF(0x206)];k++){const l=rt(c,f);d['boundaryPaths']['push'](l[bF(0x123)]),f=l[bF(0x127)];}continue;}}f++;}return d;}function rt(c,d){const bG=aT;let f=0x0;return d<c[bG(0x206)]&&c[d]['code']===0x5c&&(f=parseInt(c[d][bG(0x1fc)],0xa),d++),(f&0x2)!==0x0?st(c,d,f):ot(c,d,f);}function st(c,d,f){const bH=aT,g={'type':'polyline','vertices':[],'bulges':[],'flags':f};let h=!0x1;d<c['length']&&c[d]['code']===0x48&&(h=c[d]['value']==='1',d++),d<c[bH(0x206)]&&c[d]['code']===0x49&&(g['isClosed']=c[d]['value']==='1',d++);let k=0x0;d<c['length']&&c[d]['code']===0x5d&&(k=parseInt(c[d]['value'],0xa),d++);for(let l=0x0;l<k&&d<c['length'];l++){const m={'x':0x0,'y':0x0};c[d]['code']===0xa&&(m['x']=parseFloat(c[d]['value']),d++),d<c['length']&&c[d]['code']===0x14&&(m['y']=parseFloat(c[d]['value']),d++),g['vertices']['push'](m),h&&d<c['length']&&c[d]['code']===0x2a?(g['bulges'][bH(0x177)](parseFloat(c[d]['value'])),d++):h&&g['bulges']['push'](0x0);}for(;d<c['length']&&(c[d]['code']===0x61||c[d]['code']===0x14a);)if(c[d]['code']===0x61){const p=parseInt(c[d]['value'],0xa);d++;for(let u=0x0;u<p&&d<c['length']&&c[d]['code']===0x14a;u++)d++;}else d++;return{'path':g,'nextIndex':d};}function ot(g,k,m){const bI=aT,p={'type':bI(0x120),'edges':[],'flags':m};let v=0x0;k<g['length']&&g[k]['code']===0x5d&&(v=parseInt(g[k]['value'],0xa),k++);for(let w=0x0;w<v&&k<g['length']&&g[k]['code']===0x48;w++){const x=parseInt(g[k][bI(0x1fc)],0xa);switch(k++,x){case 0x1:{const z={'type':'line','start':{'x':0x0,'y':0x0},'end':{'x':0x0,'y':0x0}};k<g['length']&&g[k][bI(0x13b)]===0xa&&(z['start']['x']=parseFloat(g[k]['value']),k++),k<g[bI(0x206)]&&g[k]['code']===0x14&&(z['start']['y']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k][bI(0x13b)]===0xb&&(z['end']['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x15&&(z['end']['y']=parseFloat(g[k]['value']),k++),p[bI(0x120)]['push'](z);break;}case 0x2:{const A={'type':bI(0x173),'center':{'x':0x0,'y':0x0},'radius':0x0,'startAngle':0x0,'endAngle':0x168,'ccw':!0x0};k<g['length']&&g[k]['code']===0xa&&(A['center']['x']=parseFloat(g[k][bI(0x1fc)]),k++),k<g['length']&&g[k]['code']===0x14&&(A['center']['y']=parseFloat(g[k]['value']),k++),k<g[bI(0x206)]&&g[k]['code']===0x28&&(A[bI(0x20c)]=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x32&&(A['startAngle']=parseFloat(g[k][bI(0x1fc)]),k++),k<g['length']&&g[k]['code']===0x33&&(A['endAngle']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x49&&(A['ccw']=g[k]['value']==='1',k++),p[bI(0x120)]['push'](A);break;}case 0x3:{const C={'type':'ellipse','center':{'x':0x0,'y':0x0},'majorAxis':{'x':0x1,'y':0x0},'minorRatio':0x1,'startAngle':0x0,'endAngle':Math['PI']*0x2,'ccw':!0x0};k<g['length']&&g[k][bI(0x13b)]===0xa&&(C['center']['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x14&&(C['center']['y']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0xb&&(C['majorAxis']['x']=parseFloat(g[k]['value']),k++),k<g[bI(0x206)]&&g[k]['code']===0x15&&(C['majorAxis']['y']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x28&&(C[bI(0x158)]=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x32&&(C['startAngle']=parseFloat(g[k][bI(0x1fc)]),k++),k<g['length']&&g[k]['code']===0x33&&(C['endAngle']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x49&&(C['ccw']=g[k]['value']==='1',k++),p['edges']['push'](C);break;}case 0x4:{let D=0x3;const F=[],I=[];k<g['length']&&g[k][bI(0x13b)]===0x5e&&(D=parseInt(g[k]['value'],0xa),k++),k<g['length']&&g[k]['code']===0x49&&k++,k<g['length']&&g[k]['code']===0x4a&&k++;let L=0x0;k<g[bI(0x206)]&&g[k]['code']===0x5f&&(L=parseInt(g[k]['value'],0xa),k++);let M=0x0;k<g[bI(0x206)]&&g[k]['code']===0x60&&(M=parseInt(g[k]['value'],0xa),k++);for(let N=0x0;N<L&&k<g[bI(0x206)]&&g[k]['code']===0x28;N++)F['push'](parseFloat(g[k]['value'])),k++;for(let V=0x0;V<M&&k<g['length'];V++){const X={'x':0x0,'y':0x0};g[k][bI(0x13b)]===0xa&&(X['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x14&&(X['y']=parseFloat(g[k]['value']),k++),I['push'](X);}p[bI(0x120)]['push']({'type':'spline','degree':D,'knots':F,'controlPoints':I});break;}}}for(;k<g['length']&&(g[k]['code']===0x61||g[k]['code']===0x14a);)if(g[k]['code']===0x61){const Y=parseInt(g[k]['value'],0xa);k++;for(let a0=0x0;a0<Y&&k<g['length']&&g[k]['code']===0x14a;a0++)k++;}else k++;return{'path':p,'nextIndex':k};}function it(c){const bJ=aT,d={...P(c),'type':'POINT','position':{'x':0x0,'y':0x0,'z':0x0}};for(const f of c)switch(f[bJ(0x13b)]){case 0xa:d['position']['x']=parseFloat(f['value']);break;case 0x14:d['position']['y']=parseFloat(f['value']);break;case 0x1e:d['position']['z']=parseFloat(f['value']);break;}return d;}function we(c,d,f){const bK=aT;for(;d<c['length'];){const g=c[d];if(g['code']!==0x0){d++;continue;}const h=g['value'];if(h==='ENDSEC'||h==='ENDBLK')return d+0x1;d++;const k=[];for(;d<c['length']&&c[d]['code']!==0x0;)k['push'](c[d]),d++;switch(h){case'LINE':f[bK(0x177)](He(k));break;case'CIRCLE':f['push'](Ve(k));break;case bK(0x204):f['push'](Ue(k));break;case'LWPOLYLINE':f['push'](Ge(k));break;case'ELLIPSE':f['push'](Ke(k));break;case'SPLINE':f[bK(0x177)](Qe(k));break;case'TEXT':f['push'](Je(k));break;case'MTEXT':f['push'](et(k));break;case'INSERT':{const l=tt(k);k['some'](m=>m['code']===0x42&&m['value']==='1')&&(d=ct(c,d,l[bK(0x181)])),f['push'](l);break;}case bK(0x1ee):f[bK(0x177)](at(k));break;case'HATCH':f[bK(0x177)](nt(k));break;case'POINT':f['push'](it(k));break;case'POLYLINE':{const m=Ze(k);d=lt(c,d,m['vertices']),f['push'](m);break;}}}return d;}function lt(c,d,f){const bL=aT;for(;d<c['length'];){if(c[d]['code']!==0x0){d++;continue;}const g=c[d]['value'];if(g==='SEQEND')return d+0x1;if(g==='ENDSEC'||g==='ENDBLK')return d;if(g==='VERTEX'){d++;const h={'x':0x0,'y':0x0,'bulge':0x0,'startWidth':0x0,'endWidth':0x0};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0xa:h['x']=parseFloat(i['value']);break;case 0x14:h['y']=parseFloat(i['value']);break;case 0x2a:h[bL(0xe6)]=parseFloat(i['value']);break;case 0x28:h['startWidth']=parseFloat(i['value']);break;case 0x29:h['endWidth']=parseFloat(i[bL(0x1fc)]);break;}d++;}f['push'](h);}else{for(d++;d<c['length']&&c[d][bL(0x13b)]!==0x0;)d++;}}return d;}function ct(c,d,f){const bM=aT;for(;d<c[bM(0x206)];){if(c[d][bM(0x13b)]!==0x0){d++;continue;}const g=c[d][bM(0x1fc)];if(g==='SEQEND')return d+0x1;if(g==='ENDSEC'||g===bM(0x212))return d;if(g==='ATTRIB'){d++;const h={'tag':'','text':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'height':0x1,'rotation':0x0,'style':'STANDARD','layer':'0','color':0x100};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x1:h[bM(0x161)]=i['value'];break;case 0x2:h['tag']=i['value'];break;case 0x7:h['style']=i['value'];break;case 0x8:h['layer']=i['value'];break;case 0xa:h['insertionPoint']['x']=parseFloat(i['value']);break;case 0x14:h[bM(0x1fe)]['y']=parseFloat(i['value']);break;case 0x1e:h['insertionPoint']['z']=parseFloat(i[bM(0x1fc)]);break;case 0x28:h['height']=parseFloat(i['value']);break;case 0x32:h['rotation']=parseFloat(i['value']);break;case 0x3e:h['color']=parseInt(i['value'],0xa);break;}d++;}f[bM(0x177)](h);}else{for(d++;d<c[bM(0x206)]&&c[d]['code']!==0x0;)d++;}}return d;}function ht(c,d,f){const bN=aT;for(;d<c['length'];){const g=c[d];if(g[bN(0x13b)]===0x0&&g['value']==='ENDSEC')return d+0x1;if(g[bN(0x13b)]===0x0&&g['value']==='BLOCK'){d++;const h={'name':'','basePoint':{'x':0x0,'y':0x0,'z':0x0},'entities':[],'flags':0x0};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h[bN(0x205)]=i['value'];break;case 0x8:break;case 0xa:h['basePoint']['x']=parseFloat(i['value']);break;case 0x14:h['basePoint']['y']=parseFloat(i['value']);break;case 0x1e:h[bN(0xdb)]['z']=parseFloat(i['value']);break;case 0x46:h['flags']=parseInt(i['value'],0xa);break;}d++;}d=we(c,d,h['entities']),h[bN(0x205)]&&!h['name']['startsWith']('*Model_Space')&&!h['name']['startsWith']('*Paper_Space')&&f['set'](h[bN(0x205)],h);}else d++;}return d;}var pe='AutoCAD\x20Binary\x20DXF',ut={'ANSI_874':'windows-874','ANSI_932':'shift_jis','ANSI_936':'gbk','ANSI_949':'euc-kr','ANSI_950':'big5','ANSI_1250':'windows-1250','ANSI_1251':aT(0x157),'ANSI_1252':'windows-1252','ANSI_1253':'windows-1253','ANSI_1254':aT(0x19d),'ANSI_1255':aT(0x229),'ANSI_1256':'windows-1256','ANSI_1257':'windows-1257','ANSI_1258':'windows-1258'},dt='AC1021';function ft(){return{'acadVersion':'','insUnits':0x0,'measurement':0x0,'ltScale':0x1};}function be(c){return c['replace'](/\\U\+([0-9A-Fa-f]{4})/g,(d,f)=>String['fromCodePoint'](parseInt(f,0x10)));}function pt(d){const bO=aT;if(typeof d=='string')return be(d);const f=new Uint8Array(d);if(new TextDecoder('ascii')['decode'](f['slice'](0x0,pe[bO(0x206)]))===pe)throw new T('Binary\x20DXF\x20format\x20is\x20not\x20supported.\x20Please\x20export\x20as\x20ASCII\x20DXF.');let g=new TextDecoder(bO(0x11a))['decode'](d);const h=g['match'](/\$ACADVER[\s\S]*?\n\s*1\s*\n\s*(\S+)/)?.[0x1]??'';if(h&&h<dt){const i=g['match'](/\$DWGCODEPAGE[\s\S]*?\n\s*3\s*\n\s*(\S+)/)?.[0x1]??'',k=ut[i]??'windows-1252';k!=='utf-8'&&(g=new TextDecoder(k)['decode'](d));}return be(g);}function bt(c,d){for(;d<c['length'];){if(c[d]['code']===0x0&&c[d]['value']==='ENDSEC')return d+0x1;d++;}return d;}function mt(c){const bP=aT;c['layers']['has']('0')||c['layers'][bP(0xf2)]('0',{'name':'0','color':0x7,'lineType':'Continuous','flags':0x0,'lineWeight':-0x3,'isOff':!0x1,'isFrozen':!0x1,'isLocked':!0x1});}function gt(c){const bQ=aT;for(const [,d]of c['layers'])d['isOff']=d[bQ(0x1d5)]<0x0,d[bQ(0xfc)]&&(d['color']=Math['abs'](d['color'])),d['isFrozen']=(d['flags']&0x1)!==0x0,d['isLocked']=(d['flags']&0x4)!==0x0;}var T=class extends Error{constructor(c,d){super(c),this['cause']=d,this['name']='DxfParseError';}};function ae(c){const bR=aT;if(typeof c=='string'){if(c['length']===0x0)throw new T('Input\x20is\x20empty.\x20Expected\x20a\x20DXF\x20string\x20or\x20ArrayBuffer.');}else{if(c instanceof ArrayBuffer){if(c['byteLength']===0x0)throw new T('Input\x20ArrayBuffer\x20is\x20empty.');}else throw new T('Invalid\x20input\x20type.\x20Expected\x20a\x20string\x20or\x20ArrayBuffer.');}let d;try{d=pt(c);}catch(h){throw h instanceof T?h:new T('Failed\x20to\x20decode\x20DXF\x20input.',h);}let f;try{f=Re(d);}catch(k){throw new T('Failed\x20to\x20tokenize\x20DXF\x20content.',k);}if(f['length']===0x0)throw new T('DXF\x20content\x20produced\x20no\x20tokens.\x20The\x20input\x20may\x20not\x20be\x20a\x20valid\x20DXF\x20file.');const g={'header':ft(),'layers':new Map(),'lineTypes':new Map(),'styles':new Map(),'blocks':new Map(),'entities':[]};try{let l=0x0;for(;l<f['length'];){const m=f[l];if(m['code']===0x0&&m[bR(0x1fc)]==='SECTION'){if(l++,l>=f['length'])break;const o=f[l][bR(0x1fc)];switch(l++,o){case'HEADER':l=Oe(f,l,g['header']);break;case'TABLES':l=_e(f,l,g);break;case'BLOCKS':l=ht(f,l,g['blocks']);break;case bR(0x16e):l=we(f,l,g['entities']);break;default:l=bt(f,l);break;}}else{if(m['code']===0x0&&m['value']==='EOF')break;l++;}}}catch(p){throw new T('Failed\x20to\x20parse\x20DXF\x20sections.',p);}return mt(g),gt(g),g;}var vt=[aT(0x154),'#FF0000','#FFFF00','#00FF00','#00FFFF',aT(0x1ff),'#FF00FF','#FFFFFF','#808080',aT(0x18f),'#FF0000','#FF7F7F','#A50000','#A55252','#7F0000','#7F3F3F','#4C0000','#4C2626',aT(0x21c),'#261313','#FF3F00','#FF9F7F','#A52900','#A56752','#7F1F00','#7F4F3F','#4C1300','#4C2F26','#260900',aT(0x1e7),'#FF7F00',aT(0x110),'#A55200','#A57C52',aT(0x209),'#7F5F3F',aT(0x198),aT(0x1c6),'#261300','#261C13',aT(0x14c),'#FFDF7F','#A57C00','#A59152',aT(0x114),'#7F6F3F','#4C3900','#4C4226','#261C00','#262113','#FFFF00','#FFFF7F','#A5A500','#A5A552','#7F7F00','#7F7F3F','#4C4C00','#4C4C26','#262600','#262613','#BFFF00','#DFFF7F','#7CA500','#91A552','#5F7F00','#6F7F3F',aT(0x164),'#424C26','#1C2600','#212613',aT(0x1b3),'#BFFF7F','#52A500','#7CA552','#3F7F00','#5F7F3F','#264C00','#394C26','#132600','#1C2613','#3FFF00','#9FFF7F','#29A500','#67A552','#1F7F00','#4F7F3F','#134C00','#2F4C26','#092600',aT(0x172),'#00FF00',aT(0x182),'#00A500','#52A552','#007F00','#3F7F3F','#004C00','#264C26',aT(0xdd),'#132613','#00FF3F','#7FFF9F','#00A529','#52A567','#007F1F','#3F7F4F','#004C13','#264C2F','#002609','#132617','#00FF7F',aT(0x203),'#00A552',aT(0x1b5),'#007F3F',aT(0xf6),aT(0x100),'#264C39','#002613','#13261C','#00FFBF',aT(0x1d9),'#00A57C',aT(0x17c),aT(0x115),'#3F7F6F','#004C39','#264C42','#00261C',aT(0x1fb),'#00FFFF','#7FFFFF',aT(0x1e5),'#52A5A5','#007F7F',aT(0x1de),'#004C4C',aT(0x17a),aT(0x1a9),aT(0x11d),'#00BFFF','#7FDFFF','#007CA5','#5291A5','#005F7F','#3F6F7F','#00394C','#26424C',aT(0x16f),aT(0x143),'#007FFF','#7FBFFF',aT(0x1d3),'#527CA5','#003F7F',aT(0x1f9),'#00264C','#26394C','#001326','#131C26','#003FFF','#7F9FFF',aT(0x14e),'#5267A5','#001F7F','#3F4F7F','#00134C','#262F4C','#000926',aT(0x10b),'#0000FF','#7F7FFF',aT(0x224),'#5252A5','#00007F','#3F3F7F',aT(0x136),aT(0xed),'#000026','#131326','#3F00FF','#9F7FFF','#2900A5','#6752A5','#1F007F','#4F3F7F',aT(0x1c9),'#2F264C','#090026',aT(0x1e1),'#7F00FF','#BF7FFF','#5200A5','#7C52A5','#3F007F',aT(0x12a),'#26004C',aT(0x1a1),'#130026',aT(0x1a0),aT(0x128),aT(0x11b),'#7C00A5',aT(0x1cd),'#5F007F','#6F3F7F','#39004C','#42264C','#1C0026','#211326','#FF00FF','#FF7FFF','#A500A5',aT(0x195),aT(0x19f),'#7F3F7F','#4C004C','#4C264C','#260026','#261326',aT(0x1c1),aT(0x221),aT(0x223),'#A55291','#7F005F','#7F3F6F','#4C0039','#4C2642','#26001C','#261321','#FF007F','#FF7FBF','#A50052','#A5527C','#7F003F',aT(0x11c),'#4C0026','#4C2639','#260013','#26131C','#FF003F','#FF7F9F',aT(0x106),'#A55267',aT(0x130),'#7F3F4F',aT(0x1f0),'#4C262F','#260009','#261317','#333333','#505050','#696969',aT(0x11f),'#BEBEBE','#FFFFFF'];function Ft(c){if(!(c===0x0||c===0x100)&&!(c<0x0||c>0xff))return vt[c];}var E={'dark':{'backgroundColor':'#1a1a2e','defaultEntityColor':'#ffffff','selectionColor':'#00ff88','measureColor':'#ffaa00','gridColor':'#333333','crosshairColor':'#555555'},'light':{'backgroundColor':'#ffffff','defaultEntityColor':'#000000','selectionColor':aT(0x1bc),'measureColor':aT(0x19e),'gridColor':'#dddddd','crosshairColor':'#cccccc'}};function W(c,d,f){const bS=aT;return[d*c['scale']+c['offsetX'],-f*c['scale']+c[bS(0x132)]];}function q(c,d,f){return[(d-c['offsetX'])/c['scale'],-(f-c['offsetY'])/c['scale']];}function me(c,d){const bT=aT,f=window['devicePixelRatio']||0x1;c['setTransform'](d['scale']*f,0x0,0x0,-d[bT(0x18c)]*f,d['offsetX']*f,d['offsetY']*f);}function xt(g,k,m,v,w,x,z=0.05){const A=w-m,C=x-v;if(A<=0x0||C<=0x0)return{'scale':0x1,'offsetX':g/0x2,'offsetY':k/0x2};const D=g/A,F=k/C,I=Math['min'](D,F)*(0x1-z*0x2),L=(m+w)/0x2,M=(v+x)/0x2,N=g/0x2-L*I,V=k/0x2+M*I;return{'scale':I,'offsetX':N,'offsetY':V};}function kt(c,d,f,g,h=0.0001,k=0x186a0){const l=Math['max'](h,Math['min'](k,c['scale']*g)),m=l/c['scale'];return{'scale':l,'offsetX':d-(d-c['offsetX'])*m,'offsetY':f-(f-c['offsetY'])*m};}var yt=class{['transform']={'scale':0x1,'offsetX':0x0,'offsetY':0x0};['minScale'];['maxScale'];constructor(c){this['minScale']=c['minZoom'],this['maxScale']=c['maxZoom'];}['getTransform'](){const bU=aT;return this[bU(0x17e)];}['setTransform'](c){this['transform']=c;}['pan'](c,d){const bV=aT;this['transform']={...this['transform'],'offsetX':this['transform']['offsetX']+c,'offsetY':this[bV(0x17e)][bV(0x132)]+d};}[aT(0x1a5)](c,d,f){this['transform']=kt(this['transform'],c,d,f,this['minScale'],this['maxScale']);}};function ge(c,d){const bW=aT;return c===0x7?d==='dark'?'#ffffff':'#000000':Ft(c)??bW(0x135);}function se(d,f,g,h){const bX=aT;if(d['trueColor']!==void 0x0){const l=d['trueColor']>>0x10&0xff,m=d['trueColor']>>0x8&0xff,p=d['trueColor']&0xff;return'rgb('+l+','+m+','+p+')';}if(d['color']===0x0)return h??E[g]['defaultEntityColor'];if(d['color']!==0x100)return ge(d['color'],g);const k=f['get'](d[bX(0x15c)]);if(k){if(k['trueColor']!==void 0x0){const v=k['trueColor']>>0x10&0xff,w=k['trueColor']>>0x8&0xff,x=k['trueColor']&0xff;return'rgb('+v+','+w+','+x+')';}const u=Math['abs'](k['color']);return ge(u,g);}return E[g]['defaultEntityColor'];}function Pt(c,d){const bY=aT;c['beginPath'](),c['moveTo'](d[bY(0x1f8)]['x'],d['start']['y']),c['lineTo'](d[bY(0x12c)]['x'],d['end']['y']),c['stroke']();}function wt(c,d){const bZ=aT;d['radius']<=0x0||(c['beginPath'](),c['arc'](d['center']['x'],d[bZ(0x186)]['y'],d[bZ(0x20c)],0x0,Math['PI']*0x2),c[bZ(0x183)]());}function It(c,d){if(d['radius']<=0x0)return;const f=d['startAngle']*Math['PI']/0xb4,g=d['endAngle']*Math['PI']/0xb4;c['beginPath'](),c['arc'](d['center']['x'],d['center']['y'],d['radius'],f,g,!0x1),c['stroke']();}function Mt(k,w,z,A,C){const c0=aT,D=z-k,I=A-w,L=Math[c0(0x1d2)](D*D+I*I);if(L<1e-10)return{'cx':k,'cy':w,'radius':0x0,'startAngle':0x0,'endAngle':0x0,'anticlockwise':!0x1};const M=Math['abs'](C)*L/0x2,N=((L/0x2)**0x2+M**0x2)/(0x2*M),V=(k+z)/0x2,X=(w+A)/0x2,Y=-I/L,a0=D/L,a1=N-M,a2=C>0x0?0x1:-0x1,a3=V+a2*a1*Y,a4=X+a2*a1*a0,a5=Math['atan2'](w-a4,k-a3),a6=Math['atan2'](A-a4,z-a3),a7=C<0x0;return{'cx':a3,'cy':a4,'radius':N,'startAngle':a5,'endAngle':a6,'anticlockwise':a7};}function H(c,d,f,g,h,k){const c1=aT,l=Mt(d,f,g,h,k);if(l['radius']<1e-10){c['lineTo'](g,h);return;}c['arc'](l['cx'],l['cy'],l[c1(0x20c)],l['startAngle'],l['endAngle'],l[c1(0x13a)]);}function Tt(c,d){const c2=aT,f=d['vertices'];if(f['length']<0x2)return;c['beginPath'](),c['moveTo'](f[0x0]['x'],f[0x0]['y']);const g=d['closed']?f['length']:f['length']-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f[c2(0x206)]];Math['abs'](k['bulge'])<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],k['bulge']);}c['stroke']();}function Et(c,d){const c3=aT,f=d['vertices'];if(f['length']<0x2)return;c['beginPath'](),c['moveTo'](f[0x0]['x'],f[0x0]['y']);const g=d['closed']?f['length']:f['length']-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f['length']],m=k[c3(0xe6)]??0x0;Math['abs'](m)<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}c[c3(0x183)]();}function At(c,d){const c4=aT,f=Math['sqrt'](d['majorAxis']['x']**0x2+d['majorAxis']['y']**0x2+d['majorAxis']['z']**0x2);if(f<1e-10||d['minorRatio']<=0x0)return;const g=f*d['minorRatio'],h=Math['atan2'](d['majorAxis']['y'],d['majorAxis']['x']);c['beginPath'](),c['ellipse'](d['center']['x'],d['center']['y'],f,g,h,d['startParam'],d[c4(0x144)],!0x1),c['stroke']();}function St(k,w,x,z,A){const c5=aT,C=w['length']-0x1;let D=k;for(;D<C&&x[D+0x1]<=z;)D++;const F=[],I=[];for(let L=0x0;L<=k;L++){const M=D-k+L;F['push']({...w[M]}),I[c5(0x177)](A?A[M]:0x1);}for(let N=0x1;N<=k;N++)for(let V=k;V>=N;V--){const X=D-k+V,Y=x[X+k-N+0x1]-x[X];if(Math['abs'](Y)<1e-10)continue;const a0=(z-x[X])/Y,a1=F[V],a2=F[V-0x1];if(A){const a3=I[V-0x1]*(0x1-a0),a4=I[V]*a0,a5=a3+a4;if(Math['abs'](a5)<1e-10)continue;a1['x']=(a2['x']*a3+a1['x']*a4)/a5,a1['y']=(a2['y']*a3+a1['y']*a4)/a5,a1['z']=(a2['z']*a3+a1['z']*a4)/a5,I[V]=a5;}else a1['x']=(0x1-a0)*a2['x']+a0*a1['x'],a1['y']=(0x1-a0)*a2['y']+a0*a1['y'],a1['z']=(0x1-a0)*a2['z']+a0*a1['z'];}return F[k]??{'x':0x0,'y':0x0,'z':0x0};}function Ct(g){if(g['length']<0x2)return g['map'](v=>({'x':v['x'],'y':v['y']}));const k=[],m=g['length'],p=0xa;for(let v=0x0;v<m-0x1;v++){const w=g[Math['max'](0x0,v-0x1)],x=g[v],z=g[Math['min'](m-0x1,v+0x1)],A=g[Math['min'](m-0x1,v+0x2)];for(let C=0x0;C<=(v===m-0x2?p:p-0x1);C++){const D=C/p,F=D*D,I=F*D,L=0.5*(0x2*x['x']+(-w['x']+z['x'])*D+(0x2*w['x']-0x5*x['x']+0x4*z['x']-A['x'])*F+(-w['x']+0x3*x['x']-0x3*z['x']+A['x'])*I),M=0.5*(0x2*x['y']+(-w['y']+z['y'])*D+(0x2*w['y']-0x5*x['y']+0x4*z['y']-A['y'])*F+(-w['y']+0x3*x['y']-0x3*z['y']+A['y'])*I);k['push']({'x':L,'y':M});}}return k;}function Ie(d,f){const c6=aT;if(d[c6(0x17b)]===0x1)return d['controlPoints']['map'](w=>({'x':w['x'],'y':w['y']}));if(d['controlPoints']['length']===0x0&&d['fitPoints'][c6(0x206)]>=0x2)return Ct(d['fitPoints']);if(d['controlPoints']['length']<d['degree']+0x1)return[];if(d['knots'][c6(0x206)]<d['controlPoints']['length']+d['degree']+0x1)return[];const g=[],k=d['knots'][d['degree']],m=d['knots'][d['knots']['length']-d[c6(0x17b)]-0x1];if(m<=k)return[];const p=Math[c6(0x151)](d['controlPoints']['length']*0xa,Math['ceil']((m-k)/f)),u=Math['min'](p,0x1388),v=d['weights']['length']>0x0?d['weights']:void 0x0;for(let w=0x0;w<=u;w++){const x=k+(m-k)*(w/u),z=St(d['degree'],d['controlPoints'],d[c6(0x20b)],x,v);g['push']({'x':z['x'],'y':z['y']});}return g;}function Dt(c,d,f){const g=Ie(d,f);if(!(g['length']<0x2)){c['beginPath'](),c['moveTo'](g[0x0]['x'],g[0x0]['y']);for(let h=0x1;h<g['length'];h++)c['lineTo'](g[h]['x'],g[h]['y']);d['flags']&0x1&&c['closePath'](),c['stroke']();}}var Lt={'standard':aT(0x104),'arial':'Arial,\x20sans-serif','arial.ttf':aT(0x104),'romans.shx':'\x22Courier\x20New\x22,\x20monospace','simplex.shx':'\x22Courier\x20New\x22,\x20monospace','txt.shx':'monospace','monotxt.shx':'monospace','isocp.shx':'\x22Courier\x20New\x22,\x20monospace','isocpeur.shx':'\x22Courier\x20New\x22,\x20monospace','times.ttf':'\x22Times\x20New\x20Roman\x22,\x20serif','timesnr.ttf':'\x22Times\x20New\x20Roman\x22,\x20serif','gothic.ttf':'\x22Century\x20Gothic\x22,\x20sans-serif'};function Me(c){const c7=aT,d=c['toLowerCase']()['trim']();return Lt[d]||c7(0xfe);}function Nt(d,f,g){const c8=aT;if(!f['text']||f['height']<g*0x4)return;const k=f['hAlign']!==0x0||f[c8(0x13d)]!==0x0,l=k&&f[c8(0x226)]?f['alignmentPoint']['x']:f[c8(0x1fe)]['x'],m=k&&f['alignmentPoint']?f[c8(0x226)]['y']:f['insertionPoint']['y'];if(d[c8(0x208)](),d['translate'](l,m),d['scale'](0x1,-0x1),f['rotation']&&d['rotate'](-f['rotation']*Math['PI']/0xb4),f['widthFactor']!==0x1&&d['scale'](f['widthFactor'],0x1),f['obliqueAngle']){const w=Math['tan'](f['obliqueAngle']*Math['PI']/0xb4);d['transform'](0x1,0x0,w,0x1,0x0,0x0);}const p=(f['generationFlags']&0x2)!==0x0,u=(f[c8(0x133)]&0x4)!==0x0;p&&d['scale'](-0x1,0x1),u&&d['scale'](0x1,-0x1);const v=Me(f['style']||'Standard');switch(d['font']=f['height']+'px\x20'+v,f['hAlign']){case 0x0:d['textAlign']='left';break;case 0x1:d['textAlign']='center';break;case 0x2:d['textAlign']='right';break;case 0x3:d['textAlign']='left';break;case 0x4:d['textAlign']='center';break;case 0x5:d['textAlign']='left';break;default:d['textAlign']=c8(0x14b);}switch(f['vAlign']){case 0x0:d[c8(0x1a6)]='alphabetic';break;case 0x1:d['textBaseline']='bottom';break;case 0x2:d['textBaseline']=c8(0x180);break;case 0x3:d['textBaseline']='top';break;default:d['textBaseline']='alphabetic';}d[c8(0x108)](f['text'],0x0,0x0),d['restore']();}function Bt(c){const c9=aT;return c['replace'](/\\P/g,'\x0a')['replace'](/\\[fFHWQTCAaLlOoKk][^;]*;/g,'')['replace'](/\\\\/g,'\x5c')[c9(0x12e)](/\\~/g,'\u00a0')['replace'](/\{/g,'')['replace'](/\}/g,'')['replace'](/\\S[^;]*;/g,'')['trim']();}function Xt(g,k,m){const cb=aT;if(!k[cb(0x161)]||k['height']<m*0x4)return;g[cb(0x208)](),g['translate'](k['insertionPoint']['x'],k['insertionPoint']['y']),g['scale'](0x1,-0x1);const p=k[cb(0x1d1)]?Math['atan2'](k['textDirection']['y'],k['textDirection']['x']):(k['rotation']||0x0)*Math['PI']/0xb4;p&&g[cb(0xd9)](-p);const r=Bt(k['text'])[cb(0x1c8)]('\x0a'),v=k['height']*(k['lineSpacingFactor']||1.4),w=Me(k['style']||'Standard');g['font']=k['height']+'px\x20'+w;const x=(k['attachmentPoint']-0x1)%0x3,z=Math[cb(0xe1)]((k['attachmentPoint']-0x1)/0x3),A=['left','center','right'];g['textAlign']=A[x]??'left';let C=0x0;const D=r['length']*v;switch(z){case 0x0:C=k['height'];break;case 0x1:C=k['height']-D/0x2;break;case 0x2:C=k['height']-D;break;}for(let F=0x0;F<r['length'];F++)g[cb(0x108)](r[F],0x0,C+F*v);g['restore']();}var Yt=0x64;function zt(f,g,k,m=0x0){const cc=aT;if(m>Yt)return null;if(k['has'](f))return k['get'](f);const p=g['blocks']['get'](f);if(!p)return k[cc(0xf2)](f,null),null;k['set'](f,null);let v=0x1/0x0,w=0x1/0x0,x=-0x1/0x0,z=-0x1/0x0,A=!0x1;for(const D of p['entities']){let F;D['type']==='INSERT'?F=Te(D,g,k,m+0x1):F=B(D),F&&(A=!0x0,v=Math['min'](v,F['minX']),w=Math[cc(0x1ea)](w,F['minY']),x=Math['max'](x,F[cc(0x1f7)]),z=Math['max'](z,F['maxY']));}const C=A?{'minX':v,'minY':w,'maxX':x,'maxY':z}:null;return k['set'](f,C),C;}function Te(a0,a1,a2,a3=0x0){const cd=aT,a4=zt(a0['blockName'],a1,a2,a3);if(!a4)return null;const a5=a1['blocks']['get'](a0[cd(0x17d)]);if(!a5)return null;const a6=a5['basePoint']['x'],a7=a5['basePoint']['y'];let a8=a4['minX']-a6,a9=a4['minY']-a7,ab=a4['maxX']-a6,ac=a4['maxY']-a7;const ad=a0[cd(0x174)],af=a0[cd(0x131)];let ag=a8*ad,ah=ab*ad,ai=a9*af,aj=ac*af;if(ag>ah){const ax=ag;ag=ah,ah=ax;}if(ai>aj){const ay=ai;ai=aj,aj=ay;}const ak=(a0['rotation']||0x0)*Math['PI']/0xb4;if(Math['abs'](ak)<1e-10){const az=a0['insertionPoint']['x'],aA=a0['insertionPoint']['y'];let aB=ag+az,aC=ai+aA,aD=ah+az,aE=aj+aA;const aF=Math[cd(0x151)](0x1,a0['columnCount']),aG=Math['max'](0x1,a0[cd(0xe7)]);if(aF>0x1||aG>0x1){const aH=(aF-0x1)*a0['columnSpacing'],aI=(aG-0x1)*a0['rowSpacing'];aB=Math['min'](aB,aB+aH),aD=Math['max'](aD,aD+aH),aC=Math[cd(0x1ea)](aC,aC+aI),aE=Math['max'](aE,aE+aI);}return{'minX':aB,'minY':aC,'maxX':aD,'maxY':aE};}const al=Math['cos'](ak),am=Math['sin'](ak),an=[{'x':ag,'y':ai},{'x':ah,'y':ai},{'x':ah,'y':aj},{'x':ag,'y':aj}],ao=a0['insertionPoint']['x'],ap=a0['insertionPoint']['y'];let aq=0x1/0x0,ar=0x1/0x0,as=-0x1/0x0,au=-0x1/0x0;for(const aJ of an){const aK=aJ['x']*al-aJ['y']*am+ao,aL=aJ['x']*am+aJ['y']*al+ap;aq=Math['min'](aq,aK),ar=Math['min'](ar,aL),as=Math['max'](as,aK),au=Math['max'](au,aL);}const av=Math['max'](0x1,a0[cd(0xf5)]),aw=Math['max'](0x1,a0['rowCount']);if(av>0x1||aw>0x1){const aM=(av-0x1)*a0[cd(0x1f2)],aN=(aw-0x1)*a0['rowSpacing'],aO=[{'x':0x0,'y':0x0},{'x':aM,'y':0x0},{'x':aM,'y':aN},{'x':0x0,'y':aN}];for(const aP of aO){const aQ=aP['x']*al-aP['y']*am,aR=aP['x']*am+aP['y']*al;aq=Math['min'](aq,aq+aQ),ar=Math[cd(0x1ea)](ar,ar+aR),as=Math['max'](as,as+aQ),au=Math['max'](au,au+aR);}}return{'minX':aq,'minY':ar,'maxX':as,'maxY':au};}function b(c,d){c=c-0xd5;const e=a();let f=e[c];return f;}function Rt(d,f){let g=0x1/0x0,k=0x1/0x0,l=-0x1/0x0,m=-0x1/0x0,p=!0x1;const u=f?new Map():void 0x0;for(const v of d){const w=f&&u?Ee(v,f,u):B(v);w&&(p=!0x0,g=Math['min'](g,w['minX']),k=Math['min'](k,w['minY']),l=Math['max'](l,w['maxX']),m=Math['max'](m,w['maxY']));}return p?{'minX':g,'minY':k,'maxX':l,'maxY':m}:null;}function Ee(c,d,f){const ce=aT;return c['type']===ce(0x1eb)?Te(c,d,f):B(c);}var Q=null;function Ot(c){const cf=aT,d=new Map();for(const [f,g]of c['blocks']){const h=new Array(g['entities']['length']);for(let i=0x0;i<g[cf(0x15a)]['length'];i++)h[i]=B(g[cf(0x15a)][i]);d[cf(0xf2)](f,h);}return d;}function _t(c){Q=c;}function ve(){Q=null;}function Wt(c,d){if(!Q)return;const f=Q['get'](c);if(!(!f||d>=f['length']))return f[d];}function B(c){const cg=aT;switch(c['type']){case'LINE':return{'minX':Math[cg(0x1ea)](c['start']['x'],c['end']['x']),'minY':Math['min'](c['start']['y'],c['end']['y']),'maxX':Math['max'](c[cg(0x1f8)]['x'],c[cg(0x12c)]['x']),'maxY':Math[cg(0x151)](c['start']['y'],c['end']['y'])};case'CIRCLE':return{'minX':c['center']['x']-c['radius'],'minY':c['center']['y']-c['radius'],'maxX':c['center']['x']+c['radius'],'maxY':c['center']['y']+c['radius']};case'ARC':return{'minX':c['center']['x']-c[cg(0x20c)],'minY':c[cg(0x186)]['y']-c['radius'],'maxX':c[cg(0x186)]['x']+c['radius'],'maxY':c['center']['y']+c[cg(0x20c)]};case'LWPOLYLINE':case'POLYLINE':{if(c['vertices']['length']===0x0)return null;let d=0x1/0x0,f=0x1/0x0,g=-0x1/0x0,h=-0x1/0x0;for(const k of c['vertices'])d=Math[cg(0x1ea)](d,k['x']),f=Math['min'](f,k['y']),g=Math[cg(0x151)](g,k['x']),h=Math['max'](h,k['y']);return{'minX':d,'minY':f,'maxX':g,'maxY':h};}case'ELLIPSE':{const l=Math['sqrt'](c['majorAxis']['x']**0x2+c['majorAxis']['y']**0x2);return{'minX':c[cg(0x186)]['x']-l,'minY':c['center']['y']-l,'maxX':c['center']['x']+l,'maxY':c['center']['y']+l};}case'TEXT':return{'minX':c['insertionPoint']['x'],'minY':c[cg(0x1fe)]['y'],'maxX':c[cg(0x1fe)]['x']+c['height']*c['text']['length']*0.6,'maxY':c['insertionPoint']['y']+c['height']};case cg(0x178):return{'minX':c[cg(0x1fe)]['x'],'minY':c['insertionPoint']['y']-c[cg(0x1cb)],'maxX':c[cg(0x1fe)]['x']+(c['width']||c['height']*0xa),'maxY':c['insertionPoint']['y']+c[cg(0x1cb)]};case'SPLINE':{if(c['controlPoints'][cg(0x206)]===0x0)return null;let m=0x1/0x0,p=0x1/0x0,u=-0x1/0x0,v=-0x1/0x0;for(const w of c['controlPoints'])m=Math['min'](m,w['x']),p=Math[cg(0x1ea)](p,w['y']),u=Math['max'](u,w['x']),v=Math['max'](v,w['y']);return{'minX':m,'minY':p,'maxX':u,'maxY':v};}case'POINT':return{'minX':c['position']['x'],'minY':c['position']['y'],'maxX':c['position']['x'],'maxY':c[cg(0x1e4)]['y']};case'INSERT':return{'minX':c[cg(0x1fe)]['x'],'minY':c['insertionPoint']['y'],'maxX':c['insertionPoint']['x'],'maxY':c[cg(0x1fe)]['y']};case'DIMENSION':return c['defPoint']?{'minX':Math[cg(0x1ea)](c[cg(0x15b)]['x'],c[cg(0x1ac)]?.['x']??c['defPoint']['x'],c['defPoint3']?.['x']??c[cg(0x15b)]['x']),'minY':Math['min'](c['defPoint']['y'],c['defPoint2']?.['y']??c['defPoint']['y'],c[cg(0x11e)]?.['y']??c['defPoint']['y']),'maxX':Math['max'](c['defPoint']['x'],c['defPoint2']?.['x']??c['defPoint']['x'],c['defPoint3']?.['x']??c['defPoint']['x']),'maxY':Math[cg(0x151)](c['defPoint']['y'],c['defPoint2']?.['y']??c['defPoint']['y'],c[cg(0x11e)]?.['y']??c[cg(0x15b)]['y'])}:null;case'HATCH':{let x=0x1/0x0,z=0x1/0x0,A=-0x1/0x0,C=-0x1/0x0,D=!0x1;for(const F of c['boundaryPaths'])if(F['vertices']){for(const I of F['vertices'])D=!0x0,x=Math['min'](x,I['x']),z=Math['min'](z,I['y']),A=Math['max'](A,I['x']),C=Math['max'](C,I['y']);}return D?{'minX':x,'minY':z,'maxX':A,'maxY':C}:null;}default:return null;}}var $t=new Set(['LINE','ARC',aT(0x1af),'LWPOLYLINE','POLYLINE','ELLIPSE','SPLINE']);function Ae(c){return $t['has'](c);}function jt(c,d){const ch=aT;c['moveTo'](d['start']['x'],d[ch(0x1f8)]['y']),c[ch(0x215)](d[ch(0x12c)]['x'],d['end']['y']);}function qt(c,d){const ci=aT;if(d['radius']<=0x0)return;const f=d[ci(0x185)]*Math['PI']/0xb4,g=d['endAngle']*Math['PI']/0xb4;c['moveTo'](d['center']['x']+d['radius']*Math[ci(0x152)](f),d[ci(0x186)]['y']+d[ci(0x20c)]*Math['sin'](f)),c['arc'](d[ci(0x186)]['x'],d['center']['y'],d[ci(0x20c)],f,g,!0x1);}function Ht(c,d){const cj=aT;d['radius']<=0x0||(c['moveTo'](d['center']['x']+d['radius'],d['center']['y']),c['arc'](d['center']['x'],d['center']['y'],d[cj(0x20c)],0x0,Math['PI']*0x2));}function Vt(c,d){const ck=aT,f=d['vertices'];if(f[ck(0x206)]<0x2)return;c['moveTo'](f[0x0]['x'],f[0x0]['y']);const g=d['closed']?f[ck(0x206)]:f['length']-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f['length']];Math['abs'](k['bulge'])<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],k['bulge']);}}function Ut(c,d){const cl=aT,f=d['vertices'];if(f['length']<0x2)return;c['moveTo'](f[0x0]['x'],f[0x0]['y']);const g=d[cl(0x211)]?f[cl(0x206)]:f['length']-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f['length']],m=k['bulge']??0x0;Math['abs'](m)<1e-10?c[cl(0x215)](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}}function Gt(d,f){const cm=aT,g=Math['sqrt'](f['majorAxis']['x']**0x2+f['majorAxis']['y']**0x2+f['majorAxis']['z']**0x2);if(g<1e-10||f[cm(0x158)]<=0x0)return;const h=g*f['minorRatio'],k=Math['atan2'](f['majorAxis']['y'],f[cm(0x1c0)]['x']),l=Math[cm(0x152)](k),m=Math['sin'](k),p=Math['cos'](f['startParam']),u=Math['sin'](f['startParam']);d['moveTo'](f['center']['x']+g*l*p-h*m*u,f[cm(0x186)]['y']+g*m*p+h*l*u),d['ellipse'](f['center']['x'],f[cm(0x186)]['y'],g,h,k,f[cm(0xe5)],f['endParam'],!0x1);}function Zt(c,d,f){const cn=aT,g=Ie(d,f);if(!(g[cn(0x206)]<0x2)){c['moveTo'](g[0x0]['x'],g[0x0]['y']);for(let h=0x1;h<g[cn(0x206)];h++)c['lineTo'](g[h]['x'],g[h]['y']);d['flags']&0x1&&c[cn(0x121)]();}}function Se(c,d,f){const co=aT;switch(d['type']){case'LINE':jt(c,d);break;case'ARC':qt(c,d);break;case co(0x1af):Ht(c,d);break;case'LWPOLYLINE':Vt(c,d);break;case'POLYLINE':Ut(c,d);break;case'ELLIPSE':Gt(c,d);break;case'SPLINE':Zt(c,d,f);break;}}var Kt=0x64,Qt=0.5;function a(){const dM=['indexOf','visible','abs','#FFBF7F','destroy','debugRafId','canvas','#7F5F00','#007F5F','startWidth','first-point','currentTool','styles','utf-8','#DF7FFF','#7F3F5F','#132626','defPoint3','#828282','edges','closePath','endpoint','path','onPointerDown','pending','buildDebugStats','nextIndex','#BF00FF','loadString','#5F3F7F','hatchStyle','end','rgba(255,\x20255,\x20255,\x200.85)','replace','rotation','#7F001F','scaleY','offsetY','generationFlags','LTYPE','#ffffff','#00004C','lastDoRenderTime','type','preventDefault','anticlockwise','code','loadedFileName','vAlign','onTouchStart','onTouchEnd','showTimings','layerCount','button','#132126','endParam','endTangent','pop','formatConverters','now','mouseScreenX','loadedFileSize','left','#FFBF00','clientX','#0029A5','frameTimestamps','drawCalls','max','cos','sort','#000000','scaleZ','destroyed','windows-1251','minorRatio','loadFile','entities','defPoint','layer','detect','layers','exp','275200TqOQXD','text','parseWithOptionalWorker','getLayers','#394C00','isSeparator','STANDARD','textRotation','nextId','beginPath','pan','delete','_minEntries','toFixed','ENTITIES','#001C26','has','onTouchMove','#172613','arc','scaleX','mouseScreenY','maxY','push','MTEXT','ENDSEC','#264C4C','degree','#52A591','blockName','transform','Layers:\x20','middle','attribs','#7FFF7F','stroke','LWPOLYLINE','startAngle','center','vertices','collides','doRender','846FMIifc','renderEmpty','scale','trueColor','rgba(0,\x200,\x200,\x200.85)','#C0C0C0','toJSON','touches','_condense','doc','moveTo','#A552A5','2544524CMQwSK','colorOverrides','#4C2600','clientY','ltScale','font','minY','windows-1254','#ff6600','#7F007F','#1C1326','#39264C','dxfVersion','_maxEntries','zoomTo','zoom','textBaseline','getDebugStats','minX','#002626','layerManager','876723Vrwrpq','defPoint2','select','firstPoint','CIRCLE','leaf','defPoint4','addEventListener','#7FFF00','children','#52A57C','splice','clear','top','state','1MLupcF','parse','#0066ff','measure','viewchange','debugEnabled','majorAxis','#FF00BF','fitPoints','acadVersion','currentSnap','onPointerUp','#4C3926','globalAlpha','split','#13004C','guardDestroyed','height','strokeRect','#9152A5','fill','widthFactor','all','textDirection','sqrt','#0052A5','bind','color','compareMinY','_all','478190lfWIdO','#7FFFDF','340681oAWBiH','LINE','_splitRoot','defPoint5','#3F7F7F','extMin','textAlign','#171326','spatialIndex','workerManager','position','#00A5A5','cursor','#261713','get','renderStats','min','INSERT','boolean','lineTypeScale','DIMENSION','33901fRYMnA','#4C0013','patternScale','columnSpacing','pointerup','midpoint','loadGeneration','TEXT','maxX','start','#3F5F7F','camera','#132621','value','showFps','insertionPoint','#0000FF','entityIndex','entityBBoxes','top-left','#7FFFBF','ARC','name','length','84yrIosa','save','#7F3F00','style','knots','radius','changedTouches','measureColor','rowSpacing','onContextMenu','closed','ENDBLK','getHeight','ENDTAB','lineTo','153YzQOil','onDocumentLoaded','getBoundingClientRect','controlPoints','Worker\x20terminated','setDebug','#260000','handleTouchEnd','handleZoom','extMax','totalLoadTime','#FF7FDF','object','#A5007C','#0000A5','insert','alignmentPoint','width','Worker\x20error','windows-1255','removeEventListener','sin','theme','search','spatialIndexBuildTime','tree','rotate','_allDistMargin','basePoint','_chooseSplitAxis','#002600','renderPending','load','nearest','floor','requestRender','deactivate','secondPoint','startParam','bulge','rowCount','emit','point','renderer','onerror','_chooseSubtree','#26264C','Worker\x20parse\x20failed','8949024boTluK','startTangent','hypot','set','parseTime','data','columnCount','#3F7F5F','emitter','Zoom:\x20','4lnmVll','values','blobUrl','isOff','listeners','sans-serif','measureTool','#004C26','getTransform','phase','backgroundColor','Arial,\x20sans-serif','shift','#A50029','fillStyle','fillText','visibility','lineWidth','#131726','log'];a=function(){return dM;};return a();}function Ce(k,z,A,I,L,M,N=0x0,X){const cp=aT;if(N>Kt)return;const Y=A['blocks']['get'](z['blockName']);if(!Y)return;const a0=Math[cp(0x151)](0x1,z['columnCount']),a1=Math['max'](0x1,z['rowCount']);for(let a2=0x0;a2<a1;a2++)for(let a3=0x0;a3<a0;a3++){k['save']();const a4=z['insertionPoint']['x']+a3*z['columnSpacing'],a5=z['insertionPoint']['y']+a2*z[cp(0x20f)];k['translate'](a4,a5),z['rotation']&&k['rotate'](z['rotation']*Math['PI']/0xb4),k[cp(0x18c)](z['scaleX'],z['scaleY']),k['translate'](-Y['basePoint']['x'],-Y['basePoint']['y']);const a6=Math['max'](Math['abs'](z['scaleX']),Math['abs'](z[cp(0x131)])),a7=M/(a6||0x1);let a8=null;const a9=Y['entities'];for(let ab=0x0;ab<a9['length'];ab++){const ac=a9[ab];if(ac['type']!=='INSERT'){const af=Wt(z['blockName'],ab),ag=af!==void 0x0?af:B(ac);if(ag){const ah=Math['max'](ag['maxX']-ag['minX'],ag['maxY']-ag['minY']);if(ah>0x0&&ah/a7<Qt)continue;}}const ad=se(ac,A['layers'],L);ac['type']!=='INSERT'&&Ae(ac['type'])?(ad!==a8&&(a8!==null&&(k['stroke'](),X&&X['drawCalls']++),a8=ad,k['beginPath'](),k['strokeStyle']=ad,k[cp(0x10a)]=a7),Se(k,ac,a7),X&&(X['byType'][ac['type']]=(X['byType'][ac['type']]??0x0)+0x1)):(a8!==null&&(k[cp(0x183)](),X&&X['drawCalls']++,a8=null),k['strokeStyle']=ad,k['fillStyle']=ad,k['lineWidth']=a7,ac['type']===cp(0x1eb)?Ce(k,ac,A,I,L,a7,N+0x1,X):J(k,ac,A,I,L,a7,X));}a8!==null&&(k['stroke'](),X&&X['drawCalls']++),k['restore']();}}function Jt(d,f,g,k,l,m,p){const cq=aT;if(f[cq(0x17d)]){const u=g['blocks']['get'](f['blockName']);if(u){for(const v of u['entities']){const w=se(v,g['layers'],l);d['strokeStyle']=w,d['fillStyle']=w,d['lineWidth']=m,J(d,v,g,k,l,m,p);}return;}}f['defPoint2']&&f['defPoint3']&&(d['beginPath'](),d['moveTo'](f['defPoint2']['x'],f['defPoint2']['y']),d['lineTo'](f['defPoint']['x'],f['defPoint']['y']),d['stroke'](),d['beginPath'](),d['moveTo'](f[cq(0x11e)]['x'],f['defPoint3']['y']),d['lineTo'](f['defPoint']['x'],f['defPoint']['y']),d['stroke']());}function ea(c,d){const cr=aT;if(d['boundaryPaths']['length']!==0x0){c['beginPath']();for(const f of d['boundaryPaths'])if(f['type']==='polyline'&&f['vertices']&&f['vertices']['length']>0x0){const g=f['vertices'][0x0];c['moveTo'](g['x'],g['y']);for(let h=0x1;h<f['vertices'][cr(0x206)];h++){const k=f[cr(0x187)][h-0x1],l=f['vertices'][h],m=f['bulges']?.[h-0x1]??0x0;Math[cr(0x10f)](m)<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}f['isClosed']&&c['closePath']();}else{if(f['type']==='edges'&&f['edges'])for(let p=0x0;p<f['edges']['length'];p++){const u=f['edges'][p];if(u['type']==='line')p===0x0&&c['moveTo'](u['start']['x'],u['start']['y']),c[cr(0x215)](u['end']['x'],u['end']['y']);else{if(u['type']==='arc'){if(p===0x0){const v=u[cr(0x186)]['x']+u['radius']*Math['cos'](u['startAngle']*Math['PI']/0xb4),w=u[cr(0x186)]['y']+u['radius']*Math['sin'](u[cr(0x185)]*Math['PI']/0xb4);c['moveTo'](v,w);}c['arc'](u[cr(0x186)]['x'],u['center']['y'],u['radius'],u[cr(0x185)]*Math['PI']/0xb4,u['endAngle']*Math['PI']/0xb4,!u['ccw']);}}}}d['solidFill']&&(c['globalAlpha']=0.3,c['fill']('evenodd'),c[cr(0x1c7)]=0x1),c[cr(0x183)]();}}function ta(c,d,f){const cs=aT,g=f*0x3;c['beginPath'](),c[cs(0x173)](d['position']['x'],d['position']['y'],g,0x0,Math['PI']*0x2),c['fill']();}function J(c,d,f,g,h,k,l){const cu=aT;switch(l&&(l['drawCalls']++,l['byType'][d['type']]=(l['byType'][d['type']]??0x0)+0x1),d['type']){case'LINE':Pt(c,d);break;case'CIRCLE':wt(c,d);break;case'ARC':It(c,d);break;case cu(0x184):Tt(c,d);break;case'POLYLINE':Et(c,d);break;case'ELLIPSE':At(c,d);break;case'SPLINE':Dt(c,d,k);break;case'TEXT':Nt(c,d,k);break;case'MTEXT':Xt(c,d,k);break;case'INSERT':Ce(c,d,f,g,h,k,0x0,l);break;case'DIMENSION':Jt(c,d,f,g,h,k,l);break;case'HATCH':ea(c,d);break;case'POINT':ta(c,d,k);break;}}var aa=0.5,na=class{constructor(c){this['canvas']=c;const d=c['getContext']('2d',{'alpha':!0x1});if(!d)throw new Error('Failed\x20to\x20get\x202D\x20rendering\x20context.\x20The\x20canvas\x20may\x20already\x20have\x20a\x20different\x20context\x20type,\x20or\x20canvas\x20rendering\x20is\x20not\x20available\x20in\x20this\x20environment.');this['ctx']=d,this['updateSize']();}['ctx'];['width']=0x0;['height']=0x0;['getContext'](){return this['ctx'];}['getWidth'](){return this['width'];}[aT(0x213)](){return this['height'];}['updateSize'](){const cv=aT,c=window['devicePixelRatio']||0x1,d=this['canvas']['getBoundingClientRect']();this['width']=d['width'],this['height']=d['height'],this['canvas']['width']=d['width']*c,this[cv(0x113)]['height']=d['height']*c;}['render'](k,v,w,x,z,A,C){const cw=aT,D=this['ctx'],F=window['devicePixelRatio']||0x1,I={'entitiesDrawn':0x0,'entitiesSkipped':0x0,'drawCalls':0x0,'byType':{}};D['setTransform'](F,0x0,0x0,F,0x0,0x0),D['fillStyle']=E[w]['backgroundColor'],D['fillRect'](0x0,0x0,this['width'],this['height']),me(D,v);const L=0x1/v['scale'];D['lineCap']='round',D['lineJoin']='round';let M=null;for(let N=0x0;N<k['entities'][cw(0x206)];N++){const V=k['entities'][N];if(!V[cw(0x10e)]){I['entitiesSkipped']++;continue;}if(!x['has'](V['layer'])){I['entitiesSkipped']++;continue;}if(A&&!A[cw(0x170)](N)){I['entitiesSkipped']++;continue;}if(C){const Y=C[N];if(Y){const a0=(Y['maxX']-Y['minX'])*v['scale'],a1=(Y[cw(0x176)]-Y['minY'])*v[cw(0x18c)];if(Math[cw(0x151)](a0,a1)<aa){I['entitiesSkipped']++;continue;}}}const X=se(V,k['layers'],w);Ae(V['type'])?(X!==M&&(M!==null&&(D['stroke'](),I['drawCalls']++),M=X,D[cw(0x169)](),D['strokeStyle']=X,D[cw(0x10a)]=L),Se(D,V,L),I['entitiesDrawn']++,I['byType'][V['type']]=(I['byType'][V['type']]??0x0)+0x1):(M!==null&&(D['stroke'](),I['drawCalls']++,M=null),D['strokeStyle']=X,D['fillStyle']=X,D['lineWidth']=L,I['entitiesDrawn']++,J(D,V,k,v,w,L,I));}if(M!==null&&(D['stroke'](),I['drawCalls']++),z>=0x0&&z<k[cw(0x15a)]['length']){const a2=k['entities'][z];me(D,v),D['strokeStyle']=E[w]['selectionColor'],D['fillStyle']=E[w]['selectionColor'],D['lineWidth']=L*0x3,J(D,a2,k,v,w,L);}return I;}[aT(0x18b)](c){const cx=aT,d=this['ctx'],f=window['devicePixelRatio']||0x1;d['setTransform'](f,0x0,0x0,f,0x0,0x0),d['fillStyle']=E[c][cx(0x103)],d['fillRect'](0x0,0x0,this['width'],this['height']);}['destroy'](){}},ra={'showFps':!0x0,'showRenderStats':!0x0,'showDocumentInfo':!0x0,'showTimings':!0x0,'showCamera':!0x0,'position':'top-left'};function ne(c){return{...ra,...c};}function sa(c){return c===0x0?'0\x20B':c<0x400?c+'\x20B':c<0x400*0x400?(c/0x400)['toFixed'](0x1)+'\x20KB':(c/(0x400*0x400))['toFixed'](0x1)+'\x20MB';}function oa(c){const cy=aT;return c>=0x1?c['toFixed'](0x2)+'x':'1:'+(0x1/c)[cy(0x16d)](0x1);}var ia='11px\x20monospace',Fe=0xf,xe=0x8,Z=0x8,S=0xa;function la(k,v,w,x,z,A){const cz=aT;k['setTransform'](0x1,0x0,0x0,0x1,0x0,0x0);const C=[];if(x[cz(0x1fd)]&&C[cz(0x177)](['FPS:\x20'+v['fps']+'\x20\x20Frame:\x20'+v['frameTime'][cz(0x16d)](0x1)+'ms']),x['showRenderStats']){const Y=v['renderStats']['entitiesDrawn']+v['renderStats']['entitiesSkipped'],a0=['Drawn:\x20'+v['renderStats']['entitiesDrawn']+'\x20/\x20'+Y+'\x20\x20Calls:\x20'+v[cz(0x1e9)][cz(0x150)]],a1=Object['entries'](v['renderStats']['byType'])['sort'](([,a2],[,a3])=>a3-a2)['slice'](0x0,0x6)['map'](([a2,a3])=>a2+':\x20'+a3)['join']('\x20\x20');a1&&a0['push'](a1),C['push'](a0);}if(x['showDocumentInfo']){const a2=[cz(0x17f)+v['visibleLayerCount']+'\x20/\x20'+v[cz(0x141)]+'\x20\x20Blocks:\x20'+v['blockCount']];v['dxfVersion']&&a2['push']('DXF:\x20'+v[cz(0x1a2)]),v['fileName']&&a2[cz(0x177)]('File:\x20'+v['fileName']),v['fileSize']>0x0&&a2['push']('Size:\x20'+sa(v['fileSize'])),C['push'](a2);}if(x[cz(0x140)]){const a3=[];v['parseTime']>0x0&&a3['push']('Parse:\x20'+v['parseTime'][cz(0x16d)](0x0)+'ms'),v['spatialIndexBuildTime']>0x0&&a3[cz(0x177)]('Index:\x20'+v['spatialIndexBuildTime']['toFixed'](0x0)+'ms'),v['totalLoadTime']>0x0&&a3['push']('Load:\x20'+v[cz(0x220)]['toFixed'](0x0)+'ms'),a3['length']>0x0&&C['push']([a3['join']('\x20\x20')]);}if(x['showCamera']){const a4=v['viewportBounds'];C['push']([cz(0xf8)+oa(v[cz(0x1a5)])+'\x20\x20Pixel:\x20'+v['pixelSize']['toFixed'](0x2),'View:\x20['+a4[cz(0x1a8)]['toFixed'](0x0)+',\x20'+a4[cz(0x19c)]['toFixed'](0x0)+']\x20→\x20['+a4['maxX']['toFixed'](0x0)+',\x20'+a4['maxY']['toFixed'](0x0)+']']);}if(C['length']===0x0)return;k[cz(0x19b)]=ia;const D=[];for(let a5=0x0;a5<C['length'];a5++){a5>0x0&&D['push']({'text':'','isSeparator':!0x0});for(const a6 of C[a5])D[cz(0x177)]({'text':a6,'isSeparator':!0x1});}let F=0x0;for(const a7 of D)if(!a7['isSeparator']){const a8=k['measureText'](a7['text'])['width'];a8>F&&(F=a8);}const I=F+Z*0x2;let L=Z*0x2;for(const a9 of D)L+=a9[cz(0x165)]?xe:Fe;let M,N;switch(x['position']){case cz(0x202):M=S,N=S;break;case'top-right':M=z-I-S,N=S;break;case'bottom-left':M=S,N=A-L-S;break;case'bottom-right':M=z-I-S,N=A-L-S;break;}const V=E[w];k['fillStyle']=w==='dark'?'rgba(0,\x200,\x200,\x200.75)':cz(0x12d),k['fillRect'](M,N,I,L),k['strokeStyle']=w==='dark'?'rgba(255,\x20255,\x20255,\x200.15)':'rgba(0,\x200,\x200,\x200.15)',k['lineWidth']=0x1,k[cz(0x1cc)](M+0.5,N+0.5,I-0x1,L-0x1),k['fillStyle']=w==='dark'?V['defaultEntityColor']:cz(0x18e),k['textAlign']='left',k['textBaseline']=cz(0x1b8);let X=N+Z;for(const ab of D)ab['isSeparator']?X+=xe:(k['fillText'](ab['text'],M+Z,X),X+=Fe);}var ca=class{['layers']=new Map();['visibility']=new Map();['colorOverrides']=new Map();['visibleCache']=null;['setLayers'](c){const cA=aT;this['layers']=new Map(c),this['visibility']['clear'](),this['colorOverrides']['clear'](),this['visibleCache']=null;for(const [d,f]of this['layers'])this['visibility']['set'](d,!f[cA(0xfc)]&&!f['isFrozen']);}['getAllLayers'](){const cB=aT;return Array['from'](this['layers'][cB(0xfa)]());}['setVisible'](c,d){this['visibility']['set'](c,d),this['visibleCache']=null;}['isVisible'](c){const cC=aT;return this[cC(0x109)][cC(0x1e8)](c)??!0x0;}['setColorOverride'](c,d){this['colorOverrides']['set'](c,d);}['getColorOverride'](c){const cD=aT;return this[cD(0x197)]['get'](c);}['getVisibleLayerNames'](){if(this['visibleCache'])return this['visibleCache'];const c=new Set();for(const [d,f]of this['visibility'])f&&c['add'](d);return this['visibleCache']=c,c;}['clear'](){const cE=aT;this['layers'][cE(0x1b7)](),this['visibility'][cE(0x1b7)](),this['colorOverrides'][cE(0x1b7)](),this['visibleCache']=null;}},ha=class{['listeners']=new Map();['on'](c,d){const cF=aT;this['listeners'][cF(0x170)](c)||this['listeners']['set'](c,new Set()),this[cF(0xfd)]['get'](c)['add'](d);}['off'](c,d){this['listeners']['get'](c)?.['delete'](d);}['emit'](c,d){const cG=aT,f=this[cG(0xfd)]['get'](c);if(f){for(const g of f)g(d);}}['removeAllListeners'](){const cH=aT;this[cH(0xfd)][cH(0x1b7)]();}},ua=class{constructor(c,d){const cI=aT;this['canvas']=c,this['viewer']=d,this['onPointerDown']=this['handlePointerDown']['bind'](this),this['onPointerMove']=this['handlePointerMove']['bind'](this),this['onPointerUp']=this['handlePointerUp']['bind'](this),this['onWheel']=this['handleWheel'][cI(0x1d4)](this),this['onTouchStart']=this['handleTouchStart']['bind'](this),this['onTouchMove']=this['handleTouchMove']['bind'](this),this[cI(0x13f)]=this[cI(0x21d)]['bind'](this),this[cI(0x210)]=f=>f['preventDefault'](),c['addEventListener']('pointerdown',this['onPointerDown']),c['addEventListener']('pointermove',this['onPointerMove']),c[cI(0x1b2)]('pointerup',this['onPointerUp']),c['addEventListener']('wheel',this['onWheel'],{'passive':!0x1}),c['addEventListener']('touchstart',this['onTouchStart'],{'passive':!0x1}),c['addEventListener']('touchmove',this['onTouchMove'],{'passive':!0x1}),c[cI(0x1b2)]('touchend',this['onTouchEnd']),c['addEventListener']('contextmenu',this[cI(0x210)]);}['isPanning']=!0x1;['lastX']=0x0;['lastY']=0x0;['touches']=new Map();[aT(0x124)];['onPointerMove'];[aT(0x1c5)];['onWheel'];['onTouchStart'];[aT(0x171)];['onTouchEnd'];['onContextMenu'];['destroy'](){const cJ=aT;this['canvas'][cJ(0x22a)]('pointerdown',this[cJ(0x124)]),this['canvas'][cJ(0x22a)]('pointermove',this['onPointerMove']),this['canvas']['removeEventListener'](cJ(0x1f3),this['onPointerUp']),this['canvas']['removeEventListener']('wheel',this['onWheel']),this['canvas']['removeEventListener']('touchstart',this[cJ(0x13e)]),this['canvas']['removeEventListener']('touchmove',this['onTouchMove']),this['canvas']['removeEventListener']('touchend',this['onTouchEnd']),this['canvas'][cJ(0x22a)]('contextmenu',this['onContextMenu']);}['handlePointerDown'](c){const cK=aT,d=this['viewer']['getTool'](),f=this['canvas'][cK(0x218)](),g=c['clientX']-f['left'],h=c['clientY']-f['top'];c[cK(0x142)]===0x0&&d===cK(0x16a)?this['startPan'](c,g,h):c['button']===0x1?this['startPan'](c,g,h):c['button']===0x0&&(d===cK(0x1ad)||d==='measure')&&this['viewer']['handleClick'](g,h);}['startPan'](c,d,f){this['isPanning']=!0x0,this['lastX']=d,this['lastY']=f,this['canvas']['setPointerCapture'](c['pointerId']),this['canvas']['style']['cursor']='grabbing';}['handlePointerMove'](c){const cL=aT,d=this[cL(0x113)]['getBoundingClientRect'](),f=c[cL(0x14d)]-d['left'],g=c['clientY']-d['top'];if(this['isPanning']){const h=f-this['lastX'],i=g-this['lastY'];this['lastX']=f,this['lastY']=g,this['viewer']['handlePan'](h,i);}else this['viewer']['handleMouseMove'](f,g);}['handlePointerUp'](c){const cM=aT;this['isPanning']&&(this['isPanning']=!0x1,this[cM(0x113)]['releasePointerCapture'](c['pointerId']),this[cM(0x113)]['style']['cursor']=this['viewer']['getTool']()==='pan'?'grab':'crosshair');}['handleWheel'](c){const cN=aT;c[cN(0x139)]();const d=this['canvas']['getBoundingClientRect'](),f=c['clientX']-d['left'],g=c['clientY']-d['top'],h=-Math['sign'](c['deltaY']),k=this['viewer']['getZoomSpeed'](),l=h>0x0?k:0x1/k;this['viewer']['handleZoom'](f,g,l);}['handleTouchStart'](c){const cO=aT;c[cO(0x139)]();for(const d of Array['from'](c[cO(0x20d)]))this[cO(0x191)]['set'](d['identifier'],{'x':d['clientX'],'y':d['clientY']});}['handleTouchMove'](d){const cP=aT;if(d['preventDefault'](),this['touches']['size']===0x2&&d['touches'][cP(0x206)]===0x2){const f=d['touches'][0x0],g=d[cP(0x191)][0x1],k=Array['from'](this['touches'][cP(0xfa)]()),m=Math['hypot'](k[0x0]['x']-k[0x1]['x'],k[0x0]['y']-k[0x1]['y']),p=Math['hypot'](f['clientX']-g['clientX'],f['clientY']-g['clientY']);if(m>0x0){const v=p/m,w=this['canvas'][cP(0x218)](),x=(k[0x0]['x']+k[0x1]['x'])/0x2-w['left'],z=(k[0x0]['y']+k[0x1]['y'])/0x2-w['top'],A=(f['clientX']+g[cP(0x14d)])/0x2-w['left'],C=(f['clientY']+g['clientY'])/0x2-w[cP(0x1b8)];this['viewer']['handleZoom'](x,z,v),this['viewer']['handlePan'](A-x,C-z);}}else{if(this[cP(0x191)]['size']===0x1&&d['touches']['length']===0x1){const D=d['touches'][0x0],F=this['touches']['get'](D['identifier']);F&&this['viewer']['handlePan'](D[cP(0x14d)]-F['x'],D[cP(0x199)]-F['y']);}}for(const I of Array['from'](d['changedTouches']))this[cP(0x191)][cP(0xf2)](I['identifier'],{'x':I['clientX'],'y':I['clientY']});}['handleTouchEnd'](c){const cQ=aT;for(const d of Array['from'](c['changedTouches']))this['touches'][cQ(0x16b)](d['identifier']);}},da=0x5,fa=class{['tree']=new Le();['items']=[];['entityBBoxes']=[];['build'](c,d){const cR=aT;this['items']=[],this['entityBBoxes']=new Array(c['length'])[cR(0x1ce)](null);const f=d?new Map():void 0x0;for(let g=0x0;g<c['length'];g++){const h=c[g],i=d&&f?Ee(h,d,f):B(h);this['entityBBoxes'][g]=i,i&&this['items']['push']({...i,'entityIndex':g});}this['tree']['clear'](),this[cR(0xd8)][cR(0xdf)](this['items']);}['search'](c,d,f,g){const cS=aT;return this[cS(0xd8)][cS(0xd6)]({'minX':c,'minY':d,'maxX':f,'maxY':g});}['getEntityBBox'](c){const cT=aT;return this[cT(0x201)][c]??null;}['getEntityBBoxes'](){return this['entityBBoxes'];}['clear'](){this['tree']['clear'](),this['items']=[],this['entityBBoxes']=[];}};function pa(g,k,m,p,v,w){const cU=aT,x=da/w,z=p[cU(0xd6)](g-x,k-x,g+x,k+x);let A=x,C=-0x1;for(let D=z[cU(0x206)]-0x1;D>=0x0;D--){const F=z[D],I=m[F['entityIndex']];if(!I||!v['has'](I['layer'])||!I[cU(0x10e)])continue;const L=ba(g,k,I);L<A&&(A=L,C=F['entityIndex']);}return C;}function ba(d,f,g){const cV=aT;switch(g[cV(0x138)]){case cV(0x1db):return re(d,f,g[cV(0x1f8)]['x'],g['start']['y'],g['end']['x'],g['end']['y']);case'CIRCLE':return ma(d,f,g[cV(0x186)]['x'],g['center']['y'],g['radius']);case cV(0x204):return ga(d,f,g[cV(0x186)]['x'],g['center']['y'],g['radius'],g['startAngle']*Math['PI']/0xb4,g['endAngle']*Math['PI']/0xb4);case cV(0x184):case'POLYLINE':{let k=0x1/0x0;const l=g['vertices'],m=g['closed']?l['length']:l[cV(0x206)]-0x1;for(let p=0x0;p<m;p++){const u=l[p],v=l[(p+0x1)%l['length']],w=re(d,f,u['x'],u['y'],v['x'],v['y']);k=Math['min'](k,w);}return k;}case'ELLIPSE':return Fa(d,f,g[cV(0x186)]['x'],g[cV(0x186)]['y'],g['majorAxis'],g['minorRatio']);case'TEXT':case'MTEXT':{const x=B(g);return x?va(d,f,x[cV(0x1a8)],x[cV(0x19c)],x[cV(0x1f7)],x[cV(0x176)]):0x1/0x0;}case'POINT':return Math[cV(0xf1)](d-g['position']['x'],f-g['position']['y']);case'SPLINE':{let z=0x1/0x0;const A=g[cV(0x219)];for(let C=0x0;C<A['length']-0x1;C++){const D=re(d,f,A[C]['x'],A[C]['y'],A[C+0x1]['x'],A[C+0x1]['y']);z=Math['min'](z,D);}return z;}default:return 0x1/0x0;}}function re(d,f,g,k,m,p){const cW=aT,v=m-g,w=p-k,x=v*v+w*w;if(x===0x0)return Math['hypot'](d-g,f-k);let z=((d-g)*v+(f-k)*w)/x;z=Math['max'](0x0,Math[cW(0x1ea)](0x1,z));const A=g+z*v,C=k+z*w;return Math['hypot'](d-A,f-C);}function ma(c,d,f,g,h){const cX=aT;return Math[cX(0x10f)](Math['hypot'](c-f,d-g)-h);}function ga(g,k,m,o,p,u,v){const cY=aT,w=(Math['atan2'](k-o,g-m)%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']),x=(u%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']),z=(v%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']);if(x<=z?w>=x&&w<=z:w>=x||w<=z)return Math['abs'](Math[cY(0xf1)](g-m,k-o)-p);const A=Math[cY(0xf1)](g-(m+p*Math['cos'](u)),k-(o+p*Math['sin'](u))),C=Math['hypot'](g-(m+p*Math['cos'](v)),k-(o+p*Math['sin'](v)));return Math[cY(0x1ea)](A,C);}function va(c,d,f,g,h,k){if(c>=f&&c<=h&&d>=g&&d<=k)return 0x0;const l=Math['max'](f-c,0x0,c-h),m=Math['max'](g-d,0x0,d-k);return Math['hypot'](l,m);}function Fa(g,k,v,w,x,z){const cZ=aT,A=Math['atan2'](x['y'],x['x']),C=Math[cZ(0x152)](-A),D=Math['sin'](-A),F=(g-v)*C-(k-w)*D,I=(g-v)*D+(k-w)*C,L=Math['sqrt'](x['x']**0x2+x['y']**0x2),M=L*z;if(L<1e-10)return Math['hypot'](g-v,k-w);const N=I*(L/M),V=Math['hypot'](F,N);if(V<1e-10)return L;const X=F/V*L,Y=I/V*M;return Math['hypot'](F-X,I-Y);}var xa=class{['state']={'phase':'idle'};['currentSnap']=null;['activate'](){const d0=aT;this[d0(0x1b9)]={'phase':d0(0x117)},this['currentSnap']=null;}[aT(0xe3)](){this['state']={'phase':'idle'},this['currentSnap']=null;}['handleClick'](d,f,g){const d1=aT,k=g?g['point']:{'x':d,'y':f};switch(this['state']['phase']){case'first-point':return this['state']={'phase':'second-point','firstPoint':k,'firstSnap':g??void 0x0},null;case'second-point':{const l=this[d1(0x1b9)]['firstPoint'],m=k,p=m['x']-l['x'],u=m['y']-l['y'],v=Math['sqrt'](p*p+u*u),w=Math['atan2'](u,p)*0xb4/Math['PI'];return this[d1(0x1b9)]={'phase':'done','firstPoint':l,'secondPoint':m,'distance':v,'angle':w},{'distance':v,'angle':w,'deltaX':p,'deltaY':u,'points':[l,m]};}case'done':return this['state']={'phase':'second-point','firstPoint':k},null;default:return null;}}['handleMove'](c){this['currentSnap']=c;}};function ke(g,k,m,p,v,w=new Set(['endpoint','midpoint','center'])){const d2=aT,x=0xa/v,z=[],A=p['search'](g-x,k-x,g+x,k+x);for(const C of A){const D=m[C[d2(0x200)]];if(!D)continue;const F=C['entityIndex'];switch(D[d2(0x138)]){case'LINE':{if(w['has']('endpoint')&&(y(z,D['start']['x'],D['start']['y'],'endpoint',F,g,k,x),y(z,D['end']['x'],D['end']['y'],d2(0x122),F,g,k,x)),w['has']('midpoint')){const I=(D['start']['x']+D['end']['x'])/0x2,L=(D['start']['y']+D['end']['y'])/0x2;y(z,I,L,'midpoint',F,g,k,x);}break;}case'CIRCLE':{if(w['has']('center')&&y(z,D['center']['x'],D['center']['y'],'center',F,g,k,x),w[d2(0x170)]('endpoint'))for(const M of[0x0,Math['PI']/0x2,Math['PI'],0x3*Math['PI']/0x2]){const N=D['center']['x']+D['radius']*Math['cos'](M),V=D['center']['y']+D['radius']*Math['sin'](M);y(z,N,V,'endpoint',F,g,k,x);}break;}case'ARC':{if(w['has']('center')&&y(z,D['center']['x'],D['center']['y'],d2(0x186),F,g,k,x),w['has']('endpoint')){const X=D['startAngle']*Math['PI']/0xb4,Y=D['endAngle']*Math['PI']/0xb4;y(z,D['center']['x']+D['radius']*Math['cos'](X),D['center']['y']+D['radius']*Math[d2(0x22b)](X),'endpoint',F,g,k,x),y(z,D[d2(0x186)]['x']+D['radius']*Math[d2(0x152)](Y),D['center']['y']+D['radius']*Math[d2(0x22b)](Y),'endpoint',F,g,k,x);}break;}case'LWPOLYLINE':case'POLYLINE':{if(w['has']('endpoint')){for(const a0 of D['vertices'])y(z,a0['x'],a0['y'],'endpoint',F,g,k,x);}if(w['has']('midpoint'))for(let a1=0x0;a1<D['vertices']['length']-0x1;a1++){const a2=D['vertices'][a1],a3=D['vertices'][a1+0x1];y(z,(a2['x']+a3['x'])/0x2,(a2['y']+a3['y'])/0x2,d2(0x1f4),F,g,k,x);}break;}case'ELLIPSE':{w[d2(0x170)]('center')&&y(z,D['center']['x'],D['center']['y'],'center',F,g,k,x);break;}case d2(0x1f6):{w['has']('endpoint')&&y(z,D['insertionPoint']['x'],D['insertionPoint']['y'],'endpoint',F,g,k,x);break;}case'MTEXT':{w['has']('endpoint')&&y(z,D[d2(0x1fe)]['x'],D['insertionPoint']['y'],'endpoint',F,g,k,x);break;}}}return z['sort']((a4,a5)=>Math[d2(0xf1)](a4[d2(0xe9)]['x']-g,a4['point']['y']-k)-Math['hypot'](a5['point']['x']-g,a5['point']['y']-k)),z;}function y(c,d,f,g,h,k,l,m){Math['hypot'](d-k,f-l)<=m&&c['push']({'point':{'x':d,'y':f},'type':g,'entityIndex':h});}function ka(g,k,v,w,x,z){const d3=aT,A=E[z];g['setTransform'](0x1,0x0,0x0,0x1,0x0,0x0);const C=v['state'];if(v['currentSnap']){const [D,F]=W(k,v[d3(0x1c4)]['point']['x'],v['currentSnap']['point']['y']);ya(g,D,F,v['currentSnap']['type'],A[d3(0x20e)]);}if(C['phase']==='second-point'){const [I,L]=W(k,C['firstPoint']['x'],C['firstPoint']['y']);let M,N;if(v['currentSnap']){const [a0,a1]=W(k,v['currentSnap']['point']['x'],v['currentSnap']['point']['y']);M=a0,N=a1;}else M=w,N=x;g['strokeStyle']=A['measureColor'],g['lineWidth']=1.5,g['setLineDash']([0x6,0x3]),g['beginPath'](),g['moveTo'](I,L),g['lineTo'](M,N),g[d3(0x183)](),g['setLineDash']([]),K(g,I,L,A['measureColor']),K(g,M,N,A['measureColor']);let V,X;v['currentSnap']?(V=v['currentSnap']['point']['x'],X=v['currentSnap']['point']['y']):[V,X]=q(k,w,x);const Y=Math['hypot'](V-C['firstPoint']['x'],X-C['firstPoint']['y']);ye(g,(I+M)/0x2,(L+N)/0x2,Y,z);}if(C[d3(0x102)]==='done'){const [a2,a3]=W(k,C['firstPoint']['x'],C[d3(0x1ae)]['y']),[a4,a5]=W(k,C[d3(0xe4)]['x'],C['secondPoint']['y']);g['strokeStyle']=A['measureColor'],g['lineWidth']=0x2,g['beginPath'](),g[d3(0x194)](a2,a3),g['lineTo'](a4,a5),g['stroke'](),K(g,a2,a3,A['measureColor']),K(g,a4,a5,A['measureColor']),ye(g,(a2+a4)/0x2,(a3+a5)/0x2,C['distance'],z);}}function ya(c,d,f,g,h){const d4=aT;c['strokeStyle']=h,c['lineWidth']=0x2;const i=0x8;switch(g){case'endpoint':c['strokeRect'](d-i/0x2,f-i/0x2,i,i);break;case'midpoint':c['beginPath'](),c['moveTo'](d,f-i/0x2),c['lineTo'](d+i/0x2,f+i/0x2),c['lineTo'](d-i/0x2,f+i/0x2),c['closePath'](),c['stroke']();break;case'center':c['beginPath'](),c[d4(0x173)](d,f,i/0x2,0x0,Math['PI']*0x2),c['stroke']();break;case d4(0xe0):c['beginPath'](),c['moveTo'](d-i/0x2,f-i/0x2),c['lineTo'](d+i/0x2,f+i/0x2),c[d4(0x194)](d+i/0x2,f-i/0x2),c[d4(0x215)](d-i/0x2,f+i/0x2),c['stroke']();break;}}function K(c,d,f,g){const d5=aT;c['fillStyle']=g,c[d5(0x169)](),c['arc'](d,f,0x4,0x0,Math['PI']*0x2),c['fill']();}function ye(d,f,g,k,m){const d6=aT,p=k['toFixed'](0x4);d['font']='13px\x20monospace',d[d6(0x1e0)]=d6(0x186),d['textBaseline']='bottom';const v=d['measureText'](p),w=0x4,x=f-v['width']/0x2-w,z=g-0x14,A=v['width']+w*0x2,C=0x12;d[d6(0x107)]=m==='dark'?'rgba(0,0,0,0.8)':'rgba(255,255,255,0.9)',d['fillRect'](x,z,A,C),d['fillStyle']=E[m]['measureColor'],d[d6(0x108)](p,f,g-0x6);}var Pa=class{['worker']=null;[aT(0xfb)]=null;['nextId']=0x1;[aT(0x125)]=new Map();['getWorker'](){const d8=aT;return this['worker']?this['worker']:(this['blobUrl']=URL['createObjectURL'](new Blob(['\x22use\x20strict\x22;(()=>{function\x20h(a){let\x20e=a.replace(/\x5cr\x5cn?/g,`\x0a`),t=[],r=e.length,n=0;for(;n<r;){for(;n<r&&e.charCodeAt(n)===10;)n++;if(n>=r)break;let\x20o=e.indexOf(`\x0a`,n);o===-1&&(o=r);let\x20c=e.substring(n,o).trim();n=o+1;let\x20s=parseInt(c,10);if(isNaN(s)){n<r&&(o=e.indexOf(`\x0a`,n),o===-1&&(o=r),n=o+1);continue}if(n>=r)break;o=e.indexOf(`\x0a`,n),o===-1&&(o=r);let\x20p=e.substring(n,o).replace(/\x5cs+$/,\x22\x22);n=o+1,t.push({code:s,value:p})}return\x20t}function\x20m(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDSEC\x22)return\x20e+1;if(r.code===9){let\x20n=r.value;switch(e++,n){case\x22$ACADVER\x22:e<a.length&&(t.acadVersion=a[e].value,e++);break;case\x22$EXTMIN\x22:if(e<a.length){let\x20o=v(a,e);t.extMin=o.point,e=o.nextIndex}break;case\x22$EXTMAX\x22:if(e<a.length){let\x20o=v(a,e);t.extMax=o.point,e=o.nextIndex}break;case\x22$INSUNITS\x22:e<a.length&&(t.insUnits=parseInt(a[e].value,10),e++);break;case\x22$MEASUREMENT\x22:e<a.length&&(t.measurement=parseInt(a[e].value,10),e++);break;case\x22$LTSCALE\x22:e<a.length&&(t.ltScale=parseFloat(a[e].value),e++);break;case\x22$DWGCODEPAGE\x22:e<a.length&&(t.dwgCodePage=a[e].value,e++);break;case\x22$HANDSEED\x22:e<a.length&&(t.handleSeed=a[e].value,e++);break;default:for(;e<a.length&&a[e].code!==9&&a[e].code!==0;)t[n]=a[e].value,e++}}else\x20e++}return\x20e}function\x20v(a,e){let\x20t={x:0,y:0,z:0};for(;e<a.length;){let\x20r=a[e].code;if(r===10)t.x=parseFloat(a[e].value),e++;else\x20if(r===20)t.y=parseFloat(a[e].value),e++;else\x20if(r===30)t.z=parseFloat(a[e].value),e++;else\x20break}return{point:t,nextIndex:e}}function\x20k(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDSEC\x22)return\x20e+1;if(r.code===0&&r.value===\x22TABLE\x22){if(e++,e>=a.length)break;let\x20n=a[e].value;switch(e++,n){case\x22LAYER\x22:e=H(a,e,t.layers);break;case\x22LTYPE\x22:e=O(a,e,t.lineTypes);break;case\x22STYLE\x22:e=_(a,e,t.styles);break;default:e=R(a,e);break}}else\x20e++}return\x20e}function\x20R(a,e){for(;e<a.length;){if(a[e].code===0&&a[e].value===\x22ENDTAB\x22)return\x20e+1;e++}return\x20e}function\x20H(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDTAB\x22)return\x20e+1;if(r.code===0&&r.value===\x22LAYER\x22){e++;let\x20n={name:\x220\x22,color:7,lineType:\x22Continuous\x22,flags:0,lineWeight:-3,isOff:!1,isFrozen:!1,isLocked:!1};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x206:n.lineType=o.value;break;case\x2062:n.color=parseInt(o.value,10);break;case\x2070:n.flags=parseInt(o.value,10);break;case\x20370:n.lineWeight=parseInt(o.value,10);break;case\x20420:n.trueColor=parseInt(o.value,10);break}e++}t.set(n.name,n)}else\x20e++}return\x20e}function\x20O(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDTAB\x22)return\x20e+1;if(r.code===0&&r.value===\x22LTYPE\x22){e++;let\x20n={name:\x22\x22,description:\x22\x22,pattern:[],totalLength:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x203:n.description=o.value;break;case\x2040:n.totalLength=parseFloat(o.value);break;case\x2049:n.pattern.push(parseFloat(o.value));break}e++}n.name&&t.set(n.name,n)}else\x20e++}return\x20e}function\x20_(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDTAB\x22)return\x20e+1;if(r.code===0&&r.value===\x22STYLE\x22){e++;let\x20n={name:\x22\x22,fontName:\x22\x22,bigFontName:\x22\x22,height:0,widthFactor:1,obliqueAngle:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x203:n.fontName=o.value;break;case\x204:n.bigFontName=o.value;break;case\x2040:n.height=parseFloat(o.value);break;case\x2041:n.widthFactor=parseFloat(o.value);break;case\x2050:n.obliqueAngle=parseFloat(o.value);break}e++}n.name&&t.set(n.name,n)}else\x20e++}return\x20e}function\x20l(a){let\x20e={type:\x22\x22,layer:\x220\x22,color:256,lineType:\x22BYLAYER\x22,lineTypeScale:1,lineWeight:-1,visible:!0,extrusion:{x:0,y:0,z:1}};for(let\x20t\x20of\x20a)switch(t.code){case\x205:e.handle=t.value;break;case\x208:e.layer=t.value;break;case\x206:e.lineType=t.value;break;case\x2048:e.lineTypeScale=parseFloat(t.value);break;case\x2060:e.visible=t.value===\x220\x22||t.value===\x22\x22;break;case\x2062:e.color=parseInt(t.value,10);break;case\x20370:e.lineWeight=parseInt(t.value,10);break;case\x20420:e.trueColor=parseInt(t.value,10);break;case\x20210:e.extrusion.x=parseFloat(t.value);break;case\x20220:e.extrusion.y=parseFloat(t.value);break;case\x20230:e.extrusion.z=parseFloat(t.value);break}return\x20e}function\x20D(a){let\x20t={...l(a),type:\x22LINE\x22,start:{x:0,y:0,z:0},end:{x:0,y:0,z:0}};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.start.x=parseFloat(r.value);break;case\x2020:t.start.y=parseFloat(r.value);break;case\x2030:t.start.z=parseFloat(r.value);break;case\x2011:t.end.x=parseFloat(r.value);break;case\x2021:t.end.y=parseFloat(r.value);break;case\x2031:t.end.z=parseFloat(r.value);break}return\x20t}function\x20F(a){let\x20t={...l(a),type:\x22CIRCLE\x22,center:{x:0,y:0,z:0},radius:0};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.center.x=parseFloat(r.value);break;case\x2020:t.center.y=parseFloat(r.value);break;case\x2030:t.center.z=parseFloat(r.value);break;case\x2040:t.radius=parseFloat(r.value);break}return\x20t}function\x20E(a){let\x20t={...l(a),type:\x22ARC\x22,center:{x:0,y:0,z:0},radius:0,startAngle:0,endAngle:360};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.center.x=parseFloat(r.value);break;case\x2020:t.center.y=parseFloat(r.value);break;case\x2030:t.center.z=parseFloat(r.value);break;case\x2040:t.radius=parseFloat(r.value);break;case\x2050:t.startAngle=parseFloat(r.value);break;case\x2051:t.endAngle=parseFloat(r.value);break}return\x20t}function\x20P(a){let\x20t={...l(a),type:\x22LWPOLYLINE\x22,vertices:[],closed:!1,constantWidth:0,elevation:0},r=null;for(let\x20n\x20of\x20a)switch(n.code){case\x2070:t.closed=(parseInt(n.value,10)&1)!==0;break;case\x2038:t.elevation=parseFloat(n.value);break;case\x2043:t.constantWidth=parseFloat(n.value);break;case\x2010:r&&t.vertices.push(r),r={x:parseFloat(n.value),y:0,bulge:0,startWidth:0,endWidth:0};break;case\x2020:r&&(r.y=parseFloat(n.value));break;case\x2040:r&&(r.startWidth=parseFloat(n.value));break;case\x2041:r&&(r.endWidth=parseFloat(n.value));break;case\x2042:r&&(r.bulge=parseFloat(n.value));break}return\x20r&&t.vertices.push(r),t}function\x20T(a){let\x20t={...l(a),type:\x22POLYLINE\x22,vertices:[],closed:!1,is3d:!1};for(let\x20r\x20of\x20a)if(r.code===70){let\x20n=parseInt(r.value,10);t.closed=(n&1)!==0,t.is3d=(n&8)!==0}return\x20t}function\x20w(a){let\x20t={...l(a),type:\x22ELLIPSE\x22,center:{x:0,y:0,z:0},majorAxis:{x:1,y:0,z:0},minorRatio:1,startParam:0,endParam:Math.PI*2};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.center.x=parseFloat(r.value);break;case\x2020:t.center.y=parseFloat(r.value);break;case\x2030:t.center.z=parseFloat(r.value);break;case\x2011:t.majorAxis.x=parseFloat(r.value);break;case\x2021:t.majorAxis.y=parseFloat(r.value);break;case\x2031:t.majorAxis.z=parseFloat(r.value);break;case\x2040:t.minorRatio=parseFloat(r.value);break;case\x2041:t.startParam=parseFloat(r.value);break;case\x2042:t.endParam=parseFloat(r.value);break}return\x20t}function\x20g(a){let\x20t={...l(a),type:\x22SPLINE\x22,degree:3,flags:0,knots:[],controlPoints:[],fitPoints:[],weights:[]},r=null,n=null;for(let\x20o\x20of\x20a)switch(o.code){case\x2070:t.flags=parseInt(o.value,10);break;case\x2071:t.degree=parseInt(o.value,10);break;case\x2040:t.knots.push(parseFloat(o.value));break;case\x2041:t.weights.push(parseFloat(o.value));break;case\x2010:r&&t.controlPoints.push(r),r={x:parseFloat(o.value),y:0,z:0};break;case\x2020:r&&(r.y=parseFloat(o.value));break;case\x2030:r&&(r.z=parseFloat(o.value));break;case\x2011:n&&t.fitPoints.push(n),n={x:parseFloat(o.value),y:0,z:0};break;case\x2021:n&&(n.y=parseFloat(o.value));break;case\x2031:n&&(n.z=parseFloat(o.value));break;case\x2012:t.startTangent||(t.startTangent={x:0,y:0,z:0}),t.startTangent.x=parseFloat(o.value);break;case\x2022:t.startTangent&&(t.startTangent.y=parseFloat(o.value));break;case\x2032:t.startTangent&&(t.startTangent.z=parseFloat(o.value));break;case\x2013:t.endTangent||(t.endTangent={x:0,y:0,z:0}),t.endTangent.x=parseFloat(o.value);break;case\x2023:t.endTangent&&(t.endTangent.y=parseFloat(o.value));break;case\x2033:t.endTangent&&(t.endTangent.z=parseFloat(o.value));break}return\x20r&&t.controlPoints.push(r),n&&t.fitPoints.push(n),t}function\x20I(a){let\x20t={...l(a),type:\x22TEXT\x22,text:\x22\x22,insertionPoint:{x:0,y:0,z:0},height:1,rotation:0,widthFactor:1,obliqueAngle:0,style:\x22STANDARD\x22,hAlign:0,vAlign:0,generationFlags:0};for(let\x20r\x20of\x20a)switch(r.code){case\x201:t.text=r.value;break;case\x2010:t.insertionPoint.x=parseFloat(r.value);break;case\x2020:t.insertionPoint.y=parseFloat(r.value);break;case\x2030:t.insertionPoint.z=parseFloat(r.value);break;case\x2011:t.alignmentPoint||(t.alignmentPoint={x:0,y:0,z:0}),t.alignmentPoint.x=parseFloat(r.value);break;case\x2021:t.alignmentPoint||(t.alignmentPoint={x:0,y:0,z:0}),t.alignmentPoint.y=parseFloat(r.value);break;case\x2031:t.alignmentPoint||(t.alignmentPoint={x:0,y:0,z:0}),t.alignmentPoint.z=parseFloat(r.value);break;case\x2040:t.height=parseFloat(r.value);break;case\x2041:t.widthFactor=parseFloat(r.value);break;case\x2050:t.rotation=parseFloat(r.value);break;case\x2051:t.obliqueAngle=parseFloat(r.value);break;case\x207:t.style=r.value;break;case\x2071:t.generationFlags=parseInt(r.value,10);break;case\x2072:t.hAlign=parseInt(r.value,10);break;case\x2073:t.vAlign=parseInt(r.value,10);break}return\x20t}function\x20A(a){let\x20t={...l(a),type:\x22MTEXT\x22,text:\x22\x22,insertionPoint:{x:0,y:0,z:0},height:1,width:0,attachmentPoint:1,drawingDirection:1,rotation:0,lineSpacingStyle:1,lineSpacingFactor:1,style:\x22STANDARD\x22,bgFill:0,bgFillScale:1.5},r=[];for(let\x20n\x20of\x20a)switch(n.code){case\x201:r.push(n.value);break;case\x203:r.push(n.value);break;case\x207:t.style=n.value;break;case\x2010:t.insertionPoint.x=parseFloat(n.value);break;case\x2020:t.insertionPoint.y=parseFloat(n.value);break;case\x2030:t.insertionPoint.z=parseFloat(n.value);break;case\x2011:t.textDirection||(t.textDirection={x:0,y:0,z:0}),t.textDirection.x=parseFloat(n.value);break;case\x2021:t.textDirection||(t.textDirection={x:0,y:0,z:0}),t.textDirection.y=parseFloat(n.value);break;case\x2031:t.textDirection||(t.textDirection={x:0,y:0,z:0}),t.textDirection.z=parseFloat(n.value);break;case\x2040:t.height=parseFloat(n.value);break;case\x2041:t.width=parseFloat(n.value);break;case\x2044:t.lineSpacingFactor=parseFloat(n.value);break;case\x2050:t.rotation=parseFloat(n.value);break;case\x2071:t.attachmentPoint=parseInt(n.value,10);break;case\x2072:t.drawingDirection=parseInt(n.value,10);break;case\x2073:t.lineSpacingStyle=parseInt(n.value,10);break;case\x2090:t.bgFill=parseInt(n.value,10);break}return\x20t.text=r.join(\x22\x22),t}function\x20z(a){let\x20t={...l(a),type:\x22INSERT\x22,blockName:\x22\x22,insertionPoint:{x:0,y:0,z:0},scaleX:1,scaleY:1,scaleZ:1,rotation:0,columnCount:1,rowCount:1,columnSpacing:0,rowSpacing:0,attribs:[]};for(let\x20r\x20of\x20a)switch(r.code){case\x202:t.blockName=r.value;break;case\x2010:t.insertionPoint.x=parseFloat(r.value);break;case\x2020:t.insertionPoint.y=parseFloat(r.value);break;case\x2030:t.insertionPoint.z=parseFloat(r.value);break;case\x2041:t.scaleX=parseFloat(r.value);break;case\x2042:t.scaleY=parseFloat(r.value);break;case\x2043:t.scaleZ=parseFloat(r.value);break;case\x2044:t.columnSpacing=parseFloat(r.value);break;case\x2045:t.rowSpacing=parseFloat(r.value);break;case\x2050:t.rotation=parseFloat(r.value);break;case\x2070:t.columnCount=parseInt(r.value,10)||1;break;case\x2071:t.rowCount=parseInt(r.value,10)||1;break}return\x20t}function\x20S(a){let\x20t={...l(a),type:\x22DIMENSION\x22,blockName:\x22\x22,dimStyle:\x22STANDARD\x22,dimType:0,defPoint:{x:0,y:0,z:0},textMidpoint:{x:0,y:0,z:0},textOverride:\x22\x22,rotation:0,textRotation:0,leaderLength:0};for(let\x20r\x20of\x20a)switch(r.code){case\x201:t.textOverride=r.value;break;case\x202:t.blockName=r.value;break;case\x203:t.dimStyle=r.value;break;case\x2010:t.defPoint.x=parseFloat(r.value);break;case\x2020:t.defPoint.y=parseFloat(r.value);break;case\x2030:t.defPoint.z=parseFloat(r.value);break;case\x2011:t.textMidpoint.x=parseFloat(r.value);break;case\x2021:t.textMidpoint.y=parseFloat(r.value);break;case\x2031:t.textMidpoint.z=parseFloat(r.value);break;case\x2013:t.defPoint2||(t.defPoint2={x:0,y:0,z:0}),t.defPoint2.x=parseFloat(r.value);break;case\x2023:t.defPoint2||(t.defPoint2={x:0,y:0,z:0}),t.defPoint2.y=parseFloat(r.value);break;case\x2033:t.defPoint2||(t.defPoint2={x:0,y:0,z:0}),t.defPoint2.z=parseFloat(r.value);break;case\x2014:t.defPoint3||(t.defPoint3={x:0,y:0,z:0}),t.defPoint3.x=parseFloat(r.value);break;case\x2024:t.defPoint3||(t.defPoint3={x:0,y:0,z:0}),t.defPoint3.y=parseFloat(r.value);break;case\x2034:t.defPoint3||(t.defPoint3={x:0,y:0,z:0}),t.defPoint3.z=parseFloat(r.value);break;case\x2015:t.defPoint4||(t.defPoint4={x:0,y:0,z:0}),t.defPoint4.x=parseFloat(r.value);break;case\x2025:t.defPoint4||(t.defPoint4={x:0,y:0,z:0}),t.defPoint4.y=parseFloat(r.value);break;case\x2035:t.defPoint4||(t.defPoint4={x:0,y:0,z:0}),t.defPoint4.z=parseFloat(r.value);break;case\x2016:t.defPoint5||(t.defPoint5={x:0,y:0,z:0}),t.defPoint5.x=parseFloat(r.value);break;case\x2026:t.defPoint5||(t.defPoint5={x:0,y:0,z:0}),t.defPoint5.y=parseFloat(r.value);break;case\x2036:t.defPoint5||(t.defPoint5={x:0,y:0,z:0}),t.defPoint5.z=parseFloat(r.value);break;case\x2040:t.leaderLength=parseFloat(r.value);break;case\x2050:t.rotation=parseFloat(r.value);break;case\x2053:t.textRotation=parseFloat(r.value);break;case\x2070:t.dimType=parseInt(r.value,10);break}return\x20t}function\x20N(a){let\x20t={...l(a),type:\x22HATCH\x22,patternName:\x22\x22,solidFill:!0,associative:!1,hatchStyle:0,patternType:1,patternAngle:0,patternScale:1,boundaryPaths:[]},r=0;for(;r<a.length;){let\x20n=a[r];switch(n.code){case\x202:t.patternName=n.value;break;case\x2041:t.patternScale=parseFloat(n.value);break;case\x2052:t.patternAngle=parseFloat(n.value);break;case\x2070:t.solidFill=n.value===\x221\x22;break;case\x2071:t.associative=n.value===\x221\x22;break;case\x2075:t.hatchStyle=parseInt(n.value,10);break;case\x2076:t.patternType=parseInt(n.value,10);break;case\x2091:{let\x20o=parseInt(n.value,10);r++;for(let\x20c=0;c<o&&r<a.length;c++){let\x20s=W(a,r);t.boundaryPaths.push(s.path),r=s.nextIndex}continue}}r++}return\x20t}function\x20W(a,e){let\x20t=0;return\x20e<a.length&&a[e].code===92&&(t=parseInt(a[e].value,10),e++),(t&2)!==0?X(a,e,t):Y(a,e,t)}function\x20X(a,e,t){let\x20r={type:\x22polyline\x22,vertices:[],bulges:[],flags:t},n=!1;e<a.length&&a[e].code===72&&(n=a[e].value===\x221\x22,e++),e<a.length&&a[e].code===73&&(r.isClosed=a[e].value===\x221\x22,e++);let\x20o=0;e<a.length&&a[e].code===93&&(o=parseInt(a[e].value,10),e++);for(let\x20c=0;c<o&&e<a.length;c++){let\x20s={x:0,y:0};a[e].code===10&&(s.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.y=parseFloat(a[e].value),e++),r.vertices.push(s),n&&e<a.length&&a[e].code===42?(r.bulges.push(parseFloat(a[e].value)),e++):n&&r.bulges.push(0)}for(;e<a.length&&(a[e].code===97||a[e].code===330);)if(a[e].code===97){let\x20c=parseInt(a[e].value,10);e++;for(let\x20s=0;s<c&&e<a.length&&a[e].code===330;s++)e++}else\x20e++;return{path:r,nextIndex:e}}function\x20Y(a,e,t){let\x20r={type:\x22edges\x22,edges:[],flags:t},n=0;e<a.length&&a[e].code===93&&(n=parseInt(a[e].value,10),e++);for(let\x20o=0;o<n&&e<a.length&&a[e].code===72;o++){let\x20c=parseInt(a[e].value,10);switch(e++,c){case\x201:{let\x20s={type:\x22line\x22,start:{x:0,y:0},end:{x:0,y:0}};e<a.length&&a[e].code===10&&(s.start.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.start.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===11&&(s.end.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===21&&(s.end.y=parseFloat(a[e].value),e++),r.edges.push(s);break}case\x202:{let\x20s={type:\x22arc\x22,center:{x:0,y:0},radius:0,startAngle:0,endAngle:360,ccw:!0};e<a.length&&a[e].code===10&&(s.center.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.center.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===40&&(s.radius=parseFloat(a[e].value),e++),e<a.length&&a[e].code===50&&(s.startAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===51&&(s.endAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===73&&(s.ccw=a[e].value===\x221\x22,e++),r.edges.push(s);break}case\x203:{let\x20s={type:\x22ellipse\x22,center:{x:0,y:0},majorAxis:{x:1,y:0},minorRatio:1,startAngle:0,endAngle:Math.PI*2,ccw:!0};e<a.length&&a[e].code===10&&(s.center.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.center.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===11&&(s.majorAxis.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===21&&(s.majorAxis.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===40&&(s.minorRatio=parseFloat(a[e].value),e++),e<a.length&&a[e].code===50&&(s.startAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===51&&(s.endAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===73&&(s.ccw=a[e].value===\x221\x22,e++),r.edges.push(s);break}case\x204:{let\x20s=3,p=[],b=[];e<a.length&&a[e].code===94&&(s=parseInt(a[e].value,10),e++),e<a.length&&a[e].code===73&&e++,e<a.length&&a[e].code===74&&e++;let\x20d=0;e<a.length&&a[e].code===95&&(d=parseInt(a[e].value,10),e++);let\x20x=0;e<a.length&&a[e].code===96&&(x=parseInt(a[e].value,10),e++);for(let\x20f=0;f<d&&e<a.length&&a[e].code===40;f++)p.push(parseFloat(a[e].value)),e++;for(let\x20f=0;f<x&&e<a.length;f++){let\x20y={x:0,y:0};a[e].code===10&&(y.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(y.y=parseFloat(a[e].value),e++),b.push(y)}r.edges.push({type:\x22spline\x22,degree:s,knots:p,controlPoints:b});break}default:break}}for(;e<a.length&&(a[e].code===97||a[e].code===330);)if(a[e].code===97){let\x20o=parseInt(a[e].value,10);e++;for(let\x20c=0;c<o&&e<a.length&&a[e].code===330;c++)e++}else\x20e++;return{path:r,nextIndex:e}}function\x20L(a){let\x20t={...l(a),type:\x22POINT\x22,position:{x:0,y:0,z:0}};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.position.x=parseFloat(r.value);break;case\x2020:t.position.y=parseFloat(r.value);break;case\x2030:t.position.z=parseFloat(r.value);break}return\x20t}function\x20u(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code!==0){e++;continue}let\x20n=r.value;if(n===\x22ENDSEC\x22||n===\x22ENDBLK\x22)return\x20e+1;e++;let\x20o=[];for(;e<a.length&&a[e].code!==0;)o.push(a[e]),e++;switch(n){case\x22LINE\x22:t.push(D(o));break;case\x22CIRCLE\x22:t.push(F(o));break;case\x22ARC\x22:t.push(E(o));break;case\x22LWPOLYLINE\x22:t.push(P(o));break;case\x22ELLIPSE\x22:t.push(w(o));break;case\x22SPLINE\x22:t.push(g(o));break;case\x22TEXT\x22:t.push(I(o));break;case\x22MTEXT\x22:t.push(A(o));break;case\x22INSERT\x22:{let\x20c=z(o);o.some(p=>p.code===66&&p.value===\x221\x22)&&(e=$(a,e,c.attribs)),t.push(c);break}case\x22DIMENSION\x22:t.push(S(o));break;case\x22HATCH\x22:t.push(N(o));break;case\x22POINT\x22:t.push(L(o));break;case\x22POLYLINE\x22:{let\x20c=T(o);e=V(a,e,c.vertices),t.push(c);break}default:break}}return\x20e}function\x20V(a,e,t){for(;e<a.length;){if(a[e].code!==0){e++;continue}let\x20r=a[e].value;if(r===\x22SEQEND\x22)return\x20e+1;if(r===\x22ENDSEC\x22||r===\x22ENDBLK\x22)return\x20e;if(r===\x22VERTEX\x22){e++;let\x20n={x:0,y:0,bulge:0,startWidth:0,endWidth:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x2010:n.x=parseFloat(o.value);break;case\x2020:n.y=parseFloat(o.value);break;case\x2042:n.bulge=parseFloat(o.value);break;case\x2040:n.startWidth=parseFloat(o.value);break;case\x2041:n.endWidth=parseFloat(o.value);break}e++}t.push(n)}else\x20for(e++;e<a.length&&a[e].code!==0;)e++}return\x20e}function\x20$(a,e,t){for(;e<a.length;){if(a[e].code!==0){e++;continue}let\x20r=a[e].value;if(r===\x22SEQEND\x22)return\x20e+1;if(r===\x22ENDSEC\x22||r===\x22ENDBLK\x22)return\x20e;if(r===\x22ATTRIB\x22){e++;let\x20n={tag:\x22\x22,text:\x22\x22,insertionPoint:{x:0,y:0,z:0},height:1,rotation:0,style:\x22STANDARD\x22,layer:\x220\x22,color:256};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x201:n.text=o.value;break;case\x202:n.tag=o.value;break;case\x207:n.style=o.value;break;case\x208:n.layer=o.value;break;case\x2010:n.insertionPoint.x=parseFloat(o.value);break;case\x2020:n.insertionPoint.y=parseFloat(o.value);break;case\x2030:n.insertionPoint.z=parseFloat(o.value);break;case\x2040:n.height=parseFloat(o.value);break;case\x2050:n.rotation=parseFloat(o.value);break;case\x2062:n.color=parseInt(o.value,10);break}e++}t.push(n)}else\x20for(e++;e<a.length&&a[e].code!==0;)e++}return\x20e}function\x20B(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDSEC\x22)return\x20e+1;if(r.code===0&&r.value===\x22BLOCK\x22){e++;let\x20n={name:\x22\x22,basePoint:{x:0,y:0,z:0},entities:[],flags:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x208:break;case\x2010:n.basePoint.x=parseFloat(o.value);break;case\x2020:n.basePoint.y=parseFloat(o.value);break;case\x2030:n.basePoint.z=parseFloat(o.value);break;case\x2070:n.flags=parseInt(o.value,10);break}e++}e=u(a,e,n.entities),n.name&&!n.name.startsWith(\x22*Model_Space\x22)&&!n.name.startsWith(\x22*Paper_Space\x22)&&t.set(n.name,n)}else\x20e++}return\x20e}var\x20C=\x22AutoCAD\x20Binary\x20DXF\x22,U={ANSI_874:\x22windows-874\x22,ANSI_932:\x22shift_jis\x22,ANSI_936:\x22gbk\x22,ANSI_949:\x22euc-kr\x22,ANSI_950:\x22big5\x22,ANSI_1250:\x22windows-1250\x22,ANSI_1251:\x22windows-1251\x22,ANSI_1252:\x22windows-1252\x22,ANSI_1253:\x22windows-1253\x22,ANSI_1254:\x22windows-1254\x22,ANSI_1255:\x22windows-1255\x22,ANSI_1256:\x22windows-1256\x22,ANSI_1257:\x22windows-1257\x22,ANSI_1258:\x22windows-1258\x22},G=\x22AC1021\x22;function\x20K(){return{acadVersion:\x22\x22,insUnits:0,measurement:0,ltScale:1}}function\x20j(a){return\x20a.replace(/\x5c\x5cU\x5c+([0-9A-Fa-f]{4})/g,(e,t)=>String.fromCodePoint(parseInt(t,16)))}function\x20q(a){if(typeof\x20a==\x22string\x22)return\x20j(a);let\x20e=new\x20Uint8Array(a);if(new\x20TextDecoder(\x22ascii\x22).decode(e.slice(0,C.length))===C)throw\x20new\x20i(\x22Binary\x20DXF\x20format\x20is\x20not\x20supported.\x20Please\x20export\x20as\x20ASCII\x20DXF.\x22);let\x20r=new\x20TextDecoder(\x22utf-8\x22).decode(a),o=r.match(/\x5c$ACADVER[\x5cs\x5cS]*?\x5cn\x5cs*1\x5cs*\x5cn\x5cs*(\x5cS+)/)?.[1]??\x22\x22;if(o&&o<G){let\x20s=r.match(/\x5c$DWGCODEPAGE[\x5cs\x5cS]*?\x5cn\x5cs*3\x5cs*\x5cn\x5cs*(\x5cS+)/)?.[1]??\x22\x22,p=U[s]??\x22windows-1252\x22;p!==\x22utf-8\x22&&(r=new\x20TextDecoder(p).decode(a))}return\x20j(r)}function\x20Q(a,e){for(;e<a.length;){if(a[e].code===0&&a[e].value===\x22ENDSEC\x22)return\x20e+1;e++}return\x20e}function\x20Z(a){a.layers.has(\x220\x22)||a.layers.set(\x220\x22,{name:\x220\x22,color:7,lineType:\x22Continuous\x22,flags:0,lineWeight:-3,isOff:!1,isFrozen:!1,isLocked:!1})}function\x20J(a){for(let[,e]of\x20a.layers)e.isOff=e.color<0,e.isOff&&(e.color=Math.abs(e.color)),e.isFrozen=(e.flags&1)!==0,e.isLocked=(e.flags&4)!==0}var\x20i=class\x20extends\x20Error{constructor(t,r){super(t);this.cause=r;this.name=\x22DxfParseError\x22}};function\x20M(a){if(typeof\x20a==\x22string\x22){if(a.length===0)throw\x20new\x20i(\x22Input\x20is\x20empty.\x20Expected\x20a\x20DXF\x20string\x20or\x20ArrayBuffer.\x22)}else\x20if(a\x20instanceof\x20ArrayBuffer){if(a.byteLength===0)throw\x20new\x20i(\x22Input\x20ArrayBuffer\x20is\x20empty.\x22)}else\x20throw\x20new\x20i(\x22Invalid\x20input\x20type.\x20Expected\x20a\x20string\x20or\x20ArrayBuffer.\x22);let\x20e;try{e=q(a)}catch(n){throw\x20n\x20instanceof\x20i?n:new\x20i(\x22Failed\x20to\x20decode\x20DXF\x20input.\x22,n)}let\x20t;try{t=h(e)}catch(n){throw\x20new\x20i(\x22Failed\x20to\x20tokenize\x20DXF\x20content.\x22,n)}if(t.length===0)throw\x20new\x20i(\x22DXF\x20content\x20produced\x20no\x20tokens.\x20The\x20input\x20may\x20not\x20be\x20a\x20valid\x20DXF\x20file.\x22);let\x20r={header:K(),layers:new\x20Map,lineTypes:new\x20Map,styles:new\x20Map,blocks:new\x20Map,entities:[]};try{let\x20n=0;for(;n<t.length;){let\x20o=t[n];if(o.code===0&&o.value===\x22SECTION\x22){if(n++,n>=t.length)break;let\x20c=t[n].value;switch(n++,c){case\x22HEADER\x22:n=m(t,n,r.header);break;case\x22TABLES\x22:n=k(t,n,r);break;case\x22BLOCKS\x22:n=B(t,n,r.blocks);break;case\x22ENTITIES\x22:n=u(t,n,r.entities);break;default:n=Q(t,n);break}}else{if(o.code===0&&o.value===\x22EOF\x22)break;n++}}}catch(n){throw\x20new\x20i(\x22Failed\x20to\x20parse\x20DXF\x20sections.\x22,n)}return\x20Z(r),J(r),r}self.onmessage=a=>{let{type:e,id:t,payload:r}=a.data;if(e===\x22parse\x22)try{let\x20n=M(r);postMessage({type:\x22result\x22,id:t,doc:n})}catch(n){let\x20o=n\x20instanceof\x20Error?n.message:String(n);postMessage({type:\x22error\x22,id:t,message:o})}};})();\x0a'],{'type':'text/javascript'})),this['worker']=new Worker(this['blobUrl']),this['worker']['onmessage']=c=>{const d7=b,{type:d,id:f,doc:g,message:h}=c['data'],i=this['pending']['get'](f);i&&(this['pending']['delete'](f),d==='result'?i['resolve'](this['reviveDocument'](g)):d==='error'&&i['reject'](new Error(h??d7(0xee))));},this['worker'][d8(0xeb)]=c=>{const d9=d8,d=new Error(c['message']??d9(0x228));for(const [,f]of this[d9(0x125)])f['reject'](d);this['pending']['clear'](),this['destroyWorker']();},this['worker']);}[aT(0x1bb)](c){return new Promise((d,f)=>{const db=b,g=this[db(0x168)]++;this['pending']['set'](g,{'resolve':d,'reject':f});let h;try{h=this['getWorker']();}catch(l){this['pending']['delete'](g),f(l instanceof Error?l:new Error(String(l)));return;}const k={'type':'parse','id':g,'payload':c};try{c instanceof ArrayBuffer?h['postMessage'](k,[c]):h['postMessage'](k);}catch(m){this['pending']['delete'](g),f(m instanceof Error?m:new Error(String(m)));}});}['terminate'](){const dc=aT;this['destroyWorker']();const c=new Error(dc(0x21a));for(const [,d]of this[dc(0x125)])d['reject'](c);this[dc(0x125)]['clear']();}['destroyWorker'](){this['worker']&&(this['worker']['terminate'](),this['worker']=null),this['blobUrl']&&(URL['revokeObjectURL'](this['blobUrl']),this['blobUrl']=null);}['reviveDocument'](c){const dd=aT;return{...c,'layers':this['ensureMap'](c[dd(0x15e)]),'lineTypes':this['ensureMap'](c['lineTypes']),'styles':this['ensureMap'](c['styles']),'blocks':this['ensureMap'](c['blocks'])};}['ensureMap'](c){const df=aT;return c instanceof Map?c:c&&typeof c==df(0x222)?new Map(Object['entries'](c)):new Map();}},wa=class{['canvas'];['renderer'];['camera'];['layerManager'];['emitter'];['spatialIndex'];['measureTool'];['doc']=null;['options'];['currentTool'];['inputHandler'];['resizeObserver'];['formatConverters'];['workerManager']=null;['selectedEntityIndex']=-0x1;['renderPending']=!0x1;['destroyed']=!0x1;['loadGeneration']=0x0;[aT(0x149)]=0x0;['mouseScreenY']=0x0;['debugEnabled']=!0x1;['debugOptions'];['lastRenderStats']=null;['lastDebugStats']=null;[aT(0x14f)]=[];[aT(0x137)]=0x0;['lastFrameTime']=0x0;['parseTime']=0x0;['spatialIndexBuildTime']=0x0;['loadedFileName']=null;['loadedFileSize']=0x0;[aT(0x112)]=0x0;constructor(c,d){const dg=aT;this['canvas']=c,this['options']={'theme':d?.['theme']??'dark','backgroundColor':d?.['backgroundColor'],'antialias':d?.['antialias']??!0x0,'minZoom':d?.['minZoom']??0.0001,'maxZoom':d?.['maxZoom']??0x186a0,'zoomSpeed':d?.['zoomSpeed']??1.1,'initialTool':d?.['initialTool']??dg(0x16a)},this[dg(0x147)]=d?.[dg(0x147)]??[],d?.['worker']&&(this['workerManager']=new Pa()),d?.['debug']?(this['debugEnabled']=!0x0,this['debugOptions']=ne(typeof d['debug']=='boolean'?void 0x0:d['debug'])):this['debugOptions']=ne(),this['renderer']=new na(c),this['camera']=new yt(this['options']),this['layerManager']=new ca(),this['emitter']=new ha(),this[dg(0x1e2)]=new fa(),this[dg(0xff)]=new xa(),this['currentTool']=this['options']['initialTool'],this['inputHandler']=new ua(c,this),this['resizeObserver']=new ResizeObserver(()=>this['resize']()),this['resizeObserver']['observe'](c),c['style']['cursor']=this['getCursorForTool'](this[dg(0x118)]),this['requestRender'](),this['debugEnabled']&&this['startDebugLoop']();}[aT(0x1ca)](){const dh=aT;if(this[dh(0x156)])throw new Error('CadViewer:\x20cannot\x20call\x20methods\x20on\x20a\x20destroyed\x20instance.');}async['runConverters'](c){const di=aT;for(const d of this['formatConverters']){let f=!0x1;try{f=d[di(0x15d)](c);}catch{continue;}if(f)return d['convert'](c);}return null;}async[aT(0x159)](c){const dj=aT;this['guardDestroyed']();const d=++this[dj(0x1f5)];this[dj(0x13c)]=c['name'],this[dj(0x14a)]=c['size'];const f=await c['arrayBuffer']();if(this['destroyed']||d!==this['loadGeneration'])return;const g=await this['runConverters'](f);if(this['destroyed']||d!==this['loadGeneration'])return;const h=performance['now'](),i=g??f;this['doc']=await this[dj(0x162)](i,d),!(this['destroyed']||d!==this['loadGeneration'])&&(this['parseTime']=performance['now']()-h,this['onDocumentLoaded']());}async['loadBuffer'](c){const dk=aT;this['guardDestroyed']();const d=++this[dk(0x1f5)];this['loadedFileName']=null,this['loadedFileSize']=c['byteLength'];const f=await this['runConverters'](c);if(this['destroyed']||d!==this['loadGeneration'])return;const g=performance['now'](),h=f??c;this['doc']=await this['parseWithOptionalWorker'](h,d),!(this['destroyed']||d!==this['loadGeneration'])&&(this['parseTime']=performance['now']()-g,this['onDocumentLoaded']());}async['parseWithOptionalWorker'](c,d){if(!this['workerManager'])return ae(c);try{return await this['workerManager']['parse'](c);}catch(f){if(this['destroyed']||d!==this['loadGeneration'])return null;throw f;}}['loadDocument'](c){const dl=aT;if(this['guardDestroyed'](),++this[dl(0x1f5)],this['loadedFileName']=null,this['loadedFileSize']=0x0,this[dl(0xf3)]=0x0,!c||!Array['isArray'](c['entities'])||!(c['layers']instanceof Map))throw new Error('CadViewer:\x20invalid\x20DxfDocument\x20—\x20expected\x20entities\x20array\x20and\x20layers\x20Map.');this['doc']=c,this[dl(0x217)]();}[aT(0x129)](c){const dm=aT;this[dm(0x1ca)](),++this['loadGeneration'],this[dm(0x13c)]=null,this[dm(0x14a)]=c[dm(0x206)];const d=performance['now']();this['doc']=ae(c),this['parseTime']=performance['now']()-d,this[dm(0x217)]();}['loadArrayBuffer'](c){const dn=aT;this['guardDestroyed'](),++this['loadGeneration'],this['loadedFileName']=null,this['loadedFileSize']=c['byteLength'];const d=performance['now']();this[dn(0x193)]=ae(c),this['parseTime']=performance['now']()-d,this['onDocumentLoaded']();}['clearDocument'](){const dp=aT;this['guardDestroyed'](),++this['loadGeneration'],this['doc']=null,this['selectedEntityIndex']=-0x1,this['spatialIndex']['clear'](),ve(),this['layerManager']['clear'](),this[dp(0xff)]['deactivate'](),this['requestRender']();}[aT(0x217)](){const dq=aT;if(!this[dq(0x193)])return;this['layerManager']['setLayers'](this['doc'][dq(0x15e)]);const c=performance['now']();this['spatialIndex']['build'](this['doc']['entities'],this['doc']),_t(Ot(this[dq(0x193)])),this['spatialIndexBuildTime']=performance['now']()-c,this['selectedEntityIndex']=-0x1,this[dq(0xff)]['deactivate'](),this['currentTool']===dq(0x1bd)&&this['measureTool']['activate'](),this['fitToView']();}['fitToView'](){const dr=aT;if(this['guardDestroyed'](),!this['doc'])return;const c=this['computeDocumentBounds']();if(!c)return;const d=this['canvas']['getBoundingClientRect']();this['camera']['setTransform'](xt(d['width'],d[dr(0x1cb)],c['minX'],c['minY'],c['maxX'],c['maxY'])),this['requestRender'](),this['emitter'][dr(0xe8)]('viewchange',this['camera']['getTransform']());}[aT(0x1a4)](c){const ds=aT;this['guardDestroyed']();const d=this['canvas']['getBoundingClientRect'](),f=d['width']/0x2,g=d['height']/0x2,h=c/this[ds(0x1fa)]['getTransform']()['scale'];this['camera']['zoom'](f,g,h),this['requestRender'](),this[ds(0xf7)]['emit'](ds(0x1be),this['camera']['getTransform']());}['panTo'](c,d){const du=aT;this['guardDestroyed']();const f=this[du(0x113)][du(0x218)](),g=this['camera'][du(0x101)](),h=c*g[du(0x18c)]+g['offsetX'],k=-d*g[du(0x18c)]+g['offsetY'],l=f['width']/0x2-h,m=f[du(0x1cb)]/0x2-k;this['camera'][du(0x16a)](l,m),this[du(0xe2)](),this['emitter']['emit']('viewchange',this['camera']['getTransform']());}['getViewTransform'](){const dv=aT;return{...this[dv(0x1fa)]['getTransform']()};}['getZoomSpeed'](){return this['options']['zoomSpeed'];}[aT(0x163)](){return this['layerManager']['getAllLayers']();}['setLayerVisible'](c,d){this['guardDestroyed'](),this['layerManager']['setVisible'](c,d),this['requestRender']();}['setLayerColor'](c,d){this['guardDestroyed'](),this['layerManager']['setColorOverride'](c,d),this['requestRender']();}['setTheme'](c){const dw=aT;this['guardDestroyed'](),this['options'][dw(0xd5)]=c,this['requestRender']();}['getTheme'](){return this['options']['theme'];}['setBackgroundColor'](c){this['guardDestroyed'](),this['options']['backgroundColor']=c,this['requestRender']();}['setTool'](c){const dx=aT;this['guardDestroyed'](),this[dx(0x118)]==='measure'&&c!=='measure'&&this[dx(0xff)]['deactivate'](),this['currentTool']=c,this[dx(0x113)]['style'][dx(0x1e6)]=this['getCursorForTool'](c),c==='measure'&&this['measureTool']['activate'](),c!=='select'&&(this['selectedEntityIndex']=-0x1),this['requestRender']();}['getTool'](){return this['currentTool'];}['getCursorForTool'](c){switch(c){case'pan':return'grab';case'select':return'crosshair';case'measure':return'crosshair';}}['on'](c,d){this['emitter']['on'](c,d);}['off'](c,d){this['emitter']['off'](c,d);}['getDocument'](){return this['doc'];}['getEntities'](){const dy=aT;return this['doc']?.[dy(0x15a)]??[];}['resize'](){this['renderer']['updateSize'](),this['requestRender']();}[aT(0x111)](){const dz=aT;this['destroyed']=!0x0,this['stopDebugLoop'](),this['inputHandler'][dz(0x111)](),this['resizeObserver']['disconnect'](),this['renderer']['destroy'](),this['emitter']['removeAllListeners'](),this['spatialIndex']['clear'](),ve(),this['layerManager']['clear'](),this[dz(0x1e3)]?.['terminate'](),this['workerManager']=null,this['doc']=null;}['requestRender'](){const dA=aT;if(!this[dA(0x156)]){if(this[dA(0x112)]){this['doRender']();return;}this[dA(0xde)]||(this['renderPending']=!0x0,requestAnimationFrame(()=>{this['renderPending']=!0x1,!this['destroyed']&&this['doRender']();}));}}['doRender'](){const dB=aT;if(!this[dB(0x193)]){this['renderer']['renderEmpty'](this['options']['theme']);return;}const d=this[dB(0x1fa)]['getTransform'](),f=this['renderer']['getWidth'](),g=this['renderer']['getHeight'](),k=this['computeViewportBounds'](d,f,g),m=this['spatialIndex'][dB(0xd6)](k['minX'],k['minY'],k['maxX'],k['maxY']),p=new Set();for(let x=0x0;x<m[dB(0x206)];x++)p['add'](m[x][dB(0x200)]);const u=performance['now'](),v=this['renderer']['render'](this['doc'],d,this['options']['theme'],this[dB(0x1aa)]['getVisibleLayerNames'](),this['selectedEntityIndex'],p,this['spatialIndex']['getEntityBBoxes']());this['lastFrameTime']=performance[dB(0x148)]()-u,this['lastRenderStats']=v;const w=performance['now']();for(w-this['lastDoRenderTime']>=0x3&&this['frameTimestamps']['push'](w),this['lastDoRenderTime']=w;this['frameTimestamps']['length']>0x0&&this['frameTimestamps'][0x0]<w-0x3e8;)this['frameTimestamps'][dB(0x105)]();if(this['currentTool']==='measure'&&this['measureTool']['state']['phase']!=='idle'){const z=this['renderer']['getContext']();ka(z,this['camera']['getTransform'](),this['measureTool'],this['mouseScreenX'],this[dB(0x175)],this['options']['theme']);}if(this['debugEnabled']){const A=this['renderer']['getContext'](),C=this['buildDebugStats']();this['lastDebugStats']=C,la(A,C,this['options']['theme'],this['debugOptions'],this['renderer']['getWidth'](),this[dB(0xea)]['getHeight']());}}[aT(0x21b)](c){const dC=aT;this[dC(0x1ca)](),typeof c==dC(0x1ec)?this['debugEnabled']=c:(this['debugEnabled']=!0x0,this['debugOptions']=ne(c)),this['debugEnabled']?this['startDebugLoop']():(this['stopDebugLoop'](),this[dC(0xe2)]());}['startDebugLoop'](){const dE=aT;if(this['debugRafId'])return;const c=()=>{const dD=b;if(!this[dD(0x1bf)]||this['destroyed']){this['debugRafId']=0x0;return;}this[dD(0x189)](),this['debugRafId']=requestAnimationFrame(c);};this[dE(0x112)]=requestAnimationFrame(c);}['stopDebugLoop'](){this['debugRafId']&&(cancelAnimationFrame(this['debugRafId']),this['debugRafId']=0x0);}[aT(0x1a7)](){return this['debugEnabled']?this['lastDebugStats']:null;}[aT(0x126)](){const dF=aT,c=this['camera']['getTransform'](),d=this['renderer']['getWidth'](),f=this['renderer']['getHeight'](),g=this['computeViewportBounds'](c,d,f);return{'fps':this['frameTimestamps']['length'],'frameTime':this['lastFrameTime'],'renderStats':this['lastRenderStats']??{'entitiesDrawn':0x0,'entitiesSkipped':0x0,'drawCalls':0x0,'byType':{}},'entityCount':this['doc']?.['entities'][dF(0x206)]??0x0,'layerCount':this['doc']?.[dF(0x15e)]['size']??0x0,'visibleLayerCount':this['layerManager']['getVisibleLayerNames']()['size'],'blockCount':this['doc']?.['blocks']['size']??0x0,'parseTime':this['parseTime'],'spatialIndexBuildTime':this['spatialIndexBuildTime'],'totalLoadTime':this['parseTime']+this[dF(0xd7)],'zoom':c['scale'],'pixelSize':c['scale']>0x0?0x1/c['scale']:0x0,'viewportBounds':g,'fileName':this['loadedFileName'],'fileSize':this['loadedFileSize'],'dxfVersion':this['doc']?.['header'][dF(0x1c3)]??null};}['computeViewportBounds'](c,d,f){const dG=aT,[g,h]=q(c,0x0,f),[k,l]=q(c,d,0x0);return{'minX':Math[dG(0x1ea)](g,k),'minY':Math['min'](h,l),'maxX':Math['max'](g,k),'maxY':Math['max'](h,l)};}['handlePan'](c,d){const dH=aT;this['camera'][dH(0x16a)](c,d),this['requestRender'](),this['emitter']['emit']('viewchange',this['camera']['getTransform']());}[aT(0x21e)](c,d,f){const dI=aT;this['camera'][dI(0x1a5)](c,d,f),this['requestRender'](),this['emitter'][dI(0xe8)]('viewchange',this['camera'][dI(0x101)]());}['handleClick'](c,d){const dJ=aT;if(!this['doc'])return;const f=this[dJ(0x1fa)]['getTransform'](),[g,h]=q(f,c,d);switch(this[dJ(0x118)]){case'select':this['handleSelect'](g,h,c,d);break;case dJ(0x1bd):{const k=ke(g,h,this['doc']['entities'],this[dJ(0x1e2)],f[dJ(0x18c)]),l=k[dJ(0x206)]>0x0?k[0x0]:null,m=this['measureTool']['handleClick'](g,h,l);this[dJ(0xe2)](),m&&this['emitter']['emit']('measure',m);break;}}}['handleMouseMove'](c,d){const dK=aT;if(this['mouseScreenX']=c,this['mouseScreenY']=d,this['currentTool']==='measure'&&this['doc']){const f=this['camera'][dK(0x101)](),[g,h]=q(f,c,d),i=ke(g,h,this['doc']['entities'],this['spatialIndex'],f[dK(0x18c)]);this['measureTool']['handleMove'](i[0x0]??null),this[dK(0xe2)]();}}['handleSelect'](c,d,f,g){if(!this['doc'])return;const h=pa(c,d,this['doc']['entities'],this['spatialIndex'],this['layerManager']['getVisibleLayerNames'](),this['camera']['getTransform']()['scale']);if(this['selectedEntityIndex']=h,this['requestRender'](),h>=0x0&&this['doc']){const i=this['doc']['entities'][h];i&&this['emitter']['emit']('select',{'entity':i,'entityIndex':h,'worldPoint':{'x':c,'y':d},'screenPoint':{'x':f,'y':g}});}}['computeDocumentBounds'](){const dL=aT;return this['doc']?this[dL(0x193)]['header'][dL(0x1df)]&&this['doc']['header']['extMax']?{'minX':this['doc']['header']['extMin']['x'],'minY':this[dL(0x193)]['header']['extMin']['y'],'maxX':this[dL(0x193)]['header']['extMax']['x'],'maxY':this['doc']['header'][dL(0x21f)]['y']}:Rt(this['doc']['entities']):null;}};export{wa as CadViewer,yt as Camera,na as CanvasRenderer,T as DxfParseError,ha as EventEmitter,ca as LayerManager,xa as MeasureTool,fa as SpatialIndex,E as THEMES,Ft as aciToHex,me as applyTransform,Rt as computeEntitiesBounds,B as computeEntityBBox,J as drawEntity,ke as findSnaps,xt as fitToView,pa as hitTest,ae as parseDxf,la as renderDebugOverlay,ka as renderMeasureOverlay,se as resolveEntityColor,q as screenToWorld,W as worldToScreen,kt as zoomAtPoint};