(function(p,m){typeofexports=="object"&&typeofmodule<"u"?m(exports):typeofdefine=="function"&&define.amd?define(["exports"],m):(p=typeofglobalThis<"u"?globalThis:p||self,m(p.LyzBimEngineSDK={}))})(this,(function(p){"use strict";constm={common:{title:"BimEngine",description:"这是一个使用 BIM-ENGINE。",openTestDialog:"打开测试弹窗",openInfoDialog:"打开信息弹窗 (封装版)"},toolbar:{home:"首页",info:"信息",location:"定位",setting:"设置",walk:"漫游",walkPerson:"人视",walkBird:"鸟瞰",walkMenu:"菜单"},dialog:{testTitle:"测试弹窗",testContent:'<div style="padding: 10px;">这是一个 <b>可拖拽</b> 且 <b>可缩放</b> 的弹窗。<br><br>你可以尝试拖动标题栏,或者拖动右下角改变大小。</div>'}},L={common:{title:"BimEngine",description:"This is a BIM-ENGINE demo.",openTestDialog:"Open Test Dialog",openInfoDialog:"Open Info Dialog (Wrapped)"},toolbar:{home:"Home",info:"Info",location:"Location",setting:"Settings",walk:"Walk",walkPerson:"Person",walkBird:"Bird Eye",walkMenu:"Menu"},dialog:{testTitle:"Test Dialog",testContent:'<div style="padding: 10px;">This is a <b>draggable</b> and <b>resizable</b> dialog.<br><br>Try dragging the title bar or resizing from the bottom-right corner.</div>'}};classB{currentLocale="zh-CN";messages={"zh-CN":m,"en-US":L};listeners=[];constructor(){}getLocale(){returnthis.currentLocale}setLocale(t){this.currentLocale!==t&&(this.currentLocale=t,this.notifyListeners())}t(t){if(!t)return"";conste=t.split(".");leto=this.messages[this.currentLocale];for(constiofe)if(o&&typeofo=="object"&&iino)o=o[i];elsereturnt;returno}subscribe(t){returnthis.listeners.push(t),()=>{this.listeners=this.listeners.filter(e=>e!==t)}}notifyListeners(){this.listeners.forEach(t=>t(this.currentLocale))}}constu=newB,g=a=>u.t(a),w={name:"dark",primary:"#0078d4",primaryHover:"#0063b1",background:"#f5f5f5",panelBackground:"rgba(30, 30, 30, 0.9)",textPrimary:"#ffffff",textSecondary:"#cccccc",border:"#444444",icon:"#cccccc",iconActive:"#ffffff",componentBackground:"transparent",componentHover:"#333333",componentActive:"rgba(255, 255, 255, 0.1)"},k={name:"light",primary:"#0078d4",primaryHover:"#106ebe",background:"#f5f5f5",panelBackground:"#ffffff",textPrimary:"#333333",textSecondary:"#666666",border:"#e0e0e0",icon:"#555555",iconActive:"#0078d4",componentBackground:"transparent",componentHover:"#f0f0f0",componentActive:"#e0e0e0"};classx{currentTheme=w;listeners=[];constructor(){}getTheme(){returnthis.currentTheme}setTheme(t){t==="light"?this.applyTheme(k):this.applyTheme(w)}setCustomTheme(t){this.applyTheme(t)}applyTheme(t){this.currentTheme=t,this.notifyListeners()}subscribe(t){returnthis.listeners.push(t),t(this.currentTheme),()=>{this.listeners=this.listeners.filter(e=>e!==t)}}notifyListeners(){this.listeners.forEach(t=>t(this.currentTheme))}}constd=newx;classv{container;options;groups=[];activeBtnIds=newSet;btnRefs=newMap;dropdownElement=null;hoverTimeout=null;customColors=newSet;unsubscribeLocale=null;unsubscribeTheme=null;DEFAULT_ICON='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect></svg>';constructor(t){conste=typeoft.container=="string"?document.getElementById(t.container):t.container;if(!e)thrownewError("Container not found");this.container=e,this.options={showLabel:!0,visibility:{},direction:"row",position:"static",align:"vertical",expand:"down",...t},["backgroundColor","btnBackgroundColor","btnHoverColor","btnActiveColor","iconColor","iconActiveColor","textColor","textActiveColor"].forEach(i=>{t[i]&&this.customColors.add(i)}),this.initContainer(),this.applyStyles()}initContainer(){this.container.innerHTML="",this.container.classList.add("bim-btn-group-root"),this.options.direction==="column"?this.container.classList.add("dir-column"):this.container.classList.add("dir-row"),this.options.className&&this.container.classList.add(this.options.className),this.updatePosition()}updatePosition(){constt=this.options.position,e=this.container.style;if