ss" href="${s}">
				<style>
					html, body {
						margin: 0;
						padding: 0;
						height: 100%;
						width: 100%;
						overflow: hidden;
					}
					.mermaid {
						visibility: hidden;
					}
					.mermaid.rendered {
						visibility: visible;
					}
					.mermaid-wrapper {
						height: 100%;
						width: 100%;
					}
					.zoom-controls {
						position: absolute;
						top: 8px;
						right: 8px;
						display: flex;
						gap: 2px;
						z-index: 100;
						background: var(--vscode-editorWidget-background);
						border: 1px solid var(--vscode-editorWidget-border);
						border-radius: 6px;
						padding: 3px;
					}
					.zoom-controls button {
						display: flex;
						align-items: center;
						justify-content: center;
						width: 26px;
						height: 26px;
						background: transparent;
						color: var(--vscode-icon-foreground);
						border: none;
						border-radius: 4px;
						cursor: pointer;
					}
					.zoom-controls button:hover {
						background: var(--vscode-toolbar-hoverBackground);
					}
				</style>
			</head>
			<body data-vscode-context='${JSON.stringify({preventDefaultContextMenuItems:!0,mermaidWebviewId:this.diagramId})}' data-vscode-mermaid-webview-id="${this.diagramId}">
				<div class="zoom-controls">
					<button class="zoom-out-btn" title="${a.l10n.t("Zoom Out")}"><i class="codicon codicon-zoom-out"></i></button>
					<button class="zoom-in-btn" title="${a.l10n.t("Zoom In")}"><i class="codicon codicon-zoom-in"></i></button>
					<button class="zoom-reset-btn" title="${a.l10n.t("Reset Zoom")}"><i class="codicon codicon-screen-normal"></i></button>
				</div>
				<pre class="mermaid">
					${b(this._mermaidSource)}
				</pre>
				<script type="module" nonce="${i}" src="${o}"></script>
			</body>
			</html>`}};function U(t){let e=0;for(let i=0;i<t.length;i++){let r=t.charCodeAt(i);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString(16)}var f=class{_activeWebviewId;_webviews=new Map;get activeWebview(){return this._activeWebviewId?this._webviews.get(this._activeWebviewId):void 0}registerWebview(e,i,r,o,s){if(this._webviews.has(e))throw new Error(`Webview with id ${e} is already registered.`);let d={id:e,webview:i,mermaidSource:r,title:o,type:s};return this._webviews.set(e,d),{dispose:()=>this.unregisterWebview(e)}}unregisterWebview(e){this._webviews.delete(e),this._activeWebviewId===e&&(this._activeWebviewId=void 0)}setActiveWebview(e){this._webviews.has(e)&&(this._activeWebviewId=e)}getWebview(e){return this._webviews.get(e)}resetPanZoom(e){(e?this._webviews.get(e):this.activeWebview)?.webview.postMessage({type:"resetPanZoom"})}};function J(t){let e=new f,i=new h(t.extensionUri,e);t.subscriptions.push(i),t.subscriptions.push(D(t,e,i)),t.subscriptions.push(p.commands.registerCommand("_mermaid-chat.resetPanZoom",r=>{e.resetPanZoom(r?.mermaidWebviewId)})),t.subscriptions.push(p.commands.registerCommand("_mermaid-chat.copySource",r=>{let o=r?.mermaidWebviewId?e.getWebview(r.mermaidWebviewId):e.activeWebview;o&&p.env.clipboard.writeText(o.mermaidSource)}))}0&&(module.exports={activate});
//# sourceMappingURL=extension.js.map
