kmap-term-tree 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -393,7 +393,7 @@ export class KmapTermTree extends LitElement {
393
393
  return `M ${edge.fromX} ${edge.fromY} C ${hx1} ${hy1} ${hx2} ${hy2} ${edge.toX} ${edge.toY}`;
394
394
  }
395
395
  render() {
396
- var _a;
396
+ var _a, _b;
397
397
  const activeNode = this.flatNodes.find(n => n.id === this.activeNodeId) || this.ast;
398
398
  const isRoot = (activeNode === null || activeNode === void 0 ? void 0 : activeNode.id) === ((_a = this.ast) === null || _a === void 0 ? void 0 : _a.id);
399
399
  return html `
@@ -459,9 +459,9 @@ export class KmapTermTree extends LitElement {
459
459
  <span class="info-badge">${activeNode.label}</span>
460
460
  <span style="color: #64748b">
461
461
  ${activeNode.children.length === 2
462
- ? `(verknüpft 2 Teilterme mit ${activeNode.symbol})`
463
- : activeNode.isUnary
464
- ? `(wirkt auf ${activeNode.children[0].label || 'Ausdruck'})`
462
+ ? `(verknüpft 2 Teilterme)`
463
+ : activeNode.isUnary || activeNode.type === 'function' || activeNode.children.length === 1
464
+ ? `(wirkt auf ${((_b = activeNode.children[0]) === null || _b === void 0 ? void 0 : _b.label) || 'Ausdruck'})`
465
465
  : ''}
466
466
  </span>
467
467
  </div>
@@ -490,6 +490,8 @@ KmapTermTree.styles = [
490
490
  color: var(--kmap-term-tree-text-color, #1f2937);
491
491
  user-select: none;
492
492
  width: 100%;
493
+ min-width: var(--kmap-term-tree-min-width, 300px);
494
+ box-sizing: border-box;
493
495
  }
494
496
 
495
497
  .container {
@@ -498,6 +500,7 @@ KmapTermTree.styles = [
498
500
  flex-direction: column;
499
501
  align-items: center;
500
502
  width: 100%;
503
+ min-width: 0;
501
504
  box-sizing: border-box;
502
505
  }
503
506
 
@@ -547,15 +550,15 @@ KmapTermTree.styles = [
547
550
  .edge-path {
548
551
  fill: none;
549
552
  stroke: var(--kmap-term-tree-edge-color, #f59e0b);
550
- stroke-width: 2.2;
553
+ stroke-width: 2;
551
554
  stroke-linecap: round;
552
- opacity: 0.85;
555
+ opacity: 0.80;
553
556
  transition: stroke 0.2s ease, stroke-width 0.2s ease, opacity 0.2s ease;
554
557
  }
555
558
 
556
559
  .edge-path.highlighted {
557
560
  stroke: var(--kmap-term-tree-highlight-edge-color, #d97706);
558
- stroke-width: 3.2;
561
+ stroke-width: 2.5;
559
562
  opacity: 1;
560
563
  }
561
564
 
@@ -579,11 +582,11 @@ KmapTermTree.styles = [
579
582
  display: flex;
580
583
  align-items: center;
581
584
  justify-content: center;
582
- width: 28px;
583
- height: 28px;
585
+ width: 27px;
586
+ height: 27px;
584
587
  border-radius: 50%;
585
588
  background: var(--kmap-term-tree-background-color, #ffffff);
586
- border: 2px solid var(--kmap-term-tree-border-color, #0284c7);
589
+ border: 1px solid var(--kmap-term-tree-border-color, #0284c7);
587
590
  color: var(--kmap-term-tree-node-text-color, #0284c7);
588
591
  font-weight: 700;
589
592
  font-size: 1rem;
@@ -633,6 +636,11 @@ KmapTermTree.styles = [
633
636
  font-size: 0.88rem;
634
637
  display: flex;
635
638
  align-items: center;
639
+ justify-content: center;
640
+ text-align: center;
641
+ flex-wrap: wrap;
642
+ max-width: 100%;
643
+ box-sizing: border-box;
636
644
  gap: 8px;
637
645
  color: #334155;
638
646
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
@@ -1 +1 @@
1
- {"version":3,"file":"KmapTermTree.js","sourceRoot":"","sources":["../../src/KmapTermTree.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,GAAG,EAAE,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OA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G;IACd,WAAW;IACX,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8KF;CACF,AAjLY,CAiLX;AAE0B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAAe;AACd;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAuB;AACrB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAA6B;AAC5B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDAA6B;AAExC;IAAhB,KAAK,EAAE;yCAAwB;AACf;IAAhB,KAAK,EAAE;2CAAwB;AACf;IAAhB,KAAK,EAAE;+CAAoC;AAC3B;IAAhB,KAAK,EAAE;2CAAgC;AACvB;IAAhB,KAAK,EAAE;kDAA+B;AACtB;IAAhB,KAAK,EAAE;sDAAmD;AAC1C;IAAhB,KAAK,EAAE;gDAAkC;AACzB;IAAhB,KAAK,EAAE;mDAKN;AAEyB;IAA1B,KAAK,CAAC,UAAU,CAAC;oDAAsC;AACzB;IAA9B,KAAK,CAAC,cAAc,CAAC;uDAAyC","sourcesContent":["import { css, html, LitElement, PropertyValues, svg } from 'lit';\nimport { property, state, query } from 'lit/decorators.js';\nimport katex from 'katex';\nimport { katexStyles } from './katex-css.js';\nimport { TermNode, TreeEdge } from './model.js';\nimport { parseAsciiMath, astToAnnotatedLatex } from './asciimath-parser.js';\n\nexport class KmapTermTree extends LitElement {\n static styles = [\n katexStyles,\n css`\n :host {\n display: block;\n position: relative;\n font-family: var(\n --kmap-term-tree-font-family,\n system-ui,\n -apple-system,\n sans-serif\n );\n color: var(--kmap-term-tree-text-color, #1f2937);\n user-select: none;\n width: 100%;\n }\n\n .container {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n box-sizing: border-box;\n }\n\n .tree-canvas {\n position: relative;\n width: 100%;\n min-height: 80px;\n }\n\n .formula-wrapper {\n position: relative;\n z-index: 2;\n display: flex;\n justify-content: center;\n align-items: center;\n padding-top: 4px;\n font-size: var(--kmap-term-tree-formula-font-size, 1.35rem);\n }\n\n .highlight-overlay {\n position: absolute;\n z-index: 1;\n pointer-events: none;\n background-color: var(\n --kmap-term-tree-highlight-color,\n rgba(251, 191, 36, 0.28)\n );\n border: 2px solid\n var(--kmap-term-tree-highlight-outline, rgba(245, 158, 11, 0.75));\n border-radius: 6px;\n box-sizing: border-box;\n transition: left 0.12s ease-out, top 0.12s ease-out,\n width 0.12s ease-out, height 0.12s ease-out;\n }\n\n .edges-svg {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 1;\n overflow: visible;\n }\n\n .edge-path {\n fill: none;\n stroke: var(--kmap-term-tree-edge-color, #f59e0b);\n stroke-width: 2.2;\n stroke-linecap: round;\n opacity: 0.85;\n transition: stroke 0.2s ease, stroke-width 0.2s ease, opacity 0.2s ease;\n }\n\n .edge-path.highlighted {\n stroke: var(--kmap-term-tree-highlight-edge-color, #d97706);\n stroke-width: 3.2;\n opacity: 1;\n }\n\n .tree-node {\n position: absolute;\n z-index: 2;\n transform: translate(-50%, -50%);\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n cursor: pointer;\n transition: transform 0.15s ease, box-shadow 0.15s ease;\n }\n\n .tree-node:hover,\n .tree-node.active {\n transform: translate(-50%, -50%) scale(1.15);\n }\n\n .node-badge {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background: var(--kmap-term-tree-background-color, #ffffff);\n border: 2px solid var(--kmap-term-tree-border-color, #0284c7);\n color: var(--kmap-term-tree-node-text-color, #0284c7);\n font-weight: 700;\n font-size: 1rem;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);\n box-sizing: border-box;\n transition: all 0.2s ease;\n }\n\n .tree-node:hover .node-badge,\n .tree-node.active .node-badge {\n background: var(--kmap-term-tree-active-node-bg, #0284c7);\n color: #ffffff;\n border-color: var(--kmap-term-tree-active-node-border, #0284c7);\n box-shadow: 0 4px 8px rgba(2, 132, 199, 0.35);\n }\n\n .node-label {\n margin-top: 2px;\n font-size: 0.7rem;\n font-weight: 500;\n color: #64748b;\n white-space: nowrap;\n background: rgba(255, 255, 255, 0.95);\n padding: 1px 4px;\n border-radius: 4px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n }\n\n /* KaTeX Highlight */\n .highlight-term {\n background-color: var(\n --kmap-term-tree-highlight-color,\n rgba(251, 191, 36, 0.35)\n ) !important;\n border-radius: 4px;\n outline: 2px solid\n var(--kmap-term-tree-highlight-outline, rgba(245, 158, 11, 0.7));\n transition: background-color 0.2s ease, outline 0.2s ease;\n }\n\n .info-bar {\n margin-top: 12px;\n padding: 6px 14px;\n background: #f8fafc;\n border: 1px solid #e2e8f0;\n border-radius: 8px;\n font-size: 0.88rem;\n display: flex;\n align-items: center;\n gap: 8px;\n color: #334155;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);\n }\n\n .info-badge {\n font-weight: 700;\n color: #0284c7;\n background: #e0f2fe;\n padding: 2px 8px;\n border-radius: 4px;\n }\n\n .error-msg {\n color: #dc2626;\n padding: 8px;\n font-size: 0.9rem;\n }\n `,\n ];\n\n @property({ type: String }) term?: string;\n @property({ type: Number }) tension: number = 0.5;\n @property({ type: Boolean }) showLabels: boolean = false;\n @property({ type: Boolean }) showDetails: boolean = true;\n\n @state() private ast?: TermNode;\n @state() private error?: string;\n @state() private flatNodes: TermNode[] = [];\n @state() private edges: TreeEdge[] = [];\n @state() private activeNodeId?: string;\n @state() private activeSubtreeIds: Set<string> = new Set();\n @state() private treeHeight: number = 100;\n @state() private highlightRect?: {\n left: number;\n top: number;\n width: number;\n height: number;\n };\n\n @query('#formula') private formulaElement?: HTMLElement;\n @query('.tree-canvas') private treeCanvasElement?: HTMLElement;\n\n private resizeObserver?: ResizeObserver;\n private lastObservedWidth = 0;\n private resizeFrameId?: number;\n private animationTimers: number[] = [];\n\n connectedCallback() {\n super.connectedCallback();\n this.resizeObserver = new ResizeObserver(entries => {\n for (const entry of entries) {\n const width = entry.contentRect.width;\n if (Math.abs(width - this.lastObservedWidth) > 0.5) {\n this.lastObservedWidth = width;\n this.triggerLayoutUpdate();\n }\n }\n });\n\n window.addEventListener('animationend', this.onAnimationOrTransitionEnd);\n window.addEventListener('transitionend', this.onAnimationOrTransitionEnd);\n\n if (typeof document !== 'undefined' && document.fonts) {\n document.fonts.ready.then(() => {\n if (this.isConnected) {\n this.recalculateLayout();\n }\n });\n }\n }\n\n disconnectedCallback() {\n if (this.resizeFrameId) {\n cancelAnimationFrame(this.resizeFrameId);\n }\n this.clearAnimationTimers();\n window.removeEventListener('animationend', this.onAnimationOrTransitionEnd);\n window.removeEventListener('transitionend', this.onAnimationOrTransitionEnd);\n this.resizeObserver?.disconnect();\n super.disconnectedCallback();\n }\n\n private onAnimationOrTransitionEnd = () => {\n this.triggerLayoutUpdate();\n };\n\n private triggerLayoutUpdate() {\n if (this.resizeFrameId) {\n cancelAnimationFrame(this.resizeFrameId);\n }\n this.resizeFrameId = requestAnimationFrame(() => {\n if (this.isConnected) {\n this.recalculateLayout();\n }\n });\n }\n\n private watchAncestorAnimations() {\n let curr: Element | null = this;\n const animations: Animation[] = [];\n\n while (curr) {\n if (typeof curr.getAnimations === 'function') {\n for (const anim of curr.getAnimations()) {\n if (anim.playState === 'running' || anim.pending) {\n animations.push(anim);\n }\n }\n }\n const root = curr.getRootNode() as ShadowRoot | Document;\n if (root && 'host' in root) {\n curr = (root as ShadowRoot).host;\n } else {\n curr = curr.parentElement;\n }\n }\n\n if (animations.length > 0) {\n Promise.all(animations.map(a => a.finished.catch(() => {}))).then(() => {\n if (this.isConnected) {\n this.recalculateLayout();\n }\n });\n }\n }\n\n private scheduleAnimationCheck() {\n this.clearAnimationTimers();\n this.watchAncestorAnimations();\n\n const t1 = window.setTimeout(() => {\n if (!this.isConnected) return;\n this.watchAncestorAnimations();\n this.recalculateLayout();\n }, 50);\n\n const t2 = window.setTimeout(() => {\n if (!this.isConnected) return;\n this.recalculateLayout();\n }, 320);\n\n const t3 = window.setTimeout(() => {\n if (!this.isConnected) return;\n this.recalculateLayout();\n }, 450);\n\n this.animationTimers.push(t1, t2, t3);\n }\n\n private clearAnimationTimers() {\n for (const t of this.animationTimers) {\n clearTimeout(t);\n }\n this.animationTimers = [];\n }\n\n // Support slotted content: <kmap-term-tree>2a+3b</kmap-term-tree>\n updateSlotted(event: Event) {\n const slot = event.target as HTMLSlotElement;\n const text = slot\n .assignedNodes()\n .map(n => n.textContent)\n .join('')\n .trim();\n if (text && text !== this.term) {\n this.term = text;\n }\n }\n\n protected willUpdate(changedProperties: PropertyValues) {\n if (changedProperties.has('term') && this.term !== undefined) {\n this.parseInput(this.term);\n }\n }\n\n private parseInput(termStr: string) {\n try {\n this.error = undefined;\n const cleanTerm = termStr.trim();\n if (!cleanTerm) {\n this.ast = undefined;\n this.flatNodes = [];\n this.edges = [];\n return;\n }\n\n this.ast = parseAsciiMath(cleanTerm);\n this.activeNodeId = this.ast.id;\n this.activeSubtreeIds = this.collectSubtreeIds(this.ast);\n } catch (e: any) {\n this.error = e.message || 'Fehler beim Parsen des Terms';\n this.ast = undefined;\n this.flatNodes = [];\n this.edges = [];\n }\n }\n\n protected async updated(changedProperties: PropertyValues) {\n if (changedProperties.has('term') || changedProperties.has('ast')) {\n this.renderKaTeX();\n await this.updateComplete;\n this.recalculateLayout();\n if (this.treeCanvasElement && this.resizeObserver) {\n this.resizeObserver.observe(this.treeCanvasElement);\n }\n this.scheduleAnimationCheck();\n }\n }\n\n private renderKaTeX() {\n if (!this.formulaElement || !this.ast) return;\n\n try {\n const latex = astToAnnotatedLatex(this.ast);\n katex.render(latex, this.formulaElement, {\n trust: true,\n strict: false,\n throwOnError: false,\n });\n } catch (err: any) {\n this.error = err.message;\n }\n }\n\n private recalculateLayout() {\n if (\n !this.ast ||\n !this.formulaElement ||\n !this.treeCanvasElement ||\n !this.shadowRoot\n )\n return;\n\n const canvasRect = this.treeCanvasElement.getBoundingClientRect();\n const offsetWidth = this.treeCanvasElement.offsetWidth;\n const offsetHeight = this.treeCanvasElement.offsetHeight;\n\n if (canvasRect.width === 0 || offsetWidth === 0) return;\n this.lastObservedWidth = offsetWidth;\n\n const scaleX = canvasRect.width / offsetWidth;\n const scaleY = offsetHeight > 0 ? canvasRect.height / offsetHeight : scaleX;\n if (scaleX < 0.01 || scaleY < 0.01) return;\n\n const flatNodes: TermNode[] = [];\n const nodeMap = new Map<string, TermNode>();\n\n // 1. Collect all nodes and measure leaf positions from KaTeX DOM elements\n const collectAndPositionLeaves = (node: TermNode) => {\n nodeMap.set(node.id, node);\n\n if (node.children.length === 0) {\n // Leaf node: measure rendered KaTeX span\n const el = this.shadowRoot!.getElementById(node.id);\n if (el) {\n const rect = el.getBoundingClientRect();\n node.x = (rect.left - canvasRect.left + rect.width / 2) / scaleX;\n node.y = (rect.bottom - canvasRect.top) / scaleY;\n node.width = rect.width / scaleX;\n node.height = rect.height / scaleY;\n } else {\n node.x = offsetWidth / 2;\n node.y = 20;\n }\n } else {\n flatNodes.push(node);\n for (const child of node.children) {\n collectAndPositionLeaves(child);\n }\n }\n };\n\n collectAndPositionLeaves(this.ast);\n\n // 2. Position inner nodes bottom-up based on children coordinates\n const formulaRect = this.formulaElement.getBoundingClientRect();\n const formulaBottomRel = (formulaRect.bottom - canvasRect.top) / scaleY;\n const initialGap = 34; // distance from formula bottom to level 1 operators\n const rowHeight = 40; // distance between tree levels\n\n const positionInnerNodes = (node: TermNode) => {\n for (const child of node.children) {\n if (child.children.length > 0) {\n positionInnerNodes(child);\n }\n }\n\n if (node.children.length > 0) {\n if (node.type === 'function' || node.isUnary) {\n // Center under the full function / unary expression: e.g. sin(arg) or -arg\n const el = this.shadowRoot!.getElementById(node.id);\n if (el) {\n const rect = el.getBoundingClientRect();\n node.x = (rect.left - canvasRect.left + rect.width / 2) / scaleX;\n } else {\n node.x = node.children[0].x ?? 0;\n }\n } else {\n const first = node.children[0];\n const last = node.children[node.children.length - 1];\n node.x = ((first.x ?? 0) + (last.x ?? 0)) / 2;\n }\n node.y = formulaBottomRel + initialGap + (node.depth - 1) * rowHeight;\n }\n };\n\n positionInnerNodes(this.ast);\n\n // 3. Build edges between parent nodes and their children\n const edges: TreeEdge[] = [];\n for (const node of flatNodes) {\n if (node.x === undefined || node.y === undefined) continue;\n\n for (const child of node.children) {\n if (child.x === undefined || child.y === undefined) continue;\n\n edges.push({\n fromNodeId: child.id,\n toNodeId: node.id,\n fromX: child.x,\n fromY: child.y + (child.depth > 0 ? 14 : 2),\n toX: node.x,\n toY: node.y - 14,\n });\n }\n }\n\n const maxDepth = this.ast.depth;\n this.treeHeight = Math.max(\n 60,\n formulaBottomRel + initialGap + (maxDepth - 1) * rowHeight + 24\n );\n this.flatNodes = flatNodes;\n this.edges = edges;\n this.updateHighlightRect(this.activeNodeId);\n this.requestUpdate();\n }\n\n private collectSubtreeIds(node: TermNode): Set<string> {\n const ids = new Set<string>();\n const traverse = (n: TermNode) => {\n ids.add(n.id);\n for (const c of n.children) traverse(c);\n };\n traverse(node);\n return ids;\n }\n\n private onNodeHover(node: TermNode, enter: boolean) {\n if (!enter) {\n // Revert highlight to root node\n if (this.ast) {\n this.setActiveNode(this.ast);\n }\n return;\n }\n this.setActiveNode(node);\n }\n\n private setActiveNode(node: TermNode) {\n this.activeNodeId = node.id;\n this.activeSubtreeIds = this.collectSubtreeIds(node);\n this.updateHighlightRect(node.id);\n this.requestUpdate();\n }\n\n private findNode(\n root: TermNode | undefined,\n id: string\n ): TermNode | undefined {\n if (!root) return undefined;\n if (root.id === id) return root;\n for (const child of root.children) {\n const found = this.findNode(child, id);\n if (found) return found;\n }\n return undefined;\n }\n\n private getNodeVisualBounds(\n node: TermNode\n ): { top: number; bottom: number; left: number; right: number } | null {\n if (!this.shadowRoot) return null;\n\n let minTop = Infinity;\n let maxBottom = -Infinity;\n let minLeft = Infinity;\n let maxRight = -Infinity;\n\n const collectBounds = (n: TermNode) => {\n const el = this.shadowRoot!.getElementById(n.id);\n if (el) {\n const r = el.getBoundingClientRect();\n if (r.width > 0 && r.height > 0) {\n minTop = Math.min(minTop, r.top);\n maxBottom = Math.max(maxBottom, r.bottom);\n minLeft = Math.min(minLeft, r.left);\n maxRight = Math.max(maxRight, r.right);\n }\n }\n for (const child of n.children) {\n collectBounds(child);\n }\n };\n\n collectBounds(node);\n\n if (minTop === Infinity) return null;\n return { top: minTop, bottom: maxBottom, left: minLeft, right: maxRight };\n }\n\n private updateHighlightRect(nodeId?: string) {\n if (!nodeId || !this.shadowRoot || !this.treeCanvasElement || !this.ast) {\n this.highlightRect = undefined;\n return;\n }\n\n const node = this.findNode(this.ast, nodeId);\n if (!node) {\n this.highlightRect = undefined;\n return;\n }\n\n const bounds = this.getNodeVisualBounds(node);\n if (!bounds) {\n this.highlightRect = undefined;\n return;\n }\n\n const canvasRect = this.treeCanvasElement.getBoundingClientRect();\n const offsetWidth = this.treeCanvasElement.offsetWidth;\n const offsetHeight = this.treeCanvasElement.offsetHeight;\n if (canvasRect.width === 0 || offsetWidth === 0) {\n this.highlightRect = undefined;\n return;\n }\n\n const scaleX = canvasRect.width / offsetWidth;\n const scaleY = offsetHeight > 0 ? canvasRect.height / offsetHeight : scaleX;\n if (scaleX < 0.01 || scaleY < 0.01) {\n this.highlightRect = undefined;\n return;\n }\n\n const paddingX = 4;\n const paddingY = 4;\n\n this.highlightRect = {\n left: (bounds.left - canvasRect.left) / scaleX - paddingX,\n top: (bounds.top - canvasRect.top) / scaleY - paddingY,\n width: (bounds.right - bounds.left) / scaleX + paddingX * 2,\n height: (bounds.bottom - bounds.top) / scaleY + paddingY * 2,\n };\n }\n\n private renderPath(edge: TreeEdge): string {\n const delta = (edge.toY - edge.fromY) * this.tension;\n const hx1 = edge.fromX;\n const hy1 = edge.fromY + delta;\n const hx2 = edge.toX;\n const hy2 = edge.toY - delta;\n\n return `M ${edge.fromX} ${edge.fromY} C ${hx1} ${hy1} ${hx2} ${hy2} ${edge.toX} ${edge.toY}`;\n }\n\n render() {\n const activeNode =\n this.flatNodes.find(n => n.id === this.activeNodeId) || this.ast;\n const isRoot = activeNode?.id === this.ast?.id;\n\n return html`\n <div class=\"container\">\n <!-- Canvas area with formula, edges, and operator nodes sharing the same coordinate space -->\n <div class=\"tree-canvas\" style=\"height: ${this.treeHeight}px\">\n ${this.highlightRect\n ? html`\n <div\n class=\"highlight-overlay\"\n style=\"left: ${this.highlightRect.left}px; top: ${this\n .highlightRect.top}px; width: ${this.highlightRect\n .width}px; height: ${this.highlightRect.height}px;\"\n ></div>\n `\n : ''}\n\n <div class=\"formula-wrapper\">\n <div id=\"formula\"></div>\n </div>\n\n ${this.error\n ? html`<div class=\"error-msg\">${this.error}</div>`\n : html`\n <svg class=\"edges-svg\">\n ${this.edges.map(\n edge => svg`\n <path\n class=\"edge-path ${\n this.activeSubtreeIds.has(edge.fromNodeId) &&\n this.activeSubtreeIds.has(edge.toNodeId)\n ? 'highlighted'\n : ''\n }\"\n d=\"${this.renderPath(edge)}\"\n />\n `\n )}\n </svg>\n\n ${this.flatNodes.map(\n node => html`\n <div\n class=\"tree-node ${this.activeNodeId === node.id\n ? 'active'\n : ''}\"\n style=\"left: ${node.x}px; top: ${node.y}px;\"\n @mouseenter=${() => this.onNodeHover(node, true)}\n @mouseleave=${() => this.onNodeHover(node, false)}\n @click=${() => this.setActiveNode(node)}\n >\n <div class=\"node-badge\" title=\"${node.label}\">\n ${node.symbol}\n </div>\n ${this.showLabels\n ? html`<span class=\"node-label\">${node.label}</span>`\n : ''}\n </div>\n `\n )}\n `}\n </div>\n\n <!-- Didactic info box -->\n ${this.showDetails && activeNode\n ? html`\n <div class=\"info-bar\">\n <span>${isRoot ? 'Hauptrechenart:' : 'Teilterm:'}</span>\n <span class=\"info-badge\">${activeNode.label}</span>\n <span style=\"color: #64748b\">\n ${activeNode.children.length === 2\n ? `(verknüpft 2 Teilterme mit ${activeNode.symbol})`\n : activeNode.isUnary\n ? `(wirkt auf ${\n activeNode.children[0].label || 'Ausdruck'\n })`\n : ''}\n </span>\n </div>\n `\n : ''}\n\n <div hidden>\n <slot @slotchange=${this.updateSlotted}></slot>\n </div>\n </div>\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"KmapTermTree.js","sourceRoot":"","sources":["../../src/KmapTermTree.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,GAAG,EAAE,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5E,MAAM,OAAO,YAAa,SAAQ,UAAU;IAA5C;;QA6L8B,YAAO,GAAW,GAAG,CAAC;QACrB,eAAU,GAAY,KAAK,CAAC;QAC5B,gBAAW,GAAY,IAAI,CAAC;QAIxC,cAAS,GAAe,EAAE,CAAC;QAC3B,UAAK,GAAe,EAAE,CAAC;QAEvB,qBAAgB,GAAgB,IAAI,GAAG,EAAE,CAAC;QAC1C,eAAU,GAAW,GAAG,CAAC;QAYlC,sBAAiB,GAAG,CAAC,CAAC;QAEtB,oBAAe,GAAa,EAAE,CAAC;QAqC/B,+BAA0B,GAAG,GAAG,EAAE;YACxC,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC7B,CAAC,CAAC;IAsdJ,CAAC;IA3fC,iBAAiB;QACf,KAA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AI,EAAE,OAAO,EAAE,CAAC;gDAA6B;AAC5B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDAA6B;AAExC;IAAhB,KAAK,EAAE;yCAAwB;AACf;IAAhB,KAAK,EAAE;2CAAwB;AACf;IAAhB,KAAK,EAAE;+CAAoC;AAC3B;IAAhB,KAAK,EAAE;2CAAgC;AACvB;IAAhB,KAAK,EAAE;kDAA+B;AACtB;IAAhB,KAAK,EAAE;sDAAmD;AAC1C;IAAhB,KAAK,EAAE;gDAAkC;AACzB;IAAhB,KAAK,EAAE;mDAKN;AAEyB;IAA1B,KAAK,CAAC,UAAU,CAAC;oDAAsC;AACzB;IAA9B,KAAK,CAAC,cAAc,CAAC;uDAAyC","sourcesContent":["import { css, html, LitElement, PropertyValues, svg } from 'lit';\nimport { property, state, query } from 'lit/decorators.js';\nimport katex from 'katex';\nimport { katexStyles } from './katex-css.js';\nimport { TermNode, TreeEdge } from './model.js';\nimport { parseAsciiMath, astToAnnotatedLatex } from './asciimath-parser.js';\n\nexport class KmapTermTree extends LitElement {\n static styles = [\n katexStyles,\n css`\n :host {\n display: block;\n position: relative;\n font-family: var(\n --kmap-term-tree-font-family,\n system-ui,\n -apple-system,\n sans-serif\n );\n color: var(--kmap-term-tree-text-color, #1f2937);\n user-select: none;\n width: 100%;\n min-width: var(--kmap-term-tree-min-width, 300px);\n box-sizing: border-box;\n }\n\n .container {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n }\n\n .tree-canvas {\n position: relative;\n width: 100%;\n min-height: 80px;\n }\n\n .formula-wrapper {\n position: relative;\n z-index: 2;\n display: flex;\n justify-content: center;\n align-items: center;\n padding-top: 4px;\n font-size: var(--kmap-term-tree-formula-font-size, 1.35rem);\n }\n\n .highlight-overlay {\n position: absolute;\n z-index: 1;\n pointer-events: none;\n background-color: var(\n --kmap-term-tree-highlight-color,\n rgba(251, 191, 36, 0.28)\n );\n border: 2px solid\n var(--kmap-term-tree-highlight-outline, rgba(245, 158, 11, 0.75));\n border-radius: 6px;\n box-sizing: border-box;\n transition: left 0.12s ease-out, top 0.12s ease-out,\n width 0.12s ease-out, height 0.12s ease-out;\n }\n\n .edges-svg {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 1;\n overflow: visible;\n }\n\n .edge-path {\n fill: none;\n stroke: var(--kmap-term-tree-edge-color, #f59e0b);\n stroke-width: 2;\n stroke-linecap: round;\n opacity: 0.80;\n transition: stroke 0.2s ease, stroke-width 0.2s ease, opacity 0.2s ease;\n }\n\n .edge-path.highlighted {\n stroke: var(--kmap-term-tree-highlight-edge-color, #d97706);\n stroke-width: 2.5;\n opacity: 1;\n }\n\n .tree-node {\n position: absolute;\n z-index: 2;\n transform: translate(-50%, -50%);\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n cursor: pointer;\n transition: transform 0.15s ease, box-shadow 0.15s ease;\n }\n\n .tree-node:hover,\n .tree-node.active {\n transform: translate(-50%, -50%) scale(1.15);\n }\n\n .node-badge {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 27px;\n height: 27px;\n border-radius: 50%;\n background: var(--kmap-term-tree-background-color, #ffffff);\n border: 1px solid var(--kmap-term-tree-border-color, #0284c7);\n color: var(--kmap-term-tree-node-text-color, #0284c7);\n font-weight: 700;\n font-size: 1rem;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);\n box-sizing: border-box;\n transition: all 0.2s ease;\n }\n\n .tree-node:hover .node-badge,\n .tree-node.active .node-badge {\n background: var(--kmap-term-tree-active-node-bg, #0284c7);\n color: #ffffff;\n border-color: var(--kmap-term-tree-active-node-border, #0284c7);\n box-shadow: 0 4px 8px rgba(2, 132, 199, 0.35);\n }\n\n .node-label {\n margin-top: 2px;\n font-size: 0.7rem;\n font-weight: 500;\n color: #64748b;\n white-space: nowrap;\n background: rgba(255, 255, 255, 0.95);\n padding: 1px 4px;\n border-radius: 4px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n }\n\n /* KaTeX Highlight */\n .highlight-term {\n background-color: var(\n --kmap-term-tree-highlight-color,\n rgba(251, 191, 36, 0.35)\n ) !important;\n border-radius: 4px;\n outline: 2px solid\n var(--kmap-term-tree-highlight-outline, rgba(245, 158, 11, 0.7));\n transition: background-color 0.2s ease, outline 0.2s ease;\n }\n\n .info-bar {\n margin-top: 12px;\n padding: 6px 14px;\n background: #f8fafc;\n border: 1px solid #e2e8f0;\n border-radius: 8px;\n font-size: 0.88rem;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n flex-wrap: wrap;\n max-width: 100%;\n box-sizing: border-box;\n gap: 8px;\n color: #334155;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);\n }\n\n .info-badge {\n font-weight: 700;\n color: #0284c7;\n background: #e0f2fe;\n padding: 2px 8px;\n border-radius: 4px;\n }\n\n .error-msg {\n color: #dc2626;\n padding: 8px;\n font-size: 0.9rem;\n }\n `,\n ];\n\n @property({ type: String }) term?: string;\n @property({ type: Number }) tension: number = 0.5;\n @property({ type: Boolean }) showLabels: boolean = false;\n @property({ type: Boolean }) showDetails: boolean = true;\n\n @state() private ast?: TermNode;\n @state() private error?: string;\n @state() private flatNodes: TermNode[] = [];\n @state() private edges: TreeEdge[] = [];\n @state() private activeNodeId?: string;\n @state() private activeSubtreeIds: Set<string> = new Set();\n @state() private treeHeight: number = 100;\n @state() private highlightRect?: {\n left: number;\n top: number;\n width: number;\n height: number;\n };\n\n @query('#formula') private formulaElement?: HTMLElement;\n @query('.tree-canvas') private treeCanvasElement?: HTMLElement;\n\n private resizeObserver?: ResizeObserver;\n private lastObservedWidth = 0;\n private resizeFrameId?: number;\n private animationTimers: number[] = [];\n\n connectedCallback() {\n super.connectedCallback();\n this.resizeObserver = new ResizeObserver(entries => {\n for (const entry of entries) {\n const width = entry.contentRect.width;\n if (Math.abs(width - this.lastObservedWidth) > 0.5) {\n this.lastObservedWidth = width;\n this.triggerLayoutUpdate();\n }\n }\n });\n\n window.addEventListener('animationend', this.onAnimationOrTransitionEnd);\n window.addEventListener('transitionend', this.onAnimationOrTransitionEnd);\n\n if (typeof document !== 'undefined' && document.fonts) {\n document.fonts.ready.then(() => {\n if (this.isConnected) {\n this.recalculateLayout();\n }\n });\n }\n }\n\n disconnectedCallback() {\n if (this.resizeFrameId) {\n cancelAnimationFrame(this.resizeFrameId);\n }\n this.clearAnimationTimers();\n window.removeEventListener('animationend', this.onAnimationOrTransitionEnd);\n window.removeEventListener('transitionend', this.onAnimationOrTransitionEnd);\n this.resizeObserver?.disconnect();\n super.disconnectedCallback();\n }\n\n private onAnimationOrTransitionEnd = () => {\n this.triggerLayoutUpdate();\n };\n\n private triggerLayoutUpdate() {\n if (this.resizeFrameId) {\n cancelAnimationFrame(this.resizeFrameId);\n }\n this.resizeFrameId = requestAnimationFrame(() => {\n if (this.isConnected) {\n this.recalculateLayout();\n }\n });\n }\n\n private watchAncestorAnimations() {\n let curr: Element | null = this;\n const animations: Animation[] = [];\n\n while (curr) {\n if (typeof curr.getAnimations === 'function') {\n for (const anim of curr.getAnimations()) {\n if (anim.playState === 'running' || anim.pending) {\n animations.push(anim);\n }\n }\n }\n const root = curr.getRootNode() as ShadowRoot | Document;\n if (root && 'host' in root) {\n curr = (root as ShadowRoot).host;\n } else {\n curr = curr.parentElement;\n }\n }\n\n if (animations.length > 0) {\n Promise.all(animations.map(a => a.finished.catch(() => { }))).then(() => {\n if (this.isConnected) {\n this.recalculateLayout();\n }\n });\n }\n }\n\n private scheduleAnimationCheck() {\n this.clearAnimationTimers();\n this.watchAncestorAnimations();\n\n const t1 = window.setTimeout(() => {\n if (!this.isConnected) return;\n this.watchAncestorAnimations();\n this.recalculateLayout();\n }, 50);\n\n const t2 = window.setTimeout(() => {\n if (!this.isConnected) return;\n this.recalculateLayout();\n }, 320);\n\n const t3 = window.setTimeout(() => {\n if (!this.isConnected) return;\n this.recalculateLayout();\n }, 450);\n\n this.animationTimers.push(t1, t2, t3);\n }\n\n private clearAnimationTimers() {\n for (const t of this.animationTimers) {\n clearTimeout(t);\n }\n this.animationTimers = [];\n }\n\n // Support slotted content: <kmap-term-tree>2a+3b</kmap-term-tree>\n updateSlotted(event: Event) {\n const slot = event.target as HTMLSlotElement;\n const text = slot\n .assignedNodes()\n .map(n => n.textContent)\n .join('')\n .trim();\n if (text && text !== this.term) {\n this.term = text;\n }\n }\n\n protected willUpdate(changedProperties: PropertyValues) {\n if (changedProperties.has('term') && this.term !== undefined) {\n this.parseInput(this.term);\n }\n }\n\n private parseInput(termStr: string) {\n try {\n this.error = undefined;\n const cleanTerm = termStr.trim();\n if (!cleanTerm) {\n this.ast = undefined;\n this.flatNodes = [];\n this.edges = [];\n return;\n }\n\n this.ast = parseAsciiMath(cleanTerm);\n this.activeNodeId = this.ast.id;\n this.activeSubtreeIds = this.collectSubtreeIds(this.ast);\n } catch (e: any) {\n this.error = e.message || 'Fehler beim Parsen des Terms';\n this.ast = undefined;\n this.flatNodes = [];\n this.edges = [];\n }\n }\n\n protected async updated(changedProperties: PropertyValues) {\n if (changedProperties.has('term') || changedProperties.has('ast')) {\n this.renderKaTeX();\n await this.updateComplete;\n this.recalculateLayout();\n if (this.treeCanvasElement && this.resizeObserver) {\n this.resizeObserver.observe(this.treeCanvasElement);\n }\n this.scheduleAnimationCheck();\n }\n }\n\n private renderKaTeX() {\n if (!this.formulaElement || !this.ast) return;\n\n try {\n const latex = astToAnnotatedLatex(this.ast);\n katex.render(latex, this.formulaElement, {\n trust: true,\n strict: false,\n throwOnError: false,\n });\n } catch (err: any) {\n this.error = err.message;\n }\n }\n\n private recalculateLayout() {\n if (\n !this.ast ||\n !this.formulaElement ||\n !this.treeCanvasElement ||\n !this.shadowRoot\n )\n return;\n\n const canvasRect = this.treeCanvasElement.getBoundingClientRect();\n const offsetWidth = this.treeCanvasElement.offsetWidth;\n const offsetHeight = this.treeCanvasElement.offsetHeight;\n\n if (canvasRect.width === 0 || offsetWidth === 0) return;\n this.lastObservedWidth = offsetWidth;\n\n const scaleX = canvasRect.width / offsetWidth;\n const scaleY = offsetHeight > 0 ? canvasRect.height / offsetHeight : scaleX;\n if (scaleX < 0.01 || scaleY < 0.01) return;\n\n const flatNodes: TermNode[] = [];\n const nodeMap = new Map<string, TermNode>();\n\n // 1. Collect all nodes and measure leaf positions from KaTeX DOM elements\n const collectAndPositionLeaves = (node: TermNode) => {\n nodeMap.set(node.id, node);\n\n if (node.children.length === 0) {\n // Leaf node: measure rendered KaTeX span\n const el = this.shadowRoot!.getElementById(node.id);\n if (el) {\n const rect = el.getBoundingClientRect();\n node.x = (rect.left - canvasRect.left + rect.width / 2) / scaleX;\n node.y = (rect.bottom - canvasRect.top) / scaleY;\n node.width = rect.width / scaleX;\n node.height = rect.height / scaleY;\n } else {\n node.x = offsetWidth / 2;\n node.y = 20;\n }\n } else {\n flatNodes.push(node);\n for (const child of node.children) {\n collectAndPositionLeaves(child);\n }\n }\n };\n\n collectAndPositionLeaves(this.ast);\n\n // 2. Position inner nodes bottom-up based on children coordinates\n const formulaRect = this.formulaElement.getBoundingClientRect();\n const formulaBottomRel = (formulaRect.bottom - canvasRect.top) / scaleY;\n const initialGap = 34; // distance from formula bottom to level 1 operators\n const rowHeight = 40; // distance between tree levels\n\n const positionInnerNodes = (node: TermNode) => {\n for (const child of node.children) {\n if (child.children.length > 0) {\n positionInnerNodes(child);\n }\n }\n\n if (node.children.length > 0) {\n if (node.type === 'function' || node.isUnary) {\n // Center under the full function / unary expression: e.g. sin(arg) or -arg\n const el = this.shadowRoot!.getElementById(node.id);\n if (el) {\n const rect = el.getBoundingClientRect();\n node.x = (rect.left - canvasRect.left + rect.width / 2) / scaleX;\n } else {\n node.x = node.children[0].x ?? 0;\n }\n } else {\n const first = node.children[0];\n const last = node.children[node.children.length - 1];\n node.x = ((first.x ?? 0) + (last.x ?? 0)) / 2;\n }\n node.y = formulaBottomRel + initialGap + (node.depth - 1) * rowHeight;\n }\n };\n\n positionInnerNodes(this.ast);\n\n // 3. Build edges between parent nodes and their children\n const edges: TreeEdge[] = [];\n for (const node of flatNodes) {\n if (node.x === undefined || node.y === undefined) continue;\n\n for (const child of node.children) {\n if (child.x === undefined || child.y === undefined) continue;\n\n edges.push({\n fromNodeId: child.id,\n toNodeId: node.id,\n fromX: child.x,\n fromY: child.y + (child.depth > 0 ? 14 : 2),\n toX: node.x,\n toY: node.y - 14,\n });\n }\n }\n\n const maxDepth = this.ast.depth;\n this.treeHeight = Math.max(\n 60,\n formulaBottomRel + initialGap + (maxDepth - 1) * rowHeight + 24\n );\n this.flatNodes = flatNodes;\n this.edges = edges;\n this.updateHighlightRect(this.activeNodeId);\n this.requestUpdate();\n }\n\n private collectSubtreeIds(node: TermNode): Set<string> {\n const ids = new Set<string>();\n const traverse = (n: TermNode) => {\n ids.add(n.id);\n for (const c of n.children) traverse(c);\n };\n traverse(node);\n return ids;\n }\n\n private onNodeHover(node: TermNode, enter: boolean) {\n if (!enter) {\n // Revert highlight to root node\n if (this.ast) {\n this.setActiveNode(this.ast);\n }\n return;\n }\n this.setActiveNode(node);\n }\n\n private setActiveNode(node: TermNode) {\n this.activeNodeId = node.id;\n this.activeSubtreeIds = this.collectSubtreeIds(node);\n this.updateHighlightRect(node.id);\n this.requestUpdate();\n }\n\n private findNode(\n root: TermNode | undefined,\n id: string\n ): TermNode | undefined {\n if (!root) return undefined;\n if (root.id === id) return root;\n for (const child of root.children) {\n const found = this.findNode(child, id);\n if (found) return found;\n }\n return undefined;\n }\n\n private getNodeVisualBounds(\n node: TermNode\n ): { top: number; bottom: number; left: number; right: number } | null {\n if (!this.shadowRoot) return null;\n\n let minTop = Infinity;\n let maxBottom = -Infinity;\n let minLeft = Infinity;\n let maxRight = -Infinity;\n\n const collectBounds = (n: TermNode) => {\n const el = this.shadowRoot!.getElementById(n.id);\n if (el) {\n const r = el.getBoundingClientRect();\n if (r.width > 0 && r.height > 0) {\n minTop = Math.min(minTop, r.top);\n maxBottom = Math.max(maxBottom, r.bottom);\n minLeft = Math.min(minLeft, r.left);\n maxRight = Math.max(maxRight, r.right);\n }\n }\n for (const child of n.children) {\n collectBounds(child);\n }\n };\n\n collectBounds(node);\n\n if (minTop === Infinity) return null;\n return { top: minTop, bottom: maxBottom, left: minLeft, right: maxRight };\n }\n\n private updateHighlightRect(nodeId?: string) {\n if (!nodeId || !this.shadowRoot || !this.treeCanvasElement || !this.ast) {\n this.highlightRect = undefined;\n return;\n }\n\n const node = this.findNode(this.ast, nodeId);\n if (!node) {\n this.highlightRect = undefined;\n return;\n }\n\n const bounds = this.getNodeVisualBounds(node);\n if (!bounds) {\n this.highlightRect = undefined;\n return;\n }\n\n const canvasRect = this.treeCanvasElement.getBoundingClientRect();\n const offsetWidth = this.treeCanvasElement.offsetWidth;\n const offsetHeight = this.treeCanvasElement.offsetHeight;\n if (canvasRect.width === 0 || offsetWidth === 0) {\n this.highlightRect = undefined;\n return;\n }\n\n const scaleX = canvasRect.width / offsetWidth;\n const scaleY = offsetHeight > 0 ? canvasRect.height / offsetHeight : scaleX;\n if (scaleX < 0.01 || scaleY < 0.01) {\n this.highlightRect = undefined;\n return;\n }\n\n const paddingX = 4;\n const paddingY = 4;\n\n this.highlightRect = {\n left: (bounds.left - canvasRect.left) / scaleX - paddingX,\n top: (bounds.top - canvasRect.top) / scaleY - paddingY,\n width: (bounds.right - bounds.left) / scaleX + paddingX * 2,\n height: (bounds.bottom - bounds.top) / scaleY + paddingY * 2,\n };\n }\n\n private renderPath(edge: TreeEdge): string {\n const delta = (edge.toY - edge.fromY) * this.tension;\n const hx1 = edge.fromX;\n const hy1 = edge.fromY + delta;\n const hx2 = edge.toX;\n const hy2 = edge.toY - delta;\n\n return `M ${edge.fromX} ${edge.fromY} C ${hx1} ${hy1} ${hx2} ${hy2} ${edge.toX} ${edge.toY}`;\n }\n\n render() {\n const activeNode =\n this.flatNodes.find(n => n.id === this.activeNodeId) || this.ast;\n const isRoot = activeNode?.id === this.ast?.id;\n\n return html`\n <div class=\"container\">\n <!-- Canvas area with formula, edges, and operator nodes sharing the same coordinate space -->\n <div class=\"tree-canvas\" style=\"height: ${this.treeHeight}px\">\n ${this.highlightRect\n ? html`\n <div\n class=\"highlight-overlay\"\n style=\"left: ${this.highlightRect.left}px; top: ${this\n .highlightRect.top}px; width: ${this.highlightRect\n .width}px; height: ${this.highlightRect.height}px;\"\n ></div>\n `\n : ''}\n\n <div class=\"formula-wrapper\">\n <div id=\"formula\"></div>\n </div>\n\n ${this.error\n ? html`<div class=\"error-msg\">${this.error}</div>`\n : html`\n <svg class=\"edges-svg\">\n ${this.edges.map(\n edge => svg`\n <path\n class=\"edge-path ${this.activeSubtreeIds.has(edge.fromNodeId) &&\n this.activeSubtreeIds.has(edge.toNodeId)\n ? 'highlighted'\n : ''\n }\"\n d=\"${this.renderPath(edge)}\"\n />\n `\n )}\n </svg>\n\n ${this.flatNodes.map(\n node => html`\n <div\n class=\"tree-node ${this.activeNodeId === node.id\n ? 'active'\n : ''}\"\n style=\"left: ${node.x}px; top: ${node.y}px;\"\n @mouseenter=${() => this.onNodeHover(node, true)}\n @mouseleave=${() => this.onNodeHover(node, false)}\n @click=${() => this.setActiveNode(node)}\n >\n <div class=\"node-badge\" title=\"${node.label}\">\n ${node.symbol}\n </div>\n ${this.showLabels\n ? html`<span class=\"node-label\">${node.label}</span>`\n : ''}\n </div>\n `\n )}\n `}\n </div>\n\n <!-- Didactic info box -->\n ${this.showDetails && activeNode\n ? html`\n <div class=\"info-bar\">\n <span>${isRoot ? 'Hauptrechenart:' : 'Teilterm:'}</span>\n <span class=\"info-badge\">${activeNode.label}</span>\n <span style=\"color: #64748b\">\n ${activeNode.children.length === 2\n ? `(verknüpft 2 Teilterme)`\n : activeNode.isUnary || activeNode.type === 'function' || activeNode.children.length === 1\n ? `(wirkt auf ${activeNode.children[0]?.label || 'Ausdruck'\n })`\n : ''}\n </span>\n </div>\n `\n : ''}\n\n <div hidden>\n <slot @slotchange=${this.updateSlotted}></slot>\n </div>\n </div>\n `;\n }\n}\n"]}
@@ -256,6 +256,7 @@ class PrattParser {
256
256
  mathJson: [fnName, arg.mathJson],
257
257
  children: [arg],
258
258
  depth: 0,
259
+ isUnary: true,
259
260
  };
260
261
  }
261
262
  // Unary plus or minus
@@ -1 +1 @@
1
- {"version":3,"file":"asciimath-parser.js","sourceRoot":"","sources":["../../src/asciimath-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,aAAa,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEvE,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IAC9B,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,IAAI;IACJ,KAAK;IACL,MAAM;IACN,KAAK;CACN,CAAC,CAAC;AAEH,MAAM,YAAY,GAA2B;IAC3C,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,EAAE,EAAE,IAAI;IACR,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;CACX,CAAC;AAEF,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC;IAC5B,OAAO;IACP,MAAM;IACN,OAAO;IACP,OAAO;IACP,SAAS;IACT,MAAM;IACN,KAAK;IACL,OAAO;IACP,MAAM;IACN,OAAO;IACP,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,OAAO;IACP,KAAK;IACL,S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AAC,KAAK,CAAC,IAAI,KAAK,UAAU,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC;gBAC3D,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC;gBACvD,KAAK,CAAC,eAAe,CAAC;YACxB,MAAM,QAAQ,GAAG,UAAU;gBACzB,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,eAAe,GAAG,IAAI,CAAC,EAAE,GAAG,YAAY,CAAC;YAC7C,OAAO,YAAY,IAAI,CAAC,EAAE,KAAK,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,CAAC;QACtE,CAAC;QACD,IAAI,IAAI,CAAC,EAAE,KAAK,QAAQ,EAAE,CAAC;YACzB,OAAO,YAAY,IAAI,CAAC,EAAE,YAAY,SAAS,KAAK,UAAU,IAAI,CAAC;QACrE,CAAC;QACD,IAAI,IAAI,CAAC,EAAE,KAAK,OAAO,EAAE,CAAC;YACxB,OAAO,YAAY,IAAI,CAAC,EAAE,KAAK,SAAS,KAAK,UAAU,IAAI,CAAC;QAC9D,CAAC;IACH,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["import { TermNode, GERMAN_LABELS, OPERATOR_SYMBOLS } from './model.js';\n\nconst KNOWN_FUNCTIONS = new Set([\n 'sin',\n 'cos',\n 'tan',\n 'cot',\n 'sec',\n 'csc',\n 'arcsin',\n 'arccos',\n 'arctan',\n 'sinh',\n 'cosh',\n 'tanh',\n 'exp',\n 'ln',\n 'log',\n 'sqrt',\n 'abs',\n]);\n\nconst FUNCTION_MAP: Record<string, string> = {\n sin: 'Sin',\n cos: 'Cos',\n tan: 'Tan',\n cot: 'Cot',\n arcsin: 'Arcsin',\n arccos: 'Arccos',\n arctan: 'Arctan',\n sinh: 'Sinh',\n cosh: 'Cosh',\n tanh: 'Tanh',\n ln: 'Ln',\n log: 'Log',\n sqrt: 'Sqrt',\n abs: 'Abs',\n exp: 'Exp',\n};\n\nconst GREEK_LETTERS = new Set([\n 'alpha',\n 'beta',\n 'gamma',\n 'delta',\n 'epsilon',\n 'zeta',\n 'eta',\n 'theta',\n 'iota',\n 'kappa',\n 'lambda',\n 'mu',\n 'nu',\n 'xi',\n 'pi',\n 'rho',\n 'sigma',\n 'tau',\n 'upsilon',\n 'phi',\n 'chi',\n 'psi',\n 'omega',\n]);\n\ntype TokenType =\n | 'NUMBER'\n | 'VARIABLE'\n | 'FUNCTION'\n | 'OPERATOR'\n | 'LPAREN'\n | 'RPAREN'\n | 'COMMA'\n | 'EOF';\n\ninterface Token {\n type: TokenType;\n value: string;\n implicit?: boolean;\n}\n\nclass Tokenizer {\n private input: string;\n private pos = 0;\n\n constructor(input: string) {\n this.input = input.trim();\n }\n\n tokenize(): Token[] {\n const rawTokens: Token[] = [];\n\n while (this.pos < this.input.length) {\n const ch = this.input[this.pos];\n\n if (/\\s/.test(ch)) {\n this.pos++;\n continue;\n }\n\n // Numbers: integer or floating point\n if (/\\d/.test(ch)) {\n let num = '';\n while (\n this.pos < this.input.length &&\n /[\\d.]/.test(this.input[this.pos])\n ) {\n num += this.input[this.pos++];\n }\n rawTokens.push({ type: 'NUMBER', value: num });\n continue;\n }\n\n // Words: functions, greek letters, or sequences of variable characters\n if (/[a-zA-Z]/.test(ch)) {\n let word = '';\n while (\n this.pos < this.input.length &&\n /[a-zA-Z]/.test(this.input[this.pos])\n ) {\n word += this.input[this.pos++];\n }\n const lower = word.toLowerCase();\n\n if (KNOWN_FUNCTIONS.has(lower)) {\n rawTokens.push({ type: 'FUNCTION', value: lower });\n } else if (GREEK_LETTERS.has(lower)) {\n rawTokens.push({ type: 'VARIABLE', value: lower });\n } else {\n // In school mathematics, \"2ab\" or \"xy\" means 2 * a * b or x * y\n for (const char of word) {\n rawTokens.push({ type: 'VARIABLE', value: char });\n }\n }\n continue;\n }\n\n // 'xx' or '·' or '*' as multiplication\n if (ch === 'x' && this.input[this.pos + 1] === 'x') {\n rawTokens.push({ type: 'OPERATOR', value: '*' });\n this.pos += 2;\n continue;\n }\n if (ch === '·' || ch === '*') {\n rawTokens.push({ type: 'OPERATOR', value: '*' });\n this.pos++;\n continue;\n }\n\n // Division: '/' or ':'\n if (ch === '/' || ch === ':') {\n rawTokens.push({ type: 'OPERATOR', value: ch });\n this.pos++;\n continue;\n }\n\n // Other operators\n if (ch === '+' || ch === '-' || ch === '^') {\n rawTokens.push({ type: 'OPERATOR', value: ch });\n this.pos++;\n continue;\n }\n\n // Parentheses & brackets\n if (ch === '(' || ch === '[') {\n rawTokens.push({ type: 'LPAREN', value: ch });\n this.pos++;\n continue;\n }\n if (ch === ')' || ch === ']') {\n rawTokens.push({ type: 'RPAREN', value: ch });\n this.pos++;\n continue;\n }\n\n if (ch === ',') {\n rawTokens.push({ type: 'COMMA', value: ch });\n this.pos++;\n continue;\n }\n\n // Fallback: skip unrecognized characters\n this.pos++;\n }\n\n // Insert implicit multiplication between operands where appropriate\n const tokens: Token[] = [];\n for (let i = 0; i < rawTokens.length; i++) {\n const cur = rawTokens[i];\n tokens.push(cur);\n\n if (i < rawTokens.length - 1) {\n const next = rawTokens[i + 1];\n const curEndsOperand =\n cur.type === 'NUMBER' ||\n cur.type === 'VARIABLE' ||\n cur.type === 'RPAREN';\n const nextStartsOperand =\n next.type === 'NUMBER' ||\n next.type === 'VARIABLE' ||\n next.type === 'FUNCTION' ||\n next.type === 'LPAREN';\n\n if (curEndsOperand && nextStartsOperand) {\n tokens.push({ type: 'OPERATOR', value: '*', implicit: true });\n }\n }\n }\n\n tokens.push({ type: 'EOF', value: '' });\n return tokens;\n }\n}\n\nlet nodeIdCounter = 1;\n\nexport function resetNodeIdCounter() {\n nodeIdCounter = 1;\n}\n\nclass PrattParser {\n private tokens: Token[];\n private pos = 0;\n\n constructor(tokens: Token[]) {\n this.tokens = tokens;\n }\n\n private current(): Token {\n return this.tokens[this.pos];\n }\n\n private consume(expectedType?: TokenType): Token {\n const token = this.current();\n if (expectedType && token.type !== expectedType) {\n throw new Error(\n `Erwartet ${expectedType}, aber erhalten: ${token.type} (${token.value})`\n );\n }\n this.pos++;\n return token;\n }\n\n parse(precedence = 0): TermNode {\n let left = this.parsePrefix();\n\n while (true) {\n const token = this.current();\n if (token.type !== 'OPERATOR') break;\n\n const opPrec = this.getInfixPrecedence(token.value);\n if (opPrec <= precedence) break;\n\n this.pos++;\n left = this.parseInfix(left, token, opPrec);\n }\n\n return left;\n }\n\n private parsePrefix(): TermNode {\n const token = this.current();\n\n if (token.type === 'NUMBER') {\n this.pos++;\n const val = parseFloat(token.value);\n return {\n id: `n${nodeIdCounter++}`,\n type: 'literal',\n value: val,\n raw: token.value,\n symbol: token.value,\n label: `Zahl ${token.value}`,\n mathJson: val,\n children: [],\n depth: 0,\n };\n }\n\n if (token.type === 'VARIABLE') {\n this.pos++;\n return {\n id: `n${nodeIdCounter++}`,\n type: 'variable',\n raw: token.value,\n symbol: token.value,\n label: `Variable ${token.value}`,\n mathJson: token.value,\n children: [],\n depth: 0,\n };\n }\n\n if (token.type === 'FUNCTION') {\n this.pos++;\n const fnName = FUNCTION_MAP[token.value] || token.value;\n let arg: TermNode;\n\n if (this.current().type === 'LPAREN') {\n this.consume('LPAREN');\n arg = this.parse(0);\n this.consume('RPAREN');\n } else {\n arg = this.parse(35); // higher than *, /, ^\n }\n\n const symbol = token.value === 'sqrt' ? '√' : token.value;\n\n return {\n id: `n${nodeIdCounter++}`,\n type: 'function',\n op: fnName,\n symbol,\n label: GERMAN_LABELS[fnName] || fnName,\n mathJson: [fnName, arg.mathJson],\n children: [arg],\n depth: 0,\n };\n }\n\n // Unary plus or minus\n if (\n token.type === 'OPERATOR' &&\n (token.value === '-' || token.value === '+')\n ) {\n this.pos++;\n const op = token.value;\n const operand = this.parse(30); // Prefix unary precedence\n\n if (op === '-') {\n return {\n id: `n${nodeIdCounter++}`,\n type: 'operator',\n isUnary: true,\n op: 'Negate',\n symbol: '−',\n label: GERMAN_LABELS['Negate'],\n mathJson: ['Negate', operand.mathJson],\n children: [operand],\n depth: 0,\n };\n } else {\n return operand;\n }\n }\n\n // Parentheses\n if (token.type === 'LPAREN') {\n this.pos++;\n const expr = this.parse(0);\n this.consume('RPAREN');\n expr.isParenthesized = true;\n return expr;\n }\n\n throw new Error(`Unerwartetes Zeichen: ${token.value || token.type}`);\n }\n\n private getInfixPrecedence(op: string): number {\n switch (op) {\n case '+':\n case '-':\n return 10;\n case '*':\n case '/':\n case ':':\n return 20;\n case '^':\n return 40;\n default:\n return 0;\n }\n }\n\n private parseInfix(\n left: TermNode,\n token: Token,\n precedence: number\n ): TermNode {\n const op = token.value;\n const isRightAssoc = op === '^';\n const nextPrec = isRightAssoc ? precedence - 1 : precedence;\n const right = this.parse(nextPrec);\n\n let opName = 'Add';\n if (op === '-') opName = 'Subtract';\n else if (op === '*') opName = 'Multiply';\n else if (op === '/' || op === ':') opName = 'Divide';\n else if (op === '^') opName = 'Power';\n\n const symbol = OPERATOR_SYMBOLS[opName] || op;\n const label = GERMAN_LABELS[opName] || opName;\n\n return {\n id: `n${nodeIdCounter++}`,\n type: 'operator',\n op: opName,\n symbol,\n label,\n implicit: token.implicit,\n mathJson: [opName, left.mathJson, right.mathJson],\n children: [left, right],\n depth: 0,\n };\n }\n}\n\n/**\n * Calculates depths bottom-up:\n * Leaves have depth 0.\n * A parent node has depth = max(children.depth) + 1.\n * Returns the maximum depth of the tree.\n */\nexport function calculateDepths(node: TermNode): number {\n if (node.children.length === 0) {\n node.depth = 0;\n return 0;\n }\n let maxChild = 0;\n for (const child of node.children) {\n maxChild = Math.max(maxChild, calculateDepths(child));\n }\n node.depth = maxChild + 1;\n return node.depth;\n}\n\n/**\n * Parses an AsciiMath string into a TermNode AST with Math-JSON support.\n */\nexport function parseAsciiMath(input: string): TermNode {\n resetNodeIdCounter();\n const tokenizer = new Tokenizer(input);\n const tokens = tokenizer.tokenize();\n const parser = new PrattParser(tokens);\n const root = parser.parse(0);\n calculateDepths(root);\n return root;\n}\n\nfunction getOperatorPrecedence(node: TermNode): number {\n if (node.type !== 'operator') return 999;\n if (node.isUnary) return 30;\n switch (node.op) {\n case 'Add':\n case 'Subtract':\n return 10;\n case 'Multiply':\n case 'Divide':\n return 20;\n case 'Power':\n return 40;\n default:\n return 0;\n }\n}\n\nfunction needsParens(\n parent: TermNode,\n child: TermNode,\n isLeft: boolean\n): boolean {\n if (child.isParenthesized) return true;\n if (child.type !== 'operator') return false;\n\n const pPrec = getOperatorPrecedence(parent);\n const cPrec = getOperatorPrecedence(child);\n\n if (cPrec < pPrec) return true;\n if (cPrec === pPrec) {\n // Subtraction and division are left-associative, right operand needs parentheses\n if (!isLeft && (parent.op === 'Subtract' || parent.op === 'Divide'))\n return true;\n }\n return false;\n}\n\n/**\n * Generates LaTeX from the AST with embedded `\\htmlId{...}` for KaTeX.\n */\nexport function astToAnnotatedLatex(node: TermNode): string {\n if (node.type === 'literal') {\n return `\\\\htmlId{${node.id}}{${node.raw}}`;\n }\n\n if (node.type === 'variable') {\n // Greek letters support (e.g. \\pi, \\alpha)\n const varName = GREEK_LETTERS.has(node.symbol)\n ? `\\\\${node.symbol}`\n : node.symbol;\n return `\\\\htmlId{${node.id}}{${varName}}`;\n }\n\n if (node.type === 'function') {\n const childLatex = astToAnnotatedLatex(node.children[0]);\n let fnSymbol: string;\n if (node.op === 'Sqrt' || node.symbol === '√' || node.symbol === 'sqrt') {\n fnSymbol = `\\\\sqrt{${childLatex}}`;\n } else if (node.symbol === 'abs') {\n fnSymbol = `\\\\left|${childLatex}\\\\right|`;\n } else {\n fnSymbol = `\\\\operatorname{${node.symbol}}\\\\left(${childLatex}\\\\right)`;\n }\n return `\\\\htmlId{${node.id}}{${fnSymbol}}`;\n }\n\n if (node.type === 'operator') {\n if (node.isUnary) {\n const childLatex = astToAnnotatedLatex(node.children[0]);\n return `\\\\htmlId{${node.id}}{-${childLatex}}`;\n }\n\n const left = node.children[0];\n const right = node.children[1];\n\n let leftLatex = astToAnnotatedLatex(left);\n let rightLatex = astToAnnotatedLatex(right);\n\n if (needsParens(node, left, true)) {\n leftLatex = `\\\\left(${leftLatex}\\\\right)`;\n }\n if (needsParens(node, right, false)) {\n rightLatex = `\\\\left(${rightLatex}\\\\right)`;\n }\n\n if (node.op === 'Add') {\n return `\\\\htmlId{${node.id}}{${leftLatex} \\\\htmlId{op_${node.id}}{+} ${rightLatex}}`;\n }\n if (node.op === 'Subtract') {\n return `\\\\htmlId{${node.id}}{${leftLatex} \\\\htmlId{op_${node.id}}{-} ${rightLatex}}`;\n }\n if (node.op === 'Multiply') {\n // Implicit multiplication styling (e.g. 2a, 4ac, (2+a)(3-b))\n const isImplicit =\n node.implicit ||\n (left.type === 'literal' &&\n (right.type === 'variable' || right.type === 'function')) ||\n (left.type === 'variable' && right.type === 'variable') ||\n right.isParenthesized;\n const opSymbol = isImplicit\n ? ''\n : ' \\\\htmlId{op_' + node.id + '}{\\\\cdot} ';\n return `\\\\htmlId{${node.id}}{${leftLatex}${opSymbol}${rightLatex}}`;\n }\n if (node.op === 'Divide') {\n return `\\\\htmlId{${node.id}}{\\\\frac{${leftLatex}}{${rightLatex}}}`;\n }\n if (node.op === 'Power') {\n return `\\\\htmlId{${node.id}}{${leftLatex}^{${rightLatex}}}`;\n }\n }\n\n return '';\n}\n"]}
1
+ {"version":3,"file":"asciimath-parser.js","sourceRoot":"","sources":["../../src/asciimath-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,aAAa,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEvE,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IAC9B,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,IAAI;IACJ,KAAK;IACL,MAAM;IACN,KAAK;CACN,CAAC,CAAC;AAEH,MAAM,YAAY,GAA2B;IAC3C,GAAG,EAAE,KAAK;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;YACxB,OAAO,YAAY,IAAI,CAAC,EAAE,KAAK,SAAS,KAAK,UAAU,IAAI,CAAC;QAC9D,CAAC;IACH,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["import { TermNode, GERMAN_LABELS, OPERATOR_SYMBOLS } from './model.js';\n\nconst KNOWN_FUNCTIONS = new Set([\n 'sin',\n 'cos',\n 'tan',\n 'cot',\n 'sec',\n 'csc',\n 'arcsin',\n 'arccos',\n 'arctan',\n 'sinh',\n 'cosh',\n 'tanh',\n 'exp',\n 'ln',\n 'log',\n 'sqrt',\n 'abs',\n]);\n\nconst FUNCTION_MAP: Record<string, string> = {\n sin: 'Sin',\n cos: 'Cos',\n tan: 'Tan',\n cot: 'Cot',\n arcsin: 'Arcsin',\n arccos: 'Arccos',\n arctan: 'Arctan',\n sinh: 'Sinh',\n cosh: 'Cosh',\n tanh: 'Tanh',\n ln: 'Ln',\n log: 'Log',\n sqrt: 'Sqrt',\n abs: 'Abs',\n exp: 'Exp',\n};\n\nconst GREEK_LETTERS = new Set([\n 'alpha',\n 'beta',\n 'gamma',\n 'delta',\n 'epsilon',\n 'zeta',\n 'eta',\n 'theta',\n 'iota',\n 'kappa',\n 'lambda',\n 'mu',\n 'nu',\n 'xi',\n 'pi',\n 'rho',\n 'sigma',\n 'tau',\n 'upsilon',\n 'phi',\n 'chi',\n 'psi',\n 'omega',\n]);\n\ntype TokenType =\n | 'NUMBER'\n | 'VARIABLE'\n | 'FUNCTION'\n | 'OPERATOR'\n | 'LPAREN'\n | 'RPAREN'\n | 'COMMA'\n | 'EOF';\n\ninterface Token {\n type: TokenType;\n value: string;\n implicit?: boolean;\n}\n\nclass Tokenizer {\n private input: string;\n private pos = 0;\n\n constructor(input: string) {\n this.input = input.trim();\n }\n\n tokenize(): Token[] {\n const rawTokens: Token[] = [];\n\n while (this.pos < this.input.length) {\n const ch = this.input[this.pos];\n\n if (/\\s/.test(ch)) {\n this.pos++;\n continue;\n }\n\n // Numbers: integer or floating point\n if (/\\d/.test(ch)) {\n let num = '';\n while (\n this.pos < this.input.length &&\n /[\\d.]/.test(this.input[this.pos])\n ) {\n num += this.input[this.pos++];\n }\n rawTokens.push({ type: 'NUMBER', value: num });\n continue;\n }\n\n // Words: functions, greek letters, or sequences of variable characters\n if (/[a-zA-Z]/.test(ch)) {\n let word = '';\n while (\n this.pos < this.input.length &&\n /[a-zA-Z]/.test(this.input[this.pos])\n ) {\n word += this.input[this.pos++];\n }\n const lower = word.toLowerCase();\n\n if (KNOWN_FUNCTIONS.has(lower)) {\n rawTokens.push({ type: 'FUNCTION', value: lower });\n } else if (GREEK_LETTERS.has(lower)) {\n rawTokens.push({ type: 'VARIABLE', value: lower });\n } else {\n // In school mathematics, \"2ab\" or \"xy\" means 2 * a * b or x * y\n for (const char of word) {\n rawTokens.push({ type: 'VARIABLE', value: char });\n }\n }\n continue;\n }\n\n // 'xx' or '·' or '*' as multiplication\n if (ch === 'x' && this.input[this.pos + 1] === 'x') {\n rawTokens.push({ type: 'OPERATOR', value: '*' });\n this.pos += 2;\n continue;\n }\n if (ch === '·' || ch === '*') {\n rawTokens.push({ type: 'OPERATOR', value: '*' });\n this.pos++;\n continue;\n }\n\n // Division: '/' or ':'\n if (ch === '/' || ch === ':') {\n rawTokens.push({ type: 'OPERATOR', value: ch });\n this.pos++;\n continue;\n }\n\n // Other operators\n if (ch === '+' || ch === '-' || ch === '^') {\n rawTokens.push({ type: 'OPERATOR', value: ch });\n this.pos++;\n continue;\n }\n\n // Parentheses & brackets\n if (ch === '(' || ch === '[') {\n rawTokens.push({ type: 'LPAREN', value: ch });\n this.pos++;\n continue;\n }\n if (ch === ')' || ch === ']') {\n rawTokens.push({ type: 'RPAREN', value: ch });\n this.pos++;\n continue;\n }\n\n if (ch === ',') {\n rawTokens.push({ type: 'COMMA', value: ch });\n this.pos++;\n continue;\n }\n\n // Fallback: skip unrecognized characters\n this.pos++;\n }\n\n // Insert implicit multiplication between operands where appropriate\n const tokens: Token[] = [];\n for (let i = 0; i < rawTokens.length; i++) {\n const cur = rawTokens[i];\n tokens.push(cur);\n\n if (i < rawTokens.length - 1) {\n const next = rawTokens[i + 1];\n const curEndsOperand =\n cur.type === 'NUMBER' ||\n cur.type === 'VARIABLE' ||\n cur.type === 'RPAREN';\n const nextStartsOperand =\n next.type === 'NUMBER' ||\n next.type === 'VARIABLE' ||\n next.type === 'FUNCTION' ||\n next.type === 'LPAREN';\n\n if (curEndsOperand && nextStartsOperand) {\n tokens.push({ type: 'OPERATOR', value: '*', implicit: true });\n }\n }\n }\n\n tokens.push({ type: 'EOF', value: '' });\n return tokens;\n }\n}\n\nlet nodeIdCounter = 1;\n\nexport function resetNodeIdCounter() {\n nodeIdCounter = 1;\n}\n\nclass PrattParser {\n private tokens: Token[];\n private pos = 0;\n\n constructor(tokens: Token[]) {\n this.tokens = tokens;\n }\n\n private current(): Token {\n return this.tokens[this.pos];\n }\n\n private consume(expectedType?: TokenType): Token {\n const token = this.current();\n if (expectedType && token.type !== expectedType) {\n throw new Error(\n `Erwartet ${expectedType}, aber erhalten: ${token.type} (${token.value})`\n );\n }\n this.pos++;\n return token;\n }\n\n parse(precedence = 0): TermNode {\n let left = this.parsePrefix();\n\n while (true) {\n const token = this.current();\n if (token.type !== 'OPERATOR') break;\n\n const opPrec = this.getInfixPrecedence(token.value);\n if (opPrec <= precedence) break;\n\n this.pos++;\n left = this.parseInfix(left, token, opPrec);\n }\n\n return left;\n }\n\n private parsePrefix(): TermNode {\n const token = this.current();\n\n if (token.type === 'NUMBER') {\n this.pos++;\n const val = parseFloat(token.value);\n return {\n id: `n${nodeIdCounter++}`,\n type: 'literal',\n value: val,\n raw: token.value,\n symbol: token.value,\n label: `Zahl ${token.value}`,\n mathJson: val,\n children: [],\n depth: 0,\n };\n }\n\n if (token.type === 'VARIABLE') {\n this.pos++;\n return {\n id: `n${nodeIdCounter++}`,\n type: 'variable',\n raw: token.value,\n symbol: token.value,\n label: `Variable ${token.value}`,\n mathJson: token.value,\n children: [],\n depth: 0,\n };\n }\n\n if (token.type === 'FUNCTION') {\n this.pos++;\n const fnName = FUNCTION_MAP[token.value] || token.value;\n let arg: TermNode;\n\n if (this.current().type === 'LPAREN') {\n this.consume('LPAREN');\n arg = this.parse(0);\n this.consume('RPAREN');\n } else {\n arg = this.parse(35); // higher than *, /, ^\n }\n\n const symbol = token.value === 'sqrt' ? '√' : token.value;\n\n return {\n id: `n${nodeIdCounter++}`,\n type: 'function',\n op: fnName,\n symbol,\n label: GERMAN_LABELS[fnName] || fnName,\n mathJson: [fnName, arg.mathJson],\n children: [arg],\n depth: 0,\n isUnary: true,\n };\n }\n\n // Unary plus or minus\n if (\n token.type === 'OPERATOR' &&\n (token.value === '-' || token.value === '+')\n ) {\n this.pos++;\n const op = token.value;\n const operand = this.parse(30); // Prefix unary precedence\n\n if (op === '-') {\n return {\n id: `n${nodeIdCounter++}`,\n type: 'operator',\n isUnary: true,\n op: 'Negate',\n symbol: '−',\n label: GERMAN_LABELS['Negate'],\n mathJson: ['Negate', operand.mathJson],\n children: [operand],\n depth: 0,\n };\n } else {\n return operand;\n }\n }\n\n // Parentheses\n if (token.type === 'LPAREN') {\n this.pos++;\n const expr = this.parse(0);\n this.consume('RPAREN');\n expr.isParenthesized = true;\n return expr;\n }\n\n throw new Error(`Unerwartetes Zeichen: ${token.value || token.type}`);\n }\n\n private getInfixPrecedence(op: string): number {\n switch (op) {\n case '+':\n case '-':\n return 10;\n case '*':\n case '/':\n case ':':\n return 20;\n case '^':\n return 40;\n default:\n return 0;\n }\n }\n\n private parseInfix(\n left: TermNode,\n token: Token,\n precedence: number\n ): TermNode {\n const op = token.value;\n const isRightAssoc = op === '^';\n const nextPrec = isRightAssoc ? precedence - 1 : precedence;\n const right = this.parse(nextPrec);\n\n let opName = 'Add';\n if (op === '-') opName = 'Subtract';\n else if (op === '*') opName = 'Multiply';\n else if (op === '/' || op === ':') opName = 'Divide';\n else if (op === '^') opName = 'Power';\n\n const symbol = OPERATOR_SYMBOLS[opName] || op;\n const label = GERMAN_LABELS[opName] || opName;\n\n return {\n id: `n${nodeIdCounter++}`,\n type: 'operator',\n op: opName,\n symbol,\n label,\n implicit: token.implicit,\n mathJson: [opName, left.mathJson, right.mathJson],\n children: [left, right],\n depth: 0,\n };\n }\n}\n\n/**\n * Calculates depths bottom-up:\n * Leaves have depth 0.\n * A parent node has depth = max(children.depth) + 1.\n * Returns the maximum depth of the tree.\n */\nexport function calculateDepths(node: TermNode): number {\n if (node.children.length === 0) {\n node.depth = 0;\n return 0;\n }\n let maxChild = 0;\n for (const child of node.children) {\n maxChild = Math.max(maxChild, calculateDepths(child));\n }\n node.depth = maxChild + 1;\n return node.depth;\n}\n\n/**\n * Parses an AsciiMath string into a TermNode AST with Math-JSON support.\n */\nexport function parseAsciiMath(input: string): TermNode {\n resetNodeIdCounter();\n const tokenizer = new Tokenizer(input);\n const tokens = tokenizer.tokenize();\n const parser = new PrattParser(tokens);\n const root = parser.parse(0);\n calculateDepths(root);\n return root;\n}\n\nfunction getOperatorPrecedence(node: TermNode): number {\n if (node.type !== 'operator') return 999;\n if (node.isUnary) return 30;\n switch (node.op) {\n case 'Add':\n case 'Subtract':\n return 10;\n case 'Multiply':\n case 'Divide':\n return 20;\n case 'Power':\n return 40;\n default:\n return 0;\n }\n}\n\nfunction needsParens(\n parent: TermNode,\n child: TermNode,\n isLeft: boolean\n): boolean {\n if (child.isParenthesized) return true;\n if (child.type !== 'operator') return false;\n\n const pPrec = getOperatorPrecedence(parent);\n const cPrec = getOperatorPrecedence(child);\n\n if (cPrec < pPrec) return true;\n if (cPrec === pPrec) {\n // Subtraction and division are left-associative, right operand needs parentheses\n if (!isLeft && (parent.op === 'Subtract' || parent.op === 'Divide'))\n return true;\n }\n return false;\n}\n\n/**\n * Generates LaTeX from the AST with embedded `\\htmlId{...}` for KaTeX.\n */\nexport function astToAnnotatedLatex(node: TermNode): string {\n if (node.type === 'literal') {\n return `\\\\htmlId{${node.id}}{${node.raw}}`;\n }\n\n if (node.type === 'variable') {\n // Greek letters support (e.g. \\pi, \\alpha)\n const varName = GREEK_LETTERS.has(node.symbol)\n ? `\\\\${node.symbol}`\n : node.symbol;\n return `\\\\htmlId{${node.id}}{${varName}}`;\n }\n\n if (node.type === 'function') {\n const childLatex = astToAnnotatedLatex(node.children[0]);\n let fnSymbol: string;\n if (node.op === 'Sqrt' || node.symbol === '√' || node.symbol === 'sqrt') {\n fnSymbol = `\\\\sqrt{${childLatex}}`;\n } else if (node.symbol === 'abs') {\n fnSymbol = `\\\\left|${childLatex}\\\\right|`;\n } else {\n fnSymbol = `\\\\operatorname{${node.symbol}}\\\\left(${childLatex}\\\\right)`;\n }\n return `\\\\htmlId{${node.id}}{${fnSymbol}}`;\n }\n\n if (node.type === 'operator') {\n if (node.isUnary) {\n const childLatex = astToAnnotatedLatex(node.children[0]);\n return `\\\\htmlId{${node.id}}{-${childLatex}}`;\n }\n\n const left = node.children[0];\n const right = node.children[1];\n\n let leftLatex = astToAnnotatedLatex(left);\n let rightLatex = astToAnnotatedLatex(right);\n\n if (needsParens(node, left, true)) {\n leftLatex = `\\\\left(${leftLatex}\\\\right)`;\n }\n if (needsParens(node, right, false)) {\n rightLatex = `\\\\left(${rightLatex}\\\\right)`;\n }\n\n if (node.op === 'Add') {\n return `\\\\htmlId{${node.id}}{${leftLatex} \\\\htmlId{op_${node.id}}{+} ${rightLatex}}`;\n }\n if (node.op === 'Subtract') {\n return `\\\\htmlId{${node.id}}{${leftLatex} \\\\htmlId{op_${node.id}}{-} ${rightLatex}}`;\n }\n if (node.op === 'Multiply') {\n // Implicit multiplication styling (e.g. 2a, 4ac, (2+a)(3-b))\n const isImplicit =\n node.implicit ||\n (left.type === 'literal' &&\n (right.type === 'variable' || right.type === 'function')) ||\n (left.type === 'variable' && right.type === 'variable') ||\n right.isParenthesized;\n const opSymbol = isImplicit\n ? ''\n : ' \\\\htmlId{op_' + node.id + '}{\\\\cdot} ';\n return `\\\\htmlId{${node.id}}{${leftLatex}${opSymbol}${rightLatex}}`;\n }\n if (node.op === 'Divide') {\n return `\\\\htmlId{${node.id}}{\\\\frac{${leftLatex}}{${rightLatex}}}`;\n }\n if (node.op === 'Power') {\n return `\\\\htmlId{${node.id}}{${leftLatex}^{${rightLatex}}}`;\n }\n }\n\n return '';\n}\n"]}
package/dist/src/model.js CHANGED
@@ -4,7 +4,7 @@ export const GERMAN_LABELS = {
4
4
  Multiply: 'Produkt',
5
5
  Divide: 'Quotient',
6
6
  Power: 'Potenz',
7
- Negate: 'Gegenzahl (Negation)',
7
+ Negate: 'Negation',
8
8
  Sqrt: 'Quadratwurzel',
9
9
  Sin: 'Sinus',
10
10
  Cos: 'Kosinus',
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/model.ts"],"names":[],"mappings":"AA+BA,MAAM,CAAC,MAAM,aAAa,GAA2B;IACnD,GAAG,EAAE,OAAO;IACZ,QAAQ,EAAE,WAAW;IACrB,QAAQ,EAAE,SAAS;IACnB,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,sBAAsB;IAC9B,IAAI,EAAE,eAAe;IACrB,GAAG,EAAE,OAAO;IACZ,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,WAAW;IAChB,EAAE,EAAE,yBAAyB;IAC7B,GAAG,EAAE,aAAa;IAClB,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,qBAAqB;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACtD,GAAG,EAAE,GAAG;IACR,QAAQ,EAAE,GAAG;IACb,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,GAAG;IACX,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;CACZ,CAAC","sourcesContent":["export type NodeType = 'literal' | 'variable' | 'operator' | 'function';\n\nexport interface TermNode {\n id: string;\n type: NodeType;\n op?: string;\n symbol: string;\n label: string;\n raw?: string;\n value?: number;\n isUnary?: boolean;\n isParenthesized?: boolean;\n implicit?: boolean;\n mathJson: any;\n children: TermNode[];\n depth: number;\n x?: number;\n y?: number;\n width?: number;\n height?: number;\n}\n\nexport interface TreeEdge {\n fromNodeId: string;\n toNodeId: string;\n fromX: number;\n fromY: number;\n toX: number;\n toY: number;\n}\n\nexport const GERMAN_LABELS: Record<string, string> = {\n Add: 'Summe',\n Subtract: 'Differenz',\n Multiply: 'Produkt',\n Divide: 'Quotient',\n Power: 'Potenz',\n Negate: 'Gegenzahl (Negation)',\n Sqrt: 'Quadratwurzel',\n Sin: 'Sinus',\n Cos: 'Kosinus',\n Tan: 'Tangens',\n Cot: 'Kotangens',\n Ln: 'Natürlicher Logarithmus',\n Log: 'Logarithmus',\n Abs: 'Betrag',\n Exp: 'Exponentialfunktion',\n};\n\nexport const OPERATOR_SYMBOLS: Record<string, string> = {\n Add: '+',\n Subtract: '−',\n Multiply: '·',\n Divide: ':',\n Power: '^',\n Negate: '−',\n};\n"]}
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/model.ts"],"names":[],"mappings":"AA+BA,MAAM,CAAC,MAAM,aAAa,GAA2B;IACnD,GAAG,EAAE,OAAO;IACZ,QAAQ,EAAE,WAAW;IACrB,QAAQ,EAAE,SAAS;IACnB,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,eAAe;IACrB,GAAG,EAAE,OAAO;IACZ,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,WAAW;IAChB,EAAE,EAAE,yBAAyB;IAC7B,GAAG,EAAE,aAAa;IAClB,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,qBAAqB;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACtD,GAAG,EAAE,GAAG;IACR,QAAQ,EAAE,GAAG;IACb,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,GAAG;IACX,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;CACZ,CAAC","sourcesContent":["export type NodeType = 'literal' | 'variable' | 'operator' | 'function';\n\nexport interface TermNode {\n id: string;\n type: NodeType;\n op?: string;\n symbol: string;\n label: string;\n raw?: string;\n value?: number;\n isUnary?: boolean;\n isParenthesized?: boolean;\n implicit?: boolean;\n mathJson: any;\n children: TermNode[];\n depth: number;\n x?: number;\n y?: number;\n width?: number;\n height?: number;\n}\n\nexport interface TreeEdge {\n fromNodeId: string;\n toNodeId: string;\n fromX: number;\n fromY: number;\n toX: number;\n toY: number;\n}\n\nexport const GERMAN_LABELS: Record<string, string> = {\n Add: 'Summe',\n Subtract: 'Differenz',\n Multiply: 'Produkt',\n Divide: 'Quotient',\n Power: 'Potenz',\n Negate: 'Negation',\n Sqrt: 'Quadratwurzel',\n Sin: 'Sinus',\n Cos: 'Kosinus',\n Tan: 'Tangens',\n Cot: 'Kotangens',\n Ln: 'Natürlicher Logarithmus',\n Log: 'Logarithmus',\n Abs: 'Betrag',\n Exp: 'Exponentialfunktion',\n};\n\nexport const OPERATOR_SYMBOLS: Record<string, string> = {\n Add: '+',\n Subtract: '−',\n Multiply: '·',\n Divide: ':',\n Power: '^',\n Negate: '−',\n};\n"]}
@@ -47,5 +47,21 @@ describe('KmapTermTree', () => {
47
47
  // Both should compute substantially the same local canvas left coordinate (within 2px)
48
48
  expect(Math.abs(scaledLeft - normalLeft)).to.be.below(2);
49
49
  });
50
+ it('correctly sets active state and unary info bar text when hovering function node like sin', async () => {
51
+ const el = await fixture(html `<kmap-term-tree term="2a + sin(3b)" showDetails></kmap-term-tree>`);
52
+ await el.updateComplete;
53
+ const nodes = Array.from(el.shadowRoot.querySelectorAll('.tree-node'));
54
+ const sinNode = nodes.find(n => { var _a; return (_a = n.textContent) === null || _a === void 0 ? void 0 : _a.includes('sin'); });
55
+ expect(sinNode).to.exist;
56
+ sinNode.dispatchEvent(new MouseEvent('mouseenter'));
57
+ await el.updateComplete;
58
+ const infoBar = el.shadowRoot.querySelector('.info-bar');
59
+ expect(infoBar).to.exist;
60
+ expect(infoBar.textContent).to.include('Sinus');
61
+ expect(infoBar.textContent).to.include('wirkt auf Produkt');
62
+ sinNode.dispatchEvent(new MouseEvent('mouseleave'));
63
+ await el.updateComplete;
64
+ expect(infoBar.textContent).to.include('Summe');
65
+ });
50
66
  });
51
67
  //# sourceMappingURL=kmap-term-tree.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"kmap-term-tree.test.js","sourceRoot":"","sources":["../../test/kmap-term-tree.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAGzD,OAAO,0BAA0B,CAAC;AAElC,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,0CAA0C,EAAE,KAAK,IAAI,EAAE;QACxD,MAAM,EAAE,GAAG,MAAM,OAAO,CACtB,IAAI,CAAA,gDAAgD,CACrD,CAAC;QACF,MAAM,EAAE,CAAC,cAAc,CAAC;QAExB,MAAM,OAAO,GAAG,EAAE,CAAC,UAAW,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QACzD,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QACzB,MAAM,CAAC,OAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE/C,MAAM,KAAK,GAAG,EAAE,CAAC,UAAW,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;QAC5D,4EAA4E;QAC5E,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uBAAuB,EAAE,KAAK,IAAI,EAAE;QACrC,MAAM,EAAE,GAAG,MAAM,OAAO,CACtB,IAAI,CA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AAE,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uDAAuD,EAAE,KAAK,IAAI,EAAE;QACrE,MAAM,EAAE,GAAG,MAAM,OAAO,CACtB,IAAI,CAAA,gDAAgD,CACrD,CAAC;QACF,MAAM,EAAE,CAAC,cAAc,CAAC;QAExB,MAAM,UAAU,GAAG,EAAE,CAAC,UAAW,CAAC,aAAa,CAAC,YAAY,CAAgB,CAAC;QAC7E,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QAC5B,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAErD,+CAA+C;QAC/C,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC;QACjC,EAAU,CAAC,iBAAiB,EAAE,CAAC;QAEhC,MAAM,UAAU,GAAG,EAAE,CAAC,UAAW,CAAC,aAAa,CAAC,YAAY,CAAgB,CAAC;QAC7E,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAErD,uFAAuF;QACvF,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { html, fixture, expect } from '@open-wc/testing';\n\nimport { KmapTermTree } from '../src/KmapTermTree.js';\nimport '../src/kmap-term-tree.js';\n\ndescribe('KmapTermTree', () => {\n it('renders a term with KaTeX and tree nodes', async () => {\n const el = await fixture<KmapTermTree>(\n html`<kmap-term-tree term=\"2a+3b\"></kmap-term-tree>`\n );\n await el.updateComplete;\n\n const formula = el.shadowRoot!.querySelector('#formula');\n expect(formula).to.exist;\n expect(formula!.innerHTML).to.contain('katex');\n\n const nodes = el.shadowRoot!.querySelectorAll('.tree-node');\n // For 2a + 3b: nodes are +, and two implicit multiplications (3 operations)\n expect(nodes.length).to.be.greaterThan(0);\n });\n\n it('supports slot content', async () => {\n const el = await fixture<KmapTermTree>(\n html`<kmap-term-tree>(2+a)(3-b)</kmap-term-tree>`\n );\n await el.updateComplete;\n\n expect(el.term).to.equal('(2+a)(3-b)');\n const formula = el.shadowRoot!.querySelector('#formula');\n expect(formula!.innerHTML).to.contain('katex');\n });\n\n it('highlights full height for fractions and roots', async () => {\n const el = await fixture<KmapTermTree>(\n html`<kmap-term-tree term=\"sqrt(2/3)\"></kmap-term-tree>`\n );\n await el.updateComplete;\n\n const overlay = el.shadowRoot!.querySelector(\n '.highlight-overlay'\n ) as HTMLElement;\n expect(overlay).to.exist;\n\n const overlayRect = overlay.getBoundingClientRect();\n const n1 = el.shadowRoot!.getElementById('n1')!; // numerator 2\n const n2 = el.shadowRoot!.getElementById('n2')!; // denominator 3\n\n const r1 = n1.getBoundingClientRect();\n const r2 = n2.getBoundingClientRect();\n\n // The overlay top must be at or above the numerator top\n expect(overlayRect.top).to.be.at.most(r1.top);\n // The overlay bottom must be at or below the denominator bottom\n expect(overlayRect.bottom).to.be.at.least(r2.bottom);\n });\n\n it('computes correct layout even with CSS scale transform', async () => {\n const el = await fixture<KmapTermTree>(\n html`<kmap-term-tree term=\"2a+3b\"></kmap-term-tree>`\n );\n await el.updateComplete;\n\n const normalNode = el.shadowRoot!.querySelector('.tree-node') as HTMLElement;\n expect(normalNode).to.exist;\n const normalLeft = parseFloat(normalNode.style.left);\n\n // Apply scale transform and recalculate layout\n el.style.transform = 'scale(0.3)';\n (el as any).recalculateLayout();\n\n const scaledNode = el.shadowRoot!.querySelector('.tree-node') as HTMLElement;\n const scaledLeft = parseFloat(scaledNode.style.left);\n\n // Both should compute substantially the same local canvas left coordinate (within 2px)\n expect(Math.abs(scaledLeft - normalLeft)).to.be.below(2);\n });\n});\n\n"]}
1
+ {"version":3,"file":"k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,UAAW,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;QAC1D,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QACzB,MAAM,CAAC,OAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,MAAM,CAAC,OAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;QAE7D,OAAQ,CAAC,aAAa,CAAC,IAAI,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;QACrD,MAAM,EAAE,CAAC,cAAc,CAAC;QAExB,MAAM,CAAC,OAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { html, fixture, expect } from '@open-wc/testing';\n\nimport { KmapTermTree } from '../src/KmapTermTree.js';\nimport '../src/kmap-term-tree.js';\n\ndescribe('KmapTermTree', () => {\n it('renders a term with KaTeX and tree nodes', async () => {\n const el = await fixture<KmapTermTree>(\n html`<kmap-term-tree term=\"2a+3b\"></kmap-term-tree>`\n );\n await el.updateComplete;\n\n const formula = el.shadowRoot!.querySelector('#formula');\n expect(formula).to.exist;\n expect(formula!.innerHTML).to.contain('katex');\n\n const nodes = el.shadowRoot!.querySelectorAll('.tree-node');\n // For 2a + 3b: nodes are +, and two implicit multiplications (3 operations)\n expect(nodes.length).to.be.greaterThan(0);\n });\n\n it('supports slot content', async () => {\n const el = await fixture<KmapTermTree>(\n html`<kmap-term-tree>(2+a)(3-b)</kmap-term-tree>`\n );\n await el.updateComplete;\n\n expect(el.term).to.equal('(2+a)(3-b)');\n const formula = el.shadowRoot!.querySelector('#formula');\n expect(formula!.innerHTML).to.contain('katex');\n });\n\n it('highlights full height for fractions and roots', async () => {\n const el = await fixture<KmapTermTree>(\n html`<kmap-term-tree term=\"sqrt(2/3)\"></kmap-term-tree>`\n );\n await el.updateComplete;\n\n const overlay = el.shadowRoot!.querySelector(\n '.highlight-overlay'\n ) as HTMLElement;\n expect(overlay).to.exist;\n\n const overlayRect = overlay.getBoundingClientRect();\n const n1 = el.shadowRoot!.getElementById('n1')!; // numerator 2\n const n2 = el.shadowRoot!.getElementById('n2')!; // denominator 3\n\n const r1 = n1.getBoundingClientRect();\n const r2 = n2.getBoundingClientRect();\n\n // The overlay top must be at or above the numerator top\n expect(overlayRect.top).to.be.at.most(r1.top);\n // The overlay bottom must be at or below the denominator bottom\n expect(overlayRect.bottom).to.be.at.least(r2.bottom);\n });\n\n it('computes correct layout even with CSS scale transform', async () => {\n const el = await fixture<KmapTermTree>(\n html`<kmap-term-tree term=\"2a+3b\"></kmap-term-tree>`\n );\n await el.updateComplete;\n\n const normalNode = el.shadowRoot!.querySelector('.tree-node') as HTMLElement;\n expect(normalNode).to.exist;\n const normalLeft = parseFloat(normalNode.style.left);\n\n // Apply scale transform and recalculate layout\n el.style.transform = 'scale(0.3)';\n (el as any).recalculateLayout();\n\n const scaledNode = el.shadowRoot!.querySelector('.tree-node') as HTMLElement;\n const scaledLeft = parseFloat(scaledNode.style.left);\n\n // Both should compute substantially the same local canvas left coordinate (within 2px)\n expect(Math.abs(scaledLeft - normalLeft)).to.be.below(2);\n });\n\n it('correctly sets active state and unary info bar text when hovering function node like sin', async () => {\n const el = await fixture<KmapTermTree>(\n html`<kmap-term-tree term=\"2a + sin(3b)\" showDetails></kmap-term-tree>`\n );\n await el.updateComplete;\n\n const nodes = Array.from(\n el.shadowRoot!.querySelectorAll('.tree-node')\n ) as HTMLElement[];\n const sinNode = nodes.find(n => n.textContent?.includes('sin'));\n expect(sinNode).to.exist;\n\n sinNode!.dispatchEvent(new MouseEvent('mouseenter'));\n await el.updateComplete;\n\n const infoBar = el.shadowRoot!.querySelector('.info-bar');\n expect(infoBar).to.exist;\n expect(infoBar!.textContent).to.include('Sinus');\n expect(infoBar!.textContent).to.include('wirkt auf Produkt');\n\n sinNode!.dispatchEvent(new MouseEvent('mouseleave'));\n await el.updateComplete;\n\n expect(infoBar!.textContent).to.include('Summe');\n });\n});\n\n"]}
@@ -1 +1 @@
1
- {"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/tslib/tslib.d.ts","../node_modules/@lit/reactive-element/css-tag.d.ts","../node_modules/@lit/reactive-element/reactive-controller.d.ts","../node_modules/@lit/reactive-element/reactive-element.d.ts","../node_modules/@types/trusted-types/lib/index.d.ts","../node_modules/@types/trusted-types/index.d.ts","../node_modules/lit-html/directive.d.ts","../node_modules/lit-html/lit-html.d.ts","../node_modules/lit-element/lit-element.d.ts","../node_modules/lit-html/is-server.d.ts","../node_modules/lit/index.d.ts","../node_modules/@lit/reactive-element/decorators/base.d.ts","../node_modules/@lit/reactive-element/decorators/custom-element.d.ts","../node_modules/@lit/reactive-element/decorators/property.d.ts","../node_modules/@lit/reactive-element/decorators/state.d.ts","../node_modules/@lit/reactive-element/decorators/event-options.d.ts","../node_modules/@lit/reactive-element/decorators/query.d.ts","../node_modules/@lit/reactive-element/decorators/query-all.d.ts","../node_modules/@lit/reactive-element/decorators/query-async.d.ts","../node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts","../node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts","../node_modules/lit/decorators.d.ts","../node_modules/katex/types/katex.d.ts","../src/katex-css.ts","../src/model.ts","../src/asciimath-parser.ts","../src/KmapTermTree.ts","../src/index.ts","../src/kmap-term-tree.ts","../src/tokenizer.ts","../src/parser.ts","../stories/index.stories.ts","../node_modules/@types/chai/index.d.ts","../node_modules/@open-wc/semantic-dom-diff/get-diffable-html.d.ts","../node_modules/@open-wc/semantic-dom-diff/chai-dom-diff-plugin.d.ts","../node_modules/@open-wc/semantic-dom-diff/chai-dom-diff.d.ts","../node_modules/@open-wc/semantic-dom-diff/index.d.ts","../node_modules/chai-a11y-axe/chai-a11y-axe-plugin.d.ts","../node_modules/chai-a11y-axe/src/accessible.d.ts","../node_modules/chai-a11y-axe/index.d.ts","../node_modules/@types/chai-dom/index.d.ts","../node_modules/@types/sinonjs__fake-timers/index.d.ts","../node_modules/@types/sinon/index.d.ts","../node_modules/@types/sinon-chai/index.d.ts","../node_modules/@open-wc/testing/register-chai-plugins.d.ts","../node_modules/@open-wc/testing-helpers/types/src/elementUpdated.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/lit-html/directive.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/lit-html/lit-html.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/lit-html/static.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/lit/static-html.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/@lit/reactive-element/css-tag.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/@lit/reactive-element/reactive-controller.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/@lit/reactive-element/reactive-element.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/lit-element/lit-element.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/lit-html/is-server.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/lit/index.d.ts","../node_modules/@open-wc/testing-helpers/types/src/renderable.d.ts","../node_modules/@open-wc/dedupe-mixin/index.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/@open-wc/scoped-elements/types.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/@open-wc/scoped-elements/html-element.d.ts","../node_modules/@open-wc/testing-helpers/types/src/fixture-no-side-effect.d.ts","../node_modules/@open-wc/testing-helpers/types/src/fixture.d.ts","../node_modules/@open-wc/testing-helpers/types/src/fixtureWrapper.d.ts","../node_modules/@open-wc/testing-helpers/types/src/helpers.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/lit/html.d.ts","../node_modules/@open-wc/testing-helpers/types/src/scopedElementsWrapper.d.ts","../node_modules/@open-wc/testing-helpers/types/src/litFixture.d.ts","../node_modules/@open-wc/testing-helpers/types/src/stringFixture.d.ts","../node_modules/@open-wc/testing-helpers/types/index.d.ts","../node_modules/@open-wc/testing/index.d.ts","../test/asciimath-parser.test.ts","../test/kmap-term-tree.test.ts","../test/tokenizer.test.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/dom-events.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/readline/promises.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/test.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/accepts/index.d.ts","../node_modules/@types/babel__code-frame/index.d.ts","../node_modules/@types/connect/index.d.ts","../node_modules/@types/body-parser/index.d.ts","../node_modules/@types/qs/index.d.ts","../node_modules/@types/co-body/index.d.ts","../node_modules/@types/command-line-args/index.d.ts","../node_modules/@types/content-disposition/index.d.ts","../node_modules/@types/convert-source-map/index.d.ts","../node_modules/@types/keygrip/index.d.ts","../node_modules/@types/range-parser/index.d.ts","../node_modules/@types/express-serve-static-core/index.d.ts","../node_modules/@types/mime/Mime.d.ts","../node_modules/@types/mime/index.d.ts","../node_modules/@types/serve-static/index.d.ts","../node_modules/@types/express/index.d.ts","../node_modules/@types/cookies/index.d.ts","../node_modules/@types/debounce/index.d.ts","../node_modules/@types/estree/index.d.ts","../node_modules/@types/unist/index.d.ts","../node_modules/@types/hast/index.d.ts","../node_modules/@types/http-assert/index.d.ts","../node_modules/@types/http-errors/index.d.ts","../node_modules/@types/istanbul-lib-coverage/index.d.ts","../node_modules/@types/istanbul-lib-report/index.d.ts","../node_modules/@types/istanbul-reports/index.d.ts","../node_modules/@types/katex/index.d.ts","../node_modules/@types/koa-compose/index.d.ts","../node_modules/@types/koa/index.d.ts","../node_modules/@types/lodash/common/common.d.ts","../node_modules/@types/lodash/common/array.d.ts","../node_modules/@types/lodash/common/collection.d.ts","../node_modules/@types/lodash/common/date.d.ts","../node_modules/@types/lodash/common/function.d.ts","../node_modules/@types/lodash/common/lang.d.ts","../node_modules/@types/lodash/common/math.d.ts","../node_modules/@types/lodash/common/number.d.ts","../node_modules/@types/lodash/common/object.d.ts","../node_modules/@types/lodash/common/seq.d.ts","../node_modules/@types/lodash/common/string.d.ts","../node_modules/@types/lodash/common/util.d.ts","../node_modules/@types/lodash/index.d.ts","../node_modules/@types/mdast/index.d.ts","../node_modules/@types/mocha/index.d.ts","../node_modules/@types/parse5/lib/tree-adapters/default.d.ts","../node_modules/@types/parse5/index.d.ts","../node_modules/@types/prismjs/index.d.ts","../node_modules/@types/resolve/index.d.ts","../node_modules/@types/ws/index.d.ts","../node_modules/@types/yauzl/index.d.ts"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"4a882ffbb4ed09d9b7734f784aebb1dfe488d63725c40759165c5d9c657ca029","e59262ddaae67dec2d226f8a5d05cf6c4dc353c0d9b1e4980a61d7fcf9a2b051","5e30131b6a5587fe666926ad1d9807e733c0a597ed12d682669fcaa331aea576","d27ead0e913b4225279e8beb10450ecaf54af5ed145a6ecbbed18bb130815006","2fcd2d22b1f30555e785105597cd8f57ed50300e213c4f1bbca6ae149f782c38",{"version":"3c150a2e1758724811db3bdc5c773421819343b1627714e09f29b1f40a5dfb26","affectsGlobalScope":true},"7000ec8572390d035ba5ef993953957150d0c38ffb31b56653c97dd78cb6e1aa","056892cca68dca10a914f1580ba0e5710d26794e8707225dca9b5717ed702f1e","4ddf3962990379d1ea59b369a5516c7533b7944010d6998e0e9b1ab35d5af1f0","1bcd560deed90a43c51b08aa18f7f55229f2e30974ab5ed1b7bb5721be379013","dc08fe04e50bc24d1baded4f33e942222bbdd5d77d6341a93cfe6e4e4586a3be","4b8e8a20b14b5ae700743222a80ab3dcb44822d269b29a7779fe25fe1f0f87a3","d08415b3d6d7fd153ba6e7bf7707ffc57f3c6ad85730ea63544756610b4350c6","411f23da7a63c3d3fd4860c41a458e8df239776fd5d9cd36dd3ad6be92afccbd","6ada3e065916c0ef2dbc9bc0f9b5d59afb25d9176f81fa2c8993a536924140c6","938dd6c2b518b1ae8598db5e2bc7db03be0c6a774c4cb846ca92b51bb353e019","d36d25c50d6bff81a153e87b70c07285955fba8a9d317c453dc74aad826e8cbb","effe65dcf890703716bead4f38170fcbe769cb49e8c8260c11b8c402cac443e1","0848a16732172391d2d0210f754b66ac925cd7c1b501ad8e4fd405e6ade688a8","bbe13c947d7d6c3426e0e5815e2b3464fa03d34a4bf47298c43b9237cf59555b","e8265198b29dccb14667214f65f77c5e4744a8797f75d96bcf8b150b23a56705","a8992b852521a66f63e0cedc6e1f054b28f972232b6fa5ca59771db6a1c8bbea","91983471bb05d5e31aa2afd2018b8ce88d4271af636aa5aa712dd7192101ec8e",{"version":"5b4557132f3d1da8a91ee6442ee6eb29806de202e4e5392c8fb15412719233eb","signature":"e43da2711c5d14bfe0c5191adba397f42ae085b0567cdf04d3ca6e144ed6c8fc"},{"version":"1e38adca9c0ab224e173aef650ac24ba318c85969adeb7b009a23281531ba86f","signature":"dc47d12065e0e019a86e8aac858c46d2461609b2b65e18c88738985826ba420d"},{"version":"05020749589ec1a3a3b60f0b2ebfa61bca11633287c0ccaab5faf20b635ac748","signature":"ef533a889954248aaac213d08506d8c7b7f7fd82090389f5aa3aacf110a2beca"},{"version":"e2d1bad7f8f5c3ff1e96a165ae4f20b81e174d72dbc6b887aec5f56004a5b57b","signature":"fd1a199e17df1c7e65218bba250d5310b8fc5ee2f9d3d575c400ffdaef80397c"},"d6fdbc9121452a35e173d689388fa85d68d41082bdbc9ca6874638881983657c",{"version":"4ac75e07b8916a8c58fb88233214c7d35b7770257c2cf8ee0d9cdbbda1509dff","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"fea38b0aa76b8a3b34bf678e78cf57a2611641206174f672523107ffd1e34815","signature":"713d66a0dc86ced518fa68b38f54015201459452b0d62ecc3e1ba0e939e38dc9"},{"version":"c17a1fe4aa26a5508e71e166f2ae5df195d10b2e925aacf8a80618638cc69eac","signature":"d909826ddb413a141169ed00d8d8eb6436519c58e4bfffb79e0efa64c1ded432"},{"version":"ec3e3360a930d834afee83008ba7e11aa6b3f23699a52b334b174c128bcc4f7c","signature":"9aa2dc890d3835f64c60c22eef6fa3e40b0978e645d2bc1eab45754d1eb50745"},{"version":"eef204f061321360559bd19235ea32a9d55b3ec22a362cc78d14ef50d4db4490","affectsGlobalScope":true},"72bee526b949b9932edba50997ff3b9cdede7b314d790d5f0d94f3d2944930ea",{"version":"2d412861573a672bd90fdcb1e48740593324565f3b3aaf6808c0e3e2f0d54ae8","affectsGlobalScope":true},{"version":"cd711db43a952f15464b571ac11b7a440332cd52342bc92c4bf908c70688f57f","affectsGlobalScope":true},"9d8709c916778cb34830708ed47b78e9a46d1fb2eb73a682b14eee990bed4aa6",{"version":"507e2131e89b515ce40c05c0c2fef6cc575ba8947703f92e8cdf36078747a9ff","affectsGlobalScope":true},"999a90d30a3183dcee987d0a5a7c586aba5bacbf6ce087ba8635124082ccfeea","8a5878edd52f4a720560b4c6e6247e9ddc3df6118ad9cf2f9927903b03d5f440",{"version":"e7be17cfcbe98809c052f384c230ecea9e1cee045edac9db0659e997a988ff9e","affectsGlobalScope":true},"7d2a0ba1297be385a89b5515b88cd31b4a1eeef5236f710166dc1b36b1741e1b","8e87660f5170c195ade218937e360484775be6a4e75a098665d9ba5a2e4cdc15",{"version":"525b52b38b44420fb1758c0917e7b67cf379f7f9477d2ba7343f3d5f50a44258","affectsGlobalScope":true},"65b91a3725399231d3469529b5e27b85bf2aa98013e607f308e5fe260b47eeff","04e3793f33c71ceae20a4719698c068b72c98cf925b3c5f8a33096c00ed44258","00cb63103f9670f8094c238a4a7e252c8b4c06ba371fea5c44add7e41b7247e4","43f58358870effc43ba93c92c040dee2285cbd8685ddfa77658e498780727c4e","fa8ef3fb228e258f9508386e2056c95c959d1c1168301181313a5c978754ba70","15c9478a8a3d630ac5e738aca25fca15d0842aaeb97fb1a9c1e80eddc5a0e14c","e056bb30bf82271634daeee81f772f4a7960085f01f6d4d09c8da1ebe5f6a623","5e30131b6a5587fe666926ad1d9807e733c0a597ed12d682669fcaa331aea576",{"version":"86492a546c3308feaf1dde967afd325c321483b5e96f5fa9e9b6e691dc23fa9e","affectsGlobalScope":true},"9a318e3a8900672b85cd3c8c3a5acf51b88049557a3ae897ccdcf2b85a8f61f9","1bcd560deed90a43c51b08aa18f7f55229f2e30974ab5ed1b7bb5721be379013","dc08fe04e50bc24d1baded4f33e942222bbdd5d77d6341a93cfe6e4e4586a3be","cc46ce345c0e19e456388446733250527eead4ca557b5e5fdf0c2e30adc3c89f","88cda4269c54f0803834fd62b2fac61af8bff7a085693f7ca9df85c1f19dee8a",{"version":"5d600cfe96a85d58ea8dbf44646f35e82d25e788ea0a6a8295594cef9948445a","affectsGlobalScope":true},"d9e25c382a75bed1c058c324edff8b2af655521472b431857e58cdac5f9b2185","6168f8e0a5b354f8177bf0dee7c1a69c2afb6a155d5534221f3a1a2d86b84367","d7840fd94e6dfb5b0d9df5a20fe1e79c8dd72b1efdb74d2ef04c31e3588c6b5b","fa6d684e15fe6e99c7208a51b45c04f8e0147f1c8587871aac48fff55b7b1f24","d61a4b627c3e2e054616df905a25226f547dc0e821c2a2b6d5f13318b3fd7e78","1308479c593c3d337bd9c438ac1d7164006a9286638cec0b26e3331a978f91d4","cfad37dbd7cf27cc16758755847ad7c07ac52a01c466486e50f8f84d0f0ea9ce","0c4d3009672fd12d4d9a6505e769de9369c180dcfa8188d9fd850ec156245d87","793fca6322a14fa8fa6bc6a4fc694fd7bcc88922c4f9abcd48bf6908f8bf939b","be3e93b109deb44b925583674cc0706c0b3c2e7316bcf79631285a45c18ed0c8","50f63746fc2a779d1f9c5657fd78e292045dc98b540e026799e039ea629f2943",{"version":"5dd53159f1edf3c430445448e6f61f22f229f2a33a3b445b03d72b7108ede3ba","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"8af7547e8102c74925ea8612bfb02487accfd318fbbaefa8dc745176754475de","signature":"282ccf7c3a7f3ca54f7379e41caeff7497b8f76b742f22ac82f3efa650fb30a1"},{"version":"7e59d3dcc7b7ec8d9231535240e3b52eb9873c4672f8139b060efd6d3e1e54a8","signature":"37d4e09d0bfe55e9aee3900fcfc009592082f89e4d5e9d9a7329ce919f4cf121"},"7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"ca72190df0eb9b09d4b600821c8c7b6c9747b75a1c700c4d57dc0bb72abc074c","affectsGlobalScope":true},"11e2d554398d2bd460e7d06b2fa5827a297c8acfbe00b4f894a224ac0862857f",{"version":"fc811ced095f38ad4438bb94a8d665c63bf4943e58a71ada16627add5ad93226","affectsGlobalScope":true},"374ca798f244e464346f14301dc2a8b4b111af1a83b49fffef5906c338a1f922","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","5eb881ed2a0d5b17ea36df5cd4c4be500e460c412f270c3170e906bec65580ac","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","489532ff54b714f0e0939947a1c560e516d3ae93d51d639ab02e907a0e950114","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"816ad2e607a96de5bcac7d437f843f5afd8957f1fa5eefa6bba8e4ed7ca8fd84","affectsGlobalScope":true},"cec36af22f514322f870e81d30675c78df82ae8bf4863f5fd4e4424c040c678d","d903fafe96674bc0b2ac38a5be4a8fc07b14c2548d1cdb165a80ea24c44c0c54","5eec82ac21f84d83586c59a16b9b8502d34505d1393393556682fe7e7fde9ef2","04eb6578a588d6a46f50299b55f30e3a04ef27d0c5a46c57d8fcc211cd530faa","8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58",{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true},"bcebb922784739bdb34c18ee51095d25a92b560c78ccd2eaacd6bd00f7443d83","7c013aa892414a7fdcfd861ae524a668eaa3ede8c7c0acafaf611948122c8d93","b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30",{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true},{"version":"b3624aed92dab6da8484280d3cb3e2f4130ec3f4ef3f8201c95144ae9e898bb6","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","fd93cee2621ff42dabe57b7be402783fd1aa69ece755bcba1e0290547ae60513","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","09326ae5f7e3d49be5cd9ea00eb814770e71870a438faa2efd8bdd9b4db21320",{"version":"3c4ba1dd9b12ffa284b565063108f2f031d150ea15b8fafbdc17f5d2a07251f3","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","c4577fb855ca259bdbf3ea663ca73988ce5f84251a92b4aef80a1f4122b6f98e","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"f0900cd5d00fe1263ff41201fb8073dbeb984397e4af3b8002a5c207a30bdc33","affectsGlobalScope":true},{"version":"ff07a9a03c65732ccc59b3c65bc584173da093bd563a6565411c01f5703bd3cb","affectsGlobalScope":true},"06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","ec4bd1b200670fb567920db572d6701ed42a9641d09c4ff6869768c8f81b404c","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa",{"version":"da26af7362f53d122283bc69fed862b9a9fe27e01bc6a69d1d682e0e5a4df3e6","affectsGlobalScope":true},"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"ed2a670a77a1b80653c5bde2d813b0ab2e92872cc9b2b611ce11050b95139be6","6738101ae8e56cd3879ab3f99630ada7d78097fc9fd334df7e766216778ca219","3dcefe176e6dce7a06bd345522e19f631f7fdb370335e2e93bc225b3afbb0bd0","6d829824ead8999f87b6df21200df3c6150391b894b4e80662caa462bd48d073","afc559c1b93df37c25aef6b3dfa2d64325b0e112e887ee18bf7e6f4ec383fc90","ba601641fac98c229ccd4a303f747de376d761babb33229bb7153bed9356c9cc","7578ed901eec5f590609fc7a6ba9027be5735ad1aedef119aa56d53a22dfbe02","629766229f541d92210f30a92b6038568ec165fab14b7ee53bdf13667da37ca3","204dbe6c72467fb14bbe8f06510b11fb541b6ce29580c6e10ebd3bdb2eb0c1f9","1e87d58d3678958d89e2a94454afcc827f1aa6363abbcbd4f99729e65ab47995","ce013414484233b24f42c0fcfca48a60bb66ab4e13c82953662305e8f1ee4925","16d51f964ec125ad2024cf03f0af444b3bc3ec3614d9345cc54d09bab45c9a4c",{"version":"c5dd1fef4cd4aaffc78786047bed5ae6fc1200d19a1946cbc4e2d3ed4d62c8fa","affectsGlobalScope":true},"5b9ecf7da4d71cf3832dbb8336150fa924631811f488ad4690c2dfec2b4fb1d7","951c85f75aac041dddbedfedf565886a7b494e29ec1532e2a9b4a6180560b50e","e6f0cb9d8cb2e38bec66e032e73caa3e7c6671f21ed7196acb821aec462051f2","43cdd474c5aa3340da4816bb8f1ae7f3b1bcf9e70d997afc36a0f2c432378c84","eb96a2321f717bccc3e49e104e299152984b927ea4546b559ae631c06565819c","072099609280e6659eb29b1d2a601e95708c90b7db2aba2571ebda50d1be0dd5","785b9d575b49124ce01b46f5b9402157c7611e6532effa562ac6aebec0074dfc","6d09838b65c3c780513878793fc394ae29b8595d9e4729246d14ce69abc71140","fefa1d4c62ddb09c78d9f46e498a186e72b5e7aeb37093aa6b2c321b9d6ecd14","e98185f4249720ace1921d59c1ff4612fa5c633a183fc9bf28e2e7b8e3c7fd51","f463d61cf39c3a6a5f96cdf7adfdb72a0b1d663f7b5d5b6dd042adba835430c2","035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","a4809f4d92317535e6b22b01019437030077a76fec1d93b9881c9ed4738fcc54","5f53fa0bd22096d2a78533f94e02c899143b8f0f9891a46965294ee8b91a9434","8cbbb12bfb321de8bd58ba74329f683d82e4e0abb56d998c7f1eef2e764a74c8","5006668996956580886022c05108e32c742823e1b5652aff7914917233731518","3a9b877f47119ac64aab98c61cae91a304ddeb6e8285ccd824a6aa665ffaeb95","4992e90e1ccc4f69f46e40f067d90b4a1d943ca9eb8e2054661bab13b7496ecb","458111fc89d11d2151277c822dfdc1a28fa5b6b2493cf942e37d4cd0a6ee5f22","da2b6356b84a40111aaecb18304ea4e4fcb43d70efb1c13ca7d7a906445ee0d3","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","aa2c18a1b5a086bbcaae10a4efba409cc95ba7287d8cf8f2591b53704fea3dea","6f294731b495c65ecf46a5694f0082954b961cf05463bea823f8014098eaffa0","0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","bdf0ed7d9ebae6175a5d1b4ec4065d07f8099379370a804b1faff05004dc387d","7c14ccd2eaa82619fffc1bfa877eb68a012e9fb723d07ee98db451fadb618906","5256ff2882306972c3eeae034d8e553a60d930f3e44d22189c54248232258438","df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9","4f6a12044ee6f458db11964153830abbc499e73d065c51c329ec97407f4b13dd","202f8582ee3cd89e06c4a17d8aabb925ff8550370559c771d1cc3ec3934071c2",{"version":"5f186a758a616c107c70e8918db4630d063bd782f22e6e0b17573b125765b40b","affectsGlobalScope":true},"fc37aca06f6b8b296c42412a2e75ab53d30cd1fa8a340a3bb328a723fd678377","5f2c582b9ef260cb9559a64221b38606378c1fabe17694592cdfe5975a6d7efa","c271193e426325d9acab2f99997bb9f5f2dff850ec8c7c011c5abafe5af83b5f","8baa5d0febc68db886c40bf341e5c90dc215a90cd64552e47e8184be6b7e3358","bc81aff061c53a7140270555f4b22da4ecfe8601e8027cf5aa175fbdc7927c31","74d5a87c3616cd5d8691059d531504403aa857e09cbaecb1c64dfb9ace0db185"],"root":[[70,78],[117,119]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":5,"noEmitOnError":true,"outDir":"./","rootDir":"..","sourceMap":true,"strict":true,"target":6},"fileIdsList":[[166],[50,166],[58,166],[50,58,166],[50,58,66,166],[48,49,166],[79,80,166],[81,166],[80,82,166],[97,98,166],[104,105,166],[104,166],[94,99,166],[94,166],[51,93,166],[94,99,100,101,166],[95,166],[92,96,108,109,110,113,114,166],[103,106,166],[107,166],[103,107,112,166],[102,166],[103,106,111,166],[79,91,115,166],[83,86,87,90,166],[139,166,173],[139,166,173,176],[79,166],[139,166,173,178],[139,166,173,176,183,189],[136,139,166,173,178,184],[166,177,178,185,188],[166,193],[166,197],[166,198],[166,202],[136,139,140,144,150,165,166,173,174,181,183,190,195,196,201],[166,203,205,206,207,208,209,210,211,212,213,214,215],[166,203,204,206,207,208,209,210,211,212,213,214,215],[166,204,205,206,207,208,209,210,211,212,213,214,215],[166,203,204,205,207,208,209,210,211,212,213,214,215],[166,203,204,205,206,208,209,210,211,212,213,214,215],[166,203,204,205,206,207,209,210,211,212,213,214,215],[166,203,204,205,206,207,208,210,211,212,213,214,215],[166,203,204,205,206,207,208,209,211,212,213,214,215],[166,203,204,205,206,207,208,209,210,212,213,214,215],[166,203,204,205,206,207,208,209,210,211,213,214,215],[166,203,204,205,206,207,208,209,210,211,212,214,215],[166,203,204,205,206,207,208,209,210,211,212,213,215],[166,203,204,205,206,207,208,209,210,211,212,213,214],[166,187],[166,186],[120,166],[123,166],[124,129,157,166],[125,136,137,144,154,165,166],[125,126,136,144,166],[127,166],[128,129,137,145,166],[129,154,162,166],[130,132,136,144,166],[131,166],[132,133,166],[136,166],[134,136,166],[136,137,138,154,165,166],[136,137,138,151,154,157,166],[166,170],[132,139,144,154,165,166],[136,137,139,140,144,154,162,165,166],[139,141,154,162,165,166],[120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172],[136,142,166],[143,165,166],[132,136,144,154,166],[145,166],[146,166],[123,147,166],[148,164,166,170],[149,166],[150,166],[136,151,152,166],[151,153,166,168],[124,136,154,155,156,157,166],[124,154,156,166],[154,155,166],[157,166],[158,166],[136,160,161,166],[160,161,166],[129,144,154,162,166],[163,166],[144,164,166],[124,139,150,165,166],[129,166],[154,166,167],[166,168],[166,169],[124,129,136,138,147,154,165,166,168,170],[154,166,171],[166,218],[166,219],[139,166,173,187],[79,89,166],[88,166],[51,166],[136,139,141,144,154,162,165,166,171,173],[136,154,166,173],[85,166],[84,166],[50,54,166],[54,166],[52,53,166],[59,60,61,62,63,64,65,66,67,166],[50,54,55,56,166],[47,57,68,69,70,71,72,166],[47,71,166],[47,71,72,73,166],[47,57,166],[47,73,166],[47,166],[47,76,166],[47,54,75,166],[47,72,116,166],[47,73,75,116,166],[47,76,116,166]],"referencedMap":[[48,1],[58,2],[59,3],[62,4],[60,4],[64,4],[67,5],[66,1],[65,4],[63,4],[61,3],[49,1],[50,6],[104,1],[81,7],[82,8],[80,1],[83,9],[97,1],[98,1],[99,10],[106,11],[105,12],[100,13],[93,14],[101,1],[94,15],[95,14],[111,14],[102,16],[96,17],[115,18],[92,1],[107,19],[108,20],[109,1],[110,12],[113,21],[103,22],[112,23],[114,20],[116,24],[91,25],[174,26],[175,1],[177,27],[87,28],[79,1],[179,29],[180,1],[176,26],[181,1],[182,1],[190,30],[191,1],[192,1],[185,31],[189,32],[194,33],[195,1],[196,1],[197,1],[198,34],[199,35],[200,1],[183,1],[201,36],[202,37],[204,38],[205,39],[203,40],[206,41],[207,42],[208,43],[209,44],[210,45],[211,46],[212,47],[213,48],[214,49],[215,50],[216,33],[186,51],[187,52],[217,1],[120,53],[121,53],[123,54],[124,55],[125,56],[126,57],[127,58],[128,59],[129,60],[130,61],[131,62],[132,63],[133,63],[135,64],[134,65],[136,64],[137,66],[138,67],[122,68],[172,1],[139,69],[140,70],[141,71],[173,72],[142,73],[143,74],[144,75],[145,76],[146,77],[147,78],[148,79],[149,80],[150,81],[151,82],[152,82],[153,83],[154,84],[156,85],[155,86],[157,87],[158,88],[159,1],[160,89],[161,90],[162,91],[163,92],[164,93],[165,94],[166,95],[167,96],[168,97],[169,98],[170,99],[171,100],[219,101],[218,102],[220,1],[178,1],[184,1],[221,1],[188,103],[90,104],[89,105],[88,1],[52,106],[51,1],[193,1],[222,107],[223,108],[84,28],[86,109],[85,110],[69,1],[55,111],[53,112],[56,1],[54,113],[68,114],[57,115],[47,1],[45,1],[46,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[19,1],[4,1],[20,1],[24,1],[21,1],[22,1],[23,1],[25,1],[26,1],[27,1],[5,1],[28,1],[29,1],[30,1],[31,1],[6,1],[35,1],[32,1],[33,1],[34,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[1,1],[44,1],[73,116],[72,117],[74,118],[70,119],[75,120],[71,121],[77,122],[76,121],[78,123],[117,124],[118,125],[119,126]]},"version":"5.5.4"}
1
+ {"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/tslib/tslib.d.ts","../node_modules/@lit/reactive-element/css-tag.d.ts","../node_modules/@lit/reactive-element/reactive-controller.d.ts","../node_modules/@lit/reactive-element/reactive-element.d.ts","../node_modules/@types/trusted-types/lib/index.d.ts","../node_modules/@types/trusted-types/index.d.ts","../node_modules/lit-html/directive.d.ts","../node_modules/lit-html/lit-html.d.ts","../node_modules/lit-element/lit-element.d.ts","../node_modules/lit-html/is-server.d.ts","../node_modules/lit/index.d.ts","../node_modules/@lit/reactive-element/decorators/base.d.ts","../node_modules/@lit/reactive-element/decorators/custom-element.d.ts","../node_modules/@lit/reactive-element/decorators/property.d.ts","../node_modules/@lit/reactive-element/decorators/state.d.ts","../node_modules/@lit/reactive-element/decorators/event-options.d.ts","../node_modules/@lit/reactive-element/decorators/query.d.ts","../node_modules/@lit/reactive-element/decorators/query-all.d.ts","../node_modules/@lit/reactive-element/decorators/query-async.d.ts","../node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts","../node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts","../node_modules/lit/decorators.d.ts","../node_modules/katex/types/katex.d.ts","../src/katex-css.ts","../src/model.ts","../src/asciimath-parser.ts","../src/KmapTermTree.ts","../src/index.ts","../src/kmap-term-tree.ts","../src/tokenizer.ts","../src/parser.ts","../stories/index.stories.ts","../node_modules/@types/chai/index.d.ts","../node_modules/@open-wc/semantic-dom-diff/get-diffable-html.d.ts","../node_modules/@open-wc/semantic-dom-diff/chai-dom-diff-plugin.d.ts","../node_modules/@open-wc/semantic-dom-diff/chai-dom-diff.d.ts","../node_modules/@open-wc/semantic-dom-diff/index.d.ts","../node_modules/chai-a11y-axe/chai-a11y-axe-plugin.d.ts","../node_modules/chai-a11y-axe/src/accessible.d.ts","../node_modules/chai-a11y-axe/index.d.ts","../node_modules/@types/chai-dom/index.d.ts","../node_modules/@types/sinonjs__fake-timers/index.d.ts","../node_modules/@types/sinon/index.d.ts","../node_modules/@types/sinon-chai/index.d.ts","../node_modules/@open-wc/testing/register-chai-plugins.d.ts","../node_modules/@open-wc/testing-helpers/types/src/elementUpdated.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/lit-html/directive.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/lit-html/lit-html.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/lit-html/static.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/lit/static-html.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/@lit/reactive-element/css-tag.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/@lit/reactive-element/reactive-controller.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/@lit/reactive-element/reactive-element.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/lit-element/lit-element.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/lit-html/is-server.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/lit/index.d.ts","../node_modules/@open-wc/testing-helpers/types/src/renderable.d.ts","../node_modules/@open-wc/dedupe-mixin/index.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/@open-wc/scoped-elements/types.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/@open-wc/scoped-elements/html-element.d.ts","../node_modules/@open-wc/testing-helpers/types/src/fixture-no-side-effect.d.ts","../node_modules/@open-wc/testing-helpers/types/src/fixture.d.ts","../node_modules/@open-wc/testing-helpers/types/src/fixtureWrapper.d.ts","../node_modules/@open-wc/testing-helpers/types/src/helpers.d.ts","../node_modules/@open-wc/testing-helpers/node_modules/lit/html.d.ts","../node_modules/@open-wc/testing-helpers/types/src/scopedElementsWrapper.d.ts","../node_modules/@open-wc/testing-helpers/types/src/litFixture.d.ts","../node_modules/@open-wc/testing-helpers/types/src/stringFixture.d.ts","../node_modules/@open-wc/testing-helpers/types/index.d.ts","../node_modules/@open-wc/testing/index.d.ts","../test/asciimath-parser.test.ts","../test/kmap-term-tree.test.ts","../test/tokenizer.test.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/dom-events.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/readline/promises.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/test.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/accepts/index.d.ts","../node_modules/@types/babel__code-frame/index.d.ts","../node_modules/@types/connect/index.d.ts","../node_modules/@types/body-parser/index.d.ts","../node_modules/@types/qs/index.d.ts","../node_modules/@types/co-body/index.d.ts","../node_modules/@types/command-line-args/index.d.ts","../node_modules/@types/content-disposition/index.d.ts","../node_modules/@types/convert-source-map/index.d.ts","../node_modules/@types/keygrip/index.d.ts","../node_modules/@types/range-parser/index.d.ts","../node_modules/@types/express-serve-static-core/index.d.ts","../node_modules/@types/mime/Mime.d.ts","../node_modules/@types/mime/index.d.ts","../node_modules/@types/serve-static/index.d.ts","../node_modules/@types/express/index.d.ts","../node_modules/@types/cookies/index.d.ts","../node_modules/@types/debounce/index.d.ts","../node_modules/@types/estree/index.d.ts","../node_modules/@types/unist/index.d.ts","../node_modules/@types/hast/index.d.ts","../node_modules/@types/http-assert/index.d.ts","../node_modules/@types/http-errors/index.d.ts","../node_modules/@types/istanbul-lib-coverage/index.d.ts","../node_modules/@types/istanbul-lib-report/index.d.ts","../node_modules/@types/istanbul-reports/index.d.ts","../node_modules/@types/katex/index.d.ts","../node_modules/@types/koa-compose/index.d.ts","../node_modules/@types/koa/index.d.ts","../node_modules/@types/lodash/common/common.d.ts","../node_modules/@types/lodash/common/array.d.ts","../node_modules/@types/lodash/common/collection.d.ts","../node_modules/@types/lodash/common/date.d.ts","../node_modules/@types/lodash/common/function.d.ts","../node_modules/@types/lodash/common/lang.d.ts","../node_modules/@types/lodash/common/math.d.ts","../node_modules/@types/lodash/common/number.d.ts","../node_modules/@types/lodash/common/object.d.ts","../node_modules/@types/lodash/common/seq.d.ts","../node_modules/@types/lodash/common/string.d.ts","../node_modules/@types/lodash/common/util.d.ts","../node_modules/@types/lodash/index.d.ts","../node_modules/@types/mdast/index.d.ts","../node_modules/@types/mocha/index.d.ts","../node_modules/@types/parse5/lib/tree-adapters/default.d.ts","../node_modules/@types/parse5/index.d.ts","../node_modules/@types/prismjs/index.d.ts","../node_modules/@types/resolve/index.d.ts","../node_modules/@types/ws/index.d.ts","../node_modules/@types/yauzl/index.d.ts"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"4a882ffbb4ed09d9b7734f784aebb1dfe488d63725c40759165c5d9c657ca029","e59262ddaae67dec2d226f8a5d05cf6c4dc353c0d9b1e4980a61d7fcf9a2b051","5e30131b6a5587fe666926ad1d9807e733c0a597ed12d682669fcaa331aea576","d27ead0e913b4225279e8beb10450ecaf54af5ed145a6ecbbed18bb130815006","2fcd2d22b1f30555e785105597cd8f57ed50300e213c4f1bbca6ae149f782c38",{"version":"3c150a2e1758724811db3bdc5c773421819343b1627714e09f29b1f40a5dfb26","affectsGlobalScope":true},"7000ec8572390d035ba5ef993953957150d0c38ffb31b56653c97dd78cb6e1aa","056892cca68dca10a914f1580ba0e5710d26794e8707225dca9b5717ed702f1e","4ddf3962990379d1ea59b369a5516c7533b7944010d6998e0e9b1ab35d5af1f0","1bcd560deed90a43c51b08aa18f7f55229f2e30974ab5ed1b7bb5721be379013","dc08fe04e50bc24d1baded4f33e942222bbdd5d77d6341a93cfe6e4e4586a3be","4b8e8a20b14b5ae700743222a80ab3dcb44822d269b29a7779fe25fe1f0f87a3","d08415b3d6d7fd153ba6e7bf7707ffc57f3c6ad85730ea63544756610b4350c6","411f23da7a63c3d3fd4860c41a458e8df239776fd5d9cd36dd3ad6be92afccbd","6ada3e065916c0ef2dbc9bc0f9b5d59afb25d9176f81fa2c8993a536924140c6","938dd6c2b518b1ae8598db5e2bc7db03be0c6a774c4cb846ca92b51bb353e019","d36d25c50d6bff81a153e87b70c07285955fba8a9d317c453dc74aad826e8cbb","effe65dcf890703716bead4f38170fcbe769cb49e8c8260c11b8c402cac443e1","0848a16732172391d2d0210f754b66ac925cd7c1b501ad8e4fd405e6ade688a8","bbe13c947d7d6c3426e0e5815e2b3464fa03d34a4bf47298c43b9237cf59555b","e8265198b29dccb14667214f65f77c5e4744a8797f75d96bcf8b150b23a56705","a8992b852521a66f63e0cedc6e1f054b28f972232b6fa5ca59771db6a1c8bbea","91983471bb05d5e31aa2afd2018b8ce88d4271af636aa5aa712dd7192101ec8e",{"version":"5b4557132f3d1da8a91ee6442ee6eb29806de202e4e5392c8fb15412719233eb","signature":"e43da2711c5d14bfe0c5191adba397f42ae085b0567cdf04d3ca6e144ed6c8fc"},{"version":"7560454af61a806ab4449f31be8d18818914443304d30b569d513accc488a846","signature":"dc47d12065e0e019a86e8aac858c46d2461609b2b65e18c88738985826ba420d"},{"version":"f49ed690fd10d16fb57927069cfc90fb8fe309b70e5e5e9eeaa79e68f1ea08f8","signature":"ef533a889954248aaac213d08506d8c7b7f7fd82090389f5aa3aacf110a2beca"},{"version":"a44b520fd83e2a3445910dad638c6798b4ebd1e1b9ef0a429eaf8b993c210a6a","signature":"fd1a199e17df1c7e65218bba250d5310b8fc5ee2f9d3d575c400ffdaef80397c"},"d6fdbc9121452a35e173d689388fa85d68d41082bdbc9ca6874638881983657c",{"version":"4ac75e07b8916a8c58fb88233214c7d35b7770257c2cf8ee0d9cdbbda1509dff","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"fea38b0aa76b8a3b34bf678e78cf57a2611641206174f672523107ffd1e34815","signature":"713d66a0dc86ced518fa68b38f54015201459452b0d62ecc3e1ba0e939e38dc9"},{"version":"c17a1fe4aa26a5508e71e166f2ae5df195d10b2e925aacf8a80618638cc69eac","signature":"d909826ddb413a141169ed00d8d8eb6436519c58e4bfffb79e0efa64c1ded432"},{"version":"ec3e3360a930d834afee83008ba7e11aa6b3f23699a52b334b174c128bcc4f7c","signature":"9aa2dc890d3835f64c60c22eef6fa3e40b0978e645d2bc1eab45754d1eb50745"},{"version":"eef204f061321360559bd19235ea32a9d55b3ec22a362cc78d14ef50d4db4490","affectsGlobalScope":true},"72bee526b949b9932edba50997ff3b9cdede7b314d790d5f0d94f3d2944930ea",{"version":"2d412861573a672bd90fdcb1e48740593324565f3b3aaf6808c0e3e2f0d54ae8","affectsGlobalScope":true},{"version":"cd711db43a952f15464b571ac11b7a440332cd52342bc92c4bf908c70688f57f","affectsGlobalScope":true},"9d8709c916778cb34830708ed47b78e9a46d1fb2eb73a682b14eee990bed4aa6",{"version":"507e2131e89b515ce40c05c0c2fef6cc575ba8947703f92e8cdf36078747a9ff","affectsGlobalScope":true},"999a90d30a3183dcee987d0a5a7c586aba5bacbf6ce087ba8635124082ccfeea","8a5878edd52f4a720560b4c6e6247e9ddc3df6118ad9cf2f9927903b03d5f440",{"version":"e7be17cfcbe98809c052f384c230ecea9e1cee045edac9db0659e997a988ff9e","affectsGlobalScope":true},"7d2a0ba1297be385a89b5515b88cd31b4a1eeef5236f710166dc1b36b1741e1b","8e87660f5170c195ade218937e360484775be6a4e75a098665d9ba5a2e4cdc15",{"version":"525b52b38b44420fb1758c0917e7b67cf379f7f9477d2ba7343f3d5f50a44258","affectsGlobalScope":true},"65b91a3725399231d3469529b5e27b85bf2aa98013e607f308e5fe260b47eeff","04e3793f33c71ceae20a4719698c068b72c98cf925b3c5f8a33096c00ed44258","00cb63103f9670f8094c238a4a7e252c8b4c06ba371fea5c44add7e41b7247e4","43f58358870effc43ba93c92c040dee2285cbd8685ddfa77658e498780727c4e","fa8ef3fb228e258f9508386e2056c95c959d1c1168301181313a5c978754ba70","15c9478a8a3d630ac5e738aca25fca15d0842aaeb97fb1a9c1e80eddc5a0e14c","e056bb30bf82271634daeee81f772f4a7960085f01f6d4d09c8da1ebe5f6a623","5e30131b6a5587fe666926ad1d9807e733c0a597ed12d682669fcaa331aea576",{"version":"86492a546c3308feaf1dde967afd325c321483b5e96f5fa9e9b6e691dc23fa9e","affectsGlobalScope":true},"9a318e3a8900672b85cd3c8c3a5acf51b88049557a3ae897ccdcf2b85a8f61f9","1bcd560deed90a43c51b08aa18f7f55229f2e30974ab5ed1b7bb5721be379013","dc08fe04e50bc24d1baded4f33e942222bbdd5d77d6341a93cfe6e4e4586a3be","cc46ce345c0e19e456388446733250527eead4ca557b5e5fdf0c2e30adc3c89f","88cda4269c54f0803834fd62b2fac61af8bff7a085693f7ca9df85c1f19dee8a",{"version":"5d600cfe96a85d58ea8dbf44646f35e82d25e788ea0a6a8295594cef9948445a","affectsGlobalScope":true},"d9e25c382a75bed1c058c324edff8b2af655521472b431857e58cdac5f9b2185","6168f8e0a5b354f8177bf0dee7c1a69c2afb6a155d5534221f3a1a2d86b84367","d7840fd94e6dfb5b0d9df5a20fe1e79c8dd72b1efdb74d2ef04c31e3588c6b5b","fa6d684e15fe6e99c7208a51b45c04f8e0147f1c8587871aac48fff55b7b1f24","d61a4b627c3e2e054616df905a25226f547dc0e821c2a2b6d5f13318b3fd7e78","1308479c593c3d337bd9c438ac1d7164006a9286638cec0b26e3331a978f91d4","cfad37dbd7cf27cc16758755847ad7c07ac52a01c466486e50f8f84d0f0ea9ce","0c4d3009672fd12d4d9a6505e769de9369c180dcfa8188d9fd850ec156245d87","793fca6322a14fa8fa6bc6a4fc694fd7bcc88922c4f9abcd48bf6908f8bf939b","be3e93b109deb44b925583674cc0706c0b3c2e7316bcf79631285a45c18ed0c8","50f63746fc2a779d1f9c5657fd78e292045dc98b540e026799e039ea629f2943",{"version":"5dd53159f1edf3c430445448e6f61f22f229f2a33a3b445b03d72b7108ede3ba","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"c446cd228158b636d129bccdcc0a12bacf3cf0fbf322f108074230b3250f4bb8","signature":"282ccf7c3a7f3ca54f7379e41caeff7497b8f76b742f22ac82f3efa650fb30a1"},{"version":"7e59d3dcc7b7ec8d9231535240e3b52eb9873c4672f8139b060efd6d3e1e54a8","signature":"37d4e09d0bfe55e9aee3900fcfc009592082f89e4d5e9d9a7329ce919f4cf121"},"7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"ca72190df0eb9b09d4b600821c8c7b6c9747b75a1c700c4d57dc0bb72abc074c","affectsGlobalScope":true},"11e2d554398d2bd460e7d06b2fa5827a297c8acfbe00b4f894a224ac0862857f",{"version":"fc811ced095f38ad4438bb94a8d665c63bf4943e58a71ada16627add5ad93226","affectsGlobalScope":true},"374ca798f244e464346f14301dc2a8b4b111af1a83b49fffef5906c338a1f922","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","5eb881ed2a0d5b17ea36df5cd4c4be500e460c412f270c3170e906bec65580ac","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","489532ff54b714f0e0939947a1c560e516d3ae93d51d639ab02e907a0e950114","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"816ad2e607a96de5bcac7d437f843f5afd8957f1fa5eefa6bba8e4ed7ca8fd84","affectsGlobalScope":true},"cec36af22f514322f870e81d30675c78df82ae8bf4863f5fd4e4424c040c678d","d903fafe96674bc0b2ac38a5be4a8fc07b14c2548d1cdb165a80ea24c44c0c54","5eec82ac21f84d83586c59a16b9b8502d34505d1393393556682fe7e7fde9ef2","04eb6578a588d6a46f50299b55f30e3a04ef27d0c5a46c57d8fcc211cd530faa","8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58",{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true},"bcebb922784739bdb34c18ee51095d25a92b560c78ccd2eaacd6bd00f7443d83","7c013aa892414a7fdcfd861ae524a668eaa3ede8c7c0acafaf611948122c8d93","b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30",{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true},{"version":"b3624aed92dab6da8484280d3cb3e2f4130ec3f4ef3f8201c95144ae9e898bb6","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","fd93cee2621ff42dabe57b7be402783fd1aa69ece755bcba1e0290547ae60513","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","09326ae5f7e3d49be5cd9ea00eb814770e71870a438faa2efd8bdd9b4db21320",{"version":"3c4ba1dd9b12ffa284b565063108f2f031d150ea15b8fafbdc17f5d2a07251f3","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","c4577fb855ca259bdbf3ea663ca73988ce5f84251a92b4aef80a1f4122b6f98e","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"f0900cd5d00fe1263ff41201fb8073dbeb984397e4af3b8002a5c207a30bdc33","affectsGlobalScope":true},{"version":"ff07a9a03c65732ccc59b3c65bc584173da093bd563a6565411c01f5703bd3cb","affectsGlobalScope":true},"06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","ec4bd1b200670fb567920db572d6701ed42a9641d09c4ff6869768c8f81b404c","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa",{"version":"da26af7362f53d122283bc69fed862b9a9fe27e01bc6a69d1d682e0e5a4df3e6","affectsGlobalScope":true},"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"ed2a670a77a1b80653c5bde2d813b0ab2e92872cc9b2b611ce11050b95139be6","6738101ae8e56cd3879ab3f99630ada7d78097fc9fd334df7e766216778ca219","3dcefe176e6dce7a06bd345522e19f631f7fdb370335e2e93bc225b3afbb0bd0","6d829824ead8999f87b6df21200df3c6150391b894b4e80662caa462bd48d073","afc559c1b93df37c25aef6b3dfa2d64325b0e112e887ee18bf7e6f4ec383fc90","ba601641fac98c229ccd4a303f747de376d761babb33229bb7153bed9356c9cc","7578ed901eec5f590609fc7a6ba9027be5735ad1aedef119aa56d53a22dfbe02","629766229f541d92210f30a92b6038568ec165fab14b7ee53bdf13667da37ca3","204dbe6c72467fb14bbe8f06510b11fb541b6ce29580c6e10ebd3bdb2eb0c1f9","1e87d58d3678958d89e2a94454afcc827f1aa6363abbcbd4f99729e65ab47995","ce013414484233b24f42c0fcfca48a60bb66ab4e13c82953662305e8f1ee4925","16d51f964ec125ad2024cf03f0af444b3bc3ec3614d9345cc54d09bab45c9a4c",{"version":"c5dd1fef4cd4aaffc78786047bed5ae6fc1200d19a1946cbc4e2d3ed4d62c8fa","affectsGlobalScope":true},"5b9ecf7da4d71cf3832dbb8336150fa924631811f488ad4690c2dfec2b4fb1d7","951c85f75aac041dddbedfedf565886a7b494e29ec1532e2a9b4a6180560b50e","e6f0cb9d8cb2e38bec66e032e73caa3e7c6671f21ed7196acb821aec462051f2","43cdd474c5aa3340da4816bb8f1ae7f3b1bcf9e70d997afc36a0f2c432378c84","eb96a2321f717bccc3e49e104e299152984b927ea4546b559ae631c06565819c","072099609280e6659eb29b1d2a601e95708c90b7db2aba2571ebda50d1be0dd5","785b9d575b49124ce01b46f5b9402157c7611e6532effa562ac6aebec0074dfc","6d09838b65c3c780513878793fc394ae29b8595d9e4729246d14ce69abc71140","fefa1d4c62ddb09c78d9f46e498a186e72b5e7aeb37093aa6b2c321b9d6ecd14","e98185f4249720ace1921d59c1ff4612fa5c633a183fc9bf28e2e7b8e3c7fd51","f463d61cf39c3a6a5f96cdf7adfdb72a0b1d663f7b5d5b6dd042adba835430c2","035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","a4809f4d92317535e6b22b01019437030077a76fec1d93b9881c9ed4738fcc54","5f53fa0bd22096d2a78533f94e02c899143b8f0f9891a46965294ee8b91a9434","8cbbb12bfb321de8bd58ba74329f683d82e4e0abb56d998c7f1eef2e764a74c8","5006668996956580886022c05108e32c742823e1b5652aff7914917233731518","3a9b877f47119ac64aab98c61cae91a304ddeb6e8285ccd824a6aa665ffaeb95","4992e90e1ccc4f69f46e40f067d90b4a1d943ca9eb8e2054661bab13b7496ecb","458111fc89d11d2151277c822dfdc1a28fa5b6b2493cf942e37d4cd0a6ee5f22","da2b6356b84a40111aaecb18304ea4e4fcb43d70efb1c13ca7d7a906445ee0d3","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","aa2c18a1b5a086bbcaae10a4efba409cc95ba7287d8cf8f2591b53704fea3dea","6f294731b495c65ecf46a5694f0082954b961cf05463bea823f8014098eaffa0","0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","bdf0ed7d9ebae6175a5d1b4ec4065d07f8099379370a804b1faff05004dc387d","7c14ccd2eaa82619fffc1bfa877eb68a012e9fb723d07ee98db451fadb618906","5256ff2882306972c3eeae034d8e553a60d930f3e44d22189c54248232258438","df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9","4f6a12044ee6f458db11964153830abbc499e73d065c51c329ec97407f4b13dd","202f8582ee3cd89e06c4a17d8aabb925ff8550370559c771d1cc3ec3934071c2",{"version":"5f186a758a616c107c70e8918db4630d063bd782f22e6e0b17573b125765b40b","affectsGlobalScope":true},"fc37aca06f6b8b296c42412a2e75ab53d30cd1fa8a340a3bb328a723fd678377","5f2c582b9ef260cb9559a64221b38606378c1fabe17694592cdfe5975a6d7efa","c271193e426325d9acab2f99997bb9f5f2dff850ec8c7c011c5abafe5af83b5f","8baa5d0febc68db886c40bf341e5c90dc215a90cd64552e47e8184be6b7e3358","bc81aff061c53a7140270555f4b22da4ecfe8601e8027cf5aa175fbdc7927c31","74d5a87c3616cd5d8691059d531504403aa857e09cbaecb1c64dfb9ace0db185"],"root":[[70,78],[117,119]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":5,"noEmitOnError":true,"outDir":"./","rootDir":"..","sourceMap":true,"strict":true,"target":6},"fileIdsList":[[166],[50,166],[58,166],[50,58,166],[50,58,66,166],[48,49,166],[79,80,166],[81,166],[80,82,166],[97,98,166],[104,105,166],[104,166],[94,99,166],[94,166],[51,93,166],[94,99,100,101,166],[95,166],[92,96,108,109,110,113,114,166],[103,106,166],[107,166],[103,107,112,166],[102,166],[103,106,111,166],[79,91,115,166],[83,86,87,90,166],[139,166,173],[139,166,173,176],[79,166],[139,166,173,178],[139,166,173,176,183,189],[136,139,166,173,178,184],[166,177,178,185,188],[166,193],[166,197],[166,198],[166,202],[136,139,140,144,150,165,166,173,174,181,183,190,195,196,201],[166,203,205,206,207,208,209,210,211,212,213,214,215],[166,203,204,206,207,208,209,210,211,212,213,214,215],[166,204,205,206,207,208,209,210,211,212,213,214,215],[166,203,204,205,207,208,209,210,211,212,213,214,215],[166,203,204,205,206,208,209,210,211,212,213,214,215],[166,203,204,205,206,207,209,210,211,212,213,214,215],[166,203,204,205,206,207,208,210,211,212,213,214,215],[166,203,204,205,206,207,208,209,211,212,213,214,215],[166,203,204,205,206,207,208,209,210,212,213,214,215],[166,203,204,205,206,207,208,209,210,211,213,214,215],[166,203,204,205,206,207,208,209,210,211,212,214,215],[166,203,204,205,206,207,208,209,210,211,212,213,215],[166,203,204,205,206,207,208,209,210,211,212,213,214],[166,187],[166,186],[120,166],[123,166],[124,129,157,166],[125,136,137,144,154,165,166],[125,126,136,144,166],[127,166],[128,129,137,145,166],[129,154,162,166],[130,132,136,144,166],[131,166],[132,133,166],[136,166],[134,136,166],[136,137,138,154,165,166],[136,137,138,151,154,157,166],[166,170],[132,139,144,154,165,166],[136,137,139,140,144,154,162,165,166],[139,141,154,162,165,166],[120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172],[136,142,166],[143,165,166],[132,136,144,154,166],[145,166],[146,166],[123,147,166],[148,164,166,170],[149,166],[150,166],[136,151,152,166],[151,153,166,168],[124,136,154,155,156,157,166],[124,154,156,166],[154,155,166],[157,166],[158,166],[136,160,161,166],[160,161,166],[129,144,154,162,166],[163,166],[144,164,166],[124,139,150,165,166],[129,166],[154,166,167],[166,168],[166,169],[124,129,136,138,147,154,165,166,168,170],[154,166,171],[166,218],[166,219],[139,166,173,187],[79,89,166],[88,166],[51,166],[136,139,141,144,154,162,165,166,171,173],[136,154,166,173],[85,166],[84,166],[50,54,166],[54,166],[52,53,166],[59,60,61,62,63,64,65,66,67,166],[50,54,55,56,166],[47,57,68,69,70,71,72,166],[47,71,166],[47,71,72,73,166],[47,57,166],[47,73,166],[47,166],[47,76,166],[47,54,75,166],[47,72,116,166],[47,73,75,116,166],[47,76,116,166]],"referencedMap":[[48,1],[58,2],[59,3],[62,4],[60,4],[64,4],[67,5],[66,1],[65,4],[63,4],[61,3],[49,1],[50,6],[104,1],[81,7],[82,8],[80,1],[83,9],[97,1],[98,1],[99,10],[106,11],[105,12],[100,13],[93,14],[101,1],[94,15],[95,14],[111,14],[102,16],[96,17],[115,18],[92,1],[107,19],[108,20],[109,1],[110,12],[113,21],[103,22],[112,23],[114,20],[116,24],[91,25],[174,26],[175,1],[177,27],[87,28],[79,1],[179,29],[180,1],[176,26],[181,1],[182,1],[190,30],[191,1],[192,1],[185,31],[189,32],[194,33],[195,1],[196,1],[197,1],[198,34],[199,35],[200,1],[183,1],[201,36],[202,37],[204,38],[205,39],[203,40],[206,41],[207,42],[208,43],[209,44],[210,45],[211,46],[212,47],[213,48],[214,49],[215,50],[216,33],[186,51],[187,52],[217,1],[120,53],[121,53],[123,54],[124,55],[125,56],[126,57],[127,58],[128,59],[129,60],[130,61],[131,62],[132,63],[133,63],[135,64],[134,65],[136,64],[137,66],[138,67],[122,68],[172,1],[139,69],[140,70],[141,71],[173,72],[142,73],[143,74],[144,75],[145,76],[146,77],[147,78],[148,79],[149,80],[150,81],[151,82],[152,82],[153,83],[154,84],[156,85],[155,86],[157,87],[158,88],[159,1],[160,89],[161,90],[162,91],[163,92],[164,93],[165,94],[166,95],[167,96],[168,97],[169,98],[170,99],[171,100],[219,101],[218,102],[220,1],[178,1],[184,1],[221,1],[188,103],[90,104],[89,105],[88,1],[52,106],[51,1],[193,1],[222,107],[223,108],[84,28],[86,109],[85,110],[69,1],[55,111],[53,112],[56,1],[54,113],[68,114],[57,115],[47,1],[45,1],[46,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[19,1],[4,1],[20,1],[24,1],[21,1],[22,1],[23,1],[25,1],[26,1],[27,1],[5,1],[28,1],[29,1],[30,1],[31,1],[6,1],[35,1],[32,1],[33,1],[34,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[1,1],[44,1],[73,116],[72,117],[74,118],[70,119],[75,120],[71,121],[77,122],[76,121],[78,123],[117,124],[118,125],[119,126]]},"version":"5.5.4"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kmap-term-tree",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Renders a tree from a mathematical term",
5
5
  "license": "MIT",
6
6
  "author": "Holger Engels",
@@ -21,6 +21,8 @@ export class KmapTermTree extends LitElement {
21
21
  color: var(--kmap-term-tree-text-color, #1f2937);
22
22
  user-select: none;
23
23
  width: 100%;
24
+ min-width: var(--kmap-term-tree-min-width, 300px);
25
+ box-sizing: border-box;
24
26
  }
25
27
 
26
28
  .container {
@@ -29,6 +31,7 @@ export class KmapTermTree extends LitElement {
29
31
  flex-direction: column;
30
32
  align-items: center;
31
33
  width: 100%;
34
+ min-width: 0;
32
35
  box-sizing: border-box;
33
36
  }
34
37
 
@@ -78,15 +81,15 @@ export class KmapTermTree extends LitElement {
78
81
  .edge-path {
79
82
  fill: none;
80
83
  stroke: var(--kmap-term-tree-edge-color, #f59e0b);
81
- stroke-width: 2.2;
84
+ stroke-width: 2;
82
85
  stroke-linecap: round;
83
- opacity: 0.85;
86
+ opacity: 0.80;
84
87
  transition: stroke 0.2s ease, stroke-width 0.2s ease, opacity 0.2s ease;
85
88
  }
86
89
 
87
90
  .edge-path.highlighted {
88
91
  stroke: var(--kmap-term-tree-highlight-edge-color, #d97706);
89
- stroke-width: 3.2;
92
+ stroke-width: 2.5;
90
93
  opacity: 1;
91
94
  }
92
95
 
@@ -110,11 +113,11 @@ export class KmapTermTree extends LitElement {
110
113
  display: flex;
111
114
  align-items: center;
112
115
  justify-content: center;
113
- width: 28px;
114
- height: 28px;
116
+ width: 27px;
117
+ height: 27px;
115
118
  border-radius: 50%;
116
119
  background: var(--kmap-term-tree-background-color, #ffffff);
117
- border: 2px solid var(--kmap-term-tree-border-color, #0284c7);
120
+ border: 1px solid var(--kmap-term-tree-border-color, #0284c7);
118
121
  color: var(--kmap-term-tree-node-text-color, #0284c7);
119
122
  font-weight: 700;
120
123
  font-size: 1rem;
@@ -164,6 +167,11 @@ export class KmapTermTree extends LitElement {
164
167
  font-size: 0.88rem;
165
168
  display: flex;
166
169
  align-items: center;
170
+ justify-content: center;
171
+ text-align: center;
172
+ flex-wrap: wrap;
173
+ max-width: 100%;
174
+ box-sizing: border-box;
167
175
  gap: 8px;
168
176
  color: #334155;
169
177
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
@@ -283,7 +291,7 @@ export class KmapTermTree extends LitElement {
283
291
  }
284
292
 
285
293
  if (animations.length > 0) {
286
- Promise.all(animations.map(a => a.finished.catch(() => {}))).then(() => {
294
+ Promise.all(animations.map(a => a.finished.catch(() => { }))).then(() => {
287
295
  if (this.isConnected) {
288
296
  this.recalculateLayout();
289
297
  }
@@ -640,45 +648,44 @@ export class KmapTermTree extends LitElement {
640
648
  <!-- Canvas area with formula, edges, and operator nodes sharing the same coordinate space -->
641
649
  <div class="tree-canvas" style="height: ${this.treeHeight}px">
642
650
  ${this.highlightRect
643
- ? html`
651
+ ? html`
644
652
  <div
645
653
  class="highlight-overlay"
646
654
  style="left: ${this.highlightRect.left}px; top: ${this
647
- .highlightRect.top}px; width: ${this.highlightRect
648
- .width}px; height: ${this.highlightRect.height}px;"
655
+ .highlightRect.top}px; width: ${this.highlightRect
656
+ .width}px; height: ${this.highlightRect.height}px;"
649
657
  ></div>
650
658
  `
651
- : ''}
659
+ : ''}
652
660
 
653
661
  <div class="formula-wrapper">
654
662
  <div id="formula"></div>
655
663
  </div>
656
664
 
657
665
  ${this.error
658
- ? html`<div class="error-msg">${this.error}</div>`
659
- : html`
666
+ ? html`<div class="error-msg">${this.error}</div>`
667
+ : html`
660
668
  <svg class="edges-svg">
661
669
  ${this.edges.map(
662
- edge => svg`
670
+ edge => svg`
663
671
  <path
664
- class="edge-path ${
665
- this.activeSubtreeIds.has(edge.fromNodeId) &&
666
- this.activeSubtreeIds.has(edge.toNodeId)
667
- ? 'highlighted'
668
- : ''
669
- }"
672
+ class="edge-path ${this.activeSubtreeIds.has(edge.fromNodeId) &&
673
+ this.activeSubtreeIds.has(edge.toNodeId)
674
+ ? 'highlighted'
675
+ : ''
676
+ }"
670
677
  d="${this.renderPath(edge)}"
671
678
  />
672
679
  `
673
- )}
680
+ )}
674
681
  </svg>
675
682
 
676
683
  ${this.flatNodes.map(
677
- node => html`
684
+ node => html`
678
685
  <div
679
686
  class="tree-node ${this.activeNodeId === node.id
680
- ? 'active'
681
- : ''}"
687
+ ? 'active'
688
+ : ''}"
682
689
  style="left: ${node.x}px; top: ${node.y}px;"
683
690
  @mouseenter=${() => this.onNodeHover(node, true)}
684
691
  @mouseleave=${() => this.onNodeHover(node, false)}
@@ -688,32 +695,31 @@ export class KmapTermTree extends LitElement {
688
695
  ${node.symbol}
689
696
  </div>
690
697
  ${this.showLabels
691
- ? html`<span class="node-label">${node.label}</span>`
692
- : ''}
698
+ ? html`<span class="node-label">${node.label}</span>`
699
+ : ''}
693
700
  </div>
694
701
  `
695
- )}
702
+ )}
696
703
  `}
697
704
  </div>
698
705
 
699
706
  <!-- Didactic info box -->
700
707
  ${this.showDetails && activeNode
701
- ? html`
708
+ ? html`
702
709
  <div class="info-bar">
703
710
  <span>${isRoot ? 'Hauptrechenart:' : 'Teilterm:'}</span>
704
711
  <span class="info-badge">${activeNode.label}</span>
705
712
  <span style="color: #64748b">
706
713
  ${activeNode.children.length === 2
707
- ? `(verknüpft 2 Teilterme mit ${activeNode.symbol})`
708
- : activeNode.isUnary
709
- ? `(wirkt auf ${
710
- activeNode.children[0].label || 'Ausdruck'
711
- })`
712
- : ''}
714
+ ? `(verknüpft 2 Teilterme)`
715
+ : activeNode.isUnary || activeNode.type === 'function' || activeNode.children.length === 1
716
+ ? `(wirkt auf ${activeNode.children[0]?.label || 'Ausdruck'
717
+ })`
718
+ : ''}
713
719
  </span>
714
720
  </div>
715
721
  `
716
- : ''}
722
+ : ''}
717
723
 
718
724
  <div hidden>
719
725
  <slot @slotchange=${this.updateSlotted}></slot>
@@ -316,6 +316,7 @@ class PrattParser {
316
316
  mathJson: [fnName, arg.mathJson],
317
317
  children: [arg],
318
318
  depth: 0,
319
+ isUnary: true,
319
320
  };
320
321
  }
321
322
 
package/src/model.ts CHANGED
@@ -35,7 +35,7 @@ export const GERMAN_LABELS: Record<string, string> = {
35
35
  Multiply: 'Produkt',
36
36
  Divide: 'Quotient',
37
37
  Power: 'Potenz',
38
- Negate: 'Gegenzahl (Negation)',
38
+ Negate: 'Negation',
39
39
  Sqrt: 'Quadratwurzel',
40
40
  Sin: 'Sinus',
41
41
  Cos: 'Kosinus',
@@ -74,5 +74,31 @@ describe('KmapTermTree', () => {
74
74
  // Both should compute substantially the same local canvas left coordinate (within 2px)
75
75
  expect(Math.abs(scaledLeft - normalLeft)).to.be.below(2);
76
76
  });
77
+
78
+ it('correctly sets active state and unary info bar text when hovering function node like sin', async () => {
79
+ const el = await fixture<KmapTermTree>(
80
+ html`<kmap-term-tree term="2a + sin(3b)" showDetails></kmap-term-tree>`
81
+ );
82
+ await el.updateComplete;
83
+
84
+ const nodes = Array.from(
85
+ el.shadowRoot!.querySelectorAll('.tree-node')
86
+ ) as HTMLElement[];
87
+ const sinNode = nodes.find(n => n.textContent?.includes('sin'));
88
+ expect(sinNode).to.exist;
89
+
90
+ sinNode!.dispatchEvent(new MouseEvent('mouseenter'));
91
+ await el.updateComplete;
92
+
93
+ const infoBar = el.shadowRoot!.querySelector('.info-bar');
94
+ expect(infoBar).to.exist;
95
+ expect(infoBar!.textContent).to.include('Sinus');
96
+ expect(infoBar!.textContent).to.include('wirkt auf Produkt');
97
+
98
+ sinNode!.dispatchEvent(new MouseEvent('mouseleave'));
99
+ await el.updateComplete;
100
+
101
+ expect(infoBar!.textContent).to.include('Summe');
102
+ });
77
103
  });
78
104