@mlightcad/cad-simple-viewer-cli 1.6.1 → 1.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,863 @@
1
+ import{C as na,z as oa,g as Ot,u as L,b as ct,a as P,m as ia,c as H,G as la,d as sa,D as ca,B as da,I as ua,R as ie,y as ma,P as le,e as pa,L as ha,f as fa,M as ga,A as wa,h as ba,i as Qt,j as xa,k as He,S as va,l as ya,n as La,o as ka,p as Aa,q as Ca,r as Yt,s as Ma,t as Ia,v as za,w as Oa,x as Sa,E as Pa,F as Ra,H as Ea,J as Na,K as _a,N as Ta,O as Ua,Q as $a,T as Va,U as Ha,V as Za,W as ja,X as Ba,Y as Fa,Z,_ as Lt,$ as Ze,a0 as Da,a1 as ht,a2 as Qa,a3 as Ya,a4 as Xa,a5 as Ga}from"./index-BAGroFfI.js";import{a6 as oi,a7 as ii}from"./index-BAGroFfI.js";function ft(...t){return`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 1024 1024">${t.map(a=>`<path fill="currentColor" d="${a}"/>`).join("")}</svg>`}const Wa='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M10.4379 15.2979h.002l4.86-4.86-9.722-4.86 4.86 9.72Zm7.562-5.298-3.434 3.434 3.2 3.2-1.132 1.132-3.2-3.2-3.434 3.434-7.6-15.6 15.6 7.6Z"/></svg>',Ka='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M15.08 12.8537l.002-.002V5.5897c0-.422-.652-.414-.652 0v3.466c0 .938-1.482.95-1.482 0v-4.83c0-.414-.6381-.414-.6381 0h-.014v4.83c.014.95-1.482.95-1.482 0V3.4437c0-.42-.638-.414-.638 0v5.612c0 .95-1.494.95-1.494 0V4.2317c0-.408-.64-.42-.64 0v6.756c0 .802-1.094 1.088-1.494.388-.26-.446-.518-.892-.776-1.338-.338-.482-1.1-.15-.794.38.326.566.652 1.132.978 1.698.006.012.014.026.02.04.552.946 1.106 1.89 1.658 2.834.19.3.422.578.666.802h-.006c.672.61 1.528.964 2.418 1.052.888.06 1.7921-.124 2.5601-.612.3-.19.572-.416.816-.68.326-.368.57-.776.734-1.204.176-.482.258-.97.258-1.494Zm-.91-8.608-.004-.002c.958-.38 2.058.244 2.058 1.346v7.266c0 .652-.108 1.29-.332 1.894-.216.564-.53 1.114-.964 1.576-.318.34-.666.632-1.046.884-.978.612-2.1461.862-3.2601.774-1.128-.102-2.228-.564-3.098-1.352-.326-.292-.612-.646-.87-1.034-.558-.96-1.114-1.92-1.672-2.88l-.012-.028c-.326-.568-.652-1.138-.978-1.706-.59-1.018.068-2.186 1.156-2.336.536-.074 1.126.116 1.562.72.026.028.04.062.054.096.04.074.082.146.122.218V4.2337c0-1.176 1.244-1.788 2.202-1.278.42-1.278 2.378-1.264 2.792-.014.9721-.51 2.2221.102 2.2221 1.284v.06c.022-.014.046-.026.068-.04Z"/></svg>',qa='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M9.3333 14.125 5.875 10.6667V14.125H9.3333Zm4.7917-3.4583-3.4583 3.4583H14.125V10.6667ZM10.6667 5.875 14.125 9.3333V5.875H10.6667ZM5.875 9.3333 9.3333 5.875H5.875V9.3333Zm9.2083 5.475c1.2333-1.3 1.9083-3.0333 1.9083-4.825-.0083-3.325-2.35-6.1833-5.6083-6.8417C8.125 2.4833 4.85 4.2 3.55 7.2583c-1.3 3.0583-.275 6.6083 2.4583 8.5 2.725 1.8917 6.4167 1.6 8.8167-.6917.0917-.0833.175-.175.2583-.2583Zm1.2583.5917 2.575 2.575c-.3167.3167-.625.625-.9417.9417-.8583-.8583-1.7167-1.7167-2.575-2.575-3.4083 2.9-8.4917 2.5917-11.525-.6917S.9417 7.275 4.1083 4.1083C7.2667.9417 12.3667.8417 15.65 3.875s3.5917 8.1167.6917 11.525Z"/></svg>',Ja='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M15.0833 14.8083c1.2333-1.3 1.9083-3.0333 1.9083-4.825-.0083-3.325-2.35-6.1833-5.6083-6.8417C8.125 2.4833 4.85 4.2 3.55 7.2583c-1.3 3.0583-.275 6.6083 2.4583 8.5 2.725 1.8917 6.4167 1.6 8.8167-.6917.0917-.0833.175-.175.2583-.2583Zm1.2583.5917 2.575 2.575c-.3167.3167-.625.625-.9417.9417-.8583-.8583-1.7167-1.7167-2.575-2.575-3.4083 2.9-8.4917 2.5917-11.525-.6917C.8417 12.3667.9417 7.275 4.1083 4.1083 7.2667.9417 12.3667.8417 15.65 3.875s3.5917 8.1167.6917 11.525Zm-3.55-2.6083V7.2083H7.2083v5.5833h5.5833ZM5.875 5.875h8.25v8.25H5.875V5.875Z"/></svg>',tr='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 512 512"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="m434.8 137.65l-149.36-68.1c-16.19-7.4-42.69-7.4-58.88 0L77.3 137.65c-17.6 8-17.6 21.09 0 29.09l148 67.5c16.89 7.7 44.69 7.7 61.58 0l148-67.5c17.52-8 17.52-21.1-.08-29.09M160 308.52l-82.7 37.11c-17.6 8-17.6 21.1 0 29.1l148 67.5c16.89 7.69 44.69 7.69 61.58 0l148-67.5c17.6-8 17.6-21.1 0-29.1l-79.94-38.47"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="m160 204.48l-82.8 37.16c-17.6 8-17.6 21.1 0 29.1l148 67.49c16.89 7.7 44.69 7.7 61.58 0l148-67.49c17.7-8 17.7-21.1.1-29.1L352 204.48"/></svg>',er='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="2" y="2" width="8.2" height="5" rx="1.2" fill="currentColor"/><rect x="2" y="8.5" width="8.2" height="9.5" rx="1.2" fill="currentColor"/><rect x="11.7" y="2" width="6.3" height="10" rx="1.2" fill="currentColor"/><rect x="11.7" y="13.5" width="6.3" height="4.5" rx="1.2" fill="currentColor"/></svg>',ar='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" fill-rule="evenodd" d="M1.5 7h17v6h-17ZM4.25 7h1v2.5h-1ZM7.5 7h.75v1.5H7.5ZM10.25 7h1v2.5h-1ZM13.5 7h.75v1.5H13.5ZM16.25 7h1v2.5h-1Z"/></svg>',rr='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M3.75 9.25h12.5v1.5H3.75v-1.5ZM2.25 6.5h1.5v7h-1.5v-7ZM16.25 6.5h1.5v7h-1.5v-7Z"/></svg>',nr='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><polygon fill="currentColor" points="5.74 7.13 7 9.5 4.15 7.72 3.2 7.12 3 7 7 4.5 6.17 6.05 5.67 7 5.74 7.13"/><polygon fill="currentColor" points="16 12.5 13.5 16.5 12.66 15.15 11.92 13.97 11 12.5 12 13.03 12.98 13.55 13.5 13.83 16 12.5"/><rect fill="currentColor" x="2" y="2.5" width="1" height="15"/><rect fill="currentColor" x="3" y="16.5" width="15" height="1"/><path fill="currentColor" d="M14,13c0,.18,0,.37,0,.55v0a6.82,6.82,0,0,1-.32,1.57l-.74-1.18L13,13.5c0-.14,0-.31,0-.47v0a6,6,0,0,0-6-6,6.74,6.74,0,0,0-1.26.13l-.29.07a5.61,5.61,0,0,0-1.3.52l-1-.6a7.07,7.07,0,0,1,2-.88,6.78,6.78,0,0,1,1-.19A7.7,7.7,0,0,1,7,6a7,7,0,0,1,7,7Z"/></svg>',or='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" fill-rule="evenodd" d="M4 4h12v12H4V4Zm1.5 1.5v9h9v-9h-9Z"/><circle fill="currentColor" cx="4" cy="4" r="1.5"/><circle fill="currentColor" cx="16" cy="4" r="1.5"/><circle fill="currentColor" cx="4" cy="16" r="1.5"/><circle fill="currentColor" cx="16" cy="16" r="1.5"/></svg>',ir='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M2 16A10 10 0 0 0 18 16h-1.5A8.5 8.5 0 0 1 3.5 16H2Z"/><circle fill="currentColor" cx="2" cy="16" r="1.5"/><circle fill="currentColor" cx="10" cy="12.2" r="1.5"/><circle fill="currentColor" cx="18" cy="16" r="1.5"/></svg>',lr='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M9.25 2h1.5v5.25H16v1.5h-5.25V16h-1.5v-7.25H4v-1.5h5.25V2Z"/><circle fill="currentColor" cx="10" cy="10" r="1.75"/></svg>',je='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 512 512" fill="currentColor" aria-hidden="true"><path d="M 459.5 0 L 475.5 0 L 476.5 1 L 479.5 1 L 485.5 3 Q 487.8 6.2 492.5 7 L 501 14.5 L 505 19.5 L 511 32.5 Q 510.2 35.8 512 36.5 L 512 52.5 L 511 53.5 L 511 56.5 L 509 62.5 L 506 68.5 L 493 89.5 L 483 108.5 L 478 115.5 L 472 127.5 L 467 134.5 L 457 153.5 L 452 160.5 L 442 179.5 L 437 186.5 L 431 198.5 L 440 213.5 L 440 215.5 L 443 220.5 L 447 232.5 L 448 240.5 L 449 241.5 L 449 245.5 L 450 246.5 L 450 254.5 L 451 255.5 L 451 274.5 L 450 275.5 L 450 283.5 L 449 284.5 L 449 289.5 L 448 290.5 L 448 294.5 L 447 295.5 L 446 302.5 L 442 314.5 L 438 322.5 L 438 324.5 L 428 345.5 L 428 347.5 L 425 352.5 L 422 361.5 L 418 368.5 L 418 370.5 L 415 375.5 L 412 384.5 L 408 391.5 L 408 393.5 L 405 398.5 L 402 407.5 L 398 414.5 L 395 423.5 L 391 430.5 L 391 432.5 L 381 453.5 L 381 455.5 L 378 460.5 L 375 469.5 L 371 476.5 L 368 485.5 L 361.5 497 L 353.5 501 L 348.5 501 L 347.5 500 L 344.5 500 L 329.5 495 L 326.5 493 L 321.5 492 L 318.5 490 L 303.5 485 L 289.5 478 L 287.5 478 L 282 473.5 L 279 467.5 L 279 459.5 L 280 458.5 L 280 455.5 L 281 454.5 L 281 451.5 L 282 450.5 L 283 442.5 L 284 441.5 L 286 431.5 L 285.5 431 L 281.5 435 L 259.5 455 L 255.5 457 L 246.5 457 L 223.5 444 L 189.5 421 L 155.5 394 L 133 373.5 L 130 367.5 L 130 359.5 L 134 352.5 L 223 233.5 L 242 206.5 L 254.5 192 L 271.5 177 L 285.5 168 L 299.5 161 L 314.5 156 L 317.5 156 L 318.5 155 L 330.5 154 L 331.5 153 L 352.5 153 L 354 151.5 L 356 146.5 L 372 120.5 L 374 115.5 L 387 94.5 L 397 75.5 L 402 68.5 L 408 56.5 L 413 49.5 L 423 30.5 L 431 17.5 L 439.5 9 L 449.5 3 L 455.5 1 L 458.5 1 L 459.5 0 Z M 466 30 L 459 33 L 454 39 L 448 51 L 443 58 L 433 77 L 428 84 L 414 110 L 409 117 L 407 122 L 405 124 L 403 129 L 401 131 L 399 136 L 384 161 L 386 162 L 388 162 L 396 166 L 409 175 L 422 153 L 424 148 L 429 141 L 431 136 L 433 134 L 435 129 L 437 127 L 439 122 L 444 115 L 454 96 L 459 89 L 469 70 L 474 63 L 482 47 L 482 43 L 480 38 L 475 32 L 469 30 L 466 30 Z M 333 183 L 332 184 L 328 184 L 327 185 L 324 185 L 323 186 L 320 186 L 314 188 L 300 195 L 286 205 L 271 220 L 267 225 L 266 228 L 410 310 L 412 307 L 412 305 L 416 296 L 418 285 L 419 284 L 419 279 L 420 278 L 420 252 L 419 251 L 419 246 L 417 241 L 417 238 L 411 224 L 402 211 L 389 198 L 371 188 L 362 185 L 352 184 L 351 183 L 333 183 Z M 248 252 L 195 322 L 193 326 L 172 353 L 167 361 L 194 384 L 228 409 L 249 422 L 256 417 L 303 372 L 310 368 L 318 368 L 322 370 L 328 378 Q 327 381 329 382 L 329 386 L 326 395 L 326 399 L 323 408 L 323 411 L 322 412 L 322 416 L 319 425 L 319 428 L 318 429 L 318 432 L 317 433 L 317 437 L 314 446 L 314 449 L 313 450 L 313 453 L 312 454 L 316 456 L 318 456 L 331 462 L 343 466 L 351 448 L 351 446 L 354 441 L 354 439 L 357 434 L 357 432 L 364 418 L 364 416 L 367 411 L 367 409 L 370 404 L 370 402 L 377 388 L 377 386 L 380 381 L 380 379 L 383 374 L 383 372 L 387 365 L 390 356 L 393 351 L 393 349 L 396 344 L 397 339 L 375 326 L 373 324 L 368 322 L 366 320 L 361 318 L 354 313 L 349 311 L 347 309 L 342 307 L 340 305 L 335 303 L 321 294 L 316 292 L 314 290 L 309 288 L 307 286 L 302 284 L 295 279 L 276 269 L 248 252 Z "/><path d="M 170.5 100 L 179.5 100 Q 185 102 188 106.5 L 190 110.5 L 190 134.5 L 184.5 142 L 177.5 145 L 171.5 145 L 166.5 143 L 162 138.5 L 159 129.5 L 159 115.5 L 160 114.5 Q 159.2 109.7 161 107.5 L 166.5 102 L 170.5 100 Z "/><path d="M 131.5 140 L 151.5 140 L 156.5 142 L 162 147.5 L 164 151.5 L 164 159.5 L 163 162.5 L 158.5 168 L 152.5 171 L 130.5 171 L 124.5 168 L 122 165.5 L 119 159.5 L 119 151.5 Q 121.3 145.3 126.5 142 L 131.5 140 Z "/><path d="M 197.5 140 L 218.5 140 L 223.5 142 L 228 146.5 L 231 152.5 L 231 158.5 L 229 163.5 L 223.5 169 L 218.5 171 L 197.5 171 L 192.5 169 L 188 164.5 L 186 160.5 L 185 153.5 L 188 146.5 L 191.5 143 L 197.5 140 Z "/><path d="M 171.5 166 L 177.5 166 L 180.5 167 L 187 171.5 L 190 176.5 L 190 200.5 Q 188 206 183.5 209 L 179.5 211 L 173.5 212 L 167.5 210 L 161 203.5 Q 159.2 201.3 160 196.5 L 159 195.5 L 159 181.5 L 162 172.5 L 165.5 169 L 171.5 166 Z "/><path d="M 50.5 223 L 60.5 223 L 68 228.5 L 71 234.5 L 71 256.5 Q 69.1 262.6 64.5 266 L 59.5 268 L 51.5 268 Q 45.3 265.7 42 260.5 L 40 255.5 L 40 235.5 L 42 230.5 L 48.5 224 L 50.5 223 Z "/><path d="M 13.5 263 L 30.5 263 Q 31.5 265 35.5 264 L 43 270.5 L 45 274.5 L 45 282.5 Q 43.1 288.6 38.5 292 L 33.5 294 L 10.5 294 Q 5 292 2 287.5 L 0 283.5 L 0 274.5 Q 2.3 268.3 7.5 265 L 13.5 263 Z "/><path d="M 80.5 263 L 97.5 263 L 103.5 265 L 108 268.5 L 111 273.5 L 112 279.5 L 109 287.5 L 104.5 292 L 100.5 294 L 77.5 294 Q 71.3 291.7 68 286.5 L 66 281.5 L 66 276.5 L 69 269.5 L 72.5 266 L 80.5 263 Z "/><path d="M 54.5 289 L 61.5 290 L 69 296.5 L 71 301.5 L 71 322.5 L 69 327.5 L 63.5 333 L 58.5 335 L 53.5 335 L 46.5 332 L 43 328.5 L 40 321.5 L 40 302.5 Q 41.8 301.8 41 298.5 L 46.5 292 L 54.5 289 Z "/><path d="M 98.5 400 L 107.5 402 L 113 407.5 L 115 411.5 L 115 434.5 Q 112.7 440.7 107.5 444 L 101.5 446 L 96.5 446 L 90.5 443 L 87 439.5 L 84 430.5 L 84 415.5 L 85 414.5 Q 84.3 410.3 86 408.5 L 92.5 402 L 98.5 400 Z "/><path d="M 55.5 441 L 77.5 441 L 80.5 442 L 86 446.5 L 89 451.5 L 89 460.5 Q 86.7 466.7 81.5 470 L 76.5 472 L 56.5 472 L 51.5 470 L 46 464.5 L 44 460.5 L 44 452.5 L 45 449.5 L 49.5 444 L 55.5 441 Z "/><path d="M 121.5 441 L 144.5 441 Q 150.7 443.3 154 448.5 L 156 453.5 L 156 458.5 L 154 464.5 L 148.5 470 L 146.5 470 L 143.5 472 L 122.5 472 L 116.5 469 L 113 465.5 L 111 461.5 L 110 455.5 Q 112 454.5 111 450.5 L 117.5 443 L 121.5 441 Z "/><path d="M 96.5 467 L 103.5 467 L 106.5 468 L 113 473.5 L 115 478.5 L 115 501.5 Q 113 507 108.5 510 L 104.5 512 L 95.5 512 Q 89.3 509.7 86 504.5 Q 84.3 502.7 85 498.5 L 84 497.5 L 84 482.5 L 87 473.5 L 91.5 469 L 96.5 467 Z "/></svg>',sr=je,cr='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20" fill="none" style="fill:none"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M12.4 3.25H5.5A2.25 2.25 0 0 0 3.25 5.5v9A2.25 2.25 0 0 0 5.5 16.75h9A2.25 2.25 0 0 0 16.75 14.5V8.6"/><g transform="rotate(45 13.2 6.7)"><rect x="11.7" y="1.55" width="3" height="7.45" rx="1.45"/><path d="M11.7 3.2h3"/><path d="M11.7 9 13.2 12.15 14.7 9"/><rect x="12.8" y="7.05" width="0.8" height="1.2" rx="0.4"/></g></g></svg>',dr='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 40 40"><path d="M35.29108325386048,15C37.125226253860475,12.309847399999999,36.958467253860476,9.335468299999999,34.79083925386047,7.0296237C32.62321825386047,4.53162557,29.455148253860475,4.33947164,27.120786253860473,6.4531626C24.953160253860474,4.53162512,21.951835253860473,4.53162512,19.950952253860475,6.4531626C17.783325253860475,4.53162512,14.782001253860473,4.53162512,12.781115753860474,6.4531626C10.446751353860474,4.3394711,7.111944153860474,4.53162512,4.944319853860474,7.0296228C2.9434360238604738,9.335468299999999,2.7767065138604736,12.3098459,4.610849853860474,15C2.9434466638604735,17.497998000000003,2.9434466638604735,22.694155,4.610849853860474,25C2.7767063338604734,27.690151,2.9434360238604738,30.664532,5.111060153860474,32.970377C7.278683453860474,35.468374,10.446751353860474,35.660526000000004,12.781114853860474,33.546839C14.013456253860474,34.639273,15.515264253860474,35.110636,16.949504253860475,34.960924L17.384031253860474,33.278093Q15.695761253860473,33.903341,13.886703253860473,32.299662C13.250737453860474,31.735897,12.292436853860474,31.740944,11.662447253860474,32.311378000000005Q10.430524553860474,33.426844,9.001459353860474,33.325500000000005Q7.535682953860474,33.22155,6.369870153860473,31.878052C6.355376453860474,31.861349,6.3405518538604735,31.844936,6.325405153860474,31.828825Q3.8021785638604735,29.144703,5.9879074538604735,25.938877C6.383556653860474,25.358576,6.372957753860474,24.592518,5.961405753860474,24.023384Q5.026963953860474,22.731148,5.026963953860474,20.072058Q5.026963953860474,17.378647,5.997069853860474,15.925296C6.374311253860474,15.360136,6.3706860538604735,14.6225471,5.987907653860473,14.0611229Q3.8149851238604735,10.8740788,6.203129753860473,8.1219487Q7.366510153860474,6.7812542,8.914587753860474,6.6747454Q10.427746053860474,6.570639,11.662447253860474,7.6886220000000005C12.311335753860474,8.2761691,13.304180353860474,8.261601,13.935551253860474,7.655268899999999Q16.267856253860472,5.41545445,18.845364253860474,7.700341C19.495353253860472,8.2765367,20.478888253860475,8.2569213,21.105388253860475,7.6552677Q23.437688253860475,5.41545364,26.015201253860475,7.7003412C26.651166253860474,8.2641058,27.609466253860475,8.2590561,28.239455253860474,7.6886208Q29.471375253860472,6.5731552,30.900443253860473,6.6745013Q32.36622125386047,6.7784510000000004,33.532031253860474,8.1219487C33.546527253860475,8.1386516,33.56135125386047,8.1550651,33.576497253860474,8.1711793Q36.099740253860475,10.8553152,33.91402525386047,14.0611248C33.75512825386048,14.2941837,33.65797725386047,14.5637598,33.631677253860474,14.8446045Q33.79909825386048,14.8235569,33.975852253860474,14.8257475Q34.933356253860474,14.8375826,35.59989625386047,15.52399L35.66519325386047,15.591235C35.550366253860474,15.381103,35.425664253860475,15.183288,35.29108325386048,15ZM35.966336253860476,26.182783L34.676930253860476,27.463251Q35.393826253860475,29.732494,33.53202725386048,31.878052C33.517697253860476,31.894566,33.50369225386048,31.911364,33.490022253860474,31.928431Q32.454415253860475,33.221331,30.964744253860474,33.325373Q30.004237253860474,33.392458000000005,29.149894253860474,32.951971L27.929481253860473,34.163925C30.176993253860473,35.589745,33.01140925386048,35.191897999999995,34.790837253860474,32.970377C36.64204925386047,30.837021,37.033868253860476,28.496355,35.966336253860476,26.182783Z" fill="currentColor"></path><path d="M18.34860205776758,36.08124306176758L19.51047686176758,31.58106006176758C19.601237461767578,31.22952606176758,20.042625161767578,31.109528061767577,20.301013961767577,31.36614306176758L23.55426316176758,34.59704206176758C23.808096861767577,34.84913206176758,23.69668006176758,35.27922206176758,23.35186196176758,35.378357061767574L18.936737541767577,36.647640061767575C18.586058351767576,36.74845306176758,18.257926098767577,36.43245106176758,18.34860205776758,36.08124306176758ZM21.15253496176758,30.02545706176758L24.88609836176758,33.73337206176758C25.07032536176758,33.91633406176758,25.36901856176758,33.91633406176758,25.553247461767576,33.73337206176758L36.52849006176758,22.833516161767577C36.710360061767574,22.65290166176758,36.71303206176758,22.36089566176758,36.534500061767574,22.17702746176758L32.941582061767576,18.47663122176758C32.75926806176758,18.288860715767576,32.45763906176758,18.28513235576758,32.27067206176758,18.46833832176758L21.15478106176758,29.36067706176758C20.96843986176758,29.543269061767578,20.96743176176758,29.84162706176758,21.15253496176758,30.02545706176758Z" fill="currentColor"></path></svg>',ur='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path d="M1.666717529296875,15.833333L1.666717529296875,4.1666666C1.666717529296875,3.24619204,2.412909569296875,2.5,3.333384129296875,2.5L16.666717529296875,2.5C17.587192529296875,2.5,18.333383529296874,3.24619204,18.333383529296874,4.1666666L18.333383529296874,9.127090500000001L17.500050529296875,8.268899000000001L17.500050529296875,4.1666666Q17.500050529296875,3.33333331,16.666717529296875,3.33333331L3.333384129296875,3.33333331Q2.500050839296875,3.33333331,2.500050839296875,4.1666666L2.500050839296875,15.833333Q2.500050839296875,16.666666,3.333384129296875,16.666666L8.404951129296876,16.666666L8.189774029296874,17.5L3.333384129296875,17.5C2.412909569296875,17.5,1.666717529296875,16.753808,1.666717529296875,15.833333ZM13.575839529296875,17.5L16.666717529296875,17.5C17.587192529296875,17.5,18.333383529296874,16.753808,18.333383529296874,15.833333L18.333383529296874,12.775434L17.500050529296875,13.602991L17.500050529296875,15.833333Q17.500050529296875,16.666666,16.666717529296875,16.666666L14.414989529296875,16.666666L13.575839529296875,17.5Z" fill="currentColor"></path><path d="M9.174291491940625,18.04064271171875L9.755228874140625,15.79055121171875C9.800609174140625,15.61478421171875,10.021303054140626,15.55478481171875,10.150497434140625,15.683092611718749L11.777121994140625,17.29854201171875C11.904038894140625,17.42458721171875,11.848330494140626,17.639632211718748,11.675921394140625,17.68919941171875L9.468359234140625,18.32384111171875C9.293019634140625,18.37424751171875,9.128953513140624,18.216246611718752,9.174291491940625,18.04064271171875ZM10.576257894140625,15.012749711718751L12.443039694140625,16.86670681171875C12.535153194140625,16.95818801171875,12.684499694140625,16.95818801171875,12.776614194140624,16.86670681171875L18.264235494140625,11.41677901171875C18.355170294140628,11.32647181171875,18.356506394140624,11.18046881171875,18.267240494140623,11.08853471171875L16.470781294140625,9.23833659271875C16.379624394140624,9.14445133871875,16.228809794140624,9.14258715871875,16.135326394140627,9.23419014371875L10.577380994140626,14.68035941171875C10.484210394140625,14.77165551171875,10.483706394140626,14.92083451171875,10.576257894140625,15.012749711718751Z" fill="currentColor"></path></svg>',mr='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path d="M17.366041494140624,8.13321261171875C16.667592494140624,4.38473101171875,13.396319494140625,1.66668701171875,9.583322994140625,1.66668701171875C5.211068394140625,1.66668701171875,1.666656494140625,5.21109891171875,1.666656494140625,9.58335351171875C1.6666564941406257,13.42974001171875,4.431342794140625,16.71955701171875,8.220290194140624,17.381800011718752L8.429374694140625,16.57206001171875C5.009032494140625,16.00730701171875,2.499989804140625,13.05000701171875,2.499989804140625,9.58335351171875C2.499989804140625,5.67133621171875,5.671305694140625,2.50002032171875,9.583322994140625,2.50002032171875C12.822601494140624,2.50002032171875,15.649155494140626,4.69743511171875,16.447924494140626,7.83668611171875Q16.522337494140626,7.82859321171875,16.600395494140624,7.82956071171875Q17.046328494140624,7.83507251171875,17.366041494140624,8.13321261171875Z" fill="currentColor"></path><path d="M9.174291491940625,18.04064271171875L9.755228874140625,15.79055121171875C9.800609174140625,15.61478421171875,10.021303054140626,15.55478481171875,10.150497434140625,15.683092611718749L11.777121994140625,17.29854201171875C11.904038894140625,17.42458721171875,11.848330494140626,17.639632211718748,11.675921394140625,17.68919941171875L9.468359234140625,18.32384111171875C9.293019634140625,18.37424751171875,9.128953513140624,18.216246611718752,9.174291491940625,18.04064271171875ZM10.576257894140625,15.012749711718751L12.443039694140625,16.86670681171875C12.535153194140625,16.95818801171875,12.684499694140625,16.95818801171875,12.776614194140624,16.86670681171875L18.264235494140625,11.41677901171875C18.355170294140628,11.32647181171875,18.356506394140624,11.18046881171875,18.267240494140623,11.08853471171875L16.470781294140625,9.23833659271875C16.379624394140624,9.14445133871875,16.228809794140624,9.14258715871875,16.135326394140627,9.23419014371875L10.577380994140626,14.68035941171875C10.484210394140625,14.77165551171875,10.483706394140626,14.92083451171875,10.576257894140625,15.012749711718751Z" fill="currentColor"></path></svg>',pr=ft("M160 826.88 273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64zM296 800 147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z","M352 512h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32m0-192h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32"),hr='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" fill-rule="evenodd" d="M10 2.2 17.2 17.6h-2.8l-1.45-4.2H7.05L5.6 17.6H2.8L10 2.2Zm0 4.3L8.2 11.2h3.6L10 6.5Z"/></svg>',fr=ft("M754.752 480H160a32 32 0 1 0 0 64h594.752L521.344 777.344a32 32 0 0 0 45.312 45.312l288-288a32 32 0 0 0 0-45.312l-288-288a32 32 0 1 0-45.312 45.312z"),gr=ft("M624 475.968V640h144a128 128 0 0 1 128 128H128a128 128 0 0 1 128-128h144V475.968a192 192 0 1 1 224 0M128 896v-64h768v64z"),wr='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20" fill="none" aria-hidden="true"><path stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" d="M4.5 2h6.4L15.5 6.6V16.5A1.5 1.5 0 0 1 14 18H4.5A1.5 1.5 0 0 1 3 16.5V3.5A1.5 1.5 0 0 1 4.5 2z"/><path stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" d="M10.9 2v4.6h4.6"/><path stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M10 5.8v6M7.2 9.6 10 12.5l2.8-2.9"/></svg>',br='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20" fill="none" aria-hidden="true"><path stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" d="M15.5 2H9.1L4.5 6.6V16.5A1.5 1.5 0 0 0 6 18h9.5A1.5 1.5 0 0 0 17 16.5V3.5A1.5 1.5 0 0 0 15.5 2z"/><path stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" d="M9.1 2v4.6H4.5"/><path stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M10 14.2V8M7.2 10.4 10 7.5l2.8 2.9"/></svg>',xr=je,vr=ft("M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160");ft("M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176","M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48");const yr='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M10 6.5 5.5 11h9L10 6.5Z"/></svg>',Lr='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M10 2.6 18 9.8h-2.1V17h-4.4v-4.4H8.5V17H4.1V9.8H2L10 2.6Zm0 1.8L5.3 9.8V15.8h2V11.4h5.4v4.4h2V9.8L10 4.4Z"/></svg>',kr='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M10.09 3.53 16.09 6.97 10.09 10.29 4.18 7 10.09 3.56M10.09 2.4 2.17 7 3.31 7.65 10.09 11.45 17 7.62 18.17 7 10.08 2.37 10.09 2.4Z"/><path fill="currentColor" d="M10.25 14.83 18.17 10.22 17 9.57 10.22 13.57 3.32 9.59 2.17 10.22 10.25 14.83Z"/><path fill="currentColor" d="M10.25 17.63 18.17 13 17 12.37 10.22 16.37 3.32 12.38 2.17 13 10.25 17.63Z"/></svg>',Ar='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M10.09 5.15 16.09 8.59 10.09 11.91 4.18 8.59 10.09 5.15ZM10.09 4 2.17 8.61 3.31 9.25 10.09 13.06 17 9.24 18.16 8.61 10.08 4 10.09 4Z"/><path fill="currentColor" d="M10.25 16.46 18.17 11.85 17 11.2 10.22 15.2 3.32 11.21 2.17 11.85 10.25 16.46Z"/><path fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" d="M3.5 3.5 16.5 16.5"/></svg>',Cr='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M2.25 2.25h4.878v4.878H2.25V2.25Zm.978.978v2.924h2.924V3.228H3.228Z"/><path fill="currentColor" d="M5.175 20.773V7.128H4.204V21.75H21.75V4.204H7.128v.971H20.773v15.598H5.175Z"/></svg>',Mr='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" fill-rule="evenodd" d="M3 2H2v16h16v-1H8v-5H3V2zm0 11v4h4v-4H3z"/></svg>',Ir='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" fill-rule="evenodd" d="M16.98 11L18.5 11L18.5 10L16.98 10C16.86 8.13 16.05 6.44 14.8 5.2L16.88 2.83L16.12 2.17L14.05 4.54C12.79 3.57 11.21 3 9.5 3C5.36 3 2 6.36 2 10.5C2 14.64 5.36 18 9.5 18C13.47 18 16.73 14.91 16.98 11ZM15.98 10C15.86 8.43 15.18 7.01 14.14 5.95L10.6 10L15.98 10ZM13.39 5.29L8.4 11L15.98 11C15.73 14.36 12.92 17 9.5 17C5.91 17 3 14.09 3 10.5C3 6.91 5.91 4 9.5 4C10.96 4 12.31 4.48 13.39 5.29Z"/></svg>',zr=lr,Or=dr,Sr=ur,Pr=mr,Rr=vr,ut=3;var O=Uint8Array,z=Uint16Array,Xt=Int32Array,Gt=new O([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Wt=new O([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),se=new O([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Be=function(t,e){for(var a=new z(31),r=0;r<31;++r)a[r]=e+=1<<t[r-1];for(var n=new Xt(a[30]),r=1;r<30;++r)for(var o=a[r];o<a[r+1];++o)n[o]=o-a[r]<<5|r;return{b:a,r:n}},Fe=Be(Gt,2),Er=Fe.b,Tt=Fe.r;Er[28]=258,Tt[258]=28;var Nr=Be(Wt,0),ce=Nr.r,Ut=new z(32768);for(var b=0;b<32768;++b){var Y=(b&43690)>>1|(b&21845)<<1;Y=(Y&52428)>>2|(Y&13107)<<2,Y=(Y&61680)>>4|(Y&3855)<<4,Ut[b]=((Y&65280)>>8|(Y&255)<<8)>>1}var dt=(function(t,e,a){for(var r=t.length,n=0,o=new z(e);n<r;++n)t[n]&&++o[t[n]-1];var i=new z(e);for(n=1;n<e;++n)i[n]=i[n-1]+o[n-1]<<1;var l;if(a){l=new z(1<<e);var s=15-e;for(n=0;n<r;++n)if(t[n])for(var d=n<<4|t[n],c=e-t[n],u=i[t[n]-1]++<<c,p=u|(1<<c)-1;u<=p;++u)l[Ut[u]>>s]=d}else for(l=new z(r),n=0;n<r;++n)t[n]&&(l[n]=Ut[i[t[n]-1]++]>>15-t[n]);return l}),K=new O(288);for(var b=0;b<144;++b)K[b]=8;for(var b=144;b<256;++b)K[b]=9;for(var b=256;b<280;++b)K[b]=7;for(var b=280;b<288;++b)K[b]=8;var wt=new O(32);for(var b=0;b<32;++b)wt[b]=5;var _r=dt(K,9,0),Tr=dt(wt,5,0),De=function(t){return(t+7)/8|0},Qe=function(t,e,a){return(a==null||a>t.length)&&(a=t.length),new O(t.subarray(e,a))},B=function(t,e,a){a<<=e&7;var r=e/8|0;t[r]|=a,t[r+1]|=a>>8},lt=function(t,e,a){a<<=e&7;var r=e/8|0;t[r]|=a,t[r+1]|=a>>8,t[r+2]|=a>>16},St=function(t,e){for(var a=[],r=0;r<t.length;++r)t[r]&&a.push({s:r,f:t[r]});var n=a.length,o=a.slice();if(!n)return{t:Xe,l:0};if(n==1){var i=new O(a[0].s+1);return i[a[0].s]=1,{t:i,l:1}}a.sort(function(S,E){return S.f-E.f}),a.push({s:-1,f:25001});var l=a[0],s=a[1],d=0,c=1,u=2;for(a[0]={s:-1,f:l.f+s.f,l,r:s};c!=n-1;)l=a[a[d].f<a[u].f?d++:u++],s=a[d!=c&&a[d].f<a[u].f?d++:u++],a[c++]={s:-1,f:l.f+s.f,l,r:s};for(var p=o[0].s,r=1;r<n;++r)o[r].s>p&&(p=o[r].s);var m=new z(p+1),x=$t(a[c-1],m,0);if(x>e){var r=0,v=0,D=x-e,X=1<<D;for(o.sort(function(E,C){return m[C.s]-m[E.s]||E.f-C.f});r<n;++r){var j=o[r].s;if(m[j]>e)v+=X-(1<<x-m[j]),m[j]=e;else break}for(v>>=D;v>0;){var G=o[r].s;m[G]<e?v-=1<<e-m[G]++-1:++r}for(;r>=0&&v;--r){var R=o[r].s;m[R]==e&&(--m[R],++v)}x=e}return{t:new O(m),l:x}},$t=function(t,e,a){return t.s==-1?Math.max($t(t.l,e,a+1),$t(t.r,e,a+1)):e[t.s]=a},de=function(t){for(var e=t.length;e&&!t[--e];);for(var a=new z(++e),r=0,n=t[0],o=1,i=function(s){a[r++]=s},l=1;l<=e;++l)if(t[l]==n&&l!=e)++o;else{if(!n&&o>2){for(;o>138;o-=138)i(32754);o>2&&(i(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(i(n),--o;o>6;o-=6)i(8304);o>2&&(i(o-3<<5|8208),o=0)}for(;o--;)i(n);o=1,n=t[l]}return{c:a.subarray(0,r),n:e}},st=function(t,e){for(var a=0,r=0;r<e.length;++r)a+=t[r]*e[r];return a},Ye=function(t,e,a){var r=a.length,n=De(e+2);t[n]=r&255,t[n+1]=r>>8,t[n+2]=t[n]^255,t[n+3]=t[n+1]^255;for(var o=0;o<r;++o)t[n+o+4]=a[o];return(n+4+r)*8},ue=function(t,e,a,r,n,o,i,l,s,d,c){B(e,c++,a),++n[256];for(var u=St(n,15),p=u.t,m=u.l,x=St(o,15),v=x.t,D=x.l,X=de(p),j=X.c,G=X.n,R=de(v),S=R.c,E=R.n,C=new z(19),w=0;w<j.length;++w)++C[j[w]&31];for(var w=0;w<S.length;++w)++C[S[w]&31];for(var f=St(C,7),M=f.t,q=f.l,I=19;I>4&&!M[se[I-1]];--I);var J=d+5<<3,N=st(n,K)+st(o,wt)+i,_=st(n,p)+st(o,v)+i+14+3*I+st(C,M)+2*C[16]+3*C[17]+7*C[18];if(s>=0&&J<=N&&J<=_)return Ye(e,c,t.subarray(s,s+d));var U,k,T,Q;if(B(e,c,1+(_<N)),c+=2,_<N){U=dt(p,m,0),k=p,T=dt(v,D,0),Q=v;var Ct=dt(M,q,0);B(e,c,G-257),B(e,c+5,E-1),B(e,c+10,I-4),c+=14;for(var w=0;w<I;++w)B(e,c+3*w,M[se[w]]);c+=3*I;for(var $=[j,S],it=0;it<2;++it)for(var tt=$[it],w=0;w<tt.length;++w){var V=tt[w]&31;B(e,c,Ct[V]),c+=M[V],V>15&&(B(e,c,tt[w]>>5&127),c+=tt[w]>>12)}}else U=_r,k=K,T=Tr,Q=wt;for(var w=0;w<l;++w){var A=r[w];if(A>255){var V=A>>18&31;lt(e,c,U[V+257]),c+=k[V+257],V>7&&(B(e,c,A>>23&31),c+=Gt[V]);var et=A&31;lt(e,c,T[et]),c+=Q[et],et>3&&(lt(e,c,A>>5&8191),c+=Wt[et])}else lt(e,c,U[A]),c+=k[A]}return lt(e,c,U[256]),c+k[256]},Ur=new Xt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Xe=new O(0),$r=function(t,e,a,r,n,o){var i=o.z||t.length,l=new O(r+i+5*(1+Math.ceil(i/7e3))+n),s=l.subarray(r,l.length-n),d=o.l,c=(o.r||0)&7;if(e){c&&(s[0]=o.r>>3);for(var u=Ur[e-1],p=u>>13,m=u&8191,x=(1<<a)-1,v=o.p||new z(32768),D=o.h||new z(x+1),X=Math.ceil(a/3),j=2*X,G=function(zt){return(t[zt]^t[zt+1]<<X^t[zt+2]<<j)&x},R=new Xt(25e3),S=new z(288),E=new z(32),C=0,w=0,f=o.i||0,M=0,q=o.w||0,I=0;f+2<i;++f){var J=G(f),N=f&32767,_=D[J];if(v[N]=_,D[J]=N,q<=f){var U=i-f;if((C>7e3||M>24576)&&(U>423||!d)){c=ue(t,s,0,R,S,E,w,M,I,f-I,c),M=C=w=0,I=f;for(var k=0;k<286;++k)S[k]=0;for(var k=0;k<30;++k)E[k]=0}var T=2,Q=0,Ct=m,$=N-_&32767;if(U>2&&J==G(f-$))for(var it=Math.min(p,U)-1,tt=Math.min(32767,f),V=Math.min(258,U);$<=tt&&--Ct&&N!=_;){if(t[f+T]==t[f+T-$]){for(var A=0;A<V&&t[f+A]==t[f+A-$];++A);if(A>T){if(T=A,Q=$,A>it)break;for(var et=Math.min($,A-2),ae=0,k=0;k<et;++k){var Mt=f-$+k&32767,ra=v[Mt],re=Mt-ra&32767;re>ae&&(ae=re,_=Mt)}}}N=_,_=v[N],$+=N-_&32767}if(Q){R[M++]=268435456|Tt[T]<<18|ce[Q];var ne=Tt[T]&31,oe=ce[Q]&31;w+=Gt[ne]+Wt[oe],++S[257+ne],++E[oe],q=f+T,++C}else R[M++]=t[f],++S[t[f]]}}for(f=Math.max(f,q);f<i;++f)R[M++]=t[f],++S[t[f]];c=ue(t,s,d,R,S,E,w,M,I,f-I,c),d||(o.r=c&7|s[c/8|0]<<3,c-=7,o.h=D,o.p=v,o.i=f,o.w=q)}else{for(var f=o.w||0;f<i+d;f+=65535){var It=f+65535;It>=i&&(s[c/8|0]=d,It=i),c=Ye(s,c+1,t.subarray(f,It))}o.i=i}return Qe(l,0,r+De(c)+n)},Vr=(function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var a=e,r=9;--r;)a=(a&1&&-306674912)^a>>>1;t[e]=a}return t})(),Hr=function(){var t=-1;return{p:function(e){for(var a=t,r=0;r<e.length;++r)a=Vr[a&255^e[r]]^a>>>8;t=a},d:function(){return~t}}},Zr=function(t,e,a,r,n){if(!n&&(n={l:1},e.dictionary)){var o=e.dictionary.subarray(-32768),i=new O(o.length+t.length);i.set(o),i.set(t,o.length),t=i,n.w=o.length}return $r(t,e.level==null?6:e.level,e.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,a,r,n)},Vt=function(t,e,a){for(;a;++e)t[e]=a,a>>>=8},jr=function(t,e){var a=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&Vt(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),a){t[3]=8;for(var r=0;r<=a.length;++r)t[r+10]=a.charCodeAt(r)}},Br=function(t){return 10+(t.filename?t.filename.length+1:0)};function Fr(t,e){e||(e={});var a=Hr(),r=t.length;a.p(t);var n=Zr(t,e,Br(e),8),o=n.length;return jr(n,e),Vt(n,o-8,a.d()),Vt(n,o-4,r),n}var me=typeof TextEncoder<"u"&&new TextEncoder,Dr=typeof TextDecoder<"u"&&new TextDecoder,Qr=0;try{Dr.decode(Xe,{stream:!0}),Qr=1}catch{}function Yr(t,e){var a;if(me)return me.encode(t);for(var r=t.length,n=new O(t.length+(t.length>>1)),o=0,i=function(c){n[o++]=c},a=0;a<r;++a){if(o+5>n.length){var l=new O(o+8+(r-a<<1));l.set(n),n=l}var s=t.charCodeAt(a);s<128||e?i(s):s<2048?(i(192|s>>6),i(128|s&63)):s>55295&&s<57344?(s=65536+(s&1047552)|t.charCodeAt(++a)&1023,i(240|s>>18),i(128|s>>12&63),i(128|s>>6&63),i(128|s&63)):(i(224|s>>12),i(128|s>>6&63),i(128|s&63))}return Qe(n,0,o)}const Xr="gzip";function Gr(t){return{bytes:Fr(t),compression:Xr}}const Wr=1480934209,pe=1,he=2,fe=4,ge=8,we=16,be=1,xe=2,ve=4,ye=8,Le=16,Kr=32,ke=64;function qr(t){if(t.version!==ut)throw new Error(`Unsupported snapshot version: ${t.version}`);const e=new an;e.writeU32(Wr),e.writeU8(ut),e.writeU8(0),e.writeU8(0),e.writeU8(0),e.writeJson(t.meta),e.writeJson(t.layers),e.writeString(t.activeLayoutBtrId),e.writeU32(t.layouts.length);for(const a of t.layouts)Jr(e,a);return e.toUint8Array()}function Jr(t,e){t.writeString(e.btrId),t.writeString(e.name),t.writeU8(e.isModelSpace?1:0),t.writeJson(e.osnap??null),t.writeJson(e.viewports??null),t.writeU32(e.lineBatches.length);for(const a of e.lineBatches)tn(t,a);t.writeU32(e.meshBatches.length);for(const a of e.meshBatches)en(t,a)}function tn(t,e){t.writeString(e.layer),t.writeU32(e.color>>>0),t.writeF64(e.offset[0]),t.writeF64(e.offset[1]),t.writeF64(e.offset[2]),t.writeFloat32Array(e.positions);let a=0;e.indices&&e.indices.length>0&&(a|=pe),e.linePattern&&(a|=he),e.lineDistances&&e.lineDistances.length>0&&(a|=fe),e.lineWidth!=null&&e.lineWidth>0&&(a|=ge),e.renderOrder!=null&&e.renderOrder!==0&&(a|=we),t.writeU8(a),a&pe&&t.writeUint32Array(e.indices),a&he&&t.writeJson(e.linePattern),a&fe&&t.writeFloat32Array(e.lineDistances),a&ge&&t.writeF32(e.lineWidth),a&we&&t.writeI32(e.renderOrder)}function en(t,e){t.writeString(e.layer),t.writeU32(e.color>>>0),t.writeF64(e.offset[0]),t.writeF64(e.offset[1]),t.writeF64(e.offset[2]),t.writeFloat32Array(e.positions);let a=0;e.indices&&e.indices.length>0&&(a|=be),e.hatchPattern&&(a|=xe),e.gradientFill&&(a|=ve),e.gradientPositions&&e.gradientPositions.length>0&&(a|=ye),e.side!=null&&(a|=Le),e.points&&(a|=Kr),e.renderOrder!=null&&e.renderOrder!==0&&(a|=ke),t.writeU8(a),a&be&&t.writeUint32Array(e.indices),a&xe&&t.writeJson(e.hatchPattern),a&ve&&t.writeJson(e.gradientFill),a&ye&&t.writeFloat32Array(e.gradientPositions),a&Le&&t.writeU8(e.side),a&ke&&t.writeI32(e.renderOrder)}class an{constructor(){this.chunks=[],this.length=0}writeU8(e){const a=new Uint8Array(1);a[0]=e&255,this.chunks.push(a),this.length+=1}writeU32(e){const a=new Uint8Array(4);new DataView(a.buffer).setUint32(0,e>>>0,!0),this.chunks.push(a),this.length+=4}writeI32(e){const a=new Uint8Array(4);new DataView(a.buffer).setInt32(0,e|0,!0),this.chunks.push(a),this.length+=4}writeF32(e){const a=new Uint8Array(4);new DataView(a.buffer).setFloat32(0,e,!0),this.chunks.push(a),this.length+=4}writeF64(e){const a=new Uint8Array(8);new DataView(a.buffer).setFloat64(0,e,!0),this.chunks.push(a),this.length+=8}writeBytes(e){this.chunks.push(e),this.length+=e.length}writeString(e){const a=Yr(e);this.writeU32(a.length),this.writeBytes(a)}writeJson(e){this.writeString(JSON.stringify(e))}writeFloat32Array(e){this.alignTo(4);const a=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);this.writeU32(a.length),this.writeBytes(a)}writeUint32Array(e){this.alignTo(4);const a=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);this.writeU32(a.length),this.writeBytes(a)}alignTo(e){const a=this.length%e;if(a===0)return;const r=e-a;for(let n=0;n<r;n++)this.writeU8(0)}toUint8Array(){const e=new Uint8Array(this.length);let a=0;for(const r of this.chunks)e.set(r,a),a+=r.length;return e}}const rn="application/vnd.mlightcad.acex-snapshot+binary";function Ht(t){if(t.version!==ut)throw new Error(`Unsupported snapshot version: ${t.version}`);const e=qr(t),a=Gr(e);return{payload:on(a.bytes),compression:a.compression}}function nn(){return rn}function on(t){let e="";for(let a=0;a<t.length;a++)e+=String.fromCharCode(t[a]);return btoa(e)}function ot(t,e,a){if(a<=0)return new Float32Array(0);const r=new Float32Array(a);for(let n=0;n<a;n++)r[n]=t[e+n];return r}function ln(t,e,a){if(a<=0)return new Uint32Array(0);const r=new Uint32Array(a);for(let n=0;n<a;n++)r[n]=t[e+n];return r}function Ge(t,e){if(e.length===0)return{positions:t,indices:e};let a=0;for(let n=0;n<e.length;n++){const o=e[n];o>a&&(a=o)}const r=(a+1)*3;return r>=t.length?{positions:t,indices:e}:{positions:ot(t,0,r),indices:e}}function Ae(t,e){return t+e}const at={x:0,y:0,z:0};function sn(t){t.updateMatrixWorld(!0);const e=t.matrixWorld.elements;return at.x=e[12],at.y=e[13],at.z=e[14],[at.x,at.y,at.z]}function cn(t,e){const a=e.elements,r=t.positions;if(r.length===0)return{positions:new Float32Array(0),indices:t.indices};const n=new Float32Array(r.length);for(let o=0;o<r.length;o+=3){const i=r[o],l=r[o+1],s=r[o+2];n[o]=a[0]*i+a[4]*l+a[8]*s+a[12],n[o+1]=a[1]*i+a[5]*l+a[9]*s+a[13],n[o+2]=a[2]*i+a[6]*l+a[10]*s+a[14]}return{positions:n,indices:t.indices?new Uint32Array(t.indices):void 0}}function dn(t){const e=t.positions;if(e.length<3)return{slice:t,offset:[0,0,0]};let a=1/0,r=1/0,n=1/0,o=-1/0,i=-1/0,l=-1/0;for(let c=0;c<e.length;c+=3){const u=e[c],p=e[c+1],m=e[c+2];a=Math.min(a,u),r=Math.min(r,p),n=Math.min(n,m),o=Math.max(o,u),i=Math.max(i,p),l=Math.max(l,m)}const s=[(a+o)/2,(r+i)/2,(n+l)/2],d=new Float32Array(e.length);for(let c=0;c<e.length;c+=3)d[c]=e[c]-s[0],d[c+1]=e[c+1]-s[1],d[c+2]=e[c+2]-s[2];return{slice:{positions:d,indices:t.indices?new Uint32Array(t.indices):void 0},offset:s}}function un(t,e,a={}){t.updateMatrixWorld(!0);const r=cn(e,t.matrixWorld);return a.preserveWorldSpaceForPatternFill?{slice:r,offset:[0,0,0]}:dn(r)}function Kt(t){const e=t;if(e.isShaderMaterial===!0||t.type==="ShaderMaterial")return e}function mn(t){var e;const a=Kt(t);if(!a)return;const r=a.uniforms.pattern,n=a.uniforms.patternLength;if(!r||!n)return;const o=r.value;if(!(!Array.isArray(o)||o.length===0))return{pattern:[...o],patternLength:Number(n.value),viewportScale:Number(((e=a.uniforms.u_viewportScale)==null?void 0:e.value)??1)}}function pn(t){var e;const a=Kt(t);if(!a)return;const r=a.uniforms.u_patternLines;if(!r)return;const n=r.value;if(!(!Array.isArray(n)||n.length===0))return{patternAngle:Number(((e=a.uniforms.u_patternAngle)==null?void 0:e.value)??0),patternLines:n.map(fn)}}function hn(t){var e,a,r,n,o;const i=Kt(t);if(!i||i.uniforms.u_patternLines)return;const l=(e=i.uniforms.u_startColor)==null?void 0:e.value,s=(a=i.uniforms.u_endColor)==null?void 0:a.value,d=i.uniforms.u_gradientType;if(!(!(l!=null&&l.getHex)||d==null))return{startColor:l.getHex(),endColor:((r=s==null?void 0:s.getHex)==null?void 0:r.call(s))??l.getHex(),angle:Number(((n=i.uniforms.u_angle)==null?void 0:n.value)??0),shift:Number(((o=i.uniforms.u_shift)==null?void 0:o.value)??0),gradientType:Number(d.value)}}function fn(t){return{angle:t.angle,base:[t.base.x,t.base.y],offset:[t.offset.x,t.offset.y],dashLengths:[...t.dashLengths],patternLength:t.patternLength}}function We(t){const e=t.length/3;if(e<2)return new Float32Array(0);const a=new Float32Array(e);for(let r=0;r<e;r+=2){r===0?a[r]=0:a[r]=a[r-1];const n=t[r*3],o=t[r*3+1],i=t[r*3+2]??0,l=t[(r+1)*3],s=t[(r+1)*3+1],d=t[(r+1)*3+2]??0,c=l-n,u=s-o,p=d-i;a[r+1]=a[r]+Math.sqrt(c*c+u*u+p*p)}return a}function gn(t,e){const a=t.getAttribute(e);if(!a||a.count===0)return;const r=a.itemSize;if(t.getIndex()){const c=a.array;return ot(c,0,a.count*r)}const n=t.drawRange,o=a.count,i=Math.max(0,Math.min(Math.floor(n.start),o)),l=Math.max(0,o-i),s=!Number.isFinite(n.count)||n.count<=0?l:Math.min(Math.floor(n.count),l);if(s<=0)return;const d=a.array;return ot(d,i*r,s*r)}function wn(t,e){const a=Math.atan2(e[1],e[0]),r=(o,i)=>[e[0]*o+e[4]*i+e[12],e[1]*o+e[5]*i+e[13]],n=(o,i)=>[e[0]*o+e[4]*i,e[1]*o+e[5]*i];return{patternAngle:t.patternAngle+a,patternLines:t.patternLines.map(o=>({angle:o.angle+a,base:r(o.base[0],o.base[1]),offset:n(o.offset[0],o.offset[1]),dashLengths:[...o.dashLengths],patternLength:o.patternLength}))}}function Zt(t,e){return!Number.isFinite(t)||t<0?0:Math.min(Math.floor(t),e)}function jt(t,e,a){const r=Math.max(0,e-a);return!Number.isFinite(t)||t<=0?r:Math.min(Math.floor(t),r)}function Ce(t){const e=t.getAttribute("position");if(!e)return{positions:new Float32Array(0)};const a=t.drawRange,r=e.array,n=e.itemSize,o=t.getIndex();if(o){const s=ot(r,0,e.count*n),d=o.array,c=Zt(a.start,o.count),u=jt(a.count,o.count,c),p=ln(d,c,u);return Ge(s,p)}const i=Zt(a.start,e.count),l=jt(a.count,e.count,i);return{positions:ot(r,i*n,l*n)}}function Bt(t){return ja(t.flags)&&Ba(t.flags)}function qt(t,e){const a=e.getAttribute("position");if(!a)return{positions:new Float32Array(0)};const r=a.itemSize,n=a.array,o=e.getIndex(),{count:i}=t.mappingStats;if(o){const s=ot(n,0,a.count*r),d=o.array,c=[];for(let u=0;u<i;u++){let p;try{p=t.getGeometryRangeAt(u)}catch{continue}const m=p.indexStart??0,x=p.indexCount??0;if(!(!Bt(p)||x<=0))for(let v=0;v<x;v++)c.push(d[m+v])}return c.length===0?{positions:new Float32Array(0)}:Ge(s,new Uint32Array(c))}const l=[];for(let s=0;s<i;s++){let d;try{d=t.getGeometryRangeAt(s)}catch{continue}if(!Bt(d)||d.vertexCount<=0)continue;const c=d.vertexStart*r,u=d.vertexCount*r;for(let p=0;p<u;p++)l.push(n[c+p])}return{positions:new Float32Array(l)}}function bt(t,e,a){t.push(e.getX(a),e.getY(a),e.getZ(a))}function bn(t,e){const a=e.getAttribute("instanceStart"),r=e.getAttribute("instanceEnd");if(!a||!r)return{positions:new Float32Array(0)};const{count:n}=t.mappingStats,o=[];for(let i=0;i<n;i++){let l;try{l=t.getGeometryRangeAt(i)}catch{continue}if(!Bt(l)||l.vertexCount<=0)continue;const s=l.vertexStart,d=s+l.vertexCount;for(let c=s;c<d;c++)bt(o,a,c),bt(o,r,c)}return{positions:new Float32Array(o)}}function xn(t,e){const a=t.instanceCount;if(Number.isFinite(a)&&a>=0)return Math.min(Math.floor(a),e);const r=t.drawRange,n=Zt(r.start,e);return jt(r.count,e,n)}function vn(t){const e=t.getAttribute("instanceStart"),a=t.getAttribute("instanceEnd");if(!e||!a||e.count===0)return{positions:new Float32Array(0)};const r=xn(t,e.count);if(r<=0)return{positions:new Float32Array(0)};const n=[];for(let o=0;o<r;o++)bt(n,e,o),bt(n,a,o);return{positions:new Float32Array(n)}}function Pt(t){return xa(t)}function Ke(t){if(t instanceof ya)return t.linewidth}function Rt(t){if("material"in t){const e=t.userData.originalMaterial??t.material;return Array.isArray(e)?e[0]:e}return t.material}function nt(t){var e;const a=He(t),r=a.layer??"0",n=t;let o=n.color!=null?n.color.getHex():a.color??16777215;const i=mn(t),l=pn(t),s=hn(t);if(t instanceof va||t.type==="ShaderMaterial"){const d=(e=t.uniforms.u_color)==null?void 0:e.value;d!=null&&d.getHex?o=d.getHex():s&&(o=s.startColor)}return{color:o,layer:r,linePattern:i,hatchPattern:l,gradientFill:s,side:l||s?t.side:void 0}}function yn(t,e){const a=He(e).drawOrder??t.renderOrder;return a===0?void 0:a}function mt(t,e,a){const r=yn(e,a);r!=null&&(t.renderOrder=r)}function Ln(t,e){if(!e)return;const a=t.userData.bakedWorldMatrix;return!a||a.length<16?e:wn(e,a)}function kt(t){return sn(t)}function Et(t,e,a={}){const r=un(t,e,a);return{...r.slice,offset:r.offset}}function Jt(t,e,a,r,n){const o=nt(e),i=Ln(a,o.hatchPattern),l=o.gradientFill?gn(t,"gradientPosition"):void 0,s={layer:o.layer,color:o.color,offset:n,hatchPattern:i,gradientFill:o.gradientFill,gradientPositions:l,side:o.side,...r};return mt(s,a,e),s}function kn(t){const e=bn(t,t.geometry);if(e.positions.length===0)return;const{color:a,layer:r}=nt(t.material),n=Ke(t.material),o={layer:r,color:a,offset:kt(t),lineWidth:n,...e};return mt(o,t,t.material),o}function An(t){const e=qt(t,t.geometry);if(e.positions.length===0)return;const{color:a,layer:r,linePattern:n}=nt(t.material),o=n?We(e.positions):void 0,i={layer:r,color:a,offset:kt(t),linePattern:n,lineDistances:o,...e};return mt(i,t,t.material),i}function Cn(t){const e=qt(t,t.geometry);if(e.positions.length!==0)return Jt(t.geometry,t.material,t,e,kt(t))}function Mn(t){const e=qt(t,t.geometry);if(e.positions.length!==0)return{points:!0,...Jt(t.geometry,t.material,t,e,kt(t))}}function In(t){const e=[],a=[];return t.traverse(r=>{if(!(da(r)||ua(r))){if(r instanceof ie){const n=An(r);n&&e.push(n);return}if(r instanceof ma){const n=kn(r);n&&e.push(n);return}if(r instanceof le){const n=Cn(r);n&&a.push(n);return}if(r instanceof pa){const n=Mn(r);n&&a.push(n);return}if(r instanceof ha){if(!Pt(r))return;const n=vn(r.geometry);if(n.positions.length===0)return;const o=Rt(r),{color:i,layer:l}=nt(o),{offset:s,...d}=Et(r,n),c={layer:l,color:i,offset:s,lineWidth:Ke(o),...d};mt(c,r,o),e.push(c)}else if(r instanceof fa&&!(r instanceof ie)){if(!Pt(r))return;const n=Ce(r.geometry);if(n.positions.length===0)return;const o=Rt(r),{color:i,layer:l,linePattern:s}=nt(o),{offset:d,...c}=Et(r,n),u=s?We(c.positions):void 0,p={layer:l,color:i,offset:d,linePattern:s,lineDistances:u,...c};mt(p,r,o),e.push(p)}else if(r instanceof ga&&!(r instanceof le)){if(!Pt(r))return;const n=Ce(r.geometry);if(n.positions.length===0)return;const o=Rt(r),i=nt(o),{offset:l,...s}=Et(r,n,{preserveWorldSpaceForPatternFill:!!i.hatchPattern});a.push(Jt(r.geometry,o,r,s,l))}}}),{lineBatches:e,meshBatches:a}}function Me(t,e){const a=t.extmin,r=t.extmax;return{title:e==null?void 0:e.title,extents:{minX:a.x,minY:a.y,maxX:r.x,maxY:r.y},units:{insunits:t.insunits,lunits:t.lunits,luprec:t.luprec,aunits:t.aunits,auprec:t.auprec,measurement:t.measurement,ltscale:t.ltscale,angbase:t.angbase,angdir:t.angdir},background:(e==null?void 0:e.background)??0}}function Ie(t,e,a,r,n){return Math.atan2(r-e,n*(a-t))}function te(t){return t.z>=0?1:-1}function At(t,e,a){if(!(a.radius>0)||!Number.isFinite(a.radius))return;const r=a.clockwise?-1:1,n=a.center.x,o=a.center.y;t.push({kind:"arc",layer:e,cx:n,cy:o,r:a.radius,startAngle:Ie(n,o,a.startPoint.x,a.startPoint.y,r),endAngle:Ie(n,o,a.endPoint.x,a.endPoint.y,r),normalSign:r})}const zn=1e6;function y(t,e){const a=new Z(e.x,e.y,e.z??0).applyMatrix4(t);return{x:a.x,y:a.y}}function On(t){const e=t.elements;return new Qt(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])}function xt(t,e){return new Qt().multiplyMatrices(t,On(e))}function ee(t,e){const a=new Z(e.x,e.y,e.z??0).transformDirection(t).normalize();return{x:a.x,y:a.y}}function Ft(t){const e=new Z(t.elements[0],t.elements[1],t.elements[2]).length(),a=new Z(t.elements[4],t.elements[5],t.elements[6]).length();return Lt.equal(e,a,Ze*Math.max(e,a,1))}function Sn(t,e){const a=t.tables.blockTable.getIdAt(e);if(a)return a;for(const n of t.tables.blockTable.newIterator())if(n.objectId===e)return n;const r=t.tables.blockTable.modelSpace;if(r.objectId===e)return r}function Pn(t){if(t instanceof Fa)return!0;const e=t;return(e.type==="LINE"||e.type==="Line")&&e.startPoint!=null&&e.endPoint!=null}function Rn(t,e,a,r){F(t,e,a,r.startPoint,r.endPoint)}function qe(t,e){return t.blockTableRecord??(t.blockName?e.tables.blockTable.getAt(t.blockName):void 0)}function En(t,e){const a=t.dimBlockId;return a?e.tables.blockTable.getAt(a):void 0}function Nn(t,e){const a=qe(t,e);if(a)return a;const r=t.owningBlockRecordId;return r?e.tables.blockTable.getAt(r):void 0}function Je(t){return t.getFullInsertionTransform()}function _n(t){for(const e of t.newIterator())return!0;return!1}function Tn(t){return typeof t.getFullInsertionTransform=="function"&&"blockTableRecord"in t}function F(t,e,a,r,n){const o=y(a,r),i=y(a,n),l={kind:"line",layer:e,x0:o.x,y0:o.y,x1:i.x,y1:i.y};t.push(l)}function ze(t,e,a,r,n,o){const i=y(a,r),l=ee(a,n),s=Math.hypot(l.x,l.y)||1,d=l.x/s,c=l.y/s,u=zn,p=o?i.x-d*u:i.x,m=o?i.y-c*u:i.y,x=i.x+d*u,v=i.y+c*u;t.push({kind:"line",layer:e,x0:p,y0:m,x1:x,y1:v})}function W(t,e,a,r,n){if(r.length<2)return;const o=n?r.length:r.length-1;for(let i=0;i<o;i++)F(t,e,a,r[i],r[(i+1)%r.length])}function Un(t,e,a,r){const n=[r.startPosition];for(const o of r.segments)n.push(o.position);W(t,e,a,n,r.closed)}function $n(t,e,a){if(a.vertices.length>=2)return a.vertices;if(a.vertices.length===0)return[];const r=a.vertices[0],n=e.lastLeaderLinePoint??e.landingPoint??t.landingPoint??t.contentBasePosition;if(!n)return a.vertices;const o=r.x-n.x,i=r.y-n.y,l=(r.z??0)-(n.z??0);return Math.hypot(o,i,l)<=Ze?a.vertices:[r,n]}function Vn(t,e,a,r){var n,o;for(const l of r.leaders)for(const s of l.leaderLines){const d=$n(r,l,s);W(t,e,a,d,!1)}const i=l=>{if(!l)return;const s=y(a,l);t.push({kind:"point",layer:e,x:s.x,y:s.y})};i(r.contentBasePosition),i((n=r.mtextContent)==null?void 0:n.anchorPoint),i((o=r.blockContent)==null?void 0:o.position)}function Hn(t,e,a,r){const n=r.numberOfVertices;if(n<2)return;const o=r.elevation,i=r.closed?n:n-1;for(let l=0;l<i;l++){const s=r.getPointAt(l),d=r.getPointAt((l+1)%n),c=r.getBulgeAt(l),u={x:s.x,y:s.y,z:o},p={x:d.x,y:d.y,z:o};if(Lt.isPositive(Math.abs(c))){const m=y(a,u),x=y(a,p);At(t,e,new ht(m,x,c))}else F(t,e,a,u,p)}}function Zn(t,e,a,r,n,o){const i=y(a,r),l=new Z(a.elements[0],a.elements[1],a.elements[2]).length(),s={kind:"circle",layer:e,cx:i.x,cy:i.y,r:n*l,normalSign:te(o)};t.push(s)}function jn(t,e,a,r){const n=y(a,r.center),o=new Z(a.elements[0],a.elements[1],a.elements[2]).length(),i={kind:"arc",layer:e,cx:n.x,cy:n.y,r:r.radius*o,startAngle:r.startAngle,endAngle:r.endAngle,normalSign:te(r.normal)};t.push(i)}function Nt(t,e,a,r){const n=y(a,r.center),o=r._geo,i=(o==null?void 0:o.majorAxis)??{x:1,y:0,z:0},l=ee(a,i),s=Math.hypot(l.x,l.y)||1,d=new Z(a.elements[0],a.elements[1],a.elements[2]).length(),c=new Z(a.elements[4],a.elements[5],a.elements[6]).length(),u={kind:"ellipse",layer:e,cx:n.x,cy:n.y,majorX:l.x/s,majorY:l.y/s,majorR:r.majorAxisRadius*d,minorR:r.minorAxisRadius*c,startAngle:r.startAngle,endAngle:r.endAngle,closed:r.closed,normalSign:te(r.normal)};t.push(u)}function Bn(t,e,a,r){var n,o;const i=r._geo;if(!((n=i==null?void 0:i.controlPoints)!=null&&n.length))return;const l=[];for(const d of i.controlPoints){const c=y(a,d);l.push(c.x,c.y)}const s={kind:"spline",layer:e,controlPoints:l,degree:i.degree??3,knots:[...i.knots??[]],weights:[...i.weights??[]],closed:i.closed??!1};if((o=i.fitPoints)!=null&&o.length){s.fitPoints=[];for(const d of i.fitPoints){const c=y(a,d);s.fitPoints.push(c.x,c.y)}}t.push(s)}function Fn(t,e,a,r){var n;const o=(n=r._geo)==null?void 0:n.vertices,i=o&&o.length>1?o.map(d=>({x:d.x,y:d.y,bulge:d.bulge})):Array.from({length:r.numberOfVertices},(d,c)=>{const u=r.getPoint2dAt(c);return{x:u.x,y:u.y,bulge:0}}),l=i.length;if(l<2)return;const s=r.closed?l:l-1;for(let d=0;d<s;d++){const c=i[d],u=i[(d+1)%l],p=c.bulge??0;if(Lt.isPositive(Math.abs(p))){const m=y(a,{x:c.x,y:c.y,z:0}),x=y(a,{x:u.x,y:u.y,z:0});At(t,e,new ht(m,x,p))}else F(t,e,a,{x:c.x,y:c.y,z:0},{x:u.x,y:u.y,z:0})}}function Dn(t,e,a,r,n){if(Ft(a)){const o=y(a,{x:r.startPoint.x,y:r.startPoint.y,z:n}),i=y(a,{x:r.endPoint.x,y:r.endPoint.y,z:n}),l=a.elements[0]*a.elements[5]-a.elements[4]*a.elements[1],s=(r.clockwise?-1:1)*Math.tan(r.deltaAngle/4)*(l<0?-1:1);At(t,e,new ht(o,i,s));return}F(t,e,a,{x:r.startPoint.x,y:r.startPoint.y,z:n},{x:r.endPoint.x,y:r.endPoint.y,z:n})}function Qn(t,e,a,r,n){const o=y(a,{x:r.center.x,y:r.center.y,z:n}),i=ee(a,{x:Math.cos(r.rotation),y:Math.sin(r.rotation),z:0}),l=Math.hypot(i.x,i.y)||1,s=new Z(a.elements[0],a.elements[1],a.elements[2]).length(),d=new Z(a.elements[4],a.elements[5],a.elements[6]).length();t.push({kind:"ellipse",layer:e,cx:o.x,cy:o.y,majorX:i.x/l,majorY:i.y/l,majorR:r.majorAxisRadius*s,minorR:r.minorAxisRadius*d,startAngle:r.startAngle,endAngle:r.endAngle,closed:!1,normalSign:r.clockwise?-1:1})}function Yn(t,e,a,r,n){var o;const i=r.numberOfVertices;if(i<2)return;const l=r.closed?i:i-1;for(let s=0;s<l;s++){const d=r.getPointAt(s),c=r.getPointAt((s+1)%i),u=((o=r.vertices[s])==null?void 0:o.bulge)??0,p={x:d.x,y:d.y,z:n},m={x:c.x,y:c.y,z:n};if(Lt.isPositive(Math.abs(u))){const x=y(a,p),v=y(a,m);At(t,e,new ht(x,v,u))}else F(t,e,a,p,m)}}function Xn(t,e,a,r,n){if(r instanceof Qa){Yn(t,e,a,r,n);return}if(r instanceof Ya)for(const o of r.curves)o instanceof Xa?F(t,e,a,{x:o.startPoint.x,y:o.startPoint.y,z:n},{x:o.endPoint.x,y:o.endPoint.y,z:n}):o instanceof ht?Dn(t,e,a,o,n):o instanceof Ga&&Qn(t,e,a,o,n)}function Gn(t,e,a,r){var n;const o=(n=r._geo)==null?void 0:n.loops;if(!(o!=null&&o.length))return;const i=r.elevation;for(const l of o)Xn(t,e,a,l,i)}function Wn(t,e,a,r){const n=xt(a,Je(r)),o=[0];for(let d=0;d<r.numColumns;d++)o.push(o[d]+r.columnWidth(d));const i=[0];for(let d=0;d<r.numRows;d++)i.push(i[d]-r.rowHeight(d));const l=o[o.length-1],s=i[i.length-1];for(const d of i)F(t,e,n,{x:0,y:d,z:0},{x:l,y:d,z:0});for(const d of o)F(t,e,n,{x:d,y:0,z:0},{x:d,y:s,z:0})}function Kn(t,e,a,r,n,o,i){const l=Dt(t.layer,a);if(i&&!i(l))return;const s=Nn(t,o);if(s&&!n.has(s.objectId)&&_n(s)){n.add(s.objectId);const c=xt(e,Je(t));vt(s,c,l,r,n,o,i),n.delete(s.objectId);return}Wn(r,l,e,t);const d=y(e,t.position);r.push({kind:"point",layer:l,x:d.x,y:d.y})}function qn(t,e,a,r){let n=r.boundaryPath();if(n.length>1){const i=n[0],l=n[n.length-1];i.x===l.x&&i.y===l.y&&(i.z??0)===(l.z??0)&&(n=n.slice(0,-1))}n.length>=2&&W(t,e,a,n,!0);const o=y(a,r.position);t.push({kind:"point",layer:e,x:o.x,y:o.y})}function Dt(t,e){return t==="0"?e:t}function Jn(t,e,a,r,n,o,i){if(!t.visibility)return;const l=Dt(t.layer,a);if(!(i&&!i(l))){if(t instanceof La){Kn(t,e,a,r,n,o,i);return}if(Tn(t)){const s=qe(t,o);if(!s||n.has(s.objectId))return;n.add(s.objectId);const d=xt(e,t.getFullInsertionTransform()),c=Dt(t.layer,a);vt(s,d,c,r,n,o,i),n.delete(s.objectId);return}if(t instanceof ka){const s=t,d=En(s,o);if(!d||n.has(d.objectId))return;n.add(d.objectId);const c=xt(e,s.getFullDimBlockTransform());vt(d,c,l,r,n,o,i),n.delete(d.objectId);return}if(Pn(t)){Rn(r,l,e,t);return}if(t instanceof Aa){Ft(e)?Zn(r,l,e,t.center,t.radius,t.normal):Nt(r,l,e,to(t));return}if(t instanceof Ca){Ft(e)?jn(r,l,e,t):Nt(r,l,e,eo(t));return}if(t instanceof Yt){Nt(r,l,e,t);return}if(t instanceof Ma){Bn(r,l,e,t);return}if(t instanceof Ia){Fn(r,l,e,t);return}if(t instanceof za){Hn(r,l,e,t);return}if(t instanceof Oa){const s=[];for(let d=0;d<t.numberOfVertices;d++)s.push(t.getPointAt(d));W(r,l,e,s,t.closed);return}if(t instanceof Sa){Gn(r,l,e,t);return}if(t instanceof Pa){ze(r,l,e,t.basePoint,t.unitDir,!1);return}if(t instanceof Ra){ze(r,l,e,t.basePoint,t.unitDir,!0);return}if(t instanceof Ea){const s=[t.getPointAt(0),t.getPointAt(1),t.getPointAt(2),t.getPointAt(3)];W(r,l,e,s,!0);return}if(t instanceof Na){const s=t.subGetGripPoints();s.length>=2&&W(r,l,e,s,s.length>=3);return}if(t instanceof _a){const s=t.vertices;s.length>=2&&W(r,l,e,s,!1);return}if(t instanceof Ta){Un(r,l,e,t);return}if(t instanceof Ua){Vn(r,l,e,t);return}if(t instanceof $a){const s=y(e,t.position);r.push({kind:"point",layer:l,x:s.x,y:s.y});return}if(t instanceof Va){const s=y(e,t.location);r.push({kind:"point",layer:l,x:s.x,y:s.y});return}if(t instanceof Ha){qn(r,l,e,t);return}if(t instanceof Za){const s=y(e,t.position);r.push({kind:"point",layer:l,x:s.x,y:s.y})}}}function vt(t,e,a,r,n,o,i){for(const l of t.newIterator())Jn(l,e,a,r,n,o,i)}function to(t){return new Yt(t.center,t.normal,{x:1,y:0,z:0},t.radius,t.radius,0,Da)}function eo(t){return new Yt(t.center,t.normal,{x:1,y:0,z:0},t.radius,t.radius,t.startAngle,t.endAngle)}function ao(t,e,a={}){const r=Sn(t,e);if(!r)return{primitives:[]};const n=[],o=new Qt;return vt(r,o,"0",n,new Set,t,a.includeLayer),{primitives:n}}const ta=["en","zh","cs","tr","ar"],ro={en:"EN",zh:"中",cs:"CS",tr:"TR",ar:"AR"};function no(t){if(t==null||t==="")return null;const e=t.toLowerCase().replace("_","-");for(const a of ta)if(e===a||e.startsWith(`${a}-`))return a;return null}const h={select:Wa,pan:Ka,zoomExtent:qa,measureDistance:rr,measureAngle:nr,measureArc:ir,measureArea:or,measureCoordinate:zr,clearMeasurements:sr,layer:tr,layout:er,zoomWindow:Ja,zoomOriginal:Lr,layerOn:kr,layerOff:Ar,osnap:Cr,orthoMode:Mr,polarTracking:Ir,chevronUp:yr,measure:ar,annotation:cr,markupCloud:Or,markupCallout:pr,markupText:hr,markupRect:Sr,markupCircle:Pr,markupArrow:fr,markupStamp:gr,markupImport:wr,markupExport:br,markupShow:Rr,clearMarkups:xr};function g(t,e,a){const r=Object.entries(a).map(([n,o])=>`${n}="${_t(o)}"`).join(" ");return`<button type="button" class="mlcad-tool-btn" title="${_t(e)}" aria-label="${_t(e)}" ${r}>${t}</button>`}function _t(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;")}const oo=[90,45,30,23,18,10,5];function io(){return'<button type="button" class="mlcad-tool-btn has-children" id="mlcad-lang-btn" aria-haspopup="true" aria-expanded="false" data-children-ui="toolbar" data-i18n-key="toolbar.language" data-i18n-attr="title aria-label" title="Language" aria-label="Language"><span class="mlcad-locale-option-badge" id="mlcad-lang-badge">EN</span></button>'}const lo={en:"toolbar.localeEn",zh:"toolbar.localeZh",cs:"toolbar.localeCs",tr:"toolbar.localeTr",ar:"toolbar.localeAr"},so={en:"English",zh:"中文",cs:"Čeština",tr:"Türkçe",ar:"العربية"};function co(){return`<div id="mlcad-locale-strip-wrap" hidden>
2
+ <div id="mlcad-locale-strip" role="toolbar" data-i18n-attr="aria-label" data-i18n-key="toolbar.language" aria-label="Language">
3
+ ${ta.map(t=>{const e=so[t],a=lo[t],r=ro[t];return`<button type="button" class="mlcad-tool-btn mlcad-locale-option" data-locale="${t}" data-i18n-key="${a}" data-i18n-attr="title aria-label" title="${e}" aria-label="${e}"><span class="mlcad-locale-option-badge">${r}</span></button>`}).join("")}
4
+ </div>
5
+ </div>`}function uo(){const t=oo.map(e=>`<button type="button" class="mlcad-tool-btn mlcad-settings-option-btn mlcad-polar-angle-btn" data-polar-ang="${e}" title="${e}°" aria-label="${e}°"><span class="mlcad-settings-option-indicator" aria-hidden="true"></span><span class="mlcad-settings-option-text">${e}°</span></button>`).join("");return`
6
+ <div id="mlcad-snap-strip-wrap" hidden>
7
+ <div id="mlcad-snap-strip" role="toolbar" data-i18n-attr="aria-label" data-i18n-key="toolbar.snap" aria-label="Object snap">
8
+ ${g(h.orthoMode,"Orthogonal mode",{id:"mlcad-ortho-btn","data-toggle":"ortho","data-i18n-key":"settings.ortho","data-i18n-attr":"title aria-label"})}
9
+ ${g(h.polarTracking,"Polar tracking",{id:"mlcad-polar-btn","data-toggle":"polar","data-i18n-key":"settings.polar","data-i18n-attr":"title aria-label"})}
10
+ </div>
11
+ <div id="mlcad-polar-angles" role="group" data-i18n-attr="aria-label" data-i18n-key="settings.polarAngles" aria-label="Polar tracking angles" hidden>
12
+ ${t}
13
+ </div>
14
+ </div>`}const mo=`
15
+ :root {
16
+ --mlcad-ui-bg: rgba(24, 26, 30, 0.94);
17
+ --mlcad-ui-bg-elevated: rgba(32, 35, 40, 0.98);
18
+ --mlcad-ui-border: rgba(255, 255, 255, 0.1);
19
+ --mlcad-ui-text: #e8eaed;
20
+ --mlcad-ui-muted: #9aa0a6;
21
+ --mlcad-accent: #08e8de;
22
+ --mlcad-accent-active: #1a8cff;
23
+ --mlcad-measure-accent: #08e8de;
24
+ --mlcad-measure-accent-border: rgba(8, 232, 222, 0.45);
25
+ --mlcad-measure-accent-fill: rgba(8, 232, 222, 0.2);
26
+ --mlcad-markup-accent: #e53935;
27
+ --mlcad-markup-accent-border: rgba(229, 57, 53, 0.45);
28
+ --mlcad-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
29
+ --mlcad-toolbar-width: 44px;
30
+ --mlcad-drawer-width: 220px;
31
+ --mlcad-drawer-gap: 8px;
32
+ --mlcad-ui-inset: 12px;
33
+ --mlcad-z-chrome: 7;
34
+ --mlcad-z-measure: 5;
35
+ --mlcad-z-markup: 6;
36
+ }
37
+ html, body {
38
+ margin: 0; height: 100%; overflow: hidden;
39
+ background: #121418;
40
+ font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
41
+ color: var(--mlcad-ui-text);
42
+ }
43
+ #mlcad-root { position: relative; width: 100%; height: 100%; }
44
+ #mlcad-root canvas {
45
+ display: block;
46
+ width: 100%;
47
+ height: 100%;
48
+ touch-action: none;
49
+ }
50
+
51
+ #mlcad-sidebar {
52
+ position: absolute;
53
+ left: var(--mlcad-ui-inset);
54
+ top: 50%;
55
+ z-index: var(--mlcad-z-chrome);
56
+ transform: translateY(-50%);
57
+ display: flex;
58
+ align-items: flex-start;
59
+ gap: var(--mlcad-drawer-gap);
60
+ max-width: calc(100% - 2 * var(--mlcad-ui-inset));
61
+ box-sizing: border-box;
62
+ pointer-events: none;
63
+ }
64
+ #mlcad-sidebar > * { pointer-events: auto; }
65
+
66
+ #mlcad-toolbar {
67
+ flex-shrink: 0;
68
+ display: flex; flex-direction: column; gap: 4px;
69
+ padding: 6px;
70
+ background: var(--mlcad-ui-bg);
71
+ border: 1px solid var(--mlcad-ui-border);
72
+ border-radius: 8px;
73
+ box-shadow: var(--mlcad-shadow);
74
+ backdrop-filter: blur(12px);
75
+ }
76
+ .mlcad-tool-btn {
77
+ position: relative;
78
+ display: flex; align-items: center; justify-content: center;
79
+ width: var(--mlcad-toolbar-width); height: var(--mlcad-toolbar-width);
80
+ margin: 0; padding: 0;
81
+ border: 1px solid transparent;
82
+ border-radius: 6px;
83
+ background: transparent;
84
+ color: var(--mlcad-ui-text);
85
+ cursor: pointer;
86
+ transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
87
+ }
88
+ .mlcad-tool-btn:hover {
89
+ background: rgba(255, 255, 255, 0.08);
90
+ border-color: var(--mlcad-ui-border);
91
+ }
92
+ .mlcad-tool-btn.active,
93
+ .mlcad-tool-btn.is-menu-open {
94
+ background: rgba(26, 140, 255, 0.22);
95
+ border-color: rgba(26, 140, 255, 0.55);
96
+ color: #fff;
97
+ }
98
+ .mlcad-tool-btn svg {
99
+ width: 20px; height: 20px; display: block; flex-shrink: 0;
100
+ }
101
+ /* Flyout mark: opaque corner triangle (cad-simple-ui-plugin is-left style). */
102
+ .mlcad-tool-btn.has-children::after {
103
+ content: '';
104
+ position: absolute;
105
+ right: 1px;
106
+ bottom: 1px;
107
+ width: 6px;
108
+ height: 6px;
109
+ background: currentColor;
110
+ clip-path: polygon(100% 100%, 0 100%, 100% 0);
111
+ pointer-events: none;
112
+ }
113
+ .mlcad-dropdown {
114
+ position: fixed;
115
+ z-index: 40;
116
+ min-width: 180px;
117
+ max-width: min(280px, calc(100vw - 24px));
118
+ max-height: min(360px, calc(100vh - 24px));
119
+ overflow-y: auto;
120
+ padding: 4px;
121
+ background: var(--mlcad-ui-bg-elevated);
122
+ border: 1px solid var(--mlcad-ui-border);
123
+ border-radius: 8px;
124
+ box-shadow: var(--mlcad-shadow);
125
+ backdrop-filter: blur(12px);
126
+ }
127
+ .mlcad-dropdown-item {
128
+ display: flex;
129
+ align-items: center;
130
+ gap: 8px;
131
+ width: 100%;
132
+ box-sizing: border-box;
133
+ margin: 0;
134
+ padding: 6px 8px;
135
+ border: none;
136
+ border-radius: 5px;
137
+ background: transparent;
138
+ color: var(--mlcad-ui-text);
139
+ font-size: 12px;
140
+ font-weight: 500;
141
+ text-align: left;
142
+ cursor: pointer;
143
+ }
144
+ .mlcad-dropdown-item:hover {
145
+ background: rgba(255, 255, 255, 0.08);
146
+ }
147
+ .mlcad-dropdown-item.active,
148
+ .mlcad-dropdown-item.is-toggled {
149
+ background: rgba(26, 140, 255, 0.22);
150
+ color: #fff;
151
+ }
152
+ .mlcad-dropdown-icon {
153
+ display: inline-flex;
154
+ width: 18px;
155
+ height: 18px;
156
+ flex-shrink: 0;
157
+ align-items: center;
158
+ justify-content: center;
159
+ }
160
+ .mlcad-dropdown-icon svg {
161
+ width: 18px;
162
+ height: 18px;
163
+ display: block;
164
+ }
165
+ .mlcad-dropdown-label {
166
+ overflow: hidden;
167
+ text-overflow: ellipsis;
168
+ white-space: nowrap;
169
+ }
170
+ .mlcad-dropdown-separator {
171
+ height: 1px;
172
+ margin: 4px 6px;
173
+ background: var(--mlcad-ui-border);
174
+ }
175
+ #mlcad-toolbar-toggle {
176
+ height: calc(var(--mlcad-toolbar-width) / 2);
177
+ margin-top: -4px;
178
+ margin-bottom: -4px;
179
+ border-radius: 4px;
180
+ }
181
+ #mlcad-toolbar-toggle svg {
182
+ width: calc(var(--mlcad-toolbar-width) / 2);
183
+ height: calc(var(--mlcad-toolbar-width) / 2);
184
+ }
185
+ .mlcad-tool-separator {
186
+ height: 1px;
187
+ margin: 4px 8px;
188
+ background: var(--mlcad-ui-border);
189
+ }
190
+ .mlcad-locale-option-badge {
191
+ font-size: 10px;
192
+ font-weight: 700;
193
+ line-height: 1;
194
+ }
195
+ #mlcad-lang-btn .mlcad-locale-option-badge {
196
+ font-size: 12px;
197
+ }
198
+ #mlcad-zoom-window-rect {
199
+ position: fixed;
200
+ z-index: 25;
201
+ box-sizing: border-box;
202
+ pointer-events: none;
203
+ border: 1px dashed var(--mlcad-accent, #08e8de);
204
+ background: rgba(8, 232, 222, 0.12);
205
+ }
206
+ #mlcad-zoom-window-rect[hidden] { display: none; }
207
+
208
+ #mlcad-layer-drawer {
209
+ flex-shrink: 1;
210
+ min-width: 0;
211
+ width: var(--mlcad-drawer-width);
212
+ max-height: min(420px, calc(100vh - 48px));
213
+ display: flex; flex-direction: column;
214
+ background: var(--mlcad-ui-bg-elevated);
215
+ border: 1px solid var(--mlcad-ui-border);
216
+ border-radius: 8px;
217
+ box-shadow: var(--mlcad-shadow);
218
+ backdrop-filter: blur(12px);
219
+ overflow: hidden;
220
+ }
221
+ #mlcad-layer-drawer[hidden] { display: none; }
222
+
223
+ .mlcad-drawer-header {
224
+ display: flex; align-items: center; justify-content: space-between;
225
+ gap: 6px; padding: 8px 10px;
226
+ border-bottom: 1px solid var(--mlcad-ui-border);
227
+ font-size: 13px; font-weight: 600;
228
+ }
229
+ .mlcad-drawer-close {
230
+ width: 28px; height: 28px; padding: 0;
231
+ border: none; border-radius: 4px;
232
+ background: transparent; color: var(--mlcad-ui-muted);
233
+ cursor: pointer; font-size: 18px; line-height: 1;
234
+ }
235
+ .mlcad-drawer-close:hover {
236
+ background: rgba(255, 255, 255, 0.08); color: var(--mlcad-ui-text);
237
+ }
238
+
239
+ .mlcad-layer-actions {
240
+ display: flex; gap: 4px; padding: 6px 8px;
241
+ border-bottom: 1px solid var(--mlcad-ui-border);
242
+ }
243
+ .mlcad-layer-action-btn {
244
+ flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
245
+ min-height: 30px; padding: 4px 8px;
246
+ border: 1px solid var(--mlcad-ui-border);
247
+ border-radius: 5px;
248
+ background: rgba(255, 255, 255, 0.04);
249
+ color: var(--mlcad-ui-text);
250
+ font-size: 12px; cursor: pointer;
251
+ }
252
+ .mlcad-layer-action-btn:hover { background: rgba(255, 255, 255, 0.1); }
253
+ .mlcad-layer-action-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
254
+
255
+ #mlcad-layer-list {
256
+ flex: 1; overflow: auto; padding: 4px 0;
257
+ }
258
+ .mlcad-layer-item {
259
+ display: grid;
260
+ grid-template-columns: auto auto 1fr auto;
261
+ align-items: center; gap: 6px;
262
+ padding: 5px 8px;
263
+ font-size: 12px; cursor: pointer;
264
+ }
265
+ .mlcad-layer-item:hover { background: rgba(255, 255, 255, 0.05); }
266
+ .mlcad-layer-item input { margin: 0; cursor: pointer; }
267
+ .mlcad-layer-swatch {
268
+ width: 12px; height: 12px; border-radius: 2px;
269
+ border: 1px solid rgba(255, 255, 255, 0.28);
270
+ }
271
+ .mlcad-layer-name {
272
+ overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
273
+ }
274
+ .mlcad-layer-zoom {
275
+ display: flex; align-items: center; justify-content: center;
276
+ width: 22px; height: 22px; padding: 0;
277
+ border: 1px solid transparent; border-radius: 4px;
278
+ background: transparent; color: var(--mlcad-ui-muted);
279
+ cursor: pointer;
280
+ }
281
+ .mlcad-layer-zoom svg {
282
+ width: 14px; height: 14px; display: block;
283
+ }
284
+ .mlcad-layer-zoom:hover:not(:disabled) {
285
+ color: var(--mlcad-accent);
286
+ border-color: var(--mlcad-ui-border);
287
+ background: rgba(255, 255, 255, 0.06);
288
+ }
289
+ .mlcad-layer-zoom:disabled { opacity: 0.35; cursor: not-allowed; }
290
+
291
+ #mlcad-status-bar {
292
+ position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: var(--mlcad-z-chrome);
293
+ display: flex; align-items: center; min-height: 28px; padding: 0 12px;
294
+ border: 1px solid var(--mlcad-ui-border);
295
+ border-radius: 6px;
296
+ background: var(--mlcad-ui-bg);
297
+ color: var(--mlcad-ui-muted);
298
+ font-size: 12px;
299
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
300
+ backdrop-filter: blur(10px);
301
+ pointer-events: none;
302
+ }
303
+
304
+ #mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-snap-strip-wrap,
305
+ #mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-measure-strip-wrap,
306
+ #mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-markup-strip-wrap,
307
+ #mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-zoom-strip-wrap,
308
+ #mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-locale-strip-wrap,
309
+ #mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-layer-drawer {
310
+ display: none !important;
311
+ }
312
+ #mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-toolbar .mlcad-tool-btn:not(#mlcad-toolbar-toggle) {
313
+ display: none;
314
+ }
315
+ #mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-toolbar .mlcad-tool-separator {
316
+ display: none;
317
+ }
318
+
319
+ #mlcad-snap-strip-wrap,
320
+ #mlcad-measure-strip-wrap,
321
+ #mlcad-markup-strip-wrap,
322
+ #mlcad-zoom-strip-wrap,
323
+ #mlcad-locale-strip-wrap {
324
+ flex-shrink: 0;
325
+ min-width: 0;
326
+ display: flex;
327
+ flex-direction: row;
328
+ align-items: flex-start;
329
+ gap: var(--mlcad-drawer-gap);
330
+ }
331
+ #mlcad-snap-strip-wrap[hidden],
332
+ #mlcad-measure-strip-wrap[hidden],
333
+ #mlcad-markup-strip-wrap[hidden],
334
+ #mlcad-zoom-strip-wrap[hidden],
335
+ #mlcad-locale-strip-wrap[hidden] { display: none; }
336
+
337
+ #mlcad-snap-strip,
338
+ #mlcad-measure-strip,
339
+ #mlcad-markup-strip,
340
+ #mlcad-zoom-strip,
341
+ #mlcad-locale-strip {
342
+ flex-shrink: 0;
343
+ display: flex;
344
+ flex-direction: column;
345
+ align-items: stretch;
346
+ gap: 4px;
347
+ padding: 6px;
348
+ background: var(--mlcad-ui-bg);
349
+ border: 1px solid var(--mlcad-ui-border);
350
+ border-radius: 8px;
351
+ box-shadow: var(--mlcad-shadow);
352
+ backdrop-filter: blur(12px);
353
+ }
354
+ #mlcad-measure-strip .mlcad-tool-separator,
355
+ #mlcad-markup-strip .mlcad-tool-separator {
356
+ margin: 2px 4px;
357
+ }
358
+
359
+ #mlcad-polar-angles {
360
+ flex-shrink: 0;
361
+ display: inline-flex;
362
+ flex-direction: column;
363
+ align-items: stretch;
364
+ gap: 4px;
365
+ padding: 6px;
366
+ max-width: min(280px, calc(100vw - 2 * var(--mlcad-ui-inset) - 3 * var(--mlcad-toolbar-width) - 3 * var(--mlcad-drawer-gap)));
367
+ background: var(--mlcad-ui-bg);
368
+ border: 1px solid var(--mlcad-ui-border);
369
+ border-radius: 8px;
370
+ box-shadow: var(--mlcad-shadow);
371
+ backdrop-filter: blur(12px);
372
+ }
373
+ #mlcad-polar-angles[hidden] { display: none; }
374
+
375
+ .mlcad-color-input {
376
+ position: absolute;
377
+ width: 0;
378
+ height: 0;
379
+ opacity: 0;
380
+ pointer-events: none;
381
+ }
382
+ .mlcad-settings-option-btn {
383
+ width: 100%;
384
+ box-sizing: border-box;
385
+ height: var(--mlcad-toolbar-width);
386
+ justify-content: flex-start;
387
+ gap: 8px;
388
+ padding: 0 10px;
389
+ font-size: 11px;
390
+ font-weight: 500;
391
+ }
392
+ .mlcad-settings-option-indicator {
393
+ flex-shrink: 0;
394
+ width: 10px;
395
+ height: 10px;
396
+ border: 1px solid var(--mlcad-ui-muted);
397
+ border-radius: 2px;
398
+ box-sizing: border-box;
399
+ transition: background 0.15s ease, border-color 0.15s ease;
400
+ }
401
+ .mlcad-settings-option-btn.active .mlcad-settings-option-indicator {
402
+ background: var(--mlcad-accent);
403
+ border-color: var(--mlcad-accent);
404
+ }
405
+ .mlcad-settings-option-text {
406
+ overflow: hidden;
407
+ text-overflow: ellipsis;
408
+ white-space: nowrap;
409
+ pointer-events: none;
410
+ line-height: 1.2;
411
+ }
412
+
413
+ #mlcad-measure-overlays {
414
+ position: absolute;
415
+ inset: 0;
416
+ pointer-events: none;
417
+ z-index: var(--mlcad-z-measure);
418
+ overflow: hidden;
419
+ }
420
+ .mlcad-measure-canvas {
421
+ position: absolute;
422
+ left: 0;
423
+ top: 0;
424
+ pointer-events: none;
425
+ }
426
+ .mlcad-measure-dot {
427
+ position: absolute;
428
+ width: 10px;
429
+ height: 10px;
430
+ border-radius: 50%;
431
+ background: var(--mlcad-measure-accent);
432
+ border: 2px solid rgba(255, 255, 255, 0.9);
433
+ box-sizing: border-box;
434
+ transform: translate(-50%, -50%);
435
+ pointer-events: none;
436
+ }
437
+ .mlcad-measure-badge {
438
+ position: absolute;
439
+ padding: 3px 10px;
440
+ border-radius: 14px;
441
+ background: var(--mlcad-ui-bg-elevated);
442
+ border: 1px solid var(--mlcad-measure-accent-border);
443
+ color: var(--mlcad-measure-accent);
444
+ font-size: 12px;
445
+ font-weight: 600;
446
+ white-space: nowrap;
447
+ transform: translate(-50%, -50%);
448
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
449
+ pointer-events: none;
450
+ }
451
+ .mlcad-measure-badge--coordinate {
452
+ transform: translate(-50%, calc(-50% - 16px));
453
+ }
454
+ .mlcad-measure-dot.mlcad-measure-selected {
455
+ box-shadow:
456
+ 0 0 0 2px rgba(255, 213, 79, 0.75),
457
+ 0 0 10px rgba(255, 213, 79, 0.95),
458
+ 0 0 18px rgba(255, 213, 79, 0.55);
459
+ }
460
+ .mlcad-measure-badge.mlcad-measure-selected {
461
+ outline: 2px solid rgba(255, 213, 79, 0.85);
462
+ outline-offset: 1px;
463
+ box-shadow:
464
+ 0 0 0 2px rgba(255, 213, 79, 0.4),
465
+ 0 0 12px rgba(255, 213, 79, 0.75),
466
+ 0 2px 8px rgba(0, 0, 0, 0.35);
467
+ }
468
+ .mlcad-measure-canvas.mlcad-measure-selected {
469
+ filter:
470
+ drop-shadow(0 0 1.5px #ffd54f)
471
+ drop-shadow(0 0 4px rgba(255, 213, 79, 0.95))
472
+ drop-shadow(0 0 8px rgba(255, 213, 79, 0.55));
473
+ }
474
+ .mlcad-measure-live-label {
475
+ position: absolute;
476
+ pointer-events: none;
477
+ color: var(--mlcad-measure-accent);
478
+ font-size: 12px;
479
+ font-weight: 600;
480
+ text-shadow: 0 0 4px #000, 0 1px 3px #000;
481
+ transform: translate(-50%, -120%);
482
+ display: none;
483
+ }
484
+
485
+ #mlcad-markup-overlays {
486
+ position: absolute;
487
+ inset: 0;
488
+ pointer-events: none;
489
+ z-index: var(--mlcad-z-markup);
490
+ overflow: hidden;
491
+ }
492
+ .mlcad-markup-canvas {
493
+ position: absolute;
494
+ left: 0;
495
+ top: 0;
496
+ pointer-events: none;
497
+ }
498
+ .mlcad-markup-badge,
499
+ .mlcad-markup-stamp {
500
+ position: absolute;
501
+ padding: 3px 10px;
502
+ border-radius: 14px;
503
+ background: var(--mlcad-ui-bg-elevated);
504
+ border: 1px solid var(--mlcad-markup-accent-border);
505
+ color: var(--mlcad-markup-accent);
506
+ font-size: 12px;
507
+ font-weight: 600;
508
+ white-space: pre-wrap;
509
+ max-width: 240px;
510
+ min-width: 80px;
511
+ min-height: 1.75em;
512
+ box-sizing: border-box;
513
+ transform: translate(-50%, -50%);
514
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
515
+ pointer-events: auto;
516
+ cursor: grab;
517
+ touch-action: none;
518
+ user-select: none;
519
+ }
520
+ .mlcad-markup-stamp {
521
+ border-radius: 4px;
522
+ border-width: 2px;
523
+ text-transform: uppercase;
524
+ letter-spacing: 0.04em;
525
+ font-size: 11px;
526
+ white-space: nowrap;
527
+ min-width: 0;
528
+ }
529
+ .mlcad-markup-dot {
530
+ position: absolute;
531
+ width: 10px;
532
+ height: 10px;
533
+ border-radius: 50%;
534
+ background: var(--mlcad-markup-accent);
535
+ border: 2px solid rgba(255, 255, 255, 0.9);
536
+ box-sizing: border-box;
537
+ transform: translate(-50%, -50%);
538
+ pointer-events: auto;
539
+ cursor: grab;
540
+ touch-action: none;
541
+ }
542
+ .mlcad-markup-dot.mlcad-markup-selected {
543
+ box-shadow:
544
+ 0 0 0 2px rgba(255, 213, 79, 0.75),
545
+ 0 0 10px rgba(255, 213, 79, 0.95),
546
+ 0 0 18px rgba(255, 213, 79, 0.55);
547
+ }
548
+ .mlcad-markup-badge.mlcad-markup-selected,
549
+ .mlcad-markup-stamp.mlcad-markup-selected {
550
+ outline: 2px solid rgba(255, 213, 79, 0.85);
551
+ outline-offset: 1px;
552
+ box-shadow:
553
+ 0 0 0 2px rgba(255, 213, 79, 0.4),
554
+ 0 0 12px rgba(255, 213, 79, 0.75),
555
+ 0 2px 8px rgba(0, 0, 0, 0.35);
556
+ }
557
+ .mlcad-markup-canvas.mlcad-markup-selected {
558
+ filter:
559
+ drop-shadow(0 0 1.5px #ffd54f)
560
+ drop-shadow(0 0 4px rgba(255, 213, 79, 0.95))
561
+ drop-shadow(0 0 8px rgba(255, 213, 79, 0.55));
562
+ }
563
+
564
+ #mlcad-loading {
565
+ position: fixed; inset: 0; z-index: 100;
566
+ display: flex; align-items: center; justify-content: center;
567
+ background: #121418;
568
+ transition: opacity 0.35s ease, visibility 0.35s ease;
569
+ }
570
+ #mlcad-loading.mlcad-loading--done {
571
+ opacity: 0; visibility: hidden; pointer-events: none;
572
+ }
573
+ #mlcad-loading.mlcad-loading--gate .mlcad-loading-spinner {
574
+ display: none;
575
+ }
576
+ .mlcad-loading-spinner {
577
+ width: 48px; height: 48px; box-sizing: border-box;
578
+ border: 3px solid rgba(255, 255, 255, 0.12);
579
+ border-top-color: var(--mlcad-accent);
580
+ border-radius: 50%;
581
+ animation: mlcad-spin 0.85s linear infinite;
582
+ }
583
+ @keyframes mlcad-spin { to { transform: rotate(360deg); } }
584
+
585
+ #mlcad-access-gate {
586
+ display: flex;
587
+ align-items: center;
588
+ justify-content: center;
589
+ width: 100%;
590
+ max-width: 360px;
591
+ padding: 0 20px;
592
+ box-sizing: border-box;
593
+ }
594
+ #mlcad-access-gate[hidden] {
595
+ display: none !important;
596
+ }
597
+ .mlcad-access-card {
598
+ width: 100%;
599
+ padding: 24px 20px;
600
+ border-radius: 10px;
601
+ border: 1px solid var(--mlcad-ui-border);
602
+ background: var(--mlcad-ui-bg-elevated);
603
+ box-shadow: var(--mlcad-shadow);
604
+ box-sizing: border-box;
605
+ }
606
+ .mlcad-access-title {
607
+ margin: 0 0 8px;
608
+ font-size: 16px;
609
+ font-weight: 600;
610
+ color: var(--mlcad-ui-text);
611
+ text-align: center;
612
+ }
613
+ .mlcad-access-hint {
614
+ margin: 0 0 16px;
615
+ font-size: 13px;
616
+ line-height: 1.45;
617
+ color: var(--mlcad-ui-muted);
618
+ text-align: center;
619
+ }
620
+ .mlcad-access-expiry {
621
+ margin: -8px 0 16px;
622
+ font-size: 12px;
623
+ line-height: 1.4;
624
+ color: var(--mlcad-ui-muted);
625
+ text-align: center;
626
+ }
627
+ .mlcad-access-expiry[hidden] {
628
+ display: none;
629
+ }
630
+ .mlcad-access-expiry.mlcad-expiry-countdown {
631
+ width: fit-content;
632
+ max-width: 100%;
633
+ margin-left: auto;
634
+ margin-right: auto;
635
+ margin-bottom: 16px;
636
+ padding: 6px 10px;
637
+ border-radius: 6px;
638
+ box-sizing: border-box;
639
+ }
640
+ .mlcad-access-field {
641
+ display: flex;
642
+ gap: 8px;
643
+ margin-bottom: 12px;
644
+ }
645
+ .mlcad-access-field input {
646
+ flex: 1 1 auto;
647
+ min-width: 0;
648
+ height: 36px;
649
+ padding: 0 12px;
650
+ border-radius: 6px;
651
+ border: 1px solid var(--mlcad-ui-border);
652
+ background: rgba(0, 0, 0, 0.25);
653
+ color: var(--mlcad-ui-text);
654
+ font: inherit;
655
+ box-sizing: border-box;
656
+ }
657
+ .mlcad-access-field input:focus {
658
+ outline: none;
659
+ border-color: rgba(26, 140, 255, 0.65);
660
+ box-shadow: 0 0 0 2px rgba(26, 140, 255, 0.2);
661
+ }
662
+ .mlcad-access-submit {
663
+ width: 100%;
664
+ height: 36px;
665
+ border: 1px solid rgba(26, 140, 255, 0.55);
666
+ border-radius: 6px;
667
+ background: rgba(26, 140, 255, 0.22);
668
+ color: #fff;
669
+ font: inherit;
670
+ font-weight: 600;
671
+ cursor: pointer;
672
+ }
673
+ .mlcad-access-submit:hover {
674
+ background: rgba(26, 140, 255, 0.32);
675
+ }
676
+ .mlcad-access-error {
677
+ margin: 0;
678
+ font-size: 12px;
679
+ line-height: 1.4;
680
+ color: #ff8a80;
681
+ text-align: center;
682
+ }
683
+ .mlcad-access-error[hidden] {
684
+ display: none;
685
+ }
686
+ .mlcad-access-gate--locked .mlcad-access-submit:disabled,
687
+ .mlcad-access-gate--locked .mlcad-access-field input:disabled {
688
+ opacity: 0.55;
689
+ cursor: not-allowed;
690
+ }
691
+ .mlcad-access-field[hidden],
692
+ .mlcad-access-submit[hidden],
693
+ .mlcad-access-gate--expired .mlcad-access-field,
694
+ .mlcad-access-gate--expired .mlcad-access-submit,
695
+ .mlcad-access-gate--expired #mlcad-access-expiry,
696
+ .mlcad-access-gate--expired #mlcad-access-error {
697
+ display: none !important;
698
+ }
699
+ .mlcad-expiry-badge {
700
+ position: fixed;
701
+ top: var(--mlcad-ui-inset);
702
+ right: var(--mlcad-ui-inset);
703
+ z-index: 40;
704
+ max-width: min(360px, calc(100vw - 2 * var(--mlcad-ui-inset)));
705
+ padding: 8px 12px;
706
+ border-radius: 6px;
707
+ border: 1px solid var(--mlcad-ui-border);
708
+ background: var(--mlcad-ui-bg-elevated);
709
+ box-shadow: var(--mlcad-shadow);
710
+ color: var(--mlcad-ui-text);
711
+ font-size: 12px;
712
+ line-height: 1.4;
713
+ pointer-events: none;
714
+ }
715
+ .mlcad-expiry-badge[hidden] {
716
+ display: none !important;
717
+ }
718
+ .mlcad-expiry-countdown {
719
+ border-color: rgba(255, 152, 0, 0.55);
720
+ background: rgba(255, 152, 0, 0.16);
721
+ color: #ffcc80;
722
+ font-variant-numeric: tabular-nums;
723
+ }
724
+
725
+ @media (max-width: ${ca}px) {
726
+ :root {
727
+ --mlcad-drawer-width: min(200px, calc(100vw - 2 * var(--mlcad-ui-inset) - var(--mlcad-toolbar-width) - var(--mlcad-drawer-gap)));
728
+ --mlcad-ui-inset: 8px;
729
+ }
730
+ #mlcad-sidebar {
731
+ left: var(--mlcad-ui-inset);
732
+ right: var(--mlcad-ui-inset);
733
+ width: auto;
734
+ }
735
+ #mlcad-layer-drawer {
736
+ margin-left: auto;
737
+ max-width: calc(100vw - 2 * var(--mlcad-ui-inset) - var(--mlcad-toolbar-width) - var(--mlcad-drawer-gap));
738
+ }
739
+ .mlcad-layer-action-btn {
740
+ min-height: 28px;
741
+ padding: 3px 6px;
742
+ font-size: 11px;
743
+ gap: 4px;
744
+ }
745
+ .mlcad-layer-action-btn svg { width: 12px; height: 12px; }
746
+ .mlcad-layer-zoom {
747
+ width: 20px;
748
+ height: 20px;
749
+ }
750
+ .mlcad-layer-zoom svg {
751
+ width: 12px;
752
+ height: 12px;
753
+ }
754
+ }
755
+ `;function po(t,e="measure",a=!0){const r=e==="measure"?wo():"",n=e==="measure"?bo():"",o=e==="measure"?yo():"",i=io(),l="",s=`${go()}${e==="measure"?`${xo()}${vo()}${uo()}`:""}${co()}`;return`
756
+ <div id="mlcad-loading" aria-hidden="true" style="background:${t}">
757
+ <div class="mlcad-loading-spinner"></div>
758
+ <div id="mlcad-access-gate" hidden>
759
+ <form id="mlcad-access-form" class="mlcad-access-card">
760
+ <h2 class="mlcad-access-title" data-i18n-key="access.title" data-i18n-text>Protected drawing</h2>
761
+ <p class="mlcad-access-hint" data-i18n-key="access.passwordPrompt" data-i18n-text>Enter the password to open this file.</p>
762
+ <p id="mlcad-access-expiry" class="mlcad-access-expiry" hidden></p>
763
+ <div class="mlcad-access-field">
764
+ <input
765
+ id="mlcad-access-password"
766
+ type="password"
767
+ autocomplete="off"
768
+ data-i18n-key="access.passwordPlaceholder"
769
+ data-i18n-attr="placeholder aria-label"
770
+ placeholder="Password"
771
+ aria-label="Password"
772
+ />
773
+ </div>
774
+ <button type="submit" class="mlcad-access-submit" data-i18n-key="access.unlock" data-i18n-text>Unlock</button>
775
+ <p id="mlcad-access-error" class="mlcad-access-error" hidden></p>
776
+ </form>
777
+ </div>
778
+ </div>
779
+ <div id="mlcad-root">
780
+ <aside id="mlcad-sidebar">
781
+ <nav id="mlcad-toolbar" data-i18n-attr="aria-label" data-i18n-key="toolbar.viewerTools" aria-label="Viewer tools">
782
+ ${g(h.select,"Select",{"data-action":"select","aria-pressed":"false","data-i18n-key":"toolbar.select","data-i18n-attr":"title aria-label"})}
783
+ ${g(h.pan,"Pan",{"data-action":"pan","aria-pressed":"true","data-i18n-key":"toolbar.pan","data-i18n-attr":"title aria-label"})}
784
+ ${fo()}
785
+ ${e==="measure"?yt():""}
786
+ ${r}
787
+ ${n}
788
+ ${e==="measure"?yt():""}
789
+ ${g(h.layer,"Layers",{id:"mlcad-layers-btn","aria-haspopup":"dialog","aria-expanded":"false","data-i18n-key":"toolbar.layers","data-i18n-attr":"title aria-label"})}
790
+ ${a?ho():""}
791
+ ${o}
792
+ ${i}
793
+ ${g(h.chevronUp,"Collapse toolbar",{id:"mlcad-toolbar-toggle","aria-expanded":"true","data-i18n-key":"toolbar.collapse","data-i18n-attr":"title aria-label"})}
794
+ </nav>
795
+ ${s}
796
+ <div id="mlcad-layer-drawer" role="dialog" data-i18n-attr="aria-label" data-i18n-key="layers.title" aria-label="Layers" hidden>
797
+ <div class="mlcad-drawer-header">
798
+ <span data-i18n-key="layers.title" data-i18n-text>Layers</span>
799
+ <button type="button" class="mlcad-drawer-close" id="mlcad-layer-close" data-i18n-key="layers.close" data-i18n-attr="aria-label" aria-label="Close layers">×</button>
800
+ </div>
801
+ <div class="mlcad-layer-actions">
802
+ <button type="button" class="mlcad-layer-action-btn" id="mlcad-layer-show-all">
803
+ ${h.layerOn}<span data-i18n-key="layers.showAll" data-i18n-text>Show all</span>
804
+ </button>
805
+ <button type="button" class="mlcad-layer-action-btn" id="mlcad-layer-hide-all">
806
+ ${h.layerOff}<span data-i18n-key="layers.hideAll" data-i18n-text>Hide all</span>
807
+ </button>
808
+ </div>
809
+ <div id="mlcad-layer-list"></div>
810
+ </div>
811
+ </aside>
812
+ <footer id="mlcad-status-bar" aria-live="polite"></footer>
813
+ </div>
814
+ ${l}`}function yt(){return'<div class="mlcad-tool-separator" aria-hidden="true"></div>'}function ho(){return g(h.layout,"Layout",{id:"mlcad-layout-menu-btn","aria-haspopup":"menu","aria-expanded":"false","data-action":"layout-menu","data-i18n-key":"toolbar.layout","data-i18n-attr":"title aria-label","data-children-ui":"menu"}).replace('class="mlcad-tool-btn"','class="mlcad-tool-btn has-children"')}function fo(){return g(h.zoomExtent,"Zoom",{id:"mlcad-zoom-menu-btn","aria-haspopup":"true","aria-expanded":"false","data-action":"zoom-menu","data-i18n-key":"toolbar.zoom","data-i18n-attr":"title aria-label","data-children-ui":"toolbar"}).replace('class="mlcad-tool-btn"','class="mlcad-tool-btn has-children"')}function go(){return`<div id="mlcad-zoom-strip-wrap" hidden>
815
+ <div id="mlcad-zoom-strip" role="toolbar" data-i18n-attr="aria-label" data-i18n-key="toolbar.zoom" aria-label="Zoom">
816
+ ${g(h.zoomExtent,"Zoom extents",{"data-action":"fit","data-i18n-key":"toolbar.zoomExtents","data-i18n-attr":"title aria-label"})}
817
+ ${g(h.zoomWindow,"Zoom window",{"data-action":"zoom-window","aria-pressed":"false","data-i18n-key":"toolbar.zoomWindow","data-i18n-attr":"title aria-label"})}
818
+ ${g(h.zoomOriginal,"Original view",{"data-action":"zoom-original","data-i18n-key":"toolbar.zoomOriginal","data-i18n-attr":"title aria-label"})}
819
+ </div>
820
+ </div>`}function wo(){return g(h.measure,"Measurement",{id:"mlcad-measure-menu-btn","aria-haspopup":"true","aria-expanded":"false","data-action":"measure-menu","data-i18n-key":"toolbar.measure","data-i18n-attr":"title aria-label","data-children-ui":"sticky-toolbar"}).replace('class="mlcad-tool-btn"','class="mlcad-tool-btn has-children"')}function bo(){return g(h.annotation,"Review",{id:"mlcad-markup-menu-btn","aria-haspopup":"true","aria-expanded":"false","data-action":"markup-menu","data-i18n-key":"toolbar.annotation","data-i18n-attr":"title aria-label","data-children-ui":"sticky-toolbar"}).replace('class="mlcad-tool-btn"','class="mlcad-tool-btn has-children"')}function xo(){return`<div id="mlcad-measure-strip-wrap" hidden>
821
+ <div id="mlcad-measure-strip" role="toolbar" data-i18n-attr="aria-label" data-i18n-key="toolbar.measure" aria-label="Measurement">
822
+ ${g(h.measureDistance,"Measure distance",{"data-action":"measure","data-measure-mode":"distance","data-i18n-key":"toolbar.measureDistance","data-i18n-attr":"title aria-label"})}
823
+ ${g(h.measureAngle,"Measure angle",{"data-action":"measure","data-measure-mode":"angle","data-i18n-key":"toolbar.measureAngle","data-i18n-attr":"title aria-label"})}
824
+ ${g(h.measureArc,"Measure arc length",{"data-action":"measure","data-measure-mode":"arc","data-i18n-key":"toolbar.measureArc","data-i18n-attr":"title aria-label"})}
825
+ ${g(h.measureArea,"Measure area",{"data-action":"measure","data-measure-mode":"area","data-i18n-key":"toolbar.measureArea","data-i18n-attr":"title aria-label"})}
826
+ ${g(h.measureCoordinate,"Measure coordinates",{"data-action":"measure","data-measure-mode":"coordinate","data-i18n-key":"toolbar.measureCoordinate","data-i18n-attr":"title aria-label"})}
827
+ ${g(h.markupShow,"Hide measurements",{"data-action":"measure-visibility","data-i18n-key":"toolbar.measureHide","data-i18n-attr":"title aria-label"})}
828
+ ${g(h.clearMeasurements,"Clear measurements",{"data-action":"clear-measurements","data-i18n-key":"toolbar.clearMeasurements","data-i18n-attr":"title aria-label"})}
829
+ ${yt()}
830
+ ${g(h.markupImport,"Import measurements",{"data-action":"measure-import","data-i18n-key":"toolbar.measureImport","data-i18n-attr":"title aria-label"})}
831
+ ${g(h.markupExport,"Export measurements",{"data-action":"measure-export","data-i18n-key":"toolbar.measureExport","data-i18n-attr":"title aria-label"})}
832
+ </div>
833
+ </div>`}function vo(){return`<div id="mlcad-markup-strip-wrap" hidden>
834
+ <div id="mlcad-markup-strip" role="toolbar" data-i18n-attr="aria-label" data-i18n-key="toolbar.annotation" aria-label="Review">
835
+ ${g(h.markupCloud,"Cloud",{"data-action":"markup","data-markup-mode":"cloud","data-i18n-key":"toolbar.markupCloud","data-i18n-attr":"title aria-label"})}
836
+ ${g(h.markupRect,"Rectangle",{"data-action":"markup","data-markup-mode":"rect","data-i18n-key":"toolbar.markupRect","data-i18n-attr":"title aria-label"})}
837
+ ${g(h.markupCircle,"Circle",{"data-action":"markup","data-markup-mode":"circle","data-i18n-key":"toolbar.markupCircle","data-i18n-attr":"title aria-label"})}
838
+ ${g(h.markupCallout,"Callout",{"data-action":"markup","data-markup-mode":"callout","data-i18n-key":"toolbar.markupCallout","data-i18n-attr":"title aria-label"})}
839
+ ${g(h.markupArrow,"Arrow",{"data-action":"markup","data-markup-mode":"arrow","data-i18n-key":"toolbar.markupArrow","data-i18n-attr":"title aria-label"})}
840
+ ${g(h.markupText,"Text",{"data-action":"markup","data-markup-mode":"text","data-i18n-key":"toolbar.markupText","data-i18n-attr":"title aria-label"})}
841
+ ${g(h.markupStamp,"Stamp",{"data-action":"markup","data-markup-mode":"stamp","data-i18n-key":"toolbar.markupStamp","data-i18n-attr":"title aria-label"})}
842
+ ${g(h.markupShow,"Hide markups",{"data-action":"markup-visibility","data-i18n-key":"toolbar.markupHide","data-i18n-attr":"title aria-label"})}
843
+ ${g(h.clearMarkups,"Clear markups",{"data-action":"clear-markups","data-i18n-key":"toolbar.clearMarkups","data-i18n-attr":"title aria-label"})}
844
+ ${yt()}
845
+ ${g(h.markupImport,"Import markups",{"data-action":"markup-import","data-i18n-key":"toolbar.markupImport","data-i18n-attr":"title aria-label"})}
846
+ ${g(h.markupExport,"Export markups",{"data-action":"markup-export","data-i18n-key":"toolbar.markupExport","data-i18n-attr":"title aria-label"})}
847
+ </div>
848
+ </div>`}function yo(){return g(h.osnap,"Object snap",{id:"mlcad-snap-menu-btn","aria-haspopup":"true","aria-expanded":"false","data-action":"snap-menu","data-i18n-key":"toolbar.snap","data-i18n-attr":"title aria-label","data-children-ui":"sticky-toolbar"}).replace('class="mlcad-tool-btn"','class="mlcad-tool-btn has-children"')}function Oe(t,e){var a;const r=e.title??t.meta.title??"CAD Drawing",n=e.encoded??Ht(t),o=e.viewerRuntime,i=nn(),l=n.compression,s=((a=e.accessManifest)==null?void 0:a.encrypted)===!0,d=`#${t.meta.background.toString(16).padStart(6,"0")}`,c=no(t.meta.locale)??"en",u=t.meta.viewerMode??"measure",p=t.meta.exportLayouts!==!1,m=e.accessManifest?` <script id="mlcad-access" type="application/json">${Ao(JSON.stringify(e.accessManifest))}<\/script>
849
+ `:"",x=s?`${i}+aes-gcm;base64`:`${i}+${l};base64`;return`<!DOCTYPE html>
850
+ <html lang="${c}">
851
+ <head>
852
+ <meta charset="utf-8" />
853
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
854
+ <meta name="generator" content="mlightcad-cad-html-plugin" />
855
+ <title>${Lo(r)}</title>
856
+ <style>${mo}</style>
857
+ </head>
858
+ <body>
859
+ ${po(d,u,p)}
860
+ ${m} <script id="mlcad-snapshot" type="${x}">${n.payload}<\/script>
861
+ <script>${ko(o)}<\/script>
862
+ </body>
863
+ </html>`}function Lo(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function ko(t){return t.replace(/<\/script/gi,"<\\/script")}function Ao(t){return t.replace(/</g,"\\u003c")}const Co=1,Mo=1e5,Io=16,zo=12;function Oo(t,e=Date.now(),a){return t==="never"?null:t==="custom"?a??null:e+t*24*60*60*1e3}function ea(t){var e;const a=!!((e=t.password)!=null&&e.trim());return t.expiresAt!=null||a}function Se(t){var e;if(!ea(t))return;const a=!!((e=t.password)!=null&&e.trim());return{v:Co,expiresAt:t.expiresAt,encrypted:a,...a&&t.salt?{salt:t.salt}:{}}}async function So(t,e){const a=crypto.getRandomValues(new Uint8Array(Io)),r=crypto.getRandomValues(new Uint8Array(zo)),n=await Po(t,a),o=new Uint8Array(Ro(e)),i=new Uint8Array(await crypto.subtle.encrypt({name:"AES-GCM",iv:new Uint8Array(r)},n,o)),l=new Uint8Array(r.length+i.length);return l.set(r,0),l.set(i,r.length),{encryptedPayload:Re(l),salt:Re(a)}}async function Pe(t,e){var a;if(!ea(e))return{encoded:t};const r=(a=e.password)==null?void 0:a.trim();if(r){const{encryptedPayload:n,salt:o}=await So(r,t.payload);return{encoded:{payload:n,compression:t.compression},manifest:Se({expiresAt:e.expiresAt,password:r,salt:o})}}return{encoded:t,manifest:Se({expiresAt:e.expiresAt})}}async function Po(t,e){const a=new TextEncoder,r=await crypto.subtle.importKey("raw",a.encode(t),"PBKDF2",!1,["deriveKey"]);return crypto.subtle.deriveKey({name:"PBKDF2",salt:new Uint8Array(e),iterations:Mo,hash:"SHA-256"},r,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}function Re(t){let e="";for(let a=0;a<t.length;a++)e+=String.fromCharCode(t[a]);return btoa(e)}function Ro(t){const e=atob(t.trim()),a=new Uint8Array(e.length);for(let r=0;r<e.length;r++)a[r]=e.charCodeAt(r);return a}const Eo=400;function rt(t={}){var e;return{exportInvisibleLayers:t.exportInvisibleLayers!==!1,exportLayouts:t.exportLayouts!==!1,initialView:t.initialView??"fit",viewerMode:t.viewerMode??"measure",expiryDays:t.expiryDays??"never",expiresAt:t.expiresAt??null,password:((e=t.password)==null?void 0:e.trim())??""}}function No(t){const e=t.activeLayoutView,a=e.center,r=e.trCamera.zoom,n=Math.max(e.height,1),o=r*(2*Eo)/n;return{centerX:a.x,centerY:a.y,zoom:o}}const _o="./viewer-runtime.iife.js";let pt={};function To(t){pt={...pt,...t}}function Uo(){return{...pt}}function $o(t){return t!=null?String(t):pt.viewerRuntimeUrl!=null?String(pt.viewerRuntimeUrl):_o}function Vo(){return{minX:0,minY:0,maxX:0,maxY:0,valid:!1}}function Ho(t,e,a){if(e.length<3)return;const r=a[0],n=a[1];for(let o=0;o+2<e.length;o+=3){const i=Ae(e[o],r),l=Ae(e[o+1],n);t.valid?(i<t.minX&&(t.minX=i),i>t.maxX&&(t.maxX=i),l<t.minY&&(t.minY=l),l>t.maxY&&(t.maxY=l)):(t.minX=t.maxX=i,t.minY=t.maxY=l,t.valid=!0)}}function Ee(t,e){Ho(t,e.positions,e.offset)}function Zo(t){return t.valid?{minX:t.minX,minY:t.minY,maxX:t.maxX,maxY:t.maxY}:null}function jo(t,e){const a=Vo();for(const r of t)Ee(a,r);for(const r of e)Ee(a,r);return Zo(a)}function aa(t,e){return t?e?{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}:t:e??null}function Bo(t){if(!t||t.length===0)return null;let e=null;for(const a of t)e=aa(e,a.paper);return e}function Fo(t){return aa(jo(t.lineBatches,t.meshBatches),Bo(t.viewports))}function Do(t,e,a){if(a)return;const r=Qo(t,e);if(!(r!=null&&r.newIterator))return;const n=[];for(const o of r.newIterator()){if(!(o instanceof wa)||ba.isDefaultPaperSpaceViewport(o)||typeof o.toGiViewport!="function")continue;const i=o.toGiViewport(),l=i.box,s=i.viewBox,d=Ne(l),c=Ne(s);if(!d||!c)continue;const u=Number.isFinite(i.viewTwistAngle)?i.viewTwistAngle:o.viewTwistAngle;n.push(Number.isFinite(u)&&Math.abs(u)>1e-12?{paper:d,model:c,twist:u}:{paper:d,model:c})}return n.length>0?n:void 0}function Ne(t){if(typeof t.isEmpty=="function"&&t.isEmpty())return;const e=t.min.x,a=t.min.y,r=t.max.x,n=t.max.y;if(!(!Number.isFinite(e)||!Number.isFinite(a)||!Number.isFinite(r)||!Number.isFinite(n)||r-e<=0||n-a<=0))return{minX:e,minY:a,maxX:r,maxY:n}}function Qo(t,e){var a;const r=(a=t.tables)==null?void 0:a.blockTable;if(!r)return;const n=typeof r.getIdAt=="function"?r.getIdAt(e):void 0;if(n)return n;if(typeof r.newIterator=="function"){for(const i of r.newIterator())if(i.objectId===e)return i}const o=r.modelSpace;if((o==null?void 0:o.objectId)===e)return o}class Yo{build(e,a,r={}){return this.buildSync(e,a,r)}async buildAsync(e,a,r={}){await H();const n=r.exportInvisibleLayers!==!1,o=r.exportLayouts!==!1,i=n?void 0:m=>gt(e,m,n),l=Me(a,{title:r.title,background:r.background}),s=[];e.layers.forEach(m=>{gt(e,m.name,n)&&s.push({name:m.name,color:m.color.RGB??16777215,visible:!m.isOff&&!m.isFrozen})});const d=Te(a),c=new Map(d.map(m=>[m.blockTableRecordId,m.name])),u=$e(e,o),p=[];for(const m of Ue(e,d,o))p.push(Ve(e,a,m,c,r,i)),await H();return{version:ut,meta:_e(l,r,p,u),layers:s,layouts:p,activeLayoutBtrId:u}}buildSync(e,a,r){const n=r.exportInvisibleLayers!==!1,o=r.exportLayouts!==!1,i=n?void 0:m=>gt(e,m,n),l=Me(a,{title:r.title,background:r.background}),s=[];e.layers.forEach(m=>{gt(e,m.name,n)&&s.push({name:m.name,color:m.color.RGB??16777215,visible:!m.isOff&&!m.isFrozen})});const d=Te(a),c=new Map(d.map(m=>[m.blockTableRecordId,m.name])),u=$e(e,o),p=[];for(const m of Ue(e,d,o))p.push(Ve(e,a,m,c,r,i));return{version:ut,meta:_e(l,r,p,u),layers:s,layouts:p,activeLayoutBtrId:u}}}function _e(t,e,a,r){const n=a.find(l=>l.btrId===r)??a[0],o=n?Fo(n):null,i=e.initialView??"fit";return{title:t.title,createdAt:new Date().toISOString(),extents:t.extents,viewExtents:o??void 0,units:t.units,background:t.background,locale:e.locale??L.currentLocale,initialView:i,viewState:i==="current"?e.viewState:void 0,viewerMode:e.viewerMode??"measure",exportLayouts:e.exportLayouts!==!1}}function Xo(t){return(t.viewerMode??"measure")==="measure"}function gt(t,e,a){if(a)return!0;const r=t.layers.get(e);return r?!r.isOff&&!r.isFrozen:!0}function Te(t){var e;const a=(e=t.objects)==null?void 0:e.layout;if(!(a!=null&&a.newIterator))return[];const r=[];for(const n of a.newIterator()){const o=n.blockTableRecordId;o&&r.push({name:n.layoutName||o,tabOrder:n.tabOrder??0,blockTableRecordId:o})}return r.sort((n,o)=>n.tabOrder-o.tabOrder),r}function Ue(t,e,a){if(!a)return t.modelSpaceBtrId?[t.modelSpaceBtrId]:[];const r=new Set,n=[];for(const o of e)r.has(o.blockTableRecordId)||(r.add(o.blockTableRecordId),n.push(o.blockTableRecordId));for(const o of t.layouts.keys())r.has(o)||(r.add(o),n.push(o));return n}function $e(t,e){return e&&t.activeLayoutBtrId||t.modelSpaceBtrId}function Ve(t,e,a,r,n,o){const i=[],l=[],s=t.layouts.get(a);if(s)for(const[,c]of s.layers){if(o&&!o(c.name))continue;const u=In(c.internalObject);i.push(...u.lineBatches),l.push(...u.meshBatches)}const d=a===t.modelSpaceBtrId;return{btrId:a,name:r.get(a)??Go(e,a),isModelSpace:d,lineBatches:i,meshBatches:l,osnap:Xo(n)?ao(e,a,{includeLayer:o}):void 0,viewports:Do(e,a,d)}}function Go(t,e){var a;const r=(a=t.tables)==null?void 0:a.blockTable;if(r!=null&&r.newIterator){for(const n of r.newIterator())if(n.objectId===e)return n.name}return e}class Wo{constructor(e={}){this.options=e,this._snapshotBuilder=new Yo}async prepareAcTrView2dForHtmlExport(e,a={}){if(!e||!("cadScene"in e)||!e.cadScene)throw new Error("CAD scene is not available. Open a drawing before exporting to HTML.");if(!(e instanceof ia))throw new Error("HTML export requires a 2D CAD view. Open a drawing before exporting.");const r=rt(a),n={includeInvisibleLayers:r.exportInvisibleLayers,includeLayouts:r.exportLayouts};return await e.ensureEntitiesConvertedForExport(n),await H(),e}async convert(e,a={},r){const n=ct.instance,o=rt(a);await n.withBusyIndicator(async()=>{await H();const i=n.curDocument,l=await this.prepareAcTrView2dForHtmlExport(r??n.curView,o),s=e||i.fileName||i.docTitle,d=await this._snapshotBuilder.buildAsync(l.cadScene,i.database,{title:la(s),background:l.backgroundColor,exportInvisibleLayers:o.exportInvisibleLayers,exportLayouts:o.exportLayouts,initialView:o.initialView,viewerMode:o.viewerMode,viewState:o.initialView==="current"&&(o.exportLayouts||l.activeLayoutBtrId===l.modelSpaceBtrId)?No(l):void 0});await H();const c=await this.loadViewerRuntime();await H();const u=Oo(o.expiryDays,Date.now(),o.expiresAt),p=await Pe(Ht(d),{expiresAt:u,password:o.password||void 0}),m=Oe(d,{title:d.meta.title,viewerRuntime:c,encoded:p.encoded,accessManifest:p.manifest});await H(),this.downloadHtml(m,sa(s,"html"))})}async packSnapshot(e,a){await ct.instance.withBusyIndicator(async()=>{await H();const r=await this.loadViewerRuntime();await H();const n=await Pe(Ht(e),{expiresAt:null}),o=Oe(e,{title:e.meta.title,viewerRuntime:r,encoded:n.encoded,accessManifest:n.manifest});await H(),this.downloadHtml(o,a)})}async loadViewerRuntime(){const e=$o(this.options.viewerRuntimeUrl),a=await fetch(e);if(!a.ok)throw new Error(`Failed to load HTML viewer runtime from "${e}" (${a.status}). Install @mlightcad/cad-html-plugin, copy viewer-runtime.iife.js to your app assets, and set viewerRuntimeUrl on registerLazyHtmlPlugin / createHtmlPlugin / AcApHtmlConvertor.`);return a.text()}downloadHtml(e,a){const r=new Blob([e],{type:"text/html;charset=utf-8"}),n=URL.createObjectURL(r),o=document.createElement("a");o.href=n,o.download=a,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.setTimeout(()=>URL.revokeObjectURL(n),6e4)}}class Ko extends oa{constructor(e={}){super(),this.pluginOptions=e}async execute(e){const a=await this.promptOptions();a&&await new Wo(this.pluginOptions).convert(e.doc.fileName||e.doc.docTitle,a,e.view)}async promptOptions(){const e=rt(),a=await this.promptYesNo("jig.chtml.exportInvisibleLayers",e.exportInvisibleLayers);if(a===void 0)return;const r=await this.promptYesNo("jig.chtml.exportLayouts",e.exportLayouts);if(r===void 0)return;const n=await this.promptInitialView();if(n===void 0)return;const o=await this.promptViewerMode();if(o!==void 0)return rt({exportInvisibleLayers:a,exportLayouts:r,initialView:n,viewerMode:o})}async promptYesNo(e,a){const r=new Ot(L.t(e));r.allowNone=!0;const n=r.keywords.add(L.t("jig.chtml.keywords.yes.display"),L.t("jig.chtml.keywords.yes.global"),L.t("jig.chtml.keywords.yes.local")),o=r.keywords.add(L.t("jig.chtml.keywords.no.display"),L.t("jig.chtml.keywords.no.global"),L.t("jig.chtml.keywords.no.local"));r.keywords.default=a?n:o;const i=await ct.instance.editor.getKeywords(r);if(i.status!==P.Cancel){if(i.status===P.None)return a;if(i.status===P.OK||i.status===P.Keyword)return i.stringResult?i.stringResult==="Yes":a}}async promptInitialView(){const e=rt(),a=new Ot(L.t("jig.chtml.initialView"));a.allowNone=!0;const r=a.keywords.add(L.t("jig.chtml.keywords.extents.display"),L.t("jig.chtml.keywords.extents.global"),L.t("jig.chtml.keywords.extents.local")),n=a.keywords.add(L.t("jig.chtml.keywords.current.display"),L.t("jig.chtml.keywords.current.global"),L.t("jig.chtml.keywords.current.local"));a.keywords.default=e.initialView==="current"?n:r;const o=await ct.instance.editor.getKeywords(a);if(o.status!==P.Cancel){if(o.status===P.None)return e.initialView;if(o.status===P.OK||o.status===P.Keyword)return o.stringResult?o.stringResult==="Current"?"current":"fit":e.initialView}}async promptViewerMode(){const e=rt(),a=new Ot(L.t("jig.chtml.viewerMode"));a.allowNone=!0;const r=a.keywords.add(L.t("jig.chtml.keywords.view.display"),L.t("jig.chtml.keywords.view.global"),L.t("jig.chtml.keywords.view.local")),n=a.keywords.add(L.t("jig.chtml.keywords.measure.display"),L.t("jig.chtml.keywords.measure.global"),L.t("jig.chtml.keywords.measure.local"));a.keywords.default=e.viewerMode==="view"?r:n;const o=await ct.instance.editor.getKeywords(a);if(o.status!==P.Cancel){if(o.status===P.None)return e.viewerMode;if(o.status===P.OK||o.status===P.Keyword)return o.stringResult?o.stringResult==="View"?"view":"measure":e.viewerMode}}}const qo="1.6.3",Jo={version:qo};class ti{constructor(e={}){this.options=e,this.name="HtmlPlugin",this.version=Jo.version,this.description="HTML export (-chtml) command",this.registeredCommands=[]}onLoad(e,a){const r=na.SYSTEMT_COMMAND_GROUP_NAME,n=new Ko(this.options);a.addCommand(r,"-chtml","-chtml",n),this.registeredCommands.push({group:r,name:"-chtml"}),a.lookupGlobalCmd("chtml")||(a.addCommand(r,"chtml","chtml",n),this.registeredCommands.push({group:r,name:"chtml"}))}onUnload(e,a){for(const r of this.registeredCommands)a.removeCmd(r.group,r.name);this.registeredCommands=[]}}async function ai(t={}){return t.viewerRuntimeUrl!=null&&To(t),new ti(Uo())}export{Xr as ACEX_SNAPSHOT_COMPRESSION,ut as ACEX_SNAPSHOT_VERSION,Ko as AcApExportHtmlCmd,Wo as AcApHtmlConvertor,Yo as AcApHtmlSnapshotBuilder,_o as DEFAULT_HTML_VIEWER_RUNTIME_URL,oi as HTML_PLUGIN_NAME,ii as HTML_PLUGIN_TRIGGERS,Se as buildAcExHtmlAccessManifest,ao as buildOsnapCatalog,Me as buildViewerMetadata,No as captureAcApHtmlViewState,In as collectBatchesFromObject3D,Gr as compressSnapshotBinary,To as configureHtmlPlugin,ai as createHtmlPlugin,Ht as encodeSnapshot,qr as encodeSnapshotBinary,So as encryptAcExHtmlSnapshotPayload,bn as exportActiveBatchedLine2Slice,qt as exportActiveBatchedSlice,Ce as exportBufferGeometrySlice,Uo as getHtmlPluginOptions,Te as listDatabaseLayouts,ea as needsAcExHtmlAccessControl,Oe as packHtml,Pe as protectAcExHtmlEncodedSnapshot,Oo as resolveAcApHtmlExpiresAt,rt as resolveAcApHtmlExportOptions,no as resolveAcExHtmlLocale,$o as resolveViewerRuntimeUrl,nn as snapshotMimeType};