From 6a7809a550a133daea59f709a8eb24144e343803 Mon Sep 17 00:00:00 2001 From: lixinran Date: Sat, 11 Oct 2025 02:39:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加双击图片节点预览功能 - 添加右键菜单图片预览选项 - 实现图片预览模态框组件 - 添加图片URL智能处理(相对路径转绝对路径) - 实现图片预加载机制和超时保护 - 增强错误处理和调试信息 - 修复图片一直加载不出来的问题 - 添加美观的加载动画和错误提示 --- ...{index-2f08a1a5.css => index-1f5435d2.css} | 2 +- .../{index-bdeaceb2.js => index-1fbb466c.js} | 2 +- frontend/dist/assets/index-3d4f89fc.js | 792 ------------------ frontend/dist/assets/index-c91f543d.js | 792 ++++++++++++++++++ .../{pdf-1a0ba5fc.js => pdf-bfa933f7.js} | 2 +- frontend/dist/index.html | 4 +- frontend/src/components/MindMap.vue | 291 +++++++ frontend/src/lib/mind-elixir/src/mouse.ts | 58 +- .../lib/mind-elixir/src/plugin/contextMenu.ts | 35 + .../src/lib/mind-elixir/src/utils/pubsub.ts | 1 + 10 files changed, 1174 insertions(+), 805 deletions(-) rename frontend/dist/assets/{index-2f08a1a5.css => index-1f5435d2.css} (68%) rename frontend/dist/assets/{index-bdeaceb2.js => index-1fbb466c.js} (99%) delete mode 100644 frontend/dist/assets/index-3d4f89fc.js create mode 100644 frontend/dist/assets/index-c91f543d.js rename frontend/dist/assets/{pdf-1a0ba5fc.js => pdf-bfa933f7.js} (99%) diff --git a/frontend/dist/assets/index-2f08a1a5.css b/frontend/dist/assets/index-1f5435d2.css similarity index 68% rename from frontend/dist/assets/index-2f08a1a5.css rename to frontend/dist/assets/index-1f5435d2.css index 8443477..648f180 100644 --- a/frontend/dist/assets/index-2f08a1a5.css +++ b/frontend/dist/assets/index-1f5435d2.css @@ -1 +1 @@ -.map-container{-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:hidden;font-size:15px;outline:none;touch-action:none;background-color:var(--bgcolor)}.map-container *{box-sizing:border-box}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{outline:2px solid var(--selected);outline-offset:1px}.map-container .hyper-link{text-decoration:none;margin-left:.3em}.map-container me-main>me-wrapper>me-parent>me-epd{top:50%;transform:translateY(-50%)}.map-container me-epd{top:100%;transform:translateY(-50%)}.map-container .lhs{direction:rtl}.map-container .lhs>me-wrapper>me-parent>me-epd{left:-10px}.map-container .lhs me-epd{left:5px}.map-container .lhs me-tpc{direction:ltr}.map-container .rhs>me-wrapper>me-parent>me-epd{right:-10px}.map-container .rhs me-epd{right:5px}.map-container .map-canvas{position:relative;-webkit-user-select:none;user-select:none;width:fit-content;transform:scale(1)}.map-container .map-canvas me-nodes{position:relative;display:flex;justify-content:center;align-items:center;height:max-content;width:max-content;padding:var(--map-padding)}.map-container me-main>me-wrapper{position:relative;margin:var(--main-gap-y) var(--main-gap-x)}.map-container me-main>me-wrapper>me-parent{margin:10px;padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px 25px}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-root{position:relative;margin:45px 0;z-index:10}.map-container me-root me-tpc{font-size:25px;color:var(--root-color);padding:10px 30px;border-radius:var(--root-radius);border:var(--root-border-color) 2px solid;background-color:var(--root-bgcolor)}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--node-gap-x);margin-top:var(--node-gap-y);z-index:10}.map-container me-parent me-tpc{position:relative;border-radius:3px;color:var(--color);padding:var(--topic-padding)}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7;border-radius:3px}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzMzMzIDMyIDMyIDMyaDEzOC42NjY2NjdWNjgyLjY2NjY2N2MwIDE3LjA2NjY2NyAxNC45MzMzMzMgMzIgMzIgMzJzMzItMTQuOTMzMzMzIDMyLTMydi0xMzguNjY2NjY3SDY4Mi42NjY2NjdjMTcuMDY2NjY3IDAgMzItMTQuOTMzMzMzIDMyLTMycy0xNC45MzMzMzMtMzItMzItMzJ6Ij48L3BhdGg+Cjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NTU2NDk4NSIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNTQ0SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyLTE0LjkzMzMzMy0zMi0zMnMxNC45MzMzMzMtMzIgMzItMzJoMzQxLjMzMzMzNGMxNy4wNjY2NjcgMCAzMiAxNC45MzMzMzMgMzIgMzJzLTE0LjkzMzMzMyAzMi0zMiAzMnoiPjwvcGF0aD4KPC9zdmc+)!important;transition:opacity .3s;opacity:0}@media (hover: hover){.map-container me-parent me-epd.minus:hover{opacity:.8}}@media (hover: none){.map-container me-parent me-epd.minus{opacity:.8}}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary{pointer-events:none;z-index:20}.map-container .summary>g,.map-container .topiclinks>g{cursor:pointer;pointer-events:stroke;z-index:20}.map-container .lines,.map-container .subLines{pointer-events:none}.map-container #input-box{position:absolute;top:0;left:0;width:max-content;max-width:35em;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:auto;color:var(--color);background-color:var(--bgcolor);z-index:100}.map-container me-tpc{display:flex!important;max-width:35em;white-space:pre-wrap;pointer-events:all;text-align:left!important;flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;box-sizing:border-box!important;min-height:2em!important;overflow:hidden!important;position:relative!important;contain:layout style!important}.map-container me-tpc .text{text-align:left!important}.map-container me-tpc ul,.map-container me-tpc ol{text-align:left!important;padding-left:20px!important;list-style-position:outside!important}.map-container me-tpc li{text-align:left!important;list-style-position:outside!important}.map-container me-tpc p,.map-container me-tpc span,.map-container me-tpc div,.map-container me-tpc strong,.map-container me-tpc em{text-align:left!important}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a,.map-container me-tpc>iframe{pointer-events:auto}.map-container me-tpc>.text{display:block!important;width:100%!important;margin:0 auto!important;word-wrap:break-word!important;word-break:break-word!important;line-height:1.4!important}.map-container me-tpc>.text a{pointer-events:auto}.map-container me-tpc>img{display:block!important;margin:0 auto 8px!important;object-fit:cover;max-width:200px!important;max-height:150px!important;width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;background-color:#f5f5f5!important;border:1px solid #ddd!important}.map-container me-tpc img{max-width:200px!important;max-height:150px!important;width:auto!important;height:auto!important;margin:0 auto!important;min-width:0!important;min-height:0!important}.map-container me-tpc img[src=""],.map-container me-tpc img[src*=undefined],.map-container me-tpc img[src*=null]{display:none!important}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;z-index:50;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 4px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-left:5px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.map-container .markdown-table{border-collapse:collapse;width:100%;margin:4px 0;font-size:11px;border:1px solid #e0e0e0;border-radius:6px;box-shadow:0 2px 8px #00000014;background-color:#fafafa;overflow:hidden;white-space:normal!important}.map-container .markdown-table th,.map-container .markdown-table td{border:1px solid #e0e0e0;padding:8px 12px;text-align:left;vertical-align:top;position:relative;white-space:normal!important}.map-container .markdown-table th{background-color:#f5f5f5;font-weight:600;color:#333;text-align:center;border-bottom:1px solid #d0d0d0}.map-container .markdown-table td{background-color:#fff}.map-container .markdown-table tr:nth-child(2n) td{background-color:#f8f8f8}.map-container .markdown-table tr:hover td{background-color:#f0f8ff}.map-container .markdown-table th:not(:last-child),.map-container .markdown-table td:not(:last-child){border-right:1px solid #e0e0e0}.map-container .markdown-table tr:not(:last-child) td{border-bottom:1px solid #e0e0e0}.map-container .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.map-container .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;color:var(--panel-color);box-shadow:0 12px 15px #0003;border-radius:5px;overflow:hidden}.map-container .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:6px 10px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color);cursor:pointer}.map-container .context-menu .menu-list li span{line-height:20px}.map-container .context-menu .menu-list li a{color:#333;text-decoration:none}.map-container .context-menu .menu-list li.disabled{display:none}.map-container .context-menu .menu-list li:hover{filter:brightness(.95)}.map-container .context-menu .menu-list li:last-child{border-bottom:0}.map-container .context-menu .menu-list li span:last-child{float:right}.map-container .context-menu .key{font-size:10px;background-color:#f1f1f1;color:#333;padding:2px 5px;border-radius:3px}.map-container .tips{position:absolute;bottom:28px;left:50%;transform:translate(-50%);color:var(--panel-color);background:var(--panel-bgcolor);opacity:.8;padding:5px 10px;border-radius:5px;font-weight:700}.mind-elixir-toolbar{position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:8px;border-radius:6px;box-shadow:0 2px 8px #00000026}.mind-elixir-toolbar svg{display:inline-block;width:18px!important;height:18px!important;max-width:18px!important;max-height:18px!important;min-width:18px!important;min-height:18px!important;vertical-align:middle;flex-shrink:0}.mind-elixir-toolbar span{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;min-height:36px;max-width:36px;max-height:36px;border-radius:6px;transition:background-color .2s ease;flex-shrink:0}.mind-elixir-toolbar span:hover{background-color:#0000000d}.mind-elixir-toolbar span:active{opacity:.7;background-color:#0000001a}.mind-elixir-toolbar.rb{right:15px;bottom:15px}.mind-elixir-toolbar.rb span+span{margin-left:8px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-0cdd387c.woff2) format("woff2"),url(/assets/KaTeX_AMS-Regular-30da91e8.woff) format("woff"),url(/assets/KaTeX_AMS-Regular-68534840.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-de7701e4.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-1ae6bd74.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Bold-07d8e303.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-5d53e70a.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-3398dd02.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Regular-ed0b7437.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-74444efd.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Bold-9be7ceb8.woff) format("woff"),url(/assets/KaTeX_Fraktur-Bold-9163df9c.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-51814d27.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Regular-5e28753b.woff) format("woff"),url(/assets/KaTeX_Fraktur-Regular-1e6f9579.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-0f60d1b8.woff2) format("woff2"),url(/assets/KaTeX_Main-Bold-c76c5d69.woff) format("woff"),url(/assets/KaTeX_Main-Bold-138ac28d.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-99cd42a3.woff2) format("woff2"),url(/assets/KaTeX_Main-BoldItalic-a6f7ec0d.woff) format("woff"),url(/assets/KaTeX_Main-BoldItalic-70ee1f64.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-97479ca6.woff2) format("woff2"),url(/assets/KaTeX_Main-Italic-f1d6ef86.woff) format("woff"),url(/assets/KaTeX_Main-Italic-0d85ae7c.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-c2342cd8.woff2) format("woff2"),url(/assets/KaTeX_Main-Regular-c6368d87.woff) format("woff"),url(/assets/KaTeX_Main-Regular-d0332f52.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-dc47344d.woff2) format("woff2"),url(/assets/KaTeX_Math-BoldItalic-850c0af5.woff) format("woff"),url(/assets/KaTeX_Math-BoldItalic-f9377ab0.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-7af58c5e.woff2) format("woff2"),url(/assets/KaTeX_Math-Italic-8a8d2445.woff) format("woff"),url(/assets/KaTeX_Math-Italic-08ce98e5.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-e99ae511.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Bold-ece03cfd.woff) format("woff"),url(/assets/KaTeX_SansSerif-Bold-1ece03f7.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-00b26ac8.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Italic-91ee6750.woff) format("woff"),url(/assets/KaTeX_SansSerif-Italic-3931dd81.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-68e8c73e.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Regular-11e4dc8a.woff) format("woff"),url(/assets/KaTeX_SansSerif-Regular-f36ea897.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-036d4e95.woff2) format("woff2"),url(/assets/KaTeX_Script-Regular-d96cdf2b.woff) format("woff"),url(/assets/KaTeX_Script-Regular-1c67f068.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-6b47c401.woff2) format("woff2"),url(/assets/KaTeX_Size1-Regular-c943cc98.woff) format("woff"),url(/assets/KaTeX_Size1-Regular-95b6d2f1.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-d04c5421.woff2) format("woff2"),url(/assets/KaTeX_Size2-Regular-2014c523.woff) format("woff"),url(/assets/KaTeX_Size2-Regular-a6b2099f.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/assets/KaTeX_Size3-Regular-6ab6b62e.woff) format("woff"),url(/assets/KaTeX_Size3-Regular-500e04d5.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-a4af7d41.woff2) format("woff2"),url(/assets/KaTeX_Size4-Regular-99f9c675.woff) format("woff"),url(/assets/KaTeX_Size4-Regular-c647367d.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-71d517d6.woff2) format("woff2"),url(/assets/KaTeX_Typewriter-Regular-e14fed02.woff) format("woff"),url(/assets/KaTeX_Typewriter-Regular-f01f3e87.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.22"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}.mindmap-container[data-v-40eff312]{height:100vh;width:100%;position:relative;background:white;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;overflow:visible}.save-controls[data-v-40eff312]{position:absolute;bottom:20px;right:20px;z-index:1000;display:flex;gap:12px}.save-btn[data-v-40eff312]{display:flex;align-items:center;gap:8px;padding:12px 20px;background:#660874;color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:all .3s ease;box-shadow:0 4px 12px #6608744d}.save-btn[data-v-40eff312]:hover{background:#5a0666;transform:translateY(-2px);box-shadow:0 6px 16px #66087466}.save-btn[data-v-40eff312]:active{transform:translateY(0);box-shadow:0 2px 8px #6608744d}.save-btn svg[data-v-40eff312]{width:16px;height:16px;stroke:currentColor;stroke-width:2;fill:none}.refresh-btn[data-v-40eff312]{display:flex;align-items:center;gap:8px;padding:12px 20px;background:#28a745;color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:all .3s ease;box-shadow:0 4px 12px #28a7454d}.refresh-btn[data-v-40eff312]:hover{background:#218838;transform:translateY(-2px);box-shadow:0 6px 16px #28a74566}.refresh-btn[data-v-40eff312]:active{transform:translateY(0);box-shadow:0 2px 8px #28a7454d}.refresh-btn svg[data-v-40eff312]{width:16px;height:16px;stroke:currentColor;stroke-width:2;fill:none}.mindmap-el[data-v-40eff312]{height:100%;width:100%;background:white;border:none;outline:none;overflow:visible;position:relative}.welcome-page[data-v-40eff312]{height:100vh;width:100%;margin-left:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#f8f9fa 0%,#e9ecef 100%);color:#37352f;position:relative;z-index:999;transition:all .4s cubic-bezier(.4,0,.2,1);border-left:none}.welcome-page.ai-sidebar-collapsed[data-v-40eff312]{width:100%;margin-left:0}.welcome-content[data-v-40eff312]{text-align:center;max-width:800px;padding:40px;background:white;border-radius:20px;border:2px solid #660874;box-shadow:0 8px 32px #00000026;position:relative;z-index:1001;margin-left:100px;transition:all .4s cubic-bezier(.4,0,.2,1)}.welcome-content.ai-sidebar-collapsed[data-v-40eff312]{margin-left:0}.welcome-header h1[data-v-40eff312]{font-size:3rem;margin:0 0 20px;font-weight:700;color:#37352f;text-shadow:none}.welcome-subtitle[data-v-40eff312]{font-size:1.2rem;margin:0 0 40px;color:#6b7280;font-weight:300}.welcome-features[data-v-40eff312]{display:flex;flex-direction:column;gap:30px;margin:40px 0;align-items:center}.feature-item[data-v-40eff312]{display:flex;align-items:center;gap:20px;padding:20px;background:rgba(255,255,255,.8);border-radius:15px;border:1px solid rgba(102,8,116,.1);transition:all .3s ease;box-shadow:0 4px 20px #00000014;width:100%;max-width:500px;justify-content:flex-start}.feature-item[data-v-40eff312]:hover{transform:translateY(-5px);background:rgba(255,255,255,.95);box-shadow:0 8px 32px #0000001f}.feature-icon[data-v-40eff312]{font-size:2.5rem;min-width:60px;color:#660874;display:flex;align-items:center;justify-content:center;flex-shrink:0}.feature-text[data-v-40eff312]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.feature-text h3[data-v-40eff312]{margin:0 0 10px;font-size:1.3rem;font-weight:600;color:#37352f;text-align:center}.feature-text p[data-v-40eff312]{margin:0;color:#6b7280;line-height:1.5;text-align:center}.welcome-tips[data-v-40eff312]{margin-top:30px;padding:20px;background:rgba(255,255,255,.8);border-radius:15px;border:1px solid rgba(102,8,116,.1);box-shadow:0 4px 20px #00000014}.welcome-tips p[data-v-40eff312]{margin:0;color:#6b7280;font-size:1rem}[data-v-40eff312] .mind-elixir{height:100%;width:100%;position:relative;overflow:hidden;background:transparent;border:none;outline:none}[data-v-40eff312] .mind-elixir .map-container{height:100%;width:100%;position:relative}[data-v-40eff312] .mind-elixir .map-canvas{transition:none}[data-v-40eff312] .map-container .topic{background:#ffffff!important;border:2px solid #e0e0e0!important;border-radius:8px!important;padding:12px 16px!important;box-shadow:0 2px 8px #0000001a!important;transition:all .3s ease!important;cursor:pointer!important;min-width:120px!important;max-width:300px!important;text-align:center!important;font-size:14px!important;font-weight:500!important;color:#333!important;position:relative!important}[data-v-40eff312] .map-container .topic:hover{border-color:#007bff!important;box-shadow:0 4px 12px #007bff33!important;transform:translateY(-2px)!important}[data-v-40eff312] .map-container .topic.selected{border-color:#007bff!important;background:#f8f9ff!important;box-shadow:0 4px 12px #007bff4d!important}.context-menu[data-v-40eff312]{position:absolute;background:rgba(255,255,255,.95);border-radius:12px;padding:8px;box-shadow:0 8px 24px #00000026;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(0,0,0,.1);z-index:1000;display:flex;flex-direction:row;gap:4px;align-items:center;min-width:auto;white-space:nowrap;animation:menuFadeIn-40eff312 .2s ease;transform:translate(-50%)}@keyframes menuFadeIn-40eff312{0%{opacity:0;transform:translate(-50%) translateY(-10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.context-menu-item[data-v-40eff312]{width:36px;height:36px;border:none;border-radius:8px;background:transparent;color:#666;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease;position:relative}.context-menu-item[data-v-40eff312]:hover{background:rgba(0,0,0,.05);color:#333;transform:scale(1.05)}.context-menu-item.delete[data-v-40eff312]:hover{background:rgba(220,53,69,.1);color:#dc3545}.context-menu-item.ask-ai[data-v-40eff312]{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff;border:2px solid #5a67d8;box-shadow:0 2px 8px #667eea4d;position:relative}.context-menu-item.ask-ai[data-v-40eff312]:hover{background:linear-gradient(135deg,#5a67d8 0%,#667eea 100%);color:#fff;transform:translateY(-1px);box-shadow:0 4px 12px #667eea66}.context-menu-item.ask-ai svg[data-v-40eff312]{filter:drop-shadow(0 1px 2px rgba(0,0,0,.2))}.context-menu-item svg[data-v-40eff312]{width:16px;height:16px}.context-menu-item[data-v-40eff312]:after{content:attr(title);position:absolute;bottom:-30px;left:50%;transform:translate(-50%);background:rgba(0,0,0,.8);color:#fff;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;opacity:0;visibility:hidden;transition:all .2s ease;z-index:1001;pointer-events:none}.context-menu-item[data-v-40eff312]:hover:after{opacity:1;visibility:visible}.context-menu-item[data-v-40eff312]:before{content:"";position:absolute;bottom:-8px;left:50%;transform:translate(-50%);border:4px solid transparent;border-top-color:#000c;opacity:0;visibility:hidden;transition:all .2s ease;pointer-events:none}.context-menu-item[data-v-40eff312]:hover:before{opacity:1;visibility:visible}.ai-input-area[data-v-40eff312]{position:absolute;width:300px;background:white;border-radius:12px;box-shadow:0 8px 32px #0000001f;z-index:1001;animation:slideInDown-40eff312 .3s ease}@keyframes slideInDown-40eff312{0%{opacity:0;transform:translate(-50%) translateY(-10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.ai-input-header[data-v-40eff312]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e9ecef;background:#f8f9fa;border-radius:12px 12px 0 0}.ai-input-title[data-v-40eff312]{font-size:16px;font-weight:600;color:#2c3e50}.ai-close-btn[data-v-40eff312]{background:none;border:none;cursor:pointer;padding:4px 8px;border-radius:6px;color:#6c757d;font-size:18px;line-height:1;transition:all .2s ease}.ai-close-btn[data-v-40eff312]:hover{background:#e9ecef;color:#495057}.ai-input-content[data-v-40eff312]{padding:20px}.ai-input-content textarea[data-v-40eff312]{width:100%;padding:12px;border:2px solid #e9ecef;border-radius:8px;font-size:14px;line-height:1.5;resize:none;transition:border-color .2s ease;font-family:inherit;margin-bottom:16px;box-sizing:border-box}.ai-input-content textarea[data-v-40eff312]:focus{outline:none;border-color:#007bff;box-shadow:0 0 0 3px #007bff1a}.ai-input-content textarea[data-v-40eff312]:disabled{background:#f8f9fa;color:#6c757d;cursor:not-allowed}.ai-input-actions[data-v-40eff312]{display:flex;justify-content:center;align-items:center;gap:8px}.btn-cancel[data-v-40eff312],.btn-submit[data-v-40eff312]{padding:8px 16px;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;transition:all .2s ease;border:none}.btn-cancel[data-v-40eff312]{background:#6c757d;color:#fff}.btn-cancel[data-v-40eff312]:hover:not(:disabled){background:#5a6268}.btn-submit[data-v-40eff312]{background:#007bff;color:#fff}.btn-submit[data-v-40eff312]:hover:not(:disabled){background:#0056b3;transform:translateY(-1px)}.btn-cancel[data-v-40eff312]:disabled,.btn-submit[data-v-40eff312]:disabled{opacity:.6;cursor:not-allowed}@media (max-width: 768px){.context-menu[data-v-40eff312]{padding:6px;gap:3px}.context-menu-item[data-v-40eff312]{width:32px;height:32px}.context-menu-item svg[data-v-40eff312]{width:14px;height:14px}}.node-description[data-v-40eff312]{font-size:11px;color:#666;margin-top:6px;padding:6px 8px;background:rgba(0,0,0,.03);border-radius:4px;max-width:250px;word-wrap:break-word;line-height:1.3;border-left:3px solid #e0e0e0;display:block}.topic[data-v-40eff312]{min-width:150px;max-width:400px;padding:8px 12px;border-radius:8px;background:white!important;box-shadow:0 2px 8px #0000001a!important;border:1px solid #e0e0e0!important;margin:4px!important}.topic.root[data-v-40eff312],.topic.main[data-v-40eff312],.topic.sub[data-v-40eff312]{background:white!important;box-shadow:0 2px 8px #0000001a!important;border:1px solid #e0e0e0!important}.topic[data-v-40eff312]{background:white!important;box-shadow:0 2px 8px #0000001a!important;border:1px solid #e0e0e0!important;border-radius:8px!important;padding:8px 12px!important;min-width:150px!important;max-width:400px!important;margin:4px!important;position:relative!important}.tpc-line[data-v-40eff312]{position:absolute!important;z-index:1!important}.tpc-line.tpc-line-left[data-v-40eff312]{right:100%!important;top:50%!important;transform:translateY(-50%)!important}.tpc-line.tpc-line-right[data-v-40eff312]{left:100%!important;top:50%!important;transform:translateY(-50%)!important}.tpc-line.tpc-line-top[data-v-40eff312]{bottom:100%!important;left:50%!important;transform:translate(-50%)!important}.tpc-line.tpc-line-bottom[data-v-40eff312]{top:100%!important;left:50%!important;transform:translate(-50%)!important}.topic[data-v-40eff312]:before{display:none!important}.topic[data-v-40eff312]:after{display:none!important}.topic[style*="border-radius: 50%"][data-v-40eff312]{border-radius:8px!important;background:white!important;box-shadow:0 2px 8px #0000001a!important;border:1px solid #e0e0e0!important}.topic[data-v-40eff312]:not(:has(.children)){background:white!important;box-shadow:0 2px 8px #0000001a!important;border:1px solid #e0e0e0!important;border-radius:8px!important}.topic[style][data-v-40eff312]{background:white!important;box-shadow:0 2px 8px #0000001a!important;border:1px solid #e0e0e0!important;border-radius:8px!important;padding:8px 12px!important;min-width:150px!important;max-width:400px!important;margin:4px!important}.topic .topic-text[data-v-40eff312]{font-weight:500;color:#333;margin-bottom:4px;line-height:1.4}.topic .topic-text.markdown-content[data-v-40eff312]{font-size:12px;line-height:1.3}.topic table[data-v-40eff312],.topic .text table[data-v-40eff312],.topic .topic-text table[data-v-40eff312],.topic .topic-text.markdown-content table[data-v-40eff312]{border-collapse:collapse!important;width:100%!important;margin:4px 0!important;font-size:11px!important;border:2px solid #333!important;border-radius:6px!important;box-shadow:0 2px 8px #00000014!important;background-color:#fafafa!important;overflow:hidden!important;display:table!important;white-space:normal!important}.topic table th[data-v-40eff312],.topic table td[data-v-40eff312],.topic .text table th[data-v-40eff312],.topic .text table td[data-v-40eff312],.topic .topic-text table th[data-v-40eff312],.topic .topic-text table td[data-v-40eff312],.topic .topic-text.markdown-content table th[data-v-40eff312],.topic .topic-text.markdown-content table td[data-v-40eff312]{border:2px solid #333!important;padding:6px 8px!important;text-align:left!important;vertical-align:top!important;display:table-cell!important;position:relative!important;white-space:normal!important}.topic .topic-text.markdown-content table th[data-v-40eff312],.topic .text table th[data-v-40eff312],.topic table th[data-v-40eff312]{background-color:#f5f5f5!important;font-weight:600!important;color:#333!important;text-align:center!important;border-bottom:2px solid #333!important}.topic .topic-text.markdown-content table td[data-v-40eff312],.topic .text table td[data-v-40eff312],.topic table td[data-v-40eff312]{background-color:#fff!important}.topic .topic-text.markdown-content table tr[data-v-40eff312],.topic .text table tr[data-v-40eff312],.topic table tr[data-v-40eff312]{display:table-row!important;white-space:normal!important}.topic .topic-text.markdown-content table tr:nth-child(2n) td[data-v-40eff312],.topic .text table tr:nth-child(2n) td[data-v-40eff312]{background-color:#f8f8f8!important}.topic .topic-text.markdown-content table tr:hover td[data-v-40eff312],.topic .text table tr:hover td[data-v-40eff312]{background-color:#f0f8ff!important}.topic .topic-text.markdown-content table th[data-v-40eff312]:not(:last-child),.topic .topic-text.markdown-content table td[data-v-40eff312]:not(:last-child),.topic .text table th[data-v-40eff312]:not(:last-child),.topic .text table td[data-v-40eff312]:not(:last-child){border-right:1px solid #e0e0e0!important}.topic .topic-text.markdown-content table tr:not(:last-child) td[data-v-40eff312],.topic .text table tr:not(:last-child) td[data-v-40eff312]{border-bottom:1px solid #e0e0e0!important}.topic .topic-text.markdown-content code[data-v-40eff312]{background-color:#f4f4f4;padding:1px 3px;border-radius:2px;font-family:Courier New,monospace;font-size:10px}.topic .topic-text.markdown-content pre[data-v-40eff312]{background-color:#f4f4f4;padding:4px;border-radius:3px;overflow-x:auto;font-size:10px}.topic .topic-text.markdown-content ul[data-v-40eff312],.topic .topic-text.markdown-content ol[data-v-40eff312]{margin:2px 0;padding-left:12px}.topic .topic-text.markdown-content li[data-v-40eff312]{margin:1px 0;font-size:11px}.topic .topic-text.markdown-content strong[data-v-40eff312]{font-weight:600}.topic .topic-text.markdown-content em[data-v-40eff312]{font-style:italic}.topic h1[data-v-40eff312],.topic h2[data-v-40eff312],.topic h3[data-v-40eff312],.topic h4[data-v-40eff312],.topic h5[data-v-40eff312],.topic h6[data-v-40eff312]{margin:4px 0;font-weight:600;color:#333}.topic p[data-v-40eff312]{margin:2px 0;line-height:1.3;color:#666}.topic ul[data-v-40eff312],.topic ol[data-v-40eff312]{margin:2px 0;padding-left:16px}.topic li[data-v-40eff312]{margin:1px 0;line-height:1.3;color:#666}.topic strong[data-v-40eff312],.topic b[data-v-40eff312]{font-weight:600;color:#333}.topic em[data-v-40eff312],.topic i[data-v-40eff312]{font-style:italic;color:#555}.topic code[data-v-40eff312]{background:#f5f5f5;padding:1px 3px;border-radius:3px;font-family:monospace;font-size:.9em}.topic-content[data-v-40eff312]{display:flex;flex-direction:column;align-items:center}.map-container me-tpc img[data-v-40eff312],.map-container me-tpc>img[data-v-40eff312]{max-width:200px!important;max-height:150px!important;width:auto!important;height:auto!important;display:block!important;margin-bottom:8px!important;object-fit:cover!important}.ai-sidebar-wrapper[data-v-28c77d5e]{position:fixed;top:0;left:0;z-index:1000}.ai-sidebar[data-v-28c77d5e]{position:relative;width:420px;height:100vh;background:linear-gradient(135deg,#f8f9fa 0%,#e9ecef 100%);color:#37352f;transition:transform .4s cubic-bezier(.4,0,.2,1);box-shadow:none;overflow:visible}.ai-sidebar[data-v-28c77d5e]:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:radial-gradient(circle at 20% 80%,rgba(102,8,116,.1) 0%,transparent 50%),radial-gradient(circle at 80% 20%,rgba(102,8,116,.1) 0%,transparent 50%),radial-gradient(circle at 40% 40%,rgba(102,8,116,.05) 0%,transparent 50%);pointer-events:none}.sidebar-collapsed[data-v-28c77d5e]{transform:translate(-420px)}.sidebar-toggle[data-v-28c77d5e]{position:fixed;top:20px;width:45px;height:45px;background:#660874;border-radius:0 8px 8px 0;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:2px 0 10px #0003,0 0 20px #6608744d;color:#fff;transition:all .4s cubic-bezier(.4,0,.2,1);font-weight:700;z-index:100000;border:2px solid #660874}.sidebar-toggle[data-v-28c77d5e]:hover{background:#5a0666;transform:scale(1.1);color:#fff;box-shadow:3px 0 15px #00000026;border-color:#5a0666}.sidebar-content[data-v-28c77d5e]{height:100%;overflow-y:auto;padding:20px;position:relative;z-index:10}.sidebar-header[data-v-28c77d5e]{text-align:center;margin-bottom:35px;padding-bottom:25px;border-bottom:1px solid rgba(102,8,116,.1);position:relative;z-index:10}.sidebar-header h3[data-v-28c77d5e]{margin:0 0 15px;font-size:28px;font-weight:600;color:#000}.sidebar-header p[data-v-28c77d5e]{margin:0;color:#333;font-size:16px}.collapse-hint[data-v-28c77d5e]{margin-top:10px;text-align:center}.collapse-hint small[data-v-28c77d5e]{color:#666;font-size:12px;opacity:.8}.section[data-v-28c77d5e]{margin-bottom:35px;background:rgba(255,255,255,.95);border-radius:12px;padding:25px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:2px solid rgba(102,8,116,.2);box-shadow:0 4px 20px #0000001a;position:relative;z-index:10;overflow:hidden}.section h4[data-v-28c77d5e]{margin:0 0 20px;font-size:20px;font-weight:600;display:flex;align-items:center;gap:8px;color:#000}.input-group[data-v-28c77d5e]{margin-bottom:20px}.input-group label[data-v-28c77d5e]{display:block;margin-bottom:10px;font-weight:500;font-size:16px;color:#000}.input-group textarea[data-v-28c77d5e]{width:100%;padding:12px;border:none;border-radius:8px;background:rgba(255,255,255,.9);color:#333;font-size:14px;resize:vertical;min-height:80px;font-family:Monaco,Menlo,Ubuntu Mono,monospace}.input-group textarea[data-v-28c77d5e]:focus{outline:none;box-shadow:0 0 0 2px #ffffff80}.button-group[data-v-28c77d5e]{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}.save-button-group[data-v-28c77d5e]{margin-top:15px}.btn-primary[data-v-28c77d5e],.btn-secondary[data-v-28c77d5e],.btn-clear[data-v-28c77d5e],.btn-copy[data-v-28c77d5e],.btn-import[data-v-28c77d5e],.btn-preview[data-v-28c77d5e],.btn-test[data-v-28c77d5e],.btn-save[data-v-28c77d5e]{padding:12px 18px;border:none;border-radius:8px;font-size:16px;font-weight:500;cursor:pointer;transition:all .3s ease;display:flex;align-items:center;gap:6px}.btn-primary[data-v-28c77d5e]{background:#660874;color:#fff}.btn-primary[data-v-28c77d5e]:hover:not(:disabled){background:#5a0666;transform:translateY(-2px)}.btn-secondary[data-v-28c77d5e]{background:#2196F3;color:#fff}.btn-secondary[data-v-28c77d5e]:hover:not(:disabled){background:#1976D2;transform:translateY(-2px)}.btn-clear[data-v-28c77d5e]{background:#f44336;color:#fff}.btn-clear[data-v-28c77d5e]:hover{background:#d32f2f;transform:translateY(-2px)}.btn-copy[data-v-28c77d5e]{background:#FF9800;color:#fff}.btn-copy[data-v-28c77d5e]:hover{background:#F57C00;transform:translateY(-2px)}.btn-import[data-v-28c77d5e]{background:#9C27B0;color:#fff}.btn-import[data-v-28c77d5e]:hover{background:#7B1FA2;transform:translateY(-2px)}.btn-preview[data-v-28c77d5e]{background:#00BCD4;color:#fff}.btn-preview[data-v-28c77d5e]:hover{background:#0097A7;transform:translateY(-2px)}.btn-test[data-v-28c77d5e]{background:#FF5722;color:#fff}.file-upload-area[data-v-28c77d5e]{position:relative;border:2px dashed rgba(102,8,116,.5);border-radius:8px;padding:20px;text-align:center;transition:all .3s ease;cursor:pointer;background:rgba(255,255,255,.9)}.file-upload-area[data-v-28c77d5e]:hover{border-color:#66087480;background:rgba(255,255,255,.8)}.file-upload-area.drag-over[data-v-28c77d5e]{border-color:#660874cc;background:rgba(102,8,116,.1);transform:scale(1.02)}.file-input[data-v-28c77d5e]{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}.file-upload-placeholder[data-v-28c77d5e]{display:flex;flex-direction:column;align-items:center;gap:8px}.upload-icon[data-v-28c77d5e]{font-size:24px}.upload-text[data-v-28c77d5e]{font-size:16px;font-weight:500;color:#000}.upload-hint[data-v-28c77d5e]{font-size:14px;color:#333}.file-info[data-v-28c77d5e]{margin-top:20px;padding:16px;background:rgba(255,255,255,.9);border-radius:12px;border:1px solid rgba(102,8,116,.15);box-shadow:0 2px 8px #0000000d}.file-details[data-v-28c77d5e]{display:flex;align-items:center;justify-content:space-between;gap:12px}.file-info-left[data-v-28c77d5e]{display:flex;flex-direction:column;gap:4px;flex:1}.file-name[data-v-28c77d5e]{font-weight:600;color:#37352f;font-size:16px;line-height:1.4}.file-size[data-v-28c77d5e]{color:#6b7280;font-size:13px;font-weight:500}.btn-remove[data-v-28c77d5e]{background:linear-gradient(135deg,#ff6b6b 0%,#ee5a52 100%);color:#fff;border:none;border-radius:8px;padding:8px;cursor:pointer;transition:all .3s ease;display:flex;align-items:center;justify-content:center;min-width:32px;height:32px;box-shadow:0 2px 4px #ff6b6b4d}.btn-remove[data-v-28c77d5e]:hover{background:linear-gradient(135deg,#ff5252 0%,#d32f2f 100%);transform:translateY(-1px);box-shadow:0 4px 8px #ff6b6b66}.btn-remove[data-v-28c77d5e]:active{transform:translateY(0);box-shadow:0 2px 4px #ff6b6b4d}.file-action-buttons[data-v-28c77d5e]{margin-top:20px;padding-top:20px;border-top:1px solid rgba(102,8,116,.1)}.btn-test[data-v-28c77d5e]:hover{background:#E64A19;transform:translateY(-2px)}.btn-save[data-v-28c77d5e]{background:#660874;color:#fff}.btn-save[data-v-28c77d5e]:hover{background:#5a0666;transform:translateY(-2px)}button[data-v-28c77d5e]:disabled{opacity:.6;cursor:not-allowed;transform:none!important}.result-container[data-v-28c77d5e]{background:rgba(255,255,255,.8);border-radius:8px;padding:18px;margin-top:15px;border:1px solid rgba(102,8,116,.1)}.markdown-result[data-v-28c77d5e]{background:rgba(255,255,255,.95);border:1px solid rgba(102,8,116,.15);border-radius:8px;padding:15px;margin:0 0 20px;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:14px;line-height:1.5;color:#333;overflow-x:auto;white-space:pre-wrap;word-break:break-word;max-height:300px;overflow-y:auto;resize:vertical}.json-result[data-v-28c77d5e]{background:rgba(102,8,116,.1);border-radius:6px;padding:15px;margin:0 0 20px;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:14px;color:#37352f;overflow-x:auto;white-space:pre-wrap;word-break:break-all;max-height:200px;overflow-y:auto}.history-list[data-v-28c77d5e]{max-height:200px;overflow-y:auto;overflow-x:hidden}.history-item[data-v-28c77d5e]{background:rgba(255,255,255,.8);border-radius:8px;padding:12px;margin-bottom:8px;cursor:pointer;transition:all .3s ease;border:1px solid rgba(102,8,116,.1);overflow:hidden;word-wrap:break-word;word-break:break-word}.history-item[data-v-28c77d5e]:hover{background:rgba(255,255,255,.95);transform:translate(5px);box-shadow:0 4px 16px #0000001a}.history-title[data-v-28c77d5e]{font-weight:500;margin-bottom:6px;font-size:16px;color:#37352f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-time[data-v-28c77d5e]{font-size:14px;color:#6b7280;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.processing-status[data-v-28c77d5e]{display:flex;align-items:center;gap:8px;padding:15px;background:rgba(102,8,116,.1);border:1px solid rgba(102,8,116,.3);border-radius:8px;margin:20px 0;color:#660874;font-size:16px}.spinner[data-v-28c77d5e]{width:20px;height:20px;border:2px solid #f3f3f3;border-top:2px solid #660874;border-radius:50%;animation:spin-28c77d5e 1s linear infinite}@keyframes spin-28c77d5e{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.btn-preview[data-v-28c77d5e]:disabled{opacity:.6;cursor:not-allowed;background:rgba(255,255,255,.2)}.sidebar-content[data-v-28c77d5e]::-webkit-scrollbar,.json-result[data-v-28c77d5e]::-webkit-scrollbar,.history-list[data-v-28c77d5e]::-webkit-scrollbar{width:6px}.sidebar-content[data-v-28c77d5e]::-webkit-scrollbar-track,.json-result[data-v-28c77d5e]::-webkit-scrollbar-track,.history-list[data-v-28c77d5e]::-webkit-scrollbar-track{background:rgba(102,8,116,.1);border-radius:3px}.sidebar-content[data-v-28c77d5e]::-webkit-scrollbar-thumb,.json-result[data-v-28c77d5e]::-webkit-scrollbar-thumb,.history-list[data-v-28c77d5e]::-webkit-scrollbar-thumb{background:rgba(102,8,116,.3);border-radius:3px}.sidebar-content[data-v-28c77d5e]::-webkit-scrollbar-thumb:hover,.json-result[data-v-28c77d5e]::-webkit-scrollbar-thumb:hover,.history-list[data-v-28c77d5e]::-webkit-scrollbar-thumb:hover{background:rgba(102,8,116,.5)}@media (max-width: 768px){.ai-sidebar[data-v-28c77d5e]{width:300px}.sidebar-content[data-v-28c77d5e],.section[data-v-28c77d5e]{padding:15px}.button-group[data-v-28c77d5e]{flex-direction:column}.btn-primary[data-v-28c77d5e],.btn-secondary[data-v-28c77d5e],.btn-clear[data-v-28c77d5e],.btn-copy[data-v-28c77d5e],.btn-import[data-v-28c77d5e]{width:100%;justify-content:center}}.markdown-test[data-v-68a00828]{max-width:1200px;margin:0 auto;padding:20px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.test-section[data-v-68a00828]{margin-bottom:30px;padding:20px;border:1px solid #e0e0e0;border-radius:8px;background:#f9f9f9}.markdown-input[data-v-68a00828]{width:100%;padding:12px;border:1px solid #ddd;border-radius:4px;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:14px;line-height:1.5;resize:vertical}.rendered-content[data-v-68a00828]{background:white;padding:20px;border-radius:4px;border:1px solid #ddd;min-height:200px}.test-cases[data-v-68a00828]{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}.test-btn[data-v-68a00828],.test-case-btn[data-v-68a00828]{padding:8px 16px;border:1px solid #007bff;background:white;color:#007bff;border-radius:4px;cursor:pointer;transition:all .2s ease}.test-btn[data-v-68a00828]:hover,.test-case-btn[data-v-68a00828]:hover{background:#007bff;color:#fff}h2[data-v-68a00828],h3[data-v-68a00828]{color:#333;margin-bottom:15px}h2[data-v-68a00828]{border-bottom:2px solid #007bff;padding-bottom:10px}.error[data-v-68a00828]{color:#dc3545;background:#f8d7da;border:1px solid #f5c6cb;padding:10px;border-radius:4px}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:100vh;margin:0;padding:0;display:flex}.main-content{flex:1;margin-left:350px;transition:margin-left .3s ease;width:calc(100% - 350px)}*{margin:0;padding:0;box-sizing:border-box}body{font-family:Avenir,Helvetica,Arial,sans-serif;background:#f5f5f5}.mind-elixir,.mind-elixir .map-container{height:100%;width:100%}.test-mode-toggle{position:fixed;top:20px;right:20px;z-index:1000}.test-btn{padding:10px 20px;background:#007bff;color:#fff;border:none;border-radius:6px;cursor:pointer;font-size:14px;font-weight:500;box-shadow:0 2px 8px #007bff4d;transition:all .2s ease}.test-btn:hover{background:#0056b3;transform:translateY(-1px);box-shadow:0 4px 12px #007bff66}.test-mode{height:100vh;overflow:auto} +.map-container{-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:hidden;font-size:15px;outline:none;touch-action:none;background-color:var(--bgcolor)}.map-container *{box-sizing:border-box}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{outline:2px solid var(--selected);outline-offset:1px}.map-container .hyper-link{text-decoration:none;margin-left:.3em}.map-container me-main>me-wrapper>me-parent>me-epd{top:50%;transform:translateY(-50%)}.map-container me-epd{top:100%;transform:translateY(-50%)}.map-container .lhs{direction:rtl}.map-container .lhs>me-wrapper>me-parent>me-epd{left:-10px}.map-container .lhs me-epd{left:5px}.map-container .lhs me-tpc{direction:ltr}.map-container .rhs>me-wrapper>me-parent>me-epd{right:-10px}.map-container .rhs me-epd{right:5px}.map-container .map-canvas{position:relative;-webkit-user-select:none;user-select:none;width:fit-content;transform:scale(1)}.map-container .map-canvas me-nodes{position:relative;display:flex;justify-content:center;align-items:center;height:max-content;width:max-content;padding:var(--map-padding)}.map-container me-main>me-wrapper{position:relative;margin:var(--main-gap-y) var(--main-gap-x)}.map-container me-main>me-wrapper>me-parent{margin:10px;padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px 25px}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-root{position:relative;margin:45px 0;z-index:10}.map-container me-root me-tpc{font-size:25px;color:var(--root-color);padding:10px 30px;border-radius:var(--root-radius);border:var(--root-border-color) 2px solid;background-color:var(--root-bgcolor)}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--node-gap-x);margin-top:var(--node-gap-y);z-index:10}.map-container me-parent me-tpc{position:relative;border-radius:3px;color:var(--color);padding:var(--topic-padding)}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7;border-radius:3px}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzMzMzIDMyIDMyIDMyaDEzOC42NjY2NjdWNjgyLjY2NjY2N2MwIDE3LjA2NjY2NyAxNC45MzMzMzMgMzIgMzIgMzJzMzItMTQuOTMzMzMzIDMyLTMydi0xMzguNjY2NjY3SDY4Mi42NjY2NjdjMTcuMDY2NjY3IDAgMzItMTQuOTMzMzMzIDMyLTMycy0xNC45MzMzMzMtMzItMzItMzJ6Ij48L3BhdGg+Cjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NTU2NDk4NSIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNTQ0SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyLTE0LjkzMzMzMy0zMi0zMnMxNC45MzMzMzMtMzIgMzItMzJoMzQxLjMzMzMzNGMxNy4wNjY2NjcgMCAzMiAxNC45MzMzMzMgMzIgMzJzLTE0LjkzMzMzMyAzMi0zMiAzMnoiPjwvcGF0aD4KPC9zdmc+)!important;transition:opacity .3s;opacity:0}@media (hover: hover){.map-container me-parent me-epd.minus:hover{opacity:.8}}@media (hover: none){.map-container me-parent me-epd.minus{opacity:.8}}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary{pointer-events:none;z-index:20}.map-container .summary>g,.map-container .topiclinks>g{cursor:pointer;pointer-events:stroke;z-index:20}.map-container .lines,.map-container .subLines{pointer-events:none}.map-container #input-box{position:absolute;top:0;left:0;width:max-content;max-width:35em;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:auto;color:var(--color);background-color:var(--bgcolor);z-index:100}.map-container me-tpc{display:flex!important;max-width:35em;white-space:pre-wrap;pointer-events:all;text-align:left!important;flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;box-sizing:border-box!important;min-height:2em!important;overflow:hidden!important;position:relative!important;contain:layout style!important}.map-container me-tpc .text{text-align:left!important}.map-container me-tpc ul,.map-container me-tpc ol{text-align:left!important;padding-left:20px!important;list-style-position:outside!important}.map-container me-tpc li{text-align:left!important;list-style-position:outside!important}.map-container me-tpc p,.map-container me-tpc span,.map-container me-tpc div,.map-container me-tpc strong,.map-container me-tpc em{text-align:left!important}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a,.map-container me-tpc>iframe{pointer-events:auto}.map-container me-tpc>.text{display:block!important;width:100%!important;margin:0 auto!important;word-wrap:break-word!important;word-break:break-word!important;line-height:1.4!important}.map-container me-tpc>.text a{pointer-events:auto}.map-container me-tpc>img{display:block!important;margin:0 auto 8px!important;object-fit:cover;max-width:200px!important;max-height:150px!important;width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;background-color:#f5f5f5!important;border:1px solid #ddd!important}.map-container me-tpc img{max-width:200px!important;max-height:150px!important;width:auto!important;height:auto!important;margin:0 auto!important;min-width:0!important;min-height:0!important}.map-container me-tpc img[src=""],.map-container me-tpc img[src*=undefined],.map-container me-tpc img[src*=null]{display:none!important}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;z-index:50;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 4px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-left:5px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.map-container .markdown-table{border-collapse:collapse;width:100%;margin:4px 0;font-size:11px;border:1px solid #e0e0e0;border-radius:6px;box-shadow:0 2px 8px #00000014;background-color:#fafafa;overflow:hidden;white-space:normal!important}.map-container .markdown-table th,.map-container .markdown-table td{border:1px solid #e0e0e0;padding:8px 12px;text-align:left;vertical-align:top;position:relative;white-space:normal!important}.map-container .markdown-table th{background-color:#f5f5f5;font-weight:600;color:#333;text-align:center;border-bottom:1px solid #d0d0d0}.map-container .markdown-table td{background-color:#fff}.map-container .markdown-table tr:nth-child(2n) td{background-color:#f8f8f8}.map-container .markdown-table tr:hover td{background-color:#f0f8ff}.map-container .markdown-table th:not(:last-child),.map-container .markdown-table td:not(:last-child){border-right:1px solid #e0e0e0}.map-container .markdown-table tr:not(:last-child) td{border-bottom:1px solid #e0e0e0}.map-container .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.map-container .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;color:var(--panel-color);box-shadow:0 12px 15px #0003;border-radius:5px;overflow:hidden}.map-container .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:6px 10px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color);cursor:pointer}.map-container .context-menu .menu-list li span{line-height:20px}.map-container .context-menu .menu-list li a{color:#333;text-decoration:none}.map-container .context-menu .menu-list li.disabled{display:none}.map-container .context-menu .menu-list li:hover{filter:brightness(.95)}.map-container .context-menu .menu-list li:last-child{border-bottom:0}.map-container .context-menu .menu-list li span:last-child{float:right}.map-container .context-menu .key{font-size:10px;background-color:#f1f1f1;color:#333;padding:2px 5px;border-radius:3px}.map-container .tips{position:absolute;bottom:28px;left:50%;transform:translate(-50%);color:var(--panel-color);background:var(--panel-bgcolor);opacity:.8;padding:5px 10px;border-radius:5px;font-weight:700}.mind-elixir-toolbar{position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:8px;border-radius:6px;box-shadow:0 2px 8px #00000026}.mind-elixir-toolbar svg{display:inline-block;width:18px!important;height:18px!important;max-width:18px!important;max-height:18px!important;min-width:18px!important;min-height:18px!important;vertical-align:middle;flex-shrink:0}.mind-elixir-toolbar span{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;min-height:36px;max-width:36px;max-height:36px;border-radius:6px;transition:background-color .2s ease;flex-shrink:0}.mind-elixir-toolbar span:hover{background-color:#0000000d}.mind-elixir-toolbar span:active{opacity:.7;background-color:#0000001a}.mind-elixir-toolbar.rb{right:15px;bottom:15px}.mind-elixir-toolbar.rb span+span{margin-left:8px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-0cdd387c.woff2) format("woff2"),url(/assets/KaTeX_AMS-Regular-30da91e8.woff) format("woff"),url(/assets/KaTeX_AMS-Regular-68534840.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-de7701e4.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-1ae6bd74.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Bold-07d8e303.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-5d53e70a.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-3398dd02.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Regular-ed0b7437.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-74444efd.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Bold-9be7ceb8.woff) format("woff"),url(/assets/KaTeX_Fraktur-Bold-9163df9c.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-51814d27.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Regular-5e28753b.woff) format("woff"),url(/assets/KaTeX_Fraktur-Regular-1e6f9579.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-0f60d1b8.woff2) format("woff2"),url(/assets/KaTeX_Main-Bold-c76c5d69.woff) format("woff"),url(/assets/KaTeX_Main-Bold-138ac28d.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-99cd42a3.woff2) format("woff2"),url(/assets/KaTeX_Main-BoldItalic-a6f7ec0d.woff) format("woff"),url(/assets/KaTeX_Main-BoldItalic-70ee1f64.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-97479ca6.woff2) format("woff2"),url(/assets/KaTeX_Main-Italic-f1d6ef86.woff) format("woff"),url(/assets/KaTeX_Main-Italic-0d85ae7c.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-c2342cd8.woff2) format("woff2"),url(/assets/KaTeX_Main-Regular-c6368d87.woff) format("woff"),url(/assets/KaTeX_Main-Regular-d0332f52.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-dc47344d.woff2) format("woff2"),url(/assets/KaTeX_Math-BoldItalic-850c0af5.woff) format("woff"),url(/assets/KaTeX_Math-BoldItalic-f9377ab0.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-7af58c5e.woff2) format("woff2"),url(/assets/KaTeX_Math-Italic-8a8d2445.woff) format("woff"),url(/assets/KaTeX_Math-Italic-08ce98e5.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-e99ae511.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Bold-ece03cfd.woff) format("woff"),url(/assets/KaTeX_SansSerif-Bold-1ece03f7.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-00b26ac8.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Italic-91ee6750.woff) format("woff"),url(/assets/KaTeX_SansSerif-Italic-3931dd81.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-68e8c73e.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Regular-11e4dc8a.woff) format("woff"),url(/assets/KaTeX_SansSerif-Regular-f36ea897.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-036d4e95.woff2) format("woff2"),url(/assets/KaTeX_Script-Regular-d96cdf2b.woff) format("woff"),url(/assets/KaTeX_Script-Regular-1c67f068.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-6b47c401.woff2) format("woff2"),url(/assets/KaTeX_Size1-Regular-c943cc98.woff) format("woff"),url(/assets/KaTeX_Size1-Regular-95b6d2f1.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-d04c5421.woff2) format("woff2"),url(/assets/KaTeX_Size2-Regular-2014c523.woff) format("woff"),url(/assets/KaTeX_Size2-Regular-a6b2099f.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/assets/KaTeX_Size3-Regular-6ab6b62e.woff) format("woff"),url(/assets/KaTeX_Size3-Regular-500e04d5.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-a4af7d41.woff2) format("woff2"),url(/assets/KaTeX_Size4-Regular-99f9c675.woff) format("woff"),url(/assets/KaTeX_Size4-Regular-c647367d.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-71d517d6.woff2) format("woff2"),url(/assets/KaTeX_Typewriter-Regular-e14fed02.woff) format("woff"),url(/assets/KaTeX_Typewriter-Regular-f01f3e87.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.22"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}.mindmap-container[data-v-c91e9bec]{height:100vh;width:100%;position:relative;background:white;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;overflow:visible}.save-controls[data-v-c91e9bec]{position:absolute;bottom:20px;right:20px;z-index:1000;display:flex;gap:12px}.save-btn[data-v-c91e9bec]{display:flex;align-items:center;gap:8px;padding:12px 20px;background:#660874;color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:all .3s ease;box-shadow:0 4px 12px #6608744d}.save-btn[data-v-c91e9bec]:hover{background:#5a0666;transform:translateY(-2px);box-shadow:0 6px 16px #66087466}.save-btn[data-v-c91e9bec]:active{transform:translateY(0);box-shadow:0 2px 8px #6608744d}.save-btn svg[data-v-c91e9bec]{width:16px;height:16px;stroke:currentColor;stroke-width:2;fill:none}.refresh-btn[data-v-c91e9bec]{display:flex;align-items:center;gap:8px;padding:12px 20px;background:#28a745;color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:all .3s ease;box-shadow:0 4px 12px #28a7454d}.refresh-btn[data-v-c91e9bec]:hover{background:#218838;transform:translateY(-2px);box-shadow:0 6px 16px #28a74566}.refresh-btn[data-v-c91e9bec]:active{transform:translateY(0);box-shadow:0 2px 8px #28a7454d}.refresh-btn svg[data-v-c91e9bec]{width:16px;height:16px;stroke:currentColor;stroke-width:2;fill:none}.mindmap-el[data-v-c91e9bec]{height:100%;width:100%;background:white;border:none;outline:none;overflow:visible;position:relative}.welcome-page[data-v-c91e9bec]{height:100vh;width:100%;margin-left:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#f8f9fa 0%,#e9ecef 100%);color:#37352f;position:relative;z-index:999;transition:all .4s cubic-bezier(.4,0,.2,1);border-left:none}.welcome-page.ai-sidebar-collapsed[data-v-c91e9bec]{width:100%;margin-left:0}.welcome-content[data-v-c91e9bec]{text-align:center;max-width:800px;padding:40px;background:white;border-radius:20px;border:2px solid #660874;box-shadow:0 8px 32px #00000026;position:relative;z-index:1001;margin-left:100px;transition:all .4s cubic-bezier(.4,0,.2,1)}.welcome-content.ai-sidebar-collapsed[data-v-c91e9bec]{margin-left:0}.welcome-header h1[data-v-c91e9bec]{font-size:3rem;margin:0 0 20px;font-weight:700;color:#37352f;text-shadow:none}.welcome-subtitle[data-v-c91e9bec]{font-size:1.2rem;margin:0 0 40px;color:#6b7280;font-weight:300}.welcome-features[data-v-c91e9bec]{display:flex;flex-direction:column;gap:30px;margin:40px 0;align-items:center}.feature-item[data-v-c91e9bec]{display:flex;align-items:center;gap:20px;padding:20px;background:rgba(255,255,255,.8);border-radius:15px;border:1px solid rgba(102,8,116,.1);transition:all .3s ease;box-shadow:0 4px 20px #00000014;width:100%;max-width:500px;justify-content:flex-start}.feature-item[data-v-c91e9bec]:hover{transform:translateY(-5px);background:rgba(255,255,255,.95);box-shadow:0 8px 32px #0000001f}.feature-icon[data-v-c91e9bec]{font-size:2.5rem;min-width:60px;color:#660874;display:flex;align-items:center;justify-content:center;flex-shrink:0}.feature-text[data-v-c91e9bec]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.feature-text h3[data-v-c91e9bec]{margin:0 0 10px;font-size:1.3rem;font-weight:600;color:#37352f;text-align:center}.feature-text p[data-v-c91e9bec]{margin:0;color:#6b7280;line-height:1.5;text-align:center}.welcome-tips[data-v-c91e9bec]{margin-top:30px;padding:20px;background:rgba(255,255,255,.8);border-radius:15px;border:1px solid rgba(102,8,116,.1);box-shadow:0 4px 20px #00000014}.welcome-tips p[data-v-c91e9bec]{margin:0;color:#6b7280;font-size:1rem}[data-v-c91e9bec] .mind-elixir{height:100%;width:100%;position:relative;overflow:hidden;background:transparent;border:none;outline:none}[data-v-c91e9bec] .mind-elixir .map-container{height:100%;width:100%;position:relative}[data-v-c91e9bec] .mind-elixir .map-canvas{transition:none}[data-v-c91e9bec] .map-container .topic{background:#ffffff!important;border:2px solid #e0e0e0!important;border-radius:8px!important;padding:12px 16px!important;box-shadow:0 2px 8px #0000001a!important;transition:all .3s ease!important;cursor:pointer!important;min-width:120px!important;max-width:300px!important;text-align:center!important;font-size:14px!important;font-weight:500!important;color:#333!important;position:relative!important}[data-v-c91e9bec] .map-container .topic:hover{border-color:#007bff!important;box-shadow:0 4px 12px #007bff33!important;transform:translateY(-2px)!important}[data-v-c91e9bec] .map-container .topic.selected{border-color:#007bff!important;background:#f8f9ff!important;box-shadow:0 4px 12px #007bff4d!important}.context-menu[data-v-c91e9bec]{position:absolute;background:rgba(255,255,255,.95);border-radius:12px;padding:8px;box-shadow:0 8px 24px #00000026;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(0,0,0,.1);z-index:1000;display:flex;flex-direction:row;gap:4px;align-items:center;min-width:auto;white-space:nowrap;animation:menuFadeIn-c91e9bec .2s ease;transform:translate(-50%)}@keyframes menuFadeIn-c91e9bec{0%{opacity:0;transform:translate(-50%) translateY(-10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.context-menu-item[data-v-c91e9bec]{width:36px;height:36px;border:none;border-radius:8px;background:transparent;color:#666;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease;position:relative}.context-menu-item[data-v-c91e9bec]:hover{background:rgba(0,0,0,.05);color:#333;transform:scale(1.05)}.context-menu-item.delete[data-v-c91e9bec]:hover{background:rgba(220,53,69,.1);color:#dc3545}.context-menu-item.ask-ai[data-v-c91e9bec]{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff;border:2px solid #5a67d8;box-shadow:0 2px 8px #667eea4d;position:relative}.context-menu-item.ask-ai[data-v-c91e9bec]:hover{background:linear-gradient(135deg,#5a67d8 0%,#667eea 100%);color:#fff;transform:translateY(-1px);box-shadow:0 4px 12px #667eea66}.context-menu-item.ask-ai svg[data-v-c91e9bec]{filter:drop-shadow(0 1px 2px rgba(0,0,0,.2))}.context-menu-item svg[data-v-c91e9bec]{width:16px;height:16px}.context-menu-item[data-v-c91e9bec]:after{content:attr(title);position:absolute;bottom:-30px;left:50%;transform:translate(-50%);background:rgba(0,0,0,.8);color:#fff;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;opacity:0;visibility:hidden;transition:all .2s ease;z-index:1001;pointer-events:none}.context-menu-item[data-v-c91e9bec]:hover:after{opacity:1;visibility:visible}.context-menu-item[data-v-c91e9bec]:before{content:"";position:absolute;bottom:-8px;left:50%;transform:translate(-50%);border:4px solid transparent;border-top-color:#000c;opacity:0;visibility:hidden;transition:all .2s ease;pointer-events:none}.context-menu-item[data-v-c91e9bec]:hover:before{opacity:1;visibility:visible}.ai-input-area[data-v-c91e9bec]{position:absolute;width:300px;background:white;border-radius:12px;box-shadow:0 8px 32px #0000001f;z-index:1001;animation:slideInDown-c91e9bec .3s ease}@keyframes slideInDown-c91e9bec{0%{opacity:0;transform:translate(-50%) translateY(-10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.ai-input-header[data-v-c91e9bec]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e9ecef;background:#f8f9fa;border-radius:12px 12px 0 0}.ai-input-title[data-v-c91e9bec]{font-size:16px;font-weight:600;color:#2c3e50}.ai-close-btn[data-v-c91e9bec]{background:none;border:none;cursor:pointer;padding:4px 8px;border-radius:6px;color:#6c757d;font-size:18px;line-height:1;transition:all .2s ease}.ai-close-btn[data-v-c91e9bec]:hover{background:#e9ecef;color:#495057}.ai-input-content[data-v-c91e9bec]{padding:20px}.ai-input-content textarea[data-v-c91e9bec]{width:100%;padding:12px;border:2px solid #e9ecef;border-radius:8px;font-size:14px;line-height:1.5;resize:none;transition:border-color .2s ease;font-family:inherit;margin-bottom:16px;box-sizing:border-box}.ai-input-content textarea[data-v-c91e9bec]:focus{outline:none;border-color:#007bff;box-shadow:0 0 0 3px #007bff1a}.ai-input-content textarea[data-v-c91e9bec]:disabled{background:#f8f9fa;color:#6c757d;cursor:not-allowed}.ai-input-actions[data-v-c91e9bec]{display:flex;justify-content:center;align-items:center;gap:8px}.btn-cancel[data-v-c91e9bec],.btn-submit[data-v-c91e9bec]{padding:8px 16px;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;transition:all .2s ease;border:none}.btn-cancel[data-v-c91e9bec]{background:#6c757d;color:#fff}.btn-cancel[data-v-c91e9bec]:hover:not(:disabled){background:#5a6268}.btn-submit[data-v-c91e9bec]{background:#007bff;color:#fff}.btn-submit[data-v-c91e9bec]:hover:not(:disabled){background:#0056b3;transform:translateY(-1px)}.btn-cancel[data-v-c91e9bec]:disabled,.btn-submit[data-v-c91e9bec]:disabled{opacity:.6;cursor:not-allowed}@media (max-width: 768px){.context-menu[data-v-c91e9bec]{padding:6px;gap:3px}.context-menu-item[data-v-c91e9bec]{width:32px;height:32px}.context-menu-item svg[data-v-c91e9bec]{width:14px;height:14px}}.node-description[data-v-c91e9bec]{font-size:11px;color:#666;margin-top:6px;padding:6px 8px;background:rgba(0,0,0,.03);border-radius:4px;max-width:250px;word-wrap:break-word;line-height:1.3;border-left:3px solid #e0e0e0;display:block}.topic[data-v-c91e9bec]{min-width:150px;max-width:400px;padding:8px 12px;border-radius:8px;background:white!important;box-shadow:0 2px 8px #0000001a!important;border:1px solid #e0e0e0!important;margin:4px!important}.topic.root[data-v-c91e9bec],.topic.main[data-v-c91e9bec],.topic.sub[data-v-c91e9bec]{background:white!important;box-shadow:0 2px 8px #0000001a!important;border:1px solid #e0e0e0!important}.topic[data-v-c91e9bec]{background:white!important;box-shadow:0 2px 8px #0000001a!important;border:1px solid #e0e0e0!important;border-radius:8px!important;padding:8px 12px!important;min-width:150px!important;max-width:400px!important;margin:4px!important;position:relative!important}.tpc-line[data-v-c91e9bec]{position:absolute!important;z-index:1!important}.tpc-line.tpc-line-left[data-v-c91e9bec]{right:100%!important;top:50%!important;transform:translateY(-50%)!important}.tpc-line.tpc-line-right[data-v-c91e9bec]{left:100%!important;top:50%!important;transform:translateY(-50%)!important}.tpc-line.tpc-line-top[data-v-c91e9bec]{bottom:100%!important;left:50%!important;transform:translate(-50%)!important}.tpc-line.tpc-line-bottom[data-v-c91e9bec]{top:100%!important;left:50%!important;transform:translate(-50%)!important}.topic[data-v-c91e9bec]:before{display:none!important}.topic[data-v-c91e9bec]:after{display:none!important}.topic[style*="border-radius: 50%"][data-v-c91e9bec]{border-radius:8px!important;background:white!important;box-shadow:0 2px 8px #0000001a!important;border:1px solid #e0e0e0!important}.topic[data-v-c91e9bec]:not(:has(.children)){background:white!important;box-shadow:0 2px 8px #0000001a!important;border:1px solid #e0e0e0!important;border-radius:8px!important}.topic[style][data-v-c91e9bec]{background:white!important;box-shadow:0 2px 8px #0000001a!important;border:1px solid #e0e0e0!important;border-radius:8px!important;padding:8px 12px!important;min-width:150px!important;max-width:400px!important;margin:4px!important}.topic .topic-text[data-v-c91e9bec]{font-weight:500;color:#333;margin-bottom:4px;line-height:1.4}.topic .topic-text.markdown-content[data-v-c91e9bec]{font-size:12px;line-height:1.3}.topic table[data-v-c91e9bec],.topic .text table[data-v-c91e9bec],.topic .topic-text table[data-v-c91e9bec],.topic .topic-text.markdown-content table[data-v-c91e9bec]{border-collapse:collapse!important;width:100%!important;margin:4px 0!important;font-size:11px!important;border:2px solid #333!important;border-radius:6px!important;box-shadow:0 2px 8px #00000014!important;background-color:#fafafa!important;overflow:hidden!important;display:table!important;white-space:normal!important}.topic table th[data-v-c91e9bec],.topic table td[data-v-c91e9bec],.topic .text table th[data-v-c91e9bec],.topic .text table td[data-v-c91e9bec],.topic .topic-text table th[data-v-c91e9bec],.topic .topic-text table td[data-v-c91e9bec],.topic .topic-text.markdown-content table th[data-v-c91e9bec],.topic .topic-text.markdown-content table td[data-v-c91e9bec]{border:2px solid #333!important;padding:6px 8px!important;text-align:left!important;vertical-align:top!important;display:table-cell!important;position:relative!important;white-space:normal!important}.topic .topic-text.markdown-content table th[data-v-c91e9bec],.topic .text table th[data-v-c91e9bec],.topic table th[data-v-c91e9bec]{background-color:#f5f5f5!important;font-weight:600!important;color:#333!important;text-align:center!important;border-bottom:2px solid #333!important}.topic .topic-text.markdown-content table td[data-v-c91e9bec],.topic .text table td[data-v-c91e9bec],.topic table td[data-v-c91e9bec]{background-color:#fff!important}.topic .topic-text.markdown-content table tr[data-v-c91e9bec],.topic .text table tr[data-v-c91e9bec],.topic table tr[data-v-c91e9bec]{display:table-row!important;white-space:normal!important}.topic .topic-text.markdown-content table tr:nth-child(2n) td[data-v-c91e9bec],.topic .text table tr:nth-child(2n) td[data-v-c91e9bec]{background-color:#f8f8f8!important}.topic .topic-text.markdown-content table tr:hover td[data-v-c91e9bec],.topic .text table tr:hover td[data-v-c91e9bec]{background-color:#f0f8ff!important}.topic .topic-text.markdown-content table th[data-v-c91e9bec]:not(:last-child),.topic .topic-text.markdown-content table td[data-v-c91e9bec]:not(:last-child),.topic .text table th[data-v-c91e9bec]:not(:last-child),.topic .text table td[data-v-c91e9bec]:not(:last-child){border-right:1px solid #e0e0e0!important}.topic .topic-text.markdown-content table tr:not(:last-child) td[data-v-c91e9bec],.topic .text table tr:not(:last-child) td[data-v-c91e9bec]{border-bottom:1px solid #e0e0e0!important}.topic .topic-text.markdown-content code[data-v-c91e9bec]{background-color:#f4f4f4;padding:1px 3px;border-radius:2px;font-family:Courier New,monospace;font-size:10px}.topic .topic-text.markdown-content pre[data-v-c91e9bec]{background-color:#f4f4f4;padding:4px;border-radius:3px;overflow-x:auto;font-size:10px}.topic .topic-text.markdown-content ul[data-v-c91e9bec],.topic .topic-text.markdown-content ol[data-v-c91e9bec]{margin:2px 0;padding-left:12px}.topic .topic-text.markdown-content li[data-v-c91e9bec]{margin:1px 0;font-size:11px}.topic .topic-text.markdown-content strong[data-v-c91e9bec]{font-weight:600}.topic .topic-text.markdown-content em[data-v-c91e9bec]{font-style:italic}.topic h1[data-v-c91e9bec],.topic h2[data-v-c91e9bec],.topic h3[data-v-c91e9bec],.topic h4[data-v-c91e9bec],.topic h5[data-v-c91e9bec],.topic h6[data-v-c91e9bec]{margin:4px 0;font-weight:600;color:#333}.topic p[data-v-c91e9bec]{margin:2px 0;line-height:1.3;color:#666}.topic ul[data-v-c91e9bec],.topic ol[data-v-c91e9bec]{margin:2px 0;padding-left:16px}.topic li[data-v-c91e9bec]{margin:1px 0;line-height:1.3;color:#666}.topic strong[data-v-c91e9bec],.topic b[data-v-c91e9bec]{font-weight:600;color:#333}.topic em[data-v-c91e9bec],.topic i[data-v-c91e9bec]{font-style:italic;color:#555}.topic code[data-v-c91e9bec]{background:#f5f5f5;padding:1px 3px;border-radius:3px;font-family:monospace;font-size:.9em}.topic-content[data-v-c91e9bec]{display:flex;flex-direction:column;align-items:center}.map-container me-tpc img[data-v-c91e9bec],.map-container me-tpc>img[data-v-c91e9bec]{max-width:200px!important;max-height:150px!important;width:auto!important;height:auto!important;display:block!important;margin-bottom:8px!important;object-fit:cover!important}.image-preview-modal[data-v-c91e9bec]{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.8);display:flex;justify-content:center;align-items:center;z-index:10000;animation:fadeIn-c91e9bec .3s ease}@keyframes fadeIn-c91e9bec{0%{opacity:0}to{opacity:1}}.image-preview-content[data-v-c91e9bec]{background:white;border-radius:8px;max-width:90%;max-height:90%;overflow:hidden;box-shadow:0 4px 20px #0000004d;animation:slideIn-c91e9bec .3s ease}@keyframes slideIn-c91e9bec{0%{transform:translateY(-20px);opacity:0}to{transform:translateY(0);opacity:1}}.image-preview-header[data-v-c91e9bec]{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #e0e0e0;background:#f5f5f5}.image-preview-title[data-v-c91e9bec]{font-size:16px;font-weight:600;color:#333}.image-preview-close[data-v-c91e9bec]{background:none;border:none;font-size:28px;color:#666;cursor:pointer;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all .2s}.image-preview-close[data-v-c91e9bec]:hover{background:#e0e0e0;color:#333}.image-preview-body[data-v-c91e9bec]{padding:20px;display:flex;justify-content:center;align-items:center;min-height:200px;max-height:80vh;overflow:auto}.preview-image[data-v-c91e9bec]{max-width:100%;max-height:75vh;height:auto;object-fit:contain;border-radius:4px}.image-preview-loading[data-v-c91e9bec],.image-preview-error[data-v-c91e9bec]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;color:#666}.loading-spinner[data-v-c91e9bec]{width:40px;height:40px;border:4px solid #f3f3f3;border-top:4px solid #660874;border-radius:50%;animation:spin-c91e9bec 1s linear infinite;margin-bottom:16px}@keyframes spin-c91e9bec{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.image-preview-error p[data-v-c91e9bec]{margin:8px 0;text-align:center}.retry-button[data-v-c91e9bec]{margin-top:16px;padding:8px 16px;background:#660874;color:#fff;border:none;border-radius:4px;cursor:pointer;font-size:14px;transition:background .2s}.retry-button[data-v-c91e9bec]:hover{background:#7d0a8e}.ai-sidebar-wrapper[data-v-28c77d5e]{position:fixed;top:0;left:0;z-index:1000}.ai-sidebar[data-v-28c77d5e]{position:relative;width:420px;height:100vh;background:linear-gradient(135deg,#f8f9fa 0%,#e9ecef 100%);color:#37352f;transition:transform .4s cubic-bezier(.4,0,.2,1);box-shadow:none;overflow:visible}.ai-sidebar[data-v-28c77d5e]:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:radial-gradient(circle at 20% 80%,rgba(102,8,116,.1) 0%,transparent 50%),radial-gradient(circle at 80% 20%,rgba(102,8,116,.1) 0%,transparent 50%),radial-gradient(circle at 40% 40%,rgba(102,8,116,.05) 0%,transparent 50%);pointer-events:none}.sidebar-collapsed[data-v-28c77d5e]{transform:translate(-420px)}.sidebar-toggle[data-v-28c77d5e]{position:fixed;top:20px;width:45px;height:45px;background:#660874;border-radius:0 8px 8px 0;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:2px 0 10px #0003,0 0 20px #6608744d;color:#fff;transition:all .4s cubic-bezier(.4,0,.2,1);font-weight:700;z-index:100000;border:2px solid #660874}.sidebar-toggle[data-v-28c77d5e]:hover{background:#5a0666;transform:scale(1.1);color:#fff;box-shadow:3px 0 15px #00000026;border-color:#5a0666}.sidebar-content[data-v-28c77d5e]{height:100%;overflow-y:auto;padding:20px;position:relative;z-index:10}.sidebar-header[data-v-28c77d5e]{text-align:center;margin-bottom:35px;padding-bottom:25px;border-bottom:1px solid rgba(102,8,116,.1);position:relative;z-index:10}.sidebar-header h3[data-v-28c77d5e]{margin:0 0 15px;font-size:28px;font-weight:600;color:#000}.sidebar-header p[data-v-28c77d5e]{margin:0;color:#333;font-size:16px}.collapse-hint[data-v-28c77d5e]{margin-top:10px;text-align:center}.collapse-hint small[data-v-28c77d5e]{color:#666;font-size:12px;opacity:.8}.section[data-v-28c77d5e]{margin-bottom:35px;background:rgba(255,255,255,.95);border-radius:12px;padding:25px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:2px solid rgba(102,8,116,.2);box-shadow:0 4px 20px #0000001a;position:relative;z-index:10;overflow:hidden}.section h4[data-v-28c77d5e]{margin:0 0 20px;font-size:20px;font-weight:600;display:flex;align-items:center;gap:8px;color:#000}.input-group[data-v-28c77d5e]{margin-bottom:20px}.input-group label[data-v-28c77d5e]{display:block;margin-bottom:10px;font-weight:500;font-size:16px;color:#000}.input-group textarea[data-v-28c77d5e]{width:100%;padding:12px;border:none;border-radius:8px;background:rgba(255,255,255,.9);color:#333;font-size:14px;resize:vertical;min-height:80px;font-family:Monaco,Menlo,Ubuntu Mono,monospace}.input-group textarea[data-v-28c77d5e]:focus{outline:none;box-shadow:0 0 0 2px #ffffff80}.button-group[data-v-28c77d5e]{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}.save-button-group[data-v-28c77d5e]{margin-top:15px}.btn-primary[data-v-28c77d5e],.btn-secondary[data-v-28c77d5e],.btn-clear[data-v-28c77d5e],.btn-copy[data-v-28c77d5e],.btn-import[data-v-28c77d5e],.btn-preview[data-v-28c77d5e],.btn-test[data-v-28c77d5e],.btn-save[data-v-28c77d5e]{padding:12px 18px;border:none;border-radius:8px;font-size:16px;font-weight:500;cursor:pointer;transition:all .3s ease;display:flex;align-items:center;gap:6px}.btn-primary[data-v-28c77d5e]{background:#660874;color:#fff}.btn-primary[data-v-28c77d5e]:hover:not(:disabled){background:#5a0666;transform:translateY(-2px)}.btn-secondary[data-v-28c77d5e]{background:#2196F3;color:#fff}.btn-secondary[data-v-28c77d5e]:hover:not(:disabled){background:#1976D2;transform:translateY(-2px)}.btn-clear[data-v-28c77d5e]{background:#f44336;color:#fff}.btn-clear[data-v-28c77d5e]:hover{background:#d32f2f;transform:translateY(-2px)}.btn-copy[data-v-28c77d5e]{background:#FF9800;color:#fff}.btn-copy[data-v-28c77d5e]:hover{background:#F57C00;transform:translateY(-2px)}.btn-import[data-v-28c77d5e]{background:#9C27B0;color:#fff}.btn-import[data-v-28c77d5e]:hover{background:#7B1FA2;transform:translateY(-2px)}.btn-preview[data-v-28c77d5e]{background:#00BCD4;color:#fff}.btn-preview[data-v-28c77d5e]:hover{background:#0097A7;transform:translateY(-2px)}.btn-test[data-v-28c77d5e]{background:#FF5722;color:#fff}.file-upload-area[data-v-28c77d5e]{position:relative;border:2px dashed rgba(102,8,116,.5);border-radius:8px;padding:20px;text-align:center;transition:all .3s ease;cursor:pointer;background:rgba(255,255,255,.9)}.file-upload-area[data-v-28c77d5e]:hover{border-color:#66087480;background:rgba(255,255,255,.8)}.file-upload-area.drag-over[data-v-28c77d5e]{border-color:#660874cc;background:rgba(102,8,116,.1);transform:scale(1.02)}.file-input[data-v-28c77d5e]{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}.file-upload-placeholder[data-v-28c77d5e]{display:flex;flex-direction:column;align-items:center;gap:8px}.upload-icon[data-v-28c77d5e]{font-size:24px}.upload-text[data-v-28c77d5e]{font-size:16px;font-weight:500;color:#000}.upload-hint[data-v-28c77d5e]{font-size:14px;color:#333}.file-info[data-v-28c77d5e]{margin-top:20px;padding:16px;background:rgba(255,255,255,.9);border-radius:12px;border:1px solid rgba(102,8,116,.15);box-shadow:0 2px 8px #0000000d}.file-details[data-v-28c77d5e]{display:flex;align-items:center;justify-content:space-between;gap:12px}.file-info-left[data-v-28c77d5e]{display:flex;flex-direction:column;gap:4px;flex:1}.file-name[data-v-28c77d5e]{font-weight:600;color:#37352f;font-size:16px;line-height:1.4}.file-size[data-v-28c77d5e]{color:#6b7280;font-size:13px;font-weight:500}.btn-remove[data-v-28c77d5e]{background:linear-gradient(135deg,#ff6b6b 0%,#ee5a52 100%);color:#fff;border:none;border-radius:8px;padding:8px;cursor:pointer;transition:all .3s ease;display:flex;align-items:center;justify-content:center;min-width:32px;height:32px;box-shadow:0 2px 4px #ff6b6b4d}.btn-remove[data-v-28c77d5e]:hover{background:linear-gradient(135deg,#ff5252 0%,#d32f2f 100%);transform:translateY(-1px);box-shadow:0 4px 8px #ff6b6b66}.btn-remove[data-v-28c77d5e]:active{transform:translateY(0);box-shadow:0 2px 4px #ff6b6b4d}.file-action-buttons[data-v-28c77d5e]{margin-top:20px;padding-top:20px;border-top:1px solid rgba(102,8,116,.1)}.btn-test[data-v-28c77d5e]:hover{background:#E64A19;transform:translateY(-2px)}.btn-save[data-v-28c77d5e]{background:#660874;color:#fff}.btn-save[data-v-28c77d5e]:hover{background:#5a0666;transform:translateY(-2px)}button[data-v-28c77d5e]:disabled{opacity:.6;cursor:not-allowed;transform:none!important}.result-container[data-v-28c77d5e]{background:rgba(255,255,255,.8);border-radius:8px;padding:18px;margin-top:15px;border:1px solid rgba(102,8,116,.1)}.markdown-result[data-v-28c77d5e]{background:rgba(255,255,255,.95);border:1px solid rgba(102,8,116,.15);border-radius:8px;padding:15px;margin:0 0 20px;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:14px;line-height:1.5;color:#333;overflow-x:auto;white-space:pre-wrap;word-break:break-word;max-height:300px;overflow-y:auto;resize:vertical}.json-result[data-v-28c77d5e]{background:rgba(102,8,116,.1);border-radius:6px;padding:15px;margin:0 0 20px;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:14px;color:#37352f;overflow-x:auto;white-space:pre-wrap;word-break:break-all;max-height:200px;overflow-y:auto}.history-list[data-v-28c77d5e]{max-height:200px;overflow-y:auto;overflow-x:hidden}.history-item[data-v-28c77d5e]{background:rgba(255,255,255,.8);border-radius:8px;padding:12px;margin-bottom:8px;cursor:pointer;transition:all .3s ease;border:1px solid rgba(102,8,116,.1);overflow:hidden;word-wrap:break-word;word-break:break-word}.history-item[data-v-28c77d5e]:hover{background:rgba(255,255,255,.95);transform:translate(5px);box-shadow:0 4px 16px #0000001a}.history-title[data-v-28c77d5e]{font-weight:500;margin-bottom:6px;font-size:16px;color:#37352f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-time[data-v-28c77d5e]{font-size:14px;color:#6b7280;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.processing-status[data-v-28c77d5e]{display:flex;align-items:center;gap:8px;padding:15px;background:rgba(102,8,116,.1);border:1px solid rgba(102,8,116,.3);border-radius:8px;margin:20px 0;color:#660874;font-size:16px}.spinner[data-v-28c77d5e]{width:20px;height:20px;border:2px solid #f3f3f3;border-top:2px solid #660874;border-radius:50%;animation:spin-28c77d5e 1s linear infinite}@keyframes spin-28c77d5e{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.btn-preview[data-v-28c77d5e]:disabled{opacity:.6;cursor:not-allowed;background:rgba(255,255,255,.2)}.sidebar-content[data-v-28c77d5e]::-webkit-scrollbar,.json-result[data-v-28c77d5e]::-webkit-scrollbar,.history-list[data-v-28c77d5e]::-webkit-scrollbar{width:6px}.sidebar-content[data-v-28c77d5e]::-webkit-scrollbar-track,.json-result[data-v-28c77d5e]::-webkit-scrollbar-track,.history-list[data-v-28c77d5e]::-webkit-scrollbar-track{background:rgba(102,8,116,.1);border-radius:3px}.sidebar-content[data-v-28c77d5e]::-webkit-scrollbar-thumb,.json-result[data-v-28c77d5e]::-webkit-scrollbar-thumb,.history-list[data-v-28c77d5e]::-webkit-scrollbar-thumb{background:rgba(102,8,116,.3);border-radius:3px}.sidebar-content[data-v-28c77d5e]::-webkit-scrollbar-thumb:hover,.json-result[data-v-28c77d5e]::-webkit-scrollbar-thumb:hover,.history-list[data-v-28c77d5e]::-webkit-scrollbar-thumb:hover{background:rgba(102,8,116,.5)}@media (max-width: 768px){.ai-sidebar[data-v-28c77d5e]{width:300px}.sidebar-content[data-v-28c77d5e],.section[data-v-28c77d5e]{padding:15px}.button-group[data-v-28c77d5e]{flex-direction:column}.btn-primary[data-v-28c77d5e],.btn-secondary[data-v-28c77d5e],.btn-clear[data-v-28c77d5e],.btn-copy[data-v-28c77d5e],.btn-import[data-v-28c77d5e]{width:100%;justify-content:center}}.markdown-test[data-v-68a00828]{max-width:1200px;margin:0 auto;padding:20px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.test-section[data-v-68a00828]{margin-bottom:30px;padding:20px;border:1px solid #e0e0e0;border-radius:8px;background:#f9f9f9}.markdown-input[data-v-68a00828]{width:100%;padding:12px;border:1px solid #ddd;border-radius:4px;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:14px;line-height:1.5;resize:vertical}.rendered-content[data-v-68a00828]{background:white;padding:20px;border-radius:4px;border:1px solid #ddd;min-height:200px}.test-cases[data-v-68a00828]{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}.test-btn[data-v-68a00828],.test-case-btn[data-v-68a00828]{padding:8px 16px;border:1px solid #007bff;background:white;color:#007bff;border-radius:4px;cursor:pointer;transition:all .2s ease}.test-btn[data-v-68a00828]:hover,.test-case-btn[data-v-68a00828]:hover{background:#007bff;color:#fff}h2[data-v-68a00828],h3[data-v-68a00828]{color:#333;margin-bottom:15px}h2[data-v-68a00828]{border-bottom:2px solid #007bff;padding-bottom:10px}.error[data-v-68a00828]{color:#dc3545;background:#f8d7da;border:1px solid #f5c6cb;padding:10px;border-radius:4px}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:100vh;margin:0;padding:0;display:flex}.main-content{flex:1;margin-left:350px;transition:margin-left .3s ease;width:calc(100% - 350px)}*{margin:0;padding:0;box-sizing:border-box}body{font-family:Avenir,Helvetica,Arial,sans-serif;background:#f5f5f5}.mind-elixir,.mind-elixir .map-container{height:100%;width:100%}.test-mode-toggle{position:fixed;top:20px;right:20px;z-index:1000}.test-btn{padding:10px 20px;background:#007bff;color:#fff;border:none;border-radius:6px;cursor:pointer;font-size:14px;font-weight:500;box-shadow:0 2px 8px #007bff4d;transition:all .2s ease}.test-btn:hover{background:#0056b3;transform:translateY(-1px);box-shadow:0 4px 12px #007bff66}.test-mode{height:100vh;overflow:auto} diff --git a/frontend/dist/assets/index-bdeaceb2.js b/frontend/dist/assets/index-1fbb466c.js similarity index 99% rename from frontend/dist/assets/index-bdeaceb2.js rename to frontend/dist/assets/index-1fbb466c.js index 1d2c4d7..4d22e5a 100644 --- a/frontend/dist/assets/index-bdeaceb2.js +++ b/frontend/dist/assets/index-1fbb466c.js @@ -1,4 +1,4 @@ -import{g as jl,c as he}from"./index-3d4f89fc.js";function Xl(e,n){for(var t=0;ti[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var en={},la="1.13.7",Wo=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},oi=Array.prototype,fa=Object.prototype,Ro=typeof Symbol<"u"?Symbol.prototype:null,Vl=oi.push,Ft=oi.slice,gt=fa.toString,Hl=fa.hasOwnProperty,Su=typeof ArrayBuffer<"u",$l=typeof DataView<"u",Gl=Array.isArray,No=Object.keys,Oo=Object.create,Io=Su&&ArrayBuffer.isView,Zl=isNaN,Yl=isFinite,Bu=!{toString:null}.propertyIsEnumerable("toString"),Lo=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Kl=Math.pow(2,53)-1;function Ie(e,n){return n=n==null?e.length-1:+n,function(){for(var t=Math.max(arguments.length-n,0),i=Array(t),r=0;r=0&&t<=Kl}}function zu(e){return function(n){return n==null?void 0:n[e]}}const Gt=zu("byteLength"),nf=Pu(Gt);var tf=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function rf(e){return Io?Io(e)&&!mt(e):nf(e)&&tf.test(gt.call(e))}const xa=Su?rf:va(!1),qe=zu("length");function af(e){for(var n={},t=e.length,i=0;i":">",'"':""","'":"'","`":"`"},fs=ds(ls),sf=Ea(ls),hs=ds(sf),ps=ye.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Gi=/(.)^/,df={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},lf=/\\|'|\r|\n|\u2028|\u2029/g;function ff(e){return"\\"+df[e]}var hf=/^\s*(\w|\$)+\s*$/;function gs(e,n,t){!n&&t&&(n=t),n=Ca({},n,ye.templateSettings);var i=RegExp([(n.escape||Gi).source,(n.interpolate||Gi).source,(n.evaluate||Gi).source].join("|")+"|$","g"),r=0,a="__p+='";e.replace(i,function(s,d,g,b,m){return a+=e.slice(r,m).replace(lf,ff),r=m+s.length,d?a+=`'+ +import{g as jl,c as he}from"./index-c91f543d.js";function Xl(e,n){for(var t=0;ti[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var en={},la="1.13.7",Wo=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},oi=Array.prototype,fa=Object.prototype,Ro=typeof Symbol<"u"?Symbol.prototype:null,Vl=oi.push,Ft=oi.slice,gt=fa.toString,Hl=fa.hasOwnProperty,Su=typeof ArrayBuffer<"u",$l=typeof DataView<"u",Gl=Array.isArray,No=Object.keys,Oo=Object.create,Io=Su&&ArrayBuffer.isView,Zl=isNaN,Yl=isFinite,Bu=!{toString:null}.propertyIsEnumerable("toString"),Lo=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Kl=Math.pow(2,53)-1;function Ie(e,n){return n=n==null?e.length-1:+n,function(){for(var t=Math.max(arguments.length-n,0),i=Array(t),r=0;r=0&&t<=Kl}}function zu(e){return function(n){return n==null?void 0:n[e]}}const Gt=zu("byteLength"),nf=Pu(Gt);var tf=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function rf(e){return Io?Io(e)&&!mt(e):nf(e)&&tf.test(gt.call(e))}const xa=Su?rf:va(!1),qe=zu("length");function af(e){for(var n={},t=e.length,i=0;i":">",'"':""","'":"'","`":"`"},fs=ds(ls),sf=Ea(ls),hs=ds(sf),ps=ye.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Gi=/(.)^/,df={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},lf=/\\|'|\r|\n|\u2028|\u2029/g;function ff(e){return"\\"+df[e]}var hf=/^\s*(\w|\$)+\s*$/;function gs(e,n,t){!n&&t&&(n=t),n=Ca({},n,ye.templateSettings);var i=RegExp([(n.escape||Gi).source,(n.interpolate||Gi).source,(n.evaluate||Gi).source].join("|")+"|$","g"),r=0,a="__p+='";e.replace(i,function(s,d,g,b,m){return a+=e.slice(r,m).replace(lf,ff),r=m+s.length,d?a+=`'+ ((__t=(`+d+`))==null?'':_.escape(__t))+ '`:g?a+=`'+ ((__t=(`+g+`))==null?'':__t)+ diff --git a/frontend/dist/assets/index-3d4f89fc.js b/frontend/dist/assets/index-3d4f89fc.js deleted file mode 100644 index 3b7ac2e..0000000 --- a/frontend/dist/assets/index-3d4f89fc.js +++ /dev/null @@ -1,792 +0,0 @@ -var $d=Object.defineProperty;var Fd=(t,e,r)=>e in t?$d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var We=(t,e,r)=>(Fd(t,typeof e!="symbol"?e+"":e,r),r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();/** -* @vue/shared v3.5.20 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function ka(t){const e=Object.create(null);for(const r of t.split(","))e[r]=1;return r=>r in e}const Ke={},Nn=[],rr=()=>{},_c=()=>!1,Oi=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Ta=t=>t.startsWith("onUpdate:"),xt=Object.assign,Ea=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},Bd=Object.prototype.hasOwnProperty,Be=(t,e)=>Bd.call(t,e),Ce=Array.isArray,Dn=t=>_i(t)==="[object Map]",Lc=t=>_i(t)==="[object Set]",Ne=t=>typeof t=="function",dt=t=>typeof t=="string",en=t=>typeof t=="symbol",st=t=>t!==null&&typeof t=="object",zc=t=>(st(t)||Ne(t))&&Ne(t.then)&&Ne(t.catch),$c=Object.prototype.toString,_i=t=>$c.call(t),Pd=t=>_i(t).slice(8,-1),Fc=t=>_i(t)==="[object Object]",Aa=t=>dt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,t0=ka(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Li=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},Hd=/-(\w)/g,Kr=Li(t=>t.replace(Hd,(e,r)=>r?r.toUpperCase():"")),qd=/\B([A-Z])/g,tn=Li(t=>t.replace(qd,"-$1").toLowerCase()),Bc=Li(t=>t.charAt(0).toUpperCase()+t.slice(1)),ls=Li(t=>t?`on${Bc(t)}`:""),Gr=(t,e)=>!Object.is(t,e),J0=(t,...e)=>{for(let r=0;r{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:n,value:r})},qs=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let Fo;const zi=()=>Fo||(Fo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function zn(t){if(Ce(t)){const e={};for(let r=0;r{if(r){const n=r.split(Ud);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function $n(t){let e="";if(dt(t))e=t;else if(Ce(t))for(let r=0;r!!(t&&t.__v_isRef===!0),dr=t=>dt(t)?t:t==null?"":Ce(t)||st(t)&&(t.toString===$c||!Ne(t.toString))?qc(t)?dr(t.value):JSON.stringify(t,jc,2):String(t),jc=(t,e)=>qc(e)?jc(t,e.value):Dn(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[n,i],s)=>(r[cs(n,s)+" =>"]=i,r),{})}:Lc(e)?{[`Set(${e.size})`]:[...e.values()].map(r=>cs(r))}:en(e)?cs(e):st(e)&&!Ce(e)&&!Fc(e)?String(e):e,cs=(t,e="")=>{var r;return en(t)?`Symbol(${(r=t.description)!=null?r:e})`:t};/** -* @vue/reactivity v3.5.20 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let _t;class Yd{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=_t,!e&&_t&&(this.index=(_t.scopes||(_t.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,r;if(this.scopes)for(e=0,r=this.scopes.length;e0&&--this._on===0&&(_t=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let r,n;for(r=0,n=this.effects.length;r0)return;if(n0){let e=n0;for(n0=void 0;e;){const r=e.next;e.next=void 0,e.flags&=-9,e=r}}let t;for(;r0;){let e=r0;for(r0=void 0;e;){const r=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(n){t||(t=n)}e=r}}if(t)throw t}function Gc(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Kc(t){let e,r=t.depsTail,n=r;for(;n;){const i=n.prevDep;n.version===-1?(n===r&&(r=i),Na(n),Jd(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}t.deps=e,t.depsTail=r}function js(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Yc(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function Yc(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===d0)||(t.globalVersion=d0,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!js(t))))return;t.flags|=2;const e=t.dep,r=Ze,n=nr;Ze=t,nr=!0;try{Gc(t);const i=t.fn(t._value);(e.version===0||Gr(i,t._value))&&(t.flags|=128,t._value=i,e.version++)}catch(i){throw e.version++,i}finally{Ze=r,nr=n,Kc(t),t.flags&=-3}}function Na(t,e=!1){const{dep:r,prevSub:n,nextSub:i}=t;if(n&&(n.nextSub=i,t.prevSub=void 0),i&&(i.prevSub=n,t.nextSub=void 0),r.subs===t&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let s=r.computed.deps;s;s=s.nextDep)Na(s,!0)}!e&&!--r.sc&&r.map&&r.map.delete(r.key)}function Jd(t){const{prevDep:e,nextDep:r}=t;e&&(e.nextDep=r,t.prevDep=void 0),r&&(r.prevDep=e,t.nextDep=void 0)}let nr=!0;const Xc=[];function Rr(){Xc.push(nr),nr=!1}function Or(){const t=Xc.pop();nr=t===void 0?!0:t}function Bo(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const r=Ze;Ze=void 0;try{e()}finally{Ze=r}}}let d0=0;class Zd{constructor(e,r){this.sub=e,this.dep=r,this.version=r.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Da{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Ze||!nr||Ze===this.computed)return;let r=this.activeLink;if(r===void 0||r.sub!==Ze)r=this.activeLink=new Zd(Ze,this),Ze.deps?(r.prevDep=Ze.depsTail,Ze.depsTail.nextDep=r,Ze.depsTail=r):Ze.deps=Ze.depsTail=r,Jc(r);else if(r.version===-1&&(r.version=this.version,r.nextDep)){const n=r.nextDep;n.prevDep=r.prevDep,r.prevDep&&(r.prevDep.nextDep=n),r.prevDep=Ze.depsTail,r.nextDep=void 0,Ze.depsTail.nextDep=r,Ze.depsTail=r,Ze.deps===r&&(Ze.deps=n)}return r}trigger(e){this.version++,d0++,this.notify(e)}notify(e){Ca();try{for(let r=this.subs;r;r=r.prevSub)r.sub.notify()&&r.sub.dep.notify()}finally{Ma()}}}function Jc(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let n=e.deps;n;n=n.nextDep)Jc(n)}const r=t.dep.subs;r!==t&&(t.prevSub=r,r&&(r.nextSub=t)),t.dep.subs=t}}const Us=new WeakMap,fn=Symbol(""),Vs=Symbol(""),h0=Symbol("");function St(t,e,r){if(nr&&Ze){let n=Us.get(t);n||Us.set(t,n=new Map);let i=n.get(r);i||(n.set(r,i=new Da),i.map=n,i.key=r),i.track()}}function Ar(t,e,r,n,i,s){const a=Us.get(t);if(!a){d0++;return}const o=l=>{l&&l.trigger()};if(Ca(),e==="clear")a.forEach(o);else{const l=Ce(t),c=l&&Aa(r);if(l&&r==="length"){const u=Number(n);a.forEach((f,p)=>{(p==="length"||p===h0||!en(p)&&p>=u)&&o(f)})}else switch((r!==void 0||a.has(void 0))&&o(a.get(r)),c&&o(a.get(h0)),e){case"add":l?c&&o(a.get("length")):(o(a.get(fn)),Dn(t)&&o(a.get(Vs)));break;case"delete":l||(o(a.get(fn)),Dn(t)&&o(a.get(Vs)));break;case"set":Dn(t)&&o(a.get(fn));break}}Ma()}function xn(t){const e=Fe(t);return e===t?e:(St(e,"iterate",h0),Gt(t)?e:e.map(wt))}function $i(t){return St(t=Fe(t),"iterate",h0),t}const Qd={__proto__:null,[Symbol.iterator](){return ds(this,Symbol.iterator,wt)},concat(...t){return xn(this).concat(...t.map(e=>Ce(e)?xn(e):e))},entries(){return ds(this,"entries",t=>(t[1]=wt(t[1]),t))},every(t,e){return xr(this,"every",t,e,void 0,arguments)},filter(t,e){return xr(this,"filter",t,e,r=>r.map(wt),arguments)},find(t,e){return xr(this,"find",t,e,wt,arguments)},findIndex(t,e){return xr(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return xr(this,"findLast",t,e,wt,arguments)},findLastIndex(t,e){return xr(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return xr(this,"forEach",t,e,void 0,arguments)},includes(...t){return hs(this,"includes",t)},indexOf(...t){return hs(this,"indexOf",t)},join(t){return xn(this).join(t)},lastIndexOf(...t){return hs(this,"lastIndexOf",t)},map(t,e){return xr(this,"map",t,e,void 0,arguments)},pop(){return Vn(this,"pop")},push(...t){return Vn(this,"push",t)},reduce(t,...e){return Po(this,"reduce",t,e)},reduceRight(t,...e){return Po(this,"reduceRight",t,e)},shift(){return Vn(this,"shift")},some(t,e){return xr(this,"some",t,e,void 0,arguments)},splice(...t){return Vn(this,"splice",t)},toReversed(){return xn(this).toReversed()},toSorted(t){return xn(this).toSorted(t)},toSpliced(...t){return xn(this).toSpliced(...t)},unshift(...t){return Vn(this,"unshift",t)},values(){return ds(this,"values",wt)}};function ds(t,e,r){const n=$i(t),i=n[e]();return n!==t&&!Gt(t)&&(i._next=i.next,i.next=()=>{const s=i._next();return s.value&&(s.value=r(s.value)),s}),i}const eh=Array.prototype;function xr(t,e,r,n,i,s){const a=$i(t),o=a!==t&&!Gt(t),l=a[e];if(l!==eh[e]){const f=l.apply(t,s);return o?wt(f):f}let c=r;a!==t&&(o?c=function(f,p){return r.call(this,wt(f),p,t)}:r.length>2&&(c=function(f,p){return r.call(this,f,p,t)}));const u=l.call(a,c,n);return o&&i?i(u):u}function Po(t,e,r,n){const i=$i(t);let s=r;return i!==t&&(Gt(t)?r.length>3&&(s=function(a,o,l){return r.call(this,a,o,l,t)}):s=function(a,o,l){return r.call(this,a,wt(o),l,t)}),i[e](s,...n)}function hs(t,e,r){const n=Fe(t);St(n,"iterate",h0);const i=n[e](...r);return(i===-1||i===!1)&&_a(r[0])?(r[0]=Fe(r[0]),n[e](...r)):i}function Vn(t,e,r=[]){Rr(),Ca();const n=Fe(t)[e].apply(t,r);return Ma(),Or(),n}const th=ka("__proto__,__v_isRef,__isVue"),Zc=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(en));function rh(t){en(t)||(t=String(t));const e=Fe(this);return St(e,"has",t),e.hasOwnProperty(t)}class Qc{constructor(e=!1,r=!1){this._isReadonly=e,this._isShallow=r}get(e,r,n){if(r==="__v_skip")return e.__v_skip;const i=this._isReadonly,s=this._isShallow;if(r==="__v_isReactive")return!i;if(r==="__v_isReadonly")return i;if(r==="__v_isShallow")return s;if(r==="__v_raw")return n===(i?s?hh:nu:s?ru:tu).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const a=Ce(e);if(!i){let l;if(a&&(l=Qd[r]))return l;if(r==="hasOwnProperty")return rh}const o=Reflect.get(e,r,Tt(e)?e:n);return(en(r)?Zc.has(r):th(r))||(i||St(e,"get",r),s)?o:Tt(o)?a&&Aa(r)?o:o.value:st(o)?i?iu(o):Ra(o):o}}class eu extends Qc{constructor(e=!1){super(!1,e)}set(e,r,n,i){let s=e[r];if(!this._isShallow){const l=Yr(s);if(!Gt(n)&&!Yr(n)&&(s=Fe(s),n=Fe(n)),!Ce(e)&&Tt(s)&&!Tt(n))return l||(s.value=n),!0}const a=Ce(e)&&Aa(r)?Number(r)t,R0=t=>Reflect.getPrototypeOf(t);function oh(t,e,r){return function(...n){const i=this.__v_raw,s=Fe(i),a=Dn(s),o=t==="entries"||t===Symbol.iterator&&a,l=t==="keys"&&a,c=i[t](...n),u=r?Ws:e?ci:wt;return!e&&St(s,"iterate",l?Vs:fn),{next(){const{value:f,done:p}=c.next();return p?{value:f,done:p}:{value:o?[u(f[0]),u(f[1])]:u(f),done:p}},[Symbol.iterator](){return this}}}}function O0(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function lh(t,e){const r={get(i){const s=this.__v_raw,a=Fe(s),o=Fe(i);t||(Gr(i,o)&&St(a,"get",i),St(a,"get",o));const{has:l}=R0(a),c=e?Ws:t?ci:wt;if(l.call(a,i))return c(s.get(i));if(l.call(a,o))return c(s.get(o));s!==a&&s.get(i)},get size(){const i=this.__v_raw;return!t&&St(Fe(i),"iterate",fn),i.size},has(i){const s=this.__v_raw,a=Fe(s),o=Fe(i);return t||(Gr(i,o)&&St(a,"has",i),St(a,"has",o)),i===o?s.has(i):s.has(i)||s.has(o)},forEach(i,s){const a=this,o=a.__v_raw,l=Fe(o),c=e?Ws:t?ci:wt;return!t&&St(l,"iterate",fn),o.forEach((u,f)=>i.call(s,c(u),c(f),a))}};return xt(r,t?{add:O0("add"),set:O0("set"),delete:O0("delete"),clear:O0("clear")}:{add(i){!e&&!Gt(i)&&!Yr(i)&&(i=Fe(i));const s=Fe(this);return R0(s).has.call(s,i)||(s.add(i),Ar(s,"add",i,i)),this},set(i,s){!e&&!Gt(s)&&!Yr(s)&&(s=Fe(s));const a=Fe(this),{has:o,get:l}=R0(a);let c=o.call(a,i);c||(i=Fe(i),c=o.call(a,i));const u=l.call(a,i);return a.set(i,s),c?Gr(s,u)&&Ar(a,"set",i,s):Ar(a,"add",i,s),this},delete(i){const s=Fe(this),{has:a,get:o}=R0(s);let l=a.call(s,i);l||(i=Fe(i),l=a.call(s,i)),o&&o.call(s,i);const c=s.delete(i);return l&&Ar(s,"delete",i,void 0),c},clear(){const i=Fe(this),s=i.size!==0,a=i.clear();return s&&Ar(i,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(i=>{r[i]=oh(i,t,e)}),r}function Ia(t,e){const r=lh(t,e);return(n,i,s)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?n:Reflect.get(Be(r,i)&&i in n?r:n,i,s)}const ch={get:Ia(!1,!1)},uh={get:Ia(!1,!0)},dh={get:Ia(!0,!1)};const tu=new WeakMap,ru=new WeakMap,nu=new WeakMap,hh=new WeakMap;function fh(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ph(t){return t.__v_skip||!Object.isExtensible(t)?0:fh(Pd(t))}function Ra(t){return Yr(t)?t:Oa(t,!1,ih,ch,tu)}function mh(t){return Oa(t,!1,ah,uh,ru)}function iu(t){return Oa(t,!0,sh,dh,nu)}function Oa(t,e,r,n,i){if(!st(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const s=ph(t);if(s===0)return t;const a=i.get(t);if(a)return a;const o=new Proxy(t,s===2?n:r);return i.set(t,o),o}function In(t){return Yr(t)?In(t.__v_raw):!!(t&&t.__v_isReactive)}function Yr(t){return!!(t&&t.__v_isReadonly)}function Gt(t){return!!(t&&t.__v_isShallow)}function _a(t){return t?!!t.__v_raw:!1}function Fe(t){const e=t&&t.__v_raw;return e?Fe(e):t}function gh(t){return!Be(t,"__v_skip")&&Object.isExtensible(t)&&Pc(t,"__v_skip",!0),t}const wt=t=>st(t)?Ra(t):t,ci=t=>st(t)?iu(t):t;function Tt(t){return t?t.__v_isRef===!0:!1}function Oe(t){return vh(t,!1)}function vh(t,e){return Tt(t)?t:new bh(t,e)}class bh{constructor(e,r){this.dep=new Da,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=r?e:Fe(e),this._value=r?e:wt(e),this.__v_isShallow=r}get value(){return this.dep.track(),this._value}set value(e){const r=this._rawValue,n=this.__v_isShallow||Gt(e)||Yr(e);e=n?e:Fe(e),Gr(e,r)&&(this._rawValue=e,this._value=n?e:wt(e),this.dep.trigger())}}function yh(t){return Tt(t)?t.value:t}const wh={get:(t,e,r)=>e==="__v_raw"?t:yh(Reflect.get(t,e,r)),set:(t,e,r,n)=>{const i=t[e];return Tt(i)&&!Tt(r)?(i.value=r,!0):Reflect.set(t,e,r,n)}};function su(t){return In(t)?t:new Proxy(t,wh)}class xh{constructor(e,r,n){this.fn=e,this.setter=r,this._value=void 0,this.dep=new Da(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=d0-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!r,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Ze!==this)return Wc(this,!0),!0}get value(){const e=this.dep.track();return Yc(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function Sh(t,e,r=!1){let n,i;return Ne(t)?n=t:(n=t.get,i=t.set),new xh(n,i,r)}const _0={},ui=new WeakMap;let dn;function kh(t,e=!1,r=dn){if(r){let n=ui.get(r);n||ui.set(r,n=[]),n.push(t)}}function Th(t,e,r=Ke){const{immediate:n,deep:i,once:s,scheduler:a,augmentJob:o,call:l}=r,c=D=>i?D:Gt(D)||i===!1||i===0?Cr(D,1):Cr(D);let u,f,p,g,v=!1,w=!1;if(Tt(t)?(f=()=>t.value,v=Gt(t)):In(t)?(f=()=>c(t),v=!0):Ce(t)?(w=!0,v=t.some(D=>In(D)||Gt(D)),f=()=>t.map(D=>{if(Tt(D))return D.value;if(In(D))return c(D);if(Ne(D))return l?l(D,2):D()})):Ne(t)?e?f=l?()=>l(t,2):t:f=()=>{if(p){Rr();try{p()}finally{Or()}}const D=dn;dn=u;try{return l?l(t,3,[g]):t(g)}finally{dn=D}}:f=rr,e&&i){const D=f,I=i===!0?1/0:i;f=()=>Cr(D(),I)}const y=Xd(),C=()=>{u.stop(),y&&y.active&&Ea(y.effects,u)};if(s&&e){const D=e;e=(...I)=>{D(...I),C()}}let S=w?new Array(t.length).fill(_0):_0;const T=D=>{if(!(!(u.flags&1)||!u.dirty&&!D))if(e){const I=u.run();if(i||v||(w?I.some((_,F)=>Gr(_,S[F])):Gr(I,S))){p&&p();const _=dn;dn=u;try{const F=[I,S===_0?void 0:w&&S[0]===_0?[]:S,g];S=I,l?l(e,3,F):e(...F)}finally{dn=_}}}else u.run()};return o&&o(T),u=new Uc(f),u.scheduler=a?()=>a(T,!1):T,g=D=>kh(D,!1,u),p=u.onStop=()=>{const D=ui.get(u);if(D){if(l)l(D,4);else for(const I of D)I();ui.delete(u)}},e?n?T(!0):S=u.run():a?a(T.bind(null,!0),!0):u.run(),C.pause=u.pause.bind(u),C.resume=u.resume.bind(u),C.stop=C,C}function Cr(t,e=1/0,r){if(e<=0||!st(t)||t.__v_skip||(r=r||new Set,r.has(t)))return t;if(r.add(t),e--,Tt(t))Cr(t.value,e,r);else if(Ce(t))for(let n=0;n{Cr(n,e,r)});else if(Fc(t)){for(const n in t)Cr(t[n],e,r);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&Cr(t[n],e,r)}return t}/** -* @vue/runtime-core v3.5.20 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function w0(t,e,r,n){try{return n?t(...n):t()}catch(i){Fi(i,e,r)}}function gr(t,e,r,n){if(Ne(t)){const i=w0(t,e,r,n);return i&&zc(i)&&i.catch(s=>{Fi(s,e,r)}),i}if(Ce(t)){const i=[];for(let s=0;s>>1,i=Mt[n],s=f0(i);s=f0(r)?Mt.push(t):Mt.splice(Ah(e),0,t),t.flags|=1,ou()}}function ou(){di||(di=au.then(cu))}function Ch(t){Ce(t)?Rn.push(...t):jr&&t.id===-1?jr.splice(En+1,0,t):t.flags&1||(Rn.push(t),t.flags|=1),ou()}function Ho(t,e,r=ur+1){for(;rf0(r)-f0(n));if(Rn.length=0,jr){jr.push(...e);return}for(jr=e,En=0;Ent.id==null?t.flags&2?-1:1/0:t.id;function cu(t){const e=rr;try{for(ur=0;ur{n._d&&Yo(-1);const s=hi(e);let a;try{a=t(...i)}finally{hi(s),n._d&&Yo(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function fi(t,e){if(Vt===null)return t;const r=qi(Vt),n=t.dirs||(t.dirs=[]);for(let i=0;it.__isTeleport,Ih=Symbol("_leaveCb");function za(t,e){t.shapeFlag&6&&t.component?(t.transition=e,za(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function du(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function i0(t,e,r,n,i=!1){if(Ce(t)){t.forEach((v,w)=>i0(v,e&&(Ce(e)?e[w]:e),r,n,i));return}if(s0(n)&&!i){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&i0(t,e,r,n.component.subTree);return}const s=n.shapeFlag&4?qi(n.component):n.el,a=i?null:s,{i:o,r:l}=t,c=e&&e.r,u=o.refs===Ke?o.refs={}:o.refs,f=o.setupState,p=Fe(f),g=f===Ke?_c:v=>Be(p,v);if(c!=null&&c!==l){if(dt(c))u[c]=null,g(c)&&(f[c]=null);else if(Tt(c)){c.value=null;const v=e;v.k&&(u[v.k]=null)}}if(Ne(l))w0(l,o,12,[a,u]);else{const v=dt(l),w=Tt(l);if(v||w){const y=()=>{if(t.f){const C=v?g(l)?f[l]:u[l]:l.value;if(i)Ce(C)&&Ea(C,s);else if(Ce(C))C.includes(s)||C.push(s);else if(v)u[l]=[s],g(l)&&(f[l]=u[l]);else{const S=[s];l.value=S,t.k&&(u[t.k]=S)}}else v?(u[l]=a,g(l)&&(f[l]=a)):w&&(l.value=a,t.k&&(u[t.k]=a))};a?(y.id=-1,Ft(y,r)):y()}}}zi().requestIdleCallback;zi().cancelIdleCallback;const s0=t=>!!t.type.__asyncLoader,hu=t=>t.type.__isKeepAlive;function Rh(t,e){fu(t,"a",e)}function Oh(t,e){fu(t,"da",e)}function fu(t,e,r=Nt){const n=t.__wdc||(t.__wdc=()=>{let i=r;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(Bi(e,n,r),r){let i=r.parent;for(;i&&i.parent;)hu(i.parent.vnode)&&_h(n,e,r,i),i=i.parent}}function _h(t,e,r,n){const i=Bi(e,t,n,!0);Fa(()=>{Ea(n[e],i)},r)}function Bi(t,e,r=Nt,n=!1){if(r){const i=r[t]||(r[t]=[]),s=e.__weh||(e.__weh=(...a)=>{Rr();const o=x0(r),l=gr(e,r,t,a);return o(),Or(),l});return n?i.unshift(s):i.push(s),s}}const $r=t=>(e,r=Nt)=>{(!m0||t==="sp")&&Bi(t,(...n)=>e(...n),r)},Lh=$r("bm"),$a=$r("m"),zh=$r("bu"),$h=$r("u"),Fh=$r("bum"),Fa=$r("um"),Bh=$r("sp"),Ph=$r("rtg"),Hh=$r("rtc");function qh(t,e=Nt){Bi("ec",t,e)}const jh=Symbol.for("v-ndc");function pu(t,e,r,n){let i;const s=r&&r[n],a=Ce(t);if(a||dt(t)){const o=a&&In(t);let l=!1,c=!1;o&&(l=!Gt(t),c=Yr(t),t=$i(t)),i=new Array(t.length);for(let u=0,f=t.length;ue(o,l,void 0,s&&s[l]));else{const o=Object.keys(t);i=new Array(o.length);for(let l=0,c=o.length;lt?Lu(t)?qi(t):Gs(t.parent):null,a0=xt(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Gs(t.parent),$root:t=>Gs(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>Ba(t),$forceUpdate:t=>t.f||(t.f=()=>{La(t.update)}),$nextTick:t=>t.n||(t.n=An.bind(t.proxy)),$watch:t=>hf.bind(t)}),fs=(t,e)=>t!==Ke&&!t.__isScriptSetup&&Be(t,e),Uh={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:r,setupState:n,data:i,props:s,accessCache:a,type:o,appContext:l}=t;let c;if(e[0]!=="$"){const g=a[e];if(g!==void 0)switch(g){case 1:return n[e];case 2:return i[e];case 4:return r[e];case 3:return s[e]}else{if(fs(n,e))return a[e]=1,n[e];if(i!==Ke&&Be(i,e))return a[e]=2,i[e];if((c=t.propsOptions[0])&&Be(c,e))return a[e]=3,s[e];if(r!==Ke&&Be(r,e))return a[e]=4,r[e];Ks&&(a[e]=0)}}const u=a0[e];let f,p;if(u)return e==="$attrs"&&St(t.attrs,"get",""),u(t);if((f=o.__cssModules)&&(f=f[e]))return f;if(r!==Ke&&Be(r,e))return a[e]=4,r[e];if(p=l.config.globalProperties,Be(p,e))return p[e]},set({_:t},e,r){const{data:n,setupState:i,ctx:s}=t;return fs(i,e)?(i[e]=r,!0):n!==Ke&&Be(n,e)?(n[e]=r,!0):Be(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(s[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:n,appContext:i,propsOptions:s,type:a}},o){let l,c;return!!(r[o]||t!==Ke&&o[0]!=="$"&&Be(t,o)||fs(e,o)||(l=s[0])&&Be(l,o)||Be(n,o)||Be(a0,o)||Be(i.config.globalProperties,o)||(c=a.__cssModules)&&c[o])},defineProperty(t,e,r){return r.get!=null?t._.accessCache[e]=0:Be(r,"value")&&this.set(t,e,r.value,null),Reflect.defineProperty(t,e,r)}};function qo(t){return Ce(t)?t.reduce((e,r)=>(e[r]=null,e),{}):t}let Ks=!0;function Vh(t){const e=Ba(t),r=t.proxy,n=t.ctx;Ks=!1,e.beforeCreate&&jo(e.beforeCreate,t,"bc");const{data:i,computed:s,methods:a,watch:o,provide:l,inject:c,created:u,beforeMount:f,mounted:p,beforeUpdate:g,updated:v,activated:w,deactivated:y,beforeDestroy:C,beforeUnmount:S,destroyed:T,unmounted:D,render:I,renderTracked:_,renderTriggered:F,errorCaptured:G,serverPrefetch:W,expose:fe,inheritAttrs:ve,components:Te,directives:Xe,filters:ze}=e;if(c&&Wh(c,n,null),a)for(const Ae in a){const pe=a[Ae];Ne(pe)&&(n[Ae]=pe.bind(r))}if(i){const Ae=i.call(r,r);st(Ae)&&(t.data=Ra(Ae))}if(Ks=!0,s)for(const Ae in s){const pe=s[Ae],He=Ne(pe)?pe.bind(r,r):Ne(pe.get)?pe.get.bind(r,r):rr,qe=!Ne(pe)&&Ne(pe.set)?pe.set.bind(r):rr,Je=$u({get:He,set:qe});Object.defineProperty(n,Ae,{enumerable:!0,configurable:!0,get:()=>Je.value,set:me=>Je.value=me})}if(o)for(const Ae in o)mu(o[Ae],n,r,Ae);if(l){const Ae=Ne(l)?l.call(r):l;Reflect.ownKeys(Ae).forEach(pe=>{Zh(pe,Ae[pe])})}u&&jo(u,t,"c");function _e(Ae,pe){Ce(pe)?pe.forEach(He=>Ae(He.bind(r))):pe&&Ae(pe.bind(r))}if(_e(Lh,f),_e($a,p),_e(zh,g),_e($h,v),_e(Rh,w),_e(Oh,y),_e(qh,G),_e(Hh,_),_e(Ph,F),_e(Fh,S),_e(Fa,D),_e(Bh,W),Ce(fe))if(fe.length){const Ae=t.exposed||(t.exposed={});fe.forEach(pe=>{Object.defineProperty(Ae,pe,{get:()=>r[pe],set:He=>r[pe]=He,enumerable:!0})})}else t.exposed||(t.exposed={});I&&t.render===rr&&(t.render=I),ve!=null&&(t.inheritAttrs=ve),Te&&(t.components=Te),Xe&&(t.directives=Xe),W&&du(t)}function Wh(t,e,r=rr){Ce(t)&&(t=Ys(t));for(const n in t){const i=t[n];let s;st(i)?"default"in i?s=Z0(i.from||n,i.default,!0):s=Z0(i.from||n):s=Z0(i),Tt(s)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:a=>s.value=a}):e[n]=s}}function jo(t,e,r){gr(Ce(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,r)}function mu(t,e,r,n){let i=n.includes(".")?Mu(r,n):()=>r[n];if(dt(t)){const s=e[t];Ne(s)&&o0(i,s)}else if(Ne(t))o0(i,t.bind(r));else if(st(t))if(Ce(t))t.forEach(s=>mu(s,e,r,n));else{const s=Ne(t.handler)?t.handler.bind(r):e[t.handler];Ne(s)&&o0(i,s,t)}}function Ba(t){const e=t.type,{mixins:r,extends:n}=e,{mixins:i,optionsCache:s,config:{optionMergeStrategies:a}}=t.appContext,o=s.get(e);let l;return o?l=o:!i.length&&!r&&!n?l=e:(l={},i.length&&i.forEach(c=>pi(l,c,a,!0)),pi(l,e,a)),st(e)&&s.set(e,l),l}function pi(t,e,r,n=!1){const{mixins:i,extends:s}=e;s&&pi(t,s,r,!0),i&&i.forEach(a=>pi(t,a,r,!0));for(const a in e)if(!(n&&a==="expose")){const o=Gh[a]||r&&r[a];t[a]=o?o(t[a],e[a]):e[a]}return t}const Gh={data:Uo,props:Vo,emits:Vo,methods:Zn,computed:Zn,beforeCreate:Ct,created:Ct,beforeMount:Ct,mounted:Ct,beforeUpdate:Ct,updated:Ct,beforeDestroy:Ct,beforeUnmount:Ct,destroyed:Ct,unmounted:Ct,activated:Ct,deactivated:Ct,errorCaptured:Ct,serverPrefetch:Ct,components:Zn,directives:Zn,watch:Yh,provide:Uo,inject:Kh};function Uo(t,e){return e?t?function(){return xt(Ne(t)?t.call(this,this):t,Ne(e)?e.call(this,this):e)}:e:t}function Kh(t,e){return Zn(Ys(t),Ys(e))}function Ys(t){if(Ce(t)){const e={};for(let r=0;r1)return r&&Ne(e)?e.call(n&&n.proxy):e}}const vu={},bu=()=>Object.create(vu),yu=t=>Object.getPrototypeOf(t)===vu;function Qh(t,e,r,n=!1){const i={},s=bu();t.propsDefaults=Object.create(null),wu(t,e,i,s);for(const a in t.propsOptions[0])a in i||(i[a]=void 0);r?t.props=n?i:mh(i):t.type.props?t.props=i:t.props=s,t.attrs=s}function ef(t,e,r,n){const{props:i,attrs:s,vnode:{patchFlag:a}}=t,o=Fe(i),[l]=t.propsOptions;let c=!1;if((n||a>0)&&!(a&16)){if(a&8){const u=t.vnode.dynamicProps;for(let f=0;f{l=!0;const[p,g]=xu(f,e,!0);xt(a,p),g&&o.push(...g)};!r&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!s&&!l)return st(t)&&n.set(t,Nn),Nn;if(Ce(s))for(let u=0;ut==="_"||t==="_ctx"||t==="$stable",Ha=t=>Ce(t)?t.map(hr):[hr(t)],rf=(t,e,r)=>{if(e._n)return e;const n=Mh((...i)=>Ha(e(...i)),r);return n._c=!1,n},Su=(t,e,r)=>{const n=t._ctx;for(const i in t){if(Pa(i))continue;const s=t[i];if(Ne(s))e[i]=rf(i,s,n);else if(s!=null){const a=Ha(s);e[i]=()=>a}}},ku=(t,e)=>{const r=Ha(e);t.slots.default=()=>r},Tu=(t,e,r)=>{for(const n in e)(r||!Pa(n))&&(t[n]=e[n])},nf=(t,e,r)=>{const n=t.slots=bu();if(t.vnode.shapeFlag&32){const i=e._;i?(Tu(n,e,r),r&&Pc(n,"_",i,!0)):Su(e,n)}else e&&ku(t,e)},sf=(t,e,r)=>{const{vnode:n,slots:i}=t;let s=!0,a=Ke;if(n.shapeFlag&32){const o=e._;o?r&&o===1?s=!1:Tu(i,e,r):(s=!e.$stable,Su(e,i)),a=e}else e&&(ku(t,e),a={default:1});if(s)for(const o in i)!Pa(o)&&a[o]==null&&delete i[o]},Ft=yf;function af(t){return of(t)}function of(t,e){const r=zi();r.__VUE__=!0;const{insert:n,remove:i,patchProp:s,createElement:a,createText:o,createComment:l,setText:c,setElementText:u,parentNode:f,nextSibling:p,setScopeId:g=rr,insertStaticContent:v}=t,w=(k,N,z,j=null,B=null,H=null,X=void 0,ee=null,ne=!!N.dynamicChildren)=>{if(k===N)return;k&&!Wn(k,N)&&(j=lt(k),me(k,B,H,!0),k=null),N.patchFlag===-2&&(ne=!1,N.dynamicChildren=null);const{type:K,ref:ce,shapeFlag:ae}=N;switch(K){case Hi:y(k,N,z,j);break;case Xr:C(k,N,z,j);break;case Q0:k==null&&S(N,z,j,X);break;case tr:Te(k,N,z,j,B,H,X,ee,ne);break;default:ae&1?I(k,N,z,j,B,H,X,ee,ne):ae&6?Xe(k,N,z,j,B,H,X,ee,ne):(ae&64||ae&128)&&K.process(k,N,z,j,B,H,X,ee,ne,Q)}ce!=null&&B?i0(ce,k&&k.ref,H,N||k,!N):ce==null&&k&&k.ref!=null&&i0(k.ref,null,H,k,!0)},y=(k,N,z,j)=>{if(k==null)n(N.el=o(N.children),z,j);else{const B=N.el=k.el;N.children!==k.children&&c(B,N.children)}},C=(k,N,z,j)=>{k==null?n(N.el=l(N.children||""),z,j):N.el=k.el},S=(k,N,z,j)=>{[k.el,k.anchor]=v(k.children,N,z,j,k.el,k.anchor)},T=({el:k,anchor:N},z,j)=>{let B;for(;k&&k!==N;)B=p(k),n(k,z,j),k=B;n(N,z,j)},D=({el:k,anchor:N})=>{let z;for(;k&&k!==N;)z=p(k),i(k),k=z;i(N)},I=(k,N,z,j,B,H,X,ee,ne)=>{N.type==="svg"?X="svg":N.type==="math"&&(X="mathml"),k==null?_(N,z,j,B,H,X,ee,ne):W(k,N,B,H,X,ee,ne)},_=(k,N,z,j,B,H,X,ee)=>{let ne,K;const{props:ce,shapeFlag:ae,transition:he,dirs:ke}=k;if(ne=k.el=a(k.type,H,ce&&ce.is,ce),ae&8?u(ne,k.children):ae&16&&G(k.children,ne,null,j,B,ps(k,H),X,ee),ke&&an(k,null,j,"created"),F(ne,k,k.scopeId,X,j),ce){for(const je in ce)je!=="value"&&!t0(je)&&s(ne,je,null,ce[je],H,j);"value"in ce&&s(ne,"value",null,ce.value,H),(K=ce.onVnodeBeforeMount)&&or(K,j,k)}ke&&an(k,null,j,"beforeMount");const Ie=lf(B,he);Ie&&he.beforeEnter(ne),n(ne,N,z),((K=ce&&ce.onVnodeMounted)||Ie||ke)&&Ft(()=>{K&&or(K,j,k),Ie&&he.enter(ne),ke&&an(k,null,j,"mounted")},B)},F=(k,N,z,j,B)=>{if(z&&g(k,z),j)for(let H=0;H{for(let K=ne;K{const ee=N.el=k.el;let{patchFlag:ne,dynamicChildren:K,dirs:ce}=N;ne|=k.patchFlag&16;const ae=k.props||Ke,he=N.props||Ke;let ke;if(z&&on(z,!1),(ke=he.onVnodeBeforeUpdate)&&or(ke,z,N,k),ce&&an(N,k,z,"beforeUpdate"),z&&on(z,!0),(ae.innerHTML&&he.innerHTML==null||ae.textContent&&he.textContent==null)&&u(ee,""),K?fe(k.dynamicChildren,K,ee,z,j,ps(N,B),H):X||pe(k,N,ee,null,z,j,ps(N,B),H,!1),ne>0){if(ne&16)ve(ee,ae,he,z,B);else if(ne&2&&ae.class!==he.class&&s(ee,"class",null,he.class,B),ne&4&&s(ee,"style",ae.style,he.style,B),ne&8){const Ie=N.dynamicProps;for(let je=0;je{ke&&or(ke,z,N,k),ce&&an(N,k,z,"updated")},j)},fe=(k,N,z,j,B,H,X)=>{for(let ee=0;ee{if(N!==z){if(N!==Ke)for(const H in N)!t0(H)&&!(H in z)&&s(k,H,N[H],null,B,j);for(const H in z){if(t0(H))continue;const X=z[H],ee=N[H];X!==ee&&H!=="value"&&s(k,H,ee,X,B,j)}"value"in z&&s(k,"value",N.value,z.value,B)}},Te=(k,N,z,j,B,H,X,ee,ne)=>{const K=N.el=k?k.el:o(""),ce=N.anchor=k?k.anchor:o("");let{patchFlag:ae,dynamicChildren:he,slotScopeIds:ke}=N;ke&&(ee=ee?ee.concat(ke):ke),k==null?(n(K,z,j),n(ce,z,j),G(N.children||[],z,ce,B,H,X,ee,ne)):ae>0&&ae&64&&he&&k.dynamicChildren?(fe(k.dynamicChildren,he,z,B,H,X,ee),(N.key!=null||B&&N===B.subTree)&&Eu(k,N,!0)):pe(k,N,z,ce,B,H,X,ee,ne)},Xe=(k,N,z,j,B,H,X,ee,ne)=>{N.slotScopeIds=ee,k==null?N.shapeFlag&512?B.ctx.activate(N,z,j,X,ne):ze(N,z,j,B,H,X,ne):rt(k,N,ne)},ze=(k,N,z,j,B,H,X)=>{const ee=k.component=Cf(k,j,B);if(hu(k)&&(ee.ctx.renderer=Q),Nf(ee,!1,X),ee.asyncDep){if(B&&B.registerDep(ee,_e,X),!k.el){const ne=ee.subTree=jt(Xr);C(null,ne,N,z),k.placeholder=ne.el}}else _e(ee,k,N,z,B,H,X)},rt=(k,N,z)=>{const j=N.component=k.component;if(vf(k,N,z))if(j.asyncDep&&!j.asyncResolved){Ae(j,N,z);return}else j.next=N,j.update();else N.el=k.el,j.vnode=N},_e=(k,N,z,j,B,H,X)=>{const ee=()=>{if(k.isMounted){let{next:ae,bu:he,u:ke,parent:Ie,vnode:je}=k;{const Z=Au(k);if(Z){ae&&(ae.el=je.el,Ae(k,ae,X)),Z.asyncDep.then(()=>{k.isUnmounted||ee()});return}}let x=ae,M;on(k,!1),ae?(ae.el=je.el,Ae(k,ae,X)):ae=je,he&&J0(he),(M=ae.props&&ae.props.onVnodeBeforeUpdate)&&or(M,Ie,ae,je),on(k,!0);const O=ms(k),q=k.subTree;k.subTree=O,w(q,O,f(q.el),lt(q),k,B,H),ae.el=O.el,x===null&&bf(k,O.el),ke&&Ft(ke,B),(M=ae.props&&ae.props.onVnodeUpdated)&&Ft(()=>or(M,Ie,ae,je),B)}else{let ae;const{el:he,props:ke}=N,{bm:Ie,m:je,parent:x,root:M,type:O}=k,q=s0(N);if(on(k,!1),Ie&&J0(Ie),!q&&(ae=ke&&ke.onVnodeBeforeMount)&&or(ae,x,N),on(k,!0),he&&ye){const Z=()=>{k.subTree=ms(k),ye(he,k.subTree,k,B,null)};q&&O.__asyncHydrate?O.__asyncHydrate(he,k,Z):Z()}else{M.ce&&M.ce._def.shadowRoot!==!1&&M.ce._injectChildStyle(O);const Z=k.subTree=ms(k);w(null,Z,z,j,k,B,H),N.el=Z.el}if(je&&Ft(je,B),!q&&(ae=ke&&ke.onVnodeMounted)){const Z=N;Ft(()=>or(ae,x,Z),B)}(N.shapeFlag&256||x&&s0(x.vnode)&&x.vnode.shapeFlag&256)&&k.a&&Ft(k.a,B),k.isMounted=!0,N=z=j=null}};k.scope.on();const ne=k.effect=new Uc(ee);k.scope.off();const K=k.update=ne.run.bind(ne),ce=k.job=ne.runIfDirty.bind(ne);ce.i=k,ce.id=k.uid,ne.scheduler=()=>La(ce),on(k,!0),K()},Ae=(k,N,z)=>{N.component=k;const j=k.vnode.props;k.vnode=N,k.next=null,ef(k,N.props,j,z),sf(k,N.children,z),Rr(),Ho(k),Or()},pe=(k,N,z,j,B,H,X,ee,ne=!1)=>{const K=k&&k.children,ce=k?k.shapeFlag:0,ae=N.children,{patchFlag:he,shapeFlag:ke}=N;if(he>0){if(he&128){qe(K,ae,z,j,B,H,X,ee,ne);return}else if(he&256){He(K,ae,z,j,B,H,X,ee,ne);return}}ke&8?(ce&16&&yt(K,B,H),ae!==K&&u(z,ae)):ce&16?ke&16?qe(K,ae,z,j,B,H,X,ee,ne):yt(K,B,H,!0):(ce&8&&u(z,""),ke&16&&G(ae,z,j,B,H,X,ee,ne))},He=(k,N,z,j,B,H,X,ee,ne)=>{k=k||Nn,N=N||Nn;const K=k.length,ce=N.length,ae=Math.min(K,ce);let he;for(he=0;hece?yt(k,B,H,!0,!1,ae):G(N,z,j,B,H,X,ee,ne,ae)},qe=(k,N,z,j,B,H,X,ee,ne)=>{let K=0;const ce=N.length;let ae=k.length-1,he=ce-1;for(;K<=ae&&K<=he;){const ke=k[K],Ie=N[K]=ne?Ur(N[K]):hr(N[K]);if(Wn(ke,Ie))w(ke,Ie,z,null,B,H,X,ee,ne);else break;K++}for(;K<=ae&&K<=he;){const ke=k[ae],Ie=N[he]=ne?Ur(N[he]):hr(N[he]);if(Wn(ke,Ie))w(ke,Ie,z,null,B,H,X,ee,ne);else break;ae--,he--}if(K>ae){if(K<=he){const ke=he+1,Ie=kehe)for(;K<=ae;)me(k[K],B,H,!0),K++;else{const ke=K,Ie=K,je=new Map;for(K=Ie;K<=he;K++){const oe=N[K]=ne?Ur(N[K]):hr(N[K]);oe.key!=null&&je.set(oe.key,K)}let x,M=0;const O=he-Ie+1;let q=!1,Z=0;const le=new Array(O);for(K=0;K=O){me(oe,B,H,!0);continue}let ge;if(oe.key!=null)ge=je.get(oe.key);else for(x=Ie;x<=he;x++)if(le[x-Ie]===0&&Wn(oe,N[x])){ge=x;break}ge===void 0?me(oe,B,H,!0):(le[ge-Ie]=K+1,ge>=Z?Z=ge:q=!0,w(oe,N[ge],z,null,B,H,X,ee,ne),M++)}const L=q?cf(le):Nn;for(x=L.length-1,K=O-1;K>=0;K--){const oe=Ie+K,ge=N[oe],Se=N[oe+1],Re=oe+1{const{el:H,type:X,transition:ee,children:ne,shapeFlag:K}=k;if(K&6){Je(k.component.subTree,N,z,j);return}if(K&128){k.suspense.move(N,z,j);return}if(K&64){X.move(k,N,z,Q);return}if(X===tr){n(H,N,z);for(let ae=0;aeee.enter(H),B);else{const{leave:ae,delayLeave:he,afterLeave:ke}=ee,Ie=()=>{k.ctx.isUnmounted?i(H):n(H,N,z)},je=()=>{H._isLeaving&&H[Ih](!0),ae(H,()=>{Ie(),ke&&ke()})};he?he(H,Ie,je):je()}else n(H,N,z)},me=(k,N,z,j=!1,B=!1)=>{const{type:H,props:X,ref:ee,children:ne,dynamicChildren:K,shapeFlag:ce,patchFlag:ae,dirs:he,cacheIndex:ke}=k;if(ae===-2&&(B=!1),ee!=null&&(Rr(),i0(ee,null,z,k,!0),Or()),ke!=null&&(N.renderCache[ke]=void 0),ce&256){N.ctx.deactivate(k);return}const Ie=ce&1&&he,je=!s0(k);let x;if(je&&(x=X&&X.onVnodeBeforeUnmount)&&or(x,N,k),ce&6)gt(k.component,z,j);else{if(ce&128){k.suspense.unmount(z,j);return}Ie&&an(k,null,N,"beforeUnmount"),ce&64?k.type.remove(k,N,z,Q,j):K&&!K.hasOnce&&(H!==tr||ae>0&&ae&64)?yt(K,N,z,!1,!0):(H===tr&&ae&384||!B&&ce&16)&&yt(ne,N,z),j&&Et(k)}(je&&(x=X&&X.onVnodeUnmounted)||Ie)&&Ft(()=>{x&&or(x,N,k),Ie&&an(k,null,N,"unmounted")},z)},Et=k=>{const{type:N,el:z,anchor:j,transition:B}=k;if(N===tr){ot(z,j);return}if(N===Q0){D(k);return}const H=()=>{i(z),B&&!B.persisted&&B.afterLeave&&B.afterLeave()};if(k.shapeFlag&1&&B&&!B.persisted){const{leave:X,delayLeave:ee}=B,ne=()=>X(z,H);ee?ee(k.el,H,ne):ne()}else H()},ot=(k,N)=>{let z;for(;k!==N;)z=p(k),i(k),k=z;i(N)},gt=(k,N,z)=>{const{bum:j,scope:B,job:H,subTree:X,um:ee,m:ne,a:K}=k;Go(ne),Go(K),j&&J0(j),B.stop(),H&&(H.flags|=8,me(X,k,N,z)),ee&&Ft(ee,N),Ft(()=>{k.isUnmounted=!0},N)},yt=(k,N,z,j=!1,B=!1,H=0)=>{for(let X=H;X{if(k.shapeFlag&6)return lt(k.component.subTree);if(k.shapeFlag&128)return k.suspense.next();const N=p(k.anchor||k.el),z=N&&N[Nh];return z?p(z):N};let U=!1;const V=(k,N,z)=>{k==null?N._vnode&&me(N._vnode,null,null,!0):w(N._vnode||null,k,N,null,null,null,z),N._vnode=k,U||(U=!0,Ho(),lu(),U=!1)},Q={p:w,um:me,m:Je,r:Et,mt:ze,mc:G,pc:pe,pbc:fe,n:lt,o:t};let ie,ye;return e&&([ie,ye]=e(Q)),{render:V,hydrate:ie,createApp:Jh(V,ie)}}function ps({type:t,props:e},r){return r==="svg"&&t==="foreignObject"||r==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:r}function on({effect:t,job:e},r){r?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function lf(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function Eu(t,e,r=!1){const n=t.children,i=e.children;if(Ce(n)&&Ce(i))for(let s=0;s>1,t[r[o]]0&&(e[n]=r[s-1]),r[s]=n)}}for(s=r.length,a=r[s-1];s-- >0;)r[s]=a,a=e[a];return r}function Au(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:Au(e)}function Go(t){if(t)for(let e=0;eZ0(uf);function o0(t,e,r){return Cu(t,e,r)}function Cu(t,e,r=Ke){const{immediate:n,deep:i,flush:s,once:a}=r,o=xt({},r),l=e&&n||!e&&s!=="post";let c;if(m0){if(s==="sync"){const g=df();c=g.__watcherHandles||(g.__watcherHandles=[])}else if(!l){const g=()=>{};return g.stop=rr,g.resume=rr,g.pause=rr,g}}const u=Nt;o.call=(g,v,w)=>gr(g,u,v,w);let f=!1;s==="post"?o.scheduler=g=>{Ft(g,u&&u.suspense)}:s!=="sync"&&(f=!0,o.scheduler=(g,v)=>{v?g():La(g)}),o.augmentJob=g=>{e&&(g.flags|=4),f&&(g.flags|=2,u&&(g.id=u.uid,g.i=u))};const p=Th(t,e,o);return m0&&(c?c.push(p):l&&p()),p}function hf(t,e,r){const n=this.proxy,i=dt(t)?t.includes(".")?Mu(n,t):()=>n[t]:t.bind(n,n);let s;Ne(e)?s=e:(s=e.handler,r=e);const a=x0(this),o=Cu(i,s.bind(n),r);return a(),o}function Mu(t,e){const r=e.split(".");return()=>{let n=t;for(let i=0;ie==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Kr(e)}Modifiers`]||t[`${tn(e)}Modifiers`];function pf(t,e,...r){if(t.isUnmounted)return;const n=t.vnode.props||Ke;let i=r;const s=e.startsWith("update:"),a=s&&ff(n,e.slice(7));a&&(a.trim&&(i=r.map(u=>dt(u)?u.trim():u)),a.number&&(i=r.map(qs)));let o,l=n[o=ls(e)]||n[o=ls(Kr(e))];!l&&s&&(l=n[o=ls(tn(e))]),l&&gr(l,t,6,i);const c=n[o+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[o])return;t.emitted[o]=!0,gr(c,t,6,i)}}function Nu(t,e,r=!1){const n=e.emitsCache,i=n.get(t);if(i!==void 0)return i;const s=t.emits;let a={},o=!1;if(!Ne(t)){const l=c=>{const u=Nu(c,e,!0);u&&(o=!0,xt(a,u))};!r&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!s&&!o?(st(t)&&n.set(t,null),null):(Ce(s)?s.forEach(l=>a[l]=null):xt(a,s),st(t)&&n.set(t,a),a)}function Pi(t,e){return!t||!Oi(e)?!1:(e=e.slice(2).replace(/Once$/,""),Be(t,e[0].toLowerCase()+e.slice(1))||Be(t,tn(e))||Be(t,e))}function ms(t){const{type:e,vnode:r,proxy:n,withProxy:i,propsOptions:[s],slots:a,attrs:o,emit:l,render:c,renderCache:u,props:f,data:p,setupState:g,ctx:v,inheritAttrs:w}=t,y=hi(t);let C,S;try{if(r.shapeFlag&4){const D=i||n,I=D;C=hr(c.call(I,D,u,f,g,p,v)),S=o}else{const D=e;C=hr(D.length>1?D(f,{attrs:o,slots:a,emit:l}):D(f,null)),S=e.props?o:mf(o)}}catch(D){l0.length=0,Fi(D,t,1),C=jt(Xr)}let T=C;if(S&&w!==!1){const D=Object.keys(S),{shapeFlag:I}=T;D.length&&I&7&&(s&&D.some(Ta)&&(S=gf(S,s)),T=Fn(T,S,!1,!0))}return r.dirs&&(T=Fn(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(r.dirs):r.dirs),r.transition&&za(T,r.transition),C=T,hi(y),C}const mf=t=>{let e;for(const r in t)(r==="class"||r==="style"||Oi(r))&&((e||(e={}))[r]=t[r]);return e},gf=(t,e)=>{const r={};for(const n in t)(!Ta(n)||!(n.slice(9)in e))&&(r[n]=t[n]);return r};function vf(t,e,r){const{props:n,children:i,component:s}=t,{props:a,children:o,patchFlag:l}=e,c=s.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?Ko(n,a,c):!!a;if(l&8){const u=e.dynamicProps;for(let f=0;ft.__isSuspense;function yf(t,e){e&&e.pendingBranch?Ce(t)?e.effects.push(...t):e.effects.push(t):Ch(t)}const tr=Symbol.for("v-fgt"),Hi=Symbol.for("v-txt"),Xr=Symbol.for("v-cmt"),Q0=Symbol.for("v-stc"),l0=[];let qt=null;function Ue(t=!1){l0.push(qt=t?null:[])}function wf(){l0.pop(),qt=l0[l0.length-1]||null}let p0=1;function Yo(t,e=!1){p0+=t,t<0&&qt&&e&&(qt.hasOnce=!0)}function Iu(t){return t.dynamicChildren=p0>0?qt||Nn:null,wf(),p0>0&&qt&&qt.push(t),t}function Ge(t,e,r,n,i,s){return Iu(J(t,e,r,n,i,s,!0))}function xf(t,e,r,n,i){return Iu(jt(t,e,r,n,i,!0))}function Ru(t){return t?t.__v_isVNode===!0:!1}function Wn(t,e){return t.type===e.type&&t.key===e.key}const Ou=({key:t})=>t??null,ei=({ref:t,ref_key:e,ref_for:r})=>(typeof t=="number"&&(t=""+t),t!=null?dt(t)||Tt(t)||Ne(t)?{i:Vt,r:t,k:e,f:!!r}:t:null);function J(t,e=null,r=null,n=0,i=null,s=t===tr?0:1,a=!1,o=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Ou(e),ref:e&&ei(e),scopeId:uu,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Vt};return o?(qa(l,r),s&128&&t.normalize(l)):r&&(l.shapeFlag|=dt(r)?8:16),p0>0&&!a&&qt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&qt.push(l),l}const jt=Sf;function Sf(t,e=null,r=null,n=0,i=null,s=!1){if((!t||t===jh)&&(t=Xr),Ru(t)){const o=Fn(t,e,!0);return r&&qa(o,r),p0>0&&!s&&qt&&(o.shapeFlag&6?qt[qt.indexOf(t)]=o:qt.push(o)),o.patchFlag=-2,o}if(Of(t)&&(t=t.__vccOpts),e){e=kf(e);let{class:o,style:l}=e;o&&!dt(o)&&(e.class=$n(o)),st(l)&&(_a(l)&&!Ce(l)&&(l=xt({},l)),e.style=zn(l))}const a=dt(t)?1:Du(t)?128:Dh(t)?64:st(t)?4:Ne(t)?2:0;return J(t,e,r,n,i,a,s,!0)}function kf(t){return t?_a(t)||yu(t)?xt({},t):t:null}function Fn(t,e,r=!1,n=!1){const{props:i,ref:s,patchFlag:a,children:o,transition:l}=t,c=e?Tf(i||{},e):i,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&Ou(c),ref:e&&e.ref?r&&s?Ce(s)?s.concat(ei(e)):[s,ei(e)]:ei(e):s,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:o,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==tr?a===-1?16:a|16:a,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Fn(t.ssContent),ssFallback:t.ssFallback&&Fn(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&n&&za(u,l.clone(u)),u}function _u(t=" ",e=0){return jt(Hi,null,t,e)}function Xo(t,e){const r=jt(Q0,null,t);return r.staticCount=e,r}function Tr(t="",e=!1){return e?(Ue(),xf(Xr,null,t)):jt(Xr,null,t)}function hr(t){return t==null||typeof t=="boolean"?jt(Xr):Ce(t)?jt(tr,null,t.slice()):Ru(t)?Ur(t):jt(Hi,null,String(t))}function Ur(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Fn(t)}function qa(t,e){let r=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(Ce(e))r=16;else if(typeof e=="object")if(n&65){const i=e.default;i&&(i._c&&(i._d=!1),qa(t,i()),i._c&&(i._d=!0));return}else{r=32;const i=e._;!i&&!yu(e)?e._ctx=Vt:i===3&&Vt&&(Vt.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Ne(e)?(e={default:e,_ctx:Vt},r=32):(e=String(e),n&64?(r=16,e=[_u(e)]):r=8);t.children=e,t.shapeFlag|=r}function Tf(...t){const e={};for(let r=0;rNt||Vt;let mi,Js;{const t=zi(),e=(r,n)=>{let i;return(i=t[r])||(i=t[r]=[]),i.push(n),s=>{i.length>1?i.forEach(a=>a(s)):i[0](s)}};mi=e("__VUE_INSTANCE_SETTERS__",r=>Nt=r),Js=e("__VUE_SSR_SETTERS__",r=>m0=r)}const x0=t=>{const e=Nt;return mi(t),t.scope.on(),()=>{t.scope.off(),mi(e)}},Jo=()=>{Nt&&Nt.scope.off(),mi(null)};function Lu(t){return t.vnode.shapeFlag&4}let m0=!1;function Nf(t,e=!1,r=!1){e&&Js(e);const{props:n,children:i}=t.vnode,s=Lu(t);Qh(t,n,s,e),nf(t,i,r||e);const a=s?Df(t,e):void 0;return e&&Js(!1),a}function Df(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,Uh);const{setup:n}=r;if(n){Rr();const i=t.setupContext=n.length>1?Rf(t):null,s=x0(t),a=w0(n,t,0,[t.props,i]),o=zc(a);if(Or(),s(),(o||t.sp)&&!s0(t)&&du(t),o){if(a.then(Jo,Jo),e)return a.then(l=>{Zo(t,l,e)}).catch(l=>{Fi(l,t,0)});t.asyncDep=a}else Zo(t,a,e)}else zu(t,e)}function Zo(t,e,r){Ne(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:st(e)&&(t.setupState=su(e)),zu(t,r)}let Qo;function zu(t,e,r){const n=t.type;if(!t.render){if(!e&&Qo&&!n.render){const i=n.template||Ba(t).template;if(i){const{isCustomElement:s,compilerOptions:a}=t.appContext.config,{delimiters:o,compilerOptions:l}=n,c=xt(xt({isCustomElement:s,delimiters:o},a),l);n.render=Qo(i,c)}}t.render=n.render||rr}{const i=x0(t);Rr();try{Vh(t)}finally{Or(),i()}}}const If={get(t,e){return St(t,"get",""),t[e]}};function Rf(t){const e=r=>{t.exposed=r||{}};return{attrs:new Proxy(t.attrs,If),slots:t.slots,emit:t.emit,expose:e}}function qi(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(su(gh(t.exposed)),{get(e,r){if(r in e)return e[r];if(r in a0)return a0[r](t)},has(e,r){return r in e||r in a0}})):t.proxy}function Of(t){return Ne(t)&&"__vccOpts"in t}const $u=(t,e)=>Sh(t,e,m0),_f="3.5.20";/** -* @vue/runtime-dom v3.5.20 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Zs;const el=typeof window<"u"&&window.trustedTypes;if(el)try{Zs=el.createPolicy("vue",{createHTML:t=>t})}catch{}const Fu=Zs?t=>Zs.createHTML(t):t=>t,Lf="http://www.w3.org/2000/svg",zf="http://www.w3.org/1998/Math/MathML",kr=typeof document<"u"?document:null,tl=kr&&kr.createElement("template"),$f={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,n)=>{const i=e==="svg"?kr.createElementNS(Lf,t):e==="mathml"?kr.createElementNS(zf,t):r?kr.createElement(t,{is:r}):kr.createElement(t);return t==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:t=>kr.createTextNode(t),createComment:t=>kr.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>kr.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,r,n,i,s){const a=r?r.previousSibling:e.lastChild;if(i&&(i===s||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),r),!(i===s||!(i=i.nextSibling)););else{tl.innerHTML=Fu(n==="svg"?`${t}`:n==="mathml"?`${t}`:t);const o=tl.content;if(n==="svg"||n==="mathml"){const l=o.firstChild;for(;l.firstChild;)o.appendChild(l.firstChild);o.removeChild(l)}e.insertBefore(o,r)}return[a?a.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}},Ff=Symbol("_vtc");function Bf(t,e,r){const n=t[Ff];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}const gi=Symbol("_vod"),Bu=Symbol("_vsh"),Pf={name:"show",beforeMount(t,{value:e},{transition:r}){t[gi]=t.style.display==="none"?"":t.style.display,r&&e?r.beforeEnter(t):Gn(t,e)},mounted(t,{value:e},{transition:r}){r&&e&&r.enter(t)},updated(t,{value:e,oldValue:r},{transition:n}){!e!=!r&&(n?e?(n.beforeEnter(t),Gn(t,!0),n.enter(t)):n.leave(t,()=>{Gn(t,!1)}):Gn(t,e))},beforeUnmount(t,{value:e}){Gn(t,e)}};function Gn(t,e){t.style.display=e?t[gi]:"none",t[Bu]=!e}const Hf=Symbol(""),qf=/(^|;)\s*display\s*:/;function jf(t,e,r){const n=t.style,i=dt(r);let s=!1;if(r&&!i){if(e)if(dt(e))for(const a of e.split(";")){const o=a.slice(0,a.indexOf(":")).trim();r[o]==null&&ti(n,o,"")}else for(const a in e)r[a]==null&&ti(n,a,"");for(const a in r)a==="display"&&(s=!0),ti(n,a,r[a])}else if(i){if(e!==r){const a=n[Hf];a&&(r+=";"+a),n.cssText=r,s=qf.test(r)}}else e&&t.removeAttribute("style");gi in t&&(t[gi]=s?n.display:"",t[Bu]&&(n.display="none"))}const rl=/\s*!important$/;function ti(t,e,r){if(Ce(r))r.forEach(n=>ti(t,e,n));else if(r==null&&(r=""),e.startsWith("--"))t.setProperty(e,r);else{const n=Uf(t,e);rl.test(r)?t.setProperty(tn(n),r.replace(rl,""),"important"):t[n]=r}}const nl=["Webkit","Moz","ms"],gs={};function Uf(t,e){const r=gs[e];if(r)return r;let n=Kr(e);if(n!=="filter"&&n in t)return gs[e]=n;n=Bc(n);for(let i=0;ivs||(Kf.then(()=>vs=0),vs=Date.now());function Xf(t,e){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;gr(Jf(n,r.value),e,5,[n])};return r.value=t,r.attached=Yf(),r}function Jf(t,e){if(Ce(e)){const r=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{r.call(t),t._stopped=!0},e.map(n=>i=>!i._stopped&&n&&n(i))}else return e}const cl=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,Zf=(t,e,r,n,i,s)=>{const a=i==="svg";e==="class"?Bf(t,n,a):e==="style"?jf(t,r,n):Oi(e)?Ta(e)||Wf(t,e,r,n,s):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Qf(t,e,n,a))?(al(t,e,n),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&sl(t,e,n,a,s,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!dt(n))?al(t,Kr(e),n,s,e):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),sl(t,e,n,a))};function Qf(t,e,r,n){if(n)return!!(e==="innerHTML"||e==="textContent"||e in t&&cl(e)&&Ne(r));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const i=t.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return cl(e)&&dt(r)?!1:e in t}const ul=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Ce(e)?r=>J0(e,r):e};function ep(t){t.target.composing=!0}function dl(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const bs=Symbol("_assign"),ja={created(t,{modifiers:{lazy:e,trim:r,number:n}},i){t[bs]=ul(i);const s=n||i.props&&i.props.type==="number";Cn(t,e?"change":"input",a=>{if(a.target.composing)return;let o=t.value;r&&(o=o.trim()),s&&(o=qs(o)),t[bs](o)}),r&&Cn(t,"change",()=>{t.value=t.value.trim()}),e||(Cn(t,"compositionstart",ep),Cn(t,"compositionend",dl),Cn(t,"change",dl))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:r,modifiers:{lazy:n,trim:i,number:s}},a){if(t[bs]=ul(a),t.composing)return;const o=(s||t.type==="number")&&!/^0\d/.test(t.value)?qs(t.value):t.value,l=e??"";o!==l&&(document.activeElement===t&&t.type!=="range"&&(n&&e===r||i&&t.value.trim()===l)||(t.value=l))}},tp=["ctrl","shift","alt","meta"],rp={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>tp.some(r=>t[`${r}Key`]&&!e.includes(r))},ys=(t,e)=>{const r=t._withMods||(t._withMods={}),n=e.join(".");return r[n]||(r[n]=(i,...s)=>{for(let a=0;a{const r=t._withKeys||(t._withKeys={}),n=e.join(".");return r[n]||(r[n]=i=>{if(!("key"in i))return;const s=tn(i.key);if(e.some(a=>a===s||np[a]===s))return t(i)})},ip=xt({patchProp:Zf},$f);let hl;function sp(){return hl||(hl=af(ip))}const ap=(...t)=>{const e=sp().createApp(...t),{mount:r}=e;return e.mount=n=>{const i=lp(n);if(!i)return;const s=e._component;!Ne(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const a=r(i,!1,op(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},e};function op(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function lp(t){return dt(t)?document.querySelector(t):t}var cp=Object.defineProperty,up=(t,e,r)=>e in t?cp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,L0=(t,e,r)=>(up(t,typeof e!="symbol"?e+"":e,r),r);const Ua={name:"Latte",type:"light",palette:["#dd7878","#ea76cb","#8839ef","#e64553","#fe640b","#df8e1d","#40a02b","#209fb5","#1e66f5","#7287fd"],cssVar:{"--node-gap-x":"30px","--node-gap-y":"10px","--main-gap-x":"65px","--main-gap-y":"45px","--root-radius":"30px","--main-radius":"20px","--root-color":"#ffffff","--root-bgcolor":"#4c4f69","--root-border-color":"rgba(0, 0, 0, 0)","--main-color":"#444446","--main-bgcolor":"#ffffff","--topic-padding":"3px","--color":"#777777","--bgcolor":"#f6f6f6","--selected":"#4dc4ff","--accent-color":"#e64553","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea","--map-padding":"50px"}},Va={name:"Dark",type:"dark",palette:["#848FA0","#748BE9","#D2F9FE","#4145A5","#789AFA","#706CF4","#EF987F","#775DD5","#FCEECF","#DA7FBC"],cssVar:{"--node-gap-x":"30px","--node-gap-y":"10px","--main-gap-x":"65px","--main-gap-y":"45px","--root-radius":"30px","--main-radius":"20px","--root-color":"#ffffff","--root-bgcolor":"#2d3748","--root-border-color":"rgba(255, 255, 255, 0.1)","--main-color":"#ffffff","--main-bgcolor":"#4c4f69","--topic-padding":"3px","--color":"#cccccc","--bgcolor":"#252526","--selected":"#4dc4ff","--accent-color":"#789AFA","--panel-color":"#ffffff","--panel-bgcolor":"#2d3748","--panel-border-color":"#696969","--map-padding":"50px 80px"}};function Qs(t){return t.replace(/&/g,"&").replace(/{if(t.parent=e,t.children)for(let r=0;r{if(t.expanded=e,t.children)if(r===void 0||r>0){const n=r!==void 0?r-1:void 0;t.children.forEach(i=>{_n(i,e,n)})}else t.children.forEach(n=>{_n(n,!1)})};function Wa(t){if(t.id=vn(),t.children)for(let e=0;e0&&(a=180-a),s<0&&i<0&&(a=180+a),s>0&&i<0&&(a=360-a);const o=12,l=30,c=a+l,u=a-l;return{x1:r+Math.cos(Math.PI*c/180)*o,y1:n-Math.sin(Math.PI*c/180)*o,x2:r+Math.cos(Math.PI*u/180)*o,y2:n-Math.sin(Math.PI*u/180)*o}}function vn(){return(new Date().getTime().toString(16)+Math.random().toString(16).substr(2)).substr(2,16)}const dp=function(){const t=vn();return{topic:this.newTopicName,id:t}};function Ga(t){return JSON.parse(JSON.stringify(t,(e,r)=>{if(e!=="parent")return r}))}const nn=(t,e)=>{let r=0,n=0;for(;e&&e!==t;)r+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{offsetLeft:r,offsetTop:n}},et=(t,e)=>{for(const r in e)t.setAttribute(r,e[r])},ea=t=>t?t.tagName==="ME-TPC":!1,ji=t=>t.filter(e=>e.nodeObj.parent).filter((e,r,n)=>{for(let i=0;i{const e=/translate\(([^,]+),\s*([^)]+)\)/,r=t.match(e);return r?{x:parseFloat(r[1]),y:parseFloat(r[2])}:{x:0,y:0}},Ka=function(t){for(let e=0;e(t.LHS="lhs",t.RHS="rhs",t))(sr||{});const hp=t=>{const e=t.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},fp=t=>{const e=t.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},pp=t=>{t.selectNode(t.map.querySelector("me-root>me-tpc"))},mp=function(t,e){const r=e.parentElement.parentElement.parentElement.previousSibling;if(r){const n=r.firstChild;t.selectNode(n)}},gp=function(t,e){const r=e.parentElement.nextSibling;if(r&&r.firstChild){const n=r.firstChild.firstChild.firstChild;t.selectNode(n)}},fl=function(t,e){var r,n;const i=t.currentNode||((r=t.currentNodes)==null?void 0:r[0]);if(!i)return;const s=i.nodeObj,a=i.offsetParent.offsetParent.parentElement;s.parent?a.className===e?gp(t,i):(n=s.parent)!=null&&n.parent?mp(t,i):pp(t):e===sr.LHS?hp(t):fp(t)},pl=function(t,e){const r=t.currentNode;if(!r||!r.nodeObj.parent)return;const n=e+"Sibling",i=r.parentElement.parentElement[n];i?t.selectNode(i.firstChild.firstChild):t.selectNode(r)},yi=function(t,e,r){const{scaleVal:n,scaleSensitivity:i}=t;switch(e){case"in":t.scale(n+i,r);break;case"out":t.scale(n-i,r)}};function vp(t,e){e=e===!0?{}:e;const r=()=>{t.currentArrow?t.removeArrow():t.currentSummary?t.removeSummary(t.currentSummary.summaryObj.id):t.currentNodes&&t.removeNodes(t.currentNodes)};let n=!1,i=null;const s=o=>{const l=t.nodeData;if(o.key==="0")for(const c of l.children)_n(c,!1);if(o.key==="=")for(const c of l.children)_n(c,!0);if(["1","2","3","4","5","6","7","8","9"].includes(o.key))for(const c of l.children)_n(c,!0,Number(o.key)-1);t.refresh(),t.toCenter(),n=!1,i&&(clearTimeout(i),i=null,t.container.removeEventListener("keydown",s))},a={Enter:o=>{o.shiftKey?t.insertSibling("before"):o.ctrlKey||o.metaKey?t.insertParent():t.insertSibling("after")},Tab:()=>{t.addChild()},F1:()=>{t.toCenter()},F2:()=>{t.beginEdit()},ArrowUp:o=>{if(o.altKey)t.moveUpNode();else{if(o.metaKey||o.ctrlKey)return t.initSide();pl(t,"previous")}},ArrowDown:o=>{o.altKey?t.moveDownNode():pl(t,"next")},ArrowLeft:o=>{if(o.metaKey||o.ctrlKey)return t.initLeft();fl(t,sr.LHS)},ArrowRight:o=>{if(o.metaKey||o.ctrlKey)return t.initRight();fl(t,sr.RHS)},PageUp:()=>t.moveUpNode(),PageDown:()=>{t.moveDownNode()},c:o=>{(o.metaKey||o.ctrlKey)&&(t.waitCopy=t.currentNodes)},x:o=>{(o.metaKey||o.ctrlKey)&&(t.waitCopy=t.currentNodes,r())},v:o=>{!t.waitCopy||!t.currentNode||(o.metaKey||o.ctrlKey)&&(t.waitCopy.length===1?t.copyNode(t.waitCopy[0],t.currentNode):t.copyNodes(t.waitCopy,t.currentNode))},"=":o=>{(o.metaKey||o.ctrlKey)&&yi(t,"in")},"-":o=>{(o.metaKey||o.ctrlKey)&&yi(t,"out")},0:o=>{if(o.metaKey||o.ctrlKey){if(n)return;t.scale(1)}},k:o=>{(o.metaKey||o.ctrlKey)&&(n=!0,i&&(clearTimeout(i),t.container.removeEventListener("keydown",s)),i=window.setTimeout(()=>{n=!1,i=null},2e3),t.container.addEventListener("keydown",s))},Delete:r,Backspace:r,...e};t.container.onkeydown=o=>{if(o.preventDefault(),!t.editable)return;const l=a[o.key];l&&l(o)}}function bp(t){const{dragMoveHelper:e}=t,r=p=>{var g,v,w;if(p.button!==0)return;if((g=t.helper1)!=null&&g.moved){t.helper1.clear();return}if((v=t.helper2)!=null&&v.moved){t.helper2.clear();return}if(e.moved){e.clear();return}const y=p.target;if(y.tagName==="ME-EPD")p.ctrlKey||p.metaKey?t.expandNodeAll(y.previousSibling):t.expandNode(y.previousSibling);else if(y.tagName==="ME-TPC"&&t.currentNodes.length>1)t.selectNode(y);else if(!t.editable)return;const C=(w=y.parentElement)==null?void 0:w.parentElement;C.getAttribute("class")==="topiclinks"?t.selectArrow(y.parentElement):C.getAttribute("class")==="summary"&&t.selectSummary(y.parentElement)},n=p=>{var g;if(!t.editable)return;const v=p.target;ea(v)&&t.beginEdit(v);const w=(g=v.parentElement)==null?void 0:g.parentElement;w.getAttribute("class")==="topiclinks"?t.editArrowLabel(v.parentElement):w.getAttribute("class")==="summary"&&t.editSummary(v.parentElement)};let i=0;const s=p=>{if(p.pointerType==="mouse")return;const g=new Date().getTime(),v=g-i;v<300&&v>0&&n(p),i=g},a=p=>{e.moved=!1;const g=t.mouseSelectionButton===0?2:0;if(p.button!==g&&p.pointerType==="mouse")return;e.x=p.clientX,e.y=p.clientY;const v=p.target;v.className!=="circle"&&v.contentEditable!=="plaintext-only"&&(e.mousedown=!0,v.setPointerCapture(p.pointerId))},o=p=>{if(p.target.contentEditable!=="plaintext-only"){const g=p.clientX-e.x,v=p.clientY-e.y;e.onMove(g,v)}e.x=p.clientX,e.y=p.clientY},l=p=>{const g=t.mouseSelectionButton===0?2:0;if(p.button!==g&&p.pointerType==="mouse")return;const v=p.target;v.hasPointerCapture&&v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),e.clear()},c=p=>{if(p.preventDefault(),p.button!==2||!t.editable)return;const g=p.target;ea(g)&&!g.classList.contains("selected")&&t.selectNode(g),setTimeout(()=>{t.dragMoveHelper.moved||t.bus.fire("showContextMenu",p)},200)},u=p=>{p.stopPropagation(),p.preventDefault(),p.ctrlKey||p.metaKey?p.deltaY<0?yi(t,"in",t.dragMoveHelper):t.scaleVal-t.scaleSensitivity>0&&yi(t,"out",t.dragMoveHelper):p.shiftKey?t.move(-p.deltaY,0):t.move(-p.deltaX,-p.deltaY)},{container:f}=t;return Ka([{dom:f,evt:"pointerdown",func:a},{dom:f,evt:"pointermove",func:o},{dom:f,evt:"pointerup",func:l},{dom:f,evt:"pointerup",func:s},{dom:f,evt:"click",func:r},{dom:f,evt:"dblclick",func:n},{dom:f,evt:"contextmenu",func:c},{dom:f,evt:"wheel",func:typeof t.handleWheel=="function"?t.handleWheel:u}])}function yp(){return{handlers:{},addListener:function(t,e){this.handlers[t]===void 0&&(this.handlers[t]=[]),this.handlers[t].push(e)},fire:function(t,...e){if(this.handlers[t]instanceof Array){const r=this.handlers[t];for(let n=0;n{s.direction===0?n+=1:s.direction===1?i+=1:n<=i?(s.direction=0,n+=1):(s.direction=1,i+=1)})}xp(this,r,e)},xp=function(t,e,r){const n=wi.createElement("me-main");n.className=sr.LHS;const i=wi.createElement("me-main");i.className=sr.RHS;for(let s=0;s`${Qs(n)}`).join(""),t.appendChild(r),t.icons=r}else t.icons&&(t.icons=void 0);if(e.tags&&e.tags.length){const r=Pt.createElement("div");r.className="tags",e.tags.forEach(n=>{const i=Pt.createElement("span");typeof n=="string"?i.textContent=n:(i.textContent=n.text,n.className&&(i.className=n.className),n.style&&Object.assign(i.style,n.style)),r.appendChild(i)}),t.appendChild(r),t.tags=r}else t.tags&&(t.tags=void 0)},kp=function(t,e){const r=Pt.createElement("me-wrapper"),{p:n,tpc:i}=this.createParent(t);if(r.appendChild(n),!e&&t.children&&t.children.length>0){const s=Ya(t.expanded);if(n.appendChild(s),t.expanded!==!1){const a=Sp(this,t.children);r.appendChild(a)}}return{grp:r,top:n,tpc:i}},Tp=function(t){const e=Pt.createElement("me-parent"),r=this.createTopic(t);return Ui.call(this,r,t),e.appendChild(r),{p:e,tpc:r}},Ep=function(t){const e=Pt.createElement("me-children");return e.append(...t),e},Ap=function(t){const e=Pt.createElement("me-tpc");return e.nodeObj=t,e.dataset.nodeid="me"+t.id,e.draggable=this.draggable,e};function qu(t){const e=Pt.createRange();e.selectNodeContents(t);const r=window.getSelection();r&&(r.removeAllRanges(),r.addRange(e))}const Cp=function(t){if(!t)return;const e=Pt.createElement("div"),r=t.nodeObj,n=r.topic;t.appendChild(e),e.id="input-box",e.textContent=n,e.contentEditable="plaintext-only",e.spellcheck=!1;const i=getComputedStyle(t);e.style.cssText=`min-width:${t.offsetWidth-8}px; - color:${i.color}; - padding:${i.padding}; - margin:${i.margin}; - font:${i.font}; - background-color:${i.backgroundColor!=="rgba(0, 0, 0, 0)"&&i.backgroundColor}; - border-radius:${i.borderRadius};`,this.direction===0&&(e.style.right="0"),qu(e),this.bus.fire("operation",{name:"beginEdit",obj:t.nodeObj}),e.addEventListener("keydown",s=>{s.stopPropagation();const a=s.key;if(a==="Enter"||a==="Tab"){if(s.shiftKey)return;s.preventDefault(),e.blur(),this.container.focus()}}),e.addEventListener("blur",()=>{var s;if(!e)return;const a=((s=e.textContent)==null?void 0:s.trim())||"";a===""?r.topic=n:(r.topic=a,this.markdown?t.text.innerHTML=this.markdown(r.topic,r):t.text.textContent=a),e.remove(),Ui.call(this,t,r),a!==n&&(this.linkDiv(),this.bus.fire("operation",{name:"finishEdit",obj:r,origin:n}))})},Ya=function(t){const e=Pt.createElement("me-epd");return e.expanded=t!==!1,e.className=t!==!1?"minus":"",e},pn=document,Kt="http://www.w3.org/2000/svg",ta=function(t,e,r,n={}){const{anchor:i="middle",color:s,dataType:a}=n,o=document.createElementNS(Kt,"text");return et(o,{"text-anchor":i,x:e+"",y:r+"",fill:s||(i==="middle"?"rgb(235, 95, 82)":"#666")}),a&&(o.dataset.type=a),o.innerHTML=t,o},ju=function(t,e,r){const n=pn.createElementNS(Kt,"path");return et(n,{d:t,stroke:e||"#666",fill:"none","stroke-width":r}),n},Qn=function(t){const e=pn.createElementNS(Kt,"svg");return e.setAttribute("class",t),e.setAttribute("overflow","visible"),e},ml=function(){const t=pn.createElementNS(Kt,"line");return t.setAttribute("stroke","#4dc4ff"),t.setAttribute("fill","none"),t.setAttribute("stroke-width","2"),t.setAttribute("opacity","0.45"),t},Mp=function(t,e,r,n){const i=pn.createElementNS(Kt,"g");return[{name:"line",d:t},{name:"arrow1",d:e},{name:"arrow2",d:r}].forEach((s,a)=>{const o=s.d,l=pn.createElementNS(Kt,"path"),c={d:o,stroke:(n==null?void 0:n.stroke)||"rgb(235, 95, 82)",fill:"none","stroke-linecap":(n==null?void 0:n.strokeLinecap)||"cap","stroke-width":String((n==null?void 0:n.strokeWidth)||"2")};(n==null?void 0:n.opacity)!==void 0&&(c.opacity=String(n.opacity)),et(l,c),a===0&&l.setAttribute("stroke-dasharray",(n==null?void 0:n.strokeDasharray)||"8,2");const u=pn.createElementNS(Kt,"path");et(u,{d:o,stroke:"transparent",fill:"none","stroke-width":"15"}),i.appendChild(u),i.appendChild(l),i[s.name]=l}),i},Uu=function(t,e,r){if(!e)return;const n=pn.createElement("div");t.nodes.appendChild(n);const i=e.innerHTML;n.id="input-box",n.textContent=i,n.contentEditable="plaintext-only",n.spellcheck=!1;const s=e.getBBox();n.style.cssText=` - min-width:${Math.max(88,s.width)}px; - position:absolute; - left:${s.x}px; - top:${s.y}px; - padding: 2px 4px; - margin: -2px -4px; - `,qu(n),t.scrollIntoView(n),n.addEventListener("keydown",a=>{a.stopPropagation();const o=a.key;if(o==="Enter"||o==="Tab"){if(a.shiftKey)return;a.preventDefault(),n.blur(),t.container.focus()}}),n.addEventListener("blur",()=>{var a;if(!n)return;const o=((a=n.textContent)==null?void 0:a.trim())||"";o===""?r.label=i:r.label=o,n.remove(),o!==i&&(e.innerHTML=r.label,"parent"in r?t.bus.fire("operation",{name:"finishEditSummary",obj:r}):t.bus.fire("operation",{name:"finishEditArrowLabel",obj:r}))})},Np=function(t){const e=this.map.querySelector("me-root"),r=e.offsetTop,n=e.offsetLeft,i=e.offsetWidth,s=e.offsetHeight,a=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="";for(let o=0;o{const F=document.createElement("div");return F.innerText=_,F.className="tips",F},n=(_,F,G)=>{const W=document.createElement("li");return W.id=_,W.innerHTML=`${Qs(F)}${Qs(G)}`,W},i=vl[t.locale]?t.locale:"en",s=vl[i],a=n("cm-add_child",s.addChild,"Tab"),o=n("cm-add_parent",s.addParent,"Ctrl + Enter"),l=n("cm-add_sibling",s.addSibling,"Enter"),c=n("cm-remove_child",s.removeNode,"Delete"),u=n("cm-fucus",s.focus,""),f=n("cm-unfucus",s.cancelFocus,""),p=n("cm-up",s.moveUp,"PgUp"),g=n("cm-down",s.moveDown,"Pgdn"),v=n("cm-link",s.link,""),w=n("cm-link-bidirectional",s.linkBidirectional,""),y=n("cm-summary",s.summary,""),C=document.createElement("ul");if(C.className="menu-list",C.appendChild(a),C.appendChild(o),C.appendChild(l),C.appendChild(c),e.focus&&(C.appendChild(u),C.appendChild(f)),C.appendChild(p),C.appendChild(g),C.appendChild(y),e.link&&(C.appendChild(v),C.appendChild(w)),e&&e.extend)for(let _=0;_{F.onclick(W)}}const S=document.createElement("div");S.className="context-menu",S.appendChild(C),S.hidden=!0,t.container.append(S);let T=!0;const D=_=>{const F=_.target;if(ea(F)){F.parentElement.tagName==="ME-ROOT"?T=!0:T=!1,T?(u.className="disabled",p.className="disabled",g.className="disabled",o.className="disabled",l.className="disabled",c.className="disabled"):(u.className="",p.className="",g.className="",o.className="",l.className="",c.className=""),S.hidden=!1,C.style.top="",C.style.bottom="",C.style.left="",C.style.right="";const G=C.getBoundingClientRect(),W=C.offsetHeight,fe=C.offsetWidth,ve=_.clientY-G.top,Te=_.clientX-G.left;W+ve>window.innerHeight?(C.style.top="",C.style.bottom="0px"):(C.style.bottom="",C.style.top=ve+15+"px"),fe+Te>window.innerWidth?(C.style.left="",C.style.right="0px"):(C.style.right="",C.style.left=Te+10+"px")}};t.bus.addListener("showContextMenu",D),S.onclick=_=>{_.target===S&&(S.hidden=!0)},a.onclick=()=>{t.addChild(),S.hidden=!0},o.onclick=()=>{t.insertParent(),S.hidden=!0},l.onclick=()=>{T||(t.insertSibling("after"),S.hidden=!0)},c.onclick=()=>{T||(t.removeNodes(t.currentNodes||[]),S.hidden=!0)},u.onclick=()=>{T||(t.focusNode(t.currentNode),S.hidden=!0)},f.onclick=()=>{t.cancelFocus(),S.hidden=!0},p.onclick=()=>{T||(t.moveUpNode(),S.hidden=!0)},g.onclick=()=>{T||(t.moveDownNode(),S.hidden=!0)};const I=_=>{S.hidden=!0;const F=t.currentNode,G=r(s.clickTips);t.container.appendChild(G),t.map.addEventListener("click",W=>{W.preventDefault(),G.remove();const fe=W.target;(fe.parentElement.tagName==="ME-PARENT"||fe.parentElement.tagName==="ME-ROOT")&&t.createArrow(F,fe,_)},{once:!0})};return v.onclick=()=>I(),w.onclick=()=>I({bidirectional:!0}),y.onclick=()=>{S.hidden=!0,t.createSummary(),t.unselectNodes(t.currentNodes)},()=>{a.onclick=null,o.onclick=null,l.onclick=null,c.onclick=null,u.onclick=null,f.onclick=null,p.onclick=null,g.onclick=null,v.onclick=null,y.onclick=null,S.onclick=null,t.container.oncontextmenu=null}}const ra=document,Ip=function(t,e){if(!e)return na(t),t;let r=t.querySelector(".insert-preview");const n=`insert-preview ${e} show`;return r||(r=ra.createElement("div"),t.appendChild(r)),r.className=n,t},na=function(t){if(!t)return;const e=t.querySelectorAll(".insert-preview");for(const r of e||[])r.remove()},bl=function(t,e){for(const r of e){const n=r.parentElement.parentElement.contains(t);if(!(t&&t.tagName==="ME-TPC"&&t!==r&&!n&&t.nodeObj.parent))return!1}return!0},Rp=function(t){const e=document.createElement("div");return e.className="mind-elixir-ghost",t.container.appendChild(e),e};class Op{constructor(e){L0(this,"mind"),L0(this,"isMoving",!1),L0(this,"interval",null),L0(this,"speed",20),this.mind=e}move(e,r){this.isMoving||(this.isMoving=!0,this.interval=setInterval(()=>{this.mind.move(e*this.speed*this.mind.scaleVal,r*this.speed*this.mind.scaleVal)},100))}stop(){this.isMoving=!1,clearInterval(this.interval)}}function _p(t){let e=null,r=null;const n=Rp(t),i=new Op(t),s=l=>{t.selection.cancel();const c=l.target;if((c==null?void 0:c.tagName)!=="ME-TPC"){l.preventDefault();return}let u=t.currentNodes;u!=null&&u.includes(c)||(t.selectNode(c),u=t.currentNodes),t.dragged=u,u.length>1?n.innerHTML=u.length+"":n.innerHTML=c.innerHTML;for(const f of u)f.parentElement.parentElement.style.opacity="0.5";l.dataTransfer.setDragImage(n,0,0),l.dataTransfer.dropEffect="move",t.dragMoveHelper.clear()},a=l=>{const{dragged:c}=t;if(!c)return;i.stop();for(const f of c)f.parentElement.parentElement.style.opacity="1";const u=l.target;u.style.opacity="",r&&(na(r),e==="before"?t.moveNodeBefore(c,r):e==="after"?t.moveNodeAfter(c,r):e==="in"&&t.moveNodeIn(c,r),t.dragged=null,n.innerHTML="")},o=l=>{l.preventDefault();const c=12*t.scaleVal,{dragged:u}=t;if(!u)return;const f=t.container.getBoundingClientRect();l.clientXf.x+f.width-50?i.move(-1,0):l.clientYf.y+f.height-50?i.move(0,-1):i.stop(),na(r);const p=ra.elementFromPoint(l.clientX,l.clientY-c);if(bl(p,u)){r=p;const g=p.getBoundingClientRect(),v=g.y;l.clientY>v+g.height?e="after":e="in"}else{const g=ra.elementFromPoint(l.clientX,l.clientY+c),v=g.getBoundingClientRect();if(bl(g,u)){r=g;const w=v.y;l.clientYe.id)}:{type:"nodes",value:[t.obj.id]}};function zp(t){let e=[],r=-1,n=t.getData(),i=[];t.undo=function(){if(r>-1){const l=e[r];n=l.prev,t.refresh(l.prev);try{l.currentTarget.type==="nodes"&&(l.operation==="removeNodes"?t.selectNodes(l.currentTarget.value.map(c=>this.findEle(c))):t.selectNodes(l.currentSelected.map(c=>this.findEle(c))))}catch{}finally{r--}}},t.redo=function(){if(rthis.findEle(c))):t.selectNodes(l.currentTarget.value.map(c=>this.findEle(c))))}catch{}}};const s=function(l){if(l.name==="beginEdit")return;e=e.slice(0,r+1);const c=t.getData(),u={prev:n,operation:l.name,currentSelected:i.map(f=>f.id),currentTarget:Lp(l),next:c};e.push(u),n=c,r=e.length-1},a=function(l){(l.metaKey||l.ctrlKey)&&(l.shiftKey&&l.key==="Z"||l.key==="y")?t.redo():(l.metaKey||l.ctrlKey)&&l.key==="z"&&t.undo()},o=function(l){i=t.currentNodes.map(c=>c.nodeObj)};return t.bus.addListener("operation",s),t.bus.addListener("selectNodes",o),t.container.addEventListener("keydown",a),()=>{t.bus.removeListener("operation",s),t.bus.removeListener("selectNodes",o),t.container.removeEventListener("keydown",a)}}const $p='',Fp='',Bp='',Pp='',Hp='',qp='',jp='',Up='',Vp=t=>async e=>{var r;try{const n=`${((r=e.nodeData)==null?void 0:r.topic)||"思维导图"}_${new Date().toISOString().slice(0,10)}`,i=` - .topic { font-family: Arial, sans-serif; font-size: 14px; color: #333; } - .markdown-content { font-size: 12px; line-height: 1.3; } - - /* 表格样式 */ - .markdown-table { - border-collapse: collapse; - width: 100%; - margin: 4px 0; - font-size: 11px; - border: 1px solid #e0e0e0; - border-radius: 6px; - box-shadow: 0 2px 8px rgba(0,0,0,0.08); - background-color: #fafafa; - overflow: hidden; - white-space: normal; - } - - .markdown-table th, - .markdown-table td { - border: 1px solid #e0e0e0; - padding: 8px 12px; - text-align: left; - vertical-align: top; - position: relative; - white-space: normal; - } - - .markdown-table th { - background-color: #f5f5f5; - font-weight: 600; - color: #333; - text-align: center; - border-bottom: 1px solid #d0d0d0; - } - - .markdown-table td { - background-color: #fff; - } - - .markdown-table tr:nth-child(even) td { - background-color: #f8f8f8; - } - - .markdown-table tr:hover td { - background-color: #f0f8ff; - } - - /* 移除多余的边框,保持简洁 */ - .markdown-table th:not(:last-child), - .markdown-table td:not(:last-child) { - border-right: 1px solid #e0e0e0; - } - - .markdown-table tr:not(:last-child) td { - border-bottom: 1px solid #e0e0e0; - } - `,s=await e.exportSvg(!0,i);if(!s)return;const a=URL.createObjectURL(s),o=document.createElement("a");o.href=a,o.download=`${n}.${t}`,o.click(),URL.revokeObjectURL(a)}catch{alert(`导出${t.toUpperCase()}失败,请重试`)}},Wp={side:$p,left:Fp,right:Bp,full:Pp,living:Hp,zoomin:qp,zoomout:jp,exportSvg:Up},Vr=(t,e)=>{const r=document.createElement("span");return r.id=t,r.innerHTML=Wp[e],r};function Gp(t){try{const e=document.createElement("div"),r=Vr("fullscreen","full"),n=Vr("toCenter","living"),i=Vr("zoomout","zoomout"),s=Vr("zoomin","zoomin"),a=Vr("exportSvg","exportSvg");a.title="导出SVG矢量图";const o=document.createElement("span");return o.innerText="100%",e.appendChild(r),e.appendChild(n),e.appendChild(i),e.appendChild(s),e.appendChild(a),e.className="mind-elixir-toolbar rb",r.onclick=()=>{document.fullscreenElement===t.el?(document.exitFullscreen(),setTimeout(()=>{t.el.focus()},100)):(t.el.requestFullscreen(),setTimeout(()=>{},100))},n.onclick=()=>{t.toCenter()},i.onclick=()=>{t.scale(t.scaleVal-t.scaleSensitivity)},s.onclick=()=>{t.scale(t.scaleVal+t.scaleSensitivity)},a.onclick=()=>{Vp("svg")(t)},setTimeout(()=>{const l=document.getElementById("exportSvg")},1e3),e}catch{const e=document.createElement("div");return e.className="mind-elixir-toolbar rb",e}}function Kp(t){const e=document.createElement("div"),r=Vr("tbltl","left"),n=Vr("tbltr","right"),i=Vr("tblts","side");return e.appendChild(r),e.appendChild(n),e.appendChild(i),e.className="mind-elixir-toolbar lt",r.onclick=()=>{t.initLeft()},n.onclick=()=>{t.initRight()},i.onclick=()=>{t.initSide()},e}function Yp(t){try{if(!t.container)return;const e=Gp(t),r=Kp(t);t.container.append(e),t.container.append(r)}catch{}}/*! @viselect/vanilla v3.9.0 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */class Xp{constructor(){this._listeners=new Map,this.on=this.addEventListener,this.off=this.removeEventListener,this.emit=this.dispatchEvent}addEventListener(e,r){const n=this._listeners.get(e)??new Set;return this._listeners.set(e,n),n.add(r),this}removeEventListener(e,r){var n;return(n=this._listeners.get(e))==null||n.delete(r),this}dispatchEvent(e,...r){let n=!0;for(const i of this._listeners.get(e)??[])n=i(...r)!==!1&&n;return n}unbindAllListeners(){this._listeners.clear()}}const yl=(t,e="px")=>typeof t=="number"?t+e:t,Br=({style:t},e,r)=>{if(typeof e=="object")for(const[n,i]of Object.entries(e))i!==void 0&&(t[n]=yl(i));else r!==void 0&&(t[e]=yl(r))},wl=(t=0,e=0,r=0,n=0)=>{const i={x:t,y:e,width:r,height:n,top:e,left:t,right:t+r,bottom:e+n};return{...i,toJSON:()=>JSON.stringify(i)}},Jp=t=>{let e,r=-1,n=!1;return{next:(...i)=>{e=i,n||(n=!0,r=requestAnimationFrame(()=>{t(...e),n=!1}))},cancel:()=>{cancelAnimationFrame(r),n=!1}}},xl=(t,e,r="touch")=>{switch(r){case"center":{const n=e.left+e.width/2,i=e.top+e.height/2;return n>=t.left&&n<=t.right&&i>=t.top&&i<=t.bottom}case"cover":return e.left>=t.left&&e.top>=t.top&&e.right<=t.right&&e.bottom<=t.bottom;case"touch":return t.right>=e.left&&t.left<=e.right&&t.bottom>=e.top&&t.top<=e.bottom}},Zp=()=>matchMedia("(hover: none), (pointer: coarse)").matches,Qp=()=>"safari"in window,ia=t=>Array.isArray(t)?t:[t],Wu=t=>(e,r,n,i={})=>{(e instanceof HTMLCollection||e instanceof NodeList)&&(e=Array.from(e)),r=ia(r),e=ia(e);for(const s of e)if(s)for(const a of r)s[t](a,n,{capture:!1,...i})},Pr=Wu("addEventListener"),Qt=Wu("removeEventListener"),z0=t=>{var e;const{clientX:r,clientY:n,target:i}=((e=t.touches)==null?void 0:e[0])??t;return{x:r,y:n,target:i}},Sn=(t,e=document)=>ia(t).map(r=>typeof r=="string"?Array.from(e.querySelectorAll(r)):r instanceof Element?r:null).flat().filter(Boolean),e4=(t,e)=>e.some(r=>typeof r=="number"?t.button===r:typeof r=="object"?r.button!==t.button?!1:r.modifiers.every(n=>{switch(n){case"alt":return t.altKey;case"ctrl":return t.ctrlKey||t.metaKey;case"shift":return t.shiftKey}}):!1),{abs:ln,max:Sl,min:kl,ceil:Tl}=Math,El=(t=[])=>({stored:t,selected:[],touched:[],changed:{added:[],removed:[]}}),Gu=class extends Xp{constructor(t){var e,r,n,i,s;super(),this._selection=El(),this._targetBoundaryScrolled=!0,this._selectables=[],this._areaLocation={y1:0,x2:0,y2:0,x1:0},this._areaRect=wl(),this._singleClick=!0,this._scrollAvailable=!0,this._scrollingActive=!1,this._scrollSpeed={x:0,y:0},this._scrollDelta={x:0,y:0},this._lastMousePosition={x:0,y:0},this.enable=this._toggleStartEvents,this.disable=this._toggleStartEvents.bind(this,!1),this._options={selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,startAreas:["html"],boundaries:["html"],container:"body",...t,behaviour:{overlap:"invert",intersect:"touch",triggers:[0],...t.behaviour,startThreshold:(e=t.behaviour)!=null&&e.startThreshold?typeof t.behaviour.startThreshold=="number"?t.behaviour.startThreshold:{x:10,y:10,...t.behaviour.startThreshold}:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,...(r=t.behaviour)==null?void 0:r.scrolling,startScrollMargins:{x:0,y:0,...(i=(n=t.behaviour)==null?void 0:n.scrolling)==null?void 0:i.startScrollMargins}}},features:{range:!0,touch:!0,deselectOnBlur:!1,...t.features,singleTap:{allow:!0,intersect:"native",...(s=t.features)==null?void 0:s.singleTap}}};for(const c of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[c]=="function"&&(this[c]=this[c].bind(this));const{document:a,selectionAreaClass:o,selectionContainerClass:l}=this._options;this._area=a.createElement("div"),this._clippingElement=a.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(o),l&&this._clippingElement.classList.add(l),Br(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),Br(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=Jp(c=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",c),this._redrawSelectionArea()}),this.enable()}_toggleStartEvents(t=!0){const{document:e,features:r}=this._options,n=t?Pr:Qt;n(e,"mousedown",this._onTapStart),r.touch&&n(e,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(t,e=!1){const{x:r,y:n,target:i}=z0(t),{document:s,startAreas:a,boundaries:o,features:l,behaviour:c}=this._options,u=i.getBoundingClientRect();if(t instanceof MouseEvent&&!e4(t,c.triggers))return;const f=Sn(a,s),p=Sn(o,s);this._targetElement=p.find(y=>xl(y.getBoundingClientRect(),u));const g=t.composedPath(),v=f.find(y=>g.includes(y));if(this._targetBoundary=p.find(y=>g.includes(y)),!this._targetElement||!v||!this._targetBoundary||!e&&this._emitEvent("beforestart",t)===!1)return;this._areaLocation={x1:r,y1:n,x2:0,y2:0};const w=s.scrollingElement??s.body;this._scrollDelta={x:w.scrollLeft,y:w.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),Pr(s,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),Pr(s,["mouseup","touchcancel","touchend"],this._onTapStop),Pr(s,"scroll",this._onScroll),l.deselectOnBlur&&(this._targetBoundaryScrolled=!1,Pr(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(t){const{singleTap:{intersect:e},range:r}=this._options.features,n=z0(t);let i;if(e==="native")i=n.target;else if(e==="touch"){this.resolveSelectables();const{x:a,y:o}=n;i=this._selectables.find(l=>{const{right:c,left:u,top:f,bottom:p}=l.getBoundingClientRect();return au&&of})}if(!i)return;for(this.resolveSelectables();!this._selectables.includes(i);)if(i.parentElement)i=i.parentElement;else{this._targetBoundaryScrolled||this.clearSelection();return}const{stored:s}=this._selection;if(this._emitEvent("start",t),t.shiftKey&&r&&this._latestElement){const a=this._latestElement,[o,l]=a.compareDocumentPosition(i)&4?[i,a]:[a,i],c=[...this._selectables.filter(u=>u.compareDocumentPosition(o)&4&&u.compareDocumentPosition(l)&2),o,l];this.select(c),this._latestElement=a}else s.includes(i)&&(s.length===1||t.ctrlKey||s.every(a=>this._selection.stored.includes(a)))?this.deselect(i):(this.select(i),this._latestElement=i)}_delayedTapMove(t){const{container:e,document:r,behaviour:{startThreshold:n}}=this._options,{x1:i,y1:s}=this._areaLocation,{x:a,y:o}=z0(t);if(typeof n=="number"&&ln(a+o-(i+s))>=n||typeof n=="object"&&ln(a-i)>=n.x||ln(o-s)>=n.y){if(Qt(r,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",t)===!1){Qt(r,["mouseup","touchcancel","touchend"],this._onTapStop);return}Pr(r,["mousemove","touchmove"],this._onTapMove,{passive:!1}),Br(this._area,"display","block"),Sn(e,r)[0].appendChild(this._clippingElement),this.resolveSelectables(),this._singleClick=!1,this._targetRect=this._targetElement.getBoundingClientRect(),this._scrollAvailable=this._targetElement.scrollHeight!==this._targetElement.clientHeight||this._targetElement.scrollWidth!==this._targetElement.clientWidth,this._scrollAvailable&&(Pr(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),Pr(this._options.document,"keydown",this._keyboardScroll,{passive:!1}),this._selectables=this._selectables.filter(l=>this._targetElement.contains(l))),this._setupSelectionArea(),this._emitEvent("start",t),this._onTapMove(t)}this._handleMoveEvent(t)}_setupSelectionArea(){const{_clippingElement:t,_targetElement:e,_area:r}=this,n=this._targetRect=e.getBoundingClientRect();this._scrollAvailable?(Br(t,{top:n.top,left:n.left,width:n.width,height:n.height}),Br(r,{marginTop:-n.top,marginLeft:-n.left})):(Br(t,{top:0,left:0,width:"100%",height:"100%"}),Br(r,{marginTop:0,marginLeft:0}))}_onTapMove(t){const{_scrollSpeed:e,_areaLocation:r,_options:n,_frame:i}=this,{speedDivider:s}=n.behaviour.scrolling,a=this._targetElement,{x:o,y:l}=z0(t);if(r.x2=o,r.y2=l,this._lastMousePosition.x=o,this._lastMousePosition.y=l,this._scrollAvailable&&!this._scrollingActive&&(e.y||e.x)){this._scrollingActive=!0;const c=()=>{if(!e.x&&!e.y){this._scrollingActive=!1;return}const{scrollTop:u,scrollLeft:f}=a;e.y&&(a.scrollTop+=Tl(e.y/s),r.y1-=a.scrollTop-u),e.x&&(a.scrollLeft+=Tl(e.x/s),r.x1-=a.scrollLeft-f),i.next(t),requestAnimationFrame(c)};requestAnimationFrame(c)}else i.next(t);this._handleMoveEvent(t)}_handleMoveEvent(t){const{features:e}=this._options;(e.touch&&Zp()||this._scrollAvailable&&Qp())&&t.preventDefault()}_onScroll(){const{_scrollDelta:t,_options:{document:e}}=this,{scrollTop:r,scrollLeft:n}=e.scrollingElement??e.body;this._areaLocation.x1+=t.x-n,this._areaLocation.y1+=t.y-r,t.x=n,t.y=r,this._setupSelectionArea(),this._frame.next(null)}_onStartAreaScroll(){this._targetBoundaryScrolled=!0,Qt(this._targetElement,"scroll",this._onStartAreaScroll)}_wheelScroll(t){const{manualSpeed:e}=this._options.behaviour.scrolling,r=t.deltaY?t.deltaY>0?1:-1:0,n=t.deltaX?t.deltaX>0?1:-1:0;this._scrollSpeed.y+=r*e,this._scrollSpeed.x+=n*e,this._onTapMove(t),t.preventDefault()}_keyboardScroll(t){const{manualSpeed:e}=this._options.behaviour.scrolling,r=t.key==="ArrowLeft"?-1:t.key==="ArrowRight"?1:0,n=t.key==="ArrowUp"?-1:t.key==="ArrowDown"?1:0;this._scrollSpeed.x+=Math.sign(r)*e,this._scrollSpeed.y+=Math.sign(n)*e,t.preventDefault(),this._onTapMove({clientX:this._lastMousePosition.x,clientY:this._lastMousePosition.y,preventDefault:()=>{}})}_recalculateSelectionAreaRect(){const{_scrollSpeed:t,_areaLocation:e,_targetElement:r,_options:n}=this,{scrollTop:i,scrollHeight:s,clientHeight:a,scrollLeft:o,scrollWidth:l,clientWidth:c}=r,u=this._targetRect,{x1:f,y1:p}=e;let{x2:g,y2:v}=e;const{behaviour:{scrolling:{startScrollMargins:w}}}=n;gu.right-w.x?(t.x=l-o-c?ln(u.left+u.width-g-w.x):0,g=g>u.right?u.right:g):t.x=0,vu.bottom-w.y?(t.y=s-i-a?ln(u.top+u.height-v-w.y):0,v=v>u.bottom?u.bottom:v):t.y=0;const y=kl(f,g),C=kl(p,v),S=Sl(f,g),T=Sl(p,v);this._areaRect=wl(y,C,S-y,T-C)}_redrawSelectionArea(){const{x:t,y:e,width:r,height:n}=this._areaRect,{style:i}=this._area;i.left=`${t}px`,i.top=`${e}px`,i.width=`${r}px`,i.height=`${n}px`}_onTapStop(t,e){var r;const{document:n,features:i}=this._options,{_singleClick:s}=this;Qt(this._targetElement,"scroll",this._onStartAreaScroll),Qt(n,["mousemove","touchmove"],this._delayedTapMove),Qt(n,["touchmove","mousemove"],this._onTapMove),Qt(n,["mouseup","touchcancel","touchend"],this._onTapStop),Qt(n,"scroll",this._onScroll),this._keepSelection(),t&&s&&i.singleTap.allow?this._onSingleTap(t):!s&&!e&&(this._updateElementSelection(),this._emitEvent("stop",t)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,Qt(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),Qt(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),(r=this._frame)==null||r.cancel(),Br(this._area,"display","none")}_updateElementSelection(){const{_selectables:t,_options:e,_selection:r,_areaRect:n}=this,{stored:i,selected:s,touched:a}=r,{intersect:o,overlap:l}=e.behaviour,c=l==="invert",u=[],f=[],p=[];for(let v=0;v!s.includes(v)));const g=l==="keep";for(let v=0;v!s.includes(o));switch(t.behaviour.overlap){case"drop":{e.stored=[...a,...s.filter(o=>!i.includes(o))];break}case"invert":{e.stored=[...a,...s.filter(o=>!n.removed.includes(o))];break}case"keep":{e.stored=[...s,...r.filter(o=>!s.includes(o))];break}}}trigger(t,e=!0){this._onTapStart(t,e)}resolveSelectables(){this._selectables=Sn(this._options.selectables,this._options.document)}clearSelection(t=!0,e=!1){const{selected:r,stored:n,changed:i}=this._selection;i.added=[],i.removed.push(...r,...t?n:[]),e||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=El(t?[]:n)}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}getSelectables(){return this._selectables}setAreaLocation(t){Object.assign(this._areaLocation,t),this._redrawSelectionArea()}getAreaLocation(){return this._areaLocation}cancel(t=!1){this._onTapStop(null,!t)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(t,e=!1){const{changed:r,selected:n,stored:i}=this._selection,s=Sn(t,this._options.document).filter(a=>!n.includes(a)&&!i.includes(a));return i.push(...s),n.push(...s),r.added.push(...s),r.removed=[],this._latestElement=void 0,e||(this._emitEvent("move",null),this._emitEvent("stop",null)),s}deselect(t,e=!1){const{selected:r,stored:n,changed:i}=this._selection,s=Sn(t,this._options.document).filter(a=>r.includes(a)||n.includes(a));this._selection.stored=n.filter(a=>!s.includes(a)),this._selection.selected=r.filter(a=>!s.includes(a)),this._selection.changed.added=[],this._selection.changed.removed.push(...s.filter(a=>!i.removed.includes(a))),this._latestElement=void 0,e||(this._emitEvent("move",null),this._emitEvent("stop",null))}};Gu.version="3.9.0";let t4=Gu;function r4(t){const e=t.mouseSelectionButton===2?[2]:[0],r=new t4({selectables:[".map-container me-tpc"],boundaries:[t.container],container:t.selectionContainer,features:{touch:!1},behaviour:{triggers:e,scrolling:{speedDivider:10,manualSpeed:750,startScrollMargins:{x:10,y:10}}}}).on("beforestart",({event:n})=>{var i;const s=n.target;if(s.id==="input-box"||s.className==="circle"||(i=t.container.querySelector(".context-menu"))!=null&&i.contains(s))return!1;if(!n.ctrlKey&&!n.metaKey){if(s.tagName==="ME-TPC"&&s.classList.contains("selected"))return!1;t.clearSelection()}const a=r.getSelectionArea();return a.style.background="#4f90f22d",a.style.border="1px solid #4f90f2",a.parentElement&&(a.parentElement.style.zIndex="9999"),!0}).on("move",({store:{changed:{added:n,removed:i}}})=>{if(n.length>0||i.length>0,n.length>0){for(const s of n)s.className="selected";t.currentNodes=[...t.currentNodes,...n],t.bus.fire("selectNodes",n.map(s=>s.nodeObj))}if(i.length>0){for(const s of i)s.classList.remove("selected");t.currentNodes=t.currentNodes.filter(s=>!(i!=null&&i.includes(s))),t.bus.fire("unselectNodes",i.map(s=>s.nodeObj))}});t.selection=r}const n4=function(t,e=!0){this.theme=t;const r={...(t.type==="dark"?Va:Ua).cssVar,...t.cssVar},n=Object.keys(r);for(let i=0;i{var e;const r=(e=t.parent)==null?void 0:e.children,n=(r==null?void 0:r.indexOf(t))??0;return{siblings:r,index:n}};function i4(t){const{siblings:e,index:r}=Pn(t);if(e===void 0)return;const n=e[r];r===0?(e[r]=e[e.length-1],e[e.length-1]=n):(e[r]=e[r-1],e[r-1]=n)}function s4(t){const{siblings:e,index:r}=Pn(t);if(e===void 0)return;const n=e[r];r===e.length-1?(e[r]=e[0],e[0]=n):(e[r]=e[r+1],e[r+1]=n)}function Ku(t){const{siblings:e,index:r}=Pn(t);return e===void 0?0:(e.splice(r,1),e.length)}function a4(t,e,r){const{siblings:n,index:i}=Pn(r);n!==void 0&&(e==="before"?n.splice(i,0,t):n.splice(i+1,0,t))}function o4(t,e){const{siblings:r,index:n}=Pn(t);r!==void 0&&(r[n]=e,e.children=[t])}function Yu(t,e,r){var n;if(Ku(e),(n=r.parent)!=null&&n.parent||(e.direction=r.direction),t==="in")r.children?r.children.push(e):r.children=[e];else{e.direction!==void 0&&(e.direction=r.direction);const{siblings:i,index:s}=Pn(r);if(i===void 0)return;t==="before"?i.splice(s,0,e):i.splice(s+1,0,e)}}const l4=function({map:t,direction:e},r){var n,i;if(e===0)return 0;if(e===1)return 1;if(e===2){const s=((n=t.querySelector(".lhs"))==null?void 0:n.childElementCount)||0,a=((i=t.querySelector(".rhs"))==null?void 0:i.childElementCount)||0;return s<=a?(r.direction=0,0):(r.direction=1,1)}},Xu=function(t,e,r){var n,i;const s=r.children[0].children[0],a=e.parentElement;if(a.tagName==="ME-PARENT"){if(S0(s),a.children[1])a.nextSibling.appendChild(r);else{const o=t.createChildren([r]);a.appendChild(Ya(!0)),a.insertAdjacentElement("afterend",o)}t.linkDiv(r.offsetParent)}else a.tagName==="ME-ROOT"&&(l4(t,s.nodeObj)===0?(n=t.container.querySelector(".lhs"))==null||n.appendChild(r):(i=t.container.querySelector(".rhs"))==null||i.appendChild(r),t.linkDiv())},c4=function(t,e){const r=t.parentNode;if(e===0){const n=r.parentNode.parentNode;n.tagName!=="ME-MAIN"&&(n.previousSibling.children[1].remove(),n.remove())}r.parentNode.remove()},Ju={before:"beforebegin",after:"afterend"},S0=function(t){const e=t.parentElement.parentElement.lastElementChild;(e==null?void 0:e.tagName)==="svg"&&(e==null||e.remove())},u4=function(t,e){const r=t.nodeObj,n=Ga(r);n.style&&e.style&&(e.style=Object.assign(n.style,e.style));const i=Object.assign(r,e);Ui.call(this,t,i),this.linkDiv(),this.bus.fire("operation",{name:"reshapeNode",obj:i,origin:n})},Xa=function(t,e,r){if(!e)return null;const n=e.nodeObj;n.expanded===!1&&(t.expandNode(e,!0),e=t.findEle(n.id));const i=r||t.generateNewObj();n.children?n.children.push(i):n.children=[i],rn(t.nodeData);const{grp:s,top:a}=t.createWrapper(i);return Xu(t,e,s),{newTop:a,newNodeObj:i}},d4=function(t,e,r){var n,i,s,a;const o=e||this.currentNode;if(!o)return;const l=o.nodeObj;if(l.parent){if(!((n=l.parent)!=null&&n.parent)&&((s=(i=l.parent)==null?void 0:i.children)==null?void 0:s.length)===1&&this.direction===2){this.addChild(this.findEle(l.parent.id),r);return}}else{this.addChild();return}const c=r||this.generateNewObj();if(!((a=l.parent)!=null&&a.parent)){const g=o.closest("me-main").className===sr.LHS?0:1;c.direction=g}a4(c,t,l),rn(this.nodeData);const u=o.parentElement,{grp:f,top:p}=this.createWrapper(c);u.parentElement.insertAdjacentElement(Ju[t],f),this.linkDiv(f.offsetParent),r||this.editTopic(p.firstChild),this.bus.fire("operation",{name:"insertSibling",type:t,obj:c}),this.selectNode(p.firstChild,!0)},h4=function(t,e){const r=t||this.currentNode;if(!r)return;S0(r);const n=r.nodeObj;if(!n.parent)return;const i=e||this.generateNewObj();o4(n,i),rn(this.nodeData);const s=r.parentElement.parentElement,{grp:a,top:o}=this.createWrapper(i,!0);o.appendChild(Ya(!0)),s.insertAdjacentElement("afterend",a);const l=this.createChildren([s]);o.insertAdjacentElement("afterend",l),this.linkDiv(),e||this.editTopic(o.firstChild),this.selectNode(o.firstChild,!0),this.bus.fire("operation",{name:"insertParent",obj:i})},f4=function(t,e){const r=t||this.currentNode;if(!r)return;const n=Xa(this,r,e);if(!n)return;const{newTop:i,newNodeObj:s}=n;this.bus.fire("operation",{name:"addChild",obj:s}),e||this.editTopic(i.firstChild),this.selectNode(i.firstChild,!0)},p4=function(t,e){const r=Ga(t.nodeObj);Wa(r);const n=Xa(this,e,r);if(!n)return;const{newNodeObj:i}=n;this.selectNode(this.findEle(i.id)),this.bus.fire("operation",{name:"copyNode",obj:i})},m4=function(t,e){t=ji(t);const r=[];for(let n=0;nthis.findEle(n.id))),this.bus.fire("operation",{name:"copyNodes",objs:r})},g4=function(t){const e=t||this.currentNode;if(!e)return;const r=e.nodeObj;i4(r);const n=e.parentNode.parentNode;n.parentNode.insertBefore(n,n.previousSibling),this.linkDiv(),this.bus.fire("operation",{name:"moveUpNode",obj:r})},v4=function(t){const e=t||this.currentNode;if(!e)return;const r=e.nodeObj;s4(r);const n=e.parentNode.parentNode;n.nextSibling?n.nextSibling.insertAdjacentElement("afterend",n):n.parentNode.prepend(n),this.linkDiv(),this.bus.fire("operation",{name:"moveDownNode",obj:r})},b4=function(t){if(t.length===0)return;t=ji(t);for(const r of t){const n=r.nodeObj,i=Ku(n);c4(r,i)}const e=t[t.length-1];this.selectNode(this.findEle(e.nodeObj.parent.id)),this.linkDiv(),this.bus.fire("operation",{name:"removeNodes",objs:t.map(r=>r.nodeObj)})},y4=function(t,e){t=ji(t);const r=e.nodeObj;r.expanded===!1&&(this.expandNode(e,!0),e=this.findEle(r.id));for(const n of t){const i=n.nodeObj;Yu("in",i,r),rn(this.nodeData);const s=n.parentElement;Xu(this,e,s.parentElement)}this.linkDiv(),this.bus.fire("operation",{name:"moveNodeIn",objs:t.map(n=>n.nodeObj),toObj:r})},Zu=(t,e,r,n)=>{t=ji(t),e==="after"&&(t=t.reverse());const i=r.nodeObj,s=[];for(const a of t){const o=a.nodeObj;Yu(e,o,i),rn(n.nodeData),S0(a);const l=a.parentElement.parentNode;s.includes(l.parentElement)||s.push(l.parentElement),r.parentElement.parentNode.insertAdjacentElement(Ju[e],l)}for(const a of s)a.childElementCount===0&&a.tagName!=="ME-MAIN"&&(a.previousSibling.children[1].remove(),a.remove());n.linkDiv(),n.bus.fire("operation",{name:e==="before"?"moveNodeBefore":"moveNodeAfter",objs:t.map(a=>a.nodeObj),toObj:i})},w4=function(t,e){Zu(t,"before",e,this)},x4=function(t,e){Zu(t,"after",e,this)},S4=function(t){const e=t||this.currentNode;e&&(e.nodeObj.dangerouslySetInnerHTML||this.editTopic(e))},k4=function(t,e){t.text.textContent=e,t.nodeObj.topic=e,this.linkDiv()},Qu=Object.freeze(Object.defineProperty({__proto__:null,addChild:f4,beginEdit:S4,copyNode:p4,copyNodes:m4,insertParent:h4,insertSibling:d4,moveDownNode:v4,moveNodeAfter:x4,moveNodeBefore:w4,moveNodeIn:y4,moveUpNode:g4,removeNodes:b4,reshapeNode:u4,rmSubline:S0,setNodeTopic:k4},Symbol.toStringTag,{value:"Module"}));function T4(t){return{nodeData:t.isFocusMode?t.nodeDataBackup:t.nodeData,arrows:t.arrows,summaries:t.summaries,direction:t.direction,theme:t.theme}}const E4=function(t){const e=this.container,r=t.getBoundingClientRect(),n=e.getBoundingClientRect();if(r.top>n.bottom||r.bottomn.right||r.right{if(!(e==="parent"&&typeof r!="string"))return r})},I4=function(){return JSON.parse(this.getDataString())},R4=function(){this.editable=!0},O4=function(){this.editable=!1},_4=function(t,e={x:0,y:0}){if(tthis.scaleMax)return;const r=this.container.getBoundingClientRect(),n=e.x?e.x-r.left-r.width/2:0,i=e.y?e.y-r.top-r.height/2:0,{dx:s,dy:a}=e1(this),o=this.map.style.transform,{x:l,y:c}=Pu(o),u=l-s,f=c-a,p=this.scaleVal,g=(-n+u)*(1-t/p),v=(-i+f)*(1-t/p);this.map.style.transform=`translate(${l-g}px, ${c-v}px) scale(${t})`,this.scaleVal=t,this.bus.fire("scale",t)},L4=function(){const t=this.nodes.offsetHeight/this.container.offsetHeight,e=this.nodes.offsetWidth/this.container.offsetWidth,r=1/Math.max(1,Math.max(t,e));this.scaleVal=r,this.map.style.transform="scale("+r+")",this.bus.fire("scale",r)},z4=function(t,e,r=!1){const{map:n,scaleVal:i,bus:s}=this,a=n.style.transform;let{x:o,y:l}=Pu(a);o+=t,l+=e,r&&(n.style.transition="transform 0.3s",setTimeout(()=>{n.style.transition="none"},300)),n.style.transform=`translate(${o}px, ${l}px) scale(${i})`,s.fire("move",{dx:t,dy:e})},e1=t=>{const{container:e,map:r,nodes:n}=t,i=r.querySelector("me-root"),s=i.offsetTop,a=i.offsetLeft,o=i.offsetWidth,l=i.offsetHeight;let c,u;return t.alignment==="root"?(c=e.offsetWidth/2-a-o/2,u=e.offsetHeight/2-s-l/2,r.style.transformOrigin=`${a+o/2}px 50%`):(c=(e.offsetWidth-n.offsetWidth)/2,u=(e.offsetHeight-n.offsetHeight)/2,r.style.transformOrigin="50% 50%"),{dx:c,dy:u}},$4=function(){const{map:t}=this,{dx:e,dy:r}=e1(this);t.style.transform=`translate(${e}px, ${r}px) scale(${this.scaleVal})`},F4=function(t){t(this)},B4=function(t){t.nodeObj.parent&&(this.clearSelection(),this.tempDirection===null&&(this.tempDirection=this.direction),this.isFocusMode||(this.nodeDataBackup=this.nodeData,this.isFocusMode=!0),this.nodeData=t.nodeObj,this.initRight(),this.toCenter())},P4=function(){this.isFocusMode=!1,this.tempDirection!==null&&(this.nodeData=this.nodeDataBackup,this.direction=this.tempDirection,this.tempDirection=null,this.refresh(),this.toCenter())},H4=function(){this.direction=0,this.refresh(),this.toCenter()},q4=function(){this.direction=1,this.refresh(),this.toCenter()},j4=function(){this.direction=2,this.refresh(),this.toCenter()},U4=function(t){this.locale=t,this.refresh()},V4=function(t,e){const r=t.nodeObj;typeof e=="boolean"?r.expanded=e:r.expanded!==!1?r.expanded=!1:r.expanded=!0;const n=t.getBoundingClientRect(),i={x:n.left,y:n.top},s=t.parentNode,a=s.children[1];if(a.expanded=r.expanded,a.className=r.expanded?"minus":"",S0(t),r.expanded){const f=this.createChildren(r.children.map(p=>this.createWrapper(p).grp));s.parentNode.appendChild(f)}else s.parentNode.children[1].remove();this.linkDiv(t.closest("me-main > me-wrapper"));const o=t.getBoundingClientRect(),l={x:o.left,y:o.top},c=i.x-l.x,u=i.y-l.y;this.move(c,u),this.bus.fire("expandNode",r)},W4=function(t,e){const r=t.nodeObj,n=t.getBoundingClientRect(),i={x:n.left,y:n.top};_n(r,e??!r.expanded),this.refresh();const s=this.findEle(r.id).getBoundingClientRect(),a={x:s.left,y:s.top},o=i.x-a.x,l=i.y-a.y;this.move(o,l)},G4=function(t){this.clearSelection(),t&&(t=JSON.parse(JSON.stringify(t)),this.nodeData=t.nodeData,this.arrows=t.arrows||[],this.summaries=t.summaries||[],t.theme&&this.changeTheme(t.theme)),rn(this.nodeData),this.layout(),this.linkDiv()},K4=Object.freeze(Object.defineProperty({__proto__:null,cancelFocus:P4,clearSelection:N4,disableEdit:O4,enableEdit:R4,expandNode:V4,expandNodeAll:W4,focusNode:B4,getData:I4,getDataString:D4,initLeft:H4,initRight:q4,initSide:j4,install:F4,move:z4,refresh:G4,scale:_4,scaleFit:L4,scrollIntoView:E4,selectNode:A4,selectNodes:C4,setLocale:U4,toCenter:$4,unselectNodes:M4},Symbol.toStringTag,{value:"Module"})),Y4=function(t){return{dom:t,moved:!1,pointerdown:!1,lastX:0,lastY:0,handlePointerMove(e){if(this.pointerdown){this.moved=!0;const r=e.clientX-this.lastX,n=e.clientY-this.lastY;this.lastX=e.clientX,this.lastY=e.clientY,this.cb&&this.cb(r,n)}},handlePointerDown(e){e.button===0&&(this.pointerdown=!0,this.lastX=e.clientX,this.lastY=e.clientY,this.dom.setPointerCapture(e.pointerId))},handleClear(e){this.pointerdown=!1,e.pointerId!==void 0&&this.dom.releasePointerCapture(e.pointerId)},cb:null,init(e,r){this.cb=r,this.handleClear=this.handleClear.bind(this),this.handlePointerMove=this.handlePointerMove.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this),this.destroy=Ka([{dom:e,evt:"pointermove",func:this.handlePointerMove},{dom:e,evt:"pointerleave",func:this.handleClear},{dom:e,evt:"pointerup",func:this.handleClear},{dom:this.dom,evt:"pointerdown",func:this.handlePointerDown}])},destroy:null,clear(){this.moved=!1,this.pointerdown=!1}}},Al={create:Y4},X4="#4dc4ff";function t1(t,e,r,n,i,s,a,o){return{x:t/8+r*3/8+i*3/8+a/8,y:e/8+n*3/8+s*3/8+o/8}}function J4(t,e,r){et(t,{x:e+"",y:r+""})}function $0(t,e,r,n,i){et(t,{x1:e+"",y1:r+"",x2:n+"",y2:i+""})}function Cl(t,e,r,n,i,s,a,o,l,c){var u;const f=`M ${e} ${r} C ${n} ${i} ${s} ${a} ${o} ${l}`;if(t.line.setAttribute("d",f),c.style){const y=c.style;y.stroke&&t.line.setAttribute("stroke",y.stroke),y.strokeWidth&&t.line.setAttribute("stroke-width",String(y.strokeWidth)),y.strokeDasharray&&t.line.setAttribute("stroke-dasharray",y.strokeDasharray),y.strokeLinecap&&t.line.setAttribute("stroke-linecap",y.strokeLinecap),y.opacity!==void 0&&t.line.setAttribute("opacity",String(y.opacity))}const p=t.querySelectorAll('path[stroke="transparent"]');p.length>0&&p[0].setAttribute("d",f);const g=bi(s,a,o,l);if(g){const y=`M ${g.x1} ${g.y1} L ${o} ${l} L ${g.x2} ${g.y2}`;if(t.arrow1.setAttribute("d",y),p.length>1&&p[1].setAttribute("d",y),c.style){const C=c.style;C.stroke&&t.arrow1.setAttribute("stroke",C.stroke),C.strokeWidth&&t.arrow1.setAttribute("stroke-width",String(C.strokeWidth)),C.strokeLinecap&&t.arrow1.setAttribute("stroke-linecap",C.strokeLinecap),C.opacity!==void 0&&t.arrow1.setAttribute("opacity",String(C.opacity))}}if(c.bidirectional){const y=bi(n,i,e,r);if(y){const C=`M ${y.x1} ${y.y1} L ${e} ${r} L ${y.x2} ${y.y2}`;if(t.arrow2.setAttribute("d",C),p.length>2&&p[2].setAttribute("d",C),c.style){const S=c.style;S.stroke&&t.arrow2.setAttribute("stroke",S.stroke),S.strokeWidth&&t.arrow2.setAttribute("stroke-width",String(S.strokeWidth)),S.strokeLinecap&&t.arrow2.setAttribute("stroke-linecap",S.strokeLinecap),S.opacity!==void 0&&t.arrow2.setAttribute("opacity",String(S.opacity))}}}const{x:v,y:w}=t1(e,r,n,i,s,a,o,l);J4(t.label,v,w),(u=c.style)!=null&&u.labelColor&&t.label.setAttribute("fill",c.style.labelColor),sm(t)}function xi(t,e,r){const{offsetLeft:n,offsetTop:i}=nn(t.nodes,e),s=e.offsetWidth,a=e.offsetHeight,o=n+s/2,l=i+a/2,c=o+r.x,u=l+r.y;return{w:s,h:a,cx:o,cy:l,ctrlX:c,ctrlY:u}}function Mn(t){let e,r;const n=(t.cy-t.ctrlY)/(t.ctrlX-t.cx);return n>t.h/t.w||n<-t.h/t.w?t.cy-t.ctrlY<0?(e=t.cx-t.h/2/n,r=t.cy+t.h/2):(e=t.cx+t.h/2/n,r=t.cy-t.h/2):t.cx-t.ctrlX<0?(e=t.cx+t.w/2,r=t.cy-t.w*n/2):(e=t.cx-t.w/2,r=t.cy+t.w*n/2),{x:e,y:r}}const Ja=function(t,e,r,n,i){var s;if(!e||!r)return;const a=xi(t,e,n.delta1),o=xi(t,r,n.delta2),{x:l,y:c}=Mn(a),{ctrlX:u,ctrlY:f}=a,{ctrlX:p,ctrlY:g}=o,{x:v,y:w}=Mn(o),y=bi(p,g,v,w);if(!y)return;const C=`M ${y.x1} ${y.y1} L ${v} ${w} L ${y.x2} ${y.y2}`;let S="";if(n.bidirectional){const G=bi(u,f,l,c);if(!G)return;S=`M ${G.x1} ${G.y1} L ${l} ${c} L ${G.x2} ${G.y2}`}const T=Mp(`M ${l} ${c} C ${u} ${f} ${p} ${g} ${v} ${w}`,C,S,n.style),{x:D,y:I}=t1(l,c,u,f,p,g,v,w),_=(s=n.style)==null?void 0:s.labelColor,F=ta(n.label,D,I,{anchor:"middle",color:_,dataType:"custom-link"});T.appendChild(F),T.label=F,T.arrowObj=n,T.dataset.linkid=n.id,t.linkSvgGroup.appendChild(T),i||(t.arrows.push(n),t.currentArrow=T,r1(t,n,a,o))},Z4=function(t,e,r={}){const n={id:vn(),label:"Custom Link",from:t.nodeObj.id,to:e.nodeObj.id,delta1:{x:t.offsetWidth/2+100,y:0},delta2:{x:e.offsetWidth/2+100,y:0},...r};Ja(this,t,e,n),this.bus.fire("operation",{name:"createArrow",obj:n})},Q4=function(t){Vi(this);const e={...t,id:vn()};Ja(this,this.findEle(e.from),this.findEle(e.to),e),this.bus.fire("operation",{name:"createArrow",obj:e})},em=function(t){let e;if(t?e=t:e=this.currentArrow,!e)return;Vi(this);const r=e.arrowObj.id;this.arrows=this.arrows.filter(n=>n.id!==r),e.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:r}})},tm=function(t){this.currentArrow=t;const e=t.arrowObj,r=this.findEle(e.from),n=this.findEle(e.to),i=xi(this,r,e.delta1),s=xi(this,n,e.delta2);r1(this,e,i,s)},rm=function(){Vi(this),this.currentArrow=null},xs=function(t,e){const r=document.createElementNS(Kt,"path");return et(r,{d:t,stroke:e,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),r},nm=function(t,e){const r=document.createElementNS(Kt,"g");r.setAttribute("class","arrow-highlight"),r.setAttribute("opacity","0.45");const n=xs(t.line.getAttribute("d"),e);r.appendChild(n);const i=xs(t.arrow1.getAttribute("d"),e);if(r.appendChild(i),t.arrow2.getAttribute("d")){const s=xs(t.arrow2.getAttribute("d"),e);r.appendChild(s)}t.insertBefore(r,t.firstChild)},im=function(t){const e=t.querySelector(".arrow-highlight");e&&e.remove()},sm=function(t){const e=t.querySelector(".arrow-highlight");if(!e)return;const r=e.querySelectorAll("path");r.length>=1&&r[0].setAttribute("d",t.line.getAttribute("d")),r.length>=2&&r[1].setAttribute("d",t.arrow1.getAttribute("d")),r.length>=3&&t.arrow2.getAttribute("d")&&r[2].setAttribute("d",t.arrow2.getAttribute("d"))},Vi=function(t){var e,r;(e=t.helper1)==null||e.destroy(),(r=t.helper2)==null||r.destroy(),t.linkController.style.display="none",t.P2.style.display="none",t.P3.style.display="none",t.currentArrow&&im(t.currentArrow)},r1=function(t,e,r,n){const{linkController:i,P2:s,P3:a,line1:o,line2:l,nodes:c,map:u,currentArrow:f,bus:p}=t;if(!f)return;i.style.display="initial",s.style.display="initial",a.style.display="initial",c.appendChild(i),c.appendChild(s),c.appendChild(a),nm(f,X4);let{x:g,y:v}=Mn(r),{ctrlX:w,ctrlY:y}=r,{ctrlX:C,ctrlY:S}=n,{x:T,y:D}=Mn(n);s.style.cssText=`top:${y}px;left:${w}px;`,a.style.cssText=`top:${S}px;left:${C}px;`,$0(o,g,v,w,y),$0(l,C,S,T,D),t.helper1=Al.create(s),t.helper2=Al.create(a),t.helper1.init(u,(I,_)=>{w=w+I/t.scaleVal,y=y+_/t.scaleVal;const F=Mn({...r,ctrlX:w,ctrlY:y});g=F.x,v=F.y,s.style.top=y+"px",s.style.left=w+"px",Cl(f,g,v,w,y,C,S,T,D,e),$0(o,g,v,w,y),e.delta1.x=w-r.cx,e.delta1.y=y-r.cy,p.fire("updateArrowDelta",e)}),t.helper2.init(u,(I,_)=>{C=C+I/t.scaleVal,S=S+_/t.scaleVal;const F=Mn({...n,ctrlX:C,ctrlY:S});T=F.x,D=F.y,a.style.top=S+"px",a.style.left=C+"px",Cl(f,g,v,w,y,C,S,T,D,e),$0(l,C,S,T,D),e.delta2.x=C-n.cx,e.delta2.y=S-n.cy,p.fire("updateArrowDelta",e)})};function am(){this.linkSvgGroup.innerHTML="";for(let t=0;tvi(t.from,this.nodeData)&&vi(t.to,this.nodeData))}const cm=Object.freeze(Object.defineProperty({__proto__:null,createArrow:Z4,createArrowFrom:Q4,editArrowLabel:om,removeArrow:em,renderArrow:am,selectArrow:tm,tidyArrow:lm,unselectArrow:rm},Symbol.toStringTag,{value:"Module"})),um=function(t){var e,r;if(t.length===0)throw new Error("No selected node.");if(t.length===1){const u=t[0].nodeObj,f=t[0].nodeObj.parent;if(!f)throw new Error("Can not select root node.");const p=f.children.findIndex(g=>u===g);return{parent:f.id,start:p,end:p}}let n=0;const i=t.map(u=>{let f=u.nodeObj;const p=[];for(;f.parent;){const g=f.parent,v=g.children,w=v==null?void 0:v.indexOf(f);f=g,p.unshift({node:f,index:w})}return p.length>n&&(n=p.length),p});let s=0;e:for(;su[s-1].index).sort(),o=a[0]||0,l=a[a.length-1]||0,c=i[0][s-1].node;if(!c.parent)throw new Error("Please select nodes in the same main topic.");return{parent:c.id,start:o,end:l}},dm=function(t){const e=document.createElementNS(Kt,"g");return e.setAttribute("id",t),e},Ml=function(t,e){const r=document.createElementNS(Kt,"path");return et(r,{d:t,stroke:e||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),r},hm=t=>t.parentElement.parentElement,fm=function(t,{parent:e,start:r}){const n=t.findEle(e),i=n.nodeObj;let s;return i.parent?s=n.closest("me-main").className:s=t.findEle(i.children[r].id).closest("me-main").className,s},Za=function(t,e){var r;const{id:n,label:i,parent:s,start:a,end:o}=e,{nodes:l,theme:c,summarySvg:u}=t,f=t.findEle(s).nodeObj,p=fm(t,e);let g=1/0,v=0,w=0,y=0;for(let G=a;G<=o;G++){const W=(r=f.children)==null?void 0:r[G];if(!W)return t.removeSummary(n),null;const fe=hm(t.findEle(W.id)),{offsetLeft:ve,offsetTop:Te}=nn(l,fe),Xe=a===o?10:20;G===a&&(w=Te+Xe),G===o&&(y=Te+fe.offsetHeight-Xe),vev&&(v=fe.offsetWidth+ve)}let C,S;const T=w+10,D=y+10,I=(T+D)/2,_=c.cssVar["--color"];p===sr.LHS?(C=Ml(`M ${g+10} ${T} c -5 0 -10 5 -10 10 L ${g} ${D-10} c 0 5 5 10 10 10 M ${g} ${I} h -10`,_),S=ta(i,g-20,I+6,{anchor:"end",color:_})):(C=Ml(`M ${v-10} ${T} c 5 0 10 5 10 10 L ${v} ${D-10} c 0 5 -5 10 -10 10 M ${v} ${I} h 10`,_),S=ta(i,v+20,I+6,{anchor:"start",color:_}));const F=dm("s-"+n);return F.appendChild(C),F.appendChild(S),F.summaryObj=e,u.appendChild(F),F},pm=function(){if(!this.currentNodes)return;const{currentNodes:t,summaries:e,bus:r}=this,{parent:n,start:i,end:s}=um(t),a={id:vn(),parent:n,start:i,end:s,label:"summary"},o=Za(this,a);e.push(a),this.editSummary(o),r.fire("operation",{name:"createSummary",obj:a})},mm=function(t){const e=vn(),r={...t,id:e};Za(this,r),this.summaries.push(r),this.bus.fire("operation",{name:"createSummary",obj:r})},gm=function(t){var e;const r=this.summaries.findIndex(n=>n.id===t);r>-1&&(this.summaries.splice(r,1),(e=document.querySelector("#s-"+t))==null||e.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:t}})},vm=function(t){const e=t.children[1].getBBox(),r=6,n=3,i=document.createElementNS(Kt,"rect");et(i,{x:e.x-r+"",y:e.y-r+"",width:e.width+r*2+"",height:e.height+r*2+"",rx:n+"",stroke:this.theme.cssVar["--selected"]||"#4dc4ff","stroke-width":"2",fill:"none"}),t.appendChild(i),this.currentSummary=t},bm=function(){var t,e;(e=(t=this.currentSummary)==null?void 0:t.querySelector("rect"))==null||e.remove(),this.currentSummary=null},ym=function(){this.summarySvg.innerHTML="",this.summaries.forEach(t=>{try{Za(this,t)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},wm=function(t){if(!t)return;const e=t.childNodes[1];Uu(this,e,t.summaryObj)},xm=Object.freeze(Object.defineProperty({__proto__:null,createSummary:pm,createSummaryFrom:mm,editSummary:wm,removeSummary:gm,renderSummary:ym,selectSummary:vm,unselectSummary:bm},Symbol.toStringTag,{value:"Module"})),pt="http://www.w3.org/2000/svg";function Sm(t,e){const r=document.createElementNS(pt,"svg");return et(r,{version:"1.1",xmlns:pt,height:t,width:e}),r}function n1(t,e,r,n){const i=document.createElementNS(pt,"g");let s="";t.text?s=t.text.textContent:s=t.childNodes[0].textContent;const a=s.split(` -`),o=parseFloat(e.lineHeight)||parseFloat(e.fontSize)*1.2,l=parseFloat(e.fontSize),c=parseInt(e.paddingTop)||8,u=parseInt(e.paddingLeft)||8,f=t.offsetWidth||200,p=r+u,g=(a.length-1)*o+l+c+(parseInt(e.paddingBottom)||8),v=t.offsetHeight||100,w=Math.min(g,v),y=document.createElementNS(pt,"rect");return et(y,{x:r+"",y:n+"",rx:e.borderRadius||"8",ry:e.borderRadius||"8",width:f+"px",height:w+"px",fill:e.backgroundColor||"white",stroke:e.borderColor||"#ccc","stroke-width":e.borderWidth||"1"}),i.appendChild(y),a.forEach((C,S)=>{const T=document.createElementNS(pt,"text");et(T,{x:p+"",y:n+c+l+o*S+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),T.innerHTML=C,i.appendChild(T)}),i}function Nl(t){if(!t)return t;let e=t.replace(/]*>([^<]*)([^<]*)<\/td>/gi,(r,n,i)=>`${n} ${i}`);return e=e.replace(/]*>([^<]*)([^<]*)<\/th>/gi,(r,n,i)=>`${n} ${i}`),e=e.replace(//gi," "),e=e.replace(/•\s*【/g,"【"),e=e.replace(/•\s*\[/g,"["),e=e.replace(/•\s*(/g,"("),e=e.replace(/•\s*\(/g,"("),e=e.replace(/<([^>]+)>/g,(r,n)=>{const i=["br","hr","img","input","meta","link"],s=n.split(" ")[0].toLowerCase();return i.includes(s)?`<${n} />`:r}),e}function Ss(t,e,r,n){const i=document.createElementNS(pt,"g"),s=t;let a="";s.nodeObj&&s.nodeObj.dangerouslySetInnerHTML?a=s.nodeObj.dangerouslySetInnerHTML:s.text&&s.text.innerHTML&&(a=s.text.innerHTML);const o=a&&a!==t.textContent,l=a&&a.includes(" - ${Nl(a)} - - `;return p.innerHTML=g,i.appendChild(p),i}if(o&&!l){const c=Nl(a),u=t.getBoundingClientRect(),f=u.width,p=u.height;c.includes("F.trim());if(_.length>0){const F=parseFloat(e.fontSize)||14,G=F*1.4,W=parseInt(e.paddingTop)||8,fe=parseInt(e.paddingBottom)||8,ve=parseInt(e.paddingLeft)||8,Te=(_.length-1)*G+F+W+fe,Xe=Math.min(Te,p),ze=c.includes("{const qe=document.createElementNS(pt,"text");et(qe,{x:rt+"",y:_e+G*He+"","text-anchor":ze?"middle":"start","font-family":e.fontFamily,"font-size":e.fontSize,"font-weight":e.fontWeight,fill:e.color}),qe.innerHTML=pe.trim(),i.appendChild(qe)});const Ae=document.createElementNS(pt,"rect");return et(Ae,{x:r+"",y:n+"",rx:e.borderRadius||"8",ry:e.borderRadius||"8",width:f+"px",height:Xe+"px",fill:e.backgroundColor||"white",stroke:e.borderColor||"#ccc","stroke-width":e.borderWidth||"1"}),i.insertBefore(Ae,i.firstChild),document.body.removeChild(I),i}document.body.removeChild(I)}catch{}const g=document.createElementNS(pt,"foreignObject");et(g,{x:r+"",y:n+"",width:f+"px",height:p+"px"});const v=document.createElement("div");v.innerHTML=c;const w=15,y=15,C=parseInt(e.paddingLeft)||8,S=parseInt(e.paddingRight)||8;v.style.cssText=` - width: 100%; - height: 100%; - font-family: '${(e.fontFamily||"Arial").replace(/"/g,""")}'; - font-size: ${e.fontSize}; - color: ${e.color}; - background: transparent; - padding: ${w}px ${S}px ${y}px ${C}px; - box-sizing: border-box; - overflow: visible; - text-align: center !important; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - position: relative; - `,v.querySelectorAll("table").forEach(I=>{const _=I;_.style.cssText=` - width: 100%; - border-collapse: collapse; - font-size: ${e.fontSize}; - font-family: '${(e.fontFamily||"Arial").replace(/"/g,""")}'; - margin: 0 auto 0px auto; - border: 1px solid #ccc; - `,I.querySelectorAll("td, th").forEach(F=>{const G=F;G.style.cssText=` - border: 1px solid #ccc; - padding: 4px 8px; - text-align: center; - vertical-align: top; - font-size: ${parseFloat(e.fontSize)*.9}px; - background: white; - `})}),v.querySelectorAll("ul, ol").forEach(I=>{const _=I;_.style.cssText=` - margin: 2px 0 4px 0 !important; - padding-left: 0 !important; - text-align: center !important; - list-style-position: inside !important; - `}),v.querySelectorAll("li").forEach(I=>{const _=I;_.style.cssText=` - margin: 1px 0 !important; - line-height: 1.2 !important; - padding: 0 !important; - text-align: center !important; - list-style-position: inside !important; - `}),v.querySelectorAll("p").forEach(I=>{const _=I;_.style.cssText=` - margin: 2px 0 !important; - line-height: 1.4 !important; - padding: 0 !important; - text-align: center !important; - `}),v.querySelectorAll("span, div, strong, em").forEach(I=>{const _=I;_.style.cssText=` - text-align: center !important; - display: block !important; - margin-left: auto !important; - margin-right: auto !important; - `});const T=document.createElement("style");T.textContent=` - * { - text-align: center !important; - margin-left: auto !important; - margin-right: auto !important; - } - `,v.appendChild(T),v.querySelectorAll("img").forEach((I,_)=>{const F=I,G=f-C-S-5,W=Math.floor(p*.7);F.style.cssText=` - max-width: ${G}px !important; - max-height: ${W}px !important; - width: auto !important; - height: auto !important; - display: block !important; - margin: 8px auto 0px auto !important; - border-radius: 4px; - object-fit: contain !important; - flex-shrink: 0 !important; - box-sizing: border-box !important; - position: relative !important; - top: 0 !important; - left: 0 !important; - right: 0 !important; - bottom: 0 !important; - `}),g.appendChild(v);const D=document.createElementNS(pt,"rect");et(D,{x:r+"",y:n+"",rx:e.borderRadius||"8",ry:e.borderRadius||"8",width:f+"px",height:p+"px",fill:e.backgroundColor||"white",stroke:e.borderColor||"#ccc","stroke-width":e.borderWidth||"1"}),i.insertBefore(D,i.firstChild),i.appendChild(g)}else return n1(t,e,r,n);return i}function F0(t,e,r=!1){var n;const i=getComputedStyle(e),{offsetLeft:s,offsetTop:a}=nn(t.nodes,e),o=e;o.nodeObj&&o.nodeObj.dangerouslySetInnerHTML&&((n=o.nodeObj.dangerouslySetInnerHTML)==null||n.includes("{const n=new Image;n.crossOrigin="anonymous",n.onload=()=>{try{const i=document.createElement("canvas");i.width=n.width,i.height=n.height;const s=i.getContext("2d");if(!s){r(new Error("Failed to get canvas context"));return}s.drawImage(n,0,0);const a=i.toDataURL("image/png");e(a)}catch(i){r(i)}},n.onerror=()=>{r(new Error("Failed to load image"))},n.src=t})}const B0=100,Am='',Cm=async(t,e=!1)=>{var r,n,i;const s=t.nodes,a=s.offsetHeight+B0*2,o=s.offsetWidth+B0*2,l=Sm(a+"px",o+"px"),c=document.createElementNS(pt,"svg"),u=document.createElementNS(pt,"rect");et(u,{x:"0",y:"0",width:`${o}`,height:`${a}`,fill:t.theme.cssVar["--bgcolor"]}),l.appendChild(u),s.querySelectorAll(".subLines").forEach(y=>{const C=y.cloneNode(!0),{offsetLeft:S,offsetTop:T}=nn(s,y.parentElement);C.setAttribute("x",`${S}`),C.setAttribute("y",`${T}`),c.appendChild(C)});const f=(r=s.querySelector(".lines"))==null?void 0:r.cloneNode(!0);f&&c.appendChild(f);const p=(n=s.querySelector(".topiclinks"))==null?void 0:n.cloneNode(!0);p&&c.appendChild(p);const g=(i=s.querySelector(".summary"))==null?void 0:i.cloneNode(!0);g&&c.appendChild(g);const v=Array.from(s.querySelectorAll("me-tpc")).map(async y=>{const C=y.nodeObj.dangerouslySetInnerHTML,S=!!(y.text&&y.text.innerHTML&&y.text.innerHTML!==y.text.textContent),T=y.nodeObj.image;if(C||S?c.appendChild(F0(t,y,!e)):c.appendChild(F0(t,y,!1)),T)try{const D=await Tm(t,y);D&&c.appendChild(D)}catch{}});await Promise.all(v),s.querySelectorAll(".tags > span").forEach(y=>{c.appendChild(F0(t,y))}),s.querySelectorAll(".icons > span").forEach(y=>{c.appendChild(F0(t,y))}),s.querySelectorAll(".hyper-link").forEach(y=>{c.appendChild(km(t,y))});const w=Array.from(s.querySelectorAll("img")).map(async(y,C)=>{const S=y.closest("me-tpc"),T=y.closest("foreignObject");return S||T?null:await Em(t,y)});return(await Promise.all(w)).filter(y=>y!==null).forEach(y=>{y&&c.appendChild(y)}),et(c,{x:B0+"",y:B0+"",overflow:"visible"}),l.appendChild(c),l},Mm=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin",""),Am+t.outerHTML);function Nm(t){return new Promise((e,r)=>{const n=new FileReader;n.onload=i=>{e(i.target.result)},n.onerror=i=>{r(i)},n.readAsDataURL(t)})}const Dm=async function(t=!1,e){const r=await Cm(this,t),n=Mm(r,e);return new Blob([n],{type:"image/svg+xml"})},Im=async function(t=!1,e){const r=await this.exportSvg(t,e),n=await Nm(r);return new Promise((i,s)=>{const a=new Image;a.setAttribute("crossOrigin","anonymous");const o=setTimeout(()=>{s(new Error("Image loading timeout"))},1e4);a.onload=()=>{clearTimeout(o);try{const l=document.createElement("canvas");l.width=a.width,l.height=a.height;const c=l.getContext("2d");c.fillStyle="#ffffff",c.fillRect(0,0,l.width,l.height),c.drawImage(a,0,0),l.toBlob(i,"image/png",1)}catch(l){s(l)}},a.onerror=l=>{clearTimeout(o),s(l)},a.src=n})},Rm=Object.freeze(Object.defineProperty({__proto__:null,exportPng:Im,exportSvg:Dm},Symbol.toStringTag,{value:"Module"}));function Om(t,e){return async function(...r){const n=this.before[e];n&&!await n.apply(this,r)||t.apply(this,r)}}const Dl=Object.keys(Qu),s1={};for(let t=0;te()),this.el&&(this.el.innerHTML=""),this.el=void 0,this.nodeData=void 0,this.arrows=void 0,this.summaries=void 0,this.currentArrow=void 0,this.currentNodes=void 0,this.currentSummary=void 0,this.waitCopy=void 0,this.theme=void 0,this.direction=void 0,this.bus=void 0,this.container=void 0,this.map=void 0,this.lines=void 0,this.linkController=void 0,this.linkSvgGroup=void 0,this.P2=void 0,this.P3=void 0,this.line1=void 0,this.line2=void 0,this.nodes=void 0,(t=this.selection)==null||t.destroy(),this.selection=void 0}};function Lm({pT:t,pL:e,pW:r,pH:n,cT:i,cL:s,cW:a,cH:o,direction:l,containerHeight:c}){let u=e+r/2;const f=t+n/2;let p;l===sr.LHS?p=s+a:p=s;const g=i+o/2,v=(1-Math.abs(g-f)/c)*.25*(r/2);return l===sr.LHS?u=u-r/10-v:u=u+r/10+v,`M ${u} ${f} Q ${u} ${g} ${p} ${g}`}function zm({pT:t,pL:e,pW:r,pH:n,cT:i,cL:s,cW:a,cH:o,direction:l,isFirst:c}){const u=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let f=0,p=0;c?f=t+n/2:f=t+n;const g=i+o;let v=0,w=0,y=0;const C=Math.abs(f-g)/300*u;return l===sr.LHS?(y=e,v=y+u,w=y-u,p=s+u,`M ${v} ${f} C ${y} ${f} ${y+C} ${g} ${w} ${g} H ${p}`):(y=e+r,v=y-u,w=y+u,p=s+a-u,`M ${v} ${f} C ${y} ${f} ${y-C} ${g} ${w} ${g} H ${p}`)}const $m="5.1.1";function Fm(t){return{x:0,y:0,moved:!1,mousedown:!1,onMove(e,r){this.mousedown&&(this.moved=!0,t.move(e,r))},clear(){this.mousedown=!1}}}const Kn=document;function bt({el:t,direction:e,locale:r,draggable:n,editable:i,contextMenu:s,toolBar:a,keypress:o,mouseSelectionButton:l,selectionContainer:c,before:u,newTopicName:f,allowUndo:p,generateMainBranch:g,generateSubBranch:v,overflowHidden:w,theme:y,alignment:C,scaleSensitivity:S,scaleMax:T,scaleMin:D,handleWheel:I,markdown:_,imageProxy:F}){let G=null;const W=Object.prototype.toString.call(t);if(W==="[object HTMLDivElement]"?G=t:W==="[object String]"&&(G=document.querySelector(t)),!G)throw new Error("MindElixir: el is not a valid element");G.style.position="relative",G.innerHTML="",this.el=G,this.disposable=[],this.before=u||{},this.locale=r||"en",this.newTopicName=f||"New Node",this.contextMenu=s??!0,this.toolBar=a??!0,this.keypress=o??!0,this.mouseSelectionButton=l??0,this.direction=e??1,this.draggable=n??!0,this.editable=i??!0,this.allowUndo=p??!0,this.scaleSensitivity=S??.1,this.scaleMax=T??1.4,this.scaleMin=D??.2,this.generateMainBranch=g||Lm,this.generateSubBranch=v||zm,this.overflowHidden=w??!1,this.alignment=C??"root",this.handleWheel=I??!0,this.markdown=_||void 0,this.imageProxy=F||void 0,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.dragMoveHelper=Fm(this),this.bus=yp(),this.container=Kn.createElement("div"),this.selectionContainer=c||this.container,this.container.className="map-container";const fe=window.matchMedia("(prefers-color-scheme: dark)");this.theme=y||(fe.matches?Va:Ua);const ve=Kn.createElement("div");ve.className="map-canvas",this.map=ve,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=Kn.createElement("me-nodes"),this.lines=Qn("lines"),this.summarySvg=Qn("summary"),this.linkController=Qn("linkcontroller"),this.P2=Kn.createElement("div"),this.P3=Kn.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=ml(),this.line2=ml(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=Qn("topiclinks"),this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push(bp(this))}bt.prototype=_m;Object.defineProperty(bt.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0});bt.LEFT=0;bt.RIGHT=1;bt.SIDE=2;bt.THEME=Ua;bt.DARK_THEME=Va;bt.version=$m;bt.E=Hu;bt.new=t=>({nodeData:{id:vn(),topic:t||"new topic",children:[]}});function a1(t,e){return function(){return t.apply(e,arguments)}}const{toString:Bm}=Object.prototype,{getPrototypeOf:Qa}=Object,{iterator:Wi,toStringTag:o1}=Symbol,Gi=(t=>e=>{const r=Bm.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ar=t=>(t=t.toLowerCase(),e=>Gi(e)===t),Ki=t=>e=>typeof e===t,{isArray:Hn}=Array,g0=Ki("undefined");function k0(t){return t!==null&&!g0(t)&&t.constructor!==null&&!g0(t.constructor)&&zt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const l1=ar("ArrayBuffer");function Pm(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&l1(t.buffer),e}const Hm=Ki("string"),zt=Ki("function"),c1=Ki("number"),T0=t=>t!==null&&typeof t=="object",qm=t=>t===!0||t===!1,ri=t=>{if(Gi(t)!=="object")return!1;const e=Qa(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(o1 in t)&&!(Wi in t)},jm=t=>{if(!T0(t)||k0(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Um=ar("Date"),Vm=ar("File"),Wm=ar("Blob"),Gm=ar("FileList"),Km=t=>T0(t)&&zt(t.pipe),Ym=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||zt(t.append)&&((e=Gi(t))==="formdata"||e==="object"&&zt(t.toString)&&t.toString()==="[object FormData]"))},Xm=ar("URLSearchParams"),[Jm,Zm,Qm,e2]=["ReadableStream","Request","Response","Headers"].map(ar),t2=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function E0(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),Hn(t))for(n=0,i=t.length;n0;)if(i=r[n],e===i.toLowerCase())return i;return null}const hn=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),d1=t=>!g0(t)&&t!==hn;function sa(){const{caseless:t}=d1(this)&&this||{},e={},r=(n,i)=>{const s=t&&u1(e,i)||i;ri(e[s])&&ri(n)?e[s]=sa(e[s],n):ri(n)?e[s]=sa({},n):Hn(n)?e[s]=n.slice():e[s]=n};for(let n=0,i=arguments.length;n(E0(e,(i,s)=>{r&&zt(i)?t[s]=a1(i,r):t[s]=i},{allOwnKeys:n}),t),n2=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),i2=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},s2=(t,e,r,n)=>{let i,s,a;const o={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)a=i[s],(!n||n(a,t,e))&&!o[a]&&(e[a]=t[a],o[a]=!0);t=r!==!1&&Qa(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},a2=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},o2=t=>{if(!t)return null;if(Hn(t))return t;let e=t.length;if(!c1(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},l2=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Qa(Uint8Array)),c2=(t,e)=>{const n=(t&&t[Wi]).call(t);let i;for(;(i=n.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},u2=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},d2=ar("HTMLFormElement"),h2=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),Il=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),f2=ar("RegExp"),h1=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};E0(r,(i,s)=>{let a;(a=e(i,s,t))!==!1&&(n[s]=a||i)}),Object.defineProperties(t,n)},p2=t=>{h1(t,(e,r)=>{if(zt(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(zt(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},m2=(t,e)=>{const r={},n=i=>{i.forEach(s=>{r[s]=!0})};return Hn(t)?n(t):n(String(t).split(e)),r},g2=()=>{},v2=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function b2(t){return!!(t&&zt(t.append)&&t[o1]==="FormData"&&t[Wi])}const y2=t=>{const e=new Array(10),r=(n,i)=>{if(T0(n)){if(e.indexOf(n)>=0)return;if(k0(n))return n;if(!("toJSON"in n)){e[i]=n;const s=Hn(n)?[]:{};return E0(n,(a,o)=>{const l=r(a,i+1);!g0(l)&&(s[o]=l)}),e[i]=void 0,s}}return n};return r(t,0)},w2=ar("AsyncFunction"),x2=t=>t&&(T0(t)||zt(t))&&zt(t.then)&&zt(t.catch),f1=((t,e)=>t?setImmediate:e?((r,n)=>(hn.addEventListener("message",({source:i,data:s})=>{i===hn&&s===r&&n.length&&n.shift()()},!1),i=>{n.push(i),hn.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",zt(hn.postMessage)),S2=typeof queueMicrotask<"u"?queueMicrotask.bind(hn):typeof process<"u"&&process.nextTick||f1,k2=t=>t!=null&&zt(t[Wi]),P={isArray:Hn,isArrayBuffer:l1,isBuffer:k0,isFormData:Ym,isArrayBufferView:Pm,isString:Hm,isNumber:c1,isBoolean:qm,isObject:T0,isPlainObject:ri,isEmptyObject:jm,isReadableStream:Jm,isRequest:Zm,isResponse:Qm,isHeaders:e2,isUndefined:g0,isDate:Um,isFile:Vm,isBlob:Wm,isRegExp:f2,isFunction:zt,isStream:Km,isURLSearchParams:Xm,isTypedArray:l2,isFileList:Gm,forEach:E0,merge:sa,extend:r2,trim:t2,stripBOM:n2,inherits:i2,toFlatObject:s2,kindOf:Gi,kindOfTest:ar,endsWith:a2,toArray:o2,forEachEntry:c2,matchAll:u2,isHTMLForm:d2,hasOwnProperty:Il,hasOwnProp:Il,reduceDescriptors:h1,freezeMethods:p2,toObjectSet:m2,toCamelCase:h2,noop:g2,toFiniteNumber:v2,findKey:u1,global:hn,isContextDefined:d1,isSpecCompliantForm:b2,toJSONObject:y2,isAsyncFn:w2,isThenable:x2,setImmediate:f1,asap:S2,isIterable:k2};function Me(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}P.inherits(Me,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:P.toJSONObject(this.config),code:this.code,status:this.status}}});const p1=Me.prototype,m1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{m1[t]={value:t}});Object.defineProperties(Me,m1);Object.defineProperty(p1,"isAxiosError",{value:!0});Me.from=(t,e,r,n,i,s)=>{const a=Object.create(p1);return P.toFlatObject(t,a,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),Me.call(a,t.message,e,r,n,i),a.cause=t,a.name=t.name,s&&Object.assign(a,s),a};const T2=null;function aa(t){return P.isPlainObject(t)||P.isArray(t)}function g1(t){return P.endsWith(t,"[]")?t.slice(0,-2):t}function Rl(t,e,r){return t?t.concat(e).map(function(i,s){return i=g1(i),!r&&s?"["+i+"]":i}).join(r?".":""):e}function E2(t){return P.isArray(t)&&!t.some(aa)}const A2=P.toFlatObject(P,{},null,function(e){return/^is[A-Z]/.test(e)});function Yi(t,e,r){if(!P.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=P.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,y){return!P.isUndefined(y[w])});const n=r.metaTokens,i=r.visitor||u,s=r.dots,a=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&P.isSpecCompliantForm(e);if(!P.isFunction(i))throw new TypeError("visitor must be a function");function c(v){if(v===null)return"";if(P.isDate(v))return v.toISOString();if(P.isBoolean(v))return v.toString();if(!l&&P.isBlob(v))throw new Me("Blob is not supported. Use a Buffer instead.");return P.isArrayBuffer(v)||P.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,w,y){let C=v;if(v&&!y&&typeof v=="object"){if(P.endsWith(w,"{}"))w=n?w:w.slice(0,-2),v=JSON.stringify(v);else if(P.isArray(v)&&E2(v)||(P.isFileList(v)||P.endsWith(w,"[]"))&&(C=P.toArray(v)))return w=g1(w),C.forEach(function(T,D){!(P.isUndefined(T)||T===null)&&e.append(a===!0?Rl([w],D,s):a===null?w:w+"[]",c(T))}),!1}return aa(v)?!0:(e.append(Rl(y,w,s),c(v)),!1)}const f=[],p=Object.assign(A2,{defaultVisitor:u,convertValue:c,isVisitable:aa});function g(v,w){if(!P.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+w.join("."));f.push(v),P.forEach(v,function(C,S){(!(P.isUndefined(C)||C===null)&&i.call(e,C,P.isString(S)?S.trim():S,w,p))===!0&&g(C,w?w.concat(S):[S])}),f.pop()}}if(!P.isObject(t))throw new TypeError("data must be an object");return g(t),e}function Ol(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function eo(t,e){this._pairs=[],t&&Yi(t,this,e)}const v1=eo.prototype;v1.append=function(e,r){this._pairs.push([e,r])};v1.toString=function(e){const r=e?function(n){return e.call(this,n,Ol)}:Ol;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function C2(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function b1(t,e,r){if(!e)return t;const n=r&&r.encode||C2;P.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let s;if(i?s=i(e,r):s=P.isURLSearchParams(e)?e.toString():new eo(e,r).toString(n),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class M2{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){P.forEach(this.handlers,function(n){n!==null&&e(n)})}}const _l=M2,y1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},N2=typeof URLSearchParams<"u"?URLSearchParams:eo,D2=typeof FormData<"u"?FormData:null,I2=typeof Blob<"u"?Blob:null,R2={isBrowser:!0,classes:{URLSearchParams:N2,FormData:D2,Blob:I2},protocols:["http","https","file","blob","url","data"]},to=typeof window<"u"&&typeof document<"u",oa=typeof navigator=="object"&&navigator||void 0,O2=to&&(!oa||["ReactNative","NativeScript","NS"].indexOf(oa.product)<0),_2=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),L2=to&&window.location.href||"http://localhost",z2=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:to,hasStandardBrowserEnv:O2,hasStandardBrowserWebWorkerEnv:_2,navigator:oa,origin:L2},Symbol.toStringTag,{value:"Module"})),kt={...z2,...R2};function $2(t,e){return Yi(t,new kt.classes.URLSearchParams,{visitor:function(r,n,i,s){return kt.isNode&&P.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function F2(t){return P.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function B2(t){const e={},r=Object.keys(t);let n;const i=r.length;let s;for(n=0;n=r.length;return a=!a&&P.isArray(i)?i.length:a,l?(P.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!o):((!i[a]||!P.isObject(i[a]))&&(i[a]=[]),e(r,n,i[a],s)&&P.isArray(i[a])&&(i[a]=B2(i[a])),!o)}if(P.isFormData(t)&&P.isFunction(t.entries)){const r={};return P.forEachEntry(t,(n,i)=>{e(F2(n),i,r,0)}),r}return null}function P2(t,e,r){if(P.isString(t))try{return(e||JSON.parse)(t),P.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const ro={transitional:y1,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,s=P.isObject(e);if(s&&P.isHTMLForm(e)&&(e=new FormData(e)),P.isFormData(e))return i?JSON.stringify(w1(e)):e;if(P.isArrayBuffer(e)||P.isBuffer(e)||P.isStream(e)||P.isFile(e)||P.isBlob(e)||P.isReadableStream(e))return e;if(P.isArrayBufferView(e))return e.buffer;if(P.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return $2(e,this.formSerializer).toString();if((o=P.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Yi(o?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||i?(r.setContentType("application/json",!1),P2(e)):e}],transformResponse:[function(e){const r=this.transitional||ro.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(P.isResponse(e)||P.isReadableStream(e))return e;if(e&&P.isString(e)&&(n&&!this.responseType||i)){const a=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(o){if(a)throw o.name==="SyntaxError"?Me.from(o,Me.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kt.classes.FormData,Blob:kt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};P.forEach(["delete","get","head","post","put","patch"],t=>{ro.headers[t]={}});const no=ro,H2=P.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),q2=t=>{const e={};let r,n,i;return t&&t.split(` -`).forEach(function(a){i=a.indexOf(":"),r=a.substring(0,i).trim().toLowerCase(),n=a.substring(i+1).trim(),!(!r||e[r]&&H2[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},Ll=Symbol("internals");function Yn(t){return t&&String(t).trim().toLowerCase()}function ni(t){return t===!1||t==null?t:P.isArray(t)?t.map(ni):String(t)}function j2(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const U2=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ks(t,e,r,n,i){if(P.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!P.isString(e)){if(P.isString(n))return e.indexOf(n)!==-1;if(P.isRegExp(n))return n.test(e)}}function V2(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function W2(t,e){const r=P.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,s,a){return this[n].call(this,e,i,s,a)},configurable:!0})})}class Xi{constructor(e){e&&this.set(e)}set(e,r,n){const i=this;function s(o,l,c){const u=Yn(l);if(!u)throw new Error("header name must be a non-empty string");const f=P.findKey(i,u);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||l]=ni(o))}const a=(o,l)=>P.forEach(o,(c,u)=>s(c,u,l));if(P.isPlainObject(e)||e instanceof this.constructor)a(e,r);else if(P.isString(e)&&(e=e.trim())&&!U2(e))a(q2(e),r);else if(P.isObject(e)&&P.isIterable(e)){let o={},l,c;for(const u of e){if(!P.isArray(u))throw TypeError("Object iterator must return a key-value pair");o[c=u[0]]=(l=o[c])?P.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}a(o,r)}else e!=null&&s(r,e,n);return this}get(e,r){if(e=Yn(e),e){const n=P.findKey(this,e);if(n){const i=this[n];if(!r)return i;if(r===!0)return j2(i);if(P.isFunction(r))return r.call(this,i,n);if(P.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Yn(e),e){const n=P.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||ks(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let i=!1;function s(a){if(a=Yn(a),a){const o=P.findKey(n,a);o&&(!r||ks(n,n[o],o,r))&&(delete n[o],i=!0)}}return P.isArray(e)?e.forEach(s):s(e),i}clear(e){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const s=r[n];(!e||ks(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const r=this,n={};return P.forEach(this,(i,s)=>{const a=P.findKey(n,s);if(a){r[a]=ni(i),delete r[s];return}const o=e?V2(s):String(s).trim();o!==s&&delete r[s],r[o]=ni(i),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return P.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&P.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(` -`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[Ll]=this[Ll]={accessors:{}}).accessors,i=this.prototype;function s(a){const o=Yn(a);n[o]||(W2(i,a),n[o]=!0)}return P.isArray(e)?e.forEach(s):s(e),this}}Xi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);P.reduceDescriptors(Xi.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});P.freezeMethods(Xi);const ir=Xi;function Ts(t,e){const r=this||no,n=e||r,i=ir.from(n.headers);let s=n.data;return P.forEach(t,function(o){s=o.call(r,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function x1(t){return!!(t&&t.__CANCEL__)}function qn(t,e,r){Me.call(this,t??"canceled",Me.ERR_CANCELED,e,r),this.name="CanceledError"}P.inherits(qn,Me,{__CANCEL__:!0});function S1(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new Me("Request failed with status code "+r.status,[Me.ERR_BAD_REQUEST,Me.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function G2(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function K2(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i=0,s=0,a;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=n[s];a||(a=c),r[i]=l,n[i]=c;let f=s,p=0;for(;f!==i;)p+=r[f++],f=f%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-a{r=u,i=null,s&&(clearTimeout(s),s=null),t(...c)};return[(...c)=>{const u=Date.now(),f=u-r;f>=n?a(c,u):(i=c,s||(s=setTimeout(()=>{s=null,a(i)},n-f)))},()=>i&&a(i)]}const Si=(t,e,r=3)=>{let n=0;const i=K2(50,250);return Y2(s=>{const a=s.loaded,o=s.lengthComputable?s.total:void 0,l=a-n,c=i(l),u=a<=o;n=a;const f={loaded:a,total:o,progress:o?a/o:void 0,bytes:l,rate:c||void 0,estimated:c&&o&&u?(o-a)/c:void 0,event:s,lengthComputable:o!=null,[e?"download":"upload"]:!0};t(f)},r)},zl=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},$l=t=>(...e)=>P.asap(()=>t(...e)),X2=kt.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,kt.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(kt.origin),kt.navigator&&/(msie|trident)/i.test(kt.navigator.userAgent)):()=>!0,J2=kt.hasStandardBrowserEnv?{write(t,e,r,n,i,s){const a=[t+"="+encodeURIComponent(e)];P.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),P.isString(n)&&a.push("path="+n),P.isString(i)&&a.push("domain="+i),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Z2(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Q2(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function k1(t,e,r){let n=!Z2(e);return t&&(n||r==!1)?Q2(t,e):e}const Fl=t=>t instanceof ir?{...t}:t;function mn(t,e){e=e||{};const r={};function n(c,u,f,p){return P.isPlainObject(c)&&P.isPlainObject(u)?P.merge.call({caseless:p},c,u):P.isPlainObject(u)?P.merge({},u):P.isArray(u)?u.slice():u}function i(c,u,f,p){if(P.isUndefined(u)){if(!P.isUndefined(c))return n(void 0,c,f,p)}else return n(c,u,f,p)}function s(c,u){if(!P.isUndefined(u))return n(void 0,u)}function a(c,u){if(P.isUndefined(u)){if(!P.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function o(c,u,f){if(f in e)return n(c,u);if(f in t)return n(void 0,c)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(c,u,f)=>i(Fl(c),Fl(u),f,!0)};return P.forEach(Object.keys({...t,...e}),function(u){const f=l[u]||i,p=f(t[u],e[u],u);P.isUndefined(p)&&f!==o||(r[u]=p)}),r}const T1=t=>{const e=mn({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:o}=e;e.headers=a=ir.from(a),e.url=b1(k1(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let l;if(P.isFormData(r)){if(kt.hasStandardBrowserEnv||kt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...u]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if(kt.hasStandardBrowserEnv&&(n&&P.isFunction(n)&&(n=n(e)),n||n!==!1&&X2(e.url))){const c=i&&s&&J2.read(s);c&&a.set(i,c)}return e},e3=typeof XMLHttpRequest<"u",t3=e3&&function(t){return new Promise(function(r,n){const i=T1(t);let s=i.data;const a=ir.from(i.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:c}=i,u,f,p,g,v;function w(){g&&g(),v&&v(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function C(){if(!y)return;const T=ir.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),I={data:!o||o==="text"||o==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:T,config:t,request:y};S1(function(F){r(F),w()},function(F){n(F),w()},I),y=null}"onloadend"in y?y.onloadend=C:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(C)},y.onabort=function(){y&&(n(new Me("Request aborted",Me.ECONNABORTED,t,y)),y=null)},y.onerror=function(){n(new Me("Network Error",Me.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let D=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const I=i.transitional||y1;i.timeoutErrorMessage&&(D=i.timeoutErrorMessage),n(new Me(D,I.clarifyTimeoutError?Me.ETIMEDOUT:Me.ECONNABORTED,t,y)),y=null},s===void 0&&a.setContentType(null),"setRequestHeader"in y&&P.forEach(a.toJSON(),function(D,I){y.setRequestHeader(I,D)}),P.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),o&&o!=="json"&&(y.responseType=i.responseType),c&&([p,v]=Si(c,!0),y.addEventListener("progress",p)),l&&y.upload&&([f,g]=Si(l),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(u=T=>{y&&(n(!T||T.type?new qn(null,t,y):T),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const S=G2(i.url);if(S&&kt.protocols.indexOf(S)===-1){n(new Me("Unsupported protocol "+S+":",Me.ERR_BAD_REQUEST,t));return}y.send(s||null)})},r3=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,i;const s=function(c){if(!i){i=!0,o();const u=c instanceof Error?c:this.reason;n.abort(u instanceof Me?u:new qn(u instanceof Error?u.message:u))}};let a=e&&setTimeout(()=>{a=null,s(new Me(`timeout ${e} of ms exceeded`,Me.ETIMEDOUT))},e);const o=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),t=null)};t.forEach(c=>c.addEventListener("abort",s));const{signal:l}=n;return l.unsubscribe=()=>P.asap(o),l}},n3=r3,i3=function*(t,e){let r=t.byteLength;if(!e||r{const i=s3(t,e);let s=0,a,o=l=>{a||(a=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){o(),l.close();return}let f=u.byteLength;if(r){let p=s+=f;r(p)}l.enqueue(new Uint8Array(u))}catch(c){throw o(c),c}},cancel(l){return o(l),i.return()}},{highWaterMark:2})},Ji=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",E1=Ji&&typeof ReadableStream=="function",o3=Ji&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),A1=(t,...e)=>{try{return!!t(...e)}catch{return!1}},l3=E1&&A1(()=>{let t=!1;const e=new Request(kt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Pl=64*1024,la=E1&&A1(()=>P.isReadableStream(new Response("").body)),ki={stream:la&&(t=>t.body)};Ji&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ki[e]&&(ki[e]=P.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new Me(`Response type '${e}' is not supported`,Me.ERR_NOT_SUPPORT,n)})})})(new Response);const c3=async t=>{if(t==null)return 0;if(P.isBlob(t))return t.size;if(P.isSpecCompliantForm(t))return(await new Request(kt.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(P.isArrayBufferView(t)||P.isArrayBuffer(t))return t.byteLength;if(P.isURLSearchParams(t)&&(t=t+""),P.isString(t))return(await o3(t)).byteLength},u3=async(t,e)=>{const r=P.toFiniteNumber(t.getContentLength());return r??c3(e)},d3=Ji&&(async t=>{let{url:e,method:r,data:n,signal:i,cancelToken:s,timeout:a,onDownloadProgress:o,onUploadProgress:l,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:p}=T1(t);c=c?(c+"").toLowerCase():"text";let g=n3([i,s&&s.toAbortSignal()],a),v;const w=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let y;try{if(l&&l3&&r!=="get"&&r!=="head"&&(y=await u3(u,n))!==0){let I=new Request(e,{method:"POST",body:n,duplex:"half"}),_;if(P.isFormData(n)&&(_=I.headers.get("content-type"))&&u.setContentType(_),I.body){const[F,G]=zl(y,Si($l(l)));n=Bl(I.body,Pl,F,G)}}P.isString(f)||(f=f?"include":"omit");const C="credentials"in Request.prototype;v=new Request(e,{...p,signal:g,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:C?f:void 0});let S=await fetch(v,p);const T=la&&(c==="stream"||c==="response");if(la&&(o||T&&w)){const I={};["status","statusText","headers"].forEach(W=>{I[W]=S[W]});const _=P.toFiniteNumber(S.headers.get("content-length")),[F,G]=o&&zl(_,Si($l(o),!0))||[];S=new Response(Bl(S.body,Pl,F,()=>{G&&G(),w&&w()}),I)}c=c||"text";let D=await ki[P.findKey(ki,c)||"text"](S,t);return!T&&w&&w(),await new Promise((I,_)=>{S1(I,_,{data:D,headers:ir.from(S.headers),status:S.status,statusText:S.statusText,config:t,request:v})})}catch(C){throw w&&w(),C&&C.name==="TypeError"&&/Load failed|fetch/i.test(C.message)?Object.assign(new Me("Network Error",Me.ERR_NETWORK,t,v),{cause:C.cause||C}):Me.from(C,C&&C.code,t,v)}}),ca={http:T2,xhr:t3,fetch:d3};P.forEach(ca,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Hl=t=>`- ${t}`,h3=t=>P.isFunction(t)||t===null||t===!1,C1={getAdapter:t=>{t=P.isArray(t)?t:[t];const{length:e}=t;let r,n;const i={};for(let s=0;s`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since : -`+s.map(Hl).join(` -`):" "+Hl(s[0]):"as no adapter specified";throw new Me("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:ca};function Es(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new qn(null,t)}function ql(t){return Es(t),t.headers=ir.from(t.headers),t.data=Ts.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),C1.getAdapter(t.adapter||no.adapter)(t).then(function(n){return Es(t),n.data=Ts.call(t,t.transformResponse,n),n.headers=ir.from(n.headers),n},function(n){return x1(n)||(Es(t),n&&n.response&&(n.response.data=Ts.call(t,t.transformResponse,n.response),n.response.headers=ir.from(n.response.headers))),Promise.reject(n)})}const M1="1.11.0",Zi={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Zi[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const jl={};Zi.transitional=function(e,r,n){function i(s,a){return"[Axios v"+M1+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return(s,a,o)=>{if(e===!1)throw new Me(i(a," has been removed"+(r?" in "+r:"")),Me.ERR_DEPRECATED);return r&&!jl[a]&&(jl[a]=!0,console.warn(i(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,a,o):!0}};Zi.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function f3(t,e,r){if(typeof t!="object")throw new Me("options must be an object",Me.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const s=n[i],a=e[s];if(a){const o=t[s],l=o===void 0||a(o,s,t);if(l!==!0)throw new Me("option "+s+" must be "+l,Me.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Me("Unknown option "+s,Me.ERR_BAD_OPTION)}}const ii={assertOptions:f3,validators:Zi},lr=ii.validators;class Ti{constructor(e){this.defaults=e||{},this.interceptors={request:new _l,response:new _l}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=` -`+s):n.stack=s}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=mn(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&ii.assertOptions(n,{silentJSONParsing:lr.transitional(lr.boolean),forcedJSONParsing:lr.transitional(lr.boolean),clarifyTimeoutError:lr.transitional(lr.boolean)},!1),i!=null&&(P.isFunction(i)?r.paramsSerializer={serialize:i}:ii.assertOptions(i,{encode:lr.function,serialize:lr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ii.assertOptions(r,{baseUrl:lr.spelling("baseURL"),withXsrfToken:lr.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=s&&P.merge(s.common,s[r.method]);s&&P.forEach(["delete","get","head","post","put","patch","common"],v=>{delete s[v]}),r.headers=ir.concat(a,s);const o=[];let l=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(r)===!1||(l=l&&w.synchronous,o.unshift(w.fulfilled,w.rejected))});const c=[];this.interceptors.response.forEach(function(w){c.push(w.fulfilled,w.rejected)});let u,f=0,p;if(!l){const v=[ql.bind(this),void 0];for(v.unshift(...o),v.push(...c),p=v.length,u=Promise.resolve(r);f{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(o=>{n.subscribe(o),s=o}).then(i);return a.cancel=function(){n.unsubscribe(s)},a},e(function(s,a,o){n.reason||(n.reason=new qn(s,a,o),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new io(function(i){e=i}),cancel:e}}}const p3=io;function m3(t){return function(r){return t.apply(null,r)}}function g3(t){return P.isObject(t)&&t.isAxiosError===!0}const ua={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ua).forEach(([t,e])=>{ua[e]=t});const v3=ua;function N1(t){const e=new si(t),r=a1(si.prototype.request,e);return P.extend(r,si.prototype,e,{allOwnKeys:!0}),P.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return N1(mn(t,i))},r}const ht=N1(no);ht.Axios=si;ht.CanceledError=qn;ht.CancelToken=p3;ht.isCancel=x1;ht.VERSION=M1;ht.toFormData=Yi;ht.AxiosError=Me;ht.Cancel=ht.CanceledError;ht.all=function(e){return Promise.all(e)};ht.spread=m3;ht.isAxiosError=g3;ht.mergeConfig=mn;ht.AxiosHeaders=ir;ht.formToJSON=t=>w1(P.isHTMLForm(t)?new FormData(t):t);ht.getAdapter=C1.getAdapter;ht.HttpStatusCode=v3;ht.default=ht;const b3=ht,y3="http://127.0.0.1:8000/api",kn=b3.create({baseURL:y3,timeout:1e4,headers:{"Content-Type":"application/json"}}),ct={createMindmap:(t="思维导图",e=null)=>kn.post("/mindMaps",{title:t,data:e}),getMindmap:t=>kn.get(`/mindMaps/${t}`),getAllMindmaps:()=>kn.get("/mindmaps"),addNodes:(t,e)=>kn.post("/mindMaps/addNodes",{mindMapId:t,nodes:e}),updateNode:(t,e)=>kn.patch("/mindMaps/updateNode",{id:t,...e}),deleteNodes:t=>kn.delete("/mindMaps/deleteNodes",{data:{nodeIds:t}})};function so(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var bn=so();function D1(t){bn=t}var c0={exec:()=>null};function Pe(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(Dt.caret,"$1"),r=r.replace(i,a),n},getRegex:()=>new RegExp(r,e)};return n}var Dt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},w3=/^(?:[ \t]*(?:\n|$))+/,x3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,S3=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,A0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,k3=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ao=/(?:[*+-]|\d{1,9}[.)])/,I1=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,R1=Pe(I1).replace(/bull/g,ao).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),T3=Pe(I1).replace(/bull/g,ao).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),oo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,E3=/^[^\n]+/,lo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,A3=Pe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",lo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),C3=Pe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ao).getRegex(),Qi="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",co=/|$))/,M3=Pe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",co).replace("tag",Qi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),O1=Pe(oo).replace("hr",A0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Qi).getRegex(),N3=Pe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",O1).getRegex(),uo={blockquote:N3,code:x3,def:A3,fences:S3,heading:k3,hr:A0,html:M3,lheading:R1,list:C3,newline:w3,paragraph:O1,table:c0,text:E3},Ul=Pe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",A0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Qi).getRegex(),D3={...uo,lheading:T3,table:Ul,paragraph:Pe(oo).replace("hr",A0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ul).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Qi).getRegex()},I3={...uo,html:Pe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",co).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:c0,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Pe(oo).replace("hr",A0).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",R1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},R3=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,O3=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_1=/^( {2,}|\\)\n(?!\s*$)/,_3=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,$1=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,B3=Pe($1,"u").replace(/punct/g,es).getRegex(),P3=Pe($1,"u").replace(/punct/g,z1).getRegex(),F1="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",H3=Pe(F1,"gu").replace(/notPunctSpace/g,L1).replace(/punctSpace/g,ho).replace(/punct/g,es).getRegex(),q3=Pe(F1,"gu").replace(/notPunctSpace/g,$3).replace(/punctSpace/g,z3).replace(/punct/g,z1).getRegex(),j3=Pe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,L1).replace(/punctSpace/g,ho).replace(/punct/g,es).getRegex(),U3=Pe(/\\(punct)/,"gu").replace(/punct/g,es).getRegex(),V3=Pe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),W3=Pe(co).replace("(?:-->|$)","-->").getRegex(),G3=Pe("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",W3).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ei=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,K3=Pe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ei).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),B1=Pe(/^!?\[(label)\]\[(ref)\]/).replace("label",Ei).replace("ref",lo).getRegex(),P1=Pe(/^!?\[(ref)\](?:\[\])?/).replace("ref",lo).getRegex(),Y3=Pe("reflink|nolink(?!\\()","g").replace("reflink",B1).replace("nolink",P1).getRegex(),fo={_backpedal:c0,anyPunctuation:U3,autolink:V3,blockSkip:F3,br:_1,code:O3,del:c0,emStrongLDelim:B3,emStrongRDelimAst:H3,emStrongRDelimUnd:j3,escape:R3,link:K3,nolink:P1,punctuation:L3,reflink:B1,reflinkSearch:Y3,tag:G3,text:_3,url:c0},X3={...fo,link:Pe(/^!?\[(label)\]\((.*?)\)/).replace("label",Ei).getRegex(),reflink:Pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ei).getRegex()},da={...fo,emStrongRDelimAst:q3,emStrongLDelim:P3,url:Pe(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},Vl=t=>Z3[t];function cr(t,e){if(e){if(Dt.escapeTest.test(t))return t.replace(Dt.escapeReplace,Vl)}else if(Dt.escapeTestNoEncode.test(t))return t.replace(Dt.escapeReplaceNoEncode,Vl);return t}function Wl(t){try{t=encodeURI(t).replace(Dt.percentDecode,"%")}catch{return null}return t}function Gl(t,e){var s;let r=t.replace(Dt.findPipe,(a,o,l)=>{let c=!1,u=o;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),n=r.split(Dt.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!((s=n.at(-1))!=null&&s.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length0?-2:-1}function Kl(t,e,r,n,i){let s=e.href,a=e.title||null,o=t[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:a,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function e6(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let i=n[1];return e.split(` -`).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[o]=a;return o.length>=i.length?s.slice(i.length):s}).join(` -`)}var Ai=class{constructor(t){We(this,"options");We(this,"rules");We(this,"lexer");this.options=t||bn}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Jn(r,` -`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],n=e6(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let n=Jn(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Jn(e[0],` -`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=Jn(e[0],` -`).split(` -`),n="",i="",s=[];for(;r.length>0;){let a=!1,o=[],l;for(l=0;l1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let s=this.rules.other.listItemRegex(r),a=!1;for(;t;){let l=!1,c="",u="";if(!(e=s.exec(t))||this.rules.block.hr.test(t))break;c=e[0],t=t.substring(c.length);let f=e[2].split(` -`,1)[0].replace(this.rules.other.listReplaceTabs,C=>" ".repeat(3*C.length)),p=t.split(` -`,1)[0],g=!f.trim(),v=0;if(this.options.pedantic?(v=2,u=f.trimStart()):g?v=e[1].length+1:(v=e[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,u=f.slice(v),v+=e[1].length),g&&this.rules.other.blankLine.test(p)&&(c+=p+` -`,t=t.substring(p.length+1),l=!0),!l){let C=this.rules.other.nextBulletRegex(v),S=this.rules.other.hrRegex(v),T=this.rules.other.fencesBeginRegex(v),D=this.rules.other.headingBeginRegex(v),I=this.rules.other.htmlBeginRegex(v);for(;t;){let _=t.split(` -`,1)[0],F;if(p=_,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),F=p):F=p.replace(this.rules.other.tabCharGlobal," "),T.test(p)||D.test(p)||I.test(p)||C.test(p)||S.test(p))break;if(F.search(this.rules.other.nonSpaceChar)>=v||!p.trim())u+=` -`+F.slice(v);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(f)||D.test(f)||S.test(f))break;u+=` -`+p}!g&&!p.trim()&&(g=!0),c+=_+` -`,t=t.substring(_.length+1),f=F.slice(v)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(a=!0));let w=null,y;this.options.gfm&&(w=this.rules.other.listIsTask.exec(u),w&&(y=w[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:c,task:!!w,checked:y,loose:!1,text:u,tokens:[]}),i.raw+=c}let o=i.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l=0;lf.type==="space"),u=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));i.loose=u}if(i.loose)for(let l=0;l({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[c]})));return s}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===` -`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let s=Jn(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{let s=Q3(e[2],"()");if(s===-2)return;if(s>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let n=e[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],i=s[3])}else i=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),Kl(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[n.toLowerCase()];if(!i){let s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return Kl(r,i,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,s,a,o=i,l=0,c=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*t.length+i);(n=c.exec(e))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(a=[...s].length,n[3]||n[4]){o+=a;continue}else if((n[5]||n[6])&&i%3&&!((i+a)%3)){l+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let u=[...n[0]][0].length,f=t.slice(0,i+n.index+u+a);if(Math.min(i,a)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r;let e;if(e=this.rules.inline.url.exec(t)){let n,i;if(e[2]==="@")n=e[0],i="mailto:"+n;else{let s;do s=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(s!==e[0]);n=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},Mr=class ha{constructor(e){We(this,"tokens");We(this,"options");We(this,"state");We(this,"tokenizer");We(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||bn,this.options.tokenizer=this.options.tokenizer||new Ai,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Dt,block:P0.normal,inline:Xn.normal};this.options.pedantic?(r.block=P0.pedantic,r.inline=Xn.pedantic):this.options.gfm&&(r.block=P0.gfm,this.options.breaks?r.inline=Xn.breaks:r.inline=Xn.gfm),this.tokenizer.rules=r}static get rules(){return{block:P0,inline:Xn}}static lex(e,r){return new ha(r).lex(e)}static lexInline(e,r){return new ha(r).inlineTokens(e)}lex(e){e=e.replace(Dt.carriageReturn,` -`),this.blockTokens(e,this.tokens);for(let r=0;r(o=c.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let c=r.at(-1);o.raw.length===1&&c!==void 0?c.raw+=` -`:r.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(` -`)?"":` -`)+o.raw,c.text+=` -`+o.text,this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(` -`)?"":` -`)+o.raw,c.text+=` -`+o.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),r.push(o);continue}let l=e;if((a=this.options.extensions)!=null&&a.startBlock){let c=1/0,u=e.slice(1),f;this.options.extensions.startBlock.forEach(p=>{f=p.call({lexer:this},u),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(l=e.substring(0,c+1))}if(this.state.top&&(o=this.tokenizer.paragraph(l))){let c=r.at(-1);n&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(` -`)?"":` -`)+o.raw,c.text+=` -`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o),n=l.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(` -`)?"":` -`)+o.raw,c.text+=` -`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var o,l,c;let n=e,i=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)u.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,a="";for(;e;){s||(a=""),s=!1;let u;if((l=(o=this.options.extensions)==null?void 0:o.inline)!=null&&l.some(p=>(u=p.call({lexer:this},e,r))?(e=e.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.escape(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.tag(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.link(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(u.raw.length);let p=r.at(-1);u.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=u.raw,p.text+=u.text):r.push(u);continue}if(u=this.tokenizer.emStrong(e,n,a)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.codespan(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.br(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.del(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.autolink(e)){e=e.substring(u.raw.length),r.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(e))){e=e.substring(u.raw.length),r.push(u);continue}let f=e;if((c=this.options.extensions)!=null&&c.startInline){let p=1/0,g=e.slice(1),v;this.options.extensions.startInline.forEach(w=>{v=w.call({lexer:this},g),typeof v=="number"&&v>=0&&(p=Math.min(p,v))}),p<1/0&&p>=0&&(f=e.substring(0,p+1))}if(u=this.tokenizer.inlineText(f)){e=e.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(a=u.raw.slice(-1)),s=!0;let p=r.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=u.raw,p.text+=u.text):r.push(u);continue}if(e){let p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return r}},Ci=class{constructor(t){We(this,"options");We(this,"parser");this.options=t||bn}space(t){return""}code({text:t,lang:e,escaped:r}){var s;let n=(s=(e||"").match(Dt.notSpaceStart))==null?void 0:s[0],i=t.replace(Dt.endingNewline,"")+` -`;return n?'
'+(r?i:cr(i,!0))+`
-`:"
"+(r?i:cr(i,!0))+`
-`}blockquote({tokens:t}){return`
-${this.parser.parse(t)}
-`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)} -`}hr(t){return`
-`}list(t){let e=t.ordered,r=t.start,n="";for(let a=0;a -`+n+" -`}listitem(t){var r;let e="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?((r=t.tokens[0])==null?void 0:r.type)==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+cr(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • -`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    -`}table(t){let e="",r="";for(let i=0;i${n}`),` - -`+e+` -`+n+`
    -`}tablerow({text:t}){return` -${t} -`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+` -`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${cr(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){let n=this.parser.parseInline(r),i=Wl(t);if(i===null)return n;t=i;let s='
    ",s}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=Wl(t);if(i===null)return cr(r);t=i;let s=`${r}{let l=a[o].flat(1/0);r=r.concat(this.walkTokens(l,e))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=e.renderers[i.name];s?e.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===!1&&(o=s.apply(this,a)),o}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[i.level];s?s.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),r.renderer){let i=this.defaults.renderer||new Ci(this.defaults);for(let s in r.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,o=r.renderer[a],l=i[a];i[a]=(...c)=>{let u=o.apply(i,c);return u===!1&&(u=l.apply(i,c)),u||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new Ai(this.defaults);for(let s in r.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,o=r.tokenizer[a],l=i[a];i[a]=(...c)=>{let u=o.apply(i,c);return u===!1&&(u=l.apply(i,c)),u}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new ai;for(let s in r.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,o=r.hooks[a],l=i[a];ai.passThroughHooks.has(s)?i[a]=c=>{if(this.defaults.async)return Promise.resolve(o.call(i,c)).then(f=>l.call(i,f));let u=o.call(i,c);return l.call(i,u)}:i[a]=(...c)=>{let u=o.apply(i,c);return u===!1&&(u=l.apply(i,c)),u}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,s=r.walkTokens;n.walkTokens=function(a){let o=[];return o.push(s.call(this,a)),i&&(o=o.concat(i.call(this,a))),o}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Mr.lex(t,e??this.defaults)}parser(t,e){return Nr.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let n={...r},i={...this.defaults,...n},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);let a=i.hooks?i.hooks.provideLexer():t?Mr.lex:Mr.lexInline,o=i.hooks?i.hooks.provideParser():t?Nr.parse:Nr.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(e):e).then(l=>a(l,i)).then(l=>i.hooks?i.hooks.processAllTokens(l):l).then(l=>i.walkTokens?Promise.all(this.walkTokens(l,i.walkTokens)).then(()=>l):l).then(l=>o(l,i)).then(l=>i.hooks?i.hooks.postprocess(l):l).catch(s);try{i.hooks&&(e=i.hooks.preprocess(e));let l=a(e,i);i.hooks&&(l=i.hooks.processAllTokens(l)),i.walkTokens&&this.walkTokens(l,i.walkTokens);let c=o(l,i);return i.hooks&&(c=i.hooks.postprocess(c)),c}catch(l){return s(l)}}}onError(t,e){return r=>{if(r.message+=` -Please report this to https://github.com/markedjs/marked.`,t){let n="

    An error occurred:

    "+cr(r.message+"",!0)+"
    ";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},gn=new t6;function $e(t,e){return gn.parse(t,e)}$e.options=$e.setOptions=function(t){return gn.setOptions(t),$e.defaults=gn.defaults,D1($e.defaults),$e};$e.getDefaults=so;$e.defaults=bn;$e.use=function(...t){return gn.use(...t),$e.defaults=gn.defaults,D1($e.defaults),$e};$e.walkTokens=function(t,e){return gn.walkTokens(t,e)};$e.parseInline=gn.parseInline;$e.Parser=Nr;$e.parser=Nr.parse;$e.Renderer=Ci;$e.TextRenderer=po;$e.Lexer=Mr;$e.lexer=Mr.lex;$e.Tokenizer=Ai;$e.Hooks=ai;$e.parse=$e;$e.options;$e.setOptions;$e.use;$e.walkTokens;$e.parseInline;Nr.parse;Mr.lex;var Yl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function r6(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function xg(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var H1={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** - * Prism: Lightweight, robust, elegant syntax highlighting - * - * @license MIT - * @author Lea Verou - * @namespace - * @public - */var r=function(n){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,a={},o={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function S(T){return T instanceof l?new l(T.type,S(T.content),T.alias):Array.isArray(T)?T.map(S):T.replace(/&/g,"&").replace(/"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT"&&1<2)return document.currentScript;try{throw new Error}catch(I){var S=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(I.stack)||[])[1];if(S){var T=document.getElementsByTagName("script");for(var D in T)if(T[D].src==S)return T[D]}return null}},isActive:function(S,T,D){for(var I="no-"+T;S;){var _=S.classList;if(_.contains(T))return!0;if(_.contains(I))return!1;S=S.parentElement}return!!D}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(S,T){var D=o.util.clone(o.languages[S]);for(var I in T)D[I]=T[I];return D},insertBefore:function(S,T,D,I){I=I||o.languages;var _=I[S],F={};for(var G in _)if(_.hasOwnProperty(G)){if(G==T)for(var W in D)D.hasOwnProperty(W)&&(F[W]=D[W]);D.hasOwnProperty(G)||(F[G]=_[G])}var fe=I[S];return I[S]=F,o.languages.DFS(o.languages,function(ve,Te){Te===fe&&ve!=S&&(this[ve]=F)}),F},DFS:function S(T,D,I,_){_=_||{};var F=o.util.objId;for(var G in T)if(T.hasOwnProperty(G)){D.call(T,G,T[G],I||G);var W=T[G],fe=o.util.type(W);fe==="Object"&&!_[F(W)]?(_[F(W)]=!0,S(W,D,null,_)):fe==="Array"&&!_[F(W)]&&(_[F(W)]=!0,S(W,D,G,_))}}},plugins:{},highlightAll:function(S,T){o.highlightAllUnder(document,S,T)},highlightAllUnder:function(S,T,D){var I={callback:D,container:S,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",I),I.elements=Array.prototype.slice.apply(I.container.querySelectorAll(I.selector)),o.hooks.run("before-all-elements-highlight",I);for(var _=0,F;F=I.elements[_++];)o.highlightElement(F,T===!0,I.callback)},highlightElement:function(S,T,D){var I=o.util.getLanguage(S),_=o.languages[I];o.util.setLanguage(S,I);var F=S.parentElement;F&&F.nodeName.toLowerCase()==="pre"&&o.util.setLanguage(F,I);var G=S.textContent,W={element:S,language:I,grammar:_,code:G};function fe(Te){W.highlightedCode=Te,o.hooks.run("before-insert",W),W.element.innerHTML=W.highlightedCode,o.hooks.run("after-highlight",W),o.hooks.run("complete",W),D&&D.call(W.element)}if(o.hooks.run("before-sanity-check",W),F=W.element.parentElement,F&&F.nodeName.toLowerCase()==="pre"&&!F.hasAttribute("tabindex")&&F.setAttribute("tabindex","0"),!W.code){o.hooks.run("complete",W),D&&D.call(W.element);return}if(o.hooks.run("before-highlight",W),!W.grammar){fe(o.util.encode(W.code));return}if(T&&n.Worker){var ve=new Worker(o.filename);ve.onmessage=function(Te){fe(Te.data)},ve.postMessage(JSON.stringify({language:W.language,code:W.code,immediateClose:!0}))}else fe(o.highlight(W.code,W.grammar,W.language))},highlight:function(S,T,D){var I={code:S,grammar:T,language:D};if(o.hooks.run("before-tokenize",I),!I.grammar)throw new Error('The language "'+I.language+'" has no grammar.');return I.tokens=o.tokenize(I.code,I.grammar),o.hooks.run("after-tokenize",I),l.stringify(o.util.encode(I.tokens),I.language)},tokenize:function(S,T){var D=T.rest;if(D){for(var I in D)T[I]=D[I];delete T.rest}var _=new f;return p(_,_.head,S),u(S,_,T,_.head,0),v(_)},hooks:{all:{},add:function(S,T){var D=o.hooks.all;D[S]=D[S]||[],D[S].push(T)},run:function(S,T){var D=o.hooks.all[S];if(!(!D||!D.length))for(var I=0,_;_=D[I++];)_(T)}},Token:l};n.Prism=o;function l(S,T,D,I){this.type=S,this.content=T,this.alias=D,this.length=(I||"").length|0}l.stringify=function S(T,D){if(typeof T=="string")return T;if(Array.isArray(T)){var I="";return T.forEach(function(fe){I+=S(fe,D)}),I}var _={type:T.type,content:S(T.content,D),tag:"span",classes:["token",T.type],attributes:{},language:D},F=T.alias;F&&(Array.isArray(F)?Array.prototype.push.apply(_.classes,F):_.classes.push(F)),o.hooks.run("wrap",_);var G="";for(var W in _.attributes)G+=" "+W+'="'+(_.attributes[W]||"").replace(/"/g,""")+'"';return"<"+_.tag+' class="'+_.classes.join(" ")+'"'+G+">"+_.content+""};function c(S,T,D,I){S.lastIndex=T;var _=S.exec(D);if(_&&I&&_[1]){var F=_[1].length;_.index+=F,_[0]=_[0].slice(F)}return _}function u(S,T,D,I,_,F){for(var G in D)if(!(!D.hasOwnProperty(G)||!D[G])){var W=D[G];W=Array.isArray(W)?W:[W];for(var fe=0;fe=F.reach);He+=pe.value.length,pe=pe.next){var qe=pe.value;if(T.length>S.length)return;if(!(qe instanceof l)){var Je=1,me;if(ze){if(me=c(Ae,He,S,Xe),!me||me.index>=S.length)break;var yt=me.index,Et=me.index+me[0].length,ot=He;for(ot+=pe.value.length;yt>=ot;)pe=pe.next,ot+=pe.value.length;if(ot-=pe.value.length,He=ot,pe.value instanceof l)continue;for(var gt=pe;gt!==T.tail&&(otF.reach&&(F.reach=Q);var ie=pe.prev;U&&(ie=p(T,ie,U),He+=U.length),g(T,ie,Je);var ye=new l(G,Te?o.tokenize(lt,Te):lt,rt,lt);if(pe=p(T,ie,ye),V&&p(T,pe,V),Je>1){var k={cause:G+","+fe,reach:Q};u(S,T,D,pe.prev,He,k),F&&k.reach>F.reach&&(F.reach=k.reach)}}}}}}function f(){var S={value:null,prev:null,next:null},T={value:null,prev:S,next:null};S.next=T,this.head=S,this.tail=T,this.length=0}function p(S,T,D){var I=T.next,_={value:D,prev:T,next:I};return T.next=_,I.prev=_,S.length++,_}function g(S,T,D){for(var I=T.next,_=0;_/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(i,s){var a={};a["language-"+s]={pattern:/(^$)/i,lookbehind:!0,inside:r.languages[s]},a.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:a}};o["language-"+s]={pattern:/[\s\S]+/,inside:r.languages[s]};var l={};l[i]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:o},r.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(n,i){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:r.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(n){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var s=n.languages.markup;s&&(s.tag.addInlined("style","css"),s.tag.addAttribute("style","css"))}(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var n="Loading…",i=function(w,y){return"✖ Error "+w+" while fetching file: "+y},s="✖ Error: File does not exist or is empty",a={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},o="data-src-status",l="loading",c="loaded",u="failed",f="pre[data-src]:not(["+o+'="'+c+'"]):not(['+o+'="'+l+'"])';function p(w,y,C){var S=new XMLHttpRequest;S.open("GET",w,!0),S.onreadystatechange=function(){S.readyState==4&&(S.status<400&&S.responseText?y(S.responseText):S.status>=400?C(i(S.status,S.statusText)):C(s))},S.send(null)}function g(w){var y=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(w||"");if(y){var C=Number(y[1]),S=y[2],T=y[3];return S?T?[C,Number(T)]:[C,void 0]:[C,C]}}r.hooks.add("before-highlightall",function(w){w.selector+=", "+f}),r.hooks.add("before-sanity-check",function(w){var y=w.element;if(y.matches(f)){w.code="",y.setAttribute(o,l);var C=y.appendChild(document.createElement("CODE"));C.textContent=n;var S=y.getAttribute("data-src"),T=w.language;if(T==="none"){var D=(/\.(\w+)$/.exec(S)||[,"none"])[1];T=a[D]||D}r.util.setLanguage(C,T),r.util.setLanguage(y,T);var I=r.plugins.autoloader;I&&I.loadLanguages(T),p(S,function(_){y.setAttribute(o,c);var F=g(y.getAttribute("data-range"));if(F){var G=_.split(/\r\n?|\n/g),W=F[0],fe=F[1]==null?G.length:F[1];W<0&&(W+=G.length),W=Math.max(0,Math.min(W-1,G.length)),fe<0&&(fe+=G.length),fe=Math.max(0,Math.min(fe,G.length)),_=G.slice(W,fe).join(` -`),y.hasAttribute("data-start")||y.setAttribute("data-start",String(W+1))}C.textContent=_,r.highlightElement(C)},function(_){y.setAttribute(o,u),C.textContent=_})}}),r.plugins.fileHighlight={highlight:function(y){for(var C=(y||document).querySelectorAll(f),S=0,T;T=C[S++];)r.highlightElement(T)}};var v=!1;r.fileHighlight=function(){v||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),v=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(H1);var n6=H1.exports;const Xl=r6(n6);class Bt{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new Bt(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}}class Yt{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new Yt(r,Bt.range(this,e))}}class re{constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,i,s,a=r&&r.loc;if(a&&a.start<=a.end){var o=a.lexer.input;i=a.start,s=a.end,i===o.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var l=o.slice(i,s).replace(/[^]/g,"$&̲"),c;i>15?c="…"+o.slice(i-15,i):c=o.slice(0,i);var u;s+15":">","<":"<",'"':""","'":"'"},c6=/[&><"']/g;function u6(t){return String(t).replace(c6,e=>l6[e])}var q1=function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},d6=function(e){var r=q1(e);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},h6=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},f6=function(e){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},be={contains:i6,deflt:s6,escape:u6,hyphenate:o6,getBaseElem:q1,isCharacterBox:d6,protocolFromUrl:f6},oi={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:t=>Math.max(0,t),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand ",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function p6(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class mo{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var r in oi)if(oi.hasOwnProperty(r)){var n=oi[r];this[r]=e[r]!==void 0?n.processor?n.processor(e[r]):e[r]:p6(n)}}reportNonstrict(e,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(e,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new re("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,n){var i=this.strict;if(typeof i=="function")try{i=i(e,r,n)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var r=be.protocolFromUrl(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}}class Hr{constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n}sup(){return fr[m6[this.id]]}sub(){return fr[g6[this.id]]}fracNum(){return fr[v6[this.id]]}fracDen(){return fr[b6[this.id]]}cramp(){return fr[y6[this.id]]}text(){return fr[w6[this.id]]}isTight(){return this.size>=2}}var go=0,Mi=1,Ln=2,Dr=3,v0=4,Wt=5,Bn=6,It=7,fr=[new Hr(go,0,!1),new Hr(Mi,0,!0),new Hr(Ln,1,!1),new Hr(Dr,1,!0),new Hr(v0,2,!1),new Hr(Wt,2,!0),new Hr(Bn,3,!1),new Hr(It,3,!0)],m6=[v0,Wt,v0,Wt,Bn,It,Bn,It],g6=[Wt,Wt,Wt,Wt,It,It,It,It],v6=[Ln,Dr,v0,Wt,Bn,It,Bn,It],b6=[Dr,Dr,Wt,Wt,It,It,It,It],y6=[Mi,Mi,Dr,Dr,Wt,Wt,It,It],w6=[go,Mi,Ln,Dr,Ln,Dr,Ln,Dr],xe={DISPLAY:fr[go],TEXT:fr[Ln],SCRIPT:fr[v0],SCRIPTSCRIPT:fr[Bn]},pa=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function x6(t){for(var e=0;e=i[0]&&t<=i[1])return r.name}return null}var li=[];pa.forEach(t=>t.blocks.forEach(e=>li.push(...e)));function j1(t){for(var e=0;e=li[e]&&t<=li[e+1])return!0;return!1}var Tn=80,S6=function(e,r){return"M95,"+(622+e+r)+` -c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 -c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 -c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 -s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 -c69,-144,104.5,-217.7,106.5,-221 -l`+e/2.075+" -"+e+` -c5.3,-9.3,12,-14,20,-14 -H400000v`+(40+e)+`H845.2724 -s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 -c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z -M`+(834+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},k6=function(e,r){return"M263,"+(601+e+r)+`c0.7,0,18,39.7,52,119 -c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 -c340,-704.7,510.7,-1060.3,512,-1067 -l`+e/2.084+" -"+e+` -c4.7,-7.3,11,-11,19,-11 -H40000v`+(40+e)+`H1012.3 -s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 -c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 -s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 -c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z -M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},T6=function(e,r){return"M983 "+(10+e+r)+` -l`+e/3.13+" -"+e+` -c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` -H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 -s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 -c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 -c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 -c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 -c53.7,-170.3,84.5,-266.8,92.5,-289.5z -M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},E6=function(e,r){return"M424,"+(2398+e+r)+` -c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 -c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 -s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 -s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 -l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 -v`+(40+e)+`H1014.6 -s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 -c-2,6,-10,9,-24,9 -c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+r+` -h400000v`+(40+e)+"h-400000z"},A6=function(e,r){return"M473,"+(2713+e+r)+` -c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` -c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 -s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 -c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 -c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 -s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, -606zM`+(1001+e)+" "+r+"h400000v"+(40+e)+"H1017.7z"},C6=function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z"},M6=function(e,r,n){var i=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+` -H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 -h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 -c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 -219 661 l218 661zM702 `+r+"H400000v"+(40+e)+"H742z"},N6=function(e,r,n){r=1e3*r;var i="";switch(e){case"sqrtMain":i=S6(r,Tn);break;case"sqrtSize1":i=k6(r,Tn);break;case"sqrtSize2":i=T6(r,Tn);break;case"sqrtSize3":i=E6(r,Tn);break;case"sqrtSize4":i=A6(r,Tn);break;case"sqrtTall":i=M6(r,Tn,n)}return i},D6=function(e,r){switch(e){case"⎜":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"∣":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"∥":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"⎟":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"⎢":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"⎥":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"⎪":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"⏐":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"‖":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},Jl={doubleleftarrow:`M262 157 -l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 - 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 - 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 -c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 - 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 --86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 --2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z -m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l --10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 - 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 --33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 --17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 --13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 -c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 --107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 - 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 --5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 -c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 - 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 - 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 - l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 --45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 - 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 - 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 - 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 --331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 -H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 - 435 0h399565z`,leftgroupunder:`M400000 262 -H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 - 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 --3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 --18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 --196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 - 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 --4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 --10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z -m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 - 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 - 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 --152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 - 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 --2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 -v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 --83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 --68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 - 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z -M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z -M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 --.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 -c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 - 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z -M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 -c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 --53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 - 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 - 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 -c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 - 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 - 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 --5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 --320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z -m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 -60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 --451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z -m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 -c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 --480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z -m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 -85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 --707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z -m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 -c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 --16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 - 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 - 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 --40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 --12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 - 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l --6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 -s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 -c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 - 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 --174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 - 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 - 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 --3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 --10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 - 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 --18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 - 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z -m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 - 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 --7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 --27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 - 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 - 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 --64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z -m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 - 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 --13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 - 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z -M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 - 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 --52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 --167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 - 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 --70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 --40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 --37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 - 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 -c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 - 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 - 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 --19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 - 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 --2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 - 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 - 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 --68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 --8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 - 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 -c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 - 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 --11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 - 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 - 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 - -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 --11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 - 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 - 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 - -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 -3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 -10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 --1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 --7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 -H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 -c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 -c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, --5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 -c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 -c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 -s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 -121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 -s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 -c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z -M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 --27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 -13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 --84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 --119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 --12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 -151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 -c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 -c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 -c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 -c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z -M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 -c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, --231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 -c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 -c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, -1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, --152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z -M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 -c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, --231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 -c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},I6=function(e,r){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84 -H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z -M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z -M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z -MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z -MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z -M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z -M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 -c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, --36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, -949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 -c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, --544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 -l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, --210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, -63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 -c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+` -c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 -c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 -c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 -c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 -l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, --470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class C0{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return be.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),r=0;rr.toText();return this.children.map(e).join("")}}var pr={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},H0={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Zl={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function R6(t,e){pr[t]=e}function vo(t,e,r){if(!pr[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=pr[e][n];if(!i&&t[0]in Zl&&(n=Zl[t[0]].charCodeAt(0),i=pr[e][n]),!i&&r==="text"&&j1(n)&&(i=pr[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var As={};function O6(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!As[e]){var r=As[e]={cssEmPerMu:H0.quad[e]/18};for(var n in H0)H0.hasOwnProperty(n)&&(r[n]=H0[n][e])}return As[e]}var _6=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Ql=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],ec=function(e,r){return r.size<2?e:_6[e-1][r.size-1]};class Er{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||Er.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Ql[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return new Er(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:ec(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Ql[e-1]})}havingBaseStyle(e){e=e||this.style.text();var r=ec(Er.BASESIZE,e);return this.size===r&&this.textSize===Er.BASESIZE&&this.style===e?this:this.extend({style:e,size:r})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Er.BASESIZE?["sizing","reset-size"+this.size,"size"+Er.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=O6(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Er.BASESIZE=6;var ma={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},L6={ex:!0,em:!0,mu:!0},U1=function(e){return typeof e!="string"&&(e=e.unit),e in ma||e in L6||e==="ex"},it=function(e,r){var n;if(e.unit in ma)n=ma[e.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(e.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,e.unit==="ex")n=i.fontMetrics().xHeight;else if(e.unit==="em")n=i.fontMetrics().quad;else throw new re("Invalid unit: '"+e.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(e.number*n,r.maxSize)},se=function(e){return+e.toFixed(4)+"em"},Jr=function(e){return e.filter(r=>r).join(" ")},V1=function(e,r,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},W1=function(e){var r=document.createElement(e);r.className=Jr(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&r.setAttribute(i,this.attributes[i]);for(var s=0;s/=\x00-\x1f]/,G1=function(e){var r="<"+e;this.classes.length&&(r+=' class="'+be.escape(Jr(this.classes))+'"');var n="";for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=be.hyphenate(i)+":"+this.style[i]+";");n&&(r+=' style="'+be.escape(n)+'"');for(var s in this.attributes)if(this.attributes.hasOwnProperty(s)){if(z6.test(s))throw new re("Invalid attribute name '"+s+"'");r+=" "+s+'="'+be.escape(this.attributes[s])+'"'}r+=">";for(var a=0;a",r};class M0{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,V1.call(this,e,n,i),this.children=r||[]}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return be.contains(this.classes,e)}toNode(){return W1.call(this,"span")}toMarkup(){return G1.call(this,"span")}}class bo{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,V1.call(this,r,i),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return be.contains(this.classes,e)}toNode(){return W1.call(this,"a")}toMarkup(){return G1.call(this,"a")}}class $6{constructor(e,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return be.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(e.style[r]=this.style[r]);return e}toMarkup(){var e=''+be.escape(this.alt)+'0&&(r=document.createElement("span"),r.style.marginRight=se(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=Jr(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(e),r):e}toMarkup(){var e=!1,r="0&&(n+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=be.hyphenate(i)+":"+this.style[i]+";");n&&(e=!0,r+=' style="'+be.escape(n)+'"');var s=be.escape(this.text);return e?(r+=">",r+=s,r+="",r):s}}class _r{constructor(e,r){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=r||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var i=0;i':''}}class ga{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var e=" but got "+String(t)+".")}var P6={bin:1,close:1,inner:1,open:1,punct:1,rel:1},H6={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Qe={math:{},text:{}};function d(t,e,r,n,i,s){Qe[t][i]={font:e,group:r,replace:n},s&&n&&(Qe[t][n]=Qe[t][i])}var h="math",Y="text",m="main",E="ams",tt="accent-token",de="bin",Rt="close",jn="inner",we="mathord",ft="op-token",Ut="open",ts="punct",A="rel",Fr="spacing",R="textord";d(h,m,A,"≡","\\equiv",!0);d(h,m,A,"≺","\\prec",!0);d(h,m,A,"≻","\\succ",!0);d(h,m,A,"∼","\\sim",!0);d(h,m,A,"⊥","\\perp");d(h,m,A,"⪯","\\preceq",!0);d(h,m,A,"⪰","\\succeq",!0);d(h,m,A,"≃","\\simeq",!0);d(h,m,A,"∣","\\mid",!0);d(h,m,A,"≪","\\ll",!0);d(h,m,A,"≫","\\gg",!0);d(h,m,A,"≍","\\asymp",!0);d(h,m,A,"∥","\\parallel");d(h,m,A,"⋈","\\bowtie",!0);d(h,m,A,"⌣","\\smile",!0);d(h,m,A,"⊑","\\sqsubseteq",!0);d(h,m,A,"⊒","\\sqsupseteq",!0);d(h,m,A,"≐","\\doteq",!0);d(h,m,A,"⌢","\\frown",!0);d(h,m,A,"∋","\\ni",!0);d(h,m,A,"∝","\\propto",!0);d(h,m,A,"⊢","\\vdash",!0);d(h,m,A,"⊣","\\dashv",!0);d(h,m,A,"∋","\\owns");d(h,m,ts,".","\\ldotp");d(h,m,ts,"⋅","\\cdotp");d(h,m,R,"#","\\#");d(Y,m,R,"#","\\#");d(h,m,R,"&","\\&");d(Y,m,R,"&","\\&");d(h,m,R,"ℵ","\\aleph",!0);d(h,m,R,"∀","\\forall",!0);d(h,m,R,"ℏ","\\hbar",!0);d(h,m,R,"∃","\\exists",!0);d(h,m,R,"∇","\\nabla",!0);d(h,m,R,"♭","\\flat",!0);d(h,m,R,"ℓ","\\ell",!0);d(h,m,R,"♮","\\natural",!0);d(h,m,R,"♣","\\clubsuit",!0);d(h,m,R,"℘","\\wp",!0);d(h,m,R,"♯","\\sharp",!0);d(h,m,R,"♢","\\diamondsuit",!0);d(h,m,R,"ℜ","\\Re",!0);d(h,m,R,"♡","\\heartsuit",!0);d(h,m,R,"ℑ","\\Im",!0);d(h,m,R,"♠","\\spadesuit",!0);d(h,m,R,"§","\\S",!0);d(Y,m,R,"§","\\S");d(h,m,R,"¶","\\P",!0);d(Y,m,R,"¶","\\P");d(h,m,R,"†","\\dag");d(Y,m,R,"†","\\dag");d(Y,m,R,"†","\\textdagger");d(h,m,R,"‡","\\ddag");d(Y,m,R,"‡","\\ddag");d(Y,m,R,"‡","\\textdaggerdbl");d(h,m,Rt,"⎱","\\rmoustache",!0);d(h,m,Ut,"⎰","\\lmoustache",!0);d(h,m,Rt,"⟯","\\rgroup",!0);d(h,m,Ut,"⟮","\\lgroup",!0);d(h,m,de,"∓","\\mp",!0);d(h,m,de,"⊖","\\ominus",!0);d(h,m,de,"⊎","\\uplus",!0);d(h,m,de,"⊓","\\sqcap",!0);d(h,m,de,"∗","\\ast");d(h,m,de,"⊔","\\sqcup",!0);d(h,m,de,"◯","\\bigcirc",!0);d(h,m,de,"∙","\\bullet",!0);d(h,m,de,"‡","\\ddagger");d(h,m,de,"≀","\\wr",!0);d(h,m,de,"⨿","\\amalg");d(h,m,de,"&","\\And");d(h,m,A,"⟵","\\longleftarrow",!0);d(h,m,A,"⇐","\\Leftarrow",!0);d(h,m,A,"⟸","\\Longleftarrow",!0);d(h,m,A,"⟶","\\longrightarrow",!0);d(h,m,A,"⇒","\\Rightarrow",!0);d(h,m,A,"⟹","\\Longrightarrow",!0);d(h,m,A,"↔","\\leftrightarrow",!0);d(h,m,A,"⟷","\\longleftrightarrow",!0);d(h,m,A,"⇔","\\Leftrightarrow",!0);d(h,m,A,"⟺","\\Longleftrightarrow",!0);d(h,m,A,"↦","\\mapsto",!0);d(h,m,A,"⟼","\\longmapsto",!0);d(h,m,A,"↗","\\nearrow",!0);d(h,m,A,"↩","\\hookleftarrow",!0);d(h,m,A,"↪","\\hookrightarrow",!0);d(h,m,A,"↘","\\searrow",!0);d(h,m,A,"↼","\\leftharpoonup",!0);d(h,m,A,"⇀","\\rightharpoonup",!0);d(h,m,A,"↙","\\swarrow",!0);d(h,m,A,"↽","\\leftharpoondown",!0);d(h,m,A,"⇁","\\rightharpoondown",!0);d(h,m,A,"↖","\\nwarrow",!0);d(h,m,A,"⇌","\\rightleftharpoons",!0);d(h,E,A,"≮","\\nless",!0);d(h,E,A,"","\\@nleqslant");d(h,E,A,"","\\@nleqq");d(h,E,A,"⪇","\\lneq",!0);d(h,E,A,"≨","\\lneqq",!0);d(h,E,A,"","\\@lvertneqq");d(h,E,A,"⋦","\\lnsim",!0);d(h,E,A,"⪉","\\lnapprox",!0);d(h,E,A,"⊀","\\nprec",!0);d(h,E,A,"⋠","\\npreceq",!0);d(h,E,A,"⋨","\\precnsim",!0);d(h,E,A,"⪹","\\precnapprox",!0);d(h,E,A,"≁","\\nsim",!0);d(h,E,A,"","\\@nshortmid");d(h,E,A,"∤","\\nmid",!0);d(h,E,A,"⊬","\\nvdash",!0);d(h,E,A,"⊭","\\nvDash",!0);d(h,E,A,"⋪","\\ntriangleleft");d(h,E,A,"⋬","\\ntrianglelefteq",!0);d(h,E,A,"⊊","\\subsetneq",!0);d(h,E,A,"","\\@varsubsetneq");d(h,E,A,"⫋","\\subsetneqq",!0);d(h,E,A,"","\\@varsubsetneqq");d(h,E,A,"≯","\\ngtr",!0);d(h,E,A,"","\\@ngeqslant");d(h,E,A,"","\\@ngeqq");d(h,E,A,"⪈","\\gneq",!0);d(h,E,A,"≩","\\gneqq",!0);d(h,E,A,"","\\@gvertneqq");d(h,E,A,"⋧","\\gnsim",!0);d(h,E,A,"⪊","\\gnapprox",!0);d(h,E,A,"⊁","\\nsucc",!0);d(h,E,A,"⋡","\\nsucceq",!0);d(h,E,A,"⋩","\\succnsim",!0);d(h,E,A,"⪺","\\succnapprox",!0);d(h,E,A,"≆","\\ncong",!0);d(h,E,A,"","\\@nshortparallel");d(h,E,A,"∦","\\nparallel",!0);d(h,E,A,"⊯","\\nVDash",!0);d(h,E,A,"⋫","\\ntriangleright");d(h,E,A,"⋭","\\ntrianglerighteq",!0);d(h,E,A,"","\\@nsupseteqq");d(h,E,A,"⊋","\\supsetneq",!0);d(h,E,A,"","\\@varsupsetneq");d(h,E,A,"⫌","\\supsetneqq",!0);d(h,E,A,"","\\@varsupsetneqq");d(h,E,A,"⊮","\\nVdash",!0);d(h,E,A,"⪵","\\precneqq",!0);d(h,E,A,"⪶","\\succneqq",!0);d(h,E,A,"","\\@nsubseteqq");d(h,E,de,"⊴","\\unlhd");d(h,E,de,"⊵","\\unrhd");d(h,E,A,"↚","\\nleftarrow",!0);d(h,E,A,"↛","\\nrightarrow",!0);d(h,E,A,"⇍","\\nLeftarrow",!0);d(h,E,A,"⇏","\\nRightarrow",!0);d(h,E,A,"↮","\\nleftrightarrow",!0);d(h,E,A,"⇎","\\nLeftrightarrow",!0);d(h,E,A,"△","\\vartriangle");d(h,E,R,"ℏ","\\hslash");d(h,E,R,"▽","\\triangledown");d(h,E,R,"◊","\\lozenge");d(h,E,R,"Ⓢ","\\circledS");d(h,E,R,"®","\\circledR");d(Y,E,R,"®","\\circledR");d(h,E,R,"∡","\\measuredangle",!0);d(h,E,R,"∄","\\nexists");d(h,E,R,"℧","\\mho");d(h,E,R,"Ⅎ","\\Finv",!0);d(h,E,R,"⅁","\\Game",!0);d(h,E,R,"‵","\\backprime");d(h,E,R,"▲","\\blacktriangle");d(h,E,R,"▼","\\blacktriangledown");d(h,E,R,"■","\\blacksquare");d(h,E,R,"⧫","\\blacklozenge");d(h,E,R,"★","\\bigstar");d(h,E,R,"∢","\\sphericalangle",!0);d(h,E,R,"∁","\\complement",!0);d(h,E,R,"ð","\\eth",!0);d(Y,m,R,"ð","ð");d(h,E,R,"╱","\\diagup");d(h,E,R,"╲","\\diagdown");d(h,E,R,"□","\\square");d(h,E,R,"□","\\Box");d(h,E,R,"◊","\\Diamond");d(h,E,R,"¥","\\yen",!0);d(Y,E,R,"¥","\\yen",!0);d(h,E,R,"✓","\\checkmark",!0);d(Y,E,R,"✓","\\checkmark");d(h,E,R,"ℶ","\\beth",!0);d(h,E,R,"ℸ","\\daleth",!0);d(h,E,R,"ℷ","\\gimel",!0);d(h,E,R,"ϝ","\\digamma",!0);d(h,E,R,"ϰ","\\varkappa");d(h,E,Ut,"┌","\\@ulcorner",!0);d(h,E,Rt,"┐","\\@urcorner",!0);d(h,E,Ut,"└","\\@llcorner",!0);d(h,E,Rt,"┘","\\@lrcorner",!0);d(h,E,A,"≦","\\leqq",!0);d(h,E,A,"⩽","\\leqslant",!0);d(h,E,A,"⪕","\\eqslantless",!0);d(h,E,A,"≲","\\lesssim",!0);d(h,E,A,"⪅","\\lessapprox",!0);d(h,E,A,"≊","\\approxeq",!0);d(h,E,de,"⋖","\\lessdot");d(h,E,A,"⋘","\\lll",!0);d(h,E,A,"≶","\\lessgtr",!0);d(h,E,A,"⋚","\\lesseqgtr",!0);d(h,E,A,"⪋","\\lesseqqgtr",!0);d(h,E,A,"≑","\\doteqdot");d(h,E,A,"≓","\\risingdotseq",!0);d(h,E,A,"≒","\\fallingdotseq",!0);d(h,E,A,"∽","\\backsim",!0);d(h,E,A,"⋍","\\backsimeq",!0);d(h,E,A,"⫅","\\subseteqq",!0);d(h,E,A,"⋐","\\Subset",!0);d(h,E,A,"⊏","\\sqsubset",!0);d(h,E,A,"≼","\\preccurlyeq",!0);d(h,E,A,"⋞","\\curlyeqprec",!0);d(h,E,A,"≾","\\precsim",!0);d(h,E,A,"⪷","\\precapprox",!0);d(h,E,A,"⊲","\\vartriangleleft");d(h,E,A,"⊴","\\trianglelefteq");d(h,E,A,"⊨","\\vDash",!0);d(h,E,A,"⊪","\\Vvdash",!0);d(h,E,A,"⌣","\\smallsmile");d(h,E,A,"⌢","\\smallfrown");d(h,E,A,"≏","\\bumpeq",!0);d(h,E,A,"≎","\\Bumpeq",!0);d(h,E,A,"≧","\\geqq",!0);d(h,E,A,"⩾","\\geqslant",!0);d(h,E,A,"⪖","\\eqslantgtr",!0);d(h,E,A,"≳","\\gtrsim",!0);d(h,E,A,"⪆","\\gtrapprox",!0);d(h,E,de,"⋗","\\gtrdot");d(h,E,A,"⋙","\\ggg",!0);d(h,E,A,"≷","\\gtrless",!0);d(h,E,A,"⋛","\\gtreqless",!0);d(h,E,A,"⪌","\\gtreqqless",!0);d(h,E,A,"≖","\\eqcirc",!0);d(h,E,A,"≗","\\circeq",!0);d(h,E,A,"≜","\\triangleq",!0);d(h,E,A,"∼","\\thicksim");d(h,E,A,"≈","\\thickapprox");d(h,E,A,"⫆","\\supseteqq",!0);d(h,E,A,"⋑","\\Supset",!0);d(h,E,A,"⊐","\\sqsupset",!0);d(h,E,A,"≽","\\succcurlyeq",!0);d(h,E,A,"⋟","\\curlyeqsucc",!0);d(h,E,A,"≿","\\succsim",!0);d(h,E,A,"⪸","\\succapprox",!0);d(h,E,A,"⊳","\\vartriangleright");d(h,E,A,"⊵","\\trianglerighteq");d(h,E,A,"⊩","\\Vdash",!0);d(h,E,A,"∣","\\shortmid");d(h,E,A,"∥","\\shortparallel");d(h,E,A,"≬","\\between",!0);d(h,E,A,"⋔","\\pitchfork",!0);d(h,E,A,"∝","\\varpropto");d(h,E,A,"◀","\\blacktriangleleft");d(h,E,A,"∴","\\therefore",!0);d(h,E,A,"∍","\\backepsilon");d(h,E,A,"▶","\\blacktriangleright");d(h,E,A,"∵","\\because",!0);d(h,E,A,"⋘","\\llless");d(h,E,A,"⋙","\\gggtr");d(h,E,de,"⊲","\\lhd");d(h,E,de,"⊳","\\rhd");d(h,E,A,"≂","\\eqsim",!0);d(h,m,A,"⋈","\\Join");d(h,E,A,"≑","\\Doteq",!0);d(h,E,de,"∔","\\dotplus",!0);d(h,E,de,"∖","\\smallsetminus");d(h,E,de,"⋒","\\Cap",!0);d(h,E,de,"⋓","\\Cup",!0);d(h,E,de,"⩞","\\doublebarwedge",!0);d(h,E,de,"⊟","\\boxminus",!0);d(h,E,de,"⊞","\\boxplus",!0);d(h,E,de,"⋇","\\divideontimes",!0);d(h,E,de,"⋉","\\ltimes",!0);d(h,E,de,"⋊","\\rtimes",!0);d(h,E,de,"⋋","\\leftthreetimes",!0);d(h,E,de,"⋌","\\rightthreetimes",!0);d(h,E,de,"⋏","\\curlywedge",!0);d(h,E,de,"⋎","\\curlyvee",!0);d(h,E,de,"⊝","\\circleddash",!0);d(h,E,de,"⊛","\\circledast",!0);d(h,E,de,"⋅","\\centerdot");d(h,E,de,"⊺","\\intercal",!0);d(h,E,de,"⋒","\\doublecap");d(h,E,de,"⋓","\\doublecup");d(h,E,de,"⊠","\\boxtimes",!0);d(h,E,A,"⇢","\\dashrightarrow",!0);d(h,E,A,"⇠","\\dashleftarrow",!0);d(h,E,A,"⇇","\\leftleftarrows",!0);d(h,E,A,"⇆","\\leftrightarrows",!0);d(h,E,A,"⇚","\\Lleftarrow",!0);d(h,E,A,"↞","\\twoheadleftarrow",!0);d(h,E,A,"↢","\\leftarrowtail",!0);d(h,E,A,"↫","\\looparrowleft",!0);d(h,E,A,"⇋","\\leftrightharpoons",!0);d(h,E,A,"↶","\\curvearrowleft",!0);d(h,E,A,"↺","\\circlearrowleft",!0);d(h,E,A,"↰","\\Lsh",!0);d(h,E,A,"⇈","\\upuparrows",!0);d(h,E,A,"↿","\\upharpoonleft",!0);d(h,E,A,"⇃","\\downharpoonleft",!0);d(h,m,A,"⊶","\\origof",!0);d(h,m,A,"⊷","\\imageof",!0);d(h,E,A,"⊸","\\multimap",!0);d(h,E,A,"↭","\\leftrightsquigarrow",!0);d(h,E,A,"⇉","\\rightrightarrows",!0);d(h,E,A,"⇄","\\rightleftarrows",!0);d(h,E,A,"↠","\\twoheadrightarrow",!0);d(h,E,A,"↣","\\rightarrowtail",!0);d(h,E,A,"↬","\\looparrowright",!0);d(h,E,A,"↷","\\curvearrowright",!0);d(h,E,A,"↻","\\circlearrowright",!0);d(h,E,A,"↱","\\Rsh",!0);d(h,E,A,"⇊","\\downdownarrows",!0);d(h,E,A,"↾","\\upharpoonright",!0);d(h,E,A,"⇂","\\downharpoonright",!0);d(h,E,A,"⇝","\\rightsquigarrow",!0);d(h,E,A,"⇝","\\leadsto");d(h,E,A,"⇛","\\Rrightarrow",!0);d(h,E,A,"↾","\\restriction");d(h,m,R,"‘","`");d(h,m,R,"$","\\$");d(Y,m,R,"$","\\$");d(Y,m,R,"$","\\textdollar");d(h,m,R,"%","\\%");d(Y,m,R,"%","\\%");d(h,m,R,"_","\\_");d(Y,m,R,"_","\\_");d(Y,m,R,"_","\\textunderscore");d(h,m,R,"∠","\\angle",!0);d(h,m,R,"∞","\\infty",!0);d(h,m,R,"′","\\prime");d(h,m,R,"△","\\triangle");d(h,m,R,"Γ","\\Gamma",!0);d(h,m,R,"Δ","\\Delta",!0);d(h,m,R,"Θ","\\Theta",!0);d(h,m,R,"Λ","\\Lambda",!0);d(h,m,R,"Ξ","\\Xi",!0);d(h,m,R,"Π","\\Pi",!0);d(h,m,R,"Σ","\\Sigma",!0);d(h,m,R,"Υ","\\Upsilon",!0);d(h,m,R,"Φ","\\Phi",!0);d(h,m,R,"Ψ","\\Psi",!0);d(h,m,R,"Ω","\\Omega",!0);d(h,m,R,"A","Α");d(h,m,R,"B","Β");d(h,m,R,"E","Ε");d(h,m,R,"Z","Ζ");d(h,m,R,"H","Η");d(h,m,R,"I","Ι");d(h,m,R,"K","Κ");d(h,m,R,"M","Μ");d(h,m,R,"N","Ν");d(h,m,R,"O","Ο");d(h,m,R,"P","Ρ");d(h,m,R,"T","Τ");d(h,m,R,"X","Χ");d(h,m,R,"¬","\\neg",!0);d(h,m,R,"¬","\\lnot");d(h,m,R,"⊤","\\top");d(h,m,R,"⊥","\\bot");d(h,m,R,"∅","\\emptyset");d(h,E,R,"∅","\\varnothing");d(h,m,we,"α","\\alpha",!0);d(h,m,we,"β","\\beta",!0);d(h,m,we,"γ","\\gamma",!0);d(h,m,we,"δ","\\delta",!0);d(h,m,we,"ϵ","\\epsilon",!0);d(h,m,we,"ζ","\\zeta",!0);d(h,m,we,"η","\\eta",!0);d(h,m,we,"θ","\\theta",!0);d(h,m,we,"ι","\\iota",!0);d(h,m,we,"κ","\\kappa",!0);d(h,m,we,"λ","\\lambda",!0);d(h,m,we,"μ","\\mu",!0);d(h,m,we,"ν","\\nu",!0);d(h,m,we,"ξ","\\xi",!0);d(h,m,we,"ο","\\omicron",!0);d(h,m,we,"π","\\pi",!0);d(h,m,we,"ρ","\\rho",!0);d(h,m,we,"σ","\\sigma",!0);d(h,m,we,"τ","\\tau",!0);d(h,m,we,"υ","\\upsilon",!0);d(h,m,we,"ϕ","\\phi",!0);d(h,m,we,"χ","\\chi",!0);d(h,m,we,"ψ","\\psi",!0);d(h,m,we,"ω","\\omega",!0);d(h,m,we,"ε","\\varepsilon",!0);d(h,m,we,"ϑ","\\vartheta",!0);d(h,m,we,"ϖ","\\varpi",!0);d(h,m,we,"ϱ","\\varrho",!0);d(h,m,we,"ς","\\varsigma",!0);d(h,m,we,"φ","\\varphi",!0);d(h,m,de,"∗","*",!0);d(h,m,de,"+","+");d(h,m,de,"−","-",!0);d(h,m,de,"⋅","\\cdot",!0);d(h,m,de,"∘","\\circ",!0);d(h,m,de,"÷","\\div",!0);d(h,m,de,"±","\\pm",!0);d(h,m,de,"×","\\times",!0);d(h,m,de,"∩","\\cap",!0);d(h,m,de,"∪","\\cup",!0);d(h,m,de,"∖","\\setminus",!0);d(h,m,de,"∧","\\land");d(h,m,de,"∨","\\lor");d(h,m,de,"∧","\\wedge",!0);d(h,m,de,"∨","\\vee",!0);d(h,m,R,"√","\\surd");d(h,m,Ut,"⟨","\\langle",!0);d(h,m,Ut,"∣","\\lvert");d(h,m,Ut,"∥","\\lVert");d(h,m,Rt,"?","?");d(h,m,Rt,"!","!");d(h,m,Rt,"⟩","\\rangle",!0);d(h,m,Rt,"∣","\\rvert");d(h,m,Rt,"∥","\\rVert");d(h,m,A,"=","=");d(h,m,A,":",":");d(h,m,A,"≈","\\approx",!0);d(h,m,A,"≅","\\cong",!0);d(h,m,A,"≥","\\ge");d(h,m,A,"≥","\\geq",!0);d(h,m,A,"←","\\gets");d(h,m,A,">","\\gt",!0);d(h,m,A,"∈","\\in",!0);d(h,m,A,"","\\@not");d(h,m,A,"⊂","\\subset",!0);d(h,m,A,"⊃","\\supset",!0);d(h,m,A,"⊆","\\subseteq",!0);d(h,m,A,"⊇","\\supseteq",!0);d(h,E,A,"⊈","\\nsubseteq",!0);d(h,E,A,"⊉","\\nsupseteq",!0);d(h,m,A,"⊨","\\models");d(h,m,A,"←","\\leftarrow",!0);d(h,m,A,"≤","\\le");d(h,m,A,"≤","\\leq",!0);d(h,m,A,"<","\\lt",!0);d(h,m,A,"→","\\rightarrow",!0);d(h,m,A,"→","\\to");d(h,E,A,"≱","\\ngeq",!0);d(h,E,A,"≰","\\nleq",!0);d(h,m,Fr," ","\\ ");d(h,m,Fr," ","\\space");d(h,m,Fr," ","\\nobreakspace");d(Y,m,Fr," ","\\ ");d(Y,m,Fr," "," ");d(Y,m,Fr," ","\\space");d(Y,m,Fr," ","\\nobreakspace");d(h,m,Fr,null,"\\nobreak");d(h,m,Fr,null,"\\allowbreak");d(h,m,ts,",",",");d(h,m,ts,";",";");d(h,E,de,"⊼","\\barwedge",!0);d(h,E,de,"⊻","\\veebar",!0);d(h,m,de,"⊙","\\odot",!0);d(h,m,de,"⊕","\\oplus",!0);d(h,m,de,"⊗","\\otimes",!0);d(h,m,R,"∂","\\partial",!0);d(h,m,de,"⊘","\\oslash",!0);d(h,E,de,"⊚","\\circledcirc",!0);d(h,E,de,"⊡","\\boxdot",!0);d(h,m,de,"△","\\bigtriangleup");d(h,m,de,"▽","\\bigtriangledown");d(h,m,de,"†","\\dagger");d(h,m,de,"⋄","\\diamond");d(h,m,de,"⋆","\\star");d(h,m,de,"◃","\\triangleleft");d(h,m,de,"▹","\\triangleright");d(h,m,Ut,"{","\\{");d(Y,m,R,"{","\\{");d(Y,m,R,"{","\\textbraceleft");d(h,m,Rt,"}","\\}");d(Y,m,R,"}","\\}");d(Y,m,R,"}","\\textbraceright");d(h,m,Ut,"{","\\lbrace");d(h,m,Rt,"}","\\rbrace");d(h,m,Ut,"[","\\lbrack",!0);d(Y,m,R,"[","\\lbrack",!0);d(h,m,Rt,"]","\\rbrack",!0);d(Y,m,R,"]","\\rbrack",!0);d(h,m,Ut,"(","\\lparen",!0);d(h,m,Rt,")","\\rparen",!0);d(Y,m,R,"<","\\textless",!0);d(Y,m,R,">","\\textgreater",!0);d(h,m,Ut,"⌊","\\lfloor",!0);d(h,m,Rt,"⌋","\\rfloor",!0);d(h,m,Ut,"⌈","\\lceil",!0);d(h,m,Rt,"⌉","\\rceil",!0);d(h,m,R,"\\","\\backslash");d(h,m,R,"∣","|");d(h,m,R,"∣","\\vert");d(Y,m,R,"|","\\textbar",!0);d(h,m,R,"∥","\\|");d(h,m,R,"∥","\\Vert");d(Y,m,R,"∥","\\textbardbl");d(Y,m,R,"~","\\textasciitilde");d(Y,m,R,"\\","\\textbackslash");d(Y,m,R,"^","\\textasciicircum");d(h,m,A,"↑","\\uparrow",!0);d(h,m,A,"⇑","\\Uparrow",!0);d(h,m,A,"↓","\\downarrow",!0);d(h,m,A,"⇓","\\Downarrow",!0);d(h,m,A,"↕","\\updownarrow",!0);d(h,m,A,"⇕","\\Updownarrow",!0);d(h,m,ft,"∐","\\coprod");d(h,m,ft,"⋁","\\bigvee");d(h,m,ft,"⋀","\\bigwedge");d(h,m,ft,"⨄","\\biguplus");d(h,m,ft,"⋂","\\bigcap");d(h,m,ft,"⋃","\\bigcup");d(h,m,ft,"∫","\\int");d(h,m,ft,"∫","\\intop");d(h,m,ft,"∬","\\iint");d(h,m,ft,"∭","\\iiint");d(h,m,ft,"∏","\\prod");d(h,m,ft,"∑","\\sum");d(h,m,ft,"⨂","\\bigotimes");d(h,m,ft,"⨁","\\bigoplus");d(h,m,ft,"⨀","\\bigodot");d(h,m,ft,"∮","\\oint");d(h,m,ft,"∯","\\oiint");d(h,m,ft,"∰","\\oiiint");d(h,m,ft,"⨆","\\bigsqcup");d(h,m,ft,"∫","\\smallint");d(Y,m,jn,"…","\\textellipsis");d(h,m,jn,"…","\\mathellipsis");d(Y,m,jn,"…","\\ldots",!0);d(h,m,jn,"…","\\ldots",!0);d(h,m,jn,"⋯","\\@cdots",!0);d(h,m,jn,"⋱","\\ddots",!0);d(h,m,R,"⋮","\\varvdots");d(Y,m,R,"⋮","\\varvdots");d(h,m,tt,"ˊ","\\acute");d(h,m,tt,"ˋ","\\grave");d(h,m,tt,"¨","\\ddot");d(h,m,tt,"~","\\tilde");d(h,m,tt,"ˉ","\\bar");d(h,m,tt,"˘","\\breve");d(h,m,tt,"ˇ","\\check");d(h,m,tt,"^","\\hat");d(h,m,tt,"⃗","\\vec");d(h,m,tt,"˙","\\dot");d(h,m,tt,"˚","\\mathring");d(h,m,we,"","\\@imath");d(h,m,we,"","\\@jmath");d(h,m,R,"ı","ı");d(h,m,R,"ȷ","ȷ");d(Y,m,R,"ı","\\i",!0);d(Y,m,R,"ȷ","\\j",!0);d(Y,m,R,"ß","\\ss",!0);d(Y,m,R,"æ","\\ae",!0);d(Y,m,R,"œ","\\oe",!0);d(Y,m,R,"ø","\\o",!0);d(Y,m,R,"Æ","\\AE",!0);d(Y,m,R,"Œ","\\OE",!0);d(Y,m,R,"Ø","\\O",!0);d(Y,m,tt,"ˊ","\\'");d(Y,m,tt,"ˋ","\\`");d(Y,m,tt,"ˆ","\\^");d(Y,m,tt,"˜","\\~");d(Y,m,tt,"ˉ","\\=");d(Y,m,tt,"˘","\\u");d(Y,m,tt,"˙","\\.");d(Y,m,tt,"¸","\\c");d(Y,m,tt,"˚","\\r");d(Y,m,tt,"ˇ","\\v");d(Y,m,tt,"¨",'\\"');d(Y,m,tt,"˝","\\H");d(Y,m,tt,"◯","\\textcircled");var K1={"--":!0,"---":!0,"``":!0,"''":!0};d(Y,m,R,"–","--",!0);d(Y,m,R,"–","\\textendash");d(Y,m,R,"—","---",!0);d(Y,m,R,"—","\\textemdash");d(Y,m,R,"‘","`",!0);d(Y,m,R,"‘","\\textquoteleft");d(Y,m,R,"’","'",!0);d(Y,m,R,"’","\\textquoteright");d(Y,m,R,"“","``",!0);d(Y,m,R,"“","\\textquotedblleft");d(Y,m,R,"”","''",!0);d(Y,m,R,"”","\\textquotedblright");d(h,m,R,"°","\\degree",!0);d(Y,m,R,"°","\\degree");d(Y,m,R,"°","\\textdegree",!0);d(h,m,R,"£","\\pounds");d(h,m,R,"£","\\mathsterling",!0);d(Y,m,R,"£","\\pounds");d(Y,m,R,"£","\\textsterling",!0);d(h,E,R,"✠","\\maltese");d(Y,E,R,"✠","\\maltese");var rc='0123456789/@."';for(var Cs=0;Cs0)return er(s,c,i,r,a.concat(u));if(l){var f,p;if(l==="boldsymbol"){var g=U6(s,i,r,a,n);f=g.fontName,p=[g.fontClass]}else o?(f=J1[l].fontName,p=[l]):(f=V0(l,r.fontWeight,r.fontShape),p=[l,r.fontWeight,r.fontShape]);if(rs(s,f,i).metrics)return er(s,f,i,r,a.concat(p));if(K1.hasOwnProperty(s)&&f.slice(0,10)==="Typewriter"){for(var v=[],w=0;w{if(Jr(t.classes)!==Jr(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var r=t.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0},G6=t=>{for(var e=0;er&&(r=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>i&&(i=a.maxFontSize)}e.height=r,e.depth=n,e.maxFontSize=i},Lt=function(e,r,n,i){var s=new M0(e,r,n,i);return yo(s),s},Y1=(t,e,r,n)=>new M0(t,e,r,n),K6=function(e,r,n){var i=Lt([e],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=se(i.height),i.maxFontSize=1,i},Y6=function(e,r,n,i){var s=new bo(e,r,n,i);return yo(s),s},X1=function(e){var r=new C0(e);return yo(r),r},X6=function(e,r){return e instanceof C0?Lt([],[e],r):e},J6=function(e){if(e.positionType==="individualShift"){for(var r=e.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,s=i,a=1;a{var r=Lt(["mspace"],[],e),n=it(t,e);return r.style.marginRight=se(n),r},V0=function(e,r,n){var i="";switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e}var s;return r==="textbf"&&n==="textit"?s="BoldItalic":r==="textbf"?s="Bold":r==="textit"?s="Italic":s="Regular",i+"-"+s},J1={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Z1={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},e5=function(e,r){var[n,i,s]=Z1[e],a=new Zr(n),o=new _r([a],{width:se(i),height:se(s),style:"width:"+se(i),viewBox:"0 0 "+1e3*i+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),l=Y1(["overlay"],[o],r);return l.height=s,l.style.height=se(s),l.style.width=se(i),l},$={fontMap:J1,makeSymbol:er,mathsym:j6,makeSpan:Lt,makeSvgSpan:Y1,makeLineSpan:K6,makeAnchor:Y6,makeFragment:X1,wrapFragment:X6,makeVList:Z6,makeOrd:V6,makeGlue:Q6,staticSvg:e5,svgData:Z1,tryCombineChars:G6},nt={number:3,unit:"mu"},un={number:4,unit:"mu"},Sr={number:5,unit:"mu"},t5={mord:{mop:nt,mbin:un,mrel:Sr,minner:nt},mop:{mord:nt,mop:nt,mrel:Sr,minner:nt},mbin:{mord:un,mop:un,mopen:un,minner:un},mrel:{mord:Sr,mop:Sr,mopen:Sr,minner:Sr},mopen:{},mclose:{mop:nt,mbin:un,mrel:Sr,minner:nt},mpunct:{mord:nt,mop:nt,mrel:Sr,mopen:nt,mclose:nt,mpunct:nt,minner:nt},minner:{mord:nt,mop:nt,mbin:un,mrel:Sr,mopen:nt,mpunct:nt,minner:nt}},r5={mord:{mop:nt},mop:{mord:nt,mop:nt},mbin:{},mrel:{},mopen:{},mclose:{mop:nt},mpunct:{},minner:{mop:nt}},Q1={},Di={},Ii={};function ue(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:s,mathmlBuilder:a}=t,o={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},l=0;l{var y=w.classes[0],C=v.classes[0];y==="mbin"&&be.contains(i5,C)?w.classes[0]="mord":C==="mbin"&&be.contains(n5,y)&&(v.classes[0]="mord")},{node:f},p,g),oc(s,(v,w)=>{var y=ba(w),C=ba(v),S=y&&C?v.hasClass("mtight")?r5[y][C]:t5[y][C]:null;if(S)return $.makeGlue(S,c)},{node:f},p,g),s},oc=function t(e,r,n,i,s){i&&e.push(i);for(var a=0;ap=>{e.splice(f+1,0,p),a++})(a)}i&&e.pop()},ed=function(e){return e instanceof C0||e instanceof bo||e instanceof M0&&e.hasClass("enclosing")?e:null},o5=function t(e,r){var n=ed(e);if(n){var i=n.children;if(i.length){if(r==="right")return t(i[i.length-1],"right");if(r==="left")return t(i[0],"left")}}return e},ba=function(e,r){return e?(r&&(e=o5(e,r)),a5[e.classes[0]]||null):null},b0=function(e,r){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Lr(r.concat(n))},Le=function(e,r,n){if(!e)return Lr();if(Di[e.type]){var i=Di[e.type](e,r);if(n&&r.size!==n.size){i=Lr(r.sizingClasses(n),[i],r);var s=r.sizeMultiplier/n.sizeMultiplier;i.height*=s,i.depth*=s}return i}else throw new re("Got group of unknown type: '"+e.type+"'")};function W0(t,e){var r=Lr(["base"],t,e),n=Lr(["strut"]);return n.style.height=se(r.height+r.depth),r.depth&&(n.style.verticalAlign=se(-r.depth)),r.children.unshift(n),r}function ya(t,e){var r=null;t.length===1&&t[0].type==="tag"&&(r=t[0].tag,t=t[0].body);var n=mt(t,e,"root"),i;n.length===2&&n[1].hasClass("tag")&&(i=n.pop());for(var s=[],a=[],o=0;o0&&(s.push(W0(a,e)),a=[]),s.push(n[o]));a.length>0&&s.push(W0(a,e));var c;r?(c=W0(mt(r,e,!0)),c.classes=["tag"],s.push(c)):i&&s.push(i);var u=Lr(["katex-html"],s);if(u.setAttribute("aria-hidden","true"),c){var f=c.children[0];f.style.height=se(u.height+u.depth),u.depth&&(f.style.verticalAlign=se(-u.depth))}return u}function td(t){return new C0(t)}class Ht{constructor(e,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(e,r){this.attributes[e]=r}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&e.setAttribute(r,this.attributes[r]);this.classes.length>0&&(e.className=Jr(this.classes));for(var n=0;n0&&(e+=' class ="'+be.escape(Jr(this.classes))+'"'),e+=">";for(var n=0;n",e}toText(){return this.children.map(e=>e.toText()).join("")}}class mr{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return be.escape(this.toText())}toText(){return this.text}}class l5{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character="  ":e>=-.05556&&e<=-.05555?this.character=" ⁣":e>=-.1667&&e<=-.1666?this.character=" ⁣":e>=-.2223&&e<=-.2222?this.character=" ⁣":e>=-.2778&&e<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",se(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var te={MathNode:Ht,TextNode:mr,SpaceNode:l5,newDocumentFragment:td},Jt=function(e,r,n){return Qe[r][e]&&Qe[r][e].replace&&e.charCodeAt(0)!==55349&&!(K1.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=Qe[r][e].replace),new te.TextNode(e)},wo=function(e){return e.length===1?e[0]:new te.MathNode("mrow",e)},xo=function(e,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var i=e.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathsfit")return"sans-serif-italic";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var s=e.text;if(be.contains(["\\imath","\\jmath"],s))return null;Qe[i][s]&&Qe[i][s].replace&&(s=Qe[i][s].replace);var a=$.fontMap[n].fontName;return vo(s,a,i)?$.fontMap[n].variant:null};function Is(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof mr&&e.text==="."}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var r=t.children[0];return r instanceof mr&&r.text===","}else return!1}var $t=function(e,r,n){if(e.length===1){var i=Ye(e[0],r);return n&&i instanceof Ht&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var s=[],a,o=0;o=1&&(a.type==="mn"||Is(a))){var c=l.children[0];c instanceof Ht&&c.type==="mn"&&(c.children=[...a.children,...c.children],s.pop())}else if(a.type==="mi"&&a.children.length===1){var u=a.children[0];if(u instanceof mr&&u.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var f=l.children[0];f instanceof mr&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),s.pop())}}}s.push(l),a=l}return s},Qr=function(e,r,n){return wo($t(e,r,n))},Ye=function(e,r){if(!e)return new te.MathNode("mrow");if(Ii[e.type]){var n=Ii[e.type](e,r);return n}else throw new re("Got group of unknown type: '"+e.type+"'")};function lc(t,e,r,n,i){var s=$t(t,r),a;s.length===1&&s[0]instanceof Ht&&be.contains(["mrow","mtable"],s[0].type)?a=s[0]:a=new te.MathNode("mrow",s);var o=new te.MathNode("annotation",[new te.TextNode(e)]);o.setAttribute("encoding","application/x-tex");var l=new te.MathNode("semantics",[a,o]),c=new te.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");var u=i?"katex":"katex-mathml";return $.makeSpan([u],[c])}var rd=function(e){return new Er({style:e.displayMode?xe.DISPLAY:xe.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},nd=function(e,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),e=$.makeSpan(n,[e])}return e},c5=function(e,r,n){var i=rd(n),s;if(n.output==="mathml")return lc(e,r,i,n.displayMode,!0);if(n.output==="html"){var a=ya(e,i);s=$.makeSpan(["katex"],[a])}else{var o=lc(e,r,i,n.displayMode,!1),l=ya(e,i);s=$.makeSpan(["katex"],[o,l])}return nd(s,n)},u5=function(e,r,n){var i=rd(n),s=ya(e,i),a=$.makeSpan(["katex"],[s]);return nd(a,n)},d5={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},h5=function(e){var r=new te.MathNode("mo",[new te.TextNode(d5[e.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},f5={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},p5=function(e){return e.type==="ordgroup"?e.body.length:1},m5=function(e,r){function n(){var o=4e5,l=e.label.slice(1);if(be.contains(["widehat","widecheck","widetilde","utilde"],l)){var c=e,u=p5(c.base),f,p,g;if(u>5)l==="widehat"||l==="widecheck"?(f=420,o=2364,g=.42,p=l+"4"):(f=312,o=2340,g=.34,p="tilde4");else{var v=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][v],f=[0,239,300,360,420][v],g=[0,.24,.3,.3,.36,.42][v],p=l+v):(o=[0,600,1033,2339,2340][v],f=[0,260,286,306,312][v],g=[0,.26,.286,.3,.306,.34][v],p="tilde"+v)}var w=new Zr(p),y=new _r([w],{width:"100%",height:se(g),viewBox:"0 0 "+o+" "+f,preserveAspectRatio:"none"});return{span:$.makeSvgSpan([],[y],r),minWidth:0,height:g}}else{var C=[],S=f5[l],[T,D,I]=S,_=I/1e3,F=T.length,G,W;if(F===1){var fe=S[3];G=["hide-tail"],W=[fe]}else if(F===2)G=["halfarrow-left","halfarrow-right"],W=["xMinYMin","xMaxYMin"];else if(F===3)G=["brace-left","brace-center","brace-right"],W=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+F+" children.");for(var ve=0;ve0&&(i.style.minWidth=se(s)),i},g5=function(e,r,n,i,s){var a,o=e.height+e.depth+n+i;if(/fbox|color|angl/.test(r)){if(a=$.makeSpan(["stretchy",r],[],s),r==="fbox"){var l=s.color&&s.getColor();l&&(a.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(r)&&c.push(new ga({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&c.push(new ga({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var u=new _r(c,{width:"100%",height:se(o)});a=$.makeSvgSpan([],[u],s)}return a.height=o,a.style.height=se(o),a},zr={encloseSpan:g5,mathMLnode:h5,svgSpan:m5};function De(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function So(t){var e=ns(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function ns(t){return t&&(t.type==="atom"||H6.hasOwnProperty(t.type))?t:null}var ko=(t,e)=>{var r,n,i;t&&t.type==="supsub"?(n=De(t.base,"accent"),r=n.base,t.base=r,i=B6(Le(t,e)),t.base=n):(n=De(t,"accent"),r=n.base);var s=Le(r,e.havingCrampedStyle()),a=n.isShifty&&be.isCharacterBox(r),o=0;if(a){var l=be.getBaseElem(r),c=Le(l,e.havingCrampedStyle());o=tc(c).skew}var u=n.label==="\\c",f=u?s.height+s.depth:Math.min(s.height,e.fontMetrics().xHeight),p;if(n.isStretchy)p=zr.svgSpan(n,e),p=$.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+se(2*o)+")",marginLeft:se(2*o)}:void 0}]},e);else{var g,v;n.label==="\\vec"?(g=$.staticSvg("vec",e),v=$.svgData.vec[1]):(g=$.makeOrd({mode:n.mode,text:n.label},e,"textord"),g=tc(g),g.italic=0,v=g.width,u&&(f+=g.depth)),p=$.makeSpan(["accent-body"],[g]);var w=n.label==="\\textcircled";w&&(p.classes.push("accent-full"),f=s.height);var y=o;w||(y-=v/2),p.style.left=se(y),n.label==="\\textcircled"&&(p.style.top=".2em"),p=$.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-f},{type:"elem",elem:p}]},e)}var C=$.makeSpan(["mord","accent"],[p],e);return i?(i.children[0]=C,i.height=Math.max(C.height,i.height),i.classes[0]="mord",i):C},id=(t,e)=>{var r=t.isStretchy?zr.mathMLnode(t.label):new te.MathNode("mo",[Jt(t.label,t.mode)]),n=new te.MathNode("mover",[Ye(t.base,e),r]);return n.setAttribute("accent","true"),n},v5=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));ue({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(t,e)=>{var r=Ri(e[0]),n=!v5.test(t.funcName),i=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:ko,mathmlBuilder:id});ue({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:ko,mathmlBuilder:id});ue({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(t,e)=>{var r=Le(t.base,e),n=zr.svgSpan(t,e),i=t.label==="\\utilde"?.12:0,s=$.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]},e);return $.makeSpan(["mord","accentunder"],[s],e)},mathmlBuilder:(t,e)=>{var r=zr.mathMLnode(t.label),n=new te.MathNode("munder",[Ye(t.base,e),r]);return n.setAttribute("accentunder","true"),n}});var G0=t=>{var e=new te.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};ue({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n,funcName:i}=t;return{type:"xArrow",mode:n.mode,label:i,body:e[0],below:r[0]}},htmlBuilder(t,e){var r=e.style,n=e.havingStyle(r.sup()),i=$.wrapFragment(Le(t.body,n,e),e),s=t.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(s+"-arrow-pad");var a;t.below&&(n=e.havingStyle(r.sub()),a=$.wrapFragment(Le(t.below,n,e),e),a.classes.push(s+"-arrow-pad"));var o=zr.svgSpan(t,e),l=-e.fontMetrics().axisHeight+.5*o.height,c=-e.fontMetrics().axisHeight-.5*o.height-.111;(i.depth>.25||t.label==="\\xleftequilibrium")&&(c-=i.depth);var u;if(a){var f=-e.fontMetrics().axisHeight+a.height+.5*o.height+.111;u=$.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:o,shift:l},{type:"elem",elem:a,shift:f}]},e)}else u=$.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:o,shift:l}]},e);return u.children[0].children[0].children[1].classes.push("svg-align"),$.makeSpan(["mrel","x-arrow"],[u],e)},mathmlBuilder(t,e){var r=zr.mathMLnode(t.label);r.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var i=G0(Ye(t.body,e));if(t.below){var s=G0(Ye(t.below,e));n=new te.MathNode("munderover",[r,s,i])}else n=new te.MathNode("mover",[r,i])}else if(t.below){var a=G0(Ye(t.below,e));n=new te.MathNode("munder",[r,a])}else n=G0(),n=new te.MathNode("mover",[r,n]);return n}});var b5=$.makeSpan;function sd(t,e){var r=mt(t.body,e,!0);return b5([t.mclass],r,e)}function ad(t,e){var r,n=$t(t.body,e);return t.mclass==="minner"?r=new te.MathNode("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(r=n[0],r.type="mi"):r=new te.MathNode("mi",n):(t.isCharacterBox?(r=n[0],r.type="mo"):r=new te.MathNode("mo",n),t.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):t.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):t.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}ue({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:ut(i),isCharacterBox:be.isCharacterBox(i)}},htmlBuilder:sd,mathmlBuilder:ad});var is=t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};ue({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:is(e[0]),body:ut(e[1]),isCharacterBox:be.isCharacterBox(e[1])}}});ue({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:r,funcName:n}=t,i=e[1],s=e[0],a;n!=="\\stackrel"?a=is(i):a="mrel";var o={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:ut(i)},l={type:"supsub",mode:s.mode,base:o,sup:n==="\\underset"?null:s,sub:n==="\\underset"?s:null};return{type:"mclass",mode:r.mode,mclass:a,body:[l],isCharacterBox:be.isCharacterBox(l)}},htmlBuilder:sd,mathmlBuilder:ad});ue({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:is(e[0]),body:ut(e[0])}},htmlBuilder(t,e){var r=mt(t.body,e,!0),n=$.makeSpan([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=$t(t.body,e),n=new te.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var y5={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},cc=()=>({type:"styling",body:[],mode:"math",style:"display"}),uc=t=>t.type==="textord"&&t.text==="@",w5=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;function x5(t,e,r){var n=y5[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[e[0]],[]),s={type:"atom",text:n,mode:"math",family:"rel"},a=r.callFunction("\\Big",[s],[]),o=r.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[i,a,o]};return r.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function S5(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if(r==="&"||r==="\\\\")t.consume();else if(r==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new re("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var n=[],i=[n],s=0;s-1))if("<>AV".indexOf(c)>-1)for(var f=0;f<2;f++){for(var p=!0,g=l+1;gAV=|." after @',a[l]);var v=x5(c,u,t),w={type:"styling",body:[v],mode:"math",style:"display"};n.push(w),o=cc()}s%2===0?n.push(o):n.shift(),n=[],i.push(n)}t.gullet.endGroup(),t.gullet.endGroup();var y=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:y,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}ue({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=$.wrapFragment(Le(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=se(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new te.MathNode("mrow",[Ye(t.label,e)]);return r=new te.MathNode("mpadded",[r]),r.setAttribute("width","0"),t.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new te.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});ue({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=$.wrapFragment(Le(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(t,e){return new te.MathNode("mrow",[Ye(t.fragment,e)])}});ue({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=De(e[0],"ordgroup"),i=n.body,s="",a=0;a=1114111)throw new re("\\@char with invalid code point "+s);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:r.mode,text:c}}});var od=(t,e)=>{var r=mt(t.body,e.withColor(t.color),!1);return $.makeFragment(r)},ld=(t,e)=>{var r=$t(t.body,e.withColor(t.color)),n=new te.MathNode("mstyle",r);return n.setAttribute("mathcolor",t.color),n};ue({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=De(e[0],"color-token").color,i=e[1];return{type:"color",mode:r.mode,color:n,body:ut(i)}},htmlBuilder:od,mathmlBuilder:ld});ue({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,i=De(e[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var s=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:s}},htmlBuilder:od,mathmlBuilder:ld});ue({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,s=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:s,size:i&&De(i,"size").value}},htmlBuilder(t,e){var r=$.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=se(it(t.size,e)))),r},mathmlBuilder(t,e){var r=new te.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",se(it(t.size,e)))),r}});var wa={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},cd=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new re("Expected a control sequence",t);return e},k5=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},ud=(t,e,r,n)=>{var i=t.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)};ue({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if(wa[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=wa[n.text]),De(e.parseFunction(),"internal");throw new re("Invalid token after macro prefix",n)}});ue({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new re("Expected a control sequence",n);for(var s=0,a,o=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){a=e.gullet.future(),o[s].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new re('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new re('Argument number "'+n.text+'" out of order');s++,o.push([])}else{if(n.text==="EOF")throw new re("Expected a macro definition");o[s].push(n.text)}var{tokens:l}=e.gullet.consumeArg();return a&&l.unshift(a),(r==="\\edef"||r==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(i,{tokens:l,numArgs:s,delimiters:o},r===wa[r]),{type:"internal",mode:e.mode}}});ue({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=cd(e.gullet.popToken());e.gullet.consumeSpaces();var i=k5(e);return ud(e,n,i,r==="\\\\globallet"),{type:"internal",mode:e.mode}}});ue({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=cd(e.gullet.popToken()),i=e.gullet.popToken(),s=e.gullet.popToken();return ud(e,n,s,r==="\\\\globalfuture"),e.gullet.pushToken(s),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});var e0=function(e,r,n){var i=Qe.math[e]&&Qe.math[e].replace,s=vo(i||e,r,n);if(!s)throw new Error("Unsupported symbol "+e+" and font size "+r+".");return s},To=function(e,r,n,i){var s=n.havingBaseStyle(r),a=$.makeSpan(i.concat(s.sizingClasses(n)),[e],n),o=s.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=s.sizeMultiplier,a},dd=function(e,r,n){var i=r.havingBaseStyle(n),s=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=se(s),e.height-=s,e.depth+=s},T5=function(e,r,n,i,s,a){var o=$.makeSymbol(e,"Main-Regular",s,i),l=To(o,r,i,a);return n&&dd(l,i,r),l},E5=function(e,r,n,i){return $.makeSymbol(e,"Size"+r+"-Regular",n,i)},hd=function(e,r,n,i,s,a){var o=E5(e,r,s,i),l=To($.makeSpan(["delimsizing","size"+r],[o],i),xe.TEXT,i,a);return n&&dd(l,i,xe.TEXT),l},Rs=function(e,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var s=$.makeSpan(["delimsizinginner",i],[$.makeSpan([],[$.makeSymbol(e,r,n)])]);return{type:"elem",elem:s}},Os=function(e,r,n){var i=pr["Size4-Regular"][e.charCodeAt(0)]?pr["Size4-Regular"][e.charCodeAt(0)][4]:pr["Size1-Regular"][e.charCodeAt(0)][4],s=new Zr("inner",D6(e,Math.round(1e3*r))),a=new _r([s],{width:se(i),height:se(r),style:"width:"+se(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),o=$.makeSvgSpan([],[a],n);return o.height=r,o.style.height=se(r),o.style.width=se(i),{type:"elem",elem:o}},xa=.008,K0={type:"kern",size:-1*xa},A5=["|","\\lvert","\\rvert","\\vert"],C5=["\\|","\\lVert","\\rVert","\\Vert"],fd=function(e,r,n,i,s,a){var o,l,c,u,f="",p=0;o=c=u=e,l=null;var g="Size1-Regular";e==="\\uparrow"?c=u="⏐":e==="\\Uparrow"?c=u="‖":e==="\\downarrow"?o=c="⏐":e==="\\Downarrow"?o=c="‖":e==="\\updownarrow"?(o="\\uparrow",c="⏐",u="\\downarrow"):e==="\\Updownarrow"?(o="\\Uparrow",c="‖",u="\\Downarrow"):be.contains(A5,e)?(c="∣",f="vert",p=333):be.contains(C5,e)?(c="∥",f="doublevert",p=556):e==="["||e==="\\lbrack"?(o="⎡",c="⎢",u="⎣",g="Size4-Regular",f="lbrack",p=667):e==="]"||e==="\\rbrack"?(o="⎤",c="⎥",u="⎦",g="Size4-Regular",f="rbrack",p=667):e==="\\lfloor"||e==="⌊"?(c=o="⎢",u="⎣",g="Size4-Regular",f="lfloor",p=667):e==="\\lceil"||e==="⌈"?(o="⎡",c=u="⎢",g="Size4-Regular",f="lceil",p=667):e==="\\rfloor"||e==="⌋"?(c=o="⎥",u="⎦",g="Size4-Regular",f="rfloor",p=667):e==="\\rceil"||e==="⌉"?(o="⎤",c=u="⎥",g="Size4-Regular",f="rceil",p=667):e==="("||e==="\\lparen"?(o="⎛",c="⎜",u="⎝",g="Size4-Regular",f="lparen",p=875):e===")"||e==="\\rparen"?(o="⎞",c="⎟",u="⎠",g="Size4-Regular",f="rparen",p=875):e==="\\{"||e==="\\lbrace"?(o="⎧",l="⎨",u="⎩",c="⎪",g="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(o="⎫",l="⎬",u="⎭",c="⎪",g="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(o="⎧",u="⎩",c="⎪",g="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(o="⎫",u="⎭",c="⎪",g="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(o="⎧",u="⎭",c="⎪",g="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(o="⎫",u="⎩",c="⎪",g="Size4-Regular");var v=e0(o,g,s),w=v.height+v.depth,y=e0(c,g,s),C=y.height+y.depth,S=e0(u,g,s),T=S.height+S.depth,D=0,I=1;if(l!==null){var _=e0(l,g,s);D=_.height+_.depth,I=2}var F=w+T+D,G=Math.max(0,Math.ceil((r-F)/(I*C))),W=F+G*I*C,fe=i.fontMetrics().axisHeight;n&&(fe*=i.sizeMultiplier);var ve=W/2-fe,Te=[];if(f.length>0){var Xe=W-w-T,ze=Math.round(W*1e3),rt=I6(f,Math.round(Xe*1e3)),_e=new Zr(f,rt),Ae=(p/1e3).toFixed(3)+"em",pe=(ze/1e3).toFixed(3)+"em",He=new _r([_e],{width:Ae,height:pe,viewBox:"0 0 "+p+" "+ze}),qe=$.makeSvgSpan([],[He],i);qe.height=ze/1e3,qe.style.width=Ae,qe.style.height=pe,Te.push({type:"elem",elem:qe})}else{if(Te.push(Rs(u,g,s)),Te.push(K0),l===null){var Je=W-w-T+2*xa;Te.push(Os(c,Je,i))}else{var me=(W-w-T-D)/2+2*xa;Te.push(Os(c,me,i)),Te.push(K0),Te.push(Rs(l,g,s)),Te.push(K0),Te.push(Os(c,me,i))}Te.push(K0),Te.push(Rs(o,g,s))}var Et=i.havingBaseStyle(xe.TEXT),ot=$.makeVList({positionType:"bottom",positionData:ve,children:Te},Et);return To($.makeSpan(["delimsizing","mult"],[ot],Et),xe.TEXT,i,a)},_s=80,Ls=.08,zs=function(e,r,n,i,s){var a=N6(e,i,n),o=new Zr(e,a),l=new _r([o],{width:"400em",height:se(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return $.makeSvgSpan(["hide-tail"],[l],s)},M5=function(e,r){var n=r.havingBaseSizing(),i=vd("\\surd",e*n.sizeMultiplier,gd,n),s=n.sizeMultiplier,a=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),o,l=0,c=0,u=0,f;return i.type==="small"?(u=1e3+1e3*a+_s,e<1?s=1:e<1.4&&(s=.7),l=(1+a+Ls)/s,c=(1+a)/s,o=zs("sqrtMain",l,u,a,r),o.style.minWidth="0.853em",f=.833/s):i.type==="large"?(u=(1e3+_s)*u0[i.size],c=(u0[i.size]+a)/s,l=(u0[i.size]+a+Ls)/s,o=zs("sqrtSize"+i.size,l,u,a,r),o.style.minWidth="1.02em",f=1/s):(l=e+a+Ls,c=e+a,u=Math.floor(1e3*e+a)+_s,o=zs("sqrtTall",l,u,a,r),o.style.minWidth="0.742em",f=1.056),o.height=c,o.style.height=se(l),{span:o,advanceWidth:f,ruleWidth:(r.fontMetrics().sqrtRuleThickness+a)*s}},pd=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],N5=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],md=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],u0=[0,1.2,1.8,2.4,3],D5=function(e,r,n,i,s){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),be.contains(pd,e)||be.contains(md,e))return hd(e,r,!1,n,i,s);if(be.contains(N5,e))return fd(e,u0[r],!1,n,i,s);throw new re("Illegal delimiter: '"+e+"'")},I5=[{type:"small",style:xe.SCRIPTSCRIPT},{type:"small",style:xe.SCRIPT},{type:"small",style:xe.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],R5=[{type:"small",style:xe.SCRIPTSCRIPT},{type:"small",style:xe.SCRIPT},{type:"small",style:xe.TEXT},{type:"stack"}],gd=[{type:"small",style:xe.SCRIPTSCRIPT},{type:"small",style:xe.SCRIPT},{type:"small",style:xe.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],O5=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},vd=function(e,r,n,i){for(var s=Math.min(2,3-i.style.size),a=s;ar)return n[a]}return n[n.length-1]},bd=function(e,r,n,i,s,a){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var o;be.contains(md,e)?o=I5:be.contains(pd,e)?o=gd:o=R5;var l=vd(e,r,o,i);return l.type==="small"?T5(e,l.style,n,i,s,a):l.type==="large"?hd(e,l.size,n,i,s,a):fd(e,r,n,i,s,a)},_5=function(e,r,n,i,s,a){var o=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,c=5/i.fontMetrics().ptPerEm,u=Math.max(r-o,n+o),f=Math.max(u/500*l,2*u-c);return bd(e,f,!0,i,s,a)},Ir={sqrtImage:M5,sizedDelim:D5,sizeToMaxHeight:u0,customSizedDelim:bd,leftRightDelim:_5},dc={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},L5=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function ss(t,e){var r=ns(t);if(r&&be.contains(L5,r.text))return r;throw r?new re("Invalid delimiter '"+r.text+"' after '"+e.funcName+"'",t):new re("Invalid delimiter type '"+t.type+"'",t)}ue({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(t,e)=>{var r=ss(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:dc[t.funcName].size,mclass:dc[t.funcName].mclass,delim:r.text}},htmlBuilder:(t,e)=>t.delim==="."?$.makeSpan([t.mclass]):Ir.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(Jt(t.delim,t.mode));var r=new te.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=se(Ir.sizeToMaxHeight[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function hc(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ue({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new re("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:ss(e[0],t).text,color:r}}});ue({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=ss(e[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var s=De(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:s.delim,rightColor:s.color}},htmlBuilder:(t,e)=>{hc(t);for(var r=mt(t.body,e,!0,["mopen","mclose"]),n=0,i=0,s=!1,a=0;a{hc(t);var r=$t(t.body,e);if(t.left!=="."){var n=new te.MathNode("mo",[Jt(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(t.right!=="."){var i=new te.MathNode("mo",[Jt(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),r.push(i)}return wo(r)}});ue({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=ss(e[0],t);if(!t.parser.leftrightDepth)throw new re("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},htmlBuilder:(t,e)=>{var r;if(t.delim===".")r=b0(e,[]);else{r=Ir.sizedDelim(t.delim,1,e,t.mode,[]);var n={delim:t.delim,options:e};r.isMiddle=n}return r},mathmlBuilder:(t,e)=>{var r=t.delim==="\\vert"||t.delim==="|"?Jt("|","text"):Jt(t.delim,t.mode),n=new te.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var Eo=(t,e)=>{var r=$.wrapFragment(Le(t.body,e),e),n=t.label.slice(1),i=e.sizeMultiplier,s,a=0,o=be.isCharacterBox(t.body);if(n==="sout")s=$.makeSpan(["stretchy","sout"]),s.height=e.fontMetrics().defaultRuleThickness/i,a=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=it({number:.6,unit:"pt"},e),c=it({number:.35,unit:"ex"},e),u=e.havingBaseSizing();i=i/u.sizeMultiplier;var f=r.height+r.depth+l+c;r.style.paddingLeft=se(f/2+l);var p=Math.floor(1e3*f*i),g=C6(p),v=new _r([new Zr("phase",g)],{width:"400em",height:se(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});s=$.makeSvgSpan(["hide-tail"],[v],e),s.style.height=se(f),a=r.depth+l+c}else{/cancel/.test(n)?o||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var w=0,y=0,C=0;/box/.test(n)?(C=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),w=e.fontMetrics().fboxsep+(n==="colorbox"?0:C),y=w):n==="angl"?(C=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),w=4*C,y=Math.max(0,.25-r.depth)):(w=o?.2:0,y=w),s=zr.encloseSpan(r,n,w,y,e),/fbox|boxed|fcolorbox/.test(n)?(s.style.borderStyle="solid",s.style.borderWidth=se(C)):n==="angl"&&C!==.049&&(s.style.borderTopWidth=se(C),s.style.borderRightWidth=se(C)),a=r.depth+y,t.backgroundColor&&(s.style.backgroundColor=t.backgroundColor,t.borderColor&&(s.style.borderColor=t.borderColor))}var S;if(t.backgroundColor)S=$.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:a},{type:"elem",elem:r,shift:0}]},e);else{var T=/cancel|phase/.test(n)?["svg-align"]:[];S=$.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:s,shift:a,wrapperClasses:T}]},e)}return/cancel/.test(n)&&(S.height=r.height,S.depth=r.depth),/cancel/.test(n)&&!o?$.makeSpan(["mord","cancel-lap"],[S],e):$.makeSpan(["mord"],[S],e)},Ao=(t,e)=>{var r=0,n=new te.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Ye(t.body,e)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),t.label==="\\fcolorbox"){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(t.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n};ue({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,s=De(e[0],"color-token").color,a=e[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:s,body:a}},htmlBuilder:Eo,mathmlBuilder:Ao});ue({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,s=De(e[0],"color-token").color,a=De(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,borderColor:s,body:o}},htmlBuilder:Eo,mathmlBuilder:Ao});ue({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]}}});ue({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:Eo,mathmlBuilder:Ao});ue({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]}}});var yd={};function vr(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:s,mathmlBuilder:a}=t,o={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l{var e=t.parser.settings;if(!e.displayMode)throw new re("{"+t.envName+"} can be used only in display mode.")};function Co(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function sn(t,e,r){var{hskipBeforeAndAfter:n,addJot:i,cols:s,arraystretch:a,colSeparationType:o,autoTag:l,singleRow:c,emptySingleRow:u,maxNumCols:f,leqno:p}=e;if(t.gullet.beginGroup(),c||t.gullet.macros.set("\\cr","\\\\\\relax"),!a){var g=t.gullet.expandMacroAsText("\\arraystretch");if(g==null)a=1;else if(a=parseFloat(g),!a||a<0)throw new re("Invalid \\arraystretch: "+g)}t.gullet.beginGroup();var v=[],w=[v],y=[],C=[],S=l!=null?[]:void 0;function T(){l&&t.gullet.macros.set("\\@eqnsw","1",!0)}function D(){S&&(t.gullet.macros.get("\\df@tag")?(S.push(t.subparse([new Yt("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):S.push(!!l&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(T(),C.push(fc(t));;){var I=t.parseExpression(!1,c?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),I={type:"ordgroup",mode:t.mode,body:I},r&&(I={type:"styling",mode:t.mode,style:r,body:[I]}),v.push(I);var _=t.fetch().text;if(_==="&"){if(f&&v.length===f){if(c||o)throw new re("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(_==="\\end"){D(),v.length===1&&I.type==="styling"&&I.body[0].body.length===0&&(w.length>1||!u)&&w.pop(),C.length0&&(T+=.25),c.push({pos:T,isDashed:H[X]})}for(D(a[0]),n=0;n0&&(ve+=S,FH))for(n=0;n=o)){var lt=void 0;(i>0||e.hskipBeforeAndAfter)&&(lt=be.deflt(me.pregap,p),lt!==0&&(rt=$.makeSpan(["arraycolsep"],[]),rt.style.width=se(lt),ze.push(rt)));var U=[];for(n=0;n0){for(var ye=$.makeLineSpan("hline",r,u),k=$.makeLineSpan("hdashline",r,u),N=[{type:"elem",elem:l,shift:0}];c.length>0;){var z=c.pop(),j=z.pos-Te;z.isDashed?N.push({type:"elem",elem:k,shift:j}):N.push({type:"elem",elem:ye,shift:j})}l=$.makeVList({positionType:"individualShift",children:N},r)}if(Ae.length===0)return $.makeSpan(["mord"],[l],r);var B=$.makeVList({positionType:"individualShift",children:Ae},r);return B=$.makeSpan(["tag"],[B],r),$.makeFragment([l,B])},z5={c:"center ",l:"left ",r:"right "},yr=function(e,r){for(var n=[],i=new te.MathNode("mtd",[],["mtr-glue"]),s=new te.MathNode("mtd",[],["mml-eqn-num"]),a=0;a0){var v=e.cols,w="",y=!1,C=0,S=v.length;v[0].type==="separator"&&(p+="top ",C=1),v[v.length-1].type==="separator"&&(p+="bottom ",S-=1);for(var T=C;T0?"left ":"",p+=G[G.length-1].length>0?"right ":"";for(var W=1;W-1?"alignat":"align",s=e.envName==="split",a=sn(e.parser,{cols:n,addJot:!0,autoTag:s?void 0:Co(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display"),o,l=0,c={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var u="",f=0;f0&&g&&(y=1),n[v]={type:"align",align:w,pregap:y,postgap:0}}return a.colSeparationType=g?"align":"alignat",a};vr({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=ns(e[0]),n=r?[e[0]]:De(e[0],"ordgroup").body,i=n.map(function(a){var o=So(a),l=o.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new re("Unknown column alignment: "+l,a)}),s={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return sn(t.parser,s,Mo(t.envName))},htmlBuilder:br,mathmlBuilder:yr});vr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(t.envName.charAt(t.envName.length-1)==="*"){var i=t.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,"lcr".indexOf(r)===-1)throw new re("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var s=sn(t.parser,n,Mo(t.envName)),a=Math.max(0,...s.body.map(o=>o.length));return s.cols=new Array(a).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[s],left:e[0],right:e[1],rightColor:void 0}:s},htmlBuilder:br,mathmlBuilder:yr});vr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},r=sn(t.parser,e,"script");return r.colSeparationType="small",r},htmlBuilder:br,mathmlBuilder:yr});vr({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=ns(e[0]),n=r?[e[0]]:De(e[0],"ordgroup").body,i=n.map(function(a){var o=So(a),l=o.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new re("Unknown column alignment: "+l,a)});if(i.length>1)throw new re("{subarray} can contain only one column");var s={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(s=sn(t.parser,s,"script"),s.body.length>0&&s.body[0].length>1)throw new re("{subarray} can contain only one column");return s},htmlBuilder:br,mathmlBuilder:yr});vr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=sn(t.parser,e,Mo(t.envName));return{type:"leftright",mode:t.mode,body:[r],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:br,mathmlBuilder:yr});vr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:xd,htmlBuilder:br,mathmlBuilder:yr});vr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){be.contains(["gather","gather*"],t.envName)&&as(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Co(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return sn(t.parser,e,"display")},htmlBuilder:br,mathmlBuilder:yr});vr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:xd,htmlBuilder:br,mathmlBuilder:yr});vr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){as(t);var e={autoTag:Co(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return sn(t.parser,e,"display")},htmlBuilder:br,mathmlBuilder:yr});vr({type:"array",names:["CD"],props:{numArgs:0},handler(t){return as(t),S5(t.parser)},htmlBuilder:br,mathmlBuilder:yr});b("\\nonumber","\\gdef\\@eqnsw{0}");b("\\notag","\\nonumber");ue({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new re(t.funcName+" valid only within array environment")}});var pc=yd;ue({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];if(i.type!=="ordgroup")throw new re("Invalid environment name",i);for(var s="",a=0;a{var r=t.font,n=e.withFont(r);return Le(t.body,n)},kd=(t,e)=>{var r=t.font,n=e.withFont(r);return Ye(t.body,n)},mc={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ue({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=Ri(e[0]),s=n;return s in mc&&(s=mc[s]),{type:"font",mode:r.mode,font:s.slice(1),body:i}},htmlBuilder:Sd,mathmlBuilder:kd});ue({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:r}=t,n=e[0],i=be.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:is(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:i}}});ue({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,breakOnTokenText:i}=t,{mode:s}=r,a=r.parseExpression(!0,i),o="math"+n.slice(1);return{type:"font",mode:s,font:o,body:{type:"ordgroup",mode:r.mode,body:a}}},htmlBuilder:Sd,mathmlBuilder:kd});var Td=(t,e)=>{var r=e;return t==="display"?r=r.id>=xe.SCRIPT.id?r.text():xe.DISPLAY:t==="text"&&r.size===xe.DISPLAY.size?r=xe.TEXT:t==="script"?r=xe.SCRIPT:t==="scriptscript"&&(r=xe.SCRIPTSCRIPT),r},No=(t,e)=>{var r=Td(t.size,e.style),n=r.fracNum(),i=r.fracDen(),s;s=e.havingStyle(n);var a=Le(t.numer,s,e);if(t.continued){var o=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;a.height=a.height0?v=3*p:v=7*p,w=e.fontMetrics().denom1):(f>0?(g=e.fontMetrics().num2,v=p):(g=e.fontMetrics().num3,v=3*p),w=e.fontMetrics().denom2);var y;if(u){var S=e.fontMetrics().axisHeight;g-a.depth-(S+.5*f){var r=new te.MathNode("mfrac",[Ye(t.numer,e),Ye(t.denom,e)]);if(!t.hasBarLine)r.setAttribute("linethickness","0px");else if(t.barSize){var n=it(t.barSize,e);r.setAttribute("linethickness",se(n))}var i=Td(t.size,e.style);if(i.size!==e.style.size){r=new te.MathNode("mstyle",[r]);var s=i.size===xe.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",s),r.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var a=[];if(t.leftDelim!=null){var o=new te.MathNode("mo",[new te.TextNode(t.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),a.push(o)}if(a.push(r),t.rightDelim!=null){var l=new te.MathNode("mo",[new te.TextNode(t.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),a.push(l)}return wo(a)}return r};ue({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],s=e[1],a,o=null,l=null,c="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,o="(",l=")";break;case"\\\\bracefrac":a=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":a=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:i,denom:s,hasBarLine:a,leftDelim:o,rightDelim:l,size:c,barSize:null}},htmlBuilder:No,mathmlBuilder:Do});ue({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],s=e[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:i,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});ue({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:r,token:n}=t,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:i,token:n}}});var gc=["display","text","script","scriptscript"],vc=function(e){var r=null;return e.length>0&&(r=e,r=r==="."?null:r),r};ue({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:r}=t,n=e[4],i=e[5],s=Ri(e[0]),a=s.type==="atom"&&s.family==="open"?vc(s.text):null,o=Ri(e[1]),l=o.type==="atom"&&o.family==="close"?vc(o.text):null,c=De(e[2],"size"),u,f=null;c.isBlank?u=!0:(f=c.value,u=f.number>0);var p="auto",g=e[3];if(g.type==="ordgroup"){if(g.body.length>0){var v=De(g.body[0],"textord");p=gc[Number(v.text)]}}else g=De(g,"textord"),p=gc[Number(g.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:u,barSize:f,leftDelim:a,rightDelim:l,size:p}},htmlBuilder:No,mathmlBuilder:Do});ue({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:i}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:De(e[0],"size").value,token:i}}});ue({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],s=h6(De(e[1],"infix").size),a=e[2],o=s.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:a,continued:!1,hasBarLine:o,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:No,mathmlBuilder:Do});var Ed=(t,e)=>{var r=e.style,n,i;t.type==="supsub"?(n=t.sup?Le(t.sup,e.havingStyle(r.sup()),e):Le(t.sub,e.havingStyle(r.sub()),e),i=De(t.base,"horizBrace")):i=De(t,"horizBrace");var s=Le(i.base,e.havingBaseStyle(xe.DISPLAY)),a=zr.svgSpan(i,e),o;if(i.isOver?(o=$.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},e),o.children[0].children[0].children[1].classes.push("svg-align")):(o=$.makeVList({positionType:"bottom",positionData:s.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},e),o.children[0].children[0].children[0].classes.push("svg-align")),n){var l=$.makeSpan(["mord",i.isOver?"mover":"munder"],[o],e);i.isOver?o=$.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},e):o=$.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return $.makeSpan(["mord",i.isOver?"mover":"munder"],[o],e)},$5=(t,e)=>{var r=zr.mathMLnode(t.label);return new te.MathNode(t.isOver?"mover":"munder",[Ye(t.base,e),r])};ue({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:Ed,mathmlBuilder:$5});ue({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[1],i=De(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:ut(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var r=mt(t.body,e,!1);return $.makeAnchor(t.href,[],r,e)},mathmlBuilder:(t,e)=>{var r=Qr(t.body,e);return r instanceof Ht||(r=new Ht("mrow",[r])),r.setAttribute("href",t.href),r}});ue({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=De(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],s=0;s{var{parser:r,funcName:n,token:i}=t,s=De(e[0],"raw").string,a=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(n){case"\\htmlClass":l.class=s,o={command:"\\htmlClass",class:s};break;case"\\htmlId":l.id=s,o={command:"\\htmlId",id:s};break;case"\\htmlStyle":l.style=s,o={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var c=s.split(","),u=0;u{var r=mt(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var i=$.makeSpan(n,r,e);for(var s in t.attributes)s!=="class"&&t.attributes.hasOwnProperty(s)&&i.setAttribute(s,t.attributes[s]);return i},mathmlBuilder:(t,e)=>Qr(t.body,e)});ue({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:ut(e[0]),mathml:ut(e[1])}},htmlBuilder:(t,e)=>{var r=mt(t.html,e,!1);return $.makeFragment(r)},mathmlBuilder:(t,e)=>Qr(t.mathml,e)});var $s=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!r)throw new re("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!U1(n))throw new re("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};ue({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,r)=>{var{parser:n}=t,i={number:0,unit:"em"},s={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(r[0])for(var l=De(r[0],"raw").string,c=l.split(","),u=0;u{var r=it(t.height,e),n=0;t.totalheight.number>0&&(n=it(t.totalheight,e)-r);var i=0;t.width.number>0&&(i=it(t.width,e));var s={height:se(r+n)};i>0&&(s.width=se(i)),n>0&&(s.verticalAlign=se(-n));var a=new $6(t.src,t.alt,s);return a.height=r,a.depth=n,a},mathmlBuilder:(t,e)=>{var r=new te.MathNode("mglyph",[]);r.setAttribute("alt",t.alt);var n=it(t.height,e),i=0;if(t.totalheight.number>0&&(i=it(t.totalheight,e)-n,r.setAttribute("valign",se(-i))),r.setAttribute("height",se(n+i)),t.width.number>0){var s=it(t.width,e);r.setAttribute("width",se(s))}return r.setAttribute("src",t.src),r}});ue({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=De(e[0],"size");if(r.settings.strict){var s=n[1]==="m",a=i.value.unit==="mu";s?(a||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):a&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(t,e){return $.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var r=it(t.dimension,e);return new te.SpaceNode(r)}});ue({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(t,e)=>{var r;t.alignment==="clap"?(r=$.makeSpan([],[Le(t.body,e)]),r=$.makeSpan(["inner"],[r],e)):r=$.makeSpan(["inner"],[Le(t.body,e)]);var n=$.makeSpan(["fix"],[]),i=$.makeSpan([t.alignment],[r,n],e),s=$.makeSpan(["strut"]);return s.style.height=se(i.height+i.depth),i.depth&&(s.style.verticalAlign=se(-i.depth)),i.children.unshift(s),i=$.makeSpan(["thinbox"],[i],e),$.makeSpan(["mord","vbox"],[i],e)},mathmlBuilder:(t,e)=>{var r=new te.MathNode("mpadded",[Ye(t.body,e)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});ue({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,i=n.mode;n.switchMode("math");var s=r==="\\("?"\\)":"$",a=n.parseExpression(!1,s);return n.expect(s),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:a}}});ue({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new re("Mismatched "+t.funcName)}});var bc=(t,e)=>{switch(e.style.size){case xe.DISPLAY.size:return t.display;case xe.TEXT.size:return t.text;case xe.SCRIPT.size:return t.script;case xe.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};ue({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:ut(e[0]),text:ut(e[1]),script:ut(e[2]),scriptscript:ut(e[3])}},htmlBuilder:(t,e)=>{var r=bc(t,e),n=mt(r,e,!1);return $.makeFragment(n)},mathmlBuilder:(t,e)=>{var r=bc(t,e);return Qr(r,e)}});var Ad=(t,e,r,n,i,s,a)=>{t=$.makeSpan([],[t]);var o=r&&be.isCharacterBox(r),l,c;if(e){var u=Le(e,n.havingStyle(i.sup()),n);c={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-u.depth)}}if(r){var f=Le(r,n.havingStyle(i.sub()),n);l={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-f.height)}}var p;if(c&&l){var g=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+a;p=$.makeVList({positionType:"bottom",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:se(-s)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:se(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var v=t.height-a;p=$.makeVList({positionType:"top",positionData:v,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:se(-s)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},n)}else if(c){var w=t.depth+a;p=$.makeVList({positionType:"bottom",positionData:w,children:[{type:"elem",elem:t},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:se(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return t;var y=[p];if(l&&s!==0&&!o){var C=$.makeSpan(["mspace"],[],n);C.style.marginRight=se(s),y.unshift(C)}return $.makeSpan(["mop","op-limits"],y,n)},Cd=["\\smallint"],Un=(t,e)=>{var r,n,i=!1,s;t.type==="supsub"?(r=t.sup,n=t.sub,s=De(t.base,"op"),i=!0):s=De(t,"op");var a=e.style,o=!1;a.size===xe.DISPLAY.size&&s.symbol&&!be.contains(Cd,s.name)&&(o=!0);var l;if(s.symbol){var c=o?"Size2-Regular":"Size1-Regular",u="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(u=s.name.slice(1),s.name=u==="oiint"?"\\iint":"\\iiint"),l=$.makeSymbol(s.name,c,"math",e,["mop","op-symbol",o?"large-op":"small-op"]),u.length>0){var f=l.italic,p=$.staticSvg(u+"Size"+(o?"2":"1"),e);l=$.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:p,shift:o?.08:0}]},e),s.name="\\"+u,l.classes.unshift("mop"),l.italic=f}}else if(s.body){var g=mt(s.body,e,!0);g.length===1&&g[0]instanceof Xt?(l=g[0],l.classes[0]="mop"):l=$.makeSpan(["mop"],g,e)}else{for(var v=[],w=1;w{var r;if(t.symbol)r=new Ht("mo",[Jt(t.name,t.mode)]),be.contains(Cd,t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new Ht("mo",$t(t.body,e));else{r=new Ht("mi",[new mr(t.name.slice(1))]);var n=new Ht("mo",[Jt("⁡","text")]);t.parentIsSupSub?r=new Ht("mrow",[r,n]):r=td([r,n])}return r},F5={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ue({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=n;return i.length===1&&(i=F5[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Un,mathmlBuilder:N0});ue({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ut(n)}},htmlBuilder:Un,mathmlBuilder:N0});var B5={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ue({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Un,mathmlBuilder:N0});ue({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Un,mathmlBuilder:N0});ue({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t,n=r;return n.length===1&&(n=B5[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Un,mathmlBuilder:N0});var Md=(t,e)=>{var r,n,i=!1,s;t.type==="supsub"?(r=t.sup,n=t.sub,s=De(t.base,"operatorname"),i=!0):s=De(t,"operatorname");var a;if(s.body.length>0){for(var o=s.body.map(f=>{var p=f.text;return typeof p=="string"?{type:"textord",mode:f.mode,text:p}:f}),l=mt(o,e.withFont("mathrm"),!0),c=0;c{for(var r=$t(t.body,e.withFont("mathrm")),n=!0,i=0;iu.toText()).join("");r=[new te.TextNode(o)]}var l=new te.MathNode("mi",r);l.setAttribute("mathvariant","normal");var c=new te.MathNode("mo",[Jt("⁡","text")]);return t.parentIsSupSub?new te.MathNode("mrow",[l,c]):te.newDocumentFragment([l,c])};ue({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"operatorname",mode:r.mode,body:ut(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Md,mathmlBuilder:P5});b("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");yn({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?$.makeFragment(mt(t.body,e,!1)):$.makeSpan(["mord"],mt(t.body,e,!0),e)},mathmlBuilder(t,e){return Qr(t.body,e,!0)}});ue({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=Le(t.body,e.havingCrampedStyle()),n=$.makeLineSpan("overline-line",e),i=e.fontMetrics().defaultRuleThickness,s=$.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},e);return $.makeSpan(["mord","overline"],[s],e)},mathmlBuilder(t,e){var r=new te.MathNode("mo",[new te.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new te.MathNode("mover",[Ye(t.body,e),r]);return n.setAttribute("accent","true"),n}});ue({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:ut(n)}},htmlBuilder:(t,e)=>{var r=mt(t.body,e.withPhantom(),!1);return $.makeFragment(r)},mathmlBuilder:(t,e)=>{var r=$t(t.body,e);return new te.MathNode("mphantom",r)}});ue({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=$.makeSpan([],[Le(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n{var r=$t(ut(t.body),e),n=new te.MathNode("mphantom",r),i=new te.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});ue({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=$.makeSpan(["inner"],[Le(t.body,e.withPhantom())]),n=$.makeSpan(["fix"],[]);return $.makeSpan(["mord","rlap"],[r,n],e)},mathmlBuilder:(t,e)=>{var r=$t(ut(t.body),e),n=new te.MathNode("mphantom",r),i=new te.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i}});ue({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=De(e[0],"size").value,i=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(t,e){var r=Le(t.body,e),n=it(t.dy,e);return $.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){var r=new te.MathNode("mpadded",[Ye(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}});ue({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});ue({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,i=r[0],s=De(e[0],"size"),a=De(e[1],"size");return{type:"rule",mode:n.mode,shift:i&&De(i,"size").value,width:s.value,height:a.value}},htmlBuilder(t,e){var r=$.makeSpan(["mord","rule"],[],e),n=it(t.width,e),i=it(t.height,e),s=t.shift?it(t.shift,e):0;return r.style.borderRightWidth=se(n),r.style.borderTopWidth=se(i),r.style.bottom=se(s),r.width=n,r.height=i+s,r.depth=-s,r.maxFontSize=i*1.125*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=it(t.width,e),n=it(t.height,e),i=t.shift?it(t.shift,e):0,s=e.color&&e.getColor()||"black",a=new te.MathNode("mspace");a.setAttribute("mathbackground",s),a.setAttribute("width",se(r)),a.setAttribute("height",se(n));var o=new te.MathNode("mpadded",[a]);return i>=0?o.setAttribute("height",se(i)):(o.setAttribute("height",se(i)),o.setAttribute("depth",se(-i))),o.setAttribute("voffset",se(i)),o}});function Nd(t,e,r){for(var n=mt(t,e,!1),i=e.sizeMultiplier/r.sizeMultiplier,s=0;s{var r=e.havingSize(t.size);return Nd(t.body,r,e)};ue({type:"sizing",names:yc,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:r,funcName:n,parser:i}=t,s=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:yc.indexOf(n)+1,body:s}},htmlBuilder:H5,mathmlBuilder:(t,e)=>{var r=e.havingSize(t.size),n=$t(t.body,r),i=new te.MathNode("mstyle",n);return i.setAttribute("mathsize",se(r.sizeMultiplier)),i}});ue({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,r)=>{var{parser:n}=t,i=!1,s=!1,a=r[0]&&De(r[0],"ordgroup");if(a)for(var o="",l=0;l{var r=$.makeSpan([],[Le(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n{var r=new te.MathNode("mpadded",[Ye(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r}});ue({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,i=r[0],s=e[0];return{type:"sqrt",mode:n.mode,body:s,index:i}},htmlBuilder(t,e){var r=Le(t.body,e.havingCrampedStyle());r.height===0&&(r.height=e.fontMetrics().xHeight),r=$.wrapFragment(r,e);var n=e.fontMetrics(),i=n.defaultRuleThickness,s=i;e.style.idr.height+r.depth+a&&(a=(a+f-r.height-r.depth)/2);var p=l.height-r.height-a-c;r.style.paddingLeft=se(u);var g=$.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+p)},{type:"elem",elem:l},{type:"kern",size:c}]},e);if(t.index){var v=e.havingStyle(xe.SCRIPTSCRIPT),w=Le(t.index,v,e),y=.6*(g.height-g.depth),C=$.makeVList({positionType:"shift",positionData:-y,children:[{type:"elem",elem:w}]},e),S=$.makeSpan(["root"],[C]);return $.makeSpan(["mord","sqrt"],[S,g],e)}else return $.makeSpan(["mord","sqrt"],[g],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new te.MathNode("mroot",[Ye(r,e),Ye(n,e)]):new te.MathNode("msqrt",[Ye(r,e)])}});var wc={display:xe.DISPLAY,text:xe.TEXT,script:xe.SCRIPT,scriptscript:xe.SCRIPTSCRIPT};ue({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:i}=t,s=i.parseExpression(!0,r),a=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:a,body:s}},htmlBuilder(t,e){var r=wc[t.style],n=e.havingStyle(r).withFont("");return Nd(t.body,n,e)},mathmlBuilder(t,e){var r=wc[t.style],n=e.havingStyle(r),i=$t(t.body,n),s=new te.MathNode("mstyle",i),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=a[t.style];return s.setAttribute("scriptlevel",o[0]),s.setAttribute("displaystyle",o[1]),s}});var q5=function(e,r){var n=e.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===xe.DISPLAY.size||n.alwaysHandleSupSub);return i?Un:null}else if(n.type==="operatorname"){var s=n.alwaysHandleSupSub&&(r.style.size===xe.DISPLAY.size||n.limits);return s?Md:null}else{if(n.type==="accent")return be.isCharacterBox(n.base)?ko:null;if(n.type==="horizBrace"){var a=!e.sub;return a===n.isOver?Ed:null}else return null}else return null};yn({type:"supsub",htmlBuilder(t,e){var r=q5(t,e);if(r)return r(t,e);var{base:n,sup:i,sub:s}=t,a=Le(n,e),o,l,c=e.fontMetrics(),u=0,f=0,p=n&&be.isCharacterBox(n);if(i){var g=e.havingStyle(e.style.sup());o=Le(i,g,e),p||(u=a.height-g.fontMetrics().supDrop*g.sizeMultiplier/e.sizeMultiplier)}if(s){var v=e.havingStyle(e.style.sub());l=Le(s,v,e),p||(f=a.depth+v.fontMetrics().subDrop*v.sizeMultiplier/e.sizeMultiplier)}var w;e.style===xe.DISPLAY?w=c.sup1:e.style.cramped?w=c.sup3:w=c.sup2;var y=e.sizeMultiplier,C=se(.5/c.ptPerEm/y),S=null;if(l){var T=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(a instanceof Xt||T)&&(S=se(-a.italic))}var D;if(o&&l){u=Math.max(u,w,o.depth+.25*c.xHeight),f=Math.max(f,c.sub2);var I=c.defaultRuleThickness,_=4*I;if(u-o.depth-(l.height-f)<_){f=_-(u-o.depth)+l.height;var F=.8*c.xHeight-(u-o.depth);F>0&&(u+=F,f-=F)}var G=[{type:"elem",elem:l,shift:f,marginRight:C,marginLeft:S},{type:"elem",elem:o,shift:-u,marginRight:C}];D=$.makeVList({positionType:"individualShift",children:G},e)}else if(l){f=Math.max(f,c.sub1,l.height-.8*c.xHeight);var W=[{type:"elem",elem:l,marginLeft:S,marginRight:C}];D=$.makeVList({positionType:"shift",positionData:f,children:W},e)}else if(o)u=Math.max(u,w,o.depth+.25*c.xHeight),D=$.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:o,marginRight:C}]},e);else throw new Error("supsub must have either sup or sub.");var fe=ba(a,"right")||"mord";return $.makeSpan([fe],[a,$.makeSpan(["msupsub"],[D])],e)},mathmlBuilder(t,e){var r=!1,n,i;t.base&&t.base.type==="horizBrace"&&(i=!!t.sup,i===t.base.isOver&&(r=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var s=[Ye(t.base,e)];t.sub&&s.push(Ye(t.sub,e)),t.sup&&s.push(Ye(t.sup,e));var a;if(r)a=n?"mover":"munder";else if(t.sub)if(t.sup){var c=t.base;c&&c.type==="op"&&c.limits&&e.style===xe.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(e.style===xe.DISPLAY||c.limits)?a="munderover":a="msubsup"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===xe.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===xe.DISPLAY)?a="munder":a="msub"}else{var o=t.base;o&&o.type==="op"&&o.limits&&(e.style===xe.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||e.style===xe.DISPLAY)?a="mover":a="msup"}return new te.MathNode(a,s)}});yn({type:"atom",htmlBuilder(t,e){return $.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new te.MathNode("mo",[Jt(t.text,t.mode)]);if(t.family==="bin"){var n=xo(t,e);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else t.family==="punct"?r.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&r.setAttribute("stretchy","false");return r}});var Dd={mi:"italic",mn:"normal",mtext:"normal"};yn({type:"mathord",htmlBuilder(t,e){return $.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var r=new te.MathNode("mi",[Jt(t.text,t.mode,e)]),n=xo(t,e)||"italic";return n!==Dd[r.type]&&r.setAttribute("mathvariant",n),r}});yn({type:"textord",htmlBuilder(t,e){return $.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var r=Jt(t.text,t.mode,e),n=xo(t,e)||"normal",i;return t.mode==="text"?i=new te.MathNode("mtext",[r]):/[0-9]/.test(t.text)?i=new te.MathNode("mn",[r]):t.text==="\\prime"?i=new te.MathNode("mo",[r]):i=new te.MathNode("mi",[r]),n!==Dd[i.type]&&i.setAttribute("mathvariant",n),i}});var Fs={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Bs={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};yn({type:"spacing",htmlBuilder(t,e){if(Bs.hasOwnProperty(t.text)){var r=Bs[t.text].className||"";if(t.mode==="text"){var n=$.makeOrd(t,e,"textord");return n.classes.push(r),n}else return $.makeSpan(["mspace",r],[$.mathsym(t.text,t.mode,e)],e)}else{if(Fs.hasOwnProperty(t.text))return $.makeSpan(["mspace",Fs[t.text]],[],e);throw new re('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var r;if(Bs.hasOwnProperty(t.text))r=new te.MathNode("mtext",[new te.TextNode(" ")]);else{if(Fs.hasOwnProperty(t.text))return new te.MathNode("mspace");throw new re('Unknown type of space "'+t.text+'"')}return r}});var xc=()=>{var t=new te.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};yn({type:"tag",mathmlBuilder(t,e){var r=new te.MathNode("mtable",[new te.MathNode("mtr",[xc(),new te.MathNode("mtd",[Qr(t.body,e)]),xc(),new te.MathNode("mtd",[Qr(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});var Sc={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},kc={"\\textbf":"textbf","\\textmd":"textmd"},j5={"\\textit":"textit","\\textup":"textup"},Tc=(t,e)=>{var r=t.font;if(r){if(Sc[r])return e.withTextFontFamily(Sc[r]);if(kc[r])return e.withTextFontWeight(kc[r]);if(r==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(j5[r])};ue({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"text",mode:r.mode,body:ut(i),font:n}},htmlBuilder(t,e){var r=Tc(t,e),n=mt(t.body,r,!0);return $.makeSpan(["mord","text"],n,r)},mathmlBuilder(t,e){var r=Tc(t,e);return Qr(t.body,r)}});ue({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Le(t.body,e),n=$.makeLineSpan("underline-line",e),i=e.fontMetrics().defaultRuleThickness,s=$.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]},e);return $.makeSpan(["mord","underline"],[s],e)},mathmlBuilder(t,e){var r=new te.MathNode("mo",[new te.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new te.MathNode("munder",[Ye(t.body,e),r]);return n.setAttribute("accentunder","true"),n}});ue({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Le(t.body,e),n=e.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return $.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return new te.MathNode("mpadded",[Ye(t.body,e)],["vcenter"])}});ue({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new re("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=Ec(t),n=[],i=e.havingStyle(e.style.text()),s=0;st.body.replace(/ /g,t.star?"␣":" "),Wr=Q1,Id=`[ \r - ]`,U5="\\\\[a-zA-Z@]+",V5="\\\\[^\uD800-\uDFFF]",W5="("+U5+")"+Id+"*",G5=`\\\\( -|[ \r ]+ -?)[ \r ]*`,Sa="[̀-ͯ]",K5=new RegExp(Sa+"+$"),Y5="("+Id+"+)|"+(G5+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(Sa+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Sa+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+W5)+("|"+V5+")");class Ac{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(Y5,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new Yt("EOF",new Bt(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new re("Unexpected character: '"+e[r]+"'",new Yt(e[r],new Bt(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var s=e.indexOf(` -`,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new Yt(i,new Bt(this,r,this.tokenRegex.lastIndex))}}class X5{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new re("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}}var J5=wd;b("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});b("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});b("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});b("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});b("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});b("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");b("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var Cc={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};b("\\char",function(t){var e=t.popToken(),r,n="";if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new re("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=Cc[e.text],n==null||n>=r)throw new re("Invalid base-"+r+" digit "+e.text);for(var i;(i=Cc[t.future().text])!=null&&i{var i=t.consumeArg().tokens;if(i.length!==1)throw new re("\\newcommand's first argument must be a macro name");var s=i[0].text,a=t.isDefined(s);if(a&&!e)throw new re("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!a&&!r)throw new re("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var o=0;if(i=t.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var l="",c=t.expandNextToken();c.text!=="]"&&c.text!=="EOF";)l+=c.text,c=t.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new re("Invalid number of arguments: "+l);o=parseInt(l),i=t.consumeArg().tokens}return a&&n||t.macros.set(s,{tokens:i,numArgs:o}),""};b("\\newcommand",t=>Io(t,!1,!0,!1));b("\\renewcommand",t=>Io(t,!0,!1,!1));b("\\providecommand",t=>Io(t,!0,!0,!0));b("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});b("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});b("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Wr[r],Qe.math[r],Qe.text[r]),""});b("\\bgroup","{");b("\\egroup","}");b("~","\\nobreakspace");b("\\lq","`");b("\\rq","'");b("\\aa","\\r a");b("\\AA","\\r A");b("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");b("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");b("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");b("ℬ","\\mathscr{B}");b("ℰ","\\mathscr{E}");b("ℱ","\\mathscr{F}");b("ℋ","\\mathscr{H}");b("ℐ","\\mathscr{I}");b("ℒ","\\mathscr{L}");b("ℳ","\\mathscr{M}");b("ℛ","\\mathscr{R}");b("ℭ","\\mathfrak{C}");b("ℌ","\\mathfrak{H}");b("ℨ","\\mathfrak{Z}");b("\\Bbbk","\\Bbb{k}");b("·","\\cdotp");b("\\llap","\\mathllap{\\textrm{#1}}");b("\\rlap","\\mathrlap{\\textrm{#1}}");b("\\clap","\\mathclap{\\textrm{#1}}");b("\\mathstrut","\\vphantom{(}");b("\\underbar","\\underline{\\text{#1}}");b("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');b("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");b("\\ne","\\neq");b("≠","\\neq");b("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");b("∉","\\notin");b("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");b("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");b("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");b("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");b("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");b("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");b("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");b("⟂","\\perp");b("‼","\\mathclose{!\\mkern-0.8mu!}");b("∌","\\notni");b("⌜","\\ulcorner");b("⌝","\\urcorner");b("⌞","\\llcorner");b("⌟","\\lrcorner");b("©","\\copyright");b("®","\\textregistered");b("️","\\textregistered");b("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');b("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');b("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');b("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');b("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");b("⋮","\\vdots");b("\\varGamma","\\mathit{\\Gamma}");b("\\varDelta","\\mathit{\\Delta}");b("\\varTheta","\\mathit{\\Theta}");b("\\varLambda","\\mathit{\\Lambda}");b("\\varXi","\\mathit{\\Xi}");b("\\varPi","\\mathit{\\Pi}");b("\\varSigma","\\mathit{\\Sigma}");b("\\varUpsilon","\\mathit{\\Upsilon}");b("\\varPhi","\\mathit{\\Phi}");b("\\varPsi","\\mathit{\\Psi}");b("\\varOmega","\\mathit{\\Omega}");b("\\substack","\\begin{subarray}{c}#1\\end{subarray}");b("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");b("\\boxed","\\fbox{$\\displaystyle{#1}$}");b("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");b("\\implies","\\DOTSB\\;\\Longrightarrow\\;");b("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");b("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");b("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Mc={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};b("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in Mc?e=Mc[r]:(r.slice(0,4)==="\\not"||r in Qe.math&&be.contains(["bin","rel"],Qe.math[r].group))&&(e="\\dotsb"),e});var Ro={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};b("\\dotso",function(t){var e=t.future().text;return e in Ro?"\\ldots\\,":"\\ldots"});b("\\dotsc",function(t){var e=t.future().text;return e in Ro&&e!==","?"\\ldots\\,":"\\ldots"});b("\\cdots",function(t){var e=t.future().text;return e in Ro?"\\@cdots\\,":"\\@cdots"});b("\\dotsb","\\cdots");b("\\dotsm","\\cdots");b("\\dotsi","\\!\\cdots");b("\\dotsx","\\ldots\\,");b("\\DOTSI","\\relax");b("\\DOTSB","\\relax");b("\\DOTSX","\\relax");b("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");b("\\,","\\tmspace+{3mu}{.1667em}");b("\\thinspace","\\,");b("\\>","\\mskip{4mu}");b("\\:","\\tmspace+{4mu}{.2222em}");b("\\medspace","\\:");b("\\;","\\tmspace+{5mu}{.2777em}");b("\\thickspace","\\;");b("\\!","\\tmspace-{3mu}{.1667em}");b("\\negthinspace","\\!");b("\\negmedspace","\\tmspace-{4mu}{.2222em}");b("\\negthickspace","\\tmspace-{5mu}{.277em}");b("\\enspace","\\kern.5em ");b("\\enskip","\\hskip.5em\\relax");b("\\quad","\\hskip1em\\relax");b("\\qquad","\\hskip2em\\relax");b("\\tag","\\@ifstar\\tag@literal\\tag@paren");b("\\tag@paren","\\tag@literal{({#1})}");b("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new re("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});b("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");b("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");b("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");b("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");b("\\newline","\\\\\\relax");b("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Rd=se(pr["Main-Regular"]["T".charCodeAt(0)][1]-.7*pr["Main-Regular"]["A".charCodeAt(0)][1]);b("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Rd+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");b("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Rd+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");b("\\hspace","\\@ifstar\\@hspacer\\@hspace");b("\\@hspace","\\hskip #1\\relax");b("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");b("\\ordinarycolon",":");b("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");b("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');b("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');b("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');b("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');b("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');b("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');b("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');b("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');b("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');b("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');b("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');b("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');b("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');b("∷","\\dblcolon");b("∹","\\eqcolon");b("≔","\\coloneqq");b("≕","\\eqqcolon");b("⩴","\\Coloneqq");b("\\ratio","\\vcentcolon");b("\\coloncolon","\\dblcolon");b("\\colonequals","\\coloneqq");b("\\coloncolonequals","\\Coloneqq");b("\\equalscolon","\\eqqcolon");b("\\equalscoloncolon","\\Eqqcolon");b("\\colonminus","\\coloneq");b("\\coloncolonminus","\\Coloneq");b("\\minuscolon","\\eqcolon");b("\\minuscoloncolon","\\Eqcolon");b("\\coloncolonapprox","\\Colonapprox");b("\\coloncolonsim","\\Colonsim");b("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");b("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");b("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");b("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");b("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");b("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");b("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");b("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");b("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");b("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");b("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");b("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");b("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");b("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");b("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");b("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");b("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");b("\\nleqq","\\html@mathml{\\@nleqq}{≰}");b("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");b("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");b("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");b("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");b("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");b("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");b("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");b("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");b("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");b("\\imath","\\html@mathml{\\@imath}{ı}");b("\\jmath","\\html@mathml{\\@jmath}{ȷ}");b("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");b("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");b("⟦","\\llbracket");b("⟧","\\rrbracket");b("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");b("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");b("⦃","\\lBrace");b("⦄","\\rBrace");b("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");b("⦵","\\minuso");b("\\darr","\\downarrow");b("\\dArr","\\Downarrow");b("\\Darr","\\Downarrow");b("\\lang","\\langle");b("\\rang","\\rangle");b("\\uarr","\\uparrow");b("\\uArr","\\Uparrow");b("\\Uarr","\\Uparrow");b("\\N","\\mathbb{N}");b("\\R","\\mathbb{R}");b("\\Z","\\mathbb{Z}");b("\\alef","\\aleph");b("\\alefsym","\\aleph");b("\\Alpha","\\mathrm{A}");b("\\Beta","\\mathrm{B}");b("\\bull","\\bullet");b("\\Chi","\\mathrm{X}");b("\\clubs","\\clubsuit");b("\\cnums","\\mathbb{C}");b("\\Complex","\\mathbb{C}");b("\\Dagger","\\ddagger");b("\\diamonds","\\diamondsuit");b("\\empty","\\emptyset");b("\\Epsilon","\\mathrm{E}");b("\\Eta","\\mathrm{H}");b("\\exist","\\exists");b("\\harr","\\leftrightarrow");b("\\hArr","\\Leftrightarrow");b("\\Harr","\\Leftrightarrow");b("\\hearts","\\heartsuit");b("\\image","\\Im");b("\\infin","\\infty");b("\\Iota","\\mathrm{I}");b("\\isin","\\in");b("\\Kappa","\\mathrm{K}");b("\\larr","\\leftarrow");b("\\lArr","\\Leftarrow");b("\\Larr","\\Leftarrow");b("\\lrarr","\\leftrightarrow");b("\\lrArr","\\Leftrightarrow");b("\\Lrarr","\\Leftrightarrow");b("\\Mu","\\mathrm{M}");b("\\natnums","\\mathbb{N}");b("\\Nu","\\mathrm{N}");b("\\Omicron","\\mathrm{O}");b("\\plusmn","\\pm");b("\\rarr","\\rightarrow");b("\\rArr","\\Rightarrow");b("\\Rarr","\\Rightarrow");b("\\real","\\Re");b("\\reals","\\mathbb{R}");b("\\Reals","\\mathbb{R}");b("\\Rho","\\mathrm{P}");b("\\sdot","\\cdot");b("\\sect","\\S");b("\\spades","\\spadesuit");b("\\sub","\\subset");b("\\sube","\\subseteq");b("\\supe","\\supseteq");b("\\Tau","\\mathrm{T}");b("\\thetasym","\\vartheta");b("\\weierp","\\wp");b("\\Zeta","\\mathrm{Z}");b("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");b("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");b("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");b("\\bra","\\mathinner{\\langle{#1}|}");b("\\ket","\\mathinner{|{#1}\\rangle}");b("\\braket","\\mathinner{\\langle{#1}\\rangle}");b("\\Bra","\\left\\langle#1\\right|");b("\\Ket","\\left|#1\\right\\rangle");var Od=t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,s=e.consumeArg().tokens,a=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var l=f=>p=>{t&&(p.macros.set("|",a),i.length&&p.macros.set("\\|",o));var g=f;if(!f&&i.length){var v=p.future();v.text==="|"&&(p.popToken(),g=!0)}return{tokens:g?i:n,numArgs:0}};e.macros.set("|",l(!1)),i.length&&e.macros.set("\\|",l(!0));var c=e.consumeArg().tokens,u=e.expandTokens([...s,...c,...r]);return e.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};b("\\bra@ket",Od(!1));b("\\bra@set",Od(!0));b("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");b("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");b("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");b("\\angln","{\\angl n}");b("\\blue","\\textcolor{##6495ed}{#1}");b("\\orange","\\textcolor{##ffa500}{#1}");b("\\pink","\\textcolor{##ff00af}{#1}");b("\\red","\\textcolor{##df0030}{#1}");b("\\green","\\textcolor{##28ae7b}{#1}");b("\\gray","\\textcolor{gray}{#1}");b("\\purple","\\textcolor{##9d38bd}{#1}");b("\\blueA","\\textcolor{##ccfaff}{#1}");b("\\blueB","\\textcolor{##80f6ff}{#1}");b("\\blueC","\\textcolor{##63d9ea}{#1}");b("\\blueD","\\textcolor{##11accd}{#1}");b("\\blueE","\\textcolor{##0c7f99}{#1}");b("\\tealA","\\textcolor{##94fff5}{#1}");b("\\tealB","\\textcolor{##26edd5}{#1}");b("\\tealC","\\textcolor{##01d1c1}{#1}");b("\\tealD","\\textcolor{##01a995}{#1}");b("\\tealE","\\textcolor{##208170}{#1}");b("\\greenA","\\textcolor{##b6ffb0}{#1}");b("\\greenB","\\textcolor{##8af281}{#1}");b("\\greenC","\\textcolor{##74cf70}{#1}");b("\\greenD","\\textcolor{##1fab54}{#1}");b("\\greenE","\\textcolor{##0d923f}{#1}");b("\\goldA","\\textcolor{##ffd0a9}{#1}");b("\\goldB","\\textcolor{##ffbb71}{#1}");b("\\goldC","\\textcolor{##ff9c39}{#1}");b("\\goldD","\\textcolor{##e07d10}{#1}");b("\\goldE","\\textcolor{##a75a05}{#1}");b("\\redA","\\textcolor{##fca9a9}{#1}");b("\\redB","\\textcolor{##ff8482}{#1}");b("\\redC","\\textcolor{##f9685d}{#1}");b("\\redD","\\textcolor{##e84d39}{#1}");b("\\redE","\\textcolor{##bc2612}{#1}");b("\\maroonA","\\textcolor{##ffbde0}{#1}");b("\\maroonB","\\textcolor{##ff92c6}{#1}");b("\\maroonC","\\textcolor{##ed5fa6}{#1}");b("\\maroonD","\\textcolor{##ca337c}{#1}");b("\\maroonE","\\textcolor{##9e034e}{#1}");b("\\purpleA","\\textcolor{##ddd7ff}{#1}");b("\\purpleB","\\textcolor{##c6b9fc}{#1}");b("\\purpleC","\\textcolor{##aa87ff}{#1}");b("\\purpleD","\\textcolor{##7854ab}{#1}");b("\\purpleE","\\textcolor{##543b78}{#1}");b("\\mintA","\\textcolor{##f5f9e8}{#1}");b("\\mintB","\\textcolor{##edf2df}{#1}");b("\\mintC","\\textcolor{##e0e5cc}{#1}");b("\\grayA","\\textcolor{##f6f7f7}{#1}");b("\\grayB","\\textcolor{##f0f1f2}{#1}");b("\\grayC","\\textcolor{##e3e5e6}{#1}");b("\\grayD","\\textcolor{##d6d8da}{#1}");b("\\grayE","\\textcolor{##babec2}{#1}");b("\\grayF","\\textcolor{##888d93}{#1}");b("\\grayG","\\textcolor{##626569}{#1}");b("\\grayH","\\textcolor{##3b3e40}{#1}");b("\\grayI","\\textcolor{##21242c}{#1}");b("\\kaBlue","\\textcolor{##314453}{#1}");b("\\kaGreen","\\textcolor{##71B307}{#1}");var _d={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Z5{constructor(e,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(e),this.macros=new X5(J5,r.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Ac(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var r,n,i;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new Yt("EOF",n.loc)),this.pushTokens(i),r.range(n,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var r=[],n=e&&e.length>0;n||this.consumeSpaces();var i=this.future(),s,a=0,o=0;do{if(s=this.popToken(),r.push(s),s.text==="{")++a;else if(s.text==="}"){if(--a,a===-1)throw new re("Extra }",s)}else if(s.text==="EOF")throw new re("Unexpected end of input in a macro argument, expected '"+(e&&n?e[o]:"}")+"'",s);if(e&&n)if((a===0||a===1&&e[o]==="{")&&s.text===e[o]){if(++o,o===e.length){r.splice(-o,o);break}}else o=0}while(a!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:s}}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new re("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;ithis.settings.maxExpand)throw new re("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||e&&i.unexpandable){if(e&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new re("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var s=i.tokens,a=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){s=s.slice();for(var o=s.length-1;o>=0;--o){var l=s[o];if(l.text==="#"){if(o===0)throw new re("Incomplete placeholder at end of macro body",l);if(l=s[--o],l.text==="#")s.splice(o+1,1);else if(/^[1-9]$/.test(l.text))s.splice(o,2,...a[+l.text-1]);else throw new re("Not a valid argument number",l)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Yt(e)]):void 0}expandTokens(e){var r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(e){var r=this.expandMacro(e);return r&&r.map(n=>n.text).join("")}_getExpansion(e){var r=this.macros.get(e);if(r==null)return r;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var s=0;if(i.indexOf("#")!==-1)for(var a=i.replace(/##/g,"");a.indexOf("#"+(s+1))!==-1;)++s;for(var o=new Ac(i,this.settings),l=[],c=o.lex();c.text!=="EOF";)l.push(c),c=o.lex();l.reverse();var u={tokens:l,numArgs:s};return u}return i}isDefined(e){return this.macros.has(e)||Wr.hasOwnProperty(e)||Qe.math.hasOwnProperty(e)||Qe.text.hasOwnProperty(e)||_d.hasOwnProperty(e)}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Wr.hasOwnProperty(e)&&!Wr[e].primitive}}var Nc=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Y0=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Ps={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Dc={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class os{constructor(e,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Z5(e,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(e,r){if(r===void 0&&(r=!0),this.fetch().text!==e)throw new re("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var r=this.nextToken;this.consume(),this.gullet.pushToken(new Yt("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(e,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(os.endOfExpression.indexOf(i.text)!==-1||r&&i.text===r||e&&Wr[i.text]&&Wr[i.text].infix)break;var s=this.parseAtom(r);if(s){if(s.type==="internal")continue}else break;n.push(s)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var r=-1,n,i=0;i=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var o=Qe[this.mode][r].group,l=Bt.range(e),c;if(P6.hasOwnProperty(o)){var u=o;c={type:"atom",mode:this.mode,family:u,loc:l,text:r}}else c={type:o,mode:this.mode,loc:l,text:r};a=c}else if(r.charCodeAt(0)>=128)this.settings.strict&&(j1(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),a={type:"textord",mode:"text",loc:Bt.range(e),text:r};else return null;if(this.consume(),s)for(var f=0;f|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var r=t.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};const i7=new $e.Renderer;$e.setOptions({breaks:!1,gfm:!0,tables:!0,sanitize:!1,renderer:i7});const y0=t=>{if(!t||typeof t!="string")return"";try{const e=s7(t),r=$e.parse(e);return a7(r)}catch(e){return console.error("Markdown渲染失败:",e),`
    渲染失败: ${e.message}
    `}},s7=t=>t.replace(/\$\$([\s\S]*?)\$\$/g,(e,r)=>{try{return`
    ${Ic.renderToString(r.trim(),{displayMode:!0,throwOnError:!1})}
    `}catch(n){return console.warn("数学公式渲染失败:",n),`
    数学公式错误: ${r}
    `}}).replace(/\$([^$\n]+?)\$/g,(e,r)=>{if(r.includes("\\")||r.includes("{")||r.includes("}")||r.includes("^")||r.includes("_")||r.includes("=")||r.includes("+")||r.includes("-")||r.includes("*")||r.includes("/")||r.includes("(")||r.includes(")"))try{return`${Ic.renderToString(r.trim(),{displayMode:!1,throwOnError:!1})}`}catch(n){return console.warn("数学公式渲染失败:",n),`数学公式错误: ${r}`}return e}),a7=t=>{let e=t.replace(//g,'
    ').replace(/
    {const s=i.className.match(/language-(\w+)/);if(s)try{i.innerHTML=Xl.highlight(i.textContent,Xl.languages[s[1]],s[1])}catch(a){console.warn("语法高亮失败:",a)}}),r.innerHTML},o7=t=>{if(!t||typeof t!="string")return!1;const e=t.split(`
    -`);let r=!1,n=!1;for(const a of e){const o=a.trim();o.includes("|")&&o.split("|").length>=3&&(r=!0),o.includes("|")&&o.includes("-")&&/^[\s\|\-\:]+$/.test(o)&&(n=!0)}const i=(t.match(/\|/g)||[]).length,s=i>=6;return r&&n||r&&s||r&&i>=4},l7=t=>!t||typeof t!="string"?!1:o7(t)?!0:[/#{1,6}\s+/,/\*\*.*?\*\*/,/\*.*?\*/,/`.*?`/,/```[\s\S]*?```/,/^\s*[-*+]\s+/m,/^\s*\d+\.\s+/m,/\[.*?\]\(.*?\)/,/!\[.*?\]\(.*?\)/,/\$\$.*?\$\$/,/\$.*?\$/].some(r=>r.test(t)),X0=t=>!t||typeof t!="string"?t||"":l7(t)||t.includes("|")?y0(t):t;const Lo=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r},c7={class:"mindmap-container"},u7={key:0,class:"welcome-page"},d7={class:"ai-input-content"},h7=["disabled","onKeydown"],f7={class:"ai-input-actions"},p7=["disabled"],m7=["disabled"],g7={key:0},v7={key:1},b7={key:3,class:"save-controls"},y7={__name:"MindMap",setup(t,{expose:e}){const r={name:"Light Purple",type:"light",palette:["#660874","#660874","#660874","#660874","#660874","#660874","#660874","#660874","#660874","#660874"],cssVar:{"--node-gap-x":"30px","--node-gap-y":"10px","--main-gap-x":"65px","--main-gap-y":"45px","--root-radius":"30px","--main-radius":"20px","--root-color":"#ffffff","--root-bgcolor":"#660874","--root-border-color":"rgba(0, 0, 0, 0)","--main-color":"#444446","--main-bgcolor":"#ffffff","--topic-padding":"3px","--color":"#777777","--bgcolor":"#f6f6f6","--selected":"#660874","--accent-color":"#660874","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea","--map-padding":"50px"}},n=Oe(null),i=Oe(null),s=Oe(null),a=Oe({}),o=Oe({}),l=Oe(null),c=Oe(1),u=Oe(!0),f=Oe(!1),p=Oe(!1),g=Oe(null),v=Oe(""),w=Oe(!1);Oe(new Map),Oe(!1),Oe({x:0,y:0}),Oe(null);const y=()=>{u.value=!0,n.value&&(n.value.innerHTML=""),i.value&&(i.value=null)},C=()=>{u.value=!1},S=()=>{u.value=!1},T=()=>{if(!i.value||!n.value)return null;try{const x=n.value.querySelector(".map-canvas");if(x){const M=x.style.transform,O=i.value.scaleVal||1;return console.log("📍 保存位置:",{transform:M,scaleVal:O}),{transform:M,scaleVal:O}}}catch(x){console.warn("保存位置失败:",x)}return null},D=x=>{if(!(!x||!n.value||!i.value))try{const M=n.value.querySelector(".map-canvas");M&&x.transform&&(M.style.setProperty("transform",x.transform,"important"),x.scaleVal&&i.value.scaleVal!==x.scaleVal&&(i.value.scaleVal=x.scaleVal),M.style.setProperty("transform-origin","center center","important"),console.log("📍 恢复位置:",{transform:x.transform,scaleVal:x.scaleVal}))}catch(M){console.warn("恢复位置失败:",M)}},I=async(x,M=!1,O=!0)=>{try{const q=M?T():null;q?console.log("📍 保存当前位置用于保持原位:",q):!M&&!O&&console.log("📍 添加节点模式:不保存位置,等待居中到新节点"),console.log("🔍 loadMindmapData 被调用,数据:",x),console.log("🔍 数据字段:",Object.keys(x||{})),x&&x.id?(l.value=x.id,console.log("🔍 设置当前思维导图ID (data.id):",x.id)):x&&x.mindmapId?(l.value=x.mindmapId,console.log("🔍 设置当前思维导图ID (data.mindmapId):",x.mindmapId)):x&&x.nodeData&&x.nodeData.mindmapId?(l.value=x.nodeData.mindmapId,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmapId):",x.nodeData.mindmapId)):x&&x.nodeData&&x.nodeData.mindmap_id?(l.value=x.nodeData.mindmap_id,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmap_id):",x.nodeData.mindmap_id)):(console.warn("⚠️ 数据中没有找到 id 或 mindmapId 字段"),console.log("🔍 可用的字段:",Object.keys(x||{})),x&&x.nodeData&&console.log("🔍 nodeData字段:",Object.keys(x.nodeData||{}))),console.log("🔍 设置后的 currentMindmapId.value:",l.value),C(),await An(),n.value||(console.warn("⚠️ 思维导图容器未准备好,等待DOM更新..."),await new Promise(Z=>setTimeout(Z,100)),n.value||console.warn("⚠️ 思维导图容器仍未准备好,尝试继续执行..."));try{if(n.value){console.log("🔍 创建Mind Elixir实例,设置markdown函数"),i.value=new bt({el:n.value,direction:bt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,theme:r,markdown:(L,oe)=>L.includes("|")||L.includes("**")||L.includes("`")||L.includes("#")||L.includes("![")?X0(L):L,imageProxy:L=>L.startsWith("http://")||L.startsWith("https://")?L:L.startsWith("/")?window.location.origin+L:window.location.origin+"/"+L}),console.log("✅ Mind Elixir实例创建完成,markdown函数已设置"),console.log("🔍 初始化Mind Elixir数据:",x);const Z=i.value.init(x);console.log("✅ Mind Elixir实例创建成功,初始化结果:",Z),q?(D(q),console.log("📍 初始化后立即恢复位置")):!M&&!O&&console.log("📍 跳过根节点居中,等待居中新节点"),(async()=>{try{await An(),await document.fonts.ready,await new Promise(L=>requestAnimationFrame(L)),i.value&&i.value.refresh&&(console.log("🔄 执行完整DOM稳定后的延迟刷新"),i.value.refresh(),!q&&(M||O)&&i.value.toCenter())}catch(L){console.warn("⚠️ 延迟刷新过程中出现错误:",L),setTimeout(()=>{i.value&&i.value.refresh&&i.value.refresh()},200)}})()}else{console.warn("⚠️ 容器未准备好,延迟创建Mind Elixir实例..."),setTimeout(()=>{if(n.value){i.value=new bt({el:n.value,direction:bt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,theme:r,markdown:(L,oe)=>L.includes("|")||L.includes("**")||L.includes("`")||L.includes("#")||L.includes("![")?X0(L):L});const Z=i.value.init(x);console.log("✅ Mind Elixir实例延迟创建成功"),q?(D(q),console.log("📍 延迟创建后立即恢复位置"),setTimeout(()=>{D(q),console.log("📍 延迟创建后二次确认位置恢复")},100)):!M&&!O&&console.log("📍 延迟创建后跳过根节点居中,等待居中新节点"),(async()=>{try{await An(),await document.fonts.ready,await new Promise(L=>requestAnimationFrame(L)),i.value&&i.value.refresh&&(console.log("🔄 延迟创建实例执行完整DOM稳定后的延迟刷新"),i.value.refresh(),!q&&(M||O)&&i.value.toCenter())}catch(L){console.warn("⚠️ 延迟创建实例的延迟刷新过程中出现错误:",L),setTimeout(()=>{i.value&&i.value.refresh&&i.value.refresh()},250)}})(),setTimeout(()=>{q?D(q):O&&F(),ee(),_()},300)}},200);return}}catch{setTimeout(()=>{try{if(n.value){i.value=new bt({el:n.value,direction:bt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,theme:r,markdown:(L,oe)=>L.includes("|")||L.includes("**")||L.includes("`")||L.includes("#")||L.includes("![")?X0(L):L});const le=i.value.init(x);q?(D(q),console.log("📍 重试创建后立即恢复位置"),setTimeout(()=>{D(q),console.log("📍 重试创建后二次确认位置恢复")},100)):!M&&!O&&console.log("📍 重试创建后跳过根节点居中,等待居中新节点"),setTimeout(()=>{q?D(q):O&&F(),ee(),_()},300)}}catch(le){console.error("❌ Mind Elixir实例重试创建失败:",le)}},500);return}setTimeout(()=>{M&&q?D(q):O&&F(),C(),ee(),setTimeout(()=>{_()},500)},100)}catch{}},_=()=>{i.value&&n.value&&setTimeout(()=>{n.value.querySelectorAll("me-tpc, .topic, [data-id]").forEach((M,O)=>{var L;const q=M.getAttribute("data-id")||M.id||M.getAttribute("nodeid")||((L=M.querySelector("[data-id]"))==null?void 0:L.getAttribute("data-id"));if(!q)return;const Z=(oe,ge)=>{for(const Se of oe){if(Se.id===ge)return Se;if(Se.children){const Re=Z(Se.children,ge);if(Re)return Re}}return null},le=Z(i.value.data.nodeData,q);if(le&&le.data&&le.data.des){let oe=M.querySelector(".node-description");oe||(oe=document.createElement("div"),oe.className="node-description",oe.style.cssText=`
    -            font-size: 11px;
    -            color: #666;
    -            margin-top: 6px;
    -            padding: 6px 8px;
    -            background: rgba(0, 0, 0, 0.03);
    -            border-radius: 4px;
    -            max-width: 250px;
    -            word-wrap: break-word;
    -            line-height: 1.3;
    -            border-left: 3px solid #e0e0e0;
    -            display: block;
    -          `,M.appendChild(oe));const ge=le.data.des;ge.length>150?(oe.textContent=ge.substring(0,150)+"...",oe.title=ge):oe.textContent=ge}})},1e3)},F=()=>{try{if(i.value&&i.value.toCenter){i.value.toCenter(),console.log("✅ 使用 MindElixir toCenter 方法实现根节点居中");return}const x=n.value;if(!x)return;const M=x.querySelector(".map-canvas");if(!M)return;const O=M.querySelectorAll("me-tpc");if(O.length===0)return;let q=1/0,Z=-1/0,le=1/0,L=-1/0;O.forEach(D0=>{const wn=D0.getBoundingClientRect(),I0=x.getBoundingClientRect(),zo=wn.left-I0.left,$o=wn.top-I0.top;q=Math.min(q,zo),Z=Math.max(Z,zo+wn.width),le=Math.min(le,$o),L=Math.max(L,$o+wn.height)});const oe=(q+Z)/2,ge=(le+L)/2,Se=x.clientWidth/2,Re=x.clientHeight/2,Ve=Se-oe,vt=Re-ge;M.style.transform=`translate(${Ve}px, ${vt}px)`,M.style.opacity="1",M.style.transition="opacity 0.3s ease";const Ot=100,Zt=Math.max(Ve,Ot),wr=Math.max(vt,Ot);M.style.transform=`translate(${Zt}px, ${wr}px)`,M.style.opacity="1",M.style.visibility="visible"}catch{}},G=async x=>{if(!(!i.value||!x))try{console.log("🎯 开始处理新节点:",x);let M=null,O=0;const q=5;for(;!M&&OsetTimeout(Z,50)));M?(console.log("✅ 找到节点元素:",M),i.value.scrollIntoView&&(i.value.scrollIntoView(M),console.log("✅ 节点已平滑居中显示")),setTimeout(()=>{i.value.beginEdit&&(i.value.beginEdit(M),console.log("✅ 节点已进入编辑状态"))},350)):console.error("❌ 多次尝试后仍未找到节点元素:",x)}catch(M){console.error("❌ 居中显示节点失败:",M)}},W=()=>{if(!s.value)return;if(i.value&&i.value.getNodeById)try{const M=i.value.getNodeById(s.value.id);if(M){const O=M.getBoundingClientRect(),q=n.value.getBoundingClientRect(),Z=O.left-q.left+O.width/2,le=O.bottom-q.top+10;a.value={left:`${Z}px`,top:`${le}px`};return}}catch{}let x=document.querySelector(`[data-id="${s.value.id}"]`);if(x||(x=document.querySelector(`.topic[data-id="${s.value.id}"]`)),x||(x=document.querySelector(`[data-node-id="${s.value.id}"]`)),x||(x=document.querySelector(`[data-nodeid="me${s.value.id}"]`)),!x){const M=document.querySelectorAll("me-tpc");for(const O of M)if(O.getAttribute("data-nodeid")===`me${s.value.id}`){x=O;break}}if(!x){const M=document.querySelectorAll(".topic");for(const O of M)if(O.textContent.trim()===s.value.topic){x=O;break}}if(x){const M=x.getBoundingClientRect(),O=n.value.getBoundingClientRect(),q=M.left-O.left+M.width/2,Z=M.bottom-O.top+10;a.value={left:`${q}px`,top:`${Z}px`}}else a.value={left:"50%",top:"50%",transform:"translate(-50%, -50%)"}},fe=async()=>{s.value&&(await ie(s.value),s.value=null)},ve=async()=>{s.value&&(await ye(s.value),s.value=null)},Te=async()=>{s.value&&(await k(s.value),s.value=null)},Xe=async()=>{if(!s.value)return;console.log("Ask AI for node:",s.value);const x=parseFloat(a.value.left)||0,M=parseFloat(a.value.top)||0;o.value={left:`${x}px`,top:`${M+60}px`,transform:"translateX(-50%)"},p.value=!0,g.value=s.value},ze=()=>{p.value=!1,g.value=null,v.value="",w.value=!1,s.value=null},rt=x=>{if(!x)return"";const M=[];return x.parent&&x.parent.topic&&M.push(`父节点: ${x.parent.topic}`),x.parent&&x.parent.parent&&x.parent.parent.topic&&M.push(`祖父节点: ${x.parent.parent.topic}`),M.join(" | ")},_e=x=>{x.ctrlKey||x.metaKey||(x.preventDefault(),Ae())},Ae=async()=>{if(!(!v.value.trim()||!g.value||w.value)){w.value=!0;try{const x="你是一个专业的思维导图分析助手。请根据用户的问题和提供的节点信息,给出专业、有用的回答。",M=`节点信息:
    -当前节点:${g.value.topic}
    -上下文:${rt(g.value)}
    -
    -用户问题:${v.value}
    -
    -请给出详细的回答,回答应该:
    -1. 直接回答用户的问题
    -2. 提供具体的建议或改进方案
    -3. 保持专业和有用的语调
    -4. 回答长度适中,便于在思维导图中展示`;console.log("发送AI请求:",{systemPrompt:x,userPrompt:M});const O=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:x,user_prompt:M,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!O.ok)throw new Error(`HTTP error! status: ${O.status}`);let q="";const Z=O.body.getReader(),le=new TextDecoder;let L="";for(;;){const{done:oe,value:ge}=await Z.read();if(oe)break;L+=le.decode(ge,{stream:!0});const Se=L.split(`
    -`);L=Se.pop()||"";for(const Re of Se)if(Re.startsWith("data: "))try{const Ve=JSON.parse(Re.slice(6));if(Ve.type==="chunk")q+=Ve.content;else if(Ve.type==="error")throw new Error(Ve.content)}catch(Ve){console.warn("解析流式数据失败:",Ve)}}await Je(g.value,v.value,q),ze()}catch(x){console.error("AI请求失败:",x),alert("AI请求失败,请稍后重试")}finally{w.value=!1}}},pe=x=>x.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(M,O)=>{if(O.includes(":")){const q=O.split(":");if(q.length>1)return`【${q[0]}】: ${q.slice(1).join(":")}`}return`【${O}】`}).replace(/\*(.*?)\*/g,"《$1》").replace(/^- (.*$)/gim,"  • $1").replace(/^\d+\. (.*$)/gim,"  $&").replace(/```(.*?)```/gims,"💻 $1").replace(/`(.*?)`/g,"「$1」").replace(/\[([^\]]+)\]\([^)]+\)/g,"🔗 $1").replace(/\n\n/g,`
    -`).replace(/\n/g,`
    -  `),He=(x,M,O)=>{const q=x.split(`
    -`);let Z=O,le=[];for(let L=0;L0){const Zt=pe(vt.join(`
    -`));Ve.topic=Ve.topic+`
    -
    -`+Zt}M.children.push(Ve),L=Ot-1}else ge&&le.push(ge)}if(le.length>0){const L=le.join(`
    -`).trim();L&&L.split(`
    -
    -`).filter(ge=>ge.trim()).forEach(ge=>{const Se=pe(ge.trim());if(Se){const Re={id:`node_${Z++}`,topic:Se,children:[],level:(M.level||0)+1,data:{}};M.children.push(Re)}})}return{nodeCounter:Z}},qe=x=>{const M=x.split(`
    -`);let O=null;const q=[];let Z=0,le=[];if(M.forEach((L,oe)=>{const ge=L.trim(),Se=ge.match(/^(#{1,6})\s+(.+)$/);if(Se){if(le.length>0&&q.length>0){const Zt=le.join(`
    -`).trim();Zt&&(Z=He(Zt,q[q.length-1],Z).nodeCounter),le=[]}const Re=Se[1].length,Ve=Se[2].trim(),vt=pe(Ve),Ot={id:`node_${Z++}`,topic:vt,children:[],level:Re,data:{}};if(Re===1&&!O)O=Ot,q.length=0,q.push(O);else{for(;q.length>1&&q[q.length-1].level>=Re;)q.pop();q.length>0&&q[q.length-1].children.push(Ot),q.push(Ot)}}else ge&&le.push(ge)}),le.length>0&&q.length>0){const L=le.join(`
    -`).trim();L&&(Z=He(L,q[q.length-1],Z).nodeCounter)}return O||(O={id:"root",topic:"根节点",children:[],data:{}}),O},Je=async(x,M,O)=>{var q,Z,le;try{const oe=(wr=>wr.replace(/^#+\s*/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/^\s*[-*+]\s*(?![|])/gm,"• ").replace(/\n{3,}/g,`
    -
    -`).trim())(O),ge=`# ${M}
    -
    -${oe}`,Se=qe(ge),Re={title:M,des:`AI追问产生的节点 - ${new Date().toLocaleString()}`,parentId:x.id,isRoot:!1},Ve=[];if(Se.children&&Se.children.length>0&&Se.children.forEach(wr=>{Ve.push({title:wr.topic,des:"",parentId:null,isRoot:!1})}),console.log("当前思维导图ID:",l.value),!l.value)throw new Error("没有找到当前思维导图ID,无法创建节点");const vt=await ct.addNodes(l.value,[Re]);if(!vt.data||!vt.data.success)throw new Error("AI父节点创建失败");const Ot=(le=(Z=(q=vt.data.data)==null?void 0:q.nodes)==null?void 0:Z[0])==null?void 0:le.id;if(!Ot)throw new Error("无法获取创建的父节点ID");Ve.forEach(wr=>{wr.parentId=Ot});let Zt=null;if(Ve.length>0&&(Zt=await ct.addNodes(l.value,Ve)),vt.data&&vt.data.success)await ae();else throw new Error("AI父节点创建失败")}catch(L){console.error("创建AI节点失败:",L),alert("创建AI回答节点失败: "+L.message)}},me=async()=>{if(s.value){try{const x=s.value.topic||s.value.title||"无标题";if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(x),Et();else{const M=document.createElement("textarea");M.value=x,M.style.position="fixed",M.style.left="-999999px",M.style.top="-999999px",document.body.appendChild(M),M.focus(),M.select();const O=document.execCommand("copy");document.body.removeChild(M),O?Et():ot()}}catch{ot()}s.value=null}},Et=()=>{const x=document.createElement("div");x.textContent="文本已复制到剪贴板",x.style.cssText=`
    -    position: fixed;
    -    top: 20px;
    -    right: 20px;
    -    background: #4CAF50;
    -    color: white;
    -    padding: 12px 20px;
    -    border-radius: 6px;
    -    font-size: 14px;
    -    z-index: 10000;
    -    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    -    animation: slideIn 0.3s ease;
    -  `;const M=document.createElement("style");M.textContent=`
    -    @keyframes slideIn {
    -      from { transform: translateX(100%); opacity: 0; }
    -      to { transform: translateX(0); opacity: 1; }
    -    }
    -  `,document.head.appendChild(M),document.body.appendChild(x),setTimeout(()=>{x.parentNode&&x.parentNode.removeChild(x),M.parentNode&&M.parentNode.removeChild(M)},3e3)},ot=()=>{const x=document.createElement("div");x.textContent="复制失败,请手动复制",x.style.cssText=`
    -    position: fixed;
    -    top: 20px;
    -    right: 20px;
    -    background: #f44336;
    -    color: white;
    -    padding: 12px 20px;
    -    border-radius: 6px;
    -    font-size: 14px;
    -    z-index: 10000;
    -    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    -    animation: slideIn 0.3s ease;
    -  `,document.body.appendChild(x),setTimeout(()=>{x.parentNode&&x.parentNode.removeChild(x)},3e3)},gt=(x,M="success")=>{const O=document.createElement("div");O.textContent=x;const q=M==="success"?"#4CAF50":M==="error"?"#f44336":"#ff9800";O.style.cssText=`
    -    position: fixed;
    -    top: 20px;
    -    right: 20px;
    -    background: ${q};
    -    color: white;
    -    padding: 12px 20px;
    -    border-radius: 6px;
    -    font-size: 14px;
    -    z-index: 10000;
    -    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    -    animation: slideIn 0.3s ease;
    -  `,document.body.appendChild(O),setTimeout(()=>{O.parentNode&&O.parentNode.removeChild(O)},2e3)},yt=()=>{const x=document.createElement("div");x.textContent="✅ 节点编辑已保存",x.style.cssText=`
    -    position: fixed;
    -    top: 20px;
    -    right: 20px;
    -    background: #4CAF50;
    -    color: white;
    -    padding: 12px 20px;
    -    border-radius: 6px;
    -    font-size: 14px;
    -    z-index: 10000;
    -    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    -    animation: slideIn 0.3s ease;
    -  `,document.body.appendChild(x),setTimeout(()=>{x.parentNode&&x.parentNode.removeChild(x)},2e3)},lt=()=>{const x=document.createElement("div");x.textContent="❌ 节点编辑保存失败",x.style.cssText=`
    -    position: fixed;
    -    top: 20px;
    -    right: 20px;
    -    background: #f44336;
    -    color: white;
    -    padding: 12px 20px;
    -    border-radius: 6px;
    -    font-size: 14px;
    -    z-index: 10000;
    -    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    -    animation: slideIn 0.3s ease;
    -  `,document.body.appendChild(x),setTimeout(()=>{x.parentNode&&x.parentNode.removeChild(x)},3e3)},U=async x=>{try{console.log("🎯 处理节点拖拽操作:",x.name),console.log("📦 操作详情:",{name:x.name,objs:x.objs,toObj:x.toObj}),setTimeout(async()=>{var M;try{const O=x.objs||[],q=x.toObj;if(!O.length||!q){console.warn("⚠️ 拖拽操作缺少必要信息");return}console.log(`📦 准备保存 ${O.length} 个节点的父子关系`);let Z=null;x.name==="moveNodeIn"?(Z=q.id,console.log(`📌 拖入操作:新父节点为 ${Z}`)):(x.name==="moveNodeBefore"||x.name==="moveNodeAfter")&&(Z=((M=q.parent)==null?void 0:M.id)||null,console.log(`📌 拖到兄弟位置:新父节点为 ${Z||"根节点"}`));const le=O.map(async Se=>{try{console.log(`🔄 更新节点 ${Se.id} 的父节点为 ${Z||"根节点"}`);const Re=await ct.updateNode(Se.id,{newParentId:Z});return Re.data&&Re.data.success?(console.log(`✅ 节点 ${Se.id} 父子关系更新成功`),{success:!0,nodeId:Se.id}):(console.warn(`⚠️ 节点 ${Se.id} 父子关系更新失败:`,Re),{success:!1,nodeId:Se.id})}catch(Re){return console.error(`❌ 节点 ${Se.id} 父子关系更新失败:`,Re),{success:!1,nodeId:Se.id,error:Re}}}),L=await Promise.all(le),oe=L.filter(Se=>Se.success).length,ge=L.filter(Se=>!Se.success).length;console.log(`📊 拖拽保存结果: ${oe} 成功, ${ge} 失败`)}catch(O){console.error("❌ 保存拖拽后的结构失败:",O),gt("❌ 节点拖拽保存失败","error")}},500)}catch(M){console.error("❌ 处理节点拖拽操作失败:",M)}},V=async x=>{try{const M=x.obj;M?await Q(M):console.error("无法解析编辑操作:",x)}catch(M){console.error("处理编辑完成失败:",M)}},Q=async x=>{var M,O;try{if(!l.value){console.error("无法获取思维导图ID");return}const q=await ct.updateNode(x.id,{newTitle:x.topic,newDes:((M=x.data)==null?void 0:M.des)||"",newParentId:x.parentId||((O=x.parent)==null?void 0:O.id)});q.data&&q.data.success?yt():(console.error("更新节点编辑失败:",q.data),lt())}catch(q){console.error("更新节点编辑失败:",q),lt()}},ie=async x=>{var M;try{await N();const O=l.value||x.mindmap_id||x.mindmapId;if(!O){console.error("无法获取思维导图ID");return}const q=await ct.addNodes(O,[{title:"新子节点",des:"子节点描述",parentId:x.id}]);if(q.data&&q.data.success){const Z=((M=q.data.data)==null?void 0:M.nodes)||[];if(Z.length>0){const le=Z[0];try{await new Promise(oe=>setTimeout(oe,800));const L=await ct.getMindmap(O);if(L.data&&L.data.nodeData){await I(L.data,!1,!1);try{console.log("🎯 开始居中显示新子节点:",le.id),await G(le.id)}catch(oe){console.error("居中显示新节点失败:",oe)}}else throw new Error("无法获取思维导图数据")}catch(L){console.error("刷新思维导图失败:",L)}}}}catch(O){console.error("添加子节点失败:",O)}},ye=async x=>{var M;try{await N(),console.log("添加兄弟节点到API:",x.id),console.log("节点信息:",{id:x.id,parentId:x.parentId,parent:x.parent,mindmap_id:x.mindmap_id,mindmapId:x.mindmapId});const O=l.value||x.mindmap_id||x.mindmapId;if(!O){console.error("无法获取思维导图ID");return}let q=x.parentId;!q&&x.parent&&(q=x.parent.id);const Z=await ct.addNodes(O,[{title:"新兄弟节点",des:"兄弟节点描述",parentId:q}]);if(console.log("添加兄弟节点响应:",Z),Z.data&&Z.data.success){const le=((M=Z.data.data)==null?void 0:M.nodes)||[];if(le.length>0){const L=le[0];console.log("新创建的兄弟节点:",L),console.log("🎯 使用MindElixir init方法重新初始化数据...");try{const oe=await ct.getMindmap(O);if(oe.data&&oe.data.nodeData){await I(oe.data,!1,!1),console.log("✅ 思维导图刷新成功");try{console.log("🎯 开始居中显示新兄弟节点:",L.id),await G(L.id)}catch(ge){console.error("居中显示新节点失败:",ge)}}else throw new Error("无法获取思维导图数据")}catch(oe){console.error("重新初始化失败,使用完整重新加载:",oe);const ge=await ct.getMindmap(O);ge.data&&ge.data.nodeData&&await I(ge.data,!0,!1)}}}}catch(O){console.error("添加兄弟节点失败:",O)}},k=async x=>{try{await N(),console.log("删除节点从API:",x.id);const M=await ct.deleteNodes([x.id]);if(console.log("删除节点响应:",M),M.data&&M.data.success){const O=l.value||x.mindmap_id||x.mindmapId;if(O){const q=await ct.getMindmap(O);q.data&&q.data.nodeData&&(await I(q.data,!0,!1),console.log("✅ 删除节点后思维导图已刷新,保持当前位置"))}}}catch(M){console.error("删除节点失败:",M)}},N=async()=>{const x=n.value;if(x){const M=x.querySelector("input:focus");if(M&&s.value){const O=M.value;O!==s.value.topic&&O.trim()!==""&&(console.log("保存当前编辑:",O),s.value.topic=O,await z(s.value))}}},z=async x=>{var M,O,q,Z,le;try{console.log("保存Mind Elixir编辑,节点ID:",x.id),console.log("编辑内容:",{newTitle:x.topic,newDes:((M=x.data)==null?void 0:M.des)||""});const L=String(x.id),oe=await ct.updateNode(L,{newTitle:x.topic,newDes:((O=x.data)==null?void 0:O.des)||""});console.log("更新节点API响应:",oe),console.log("节点编辑已保存到后端"),console.log("✅ 节点编辑已保存,无需重新加载")}catch(L){console.error("保存Mind Elixir编辑失败:",L),console.error("错误详情:",(q=L.response)==null?void 0:q.data),alert("保存编辑失败: "+(((le=(Z=L.response)==null?void 0:Z.data)==null?void 0:le.detail)||L.message))}},j=x=>{console.log("打开编辑模态框:",x),i.value.editText(x)},B=async(x,M,O)=>{var q,Z,le;try{console.log("开始创建节点:",x.topic,"父节点ID:",O);const L={title:x.topic||x.title||"无标题",des:((q=x.data)==null?void 0:q.des)||"",parentId:O};x.dangerouslySetInnerHTML&&(L.dangerouslySetInnerHTML=x.dangerouslySetInnerHTML);const oe=await ct.addNodes(M,L);if(console.log("创建节点响应:",oe),oe.data&&oe.data.success){const Se=(le=(((Z=oe.data.data)==null?void 0:Z.nodes)||[])[0])==null?void 0:le.id;if(console.log("当前节点ID:",Se),x.children&&x.children.length>0){console.log("开始创建子节点,数量:",x.children.length);for(const Re of x.children)await B(Re,M,Se)}else console.log("节点没有子节点,创建完成")}else console.error("创建节点失败,响应:",oe)}catch(L){console.error("创建节点失败:",L)}};let H=null,X=null;const ee=()=>{if(!i.value)return;console.log("绑定事件监听器..."),H&&n.value.removeEventListener("wheel",H),X&&n.value.removeEventListener("click",X),H=O=>{if(O.ctrlKey||O.metaKey){O.preventDefault();const q=O.deltaY>0?.9:1.1,Z=Math.max(.3,Math.min(3,c.value*q));if(i.value){const le=n.value.querySelector(".map-container");le&&(le.style.transform=`scale(${Z})`,c.value=Z,localStorage.setItem("mindmap-zoom-level",Z.toString()))}}},n.value.addEventListener("wheel",H),i.value.bus.addListener("select",O=>{s.value=O,setTimeout(()=>{W()},50)}),i.value.bus.addListener("selectNode",O=>{s.value=O,setTimeout(()=>{W()},50)}),i.value.bus.addListener("scale",O=>{Math.abs(O-1)<.01&&Math.abs(c.value-1)>.01&&setTimeout(()=>{ne()},50)}),window.zoomIntervalId&&clearInterval(window.zoomIntervalId);const x=setInterval(()=>{c.value!==1&&n.value&&K()},500);window.zoomIntervalId=x;let M=0;X=O=>{const q=Date.now();if(q-M<100)return;M=q;const Z=O.target,le=Z.closest("me-tpc")||Z.closest(".topic")||(Z.classList.contains("topic")?Z:null)||(Z.tagName==="ME-TPC"?Z:null);if(le){const L=le.nodeObj;if(L){s.value=L;const oe=n.value.getBoundingClientRect(),ge=le.getBoundingClientRect(),Se=ge.left-oe.left+ge.width/2,Re=ge.bottom-oe.top+8;a.value={left:`${Se}px`,top:`${Re}px`}}}else s.value=null,p.value&&(p.value=!1,g.value=null,v.value="",w.value=!1)},n.value.addEventListener("click",X),i.value.bus.addListener("edit",O=>{console.log("edit事件触发:",O),j(O)}),i.value.bus.addListener("editFinish",O=>{console.log("editFinish事件触发:",O),V(O)}),i.value.bus.addListener("operation",O=>{console.log("Mind Elixir操作事件:",O),O.name==="moveNodeIn"||O.name==="moveNodeBefore"||O.name==="moveNodeAfter"?(console.log("检测到节点拖拽操作:",O.name,O),U(O)):O.name==="finishEdit"&&(console.log("检测到编辑完成操作:",O),V(O))}),i.value.bus.addListener("removeNode",O=>{console.log("删除节点:",O),k(O)})},ne=()=>{if(i.value){const x=localStorage.getItem("mindmap-zoom-level");if(x){const M=parseFloat(x);if(M>=.3&&M<=3){const O=n.value.querySelector(".map-container");O&&(O.style.transform=`scale(${M})`,c.value=M)}}}},K=()=>{if(i.value&&c.value!==1&&n.value){const x=n.value.querySelector(".map-container");x&&(x.style.transform=`scale(${c.value})`)}},ce=async()=>{var x;if(console.log("🚀🚀🚀 保存函数被调用 🚀🚀🚀"),console.log("🔍 mindElixir.value:",i.value),console.log("🔍 currentMindmapId.value:",l.value),console.log("🔍 mindmapEl.value:",n.value),console.log("🔍🔍🔍 全局状态检查开始 🔍🔍🔍"),console.log("🔍 - showWelcome:",u.value),console.log("🔍 - 是否有思维导图容器:",!!n.value),console.log("🔍 - MindElixir实例状态:",!!i.value),console.log("🔍🔍🔍 全局状态检查结束 🔍🔍🔍"),i.value&&i.value.data?(console.log("🔍🔍🔍 MindElixir数据检查开始 🔍🔍🔍"),console.log("🔍 - 数据对象:",i.value.data),console.log("🔍 - 数据字段:",Object.keys(i.value.data)),console.log("🔍 - 是否有nodeData:",!!i.value.data.nodeData),console.log("🔍 - 是否有nodes:",!!i.value.data.nodes),console.log("🔍🔍🔍 MindElixir数据检查结束 🔍🔍🔍")):console.log("⚠️ MindElixir数据不存在或为空"),!i.value||!l.value){if(console.warn("⚠️ 没有可保存的思维导图数据"),console.warn("🔍 mindElixir.value 状态:",!!i.value),console.warn("🔍 currentMindmapId.value 状态:",!!l.value),i.value&&i.value.data&&(console.log("🔍 尝试从MindElixir数据中获取ID"),console.log("🔍 MindElixir数据:",i.value.data),i.value.data.mindmapId?(l.value=i.value.data.mindmapId,console.log("🔍 从MindElixir数据中获取到mindmapId:",i.value.data.mindmapId)):i.value.data.mindmap_id&&(l.value=i.value.data.mindmap_id,console.log("🔍 从MindElixir数据中获取到mindmap_id:",i.value.data.mindmap_id))),!l.value&&i.value){if(console.log("🔍 尝试重新初始化MindElixir数据..."),console.log("🔍 MindElixir实例属性:",Object.keys(i.value)),console.log("🔍 MindElixir实例方法:",Object.getOwnPropertyNames(Object.getPrototypeOf(i.value))),i.value.getData){const M=i.value.getData();console.log("🔍 通过getData()获取的数据:",M),M&&M.nodeData&&(console.log("🔍 nodeData详情:",M.nodeData),M.nodeData.mindmapId?(l.value=M.nodeData.mindmapId,console.log("🔍 从nodeData.mindmapId获取到ID:",M.nodeData.mindmapId)):M.nodeData.mindmap_id?(l.value=M.nodeData.mindmap_id,console.log("🔍 从nodeData.mindmap_id获取到ID:",M.nodeData.mindmap_id)):(console.log("🔍 nodeData中没有找到mindmapId字段"),console.log("🔍 nodeData字段:",Object.keys(M.nodeData)))),!l.value&&M&&(console.log("🔍 检查其他可能的ID字段..."),M.id?(l.value=M.id,console.log("🔍 从data.id获取到ID:",M.id)):M.mindmapId&&(l.value=M.mindmapId,console.log("🔍 从data.mindmapId获取到ID:",M.mindmapId)))}i.value.mindElixirData&&(console.log("🔍 mindElixirData:",i.value.mindElixirData),i.value.mindElixirData.id&&(l.value=i.value.mindElixirData.id,console.log("🔍 从mindElixirData获取到ID:",i.value.mindElixirData.id)))}if(!l.value){console.warn("⚠️ 仍然无法获取思维导图ID,无法保存"),console.warn("🔍 建议:请先加载一个思维导图,然后再尝试保存");return}}try{console.log("💾 开始保存思维导图..."),console.log("🔍 当前思维导图ID:",l.value),console.log("🔍 MindElixir实例:",i.value);let M=null;if(i.value&&i.value.getData?(M=i.value.getData(),console.log("🔍 通过getData()获取的数据:",M)):(M=i.value.data,console.log("🔍 通过data属性获取的数据:",M)),!M){console.warn("⚠️ MindElixir数据为空");return}let O=[];console.log("🔍 数据结构分析:"),console.log("🔍 - currentData.nodeData:",M.nodeData),console.log("🔍 - currentData.nodes:",M.nodes),console.log("🔍 - currentData.nodeData.children:",(x=M.nodeData)==null?void 0:x.children);const q=L=>{L&&L.id&&(O.push(L),console.log(`🔍 收集节点: ${L.id} - ${L.topic||L.content||"无标题"}`),L.children&&L.children.length>0&&L.children.forEach(oe=>q(oe)))};if(M.nodeData)q(M.nodeData),console.log("🔍 从根节点收集到节点数量:",O.length);else if(M.nodes&&Array.isArray(M.nodes))M.nodes.forEach(L=>q(L)),console.log("🔍 从nodes数组收集到节点数量:",O.length);else if(Array.isArray(M))M.forEach(L=>q(L)),console.log("🔍 从currentData数组收集到节点数量:",O.length);else{console.warn("⚠️ 无法找到节点数据"),console.log("🔍 可用的数据字段:",Object.keys(M));return}if(O.length===0){console.warn("⚠️ 没有收集到任何节点");return}console.log("🔍 找到节点数据:",O),console.log("🔍 节点数量:",O.length),console.log("🔍 节点数据类型:",Array.isArray(O)?"数组":typeof O);const Z=[];if(O.forEach((L,oe)=>{if(console.log(`🔍 处理节点 ${oe}:`,L),L&&L.id){const ge=L.topic||L.content||L.text||"",Se=L.x||L.offsetX||0,Re=L.y||L.offsetY||0;console.log(`🔍 节点 ${L.id} 内容:`,ge,"位置:",{x:Se,y:Re});const Ve={content:ge,position:{x:Se,y:Re}};(L.parentId||L.parent)&&(Ve.parentId=L.parentId||L.parent,console.log(`🔍 节点 ${L.id} 父节点:`,Ve.parentId)),console.log(`🔍 准备保存节点 ${L.id}:`,Ve),Z.push(ct.updateNode(L.id,Ve).then(vt=>{console.log(`✅ 节点 ${L.id} 保存成功:`,vt)}).catch(vt=>{console.error(`❌ 节点 ${L.id} 保存失败:`,vt)}))}else console.warn(`⚠️ 节点 ${oe} 缺少ID:`,L)}),console.log("🔍 准备保存的节点数量:",Z.length),Z.length===0){console.warn("⚠️ 没有找到需要保存的节点");return}const le=await Promise.all(Z);console.log("🔍 保存结果:",le),console.log("🎉 思维导图保存完成!"),console.log("🔄 保存完成,开始自动刷新..."),await ae()}catch(M){console.error("❌ 保存思维导图失败:",M)}},ae=async()=>{if(!l.value){console.warn("⚠️ 没有当前思维导图ID,无法刷新");return}try{console.log("🔄 开始刷新思维导图...");const x=await ct.getMindmap(l.value);x.data&&x.data.nodeData?(console.log("✅ 获取到最新数据,开始刷新显示..."),await I(x.data,!0,!1),console.log("🎉 思维导图刷新完成!")):console.warn("⚠️ 无法获取思维导图数据")}catch(x){console.error("❌ 刷新思维导图失败:",x)}},he=async(x,M)=>{try{const O=String(l.value||"");if(i.value&&O&&O.startsWith("temp-")){console.log("🔄 检测到实时渲染的思维导图,将保存到数据库并更新ID");const le=T();console.log("📍 保存当前位置:",le);const L=await ct.createMindmap(M||"预览思维导图",x);if(console.log("🔄 创建思维导图响应:",L),L.data&&L.data.id){const oe=L.data.id;console.log("🎉 创建思维导图成功,新思维导图的ID是:",oe);const ge=l.value;if(l.value=oe,i.value&&i.value.data){i.value.data.mindmapId=oe,i.value.data.id=oe;const Se=Re=>{Re&&(Re.mindmapId=oe,Re.children&&Re.children.forEach(Ve=>Se(Ve)))};i.value.data.nodeData&&Se(i.value.data.nodeData)}console.log("✅ 已更新思维导图ID,保持视图状态"),console.log("🔄 从临时ID",ge,"更新为正式ID",oe),le&&setTimeout(()=>{D(le),console.log("📍 已恢复位置和缩放状态")},100),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:oe,title:M,timestamp:Date.now(),fromRealtime:!0}}));return}}console.log("🔄 没有检测到实时渲染的思维导图,使用标准保存流程");const Z=await ct.createMindmap(M||"预览思维导图",x);if(console.log("🔄 创建思维导图响应:",Z),Z.data&&Z.data.id){const le=Z.data.id;if(console.log("🎉 创建思维导图成功,新思维导图的ID是:",le),console.log("📊 响应数据详情:",Z.data),Z.data.nodeData)console.log("✅ 思维导图创建时已包含节点数据,直接加载"),l.value=le,C(),await I(Z.data),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:le,title:M,timestamp:Date.now()}})),setTimeout(async()=>{try{console.log("🔄 重新加载思维导图数据...");const L=await ct.getMindmap(le);L.data&&L.data.nodeData&&(await I(L.data),console.log("✅ 思维导图数据重新加载成功"))}catch(L){console.error("❌ 重新加载思维导图失败:",L)}},1500);else{console.log("🔧 需要递归创建节点"),await B(x,le,null),console.log("📥 开始加载新创建的思维导图,ID:",le);const L=await ct.getMindmap(le);console.log("🔄 加载思维导图响应:",L),L.data&&L.data.nodeData?(console.log("✅ 成功获取思维导图数据,开始加载显示"),l.value=le,C(),await I(L.data),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:le,title:M,timestamp:Date.now()}})),setTimeout(async()=>{try{console.log("🔄 重新加载思维导图数据...");const oe=await ct.getMindmap(le);oe.data&&oe.data.nodeData&&(await I(oe.data),console.log("✅ 思维导图数据重新加载成功"))}catch(oe){console.error("❌ 重新加载思维导图失败:",oe)}},1500)):console.error("❌ 获取思维导图数据失败:",L)}}}catch(O){console.error("❌ 保存预览数据到数据库失败:",O)}},ke=async x=>{try{if(console.log("📚 开始从历史记录加载思维导图:",x.title),C(),x.mindmapId){console.log("🎯 使用思维导图ID加载:",x.mindmapId);const M=await ct.getMindmap(x.mindmapId);if(M.data&&M.data.nodeData)await I(M.data);else throw new Error("无法获取思维导图数据")}else if(x.json)console.log("📊 使用历史记录中的JSON数据"),await I(x.json);else if(x.markdown){console.log("📝 使用历史记录中的Markdown数据,尝试转换为JSON");try{const M=await convertMarkdownToJSON(x.markdown);if(M)await I(M);else throw new Error("Markdown转换失败")}catch(M){console.error("Markdown转换失败:",M)}}}catch(M){console.error("❌ 从历史记录加载思维导图失败:",M)}};$a(async()=>{window.addEventListener("save-preview-to-database",x=>{console.log("🎯 收到保存到数据库事件:",x.detail),console.log("📋 事件详情 - 标题:",x.detail.title,"来源:",x.detail.source,"时间戳:",new Date(x.detail.timestamp).toLocaleString()),he(x.detail.data,x.detail.title)}),window.addEventListener("realtime-mindmap-update",x=>{console.log("🔄 收到实时思维导图更新事件:",x.detail),je(x.detail.data,x.detail.title)}),window.addEventListener("loadMindmapFromHistory",x=>{console.log("📚 收到从历史记录加载思维导图事件:",x.detail),console.log("🔍 事件数据详情:",x.detail),ke(x.detail)}),window.addEventListener("ai-sidebar-toggle",x=>{console.log("🤖 AI侧边栏折叠状态变化:",x.detail.isCollapsed),f.value=x.detail.isCollapsed}),y()});const Ie=()=>{window.zoomIntervalId&&(clearInterval(window.zoomIntervalId),window.zoomIntervalId=null),n.value&&(H&&(n.value.removeEventListener("wheel",H),H=null),X&&(n.value.removeEventListener("click",X),X=null)),console.log("✅ 已清理所有定时器和事件监听器")};Fa(()=>{Ie()}),e({showMindMapPage:S,cleanupIntervals:Ie});const je=async(x,M)=>{try{if(i.value){console.log("🔄 更新现有思维导图数据");try{const O=T(),q=String(l.value||""),Z=q&&q.startsWith("temp-")?q:`temp-${Date.now()}`,le={nodeData:x,mindmapId:Z,id:Z,title:M||"AI生成中..."};(!q||!q.startsWith("temp-"))&&(l.value=Z,console.log("🆔 更新临时思维导图ID:",Z));const L=i.value.init(le);O&&setTimeout(()=>{D(O)},100)}catch(O){console.error("❌ 更新思维导图数据失败:",O)}}else{C(),await An();let O=0;for(;!n.value&&O<20;)await new Promise(L=>setTimeout(L,50)),await An(),O++;if(!n.value){console.error("❌ 思维导图容器仍未准备好,跳过此次更新");return}i.value=new bt({el:n.value,direction:bt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!0,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,markdown:(L,oe)=>L.includes("|")||L.includes("**")||L.includes("`")||L.includes("#")||L.includes("$")||L.includes("![")?X0(L):L});const q=`temp-${Date.now()}`,Z={nodeData:x,mindmapId:q,id:q,title:M||"AI生成中..."};l.value=q,console.log("🆔 设置临时思维导图ID:",q);const le=i.value.init(Z);console.log("✅ 实时思维导图实例创建成功"),ee(),F()}}catch(O){console.error("❌ 实时更新思维导图失败:",O)}};return(x,M)=>(Ue(),Ge("div",c7,[u.value?(Ue(),Ge("div",u7,[J("div",{class:$n(["welcome-content",{"ai-sidebar-collapsed":f.value}])},[...M[1]||(M[1]=[Xo('

    🧠 思维导图工具

    可视化您的想法,构建知识体系

    🎯

    智能AI生成

    上传文档,AI自动生成思维导图结构

    ✏️

    灵活编辑

    拖拽节点,自由调整思维导图布局

    💾

    云端存储

    自动保存,多设备同步访问

    💡 提示:使用左侧AI侧边栏可以快速生成思维导图内容

    ',3)])],2)])):Tr("",!0),p.value?(Ue(),Ge("div",{key:1,class:"ai-input-area",style:zn(o.value)},[J("div",{class:"ai-input-header"},[M[2]||(M[2]=J("span",{class:"ai-input-title"},"🤖 询问AI",-1)),J("button",{onClick:ze,class:"ai-close-btn"},"×")]),J("div",d7,[fi(J("textarea",{"onUpdate:modelValue":M[0]||(M[0]=O=>v.value=O),placeholder:"请输入您的问题...",rows:"2",disabled:w.value,onKeydown:[ws(ys(_e,["exact"]),["enter"]),ws(ys(Ae,["ctrl"]),["enter"]),ws(ys(Ae,["meta"]),["enter"])]},null,40,h7),[[ja,v.value]]),J("div",f7,[J("button",{onClick:ze,class:"btn-cancel",disabled:w.value}," 取消 ",8,p7),J("button",{onClick:Ae,class:"btn-submit",disabled:!v.value.trim()||w.value},[w.value?(Ue(),Ge("span",g7,"AI思考中...")):(Ue(),Ge("span",v7,"询问AI"))],8,m7)])])],4)):Tr("",!0),u.value?Tr("",!0):(Ue(),Ge("div",{key:2,ref_key:"mindmapEl",ref:n,class:"mindmap-el"},null,512)),u.value?Tr("",!0):(Ue(),Ge("div",b7,[J("button",{onClick:ce,class:"save-btn",title:"保存思维导图",style:{display:"none"}},[...M[3]||(M[3]=[J("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[J("path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),J("polyline",{points:"17,21 17,13 7,13 7,21"}),J("polyline",{points:"7,3 7,8 15,8"})],-1),J("span",null,"保存",-1)])]),J("button",{onClick:ae,class:"refresh-btn",title:"刷新思维导图",style:{display:"none"}},[...M[4]||(M[4]=[J("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[J("path",{d:"M1 4v6h6"}),J("path",{d:"M23 20v-6h-6"}),J("path",{d:"M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"})],-1),J("span",null,"刷新",-1)])])])),s.value?(Ue(),Ge("div",{key:4,class:"context-menu",style:zn(a.value)},[s.value.parentId||s.value.parent?(Ue(),Ge("div",{key:0,class:"context-menu-item",onClick:ve,title:"Add a sibling card"},[...M[5]||(M[5]=[J("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[J("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.9001 4.5C9.9001 5.74264 8.89274 6.75 7.6501 6.75C6.64263 6.75 5.78981 6.08785 5.5031 5.175H2.7001V11.025H5.4001V9.9C5.4001 8.90589 6.11644 8.1 7.0001 8.1H15.0501C15.9338 8.1 16.6501 8.90589 16.6501 9.9V13.95C16.6501 14.9441 15.9338 15.75 15.0501 15.75H7.0001C6.11644 15.75 5.4001 14.9441 5.4001 13.95V12.375H2.2501C1.75304 12.375 1.3501 11.7471 1.3501 11.475V4.725C1.3501 4.22794 1.75304 3.825 2.2501 3.825H5.5031C5.78981 2.91215 6.64263 2.25 7.6501 2.25C8.89274 2.25 9.9001 3.25736 9.9001 4.5ZM15.0501 9.9H7.0001V13.95H15.0501V9.9Z",fill:"currentColor","fill-opacity":"1"})],-1)])])):Tr("",!0),J("div",{class:"context-menu-item",onClick:fe,title:"Add a child card"},[...M[6]||(M[6]=[J("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[J("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.9501 6.63691H8.35014V11.3619H15.9501V6.63691ZM8.35014 4.83691C7.46649 4.83691 6.75014 5.6428 6.75014 6.63691V8.32441H4.84719C4.56048 7.41157 3.70766 6.74941 2.7002 6.74941C1.45755 6.74941 0.450195 7.75677 0.450195 8.99941C0.450195 10.2421 1.45755 11.2494 2.7002 11.2494C3.70766 11.2494 4.56048 10.5873 4.84719 9.67441H6.75014V11.3619C6.75014 12.356 7.46649 13.1619 8.35014 13.1619H15.9501C16.8338 13.1619 17.5501 12.356 17.5501 11.3619V6.63691C17.5501 5.6428 16.8338 4.83691 15.9501 4.83691H8.35014Z",fill:"currentColor","fill-opacity":"1"})],-1)])]),J("div",{class:"context-menu-item",onClick:me,title:"Copy text"},[...M[7]||(M[7]=[J("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[J("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.4503 2.99952C16.4016 2.18908 15.7289 1.54688 14.9062 1.54688H6.46875L6.37452 1.5497C5.56408 1.5984 4.92188 2.27108 4.92188 3.09375V3.54688C4.92188 3.68495 5.0338 3.79688 5.17188 3.79688H6.35938C6.49745 3.79688 6.60938 3.68495 6.60938 3.54688V3.375L6.61309 3.34276C6.62766 3.28063 6.68343 3.23438 6.75 3.23438H14.625L14.6572 3.23809C14.7261 3.23438 14.7656 3.30029 14.7656 3.375V11.25L14.7619 11.2822C14.7473 11.3444 14.6916 11.3906 14.625 11.3906H14.4531C14.3151 11.3906 14.2031 11.5026 14.2031 11.6406V12.8281C14.2031 12.9662 14.3151 13.0781 14.4531 13.0781H14.9062L15.0005 13.0753C15.8109 13.0266 16.4531 12.3539 16.4531 11.5312V3.09375L16.4503 2.99952ZM11.5312 4.92188H3.09375C2.23943 4.92188 1.54688 5.61443 1.54688 6.46875V14.9062C1.54688 15.7606 2.23943 16.4531 3.09375 16.4531H11.5312C12.3856 16.4531 13.0781 15.7606 13.0781 14.9062V6.46875C13.0781 5.61443 12.3856 4.92188 11.5312 4.92188ZM3.37032 6.615H11.2635C11.3361 6.615 11.395 6.6739 11.395 6.74655V14.6397C11.395 14.7124 11.3361 14.7712 11.2635 14.7712H3.37032C3.29767 14.7712 3.23877 14.7124 3.23877 14.6397V6.74655C3.23877 6.6739 3.29767 6.615 3.37032 6.615ZM4.5 8.5C4.5 8.27909 4.67909 8.1 4.9 8.1H9.725C9.94591 8.1 10.125 8.27909 10.125 8.5V9.5C10.125 9.72091 9.94591 9.9 9.725 9.9H4.9C4.67909 9.9 4.5 9.72091 4.5 9.5V8.5ZM4.9 11.475C4.67909 11.475 4.5 11.6541 4.5 11.875V12.875C4.5 13.0959 4.67909 13.275 4.9 13.275H9.725C9.94591 13.275 10.125 13.0959 10.125 12.875V11.875C10.125 11.6541 9.94591 11.475 9.725 11.475H4.9Z",fill:"currentColor","fill-opacity":"1"})],-1)])]),J("div",{class:"context-menu-item ask-ai",onClick:Xe,title:"Ask AI"},[...M[8]||(M[8]=[Xo('',1)])]),J("div",{class:"context-menu-item delete",onClick:Te,title:"Delete"},[...M[9]||(M[9]=[J("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[J("path",{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z",fill:"currentColor"}),J("path",{"fill-rule":"evenodd",d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z",fill:"currentColor"})],-1)])])],4)):Tr("",!0)]))}},w7=Lo(y7,[["__scopeId","data-v-40eff312"]]),x7="modulepreload",S7=function(t){return"/"+t},Rc={},Oc=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(s=>{if(s=S7(s),s in Rc)return;Rc[s]=!0;const a=s.endsWith(".css"),o=a?'[rel="stylesheet"]':"";if(!!n)for(let u=i.length-1;u>=0;u--){const f=i[u];if(f.href===s&&(!a||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${o}`))return;const c=document.createElement("link");if(c.rel=a?"stylesheet":x7,a||(c.as="script",c.crossOrigin=""),c.href=s,document.head.appendChild(c),a)return new Promise((u,f)=>{c.addEventListener("load",u),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e()).catch(s=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s})};const k7={class:"ai-sidebar-wrapper"},T7=["title"],E7={key:0,width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},A7={key:1,width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},C7={class:"sidebar-content"},M7={class:"section"},N7={class:"input-group"},D7={key:0,class:"file-info"},I7={class:"file-details"},R7={class:"file-info-left"},O7={class:"file-name"},_7={class:"file-size"},L7={class:"button-group file-action-buttons"},z7=["disabled"],$7={key:0},F7={key:1},B7={key:0,class:"section"},P7={class:"history-list"},H7=["onClick"],q7={class:"history-title"},j7={class:"history-time"},U7={class:"section"},V7={class:"input-group"},W7={class:"button-group"},G7=["disabled"],K7={key:0},Y7={key:1},X7={class:"section"},J7={key:0,class:"processing-status"},Z7={class:"result-container"},Q7={class:"json-result"},eg={class:"button-group"},tg=["disabled"],rg={__name:"AISidebar",emits:["start-realtime-generation"],setup(t,{emit:e}){const r=e,n=Oe(!1),i=Oe(""),s=Oe(""),a=Oe(""),o=Oe(!1),l=Oe(!1),c=Oe([]),u=Oe(!1);Oe(""),Oe("");const f=Oe(!1),p=Oe(""),g=Oe(null),v=Oe(null),w=()=>{n.value=!n.value,window.dispatchEvent(new CustomEvent("ai-sidebar-toggle",{detail:{isCollapsed:n.value}}))},y=U=>{const V=U.target.files[0];V&&(v.value=V,me("文件上传成功!","success"))},C=U=>{U.preventDefault(),u.value=!1;const V=U.dataTransfer.files;if(V.length>0){const Q=V[0],ie=[".txt",".md",".doc",".docx",".pdf"],ye="."+Q.name.split(".").pop().toLowerCase();ie.includes(ye)?(v.value=Q,me("文件拖拽上传成功!","success")):me("不支持的文件格式!请上传 .txt, .md, .doc, .docx, .pdf 格式的文件","error")}},S=U=>{U.preventDefault(),u.value=!0},T=U=>{U.preventDefault(),u.value=!1},D=()=>{v.value=null,g.value&&(g.value.value="")},I=U=>{if(U===0)return"0 Bytes";const V=1024,Q=["Bytes","KB","MB","GB"],ie=Math.floor(Math.log(U)/Math.log(V));return parseFloat((U/Math.pow(V,ie)).toFixed(2))+" "+Q[ie]},_=async()=>{if(!v.value){me("请先上传文件","error");return}o.value=!0,r("start-realtime-generation");try{const U=await F(v.value);s.value="";const V=`你是一个专业的文档分析专家。请分析上传的文档内容,生成结构化的Markdown格式思维导图。要求: -1. 提取主要主题和关键概念 -2. 组织成层次分明的结构 -3. 使用清晰的标题和子标题 -4. 保持内容的逻辑性和完整性 -5. 对于长文档,请确保完整处理所有内容,不要截断 -6. **重要:如果原文档中包含图片,请按以下方式处理: - - 识别图片在文档中的位置和上下文 - - 根据图片内容生成准确的描述文字 - - 在相应位置插入图片占位符:![图片描述](图片路径) - - 图片描述要准确反映图片内容,图片路径可以是相对路径或占位符 - - 确保图片占位符放在逻辑上合适的位置** -7. **重要:如果原文档中包含表格,请完整保留表格结构: - - 保持表格的Markdown格式 - - 确保所有表格行都被包含 - - 不要省略任何表格内容 - - 对于合并单元格的表格,请使用HTML格式并正确使用rowspan和colspan属性 - - 如果表格结构复杂,优先使用HTML table标签而不是Markdown表格语法** -8. **重要:确保内容完整性: - - 不要截断任何内容 - - 保持原文的完整性 - - 所有重要信息都要包含在思维导图中** -9. 输出格式:直接输出Markdown内容,不要添加任何说明文字或代码块标记`,Q=`请分析以下文档内容并生成结构化Markdown: - -${U}`;await ve(V,Q),await Xe(),ot(v.value.name,s.value),setTimeout(async()=>{try{await Je()}catch(ie){console.error("自动保存失败:",ie)}},1500)}catch(U){console.error("从文件生成Markdown失败:",U),me("生成失败: "+U.message,"error")}finally{o.value=!1}},F=U=>new Promise(async(V,Q)=>{try{const ie=U.type.includes("text")||U.name.endsWith(".txt")||U.name.endsWith(".md"),ye=U.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||U.type==="application/msword"||U.name.endsWith(".docx")||U.name.endsWith(".doc"),k=U.type==="application/pdf"||U.name.endsWith(".pdf");if(ie){const N=new FileReader;N.onload=z=>V(z.target.result),N.onerror=()=>Q(new Error("文本文件读取失败")),N.readAsText(U)}else if(ye){const N=await G(U);V(N)}else if(k){const N=await W(U);V(N)}else{const N=new FileReader;N.onload=z=>V(z.target.result),N.onerror=()=>Q(new Error("文件读取失败")),N.readAsText(U)}}catch(ie){Q(ie)}}),G=async U=>{try{if(U.name.endsWith(".docx")){const V=await Oc(()=>import("./index-bdeaceb2.js").then(ye=>ye.i),[]),Q=await U.arrayBuffer();return(await V.extractRawText({arrayBuffer:Q})).value}else if(U.name.endsWith(".doc"))throw new Error("请将.doc文件转换为.docx格式,或安装相应的解析库")}catch(V){throw new Error(`Office文档解析失败: ${V.message}`)}},W=async U=>{try{const V=await Oc(()=>import("./pdf-1a0ba5fc.js"),[]);V.GlobalWorkerOptions.workerSrc="/pdf.worker.min.mjs";const Q=await U.arrayBuffer(),ie=await V.getDocument({data:Q}).promise;let ye="";for(let k=1;k<=ie.numPages;k++){const j=(await(await ie.getPage(k)).getTextContent()).items.map(B=>B.str).join(" ");ye+=j+` -`}return ye}catch(V){throw new Error(`PDF文件解析失败: ${V.message}`)}},fe=U=>U&&U.replace(/^好的[,,]?作为.*?专家[,,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^好的[,,]?作为.*?专业的.*?专家[,,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^以下是.*?结构化的.*?思维导图[::]\s*/i,"").replace(/^以下是.*?Markdown.*?思维导图[::]\s*/i,"").replace(/^以下是.*?Markdown.*?格式.*?思维导图[::]\s*/i,"").replace(/^```(?:markdown)?\s*/gm,"").replace(/```\s*$/gm,"").replace(/^「」`markdown\s*/gm,"").replace(/^「」`\s*/gm,"").replace(/^\s*「」`markdown\s*/gm,"").replace(/^\s*「」`\s*/gm,"").replace(/^作为.*?专家[,,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^我已.*?分析.*?内容.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^根据.*?文档内容.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^基于.*?文档.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^以下是.*?分析.*?结果[::]\s*/i,"").replace(/^以下是.*?整理.*?结果[::]\s*/i,"").replace(/^以下是.*?结构化.*?内容[::]\s*/i,"").replace(/\n{3,}/g,` - -`).trim(),ve=async(U,V)=>{const ie=U||`你是一位Markdown格式转换专家。你的任务是将用户提供的文章内容精确转换为结构化的Markdown格式。请遵循以下步骤: - -提取主标题: 识别文章最顶层的主标题(通常为文章题目或书名),并使用Markdown的 # 级别表示。 - -识别层级标题: 从文章内容中提取所有层级的内容标题(从主标题后的第一个标题开始,Level 1 至 Level 4)。判断层级依据: - -视觉与结构特征: 如独立成行/段、位置(行首)、格式(加粗、编号如 1., 1.1, (1), - 等)。 - -语义逻辑: 标题之间的包含和并列关系。 - -在Markdown中,使用相应标题级别: - -Level 1 标题用 ## - -Level 2 标题用 ### - -Level 3 标题用 #### - -Level 4 标题用 ##### - -精确保留原文标题文字,不得修改、概括或润色。 - -处理正文内容: 对于每个标题下的正文内容区块(从该标题后开始,直到下一个同级或更高级别标题前): - -直接保留原文文本,但根据内容结构适当格式化为Markdown。 - -如果内容是列表(如项目符号或编号列表),使用Markdown列表语法(例如 - 用于无序列表,1. 用于有序列表)。 - -保持段落和换行不变。 - -**重要:如果原文档中包含图片,请按以下方式处理: -1. 识别图片在文档中的位置和上下文 -2. 根据图片内容生成准确的描述文字 -3. 在相应位置插入图片占位符:![图片描述](图片路径) -4. 图片描述要准确反映图片内容,图片路径可以是相对路径或占位符 -5. 确保图片占位符放在逻辑上合适的位置** - -输出格式: 输出必须是纯Markdown格式的文本,不得包含任何额外说明、JSON或非Markdown元素。确保输出与示例风格一致。直接输出Markdown内容,不要添加任何说明文字。`,ye=V||"请将以下内容转换为结构化的Markdown格式:";try{const k=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:ie,user_prompt:ye,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!k.ok)throw new Error(`HTTP error! status: ${k.status}`);const N=k.body.getReader(),z=new TextDecoder;let j="",B=0;for(;;){const{done:H,value:X}=await N.read();if(H)break;j+=z.decode(X,{stream:!0});const ee=j.split(` -`);j=ee.pop()||"";for(const ne of ee)if(ne.startsWith("data: "))try{const K=JSON.parse(ne.slice(6));if(K.type==="start")me("AI开始生成内容...","info");else if(K.type==="chunk"){if(B++,s.value+=K.content,B%5===0)try{const ce=fe(s.value),ae=_e(ce);a.value=JSON.stringify(ae,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:ae,title:ae.topic||"AI生成中...",source:"ai-streaming",chunkCount:B}}))}catch(ce){console.warn("⚠️ 实时转换JSON失败:",ce)}}else if(K.type==="end"){me("AI内容生成完成!","success");try{const ce=fe(s.value);console.log("🎯 最终内容长度:",ce.length),console.log("🎯 最终内容预览:",ce.substring(0,500)+"...");const ae=ze(ce);console.log(`🖼️ 最终统计:共发现 ${ae.length} 张图片`);const he=_e(ce);a.value=JSON.stringify(he,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:he,title:he.topic||"AI生成完成",source:"ai-final",chunkCount:B}}))}catch(ce){console.error("⚠️ 最终处理失败:",ce)}}else if(K.type==="error")throw new Error(K.content)}catch(K){console.warn("解析流式数据失败:",K)}}}catch(k){throw console.error("流式AI API调用失败:",k),k}},Te=U=>{if(U.includes("|")&&U.includes("-")){const V=U.split(` -`);let Q=!1,ie=!1;for(const ye of V){const k=ye.trim();k.includes("|")&&k.split("|").length>=3&&(Q=!0),k.includes("|")&&k.includes("-")&&/^[\s\|\-\:]+$/.test(k)&&(ie=!0)}if(Q&&ie)return console.log("🚫 formatMarkdownToText: 检测到表格内容,跳过转换"),U}return U.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(V,Q)=>{if(Q.includes(":")){const ie=Q.split(":");if(ie.length>1)return`【${ie[0]}】: ${ie.slice(1).join(":")}`}return`【${Q}】`}).replace(/\*(.*?)\*/g,"《$1》").replace(/^- (.*$)/gim," • $1").replace(/^\d+\. (.*$)/gim," $&").replace(/```(.*?)```/gims,"💻 $1").replace(/`(.*?)`/g,"「$1」").replace(/\[([^\]]+)\]\([^)]+\)/g,"🔗 $1").replace(/!\[([^\]]*)\]\(([^)]+)\)/g,"[图片: $1]").replace(/\n\n/g,` -`).replace(/\n/g,` - `).split(` -`).map(V=>V.length>80?V.substring(0,77)+"...":V).join(` -`).trim()},Xe=async()=>{if(!s.value.trim()){me("请输入Markdown内容","error");return}l.value=!0;try{const U=fe(s.value),V=_e(U);a.value=JSON.stringify(V,null,2)}catch(U){console.error("转换失败:",U),me("转换失败,请检查Markdown格式","error")}finally{l.value=!1}},ze=U=>{const V=/!\[([^\]]*)\]\(([^)]+)\)/g,Q=[];let ie;for(;(ie=V.exec(U))!==null;){const ye=ie[2],k=ie[1]||"";ye&&ye.trim()&&(ye.startsWith("http")||ye.startsWith("data:")||ye.startsWith("/"))?(Q.push({alt:k,url:ye.trim(),fullMatch:ie[0]}),console.log(`✅ 有效图片URL: ${ye}`)):console.warn(`⚠️ 跳过无效的图片URL: ${ye}`)}return console.log(`🔍 从内容中提取到 ${Q.length} 张图片:`,Q),Q},rt=U=>U.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,"").trim(),_e=U=>{const V=U.split(` -`);let Q=null;const ie=[];let ye=0,k=[];if(V.forEach((N,z)=>{const j=N.trim(),B=j.match(/^(#{1,6})\s+(.+)$/);if(B){if(k.length>0&&ie.length>0){const ce=k.join(` -`).trim();ce&&(ye=Ae(ce,ie[ie.length-1],ye).nodeCounter),k=[]}const H=B[1].length,X=B[2].trim(),ee=ze(X),ne=rt(Te(X));ee.length>0&&console.log(`🖼️ 在标题中发现 ${ee.length} 张图片: ${X}`);const K={id:`node_${ye++}`,topic:ne,children:[],level:H,data:{}};if(ee.length>0){const ce=ee[0];ce.url&&ce.url.trim()!==""?(K.image={url:ce.url,width:200,height:150,fit:"contain"},console.log(`✅ 成功为标题节点设置图片: ${ce.url}`)):console.error("❌ 标题图片URL无效:",ce)}if(H===1&&!Q)Q=K,ie.length=0,ie.push(Q);else{for(;ie.length>1&&ie[ie.length-1].level>=H;)ie.pop();ie.length>0&&ie[ie.length-1].children.push(K),ie.push(K)}}else j&&k.push(j)}),k.length>0&&ie.length>0){const N=k.join(` -`).trim();N&&(N.includes("|")&&console.log("🔍 处理最后的内容(包含表格):",N.substring(0,200)+"..."),ye=Ae(N,ie[ie.length-1],ye).nodeCounter)}return Q||(Q={id:"root",topic:"根节点",children:[],data:{}}),Q},Ae=(U,V,Q)=>{const ie=ze(U);if(ie.length>0){console.log(`🖼️ 在内容中发现 ${ie.length} 张图片`),ie.forEach((j,B)=>{console.log(`🖼️ 处理图片 ${B+1}:`,{alt:j.alt,url:j.url,urlLength:j.url.length});let H=j.url;H.includes("cdn-mineru.openxlab.org.cn")&&(H=`/proxy-image${H.replace("https://cdn-mineru.openxlab.org.cn","")}`,console.log(`🔄 转换图片URL: ${j.url} -> ${H}`));const X={id:`node_${Q++}`,topic:j.alt||`图片 ${B+1}`,children:[],level:(V.level||0)+1,image:{url:H,width:200,height:150,fit:"contain"},data:{}};if(!X.image.url||X.image.url.trim()===""){console.error(`❌ 图片节点 ${B+1} URL为空:`,X);return}V.children.push(X),console.log(`✅ 成功创建图片节点: ${X.topic} - ${H}`)});const z=rt(U);return z.trim()&&(Q=Ae(z,V,Q).nodeCounter),{nodeCounter:Q}}if(pe(U)){console.log("🎯 检测到表格内容,创建表格节点");const z=y0(U);console.log("🎯 表格HTML内容:",z);const j={id:`node_${Q++}`,topic:"",dangerouslySetInnerHTML:z,children:[],level:(V.level||0)+1,data:{}};return V.children.push(j),{nodeCounter:Q}}const ye=U.split(` -`);let k=Q,N=[];for(let z=0;z0){const ce=Te(ne.join(` -`));ee.topic=ee.topic+` - -`+ce}V.children.push(ee),z=K-1}else B&&N.push(B)}if(N.length>0){const z=N.join(` -`).trim();if(z)if(pe(z)){console.log("🎯 检测到表格内容,创建表格节点");const j=y0(z);console.log("🎯 表格HTML内容:",j);const B={id:`node_${k++}`,topic:"",dangerouslySetInnerHTML:j,children:[],level:(V.level||0)+1,data:{}};V.children.push(B)}else z.split(` - -`).filter(B=>B.trim()).forEach(B=>{const H=Te(B.trim());if(H){const X={id:`node_${k++}`,topic:H,children:[],level:(V.level||0)+1,data:{}};V.children.push(X)}})}return{nodeCounter:k}},pe=U=>{if(!U||typeof U!="string")return!1;if(U.includes("=3&&(ie=!0,console.log("✅ 找到表格行:",B)),B.includes("|")&&B.includes("-")&&/^[\s\|\-\:]+$/.test(B)&&(ye=!0,console.log("✅ 找到分隔符行:",B))}const k=(U.match(/\|/g)||[]).length,N=k>=4,z=ie&&ye||ie&&N;return console.log("🔍 表格检测结果:",{hasTableRow:ie,hasSeparator:ye,pipeCount:k,hasMultiplePipes:N,result:z}),z},He=async()=>{if(!s.value){me("没有Markdown内容可复制","error");return}try{await navigator.clipboard.writeText(s.value),me("Markdown已复制到剪贴板","success")}catch{const V=document.createElement("textarea");V.value=s.value,document.body.appendChild(V),V.select(),document.execCommand("copy"),V.remove(),me("Markdown已复制到剪贴板","success")}},qe=async()=>{try{await navigator.clipboard.writeText(a.value),me("JSON已复制到剪贴板","success")}catch(U){console.error("复制失败:",U),me("复制失败","error")}},Je=async()=>{if(!a.value){me("请先生成或转换JSON数据","error");return}try{const U=JSON.parse(a.value),V=U.topic||U.title||`AI生成的思维导图_${new Date().toLocaleString()}`,Q=new CustomEvent("save-preview-to-database",{detail:{data:U,title:V,source:"ai-generated",timestamp:Date.now()}});window.dispatchEvent(Q),setTimeout(()=>{me("思维导图已保存成功!","success"),v.value=null,g.value&&(g.value.value="")},2e3)}catch(U){console.error("JSON解析失败:",U),me("JSON格式错误,请检查数据","error")}},me=(U,V="info")=>{const Q=document.createElement("div");switch(Q.className=`notification notification-${V}`,Q.textContent=U,Q.style.cssText=` - position: fixed; - top: 20px; - right: 20px; - padding: 12px 20px; - border-radius: 8px; - font-size: 14px; - font-weight: 500; - z-index: 10000; - box-shadow: 0 4px 12px rgba(0,0,0,0.15); - animation: slideIn 0.3s ease; - max-width: 300px; - word-wrap: break-word; - `,V){case"success":Q.style.background="#4CAF50",Q.style.color="white";break;case"error":Q.style.background="#f44336",Q.style.color="white";break;case"info":default:Q.style.background="#2196F3",Q.style.color="white";break}if(!document.querySelector("#notification-styles")){const ie=document.createElement("style");ie.id="notification-styles",ie.textContent=` - @keyframes slideIn { - from { transform: translateX(100%); opacity: 0; } - to { transform: translateX(0); opacity: 1; } - } - @keyframes slideOut { - from { transform: translateX(0); opacity: 1; } - to { transform: translateX(100%); opacity: 0; } - } - `,document.head.appendChild(ie)}document.body.appendChild(Q),setTimeout(()=>{Q.style.animation="slideOut 0.3s ease",setTimeout(()=>{Q.parentNode&&Q.parentNode.removeChild(Q)},300)},3e3)},Et=()=>{s.value="",a.value="",me("内容已清空","info")},ot=(U,V,Q=null)=>{const ie={title:U,content:V,mindmapId:Q,timestamp:new Date};c.value.unshift(ie),c.value.length>10&&(c.value=c.value.slice(0,10)),localStorage.setItem("ai-sidebar-history",JSON.stringify(c.value))},gt=async U=>{U.mindmapId?window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{mindmapId:U.mindmapId,title:U.title}})):(s.value=U.content,await Xe(),window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{markdown:U.content,json:a.value,title:U.title}})))},yt=U=>new Date(U).toLocaleString("zh-CN");$a(()=>{const U=localStorage.getItem("ai-sidebar-history");if(U)try{c.value=JSON.parse(U)}catch(V){console.error("加载历史记录失败:",V)}window.addEventListener("add-to-history",V=>{const{title:Q,content:ie,timestamp:ye}=V.detail;ot(Q,ie,null)}),window.addEventListener("mindmap-saved",V=>{const{mindmapId:Q,title:ie,timestamp:ye}=V.detail,k=c.value.find(N=>N.title===ie||N.timestamp&&Math.abs(N.timestamp-ye)<5e3);k?(k.mindmapId=Q,localStorage.setItem("ai-sidebar-history",JSON.stringify(c.value))):ot(ie,"",Q)}),o0(i,(V,Q)=>{}),o0(s,(V,Q)=>{})});const lt=async()=>{try{const U=await fetch("http://127.0.0.1:8000/api/ai/test-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({test:"data"})});if(!U.ok)throw new Error(`HTTP error! status: ${U.status}`);const V=U.body.getReader(),Q=new TextDecoder;let ie="";for(;;){const{done:ye,value:k}=await V.read();if(ye)break;ie+=Q.decode(k,{stream:!0});const N=ie.split(` -`);ie=N.pop()||"";for(const z of N)if(z.startsWith("data: "))try{const j=JSON.parse(z.slice(6))}catch(j){console.warn("解析测试数据失败:",j)}}}catch(U){console.error("❌ 测试流式API失败:",U)}};return window.testStreamAPI=lt,(U,V)=>(Ue(),Ge("div",k7,[J("div",{class:"sidebar-toggle",onClick:w,title:n.value?"展开AI助手":"折叠AI助手",style:zn({left:n.value?"10px":"420px"})},[n.value?(Ue(),Ge("svg",E7,[...V[1]||(V[1]=[J("path",{d:"M9 18l6-6-6-6"},null,-1)])])):(Ue(),Ge("svg",A7,[...V[2]||(V[2]=[J("path",{d:"M15 18l-6-6 6-6"},null,-1)])]))],12,T7),J("div",{class:$n(["ai-sidebar",{"sidebar-collapsed":n.value}])},[fi(J("div",C7,[V[12]||(V[12]=J("div",{class:"sidebar-header"},[J("h3",null,"🤖 AI 助手"),J("p",null,"文档转思维导图工具"),J("div",{class:"collapse-hint"},[J("small",null,"💡 点击右侧按钮可折叠侧边栏")])],-1)),J("div",M7,[V[6]||(V[6]=J("h4",null,"📁 生成思维导图",-1)),J("div",N7,[V[4]||(V[4]=J("label",null,"上传文件:",-1)),J("div",{class:"file-upload-area",onDrop:C,onDragover:S,onDragleave:T},[J("input",{type:"file",ref_key:"fileInput",ref:g,onChange:y,accept:".txt,.md,.doc,.docx,.pdf",class:"file-input"},null,544),J("div",{class:$n(["file-upload-placeholder",{"drag-over":u.value}])},[...V[3]||(V[3]=[J("span",{class:"upload-icon"},"📎",-1),J("span",{class:"upload-text"},"点击选择文件或拖拽文件到此处",-1),J("span",{class:"upload-hint"},"支持 .txt, .md, .doc, .docx, .pdf 格式",-1)])],2)],32)]),v.value?(Ue(),Ge("div",D7,[J("div",I7,[J("div",R7,[J("span",O7,"📄 "+dr(v.value.name),1),J("span",_7,"("+dr(I(v.value.size))+")",1)]),J("button",{onClick:D,class:"btn-remove",title:"删除文件"},[...V[5]||(V[5]=[J("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[J("path",{d:"M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6"})],-1)])])])])):Tr("",!0),J("div",L7,[J("button",{onClick:_,disabled:!v.value||o.value,class:"btn-primary"},[o.value?(Ue(),Ge("span",$7,"AI生成中...")):(Ue(),Ge("span",F7,"AI生成思维导图"))],8,z7)])]),c.value.length>0?(Ue(),Ge("div",B7,[V[7]||(V[7]=J("h4",null,"📚 历史记录",-1)),J("div",P7,[(Ue(!0),Ge(tr,null,pu(c.value,(Q,ie)=>(Ue(),Ge("div",{key:ie,class:"history-item",onClick:ye=>gt(Q)},[J("div",q7,dr(Q.title),1),J("div",j7,dr(yt(Q.timestamp)),1)],8,H7))),128))])])):Tr("",!0),J("div",U7,[V[9]||(V[9]=J("h4",null,"📝 AI生成的Markdown结果",-1)),J("div",V7,[V[8]||(V[8]=J("label",null,"Markdown内容:",-1)),fi(J("textarea",{"onUpdate:modelValue":V[0]||(V[0]=Q=>s.value=Q),placeholder:"AI生成的Markdown内容将显示在这里",rows:"6",readonly:"",class:"markdown-result"},null,512),[[ja,s.value]])]),J("div",W7,[J("button",{onClick:Xe,disabled:l.value,class:"btn-secondary"},[l.value?(Ue(),Ge("span",K7,"转换中...")):(Ue(),Ge("span",Y7,"🔄 转换为JSON"))],8,G7),J("button",{onClick:Et,class:"btn-clear"},"清空"),J("button",{onClick:He,class:"btn-copy"},"📋 复制Markdown")])]),J("div",X7,[V[11]||(V[11]=J("h4",null,"📊 Markdown转JSON结果",-1)),f.value?(Ue(),Ge("div",J7,[V[10]||(V[10]=J("div",{class:"spinner"},null,-1)),J("span",null,dr(p.value),1)])):Tr("",!0),J("div",Z7,[J("pre",Q7,dr(a.value||"JSON转换结果将显示在这里"),1),J("div",eg,[J("button",{onClick:qe,class:"btn-copy"},"📋 复制JSON"),J("button",{onClick:Je,disabled:f.value,class:"btn-copy"},dr(f.value?"处理中...":"👁️ 预览"),9,tg)])])])],512),[[Pf,!n.value]])],2)]))}},ng=Lo(rg,[["__scopeId","data-v-28c77d5e"]]);const ig={class:"markdown-test"},sg={class:"test-section"},ag={class:"test-section"},og=["innerHTML"],lg={class:"test-section"},cg={class:"test-cases"},ug=["onClick"],dg={__name:"MarkdownTest",setup(t){const e=Oe(`# 测试标题 - -这是一个**粗体**和*斜体*的测试。 - -## 表格测试 - -| 产品 | 价格 | 库存 | -|------|------|------| -| 苹果 | 4元 | 100个 | -| 香蕉 | 2元 | 50个 | - -## 代码测试 - -\`\`\`javascript -function hello() { - console.log('Hello World!'); -} -\`\`\` - -行内代码:\`const name = 'test'\` - -## 列表测试 - -- 项目1 -- 项目2 - - 子项目2.1 - - 子项目2.2 -- 项目3 - -## 链接测试 - -- [GitHub](https://github.com) -- [Vue.js](https://vuejs.org)`),r=Oe([{name:"基础表格",content:`# 产品价格表 - -| 产品 | 价格 | -|------|------| -| 苹果 | 4元 | -| 香蕉 | 2元 |`},{name:"复杂表格",content:`# 技术栈对比 - -| 技术 | 前端 | 后端 | 数据库 | -|------|------|------|--------| -| Vue.js | ✅ | ❌ | ❌ | -| Django | ❌ | ✅ | ❌ | -| PostgreSQL | ❌ | ❌ | ✅ |`},{name:"代码块",content:`# 代码示例 - -\`\`\`javascript -function markdownToJSON(markdown) { - const lines = markdown.split('\\n'); - // 处理逻辑... - return result; -} -\`\`\``},{name:"混合内容",content:`# 混合内容测试 - -这是一个包含**粗体**、*斜体*和\`行内代码\`的段落。 - -## 表格 - -| 功能 | 状态 | 说明 | -|------|------|------| -| 表格渲染 | ✅ | 支持markdown表格 | -| 代码高亮 | ✅ | 支持代码块 | - -## 代码 - -\`\`\`python -def hello_world(): - print("Hello, World!") -\`\`\``}]),n=$u(()=>{if(!e.value)return"";try{return y0(e.value)}catch(a){return`
    渲染失败: ${a.message}
    `}}),i=()=>{},s=a=>{e.value=a.content};return(a,o)=>(Ue(),Ge("div",ig,[o[4]||(o[4]=J("h2",null,"Markdown渲染测试",-1)),J("div",sg,[o[1]||(o[1]=J("h3",null,"输入Markdown内容",-1)),fi(J("textarea",{"onUpdate:modelValue":o[0]||(o[0]=l=>e.value=l),placeholder:"输入markdown内容...",rows:"10",class:"markdown-input"},null,512),[[ja,e.value]])]),J("div",ag,[o[2]||(o[2]=J("h3",null,"渲染结果",-1)),J("div",{class:"rendered-content",innerHTML:n.value},null,8,og)]),J("div",lg,[o[3]||(o[3]=J("h3",null,"测试用例",-1)),J("button",{onClick:i,class:"test-btn"},"加载测试用例"),J("div",cg,[(Ue(!0),Ge(tr,null,pu(r.value,(l,c)=>(Ue(),Ge("button",{key:c,onClick:u=>s(l),class:"test-case-btn"},dr(l.name),9,ug))),128))])])]))}},hg=Lo(dg,[["__scopeId","data-v-68a00828"]]);const fg={id:"app"},pg={class:"test-mode-toggle",style:{display:"none"}},mg={key:0,class:"test-mode"},gg={key:1},vg={class:"main-content"},bg={__name:"App",setup(t){const e=Oe(null),r=Oe(!1),n=()=>{r.value=!r.value},i=()=>{e.value&&e.value.showMindMapPage()};return(s,a)=>(Ue(),Ge("div",fg,[a[0]||(a[0]=_u("« ",-1)),J("div",pg,[J("button",{onClick:n,class:"test-btn"},dr(r.value?"切换到思维导图":"测试Markdown渲染"),1)]),r.value?(Ue(),Ge("div",mg,[jt(hg)])):(Ue(),Ge("div",gg,[jt(ng,{onStartRealtimeGeneration:i}),J("div",vg,[jt(w7,{ref_key:"mindMapRef",ref:e},null,512)])]))]))}};ap(bg).mount("#app");export{Oc as _,Yl as c,xg as g}; diff --git a/frontend/dist/assets/index-c91f543d.js b/frontend/dist/assets/index-c91f543d.js new file mode 100644 index 0000000..e59f379 --- /dev/null +++ b/frontend/dist/assets/index-c91f543d.js @@ -0,0 +1,792 @@ +var Xd=Object.defineProperty;var Jd=(t,e,r)=>e in t?Xd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Je=(t,e,r)=>(Jd(t,typeof e!="symbol"?e+"":e,r),r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();/** +* @vue/shared v3.5.20 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function _a(t){const e=Object.create(null);for(const r of t.split(","))e[r]=1;return r=>r in e}const Ze={},$n=[],ur=()=>{},Wc=()=>!1,Vi=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),La=t=>t.startsWith("onUpdate:"),At=Object.assign,za=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},Zd=Object.prototype.hasOwnProperty,Ve=(t,e)=>Zd.call(t,e),Ce=Array.isArray,Fn=t=>Wi(t)==="[object Map]",Gc=t=>Wi(t)==="[object Set]",Ne=t=>typeof t=="function",ft=t=>typeof t=="string",ln=t=>typeof t=="symbol",ot=t=>t!==null&&typeof t=="object",Kc=t=>(ot(t)||Ne(t))&&Ne(t.then)&&Ne(t.catch),Yc=Object.prototype.toString,Wi=t=>Yc.call(t),Qd=t=>Wi(t).slice(8,-1),Xc=t=>Wi(t)==="[object Object]",$a=t=>ft(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,c0=_a(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Gi=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},eh=/-(\w)/g,tn=Gi(t=>t.replace(eh,(e,r)=>r?r.toUpperCase():"")),th=/\B([A-Z])/g,cn=Gi(t=>t.replace(th,"-$1").toLowerCase()),Jc=Gi(t=>t.charAt(0).toUpperCase()+t.slice(1)),ws=Gi(t=>t?`on${Jc(t)}`:""),en=(t,e)=>!Object.is(t,e),ci=(t,...e)=>{for(let r=0;r{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:n,value:r})},Qs=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let Xo;const Ki=()=>Xo||(Xo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Un(t){if(Ce(t)){const e={};for(let r=0;r{if(r){const n=r.split(nh);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function Vn(t){let e="";if(ft(t))e=t;else if(Ce(t))for(let r=0;r!!(t&&t.__v_isRef===!0),Zt=t=>ft(t)?t:t==null?"":Ce(t)||ot(t)&&(t.toString===Yc||!Ne(t.toString))?eu(t)?Zt(t.value):JSON.stringify(t,tu,2):String(t),tu=(t,e)=>eu(e)?tu(t,e.value):Fn(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[n,i],s)=>(r[xs(n,s)+" =>"]=i,r),{})}:Gc(e)?{[`Set(${e.size})`]:[...e.values()].map(r=>xs(r))}:ln(e)?xs(e):ot(e)&&!Ce(e)&&!Xc(e)?String(e):e,xs=(t,e="")=>{var r;return ln(t)?`Symbol(${(r=t.description)!=null?r:e})`:t};/** +* @vue/reactivity v3.5.20 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Ht;class lh{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ht,!e&&Ht&&(this.index=(Ht.scopes||(Ht.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,r;if(this.scopes)for(e=0,r=this.scopes.length;e0&&--this._on===0&&(Ht=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let r,n;for(r=0,n=this.effects.length;r0)return;if(d0){let e=d0;for(d0=void 0;e;){const r=e.next;e.next=void 0,e.flags&=-9,e=r}}let t;for(;u0;){let e=u0;for(u0=void 0;e;){const r=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(n){t||(t=n)}e=r}}if(t)throw t}function su(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function au(t){let e,r=t.depsTail,n=r;for(;n;){const i=n.prevDep;n.version===-1?(n===r&&(r=i),Pa(n),uh(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}t.deps=e,t.depsTail=r}function ea(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(ou(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function ou(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===y0)||(t.globalVersion=y0,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!ea(t))))return;t.flags|=2;const e=t.dep,r=et,n=dr;et=t,dr=!0;try{su(t);const i=t.fn(t._value);(e.version===0||en(i,t._value))&&(t.flags|=128,t._value=i,e.version++)}catch(i){throw e.version++,i}finally{et=r,dr=n,au(t),t.flags&=-3}}function Pa(t,e=!1){const{dep:r,prevSub:n,nextSub:i}=t;if(n&&(n.nextSub=i,t.prevSub=void 0),i&&(i.prevSub=n,t.nextSub=void 0),r.subs===t&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let s=r.computed.deps;s;s=s.nextDep)Pa(s,!0)}!e&&!--r.sc&&r.map&&r.map.delete(r.key)}function uh(t){const{prevDep:e,nextDep:r}=t;e&&(e.nextDep=r,t.prevDep=void 0),r&&(r.prevDep=e,t.nextDep=void 0)}let dr=!0;const lu=[];function Br(){lu.push(dr),dr=!1}function Pr(){const t=lu.pop();dr=t===void 0?!0:t}function Jo(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const r=et;et=void 0;try{e()}finally{et=r}}}let y0=0;class dh{constructor(e,r){this.sub=e,this.dep=r,this.version=r.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ha{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!et||!dr||et===this.computed)return;let r=this.activeLink;if(r===void 0||r.sub!==et)r=this.activeLink=new dh(et,this),et.deps?(r.prevDep=et.depsTail,et.depsTail.nextDep=r,et.depsTail=r):et.deps=et.depsTail=r,cu(r);else if(r.version===-1&&(r.version=this.version,r.nextDep)){const n=r.nextDep;n.prevDep=r.prevDep,r.prevDep&&(r.prevDep.nextDep=n),r.prevDep=et.depsTail,r.nextDep=void 0,et.depsTail.nextDep=r,et.depsTail=r,et.deps===r&&(et.deps=n)}return r}trigger(e){this.version++,y0++,this.notify(e)}notify(e){Fa();try{for(let r=this.subs;r;r=r.prevSub)r.sub.notify()&&r.sub.dep.notify()}finally{Ba()}}}function cu(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let n=e.deps;n;n=n.nextDep)cu(n)}const r=t.dep.subs;r!==t&&(t.prevSub=r,r&&(r.nextSub=t)),t.dep.subs=t}}const ta=new WeakMap,xn=Symbol(""),ra=Symbol(""),w0=Symbol("");function Ct(t,e,r){if(dr&&et){let n=ta.get(t);n||ta.set(t,n=new Map);let i=n.get(r);i||(n.set(r,i=new Ha),i.map=n,i.key=r),i.track()}}function Or(t,e,r,n,i,s){const a=ta.get(t);if(!a){y0++;return}const o=l=>{l&&l.trigger()};if(Fa(),e==="clear")a.forEach(o);else{const l=Ce(t),c=l&&$a(r);if(l&&r==="length"){const u=Number(n);a.forEach((f,p)=>{(p==="length"||p===w0||!ln(p)&&p>=u)&&o(f)})}else switch((r!==void 0||a.has(void 0))&&o(a.get(r)),c&&o(a.get(w0)),e){case"add":l?c&&o(a.get("length")):(o(a.get(xn)),Fn(t)&&o(a.get(ra)));break;case"delete":l||(o(a.get(xn)),Fn(t)&&o(a.get(ra)));break;case"set":Fn(t)&&o(a.get(xn));break}}Ba()}function Nn(t){const e=Ue(t);return e===t?e:(Ct(e,"iterate",w0),tr(t)?e:e.map(Et))}function Yi(t){return Ct(t=Ue(t),"iterate",w0),t}const hh={__proto__:null,[Symbol.iterator](){return Ss(this,Symbol.iterator,Et)},concat(...t){return Nn(this).concat(...t.map(e=>Ce(e)?Nn(e):e))},entries(){return Ss(this,"entries",t=>(t[1]=Et(t[1]),t))},every(t,e){return Nr(this,"every",t,e,void 0,arguments)},filter(t,e){return Nr(this,"filter",t,e,r=>r.map(Et),arguments)},find(t,e){return Nr(this,"find",t,e,Et,arguments)},findIndex(t,e){return Nr(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return Nr(this,"findLast",t,e,Et,arguments)},findLastIndex(t,e){return Nr(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return Nr(this,"forEach",t,e,void 0,arguments)},includes(...t){return Ts(this,"includes",t)},indexOf(...t){return Ts(this,"indexOf",t)},join(t){return Nn(this).join(t)},lastIndexOf(...t){return Ts(this,"lastIndexOf",t)},map(t,e){return Nr(this,"map",t,e,void 0,arguments)},pop(){return Qn(this,"pop")},push(...t){return Qn(this,"push",t)},reduce(t,...e){return Zo(this,"reduce",t,e)},reduceRight(t,...e){return Zo(this,"reduceRight",t,e)},shift(){return Qn(this,"shift")},some(t,e){return Nr(this,"some",t,e,void 0,arguments)},splice(...t){return Qn(this,"splice",t)},toReversed(){return Nn(this).toReversed()},toSorted(t){return Nn(this).toSorted(t)},toSpliced(...t){return Nn(this).toSpliced(...t)},unshift(...t){return Qn(this,"unshift",t)},values(){return Ss(this,"values",Et)}};function Ss(t,e,r){const n=Yi(t),i=n[e]();return n!==t&&!tr(t)&&(i._next=i.next,i.next=()=>{const s=i._next();return s.value&&(s.value=r(s.value)),s}),i}const fh=Array.prototype;function Nr(t,e,r,n,i,s){const a=Yi(t),o=a!==t&&!tr(t),l=a[e];if(l!==fh[e]){const f=l.apply(t,s);return o?Et(f):f}let c=r;a!==t&&(o?c=function(f,p){return r.call(this,Et(f),p,t)}:r.length>2&&(c=function(f,p){return r.call(this,f,p,t)}));const u=l.call(a,c,n);return o&&i?i(u):u}function Zo(t,e,r,n){const i=Yi(t);let s=r;return i!==t&&(tr(t)?r.length>3&&(s=function(a,o,l){return r.call(this,a,o,l,t)}):s=function(a,o,l){return r.call(this,a,Et(o),l,t)}),i[e](s,...n)}function Ts(t,e,r){const n=Ue(t);Ct(n,"iterate",w0);const i=n[e](...r);return(i===-1||i===!1)&&Va(r[0])?(r[0]=Ue(r[0]),n[e](...r)):i}function Qn(t,e,r=[]){Br(),Fa();const n=Ue(t)[e].apply(t,r);return Ba(),Pr(),n}const ph=_a("__proto__,__v_isRef,__isVue"),uu=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(ln));function mh(t){ln(t)||(t=String(t));const e=Ue(this);return Ct(e,"has",t),e.hasOwnProperty(t)}class du{constructor(e=!1,r=!1){this._isReadonly=e,this._isShallow=r}get(e,r,n){if(r==="__v_skip")return e.__v_skip;const i=this._isReadonly,s=this._isShallow;if(r==="__v_isReactive")return!i;if(r==="__v_isReadonly")return i;if(r==="__v_isShallow")return s;if(r==="__v_raw")return n===(i?s?Eh:mu:s?pu:fu).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const a=Ce(e);if(!i){let l;if(a&&(l=hh[r]))return l;if(r==="hasOwnProperty")return mh}const o=Reflect.get(e,r,Nt(e)?e:n);return(ln(r)?uu.has(r):ph(r))||(i||Ct(e,"get",r),s)?o:Nt(o)?a&&$a(r)?o:o.value:ot(o)?i?gu(o):ja(o):o}}class hu extends du{constructor(e=!1){super(!1,e)}set(e,r,n,i){let s=e[r];if(!this._isShallow){const l=rn(s);if(!tr(n)&&!rn(n)&&(s=Ue(s),n=Ue(n)),!Ce(e)&&Nt(s)&&!Nt(n))return l||(s.value=n),!0}const a=Ce(e)&&$a(r)?Number(r)t,j0=t=>Reflect.getPrototypeOf(t);function wh(t,e,r){return function(...n){const i=this.__v_raw,s=Ue(i),a=Fn(s),o=t==="entries"||t===Symbol.iterator&&a,l=t==="keys"&&a,c=i[t](...n),u=r?na:e?xi:Et;return!e&&Ct(s,"iterate",l?ra:xn),{next(){const{value:f,done:p}=c.next();return p?{value:f,done:p}:{value:o?[u(f[0]),u(f[1])]:u(f),done:p}},[Symbol.iterator](){return this}}}}function U0(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function xh(t,e){const r={get(i){const s=this.__v_raw,a=Ue(s),o=Ue(i);t||(en(i,o)&&Ct(a,"get",i),Ct(a,"get",o));const{has:l}=j0(a),c=e?na:t?xi:Et;if(l.call(a,i))return c(s.get(i));if(l.call(a,o))return c(s.get(o));s!==a&&s.get(i)},get size(){const i=this.__v_raw;return!t&&Ct(Ue(i),"iterate",xn),i.size},has(i){const s=this.__v_raw,a=Ue(s),o=Ue(i);return t||(en(i,o)&&Ct(a,"has",i),Ct(a,"has",o)),i===o?s.has(i):s.has(i)||s.has(o)},forEach(i,s){const a=this,o=a.__v_raw,l=Ue(o),c=e?na:t?xi:Et;return!t&&Ct(l,"iterate",xn),o.forEach((u,f)=>i.call(s,c(u),c(f),a))}};return At(r,t?{add:U0("add"),set:U0("set"),delete:U0("delete"),clear:U0("clear")}:{add(i){!e&&!tr(i)&&!rn(i)&&(i=Ue(i));const s=Ue(this);return j0(s).has.call(s,i)||(s.add(i),Or(s,"add",i,i)),this},set(i,s){!e&&!tr(s)&&!rn(s)&&(s=Ue(s));const a=Ue(this),{has:o,get:l}=j0(a);let c=o.call(a,i);c||(i=Ue(i),c=o.call(a,i));const u=l.call(a,i);return a.set(i,s),c?en(s,u)&&Or(a,"set",i,s):Or(a,"add",i,s),this},delete(i){const s=Ue(this),{has:a,get:o}=j0(s);let l=a.call(s,i);l||(i=Ue(i),l=a.call(s,i)),o&&o.call(s,i);const c=s.delete(i);return l&&Or(s,"delete",i,void 0),c},clear(){const i=Ue(this),s=i.size!==0,a=i.clear();return s&&Or(i,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(i=>{r[i]=wh(i,t,e)}),r}function qa(t,e){const r=xh(t,e);return(n,i,s)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?n:Reflect.get(Ve(r,i)&&i in n?r:n,i,s)}const kh={get:qa(!1,!1)},Sh={get:qa(!1,!0)},Th={get:qa(!0,!1)};const fu=new WeakMap,pu=new WeakMap,mu=new WeakMap,Eh=new WeakMap;function Ah(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ch(t){return t.__v_skip||!Object.isExtensible(t)?0:Ah(Qd(t))}function ja(t){return rn(t)?t:Ua(t,!1,vh,kh,fu)}function Mh(t){return Ua(t,!1,yh,Sh,pu)}function gu(t){return Ua(t,!0,bh,Th,mu)}function Ua(t,e,r,n,i){if(!ot(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const s=Ch(t);if(s===0)return t;const a=i.get(t);if(a)return a;const o=new Proxy(t,s===2?n:r);return i.set(t,o),o}function Bn(t){return rn(t)?Bn(t.__v_raw):!!(t&&t.__v_isReactive)}function rn(t){return!!(t&&t.__v_isReadonly)}function tr(t){return!!(t&&t.__v_isShallow)}function Va(t){return t?!!t.__v_raw:!1}function Ue(t){const e=t&&t.__v_raw;return e?Ue(e):t}function Nh(t){return!Ve(t,"__v_skip")&&Object.isExtensible(t)&&Zc(t,"__v_skip",!0),t}const Et=t=>ot(t)?ja(t):t,xi=t=>ot(t)?gu(t):t;function Nt(t){return t?t.__v_isRef===!0:!1}function Re(t){return Ih(t,!1)}function Ih(t,e){return Nt(t)?t:new Dh(t,e)}class Dh{constructor(e,r){this.dep=new Ha,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=r?e:Ue(e),this._value=r?e:Et(e),this.__v_isShallow=r}get value(){return this.dep.track(),this._value}set value(e){const r=this._rawValue,n=this.__v_isShallow||tr(e)||rn(e);e=n?e:Ue(e),en(e,r)&&(this._rawValue=e,this._value=n?e:Et(e),this.dep.trigger())}}function Rh(t){return Nt(t)?t.value:t}const Oh={get:(t,e,r)=>e==="__v_raw"?t:Rh(Reflect.get(t,e,r)),set:(t,e,r,n)=>{const i=t[e];return Nt(i)&&!Nt(r)?(i.value=r,!0):Reflect.set(t,e,r,n)}};function vu(t){return Bn(t)?t:new Proxy(t,Oh)}class _h{constructor(e,r,n){this.fn=e,this.setter=r,this._value=void 0,this.dep=new Ha(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=y0-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!r,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&et!==this)return iu(this,!0),!0}get value(){const e=this.dep.track();return ou(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function Lh(t,e,r=!1){let n,i;return Ne(t)?n=t:(n=t.get,i=t.set),new _h(n,i,r)}const V0={},ki=new WeakMap;let yn;function zh(t,e=!1,r=yn){if(r){let n=ki.get(r);n||ki.set(r,n=[]),n.push(t)}}function $h(t,e,r=Ze){const{immediate:n,deep:i,once:s,scheduler:a,augmentJob:o,call:l}=r,c=I=>i?I:tr(I)||i===!1||i===0?_r(I,1):_r(I);let u,f,p,g,v=!1,x=!1;if(Nt(t)?(f=()=>t.value,v=tr(t)):Bn(t)?(f=()=>c(t),v=!0):Ce(t)?(x=!0,v=t.some(I=>Bn(I)||tr(I)),f=()=>t.map(I=>{if(Nt(I))return I.value;if(Bn(I))return c(I);if(Ne(I))return l?l(I,2):I()})):Ne(t)?e?f=l?()=>l(t,2):t:f=()=>{if(p){Br();try{p()}finally{Pr()}}const I=yn;yn=u;try{return l?l(t,3,[g]):t(g)}finally{yn=I}}:f=ur,e&&i){const I=f,R=i===!0?1/0:i;f=()=>_r(I(),R)}const y=ch(),C=()=>{u.stop(),y&&y.active&&za(y.effects,u)};if(s&&e){const I=e;e=(...R)=>{I(...R),C()}}let w=x?new Array(t.length).fill(V0):V0;const k=I=>{if(!(!(u.flags&1)||!u.dirty&&!I))if(e){const R=u.run();if(i||v||(x?R.some((_,F)=>en(_,w[F])):en(R,w))){p&&p();const _=yn;yn=u;try{const F=[R,w===V0?void 0:x&&w[0]===V0?[]:w,g];w=R,l?l(e,3,F):e(...F)}finally{yn=_}}}else u.run()};return o&&o(k),u=new ru(f),u.scheduler=a?()=>a(k,!1):k,g=I=>zh(I,!1,u),p=u.onStop=()=>{const I=ki.get(u);if(I){if(l)l(I,4);else for(const R of I)R();ki.delete(u)}},e?n?k(!0):w=u.run():a?a(k.bind(null,!0),!0):u.run(),C.pause=u.pause.bind(u),C.resume=u.resume.bind(u),C.stop=C,C}function _r(t,e=1/0,r){if(e<=0||!ot(t)||t.__v_skip||(r=r||new Set,r.has(t)))return t;if(r.add(t),e--,Nt(t))_r(t.value,e,r);else if(Ce(t))for(let n=0;n{_r(n,e,r)});else if(Xc(t)){for(const n in t)_r(t[n],e,r);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&_r(t[n],e,r)}return t}/** +* @vue/runtime-core v3.5.20 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function M0(t,e,r,n){try{return n?t(...n):t()}catch(i){Xi(i,e,r)}}function Tr(t,e,r,n){if(Ne(t)){const i=M0(t,e,r,n);return i&&Kc(i)&&i.catch(s=>{Xi(s,e,r)}),i}if(Ce(t)){const i=[];for(let s=0;s>>1,i=Ot[n],s=x0(i);s=x0(r)?Ot.push(t):Ot.splice(Bh(e),0,t),t.flags|=1,yu()}}function yu(){Si||(Si=bu.then(xu))}function Ph(t){Ce(t)?Pn.push(...t):Xr&&t.id===-1?Xr.splice(On+1,0,t):t.flags&1||(Pn.push(t),t.flags|=1),yu()}function Qo(t,e,r=br+1){for(;rx0(r)-x0(n));if(Pn.length=0,Xr){Xr.push(...e);return}for(Xr=e,On=0;Ont.id==null?t.flags&2?-1:1/0:t.id;function xu(t){const e=ur;try{for(br=0;br{n._d&&ol(-1);const s=Ti(e);let a;try{a=t(...i)}finally{Ti(s),n._d&&ol(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function Ei(t,e){if(Qt===null)return t;const r=es(Qt),n=t.dirs||(t.dirs=[]);for(let i=0;it.__isTeleport,Uh=Symbol("_leaveCb");function Ga(t,e){t.shapeFlag&6&&t.component?(t.transition=e,Ga(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function Su(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function h0(t,e,r,n,i=!1){if(Ce(t)){t.forEach((v,x)=>h0(v,e&&(Ce(e)?e[x]:e),r,n,i));return}if(f0(n)&&!i){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&h0(t,e,r,n.component.subTree);return}const s=n.shapeFlag&4?es(n.component):n.el,a=i?null:s,{i:o,r:l}=t,c=e&&e.r,u=o.refs===Ze?o.refs={}:o.refs,f=o.setupState,p=Ue(f),g=f===Ze?Wc:v=>Ve(p,v);if(c!=null&&c!==l){if(ft(c))u[c]=null,g(c)&&(f[c]=null);else if(Nt(c)){c.value=null;const v=e;v.k&&(u[v.k]=null)}}if(Ne(l))M0(l,o,12,[a,u]);else{const v=ft(l),x=Nt(l);if(v||x){const y=()=>{if(t.f){const C=v?g(l)?f[l]:u[l]:l.value;if(i)Ce(C)&&za(C,s);else if(Ce(C))C.includes(s)||C.push(s);else if(v)u[l]=[s],g(l)&&(f[l]=u[l]);else{const w=[s];l.value=w,t.k&&(u[t.k]=w)}}else v?(u[l]=a,g(l)&&(f[l]=a)):x&&(l.value=a,t.k&&(u[t.k]=a))};a?(y.id=-1,Vt(y,r)):y()}}}Ki().requestIdleCallback;Ki().cancelIdleCallback;const f0=t=>!!t.type.__asyncLoader,Tu=t=>t.type.__isKeepAlive;function Vh(t,e){Eu(t,"a",e)}function Wh(t,e){Eu(t,"da",e)}function Eu(t,e,r=_t){const n=t.__wdc||(t.__wdc=()=>{let i=r;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(Ji(e,n,r),r){let i=r.parent;for(;i&&i.parent;)Tu(i.parent.vnode)&&Gh(n,e,r,i),i=i.parent}}function Gh(t,e,r,n){const i=Ji(e,t,n,!0);Ya(()=>{za(n[e],i)},r)}function Ji(t,e,r=_t,n=!1){if(r){const i=r[t]||(r[t]=[]),s=e.__weh||(e.__weh=(...a)=>{Br();const o=N0(r),l=Tr(e,r,t,a);return o(),Pr(),l});return n?i.unshift(s):i.push(s),s}}const Ur=t=>(e,r=_t)=>{(!S0||t==="sp")&&Ji(t,(...n)=>e(...n),r)},Kh=Ur("bm"),Ka=Ur("m"),Yh=Ur("bu"),Xh=Ur("u"),Jh=Ur("bum"),Ya=Ur("um"),Zh=Ur("sp"),Qh=Ur("rtg"),ef=Ur("rtc");function tf(t,e=_t){Ji("ec",t,e)}const rf=Symbol.for("v-ndc");function Au(t,e,r,n){let i;const s=r&&r[n],a=Ce(t);if(a||ft(t)){const o=a&&Bn(t);let l=!1,c=!1;o&&(l=!tr(t),c=rn(t),t=Yi(t)),i=new Array(t.length);for(let u=0,f=t.length;ue(o,l,void 0,s&&s[l]));else{const o=Object.keys(t);i=new Array(o.length);for(let l=0,c=o.length;lt?Gu(t)?es(t):ia(t.parent):null,p0=At(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>ia(t.parent),$root:t=>ia(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>Xa(t),$forceUpdate:t=>t.f||(t.f=()=>{Wa(t.update)}),$nextTick:t=>t.n||(t.n=_n.bind(t.proxy)),$watch:t=>Ef.bind(t)}),Es=(t,e)=>t!==Ze&&!t.__isScriptSetup&&Ve(t,e),nf={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:r,setupState:n,data:i,props:s,accessCache:a,type:o,appContext:l}=t;let c;if(e[0]!=="$"){const g=a[e];if(g!==void 0)switch(g){case 1:return n[e];case 2:return i[e];case 4:return r[e];case 3:return s[e]}else{if(Es(n,e))return a[e]=1,n[e];if(i!==Ze&&Ve(i,e))return a[e]=2,i[e];if((c=t.propsOptions[0])&&Ve(c,e))return a[e]=3,s[e];if(r!==Ze&&Ve(r,e))return a[e]=4,r[e];sa&&(a[e]=0)}}const u=p0[e];let f,p;if(u)return e==="$attrs"&&Ct(t.attrs,"get",""),u(t);if((f=o.__cssModules)&&(f=f[e]))return f;if(r!==Ze&&Ve(r,e))return a[e]=4,r[e];if(p=l.config.globalProperties,Ve(p,e))return p[e]},set({_:t},e,r){const{data:n,setupState:i,ctx:s}=t;return Es(i,e)?(i[e]=r,!0):n!==Ze&&Ve(n,e)?(n[e]=r,!0):Ve(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(s[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:n,appContext:i,propsOptions:s,type:a}},o){let l,c;return!!(r[o]||t!==Ze&&o[0]!=="$"&&Ve(t,o)||Es(e,o)||(l=s[0])&&Ve(l,o)||Ve(n,o)||Ve(p0,o)||Ve(i.config.globalProperties,o)||(c=a.__cssModules)&&c[o])},defineProperty(t,e,r){return r.get!=null?t._.accessCache[e]=0:Ve(r,"value")&&this.set(t,e,r.value,null),Reflect.defineProperty(t,e,r)}};function el(t){return Ce(t)?t.reduce((e,r)=>(e[r]=null,e),{}):t}let sa=!0;function sf(t){const e=Xa(t),r=t.proxy,n=t.ctx;sa=!1,e.beforeCreate&&tl(e.beforeCreate,t,"bc");const{data:i,computed:s,methods:a,watch:o,provide:l,inject:c,created:u,beforeMount:f,mounted:p,beforeUpdate:g,updated:v,activated:x,deactivated:y,beforeDestroy:C,beforeUnmount:w,destroyed:k,unmounted:I,render:R,renderTracked:_,renderTriggered:F,errorCaptured:V,serverPrefetch:q,expose:le,inheritAttrs:me,components:Se,directives:ze,filters:Le}=e;if(c&&af(c,n,null),a)for(const xe in a){const fe=a[xe];Ne(fe)&&(n[xe]=fe.bind(r))}if(i){const xe=i.call(r,r);ot(xe)&&(t.data=ja(xe))}if(sa=!0,s)for(const xe in s){const fe=s[xe],je=Ne(fe)?fe.bind(r,r):Ne(fe.get)?fe.get.bind(r,r):ur,Be=!Ne(fe)&&Ne(fe.set)?fe.set.bind(r):ur,Ye=Yu({get:je,set:Be});Object.defineProperty(n,xe,{enumerable:!0,configurable:!0,get:()=>Ye.value,set:ge=>Ye.value=ge})}if(o)for(const xe in o)Cu(o[xe],n,r,xe);if(l){const xe=Ne(l)?l.call(r):l;Reflect.ownKeys(xe).forEach(fe=>{hf(fe,xe[fe])})}u&&tl(u,t,"c");function Oe(xe,fe){Ce(fe)?fe.forEach(je=>xe(je.bind(r))):fe&&xe(fe.bind(r))}if(Oe(Kh,f),Oe(Ka,p),Oe(Yh,g),Oe(Xh,v),Oe(Vh,x),Oe(Wh,y),Oe(tf,V),Oe(ef,_),Oe(Qh,F),Oe(Jh,w),Oe(Ya,I),Oe(Zh,q),Ce(le))if(le.length){const xe=t.exposed||(t.exposed={});le.forEach(fe=>{Object.defineProperty(xe,fe,{get:()=>r[fe],set:je=>r[fe]=je,enumerable:!0})})}else t.exposed||(t.exposed={});R&&t.render===ur&&(t.render=R),me!=null&&(t.inheritAttrs=me),Se&&(t.components=Se),ze&&(t.directives=ze),q&&Su(t)}function af(t,e,r=ur){Ce(t)&&(t=aa(t));for(const n in t){const i=t[n];let s;ot(i)?"default"in i?s=ui(i.from||n,i.default,!0):s=ui(i.from||n):s=ui(i),Nt(s)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:a=>s.value=a}):e[n]=s}}function tl(t,e,r){Tr(Ce(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,r)}function Cu(t,e,r,n){let i=n.includes(".")?Pu(r,n):()=>r[n];if(ft(t)){const s=e[t];Ne(s)&&m0(i,s)}else if(Ne(t))m0(i,t.bind(r));else if(ot(t))if(Ce(t))t.forEach(s=>Cu(s,e,r,n));else{const s=Ne(t.handler)?t.handler.bind(r):e[t.handler];Ne(s)&&m0(i,s,t)}}function Xa(t){const e=t.type,{mixins:r,extends:n}=e,{mixins:i,optionsCache:s,config:{optionMergeStrategies:a}}=t.appContext,o=s.get(e);let l;return o?l=o:!i.length&&!r&&!n?l=e:(l={},i.length&&i.forEach(c=>Ai(l,c,a,!0)),Ai(l,e,a)),ot(e)&&s.set(e,l),l}function Ai(t,e,r,n=!1){const{mixins:i,extends:s}=e;s&&Ai(t,s,r,!0),i&&i.forEach(a=>Ai(t,a,r,!0));for(const a in e)if(!(n&&a==="expose")){const o=of[a]||r&&r[a];t[a]=o?o(t[a],e[a]):e[a]}return t}const of={data:rl,props:nl,emits:nl,methods:a0,computed:a0,beforeCreate:Rt,created:Rt,beforeMount:Rt,mounted:Rt,beforeUpdate:Rt,updated:Rt,beforeDestroy:Rt,beforeUnmount:Rt,destroyed:Rt,unmounted:Rt,activated:Rt,deactivated:Rt,errorCaptured:Rt,serverPrefetch:Rt,components:a0,directives:a0,watch:cf,provide:rl,inject:lf};function rl(t,e){return e?t?function(){return At(Ne(t)?t.call(this,this):t,Ne(e)?e.call(this,this):e)}:e:t}function lf(t,e){return a0(aa(t),aa(e))}function aa(t){if(Ce(t)){const e={};for(let r=0;r1)return r&&Ne(e)?e.call(n&&n.proxy):e}}const Nu={},Iu=()=>Object.create(Nu),Du=t=>Object.getPrototypeOf(t)===Nu;function ff(t,e,r,n=!1){const i={},s=Iu();t.propsDefaults=Object.create(null),Ru(t,e,i,s);for(const a in t.propsOptions[0])a in i||(i[a]=void 0);r?t.props=n?i:Mh(i):t.type.props?t.props=i:t.props=s,t.attrs=s}function pf(t,e,r,n){const{props:i,attrs:s,vnode:{patchFlag:a}}=t,o=Ue(i),[l]=t.propsOptions;let c=!1;if((n||a>0)&&!(a&16)){if(a&8){const u=t.vnode.dynamicProps;for(let f=0;f{l=!0;const[p,g]=Ou(f,e,!0);At(a,p),g&&o.push(...g)};!r&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!s&&!l)return ot(t)&&n.set(t,$n),$n;if(Ce(s))for(let u=0;ut==="_"||t==="_ctx"||t==="$stable",Za=t=>Ce(t)?t.map(wr):[wr(t)],gf=(t,e,r)=>{if(e._n)return e;const n=Hh((...i)=>Za(e(...i)),r);return n._c=!1,n},_u=(t,e,r)=>{const n=t._ctx;for(const i in t){if(Ja(i))continue;const s=t[i];if(Ne(s))e[i]=gf(i,s,n);else if(s!=null){const a=Za(s);e[i]=()=>a}}},Lu=(t,e)=>{const r=Za(e);t.slots.default=()=>r},zu=(t,e,r)=>{for(const n in e)(r||!Ja(n))&&(t[n]=e[n])},vf=(t,e,r)=>{const n=t.slots=Iu();if(t.vnode.shapeFlag&32){const i=e._;i?(zu(n,e,r),r&&Zc(n,"_",i,!0)):_u(e,n)}else e&&Lu(t,e)},bf=(t,e,r)=>{const{vnode:n,slots:i}=t;let s=!0,a=Ze;if(n.shapeFlag&32){const o=e._;o?r&&o===1?s=!1:zu(i,e,r):(s=!e.$stable,_u(e,i)),a=e}else e&&(Lu(t,e),a={default:1});if(s)for(const o in i)!Ja(o)&&a[o]==null&&delete i[o]},Vt=Rf;function yf(t){return wf(t)}function wf(t,e){const r=Ki();r.__VUE__=!0;const{insert:n,remove:i,patchProp:s,createElement:a,createText:o,createComment:l,setText:c,setElementText:u,parentNode:f,nextSibling:p,setScopeId:g=ur,insertStaticContent:v}=t,x=(S,M,z,H=null,B=null,U=null,Z=void 0,ee=null,re=!!M.dynamicChildren)=>{if(S===M)return;S&&!e0(S,M)&&(H=lt(S),ge(S,B,U,!0),S=null),M.patchFlag===-2&&(re=!1,M.dynamicChildren=null);const{type:K,ref:oe,shapeFlag:ae}=M;switch(K){case Qi:y(S,M,z,H);break;case nn:C(S,M,z,H);break;case di:S==null&&w(M,z,H,Z);break;case cr:Se(S,M,z,H,B,U,Z,ee,re);break;default:ae&1?R(S,M,z,H,B,U,Z,ee,re):ae&6?ze(S,M,z,H,B,U,Z,ee,re):(ae&64||ae&128)&&K.process(S,M,z,H,B,U,Z,ee,re,J)}oe!=null&&B?h0(oe,S&&S.ref,U,M||S,!M):oe==null&&S&&S.ref!=null&&h0(S.ref,null,U,S,!0)},y=(S,M,z,H)=>{if(S==null)n(M.el=o(M.children),z,H);else{const B=M.el=S.el;M.children!==S.children&&c(B,M.children)}},C=(S,M,z,H)=>{S==null?n(M.el=l(M.children||""),z,H):M.el=S.el},w=(S,M,z,H)=>{[S.el,S.anchor]=v(S.children,M,z,H,S.el,S.anchor)},k=({el:S,anchor:M},z,H)=>{let B;for(;S&&S!==M;)B=p(S),n(S,z,H),S=B;n(M,z,H)},I=({el:S,anchor:M})=>{let z;for(;S&&S!==M;)z=p(S),i(S),S=z;i(M)},R=(S,M,z,H,B,U,Z,ee,re)=>{M.type==="svg"?Z="svg":M.type==="math"&&(Z="mathml"),S==null?_(M,z,H,B,U,Z,ee,re):q(S,M,B,U,Z,ee,re)},_=(S,M,z,H,B,U,Z,ee)=>{let re,K;const{props:oe,shapeFlag:ae,transition:pe,dirs:ke}=S;if(re=S.el=a(S.type,U,oe&&oe.is,oe),ae&8?u(re,S.children):ae&16&&V(S.children,re,null,H,B,As(S,U),Z,ee),ke&&pn(S,null,H,"created"),F(re,S,S.scopeId,Z,H),oe){for(const Ke in oe)Ke!=="value"&&!c0(Ke)&&s(re,Ke,null,oe[Ke],U,H);"value"in oe&&s(re,"value",null,oe.value,U),(K=oe.onVnodeBeforeMount)&&mr(K,H,S)}ke&&pn(S,null,H,"beforeMount");const De=xf(B,pe);De&&pe.beforeEnter(re),n(re,M,z),((K=oe&&oe.onVnodeMounted)||De||ke)&&Vt(()=>{K&&mr(K,H,S),De&&pe.enter(re),ke&&pn(S,null,H,"mounted")},B)},F=(S,M,z,H,B)=>{if(z&&g(S,z),H)for(let U=0;U{for(let K=re;K{const ee=M.el=S.el;let{patchFlag:re,dynamicChildren:K,dirs:oe}=M;re|=S.patchFlag&16;const ae=S.props||Ze,pe=M.props||Ze;let ke;if(z&&mn(z,!1),(ke=pe.onVnodeBeforeUpdate)&&mr(ke,z,M,S),oe&&pn(M,S,z,"beforeUpdate"),z&&mn(z,!0),(ae.innerHTML&&pe.innerHTML==null||ae.textContent&&pe.textContent==null)&&u(ee,""),K?le(S.dynamicChildren,K,ee,z,H,As(M,B),U):Z||fe(S,M,ee,null,z,H,As(M,B),U,!1),re>0){if(re&16)me(ee,ae,pe,z,B);else if(re&2&&ae.class!==pe.class&&s(ee,"class",null,pe.class,B),re&4&&s(ee,"style",ae.style,pe.style,B),re&8){const De=M.dynamicProps;for(let Ke=0;Ke{ke&&mr(ke,z,M,S),oe&&pn(M,S,z,"updated")},H)},le=(S,M,z,H,B,U,Z)=>{for(let ee=0;ee{if(M!==z){if(M!==Ze)for(const U in M)!c0(U)&&!(U in z)&&s(S,U,M[U],null,B,H);for(const U in z){if(c0(U))continue;const Z=z[U],ee=M[U];Z!==ee&&U!=="value"&&s(S,U,ee,Z,B,H)}"value"in z&&s(S,"value",M.value,z.value,B)}},Se=(S,M,z,H,B,U,Z,ee,re)=>{const K=M.el=S?S.el:o(""),oe=M.anchor=S?S.anchor:o("");let{patchFlag:ae,dynamicChildren:pe,slotScopeIds:ke}=M;ke&&(ee=ee?ee.concat(ke):ke),S==null?(n(K,z,H),n(oe,z,H),V(M.children||[],z,oe,B,U,Z,ee,re)):ae>0&&ae&64&&pe&&S.dynamicChildren?(le(S.dynamicChildren,pe,z,B,U,Z,ee),(M.key!=null||B&&M===B.subTree)&&$u(S,M,!0)):fe(S,M,z,oe,B,U,Z,ee,re)},ze=(S,M,z,H,B,U,Z,ee,re)=>{M.slotScopeIds=ee,S==null?M.shapeFlag&512?B.ctx.activate(M,z,H,Z,re):Le(M,z,H,B,U,Z,re):Ge(S,M,re)},Le=(S,M,z,H,B,U,Z)=>{const ee=S.component=Pf(S,H,B);if(Tu(S)&&(ee.ctx.renderer=J),qf(ee,!1,Z),ee.asyncDep){if(B&&B.registerDep(ee,Oe,Z),!S.el){const re=ee.subTree=Xt(nn);C(null,re,M,z),S.placeholder=re.el}}else Oe(ee,S,M,z,B,U,Z)},Ge=(S,M,z)=>{const H=M.component=S.component;if(If(S,M,z))if(H.asyncDep&&!H.asyncResolved){xe(H,M,z);return}else H.next=M,H.update();else M.el=S.el,H.vnode=M},Oe=(S,M,z,H,B,U,Z)=>{const ee=()=>{if(S.isMounted){let{next:ae,bu:pe,u:ke,parent:De,vnode:Ke}=S;{const wt=Fu(S);if(wt){ae&&(ae.el=Ke.el,xe(S,ae,Z)),wt.asyncDep.then(()=>{S.isUnmounted||ee()});return}}let Pe=ae,Tt;mn(S,!1),ae?(ae.el=Ke.el,xe(S,ae,Z)):ae=Ke,pe&&ci(pe),(Tt=ae.props&&ae.props.onVnodeBeforeUpdate)&&mr(Tt,De,ae,Ke),mn(S,!0);const nt=Cs(S),gt=S.subTree;S.subTree=nt,x(gt,nt,f(gt.el),lt(gt),S,B,U),ae.el=nt.el,Pe===null&&Df(S,nt.el),ke&&Vt(ke,B),(Tt=ae.props&&ae.props.onVnodeUpdated)&&Vt(()=>mr(Tt,De,ae,Ke),B)}else{let ae;const{el:pe,props:ke}=M,{bm:De,m:Ke,parent:Pe,root:Tt,type:nt}=S,gt=f0(M);if(mn(S,!1),De&&ci(De),!gt&&(ae=ke&&ke.onVnodeBeforeMount)&&mr(ae,Pe,M),mn(S,!0),pe&&be){const wt=()=>{S.subTree=Cs(S),be(pe,S.subTree,S,B,null)};gt&&nt.__asyncHydrate?nt.__asyncHydrate(pe,S,wt):wt()}else{Tt.ce&&Tt.ce._def.shadowRoot!==!1&&Tt.ce._injectChildStyle(nt);const wt=S.subTree=Cs(S);x(null,wt,z,H,S,B,U),M.el=wt.el}if(Ke&&Vt(Ke,B),!gt&&(ae=ke&&ke.onVnodeMounted)){const wt=M;Vt(()=>mr(ae,Pe,wt),B)}(M.shapeFlag&256||Pe&&f0(Pe.vnode)&&Pe.vnode.shapeFlag&256)&&S.a&&Vt(S.a,B),S.isMounted=!0,M=z=H=null}};S.scope.on();const re=S.effect=new ru(ee);S.scope.off();const K=S.update=re.run.bind(re),oe=S.job=re.runIfDirty.bind(re);oe.i=S,oe.id=S.uid,re.scheduler=()=>Wa(oe),mn(S,!0),K()},xe=(S,M,z)=>{M.component=S;const H=S.vnode.props;S.vnode=M,S.next=null,pf(S,M.props,H,z),bf(S,M.children,z),Br(),Qo(S),Pr()},fe=(S,M,z,H,B,U,Z,ee,re=!1)=>{const K=S&&S.children,oe=S?S.shapeFlag:0,ae=M.children,{patchFlag:pe,shapeFlag:ke}=M;if(pe>0){if(pe&128){Be(K,ae,z,H,B,U,Z,ee,re);return}else if(pe&256){je(K,ae,z,H,B,U,Z,ee,re);return}}ke&8?(oe&16&&St(K,B,U),ae!==K&&u(z,ae)):oe&16?ke&16?Be(K,ae,z,H,B,U,Z,ee,re):St(K,B,U,!0):(oe&8&&u(z,""),ke&16&&V(ae,z,H,B,U,Z,ee,re))},je=(S,M,z,H,B,U,Z,ee,re)=>{S=S||$n,M=M||$n;const K=S.length,oe=M.length,ae=Math.min(K,oe);let pe;for(pe=0;peoe?St(S,B,U,!0,!1,ae):V(M,z,H,B,U,Z,ee,re,ae)},Be=(S,M,z,H,B,U,Z,ee,re)=>{let K=0;const oe=M.length;let ae=S.length-1,pe=oe-1;for(;K<=ae&&K<=pe;){const ke=S[K],De=M[K]=re?Jr(M[K]):wr(M[K]);if(e0(ke,De))x(ke,De,z,null,B,U,Z,ee,re);else break;K++}for(;K<=ae&&K<=pe;){const ke=S[ae],De=M[pe]=re?Jr(M[pe]):wr(M[pe]);if(e0(ke,De))x(ke,De,z,null,B,U,Z,ee,re);else break;ae--,pe--}if(K>ae){if(K<=pe){const ke=pe+1,De=kepe)for(;K<=ae;)ge(S[K],B,U,!0),K++;else{const ke=K,De=K,Ke=new Map;for(K=De;K<=pe;K++){const It=M[K]=re?Jr(M[K]):wr(M[K]);It.key!=null&&Ke.set(It.key,K)}let Pe,Tt=0;const nt=pe-De+1;let gt=!1,wt=0;const fn=new Array(nt);for(K=0;K=nt){ge(It,B,U,!0);continue}let Bt;if(It.key!=null)Bt=Ke.get(It.key);else for(Pe=De;Pe<=pe;Pe++)if(fn[Pe-De]===0&&e0(It,M[Pe])){Bt=Pe;break}Bt===void 0?ge(It,B,U,!0):(fn[Bt-De]=K+1,Bt>=wt?wt=Bt:gt=!0,x(It,M[Bt],z,null,B,U,Z,ee,re),Tt++)}const F0=gt?kf(fn):$n;for(Pe=F0.length-1,K=nt-1;K>=0;K--){const It=De+K,Bt=M[It],B0=M[It+1],P0=It+1{const{el:U,type:Z,transition:ee,children:re,shapeFlag:K}=S;if(K&6){Ye(S.component.subTree,M,z,H);return}if(K&128){S.suspense.move(M,z,H);return}if(K&64){Z.move(S,M,z,J);return}if(Z===cr){n(U,M,z);for(let ae=0;aeee.enter(U),B);else{const{leave:ae,delayLeave:pe,afterLeave:ke}=ee,De=()=>{S.ctx.isUnmounted?i(U):n(U,M,z)},Ke=()=>{U._isLeaving&&U[Uh](!0),ae(U,()=>{De(),ke&&ke()})};pe?pe(U,De,Ke):Ke()}else n(U,M,z)},ge=(S,M,z,H=!1,B=!1)=>{const{type:U,props:Z,ref:ee,children:re,dynamicChildren:K,shapeFlag:oe,patchFlag:ae,dirs:pe,cacheIndex:ke}=S;if(ae===-2&&(B=!1),ee!=null&&(Br(),h0(ee,null,z,S,!0),Pr()),ke!=null&&(M.renderCache[ke]=void 0),oe&256){M.ctx.deactivate(S);return}const De=oe&1&&pe,Ke=!f0(S);let Pe;if(Ke&&(Pe=Z&&Z.onVnodeBeforeUnmount)&&mr(Pe,M,S),oe&6)yt(S.component,z,H);else{if(oe&128){S.suspense.unmount(z,H);return}De&&pn(S,null,M,"beforeUnmount"),oe&64?S.type.remove(S,M,z,J,H):K&&!K.hasOnce&&(U!==cr||ae>0&&ae&64)?St(K,M,z,!1,!0):(U===cr&&ae&384||!B&&oe&16)&&St(re,M,z),H&&Ft(S)}(Ke&&(Pe=Z&&Z.onVnodeUnmounted)||De)&&Vt(()=>{Pe&&mr(Pe,M,S),De&&pn(S,null,M,"unmounted")},z)},Ft=S=>{const{type:M,el:z,anchor:H,transition:B}=S;if(M===cr){ht(z,H);return}if(M===di){I(S);return}const U=()=>{i(z),B&&!B.persisted&&B.afterLeave&&B.afterLeave()};if(S.shapeFlag&1&&B&&!B.persisted){const{leave:Z,delayLeave:ee}=B,re=()=>Z(z,U);ee?ee(S.el,U,re):re()}else U()},ht=(S,M)=>{let z;for(;S!==M;)z=p(S),i(S),S=z;i(M)},yt=(S,M,z)=>{const{bum:H,scope:B,job:U,subTree:Z,um:ee,m:re,a:K}=S;sl(re),sl(K),H&&ci(H),B.stop(),U&&(U.flags|=8,ge(Z,S,M,z)),ee&&Vt(ee,M),Vt(()=>{S.isUnmounted=!0},M)},St=(S,M,z,H=!1,B=!1,U=0)=>{for(let Z=U;Z{if(S.shapeFlag&6)return lt(S.component.subTree);if(S.shapeFlag&128)return S.suspense.next();const M=p(S.anchor||S.el),z=M&&M[qh];return z?p(z):M};let j=!1;const G=(S,M,z)=>{S==null?M._vnode&&ge(M._vnode,null,null,!0):x(M._vnode||null,S,M,null,null,null,z),M._vnode=S,j||(j=!0,Qo(),wu(),j=!1)},J={p:x,um:ge,m:Ye,r:Ft,mt:Le,mc:V,pc:fe,pbc:le,n:lt,o:t};let ne,be;return e&&([ne,be]=e(J)),{render:G,hydrate:ne,createApp:df(G,ne)}}function As({type:t,props:e},r){return r==="svg"&&t==="foreignObject"||r==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:r}function mn({effect:t,job:e},r){r?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function xf(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function $u(t,e,r=!1){const n=t.children,i=e.children;if(Ce(n)&&Ce(i))for(let s=0;s>1,t[r[o]]0&&(e[n]=r[s-1]),r[s]=n)}}for(s=r.length,a=r[s-1];s-- >0;)r[s]=a,a=e[a];return r}function Fu(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:Fu(e)}function sl(t){if(t)for(let e=0;eui(Sf);function m0(t,e,r){return Bu(t,e,r)}function Bu(t,e,r=Ze){const{immediate:n,deep:i,flush:s,once:a}=r,o=At({},r),l=e&&n||!e&&s!=="post";let c;if(S0){if(s==="sync"){const g=Tf();c=g.__watcherHandles||(g.__watcherHandles=[])}else if(!l){const g=()=>{};return g.stop=ur,g.resume=ur,g.pause=ur,g}}const u=_t;o.call=(g,v,x)=>Tr(g,u,v,x);let f=!1;s==="post"?o.scheduler=g=>{Vt(g,u&&u.suspense)}:s!=="sync"&&(f=!0,o.scheduler=(g,v)=>{v?g():Wa(g)}),o.augmentJob=g=>{e&&(g.flags|=4),f&&(g.flags|=2,u&&(g.id=u.uid,g.i=u))};const p=$h(t,e,o);return S0&&(c?c.push(p):l&&p()),p}function Ef(t,e,r){const n=this.proxy,i=ft(t)?t.includes(".")?Pu(n,t):()=>n[t]:t.bind(n,n);let s;Ne(e)?s=e:(s=e.handler,r=e);const a=N0(this),o=Bu(i,s.bind(n),r);return a(),o}function Pu(t,e){const r=e.split(".");return()=>{let n=t;for(let i=0;ie==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${tn(e)}Modifiers`]||t[`${cn(e)}Modifiers`];function Cf(t,e,...r){if(t.isUnmounted)return;const n=t.vnode.props||Ze;let i=r;const s=e.startsWith("update:"),a=s&&Af(n,e.slice(7));a&&(a.trim&&(i=r.map(u=>ft(u)?u.trim():u)),a.number&&(i=r.map(Qs)));let o,l=n[o=ws(e)]||n[o=ws(tn(e))];!l&&s&&(l=n[o=ws(cn(e))]),l&&Tr(l,t,6,i);const c=n[o+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[o])return;t.emitted[o]=!0,Tr(c,t,6,i)}}function Hu(t,e,r=!1){const n=e.emitsCache,i=n.get(t);if(i!==void 0)return i;const s=t.emits;let a={},o=!1;if(!Ne(t)){const l=c=>{const u=Hu(c,e,!0);u&&(o=!0,At(a,u))};!r&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!s&&!o?(ot(t)&&n.set(t,null),null):(Ce(s)?s.forEach(l=>a[l]=null):At(a,s),ot(t)&&n.set(t,a),a)}function Zi(t,e){return!t||!Vi(e)?!1:(e=e.slice(2).replace(/Once$/,""),Ve(t,e[0].toLowerCase()+e.slice(1))||Ve(t,cn(e))||Ve(t,e))}function Cs(t){const{type:e,vnode:r,proxy:n,withProxy:i,propsOptions:[s],slots:a,attrs:o,emit:l,render:c,renderCache:u,props:f,data:p,setupState:g,ctx:v,inheritAttrs:x}=t,y=Ti(t);let C,w;try{if(r.shapeFlag&4){const I=i||n,R=I;C=wr(c.call(R,I,u,f,g,p,v)),w=o}else{const I=e;C=wr(I.length>1?I(f,{attrs:o,slots:a,emit:l}):I(f,null)),w=e.props?o:Mf(o)}}catch(I){g0.length=0,Xi(I,t,1),C=Xt(nn)}let k=C;if(w&&x!==!1){const I=Object.keys(w),{shapeFlag:R}=k;I.length&&R&7&&(s&&I.some(La)&&(w=Nf(w,s)),k=Wn(k,w,!1,!0))}return r.dirs&&(k=Wn(k,null,!1,!0),k.dirs=k.dirs?k.dirs.concat(r.dirs):r.dirs),r.transition&&Ga(k,r.transition),C=k,Ti(y),C}const Mf=t=>{let e;for(const r in t)(r==="class"||r==="style"||Vi(r))&&((e||(e={}))[r]=t[r]);return e},Nf=(t,e)=>{const r={};for(const n in t)(!La(n)||!(n.slice(9)in e))&&(r[n]=t[n]);return r};function If(t,e,r){const{props:n,children:i,component:s}=t,{props:a,children:o,patchFlag:l}=e,c=s.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?al(n,a,c):!!a;if(l&8){const u=e.dynamicProps;for(let f=0;ft.__isSuspense;function Rf(t,e){e&&e.pendingBranch?Ce(t)?e.effects.push(...t):e.effects.push(t):Ph(t)}const cr=Symbol.for("v-fgt"),Qi=Symbol.for("v-txt"),nn=Symbol.for("v-cmt"),di=Symbol.for("v-stc"),g0=[];let Yt=null;function Fe(t=!1){g0.push(Yt=t?null:[])}function Of(){g0.pop(),Yt=g0[g0.length-1]||null}let k0=1;function ol(t,e=!1){k0+=t,t<0&&Yt&&e&&(Yt.hasOnce=!0)}function ju(t){return t.dynamicChildren=k0>0?Yt||$n:null,Of(),k0>0&&Yt&&Yt.push(t),t}function He(t,e,r,n,i,s){return ju(Y(t,e,r,n,i,s,!0))}function _f(t,e,r,n,i){return ju(Xt(t,e,r,n,i,!0))}function Uu(t){return t?t.__v_isVNode===!0:!1}function e0(t,e){return t.type===e.type&&t.key===e.key}const Vu=({key:t})=>t??null,hi=({ref:t,ref_key:e,ref_for:r})=>(typeof t=="number"&&(t=""+t),t!=null?ft(t)||Nt(t)||Ne(t)?{i:Qt,r:t,k:e,f:!!r}:t:null);function Y(t,e=null,r=null,n=0,i=null,s=t===cr?0:1,a=!1,o=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Vu(e),ref:e&&hi(e),scopeId:ku,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Qt};return o?(Qa(l,r),s&128&&t.normalize(l)):r&&(l.shapeFlag|=ft(r)?8:16),k0>0&&!a&&Yt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Yt.push(l),l}const Xt=Lf;function Lf(t,e=null,r=null,n=0,i=null,s=!1){if((!t||t===rf)&&(t=nn),Uu(t)){const o=Wn(t,e,!0);return r&&Qa(o,r),k0>0&&!s&&Yt&&(o.shapeFlag&6?Yt[Yt.indexOf(t)]=o:Yt.push(o)),o.patchFlag=-2,o}if(Wf(t)&&(t=t.__vccOpts),e){e=zf(e);let{class:o,style:l}=e;o&&!ft(o)&&(e.class=Vn(o)),ot(l)&&(Va(l)&&!Ce(l)&&(l=At({},l)),e.style=Un(l))}const a=ft(t)?1:qu(t)?128:jh(t)?64:ot(t)?4:Ne(t)?2:0;return Y(t,e,r,n,i,a,s,!0)}function zf(t){return t?Va(t)||Du(t)?At({},t):t:null}function Wn(t,e,r=!1,n=!1){const{props:i,ref:s,patchFlag:a,children:o,transition:l}=t,c=e?$f(i||{},e):i,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&Vu(c),ref:e&&e.ref?r&&s?Ce(s)?s.concat(hi(e)):[s,hi(e)]:hi(e):s,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:o,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==cr?a===-1?16:a|16:a,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Wn(t.ssContent),ssFallback:t.ssFallback&&Wn(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&n&&Ga(u,l.clone(u)),u}function Wu(t=" ",e=0){return Xt(Qi,null,t,e)}function ll(t,e){const r=Xt(di,null,t);return r.staticCount=e,r}function yr(t="",e=!1){return e?(Fe(),_f(nn,null,t)):Xt(nn,null,t)}function wr(t){return t==null||typeof t=="boolean"?Xt(nn):Ce(t)?Xt(cr,null,t.slice()):Uu(t)?Jr(t):Xt(Qi,null,String(t))}function Jr(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Wn(t)}function Qa(t,e){let r=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(Ce(e))r=16;else if(typeof e=="object")if(n&65){const i=e.default;i&&(i._c&&(i._d=!1),Qa(t,i()),i._c&&(i._d=!0));return}else{r=32;const i=e._;!i&&!Du(e)?e._ctx=Qt:i===3&&Qt&&(Qt.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Ne(e)?(e={default:e,_ctx:Qt},r=32):(e=String(e),n&64?(r=16,e=[Wu(e)]):r=8);t.children=e,t.shapeFlag|=r}function $f(...t){const e={};for(let r=0;r_t||Qt;let Ci,la;{const t=Ki(),e=(r,n)=>{let i;return(i=t[r])||(i=t[r]=[]),i.push(n),s=>{i.length>1?i.forEach(a=>a(s)):i[0](s)}};Ci=e("__VUE_INSTANCE_SETTERS__",r=>_t=r),la=e("__VUE_SSR_SETTERS__",r=>S0=r)}const N0=t=>{const e=_t;return Ci(t),t.scope.on(),()=>{t.scope.off(),Ci(e)}},cl=()=>{_t&&_t.scope.off(),Ci(null)};function Gu(t){return t.vnode.shapeFlag&4}let S0=!1;function qf(t,e=!1,r=!1){e&&la(e);const{props:n,children:i}=t.vnode,s=Gu(t);ff(t,n,s,e),vf(t,i,r||e);const a=s?jf(t,e):void 0;return e&&la(!1),a}function jf(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,nf);const{setup:n}=r;if(n){Br();const i=t.setupContext=n.length>1?Vf(t):null,s=N0(t),a=M0(n,t,0,[t.props,i]),o=Kc(a);if(Pr(),s(),(o||t.sp)&&!f0(t)&&Su(t),o){if(a.then(cl,cl),e)return a.then(l=>{ul(t,l,e)}).catch(l=>{Xi(l,t,0)});t.asyncDep=a}else ul(t,a,e)}else Ku(t,e)}function ul(t,e,r){Ne(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:ot(e)&&(t.setupState=vu(e)),Ku(t,r)}let dl;function Ku(t,e,r){const n=t.type;if(!t.render){if(!e&&dl&&!n.render){const i=n.template||Xa(t).template;if(i){const{isCustomElement:s,compilerOptions:a}=t.appContext.config,{delimiters:o,compilerOptions:l}=n,c=At(At({isCustomElement:s,delimiters:o},a),l);n.render=dl(i,c)}}t.render=n.render||ur}{const i=N0(t);Br();try{sf(t)}finally{Pr(),i()}}}const Uf={get(t,e){return Ct(t,"get",""),t[e]}};function Vf(t){const e=r=>{t.exposed=r||{}};return{attrs:new Proxy(t.attrs,Uf),slots:t.slots,emit:t.emit,expose:e}}function es(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(vu(Nh(t.exposed)),{get(e,r){if(r in e)return e[r];if(r in p0)return p0[r](t)},has(e,r){return r in e||r in p0}})):t.proxy}function Wf(t){return Ne(t)&&"__vccOpts"in t}const Yu=(t,e)=>Lh(t,e,S0),Gf="3.5.20";/** +* @vue/runtime-dom v3.5.20 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let ca;const hl=typeof window<"u"&&window.trustedTypes;if(hl)try{ca=hl.createPolicy("vue",{createHTML:t=>t})}catch{}const Xu=ca?t=>ca.createHTML(t):t=>t,Kf="http://www.w3.org/2000/svg",Yf="http://www.w3.org/1998/Math/MathML",Dr=typeof document<"u"?document:null,fl=Dr&&Dr.createElement("template"),Xf={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,n)=>{const i=e==="svg"?Dr.createElementNS(Kf,t):e==="mathml"?Dr.createElementNS(Yf,t):r?Dr.createElement(t,{is:r}):Dr.createElement(t);return t==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:t=>Dr.createTextNode(t),createComment:t=>Dr.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Dr.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,r,n,i,s){const a=r?r.previousSibling:e.lastChild;if(i&&(i===s||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),r),!(i===s||!(i=i.nextSibling)););else{fl.innerHTML=Xu(n==="svg"?`${t}`:n==="mathml"?`${t}`:t);const o=fl.content;if(n==="svg"||n==="mathml"){const l=o.firstChild;for(;l.firstChild;)o.appendChild(l.firstChild);o.removeChild(l)}e.insertBefore(o,r)}return[a?a.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}},Jf=Symbol("_vtc");function Zf(t,e,r){const n=t[Jf];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}const Mi=Symbol("_vod"),Ju=Symbol("_vsh"),Qf={name:"show",beforeMount(t,{value:e},{transition:r}){t[Mi]=t.style.display==="none"?"":t.style.display,r&&e?r.beforeEnter(t):t0(t,e)},mounted(t,{value:e},{transition:r}){r&&e&&r.enter(t)},updated(t,{value:e,oldValue:r},{transition:n}){!e!=!r&&(n?e?(n.beforeEnter(t),t0(t,!0),n.enter(t)):n.leave(t,()=>{t0(t,!1)}):t0(t,e))},beforeUnmount(t,{value:e}){t0(t,e)}};function t0(t,e){t.style.display=e?t[Mi]:"none",t[Ju]=!e}const ep=Symbol(""),tp=/(^|;)\s*display\s*:/;function rp(t,e,r){const n=t.style,i=ft(r);let s=!1;if(r&&!i){if(e)if(ft(e))for(const a of e.split(";")){const o=a.slice(0,a.indexOf(":")).trim();r[o]==null&&fi(n,o,"")}else for(const a in e)r[a]==null&&fi(n,a,"");for(const a in r)a==="display"&&(s=!0),fi(n,a,r[a])}else if(i){if(e!==r){const a=n[ep];a&&(r+=";"+a),n.cssText=r,s=tp.test(r)}}else e&&t.removeAttribute("style");Mi in t&&(t[Mi]=s?n.display:"",t[Ju]&&(n.display="none"))}const pl=/\s*!important$/;function fi(t,e,r){if(Ce(r))r.forEach(n=>fi(t,e,n));else if(r==null&&(r=""),e.startsWith("--"))t.setProperty(e,r);else{const n=np(t,e);pl.test(r)?t.setProperty(cn(n),r.replace(pl,""),"important"):t[n]=r}}const ml=["Webkit","Moz","ms"],Ms={};function np(t,e){const r=Ms[e];if(r)return r;let n=tn(e);if(n!=="filter"&&n in t)return Ms[e]=n;n=Jc(n);for(let i=0;iNs||(op.then(()=>Ns=0),Ns=Date.now());function cp(t,e){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;Tr(up(n,r.value),e,5,[n])};return r.value=t,r.attached=lp(),r}function up(t,e){if(Ce(e)){const r=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{r.call(t),t._stopped=!0},e.map(n=>i=>!i._stopped&&n&&n(i))}else return e}const xl=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,dp=(t,e,r,n,i,s)=>{const a=i==="svg";e==="class"?Zf(t,n,a):e==="style"?rp(t,r,n):Vi(e)?La(e)||sp(t,e,r,n,s):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):hp(t,e,n,a))?(bl(t,e,n),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&vl(t,e,n,a,s,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!ft(n))?bl(t,tn(e),n,s,e):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),vl(t,e,n,a))};function hp(t,e,r,n){if(n)return!!(e==="innerHTML"||e==="textContent"||e in t&&xl(e)&&Ne(r));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const i=t.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return xl(e)&&ft(r)?!1:e in t}const kl=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Ce(e)?r=>ci(e,r):e};function fp(t){t.target.composing=!0}function Sl(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Is=Symbol("_assign"),eo={created(t,{modifiers:{lazy:e,trim:r,number:n}},i){t[Is]=kl(i);const s=n||i.props&&i.props.type==="number";Ln(t,e?"change":"input",a=>{if(a.target.composing)return;let o=t.value;r&&(o=o.trim()),s&&(o=Qs(o)),t[Is](o)}),r&&Ln(t,"change",()=>{t.value=t.value.trim()}),e||(Ln(t,"compositionstart",fp),Ln(t,"compositionend",Sl),Ln(t,"change",Sl))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:r,modifiers:{lazy:n,trim:i,number:s}},a){if(t[Is]=kl(a),t.composing)return;const o=(s||t.type==="number")&&!/^0\d/.test(t.value)?Qs(t.value):t.value,l=e??"";o!==l&&(document.activeElement===t&&t.type!=="range"&&(n&&e===r||i&&t.value.trim()===l)||(t.value=l))}},pp=["ctrl","shift","alt","meta"],mp={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>pp.some(r=>t[`${r}Key`]&&!e.includes(r))},W0=(t,e)=>{const r=t._withMods||(t._withMods={}),n=e.join(".");return r[n]||(r[n]=(i,...s)=>{for(let a=0;a{const r=t._withKeys||(t._withKeys={}),n=e.join(".");return r[n]||(r[n]=i=>{if(!("key"in i))return;const s=cn(i.key);if(e.some(a=>a===s||gp[a]===s))return t(i)})},vp=At({patchProp:dp},Xf);let Tl;function bp(){return Tl||(Tl=yf(vp))}const yp=(...t)=>{const e=bp().createApp(...t),{mount:r}=e;return e.mount=n=>{const i=xp(n);if(!i)return;const s=e._component;!Ne(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const a=r(i,!1,wp(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},e};function wp(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function xp(t){return ft(t)?document.querySelector(t):t}var kp=Object.defineProperty,Sp=(t,e,r)=>e in t?kp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,G0=(t,e,r)=>(Sp(t,typeof e!="symbol"?e+"":e,r),r);const to={name:"Latte",type:"light",palette:["#dd7878","#ea76cb","#8839ef","#e64553","#fe640b","#df8e1d","#40a02b","#209fb5","#1e66f5","#7287fd"],cssVar:{"--node-gap-x":"30px","--node-gap-y":"10px","--main-gap-x":"65px","--main-gap-y":"45px","--root-radius":"30px","--main-radius":"20px","--root-color":"#ffffff","--root-bgcolor":"#4c4f69","--root-border-color":"rgba(0, 0, 0, 0)","--main-color":"#444446","--main-bgcolor":"#ffffff","--topic-padding":"3px","--color":"#777777","--bgcolor":"#f6f6f6","--selected":"#4dc4ff","--accent-color":"#e64553","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea","--map-padding":"50px"}},ro={name:"Dark",type:"dark",palette:["#848FA0","#748BE9","#D2F9FE","#4145A5","#789AFA","#706CF4","#EF987F","#775DD5","#FCEECF","#DA7FBC"],cssVar:{"--node-gap-x":"30px","--node-gap-y":"10px","--main-gap-x":"65px","--main-gap-y":"45px","--root-radius":"30px","--main-radius":"20px","--root-color":"#ffffff","--root-bgcolor":"#2d3748","--root-border-color":"rgba(255, 255, 255, 0.1)","--main-color":"#ffffff","--main-bgcolor":"#4c4f69","--topic-padding":"3px","--color":"#cccccc","--bgcolor":"#252526","--selected":"#4dc4ff","--accent-color":"#789AFA","--panel-color":"#ffffff","--panel-bgcolor":"#2d3748","--panel-border-color":"#696969","--map-padding":"50px 80px"}};function ua(t){return t.replace(/&/g,"&").replace(/{if(t.parent=e,t.children)for(let r=0;r{if(t.expanded=e,t.children)if(r===void 0||r>0){const n=r!==void 0?r-1:void 0;t.children.forEach(i=>{qn(i,e,n)})}else t.children.forEach(n=>{qn(n,!1)})};function no(t){if(t.id=En(),t.children)for(let e=0;e0&&(a=180-a),s<0&&i<0&&(a=180+a),s>0&&i<0&&(a=360-a);const o=12,l=30,c=a+l,u=a-l;return{x1:r+Math.cos(Math.PI*c/180)*o,y1:n-Math.sin(Math.PI*c/180)*o,x2:r+Math.cos(Math.PI*u/180)*o,y2:n-Math.sin(Math.PI*u/180)*o}}function En(){return(new Date().getTime().toString(16)+Math.random().toString(16).substr(2)).substr(2,16)}const Tp=function(){const t=En();return{topic:this.newTopicName,id:t}};function io(t){return JSON.parse(JSON.stringify(t,(e,r)=>{if(e!=="parent")return r}))}const dn=(t,e)=>{let r=0,n=0;for(;e&&e!==t;)r+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{offsetLeft:r,offsetTop:n}},rt=(t,e)=>{for(const r in e)t.setAttribute(r,e[r])},da=t=>t?t.tagName==="ME-TPC":!1,ts=t=>t.filter(e=>e.nodeObj.parent).filter((e,r,n)=>{for(let i=0;i{const e=/translate\(([^,]+),\s*([^)]+)\)/,r=t.match(e);return r?{x:parseFloat(r[1]),y:parseFloat(r[2])}:{x:0,y:0}},so=function(t){for(let e=0;e(t.LHS="lhs",t.RHS="rhs",t))(fr||{});const Ep=t=>{const e=t.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},Ap=t=>{const e=t.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},Cp=t=>{t.selectNode(t.map.querySelector("me-root>me-tpc"))},Mp=function(t,e){const r=e.parentElement.parentElement.parentElement.previousSibling;if(r){const n=r.firstChild;t.selectNode(n)}},Np=function(t,e){const r=e.parentElement.nextSibling;if(r&&r.firstChild){const n=r.firstChild.firstChild.firstChild;t.selectNode(n)}},El=function(t,e){var r,n;const i=t.currentNode||((r=t.currentNodes)==null?void 0:r[0]);if(!i)return;const s=i.nodeObj,a=i.offsetParent.offsetParent.parentElement;s.parent?a.className===e?Np(t,i):(n=s.parent)!=null&&n.parent?Mp(t,i):Cp(t):e===fr.LHS?Ep(t):Ap(t)},Al=function(t,e){const r=t.currentNode;if(!r||!r.nodeObj.parent)return;const n=e+"Sibling",i=r.parentElement.parentElement[n];i?t.selectNode(i.firstChild.firstChild):t.selectNode(r)},Di=function(t,e,r){const{scaleVal:n,scaleSensitivity:i}=t;switch(e){case"in":t.scale(n+i,r);break;case"out":t.scale(n-i,r)}};function Ip(t,e){e=e===!0?{}:e;const r=()=>{t.currentArrow?t.removeArrow():t.currentSummary?t.removeSummary(t.currentSummary.summaryObj.id):t.currentNodes&&t.removeNodes(t.currentNodes)};let n=!1,i=null;const s=o=>{const l=t.nodeData;if(o.key==="0")for(const c of l.children)qn(c,!1);if(o.key==="=")for(const c of l.children)qn(c,!0);if(["1","2","3","4","5","6","7","8","9"].includes(o.key))for(const c of l.children)qn(c,!0,Number(o.key)-1);t.refresh(),t.toCenter(),n=!1,i&&(clearTimeout(i),i=null,t.container.removeEventListener("keydown",s))},a={Enter:o=>{o.shiftKey?t.insertSibling("before"):o.ctrlKey||o.metaKey?t.insertParent():t.insertSibling("after")},Tab:()=>{t.addChild()},F1:()=>{t.toCenter()},F2:()=>{t.beginEdit()},ArrowUp:o=>{if(o.altKey)t.moveUpNode();else{if(o.metaKey||o.ctrlKey)return t.initSide();Al(t,"previous")}},ArrowDown:o=>{o.altKey?t.moveDownNode():Al(t,"next")},ArrowLeft:o=>{if(o.metaKey||o.ctrlKey)return t.initLeft();El(t,fr.LHS)},ArrowRight:o=>{if(o.metaKey||o.ctrlKey)return t.initRight();El(t,fr.RHS)},PageUp:()=>t.moveUpNode(),PageDown:()=>{t.moveDownNode()},c:o=>{(o.metaKey||o.ctrlKey)&&(t.waitCopy=t.currentNodes)},x:o=>{(o.metaKey||o.ctrlKey)&&(t.waitCopy=t.currentNodes,r())},v:o=>{!t.waitCopy||!t.currentNode||(o.metaKey||o.ctrlKey)&&(t.waitCopy.length===1?t.copyNode(t.waitCopy[0],t.currentNode):t.copyNodes(t.waitCopy,t.currentNode))},"=":o=>{(o.metaKey||o.ctrlKey)&&Di(t,"in")},"-":o=>{(o.metaKey||o.ctrlKey)&&Di(t,"out")},0:o=>{if(o.metaKey||o.ctrlKey){if(n)return;t.scale(1)}},k:o=>{(o.metaKey||o.ctrlKey)&&(n=!0,i&&(clearTimeout(i),t.container.removeEventListener("keydown",s)),i=window.setTimeout(()=>{n=!1,i=null},2e3),t.container.addEventListener("keydown",s))},Delete:r,Backspace:r,...e};t.container.onkeydown=o=>{if(o.preventDefault(),!t.editable)return;const l=a[o.key];l&&l(o)}}function Dp(t){const{dragMoveHelper:e}=t,r=p=>{var g,v,x;if(p.button!==0)return;if((g=t.helper1)!=null&&g.moved){t.helper1.clear();return}if((v=t.helper2)!=null&&v.moved){t.helper2.clear();return}if(e.moved){e.clear();return}const y=p.target;if(y.tagName==="ME-EPD")p.ctrlKey||p.metaKey?t.expandNodeAll(y.previousSibling):t.expandNode(y.previousSibling);else if(y.tagName==="ME-TPC"&&t.currentNodes.length>1)t.selectNode(y);else if(!t.editable)return;const C=(x=y.parentElement)==null?void 0:x.parentElement;C.getAttribute("class")==="topiclinks"?t.selectArrow(y.parentElement):C.getAttribute("class")==="summary"&&t.selectSummary(y.parentElement)},n=p=>{var g,v,x;const y=p.target;if(y.tagName==="IMG"){const C=y,w=C.src,k=C.alt||C.title||"";t.bus.fire("showImagePreview",w,k);return}if(da(y)){const C=y;if((g=C.nodeObj)!=null&&g.image){const k=typeof C.nodeObj.image=="string"?C.nodeObj.image:C.nodeObj.image.url;t.bus.fire("showImagePreview",k,C.nodeObj.topic||"");return}const w=C.querySelector("img");if(w){const k=w.src,I=w.alt||w.title||((v=C.nodeObj)==null?void 0:v.topic)||"";t.bus.fire("showImagePreview",k,I);return}t.editable&&t.beginEdit(y)}if(t.editable){const C=(x=y.parentElement)==null?void 0:x.parentElement;C.getAttribute("class")==="topiclinks"?t.editArrowLabel(y.parentElement):C.getAttribute("class")==="summary"&&t.editSummary(y.parentElement)}};let i=0;const s=p=>{if(p.pointerType==="mouse")return;const g=new Date().getTime(),v=g-i;v<300&&v>0&&n(p),i=g},a=p=>{e.moved=!1;const g=t.mouseSelectionButton===0?2:0;if(p.button!==g&&p.pointerType==="mouse")return;e.x=p.clientX,e.y=p.clientY;const v=p.target;v.className!=="circle"&&v.contentEditable!=="plaintext-only"&&(e.mousedown=!0,v.setPointerCapture(p.pointerId))},o=p=>{if(p.target.contentEditable!=="plaintext-only"){const g=p.clientX-e.x,v=p.clientY-e.y;e.onMove(g,v)}e.x=p.clientX,e.y=p.clientY},l=p=>{const g=t.mouseSelectionButton===0?2:0;if(p.button!==g&&p.pointerType==="mouse")return;const v=p.target;v.hasPointerCapture&&v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),e.clear()},c=p=>{if(p.preventDefault(),p.button!==2||!t.editable)return;const g=p.target;da(g)&&!g.classList.contains("selected")&&t.selectNode(g),setTimeout(()=>{t.dragMoveHelper.moved||t.bus.fire("showContextMenu",p)},200)},u=p=>{p.stopPropagation(),p.preventDefault(),p.ctrlKey||p.metaKey?p.deltaY<0?Di(t,"in",t.dragMoveHelper):t.scaleVal-t.scaleSensitivity>0&&Di(t,"out",t.dragMoveHelper):p.shiftKey?t.move(-p.deltaY,0):t.move(-p.deltaX,-p.deltaY)},{container:f}=t;return so([{dom:f,evt:"pointerdown",func:a},{dom:f,evt:"pointermove",func:o},{dom:f,evt:"pointerup",func:l},{dom:f,evt:"pointerup",func:s},{dom:f,evt:"click",func:r},{dom:f,evt:"dblclick",func:n},{dom:f,evt:"contextmenu",func:c},{dom:f,evt:"wheel",func:typeof t.handleWheel=="function"?t.handleWheel:u}])}function Rp(){return{handlers:{},addListener:function(t,e){this.handlers[t]===void 0&&(this.handlers[t]=[]),this.handlers[t].push(e)},fire:function(t,...e){if(this.handlers[t]instanceof Array){const r=this.handlers[t];for(let n=0;n{s.direction===0?n+=1:s.direction===1?i+=1:n<=i?(s.direction=0,n+=1):(s.direction=1,i+=1)})}_p(this,r,e)},_p=function(t,e,r){const n=Ri.createElement("me-main");n.className=fr.LHS;const i=Ri.createElement("me-main");i.className=fr.RHS;for(let s=0;s`${ua(n)}`).join(""),t.appendChild(r),t.icons=r}else t.icons&&(t.icons=void 0);if(e.tags&&e.tags.length){const r=Gt.createElement("div");r.className="tags",e.tags.forEach(n=>{const i=Gt.createElement("span");typeof n=="string"?i.textContent=n:(i.textContent=n.text,n.className&&(i.className=n.className),n.style&&Object.assign(i.style,n.style)),r.appendChild(i)}),t.appendChild(r),t.tags=r}else t.tags&&(t.tags=void 0)},zp=function(t,e){const r=Gt.createElement("me-wrapper"),{p:n,tpc:i}=this.createParent(t);if(r.appendChild(n),!e&&t.children&&t.children.length>0){const s=ao(t.expanded);if(n.appendChild(s),t.expanded!==!1){const a=Lp(this,t.children);r.appendChild(a)}}return{grp:r,top:n,tpc:i}},$p=function(t){const e=Gt.createElement("me-parent"),r=this.createTopic(t);return rs.call(this,r,t),e.appendChild(r),{p:e,tpc:r}},Fp=function(t){const e=Gt.createElement("me-children");return e.append(...t),e},Bp=function(t){const e=Gt.createElement("me-tpc");return e.nodeObj=t,e.dataset.nodeid="me"+t.id,e.draggable=this.draggable,e};function e1(t){const e=Gt.createRange();e.selectNodeContents(t);const r=window.getSelection();r&&(r.removeAllRanges(),r.addRange(e))}const Pp=function(t){if(!t)return;const e=Gt.createElement("div"),r=t.nodeObj,n=r.topic;t.appendChild(e),e.id="input-box",e.textContent=n,e.contentEditable="plaintext-only",e.spellcheck=!1;const i=getComputedStyle(t);e.style.cssText=`min-width:${t.offsetWidth-8}px; + color:${i.color}; + padding:${i.padding}; + margin:${i.margin}; + font:${i.font}; + background-color:${i.backgroundColor!=="rgba(0, 0, 0, 0)"&&i.backgroundColor}; + border-radius:${i.borderRadius};`,this.direction===0&&(e.style.right="0"),e1(e),this.bus.fire("operation",{name:"beginEdit",obj:t.nodeObj}),e.addEventListener("keydown",s=>{s.stopPropagation();const a=s.key;if(a==="Enter"||a==="Tab"){if(s.shiftKey)return;s.preventDefault(),e.blur(),this.container.focus()}}),e.addEventListener("blur",()=>{var s;if(!e)return;const a=((s=e.textContent)==null?void 0:s.trim())||"";a===""?r.topic=n:(r.topic=a,this.markdown?t.text.innerHTML=this.markdown(r.topic,r):t.text.textContent=a),e.remove(),rs.call(this,t,r),a!==n&&(this.linkDiv(),this.bus.fire("operation",{name:"finishEdit",obj:r,origin:n}))})},ao=function(t){const e=Gt.createElement("me-epd");return e.expanded=t!==!1,e.className=t!==!1?"minus":"",e},kn=document,rr="http://www.w3.org/2000/svg",ha=function(t,e,r,n={}){const{anchor:i="middle",color:s,dataType:a}=n,o=document.createElementNS(rr,"text");return rt(o,{"text-anchor":i,x:e+"",y:r+"",fill:s||(i==="middle"?"rgb(235, 95, 82)":"#666")}),a&&(o.dataset.type=a),o.innerHTML=t,o},t1=function(t,e,r){const n=kn.createElementNS(rr,"path");return rt(n,{d:t,stroke:e||"#666",fill:"none","stroke-width":r}),n},o0=function(t){const e=kn.createElementNS(rr,"svg");return e.setAttribute("class",t),e.setAttribute("overflow","visible"),e},Cl=function(){const t=kn.createElementNS(rr,"line");return t.setAttribute("stroke","#4dc4ff"),t.setAttribute("fill","none"),t.setAttribute("stroke-width","2"),t.setAttribute("opacity","0.45"),t},Hp=function(t,e,r,n){const i=kn.createElementNS(rr,"g");return[{name:"line",d:t},{name:"arrow1",d:e},{name:"arrow2",d:r}].forEach((s,a)=>{const o=s.d,l=kn.createElementNS(rr,"path"),c={d:o,stroke:(n==null?void 0:n.stroke)||"rgb(235, 95, 82)",fill:"none","stroke-linecap":(n==null?void 0:n.strokeLinecap)||"cap","stroke-width":String((n==null?void 0:n.strokeWidth)||"2")};(n==null?void 0:n.opacity)!==void 0&&(c.opacity=String(n.opacity)),rt(l,c),a===0&&l.setAttribute("stroke-dasharray",(n==null?void 0:n.strokeDasharray)||"8,2");const u=kn.createElementNS(rr,"path");rt(u,{d:o,stroke:"transparent",fill:"none","stroke-width":"15"}),i.appendChild(u),i.appendChild(l),i[s.name]=l}),i},r1=function(t,e,r){if(!e)return;const n=kn.createElement("div");t.nodes.appendChild(n);const i=e.innerHTML;n.id="input-box",n.textContent=i,n.contentEditable="plaintext-only",n.spellcheck=!1;const s=e.getBBox();n.style.cssText=` + min-width:${Math.max(88,s.width)}px; + position:absolute; + left:${s.x}px; + top:${s.y}px; + padding: 2px 4px; + margin: -2px -4px; + `,e1(n),t.scrollIntoView(n),n.addEventListener("keydown",a=>{a.stopPropagation();const o=a.key;if(o==="Enter"||o==="Tab"){if(a.shiftKey)return;a.preventDefault(),n.blur(),t.container.focus()}}),n.addEventListener("blur",()=>{var a;if(!n)return;const o=((a=n.textContent)==null?void 0:a.trim())||"";o===""?r.label=i:r.label=o,n.remove(),o!==i&&(e.innerHTML=r.label,"parent"in r?t.bus.fire("operation",{name:"finishEditSummary",obj:r}):t.bus.fire("operation",{name:"finishEditArrowLabel",obj:r}))})},qp=function(t){const e=this.map.querySelector("me-root"),r=e.offsetTop,n=e.offsetLeft,i=e.offsetWidth,s=e.offsetHeight,a=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="";for(let o=0;o{const V=document.createElement("div");return V.innerText=F,V.className="tips",V},n=(F,V,q)=>{const le=document.createElement("li");return le.id=F,le.innerHTML=`${ua(V)}${ua(q)}`,le},i=Nl[t.locale]?t.locale:"en",s=Nl[i],a=n("cm-add_child",s.addChild,"Tab"),o=n("cm-add_parent",s.addParent,"Ctrl + Enter"),l=n("cm-add_sibling",s.addSibling,"Enter"),c=n("cm-remove_child",s.removeNode,"Delete"),u=n("cm-fucus",s.focus,""),f=n("cm-unfucus",s.cancelFocus,""),p=n("cm-up",s.moveUp,"PgUp"),g=n("cm-down",s.moveDown,"Pgdn"),v=n("cm-link",s.link,""),x=n("cm-link-bidirectional",s.linkBidirectional,""),y=n("cm-summary",s.summary,""),C=n("cm-image-preview","预览图片",""),w=document.createElement("ul");if(w.className="menu-list",w.appendChild(a),w.appendChild(o),w.appendChild(l),w.appendChild(c),e.focus&&(w.appendChild(u),w.appendChild(f)),w.appendChild(p),w.appendChild(g),w.appendChild(y),e.link&&(w.appendChild(v),w.appendChild(x)),e&&e.extend)for(let F=0;F{V.onclick(le)}}const k=document.createElement("div");k.className="context-menu",k.appendChild(w),k.hidden=!0,t.container.append(k);let I=!0;const R=F=>{var V;const q=F.target;if(da(q)){q.parentElement.tagName==="ME-ROOT"?I=!0:I=!1;const le=q;(V=le.nodeObj)!=null&&V.image||le.querySelector("img")?(C.style.display="block",C.className=""):C.style.display="none",I?(u.className="disabled",p.className="disabled",g.className="disabled",o.className="disabled",l.className="disabled",c.className="disabled"):(u.className="",p.className="",g.className="",o.className="",l.className="",c.className=""),k.hidden=!1,w.style.top="",w.style.bottom="",w.style.left="",w.style.right="";const me=w.getBoundingClientRect(),Se=w.offsetHeight,ze=w.offsetWidth,Le=F.clientY-me.top,Ge=F.clientX-me.left;Se+Le>window.innerHeight?(w.style.top="",w.style.bottom="0px"):(w.style.bottom="",w.style.top=Le+15+"px"),ze+Ge>window.innerWidth?(w.style.left="",w.style.right="0px"):(w.style.right="",w.style.left=Ge+10+"px")}};t.bus.addListener("showContextMenu",R),k.onclick=F=>{F.target===k&&(k.hidden=!0)},a.onclick=()=>{t.addChild(),k.hidden=!0},o.onclick=()=>{t.insertParent(),k.hidden=!0},l.onclick=()=>{I||(t.insertSibling("after"),k.hidden=!0)},c.onclick=()=>{I||(t.removeNodes(t.currentNodes||[]),k.hidden=!0)},u.onclick=()=>{I||(t.focusNode(t.currentNode),k.hidden=!0)},f.onclick=()=>{t.cancelFocus(),k.hidden=!0},p.onclick=()=>{I||(t.moveUpNode(),k.hidden=!0)},g.onclick=()=>{I||(t.moveDownNode(),k.hidden=!0)};const _=F=>{k.hidden=!0;const V=t.currentNode,q=r(s.clickTips);t.container.appendChild(q),t.map.addEventListener("click",le=>{le.preventDefault(),q.remove();const me=le.target;(me.parentElement.tagName==="ME-PARENT"||me.parentElement.tagName==="ME-ROOT")&&t.createArrow(V,me,F)},{once:!0})};return v.onclick=()=>_(),x.onclick=()=>_({bidirectional:!0}),y.onclick=()=>{k.hidden=!0,t.createSummary(),t.unselectNodes(t.currentNodes)},C.onclick=()=>{var F,V;k.hidden=!0;const q=t.currentNode;if(q)if((F=q.nodeObj)!=null&&F.image){const le=typeof q.nodeObj.image=="string"?q.nodeObj.image:q.nodeObj.image.url;t.bus.fire("showImagePreview",le,q.nodeObj.topic||"")}else{const le=q.querySelector("img");if(le){const me=le.src,Se=le.alt||le.title||((V=q.nodeObj)==null?void 0:V.topic)||"";t.bus.fire("showImagePreview",me,Se)}}},()=>{a.onclick=null,o.onclick=null,l.onclick=null,c.onclick=null,u.onclick=null,f.onclick=null,p.onclick=null,g.onclick=null,v.onclick=null,y.onclick=null,k.onclick=null,t.container.oncontextmenu=null}}const fa=document,Up=function(t,e){if(!e)return pa(t),t;let r=t.querySelector(".insert-preview");const n=`insert-preview ${e} show`;return r||(r=fa.createElement("div"),t.appendChild(r)),r.className=n,t},pa=function(t){if(!t)return;const e=t.querySelectorAll(".insert-preview");for(const r of e||[])r.remove()},Il=function(t,e){for(const r of e){const n=r.parentElement.parentElement.contains(t);if(!(t&&t.tagName==="ME-TPC"&&t!==r&&!n&&t.nodeObj.parent))return!1}return!0},Vp=function(t){const e=document.createElement("div");return e.className="mind-elixir-ghost",t.container.appendChild(e),e};class Wp{constructor(e){G0(this,"mind"),G0(this,"isMoving",!1),G0(this,"interval",null),G0(this,"speed",20),this.mind=e}move(e,r){this.isMoving||(this.isMoving=!0,this.interval=setInterval(()=>{this.mind.move(e*this.speed*this.mind.scaleVal,r*this.speed*this.mind.scaleVal)},100))}stop(){this.isMoving=!1,clearInterval(this.interval)}}function Gp(t){let e=null,r=null;const n=Vp(t),i=new Wp(t),s=l=>{t.selection.cancel();const c=l.target;if((c==null?void 0:c.tagName)!=="ME-TPC"){l.preventDefault();return}let u=t.currentNodes;u!=null&&u.includes(c)||(t.selectNode(c),u=t.currentNodes),t.dragged=u,u.length>1?n.innerHTML=u.length+"":n.innerHTML=c.innerHTML;for(const f of u)f.parentElement.parentElement.style.opacity="0.5";l.dataTransfer.setDragImage(n,0,0),l.dataTransfer.dropEffect="move",t.dragMoveHelper.clear()},a=l=>{const{dragged:c}=t;if(!c)return;i.stop();for(const f of c)f.parentElement.parentElement.style.opacity="1";const u=l.target;u.style.opacity="",r&&(pa(r),e==="before"?t.moveNodeBefore(c,r):e==="after"?t.moveNodeAfter(c,r):e==="in"&&t.moveNodeIn(c,r),t.dragged=null,n.innerHTML="")},o=l=>{l.preventDefault();const c=12*t.scaleVal,{dragged:u}=t;if(!u)return;const f=t.container.getBoundingClientRect();l.clientXf.x+f.width-50?i.move(-1,0):l.clientYf.y+f.height-50?i.move(0,-1):i.stop(),pa(r);const p=fa.elementFromPoint(l.clientX,l.clientY-c);if(Il(p,u)){r=p;const g=p.getBoundingClientRect(),v=g.y;l.clientY>v+g.height?e="after":e="in"}else{const g=fa.elementFromPoint(l.clientX,l.clientY+c),v=g.getBoundingClientRect();if(Il(g,u)){r=g;const x=v.y;l.clientYe.id)}:{type:"nodes",value:[t.obj.id]}};function Yp(t){let e=[],r=-1,n=t.getData(),i=[];t.undo=function(){if(r>-1){const l=e[r];n=l.prev,t.refresh(l.prev);try{l.currentTarget.type==="nodes"&&(l.operation==="removeNodes"?t.selectNodes(l.currentTarget.value.map(c=>this.findEle(c))):t.selectNodes(l.currentSelected.map(c=>this.findEle(c))))}catch{}finally{r--}}},t.redo=function(){if(rthis.findEle(c))):t.selectNodes(l.currentTarget.value.map(c=>this.findEle(c))))}catch{}}};const s=function(l){if(l.name==="beginEdit")return;e=e.slice(0,r+1);const c=t.getData(),u={prev:n,operation:l.name,currentSelected:i.map(f=>f.id),currentTarget:Kp(l),next:c};e.push(u),n=c,r=e.length-1},a=function(l){(l.metaKey||l.ctrlKey)&&(l.shiftKey&&l.key==="Z"||l.key==="y")?t.redo():(l.metaKey||l.ctrlKey)&&l.key==="z"&&t.undo()},o=function(l){i=t.currentNodes.map(c=>c.nodeObj)};return t.bus.addListener("operation",s),t.bus.addListener("selectNodes",o),t.container.addEventListener("keydown",a),()=>{t.bus.removeListener("operation",s),t.bus.removeListener("selectNodes",o),t.container.removeEventListener("keydown",a)}}const Xp='',Jp='',Zp='',Qp='',em='',tm='',rm='',nm='',im=t=>async e=>{var r;try{const n=`${((r=e.nodeData)==null?void 0:r.topic)||"思维导图"}_${new Date().toISOString().slice(0,10)}`,i=` + .topic { font-family: Arial, sans-serif; font-size: 14px; color: #333; } + .markdown-content { font-size: 12px; line-height: 1.3; } + + /* 表格样式 */ + .markdown-table { + border-collapse: collapse; + width: 100%; + margin: 4px 0; + font-size: 11px; + border: 1px solid #e0e0e0; + border-radius: 6px; + box-shadow: 0 2px 8px rgba(0,0,0,0.08); + background-color: #fafafa; + overflow: hidden; + white-space: normal; + } + + .markdown-table th, + .markdown-table td { + border: 1px solid #e0e0e0; + padding: 8px 12px; + text-align: left; + vertical-align: top; + position: relative; + white-space: normal; + } + + .markdown-table th { + background-color: #f5f5f5; + font-weight: 600; + color: #333; + text-align: center; + border-bottom: 1px solid #d0d0d0; + } + + .markdown-table td { + background-color: #fff; + } + + .markdown-table tr:nth-child(even) td { + background-color: #f8f8f8; + } + + .markdown-table tr:hover td { + background-color: #f0f8ff; + } + + /* 移除多余的边框,保持简洁 */ + .markdown-table th:not(:last-child), + .markdown-table td:not(:last-child) { + border-right: 1px solid #e0e0e0; + } + + .markdown-table tr:not(:last-child) td { + border-bottom: 1px solid #e0e0e0; + } + `,s=await e.exportSvg(!0,i);if(!s)return;const a=URL.createObjectURL(s),o=document.createElement("a");o.href=a,o.download=`${n}.${t}`,o.click(),URL.revokeObjectURL(a)}catch{alert(`导出${t.toUpperCase()}失败,请重试`)}},sm={side:Xp,left:Jp,right:Zp,full:Qp,living:em,zoomin:tm,zoomout:rm,exportSvg:nm},Zr=(t,e)=>{const r=document.createElement("span");return r.id=t,r.innerHTML=sm[e],r};function am(t){try{const e=document.createElement("div"),r=Zr("fullscreen","full"),n=Zr("toCenter","living"),i=Zr("zoomout","zoomout"),s=Zr("zoomin","zoomin"),a=Zr("exportSvg","exportSvg");a.title="导出SVG矢量图";const o=document.createElement("span");return o.innerText="100%",e.appendChild(r),e.appendChild(n),e.appendChild(i),e.appendChild(s),e.appendChild(a),e.className="mind-elixir-toolbar rb",r.onclick=()=>{document.fullscreenElement===t.el?(document.exitFullscreen(),setTimeout(()=>{t.el.focus()},100)):(t.el.requestFullscreen(),setTimeout(()=>{},100))},n.onclick=()=>{t.toCenter()},i.onclick=()=>{t.scale(t.scaleVal-t.scaleSensitivity)},s.onclick=()=>{t.scale(t.scaleVal+t.scaleSensitivity)},a.onclick=()=>{im("svg")(t)},setTimeout(()=>{const l=document.getElementById("exportSvg")},1e3),e}catch{const e=document.createElement("div");return e.className="mind-elixir-toolbar rb",e}}function om(t){const e=document.createElement("div"),r=Zr("tbltl","left"),n=Zr("tbltr","right"),i=Zr("tblts","side");return e.appendChild(r),e.appendChild(n),e.appendChild(i),e.className="mind-elixir-toolbar lt",r.onclick=()=>{t.initLeft()},n.onclick=()=>{t.initRight()},i.onclick=()=>{t.initSide()},e}function lm(t){try{if(!t.container)return;const e=am(t),r=om(t);t.container.append(e),t.container.append(r)}catch{}}/*! @viselect/vanilla v3.9.0 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */class cm{constructor(){this._listeners=new Map,this.on=this.addEventListener,this.off=this.removeEventListener,this.emit=this.dispatchEvent}addEventListener(e,r){const n=this._listeners.get(e)??new Set;return this._listeners.set(e,n),n.add(r),this}removeEventListener(e,r){var n;return(n=this._listeners.get(e))==null||n.delete(r),this}dispatchEvent(e,...r){let n=!0;for(const i of this._listeners.get(e)??[])n=i(...r)!==!1&&n;return n}unbindAllListeners(){this._listeners.clear()}}const Dl=(t,e="px")=>typeof t=="number"?t+e:t,Wr=({style:t},e,r)=>{if(typeof e=="object")for(const[n,i]of Object.entries(e))i!==void 0&&(t[n]=Dl(i));else r!==void 0&&(t[e]=Dl(r))},Rl=(t=0,e=0,r=0,n=0)=>{const i={x:t,y:e,width:r,height:n,top:e,left:t,right:t+r,bottom:e+n};return{...i,toJSON:()=>JSON.stringify(i)}},um=t=>{let e,r=-1,n=!1;return{next:(...i)=>{e=i,n||(n=!0,r=requestAnimationFrame(()=>{t(...e),n=!1}))},cancel:()=>{cancelAnimationFrame(r),n=!1}}},Ol=(t,e,r="touch")=>{switch(r){case"center":{const n=e.left+e.width/2,i=e.top+e.height/2;return n>=t.left&&n<=t.right&&i>=t.top&&i<=t.bottom}case"cover":return e.left>=t.left&&e.top>=t.top&&e.right<=t.right&&e.bottom<=t.bottom;case"touch":return t.right>=e.left&&t.left<=e.right&&t.bottom>=e.top&&t.top<=e.bottom}},dm=()=>matchMedia("(hover: none), (pointer: coarse)").matches,hm=()=>"safari"in window,ma=t=>Array.isArray(t)?t:[t],i1=t=>(e,r,n,i={})=>{(e instanceof HTMLCollection||e instanceof NodeList)&&(e=Array.from(e)),r=ma(r),e=ma(e);for(const s of e)if(s)for(const a of r)s[t](a,n,{capture:!1,...i})},Gr=i1("addEventListener"),or=i1("removeEventListener"),K0=t=>{var e;const{clientX:r,clientY:n,target:i}=((e=t.touches)==null?void 0:e[0])??t;return{x:r,y:n,target:i}},In=(t,e=document)=>ma(t).map(r=>typeof r=="string"?Array.from(e.querySelectorAll(r)):r instanceof Element?r:null).flat().filter(Boolean),fm=(t,e)=>e.some(r=>typeof r=="number"?t.button===r:typeof r=="object"?r.button!==t.button?!1:r.modifiers.every(n=>{switch(n){case"alt":return t.altKey;case"ctrl":return t.ctrlKey||t.metaKey;case"shift":return t.shiftKey}}):!1),{abs:gn,max:_l,min:Ll,ceil:zl}=Math,$l=(t=[])=>({stored:t,selected:[],touched:[],changed:{added:[],removed:[]}}),s1=class extends cm{constructor(t){var e,r,n,i,s;super(),this._selection=$l(),this._targetBoundaryScrolled=!0,this._selectables=[],this._areaLocation={y1:0,x2:0,y2:0,x1:0},this._areaRect=Rl(),this._singleClick=!0,this._scrollAvailable=!0,this._scrollingActive=!1,this._scrollSpeed={x:0,y:0},this._scrollDelta={x:0,y:0},this._lastMousePosition={x:0,y:0},this.enable=this._toggleStartEvents,this.disable=this._toggleStartEvents.bind(this,!1),this._options={selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,startAreas:["html"],boundaries:["html"],container:"body",...t,behaviour:{overlap:"invert",intersect:"touch",triggers:[0],...t.behaviour,startThreshold:(e=t.behaviour)!=null&&e.startThreshold?typeof t.behaviour.startThreshold=="number"?t.behaviour.startThreshold:{x:10,y:10,...t.behaviour.startThreshold}:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,...(r=t.behaviour)==null?void 0:r.scrolling,startScrollMargins:{x:0,y:0,...(i=(n=t.behaviour)==null?void 0:n.scrolling)==null?void 0:i.startScrollMargins}}},features:{range:!0,touch:!0,deselectOnBlur:!1,...t.features,singleTap:{allow:!0,intersect:"native",...(s=t.features)==null?void 0:s.singleTap}}};for(const c of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[c]=="function"&&(this[c]=this[c].bind(this));const{document:a,selectionAreaClass:o,selectionContainerClass:l}=this._options;this._area=a.createElement("div"),this._clippingElement=a.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(o),l&&this._clippingElement.classList.add(l),Wr(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),Wr(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=um(c=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",c),this._redrawSelectionArea()}),this.enable()}_toggleStartEvents(t=!0){const{document:e,features:r}=this._options,n=t?Gr:or;n(e,"mousedown",this._onTapStart),r.touch&&n(e,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(t,e=!1){const{x:r,y:n,target:i}=K0(t),{document:s,startAreas:a,boundaries:o,features:l,behaviour:c}=this._options,u=i.getBoundingClientRect();if(t instanceof MouseEvent&&!fm(t,c.triggers))return;const f=In(a,s),p=In(o,s);this._targetElement=p.find(y=>Ol(y.getBoundingClientRect(),u));const g=t.composedPath(),v=f.find(y=>g.includes(y));if(this._targetBoundary=p.find(y=>g.includes(y)),!this._targetElement||!v||!this._targetBoundary||!e&&this._emitEvent("beforestart",t)===!1)return;this._areaLocation={x1:r,y1:n,x2:0,y2:0};const x=s.scrollingElement??s.body;this._scrollDelta={x:x.scrollLeft,y:x.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),Gr(s,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),Gr(s,["mouseup","touchcancel","touchend"],this._onTapStop),Gr(s,"scroll",this._onScroll),l.deselectOnBlur&&(this._targetBoundaryScrolled=!1,Gr(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(t){const{singleTap:{intersect:e},range:r}=this._options.features,n=K0(t);let i;if(e==="native")i=n.target;else if(e==="touch"){this.resolveSelectables();const{x:a,y:o}=n;i=this._selectables.find(l=>{const{right:c,left:u,top:f,bottom:p}=l.getBoundingClientRect();return au&&of})}if(!i)return;for(this.resolveSelectables();!this._selectables.includes(i);)if(i.parentElement)i=i.parentElement;else{this._targetBoundaryScrolled||this.clearSelection();return}const{stored:s}=this._selection;if(this._emitEvent("start",t),t.shiftKey&&r&&this._latestElement){const a=this._latestElement,[o,l]=a.compareDocumentPosition(i)&4?[i,a]:[a,i],c=[...this._selectables.filter(u=>u.compareDocumentPosition(o)&4&&u.compareDocumentPosition(l)&2),o,l];this.select(c),this._latestElement=a}else s.includes(i)&&(s.length===1||t.ctrlKey||s.every(a=>this._selection.stored.includes(a)))?this.deselect(i):(this.select(i),this._latestElement=i)}_delayedTapMove(t){const{container:e,document:r,behaviour:{startThreshold:n}}=this._options,{x1:i,y1:s}=this._areaLocation,{x:a,y:o}=K0(t);if(typeof n=="number"&&gn(a+o-(i+s))>=n||typeof n=="object"&&gn(a-i)>=n.x||gn(o-s)>=n.y){if(or(r,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",t)===!1){or(r,["mouseup","touchcancel","touchend"],this._onTapStop);return}Gr(r,["mousemove","touchmove"],this._onTapMove,{passive:!1}),Wr(this._area,"display","block"),In(e,r)[0].appendChild(this._clippingElement),this.resolveSelectables(),this._singleClick=!1,this._targetRect=this._targetElement.getBoundingClientRect(),this._scrollAvailable=this._targetElement.scrollHeight!==this._targetElement.clientHeight||this._targetElement.scrollWidth!==this._targetElement.clientWidth,this._scrollAvailable&&(Gr(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),Gr(this._options.document,"keydown",this._keyboardScroll,{passive:!1}),this._selectables=this._selectables.filter(l=>this._targetElement.contains(l))),this._setupSelectionArea(),this._emitEvent("start",t),this._onTapMove(t)}this._handleMoveEvent(t)}_setupSelectionArea(){const{_clippingElement:t,_targetElement:e,_area:r}=this,n=this._targetRect=e.getBoundingClientRect();this._scrollAvailable?(Wr(t,{top:n.top,left:n.left,width:n.width,height:n.height}),Wr(r,{marginTop:-n.top,marginLeft:-n.left})):(Wr(t,{top:0,left:0,width:"100%",height:"100%"}),Wr(r,{marginTop:0,marginLeft:0}))}_onTapMove(t){const{_scrollSpeed:e,_areaLocation:r,_options:n,_frame:i}=this,{speedDivider:s}=n.behaviour.scrolling,a=this._targetElement,{x:o,y:l}=K0(t);if(r.x2=o,r.y2=l,this._lastMousePosition.x=o,this._lastMousePosition.y=l,this._scrollAvailable&&!this._scrollingActive&&(e.y||e.x)){this._scrollingActive=!0;const c=()=>{if(!e.x&&!e.y){this._scrollingActive=!1;return}const{scrollTop:u,scrollLeft:f}=a;e.y&&(a.scrollTop+=zl(e.y/s),r.y1-=a.scrollTop-u),e.x&&(a.scrollLeft+=zl(e.x/s),r.x1-=a.scrollLeft-f),i.next(t),requestAnimationFrame(c)};requestAnimationFrame(c)}else i.next(t);this._handleMoveEvent(t)}_handleMoveEvent(t){const{features:e}=this._options;(e.touch&&dm()||this._scrollAvailable&&hm())&&t.preventDefault()}_onScroll(){const{_scrollDelta:t,_options:{document:e}}=this,{scrollTop:r,scrollLeft:n}=e.scrollingElement??e.body;this._areaLocation.x1+=t.x-n,this._areaLocation.y1+=t.y-r,t.x=n,t.y=r,this._setupSelectionArea(),this._frame.next(null)}_onStartAreaScroll(){this._targetBoundaryScrolled=!0,or(this._targetElement,"scroll",this._onStartAreaScroll)}_wheelScroll(t){const{manualSpeed:e}=this._options.behaviour.scrolling,r=t.deltaY?t.deltaY>0?1:-1:0,n=t.deltaX?t.deltaX>0?1:-1:0;this._scrollSpeed.y+=r*e,this._scrollSpeed.x+=n*e,this._onTapMove(t),t.preventDefault()}_keyboardScroll(t){const{manualSpeed:e}=this._options.behaviour.scrolling,r=t.key==="ArrowLeft"?-1:t.key==="ArrowRight"?1:0,n=t.key==="ArrowUp"?-1:t.key==="ArrowDown"?1:0;this._scrollSpeed.x+=Math.sign(r)*e,this._scrollSpeed.y+=Math.sign(n)*e,t.preventDefault(),this._onTapMove({clientX:this._lastMousePosition.x,clientY:this._lastMousePosition.y,preventDefault:()=>{}})}_recalculateSelectionAreaRect(){const{_scrollSpeed:t,_areaLocation:e,_targetElement:r,_options:n}=this,{scrollTop:i,scrollHeight:s,clientHeight:a,scrollLeft:o,scrollWidth:l,clientWidth:c}=r,u=this._targetRect,{x1:f,y1:p}=e;let{x2:g,y2:v}=e;const{behaviour:{scrolling:{startScrollMargins:x}}}=n;gu.right-x.x?(t.x=l-o-c?gn(u.left+u.width-g-x.x):0,g=g>u.right?u.right:g):t.x=0,vu.bottom-x.y?(t.y=s-i-a?gn(u.top+u.height-v-x.y):0,v=v>u.bottom?u.bottom:v):t.y=0;const y=Ll(f,g),C=Ll(p,v),w=_l(f,g),k=_l(p,v);this._areaRect=Rl(y,C,w-y,k-C)}_redrawSelectionArea(){const{x:t,y:e,width:r,height:n}=this._areaRect,{style:i}=this._area;i.left=`${t}px`,i.top=`${e}px`,i.width=`${r}px`,i.height=`${n}px`}_onTapStop(t,e){var r;const{document:n,features:i}=this._options,{_singleClick:s}=this;or(this._targetElement,"scroll",this._onStartAreaScroll),or(n,["mousemove","touchmove"],this._delayedTapMove),or(n,["touchmove","mousemove"],this._onTapMove),or(n,["mouseup","touchcancel","touchend"],this._onTapStop),or(n,"scroll",this._onScroll),this._keepSelection(),t&&s&&i.singleTap.allow?this._onSingleTap(t):!s&&!e&&(this._updateElementSelection(),this._emitEvent("stop",t)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,or(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),or(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),(r=this._frame)==null||r.cancel(),Wr(this._area,"display","none")}_updateElementSelection(){const{_selectables:t,_options:e,_selection:r,_areaRect:n}=this,{stored:i,selected:s,touched:a}=r,{intersect:o,overlap:l}=e.behaviour,c=l==="invert",u=[],f=[],p=[];for(let v=0;v!s.includes(v)));const g=l==="keep";for(let v=0;v!s.includes(o));switch(t.behaviour.overlap){case"drop":{e.stored=[...a,...s.filter(o=>!i.includes(o))];break}case"invert":{e.stored=[...a,...s.filter(o=>!n.removed.includes(o))];break}case"keep":{e.stored=[...s,...r.filter(o=>!s.includes(o))];break}}}trigger(t,e=!0){this._onTapStart(t,e)}resolveSelectables(){this._selectables=In(this._options.selectables,this._options.document)}clearSelection(t=!0,e=!1){const{selected:r,stored:n,changed:i}=this._selection;i.added=[],i.removed.push(...r,...t?n:[]),e||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=$l(t?[]:n)}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}getSelectables(){return this._selectables}setAreaLocation(t){Object.assign(this._areaLocation,t),this._redrawSelectionArea()}getAreaLocation(){return this._areaLocation}cancel(t=!1){this._onTapStop(null,!t)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(t,e=!1){const{changed:r,selected:n,stored:i}=this._selection,s=In(t,this._options.document).filter(a=>!n.includes(a)&&!i.includes(a));return i.push(...s),n.push(...s),r.added.push(...s),r.removed=[],this._latestElement=void 0,e||(this._emitEvent("move",null),this._emitEvent("stop",null)),s}deselect(t,e=!1){const{selected:r,stored:n,changed:i}=this._selection,s=In(t,this._options.document).filter(a=>r.includes(a)||n.includes(a));this._selection.stored=n.filter(a=>!s.includes(a)),this._selection.selected=r.filter(a=>!s.includes(a)),this._selection.changed.added=[],this._selection.changed.removed.push(...s.filter(a=>!i.removed.includes(a))),this._latestElement=void 0,e||(this._emitEvent("move",null),this._emitEvent("stop",null))}};s1.version="3.9.0";let pm=s1;function mm(t){const e=t.mouseSelectionButton===2?[2]:[0],r=new pm({selectables:[".map-container me-tpc"],boundaries:[t.container],container:t.selectionContainer,features:{touch:!1},behaviour:{triggers:e,scrolling:{speedDivider:10,manualSpeed:750,startScrollMargins:{x:10,y:10}}}}).on("beforestart",({event:n})=>{var i;const s=n.target;if(s.id==="input-box"||s.className==="circle"||(i=t.container.querySelector(".context-menu"))!=null&&i.contains(s))return!1;if(!n.ctrlKey&&!n.metaKey){if(s.tagName==="ME-TPC"&&s.classList.contains("selected"))return!1;t.clearSelection()}const a=r.getSelectionArea();return a.style.background="#4f90f22d",a.style.border="1px solid #4f90f2",a.parentElement&&(a.parentElement.style.zIndex="9999"),!0}).on("move",({store:{changed:{added:n,removed:i}}})=>{if(n.length>0||i.length>0,n.length>0){for(const s of n)s.className="selected";t.currentNodes=[...t.currentNodes,...n],t.bus.fire("selectNodes",n.map(s=>s.nodeObj))}if(i.length>0){for(const s of i)s.classList.remove("selected");t.currentNodes=t.currentNodes.filter(s=>!(i!=null&&i.includes(s))),t.bus.fire("unselectNodes",i.map(s=>s.nodeObj))}});t.selection=r}const gm=function(t,e=!0){this.theme=t;const r={...(t.type==="dark"?ro:to).cssVar,...t.cssVar},n=Object.keys(r);for(let i=0;i{var e;const r=(e=t.parent)==null?void 0:e.children,n=(r==null?void 0:r.indexOf(t))??0;return{siblings:r,index:n}};function vm(t){const{siblings:e,index:r}=Kn(t);if(e===void 0)return;const n=e[r];r===0?(e[r]=e[e.length-1],e[e.length-1]=n):(e[r]=e[r-1],e[r-1]=n)}function bm(t){const{siblings:e,index:r}=Kn(t);if(e===void 0)return;const n=e[r];r===e.length-1?(e[r]=e[0],e[0]=n):(e[r]=e[r+1],e[r+1]=n)}function a1(t){const{siblings:e,index:r}=Kn(t);return e===void 0?0:(e.splice(r,1),e.length)}function ym(t,e,r){const{siblings:n,index:i}=Kn(r);n!==void 0&&(e==="before"?n.splice(i,0,t):n.splice(i+1,0,t))}function wm(t,e){const{siblings:r,index:n}=Kn(t);r!==void 0&&(r[n]=e,e.children=[t])}function o1(t,e,r){var n;if(a1(e),(n=r.parent)!=null&&n.parent||(e.direction=r.direction),t==="in")r.children?r.children.push(e):r.children=[e];else{e.direction!==void 0&&(e.direction=r.direction);const{siblings:i,index:s}=Kn(r);if(i===void 0)return;t==="before"?i.splice(s,0,e):i.splice(s+1,0,e)}}const xm=function({map:t,direction:e},r){var n,i;if(e===0)return 0;if(e===1)return 1;if(e===2){const s=((n=t.querySelector(".lhs"))==null?void 0:n.childElementCount)||0,a=((i=t.querySelector(".rhs"))==null?void 0:i.childElementCount)||0;return s<=a?(r.direction=0,0):(r.direction=1,1)}},l1=function(t,e,r){var n,i;const s=r.children[0].children[0],a=e.parentElement;if(a.tagName==="ME-PARENT"){if(I0(s),a.children[1])a.nextSibling.appendChild(r);else{const o=t.createChildren([r]);a.appendChild(ao(!0)),a.insertAdjacentElement("afterend",o)}t.linkDiv(r.offsetParent)}else a.tagName==="ME-ROOT"&&(xm(t,s.nodeObj)===0?(n=t.container.querySelector(".lhs"))==null||n.appendChild(r):(i=t.container.querySelector(".rhs"))==null||i.appendChild(r),t.linkDiv())},km=function(t,e){const r=t.parentNode;if(e===0){const n=r.parentNode.parentNode;n.tagName!=="ME-MAIN"&&(n.previousSibling.children[1].remove(),n.remove())}r.parentNode.remove()},c1={before:"beforebegin",after:"afterend"},I0=function(t){const e=t.parentElement.parentElement.lastElementChild;(e==null?void 0:e.tagName)==="svg"&&(e==null||e.remove())},Sm=function(t,e){const r=t.nodeObj,n=io(r);n.style&&e.style&&(e.style=Object.assign(n.style,e.style));const i=Object.assign(r,e);rs.call(this,t,i),this.linkDiv(),this.bus.fire("operation",{name:"reshapeNode",obj:i,origin:n})},oo=function(t,e,r){if(!e)return null;const n=e.nodeObj;n.expanded===!1&&(t.expandNode(e,!0),e=t.findEle(n.id));const i=r||t.generateNewObj();n.children?n.children.push(i):n.children=[i],un(t.nodeData);const{grp:s,top:a}=t.createWrapper(i);return l1(t,e,s),{newTop:a,newNodeObj:i}},Tm=function(t,e,r){var n,i,s,a;const o=e||this.currentNode;if(!o)return;const l=o.nodeObj;if(l.parent){if(!((n=l.parent)!=null&&n.parent)&&((s=(i=l.parent)==null?void 0:i.children)==null?void 0:s.length)===1&&this.direction===2){this.addChild(this.findEle(l.parent.id),r);return}}else{this.addChild();return}const c=r||this.generateNewObj();if(!((a=l.parent)!=null&&a.parent)){const g=o.closest("me-main").className===fr.LHS?0:1;c.direction=g}ym(c,t,l),un(this.nodeData);const u=o.parentElement,{grp:f,top:p}=this.createWrapper(c);u.parentElement.insertAdjacentElement(c1[t],f),this.linkDiv(f.offsetParent),r||this.editTopic(p.firstChild),this.bus.fire("operation",{name:"insertSibling",type:t,obj:c}),this.selectNode(p.firstChild,!0)},Em=function(t,e){const r=t||this.currentNode;if(!r)return;I0(r);const n=r.nodeObj;if(!n.parent)return;const i=e||this.generateNewObj();wm(n,i),un(this.nodeData);const s=r.parentElement.parentElement,{grp:a,top:o}=this.createWrapper(i,!0);o.appendChild(ao(!0)),s.insertAdjacentElement("afterend",a);const l=this.createChildren([s]);o.insertAdjacentElement("afterend",l),this.linkDiv(),e||this.editTopic(o.firstChild),this.selectNode(o.firstChild,!0),this.bus.fire("operation",{name:"insertParent",obj:i})},Am=function(t,e){const r=t||this.currentNode;if(!r)return;const n=oo(this,r,e);if(!n)return;const{newTop:i,newNodeObj:s}=n;this.bus.fire("operation",{name:"addChild",obj:s}),e||this.editTopic(i.firstChild),this.selectNode(i.firstChild,!0)},Cm=function(t,e){const r=io(t.nodeObj);no(r);const n=oo(this,e,r);if(!n)return;const{newNodeObj:i}=n;this.selectNode(this.findEle(i.id)),this.bus.fire("operation",{name:"copyNode",obj:i})},Mm=function(t,e){t=ts(t);const r=[];for(let n=0;nthis.findEle(n.id))),this.bus.fire("operation",{name:"copyNodes",objs:r})},Nm=function(t){const e=t||this.currentNode;if(!e)return;const r=e.nodeObj;vm(r);const n=e.parentNode.parentNode;n.parentNode.insertBefore(n,n.previousSibling),this.linkDiv(),this.bus.fire("operation",{name:"moveUpNode",obj:r})},Im=function(t){const e=t||this.currentNode;if(!e)return;const r=e.nodeObj;bm(r);const n=e.parentNode.parentNode;n.nextSibling?n.nextSibling.insertAdjacentElement("afterend",n):n.parentNode.prepend(n),this.linkDiv(),this.bus.fire("operation",{name:"moveDownNode",obj:r})},Dm=function(t){if(t.length===0)return;t=ts(t);for(const r of t){const n=r.nodeObj,i=a1(n);km(r,i)}const e=t[t.length-1];this.selectNode(this.findEle(e.nodeObj.parent.id)),this.linkDiv(),this.bus.fire("operation",{name:"removeNodes",objs:t.map(r=>r.nodeObj)})},Rm=function(t,e){t=ts(t);const r=e.nodeObj;r.expanded===!1&&(this.expandNode(e,!0),e=this.findEle(r.id));for(const n of t){const i=n.nodeObj;o1("in",i,r),un(this.nodeData);const s=n.parentElement;l1(this,e,s.parentElement)}this.linkDiv(),this.bus.fire("operation",{name:"moveNodeIn",objs:t.map(n=>n.nodeObj),toObj:r})},u1=(t,e,r,n)=>{t=ts(t),e==="after"&&(t=t.reverse());const i=r.nodeObj,s=[];for(const a of t){const o=a.nodeObj;o1(e,o,i),un(n.nodeData),I0(a);const l=a.parentElement.parentNode;s.includes(l.parentElement)||s.push(l.parentElement),r.parentElement.parentNode.insertAdjacentElement(c1[e],l)}for(const a of s)a.childElementCount===0&&a.tagName!=="ME-MAIN"&&(a.previousSibling.children[1].remove(),a.remove());n.linkDiv(),n.bus.fire("operation",{name:e==="before"?"moveNodeBefore":"moveNodeAfter",objs:t.map(a=>a.nodeObj),toObj:i})},Om=function(t,e){u1(t,"before",e,this)},_m=function(t,e){u1(t,"after",e,this)},Lm=function(t){const e=t||this.currentNode;e&&(e.nodeObj.dangerouslySetInnerHTML||this.editTopic(e))},zm=function(t,e){t.text.textContent=e,t.nodeObj.topic=e,this.linkDiv()},d1=Object.freeze(Object.defineProperty({__proto__:null,addChild:Am,beginEdit:Lm,copyNode:Cm,copyNodes:Mm,insertParent:Em,insertSibling:Tm,moveDownNode:Im,moveNodeAfter:_m,moveNodeBefore:Om,moveNodeIn:Rm,moveUpNode:Nm,removeNodes:Dm,reshapeNode:Sm,rmSubline:I0,setNodeTopic:zm},Symbol.toStringTag,{value:"Module"}));function $m(t){return{nodeData:t.isFocusMode?t.nodeDataBackup:t.nodeData,arrows:t.arrows,summaries:t.summaries,direction:t.direction,theme:t.theme}}const Fm=function(t){const e=this.container,r=t.getBoundingClientRect(),n=e.getBoundingClientRect();if(r.top>n.bottom||r.bottomn.right||r.right{if(!(e==="parent"&&typeof r!="string"))return r})},Um=function(){return JSON.parse(this.getDataString())},Vm=function(){this.editable=!0},Wm=function(){this.editable=!1},Gm=function(t,e={x:0,y:0}){if(tthis.scaleMax)return;const r=this.container.getBoundingClientRect(),n=e.x?e.x-r.left-r.width/2:0,i=e.y?e.y-r.top-r.height/2:0,{dx:s,dy:a}=h1(this),o=this.map.style.transform,{x:l,y:c}=Zu(o),u=l-s,f=c-a,p=this.scaleVal,g=(-n+u)*(1-t/p),v=(-i+f)*(1-t/p);this.map.style.transform=`translate(${l-g}px, ${c-v}px) scale(${t})`,this.scaleVal=t,this.bus.fire("scale",t)},Km=function(){const t=this.nodes.offsetHeight/this.container.offsetHeight,e=this.nodes.offsetWidth/this.container.offsetWidth,r=1/Math.max(1,Math.max(t,e));this.scaleVal=r,this.map.style.transform="scale("+r+")",this.bus.fire("scale",r)},Ym=function(t,e,r=!1){const{map:n,scaleVal:i,bus:s}=this,a=n.style.transform;let{x:o,y:l}=Zu(a);o+=t,l+=e,r&&(n.style.transition="transform 0.3s",setTimeout(()=>{n.style.transition="none"},300)),n.style.transform=`translate(${o}px, ${l}px) scale(${i})`,s.fire("move",{dx:t,dy:e})},h1=t=>{const{container:e,map:r,nodes:n}=t,i=r.querySelector("me-root"),s=i.offsetTop,a=i.offsetLeft,o=i.offsetWidth,l=i.offsetHeight;let c,u;return t.alignment==="root"?(c=e.offsetWidth/2-a-o/2,u=e.offsetHeight/2-s-l/2,r.style.transformOrigin=`${a+o/2}px 50%`):(c=(e.offsetWidth-n.offsetWidth)/2,u=(e.offsetHeight-n.offsetHeight)/2,r.style.transformOrigin="50% 50%"),{dx:c,dy:u}},Xm=function(){const{map:t}=this,{dx:e,dy:r}=h1(this);t.style.transform=`translate(${e}px, ${r}px) scale(${this.scaleVal})`},Jm=function(t){t(this)},Zm=function(t){t.nodeObj.parent&&(this.clearSelection(),this.tempDirection===null&&(this.tempDirection=this.direction),this.isFocusMode||(this.nodeDataBackup=this.nodeData,this.isFocusMode=!0),this.nodeData=t.nodeObj,this.initRight(),this.toCenter())},Qm=function(){this.isFocusMode=!1,this.tempDirection!==null&&(this.nodeData=this.nodeDataBackup,this.direction=this.tempDirection,this.tempDirection=null,this.refresh(),this.toCenter())},e4=function(){this.direction=0,this.refresh(),this.toCenter()},t4=function(){this.direction=1,this.refresh(),this.toCenter()},r4=function(){this.direction=2,this.refresh(),this.toCenter()},n4=function(t){this.locale=t,this.refresh()},i4=function(t,e){const r=t.nodeObj;typeof e=="boolean"?r.expanded=e:r.expanded!==!1?r.expanded=!1:r.expanded=!0;const n=t.getBoundingClientRect(),i={x:n.left,y:n.top},s=t.parentNode,a=s.children[1];if(a.expanded=r.expanded,a.className=r.expanded?"minus":"",I0(t),r.expanded){const f=this.createChildren(r.children.map(p=>this.createWrapper(p).grp));s.parentNode.appendChild(f)}else s.parentNode.children[1].remove();this.linkDiv(t.closest("me-main > me-wrapper"));const o=t.getBoundingClientRect(),l={x:o.left,y:o.top},c=i.x-l.x,u=i.y-l.y;this.move(c,u),this.bus.fire("expandNode",r)},s4=function(t,e){const r=t.nodeObj,n=t.getBoundingClientRect(),i={x:n.left,y:n.top};qn(r,e??!r.expanded),this.refresh();const s=this.findEle(r.id).getBoundingClientRect(),a={x:s.left,y:s.top},o=i.x-a.x,l=i.y-a.y;this.move(o,l)},a4=function(t){this.clearSelection(),t&&(t=JSON.parse(JSON.stringify(t)),this.nodeData=t.nodeData,this.arrows=t.arrows||[],this.summaries=t.summaries||[],t.theme&&this.changeTheme(t.theme)),un(this.nodeData),this.layout(),this.linkDiv()},o4=Object.freeze(Object.defineProperty({__proto__:null,cancelFocus:Qm,clearSelection:qm,disableEdit:Wm,enableEdit:Vm,expandNode:i4,expandNodeAll:s4,focusNode:Zm,getData:Um,getDataString:jm,initLeft:e4,initRight:t4,initSide:r4,install:Jm,move:Ym,refresh:a4,scale:Gm,scaleFit:Km,scrollIntoView:Fm,selectNode:Bm,selectNodes:Pm,setLocale:n4,toCenter:Xm,unselectNodes:Hm},Symbol.toStringTag,{value:"Module"})),l4=function(t){return{dom:t,moved:!1,pointerdown:!1,lastX:0,lastY:0,handlePointerMove(e){if(this.pointerdown){this.moved=!0;const r=e.clientX-this.lastX,n=e.clientY-this.lastY;this.lastX=e.clientX,this.lastY=e.clientY,this.cb&&this.cb(r,n)}},handlePointerDown(e){e.button===0&&(this.pointerdown=!0,this.lastX=e.clientX,this.lastY=e.clientY,this.dom.setPointerCapture(e.pointerId))},handleClear(e){this.pointerdown=!1,e.pointerId!==void 0&&this.dom.releasePointerCapture(e.pointerId)},cb:null,init(e,r){this.cb=r,this.handleClear=this.handleClear.bind(this),this.handlePointerMove=this.handlePointerMove.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this),this.destroy=so([{dom:e,evt:"pointermove",func:this.handlePointerMove},{dom:e,evt:"pointerleave",func:this.handleClear},{dom:e,evt:"pointerup",func:this.handleClear},{dom:this.dom,evt:"pointerdown",func:this.handlePointerDown}])},destroy:null,clear(){this.moved=!1,this.pointerdown=!1}}},Fl={create:l4},c4="#4dc4ff";function f1(t,e,r,n,i,s,a,o){return{x:t/8+r*3/8+i*3/8+a/8,y:e/8+n*3/8+s*3/8+o/8}}function u4(t,e,r){rt(t,{x:e+"",y:r+""})}function Y0(t,e,r,n,i){rt(t,{x1:e+"",y1:r+"",x2:n+"",y2:i+""})}function Bl(t,e,r,n,i,s,a,o,l,c){var u;const f=`M ${e} ${r} C ${n} ${i} ${s} ${a} ${o} ${l}`;if(t.line.setAttribute("d",f),c.style){const y=c.style;y.stroke&&t.line.setAttribute("stroke",y.stroke),y.strokeWidth&&t.line.setAttribute("stroke-width",String(y.strokeWidth)),y.strokeDasharray&&t.line.setAttribute("stroke-dasharray",y.strokeDasharray),y.strokeLinecap&&t.line.setAttribute("stroke-linecap",y.strokeLinecap),y.opacity!==void 0&&t.line.setAttribute("opacity",String(y.opacity))}const p=t.querySelectorAll('path[stroke="transparent"]');p.length>0&&p[0].setAttribute("d",f);const g=Ii(s,a,o,l);if(g){const y=`M ${g.x1} ${g.y1} L ${o} ${l} L ${g.x2} ${g.y2}`;if(t.arrow1.setAttribute("d",y),p.length>1&&p[1].setAttribute("d",y),c.style){const C=c.style;C.stroke&&t.arrow1.setAttribute("stroke",C.stroke),C.strokeWidth&&t.arrow1.setAttribute("stroke-width",String(C.strokeWidth)),C.strokeLinecap&&t.arrow1.setAttribute("stroke-linecap",C.strokeLinecap),C.opacity!==void 0&&t.arrow1.setAttribute("opacity",String(C.opacity))}}if(c.bidirectional){const y=Ii(n,i,e,r);if(y){const C=`M ${y.x1} ${y.y1} L ${e} ${r} L ${y.x2} ${y.y2}`;if(t.arrow2.setAttribute("d",C),p.length>2&&p[2].setAttribute("d",C),c.style){const w=c.style;w.stroke&&t.arrow2.setAttribute("stroke",w.stroke),w.strokeWidth&&t.arrow2.setAttribute("stroke-width",String(w.strokeWidth)),w.strokeLinecap&&t.arrow2.setAttribute("stroke-linecap",w.strokeLinecap),w.opacity!==void 0&&t.arrow2.setAttribute("opacity",String(w.opacity))}}}const{x:v,y:x}=f1(e,r,n,i,s,a,o,l);u4(t.label,v,x),(u=c.style)!=null&&u.labelColor&&t.label.setAttribute("fill",c.style.labelColor),b4(t)}function Oi(t,e,r){const{offsetLeft:n,offsetTop:i}=dn(t.nodes,e),s=e.offsetWidth,a=e.offsetHeight,o=n+s/2,l=i+a/2,c=o+r.x,u=l+r.y;return{w:s,h:a,cx:o,cy:l,ctrlX:c,ctrlY:u}}function zn(t){let e,r;const n=(t.cy-t.ctrlY)/(t.ctrlX-t.cx);return n>t.h/t.w||n<-t.h/t.w?t.cy-t.ctrlY<0?(e=t.cx-t.h/2/n,r=t.cy+t.h/2):(e=t.cx+t.h/2/n,r=t.cy-t.h/2):t.cx-t.ctrlX<0?(e=t.cx+t.w/2,r=t.cy-t.w*n/2):(e=t.cx-t.w/2,r=t.cy+t.w*n/2),{x:e,y:r}}const lo=function(t,e,r,n,i){var s;if(!e||!r)return;const a=Oi(t,e,n.delta1),o=Oi(t,r,n.delta2),{x:l,y:c}=zn(a),{ctrlX:u,ctrlY:f}=a,{ctrlX:p,ctrlY:g}=o,{x:v,y:x}=zn(o),y=Ii(p,g,v,x);if(!y)return;const C=`M ${y.x1} ${y.y1} L ${v} ${x} L ${y.x2} ${y.y2}`;let w="";if(n.bidirectional){const V=Ii(u,f,l,c);if(!V)return;w=`M ${V.x1} ${V.y1} L ${l} ${c} L ${V.x2} ${V.y2}`}const k=Hp(`M ${l} ${c} C ${u} ${f} ${p} ${g} ${v} ${x}`,C,w,n.style),{x:I,y:R}=f1(l,c,u,f,p,g,v,x),_=(s=n.style)==null?void 0:s.labelColor,F=ha(n.label,I,R,{anchor:"middle",color:_,dataType:"custom-link"});k.appendChild(F),k.label=F,k.arrowObj=n,k.dataset.linkid=n.id,t.linkSvgGroup.appendChild(k),i||(t.arrows.push(n),t.currentArrow=k,p1(t,n,a,o))},d4=function(t,e,r={}){const n={id:En(),label:"Custom Link",from:t.nodeObj.id,to:e.nodeObj.id,delta1:{x:t.offsetWidth/2+100,y:0},delta2:{x:e.offsetWidth/2+100,y:0},...r};lo(this,t,e,n),this.bus.fire("operation",{name:"createArrow",obj:n})},h4=function(t){ns(this);const e={...t,id:En()};lo(this,this.findEle(e.from),this.findEle(e.to),e),this.bus.fire("operation",{name:"createArrow",obj:e})},f4=function(t){let e;if(t?e=t:e=this.currentArrow,!e)return;ns(this);const r=e.arrowObj.id;this.arrows=this.arrows.filter(n=>n.id!==r),e.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:r}})},p4=function(t){this.currentArrow=t;const e=t.arrowObj,r=this.findEle(e.from),n=this.findEle(e.to),i=Oi(this,r,e.delta1),s=Oi(this,n,e.delta2);p1(this,e,i,s)},m4=function(){ns(this),this.currentArrow=null},Rs=function(t,e){const r=document.createElementNS(rr,"path");return rt(r,{d:t,stroke:e,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),r},g4=function(t,e){const r=document.createElementNS(rr,"g");r.setAttribute("class","arrow-highlight"),r.setAttribute("opacity","0.45");const n=Rs(t.line.getAttribute("d"),e);r.appendChild(n);const i=Rs(t.arrow1.getAttribute("d"),e);if(r.appendChild(i),t.arrow2.getAttribute("d")){const s=Rs(t.arrow2.getAttribute("d"),e);r.appendChild(s)}t.insertBefore(r,t.firstChild)},v4=function(t){const e=t.querySelector(".arrow-highlight");e&&e.remove()},b4=function(t){const e=t.querySelector(".arrow-highlight");if(!e)return;const r=e.querySelectorAll("path");r.length>=1&&r[0].setAttribute("d",t.line.getAttribute("d")),r.length>=2&&r[1].setAttribute("d",t.arrow1.getAttribute("d")),r.length>=3&&t.arrow2.getAttribute("d")&&r[2].setAttribute("d",t.arrow2.getAttribute("d"))},ns=function(t){var e,r;(e=t.helper1)==null||e.destroy(),(r=t.helper2)==null||r.destroy(),t.linkController.style.display="none",t.P2.style.display="none",t.P3.style.display="none",t.currentArrow&&v4(t.currentArrow)},p1=function(t,e,r,n){const{linkController:i,P2:s,P3:a,line1:o,line2:l,nodes:c,map:u,currentArrow:f,bus:p}=t;if(!f)return;i.style.display="initial",s.style.display="initial",a.style.display="initial",c.appendChild(i),c.appendChild(s),c.appendChild(a),g4(f,c4);let{x:g,y:v}=zn(r),{ctrlX:x,ctrlY:y}=r,{ctrlX:C,ctrlY:w}=n,{x:k,y:I}=zn(n);s.style.cssText=`top:${y}px;left:${x}px;`,a.style.cssText=`top:${w}px;left:${C}px;`,Y0(o,g,v,x,y),Y0(l,C,w,k,I),t.helper1=Fl.create(s),t.helper2=Fl.create(a),t.helper1.init(u,(R,_)=>{x=x+R/t.scaleVal,y=y+_/t.scaleVal;const F=zn({...r,ctrlX:x,ctrlY:y});g=F.x,v=F.y,s.style.top=y+"px",s.style.left=x+"px",Bl(f,g,v,x,y,C,w,k,I,e),Y0(o,g,v,x,y),e.delta1.x=x-r.cx,e.delta1.y=y-r.cy,p.fire("updateArrowDelta",e)}),t.helper2.init(u,(R,_)=>{C=C+R/t.scaleVal,w=w+_/t.scaleVal;const F=zn({...n,ctrlX:C,ctrlY:w});k=F.x,I=F.y,a.style.top=w+"px",a.style.left=C+"px",Bl(f,g,v,x,y,C,w,k,I,e),Y0(l,C,w,k,I),e.delta2.x=C-n.cx,e.delta2.y=w-n.cy,p.fire("updateArrowDelta",e)})};function y4(){this.linkSvgGroup.innerHTML="";for(let t=0;tNi(t.from,this.nodeData)&&Ni(t.to,this.nodeData))}const k4=Object.freeze(Object.defineProperty({__proto__:null,createArrow:d4,createArrowFrom:h4,editArrowLabel:w4,removeArrow:f4,renderArrow:y4,selectArrow:p4,tidyArrow:x4,unselectArrow:m4},Symbol.toStringTag,{value:"Module"})),S4=function(t){var e,r;if(t.length===0)throw new Error("No selected node.");if(t.length===1){const u=t[0].nodeObj,f=t[0].nodeObj.parent;if(!f)throw new Error("Can not select root node.");const p=f.children.findIndex(g=>u===g);return{parent:f.id,start:p,end:p}}let n=0;const i=t.map(u=>{let f=u.nodeObj;const p=[];for(;f.parent;){const g=f.parent,v=g.children,x=v==null?void 0:v.indexOf(f);f=g,p.unshift({node:f,index:x})}return p.length>n&&(n=p.length),p});let s=0;e:for(;su[s-1].index).sort(),o=a[0]||0,l=a[a.length-1]||0,c=i[0][s-1].node;if(!c.parent)throw new Error("Please select nodes in the same main topic.");return{parent:c.id,start:o,end:l}},T4=function(t){const e=document.createElementNS(rr,"g");return e.setAttribute("id",t),e},Pl=function(t,e){const r=document.createElementNS(rr,"path");return rt(r,{d:t,stroke:e||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),r},E4=t=>t.parentElement.parentElement,A4=function(t,{parent:e,start:r}){const n=t.findEle(e),i=n.nodeObj;let s;return i.parent?s=n.closest("me-main").className:s=t.findEle(i.children[r].id).closest("me-main").className,s},co=function(t,e){var r;const{id:n,label:i,parent:s,start:a,end:o}=e,{nodes:l,theme:c,summarySvg:u}=t,f=t.findEle(s).nodeObj,p=A4(t,e);let g=1/0,v=0,x=0,y=0;for(let V=a;V<=o;V++){const q=(r=f.children)==null?void 0:r[V];if(!q)return t.removeSummary(n),null;const le=E4(t.findEle(q.id)),{offsetLeft:me,offsetTop:Se}=dn(l,le),ze=a===o?10:20;V===a&&(x=Se+ze),V===o&&(y=Se+le.offsetHeight-ze),mev&&(v=le.offsetWidth+me)}let C,w;const k=x+10,I=y+10,R=(k+I)/2,_=c.cssVar["--color"];p===fr.LHS?(C=Pl(`M ${g+10} ${k} c -5 0 -10 5 -10 10 L ${g} ${I-10} c 0 5 5 10 10 10 M ${g} ${R} h -10`,_),w=ha(i,g-20,R+6,{anchor:"end",color:_})):(C=Pl(`M ${v-10} ${k} c 5 0 10 5 10 10 L ${v} ${I-10} c 0 5 -5 10 -10 10 M ${v} ${R} h 10`,_),w=ha(i,v+20,R+6,{anchor:"start",color:_}));const F=T4("s-"+n);return F.appendChild(C),F.appendChild(w),F.summaryObj=e,u.appendChild(F),F},C4=function(){if(!this.currentNodes)return;const{currentNodes:t,summaries:e,bus:r}=this,{parent:n,start:i,end:s}=S4(t),a={id:En(),parent:n,start:i,end:s,label:"summary"},o=co(this,a);e.push(a),this.editSummary(o),r.fire("operation",{name:"createSummary",obj:a})},M4=function(t){const e=En(),r={...t,id:e};co(this,r),this.summaries.push(r),this.bus.fire("operation",{name:"createSummary",obj:r})},N4=function(t){var e;const r=this.summaries.findIndex(n=>n.id===t);r>-1&&(this.summaries.splice(r,1),(e=document.querySelector("#s-"+t))==null||e.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:t}})},I4=function(t){const e=t.children[1].getBBox(),r=6,n=3,i=document.createElementNS(rr,"rect");rt(i,{x:e.x-r+"",y:e.y-r+"",width:e.width+r*2+"",height:e.height+r*2+"",rx:n+"",stroke:this.theme.cssVar["--selected"]||"#4dc4ff","stroke-width":"2",fill:"none"}),t.appendChild(i),this.currentSummary=t},D4=function(){var t,e;(e=(t=this.currentSummary)==null?void 0:t.querySelector("rect"))==null||e.remove(),this.currentSummary=null},R4=function(){this.summarySvg.innerHTML="",this.summaries.forEach(t=>{try{co(this,t)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},O4=function(t){if(!t)return;const e=t.childNodes[1];r1(this,e,t.summaryObj)},_4=Object.freeze(Object.defineProperty({__proto__:null,createSummary:C4,createSummaryFrom:M4,editSummary:O4,removeSummary:N4,renderSummary:R4,selectSummary:I4,unselectSummary:D4},Symbol.toStringTag,{value:"Module"})),vt="http://www.w3.org/2000/svg";function L4(t,e){const r=document.createElementNS(vt,"svg");return rt(r,{version:"1.1",xmlns:vt,height:t,width:e}),r}function m1(t,e,r,n){const i=document.createElementNS(vt,"g");let s="";t.text?s=t.text.textContent:s=t.childNodes[0].textContent;const a=s.split(` +`),o=parseFloat(e.lineHeight)||parseFloat(e.fontSize)*1.2,l=parseFloat(e.fontSize),c=parseInt(e.paddingTop)||8,u=parseInt(e.paddingLeft)||8,f=t.offsetWidth||200,p=r+u,g=(a.length-1)*o+l+c+(parseInt(e.paddingBottom)||8),v=t.offsetHeight||100,x=Math.min(g,v),y=document.createElementNS(vt,"rect");return rt(y,{x:r+"",y:n+"",rx:e.borderRadius||"8",ry:e.borderRadius||"8",width:f+"px",height:x+"px",fill:e.backgroundColor||"white",stroke:e.borderColor||"#ccc","stroke-width":e.borderWidth||"1"}),i.appendChild(y),a.forEach((C,w)=>{const k=document.createElementNS(vt,"text");rt(k,{x:p+"",y:n+c+l+o*w+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),k.innerHTML=C,i.appendChild(k)}),i}function Hl(t){if(!t)return t;let e=t.replace(/]*>([^<]*)([^<]*)<\/td>/gi,(r,n,i)=>`
    `);return e=e.replace(/]*>([^<]*)([^<]*)<\/th>/gi,(r,n,i)=>``),e=e.replace(//gi," "),e=e.replace(/•\s*【/g,"【"),e=e.replace(/•\s*\[/g,"["),e=e.replace(/•\s*(/g,"("),e=e.replace(/•\s*\(/g,"("),e=e.replace(/<([^>]+)>/g,(r,n)=>{const i=["br","hr","img","input","meta","link"],s=n.split(" ")[0].toLowerCase();return i.includes(s)?`<${n} />`:r}),e}function Os(t,e,r,n){const i=document.createElementNS(vt,"g"),s=t;let a="";s.nodeObj&&s.nodeObj.dangerouslySetInnerHTML?a=s.nodeObj.dangerouslySetInnerHTML:s.text&&s.text.innerHTML&&(a=s.text.innerHTML);const o=a&&a!==t.textContent,l=a&&a.includes(" + ${Hl(a)} + + `;return p.innerHTML=g,i.appendChild(p),i}if(o&&!l){const c=Hl(a),u=t.getBoundingClientRect(),f=u.width,p=u.height;c.includes("F.trim());if(_.length>0){const F=parseFloat(e.fontSize)||14,V=F*1.4,q=parseInt(e.paddingTop)||8,le=parseInt(e.paddingBottom)||8,me=parseInt(e.paddingLeft)||8,Se=(_.length-1)*V+F+q+le,ze=Math.min(Se,p),Le=c.includes("{const Be=document.createElementNS(vt,"text");rt(Be,{x:Ge+"",y:Oe+V*je+"","text-anchor":Le?"middle":"start","font-family":e.fontFamily,"font-size":e.fontSize,"font-weight":e.fontWeight,fill:e.color}),Be.innerHTML=fe.trim(),i.appendChild(Be)});const xe=document.createElementNS(vt,"rect");return rt(xe,{x:r+"",y:n+"",rx:e.borderRadius||"8",ry:e.borderRadius||"8",width:f+"px",height:ze+"px",fill:e.backgroundColor||"white",stroke:e.borderColor||"#ccc","stroke-width":e.borderWidth||"1"}),i.insertBefore(xe,i.firstChild),document.body.removeChild(R),i}document.body.removeChild(R)}catch{}const g=document.createElementNS(vt,"foreignObject");rt(g,{x:r+"",y:n+"",width:f+"px",height:p+"px"});const v=document.createElement("div");v.innerHTML=c;const x=15,y=15,C=parseInt(e.paddingLeft)||8,w=parseInt(e.paddingRight)||8;v.style.cssText=` + width: 100%; + height: 100%; + font-family: '${(e.fontFamily||"Arial").replace(/"/g,""")}'; + font-size: ${e.fontSize}; + color: ${e.color}; + background: transparent; + padding: ${x}px ${w}px ${y}px ${C}px; + box-sizing: border-box; + overflow: visible; + text-align: center !important; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + position: relative; + `,v.querySelectorAll("table").forEach(R=>{const _=R;_.style.cssText=` + width: 100%; + border-collapse: collapse; + font-size: ${e.fontSize}; + font-family: '${(e.fontFamily||"Arial").replace(/"/g,""")}'; + margin: 0 auto 0px auto; + border: 1px solid #ccc; + `,R.querySelectorAll("td, th").forEach(F=>{const V=F;V.style.cssText=` + border: 1px solid #ccc; + padding: 4px 8px; + text-align: center; + vertical-align: top; + font-size: ${parseFloat(e.fontSize)*.9}px; + background: white; + `})}),v.querySelectorAll("ul, ol").forEach(R=>{const _=R;_.style.cssText=` + margin: 2px 0 4px 0 !important; + padding-left: 0 !important; + text-align: center !important; + list-style-position: inside !important; + `}),v.querySelectorAll("li").forEach(R=>{const _=R;_.style.cssText=` + margin: 1px 0 !important; + line-height: 1.2 !important; + padding: 0 !important; + text-align: center !important; + list-style-position: inside !important; + `}),v.querySelectorAll("p").forEach(R=>{const _=R;_.style.cssText=` + margin: 2px 0 !important; + line-height: 1.4 !important; + padding: 0 !important; + text-align: center !important; + `}),v.querySelectorAll("span, div, strong, em").forEach(R=>{const _=R;_.style.cssText=` + text-align: center !important; + display: block !important; + margin-left: auto !important; + margin-right: auto !important; + `});const k=document.createElement("style");k.textContent=` + * { + text-align: center !important; + margin-left: auto !important; + margin-right: auto !important; + } + `,v.appendChild(k),v.querySelectorAll("img").forEach((R,_)=>{const F=R,V=f-C-w-5,q=Math.floor(p*.7);F.style.cssText=` + max-width: ${V}px !important; + max-height: ${q}px !important; + width: auto !important; + height: auto !important; + display: block !important; + margin: 8px auto 0px auto !important; + border-radius: 4px; + object-fit: contain !important; + flex-shrink: 0 !important; + box-sizing: border-box !important; + position: relative !important; + top: 0 !important; + left: 0 !important; + right: 0 !important; + bottom: 0 !important; + `}),g.appendChild(v);const I=document.createElementNS(vt,"rect");rt(I,{x:r+"",y:n+"",rx:e.borderRadius||"8",ry:e.borderRadius||"8",width:f+"px",height:p+"px",fill:e.backgroundColor||"white",stroke:e.borderColor||"#ccc","stroke-width":e.borderWidth||"1"}),i.insertBefore(I,i.firstChild),i.appendChild(g)}else return m1(t,e,r,n);return i}function X0(t,e,r=!1){var n;const i=getComputedStyle(e),{offsetLeft:s,offsetTop:a}=dn(t.nodes,e),o=e;o.nodeObj&&o.nodeObj.dangerouslySetInnerHTML&&((n=o.nodeObj.dangerouslySetInnerHTML)==null||n.includes("{const n=new Image;n.crossOrigin="anonymous",n.onload=()=>{try{const i=document.createElement("canvas");i.width=n.width,i.height=n.height;const s=i.getContext("2d");if(!s){r(new Error("Failed to get canvas context"));return}s.drawImage(n,0,0);const a=i.toDataURL("image/png");e(a)}catch(i){r(i)}},n.onerror=()=>{r(new Error("Failed to load image"))},n.src=t})}const J0=100,B4='',P4=async(t,e=!1)=>{var r,n,i;const s=t.nodes,a=s.offsetHeight+J0*2,o=s.offsetWidth+J0*2,l=L4(a+"px",o+"px"),c=document.createElementNS(vt,"svg"),u=document.createElementNS(vt,"rect");rt(u,{x:"0",y:"0",width:`${o}`,height:`${a}`,fill:t.theme.cssVar["--bgcolor"]}),l.appendChild(u),s.querySelectorAll(".subLines").forEach(y=>{const C=y.cloneNode(!0),{offsetLeft:w,offsetTop:k}=dn(s,y.parentElement);C.setAttribute("x",`${w}`),C.setAttribute("y",`${k}`),c.appendChild(C)});const f=(r=s.querySelector(".lines"))==null?void 0:r.cloneNode(!0);f&&c.appendChild(f);const p=(n=s.querySelector(".topiclinks"))==null?void 0:n.cloneNode(!0);p&&c.appendChild(p);const g=(i=s.querySelector(".summary"))==null?void 0:i.cloneNode(!0);g&&c.appendChild(g);const v=Array.from(s.querySelectorAll("me-tpc")).map(async y=>{const C=y.nodeObj.dangerouslySetInnerHTML,w=!!(y.text&&y.text.innerHTML&&y.text.innerHTML!==y.text.textContent),k=y.nodeObj.image;if(C||w?c.appendChild(X0(t,y,!e)):c.appendChild(X0(t,y,!1)),k)try{const I=await $4(t,y);I&&c.appendChild(I)}catch{}});await Promise.all(v),s.querySelectorAll(".tags > span").forEach(y=>{c.appendChild(X0(t,y))}),s.querySelectorAll(".icons > span").forEach(y=>{c.appendChild(X0(t,y))}),s.querySelectorAll(".hyper-link").forEach(y=>{c.appendChild(z4(t,y))});const x=Array.from(s.querySelectorAll("img")).map(async(y,C)=>{const w=y.closest("me-tpc"),k=y.closest("foreignObject");return w||k?null:await F4(t,y)});return(await Promise.all(x)).filter(y=>y!==null).forEach(y=>{y&&c.appendChild(y)}),rt(c,{x:J0+"",y:J0+"",overflow:"visible"}),l.appendChild(c),l},H4=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin",""),B4+t.outerHTML);function q4(t){return new Promise((e,r)=>{const n=new FileReader;n.onload=i=>{e(i.target.result)},n.onerror=i=>{r(i)},n.readAsDataURL(t)})}const j4=async function(t=!1,e){const r=await P4(this,t),n=H4(r,e);return new Blob([n],{type:"image/svg+xml"})},U4=async function(t=!1,e){const r=await this.exportSvg(t,e),n=await q4(r);return new Promise((i,s)=>{const a=new Image;a.setAttribute("crossOrigin","anonymous");const o=setTimeout(()=>{s(new Error("Image loading timeout"))},1e4);a.onload=()=>{clearTimeout(o);try{const l=document.createElement("canvas");l.width=a.width,l.height=a.height;const c=l.getContext("2d");c.fillStyle="#ffffff",c.fillRect(0,0,l.width,l.height),c.drawImage(a,0,0),l.toBlob(i,"image/png",1)}catch(l){s(l)}},a.onerror=l=>{clearTimeout(o),s(l)},a.src=n})},V4=Object.freeze(Object.defineProperty({__proto__:null,exportPng:U4,exportSvg:j4},Symbol.toStringTag,{value:"Module"}));function W4(t,e){return async function(...r){const n=this.before[e];n&&!await n.apply(this,r)||t.apply(this,r)}}const ql=Object.keys(d1),v1={};for(let t=0;te()),this.el&&(this.el.innerHTML=""),this.el=void 0,this.nodeData=void 0,this.arrows=void 0,this.summaries=void 0,this.currentArrow=void 0,this.currentNodes=void 0,this.currentSummary=void 0,this.waitCopy=void 0,this.theme=void 0,this.direction=void 0,this.bus=void 0,this.container=void 0,this.map=void 0,this.lines=void 0,this.linkController=void 0,this.linkSvgGroup=void 0,this.P2=void 0,this.P3=void 0,this.line1=void 0,this.line2=void 0,this.nodes=void 0,(t=this.selection)==null||t.destroy(),this.selection=void 0}};function K4({pT:t,pL:e,pW:r,pH:n,cT:i,cL:s,cW:a,cH:o,direction:l,containerHeight:c}){let u=e+r/2;const f=t+n/2;let p;l===fr.LHS?p=s+a:p=s;const g=i+o/2,v=(1-Math.abs(g-f)/c)*.25*(r/2);return l===fr.LHS?u=u-r/10-v:u=u+r/10+v,`M ${u} ${f} Q ${u} ${g} ${p} ${g}`}function Y4({pT:t,pL:e,pW:r,pH:n,cT:i,cL:s,cW:a,cH:o,direction:l,isFirst:c}){const u=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let f=0,p=0;c?f=t+n/2:f=t+n;const g=i+o;let v=0,x=0,y=0;const C=Math.abs(f-g)/300*u;return l===fr.LHS?(y=e,v=y+u,x=y-u,p=s+u,`M ${v} ${f} C ${y} ${f} ${y+C} ${g} ${x} ${g} H ${p}`):(y=e+r,v=y-u,x=y+u,p=s+a-u,`M ${v} ${f} C ${y} ${f} ${y-C} ${g} ${x} ${g} H ${p}`)}const X4="5.1.1";function J4(t){return{x:0,y:0,moved:!1,mousedown:!1,onMove(e,r){this.mousedown&&(this.moved=!0,t.move(e,r))},clear(){this.mousedown=!1}}}const r0=document;function kt({el:t,direction:e,locale:r,draggable:n,editable:i,contextMenu:s,toolBar:a,keypress:o,mouseSelectionButton:l,selectionContainer:c,before:u,newTopicName:f,allowUndo:p,generateMainBranch:g,generateSubBranch:v,overflowHidden:x,theme:y,alignment:C,scaleSensitivity:w,scaleMax:k,scaleMin:I,handleWheel:R,markdown:_,imageProxy:F}){let V=null;const q=Object.prototype.toString.call(t);if(q==="[object HTMLDivElement]"?V=t:q==="[object String]"&&(V=document.querySelector(t)),!V)throw new Error("MindElixir: el is not a valid element");V.style.position="relative",V.innerHTML="",this.el=V,this.disposable=[],this.before=u||{},this.locale=r||"en",this.newTopicName=f||"New Node",this.contextMenu=s??!0,this.toolBar=a??!0,this.keypress=o??!0,this.mouseSelectionButton=l??0,this.direction=e??1,this.draggable=n??!0,this.editable=i??!0,this.allowUndo=p??!0,this.scaleSensitivity=w??.1,this.scaleMax=k??1.4,this.scaleMin=I??.2,this.generateMainBranch=g||K4,this.generateSubBranch=v||Y4,this.overflowHidden=x??!1,this.alignment=C??"root",this.handleWheel=R??!0,this.markdown=_||void 0,this.imageProxy=F||void 0,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.dragMoveHelper=J4(this),this.bus=Rp(),this.container=r0.createElement("div"),this.selectionContainer=c||this.container,this.container.className="map-container";const le=window.matchMedia("(prefers-color-scheme: dark)");this.theme=y||(le.matches?ro:to);const me=r0.createElement("div");me.className="map-canvas",this.map=me,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=r0.createElement("me-nodes"),this.lines=o0("lines"),this.summarySvg=o0("summary"),this.linkController=o0("linkcontroller"),this.P2=r0.createElement("div"),this.P3=r0.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=Cl(),this.line2=Cl(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=o0("topiclinks"),this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push(Dp(this))}kt.prototype=G4;Object.defineProperty(kt.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0});kt.LEFT=0;kt.RIGHT=1;kt.SIDE=2;kt.THEME=to;kt.DARK_THEME=ro;kt.version=X4;kt.E=Qu;kt.new=t=>({nodeData:{id:En(),topic:t||"new topic",children:[]}});function b1(t,e){return function(){return t.apply(e,arguments)}}const{toString:Z4}=Object.prototype,{getPrototypeOf:uo}=Object,{iterator:is,toStringTag:y1}=Symbol,ss=(t=>e=>{const r=Z4.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),pr=t=>(t=t.toLowerCase(),e=>ss(e)===t),as=t=>e=>typeof e===t,{isArray:Yn}=Array,T0=as("undefined");function D0(t){return t!==null&&!T0(t)&&t.constructor!==null&&!T0(t.constructor)&&jt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const w1=pr("ArrayBuffer");function Q4(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&w1(t.buffer),e}const e2=as("string"),jt=as("function"),x1=as("number"),R0=t=>t!==null&&typeof t=="object",t2=t=>t===!0||t===!1,pi=t=>{if(ss(t)!=="object")return!1;const e=uo(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(y1 in t)&&!(is in t)},r2=t=>{if(!R0(t)||D0(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},n2=pr("Date"),i2=pr("File"),s2=pr("Blob"),a2=pr("FileList"),o2=t=>R0(t)&&jt(t.pipe),l2=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||jt(t.append)&&((e=ss(t))==="formdata"||e==="object"&&jt(t.toString)&&t.toString()==="[object FormData]"))},c2=pr("URLSearchParams"),[u2,d2,h2,f2]=["ReadableStream","Request","Response","Headers"].map(pr),p2=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function O0(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),Yn(t))for(n=0,i=t.length;n0;)if(i=r[n],e===i.toLowerCase())return i;return null}const wn=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),S1=t=>!T0(t)&&t!==wn;function ga(){const{caseless:t}=S1(this)&&this||{},e={},r=(n,i)=>{const s=t&&k1(e,i)||i;pi(e[s])&&pi(n)?e[s]=ga(e[s],n):pi(n)?e[s]=ga({},n):Yn(n)?e[s]=n.slice():e[s]=n};for(let n=0,i=arguments.length;n(O0(e,(i,s)=>{r&&jt(i)?t[s]=b1(i,r):t[s]=i},{allOwnKeys:n}),t),g2=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),v2=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},b2=(t,e,r,n)=>{let i,s,a;const o={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)a=i[s],(!n||n(a,t,e))&&!o[a]&&(e[a]=t[a],o[a]=!0);t=r!==!1&&uo(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},y2=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},w2=t=>{if(!t)return null;if(Yn(t))return t;let e=t.length;if(!x1(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},x2=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&uo(Uint8Array)),k2=(t,e)=>{const n=(t&&t[is]).call(t);let i;for(;(i=n.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},S2=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},T2=pr("HTMLFormElement"),E2=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),jl=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),A2=pr("RegExp"),T1=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};O0(r,(i,s)=>{let a;(a=e(i,s,t))!==!1&&(n[s]=a||i)}),Object.defineProperties(t,n)},C2=t=>{T1(t,(e,r)=>{if(jt(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(jt(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},M2=(t,e)=>{const r={},n=i=>{i.forEach(s=>{r[s]=!0})};return Yn(t)?n(t):n(String(t).split(e)),r},N2=()=>{},I2=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function D2(t){return!!(t&&jt(t.append)&&t[y1]==="FormData"&&t[is])}const R2=t=>{const e=new Array(10),r=(n,i)=>{if(R0(n)){if(e.indexOf(n)>=0)return;if(D0(n))return n;if(!("toJSON"in n)){e[i]=n;const s=Yn(n)?[]:{};return O0(n,(a,o)=>{const l=r(a,i+1);!T0(l)&&(s[o]=l)}),e[i]=void 0,s}}return n};return r(t,0)},O2=pr("AsyncFunction"),_2=t=>t&&(R0(t)||jt(t))&&jt(t.then)&&jt(t.catch),E1=((t,e)=>t?setImmediate:e?((r,n)=>(wn.addEventListener("message",({source:i,data:s})=>{i===wn&&s===r&&n.length&&n.shift()()},!1),i=>{n.push(i),wn.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",jt(wn.postMessage)),L2=typeof queueMicrotask<"u"?queueMicrotask.bind(wn):typeof process<"u"&&process.nextTick||E1,z2=t=>t!=null&&jt(t[is]),P={isArray:Yn,isArrayBuffer:w1,isBuffer:D0,isFormData:l2,isArrayBufferView:Q4,isString:e2,isNumber:x1,isBoolean:t2,isObject:R0,isPlainObject:pi,isEmptyObject:r2,isReadableStream:u2,isRequest:d2,isResponse:h2,isHeaders:f2,isUndefined:T0,isDate:n2,isFile:i2,isBlob:s2,isRegExp:A2,isFunction:jt,isStream:o2,isURLSearchParams:c2,isTypedArray:x2,isFileList:a2,forEach:O0,merge:ga,extend:m2,trim:p2,stripBOM:g2,inherits:v2,toFlatObject:b2,kindOf:ss,kindOfTest:pr,endsWith:y2,toArray:w2,forEachEntry:k2,matchAll:S2,isHTMLForm:T2,hasOwnProperty:jl,hasOwnProp:jl,reduceDescriptors:T1,freezeMethods:C2,toObjectSet:M2,toCamelCase:E2,noop:N2,toFiniteNumber:I2,findKey:k1,global:wn,isContextDefined:S1,isSpecCompliantForm:D2,toJSONObject:R2,isAsyncFn:O2,isThenable:_2,setImmediate:E1,asap:L2,isIterable:z2};function Me(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}P.inherits(Me,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:P.toJSONObject(this.config),code:this.code,status:this.status}}});const A1=Me.prototype,C1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{C1[t]={value:t}});Object.defineProperties(Me,C1);Object.defineProperty(A1,"isAxiosError",{value:!0});Me.from=(t,e,r,n,i,s)=>{const a=Object.create(A1);return P.toFlatObject(t,a,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),Me.call(a,t.message,e,r,n,i),a.cause=t,a.name=t.name,s&&Object.assign(a,s),a};const $2=null;function va(t){return P.isPlainObject(t)||P.isArray(t)}function M1(t){return P.endsWith(t,"[]")?t.slice(0,-2):t}function Ul(t,e,r){return t?t.concat(e).map(function(i,s){return i=M1(i),!r&&s?"["+i+"]":i}).join(r?".":""):e}function F2(t){return P.isArray(t)&&!t.some(va)}const B2=P.toFlatObject(P,{},null,function(e){return/^is[A-Z]/.test(e)});function os(t,e,r){if(!P.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=P.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,y){return!P.isUndefined(y[x])});const n=r.metaTokens,i=r.visitor||u,s=r.dots,a=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&P.isSpecCompliantForm(e);if(!P.isFunction(i))throw new TypeError("visitor must be a function");function c(v){if(v===null)return"";if(P.isDate(v))return v.toISOString();if(P.isBoolean(v))return v.toString();if(!l&&P.isBlob(v))throw new Me("Blob is not supported. Use a Buffer instead.");return P.isArrayBuffer(v)||P.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,x,y){let C=v;if(v&&!y&&typeof v=="object"){if(P.endsWith(x,"{}"))x=n?x:x.slice(0,-2),v=JSON.stringify(v);else if(P.isArray(v)&&F2(v)||(P.isFileList(v)||P.endsWith(x,"[]"))&&(C=P.toArray(v)))return x=M1(x),C.forEach(function(k,I){!(P.isUndefined(k)||k===null)&&e.append(a===!0?Ul([x],I,s):a===null?x:x+"[]",c(k))}),!1}return va(v)?!0:(e.append(Ul(y,x,s),c(v)),!1)}const f=[],p=Object.assign(B2,{defaultVisitor:u,convertValue:c,isVisitable:va});function g(v,x){if(!P.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+x.join("."));f.push(v),P.forEach(v,function(C,w){(!(P.isUndefined(C)||C===null)&&i.call(e,C,P.isString(w)?w.trim():w,x,p))===!0&&g(C,x?x.concat(w):[w])}),f.pop()}}if(!P.isObject(t))throw new TypeError("data must be an object");return g(t),e}function Vl(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function ho(t,e){this._pairs=[],t&&os(t,this,e)}const N1=ho.prototype;N1.append=function(e,r){this._pairs.push([e,r])};N1.toString=function(e){const r=e?function(n){return e.call(this,n,Vl)}:Vl;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function P2(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function I1(t,e,r){if(!e)return t;const n=r&&r.encode||P2;P.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let s;if(i?s=i(e,r):s=P.isURLSearchParams(e)?e.toString():new ho(e,r).toString(n),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class H2{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){P.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Wl=H2,D1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},q2=typeof URLSearchParams<"u"?URLSearchParams:ho,j2=typeof FormData<"u"?FormData:null,U2=typeof Blob<"u"?Blob:null,V2={isBrowser:!0,classes:{URLSearchParams:q2,FormData:j2,Blob:U2},protocols:["http","https","file","blob","url","data"]},fo=typeof window<"u"&&typeof document<"u",ba=typeof navigator=="object"&&navigator||void 0,W2=fo&&(!ba||["ReactNative","NativeScript","NS"].indexOf(ba.product)<0),G2=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),K2=fo&&window.location.href||"http://localhost",Y2=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:fo,hasStandardBrowserEnv:W2,hasStandardBrowserWebWorkerEnv:G2,navigator:ba,origin:K2},Symbol.toStringTag,{value:"Module"})),Mt={...Y2,...V2};function X2(t,e){return os(t,new Mt.classes.URLSearchParams,{visitor:function(r,n,i,s){return Mt.isNode&&P.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function J2(t){return P.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Z2(t){const e={},r=Object.keys(t);let n;const i=r.length;let s;for(n=0;n=r.length;return a=!a&&P.isArray(i)?i.length:a,l?(P.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!o):((!i[a]||!P.isObject(i[a]))&&(i[a]=[]),e(r,n,i[a],s)&&P.isArray(i[a])&&(i[a]=Z2(i[a])),!o)}if(P.isFormData(t)&&P.isFunction(t.entries)){const r={};return P.forEachEntry(t,(n,i)=>{e(J2(n),i,r,0)}),r}return null}function Q2(t,e,r){if(P.isString(t))try{return(e||JSON.parse)(t),P.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const po={transitional:D1,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,s=P.isObject(e);if(s&&P.isHTMLForm(e)&&(e=new FormData(e)),P.isFormData(e))return i?JSON.stringify(R1(e)):e;if(P.isArrayBuffer(e)||P.isBuffer(e)||P.isStream(e)||P.isFile(e)||P.isBlob(e)||P.isReadableStream(e))return e;if(P.isArrayBufferView(e))return e.buffer;if(P.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return X2(e,this.formSerializer).toString();if((o=P.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return os(o?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||i?(r.setContentType("application/json",!1),Q2(e)):e}],transformResponse:[function(e){const r=this.transitional||po.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(P.isResponse(e)||P.isReadableStream(e))return e;if(e&&P.isString(e)&&(n&&!this.responseType||i)){const a=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(o){if(a)throw o.name==="SyntaxError"?Me.from(o,Me.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mt.classes.FormData,Blob:Mt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};P.forEach(["delete","get","head","post","put","patch"],t=>{po.headers[t]={}});const mo=po,e3=P.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),t3=t=>{const e={};let r,n,i;return t&&t.split(` +`).forEach(function(a){i=a.indexOf(":"),r=a.substring(0,i).trim().toLowerCase(),n=a.substring(i+1).trim(),!(!r||e[r]&&e3[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},Gl=Symbol("internals");function n0(t){return t&&String(t).trim().toLowerCase()}function mi(t){return t===!1||t==null?t:P.isArray(t)?t.map(mi):String(t)}function r3(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const n3=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function _s(t,e,r,n,i){if(P.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!P.isString(e)){if(P.isString(n))return e.indexOf(n)!==-1;if(P.isRegExp(n))return n.test(e)}}function i3(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function s3(t,e){const r=P.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,s,a){return this[n].call(this,e,i,s,a)},configurable:!0})})}class ls{constructor(e){e&&this.set(e)}set(e,r,n){const i=this;function s(o,l,c){const u=n0(l);if(!u)throw new Error("header name must be a non-empty string");const f=P.findKey(i,u);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||l]=mi(o))}const a=(o,l)=>P.forEach(o,(c,u)=>s(c,u,l));if(P.isPlainObject(e)||e instanceof this.constructor)a(e,r);else if(P.isString(e)&&(e=e.trim())&&!n3(e))a(t3(e),r);else if(P.isObject(e)&&P.isIterable(e)){let o={},l,c;for(const u of e){if(!P.isArray(u))throw TypeError("Object iterator must return a key-value pair");o[c=u[0]]=(l=o[c])?P.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}a(o,r)}else e!=null&&s(r,e,n);return this}get(e,r){if(e=n0(e),e){const n=P.findKey(this,e);if(n){const i=this[n];if(!r)return i;if(r===!0)return r3(i);if(P.isFunction(r))return r.call(this,i,n);if(P.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=n0(e),e){const n=P.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||_s(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let i=!1;function s(a){if(a=n0(a),a){const o=P.findKey(n,a);o&&(!r||_s(n,n[o],o,r))&&(delete n[o],i=!0)}}return P.isArray(e)?e.forEach(s):s(e),i}clear(e){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const s=r[n];(!e||_s(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const r=this,n={};return P.forEach(this,(i,s)=>{const a=P.findKey(n,s);if(a){r[a]=mi(i),delete r[s];return}const o=e?i3(s):String(s).trim();o!==s&&delete r[s],r[o]=mi(i),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return P.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&P.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[Gl]=this[Gl]={accessors:{}}).accessors,i=this.prototype;function s(a){const o=n0(a);n[o]||(s3(i,a),n[o]=!0)}return P.isArray(e)?e.forEach(s):s(e),this}}ls.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);P.reduceDescriptors(ls.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});P.freezeMethods(ls);const hr=ls;function Ls(t,e){const r=this||mo,n=e||r,i=hr.from(n.headers);let s=n.data;return P.forEach(t,function(o){s=o.call(r,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function O1(t){return!!(t&&t.__CANCEL__)}function Xn(t,e,r){Me.call(this,t??"canceled",Me.ERR_CANCELED,e,r),this.name="CanceledError"}P.inherits(Xn,Me,{__CANCEL__:!0});function _1(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new Me("Request failed with status code "+r.status,[Me.ERR_BAD_REQUEST,Me.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function a3(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function o3(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i=0,s=0,a;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=n[s];a||(a=c),r[i]=l,n[i]=c;let f=s,p=0;for(;f!==i;)p+=r[f++],f=f%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-a{r=u,i=null,s&&(clearTimeout(s),s=null),t(...c)};return[(...c)=>{const u=Date.now(),f=u-r;f>=n?a(c,u):(i=c,s||(s=setTimeout(()=>{s=null,a(i)},n-f)))},()=>i&&a(i)]}const _i=(t,e,r=3)=>{let n=0;const i=o3(50,250);return l3(s=>{const a=s.loaded,o=s.lengthComputable?s.total:void 0,l=a-n,c=i(l),u=a<=o;n=a;const f={loaded:a,total:o,progress:o?a/o:void 0,bytes:l,rate:c||void 0,estimated:c&&o&&u?(o-a)/c:void 0,event:s,lengthComputable:o!=null,[e?"download":"upload"]:!0};t(f)},r)},Kl=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Yl=t=>(...e)=>P.asap(()=>t(...e)),c3=Mt.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,Mt.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(Mt.origin),Mt.navigator&&/(msie|trident)/i.test(Mt.navigator.userAgent)):()=>!0,u3=Mt.hasStandardBrowserEnv?{write(t,e,r,n,i,s){const a=[t+"="+encodeURIComponent(e)];P.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),P.isString(n)&&a.push("path="+n),P.isString(i)&&a.push("domain="+i),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function d3(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function h3(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function L1(t,e,r){let n=!d3(e);return t&&(n||r==!1)?h3(t,e):e}const Xl=t=>t instanceof hr?{...t}:t;function Sn(t,e){e=e||{};const r={};function n(c,u,f,p){return P.isPlainObject(c)&&P.isPlainObject(u)?P.merge.call({caseless:p},c,u):P.isPlainObject(u)?P.merge({},u):P.isArray(u)?u.slice():u}function i(c,u,f,p){if(P.isUndefined(u)){if(!P.isUndefined(c))return n(void 0,c,f,p)}else return n(c,u,f,p)}function s(c,u){if(!P.isUndefined(u))return n(void 0,u)}function a(c,u){if(P.isUndefined(u)){if(!P.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function o(c,u,f){if(f in e)return n(c,u);if(f in t)return n(void 0,c)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(c,u,f)=>i(Xl(c),Xl(u),f,!0)};return P.forEach(Object.keys({...t,...e}),function(u){const f=l[u]||i,p=f(t[u],e[u],u);P.isUndefined(p)&&f!==o||(r[u]=p)}),r}const z1=t=>{const e=Sn({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:o}=e;e.headers=a=hr.from(a),e.url=I1(L1(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let l;if(P.isFormData(r)){if(Mt.hasStandardBrowserEnv||Mt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...u]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Mt.hasStandardBrowserEnv&&(n&&P.isFunction(n)&&(n=n(e)),n||n!==!1&&c3(e.url))){const c=i&&s&&u3.read(s);c&&a.set(i,c)}return e},f3=typeof XMLHttpRequest<"u",p3=f3&&function(t){return new Promise(function(r,n){const i=z1(t);let s=i.data;const a=hr.from(i.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:c}=i,u,f,p,g,v;function x(){g&&g(),v&&v(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function C(){if(!y)return;const k=hr.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),R={data:!o||o==="text"||o==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:k,config:t,request:y};_1(function(F){r(F),x()},function(F){n(F),x()},R),y=null}"onloadend"in y?y.onloadend=C:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(C)},y.onabort=function(){y&&(n(new Me("Request aborted",Me.ECONNABORTED,t,y)),y=null)},y.onerror=function(){n(new Me("Network Error",Me.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let I=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const R=i.transitional||D1;i.timeoutErrorMessage&&(I=i.timeoutErrorMessage),n(new Me(I,R.clarifyTimeoutError?Me.ETIMEDOUT:Me.ECONNABORTED,t,y)),y=null},s===void 0&&a.setContentType(null),"setRequestHeader"in y&&P.forEach(a.toJSON(),function(I,R){y.setRequestHeader(R,I)}),P.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),o&&o!=="json"&&(y.responseType=i.responseType),c&&([p,v]=_i(c,!0),y.addEventListener("progress",p)),l&&y.upload&&([f,g]=_i(l),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(u=k=>{y&&(n(!k||k.type?new Xn(null,t,y):k),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const w=a3(i.url);if(w&&Mt.protocols.indexOf(w)===-1){n(new Me("Unsupported protocol "+w+":",Me.ERR_BAD_REQUEST,t));return}y.send(s||null)})},m3=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,i;const s=function(c){if(!i){i=!0,o();const u=c instanceof Error?c:this.reason;n.abort(u instanceof Me?u:new Xn(u instanceof Error?u.message:u))}};let a=e&&setTimeout(()=>{a=null,s(new Me(`timeout ${e} of ms exceeded`,Me.ETIMEDOUT))},e);const o=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),t=null)};t.forEach(c=>c.addEventListener("abort",s));const{signal:l}=n;return l.unsubscribe=()=>P.asap(o),l}},g3=m3,v3=function*(t,e){let r=t.byteLength;if(!e||r{const i=b3(t,e);let s=0,a,o=l=>{a||(a=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){o(),l.close();return}let f=u.byteLength;if(r){let p=s+=f;r(p)}l.enqueue(new Uint8Array(u))}catch(c){throw o(c),c}},cancel(l){return o(l),i.return()}},{highWaterMark:2})},cs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",$1=cs&&typeof ReadableStream=="function",w3=cs&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),F1=(t,...e)=>{try{return!!t(...e)}catch{return!1}},x3=$1&&F1(()=>{let t=!1;const e=new Request(Mt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Zl=64*1024,ya=$1&&F1(()=>P.isReadableStream(new Response("").body)),Li={stream:ya&&(t=>t.body)};cs&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Li[e]&&(Li[e]=P.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new Me(`Response type '${e}' is not supported`,Me.ERR_NOT_SUPPORT,n)})})})(new Response);const k3=async t=>{if(t==null)return 0;if(P.isBlob(t))return t.size;if(P.isSpecCompliantForm(t))return(await new Request(Mt.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(P.isArrayBufferView(t)||P.isArrayBuffer(t))return t.byteLength;if(P.isURLSearchParams(t)&&(t=t+""),P.isString(t))return(await w3(t)).byteLength},S3=async(t,e)=>{const r=P.toFiniteNumber(t.getContentLength());return r??k3(e)},T3=cs&&(async t=>{let{url:e,method:r,data:n,signal:i,cancelToken:s,timeout:a,onDownloadProgress:o,onUploadProgress:l,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:p}=z1(t);c=c?(c+"").toLowerCase():"text";let g=g3([i,s&&s.toAbortSignal()],a),v;const x=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let y;try{if(l&&x3&&r!=="get"&&r!=="head"&&(y=await S3(u,n))!==0){let R=new Request(e,{method:"POST",body:n,duplex:"half"}),_;if(P.isFormData(n)&&(_=R.headers.get("content-type"))&&u.setContentType(_),R.body){const[F,V]=Kl(y,_i(Yl(l)));n=Jl(R.body,Zl,F,V)}}P.isString(f)||(f=f?"include":"omit");const C="credentials"in Request.prototype;v=new Request(e,{...p,signal:g,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:C?f:void 0});let w=await fetch(v,p);const k=ya&&(c==="stream"||c==="response");if(ya&&(o||k&&x)){const R={};["status","statusText","headers"].forEach(q=>{R[q]=w[q]});const _=P.toFiniteNumber(w.headers.get("content-length")),[F,V]=o&&Kl(_,_i(Yl(o),!0))||[];w=new Response(Jl(w.body,Zl,F,()=>{V&&V(),x&&x()}),R)}c=c||"text";let I=await Li[P.findKey(Li,c)||"text"](w,t);return!k&&x&&x(),await new Promise((R,_)=>{_1(R,_,{data:I,headers:hr.from(w.headers),status:w.status,statusText:w.statusText,config:t,request:v})})}catch(C){throw x&&x(),C&&C.name==="TypeError"&&/Load failed|fetch/i.test(C.message)?Object.assign(new Me("Network Error",Me.ERR_NETWORK,t,v),{cause:C.cause||C}):Me.from(C,C&&C.code,t,v)}}),wa={http:$2,xhr:p3,fetch:T3};P.forEach(wa,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ql=t=>`- ${t}`,E3=t=>P.isFunction(t)||t===null||t===!1,B1={getAdapter:t=>{t=P.isArray(t)?t:[t];const{length:e}=t;let r,n;const i={};for(let s=0;s`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since : +`+s.map(Ql).join(` +`):" "+Ql(s[0]):"as no adapter specified";throw new Me("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:wa};function zs(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Xn(null,t)}function ec(t){return zs(t),t.headers=hr.from(t.headers),t.data=Ls.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),B1.getAdapter(t.adapter||mo.adapter)(t).then(function(n){return zs(t),n.data=Ls.call(t,t.transformResponse,n),n.headers=hr.from(n.headers),n},function(n){return O1(n)||(zs(t),n&&n.response&&(n.response.data=Ls.call(t,t.transformResponse,n.response),n.response.headers=hr.from(n.response.headers))),Promise.reject(n)})}const P1="1.11.0",us={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{us[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const tc={};us.transitional=function(e,r,n){function i(s,a){return"[Axios v"+P1+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return(s,a,o)=>{if(e===!1)throw new Me(i(a," has been removed"+(r?" in "+r:"")),Me.ERR_DEPRECATED);return r&&!tc[a]&&(tc[a]=!0,console.warn(i(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,a,o):!0}};us.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function A3(t,e,r){if(typeof t!="object")throw new Me("options must be an object",Me.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const s=n[i],a=e[s];if(a){const o=t[s],l=o===void 0||a(o,s,t);if(l!==!0)throw new Me("option "+s+" must be "+l,Me.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Me("Unknown option "+s,Me.ERR_BAD_OPTION)}}const gi={assertOptions:A3,validators:us},gr=gi.validators;class zi{constructor(e){this.defaults=e||{},this.interceptors={request:new Wl,response:new Wl}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=` +`+s):n.stack=s}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Sn(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&gi.assertOptions(n,{silentJSONParsing:gr.transitional(gr.boolean),forcedJSONParsing:gr.transitional(gr.boolean),clarifyTimeoutError:gr.transitional(gr.boolean)},!1),i!=null&&(P.isFunction(i)?r.paramsSerializer={serialize:i}:gi.assertOptions(i,{encode:gr.function,serialize:gr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),gi.assertOptions(r,{baseUrl:gr.spelling("baseURL"),withXsrfToken:gr.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=s&&P.merge(s.common,s[r.method]);s&&P.forEach(["delete","get","head","post","put","patch","common"],v=>{delete s[v]}),r.headers=hr.concat(a,s);const o=[];let l=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(r)===!1||(l=l&&x.synchronous,o.unshift(x.fulfilled,x.rejected))});const c=[];this.interceptors.response.forEach(function(x){c.push(x.fulfilled,x.rejected)});let u,f=0,p;if(!l){const v=[ec.bind(this),void 0];for(v.unshift(...o),v.push(...c),p=v.length,u=Promise.resolve(r);f{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(o=>{n.subscribe(o),s=o}).then(i);return a.cancel=function(){n.unsubscribe(s)},a},e(function(s,a,o){n.reason||(n.reason=new Xn(s,a,o),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new go(function(i){e=i}),cancel:e}}}const C3=go;function M3(t){return function(r){return t.apply(null,r)}}function N3(t){return P.isObject(t)&&t.isAxiosError===!0}const xa={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xa).forEach(([t,e])=>{xa[e]=t});const I3=xa;function H1(t){const e=new vi(t),r=b1(vi.prototype.request,e);return P.extend(r,vi.prototype,e,{allOwnKeys:!0}),P.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return H1(Sn(t,i))},r}const pt=H1(mo);pt.Axios=vi;pt.CanceledError=Xn;pt.CancelToken=C3;pt.isCancel=O1;pt.VERSION=P1;pt.toFormData=os;pt.AxiosError=Me;pt.Cancel=pt.CanceledError;pt.all=function(e){return Promise.all(e)};pt.spread=M3;pt.isAxiosError=N3;pt.mergeConfig=Sn;pt.AxiosHeaders=hr;pt.formToJSON=t=>R1(P.isHTMLForm(t)?new FormData(t):t);pt.getAdapter=B1.getAdapter;pt.HttpStatusCode=I3;pt.default=pt;const D3=pt,R3="http://127.0.0.1:8000/api",Dn=D3.create({baseURL:R3,timeout:1e4,headers:{"Content-Type":"application/json"}}),ut={createMindmap:(t="思维导图",e=null)=>Dn.post("/mindMaps",{title:t,data:e}),getMindmap:t=>Dn.get(`/mindMaps/${t}`),getAllMindmaps:()=>Dn.get("/mindmaps"),addNodes:(t,e)=>Dn.post("/mindMaps/addNodes",{mindMapId:t,nodes:e}),updateNode:(t,e)=>Dn.patch("/mindMaps/updateNode",{id:t,...e}),deleteNodes:t=>Dn.delete("/mindMaps/deleteNodes",{data:{nodeIds:t}})};function vo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var An=vo();function q1(t){An=t}var v0={exec:()=>null};function We(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(Lt.caret,"$1"),r=r.replace(i,a),n},getRegex:()=>new RegExp(r,e)};return n}var Lt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},O3=/^(?:[ \t]*(?:\n|$))+/,_3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,L3=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,z3=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bo=/(?:[*+-]|\d{1,9}[.)])/,j1=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,U1=We(j1).replace(/bull/g,bo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),$3=We(j1).replace(/bull/g,bo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),yo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,F3=/^[^\n]+/,wo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,B3=We(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",wo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),P3=We(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bo).getRegex(),ds="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",xo=/|$))/,H3=We("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",xo).replace("tag",ds).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),V1=We(yo).replace("hr",_0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ds).getRegex(),q3=We(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",V1).getRegex(),ko={blockquote:q3,code:_3,def:B3,fences:L3,heading:z3,hr:_0,html:H3,lheading:U1,list:P3,newline:O3,paragraph:V1,table:v0,text:F3},rc=We("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ds).getRegex(),j3={...ko,lheading:$3,table:rc,paragraph:We(yo).replace("hr",_0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",rc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ds).getRegex()},U3={...ko,html:We(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",xo).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:v0,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:We(yo).replace("hr",_0).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",U1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},V3=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,W3=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,W1=/^( {2,}|\\)\n(?!\s*$)/,G3=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,Y1=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Z3=We(Y1,"u").replace(/punct/g,hs).getRegex(),Q3=We(Y1,"u").replace(/punct/g,K1).getRegex(),X1="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",e6=We(X1,"gu").replace(/notPunctSpace/g,G1).replace(/punctSpace/g,So).replace(/punct/g,hs).getRegex(),t6=We(X1,"gu").replace(/notPunctSpace/g,X3).replace(/punctSpace/g,Y3).replace(/punct/g,K1).getRegex(),r6=We("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,G1).replace(/punctSpace/g,So).replace(/punct/g,hs).getRegex(),n6=We(/\\(punct)/,"gu").replace(/punct/g,hs).getRegex(),i6=We(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),s6=We(xo).replace("(?:-->|$)","-->").getRegex(),a6=We("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",s6).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$i=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,o6=We(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",$i).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),J1=We(/^!?\[(label)\]\[(ref)\]/).replace("label",$i).replace("ref",wo).getRegex(),Z1=We(/^!?\[(ref)\](?:\[\])?/).replace("ref",wo).getRegex(),l6=We("reflink|nolink(?!\\()","g").replace("reflink",J1).replace("nolink",Z1).getRegex(),To={_backpedal:v0,anyPunctuation:n6,autolink:i6,blockSkip:J3,br:W1,code:W3,del:v0,emStrongLDelim:Z3,emStrongRDelimAst:e6,emStrongRDelimUnd:r6,escape:V3,link:o6,nolink:Z1,punctuation:K3,reflink:J1,reflinkSearch:l6,tag:a6,text:G3,url:v0},c6={...To,link:We(/^!?\[(label)\]\((.*?)\)/).replace("label",$i).getRegex(),reflink:We(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$i).getRegex()},ka={...To,emStrongRDelimAst:t6,emStrongLDelim:Q3,url:We(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},nc=t=>d6[t];function vr(t,e){if(e){if(Lt.escapeTest.test(t))return t.replace(Lt.escapeReplace,nc)}else if(Lt.escapeTestNoEncode.test(t))return t.replace(Lt.escapeReplaceNoEncode,nc);return t}function ic(t){try{t=encodeURI(t).replace(Lt.percentDecode,"%")}catch{return null}return t}function sc(t,e){var s;let r=t.replace(Lt.findPipe,(a,o,l)=>{let c=!1,u=o;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),n=r.split(Lt.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!((s=n.at(-1))!=null&&s.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length0?-2:-1}function ac(t,e,r,n,i){let s=e.href,a=e.title||null,o=t[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:a,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function f6(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let i=n[1];return e.split(` +`).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[o]=a;return o.length>=i.length?s.slice(i.length):s}).join(` +`)}var Fi=class{constructor(t){Je(this,"options");Je(this,"rules");Je(this,"lexer");this.options=t||An}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:s0(r,` +`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],n=f6(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let n=s0(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:s0(e[0],` +`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=s0(e[0],` +`).split(` +`),n="",i="",s=[];for(;r.length>0;){let a=!1,o=[],l;for(l=0;l1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let s=this.rules.other.listItemRegex(r),a=!1;for(;t;){let l=!1,c="",u="";if(!(e=s.exec(t))||this.rules.block.hr.test(t))break;c=e[0],t=t.substring(c.length);let f=e[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,C=>" ".repeat(3*C.length)),p=t.split(` +`,1)[0],g=!f.trim(),v=0;if(this.options.pedantic?(v=2,u=f.trimStart()):g?v=e[1].length+1:(v=e[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,u=f.slice(v),v+=e[1].length),g&&this.rules.other.blankLine.test(p)&&(c+=p+` +`,t=t.substring(p.length+1),l=!0),!l){let C=this.rules.other.nextBulletRegex(v),w=this.rules.other.hrRegex(v),k=this.rules.other.fencesBeginRegex(v),I=this.rules.other.headingBeginRegex(v),R=this.rules.other.htmlBeginRegex(v);for(;t;){let _=t.split(` +`,1)[0],F;if(p=_,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),F=p):F=p.replace(this.rules.other.tabCharGlobal," "),k.test(p)||I.test(p)||R.test(p)||C.test(p)||w.test(p))break;if(F.search(this.rules.other.nonSpaceChar)>=v||!p.trim())u+=` +`+F.slice(v);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(f)||I.test(f)||w.test(f))break;u+=` +`+p}!g&&!p.trim()&&(g=!0),c+=_+` +`,t=t.substring(_.length+1),f=F.slice(v)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(a=!0));let x=null,y;this.options.gfm&&(x=this.rules.other.listIsTask.exec(u),x&&(y=x[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:c,task:!!x,checked:y,loose:!1,text:u,tokens:[]}),i.raw+=c}let o=i.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l=0;lf.type==="space"),u=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));i.loose=u}if(i.loose)for(let l=0;l({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[c]})));return s}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===` +`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let s=s0(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{let s=h6(e[2],"()");if(s===-2)return;if(s>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let n=e[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],i=s[3])}else i=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),ac(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[n.toLowerCase()];if(!i){let s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return ac(r,i,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,s,a,o=i,l=0,c=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*t.length+i);(n=c.exec(e))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(a=[...s].length,n[3]||n[4]){o+=a;continue}else if((n[5]||n[6])&&i%3&&!((i+a)%3)){l+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let u=[...n[0]][0].length,f=t.slice(0,i+n.index+u+a);if(Math.min(i,a)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r;let e;if(e=this.rules.inline.url.exec(t)){let n,i;if(e[2]==="@")n=e[0],i="mailto:"+n;else{let s;do s=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(s!==e[0]);n=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},Lr=class Sa{constructor(e){Je(this,"tokens");Je(this,"options");Je(this,"state");Je(this,"tokenizer");Je(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||An,this.options.tokenizer=this.options.tokenizer||new Fi,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Lt,block:Z0.normal,inline:i0.normal};this.options.pedantic?(r.block=Z0.pedantic,r.inline=i0.pedantic):this.options.gfm&&(r.block=Z0.gfm,this.options.breaks?r.inline=i0.breaks:r.inline=i0.gfm),this.tokenizer.rules=r}static get rules(){return{block:Z0,inline:i0}}static lex(e,r){return new Sa(r).lex(e)}static lexInline(e,r){return new Sa(r).inlineTokens(e)}lex(e){e=e.replace(Lt.carriageReturn,` +`),this.blockTokens(e,this.tokens);for(let r=0;r(o=c.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let c=r.at(-1);o.raw.length===1&&c!==void 0?c.raw+=` +`:r.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(` +`)?"":` +`)+o.raw,c.text+=` +`+o.text,this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(` +`)?"":` +`)+o.raw,c.text+=` +`+o.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),r.push(o);continue}let l=e;if((a=this.options.extensions)!=null&&a.startBlock){let c=1/0,u=e.slice(1),f;this.options.extensions.startBlock.forEach(p=>{f=p.call({lexer:this},u),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(l=e.substring(0,c+1))}if(this.state.top&&(o=this.tokenizer.paragraph(l))){let c=r.at(-1);n&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(` +`)?"":` +`)+o.raw,c.text+=` +`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o),n=l.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(` +`)?"":` +`)+o.raw,c.text+=` +`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var o,l,c;let n=e,i=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)u.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,a="";for(;e;){s||(a=""),s=!1;let u;if((l=(o=this.options.extensions)==null?void 0:o.inline)!=null&&l.some(p=>(u=p.call({lexer:this},e,r))?(e=e.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.escape(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.tag(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.link(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(u.raw.length);let p=r.at(-1);u.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=u.raw,p.text+=u.text):r.push(u);continue}if(u=this.tokenizer.emStrong(e,n,a)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.codespan(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.br(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.del(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.autolink(e)){e=e.substring(u.raw.length),r.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(e))){e=e.substring(u.raw.length),r.push(u);continue}let f=e;if((c=this.options.extensions)!=null&&c.startInline){let p=1/0,g=e.slice(1),v;this.options.extensions.startInline.forEach(x=>{v=x.call({lexer:this},g),typeof v=="number"&&v>=0&&(p=Math.min(p,v))}),p<1/0&&p>=0&&(f=e.substring(0,p+1))}if(u=this.tokenizer.inlineText(f)){e=e.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(a=u.raw.slice(-1)),s=!0;let p=r.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=u.raw,p.text+=u.text):r.push(u);continue}if(e){let p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return r}},Bi=class{constructor(t){Je(this,"options");Je(this,"parser");this.options=t||An}space(t){return""}code({text:t,lang:e,escaped:r}){var s;let n=(s=(e||"").match(Lt.notSpaceStart))==null?void 0:s[0],i=t.replace(Lt.endingNewline,"")+` +`;return n?'
    '+(r?i:vr(i,!0))+`
    +`:"
    "+(r?i:vr(i,!0))+`
    +`}blockquote({tokens:t}){return`
    +${this.parser.parse(t)}
    +`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)} +`}hr(t){return`
    +`}list(t){let e=t.ordered,r=t.start,n="";for(let a=0;a +`+n+" +`}listitem(t){var r;let e="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?((r=t.tokens[0])==null?void 0:r.type)==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+vr(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • +`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    +`}table(t){let e="",r="";for(let i=0;i${n}
    `),`
    ${n} ${i}${n} ${i}
    + +`+e+` +`+n+`
    +`}tablerow({text:t}){return` +${t} +`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+` +`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${vr(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){let n=this.parser.parseInline(r),i=ic(t);if(i===null)return n;t=i;let s='
    ",s}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=ic(t);if(i===null)return vr(r);t=i;let s=`${r}{let l=a[o].flat(1/0);r=r.concat(this.walkTokens(l,e))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=e.renderers[i.name];s?e.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===!1&&(o=s.apply(this,a)),o}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[i.level];s?s.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),r.renderer){let i=this.defaults.renderer||new Bi(this.defaults);for(let s in r.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,o=r.renderer[a],l=i[a];i[a]=(...c)=>{let u=o.apply(i,c);return u===!1&&(u=l.apply(i,c)),u||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new Fi(this.defaults);for(let s in r.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,o=r.tokenizer[a],l=i[a];i[a]=(...c)=>{let u=o.apply(i,c);return u===!1&&(u=l.apply(i,c)),u}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new bi;for(let s in r.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,o=r.hooks[a],l=i[a];bi.passThroughHooks.has(s)?i[a]=c=>{if(this.defaults.async)return Promise.resolve(o.call(i,c)).then(f=>l.call(i,f));let u=o.call(i,c);return l.call(i,u)}:i[a]=(...c)=>{let u=o.apply(i,c);return u===!1&&(u=l.apply(i,c)),u}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,s=r.walkTokens;n.walkTokens=function(a){let o=[];return o.push(s.call(this,a)),i&&(o=o.concat(i.call(this,a))),o}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Lr.lex(t,e??this.defaults)}parser(t,e){return zr.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let n={...r},i={...this.defaults,...n},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);let a=i.hooks?i.hooks.provideLexer():t?Lr.lex:Lr.lexInline,o=i.hooks?i.hooks.provideParser():t?zr.parse:zr.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(e):e).then(l=>a(l,i)).then(l=>i.hooks?i.hooks.processAllTokens(l):l).then(l=>i.walkTokens?Promise.all(this.walkTokens(l,i.walkTokens)).then(()=>l):l).then(l=>o(l,i)).then(l=>i.hooks?i.hooks.postprocess(l):l).catch(s);try{i.hooks&&(e=i.hooks.preprocess(e));let l=a(e,i);i.hooks&&(l=i.hooks.processAllTokens(l)),i.walkTokens&&this.walkTokens(l,i.walkTokens);let c=o(l,i);return i.hooks&&(c=i.hooks.postprocess(c)),c}catch(l){return s(l)}}}onError(t,e){return r=>{if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,t){let n="

    An error occurred:

    "+vr(r.message+"",!0)+"
    ";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Tn=new p6;function qe(t,e){return Tn.parse(t,e)}qe.options=qe.setOptions=function(t){return Tn.setOptions(t),qe.defaults=Tn.defaults,q1(qe.defaults),qe};qe.getDefaults=vo;qe.defaults=An;qe.use=function(...t){return Tn.use(...t),qe.defaults=Tn.defaults,q1(qe.defaults),qe};qe.walkTokens=function(t,e){return Tn.walkTokens(t,e)};qe.parseInline=Tn.parseInline;qe.Parser=zr;qe.parser=zr.parse;qe.Renderer=Bi;qe.TextRenderer=Eo;qe.Lexer=Lr;qe.lexer=Lr.lex;qe.Tokenizer=Fi;qe.Hooks=bi;qe.parse=qe;qe.options;qe.setOptions;qe.use;qe.walkTokens;qe.parseInline;zr.parse;Lr.lex;var oc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function m6(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Pg(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var Q1={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */var r=function(n){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,a={},o={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function w(k){return k instanceof l?new l(k.type,w(k.content),k.alias):Array.isArray(k)?k.map(w):k.replace(/&/g,"&").replace(/"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT"&&1<2)return document.currentScript;try{throw new Error}catch(R){var w=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(R.stack)||[])[1];if(w){var k=document.getElementsByTagName("script");for(var I in k)if(k[I].src==w)return k[I]}return null}},isActive:function(w,k,I){for(var R="no-"+k;w;){var _=w.classList;if(_.contains(k))return!0;if(_.contains(R))return!1;w=w.parentElement}return!!I}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(w,k){var I=o.util.clone(o.languages[w]);for(var R in k)I[R]=k[R];return I},insertBefore:function(w,k,I,R){R=R||o.languages;var _=R[w],F={};for(var V in _)if(_.hasOwnProperty(V)){if(V==k)for(var q in I)I.hasOwnProperty(q)&&(F[q]=I[q]);I.hasOwnProperty(V)||(F[V]=_[V])}var le=R[w];return R[w]=F,o.languages.DFS(o.languages,function(me,Se){Se===le&&me!=w&&(this[me]=F)}),F},DFS:function w(k,I,R,_){_=_||{};var F=o.util.objId;for(var V in k)if(k.hasOwnProperty(V)){I.call(k,V,k[V],R||V);var q=k[V],le=o.util.type(q);le==="Object"&&!_[F(q)]?(_[F(q)]=!0,w(q,I,null,_)):le==="Array"&&!_[F(q)]&&(_[F(q)]=!0,w(q,I,V,_))}}},plugins:{},highlightAll:function(w,k){o.highlightAllUnder(document,w,k)},highlightAllUnder:function(w,k,I){var R={callback:I,container:w,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",R),R.elements=Array.prototype.slice.apply(R.container.querySelectorAll(R.selector)),o.hooks.run("before-all-elements-highlight",R);for(var _=0,F;F=R.elements[_++];)o.highlightElement(F,k===!0,R.callback)},highlightElement:function(w,k,I){var R=o.util.getLanguage(w),_=o.languages[R];o.util.setLanguage(w,R);var F=w.parentElement;F&&F.nodeName.toLowerCase()==="pre"&&o.util.setLanguage(F,R);var V=w.textContent,q={element:w,language:R,grammar:_,code:V};function le(Se){q.highlightedCode=Se,o.hooks.run("before-insert",q),q.element.innerHTML=q.highlightedCode,o.hooks.run("after-highlight",q),o.hooks.run("complete",q),I&&I.call(q.element)}if(o.hooks.run("before-sanity-check",q),F=q.element.parentElement,F&&F.nodeName.toLowerCase()==="pre"&&!F.hasAttribute("tabindex")&&F.setAttribute("tabindex","0"),!q.code){o.hooks.run("complete",q),I&&I.call(q.element);return}if(o.hooks.run("before-highlight",q),!q.grammar){le(o.util.encode(q.code));return}if(k&&n.Worker){var me=new Worker(o.filename);me.onmessage=function(Se){le(Se.data)},me.postMessage(JSON.stringify({language:q.language,code:q.code,immediateClose:!0}))}else le(o.highlight(q.code,q.grammar,q.language))},highlight:function(w,k,I){var R={code:w,grammar:k,language:I};if(o.hooks.run("before-tokenize",R),!R.grammar)throw new Error('The language "'+R.language+'" has no grammar.');return R.tokens=o.tokenize(R.code,R.grammar),o.hooks.run("after-tokenize",R),l.stringify(o.util.encode(R.tokens),R.language)},tokenize:function(w,k){var I=k.rest;if(I){for(var R in I)k[R]=I[R];delete k.rest}var _=new f;return p(_,_.head,w),u(w,_,k,_.head,0),v(_)},hooks:{all:{},add:function(w,k){var I=o.hooks.all;I[w]=I[w]||[],I[w].push(k)},run:function(w,k){var I=o.hooks.all[w];if(!(!I||!I.length))for(var R=0,_;_=I[R++];)_(k)}},Token:l};n.Prism=o;function l(w,k,I,R){this.type=w,this.content=k,this.alias=I,this.length=(R||"").length|0}l.stringify=function w(k,I){if(typeof k=="string")return k;if(Array.isArray(k)){var R="";return k.forEach(function(le){R+=w(le,I)}),R}var _={type:k.type,content:w(k.content,I),tag:"span",classes:["token",k.type],attributes:{},language:I},F=k.alias;F&&(Array.isArray(F)?Array.prototype.push.apply(_.classes,F):_.classes.push(F)),o.hooks.run("wrap",_);var V="";for(var q in _.attributes)V+=" "+q+'="'+(_.attributes[q]||"").replace(/"/g,""")+'"';return"<"+_.tag+' class="'+_.classes.join(" ")+'"'+V+">"+_.content+""};function c(w,k,I,R){w.lastIndex=k;var _=w.exec(I);if(_&&R&&_[1]){var F=_[1].length;_.index+=F,_[0]=_[0].slice(F)}return _}function u(w,k,I,R,_,F){for(var V in I)if(!(!I.hasOwnProperty(V)||!I[V])){var q=I[V];q=Array.isArray(q)?q:[q];for(var le=0;le=F.reach);je+=fe.value.length,fe=fe.next){var Be=fe.value;if(k.length>w.length)return;if(!(Be instanceof l)){var Ye=1,ge;if(Le){if(ge=c(xe,je,w,ze),!ge||ge.index>=w.length)break;var St=ge.index,Ft=ge.index+ge[0].length,ht=je;for(ht+=fe.value.length;St>=ht;)fe=fe.next,ht+=fe.value.length;if(ht-=fe.value.length,je=ht,fe.value instanceof l)continue;for(var yt=fe;yt!==k.tail&&(htF.reach&&(F.reach=J);var ne=fe.prev;j&&(ne=p(k,ne,j),je+=j.length),g(k,ne,Ye);var be=new l(V,Se?o.tokenize(lt,Se):lt,Ge,lt);if(fe=p(k,ne,be),G&&p(k,fe,G),Ye>1){var S={cause:V+","+le,reach:J};u(w,k,I,fe.prev,je,S),F&&S.reach>F.reach&&(F.reach=S.reach)}}}}}}function f(){var w={value:null,prev:null,next:null},k={value:null,prev:w,next:null};w.next=k,this.head=w,this.tail=k,this.length=0}function p(w,k,I){var R=k.next,_={value:I,prev:k,next:R};return k.next=_,R.prev=_,w.length++,_}function g(w,k,I){for(var R=k.next,_=0;_/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(i,s){var a={};a["language-"+s]={pattern:/(^$)/i,lookbehind:!0,inside:r.languages[s]},a.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:a}};o["language-"+s]={pattern:/[\s\S]+/,inside:r.languages[s]};var l={};l[i]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:o},r.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(n,i){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:r.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(n){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var s=n.languages.markup;s&&(s.tag.addInlined("style","css"),s.tag.addAttribute("style","css"))}(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var n="Loading…",i=function(x,y){return"✖ Error "+x+" while fetching file: "+y},s="✖ Error: File does not exist or is empty",a={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},o="data-src-status",l="loading",c="loaded",u="failed",f="pre[data-src]:not(["+o+'="'+c+'"]):not(['+o+'="'+l+'"])';function p(x,y,C){var w=new XMLHttpRequest;w.open("GET",x,!0),w.onreadystatechange=function(){w.readyState==4&&(w.status<400&&w.responseText?y(w.responseText):w.status>=400?C(i(w.status,w.statusText)):C(s))},w.send(null)}function g(x){var y=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(x||"");if(y){var C=Number(y[1]),w=y[2],k=y[3];return w?k?[C,Number(k)]:[C,void 0]:[C,C]}}r.hooks.add("before-highlightall",function(x){x.selector+=", "+f}),r.hooks.add("before-sanity-check",function(x){var y=x.element;if(y.matches(f)){x.code="",y.setAttribute(o,l);var C=y.appendChild(document.createElement("CODE"));C.textContent=n;var w=y.getAttribute("data-src"),k=x.language;if(k==="none"){var I=(/\.(\w+)$/.exec(w)||[,"none"])[1];k=a[I]||I}r.util.setLanguage(C,k),r.util.setLanguage(y,k);var R=r.plugins.autoloader;R&&R.loadLanguages(k),p(w,function(_){y.setAttribute(o,c);var F=g(y.getAttribute("data-range"));if(F){var V=_.split(/\r\n?|\n/g),q=F[0],le=F[1]==null?V.length:F[1];q<0&&(q+=V.length),q=Math.max(0,Math.min(q-1,V.length)),le<0&&(le+=V.length),le=Math.max(0,Math.min(le,V.length)),_=V.slice(q,le).join(` +`),y.hasAttribute("data-start")||y.setAttribute("data-start",String(q+1))}C.textContent=_,r.highlightElement(C)},function(_){y.setAttribute(o,u),C.textContent=_})}}),r.plugins.fileHighlight={highlight:function(y){for(var C=(y||document).querySelectorAll(f),w=0,k;k=C[w++];)r.highlightElement(k)}};var v=!1;r.fileHighlight=function(){v||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),v=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Q1);var g6=Q1.exports;const lc=m6(g6);class Wt{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new Wt(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}}class nr{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new nr(r,Wt.range(this,e))}}class te{constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,i,s,a=r&&r.loc;if(a&&a.start<=a.end){var o=a.lexer.input;i=a.start,s=a.end,i===o.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var l=o.slice(i,s).replace(/[^]/g,"$&̲"),c;i>15?c="…"+o.slice(i-15,i):c=o.slice(0,i);var u;s+15":">","<":"<",'"':""","'":"'"},k6=/[&><"']/g;function S6(t){return String(t).replace(k6,e=>x6[e])}var ed=function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},T6=function(e){var r=ed(e);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},E6=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},A6=function(e){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},ve={contains:v6,deflt:b6,escape:S6,hyphenate:w6,getBaseElem:ed,isCharacterBox:T6,protocolFromUrl:A6},yi={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:t=>Math.max(0,t),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand ",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function C6(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Ao{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var r in yi)if(yi.hasOwnProperty(r)){var n=yi[r];this[r]=e[r]!==void 0?n.processor?n.processor(e[r]):e[r]:C6(n)}}reportNonstrict(e,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(e,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new te("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,n){var i=this.strict;if(typeof i=="function")try{i=i(e,r,n)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var r=ve.protocolFromUrl(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}}class Kr{constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n}sup(){return xr[M6[this.id]]}sub(){return xr[N6[this.id]]}fracNum(){return xr[I6[this.id]]}fracDen(){return xr[D6[this.id]]}cramp(){return xr[R6[this.id]]}text(){return xr[O6[this.id]]}isTight(){return this.size>=2}}var Co=0,Pi=1,jn=2,$r=3,E0=4,er=5,Gn=6,zt=7,xr=[new Kr(Co,0,!1),new Kr(Pi,0,!0),new Kr(jn,1,!1),new Kr($r,1,!0),new Kr(E0,2,!1),new Kr(er,2,!0),new Kr(Gn,3,!1),new Kr(zt,3,!0)],M6=[E0,er,E0,er,Gn,zt,Gn,zt],N6=[er,er,er,er,zt,zt,zt,zt],I6=[jn,$r,E0,er,Gn,zt,Gn,zt],D6=[$r,$r,er,er,zt,zt,zt,zt],R6=[Pi,Pi,$r,$r,er,er,zt,zt],O6=[Co,Pi,jn,$r,jn,$r,jn,$r],we={DISPLAY:xr[Co],TEXT:xr[jn],SCRIPT:xr[E0],SCRIPTSCRIPT:xr[Gn]},Ea=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function _6(t){for(var e=0;e=i[0]&&t<=i[1])return r.name}return null}var wi=[];Ea.forEach(t=>t.blocks.forEach(e=>wi.push(...e)));function td(t){for(var e=0;e=wi[e]&&t<=wi[e+1])return!0;return!1}var Rn=80,L6=function(e,r){return"M95,"+(622+e+r)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+e/2.075+" -"+e+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+e)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},z6=function(e,r){return"M263,"+(601+e+r)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+e/2.084+" -"+e+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+e)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},$6=function(e,r){return"M983 "+(10+e+r)+` +l`+e/3.13+" -"+e+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},F6=function(e,r){return"M424,"+(2398+e+r)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+e)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+r+` +h400000v`+(40+e)+"h-400000z"},B6=function(e,r){return"M473,"+(2713+e+r)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+e)+" "+r+"h400000v"+(40+e)+"H1017.7z"},P6=function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z"},H6=function(e,r,n){var i=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+` +H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+r+"H400000v"+(40+e)+"H742z"},q6=function(e,r,n){r=1e3*r;var i="";switch(e){case"sqrtMain":i=L6(r,Rn);break;case"sqrtSize1":i=z6(r,Rn);break;case"sqrtSize2":i=$6(r,Rn);break;case"sqrtSize3":i=F6(r,Rn);break;case"sqrtSize4":i=B6(r,Rn);break;case"sqrtTall":i=H6(r,Rn,n)}return i},j6=function(e,r){switch(e){case"⎜":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"∣":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"∥":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"⎟":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"⎢":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"⎥":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"⎪":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"⏐":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"‖":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},cc={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z +M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z +M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z +M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z +M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},U6=function(e,r){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z +M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z +M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z +M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class L0{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return ve.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),r=0;rr.toText();return this.children.map(e).join("")}}var kr={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Q0={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},uc={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function V6(t,e){kr[t]=e}function Mo(t,e,r){if(!kr[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=kr[e][n];if(!i&&t[0]in uc&&(n=uc[t[0]].charCodeAt(0),i=kr[e][n]),!i&&r==="text"&&td(n)&&(i=kr[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var $s={};function W6(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!$s[e]){var r=$s[e]={cssEmPerMu:Q0.quad[e]/18};for(var n in Q0)Q0.hasOwnProperty(n)&&(r[n]=Q0[n][e])}return $s[e]}var G6=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],dc=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],hc=function(e,r){return r.size<2?e:G6[e-1][r.size-1]};class Rr{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||Rr.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=dc[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return new Rr(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:hc(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:dc[e-1]})}havingBaseStyle(e){e=e||this.style.text();var r=hc(Rr.BASESIZE,e);return this.size===r&&this.textSize===Rr.BASESIZE&&this.style===e?this:this.extend({style:e,size:r})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Rr.BASESIZE?["sizing","reset-size"+this.size,"size"+Rr.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=W6(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Rr.BASESIZE=6;var Aa={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},K6={ex:!0,em:!0,mu:!0},rd=function(e){return typeof e!="string"&&(e=e.unit),e in Aa||e in K6||e==="ex"},at=function(e,r){var n;if(e.unit in Aa)n=Aa[e.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(e.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,e.unit==="ex")n=i.fontMetrics().xHeight;else if(e.unit==="em")n=i.fontMetrics().quad;else throw new te("Invalid unit: '"+e.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(e.number*n,r.maxSize)},se=function(e){return+e.toFixed(4)+"em"},sn=function(e){return e.filter(r=>r).join(" ")},nd=function(e,r,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},id=function(e){var r=document.createElement(e);r.className=sn(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&r.setAttribute(i,this.attributes[i]);for(var s=0;s/=\x00-\x1f]/,sd=function(e){var r="<"+e;this.classes.length&&(r+=' class="'+ve.escape(sn(this.classes))+'"');var n="";for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=ve.hyphenate(i)+":"+this.style[i]+";");n&&(r+=' style="'+ve.escape(n)+'"');for(var s in this.attributes)if(this.attributes.hasOwnProperty(s)){if(Y6.test(s))throw new te("Invalid attribute name '"+s+"'");r+=" "+s+'="'+ve.escape(this.attributes[s])+'"'}r+=">";for(var a=0;a",r};class z0{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,nd.call(this,e,n,i),this.children=r||[]}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return ve.contains(this.classes,e)}toNode(){return id.call(this,"span")}toMarkup(){return sd.call(this,"span")}}class No{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,nd.call(this,r,i),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return ve.contains(this.classes,e)}toNode(){return id.call(this,"a")}toMarkup(){return sd.call(this,"a")}}class X6{constructor(e,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return ve.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(e.style[r]=this.style[r]);return e}toMarkup(){var e=''+ve.escape(this.alt)+'0&&(r=document.createElement("span"),r.style.marginRight=se(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=sn(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(e),r):e}toMarkup(){var e=!1,r="0&&(n+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=ve.hyphenate(i)+":"+this.style[i]+";");n&&(e=!0,r+=' style="'+ve.escape(n)+'"');var s=ve.escape(this.text);return e?(r+=">",r+=s,r+="",r):s}}class Hr{constructor(e,r){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=r||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var i=0;i':''}}class Ca{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var e=" but got "+String(t)+".")}var Q6={bin:1,close:1,inner:1,open:1,punct:1,rel:1},e5={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},tt={math:{},text:{}};function d(t,e,r,n,i,s){tt[t][i]={font:e,group:r,replace:n},s&&n&&(tt[t][n]=tt[t][i])}var h="math",X="text",m="main",E="ams",it="accent-token",he="bin",$t="close",Jn="inner",ye="mathord",mt="op-token",Jt="open",fs="punct",A="rel",Vr="spacing",D="textord";d(h,m,A,"≡","\\equiv",!0);d(h,m,A,"≺","\\prec",!0);d(h,m,A,"≻","\\succ",!0);d(h,m,A,"∼","\\sim",!0);d(h,m,A,"⊥","\\perp");d(h,m,A,"⪯","\\preceq",!0);d(h,m,A,"⪰","\\succeq",!0);d(h,m,A,"≃","\\simeq",!0);d(h,m,A,"∣","\\mid",!0);d(h,m,A,"≪","\\ll",!0);d(h,m,A,"≫","\\gg",!0);d(h,m,A,"≍","\\asymp",!0);d(h,m,A,"∥","\\parallel");d(h,m,A,"⋈","\\bowtie",!0);d(h,m,A,"⌣","\\smile",!0);d(h,m,A,"⊑","\\sqsubseteq",!0);d(h,m,A,"⊒","\\sqsupseteq",!0);d(h,m,A,"≐","\\doteq",!0);d(h,m,A,"⌢","\\frown",!0);d(h,m,A,"∋","\\ni",!0);d(h,m,A,"∝","\\propto",!0);d(h,m,A,"⊢","\\vdash",!0);d(h,m,A,"⊣","\\dashv",!0);d(h,m,A,"∋","\\owns");d(h,m,fs,".","\\ldotp");d(h,m,fs,"⋅","\\cdotp");d(h,m,D,"#","\\#");d(X,m,D,"#","\\#");d(h,m,D,"&","\\&");d(X,m,D,"&","\\&");d(h,m,D,"ℵ","\\aleph",!0);d(h,m,D,"∀","\\forall",!0);d(h,m,D,"ℏ","\\hbar",!0);d(h,m,D,"∃","\\exists",!0);d(h,m,D,"∇","\\nabla",!0);d(h,m,D,"♭","\\flat",!0);d(h,m,D,"ℓ","\\ell",!0);d(h,m,D,"♮","\\natural",!0);d(h,m,D,"♣","\\clubsuit",!0);d(h,m,D,"℘","\\wp",!0);d(h,m,D,"♯","\\sharp",!0);d(h,m,D,"♢","\\diamondsuit",!0);d(h,m,D,"ℜ","\\Re",!0);d(h,m,D,"♡","\\heartsuit",!0);d(h,m,D,"ℑ","\\Im",!0);d(h,m,D,"♠","\\spadesuit",!0);d(h,m,D,"§","\\S",!0);d(X,m,D,"§","\\S");d(h,m,D,"¶","\\P",!0);d(X,m,D,"¶","\\P");d(h,m,D,"†","\\dag");d(X,m,D,"†","\\dag");d(X,m,D,"†","\\textdagger");d(h,m,D,"‡","\\ddag");d(X,m,D,"‡","\\ddag");d(X,m,D,"‡","\\textdaggerdbl");d(h,m,$t,"⎱","\\rmoustache",!0);d(h,m,Jt,"⎰","\\lmoustache",!0);d(h,m,$t,"⟯","\\rgroup",!0);d(h,m,Jt,"⟮","\\lgroup",!0);d(h,m,he,"∓","\\mp",!0);d(h,m,he,"⊖","\\ominus",!0);d(h,m,he,"⊎","\\uplus",!0);d(h,m,he,"⊓","\\sqcap",!0);d(h,m,he,"∗","\\ast");d(h,m,he,"⊔","\\sqcup",!0);d(h,m,he,"◯","\\bigcirc",!0);d(h,m,he,"∙","\\bullet",!0);d(h,m,he,"‡","\\ddagger");d(h,m,he,"≀","\\wr",!0);d(h,m,he,"⨿","\\amalg");d(h,m,he,"&","\\And");d(h,m,A,"⟵","\\longleftarrow",!0);d(h,m,A,"⇐","\\Leftarrow",!0);d(h,m,A,"⟸","\\Longleftarrow",!0);d(h,m,A,"⟶","\\longrightarrow",!0);d(h,m,A,"⇒","\\Rightarrow",!0);d(h,m,A,"⟹","\\Longrightarrow",!0);d(h,m,A,"↔","\\leftrightarrow",!0);d(h,m,A,"⟷","\\longleftrightarrow",!0);d(h,m,A,"⇔","\\Leftrightarrow",!0);d(h,m,A,"⟺","\\Longleftrightarrow",!0);d(h,m,A,"↦","\\mapsto",!0);d(h,m,A,"⟼","\\longmapsto",!0);d(h,m,A,"↗","\\nearrow",!0);d(h,m,A,"↩","\\hookleftarrow",!0);d(h,m,A,"↪","\\hookrightarrow",!0);d(h,m,A,"↘","\\searrow",!0);d(h,m,A,"↼","\\leftharpoonup",!0);d(h,m,A,"⇀","\\rightharpoonup",!0);d(h,m,A,"↙","\\swarrow",!0);d(h,m,A,"↽","\\leftharpoondown",!0);d(h,m,A,"⇁","\\rightharpoondown",!0);d(h,m,A,"↖","\\nwarrow",!0);d(h,m,A,"⇌","\\rightleftharpoons",!0);d(h,E,A,"≮","\\nless",!0);d(h,E,A,"","\\@nleqslant");d(h,E,A,"","\\@nleqq");d(h,E,A,"⪇","\\lneq",!0);d(h,E,A,"≨","\\lneqq",!0);d(h,E,A,"","\\@lvertneqq");d(h,E,A,"⋦","\\lnsim",!0);d(h,E,A,"⪉","\\lnapprox",!0);d(h,E,A,"⊀","\\nprec",!0);d(h,E,A,"⋠","\\npreceq",!0);d(h,E,A,"⋨","\\precnsim",!0);d(h,E,A,"⪹","\\precnapprox",!0);d(h,E,A,"≁","\\nsim",!0);d(h,E,A,"","\\@nshortmid");d(h,E,A,"∤","\\nmid",!0);d(h,E,A,"⊬","\\nvdash",!0);d(h,E,A,"⊭","\\nvDash",!0);d(h,E,A,"⋪","\\ntriangleleft");d(h,E,A,"⋬","\\ntrianglelefteq",!0);d(h,E,A,"⊊","\\subsetneq",!0);d(h,E,A,"","\\@varsubsetneq");d(h,E,A,"⫋","\\subsetneqq",!0);d(h,E,A,"","\\@varsubsetneqq");d(h,E,A,"≯","\\ngtr",!0);d(h,E,A,"","\\@ngeqslant");d(h,E,A,"","\\@ngeqq");d(h,E,A,"⪈","\\gneq",!0);d(h,E,A,"≩","\\gneqq",!0);d(h,E,A,"","\\@gvertneqq");d(h,E,A,"⋧","\\gnsim",!0);d(h,E,A,"⪊","\\gnapprox",!0);d(h,E,A,"⊁","\\nsucc",!0);d(h,E,A,"⋡","\\nsucceq",!0);d(h,E,A,"⋩","\\succnsim",!0);d(h,E,A,"⪺","\\succnapprox",!0);d(h,E,A,"≆","\\ncong",!0);d(h,E,A,"","\\@nshortparallel");d(h,E,A,"∦","\\nparallel",!0);d(h,E,A,"⊯","\\nVDash",!0);d(h,E,A,"⋫","\\ntriangleright");d(h,E,A,"⋭","\\ntrianglerighteq",!0);d(h,E,A,"","\\@nsupseteqq");d(h,E,A,"⊋","\\supsetneq",!0);d(h,E,A,"","\\@varsupsetneq");d(h,E,A,"⫌","\\supsetneqq",!0);d(h,E,A,"","\\@varsupsetneqq");d(h,E,A,"⊮","\\nVdash",!0);d(h,E,A,"⪵","\\precneqq",!0);d(h,E,A,"⪶","\\succneqq",!0);d(h,E,A,"","\\@nsubseteqq");d(h,E,he,"⊴","\\unlhd");d(h,E,he,"⊵","\\unrhd");d(h,E,A,"↚","\\nleftarrow",!0);d(h,E,A,"↛","\\nrightarrow",!0);d(h,E,A,"⇍","\\nLeftarrow",!0);d(h,E,A,"⇏","\\nRightarrow",!0);d(h,E,A,"↮","\\nleftrightarrow",!0);d(h,E,A,"⇎","\\nLeftrightarrow",!0);d(h,E,A,"△","\\vartriangle");d(h,E,D,"ℏ","\\hslash");d(h,E,D,"▽","\\triangledown");d(h,E,D,"◊","\\lozenge");d(h,E,D,"Ⓢ","\\circledS");d(h,E,D,"®","\\circledR");d(X,E,D,"®","\\circledR");d(h,E,D,"∡","\\measuredangle",!0);d(h,E,D,"∄","\\nexists");d(h,E,D,"℧","\\mho");d(h,E,D,"Ⅎ","\\Finv",!0);d(h,E,D,"⅁","\\Game",!0);d(h,E,D,"‵","\\backprime");d(h,E,D,"▲","\\blacktriangle");d(h,E,D,"▼","\\blacktriangledown");d(h,E,D,"■","\\blacksquare");d(h,E,D,"⧫","\\blacklozenge");d(h,E,D,"★","\\bigstar");d(h,E,D,"∢","\\sphericalangle",!0);d(h,E,D,"∁","\\complement",!0);d(h,E,D,"ð","\\eth",!0);d(X,m,D,"ð","ð");d(h,E,D,"╱","\\diagup");d(h,E,D,"╲","\\diagdown");d(h,E,D,"□","\\square");d(h,E,D,"□","\\Box");d(h,E,D,"◊","\\Diamond");d(h,E,D,"¥","\\yen",!0);d(X,E,D,"¥","\\yen",!0);d(h,E,D,"✓","\\checkmark",!0);d(X,E,D,"✓","\\checkmark");d(h,E,D,"ℶ","\\beth",!0);d(h,E,D,"ℸ","\\daleth",!0);d(h,E,D,"ℷ","\\gimel",!0);d(h,E,D,"ϝ","\\digamma",!0);d(h,E,D,"ϰ","\\varkappa");d(h,E,Jt,"┌","\\@ulcorner",!0);d(h,E,$t,"┐","\\@urcorner",!0);d(h,E,Jt,"└","\\@llcorner",!0);d(h,E,$t,"┘","\\@lrcorner",!0);d(h,E,A,"≦","\\leqq",!0);d(h,E,A,"⩽","\\leqslant",!0);d(h,E,A,"⪕","\\eqslantless",!0);d(h,E,A,"≲","\\lesssim",!0);d(h,E,A,"⪅","\\lessapprox",!0);d(h,E,A,"≊","\\approxeq",!0);d(h,E,he,"⋖","\\lessdot");d(h,E,A,"⋘","\\lll",!0);d(h,E,A,"≶","\\lessgtr",!0);d(h,E,A,"⋚","\\lesseqgtr",!0);d(h,E,A,"⪋","\\lesseqqgtr",!0);d(h,E,A,"≑","\\doteqdot");d(h,E,A,"≓","\\risingdotseq",!0);d(h,E,A,"≒","\\fallingdotseq",!0);d(h,E,A,"∽","\\backsim",!0);d(h,E,A,"⋍","\\backsimeq",!0);d(h,E,A,"⫅","\\subseteqq",!0);d(h,E,A,"⋐","\\Subset",!0);d(h,E,A,"⊏","\\sqsubset",!0);d(h,E,A,"≼","\\preccurlyeq",!0);d(h,E,A,"⋞","\\curlyeqprec",!0);d(h,E,A,"≾","\\precsim",!0);d(h,E,A,"⪷","\\precapprox",!0);d(h,E,A,"⊲","\\vartriangleleft");d(h,E,A,"⊴","\\trianglelefteq");d(h,E,A,"⊨","\\vDash",!0);d(h,E,A,"⊪","\\Vvdash",!0);d(h,E,A,"⌣","\\smallsmile");d(h,E,A,"⌢","\\smallfrown");d(h,E,A,"≏","\\bumpeq",!0);d(h,E,A,"≎","\\Bumpeq",!0);d(h,E,A,"≧","\\geqq",!0);d(h,E,A,"⩾","\\geqslant",!0);d(h,E,A,"⪖","\\eqslantgtr",!0);d(h,E,A,"≳","\\gtrsim",!0);d(h,E,A,"⪆","\\gtrapprox",!0);d(h,E,he,"⋗","\\gtrdot");d(h,E,A,"⋙","\\ggg",!0);d(h,E,A,"≷","\\gtrless",!0);d(h,E,A,"⋛","\\gtreqless",!0);d(h,E,A,"⪌","\\gtreqqless",!0);d(h,E,A,"≖","\\eqcirc",!0);d(h,E,A,"≗","\\circeq",!0);d(h,E,A,"≜","\\triangleq",!0);d(h,E,A,"∼","\\thicksim");d(h,E,A,"≈","\\thickapprox");d(h,E,A,"⫆","\\supseteqq",!0);d(h,E,A,"⋑","\\Supset",!0);d(h,E,A,"⊐","\\sqsupset",!0);d(h,E,A,"≽","\\succcurlyeq",!0);d(h,E,A,"⋟","\\curlyeqsucc",!0);d(h,E,A,"≿","\\succsim",!0);d(h,E,A,"⪸","\\succapprox",!0);d(h,E,A,"⊳","\\vartriangleright");d(h,E,A,"⊵","\\trianglerighteq");d(h,E,A,"⊩","\\Vdash",!0);d(h,E,A,"∣","\\shortmid");d(h,E,A,"∥","\\shortparallel");d(h,E,A,"≬","\\between",!0);d(h,E,A,"⋔","\\pitchfork",!0);d(h,E,A,"∝","\\varpropto");d(h,E,A,"◀","\\blacktriangleleft");d(h,E,A,"∴","\\therefore",!0);d(h,E,A,"∍","\\backepsilon");d(h,E,A,"▶","\\blacktriangleright");d(h,E,A,"∵","\\because",!0);d(h,E,A,"⋘","\\llless");d(h,E,A,"⋙","\\gggtr");d(h,E,he,"⊲","\\lhd");d(h,E,he,"⊳","\\rhd");d(h,E,A,"≂","\\eqsim",!0);d(h,m,A,"⋈","\\Join");d(h,E,A,"≑","\\Doteq",!0);d(h,E,he,"∔","\\dotplus",!0);d(h,E,he,"∖","\\smallsetminus");d(h,E,he,"⋒","\\Cap",!0);d(h,E,he,"⋓","\\Cup",!0);d(h,E,he,"⩞","\\doublebarwedge",!0);d(h,E,he,"⊟","\\boxminus",!0);d(h,E,he,"⊞","\\boxplus",!0);d(h,E,he,"⋇","\\divideontimes",!0);d(h,E,he,"⋉","\\ltimes",!0);d(h,E,he,"⋊","\\rtimes",!0);d(h,E,he,"⋋","\\leftthreetimes",!0);d(h,E,he,"⋌","\\rightthreetimes",!0);d(h,E,he,"⋏","\\curlywedge",!0);d(h,E,he,"⋎","\\curlyvee",!0);d(h,E,he,"⊝","\\circleddash",!0);d(h,E,he,"⊛","\\circledast",!0);d(h,E,he,"⋅","\\centerdot");d(h,E,he,"⊺","\\intercal",!0);d(h,E,he,"⋒","\\doublecap");d(h,E,he,"⋓","\\doublecup");d(h,E,he,"⊠","\\boxtimes",!0);d(h,E,A,"⇢","\\dashrightarrow",!0);d(h,E,A,"⇠","\\dashleftarrow",!0);d(h,E,A,"⇇","\\leftleftarrows",!0);d(h,E,A,"⇆","\\leftrightarrows",!0);d(h,E,A,"⇚","\\Lleftarrow",!0);d(h,E,A,"↞","\\twoheadleftarrow",!0);d(h,E,A,"↢","\\leftarrowtail",!0);d(h,E,A,"↫","\\looparrowleft",!0);d(h,E,A,"⇋","\\leftrightharpoons",!0);d(h,E,A,"↶","\\curvearrowleft",!0);d(h,E,A,"↺","\\circlearrowleft",!0);d(h,E,A,"↰","\\Lsh",!0);d(h,E,A,"⇈","\\upuparrows",!0);d(h,E,A,"↿","\\upharpoonleft",!0);d(h,E,A,"⇃","\\downharpoonleft",!0);d(h,m,A,"⊶","\\origof",!0);d(h,m,A,"⊷","\\imageof",!0);d(h,E,A,"⊸","\\multimap",!0);d(h,E,A,"↭","\\leftrightsquigarrow",!0);d(h,E,A,"⇉","\\rightrightarrows",!0);d(h,E,A,"⇄","\\rightleftarrows",!0);d(h,E,A,"↠","\\twoheadrightarrow",!0);d(h,E,A,"↣","\\rightarrowtail",!0);d(h,E,A,"↬","\\looparrowright",!0);d(h,E,A,"↷","\\curvearrowright",!0);d(h,E,A,"↻","\\circlearrowright",!0);d(h,E,A,"↱","\\Rsh",!0);d(h,E,A,"⇊","\\downdownarrows",!0);d(h,E,A,"↾","\\upharpoonright",!0);d(h,E,A,"⇂","\\downharpoonright",!0);d(h,E,A,"⇝","\\rightsquigarrow",!0);d(h,E,A,"⇝","\\leadsto");d(h,E,A,"⇛","\\Rrightarrow",!0);d(h,E,A,"↾","\\restriction");d(h,m,D,"‘","`");d(h,m,D,"$","\\$");d(X,m,D,"$","\\$");d(X,m,D,"$","\\textdollar");d(h,m,D,"%","\\%");d(X,m,D,"%","\\%");d(h,m,D,"_","\\_");d(X,m,D,"_","\\_");d(X,m,D,"_","\\textunderscore");d(h,m,D,"∠","\\angle",!0);d(h,m,D,"∞","\\infty",!0);d(h,m,D,"′","\\prime");d(h,m,D,"△","\\triangle");d(h,m,D,"Γ","\\Gamma",!0);d(h,m,D,"Δ","\\Delta",!0);d(h,m,D,"Θ","\\Theta",!0);d(h,m,D,"Λ","\\Lambda",!0);d(h,m,D,"Ξ","\\Xi",!0);d(h,m,D,"Π","\\Pi",!0);d(h,m,D,"Σ","\\Sigma",!0);d(h,m,D,"Υ","\\Upsilon",!0);d(h,m,D,"Φ","\\Phi",!0);d(h,m,D,"Ψ","\\Psi",!0);d(h,m,D,"Ω","\\Omega",!0);d(h,m,D,"A","Α");d(h,m,D,"B","Β");d(h,m,D,"E","Ε");d(h,m,D,"Z","Ζ");d(h,m,D,"H","Η");d(h,m,D,"I","Ι");d(h,m,D,"K","Κ");d(h,m,D,"M","Μ");d(h,m,D,"N","Ν");d(h,m,D,"O","Ο");d(h,m,D,"P","Ρ");d(h,m,D,"T","Τ");d(h,m,D,"X","Χ");d(h,m,D,"¬","\\neg",!0);d(h,m,D,"¬","\\lnot");d(h,m,D,"⊤","\\top");d(h,m,D,"⊥","\\bot");d(h,m,D,"∅","\\emptyset");d(h,E,D,"∅","\\varnothing");d(h,m,ye,"α","\\alpha",!0);d(h,m,ye,"β","\\beta",!0);d(h,m,ye,"γ","\\gamma",!0);d(h,m,ye,"δ","\\delta",!0);d(h,m,ye,"ϵ","\\epsilon",!0);d(h,m,ye,"ζ","\\zeta",!0);d(h,m,ye,"η","\\eta",!0);d(h,m,ye,"θ","\\theta",!0);d(h,m,ye,"ι","\\iota",!0);d(h,m,ye,"κ","\\kappa",!0);d(h,m,ye,"λ","\\lambda",!0);d(h,m,ye,"μ","\\mu",!0);d(h,m,ye,"ν","\\nu",!0);d(h,m,ye,"ξ","\\xi",!0);d(h,m,ye,"ο","\\omicron",!0);d(h,m,ye,"π","\\pi",!0);d(h,m,ye,"ρ","\\rho",!0);d(h,m,ye,"σ","\\sigma",!0);d(h,m,ye,"τ","\\tau",!0);d(h,m,ye,"υ","\\upsilon",!0);d(h,m,ye,"ϕ","\\phi",!0);d(h,m,ye,"χ","\\chi",!0);d(h,m,ye,"ψ","\\psi",!0);d(h,m,ye,"ω","\\omega",!0);d(h,m,ye,"ε","\\varepsilon",!0);d(h,m,ye,"ϑ","\\vartheta",!0);d(h,m,ye,"ϖ","\\varpi",!0);d(h,m,ye,"ϱ","\\varrho",!0);d(h,m,ye,"ς","\\varsigma",!0);d(h,m,ye,"φ","\\varphi",!0);d(h,m,he,"∗","*",!0);d(h,m,he,"+","+");d(h,m,he,"−","-",!0);d(h,m,he,"⋅","\\cdot",!0);d(h,m,he,"∘","\\circ",!0);d(h,m,he,"÷","\\div",!0);d(h,m,he,"±","\\pm",!0);d(h,m,he,"×","\\times",!0);d(h,m,he,"∩","\\cap",!0);d(h,m,he,"∪","\\cup",!0);d(h,m,he,"∖","\\setminus",!0);d(h,m,he,"∧","\\land");d(h,m,he,"∨","\\lor");d(h,m,he,"∧","\\wedge",!0);d(h,m,he,"∨","\\vee",!0);d(h,m,D,"√","\\surd");d(h,m,Jt,"⟨","\\langle",!0);d(h,m,Jt,"∣","\\lvert");d(h,m,Jt,"∥","\\lVert");d(h,m,$t,"?","?");d(h,m,$t,"!","!");d(h,m,$t,"⟩","\\rangle",!0);d(h,m,$t,"∣","\\rvert");d(h,m,$t,"∥","\\rVert");d(h,m,A,"=","=");d(h,m,A,":",":");d(h,m,A,"≈","\\approx",!0);d(h,m,A,"≅","\\cong",!0);d(h,m,A,"≥","\\ge");d(h,m,A,"≥","\\geq",!0);d(h,m,A,"←","\\gets");d(h,m,A,">","\\gt",!0);d(h,m,A,"∈","\\in",!0);d(h,m,A,"","\\@not");d(h,m,A,"⊂","\\subset",!0);d(h,m,A,"⊃","\\supset",!0);d(h,m,A,"⊆","\\subseteq",!0);d(h,m,A,"⊇","\\supseteq",!0);d(h,E,A,"⊈","\\nsubseteq",!0);d(h,E,A,"⊉","\\nsupseteq",!0);d(h,m,A,"⊨","\\models");d(h,m,A,"←","\\leftarrow",!0);d(h,m,A,"≤","\\le");d(h,m,A,"≤","\\leq",!0);d(h,m,A,"<","\\lt",!0);d(h,m,A,"→","\\rightarrow",!0);d(h,m,A,"→","\\to");d(h,E,A,"≱","\\ngeq",!0);d(h,E,A,"≰","\\nleq",!0);d(h,m,Vr," ","\\ ");d(h,m,Vr," ","\\space");d(h,m,Vr," ","\\nobreakspace");d(X,m,Vr," ","\\ ");d(X,m,Vr," "," ");d(X,m,Vr," ","\\space");d(X,m,Vr," ","\\nobreakspace");d(h,m,Vr,null,"\\nobreak");d(h,m,Vr,null,"\\allowbreak");d(h,m,fs,",",",");d(h,m,fs,";",";");d(h,E,he,"⊼","\\barwedge",!0);d(h,E,he,"⊻","\\veebar",!0);d(h,m,he,"⊙","\\odot",!0);d(h,m,he,"⊕","\\oplus",!0);d(h,m,he,"⊗","\\otimes",!0);d(h,m,D,"∂","\\partial",!0);d(h,m,he,"⊘","\\oslash",!0);d(h,E,he,"⊚","\\circledcirc",!0);d(h,E,he,"⊡","\\boxdot",!0);d(h,m,he,"△","\\bigtriangleup");d(h,m,he,"▽","\\bigtriangledown");d(h,m,he,"†","\\dagger");d(h,m,he,"⋄","\\diamond");d(h,m,he,"⋆","\\star");d(h,m,he,"◃","\\triangleleft");d(h,m,he,"▹","\\triangleright");d(h,m,Jt,"{","\\{");d(X,m,D,"{","\\{");d(X,m,D,"{","\\textbraceleft");d(h,m,$t,"}","\\}");d(X,m,D,"}","\\}");d(X,m,D,"}","\\textbraceright");d(h,m,Jt,"{","\\lbrace");d(h,m,$t,"}","\\rbrace");d(h,m,Jt,"[","\\lbrack",!0);d(X,m,D,"[","\\lbrack",!0);d(h,m,$t,"]","\\rbrack",!0);d(X,m,D,"]","\\rbrack",!0);d(h,m,Jt,"(","\\lparen",!0);d(h,m,$t,")","\\rparen",!0);d(X,m,D,"<","\\textless",!0);d(X,m,D,">","\\textgreater",!0);d(h,m,Jt,"⌊","\\lfloor",!0);d(h,m,$t,"⌋","\\rfloor",!0);d(h,m,Jt,"⌈","\\lceil",!0);d(h,m,$t,"⌉","\\rceil",!0);d(h,m,D,"\\","\\backslash");d(h,m,D,"∣","|");d(h,m,D,"∣","\\vert");d(X,m,D,"|","\\textbar",!0);d(h,m,D,"∥","\\|");d(h,m,D,"∥","\\Vert");d(X,m,D,"∥","\\textbardbl");d(X,m,D,"~","\\textasciitilde");d(X,m,D,"\\","\\textbackslash");d(X,m,D,"^","\\textasciicircum");d(h,m,A,"↑","\\uparrow",!0);d(h,m,A,"⇑","\\Uparrow",!0);d(h,m,A,"↓","\\downarrow",!0);d(h,m,A,"⇓","\\Downarrow",!0);d(h,m,A,"↕","\\updownarrow",!0);d(h,m,A,"⇕","\\Updownarrow",!0);d(h,m,mt,"∐","\\coprod");d(h,m,mt,"⋁","\\bigvee");d(h,m,mt,"⋀","\\bigwedge");d(h,m,mt,"⨄","\\biguplus");d(h,m,mt,"⋂","\\bigcap");d(h,m,mt,"⋃","\\bigcup");d(h,m,mt,"∫","\\int");d(h,m,mt,"∫","\\intop");d(h,m,mt,"∬","\\iint");d(h,m,mt,"∭","\\iiint");d(h,m,mt,"∏","\\prod");d(h,m,mt,"∑","\\sum");d(h,m,mt,"⨂","\\bigotimes");d(h,m,mt,"⨁","\\bigoplus");d(h,m,mt,"⨀","\\bigodot");d(h,m,mt,"∮","\\oint");d(h,m,mt,"∯","\\oiint");d(h,m,mt,"∰","\\oiiint");d(h,m,mt,"⨆","\\bigsqcup");d(h,m,mt,"∫","\\smallint");d(X,m,Jn,"…","\\textellipsis");d(h,m,Jn,"…","\\mathellipsis");d(X,m,Jn,"…","\\ldots",!0);d(h,m,Jn,"…","\\ldots",!0);d(h,m,Jn,"⋯","\\@cdots",!0);d(h,m,Jn,"⋱","\\ddots",!0);d(h,m,D,"⋮","\\varvdots");d(X,m,D,"⋮","\\varvdots");d(h,m,it,"ˊ","\\acute");d(h,m,it,"ˋ","\\grave");d(h,m,it,"¨","\\ddot");d(h,m,it,"~","\\tilde");d(h,m,it,"ˉ","\\bar");d(h,m,it,"˘","\\breve");d(h,m,it,"ˇ","\\check");d(h,m,it,"^","\\hat");d(h,m,it,"⃗","\\vec");d(h,m,it,"˙","\\dot");d(h,m,it,"˚","\\mathring");d(h,m,ye,"","\\@imath");d(h,m,ye,"","\\@jmath");d(h,m,D,"ı","ı");d(h,m,D,"ȷ","ȷ");d(X,m,D,"ı","\\i",!0);d(X,m,D,"ȷ","\\j",!0);d(X,m,D,"ß","\\ss",!0);d(X,m,D,"æ","\\ae",!0);d(X,m,D,"œ","\\oe",!0);d(X,m,D,"ø","\\o",!0);d(X,m,D,"Æ","\\AE",!0);d(X,m,D,"Œ","\\OE",!0);d(X,m,D,"Ø","\\O",!0);d(X,m,it,"ˊ","\\'");d(X,m,it,"ˋ","\\`");d(X,m,it,"ˆ","\\^");d(X,m,it,"˜","\\~");d(X,m,it,"ˉ","\\=");d(X,m,it,"˘","\\u");d(X,m,it,"˙","\\.");d(X,m,it,"¸","\\c");d(X,m,it,"˚","\\r");d(X,m,it,"ˇ","\\v");d(X,m,it,"¨",'\\"');d(X,m,it,"˝","\\H");d(X,m,it,"◯","\\textcircled");var ad={"--":!0,"---":!0,"``":!0,"''":!0};d(X,m,D,"–","--",!0);d(X,m,D,"–","\\textendash");d(X,m,D,"—","---",!0);d(X,m,D,"—","\\textemdash");d(X,m,D,"‘","`",!0);d(X,m,D,"‘","\\textquoteleft");d(X,m,D,"’","'",!0);d(X,m,D,"’","\\textquoteright");d(X,m,D,"“","``",!0);d(X,m,D,"“","\\textquotedblleft");d(X,m,D,"”","''",!0);d(X,m,D,"”","\\textquotedblright");d(h,m,D,"°","\\degree",!0);d(X,m,D,"°","\\degree");d(X,m,D,"°","\\textdegree",!0);d(h,m,D,"£","\\pounds");d(h,m,D,"£","\\mathsterling",!0);d(X,m,D,"£","\\pounds");d(X,m,D,"£","\\textsterling",!0);d(h,E,D,"✠","\\maltese");d(X,E,D,"✠","\\maltese");var pc='0123456789/@."';for(var Fs=0;Fs0)return lr(s,c,i,r,a.concat(u));if(l){var f,p;if(l==="boldsymbol"){var g=n5(s,i,r,a,n);f=g.fontName,p=[g.fontClass]}else o?(f=cd[l].fontName,p=[l]):(f=ni(l,r.fontWeight,r.fontShape),p=[l,r.fontWeight,r.fontShape]);if(ps(s,f,i).metrics)return lr(s,f,i,r,a.concat(p));if(ad.hasOwnProperty(s)&&f.slice(0,10)==="Typewriter"){for(var v=[],x=0;x{if(sn(t.classes)!==sn(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var r=t.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0},a5=t=>{for(var e=0;er&&(r=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>i&&(i=a.maxFontSize)}e.height=r,e.depth=n,e.maxFontSize=i},qt=function(e,r,n,i){var s=new z0(e,r,n,i);return Io(s),s},od=(t,e,r,n)=>new z0(t,e,r,n),o5=function(e,r,n){var i=qt([e],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=se(i.height),i.maxFontSize=1,i},l5=function(e,r,n,i){var s=new No(e,r,n,i);return Io(s),s},ld=function(e){var r=new L0(e);return Io(r),r},c5=function(e,r){return e instanceof L0?qt([],[e],r):e},u5=function(e){if(e.positionType==="individualShift"){for(var r=e.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,s=i,a=1;a{var r=qt(["mspace"],[],e),n=at(t,e);return r.style.marginRight=se(n),r},ni=function(e,r,n){var i="";switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e}var s;return r==="textbf"&&n==="textit"?s="BoldItalic":r==="textbf"?s="Bold":r==="textit"?s="Italic":s="Regular",i+"-"+s},cd={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},ud={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},f5=function(e,r){var[n,i,s]=ud[e],a=new an(n),o=new Hr([a],{width:se(i),height:se(s),style:"width:"+se(i),viewBox:"0 0 "+1e3*i+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),l=od(["overlay"],[o],r);return l.height=s,l.style.height=se(s),l.style.width=se(i),l},$={fontMap:cd,makeSymbol:lr,mathsym:r5,makeSpan:qt,makeSvgSpan:od,makeLineSpan:o5,makeAnchor:l5,makeFragment:ld,wrapFragment:c5,makeVList:d5,makeOrd:i5,makeGlue:h5,staticSvg:f5,svgData:ud,tryCombineChars:a5},st={number:3,unit:"mu"},bn={number:4,unit:"mu"},Ir={number:5,unit:"mu"},p5={mord:{mop:st,mbin:bn,mrel:Ir,minner:st},mop:{mord:st,mop:st,mrel:Ir,minner:st},mbin:{mord:bn,mop:bn,mopen:bn,minner:bn},mrel:{mord:Ir,mop:Ir,mopen:Ir,minner:Ir},mopen:{},mclose:{mop:st,mbin:bn,mrel:Ir,minner:st},mpunct:{mord:st,mop:st,mrel:Ir,mopen:st,mclose:st,mpunct:st,minner:st},minner:{mord:st,mop:st,mbin:bn,mrel:Ir,mopen:st,mpunct:st,minner:st}},m5={mord:{mop:st},mop:{mord:st,mop:st},mbin:{},mrel:{},mopen:{},mclose:{mop:st},mpunct:{},minner:{mop:st}},dd={},qi={},ji={};function ce(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:s,mathmlBuilder:a}=t,o={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},l=0;l{var y=x.classes[0],C=v.classes[0];y==="mbin"&&ve.contains(v5,C)?x.classes[0]="mord":C==="mbin"&&ve.contains(g5,y)&&(v.classes[0]="mord")},{node:f},p,g),yc(s,(v,x)=>{var y=Na(x),C=Na(v),w=y&&C?v.hasClass("mtight")?m5[y][C]:p5[y][C]:null;if(w)return $.makeGlue(w,c)},{node:f},p,g),s},yc=function t(e,r,n,i,s){i&&e.push(i);for(var a=0;ap=>{e.splice(f+1,0,p),a++})(a)}i&&e.pop()},hd=function(e){return e instanceof L0||e instanceof No||e instanceof z0&&e.hasClass("enclosing")?e:null},w5=function t(e,r){var n=hd(e);if(n){var i=n.children;if(i.length){if(r==="right")return t(i[i.length-1],"right");if(r==="left")return t(i[0],"left")}}return e},Na=function(e,r){return e?(r&&(e=w5(e,r)),y5[e.classes[0]]||null):null},A0=function(e,r){var n=["nulldelimiter"].concat(e.baseSizingClasses());return qr(r.concat(n))},$e=function(e,r,n){if(!e)return qr();if(qi[e.type]){var i=qi[e.type](e,r);if(n&&r.size!==n.size){i=qr(r.sizingClasses(n),[i],r);var s=r.sizeMultiplier/n.sizeMultiplier;i.height*=s,i.depth*=s}return i}else throw new te("Got group of unknown type: '"+e.type+"'")};function ii(t,e){var r=qr(["base"],t,e),n=qr(["strut"]);return n.style.height=se(r.height+r.depth),r.depth&&(n.style.verticalAlign=se(-r.depth)),r.children.unshift(n),r}function Ia(t,e){var r=null;t.length===1&&t[0].type==="tag"&&(r=t[0].tag,t=t[0].body);var n=bt(t,e,"root"),i;n.length===2&&n[1].hasClass("tag")&&(i=n.pop());for(var s=[],a=[],o=0;o0&&(s.push(ii(a,e)),a=[]),s.push(n[o]));a.length>0&&s.push(ii(a,e));var c;r?(c=ii(bt(r,e,!0)),c.classes=["tag"],s.push(c)):i&&s.push(i);var u=qr(["katex-html"],s);if(u.setAttribute("aria-hidden","true"),c){var f=c.children[0];f.style.height=se(u.height+u.depth),u.depth&&(f.style.verticalAlign=se(-u.depth))}return u}function fd(t){return new L0(t)}class Kt{constructor(e,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(e,r){this.attributes[e]=r}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&e.setAttribute(r,this.attributes[r]);this.classes.length>0&&(e.className=sn(this.classes));for(var n=0;n0&&(e+=' class ="'+ve.escape(sn(this.classes))+'"'),e+=">";for(var n=0;n",e}toText(){return this.children.map(e=>e.toText()).join("")}}class Sr{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return ve.escape(this.toText())}toText(){return this.text}}class x5{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character="  ":e>=-.05556&&e<=-.05555?this.character=" ⁣":e>=-.1667&&e<=-.1666?this.character=" ⁣":e>=-.2223&&e<=-.2222?this.character=" ⁣":e>=-.2778&&e<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",se(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var Q={MathNode:Kt,TextNode:Sr,SpaceNode:x5,newDocumentFragment:fd},sr=function(e,r,n){return tt[r][e]&&tt[r][e].replace&&e.charCodeAt(0)!==55349&&!(ad.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=tt[r][e].replace),new Q.TextNode(e)},Do=function(e){return e.length===1?e[0]:new Q.MathNode("mrow",e)},Ro=function(e,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var i=e.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathsfit")return"sans-serif-italic";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var s=e.text;if(ve.contains(["\\imath","\\jmath"],s))return null;tt[i][s]&&tt[i][s].replace&&(s=tt[i][s].replace);var a=$.fontMap[n].fontName;return Mo(s,a,i)?$.fontMap[n].variant:null};function qs(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof Sr&&e.text==="."}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var r=t.children[0];return r instanceof Sr&&r.text===","}else return!1}var Ut=function(e,r,n){if(e.length===1){var i=Qe(e[0],r);return n&&i instanceof Kt&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var s=[],a,o=0;o=1&&(a.type==="mn"||qs(a))){var c=l.children[0];c instanceof Kt&&c.type==="mn"&&(c.children=[...a.children,...c.children],s.pop())}else if(a.type==="mi"&&a.children.length===1){var u=a.children[0];if(u instanceof Sr&&u.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var f=l.children[0];f instanceof Sr&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),s.pop())}}}s.push(l),a=l}return s},on=function(e,r,n){return Do(Ut(e,r,n))},Qe=function(e,r){if(!e)return new Q.MathNode("mrow");if(ji[e.type]){var n=ji[e.type](e,r);return n}else throw new te("Got group of unknown type: '"+e.type+"'")};function wc(t,e,r,n,i){var s=Ut(t,r),a;s.length===1&&s[0]instanceof Kt&&ve.contains(["mrow","mtable"],s[0].type)?a=s[0]:a=new Q.MathNode("mrow",s);var o=new Q.MathNode("annotation",[new Q.TextNode(e)]);o.setAttribute("encoding","application/x-tex");var l=new Q.MathNode("semantics",[a,o]),c=new Q.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");var u=i?"katex":"katex-mathml";return $.makeSpan([u],[c])}var pd=function(e){return new Rr({style:e.displayMode?we.DISPLAY:we.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},md=function(e,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),e=$.makeSpan(n,[e])}return e},k5=function(e,r,n){var i=pd(n),s;if(n.output==="mathml")return wc(e,r,i,n.displayMode,!0);if(n.output==="html"){var a=Ia(e,i);s=$.makeSpan(["katex"],[a])}else{var o=wc(e,r,i,n.displayMode,!1),l=Ia(e,i);s=$.makeSpan(["katex"],[o,l])}return md(s,n)},S5=function(e,r,n){var i=pd(n),s=Ia(e,i),a=$.makeSpan(["katex"],[s]);return md(a,n)},T5={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},E5=function(e){var r=new Q.MathNode("mo",[new Q.TextNode(T5[e.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},A5={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},C5=function(e){return e.type==="ordgroup"?e.body.length:1},M5=function(e,r){function n(){var o=4e5,l=e.label.slice(1);if(ve.contains(["widehat","widecheck","widetilde","utilde"],l)){var c=e,u=C5(c.base),f,p,g;if(u>5)l==="widehat"||l==="widecheck"?(f=420,o=2364,g=.42,p=l+"4"):(f=312,o=2340,g=.34,p="tilde4");else{var v=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][v],f=[0,239,300,360,420][v],g=[0,.24,.3,.3,.36,.42][v],p=l+v):(o=[0,600,1033,2339,2340][v],f=[0,260,286,306,312][v],g=[0,.26,.286,.3,.306,.34][v],p="tilde"+v)}var x=new an(p),y=new Hr([x],{width:"100%",height:se(g),viewBox:"0 0 "+o+" "+f,preserveAspectRatio:"none"});return{span:$.makeSvgSpan([],[y],r),minWidth:0,height:g}}else{var C=[],w=A5[l],[k,I,R]=w,_=R/1e3,F=k.length,V,q;if(F===1){var le=w[3];V=["hide-tail"],q=[le]}else if(F===2)V=["halfarrow-left","halfarrow-right"],q=["xMinYMin","xMaxYMin"];else if(F===3)V=["brace-left","brace-center","brace-right"],q=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+F+" children.");for(var me=0;me0&&(i.style.minWidth=se(s)),i},N5=function(e,r,n,i,s){var a,o=e.height+e.depth+n+i;if(/fbox|color|angl/.test(r)){if(a=$.makeSpan(["stretchy",r],[],s),r==="fbox"){var l=s.color&&s.getColor();l&&(a.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(r)&&c.push(new Ca({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&c.push(new Ca({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var u=new Hr(c,{width:"100%",height:se(o)});a=$.makeSvgSpan([],[u],s)}return a.height=o,a.style.height=se(o),a},jr={encloseSpan:N5,mathMLnode:E5,svgSpan:M5};function Ie(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function Oo(t){var e=ms(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function ms(t){return t&&(t.type==="atom"||e5.hasOwnProperty(t.type))?t:null}var _o=(t,e)=>{var r,n,i;t&&t.type==="supsub"?(n=Ie(t.base,"accent"),r=n.base,t.base=r,i=Z6($e(t,e)),t.base=n):(n=Ie(t,"accent"),r=n.base);var s=$e(r,e.havingCrampedStyle()),a=n.isShifty&&ve.isCharacterBox(r),o=0;if(a){var l=ve.getBaseElem(r),c=$e(l,e.havingCrampedStyle());o=fc(c).skew}var u=n.label==="\\c",f=u?s.height+s.depth:Math.min(s.height,e.fontMetrics().xHeight),p;if(n.isStretchy)p=jr.svgSpan(n,e),p=$.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+se(2*o)+")",marginLeft:se(2*o)}:void 0}]},e);else{var g,v;n.label==="\\vec"?(g=$.staticSvg("vec",e),v=$.svgData.vec[1]):(g=$.makeOrd({mode:n.mode,text:n.label},e,"textord"),g=fc(g),g.italic=0,v=g.width,u&&(f+=g.depth)),p=$.makeSpan(["accent-body"],[g]);var x=n.label==="\\textcircled";x&&(p.classes.push("accent-full"),f=s.height);var y=o;x||(y-=v/2),p.style.left=se(y),n.label==="\\textcircled"&&(p.style.top=".2em"),p=$.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-f},{type:"elem",elem:p}]},e)}var C=$.makeSpan(["mord","accent"],[p],e);return i?(i.children[0]=C,i.height=Math.max(C.height,i.height),i.classes[0]="mord",i):C},gd=(t,e)=>{var r=t.isStretchy?jr.mathMLnode(t.label):new Q.MathNode("mo",[sr(t.label,t.mode)]),n=new Q.MathNode("mover",[Qe(t.base,e),r]);return n.setAttribute("accent","true"),n},I5=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));ce({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(t,e)=>{var r=Ui(e[0]),n=!I5.test(t.funcName),i=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:_o,mathmlBuilder:gd});ce({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:_o,mathmlBuilder:gd});ce({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(t,e)=>{var r=$e(t.base,e),n=jr.svgSpan(t,e),i=t.label==="\\utilde"?.12:0,s=$.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]},e);return $.makeSpan(["mord","accentunder"],[s],e)},mathmlBuilder:(t,e)=>{var r=jr.mathMLnode(t.label),n=new Q.MathNode("munder",[Qe(t.base,e),r]);return n.setAttribute("accentunder","true"),n}});var si=t=>{var e=new Q.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};ce({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n,funcName:i}=t;return{type:"xArrow",mode:n.mode,label:i,body:e[0],below:r[0]}},htmlBuilder(t,e){var r=e.style,n=e.havingStyle(r.sup()),i=$.wrapFragment($e(t.body,n,e),e),s=t.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(s+"-arrow-pad");var a;t.below&&(n=e.havingStyle(r.sub()),a=$.wrapFragment($e(t.below,n,e),e),a.classes.push(s+"-arrow-pad"));var o=jr.svgSpan(t,e),l=-e.fontMetrics().axisHeight+.5*o.height,c=-e.fontMetrics().axisHeight-.5*o.height-.111;(i.depth>.25||t.label==="\\xleftequilibrium")&&(c-=i.depth);var u;if(a){var f=-e.fontMetrics().axisHeight+a.height+.5*o.height+.111;u=$.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:o,shift:l},{type:"elem",elem:a,shift:f}]},e)}else u=$.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:o,shift:l}]},e);return u.children[0].children[0].children[1].classes.push("svg-align"),$.makeSpan(["mrel","x-arrow"],[u],e)},mathmlBuilder(t,e){var r=jr.mathMLnode(t.label);r.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var i=si(Qe(t.body,e));if(t.below){var s=si(Qe(t.below,e));n=new Q.MathNode("munderover",[r,s,i])}else n=new Q.MathNode("mover",[r,i])}else if(t.below){var a=si(Qe(t.below,e));n=new Q.MathNode("munder",[r,a])}else n=si(),n=new Q.MathNode("mover",[r,n]);return n}});var D5=$.makeSpan;function vd(t,e){var r=bt(t.body,e,!0);return D5([t.mclass],r,e)}function bd(t,e){var r,n=Ut(t.body,e);return t.mclass==="minner"?r=new Q.MathNode("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(r=n[0],r.type="mi"):r=new Q.MathNode("mi",n):(t.isCharacterBox?(r=n[0],r.type="mo"):r=new Q.MathNode("mo",n),t.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):t.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):t.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}ce({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:dt(i),isCharacterBox:ve.isCharacterBox(i)}},htmlBuilder:vd,mathmlBuilder:bd});var gs=t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};ce({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:gs(e[0]),body:dt(e[1]),isCharacterBox:ve.isCharacterBox(e[1])}}});ce({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:r,funcName:n}=t,i=e[1],s=e[0],a;n!=="\\stackrel"?a=gs(i):a="mrel";var o={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:dt(i)},l={type:"supsub",mode:s.mode,base:o,sup:n==="\\underset"?null:s,sub:n==="\\underset"?s:null};return{type:"mclass",mode:r.mode,mclass:a,body:[l],isCharacterBox:ve.isCharacterBox(l)}},htmlBuilder:vd,mathmlBuilder:bd});ce({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:gs(e[0]),body:dt(e[0])}},htmlBuilder(t,e){var r=bt(t.body,e,!0),n=$.makeSpan([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=Ut(t.body,e),n=new Q.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var R5={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},xc=()=>({type:"styling",body:[],mode:"math",style:"display"}),kc=t=>t.type==="textord"&&t.text==="@",O5=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;function _5(t,e,r){var n=R5[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[e[0]],[]),s={type:"atom",text:n,mode:"math",family:"rel"},a=r.callFunction("\\Big",[s],[]),o=r.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[i,a,o]};return r.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function L5(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if(r==="&"||r==="\\\\")t.consume();else if(r==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new te("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var n=[],i=[n],s=0;s-1))if("<>AV".indexOf(c)>-1)for(var f=0;f<2;f++){for(var p=!0,g=l+1;gAV=|." after @',a[l]);var v=_5(c,u,t),x={type:"styling",body:[v],mode:"math",style:"display"};n.push(x),o=xc()}s%2===0?n.push(o):n.shift(),n=[],i.push(n)}t.gullet.endGroup(),t.gullet.endGroup();var y=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:y,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}ce({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=$.wrapFragment($e(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=se(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new Q.MathNode("mrow",[Qe(t.label,e)]);return r=new Q.MathNode("mpadded",[r]),r.setAttribute("width","0"),t.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new Q.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});ce({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=$.wrapFragment($e(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(t,e){return new Q.MathNode("mrow",[Qe(t.fragment,e)])}});ce({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=Ie(e[0],"ordgroup"),i=n.body,s="",a=0;a=1114111)throw new te("\\@char with invalid code point "+s);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:r.mode,text:c}}});var yd=(t,e)=>{var r=bt(t.body,e.withColor(t.color),!1);return $.makeFragment(r)},wd=(t,e)=>{var r=Ut(t.body,e.withColor(t.color)),n=new Q.MathNode("mstyle",r);return n.setAttribute("mathcolor",t.color),n};ce({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=Ie(e[0],"color-token").color,i=e[1];return{type:"color",mode:r.mode,color:n,body:dt(i)}},htmlBuilder:yd,mathmlBuilder:wd});ce({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,i=Ie(e[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var s=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:s}},htmlBuilder:yd,mathmlBuilder:wd});ce({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,s=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:s,size:i&&Ie(i,"size").value}},htmlBuilder(t,e){var r=$.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=se(at(t.size,e)))),r},mathmlBuilder(t,e){var r=new Q.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",se(at(t.size,e)))),r}});var Da={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},xd=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new te("Expected a control sequence",t);return e},z5=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},kd=(t,e,r,n)=>{var i=t.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)};ce({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if(Da[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=Da[n.text]),Ie(e.parseFunction(),"internal");throw new te("Invalid token after macro prefix",n)}});ce({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new te("Expected a control sequence",n);for(var s=0,a,o=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){a=e.gullet.future(),o[s].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new te('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new te('Argument number "'+n.text+'" out of order');s++,o.push([])}else{if(n.text==="EOF")throw new te("Expected a macro definition");o[s].push(n.text)}var{tokens:l}=e.gullet.consumeArg();return a&&l.unshift(a),(r==="\\edef"||r==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(i,{tokens:l,numArgs:s,delimiters:o},r===Da[r]),{type:"internal",mode:e.mode}}});ce({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=xd(e.gullet.popToken());e.gullet.consumeSpaces();var i=z5(e);return kd(e,n,i,r==="\\\\globallet"),{type:"internal",mode:e.mode}}});ce({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=xd(e.gullet.popToken()),i=e.gullet.popToken(),s=e.gullet.popToken();return kd(e,n,s,r==="\\\\globalfuture"),e.gullet.pushToken(s),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});var l0=function(e,r,n){var i=tt.math[e]&&tt.math[e].replace,s=Mo(i||e,r,n);if(!s)throw new Error("Unsupported symbol "+e+" and font size "+r+".");return s},Lo=function(e,r,n,i){var s=n.havingBaseStyle(r),a=$.makeSpan(i.concat(s.sizingClasses(n)),[e],n),o=s.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=s.sizeMultiplier,a},Sd=function(e,r,n){var i=r.havingBaseStyle(n),s=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=se(s),e.height-=s,e.depth+=s},$5=function(e,r,n,i,s,a){var o=$.makeSymbol(e,"Main-Regular",s,i),l=Lo(o,r,i,a);return n&&Sd(l,i,r),l},F5=function(e,r,n,i){return $.makeSymbol(e,"Size"+r+"-Regular",n,i)},Td=function(e,r,n,i,s,a){var o=F5(e,r,s,i),l=Lo($.makeSpan(["delimsizing","size"+r],[o],i),we.TEXT,i,a);return n&&Sd(l,i,we.TEXT),l},js=function(e,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var s=$.makeSpan(["delimsizinginner",i],[$.makeSpan([],[$.makeSymbol(e,r,n)])]);return{type:"elem",elem:s}},Us=function(e,r,n){var i=kr["Size4-Regular"][e.charCodeAt(0)]?kr["Size4-Regular"][e.charCodeAt(0)][4]:kr["Size1-Regular"][e.charCodeAt(0)][4],s=new an("inner",j6(e,Math.round(1e3*r))),a=new Hr([s],{width:se(i),height:se(r),style:"width:"+se(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),o=$.makeSvgSpan([],[a],n);return o.height=r,o.style.height=se(r),o.style.width=se(i),{type:"elem",elem:o}},Ra=.008,ai={type:"kern",size:-1*Ra},B5=["|","\\lvert","\\rvert","\\vert"],P5=["\\|","\\lVert","\\rVert","\\Vert"],Ed=function(e,r,n,i,s,a){var o,l,c,u,f="",p=0;o=c=u=e,l=null;var g="Size1-Regular";e==="\\uparrow"?c=u="⏐":e==="\\Uparrow"?c=u="‖":e==="\\downarrow"?o=c="⏐":e==="\\Downarrow"?o=c="‖":e==="\\updownarrow"?(o="\\uparrow",c="⏐",u="\\downarrow"):e==="\\Updownarrow"?(o="\\Uparrow",c="‖",u="\\Downarrow"):ve.contains(B5,e)?(c="∣",f="vert",p=333):ve.contains(P5,e)?(c="∥",f="doublevert",p=556):e==="["||e==="\\lbrack"?(o="⎡",c="⎢",u="⎣",g="Size4-Regular",f="lbrack",p=667):e==="]"||e==="\\rbrack"?(o="⎤",c="⎥",u="⎦",g="Size4-Regular",f="rbrack",p=667):e==="\\lfloor"||e==="⌊"?(c=o="⎢",u="⎣",g="Size4-Regular",f="lfloor",p=667):e==="\\lceil"||e==="⌈"?(o="⎡",c=u="⎢",g="Size4-Regular",f="lceil",p=667):e==="\\rfloor"||e==="⌋"?(c=o="⎥",u="⎦",g="Size4-Regular",f="rfloor",p=667):e==="\\rceil"||e==="⌉"?(o="⎤",c=u="⎥",g="Size4-Regular",f="rceil",p=667):e==="("||e==="\\lparen"?(o="⎛",c="⎜",u="⎝",g="Size4-Regular",f="lparen",p=875):e===")"||e==="\\rparen"?(o="⎞",c="⎟",u="⎠",g="Size4-Regular",f="rparen",p=875):e==="\\{"||e==="\\lbrace"?(o="⎧",l="⎨",u="⎩",c="⎪",g="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(o="⎫",l="⎬",u="⎭",c="⎪",g="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(o="⎧",u="⎩",c="⎪",g="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(o="⎫",u="⎭",c="⎪",g="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(o="⎧",u="⎭",c="⎪",g="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(o="⎫",u="⎩",c="⎪",g="Size4-Regular");var v=l0(o,g,s),x=v.height+v.depth,y=l0(c,g,s),C=y.height+y.depth,w=l0(u,g,s),k=w.height+w.depth,I=0,R=1;if(l!==null){var _=l0(l,g,s);I=_.height+_.depth,R=2}var F=x+k+I,V=Math.max(0,Math.ceil((r-F)/(R*C))),q=F+V*R*C,le=i.fontMetrics().axisHeight;n&&(le*=i.sizeMultiplier);var me=q/2-le,Se=[];if(f.length>0){var ze=q-x-k,Le=Math.round(q*1e3),Ge=U6(f,Math.round(ze*1e3)),Oe=new an(f,Ge),xe=(p/1e3).toFixed(3)+"em",fe=(Le/1e3).toFixed(3)+"em",je=new Hr([Oe],{width:xe,height:fe,viewBox:"0 0 "+p+" "+Le}),Be=$.makeSvgSpan([],[je],i);Be.height=Le/1e3,Be.style.width=xe,Be.style.height=fe,Se.push({type:"elem",elem:Be})}else{if(Se.push(js(u,g,s)),Se.push(ai),l===null){var Ye=q-x-k+2*Ra;Se.push(Us(c,Ye,i))}else{var ge=(q-x-k-I)/2+2*Ra;Se.push(Us(c,ge,i)),Se.push(ai),Se.push(js(l,g,s)),Se.push(ai),Se.push(Us(c,ge,i))}Se.push(ai),Se.push(js(o,g,s))}var Ft=i.havingBaseStyle(we.TEXT),ht=$.makeVList({positionType:"bottom",positionData:me,children:Se},Ft);return Lo($.makeSpan(["delimsizing","mult"],[ht],Ft),we.TEXT,i,a)},Vs=80,Ws=.08,Gs=function(e,r,n,i,s){var a=q6(e,i,n),o=new an(e,a),l=new Hr([o],{width:"400em",height:se(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return $.makeSvgSpan(["hide-tail"],[l],s)},H5=function(e,r){var n=r.havingBaseSizing(),i=Nd("\\surd",e*n.sizeMultiplier,Md,n),s=n.sizeMultiplier,a=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),o,l=0,c=0,u=0,f;return i.type==="small"?(u=1e3+1e3*a+Vs,e<1?s=1:e<1.4&&(s=.7),l=(1+a+Ws)/s,c=(1+a)/s,o=Gs("sqrtMain",l,u,a,r),o.style.minWidth="0.853em",f=.833/s):i.type==="large"?(u=(1e3+Vs)*b0[i.size],c=(b0[i.size]+a)/s,l=(b0[i.size]+a+Ws)/s,o=Gs("sqrtSize"+i.size,l,u,a,r),o.style.minWidth="1.02em",f=1/s):(l=e+a+Ws,c=e+a,u=Math.floor(1e3*e+a)+Vs,o=Gs("sqrtTall",l,u,a,r),o.style.minWidth="0.742em",f=1.056),o.height=c,o.style.height=se(l),{span:o,advanceWidth:f,ruleWidth:(r.fontMetrics().sqrtRuleThickness+a)*s}},Ad=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],q5=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Cd=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],b0=[0,1.2,1.8,2.4,3],j5=function(e,r,n,i,s){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),ve.contains(Ad,e)||ve.contains(Cd,e))return Td(e,r,!1,n,i,s);if(ve.contains(q5,e))return Ed(e,b0[r],!1,n,i,s);throw new te("Illegal delimiter: '"+e+"'")},U5=[{type:"small",style:we.SCRIPTSCRIPT},{type:"small",style:we.SCRIPT},{type:"small",style:we.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],V5=[{type:"small",style:we.SCRIPTSCRIPT},{type:"small",style:we.SCRIPT},{type:"small",style:we.TEXT},{type:"stack"}],Md=[{type:"small",style:we.SCRIPTSCRIPT},{type:"small",style:we.SCRIPT},{type:"small",style:we.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],W5=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Nd=function(e,r,n,i){for(var s=Math.min(2,3-i.style.size),a=s;ar)return n[a]}return n[n.length-1]},Id=function(e,r,n,i,s,a){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var o;ve.contains(Cd,e)?o=U5:ve.contains(Ad,e)?o=Md:o=V5;var l=Nd(e,r,o,i);return l.type==="small"?$5(e,l.style,n,i,s,a):l.type==="large"?Td(e,l.size,n,i,s,a):Ed(e,r,n,i,s,a)},G5=function(e,r,n,i,s,a){var o=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,c=5/i.fontMetrics().ptPerEm,u=Math.max(r-o,n+o),f=Math.max(u/500*l,2*u-c);return Id(e,f,!0,i,s,a)},Fr={sqrtImage:H5,sizedDelim:j5,sizeToMaxHeight:b0,customSizedDelim:Id,leftRightDelim:G5},Sc={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},K5=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function vs(t,e){var r=ms(t);if(r&&ve.contains(K5,r.text))return r;throw r?new te("Invalid delimiter '"+r.text+"' after '"+e.funcName+"'",t):new te("Invalid delimiter type '"+t.type+"'",t)}ce({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(t,e)=>{var r=vs(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:Sc[t.funcName].size,mclass:Sc[t.funcName].mclass,delim:r.text}},htmlBuilder:(t,e)=>t.delim==="."?$.makeSpan([t.mclass]):Fr.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(sr(t.delim,t.mode));var r=new Q.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=se(Fr.sizeToMaxHeight[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function Tc(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ce({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new te("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:vs(e[0],t).text,color:r}}});ce({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=vs(e[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var s=Ie(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:s.delim,rightColor:s.color}},htmlBuilder:(t,e)=>{Tc(t);for(var r=bt(t.body,e,!0,["mopen","mclose"]),n=0,i=0,s=!1,a=0;a{Tc(t);var r=Ut(t.body,e);if(t.left!=="."){var n=new Q.MathNode("mo",[sr(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(t.right!=="."){var i=new Q.MathNode("mo",[sr(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),r.push(i)}return Do(r)}});ce({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=vs(e[0],t);if(!t.parser.leftrightDepth)throw new te("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},htmlBuilder:(t,e)=>{var r;if(t.delim===".")r=A0(e,[]);else{r=Fr.sizedDelim(t.delim,1,e,t.mode,[]);var n={delim:t.delim,options:e};r.isMiddle=n}return r},mathmlBuilder:(t,e)=>{var r=t.delim==="\\vert"||t.delim==="|"?sr("|","text"):sr(t.delim,t.mode),n=new Q.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var zo=(t,e)=>{var r=$.wrapFragment($e(t.body,e),e),n=t.label.slice(1),i=e.sizeMultiplier,s,a=0,o=ve.isCharacterBox(t.body);if(n==="sout")s=$.makeSpan(["stretchy","sout"]),s.height=e.fontMetrics().defaultRuleThickness/i,a=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=at({number:.6,unit:"pt"},e),c=at({number:.35,unit:"ex"},e),u=e.havingBaseSizing();i=i/u.sizeMultiplier;var f=r.height+r.depth+l+c;r.style.paddingLeft=se(f/2+l);var p=Math.floor(1e3*f*i),g=P6(p),v=new Hr([new an("phase",g)],{width:"400em",height:se(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});s=$.makeSvgSpan(["hide-tail"],[v],e),s.style.height=se(f),a=r.depth+l+c}else{/cancel/.test(n)?o||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var x=0,y=0,C=0;/box/.test(n)?(C=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),x=e.fontMetrics().fboxsep+(n==="colorbox"?0:C),y=x):n==="angl"?(C=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),x=4*C,y=Math.max(0,.25-r.depth)):(x=o?.2:0,y=x),s=jr.encloseSpan(r,n,x,y,e),/fbox|boxed|fcolorbox/.test(n)?(s.style.borderStyle="solid",s.style.borderWidth=se(C)):n==="angl"&&C!==.049&&(s.style.borderTopWidth=se(C),s.style.borderRightWidth=se(C)),a=r.depth+y,t.backgroundColor&&(s.style.backgroundColor=t.backgroundColor,t.borderColor&&(s.style.borderColor=t.borderColor))}var w;if(t.backgroundColor)w=$.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:a},{type:"elem",elem:r,shift:0}]},e);else{var k=/cancel|phase/.test(n)?["svg-align"]:[];w=$.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:s,shift:a,wrapperClasses:k}]},e)}return/cancel/.test(n)&&(w.height=r.height,w.depth=r.depth),/cancel/.test(n)&&!o?$.makeSpan(["mord","cancel-lap"],[w],e):$.makeSpan(["mord"],[w],e)},$o=(t,e)=>{var r=0,n=new Q.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Qe(t.body,e)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),t.label==="\\fcolorbox"){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(t.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n};ce({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,s=Ie(e[0],"color-token").color,a=e[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:s,body:a}},htmlBuilder:zo,mathmlBuilder:$o});ce({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,s=Ie(e[0],"color-token").color,a=Ie(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,borderColor:s,body:o}},htmlBuilder:zo,mathmlBuilder:$o});ce({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]}}});ce({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:zo,mathmlBuilder:$o});ce({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]}}});var Dd={};function Er(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:s,mathmlBuilder:a}=t,o={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l{var e=t.parser.settings;if(!e.displayMode)throw new te("{"+t.envName+"} can be used only in display mode.")};function Fo(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function hn(t,e,r){var{hskipBeforeAndAfter:n,addJot:i,cols:s,arraystretch:a,colSeparationType:o,autoTag:l,singleRow:c,emptySingleRow:u,maxNumCols:f,leqno:p}=e;if(t.gullet.beginGroup(),c||t.gullet.macros.set("\\cr","\\\\\\relax"),!a){var g=t.gullet.expandMacroAsText("\\arraystretch");if(g==null)a=1;else if(a=parseFloat(g),!a||a<0)throw new te("Invalid \\arraystretch: "+g)}t.gullet.beginGroup();var v=[],x=[v],y=[],C=[],w=l!=null?[]:void 0;function k(){l&&t.gullet.macros.set("\\@eqnsw","1",!0)}function I(){w&&(t.gullet.macros.get("\\df@tag")?(w.push(t.subparse([new nr("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):w.push(!!l&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(k(),C.push(Ec(t));;){var R=t.parseExpression(!1,c?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),R={type:"ordgroup",mode:t.mode,body:R},r&&(R={type:"styling",mode:t.mode,style:r,body:[R]}),v.push(R);var _=t.fetch().text;if(_==="&"){if(f&&v.length===f){if(c||o)throw new te("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(_==="\\end"){I(),v.length===1&&R.type==="styling"&&R.body[0].body.length===0&&(x.length>1||!u)&&x.pop(),C.length0&&(k+=.25),c.push({pos:k,isDashed:U[Z]})}for(I(a[0]),n=0;n0&&(me+=w,FU))for(n=0;n=o)){var lt=void 0;(i>0||e.hskipBeforeAndAfter)&&(lt=ve.deflt(ge.pregap,p),lt!==0&&(Ge=$.makeSpan(["arraycolsep"],[]),Ge.style.width=se(lt),Le.push(Ge)));var j=[];for(n=0;n0){for(var be=$.makeLineSpan("hline",r,u),S=$.makeLineSpan("hdashline",r,u),M=[{type:"elem",elem:l,shift:0}];c.length>0;){var z=c.pop(),H=z.pos-Se;z.isDashed?M.push({type:"elem",elem:S,shift:H}):M.push({type:"elem",elem:be,shift:H})}l=$.makeVList({positionType:"individualShift",children:M},r)}if(xe.length===0)return $.makeSpan(["mord"],[l],r);var B=$.makeVList({positionType:"individualShift",children:xe},r);return B=$.makeSpan(["tag"],[B],r),$.makeFragment([l,B])},Y5={c:"center ",l:"left ",r:"right "},Cr=function(e,r){for(var n=[],i=new Q.MathNode("mtd",[],["mtr-glue"]),s=new Q.MathNode("mtd",[],["mml-eqn-num"]),a=0;a0){var v=e.cols,x="",y=!1,C=0,w=v.length;v[0].type==="separator"&&(p+="top ",C=1),v[v.length-1].type==="separator"&&(p+="bottom ",w-=1);for(var k=C;k0?"left ":"",p+=V[V.length-1].length>0?"right ":"";for(var q=1;q-1?"alignat":"align",s=e.envName==="split",a=hn(e.parser,{cols:n,addJot:!0,autoTag:s?void 0:Fo(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display"),o,l=0,c={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var u="",f=0;f0&&g&&(y=1),n[v]={type:"align",align:x,pregap:y,postgap:0}}return a.colSeparationType=g?"align":"alignat",a};Er({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=ms(e[0]),n=r?[e[0]]:Ie(e[0],"ordgroup").body,i=n.map(function(a){var o=Oo(a),l=o.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new te("Unknown column alignment: "+l,a)}),s={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return hn(t.parser,s,Bo(t.envName))},htmlBuilder:Ar,mathmlBuilder:Cr});Er({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(t.envName.charAt(t.envName.length-1)==="*"){var i=t.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,"lcr".indexOf(r)===-1)throw new te("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var s=hn(t.parser,n,Bo(t.envName)),a=Math.max(0,...s.body.map(o=>o.length));return s.cols=new Array(a).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[s],left:e[0],right:e[1],rightColor:void 0}:s},htmlBuilder:Ar,mathmlBuilder:Cr});Er({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},r=hn(t.parser,e,"script");return r.colSeparationType="small",r},htmlBuilder:Ar,mathmlBuilder:Cr});Er({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=ms(e[0]),n=r?[e[0]]:Ie(e[0],"ordgroup").body,i=n.map(function(a){var o=Oo(a),l=o.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new te("Unknown column alignment: "+l,a)});if(i.length>1)throw new te("{subarray} can contain only one column");var s={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(s=hn(t.parser,s,"script"),s.body.length>0&&s.body[0].length>1)throw new te("{subarray} can contain only one column");return s},htmlBuilder:Ar,mathmlBuilder:Cr});Er({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=hn(t.parser,e,Bo(t.envName));return{type:"leftright",mode:t.mode,body:[r],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Ar,mathmlBuilder:Cr});Er({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Od,htmlBuilder:Ar,mathmlBuilder:Cr});Er({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){ve.contains(["gather","gather*"],t.envName)&&bs(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Fo(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return hn(t.parser,e,"display")},htmlBuilder:Ar,mathmlBuilder:Cr});Er({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Od,htmlBuilder:Ar,mathmlBuilder:Cr});Er({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){bs(t);var e={autoTag:Fo(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return hn(t.parser,e,"display")},htmlBuilder:Ar,mathmlBuilder:Cr});Er({type:"array",names:["CD"],props:{numArgs:0},handler(t){return bs(t),L5(t.parser)},htmlBuilder:Ar,mathmlBuilder:Cr});b("\\nonumber","\\gdef\\@eqnsw{0}");b("\\notag","\\nonumber");ce({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new te(t.funcName+" valid only within array environment")}});var Ac=Dd;ce({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];if(i.type!=="ordgroup")throw new te("Invalid environment name",i);for(var s="",a=0;a{var r=t.font,n=e.withFont(r);return $e(t.body,n)},Ld=(t,e)=>{var r=t.font,n=e.withFont(r);return Qe(t.body,n)},Cc={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ce({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=Ui(e[0]),s=n;return s in Cc&&(s=Cc[s]),{type:"font",mode:r.mode,font:s.slice(1),body:i}},htmlBuilder:_d,mathmlBuilder:Ld});ce({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:r}=t,n=e[0],i=ve.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:gs(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:i}}});ce({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,breakOnTokenText:i}=t,{mode:s}=r,a=r.parseExpression(!0,i),o="math"+n.slice(1);return{type:"font",mode:s,font:o,body:{type:"ordgroup",mode:r.mode,body:a}}},htmlBuilder:_d,mathmlBuilder:Ld});var zd=(t,e)=>{var r=e;return t==="display"?r=r.id>=we.SCRIPT.id?r.text():we.DISPLAY:t==="text"&&r.size===we.DISPLAY.size?r=we.TEXT:t==="script"?r=we.SCRIPT:t==="scriptscript"&&(r=we.SCRIPTSCRIPT),r},Po=(t,e)=>{var r=zd(t.size,e.style),n=r.fracNum(),i=r.fracDen(),s;s=e.havingStyle(n);var a=$e(t.numer,s,e);if(t.continued){var o=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;a.height=a.height0?v=3*p:v=7*p,x=e.fontMetrics().denom1):(f>0?(g=e.fontMetrics().num2,v=p):(g=e.fontMetrics().num3,v=3*p),x=e.fontMetrics().denom2);var y;if(u){var w=e.fontMetrics().axisHeight;g-a.depth-(w+.5*f){var r=new Q.MathNode("mfrac",[Qe(t.numer,e),Qe(t.denom,e)]);if(!t.hasBarLine)r.setAttribute("linethickness","0px");else if(t.barSize){var n=at(t.barSize,e);r.setAttribute("linethickness",se(n))}var i=zd(t.size,e.style);if(i.size!==e.style.size){r=new Q.MathNode("mstyle",[r]);var s=i.size===we.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",s),r.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var a=[];if(t.leftDelim!=null){var o=new Q.MathNode("mo",[new Q.TextNode(t.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),a.push(o)}if(a.push(r),t.rightDelim!=null){var l=new Q.MathNode("mo",[new Q.TextNode(t.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),a.push(l)}return Do(a)}return r};ce({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],s=e[1],a,o=null,l=null,c="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,o="(",l=")";break;case"\\\\bracefrac":a=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":a=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:i,denom:s,hasBarLine:a,leftDelim:o,rightDelim:l,size:c,barSize:null}},htmlBuilder:Po,mathmlBuilder:Ho});ce({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],s=e[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:i,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});ce({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:r,token:n}=t,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:i,token:n}}});var Mc=["display","text","script","scriptscript"],Nc=function(e){var r=null;return e.length>0&&(r=e,r=r==="."?null:r),r};ce({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:r}=t,n=e[4],i=e[5],s=Ui(e[0]),a=s.type==="atom"&&s.family==="open"?Nc(s.text):null,o=Ui(e[1]),l=o.type==="atom"&&o.family==="close"?Nc(o.text):null,c=Ie(e[2],"size"),u,f=null;c.isBlank?u=!0:(f=c.value,u=f.number>0);var p="auto",g=e[3];if(g.type==="ordgroup"){if(g.body.length>0){var v=Ie(g.body[0],"textord");p=Mc[Number(v.text)]}}else g=Ie(g,"textord"),p=Mc[Number(g.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:u,barSize:f,leftDelim:a,rightDelim:l,size:p}},htmlBuilder:Po,mathmlBuilder:Ho});ce({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:i}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Ie(e[0],"size").value,token:i}}});ce({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],s=E6(Ie(e[1],"infix").size),a=e[2],o=s.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:a,continued:!1,hasBarLine:o,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Po,mathmlBuilder:Ho});var $d=(t,e)=>{var r=e.style,n,i;t.type==="supsub"?(n=t.sup?$e(t.sup,e.havingStyle(r.sup()),e):$e(t.sub,e.havingStyle(r.sub()),e),i=Ie(t.base,"horizBrace")):i=Ie(t,"horizBrace");var s=$e(i.base,e.havingBaseStyle(we.DISPLAY)),a=jr.svgSpan(i,e),o;if(i.isOver?(o=$.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},e),o.children[0].children[0].children[1].classes.push("svg-align")):(o=$.makeVList({positionType:"bottom",positionData:s.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},e),o.children[0].children[0].children[0].classes.push("svg-align")),n){var l=$.makeSpan(["mord",i.isOver?"mover":"munder"],[o],e);i.isOver?o=$.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},e):o=$.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return $.makeSpan(["mord",i.isOver?"mover":"munder"],[o],e)},X5=(t,e)=>{var r=jr.mathMLnode(t.label);return new Q.MathNode(t.isOver?"mover":"munder",[Qe(t.base,e),r])};ce({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:$d,mathmlBuilder:X5});ce({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[1],i=Ie(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:dt(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var r=bt(t.body,e,!1);return $.makeAnchor(t.href,[],r,e)},mathmlBuilder:(t,e)=>{var r=on(t.body,e);return r instanceof Kt||(r=new Kt("mrow",[r])),r.setAttribute("href",t.href),r}});ce({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=Ie(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],s=0;s{var{parser:r,funcName:n,token:i}=t,s=Ie(e[0],"raw").string,a=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(n){case"\\htmlClass":l.class=s,o={command:"\\htmlClass",class:s};break;case"\\htmlId":l.id=s,o={command:"\\htmlId",id:s};break;case"\\htmlStyle":l.style=s,o={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var c=s.split(","),u=0;u{var r=bt(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var i=$.makeSpan(n,r,e);for(var s in t.attributes)s!=="class"&&t.attributes.hasOwnProperty(s)&&i.setAttribute(s,t.attributes[s]);return i},mathmlBuilder:(t,e)=>on(t.body,e)});ce({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:dt(e[0]),mathml:dt(e[1])}},htmlBuilder:(t,e)=>{var r=bt(t.html,e,!1);return $.makeFragment(r)},mathmlBuilder:(t,e)=>on(t.mathml,e)});var Ks=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!r)throw new te("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!rd(n))throw new te("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};ce({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,r)=>{var{parser:n}=t,i={number:0,unit:"em"},s={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(r[0])for(var l=Ie(r[0],"raw").string,c=l.split(","),u=0;u{var r=at(t.height,e),n=0;t.totalheight.number>0&&(n=at(t.totalheight,e)-r);var i=0;t.width.number>0&&(i=at(t.width,e));var s={height:se(r+n)};i>0&&(s.width=se(i)),n>0&&(s.verticalAlign=se(-n));var a=new X6(t.src,t.alt,s);return a.height=r,a.depth=n,a},mathmlBuilder:(t,e)=>{var r=new Q.MathNode("mglyph",[]);r.setAttribute("alt",t.alt);var n=at(t.height,e),i=0;if(t.totalheight.number>0&&(i=at(t.totalheight,e)-n,r.setAttribute("valign",se(-i))),r.setAttribute("height",se(n+i)),t.width.number>0){var s=at(t.width,e);r.setAttribute("width",se(s))}return r.setAttribute("src",t.src),r}});ce({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=Ie(e[0],"size");if(r.settings.strict){var s=n[1]==="m",a=i.value.unit==="mu";s?(a||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):a&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(t,e){return $.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var r=at(t.dimension,e);return new Q.SpaceNode(r)}});ce({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(t,e)=>{var r;t.alignment==="clap"?(r=$.makeSpan([],[$e(t.body,e)]),r=$.makeSpan(["inner"],[r],e)):r=$.makeSpan(["inner"],[$e(t.body,e)]);var n=$.makeSpan(["fix"],[]),i=$.makeSpan([t.alignment],[r,n],e),s=$.makeSpan(["strut"]);return s.style.height=se(i.height+i.depth),i.depth&&(s.style.verticalAlign=se(-i.depth)),i.children.unshift(s),i=$.makeSpan(["thinbox"],[i],e),$.makeSpan(["mord","vbox"],[i],e)},mathmlBuilder:(t,e)=>{var r=new Q.MathNode("mpadded",[Qe(t.body,e)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});ce({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,i=n.mode;n.switchMode("math");var s=r==="\\("?"\\)":"$",a=n.parseExpression(!1,s);return n.expect(s),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:a}}});ce({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new te("Mismatched "+t.funcName)}});var Ic=(t,e)=>{switch(e.style.size){case we.DISPLAY.size:return t.display;case we.TEXT.size:return t.text;case we.SCRIPT.size:return t.script;case we.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};ce({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:dt(e[0]),text:dt(e[1]),script:dt(e[2]),scriptscript:dt(e[3])}},htmlBuilder:(t,e)=>{var r=Ic(t,e),n=bt(r,e,!1);return $.makeFragment(n)},mathmlBuilder:(t,e)=>{var r=Ic(t,e);return on(r,e)}});var Fd=(t,e,r,n,i,s,a)=>{t=$.makeSpan([],[t]);var o=r&&ve.isCharacterBox(r),l,c;if(e){var u=$e(e,n.havingStyle(i.sup()),n);c={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-u.depth)}}if(r){var f=$e(r,n.havingStyle(i.sub()),n);l={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-f.height)}}var p;if(c&&l){var g=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+a;p=$.makeVList({positionType:"bottom",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:se(-s)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:se(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var v=t.height-a;p=$.makeVList({positionType:"top",positionData:v,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:se(-s)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},n)}else if(c){var x=t.depth+a;p=$.makeVList({positionType:"bottom",positionData:x,children:[{type:"elem",elem:t},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:se(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return t;var y=[p];if(l&&s!==0&&!o){var C=$.makeSpan(["mspace"],[],n);C.style.marginRight=se(s),y.unshift(C)}return $.makeSpan(["mop","op-limits"],y,n)},Bd=["\\smallint"],Zn=(t,e)=>{var r,n,i=!1,s;t.type==="supsub"?(r=t.sup,n=t.sub,s=Ie(t.base,"op"),i=!0):s=Ie(t,"op");var a=e.style,o=!1;a.size===we.DISPLAY.size&&s.symbol&&!ve.contains(Bd,s.name)&&(o=!0);var l;if(s.symbol){var c=o?"Size2-Regular":"Size1-Regular",u="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(u=s.name.slice(1),s.name=u==="oiint"?"\\iint":"\\iiint"),l=$.makeSymbol(s.name,c,"math",e,["mop","op-symbol",o?"large-op":"small-op"]),u.length>0){var f=l.italic,p=$.staticSvg(u+"Size"+(o?"2":"1"),e);l=$.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:p,shift:o?.08:0}]},e),s.name="\\"+u,l.classes.unshift("mop"),l.italic=f}}else if(s.body){var g=bt(s.body,e,!0);g.length===1&&g[0]instanceof ir?(l=g[0],l.classes[0]="mop"):l=$.makeSpan(["mop"],g,e)}else{for(var v=[],x=1;x{var r;if(t.symbol)r=new Kt("mo",[sr(t.name,t.mode)]),ve.contains(Bd,t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new Kt("mo",Ut(t.body,e));else{r=new Kt("mi",[new Sr(t.name.slice(1))]);var n=new Kt("mo",[sr("⁡","text")]);t.parentIsSupSub?r=new Kt("mrow",[r,n]):r=fd([r,n])}return r},J5={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ce({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=n;return i.length===1&&(i=J5[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Zn,mathmlBuilder:$0});ce({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:dt(n)}},htmlBuilder:Zn,mathmlBuilder:$0});var Z5={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ce({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Zn,mathmlBuilder:$0});ce({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Zn,mathmlBuilder:$0});ce({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t,n=r;return n.length===1&&(n=Z5[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Zn,mathmlBuilder:$0});var Pd=(t,e)=>{var r,n,i=!1,s;t.type==="supsub"?(r=t.sup,n=t.sub,s=Ie(t.base,"operatorname"),i=!0):s=Ie(t,"operatorname");var a;if(s.body.length>0){for(var o=s.body.map(f=>{var p=f.text;return typeof p=="string"?{type:"textord",mode:f.mode,text:p}:f}),l=bt(o,e.withFont("mathrm"),!0),c=0;c{for(var r=Ut(t.body,e.withFont("mathrm")),n=!0,i=0;iu.toText()).join("");r=[new Q.TextNode(o)]}var l=new Q.MathNode("mi",r);l.setAttribute("mathvariant","normal");var c=new Q.MathNode("mo",[sr("⁡","text")]);return t.parentIsSupSub?new Q.MathNode("mrow",[l,c]):Q.newDocumentFragment([l,c])};ce({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"operatorname",mode:r.mode,body:dt(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Pd,mathmlBuilder:Q5});b("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Cn({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?$.makeFragment(bt(t.body,e,!1)):$.makeSpan(["mord"],bt(t.body,e,!0),e)},mathmlBuilder(t,e){return on(t.body,e,!0)}});ce({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=$e(t.body,e.havingCrampedStyle()),n=$.makeLineSpan("overline-line",e),i=e.fontMetrics().defaultRuleThickness,s=$.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},e);return $.makeSpan(["mord","overline"],[s],e)},mathmlBuilder(t,e){var r=new Q.MathNode("mo",[new Q.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new Q.MathNode("mover",[Qe(t.body,e),r]);return n.setAttribute("accent","true"),n}});ce({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:dt(n)}},htmlBuilder:(t,e)=>{var r=bt(t.body,e.withPhantom(),!1);return $.makeFragment(r)},mathmlBuilder:(t,e)=>{var r=Ut(t.body,e);return new Q.MathNode("mphantom",r)}});ce({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=$.makeSpan([],[$e(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n{var r=Ut(dt(t.body),e),n=new Q.MathNode("mphantom",r),i=new Q.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});ce({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=$.makeSpan(["inner"],[$e(t.body,e.withPhantom())]),n=$.makeSpan(["fix"],[]);return $.makeSpan(["mord","rlap"],[r,n],e)},mathmlBuilder:(t,e)=>{var r=Ut(dt(t.body),e),n=new Q.MathNode("mphantom",r),i=new Q.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i}});ce({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=Ie(e[0],"size").value,i=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(t,e){var r=$e(t.body,e),n=at(t.dy,e);return $.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){var r=new Q.MathNode("mpadded",[Qe(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}});ce({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});ce({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,i=r[0],s=Ie(e[0],"size"),a=Ie(e[1],"size");return{type:"rule",mode:n.mode,shift:i&&Ie(i,"size").value,width:s.value,height:a.value}},htmlBuilder(t,e){var r=$.makeSpan(["mord","rule"],[],e),n=at(t.width,e),i=at(t.height,e),s=t.shift?at(t.shift,e):0;return r.style.borderRightWidth=se(n),r.style.borderTopWidth=se(i),r.style.bottom=se(s),r.width=n,r.height=i+s,r.depth=-s,r.maxFontSize=i*1.125*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=at(t.width,e),n=at(t.height,e),i=t.shift?at(t.shift,e):0,s=e.color&&e.getColor()||"black",a=new Q.MathNode("mspace");a.setAttribute("mathbackground",s),a.setAttribute("width",se(r)),a.setAttribute("height",se(n));var o=new Q.MathNode("mpadded",[a]);return i>=0?o.setAttribute("height",se(i)):(o.setAttribute("height",se(i)),o.setAttribute("depth",se(-i))),o.setAttribute("voffset",se(i)),o}});function Hd(t,e,r){for(var n=bt(t,e,!1),i=e.sizeMultiplier/r.sizeMultiplier,s=0;s{var r=e.havingSize(t.size);return Hd(t.body,r,e)};ce({type:"sizing",names:Dc,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:r,funcName:n,parser:i}=t,s=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:Dc.indexOf(n)+1,body:s}},htmlBuilder:e7,mathmlBuilder:(t,e)=>{var r=e.havingSize(t.size),n=Ut(t.body,r),i=new Q.MathNode("mstyle",n);return i.setAttribute("mathsize",se(r.sizeMultiplier)),i}});ce({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,r)=>{var{parser:n}=t,i=!1,s=!1,a=r[0]&&Ie(r[0],"ordgroup");if(a)for(var o="",l=0;l{var r=$.makeSpan([],[$e(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n{var r=new Q.MathNode("mpadded",[Qe(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r}});ce({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,i=r[0],s=e[0];return{type:"sqrt",mode:n.mode,body:s,index:i}},htmlBuilder(t,e){var r=$e(t.body,e.havingCrampedStyle());r.height===0&&(r.height=e.fontMetrics().xHeight),r=$.wrapFragment(r,e);var n=e.fontMetrics(),i=n.defaultRuleThickness,s=i;e.style.idr.height+r.depth+a&&(a=(a+f-r.height-r.depth)/2);var p=l.height-r.height-a-c;r.style.paddingLeft=se(u);var g=$.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+p)},{type:"elem",elem:l},{type:"kern",size:c}]},e);if(t.index){var v=e.havingStyle(we.SCRIPTSCRIPT),x=$e(t.index,v,e),y=.6*(g.height-g.depth),C=$.makeVList({positionType:"shift",positionData:-y,children:[{type:"elem",elem:x}]},e),w=$.makeSpan(["root"],[C]);return $.makeSpan(["mord","sqrt"],[w,g],e)}else return $.makeSpan(["mord","sqrt"],[g],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new Q.MathNode("mroot",[Qe(r,e),Qe(n,e)]):new Q.MathNode("msqrt",[Qe(r,e)])}});var Rc={display:we.DISPLAY,text:we.TEXT,script:we.SCRIPT,scriptscript:we.SCRIPTSCRIPT};ce({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:i}=t,s=i.parseExpression(!0,r),a=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:a,body:s}},htmlBuilder(t,e){var r=Rc[t.style],n=e.havingStyle(r).withFont("");return Hd(t.body,n,e)},mathmlBuilder(t,e){var r=Rc[t.style],n=e.havingStyle(r),i=Ut(t.body,n),s=new Q.MathNode("mstyle",i),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=a[t.style];return s.setAttribute("scriptlevel",o[0]),s.setAttribute("displaystyle",o[1]),s}});var t7=function(e,r){var n=e.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===we.DISPLAY.size||n.alwaysHandleSupSub);return i?Zn:null}else if(n.type==="operatorname"){var s=n.alwaysHandleSupSub&&(r.style.size===we.DISPLAY.size||n.limits);return s?Pd:null}else{if(n.type==="accent")return ve.isCharacterBox(n.base)?_o:null;if(n.type==="horizBrace"){var a=!e.sub;return a===n.isOver?$d:null}else return null}else return null};Cn({type:"supsub",htmlBuilder(t,e){var r=t7(t,e);if(r)return r(t,e);var{base:n,sup:i,sub:s}=t,a=$e(n,e),o,l,c=e.fontMetrics(),u=0,f=0,p=n&&ve.isCharacterBox(n);if(i){var g=e.havingStyle(e.style.sup());o=$e(i,g,e),p||(u=a.height-g.fontMetrics().supDrop*g.sizeMultiplier/e.sizeMultiplier)}if(s){var v=e.havingStyle(e.style.sub());l=$e(s,v,e),p||(f=a.depth+v.fontMetrics().subDrop*v.sizeMultiplier/e.sizeMultiplier)}var x;e.style===we.DISPLAY?x=c.sup1:e.style.cramped?x=c.sup3:x=c.sup2;var y=e.sizeMultiplier,C=se(.5/c.ptPerEm/y),w=null;if(l){var k=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(a instanceof ir||k)&&(w=se(-a.italic))}var I;if(o&&l){u=Math.max(u,x,o.depth+.25*c.xHeight),f=Math.max(f,c.sub2);var R=c.defaultRuleThickness,_=4*R;if(u-o.depth-(l.height-f)<_){f=_-(u-o.depth)+l.height;var F=.8*c.xHeight-(u-o.depth);F>0&&(u+=F,f-=F)}var V=[{type:"elem",elem:l,shift:f,marginRight:C,marginLeft:w},{type:"elem",elem:o,shift:-u,marginRight:C}];I=$.makeVList({positionType:"individualShift",children:V},e)}else if(l){f=Math.max(f,c.sub1,l.height-.8*c.xHeight);var q=[{type:"elem",elem:l,marginLeft:w,marginRight:C}];I=$.makeVList({positionType:"shift",positionData:f,children:q},e)}else if(o)u=Math.max(u,x,o.depth+.25*c.xHeight),I=$.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:o,marginRight:C}]},e);else throw new Error("supsub must have either sup or sub.");var le=Na(a,"right")||"mord";return $.makeSpan([le],[a,$.makeSpan(["msupsub"],[I])],e)},mathmlBuilder(t,e){var r=!1,n,i;t.base&&t.base.type==="horizBrace"&&(i=!!t.sup,i===t.base.isOver&&(r=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var s=[Qe(t.base,e)];t.sub&&s.push(Qe(t.sub,e)),t.sup&&s.push(Qe(t.sup,e));var a;if(r)a=n?"mover":"munder";else if(t.sub)if(t.sup){var c=t.base;c&&c.type==="op"&&c.limits&&e.style===we.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(e.style===we.DISPLAY||c.limits)?a="munderover":a="msubsup"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===we.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===we.DISPLAY)?a="munder":a="msub"}else{var o=t.base;o&&o.type==="op"&&o.limits&&(e.style===we.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||e.style===we.DISPLAY)?a="mover":a="msup"}return new Q.MathNode(a,s)}});Cn({type:"atom",htmlBuilder(t,e){return $.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new Q.MathNode("mo",[sr(t.text,t.mode)]);if(t.family==="bin"){var n=Ro(t,e);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else t.family==="punct"?r.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&r.setAttribute("stretchy","false");return r}});var qd={mi:"italic",mn:"normal",mtext:"normal"};Cn({type:"mathord",htmlBuilder(t,e){return $.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var r=new Q.MathNode("mi",[sr(t.text,t.mode,e)]),n=Ro(t,e)||"italic";return n!==qd[r.type]&&r.setAttribute("mathvariant",n),r}});Cn({type:"textord",htmlBuilder(t,e){return $.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var r=sr(t.text,t.mode,e),n=Ro(t,e)||"normal",i;return t.mode==="text"?i=new Q.MathNode("mtext",[r]):/[0-9]/.test(t.text)?i=new Q.MathNode("mn",[r]):t.text==="\\prime"?i=new Q.MathNode("mo",[r]):i=new Q.MathNode("mi",[r]),n!==qd[i.type]&&i.setAttribute("mathvariant",n),i}});var Ys={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Xs={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Cn({type:"spacing",htmlBuilder(t,e){if(Xs.hasOwnProperty(t.text)){var r=Xs[t.text].className||"";if(t.mode==="text"){var n=$.makeOrd(t,e,"textord");return n.classes.push(r),n}else return $.makeSpan(["mspace",r],[$.mathsym(t.text,t.mode,e)],e)}else{if(Ys.hasOwnProperty(t.text))return $.makeSpan(["mspace",Ys[t.text]],[],e);throw new te('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var r;if(Xs.hasOwnProperty(t.text))r=new Q.MathNode("mtext",[new Q.TextNode(" ")]);else{if(Ys.hasOwnProperty(t.text))return new Q.MathNode("mspace");throw new te('Unknown type of space "'+t.text+'"')}return r}});var Oc=()=>{var t=new Q.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};Cn({type:"tag",mathmlBuilder(t,e){var r=new Q.MathNode("mtable",[new Q.MathNode("mtr",[Oc(),new Q.MathNode("mtd",[on(t.body,e)]),Oc(),new Q.MathNode("mtd",[on(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});var _c={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Lc={"\\textbf":"textbf","\\textmd":"textmd"},r7={"\\textit":"textit","\\textup":"textup"},zc=(t,e)=>{var r=t.font;if(r){if(_c[r])return e.withTextFontFamily(_c[r]);if(Lc[r])return e.withTextFontWeight(Lc[r]);if(r==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(r7[r])};ce({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"text",mode:r.mode,body:dt(i),font:n}},htmlBuilder(t,e){var r=zc(t,e),n=bt(t.body,r,!0);return $.makeSpan(["mord","text"],n,r)},mathmlBuilder(t,e){var r=zc(t,e);return on(t.body,r)}});ce({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=$e(t.body,e),n=$.makeLineSpan("underline-line",e),i=e.fontMetrics().defaultRuleThickness,s=$.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]},e);return $.makeSpan(["mord","underline"],[s],e)},mathmlBuilder(t,e){var r=new Q.MathNode("mo",[new Q.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new Q.MathNode("munder",[Qe(t.body,e),r]);return n.setAttribute("accentunder","true"),n}});ce({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=$e(t.body,e),n=e.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return $.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return new Q.MathNode("mpadded",[Qe(t.body,e)],["vcenter"])}});ce({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new te("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=$c(t),n=[],i=e.havingStyle(e.style.text()),s=0;st.body.replace(/ /g,t.star?"␣":" "),Qr=dd,jd=`[ \r + ]`,n7="\\\\[a-zA-Z@]+",i7="\\\\[^\uD800-\uDFFF]",s7="("+n7+")"+jd+"*",a7=`\\\\( +|[ \r ]+ +?)[ \r ]*`,Oa="[̀-ͯ]",o7=new RegExp(Oa+"+$"),l7="("+jd+"+)|"+(a7+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(Oa+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Oa+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+s7)+("|"+i7+")");class Fc{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(l7,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new nr("EOF",new Wt(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new te("Unexpected character: '"+e[r]+"'",new nr(e[r],new Wt(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var s=e.indexOf(` +`,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new nr(i,new Wt(this,r,this.tokenRegex.lastIndex))}}class c7{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new te("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}}var u7=Rd;b("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});b("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});b("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});b("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});b("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});b("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");b("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var Bc={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};b("\\char",function(t){var e=t.popToken(),r,n="";if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new te("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=Bc[e.text],n==null||n>=r)throw new te("Invalid base-"+r+" digit "+e.text);for(var i;(i=Bc[t.future().text])!=null&&i{var i=t.consumeArg().tokens;if(i.length!==1)throw new te("\\newcommand's first argument must be a macro name");var s=i[0].text,a=t.isDefined(s);if(a&&!e)throw new te("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!a&&!r)throw new te("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var o=0;if(i=t.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var l="",c=t.expandNextToken();c.text!=="]"&&c.text!=="EOF";)l+=c.text,c=t.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new te("Invalid number of arguments: "+l);o=parseInt(l),i=t.consumeArg().tokens}return a&&n||t.macros.set(s,{tokens:i,numArgs:o}),""};b("\\newcommand",t=>qo(t,!1,!0,!1));b("\\renewcommand",t=>qo(t,!0,!1,!1));b("\\providecommand",t=>qo(t,!0,!0,!0));b("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});b("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});b("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Qr[r],tt.math[r],tt.text[r]),""});b("\\bgroup","{");b("\\egroup","}");b("~","\\nobreakspace");b("\\lq","`");b("\\rq","'");b("\\aa","\\r a");b("\\AA","\\r A");b("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");b("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");b("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");b("ℬ","\\mathscr{B}");b("ℰ","\\mathscr{E}");b("ℱ","\\mathscr{F}");b("ℋ","\\mathscr{H}");b("ℐ","\\mathscr{I}");b("ℒ","\\mathscr{L}");b("ℳ","\\mathscr{M}");b("ℛ","\\mathscr{R}");b("ℭ","\\mathfrak{C}");b("ℌ","\\mathfrak{H}");b("ℨ","\\mathfrak{Z}");b("\\Bbbk","\\Bbb{k}");b("·","\\cdotp");b("\\llap","\\mathllap{\\textrm{#1}}");b("\\rlap","\\mathrlap{\\textrm{#1}}");b("\\clap","\\mathclap{\\textrm{#1}}");b("\\mathstrut","\\vphantom{(}");b("\\underbar","\\underline{\\text{#1}}");b("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');b("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");b("\\ne","\\neq");b("≠","\\neq");b("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");b("∉","\\notin");b("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");b("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");b("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");b("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");b("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");b("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");b("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");b("⟂","\\perp");b("‼","\\mathclose{!\\mkern-0.8mu!}");b("∌","\\notni");b("⌜","\\ulcorner");b("⌝","\\urcorner");b("⌞","\\llcorner");b("⌟","\\lrcorner");b("©","\\copyright");b("®","\\textregistered");b("️","\\textregistered");b("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');b("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');b("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');b("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');b("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");b("⋮","\\vdots");b("\\varGamma","\\mathit{\\Gamma}");b("\\varDelta","\\mathit{\\Delta}");b("\\varTheta","\\mathit{\\Theta}");b("\\varLambda","\\mathit{\\Lambda}");b("\\varXi","\\mathit{\\Xi}");b("\\varPi","\\mathit{\\Pi}");b("\\varSigma","\\mathit{\\Sigma}");b("\\varUpsilon","\\mathit{\\Upsilon}");b("\\varPhi","\\mathit{\\Phi}");b("\\varPsi","\\mathit{\\Psi}");b("\\varOmega","\\mathit{\\Omega}");b("\\substack","\\begin{subarray}{c}#1\\end{subarray}");b("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");b("\\boxed","\\fbox{$\\displaystyle{#1}$}");b("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");b("\\implies","\\DOTSB\\;\\Longrightarrow\\;");b("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");b("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");b("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Pc={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};b("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in Pc?e=Pc[r]:(r.slice(0,4)==="\\not"||r in tt.math&&ve.contains(["bin","rel"],tt.math[r].group))&&(e="\\dotsb"),e});var jo={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};b("\\dotso",function(t){var e=t.future().text;return e in jo?"\\ldots\\,":"\\ldots"});b("\\dotsc",function(t){var e=t.future().text;return e in jo&&e!==","?"\\ldots\\,":"\\ldots"});b("\\cdots",function(t){var e=t.future().text;return e in jo?"\\@cdots\\,":"\\@cdots"});b("\\dotsb","\\cdots");b("\\dotsm","\\cdots");b("\\dotsi","\\!\\cdots");b("\\dotsx","\\ldots\\,");b("\\DOTSI","\\relax");b("\\DOTSB","\\relax");b("\\DOTSX","\\relax");b("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");b("\\,","\\tmspace+{3mu}{.1667em}");b("\\thinspace","\\,");b("\\>","\\mskip{4mu}");b("\\:","\\tmspace+{4mu}{.2222em}");b("\\medspace","\\:");b("\\;","\\tmspace+{5mu}{.2777em}");b("\\thickspace","\\;");b("\\!","\\tmspace-{3mu}{.1667em}");b("\\negthinspace","\\!");b("\\negmedspace","\\tmspace-{4mu}{.2222em}");b("\\negthickspace","\\tmspace-{5mu}{.277em}");b("\\enspace","\\kern.5em ");b("\\enskip","\\hskip.5em\\relax");b("\\quad","\\hskip1em\\relax");b("\\qquad","\\hskip2em\\relax");b("\\tag","\\@ifstar\\tag@literal\\tag@paren");b("\\tag@paren","\\tag@literal{({#1})}");b("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new te("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});b("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");b("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");b("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");b("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");b("\\newline","\\\\\\relax");b("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Ud=se(kr["Main-Regular"]["T".charCodeAt(0)][1]-.7*kr["Main-Regular"]["A".charCodeAt(0)][1]);b("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Ud+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");b("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Ud+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");b("\\hspace","\\@ifstar\\@hspacer\\@hspace");b("\\@hspace","\\hskip #1\\relax");b("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");b("\\ordinarycolon",":");b("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");b("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');b("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');b("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');b("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');b("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');b("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');b("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');b("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');b("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');b("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');b("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');b("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');b("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');b("∷","\\dblcolon");b("∹","\\eqcolon");b("≔","\\coloneqq");b("≕","\\eqqcolon");b("⩴","\\Coloneqq");b("\\ratio","\\vcentcolon");b("\\coloncolon","\\dblcolon");b("\\colonequals","\\coloneqq");b("\\coloncolonequals","\\Coloneqq");b("\\equalscolon","\\eqqcolon");b("\\equalscoloncolon","\\Eqqcolon");b("\\colonminus","\\coloneq");b("\\coloncolonminus","\\Coloneq");b("\\minuscolon","\\eqcolon");b("\\minuscoloncolon","\\Eqcolon");b("\\coloncolonapprox","\\Colonapprox");b("\\coloncolonsim","\\Colonsim");b("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");b("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");b("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");b("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");b("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");b("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");b("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");b("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");b("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");b("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");b("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");b("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");b("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");b("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");b("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");b("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");b("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");b("\\nleqq","\\html@mathml{\\@nleqq}{≰}");b("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");b("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");b("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");b("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");b("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");b("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");b("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");b("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");b("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");b("\\imath","\\html@mathml{\\@imath}{ı}");b("\\jmath","\\html@mathml{\\@jmath}{ȷ}");b("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");b("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");b("⟦","\\llbracket");b("⟧","\\rrbracket");b("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");b("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");b("⦃","\\lBrace");b("⦄","\\rBrace");b("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");b("⦵","\\minuso");b("\\darr","\\downarrow");b("\\dArr","\\Downarrow");b("\\Darr","\\Downarrow");b("\\lang","\\langle");b("\\rang","\\rangle");b("\\uarr","\\uparrow");b("\\uArr","\\Uparrow");b("\\Uarr","\\Uparrow");b("\\N","\\mathbb{N}");b("\\R","\\mathbb{R}");b("\\Z","\\mathbb{Z}");b("\\alef","\\aleph");b("\\alefsym","\\aleph");b("\\Alpha","\\mathrm{A}");b("\\Beta","\\mathrm{B}");b("\\bull","\\bullet");b("\\Chi","\\mathrm{X}");b("\\clubs","\\clubsuit");b("\\cnums","\\mathbb{C}");b("\\Complex","\\mathbb{C}");b("\\Dagger","\\ddagger");b("\\diamonds","\\diamondsuit");b("\\empty","\\emptyset");b("\\Epsilon","\\mathrm{E}");b("\\Eta","\\mathrm{H}");b("\\exist","\\exists");b("\\harr","\\leftrightarrow");b("\\hArr","\\Leftrightarrow");b("\\Harr","\\Leftrightarrow");b("\\hearts","\\heartsuit");b("\\image","\\Im");b("\\infin","\\infty");b("\\Iota","\\mathrm{I}");b("\\isin","\\in");b("\\Kappa","\\mathrm{K}");b("\\larr","\\leftarrow");b("\\lArr","\\Leftarrow");b("\\Larr","\\Leftarrow");b("\\lrarr","\\leftrightarrow");b("\\lrArr","\\Leftrightarrow");b("\\Lrarr","\\Leftrightarrow");b("\\Mu","\\mathrm{M}");b("\\natnums","\\mathbb{N}");b("\\Nu","\\mathrm{N}");b("\\Omicron","\\mathrm{O}");b("\\plusmn","\\pm");b("\\rarr","\\rightarrow");b("\\rArr","\\Rightarrow");b("\\Rarr","\\Rightarrow");b("\\real","\\Re");b("\\reals","\\mathbb{R}");b("\\Reals","\\mathbb{R}");b("\\Rho","\\mathrm{P}");b("\\sdot","\\cdot");b("\\sect","\\S");b("\\spades","\\spadesuit");b("\\sub","\\subset");b("\\sube","\\subseteq");b("\\supe","\\supseteq");b("\\Tau","\\mathrm{T}");b("\\thetasym","\\vartheta");b("\\weierp","\\wp");b("\\Zeta","\\mathrm{Z}");b("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");b("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");b("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");b("\\bra","\\mathinner{\\langle{#1}|}");b("\\ket","\\mathinner{|{#1}\\rangle}");b("\\braket","\\mathinner{\\langle{#1}\\rangle}");b("\\Bra","\\left\\langle#1\\right|");b("\\Ket","\\left|#1\\right\\rangle");var Vd=t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,s=e.consumeArg().tokens,a=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var l=f=>p=>{t&&(p.macros.set("|",a),i.length&&p.macros.set("\\|",o));var g=f;if(!f&&i.length){var v=p.future();v.text==="|"&&(p.popToken(),g=!0)}return{tokens:g?i:n,numArgs:0}};e.macros.set("|",l(!1)),i.length&&e.macros.set("\\|",l(!0));var c=e.consumeArg().tokens,u=e.expandTokens([...s,...c,...r]);return e.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};b("\\bra@ket",Vd(!1));b("\\bra@set",Vd(!0));b("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");b("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");b("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");b("\\angln","{\\angl n}");b("\\blue","\\textcolor{##6495ed}{#1}");b("\\orange","\\textcolor{##ffa500}{#1}");b("\\pink","\\textcolor{##ff00af}{#1}");b("\\red","\\textcolor{##df0030}{#1}");b("\\green","\\textcolor{##28ae7b}{#1}");b("\\gray","\\textcolor{gray}{#1}");b("\\purple","\\textcolor{##9d38bd}{#1}");b("\\blueA","\\textcolor{##ccfaff}{#1}");b("\\blueB","\\textcolor{##80f6ff}{#1}");b("\\blueC","\\textcolor{##63d9ea}{#1}");b("\\blueD","\\textcolor{##11accd}{#1}");b("\\blueE","\\textcolor{##0c7f99}{#1}");b("\\tealA","\\textcolor{##94fff5}{#1}");b("\\tealB","\\textcolor{##26edd5}{#1}");b("\\tealC","\\textcolor{##01d1c1}{#1}");b("\\tealD","\\textcolor{##01a995}{#1}");b("\\tealE","\\textcolor{##208170}{#1}");b("\\greenA","\\textcolor{##b6ffb0}{#1}");b("\\greenB","\\textcolor{##8af281}{#1}");b("\\greenC","\\textcolor{##74cf70}{#1}");b("\\greenD","\\textcolor{##1fab54}{#1}");b("\\greenE","\\textcolor{##0d923f}{#1}");b("\\goldA","\\textcolor{##ffd0a9}{#1}");b("\\goldB","\\textcolor{##ffbb71}{#1}");b("\\goldC","\\textcolor{##ff9c39}{#1}");b("\\goldD","\\textcolor{##e07d10}{#1}");b("\\goldE","\\textcolor{##a75a05}{#1}");b("\\redA","\\textcolor{##fca9a9}{#1}");b("\\redB","\\textcolor{##ff8482}{#1}");b("\\redC","\\textcolor{##f9685d}{#1}");b("\\redD","\\textcolor{##e84d39}{#1}");b("\\redE","\\textcolor{##bc2612}{#1}");b("\\maroonA","\\textcolor{##ffbde0}{#1}");b("\\maroonB","\\textcolor{##ff92c6}{#1}");b("\\maroonC","\\textcolor{##ed5fa6}{#1}");b("\\maroonD","\\textcolor{##ca337c}{#1}");b("\\maroonE","\\textcolor{##9e034e}{#1}");b("\\purpleA","\\textcolor{##ddd7ff}{#1}");b("\\purpleB","\\textcolor{##c6b9fc}{#1}");b("\\purpleC","\\textcolor{##aa87ff}{#1}");b("\\purpleD","\\textcolor{##7854ab}{#1}");b("\\purpleE","\\textcolor{##543b78}{#1}");b("\\mintA","\\textcolor{##f5f9e8}{#1}");b("\\mintB","\\textcolor{##edf2df}{#1}");b("\\mintC","\\textcolor{##e0e5cc}{#1}");b("\\grayA","\\textcolor{##f6f7f7}{#1}");b("\\grayB","\\textcolor{##f0f1f2}{#1}");b("\\grayC","\\textcolor{##e3e5e6}{#1}");b("\\grayD","\\textcolor{##d6d8da}{#1}");b("\\grayE","\\textcolor{##babec2}{#1}");b("\\grayF","\\textcolor{##888d93}{#1}");b("\\grayG","\\textcolor{##626569}{#1}");b("\\grayH","\\textcolor{##3b3e40}{#1}");b("\\grayI","\\textcolor{##21242c}{#1}");b("\\kaBlue","\\textcolor{##314453}{#1}");b("\\kaGreen","\\textcolor{##71B307}{#1}");var Wd={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class d7{constructor(e,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(e),this.macros=new c7(u7,r.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Fc(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var r,n,i;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new nr("EOF",n.loc)),this.pushTokens(i),r.range(n,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var r=[],n=e&&e.length>0;n||this.consumeSpaces();var i=this.future(),s,a=0,o=0;do{if(s=this.popToken(),r.push(s),s.text==="{")++a;else if(s.text==="}"){if(--a,a===-1)throw new te("Extra }",s)}else if(s.text==="EOF")throw new te("Unexpected end of input in a macro argument, expected '"+(e&&n?e[o]:"}")+"'",s);if(e&&n)if((a===0||a===1&&e[o]==="{")&&s.text===e[o]){if(++o,o===e.length){r.splice(-o,o);break}}else o=0}while(a!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:s}}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new te("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;ithis.settings.maxExpand)throw new te("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||e&&i.unexpandable){if(e&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new te("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var s=i.tokens,a=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){s=s.slice();for(var o=s.length-1;o>=0;--o){var l=s[o];if(l.text==="#"){if(o===0)throw new te("Incomplete placeholder at end of macro body",l);if(l=s[--o],l.text==="#")s.splice(o+1,1);else if(/^[1-9]$/.test(l.text))s.splice(o,2,...a[+l.text-1]);else throw new te("Not a valid argument number",l)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new nr(e)]):void 0}expandTokens(e){var r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(e){var r=this.expandMacro(e);return r&&r.map(n=>n.text).join("")}_getExpansion(e){var r=this.macros.get(e);if(r==null)return r;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var s=0;if(i.indexOf("#")!==-1)for(var a=i.replace(/##/g,"");a.indexOf("#"+(s+1))!==-1;)++s;for(var o=new Fc(i,this.settings),l=[],c=o.lex();c.text!=="EOF";)l.push(c),c=o.lex();l.reverse();var u={tokens:l,numArgs:s};return u}return i}isDefined(e){return this.macros.has(e)||Qr.hasOwnProperty(e)||tt.math.hasOwnProperty(e)||tt.text.hasOwnProperty(e)||Wd.hasOwnProperty(e)}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Qr.hasOwnProperty(e)&&!Qr[e].primitive}}var Hc=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,oi=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Js={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},qc={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class ys{constructor(e,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new d7(e,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(e,r){if(r===void 0&&(r=!0),this.fetch().text!==e)throw new te("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var r=this.nextToken;this.consume(),this.gullet.pushToken(new nr("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(e,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(ys.endOfExpression.indexOf(i.text)!==-1||r&&i.text===r||e&&Qr[i.text]&&Qr[i.text].infix)break;var s=this.parseAtom(r);if(s){if(s.type==="internal")continue}else break;n.push(s)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var r=-1,n,i=0;i=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var o=tt[this.mode][r].group,l=Wt.range(e),c;if(Q6.hasOwnProperty(o)){var u=o;c={type:"atom",mode:this.mode,family:u,loc:l,text:r}}else c={type:o,mode:this.mode,loc:l,text:r};a=c}else if(r.charCodeAt(0)>=128)this.settings.strict&&(td(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),a={type:"textord",mode:"text",loc:Wt.range(e),text:r};else return null;if(this.consume(),s)for(var f=0;f|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var r=t.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};const v7=new qe.Renderer;qe.setOptions({breaks:!1,gfm:!0,tables:!0,sanitize:!1,renderer:v7});const C0=t=>{if(!t||typeof t!="string")return"";try{const e=b7(t),r=qe.parse(e);return y7(r)}catch(e){return console.error("Markdown渲染失败:",e),`
    渲染失败: ${e.message}
    `}},b7=t=>t.replace(/\$\$([\s\S]*?)\$\$/g,(e,r)=>{try{return`
    ${jc.renderToString(r.trim(),{displayMode:!0,throwOnError:!1})}
    `}catch(n){return console.warn("数学公式渲染失败:",n),`
    数学公式错误: ${r}
    `}}).replace(/\$([^$\n]+?)\$/g,(e,r)=>{if(r.includes("\\")||r.includes("{")||r.includes("}")||r.includes("^")||r.includes("_")||r.includes("=")||r.includes("+")||r.includes("-")||r.includes("*")||r.includes("/")||r.includes("(")||r.includes(")"))try{return`${jc.renderToString(r.trim(),{displayMode:!1,throwOnError:!1})}`}catch(n){return console.warn("数学公式渲染失败:",n),`数学公式错误: ${r}`}return e}),y7=t=>{let e=t.replace(//g,'
    ').replace(/
    {const s=i.className.match(/language-(\w+)/);if(s)try{i.innerHTML=lc.highlight(i.textContent,lc.languages[s[1]],s[1])}catch(a){console.warn("语法高亮失败:",a)}}),r.innerHTML},w7=t=>{if(!t||typeof t!="string")return!1;const e=t.split(`
    +`);let r=!1,n=!1;for(const a of e){const o=a.trim();o.includes("|")&&o.split("|").length>=3&&(r=!0),o.includes("|")&&o.includes("-")&&/^[\s\|\-\:]+$/.test(o)&&(n=!0)}const i=(t.match(/\|/g)||[]).length,s=i>=6;return r&&n||r&&s||r&&i>=4},x7=t=>!t||typeof t!="string"?!1:w7(t)?!0:[/#{1,6}\s+/,/\*\*.*?\*\*/,/\*.*?\*/,/`.*?`/,/```[\s\S]*?```/,/^\s*[-*+]\s+/m,/^\s*\d+\.\s+/m,/\[.*?\]\(.*?\)/,/!\[.*?\]\(.*?\)/,/\$\$.*?\$\$/,/\$.*?\$/].some(r=>r.test(t)),li=t=>!t||typeof t!="string"?t||"":x7(t)||t.includes("|")?C0(t):t;const Wo=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r},k7={class:"mindmap-container"},S7={key:0,class:"welcome-page"},T7={class:"ai-input-content"},E7=["disabled","onKeydown"],A7={class:"ai-input-actions"},C7=["disabled"],M7=["disabled"],N7={key:0},I7={key:1},D7={key:3,class:"save-controls"},R7={class:"image-preview-header"},O7={class:"image-preview-title"},_7={class:"image-preview-body"},L7={key:0,class:"image-preview-loading"},z7={key:1,class:"image-preview-error"},$7=["src","alt"],F7={__name:"MindMap",setup(t,{expose:e}){const r={name:"Light Purple",type:"light",palette:["#660874","#660874","#660874","#660874","#660874","#660874","#660874","#660874","#660874","#660874"],cssVar:{"--node-gap-x":"30px","--node-gap-y":"10px","--main-gap-x":"65px","--main-gap-y":"45px","--root-radius":"30px","--main-radius":"20px","--root-color":"#ffffff","--root-bgcolor":"#660874","--root-border-color":"rgba(0, 0, 0, 0)","--main-color":"#444446","--main-bgcolor":"#ffffff","--topic-padding":"3px","--color":"#777777","--bgcolor":"#f6f6f6","--selected":"#660874","--accent-color":"#660874","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea","--map-padding":"50px"}},n=Re(null),i=Re(null),s=Re(null),a=Re({}),o=Re({}),l=Re(null),c=Re(1),u=Re(!0),f=Re(!1),p=Re(!1),g=Re(null),v=Re(""),x=Re(!1);Re(new Map),Re(!1),Re({x:0,y:0}),Re(null);const y=Re(!1),C=Re(""),w=Re(""),k=Re(!1),I=Re(""),R=()=>{u.value=!0,n.value&&(n.value.innerHTML=""),i.value&&(i.value=null)},_=()=>{u.value=!1},F=()=>{u.value=!1},V=(T,N="")=>{console.log("🖼️ 打开图片预览:",{imageUrl:T,altText:N});let O=T;typeof T=="string"&&(T.startsWith("/")||T.startsWith("./")||T.startsWith("../")?O=new URL(T,window.location.origin).href:(T.startsWith("data:image/")||T.startsWith("http://")||T.startsWith("https://"))&&(O=T)),console.log("🖼️ 处理后的图片URL:",O),y.value=!0,w.value=N||"图片预览",k.value=!0,I.value="",Le();const W=new Image;W.onload=()=>{console.log("✅ 图片预加载成功"),C.value=O,k.value=!1,Ge()},W.onerror=()=>{console.error("❌ 图片预加载失败:",O),Ge(),k.value=!1,I.value=`图片加载失败: ${O}`},W.src=O},q=()=>{Ge(),y.value=!1,C.value="",w.value="",k.value=!1,I.value=""},le=()=>{console.log("✅ 模态框图片加载成功")},me=T=>{console.error("❌ 模态框图片加载失败:",T),console.error("❌ 失败的图片URL:",C.value),k.value=!1,I.value=`图片显示失败: ${C.value}`},Se=()=>{console.log("🔄 重试加载图片"),k.value=!0,I.value="",Le()};let ze=null;const Le=()=>{ze&&clearTimeout(ze),ze=setTimeout(()=>{k.value&&(console.warn("⚠️ 图片加载超时"),k.value=!1,I.value="图片加载超时,请检查网络连接或图片URL是否正确")},1e4)},Ge=()=>{ze&&(clearTimeout(ze),ze=null)},Oe=()=>{if(!i.value||!n.value)return null;try{const T=n.value.querySelector(".map-canvas");if(T){const N=T.style.transform,O=i.value.scaleVal||1;return console.log("📍 保存位置:",{transform:N,scaleVal:O}),{transform:N,scaleVal:O}}}catch(T){console.warn("保存位置失败:",T)}return null},xe=T=>{if(!(!T||!n.value||!i.value))try{const N=n.value.querySelector(".map-canvas");N&&T.transform&&(N.style.setProperty("transform",T.transform,"important"),T.scaleVal&&i.value.scaleVal!==T.scaleVal&&(i.value.scaleVal=T.scaleVal),N.style.setProperty("transform-origin","center center","important"),console.log("📍 恢复位置:",{transform:T.transform,scaleVal:T.scaleVal}))}catch(N){console.warn("恢复位置失败:",N)}},fe=async(T,N=!1,O=!0)=>{try{const W=N?Oe():null;W?console.log("📍 保存当前位置用于保持原位:",W):!N&&!O&&console.log("📍 添加节点模式:不保存位置,等待居中到新节点"),console.log("🔍 loadMindmapData 被调用,数据:",T),console.log("🔍 数据字段:",Object.keys(T||{})),T&&T.id?(l.value=T.id,console.log("🔍 设置当前思维导图ID (data.id):",T.id)):T&&T.mindmapId?(l.value=T.mindmapId,console.log("🔍 设置当前思维导图ID (data.mindmapId):",T.mindmapId)):T&&T.nodeData&&T.nodeData.mindmapId?(l.value=T.nodeData.mindmapId,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmapId):",T.nodeData.mindmapId)):T&&T.nodeData&&T.nodeData.mindmap_id?(l.value=T.nodeData.mindmap_id,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmap_id):",T.nodeData.mindmap_id)):(console.warn("⚠️ 数据中没有找到 id 或 mindmapId 字段"),console.log("🔍 可用的字段:",Object.keys(T||{})),T&&T.nodeData&&console.log("🔍 nodeData字段:",Object.keys(T.nodeData||{}))),console.log("🔍 设置后的 currentMindmapId.value:",l.value),_(),await _n(),n.value||(console.warn("⚠️ 思维导图容器未准备好,等待DOM更新..."),await new Promise(ie=>setTimeout(ie,100)),n.value||console.warn("⚠️ 思维导图容器仍未准备好,尝试继续执行..."));try{if(n.value){console.log("🔍 创建Mind Elixir实例,设置markdown函数"),i.value=new kt({el:n.value,direction:kt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,theme:r,markdown:(L,de)=>L.includes("|")||L.includes("**")||L.includes("`")||L.includes("#")||L.includes("![")?li(L):L,imageProxy:L=>L.startsWith("http://")||L.startsWith("https://")?L:L.startsWith("/")?window.location.origin+L:window.location.origin+"/"+L}),console.log("✅ Mind Elixir实例创建完成,markdown函数已设置"),console.log("🔍 初始化Mind Elixir数据:",T);const ie=i.value.init(T);console.log("✅ Mind Elixir实例创建成功,初始化结果:",ie),W?(xe(W),console.log("📍 初始化后立即恢复位置")):!N&&!O&&console.log("📍 跳过根节点居中,等待居中新节点"),(async()=>{try{await _n(),await document.fonts.ready,await new Promise(L=>requestAnimationFrame(L)),i.value&&i.value.refresh&&(console.log("🔄 执行完整DOM稳定后的延迟刷新"),i.value.refresh(),!W&&(N||O)&&i.value.toCenter())}catch(L){console.warn("⚠️ 延迟刷新过程中出现错误:",L),setTimeout(()=>{i.value&&i.value.refresh&&i.value.refresh()},200)}})(),i.value.bus.addListener("showImagePreview",(L,de)=>{console.log("🖼️ 收到图片预览事件:",{imageUrl:L,altText:de}),V(L,de)})}else{console.warn("⚠️ 容器未准备好,延迟创建Mind Elixir实例..."),setTimeout(()=>{if(n.value){i.value=new kt({el:n.value,direction:kt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,theme:r,markdown:(L,de)=>L.includes("|")||L.includes("**")||L.includes("`")||L.includes("#")||L.includes("![")?li(L):L});const ie=i.value.init(T);console.log("✅ Mind Elixir实例延迟创建成功"),W?(xe(W),console.log("📍 延迟创建后立即恢复位置"),setTimeout(()=>{xe(W),console.log("📍 延迟创建后二次确认位置恢复")},100)):!N&&!O&&console.log("📍 延迟创建后跳过根节点居中,等待居中新节点"),(async()=>{try{await _n(),await document.fonts.ready,await new Promise(L=>requestAnimationFrame(L)),i.value&&i.value.refresh&&(console.log("🔄 延迟创建实例执行完整DOM稳定后的延迟刷新"),i.value.refresh(),!W&&(N||O)&&i.value.toCenter())}catch(L){console.warn("⚠️ 延迟创建实例的延迟刷新过程中出现错误:",L),setTimeout(()=>{i.value&&i.value.refresh&&i.value.refresh()},250)}})(),i.value.bus.addListener("showImagePreview",(L,de)=>{console.log("🖼️ 收到图片预览事件(延迟创建):",{imageUrl:L,altText:de}),V(L,de)}),setTimeout(()=>{W?xe(W):O&&Be(),wt(),je()},300)}},200);return}}catch{setTimeout(()=>{try{if(n.value){i.value=new kt({el:n.value,direction:kt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,theme:r,markdown:(L,de)=>L.includes("|")||L.includes("**")||L.includes("`")||L.includes("#")||L.includes("![")?li(L):L});const ue=i.value.init(T);W?(xe(W),console.log("📍 重试创建后立即恢复位置"),setTimeout(()=>{xe(W),console.log("📍 重试创建后二次确认位置恢复")},100)):!N&&!O&&console.log("📍 重试创建后跳过根节点居中,等待居中新节点"),setTimeout(()=>{W?xe(W):O&&Be(),wt(),je()},300)}}catch(ue){console.error("❌ Mind Elixir实例重试创建失败:",ue)}},500);return}setTimeout(()=>{N&&W?xe(W):O&&Be(),_(),wt(),setTimeout(()=>{je()},500)},100)}catch{}},je=()=>{i.value&&n.value&&setTimeout(()=>{n.value.querySelectorAll("me-tpc, .topic, [data-id]").forEach((N,O)=>{var L;const W=N.getAttribute("data-id")||N.id||N.getAttribute("nodeid")||((L=N.querySelector("[data-id]"))==null?void 0:L.getAttribute("data-id"));if(!W)return;const ie=(de,Ae)=>{for(const Ee of de){if(Ee.id===Ae)return Ee;if(Ee.children){const _e=ie(Ee.children,Ae);if(_e)return _e}}return null},ue=ie(i.value.data.nodeData,W);if(ue&&ue.data&&ue.data.des){let de=N.querySelector(".node-description");de||(de=document.createElement("div"),de.className="node-description",de.style.cssText=`
    +            font-size: 11px;
    +            color: #666;
    +            margin-top: 6px;
    +            padding: 6px 8px;
    +            background: rgba(0, 0, 0, 0.03);
    +            border-radius: 4px;
    +            max-width: 250px;
    +            word-wrap: break-word;
    +            line-height: 1.3;
    +            border-left: 3px solid #e0e0e0;
    +            display: block;
    +          `,N.appendChild(de));const Ae=ue.data.des;Ae.length>150?(de.textContent=Ae.substring(0,150)+"...",de.title=Ae):de.textContent=Ae}})},1e3)},Be=()=>{try{if(i.value&&i.value.toCenter){i.value.toCenter(),console.log("✅ 使用 MindElixir toCenter 方法实现根节点居中");return}const T=n.value;if(!T)return;const N=T.querySelector(".map-canvas");if(!N)return;const O=N.querySelectorAll("me-tpc");if(O.length===0)return;let W=1/0,ie=-1/0,ue=1/0,L=-1/0;O.forEach(H0=>{const Mn=H0.getBoundingClientRect(),q0=T.getBoundingClientRect(),Ko=Mn.left-q0.left,Yo=Mn.top-q0.top;W=Math.min(W,Ko),ie=Math.max(ie,Ko+Mn.width),ue=Math.min(ue,Yo),L=Math.max(L,Yo+Mn.height)});const de=(W+ie)/2,Ae=(ue+L)/2,Ee=T.clientWidth/2,_e=T.clientHeight/2,Xe=Ee-de,xt=_e-Ae;N.style.transform=`translate(${Xe}px, ${xt}px)`,N.style.opacity="1",N.style.transition="opacity 0.3s ease";const Pt=100,ar=Math.max(Xe,Pt),Mr=Math.max(xt,Pt);N.style.transform=`translate(${ar}px, ${Mr}px)`,N.style.opacity="1",N.style.visibility="visible"}catch{}},Ye=async T=>{if(!(!i.value||!T))try{console.log("🎯 开始处理新节点:",T);let N=null,O=0;const W=5;for(;!N&&OsetTimeout(ie,50)));N?(console.log("✅ 找到节点元素:",N),i.value.scrollIntoView&&(i.value.scrollIntoView(N),console.log("✅ 节点已平滑居中显示")),setTimeout(()=>{i.value.beginEdit&&(i.value.beginEdit(N),console.log("✅ 节点已进入编辑状态"))},350)):console.error("❌ 多次尝试后仍未找到节点元素:",T)}catch(N){console.error("❌ 居中显示节点失败:",N)}},ge=()=>{if(!s.value)return;if(i.value&&i.value.getNodeById)try{const N=i.value.getNodeById(s.value.id);if(N){const O=N.getBoundingClientRect(),W=n.value.getBoundingClientRect(),ie=O.left-W.left+O.width/2,ue=O.bottom-W.top+10;a.value={left:`${ie}px`,top:`${ue}px`};return}}catch{}let T=document.querySelector(`[data-id="${s.value.id}"]`);if(T||(T=document.querySelector(`.topic[data-id="${s.value.id}"]`)),T||(T=document.querySelector(`[data-node-id="${s.value.id}"]`)),T||(T=document.querySelector(`[data-nodeid="me${s.value.id}"]`)),!T){const N=document.querySelectorAll("me-tpc");for(const O of N)if(O.getAttribute("data-nodeid")===`me${s.value.id}`){T=O;break}}if(!T){const N=document.querySelectorAll(".topic");for(const O of N)if(O.textContent.trim()===s.value.topic){T=O;break}}if(T){const N=T.getBoundingClientRect(),O=n.value.getBoundingClientRect(),W=N.left-O.left+N.width/2,ie=N.bottom-O.top+10;a.value={left:`${W}px`,top:`${ie}px`}}else a.value={left:"50%",top:"50%",transform:"translate(-50%, -50%)"}},Ft=async()=>{s.value&&(await ae(s.value),s.value=null)},ht=async()=>{s.value&&(await pe(s.value),s.value=null)},yt=async()=>{s.value&&(await ke(s.value),s.value=null)},St=async()=>{if(!s.value)return;console.log("Ask AI for node:",s.value);const T=parseFloat(a.value.left)||0,N=parseFloat(a.value.top)||0;o.value={left:`${T}px`,top:`${N+60}px`,transform:"translateX(-50%)"},p.value=!0,g.value=s.value},lt=()=>{p.value=!1,g.value=null,v.value="",x.value=!1,s.value=null},j=T=>{if(!T)return"";const N=[];return T.parent&&T.parent.topic&&N.push(`父节点: ${T.parent.topic}`),T.parent&&T.parent.parent&&T.parent.parent.topic&&N.push(`祖父节点: ${T.parent.parent.topic}`),N.join(" | ")},G=T=>{T.ctrlKey||T.metaKey||(T.preventDefault(),J())},J=async()=>{if(!(!v.value.trim()||!g.value||x.value)){x.value=!0;try{const T="你是一个专业的思维导图分析助手。请根据用户的问题和提供的节点信息,给出专业、有用的回答。",N=`节点信息:
    +当前节点:${g.value.topic}
    +上下文:${j(g.value)}
    +
    +用户问题:${v.value}
    +
    +请给出详细的回答,回答应该:
    +1. 直接回答用户的问题
    +2. 提供具体的建议或改进方案
    +3. 保持专业和有用的语调
    +4. 回答长度适中,便于在思维导图中展示`;console.log("发送AI请求:",{systemPrompt:T,userPrompt:N});const O=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:T,user_prompt:N,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!O.ok)throw new Error(`HTTP error! status: ${O.status}`);let W="";const ie=O.body.getReader(),ue=new TextDecoder;let L="";for(;;){const{done:de,value:Ae}=await ie.read();if(de)break;L+=ue.decode(Ae,{stream:!0});const Ee=L.split(`
    +`);L=Ee.pop()||"";for(const _e of Ee)if(_e.startsWith("data: "))try{const Xe=JSON.parse(_e.slice(6));if(Xe.type==="chunk")W+=Xe.content;else if(Xe.type==="error")throw new Error(Xe.content)}catch(Xe){console.warn("解析流式数据失败:",Xe)}}await M(g.value,v.value,W),lt()}catch(T){console.error("AI请求失败:",T),alert("AI请求失败,请稍后重试")}finally{x.value=!1}}},ne=T=>T.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(N,O)=>{if(O.includes(":")){const W=O.split(":");if(W.length>1)return`【${W[0]}】: ${W.slice(1).join(":")}`}return`【${O}】`}).replace(/\*(.*?)\*/g,"《$1》").replace(/^- (.*$)/gim,"  • $1").replace(/^\d+\. (.*$)/gim,"  $&").replace(/```(.*?)```/gims,"💻 $1").replace(/`(.*?)`/g,"「$1」").replace(/\[([^\]]+)\]\([^)]+\)/g,"🔗 $1").replace(/\n\n/g,`
    +`).replace(/\n/g,`
    +  `),be=(T,N,O)=>{const W=T.split(`
    +`);let ie=O,ue=[];for(let L=0;L0){const ar=ne(xt.join(`
    +`));Xe.topic=Xe.topic+`
    +
    +`+ar}N.children.push(Xe),L=Pt-1}else Ae&&ue.push(Ae)}if(ue.length>0){const L=ue.join(`
    +`).trim();L&&L.split(`
    +
    +`).filter(Ae=>Ae.trim()).forEach(Ae=>{const Ee=ne(Ae.trim());if(Ee){const _e={id:`node_${ie++}`,topic:Ee,children:[],level:(N.level||0)+1,data:{}};N.children.push(_e)}})}return{nodeCounter:ie}},S=T=>{const N=T.split(`
    +`);let O=null;const W=[];let ie=0,ue=[];if(N.forEach((L,de)=>{const Ae=L.trim(),Ee=Ae.match(/^(#{1,6})\s+(.+)$/);if(Ee){if(ue.length>0&&W.length>0){const ar=ue.join(`
    +`).trim();ar&&(ie=be(ar,W[W.length-1],ie).nodeCounter),ue=[]}const _e=Ee[1].length,Xe=Ee[2].trim(),xt=ne(Xe),Pt={id:`node_${ie++}`,topic:xt,children:[],level:_e,data:{}};if(_e===1&&!O)O=Pt,W.length=0,W.push(O);else{for(;W.length>1&&W[W.length-1].level>=_e;)W.pop();W.length>0&&W[W.length-1].children.push(Pt),W.push(Pt)}}else Ae&&ue.push(Ae)}),ue.length>0&&W.length>0){const L=ue.join(`
    +`).trim();L&&(ie=be(L,W[W.length-1],ie).nodeCounter)}return O||(O={id:"root",topic:"根节点",children:[],data:{}}),O},M=async(T,N,O)=>{var W,ie,ue;try{const de=(Mr=>Mr.replace(/^#+\s*/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/^\s*[-*+]\s*(?![|])/gm,"• ").replace(/\n{3,}/g,`
    +
    +`).trim())(O),Ae=`# ${N}
    +
    +${de}`,Ee=S(Ae),_e={title:N,des:`AI追问产生的节点 - ${new Date().toLocaleString()}`,parentId:T.id,isRoot:!1},Xe=[];if(Ee.children&&Ee.children.length>0&&Ee.children.forEach(Mr=>{Xe.push({title:Mr.topic,des:"",parentId:null,isRoot:!1})}),console.log("当前思维导图ID:",l.value),!l.value)throw new Error("没有找到当前思维导图ID,无法创建节点");const xt=await ut.addNodes(l.value,[_e]);if(!xt.data||!xt.data.success)throw new Error("AI父节点创建失败");const Pt=(ue=(ie=(W=xt.data.data)==null?void 0:W.nodes)==null?void 0:ie[0])==null?void 0:ue.id;if(!Pt)throw new Error("无法获取创建的父节点ID");Xe.forEach(Mr=>{Mr.parentId=Pt});let ar=null;if(Xe.length>0&&(ar=await ut.addNodes(l.value,Xe)),xt.data&&xt.data.success)await Bt();else throw new Error("AI父节点创建失败")}catch(L){console.error("创建AI节点失败:",L),alert("创建AI回答节点失败: "+L.message)}},z=async()=>{if(s.value){try{const T=s.value.topic||s.value.title||"无标题";if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(T),H();else{const N=document.createElement("textarea");N.value=T,N.style.position="fixed",N.style.left="-999999px",N.style.top="-999999px",document.body.appendChild(N),N.focus(),N.select();const O=document.execCommand("copy");document.body.removeChild(N),O?H():B()}}catch{B()}s.value=null}},H=()=>{const T=document.createElement("div");T.textContent="文本已复制到剪贴板",T.style.cssText=`
    +    position: fixed;
    +    top: 20px;
    +    right: 20px;
    +    background: #4CAF50;
    +    color: white;
    +    padding: 12px 20px;
    +    border-radius: 6px;
    +    font-size: 14px;
    +    z-index: 10000;
    +    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    +    animation: slideIn 0.3s ease;
    +  `;const N=document.createElement("style");N.textContent=`
    +    @keyframes slideIn {
    +      from { transform: translateX(100%); opacity: 0; }
    +      to { transform: translateX(0); opacity: 1; }
    +    }
    +  `,document.head.appendChild(N),document.body.appendChild(T),setTimeout(()=>{T.parentNode&&T.parentNode.removeChild(T),N.parentNode&&N.parentNode.removeChild(N)},3e3)},B=()=>{const T=document.createElement("div");T.textContent="复制失败,请手动复制",T.style.cssText=`
    +    position: fixed;
    +    top: 20px;
    +    right: 20px;
    +    background: #f44336;
    +    color: white;
    +    padding: 12px 20px;
    +    border-radius: 6px;
    +    font-size: 14px;
    +    z-index: 10000;
    +    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    +    animation: slideIn 0.3s ease;
    +  `,document.body.appendChild(T),setTimeout(()=>{T.parentNode&&T.parentNode.removeChild(T)},3e3)},U=(T,N="success")=>{const O=document.createElement("div");O.textContent=T;const W=N==="success"?"#4CAF50":N==="error"?"#f44336":"#ff9800";O.style.cssText=`
    +    position: fixed;
    +    top: 20px;
    +    right: 20px;
    +    background: ${W};
    +    color: white;
    +    padding: 12px 20px;
    +    border-radius: 6px;
    +    font-size: 14px;
    +    z-index: 10000;
    +    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    +    animation: slideIn 0.3s ease;
    +  `,document.body.appendChild(O),setTimeout(()=>{O.parentNode&&O.parentNode.removeChild(O)},2e3)},Z=()=>{const T=document.createElement("div");T.textContent="✅ 节点编辑已保存",T.style.cssText=`
    +    position: fixed;
    +    top: 20px;
    +    right: 20px;
    +    background: #4CAF50;
    +    color: white;
    +    padding: 12px 20px;
    +    border-radius: 6px;
    +    font-size: 14px;
    +    z-index: 10000;
    +    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    +    animation: slideIn 0.3s ease;
    +  `,document.body.appendChild(T),setTimeout(()=>{T.parentNode&&T.parentNode.removeChild(T)},2e3)},ee=()=>{const T=document.createElement("div");T.textContent="❌ 节点编辑保存失败",T.style.cssText=`
    +    position: fixed;
    +    top: 20px;
    +    right: 20px;
    +    background: #f44336;
    +    color: white;
    +    padding: 12px 20px;
    +    border-radius: 6px;
    +    font-size: 14px;
    +    z-index: 10000;
    +    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    +    animation: slideIn 0.3s ease;
    +  `,document.body.appendChild(T),setTimeout(()=>{T.parentNode&&T.parentNode.removeChild(T)},3e3)},re=async T=>{try{console.log("🎯 处理节点拖拽操作:",T.name),console.log("📦 操作详情:",{name:T.name,objs:T.objs,toObj:T.toObj}),setTimeout(async()=>{var N;try{const O=T.objs||[],W=T.toObj;if(!O.length||!W){console.warn("⚠️ 拖拽操作缺少必要信息");return}console.log(`📦 准备保存 ${O.length} 个节点的父子关系`);let ie=null;T.name==="moveNodeIn"?(ie=W.id,console.log(`📌 拖入操作:新父节点为 ${ie}`)):(T.name==="moveNodeBefore"||T.name==="moveNodeAfter")&&(ie=((N=W.parent)==null?void 0:N.id)||null,console.log(`📌 拖到兄弟位置:新父节点为 ${ie||"根节点"}`));const ue=O.map(async Ee=>{try{console.log(`🔄 更新节点 ${Ee.id} 的父节点为 ${ie||"根节点"}`);const _e=await ut.updateNode(Ee.id,{newParentId:ie});return _e.data&&_e.data.success?(console.log(`✅ 节点 ${Ee.id} 父子关系更新成功`),{success:!0,nodeId:Ee.id}):(console.warn(`⚠️ 节点 ${Ee.id} 父子关系更新失败:`,_e),{success:!1,nodeId:Ee.id})}catch(_e){return console.error(`❌ 节点 ${Ee.id} 父子关系更新失败:`,_e),{success:!1,nodeId:Ee.id,error:_e}}}),L=await Promise.all(ue),de=L.filter(Ee=>Ee.success).length,Ae=L.filter(Ee=>!Ee.success).length;console.log(`📊 拖拽保存结果: ${de} 成功, ${Ae} 失败`)}catch(O){console.error("❌ 保存拖拽后的结构失败:",O),U("❌ 节点拖拽保存失败","error")}},500)}catch(N){console.error("❌ 处理节点拖拽操作失败:",N)}},K=async T=>{try{const N=T.obj;N?await oe(N):console.error("无法解析编辑操作:",T)}catch(N){console.error("处理编辑完成失败:",N)}},oe=async T=>{var N,O;try{if(!l.value){console.error("无法获取思维导图ID");return}const W=await ut.updateNode(T.id,{newTitle:T.topic,newDes:((N=T.data)==null?void 0:N.des)||"",newParentId:T.parentId||((O=T.parent)==null?void 0:O.id)});W.data&&W.data.success?Z():(console.error("更新节点编辑失败:",W.data),ee())}catch(W){console.error("更新节点编辑失败:",W),ee()}},ae=async T=>{var N;try{await De();const O=l.value||T.mindmap_id||T.mindmapId;if(!O){console.error("无法获取思维导图ID");return}const W=await ut.addNodes(O,[{title:"新子节点",des:"子节点描述",parentId:T.id}]);if(W.data&&W.data.success){const ie=((N=W.data.data)==null?void 0:N.nodes)||[];if(ie.length>0){const ue=ie[0];try{await new Promise(de=>setTimeout(de,800));const L=await ut.getMindmap(O);if(L.data&&L.data.nodeData){await fe(L.data,!1,!1);try{console.log("🎯 开始居中显示新子节点:",ue.id),await Ye(ue.id)}catch(de){console.error("居中显示新节点失败:",de)}}else throw new Error("无法获取思维导图数据")}catch(L){console.error("刷新思维导图失败:",L)}}}}catch(O){console.error("添加子节点失败:",O)}},pe=async T=>{var N;try{await De(),console.log("添加兄弟节点到API:",T.id),console.log("节点信息:",{id:T.id,parentId:T.parentId,parent:T.parent,mindmap_id:T.mindmap_id,mindmapId:T.mindmapId});const O=l.value||T.mindmap_id||T.mindmapId;if(!O){console.error("无法获取思维导图ID");return}let W=T.parentId;!W&&T.parent&&(W=T.parent.id);const ie=await ut.addNodes(O,[{title:"新兄弟节点",des:"兄弟节点描述",parentId:W}]);if(console.log("添加兄弟节点响应:",ie),ie.data&&ie.data.success){const ue=((N=ie.data.data)==null?void 0:N.nodes)||[];if(ue.length>0){const L=ue[0];console.log("新创建的兄弟节点:",L),console.log("🎯 使用MindElixir init方法重新初始化数据...");try{const de=await ut.getMindmap(O);if(de.data&&de.data.nodeData){await fe(de.data,!1,!1),console.log("✅ 思维导图刷新成功");try{console.log("🎯 开始居中显示新兄弟节点:",L.id),await Ye(L.id)}catch(Ae){console.error("居中显示新节点失败:",Ae)}}else throw new Error("无法获取思维导图数据")}catch(de){console.error("重新初始化失败,使用完整重新加载:",de);const Ae=await ut.getMindmap(O);Ae.data&&Ae.data.nodeData&&await fe(Ae.data,!0,!1)}}}}catch(O){console.error("添加兄弟节点失败:",O)}},ke=async T=>{try{await De(),console.log("删除节点从API:",T.id);const N=await ut.deleteNodes([T.id]);if(console.log("删除节点响应:",N),N.data&&N.data.success){const O=l.value||T.mindmap_id||T.mindmapId;if(O){const W=await ut.getMindmap(O);W.data&&W.data.nodeData&&(await fe(W.data,!0,!1),console.log("✅ 删除节点后思维导图已刷新,保持当前位置"))}}}catch(N){console.error("删除节点失败:",N)}},De=async()=>{const T=n.value;if(T){const N=T.querySelector("input:focus");if(N&&s.value){const O=N.value;O!==s.value.topic&&O.trim()!==""&&(console.log("保存当前编辑:",O),s.value.topic=O,await Ke(s.value))}}},Ke=async T=>{var N,O,W,ie,ue;try{console.log("保存Mind Elixir编辑,节点ID:",T.id),console.log("编辑内容:",{newTitle:T.topic,newDes:((N=T.data)==null?void 0:N.des)||""});const L=String(T.id),de=await ut.updateNode(L,{newTitle:T.topic,newDes:((O=T.data)==null?void 0:O.des)||""});console.log("更新节点API响应:",de),console.log("节点编辑已保存到后端"),console.log("✅ 节点编辑已保存,无需重新加载")}catch(L){console.error("保存Mind Elixir编辑失败:",L),console.error("错误详情:",(W=L.response)==null?void 0:W.data),alert("保存编辑失败: "+(((ue=(ie=L.response)==null?void 0:ie.data)==null?void 0:ue.detail)||L.message))}},Pe=T=>{console.log("打开编辑模态框:",T),i.value.editText(T)},Tt=async(T,N,O)=>{var W,ie,ue;try{console.log("开始创建节点:",T.topic,"父节点ID:",O);const L={title:T.topic||T.title||"无标题",des:((W=T.data)==null?void 0:W.des)||"",parentId:O};T.dangerouslySetInnerHTML&&(L.dangerouslySetInnerHTML=T.dangerouslySetInnerHTML);const de=await ut.addNodes(N,L);if(console.log("创建节点响应:",de),de.data&&de.data.success){const Ee=(ue=(((ie=de.data.data)==null?void 0:ie.nodes)||[])[0])==null?void 0:ue.id;if(console.log("当前节点ID:",Ee),T.children&&T.children.length>0){console.log("开始创建子节点,数量:",T.children.length);for(const _e of T.children)await Tt(_e,N,Ee)}else console.log("节点没有子节点,创建完成")}else console.error("创建节点失败,响应:",de)}catch(L){console.error("创建节点失败:",L)}};let nt=null,gt=null;const wt=()=>{if(!i.value)return;console.log("绑定事件监听器..."),nt&&n.value.removeEventListener("wheel",nt),gt&&n.value.removeEventListener("click",gt),nt=O=>{if(O.ctrlKey||O.metaKey){O.preventDefault();const W=O.deltaY>0?.9:1.1,ie=Math.max(.3,Math.min(3,c.value*W));if(i.value){const ue=n.value.querySelector(".map-container");ue&&(ue.style.transform=`scale(${ie})`,c.value=ie,localStorage.setItem("mindmap-zoom-level",ie.toString()))}}},n.value.addEventListener("wheel",nt),i.value.bus.addListener("select",O=>{s.value=O,setTimeout(()=>{ge()},50)}),i.value.bus.addListener("selectNode",O=>{s.value=O,setTimeout(()=>{ge()},50)}),i.value.bus.addListener("scale",O=>{Math.abs(O-1)<.01&&Math.abs(c.value-1)>.01&&setTimeout(()=>{fn()},50)}),window.zoomIntervalId&&clearInterval(window.zoomIntervalId);const T=setInterval(()=>{c.value!==1&&n.value&&F0()},500);window.zoomIntervalId=T;let N=0;gt=O=>{const W=Date.now();if(W-N<100)return;N=W;const ie=O.target,ue=ie.closest("me-tpc")||ie.closest(".topic")||(ie.classList.contains("topic")?ie:null)||(ie.tagName==="ME-TPC"?ie:null);if(ue){const L=ue.nodeObj;if(L){s.value=L;const de=n.value.getBoundingClientRect(),Ae=ue.getBoundingClientRect(),Ee=Ae.left-de.left+Ae.width/2,_e=Ae.bottom-de.top+8;a.value={left:`${Ee}px`,top:`${_e}px`}}}else s.value=null,p.value&&(p.value=!1,g.value=null,v.value="",x.value=!1)},n.value.addEventListener("click",gt),i.value.bus.addListener("edit",O=>{console.log("edit事件触发:",O),Pe(O)}),i.value.bus.addListener("editFinish",O=>{console.log("editFinish事件触发:",O),K(O)}),i.value.bus.addListener("operation",O=>{console.log("Mind Elixir操作事件:",O),O.name==="moveNodeIn"||O.name==="moveNodeBefore"||O.name==="moveNodeAfter"?(console.log("检测到节点拖拽操作:",O.name,O),re(O)):O.name==="finishEdit"&&(console.log("检测到编辑完成操作:",O),K(O))}),i.value.bus.addListener("removeNode",O=>{console.log("删除节点:",O),ke(O)})},fn=()=>{if(i.value){const T=localStorage.getItem("mindmap-zoom-level");if(T){const N=parseFloat(T);if(N>=.3&&N<=3){const O=n.value.querySelector(".map-container");O&&(O.style.transform=`scale(${N})`,c.value=N)}}}},F0=()=>{if(i.value&&c.value!==1&&n.value){const T=n.value.querySelector(".map-container");T&&(T.style.transform=`scale(${c.value})`)}},It=async()=>{var T;if(console.log("🚀🚀🚀 保存函数被调用 🚀🚀🚀"),console.log("🔍 mindElixir.value:",i.value),console.log("🔍 currentMindmapId.value:",l.value),console.log("🔍 mindmapEl.value:",n.value),console.log("🔍🔍🔍 全局状态检查开始 🔍🔍🔍"),console.log("🔍 - showWelcome:",u.value),console.log("🔍 - 是否有思维导图容器:",!!n.value),console.log("🔍 - MindElixir实例状态:",!!i.value),console.log("🔍🔍🔍 全局状态检查结束 🔍🔍🔍"),i.value&&i.value.data?(console.log("🔍🔍🔍 MindElixir数据检查开始 🔍🔍🔍"),console.log("🔍 - 数据对象:",i.value.data),console.log("🔍 - 数据字段:",Object.keys(i.value.data)),console.log("🔍 - 是否有nodeData:",!!i.value.data.nodeData),console.log("🔍 - 是否有nodes:",!!i.value.data.nodes),console.log("🔍🔍🔍 MindElixir数据检查结束 🔍🔍🔍")):console.log("⚠️ MindElixir数据不存在或为空"),!i.value||!l.value){if(console.warn("⚠️ 没有可保存的思维导图数据"),console.warn("🔍 mindElixir.value 状态:",!!i.value),console.warn("🔍 currentMindmapId.value 状态:",!!l.value),i.value&&i.value.data&&(console.log("🔍 尝试从MindElixir数据中获取ID"),console.log("🔍 MindElixir数据:",i.value.data),i.value.data.mindmapId?(l.value=i.value.data.mindmapId,console.log("🔍 从MindElixir数据中获取到mindmapId:",i.value.data.mindmapId)):i.value.data.mindmap_id&&(l.value=i.value.data.mindmap_id,console.log("🔍 从MindElixir数据中获取到mindmap_id:",i.value.data.mindmap_id))),!l.value&&i.value){if(console.log("🔍 尝试重新初始化MindElixir数据..."),console.log("🔍 MindElixir实例属性:",Object.keys(i.value)),console.log("🔍 MindElixir实例方法:",Object.getOwnPropertyNames(Object.getPrototypeOf(i.value))),i.value.getData){const N=i.value.getData();console.log("🔍 通过getData()获取的数据:",N),N&&N.nodeData&&(console.log("🔍 nodeData详情:",N.nodeData),N.nodeData.mindmapId?(l.value=N.nodeData.mindmapId,console.log("🔍 从nodeData.mindmapId获取到ID:",N.nodeData.mindmapId)):N.nodeData.mindmap_id?(l.value=N.nodeData.mindmap_id,console.log("🔍 从nodeData.mindmap_id获取到ID:",N.nodeData.mindmap_id)):(console.log("🔍 nodeData中没有找到mindmapId字段"),console.log("🔍 nodeData字段:",Object.keys(N.nodeData)))),!l.value&&N&&(console.log("🔍 检查其他可能的ID字段..."),N.id?(l.value=N.id,console.log("🔍 从data.id获取到ID:",N.id)):N.mindmapId&&(l.value=N.mindmapId,console.log("🔍 从data.mindmapId获取到ID:",N.mindmapId)))}i.value.mindElixirData&&(console.log("🔍 mindElixirData:",i.value.mindElixirData),i.value.mindElixirData.id&&(l.value=i.value.mindElixirData.id,console.log("🔍 从mindElixirData获取到ID:",i.value.mindElixirData.id)))}if(!l.value){console.warn("⚠️ 仍然无法获取思维导图ID,无法保存"),console.warn("🔍 建议:请先加载一个思维导图,然后再尝试保存");return}}try{console.log("💾 开始保存思维导图..."),console.log("🔍 当前思维导图ID:",l.value),console.log("🔍 MindElixir实例:",i.value);let N=null;if(i.value&&i.value.getData?(N=i.value.getData(),console.log("🔍 通过getData()获取的数据:",N)):(N=i.value.data,console.log("🔍 通过data属性获取的数据:",N)),!N){console.warn("⚠️ MindElixir数据为空");return}let O=[];console.log("🔍 数据结构分析:"),console.log("🔍 - currentData.nodeData:",N.nodeData),console.log("🔍 - currentData.nodes:",N.nodes),console.log("🔍 - currentData.nodeData.children:",(T=N.nodeData)==null?void 0:T.children);const W=L=>{L&&L.id&&(O.push(L),console.log(`🔍 收集节点: ${L.id} - ${L.topic||L.content||"无标题"}`),L.children&&L.children.length>0&&L.children.forEach(de=>W(de)))};if(N.nodeData)W(N.nodeData),console.log("🔍 从根节点收集到节点数量:",O.length);else if(N.nodes&&Array.isArray(N.nodes))N.nodes.forEach(L=>W(L)),console.log("🔍 从nodes数组收集到节点数量:",O.length);else if(Array.isArray(N))N.forEach(L=>W(L)),console.log("🔍 从currentData数组收集到节点数量:",O.length);else{console.warn("⚠️ 无法找到节点数据"),console.log("🔍 可用的数据字段:",Object.keys(N));return}if(O.length===0){console.warn("⚠️ 没有收集到任何节点");return}console.log("🔍 找到节点数据:",O),console.log("🔍 节点数量:",O.length),console.log("🔍 节点数据类型:",Array.isArray(O)?"数组":typeof O);const ie=[];if(O.forEach((L,de)=>{if(console.log(`🔍 处理节点 ${de}:`,L),L&&L.id){const Ae=L.topic||L.content||L.text||"",Ee=L.x||L.offsetX||0,_e=L.y||L.offsetY||0;console.log(`🔍 节点 ${L.id} 内容:`,Ae,"位置:",{x:Ee,y:_e});const Xe={content:Ae,position:{x:Ee,y:_e}};(L.parentId||L.parent)&&(Xe.parentId=L.parentId||L.parent,console.log(`🔍 节点 ${L.id} 父节点:`,Xe.parentId)),console.log(`🔍 准备保存节点 ${L.id}:`,Xe),ie.push(ut.updateNode(L.id,Xe).then(xt=>{console.log(`✅ 节点 ${L.id} 保存成功:`,xt)}).catch(xt=>{console.error(`❌ 节点 ${L.id} 保存失败:`,xt)}))}else console.warn(`⚠️ 节点 ${de} 缺少ID:`,L)}),console.log("🔍 准备保存的节点数量:",ie.length),ie.length===0){console.warn("⚠️ 没有找到需要保存的节点");return}const ue=await Promise.all(ie);console.log("🔍 保存结果:",ue),console.log("🎉 思维导图保存完成!"),console.log("🔄 保存完成,开始自动刷新..."),await Bt()}catch(N){console.error("❌ 保存思维导图失败:",N)}},Bt=async()=>{if(!l.value){console.warn("⚠️ 没有当前思维导图ID,无法刷新");return}try{console.log("🔄 开始刷新思维导图...");const T=await ut.getMindmap(l.value);T.data&&T.data.nodeData?(console.log("✅ 获取到最新数据,开始刷新显示..."),await fe(T.data,!0,!1),console.log("🎉 思维导图刷新完成!")):console.warn("⚠️ 无法获取思维导图数据")}catch(T){console.error("❌ 刷新思维导图失败:",T)}},B0=async(T,N)=>{try{const O=String(l.value||"");if(i.value&&O&&O.startsWith("temp-")){console.log("🔄 检测到实时渲染的思维导图,将保存到数据库并更新ID");const ue=Oe();console.log("📍 保存当前位置:",ue);const L=await ut.createMindmap(N||"预览思维导图",T);if(console.log("🔄 创建思维导图响应:",L),L.data&&L.data.id){const de=L.data.id;console.log("🎉 创建思维导图成功,新思维导图的ID是:",de);const Ae=l.value;if(l.value=de,i.value&&i.value.data){i.value.data.mindmapId=de,i.value.data.id=de;const Ee=_e=>{_e&&(_e.mindmapId=de,_e.children&&_e.children.forEach(Xe=>Ee(Xe)))};i.value.data.nodeData&&Ee(i.value.data.nodeData)}console.log("✅ 已更新思维导图ID,保持视图状态"),console.log("🔄 从临时ID",Ae,"更新为正式ID",de),ue&&setTimeout(()=>{xe(ue),console.log("📍 已恢复位置和缩放状态")},100),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:de,title:N,timestamp:Date.now(),fromRealtime:!0}}));return}}console.log("🔄 没有检测到实时渲染的思维导图,使用标准保存流程");const ie=await ut.createMindmap(N||"预览思维导图",T);if(console.log("🔄 创建思维导图响应:",ie),ie.data&&ie.data.id){const ue=ie.data.id;if(console.log("🎉 创建思维导图成功,新思维导图的ID是:",ue),console.log("📊 响应数据详情:",ie.data),ie.data.nodeData)console.log("✅ 思维导图创建时已包含节点数据,直接加载"),l.value=ue,_(),await fe(ie.data),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:ue,title:N,timestamp:Date.now()}})),setTimeout(async()=>{try{console.log("🔄 重新加载思维导图数据...");const L=await ut.getMindmap(ue);L.data&&L.data.nodeData&&(await fe(L.data),console.log("✅ 思维导图数据重新加载成功"))}catch(L){console.error("❌ 重新加载思维导图失败:",L)}},1500);else{console.log("🔧 需要递归创建节点"),await Tt(T,ue,null),console.log("📥 开始加载新创建的思维导图,ID:",ue);const L=await ut.getMindmap(ue);console.log("🔄 加载思维导图响应:",L),L.data&&L.data.nodeData?(console.log("✅ 成功获取思维导图数据,开始加载显示"),l.value=ue,_(),await fe(L.data),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:ue,title:N,timestamp:Date.now()}})),setTimeout(async()=>{try{console.log("🔄 重新加载思维导图数据...");const de=await ut.getMindmap(ue);de.data&&de.data.nodeData&&(await fe(de.data),console.log("✅ 思维导图数据重新加载成功"))}catch(de){console.error("❌ 重新加载思维导图失败:",de)}},1500)):console.error("❌ 获取思维导图数据失败:",L)}}}catch(O){console.error("❌ 保存预览数据到数据库失败:",O)}},P0=async T=>{try{if(console.log("📚 开始从历史记录加载思维导图:",T.title),_(),T.mindmapId){console.log("🎯 使用思维导图ID加载:",T.mindmapId);const N=await ut.getMindmap(T.mindmapId);if(N.data&&N.data.nodeData)await fe(N.data);else throw new Error("无法获取思维导图数据")}else if(T.json)console.log("📊 使用历史记录中的JSON数据"),await fe(T.json);else if(T.markdown){console.log("📝 使用历史记录中的Markdown数据,尝试转换为JSON");try{const N=await convertMarkdownToJSON(T.markdown);if(N)await fe(N);else throw new Error("Markdown转换失败")}catch(N){console.error("Markdown转换失败:",N)}}}catch(N){console.error("❌ 从历史记录加载思维导图失败:",N)}};Ka(async()=>{window.addEventListener("save-preview-to-database",T=>{console.log("🎯 收到保存到数据库事件:",T.detail),console.log("📋 事件详情 - 标题:",T.detail.title,"来源:",T.detail.source,"时间戳:",new Date(T.detail.timestamp).toLocaleString()),B0(T.detail.data,T.detail.title)}),window.addEventListener("realtime-mindmap-update",T=>{console.log("🔄 收到实时思维导图更新事件:",T.detail),Yd(T.detail.data,T.detail.title)}),window.addEventListener("loadMindmapFromHistory",T=>{console.log("📚 收到从历史记录加载思维导图事件:",T.detail),console.log("🔍 事件数据详情:",T.detail),P0(T.detail)}),window.addEventListener("ai-sidebar-toggle",T=>{console.log("🤖 AI侧边栏折叠状态变化:",T.detail.isCollapsed),f.value=T.detail.isCollapsed}),R()});const Go=()=>{window.zoomIntervalId&&(clearInterval(window.zoomIntervalId),window.zoomIntervalId=null),n.value&&(nt&&(n.value.removeEventListener("wheel",nt),nt=null),gt&&(n.value.removeEventListener("click",gt),gt=null)),console.log("✅ 已清理所有定时器和事件监听器")};Ya(()=>{Go()}),e({showMindMapPage:F,cleanupIntervals:Go});const Yd=async(T,N)=>{try{if(i.value){console.log("🔄 更新现有思维导图数据");try{const O=Oe(),W=String(l.value||""),ie=W&&W.startsWith("temp-")?W:`temp-${Date.now()}`,ue={nodeData:T,mindmapId:ie,id:ie,title:N||"AI生成中..."};(!W||!W.startsWith("temp-"))&&(l.value=ie,console.log("🆔 更新临时思维导图ID:",ie));const L=i.value.init(ue);O&&setTimeout(()=>{xe(O)},100)}catch(O){console.error("❌ 更新思维导图数据失败:",O)}}else{_(),await _n();let O=0;for(;!n.value&&O<20;)await new Promise(L=>setTimeout(L,50)),await _n(),O++;if(!n.value){console.error("❌ 思维导图容器仍未准备好,跳过此次更新");return}i.value=new kt({el:n.value,direction:kt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!0,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,markdown:(L,de)=>L.includes("|")||L.includes("**")||L.includes("`")||L.includes("#")||L.includes("$")||L.includes("![")?li(L):L});const W=`temp-${Date.now()}`,ie={nodeData:T,mindmapId:W,id:W,title:N||"AI生成中..."};l.value=W,console.log("🆔 设置临时思维导图ID:",W);const ue=i.value.init(ie);console.log("✅ 实时思维导图实例创建成功"),wt(),Be()}}catch(O){console.error("❌ 实时更新思维导图失败:",O)}};return(T,N)=>(Fe(),He("div",k7,[u.value?(Fe(),He("div",S7,[Y("div",{class:Vn(["welcome-content",{"ai-sidebar-collapsed":f.value}])},[...N[2]||(N[2]=[ll('

    🧠 思维导图工具

    可视化您的想法,构建知识体系

    🎯

    智能AI生成

    上传文档,AI自动生成思维导图结构

    ✏️

    灵活编辑

    拖拽节点,自由调整思维导图布局

    💾

    云端存储

    自动保存,多设备同步访问

    💡 提示:使用左侧AI侧边栏可以快速生成思维导图内容

    ',3)])],2)])):yr("",!0),p.value?(Fe(),He("div",{key:1,class:"ai-input-area",style:Un(o.value)},[Y("div",{class:"ai-input-header"},[N[3]||(N[3]=Y("span",{class:"ai-input-title"},"🤖 询问AI",-1)),Y("button",{onClick:lt,class:"ai-close-btn"},"×")]),Y("div",T7,[Ei(Y("textarea",{"onUpdate:modelValue":N[0]||(N[0]=O=>v.value=O),placeholder:"请输入您的问题...",rows:"2",disabled:x.value,onKeydown:[Ds(W0(G,["exact"]),["enter"]),Ds(W0(J,["ctrl"]),["enter"]),Ds(W0(J,["meta"]),["enter"])]},null,40,E7),[[eo,v.value]]),Y("div",A7,[Y("button",{onClick:lt,class:"btn-cancel",disabled:x.value}," 取消 ",8,C7),Y("button",{onClick:J,class:"btn-submit",disabled:!v.value.trim()||x.value},[x.value?(Fe(),He("span",N7,"AI思考中...")):(Fe(),He("span",I7,"询问AI"))],8,M7)])])],4)):yr("",!0),u.value?yr("",!0):(Fe(),He("div",{key:2,ref_key:"mindmapEl",ref:n,class:"mindmap-el"},null,512)),u.value?yr("",!0):(Fe(),He("div",D7,[Y("button",{onClick:It,class:"save-btn",title:"保存思维导图",style:{display:"none"}},[...N[4]||(N[4]=[Y("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[Y("path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),Y("polyline",{points:"17,21 17,13 7,13 7,21"}),Y("polyline",{points:"7,3 7,8 15,8"})],-1),Y("span",null,"保存",-1)])]),Y("button",{onClick:Bt,class:"refresh-btn",title:"刷新思维导图",style:{display:"none"}},[...N[5]||(N[5]=[Y("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[Y("path",{d:"M1 4v6h6"}),Y("path",{d:"M23 20v-6h-6"}),Y("path",{d:"M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"})],-1),Y("span",null,"刷新",-1)])])])),s.value?(Fe(),He("div",{key:4,class:"context-menu",style:Un(a.value)},[s.value.parentId||s.value.parent?(Fe(),He("div",{key:0,class:"context-menu-item",onClick:ht,title:"Add a sibling card"},[...N[6]||(N[6]=[Y("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[Y("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.9001 4.5C9.9001 5.74264 8.89274 6.75 7.6501 6.75C6.64263 6.75 5.78981 6.08785 5.5031 5.175H2.7001V11.025H5.4001V9.9C5.4001 8.90589 6.11644 8.1 7.0001 8.1H15.0501C15.9338 8.1 16.6501 8.90589 16.6501 9.9V13.95C16.6501 14.9441 15.9338 15.75 15.0501 15.75H7.0001C6.11644 15.75 5.4001 14.9441 5.4001 13.95V12.375H2.2501C1.75304 12.375 1.3501 11.7471 1.3501 11.475V4.725C1.3501 4.22794 1.75304 3.825 2.2501 3.825H5.5031C5.78981 2.91215 6.64263 2.25 7.6501 2.25C8.89274 2.25 9.9001 3.25736 9.9001 4.5ZM15.0501 9.9H7.0001V13.95H15.0501V9.9Z",fill:"currentColor","fill-opacity":"1"})],-1)])])):yr("",!0),Y("div",{class:"context-menu-item",onClick:Ft,title:"Add a child card"},[...N[7]||(N[7]=[Y("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[Y("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.9501 6.63691H8.35014V11.3619H15.9501V6.63691ZM8.35014 4.83691C7.46649 4.83691 6.75014 5.6428 6.75014 6.63691V8.32441H4.84719C4.56048 7.41157 3.70766 6.74941 2.7002 6.74941C1.45755 6.74941 0.450195 7.75677 0.450195 8.99941C0.450195 10.2421 1.45755 11.2494 2.7002 11.2494C3.70766 11.2494 4.56048 10.5873 4.84719 9.67441H6.75014V11.3619C6.75014 12.356 7.46649 13.1619 8.35014 13.1619H15.9501C16.8338 13.1619 17.5501 12.356 17.5501 11.3619V6.63691C17.5501 5.6428 16.8338 4.83691 15.9501 4.83691H8.35014Z",fill:"currentColor","fill-opacity":"1"})],-1)])]),Y("div",{class:"context-menu-item",onClick:z,title:"Copy text"},[...N[8]||(N[8]=[Y("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[Y("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.4503 2.99952C16.4016 2.18908 15.7289 1.54688 14.9062 1.54688H6.46875L6.37452 1.5497C5.56408 1.5984 4.92188 2.27108 4.92188 3.09375V3.54688C4.92188 3.68495 5.0338 3.79688 5.17188 3.79688H6.35938C6.49745 3.79688 6.60938 3.68495 6.60938 3.54688V3.375L6.61309 3.34276C6.62766 3.28063 6.68343 3.23438 6.75 3.23438H14.625L14.6572 3.23809C14.7261 3.23438 14.7656 3.30029 14.7656 3.375V11.25L14.7619 11.2822C14.7473 11.3444 14.6916 11.3906 14.625 11.3906H14.4531C14.3151 11.3906 14.2031 11.5026 14.2031 11.6406V12.8281C14.2031 12.9662 14.3151 13.0781 14.4531 13.0781H14.9062L15.0005 13.0753C15.8109 13.0266 16.4531 12.3539 16.4531 11.5312V3.09375L16.4503 2.99952ZM11.5312 4.92188H3.09375C2.23943 4.92188 1.54688 5.61443 1.54688 6.46875V14.9062C1.54688 15.7606 2.23943 16.4531 3.09375 16.4531H11.5312C12.3856 16.4531 13.0781 15.7606 13.0781 14.9062V6.46875C13.0781 5.61443 12.3856 4.92188 11.5312 4.92188ZM3.37032 6.615H11.2635C11.3361 6.615 11.395 6.6739 11.395 6.74655V14.6397C11.395 14.7124 11.3361 14.7712 11.2635 14.7712H3.37032C3.29767 14.7712 3.23877 14.7124 3.23877 14.6397V6.74655C3.23877 6.6739 3.29767 6.615 3.37032 6.615ZM4.5 8.5C4.5 8.27909 4.67909 8.1 4.9 8.1H9.725C9.94591 8.1 10.125 8.27909 10.125 8.5V9.5C10.125 9.72091 9.94591 9.9 9.725 9.9H4.9C4.67909 9.9 4.5 9.72091 4.5 9.5V8.5ZM4.9 11.475C4.67909 11.475 4.5 11.6541 4.5 11.875V12.875C4.5 13.0959 4.67909 13.275 4.9 13.275H9.725C9.94591 13.275 10.125 13.0959 10.125 12.875V11.875C10.125 11.6541 9.94591 11.475 9.725 11.475H4.9Z",fill:"currentColor","fill-opacity":"1"})],-1)])]),Y("div",{class:"context-menu-item ask-ai",onClick:St,title:"Ask AI"},[...N[9]||(N[9]=[ll('',1)])]),Y("div",{class:"context-menu-item delete",onClick:yt,title:"Delete"},[...N[10]||(N[10]=[Y("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[Y("path",{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z",fill:"currentColor"}),Y("path",{"fill-rule":"evenodd",d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z",fill:"currentColor"})],-1)])])],4)):yr("",!0),y.value?(Fe(),He("div",{key:5,class:"image-preview-modal",onClick:q},[Y("div",{class:"image-preview-content",onClick:N[1]||(N[1]=W0(()=>{},["stop"]))},[Y("div",R7,[Y("span",O7,Zt(w.value),1),Y("button",{onClick:q,class:"image-preview-close"},"×")]),Y("div",_7,[k.value?(Fe(),He("div",L7,[...N[11]||(N[11]=[Y("div",{class:"loading-spinner"},null,-1),Y("p",null,"加载图片中...",-1)])])):I.value?(Fe(),He("div",z7,[N[12]||(N[12]=Y("p",null,"❌ 图片加载失败",-1)),Y("p",null,Zt(I.value),1),Y("button",{onClick:Se,class:"retry-button"},"重试")])):(Fe(),He("img",{key:2,src:C.value,alt:w.value,class:"preview-image",onLoad:le,onError:me},null,40,$7))])])])):yr("",!0)]))}},B7=Wo(F7,[["__scopeId","data-v-c91e9bec"]]),P7="modulepreload",H7=function(t){return"/"+t},Uc={},Vc=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(s=>{if(s=H7(s),s in Uc)return;Uc[s]=!0;const a=s.endsWith(".css"),o=a?'[rel="stylesheet"]':"";if(!!n)for(let u=i.length-1;u>=0;u--){const f=i[u];if(f.href===s&&(!a||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${o}`))return;const c=document.createElement("link");if(c.rel=a?"stylesheet":P7,a||(c.as="script",c.crossOrigin=""),c.href=s,document.head.appendChild(c),a)return new Promise((u,f)=>{c.addEventListener("load",u),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e()).catch(s=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s})};const q7={class:"ai-sidebar-wrapper"},j7=["title"],U7={key:0,width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},V7={key:1,width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},W7={class:"sidebar-content"},G7={class:"section"},K7={class:"input-group"},Y7={key:0,class:"file-info"},X7={class:"file-details"},J7={class:"file-info-left"},Z7={class:"file-name"},Q7={class:"file-size"},eg={class:"button-group file-action-buttons"},tg=["disabled"],rg={key:0},ng={key:1},ig={key:0,class:"section"},sg={class:"history-list"},ag=["onClick"],og={class:"history-title"},lg={class:"history-time"},cg={class:"section"},ug={class:"input-group"},dg={class:"button-group"},hg=["disabled"],fg={key:0},pg={key:1},mg={class:"section"},gg={key:0,class:"processing-status"},vg={class:"result-container"},bg={class:"json-result"},yg={class:"button-group"},wg=["disabled"],xg={__name:"AISidebar",emits:["start-realtime-generation"],setup(t,{emit:e}){const r=e,n=Re(!1),i=Re(""),s=Re(""),a=Re(""),o=Re(!1),l=Re(!1),c=Re([]),u=Re(!1);Re(""),Re("");const f=Re(!1),p=Re(""),g=Re(null),v=Re(null),x=()=>{n.value=!n.value,window.dispatchEvent(new CustomEvent("ai-sidebar-toggle",{detail:{isCollapsed:n.value}}))},y=j=>{const G=j.target.files[0];G&&(v.value=G,ge("文件上传成功!","success"))},C=j=>{j.preventDefault(),u.value=!1;const G=j.dataTransfer.files;if(G.length>0){const J=G[0],ne=[".txt",".md",".doc",".docx",".pdf"],be="."+J.name.split(".").pop().toLowerCase();ne.includes(be)?(v.value=J,ge("文件拖拽上传成功!","success")):ge("不支持的文件格式!请上传 .txt, .md, .doc, .docx, .pdf 格式的文件","error")}},w=j=>{j.preventDefault(),u.value=!0},k=j=>{j.preventDefault(),u.value=!1},I=()=>{v.value=null,g.value&&(g.value.value="")},R=j=>{if(j===0)return"0 Bytes";const G=1024,J=["Bytes","KB","MB","GB"],ne=Math.floor(Math.log(j)/Math.log(G));return parseFloat((j/Math.pow(G,ne)).toFixed(2))+" "+J[ne]},_=async()=>{if(!v.value){ge("请先上传文件","error");return}o.value=!0,r("start-realtime-generation");try{const j=await F(v.value);s.value="";const G=`你是一个专业的文档分析专家。请分析上传的文档内容,生成结构化的Markdown格式思维导图。要求: +1. 提取主要主题和关键概念 +2. 组织成层次分明的结构 +3. 使用清晰的标题和子标题 +4. 保持内容的逻辑性和完整性 +5. 对于长文档,请确保完整处理所有内容,不要截断 +6. **重要:如果原文档中包含图片,请按以下方式处理: + - 识别图片在文档中的位置和上下文 + - 根据图片内容生成准确的描述文字 + - 在相应位置插入图片占位符:![图片描述](图片路径) + - 图片描述要准确反映图片内容,图片路径可以是相对路径或占位符 + - 确保图片占位符放在逻辑上合适的位置** +7. **重要:如果原文档中包含表格,请完整保留表格结构: + - 保持表格的Markdown格式 + - 确保所有表格行都被包含 + - 不要省略任何表格内容 + - 对于合并单元格的表格,请使用HTML格式并正确使用rowspan和colspan属性 + - 如果表格结构复杂,优先使用HTML table标签而不是Markdown表格语法** +8. **重要:确保内容完整性: + - 不要截断任何内容 + - 保持原文的完整性 + - 所有重要信息都要包含在思维导图中** +9. 输出格式:直接输出Markdown内容,不要添加任何说明文字或代码块标记`,J=`请分析以下文档内容并生成结构化Markdown: + +${j}`;await me(G,J),await ze(),ht(v.value.name,s.value),setTimeout(async()=>{try{await Ye()}catch(ne){console.error("自动保存失败:",ne)}},1500)}catch(j){console.error("从文件生成Markdown失败:",j),ge("生成失败: "+j.message,"error")}finally{o.value=!1}},F=j=>new Promise(async(G,J)=>{try{const ne=j.type.includes("text")||j.name.endsWith(".txt")||j.name.endsWith(".md"),be=j.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||j.type==="application/msword"||j.name.endsWith(".docx")||j.name.endsWith(".doc"),S=j.type==="application/pdf"||j.name.endsWith(".pdf");if(ne){const M=new FileReader;M.onload=z=>G(z.target.result),M.onerror=()=>J(new Error("文本文件读取失败")),M.readAsText(j)}else if(be){const M=await V(j);G(M)}else if(S){const M=await q(j);G(M)}else{const M=new FileReader;M.onload=z=>G(z.target.result),M.onerror=()=>J(new Error("文件读取失败")),M.readAsText(j)}}catch(ne){J(ne)}}),V=async j=>{try{if(j.name.endsWith(".docx")){const G=await Vc(()=>import("./index-1fbb466c.js").then(be=>be.i),[]),J=await j.arrayBuffer();return(await G.extractRawText({arrayBuffer:J})).value}else if(j.name.endsWith(".doc"))throw new Error("请将.doc文件转换为.docx格式,或安装相应的解析库")}catch(G){throw new Error(`Office文档解析失败: ${G.message}`)}},q=async j=>{try{const G=await Vc(()=>import("./pdf-bfa933f7.js"),[]);G.GlobalWorkerOptions.workerSrc="/pdf.worker.min.mjs";const J=await j.arrayBuffer(),ne=await G.getDocument({data:J}).promise;let be="";for(let S=1;S<=ne.numPages;S++){const H=(await(await ne.getPage(S)).getTextContent()).items.map(B=>B.str).join(" ");be+=H+` +`}return be}catch(G){throw new Error(`PDF文件解析失败: ${G.message}`)}},le=j=>j&&j.replace(/^好的[,,]?作为.*?专家[,,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^好的[,,]?作为.*?专业的.*?专家[,,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^以下是.*?结构化的.*?思维导图[::]\s*/i,"").replace(/^以下是.*?Markdown.*?思维导图[::]\s*/i,"").replace(/^以下是.*?Markdown.*?格式.*?思维导图[::]\s*/i,"").replace(/^```(?:markdown)?\s*/gm,"").replace(/```\s*$/gm,"").replace(/^「」`markdown\s*/gm,"").replace(/^「」`\s*/gm,"").replace(/^\s*「」`markdown\s*/gm,"").replace(/^\s*「」`\s*/gm,"").replace(/^作为.*?专家[,,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^我已.*?分析.*?内容.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^根据.*?文档内容.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^基于.*?文档.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^以下是.*?分析.*?结果[::]\s*/i,"").replace(/^以下是.*?整理.*?结果[::]\s*/i,"").replace(/^以下是.*?结构化.*?内容[::]\s*/i,"").replace(/\n{3,}/g,` + +`).trim(),me=async(j,G)=>{const ne=j||`你是一位Markdown格式转换专家。你的任务是将用户提供的文章内容精确转换为结构化的Markdown格式。请遵循以下步骤: + +提取主标题: 识别文章最顶层的主标题(通常为文章题目或书名),并使用Markdown的 # 级别表示。 + +识别层级标题: 从文章内容中提取所有层级的内容标题(从主标题后的第一个标题开始,Level 1 至 Level 4)。判断层级依据: + +视觉与结构特征: 如独立成行/段、位置(行首)、格式(加粗、编号如 1., 1.1, (1), - 等)。 + +语义逻辑: 标题之间的包含和并列关系。 + +在Markdown中,使用相应标题级别: + +Level 1 标题用 ## + +Level 2 标题用 ### + +Level 3 标题用 #### + +Level 4 标题用 ##### + +精确保留原文标题文字,不得修改、概括或润色。 + +处理正文内容: 对于每个标题下的正文内容区块(从该标题后开始,直到下一个同级或更高级别标题前): + +直接保留原文文本,但根据内容结构适当格式化为Markdown。 + +如果内容是列表(如项目符号或编号列表),使用Markdown列表语法(例如 - 用于无序列表,1. 用于有序列表)。 + +保持段落和换行不变。 + +**重要:如果原文档中包含图片,请按以下方式处理: +1. 识别图片在文档中的位置和上下文 +2. 根据图片内容生成准确的描述文字 +3. 在相应位置插入图片占位符:![图片描述](图片路径) +4. 图片描述要准确反映图片内容,图片路径可以是相对路径或占位符 +5. 确保图片占位符放在逻辑上合适的位置** + +输出格式: 输出必须是纯Markdown格式的文本,不得包含任何额外说明、JSON或非Markdown元素。确保输出与示例风格一致。直接输出Markdown内容,不要添加任何说明文字。`,be=G||"请将以下内容转换为结构化的Markdown格式:";try{const S=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:ne,user_prompt:be,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!S.ok)throw new Error(`HTTP error! status: ${S.status}`);const M=S.body.getReader(),z=new TextDecoder;let H="",B=0;for(;;){const{done:U,value:Z}=await M.read();if(U)break;H+=z.decode(Z,{stream:!0});const ee=H.split(` +`);H=ee.pop()||"";for(const re of ee)if(re.startsWith("data: "))try{const K=JSON.parse(re.slice(6));if(K.type==="start")ge("AI开始生成内容...","info");else if(K.type==="chunk"){if(B++,s.value+=K.content,B%5===0)try{const oe=le(s.value),ae=Oe(oe);a.value=JSON.stringify(ae,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:ae,title:ae.topic||"AI生成中...",source:"ai-streaming",chunkCount:B}}))}catch(oe){console.warn("⚠️ 实时转换JSON失败:",oe)}}else if(K.type==="end"){ge("AI内容生成完成!","success");try{const oe=le(s.value);console.log("🎯 最终内容长度:",oe.length),console.log("🎯 最终内容预览:",oe.substring(0,500)+"...");const ae=Le(oe);console.log(`🖼️ 最终统计:共发现 ${ae.length} 张图片`);const pe=Oe(oe);a.value=JSON.stringify(pe,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:pe,title:pe.topic||"AI生成完成",source:"ai-final",chunkCount:B}}))}catch(oe){console.error("⚠️ 最终处理失败:",oe)}}else if(K.type==="error")throw new Error(K.content)}catch(K){console.warn("解析流式数据失败:",K)}}}catch(S){throw console.error("流式AI API调用失败:",S),S}},Se=j=>{if(j.includes("|")&&j.includes("-")){const G=j.split(` +`);let J=!1,ne=!1;for(const be of G){const S=be.trim();S.includes("|")&&S.split("|").length>=3&&(J=!0),S.includes("|")&&S.includes("-")&&/^[\s\|\-\:]+$/.test(S)&&(ne=!0)}if(J&&ne)return console.log("🚫 formatMarkdownToText: 检测到表格内容,跳过转换"),j}return j.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(G,J)=>{if(J.includes(":")){const ne=J.split(":");if(ne.length>1)return`【${ne[0]}】: ${ne.slice(1).join(":")}`}return`【${J}】`}).replace(/\*(.*?)\*/g,"《$1》").replace(/^- (.*$)/gim," • $1").replace(/^\d+\. (.*$)/gim," $&").replace(/```(.*?)```/gims,"💻 $1").replace(/`(.*?)`/g,"「$1」").replace(/\[([^\]]+)\]\([^)]+\)/g,"🔗 $1").replace(/!\[([^\]]*)\]\(([^)]+)\)/g,"[图片: $1]").replace(/\n\n/g,` +`).replace(/\n/g,` + `).split(` +`).map(G=>G.length>80?G.substring(0,77)+"...":G).join(` +`).trim()},ze=async()=>{if(!s.value.trim()){ge("请输入Markdown内容","error");return}l.value=!0;try{const j=le(s.value),G=Oe(j);a.value=JSON.stringify(G,null,2)}catch(j){console.error("转换失败:",j),ge("转换失败,请检查Markdown格式","error")}finally{l.value=!1}},Le=j=>{const G=/!\[([^\]]*)\]\(([^)]+)\)/g,J=[];let ne;for(;(ne=G.exec(j))!==null;){const be=ne[2],S=ne[1]||"";be&&be.trim()&&(be.startsWith("http")||be.startsWith("data:")||be.startsWith("/"))?(J.push({alt:S,url:be.trim(),fullMatch:ne[0]}),console.log(`✅ 有效图片URL: ${be}`)):console.warn(`⚠️ 跳过无效的图片URL: ${be}`)}return console.log(`🔍 从内容中提取到 ${J.length} 张图片:`,J),J},Ge=j=>j.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,"").trim(),Oe=j=>{const G=j.split(` +`);let J=null;const ne=[];let be=0,S=[];if(G.forEach((M,z)=>{const H=M.trim(),B=H.match(/^(#{1,6})\s+(.+)$/);if(B){if(S.length>0&&ne.length>0){const oe=S.join(` +`).trim();oe&&(be=xe(oe,ne[ne.length-1],be).nodeCounter),S=[]}const U=B[1].length,Z=B[2].trim(),ee=Le(Z),re=Ge(Se(Z));ee.length>0&&console.log(`🖼️ 在标题中发现 ${ee.length} 张图片: ${Z}`);const K={id:`node_${be++}`,topic:re,children:[],level:U,data:{}};if(ee.length>0){const oe=ee[0];oe.url&&oe.url.trim()!==""?(K.image={url:oe.url,width:200,height:150,fit:"contain"},console.log(`✅ 成功为标题节点设置图片: ${oe.url}`)):console.error("❌ 标题图片URL无效:",oe)}if(U===1&&!J)J=K,ne.length=0,ne.push(J);else{for(;ne.length>1&&ne[ne.length-1].level>=U;)ne.pop();ne.length>0&&ne[ne.length-1].children.push(K),ne.push(K)}}else H&&S.push(H)}),S.length>0&&ne.length>0){const M=S.join(` +`).trim();M&&(M.includes("|")&&console.log("🔍 处理最后的内容(包含表格):",M.substring(0,200)+"..."),be=xe(M,ne[ne.length-1],be).nodeCounter)}return J||(J={id:"root",topic:"根节点",children:[],data:{}}),J},xe=(j,G,J)=>{const ne=Le(j);if(ne.length>0){console.log(`🖼️ 在内容中发现 ${ne.length} 张图片`),ne.forEach((H,B)=>{console.log(`🖼️ 处理图片 ${B+1}:`,{alt:H.alt,url:H.url,urlLength:H.url.length});let U=H.url;U.includes("cdn-mineru.openxlab.org.cn")&&(U=`/proxy-image${U.replace("https://cdn-mineru.openxlab.org.cn","")}`,console.log(`🔄 转换图片URL: ${H.url} -> ${U}`));const Z={id:`node_${J++}`,topic:H.alt||`图片 ${B+1}`,children:[],level:(G.level||0)+1,image:{url:U,width:200,height:150,fit:"contain"},data:{}};if(!Z.image.url||Z.image.url.trim()===""){console.error(`❌ 图片节点 ${B+1} URL为空:`,Z);return}G.children.push(Z),console.log(`✅ 成功创建图片节点: ${Z.topic} - ${U}`)});const z=Ge(j);return z.trim()&&(J=xe(z,G,J).nodeCounter),{nodeCounter:J}}if(fe(j)){console.log("🎯 检测到表格内容,创建表格节点");const z=C0(j);console.log("🎯 表格HTML内容:",z);const H={id:`node_${J++}`,topic:"",dangerouslySetInnerHTML:z,children:[],level:(G.level||0)+1,data:{}};return G.children.push(H),{nodeCounter:J}}const be=j.split(` +`);let S=J,M=[];for(let z=0;z0){const oe=Se(re.join(` +`));ee.topic=ee.topic+` + +`+oe}G.children.push(ee),z=K-1}else B&&M.push(B)}if(M.length>0){const z=M.join(` +`).trim();if(z)if(fe(z)){console.log("🎯 检测到表格内容,创建表格节点");const H=C0(z);console.log("🎯 表格HTML内容:",H);const B={id:`node_${S++}`,topic:"",dangerouslySetInnerHTML:H,children:[],level:(G.level||0)+1,data:{}};G.children.push(B)}else z.split(` + +`).filter(B=>B.trim()).forEach(B=>{const U=Se(B.trim());if(U){const Z={id:`node_${S++}`,topic:U,children:[],level:(G.level||0)+1,data:{}};G.children.push(Z)}})}return{nodeCounter:S}},fe=j=>{if(!j||typeof j!="string")return!1;if(j.includes("=3&&(ne=!0,console.log("✅ 找到表格行:",B)),B.includes("|")&&B.includes("-")&&/^[\s\|\-\:]+$/.test(B)&&(be=!0,console.log("✅ 找到分隔符行:",B))}const S=(j.match(/\|/g)||[]).length,M=S>=4,z=ne&&be||ne&&M;return console.log("🔍 表格检测结果:",{hasTableRow:ne,hasSeparator:be,pipeCount:S,hasMultiplePipes:M,result:z}),z},je=async()=>{if(!s.value){ge("没有Markdown内容可复制","error");return}try{await navigator.clipboard.writeText(s.value),ge("Markdown已复制到剪贴板","success")}catch{const G=document.createElement("textarea");G.value=s.value,document.body.appendChild(G),G.select(),document.execCommand("copy"),G.remove(),ge("Markdown已复制到剪贴板","success")}},Be=async()=>{try{await navigator.clipboard.writeText(a.value),ge("JSON已复制到剪贴板","success")}catch(j){console.error("复制失败:",j),ge("复制失败","error")}},Ye=async()=>{if(!a.value){ge("请先生成或转换JSON数据","error");return}try{const j=JSON.parse(a.value),G=j.topic||j.title||`AI生成的思维导图_${new Date().toLocaleString()}`,J=new CustomEvent("save-preview-to-database",{detail:{data:j,title:G,source:"ai-generated",timestamp:Date.now()}});window.dispatchEvent(J),setTimeout(()=>{ge("思维导图已保存成功!","success"),v.value=null,g.value&&(g.value.value="")},2e3)}catch(j){console.error("JSON解析失败:",j),ge("JSON格式错误,请检查数据","error")}},ge=(j,G="info")=>{const J=document.createElement("div");switch(J.className=`notification notification-${G}`,J.textContent=j,J.style.cssText=` + position: fixed; + top: 20px; + right: 20px; + padding: 12px 20px; + border-radius: 8px; + font-size: 14px; + font-weight: 500; + z-index: 10000; + box-shadow: 0 4px 12px rgba(0,0,0,0.15); + animation: slideIn 0.3s ease; + max-width: 300px; + word-wrap: break-word; + `,G){case"success":J.style.background="#4CAF50",J.style.color="white";break;case"error":J.style.background="#f44336",J.style.color="white";break;case"info":default:J.style.background="#2196F3",J.style.color="white";break}if(!document.querySelector("#notification-styles")){const ne=document.createElement("style");ne.id="notification-styles",ne.textContent=` + @keyframes slideIn { + from { transform: translateX(100%); opacity: 0; } + to { transform: translateX(0); opacity: 1; } + } + @keyframes slideOut { + from { transform: translateX(0); opacity: 1; } + to { transform: translateX(100%); opacity: 0; } + } + `,document.head.appendChild(ne)}document.body.appendChild(J),setTimeout(()=>{J.style.animation="slideOut 0.3s ease",setTimeout(()=>{J.parentNode&&J.parentNode.removeChild(J)},300)},3e3)},Ft=()=>{s.value="",a.value="",ge("内容已清空","info")},ht=(j,G,J=null)=>{const ne={title:j,content:G,mindmapId:J,timestamp:new Date};c.value.unshift(ne),c.value.length>10&&(c.value=c.value.slice(0,10)),localStorage.setItem("ai-sidebar-history",JSON.stringify(c.value))},yt=async j=>{j.mindmapId?window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{mindmapId:j.mindmapId,title:j.title}})):(s.value=j.content,await ze(),window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{markdown:j.content,json:a.value,title:j.title}})))},St=j=>new Date(j).toLocaleString("zh-CN");Ka(()=>{const j=localStorage.getItem("ai-sidebar-history");if(j)try{c.value=JSON.parse(j)}catch(G){console.error("加载历史记录失败:",G)}window.addEventListener("add-to-history",G=>{const{title:J,content:ne,timestamp:be}=G.detail;ht(J,ne,null)}),window.addEventListener("mindmap-saved",G=>{const{mindmapId:J,title:ne,timestamp:be}=G.detail,S=c.value.find(M=>M.title===ne||M.timestamp&&Math.abs(M.timestamp-be)<5e3);S?(S.mindmapId=J,localStorage.setItem("ai-sidebar-history",JSON.stringify(c.value))):ht(ne,"",J)}),m0(i,(G,J)=>{}),m0(s,(G,J)=>{})});const lt=async()=>{try{const j=await fetch("http://127.0.0.1:8000/api/ai/test-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({test:"data"})});if(!j.ok)throw new Error(`HTTP error! status: ${j.status}`);const G=j.body.getReader(),J=new TextDecoder;let ne="";for(;;){const{done:be,value:S}=await G.read();if(be)break;ne+=J.decode(S,{stream:!0});const M=ne.split(` +`);ne=M.pop()||"";for(const z of M)if(z.startsWith("data: "))try{const H=JSON.parse(z.slice(6))}catch(H){console.warn("解析测试数据失败:",H)}}}catch(j){console.error("❌ 测试流式API失败:",j)}};return window.testStreamAPI=lt,(j,G)=>(Fe(),He("div",q7,[Y("div",{class:"sidebar-toggle",onClick:x,title:n.value?"展开AI助手":"折叠AI助手",style:Un({left:n.value?"10px":"420px"})},[n.value?(Fe(),He("svg",U7,[...G[1]||(G[1]=[Y("path",{d:"M9 18l6-6-6-6"},null,-1)])])):(Fe(),He("svg",V7,[...G[2]||(G[2]=[Y("path",{d:"M15 18l-6-6 6-6"},null,-1)])]))],12,j7),Y("div",{class:Vn(["ai-sidebar",{"sidebar-collapsed":n.value}])},[Ei(Y("div",W7,[G[12]||(G[12]=Y("div",{class:"sidebar-header"},[Y("h3",null,"🤖 AI 助手"),Y("p",null,"文档转思维导图工具"),Y("div",{class:"collapse-hint"},[Y("small",null,"💡 点击右侧按钮可折叠侧边栏")])],-1)),Y("div",G7,[G[6]||(G[6]=Y("h4",null,"📁 生成思维导图",-1)),Y("div",K7,[G[4]||(G[4]=Y("label",null,"上传文件:",-1)),Y("div",{class:"file-upload-area",onDrop:C,onDragover:w,onDragleave:k},[Y("input",{type:"file",ref_key:"fileInput",ref:g,onChange:y,accept:".txt,.md,.doc,.docx,.pdf",class:"file-input"},null,544),Y("div",{class:Vn(["file-upload-placeholder",{"drag-over":u.value}])},[...G[3]||(G[3]=[Y("span",{class:"upload-icon"},"📎",-1),Y("span",{class:"upload-text"},"点击选择文件或拖拽文件到此处",-1),Y("span",{class:"upload-hint"},"支持 .txt, .md, .doc, .docx, .pdf 格式",-1)])],2)],32)]),v.value?(Fe(),He("div",Y7,[Y("div",X7,[Y("div",J7,[Y("span",Z7,"📄 "+Zt(v.value.name),1),Y("span",Q7,"("+Zt(R(v.value.size))+")",1)]),Y("button",{onClick:I,class:"btn-remove",title:"删除文件"},[...G[5]||(G[5]=[Y("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[Y("path",{d:"M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6"})],-1)])])])])):yr("",!0),Y("div",eg,[Y("button",{onClick:_,disabled:!v.value||o.value,class:"btn-primary"},[o.value?(Fe(),He("span",rg,"AI生成中...")):(Fe(),He("span",ng,"AI生成思维导图"))],8,tg)])]),c.value.length>0?(Fe(),He("div",ig,[G[7]||(G[7]=Y("h4",null,"📚 历史记录",-1)),Y("div",sg,[(Fe(!0),He(cr,null,Au(c.value,(J,ne)=>(Fe(),He("div",{key:ne,class:"history-item",onClick:be=>yt(J)},[Y("div",og,Zt(J.title),1),Y("div",lg,Zt(St(J.timestamp)),1)],8,ag))),128))])])):yr("",!0),Y("div",cg,[G[9]||(G[9]=Y("h4",null,"📝 AI生成的Markdown结果",-1)),Y("div",ug,[G[8]||(G[8]=Y("label",null,"Markdown内容:",-1)),Ei(Y("textarea",{"onUpdate:modelValue":G[0]||(G[0]=J=>s.value=J),placeholder:"AI生成的Markdown内容将显示在这里",rows:"6",readonly:"",class:"markdown-result"},null,512),[[eo,s.value]])]),Y("div",dg,[Y("button",{onClick:ze,disabled:l.value,class:"btn-secondary"},[l.value?(Fe(),He("span",fg,"转换中...")):(Fe(),He("span",pg,"🔄 转换为JSON"))],8,hg),Y("button",{onClick:Ft,class:"btn-clear"},"清空"),Y("button",{onClick:je,class:"btn-copy"},"📋 复制Markdown")])]),Y("div",mg,[G[11]||(G[11]=Y("h4",null,"📊 Markdown转JSON结果",-1)),f.value?(Fe(),He("div",gg,[G[10]||(G[10]=Y("div",{class:"spinner"},null,-1)),Y("span",null,Zt(p.value),1)])):yr("",!0),Y("div",vg,[Y("pre",bg,Zt(a.value||"JSON转换结果将显示在这里"),1),Y("div",yg,[Y("button",{onClick:Be,class:"btn-copy"},"📋 复制JSON"),Y("button",{onClick:Ye,disabled:f.value,class:"btn-copy"},Zt(f.value?"处理中...":"👁️ 预览"),9,wg)])])])],512),[[Qf,!n.value]])],2)]))}},kg=Wo(xg,[["__scopeId","data-v-28c77d5e"]]);const Sg={class:"markdown-test"},Tg={class:"test-section"},Eg={class:"test-section"},Ag=["innerHTML"],Cg={class:"test-section"},Mg={class:"test-cases"},Ng=["onClick"],Ig={__name:"MarkdownTest",setup(t){const e=Re(`# 测试标题 + +这是一个**粗体**和*斜体*的测试。 + +## 表格测试 + +| 产品 | 价格 | 库存 | +|------|------|------| +| 苹果 | 4元 | 100个 | +| 香蕉 | 2元 | 50个 | + +## 代码测试 + +\`\`\`javascript +function hello() { + console.log('Hello World!'); +} +\`\`\` + +行内代码:\`const name = 'test'\` + +## 列表测试 + +- 项目1 +- 项目2 + - 子项目2.1 + - 子项目2.2 +- 项目3 + +## 链接测试 + +- [GitHub](https://github.com) +- [Vue.js](https://vuejs.org)`),r=Re([{name:"基础表格",content:`# 产品价格表 + +| 产品 | 价格 | +|------|------| +| 苹果 | 4元 | +| 香蕉 | 2元 |`},{name:"复杂表格",content:`# 技术栈对比 + +| 技术 | 前端 | 后端 | 数据库 | +|------|------|------|--------| +| Vue.js | ✅ | ❌ | ❌ | +| Django | ❌ | ✅ | ❌ | +| PostgreSQL | ❌ | ❌ | ✅ |`},{name:"代码块",content:`# 代码示例 + +\`\`\`javascript +function markdownToJSON(markdown) { + const lines = markdown.split('\\n'); + // 处理逻辑... + return result; +} +\`\`\``},{name:"混合内容",content:`# 混合内容测试 + +这是一个包含**粗体**、*斜体*和\`行内代码\`的段落。 + +## 表格 + +| 功能 | 状态 | 说明 | +|------|------|------| +| 表格渲染 | ✅ | 支持markdown表格 | +| 代码高亮 | ✅ | 支持代码块 | + +## 代码 + +\`\`\`python +def hello_world(): + print("Hello, World!") +\`\`\``}]),n=Yu(()=>{if(!e.value)return"";try{return C0(e.value)}catch(a){return`
    渲染失败: ${a.message}
    `}}),i=()=>{},s=a=>{e.value=a.content};return(a,o)=>(Fe(),He("div",Sg,[o[4]||(o[4]=Y("h2",null,"Markdown渲染测试",-1)),Y("div",Tg,[o[1]||(o[1]=Y("h3",null,"输入Markdown内容",-1)),Ei(Y("textarea",{"onUpdate:modelValue":o[0]||(o[0]=l=>e.value=l),placeholder:"输入markdown内容...",rows:"10",class:"markdown-input"},null,512),[[eo,e.value]])]),Y("div",Eg,[o[2]||(o[2]=Y("h3",null,"渲染结果",-1)),Y("div",{class:"rendered-content",innerHTML:n.value},null,8,Ag)]),Y("div",Cg,[o[3]||(o[3]=Y("h3",null,"测试用例",-1)),Y("button",{onClick:i,class:"test-btn"},"加载测试用例"),Y("div",Mg,[(Fe(!0),He(cr,null,Au(r.value,(l,c)=>(Fe(),He("button",{key:c,onClick:u=>s(l),class:"test-case-btn"},Zt(l.name),9,Ng))),128))])])]))}},Dg=Wo(Ig,[["__scopeId","data-v-68a00828"]]);const Rg={id:"app"},Og={class:"test-mode-toggle",style:{display:"none"}},_g={key:0,class:"test-mode"},Lg={key:1},zg={class:"main-content"},$g={__name:"App",setup(t){const e=Re(null),r=Re(!1),n=()=>{r.value=!r.value},i=()=>{e.value&&e.value.showMindMapPage()};return(s,a)=>(Fe(),He("div",Rg,[a[0]||(a[0]=Wu("« ",-1)),Y("div",Og,[Y("button",{onClick:n,class:"test-btn"},Zt(r.value?"切换到思维导图":"测试Markdown渲染"),1)]),r.value?(Fe(),He("div",_g,[Xt(Dg)])):(Fe(),He("div",Lg,[Xt(kg,{onStartRealtimeGeneration:i}),Y("div",zg,[Xt(B7,{ref_key:"mindMapRef",ref:e},null,512)])]))]))}};yp($g).mount("#app");export{Vc as _,oc as c,Pg as g}; diff --git a/frontend/dist/assets/pdf-1a0ba5fc.js b/frontend/dist/assets/pdf-bfa933f7.js similarity index 99% rename from frontend/dist/assets/pdf-1a0ba5fc.js rename to frontend/dist/assets/pdf-bfa933f7.js index ad6ebdf..9d9214a 100644 --- a/frontend/dist/assets/pdf-1a0ba5fc.js +++ b/frontend/dist/assets/pdf-bfa933f7.js @@ -1,4 +1,4 @@ -var FA=Object.defineProperty;var NA=(u,t,e)=>t in u?FA(u,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[t]=e;var k=(u,t,e)=>(NA(u,typeof t!="symbol"?t+"":t,e),e),dp=(u,t,e)=>{if(!t.has(u))throw TypeError("Cannot "+e)};var n=(u,t,e)=>(dp(u,t,"read from private field"),e?e.call(u):t.get(u)),d=(u,t,e)=>{if(t.has(u))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(u):t.set(u,e)},p=(u,t,e,s)=>(dp(u,t,"write to private field"),s?s.call(u,e):t.set(u,e),e);var St=(u,t,e,s)=>({set _(i){p(u,t,i,e)},get _(){return n(u,t,s)}}),b=(u,t,e)=>(dp(u,t,"access private method"),e);import{_ as OA}from"./index-3d4f89fc.js";const ie=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),wp=[.001,0,0,.001,0,0],up=1.35,Pe={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},ki={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},Em="pdfjs_internal_editor_",$={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,POPUP:16,SIGNATURE:101,COMMENT:102},X={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_THICKNESS:32,HIGHLIGHT_FREE:33,HIGHLIGHT_SHOW_ALL:34,DRAW_STEP:41},BA={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},Ot={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},wd={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},wt={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},da={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},ep={ERRORS:0,WARNINGS:1,INFOS:5},Fl={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93,rawFillPath:94},ud={moveTo:0,lineTo:1,curveTo:2,closePath:3},HA={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let sp=ep.WARNINGS;function $A(u){Number.isInteger(u)&&(sp=u)}function zA(){return sp}function ip(u){sp>=ep.INFOS&&console.log(`Info: ${u}`)}function z(u){sp>=ep.WARNINGS&&console.log(`Warning: ${u}`)}function st(u){throw new Error(u)}function _t(u,t){u||st(t)}function GA(u){switch(u==null?void 0:u.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function Cm(u,t=null,e=null){if(!u)return null;if(e&&typeof u=="string"){if(e.addDefaultProtocol&&u.startsWith("www.")){const i=u.match(/\./g);(i==null?void 0:i.length)>=2&&(u=`http://${u}`)}if(e.tryConvertEncoding)try{u=XA(u)}catch{}}const s=t?URL.parse(u,t):URL.parse(u);return GA(s)?s:null}function Tm(u,t,e=!1){const s=URL.parse(u);return s?(s.hash=t,s.href):e&&Cm(u,"http://example.com")?u.split("#",1)[0]+`${t?`#${t}`:""}`:""}function V(u,t,e,s=!1){return Object.defineProperty(u,t,{value:e,enumerable:!s,configurable:!0,writable:!1}),e}const la=function(){function t(e,s){this.message=e,this.name=s}return t.prototype=new Error,t.constructor=t,t}();class sm extends la{constructor(t,e){super(t,"PasswordException"),this.code=e}}class fp extends la{constructor(t,e){super(t,"UnknownErrorException"),this.details=e}}class vp extends la{constructor(t){super(t,"InvalidPDFException")}}class Kd extends la{constructor(t,e,s){super(t,"ResponseException"),this.status=e,this.missing=s}}class UA extends la{constructor(t){super(t,"FormatError")}}class kn extends la{constructor(t){super(t,"AbortException")}}function xm(u){(typeof u!="object"||(u==null?void 0:u.length)===void 0)&&st("Invalid argument for bytesToString");const t=u.length,e=8192;if(t>24&255,u>>16&255,u>>8&255,u&255)}function VA(){const u=new Uint8Array(4);return u[0]=1,new Uint32Array(u.buffer,0,1)[0]===1}function WA(){try{return new Function(""),!0}catch{return!1}}class Wt{static get isLittleEndian(){return V(this,"isLittleEndian",VA())}static get isEvalSupported(){return V(this,"isEvalSupported",WA())}static get isOffscreenCanvasSupported(){return V(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return V(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get platform(){const{platform:t,userAgent:e}=navigator;return V(this,"platform",{isAndroid:e.includes("Android"),isLinux:t.includes("Linux"),isMac:t.includes("Mac"),isWindows:t.includes("Win"),isFirefox:e.includes("Firefox")})}static get isCSSRoundSupported(){var t,e;return V(this,"isCSSRoundSupported",(e=(t=globalThis.CSS)==null?void 0:t.supports)==null?void 0:e.call(t,"width: round(1.5px, 1px)"))}}const pp=Array.from(Array(256).keys(),u=>u.toString(16).padStart(2,"0"));var Sa,vd,Hl,_p;class I{static makeHexColor(t,e,s){return`#${pp[t]}${pp[e]}${pp[s]}`}static domMatrixToTransform(t){return[t.a,t.b,t.c,t.d,t.e,t.f]}static scaleMinMax(t,e){let s;t[0]?(t[0]<0&&(s=e[0],e[0]=e[2],e[2]=s),e[0]*=t[0],e[2]*=t[0],t[3]<0&&(s=e[1],e[1]=e[3],e[3]=s),e[1]*=t[3],e[3]*=t[3]):(s=e[0],e[0]=e[1],e[1]=s,s=e[2],e[2]=e[3],e[3]=s,t[1]<0&&(s=e[1],e[1]=e[3],e[3]=s),e[1]*=t[1],e[3]*=t[1],t[2]<0&&(s=e[0],e[0]=e[2],e[2]=s),e[0]*=t[2],e[2]*=t[2]),e[0]+=t[4],e[1]+=t[5],e[2]+=t[4],e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static multiplyByDOMMatrix(t,e){return[t[0]*e.a+t[2]*e.b,t[1]*e.a+t[3]*e.b,t[0]*e.c+t[2]*e.d,t[1]*e.c+t[3]*e.d,t[0]*e.e+t[2]*e.f+t[4],t[1]*e.e+t[3]*e.f+t[5]]}static applyTransform(t,e,s=0){const i=t[s],r=t[s+1];t[s]=i*e[0]+r*e[2]+e[4],t[s+1]=i*e[1]+r*e[3]+e[5]}static applyTransformToBezier(t,e,s=0){const i=e[0],r=e[1],a=e[2],o=e[3],l=e[4],h=e[5];for(let c=0;c<6;c+=2){const f=t[s+c],g=t[s+c+1];t[s+c]=f*i+g*a+l,t[s+c+1]=f*r+g*o+h}}static applyInverseTransform(t,e){const s=t[0],i=t[1],r=e[0]*e[3]-e[1]*e[2];t[0]=(s*e[3]-i*e[2]+e[2]*e[5]-e[4]*e[3])/r,t[1]=(-s*e[1]+i*e[0]+e[4]*e[1]-e[5]*e[0])/r}static axialAlignedBoundingBox(t,e,s){const i=e[0],r=e[1],a=e[2],o=e[3],l=e[4],h=e[5],c=t[0],f=t[1],g=t[2],m=t[3];let A=i*c+l,y=A,v=i*g+l,w=v,S=o*f+h,_=S,E=o*m+h,C=E;if(r!==0||a!==0){const T=r*c,x=r*g,P=a*f,M=a*m;A+=P,w+=P,v+=M,y+=M,S+=T,C+=T,E+=x,_+=x}s[0]=Math.min(s[0],A,v,y,w),s[1]=Math.min(s[1],S,E,_,C),s[2]=Math.max(s[2],A,v,y,w),s[3]=Math.max(s[3],S,E,_,C)}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t,e){const s=t[0],i=t[1],r=t[2],a=t[3],o=s**2+i**2,l=s*r+i*a,h=r**2+a**2,c=(o+h)/2,f=Math.sqrt(c**2-(o*h-l**2));e[0]=Math.sqrt(c+f||1),e[1]=Math.sqrt(c-f||1)}static normalizeRect(t){const e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){const s=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),i=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(s>i)return null;const r=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),a=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return r>a?null:[s,r,i,a]}static pointBoundingBox(t,e,s){s[0]=Math.min(s[0],t),s[1]=Math.min(s[1],e),s[2]=Math.max(s[2],t),s[3]=Math.max(s[3],e)}static rectBoundingBox(t,e,s,i,r){r[0]=Math.min(r[0],t,s),r[1]=Math.min(r[1],e,i),r[2]=Math.max(r[2],t,s),r[3]=Math.max(r[3],e,i)}static bezierBoundingBox(t,e,s,i,r,a,o,l,h){h[0]=Math.min(h[0],t,o),h[1]=Math.min(h[1],e,l),h[2]=Math.max(h[2],t,o),h[3]=Math.max(h[3],e,l),b(this,Hl,_p).call(this,t,s,r,o,e,i,a,l,3*(-t+3*(s-r)+o),6*(t-2*s+r),3*(s-t),h),b(this,Hl,_p).call(this,t,s,r,o,e,i,a,l,3*(-e+3*(i-a)+l),6*(e-2*i+a),3*(i-e),h)}}Sa=new WeakSet,vd=function(t,e,s,i,r,a,o,l,h,c){if(h<=0||h>=1)return;const f=1-h,g=h*h,m=g*h,A=f*(f*(f*t+3*h*e)+3*g*s)+m*i,y=f*(f*(f*r+3*h*a)+3*g*o)+m*l;c[0]=Math.min(c[0],A),c[1]=Math.min(c[1],y),c[2]=Math.max(c[2],A),c[3]=Math.max(c[3],y)},Hl=new WeakSet,_p=function(t,e,s,i,r,a,o,l,h,c,f,g){if(Math.abs(h)<1e-12){Math.abs(c)>=1e-12&&b(this,Sa,vd).call(this,t,e,s,i,r,a,o,l,-f/c,g);return}const m=c**2-4*f*h;if(m<0)return;const A=Math.sqrt(m),y=2*h;b(this,Sa,vd).call(this,t,e,s,i,r,a,o,l,(-c+A)/y,g),b(this,Sa,vd).call(this,t,e,s,i,r,a,o,l,(-c-A)/y,g)},d(I,Sa),d(I,Hl);function XA(u){return decodeURIComponent(escape(u))}let gp=null,im=null;function qA(u){return gp||(gp=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,im=new Map([["ſt","ſt"]])),u.replaceAll(gp,(t,e,s)=>e?e.normalize("NFKC"):im.get(s))}function km(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const u=new Uint8Array(32);return crypto.getRandomValues(u),xm(u)}const Hg="pdfjs_internal_id_";function YA(u,t,e){if(!Array.isArray(e)||e.length<2)return!1;const[s,i,...r]=e;if(!u(s)&&!Number.isInteger(s)||!t(i))return!1;const a=r.length;let o=!0;switch(i.name){case"XYZ":if(a<2||a>3)return!1;break;case"Fit":case"FitB":return a===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(a>1)return!1;break;case"FitR":if(a!==4)return!1;o=!1;break;default:return!1}for(const l of r)if(!(typeof l=="number"||o&&l===null))return!1;return!0}function ne(u,t,e){return Math.min(Math.max(u,t),e)}function Pm(u){return Uint8Array.prototype.toBase64?u.toBase64():btoa(xm(u))}function KA(u){return Uint8Array.fromBase64?Uint8Array.fromBase64(u):ad(atob(u))}typeof Promise.try!="function"&&(Promise.try=function(u,...t){return new Promise(e=>{e(u(...t))})});typeof Math.sumPrecise!="function"&&(Math.sumPrecise=function(u){return u.reduce((t,e)=>t+e,0)});const Is="http://www.w3.org/2000/svg",Fn=class Fn{};k(Fn,"CSS",96),k(Fn,"PDF",72),k(Fn,"PDF_TO_CSS_UNITS",Fn.CSS/Fn.PDF);let Pn=Fn;async function od(u,t="text"){if(gl(u,document.baseURI)){const e=await fetch(u);if(!e.ok)throw new Error(e.statusText);switch(t){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"json":return e.json()}return e.text()}return new Promise((e,s)=>{const i=new XMLHttpRequest;i.open("GET",u,!0),i.responseType=t,i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE){if(i.status===200||i.status===0){switch(t){case"arraybuffer":case"blob":case"json":e(i.response);return}e(i.responseText);return}s(new Error(i.statusText))}},i.send(null)})}class ld{constructor({viewBox:t,userUnit:e,scale:s,rotation:i,offsetX:r=0,offsetY:a=0,dontFlip:o=!1}){this.viewBox=t,this.userUnit=e,this.scale=s,this.rotation=i,this.offsetX=r,this.offsetY=a,s*=e;const l=(t[2]+t[0])/2,h=(t[3]+t[1])/2;let c,f,g,m;switch(i%=360,i<0&&(i+=360),i){case 180:c=-1,f=0,g=0,m=1;break;case 90:c=0,f=1,g=1,m=0;break;case 270:c=0,f=-1,g=-1,m=0;break;case 0:c=1,f=0,g=0,m=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}o&&(g=-g,m=-m);let A,y,v,w;c===0?(A=Math.abs(h-t[1])*s+r,y=Math.abs(l-t[0])*s+a,v=(t[3]-t[1])*s,w=(t[2]-t[0])*s):(A=Math.abs(l-t[0])*s+r,y=Math.abs(h-t[1])*s+a,v=(t[2]-t[0])*s,w=(t[3]-t[1])*s),this.transform=[c*s,f*s,g*s,m*s,A-c*s*l-g*s*h,y-f*s*l-m*s*h],this.width=v,this.height=w}get rawDims(){const t=this.viewBox;return V(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone({scale:t=this.scale,rotation:e=this.rotation,offsetX:s=this.offsetX,offsetY:i=this.offsetY,dontFlip:r=!1}={}){return new ld({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:t,rotation:e,offsetX:s,offsetY:i,dontFlip:r})}convertToViewportPoint(t,e){const s=[t,e];return I.applyTransform(s,this.transform),s}convertToViewportRectangle(t){const e=[t[0],t[1]];I.applyTransform(e,this.transform);const s=[t[2],t[3]];return I.applyTransform(s,this.transform),[e[0],e[1],s[0],s[1]]}convertToPdfPoint(t,e){const s=[t,e];return I.applyInverseTransform(s,this.transform),s}}class $g extends la{constructor(t,e=0){super(t,"RenderingCancelledException"),this.extraDelay=e}}function np(u){const t=u.length;let e=0;for(;e{try{return new URL(o)}catch{try{return new URL(decodeURIComponent(o))}catch{try{return new URL(o,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(o),"https://foo.bar")}catch{return null}}}}})(u);if(!s)return t;const i=o=>{try{let l=decodeURIComponent(o);return l.includes("/")?(l=l.split("/").at(-1),l.test(/^\.pdf$/i)?l:o):l}catch{return o}},r=/\.pdf$/i,a=s.pathname.split("/").at(-1);if(r.test(a))return i(a);if(s.searchParams.size>0){const o=Array.from(s.searchParams.values()).reverse();for(const h of o)if(r.test(h))return i(h);const l=Array.from(s.searchParams.keys()).reverse();for(const h of l)if(r.test(h))return i(h)}if(s.hash){const l=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(s.hash);if(l)return i(l[0])}return t}class nm{constructor(){k(this,"started",Object.create(null));k(this,"times",[])}time(t){t in this.started&&z(`Timer is already running for ${t}`),this.started[t]=Date.now()}timeEnd(t){t in this.started||z(`Timer has not been started for ${t}`),this.times.push({name:t,start:this.started[t],end:Date.now()}),delete this.started[t]}toString(){const t=[];let e=0;for(const{name:s}of this.times)e=Math.max(s.length,e);for(const{name:s,start:i,end:r}of this.times)t.push(`${s.padEnd(e)} ${r-i}ms +var FA=Object.defineProperty;var NA=(u,t,e)=>t in u?FA(u,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[t]=e;var k=(u,t,e)=>(NA(u,typeof t!="symbol"?t+"":t,e),e),dp=(u,t,e)=>{if(!t.has(u))throw TypeError("Cannot "+e)};var n=(u,t,e)=>(dp(u,t,"read from private field"),e?e.call(u):t.get(u)),d=(u,t,e)=>{if(t.has(u))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(u):t.set(u,e)},p=(u,t,e,s)=>(dp(u,t,"write to private field"),s?s.call(u,e):t.set(u,e),e);var St=(u,t,e,s)=>({set _(i){p(u,t,i,e)},get _(){return n(u,t,s)}}),b=(u,t,e)=>(dp(u,t,"access private method"),e);import{_ as OA}from"./index-c91f543d.js";const ie=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),wp=[.001,0,0,.001,0,0],up=1.35,Pe={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},ki={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},Em="pdfjs_internal_editor_",$={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,POPUP:16,SIGNATURE:101,COMMENT:102},X={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_THICKNESS:32,HIGHLIGHT_FREE:33,HIGHLIGHT_SHOW_ALL:34,DRAW_STEP:41},BA={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},Ot={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},wd={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},wt={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},da={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},ep={ERRORS:0,WARNINGS:1,INFOS:5},Fl={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93,rawFillPath:94},ud={moveTo:0,lineTo:1,curveTo:2,closePath:3},HA={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let sp=ep.WARNINGS;function $A(u){Number.isInteger(u)&&(sp=u)}function zA(){return sp}function ip(u){sp>=ep.INFOS&&console.log(`Info: ${u}`)}function z(u){sp>=ep.WARNINGS&&console.log(`Warning: ${u}`)}function st(u){throw new Error(u)}function _t(u,t){u||st(t)}function GA(u){switch(u==null?void 0:u.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function Cm(u,t=null,e=null){if(!u)return null;if(e&&typeof u=="string"){if(e.addDefaultProtocol&&u.startsWith("www.")){const i=u.match(/\./g);(i==null?void 0:i.length)>=2&&(u=`http://${u}`)}if(e.tryConvertEncoding)try{u=XA(u)}catch{}}const s=t?URL.parse(u,t):URL.parse(u);return GA(s)?s:null}function Tm(u,t,e=!1){const s=URL.parse(u);return s?(s.hash=t,s.href):e&&Cm(u,"http://example.com")?u.split("#",1)[0]+`${t?`#${t}`:""}`:""}function V(u,t,e,s=!1){return Object.defineProperty(u,t,{value:e,enumerable:!s,configurable:!0,writable:!1}),e}const la=function(){function t(e,s){this.message=e,this.name=s}return t.prototype=new Error,t.constructor=t,t}();class sm extends la{constructor(t,e){super(t,"PasswordException"),this.code=e}}class fp extends la{constructor(t,e){super(t,"UnknownErrorException"),this.details=e}}class vp extends la{constructor(t){super(t,"InvalidPDFException")}}class Kd extends la{constructor(t,e,s){super(t,"ResponseException"),this.status=e,this.missing=s}}class UA extends la{constructor(t){super(t,"FormatError")}}class kn extends la{constructor(t){super(t,"AbortException")}}function xm(u){(typeof u!="object"||(u==null?void 0:u.length)===void 0)&&st("Invalid argument for bytesToString");const t=u.length,e=8192;if(t>24&255,u>>16&255,u>>8&255,u&255)}function VA(){const u=new Uint8Array(4);return u[0]=1,new Uint32Array(u.buffer,0,1)[0]===1}function WA(){try{return new Function(""),!0}catch{return!1}}class Wt{static get isLittleEndian(){return V(this,"isLittleEndian",VA())}static get isEvalSupported(){return V(this,"isEvalSupported",WA())}static get isOffscreenCanvasSupported(){return V(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return V(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get platform(){const{platform:t,userAgent:e}=navigator;return V(this,"platform",{isAndroid:e.includes("Android"),isLinux:t.includes("Linux"),isMac:t.includes("Mac"),isWindows:t.includes("Win"),isFirefox:e.includes("Firefox")})}static get isCSSRoundSupported(){var t,e;return V(this,"isCSSRoundSupported",(e=(t=globalThis.CSS)==null?void 0:t.supports)==null?void 0:e.call(t,"width: round(1.5px, 1px)"))}}const pp=Array.from(Array(256).keys(),u=>u.toString(16).padStart(2,"0"));var Sa,vd,Hl,_p;class I{static makeHexColor(t,e,s){return`#${pp[t]}${pp[e]}${pp[s]}`}static domMatrixToTransform(t){return[t.a,t.b,t.c,t.d,t.e,t.f]}static scaleMinMax(t,e){let s;t[0]?(t[0]<0&&(s=e[0],e[0]=e[2],e[2]=s),e[0]*=t[0],e[2]*=t[0],t[3]<0&&(s=e[1],e[1]=e[3],e[3]=s),e[1]*=t[3],e[3]*=t[3]):(s=e[0],e[0]=e[1],e[1]=s,s=e[2],e[2]=e[3],e[3]=s,t[1]<0&&(s=e[1],e[1]=e[3],e[3]=s),e[1]*=t[1],e[3]*=t[1],t[2]<0&&(s=e[0],e[0]=e[2],e[2]=s),e[0]*=t[2],e[2]*=t[2]),e[0]+=t[4],e[1]+=t[5],e[2]+=t[4],e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static multiplyByDOMMatrix(t,e){return[t[0]*e.a+t[2]*e.b,t[1]*e.a+t[3]*e.b,t[0]*e.c+t[2]*e.d,t[1]*e.c+t[3]*e.d,t[0]*e.e+t[2]*e.f+t[4],t[1]*e.e+t[3]*e.f+t[5]]}static applyTransform(t,e,s=0){const i=t[s],r=t[s+1];t[s]=i*e[0]+r*e[2]+e[4],t[s+1]=i*e[1]+r*e[3]+e[5]}static applyTransformToBezier(t,e,s=0){const i=e[0],r=e[1],a=e[2],o=e[3],l=e[4],h=e[5];for(let c=0;c<6;c+=2){const f=t[s+c],g=t[s+c+1];t[s+c]=f*i+g*a+l,t[s+c+1]=f*r+g*o+h}}static applyInverseTransform(t,e){const s=t[0],i=t[1],r=e[0]*e[3]-e[1]*e[2];t[0]=(s*e[3]-i*e[2]+e[2]*e[5]-e[4]*e[3])/r,t[1]=(-s*e[1]+i*e[0]+e[4]*e[1]-e[5]*e[0])/r}static axialAlignedBoundingBox(t,e,s){const i=e[0],r=e[1],a=e[2],o=e[3],l=e[4],h=e[5],c=t[0],f=t[1],g=t[2],m=t[3];let A=i*c+l,y=A,v=i*g+l,w=v,S=o*f+h,_=S,E=o*m+h,C=E;if(r!==0||a!==0){const T=r*c,x=r*g,P=a*f,M=a*m;A+=P,w+=P,v+=M,y+=M,S+=T,C+=T,E+=x,_+=x}s[0]=Math.min(s[0],A,v,y,w),s[1]=Math.min(s[1],S,E,_,C),s[2]=Math.max(s[2],A,v,y,w),s[3]=Math.max(s[3],S,E,_,C)}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t,e){const s=t[0],i=t[1],r=t[2],a=t[3],o=s**2+i**2,l=s*r+i*a,h=r**2+a**2,c=(o+h)/2,f=Math.sqrt(c**2-(o*h-l**2));e[0]=Math.sqrt(c+f||1),e[1]=Math.sqrt(c-f||1)}static normalizeRect(t){const e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){const s=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),i=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(s>i)return null;const r=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),a=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return r>a?null:[s,r,i,a]}static pointBoundingBox(t,e,s){s[0]=Math.min(s[0],t),s[1]=Math.min(s[1],e),s[2]=Math.max(s[2],t),s[3]=Math.max(s[3],e)}static rectBoundingBox(t,e,s,i,r){r[0]=Math.min(r[0],t,s),r[1]=Math.min(r[1],e,i),r[2]=Math.max(r[2],t,s),r[3]=Math.max(r[3],e,i)}static bezierBoundingBox(t,e,s,i,r,a,o,l,h){h[0]=Math.min(h[0],t,o),h[1]=Math.min(h[1],e,l),h[2]=Math.max(h[2],t,o),h[3]=Math.max(h[3],e,l),b(this,Hl,_p).call(this,t,s,r,o,e,i,a,l,3*(-t+3*(s-r)+o),6*(t-2*s+r),3*(s-t),h),b(this,Hl,_p).call(this,t,s,r,o,e,i,a,l,3*(-e+3*(i-a)+l),6*(e-2*i+a),3*(i-e),h)}}Sa=new WeakSet,vd=function(t,e,s,i,r,a,o,l,h,c){if(h<=0||h>=1)return;const f=1-h,g=h*h,m=g*h,A=f*(f*(f*t+3*h*e)+3*g*s)+m*i,y=f*(f*(f*r+3*h*a)+3*g*o)+m*l;c[0]=Math.min(c[0],A),c[1]=Math.min(c[1],y),c[2]=Math.max(c[2],A),c[3]=Math.max(c[3],y)},Hl=new WeakSet,_p=function(t,e,s,i,r,a,o,l,h,c,f,g){if(Math.abs(h)<1e-12){Math.abs(c)>=1e-12&&b(this,Sa,vd).call(this,t,e,s,i,r,a,o,l,-f/c,g);return}const m=c**2-4*f*h;if(m<0)return;const A=Math.sqrt(m),y=2*h;b(this,Sa,vd).call(this,t,e,s,i,r,a,o,l,(-c+A)/y,g),b(this,Sa,vd).call(this,t,e,s,i,r,a,o,l,(-c-A)/y,g)},d(I,Sa),d(I,Hl);function XA(u){return decodeURIComponent(escape(u))}let gp=null,im=null;function qA(u){return gp||(gp=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,im=new Map([["ſt","ſt"]])),u.replaceAll(gp,(t,e,s)=>e?e.normalize("NFKC"):im.get(s))}function km(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const u=new Uint8Array(32);return crypto.getRandomValues(u),xm(u)}const Hg="pdfjs_internal_id_";function YA(u,t,e){if(!Array.isArray(e)||e.length<2)return!1;const[s,i,...r]=e;if(!u(s)&&!Number.isInteger(s)||!t(i))return!1;const a=r.length;let o=!0;switch(i.name){case"XYZ":if(a<2||a>3)return!1;break;case"Fit":case"FitB":return a===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(a>1)return!1;break;case"FitR":if(a!==4)return!1;o=!1;break;default:return!1}for(const l of r)if(!(typeof l=="number"||o&&l===null))return!1;return!0}function ne(u,t,e){return Math.min(Math.max(u,t),e)}function Pm(u){return Uint8Array.prototype.toBase64?u.toBase64():btoa(xm(u))}function KA(u){return Uint8Array.fromBase64?Uint8Array.fromBase64(u):ad(atob(u))}typeof Promise.try!="function"&&(Promise.try=function(u,...t){return new Promise(e=>{e(u(...t))})});typeof Math.sumPrecise!="function"&&(Math.sumPrecise=function(u){return u.reduce((t,e)=>t+e,0)});const Is="http://www.w3.org/2000/svg",Fn=class Fn{};k(Fn,"CSS",96),k(Fn,"PDF",72),k(Fn,"PDF_TO_CSS_UNITS",Fn.CSS/Fn.PDF);let Pn=Fn;async function od(u,t="text"){if(gl(u,document.baseURI)){const e=await fetch(u);if(!e.ok)throw new Error(e.statusText);switch(t){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"json":return e.json()}return e.text()}return new Promise((e,s)=>{const i=new XMLHttpRequest;i.open("GET",u,!0),i.responseType=t,i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE){if(i.status===200||i.status===0){switch(t){case"arraybuffer":case"blob":case"json":e(i.response);return}e(i.responseText);return}s(new Error(i.statusText))}},i.send(null)})}class ld{constructor({viewBox:t,userUnit:e,scale:s,rotation:i,offsetX:r=0,offsetY:a=0,dontFlip:o=!1}){this.viewBox=t,this.userUnit=e,this.scale=s,this.rotation=i,this.offsetX=r,this.offsetY=a,s*=e;const l=(t[2]+t[0])/2,h=(t[3]+t[1])/2;let c,f,g,m;switch(i%=360,i<0&&(i+=360),i){case 180:c=-1,f=0,g=0,m=1;break;case 90:c=0,f=1,g=1,m=0;break;case 270:c=0,f=-1,g=-1,m=0;break;case 0:c=1,f=0,g=0,m=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}o&&(g=-g,m=-m);let A,y,v,w;c===0?(A=Math.abs(h-t[1])*s+r,y=Math.abs(l-t[0])*s+a,v=(t[3]-t[1])*s,w=(t[2]-t[0])*s):(A=Math.abs(l-t[0])*s+r,y=Math.abs(h-t[1])*s+a,v=(t[2]-t[0])*s,w=(t[3]-t[1])*s),this.transform=[c*s,f*s,g*s,m*s,A-c*s*l-g*s*h,y-f*s*l-m*s*h],this.width=v,this.height=w}get rawDims(){const t=this.viewBox;return V(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone({scale:t=this.scale,rotation:e=this.rotation,offsetX:s=this.offsetX,offsetY:i=this.offsetY,dontFlip:r=!1}={}){return new ld({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:t,rotation:e,offsetX:s,offsetY:i,dontFlip:r})}convertToViewportPoint(t,e){const s=[t,e];return I.applyTransform(s,this.transform),s}convertToViewportRectangle(t){const e=[t[0],t[1]];I.applyTransform(e,this.transform);const s=[t[2],t[3]];return I.applyTransform(s,this.transform),[e[0],e[1],s[0],s[1]]}convertToPdfPoint(t,e){const s=[t,e];return I.applyInverseTransform(s,this.transform),s}}class $g extends la{constructor(t,e=0){super(t,"RenderingCancelledException"),this.extraDelay=e}}function np(u){const t=u.length;let e=0;for(;e{try{return new URL(o)}catch{try{return new URL(decodeURIComponent(o))}catch{try{return new URL(o,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(o),"https://foo.bar")}catch{return null}}}}})(u);if(!s)return t;const i=o=>{try{let l=decodeURIComponent(o);return l.includes("/")?(l=l.split("/").at(-1),l.test(/^\.pdf$/i)?l:o):l}catch{return o}},r=/\.pdf$/i,a=s.pathname.split("/").at(-1);if(r.test(a))return i(a);if(s.searchParams.size>0){const o=Array.from(s.searchParams.values()).reverse();for(const h of o)if(r.test(h))return i(h);const l=Array.from(s.searchParams.keys()).reverse();for(const h of l)if(r.test(h))return i(h)}if(s.hash){const l=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(s.hash);if(l)return i(l[0])}return t}class nm{constructor(){k(this,"started",Object.create(null));k(this,"times",[])}time(t){t in this.started&&z(`Timer is already running for ${t}`),this.started[t]=Date.now()}timeEnd(t){t in this.started||z(`Timer has not been started for ${t}`),this.times.push({name:t,start:this.started[t],end:Date.now()}),delete this.started[t]}toString(){const t=[];let e=0;for(const{name:s}of this.times)e=Math.max(s.length,e);for(const{name:s,start:i,end:r}of this.times)t.push(`${s.padEnd(e)} ${r-i}ms `);return t.join("")}}function gl(u,t){const e=t?URL.parse(u,t):URL.parse(u);return(e==null?void 0:e.protocol)==="http:"||(e==null?void 0:e.protocol)==="https:"}function je(u){u.preventDefault()}function vt(u){u.preventDefault(),u.stopPropagation()}function ZA(u){console.log("Deprecated API usage: "+u)}var $l;class Qd{static toDateObject(t){if(t instanceof Date)return t;if(!t||typeof t!="string")return null;n(this,$l)||p(this,$l,new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const e=n(this,$l).exec(t);if(!e)return null;const s=parseInt(e[1],10);let i=parseInt(e[2],10);i=i>=1&&i<=12?i-1:0;let r=parseInt(e[3],10);r=r>=1&&r<=31?r:1;let a=parseInt(e[4],10);a=a>=0&&a<=23?a:0;let o=parseInt(e[5],10);o=o>=0&&o<=59?o:0;let l=parseInt(e[6],10);l=l>=0&&l<=59?l:0;const h=e[7]||"Z";let c=parseInt(e[8],10);c=c>=0&&c<=23?c:0;let f=parseInt(e[9],10)||0;return f=f>=0&&f<=59?f:0,h==="-"?(a+=c,o+=f):h==="+"&&(a-=c,o-=f),new Date(Date.UTC(s,i,r,a,o,l))}}$l=new WeakMap,d(Qd,$l,void 0);function ty(u,{scale:t=1,rotation:e=0}){const{width:s,height:i}=u.attributes.style,r=[0,0,parseInt(s),parseInt(i)];return new ld({viewBox:r,userUnit:1,scale:t,rotation:e})}function rp(u){if(u.startsWith("#")){const t=parseInt(u.slice(1),16);return[(t&16711680)>>16,(t&65280)>>8,t&255]}return u.startsWith("rgb(")?u.slice(4,-1).split(",").map(t=>parseInt(t)):u.startsWith("rgba(")?u.slice(5,-1).split(",").map(t=>parseInt(t)).slice(0,3):(z(`Not a valid color format: "${u}"`),[0,0,0])}function ey(u){const t=document.createElement("span");t.style.visibility="hidden",t.style.colorScheme="only light",document.body.append(t);for(const e of u.keys()){t.style.color=e;const s=window.getComputedStyle(t).color;u.set(e,rp(s))}t.remove()}function dt(u){const{a:t,b:e,c:s,d:i,e:r,f:a}=u.getTransform();return[t,e,s,i,r,a]}function os(u){const{a:t,b:e,c:s,d:i,e:r,f:a}=u.getTransform().invertSelf();return[t,e,s,i,r,a]}function ra(u,t,e=!1,s=!0){if(t instanceof ld){const{pageWidth:i,pageHeight:r}=t.rawDims,{style:a}=u,o=Wt.isCSSRoundSupported,l=`var(--total-scale-factor) * ${i}px`,h=`var(--total-scale-factor) * ${r}px`,c=o?`round(down, ${l}, var(--scale-round-x))`:`calc(${l})`,f=o?`round(down, ${h}, var(--scale-round-y))`:`calc(${h})`;!e||t.rotation%180===0?(a.width=c,a.height=f):(a.width=f,a.height=c)}s&&u.setAttribute("data-main-rotation",t.rotation)}class Ds{constructor(){const{pixelRatio:t}=Ds;this.sx=t,this.sy=t}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(t,e,s,i,r=-1){let a=1/0,o=1/0,l=1/0;s=Ds.capPixels(s,r),s>0&&(a=Math.sqrt(s/(t*e))),i!==-1&&(o=i/t,l=i/e);const h=Math.min(a,o,l);return this.sx>h||this.sy>h?(this.sx=h,this.sy=h,!0):!1}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(t,e){if(e>=0){const s=Math.ceil(window.screen.availWidth*window.screen.availHeight*this.pixelRatio**2*(1+e/100));return t>0?Math.min(t,s):s}return t}}const Sp=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];var Pi,Mi,Ie,Hs,zl,Ea,Ca,Gl,ou,Mm,lu,Rm,hu,Dm,Ri,ua,Bn,ml;const Os=class Os{constructor(t){d(this,lu);d(this,hu);d(this,Ri);d(this,Bn);d(this,Pi,null);d(this,Mi,null);d(this,Ie,void 0);d(this,Hs,null);d(this,zl,null);d(this,Ea,null);d(this,Ca,null);p(this,Ie,t),n(Os,Gl)||p(Os,Gl,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"}))}render(){const t=p(this,Pi,document.createElement("div"));t.classList.add("editToolbar","hidden"),t.setAttribute("role","toolbar");const e=n(this,Ie)._uiManager._signal;e instanceof AbortSignal&&!e.aborted&&(t.addEventListener("contextmenu",je,{signal:e}),t.addEventListener("pointerdown",b(Os,ou,Mm),{signal:e}));const s=p(this,Hs,document.createElement("div"));s.className="buttons",t.append(s);const i=n(this,Ie).toolbarPosition;if(i){const{style:r}=t,a=n(this,Ie)._uiManager.direction==="ltr"?1-i[0]:i[0];r.insetInlineEnd=`${100*a}%`,r.top=`calc(${100*i[1]}% + var(--editor-toolbar-vert-offset))`}return t}get div(){return n(this,Pi)}hide(){var t;n(this,Pi).classList.add("hidden"),(t=n(this,Mi))==null||t.hideDropdown()}show(){var t,e;n(this,Pi).classList.remove("hidden"),(t=n(this,zl))==null||t.shown(),(e=n(this,Ea))==null||e.shown()}addDeleteButton(){const{editorType:t,_uiManager:e}=n(this,Ie),s=document.createElement("button");s.classList.add("basic","deleteButton"),s.tabIndex=0,s.setAttribute("data-l10n-id",n(Os,Gl)[t]),b(this,Ri,ua).call(this,s)&&s.addEventListener("click",i=>{e.delete()},{signal:e._signal}),n(this,Hs).append(s)}async addAltText(t){const e=await t.render();b(this,Ri,ua).call(this,e),n(this,Hs).append(e,n(this,Bn,ml)),p(this,zl,t)}addComment(t){if(n(this,Ea))return;const e=t.render();e&&(b(this,Ri,ua).call(this,e),n(this,Hs).append(e,n(this,Bn,ml)),p(this,Ea,t),t.toolbar=this)}addColorPicker(t){if(n(this,Mi))return;p(this,Mi,t);const e=t.renderButton();b(this,Ri,ua).call(this,e),n(this,Hs).append(e,n(this,Bn,ml))}async addEditSignatureButton(t){const e=p(this,Ca,await t.renderEditButton(n(this,Ie)));b(this,Ri,ua).call(this,e),n(this,Hs).append(e,n(this,Bn,ml))}async addButton(t,e){switch(t){case"colorPicker":this.addColorPicker(e);break;case"altText":await this.addAltText(e);break;case"editSignature":await this.addEditSignatureButton(e);break;case"delete":this.addDeleteButton();break;case"comment":this.addComment(e);break}}updateEditSignatureButton(t){n(this,Ca)&&(n(this,Ca).title=t)}remove(){var t;n(this,Pi).remove(),(t=n(this,Mi))==null||t.destroy(),p(this,Mi,null)}};Pi=new WeakMap,Mi=new WeakMap,Ie=new WeakMap,Hs=new WeakMap,zl=new WeakMap,Ea=new WeakMap,Ca=new WeakMap,Gl=new WeakMap,ou=new WeakSet,Mm=function(t){t.stopPropagation()},lu=new WeakSet,Rm=function(t){n(this,Ie)._focusEventsAllowed=!1,vt(t)},hu=new WeakSet,Dm=function(t){n(this,Ie)._focusEventsAllowed=!0,vt(t)},Ri=new WeakSet,ua=function(t){const e=n(this,Ie)._uiManager._signal;return!(e instanceof AbortSignal)||e.aborted?!1:(t.addEventListener("focusin",b(this,lu,Rm).bind(this),{capture:!0,signal:e}),t.addEventListener("focusout",b(this,hu,Dm).bind(this),{capture:!0,signal:e}),t.addEventListener("contextmenu",je,{signal:e}),!0)},Bn=new WeakSet,ml=function(){const t=document.createElement("div");return t.className="divider",t},d(Os,ou),d(Os,Gl,null);let Ep=Os;var Ul,Hn,$s,cu,Lm,du,Im,jl,Cp;class sy{constructor(t){d(this,cu);d(this,du);d(this,jl);d(this,Ul,null);d(this,Hn,null);d(this,$s,void 0);p(this,$s,t)}show(t,e,s){const[i,r]=b(this,du,Im).call(this,e,s),{style:a}=n(this,Hn)||p(this,Hn,b(this,cu,Lm).call(this));t.append(n(this,Hn)),a.insetInlineEnd=`${100*i}%`,a.top=`calc(${100*r}% + var(--editor-toolbar-vert-offset))`}hide(){n(this,Hn).remove()}}Ul=new WeakMap,Hn=new WeakMap,$s=new WeakMap,cu=new WeakSet,Lm=function(){const t=p(this,Hn,document.createElement("div"));t.className="editToolbar",t.setAttribute("role","toolbar");const e=n(this,$s)._signal;e instanceof AbortSignal&&!e.aborted&&t.addEventListener("contextmenu",je,{signal:e});const s=p(this,Ul,document.createElement("div"));return s.className="buttons",t.append(s),n(this,$s).hasCommentManager()&&b(this,jl,Cp).call(this,"commentButton","pdfjs-comment-floating-button","pdfjs-comment-floating-button-label",()=>{n(this,$s).commentSelection("floating_button")}),b(this,jl,Cp).call(this,"highlightButton","pdfjs-highlight-floating-button1","pdfjs-highlight-floating-button-label",()=>{n(this,$s).highlightSelection("floating_button")}),t},du=new WeakSet,Im=function(t,e){let s=0,i=0;for(const r of t){const a=r.y+r.height;if(as){i=o,s=a;continue}e?o>i&&(i=o):o(s.drawImage(i,0,0,1,1,0,0,1,3),new Uint32Array(s.getImageData(0,0,1,1).data.buffer)[0]===0));return V(this,"_isSVGFittingCanvas",r)}async getFromFile(t){const{lastModified:e,name:s,size:i,type:r}=t;return b(this,xa,_d).call(this,`${e}_${s}_${i}_${r}`,t)}async getFromUrl(t){return b(this,xa,_d).call(this,t,t)}async getFromBlob(t,e){const s=await e;return b(this,xa,_d).call(this,t,s)}async getFromId(t){n(this,qt)||p(this,qt,new Map);const e=n(this,qt).get(t);if(!e)return null;if(e.bitmap)return e.refCounter+=1,e;if(e.file)return this.getFromFile(e.file);if(e.blobPromise){const{blobPromise:s}=e;return delete e.blobPromise,this.getFromBlob(e.id,s)}return this.getFromUrl(e.url)}getFromCanvas(t,e){n(this,qt)||p(this,qt,new Map);let s=n(this,qt).get(t);if(s!=null&&s.bitmap)return s.refCounter+=1,s;const i=new OffscreenCanvas(e.width,e.height);return i.getContext("2d").drawImage(e,0,0),s={bitmap:i.transferToImageBitmap(),id:`image_${n(this,Ta)}_${St(this,Vl)._++}`,refCounter:1,isSvg:!1},n(this,qt).set(t,s),n(this,qt).set(s.id,s),s}getSvgUrl(t){const e=n(this,qt).get(t);return e!=null&&e.isSvg?e.svgUrl:null}deleteId(t){var i;n(this,qt)||p(this,qt,new Map);const e=n(this,qt).get(t);if(!e||(e.refCounter-=1,e.refCounter!==0))return;const{bitmap:s}=e;if(!e.url&&!e.file){const r=new OffscreenCanvas(s.width,s.height);r.getContext("bitmaprenderer").transferFromImageBitmap(s),e.blobPromise=r.convertToBlob()}(i=s.close)==null||i.call(s),e.bitmap=null}isValidId(t){return t.startsWith(`image_${n(this,Ta)}_`)}};Ta=new WeakMap,Vl=new WeakMap,qt=new WeakMap,xa=new WeakSet,_d=async function(t,e){n(this,qt)||p(this,qt,new Map);let s=n(this,qt).get(t);if(s===null)return null;if(s!=null&&s.bitmap)return s.refCounter+=1,s;try{s||(s={bitmap:null,id:`image_${n(this,Ta)}_${St(this,Vl)._++}`,refCounter:0,isSvg:!1});let i;if(typeof e=="string"?(s.url=e,i=await od(e,"blob")):e instanceof File?i=s.file=e:e instanceof Blob&&(i=e),i.type==="image/svg+xml"){const r=Yg._isSVGFittingCanvas,a=new FileReader,o=new Image,l=new Promise((h,c)=>{o.onload=()=>{s.bitmap=o,s.isSvg=!0,h()},a.onload=async()=>{const f=s.svgUrl=a.result;o.src=await r?`${f}#svgView(preserveAspectRatio(none))`:f},o.onerror=a.onerror=c});a.readAsDataURL(i),await l}else s.bitmap=await createImageBitmap(i);s.refCounter=1}catch(i){z(i),s=null}return n(this,qt).set(t,s),s&&n(this,qt).set(s.id,s),s};let Tp=Yg;var gt,Di,Wl,ht;class ny{constructor(t=128){d(this,gt,[]);d(this,Di,!1);d(this,Wl,void 0);d(this,ht,-1);p(this,Wl,t)}add({cmd:t,undo:e,post:s,mustExec:i,type:r=NaN,overwriteIfSameType:a=!1,keepUndo:o=!1}){if(i&&t(),n(this,Di))return;const l={cmd:t,undo:e,post:s,type:r};if(n(this,ht)===-1){n(this,gt).length>0&&(n(this,gt).length=0),p(this,ht,0),n(this,gt).push(l);return}if(a&&n(this,gt)[n(this,ht)].type===r){o&&(l.undo=n(this,gt)[n(this,ht)].undo),n(this,gt)[n(this,ht)]=l;return}const h=n(this,ht)+1;h===n(this,Wl)?n(this,gt).splice(0,1):(p(this,ht,h),h=0;e--)if(n(this,gt)[e].type!==t){n(this,gt).splice(e+1,n(this,ht)-e),p(this,ht,e);return}n(this,gt).length=0,p(this,ht,-1)}}destroy(){p(this,gt,null)}}gt=new WeakMap,Di=new WeakMap,Wl=new WeakMap,ht=new WeakMap;var fu,Nm;class hd{constructor(t){d(this,fu);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:e}=Wt.platform;for(const[s,i,r={}]of t)for(const a of s){const o=a.startsWith("mac+");e&&o?(this.callbacks.set(a.slice(4),{callback:i,options:r}),this.allKeys.add(a.split("+").at(-1))):!e&&!o&&(this.callbacks.set(a,{callback:i,options:r}),this.allKeys.add(a.split("+").at(-1)))}}exec(t,e){if(!this.allKeys.has(e.key))return;const s=this.callbacks.get(b(this,fu,Nm).call(this,e));if(!s)return;const{callback:i,options:{bubbles:r=!1,args:a=[],checker:o=null}}=s;o&&!o(t,e)||(i.bind(t,...a,e)(),r||vt(e))}}fu=new WeakSet,Nm=function(t){t.altKey&&this.buffer.push("alt"),t.ctrlKey&&this.buffer.push("ctrl"),t.metaKey&&this.buffer.push("meta"),t.shiftKey&&this.buffer.push("shift"),this.buffer.push(t.key);const e=this.buffer.join("+");return this.buffer.length=0,e};const pu=class pu{get _colors(){const t=new Map([["CanvasText",null],["Canvas",null]]);return ey(t),V(this,"_colors",t)}convert(t){const e=rp(t);if(!window.matchMedia("(forced-colors: active)").matches)return e;for(const[s,i]of this._colors)if(i.every((r,a)=>r===e[a]))return pu._colorsMapping.get(s);return e}getHexCode(t){const e=this._colors.get(t);return e?I.makeHexColor(...e):t}};k(pu,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let xp=pu;var ka,ue,Pa,Ct,Bt,Ma,zs,Ra,Fe,Gs,Li,Ii,Da,$n,cs,Ne,zn,Xl,ql,La,Yl,ds,Fi,Ia,Ni,us,gu,Oi,Fa,Kl,Bi,Gn,Na,Hi,Ql,Tt,Q,Us,$i,zi,Jl,Oa,Zl,Gi,fs,js,th,eh,Oe,Ba,Sd,sh,kp,mu,Om,bu,Bm,Un,bl,Au,Hm,yu,$m,wu,zm,ih,Pp,vu,Gm,nh,Mp,rh,Rp,_u,Um,Ht,Qt,qe,Fs,Su,jm,Eu,Vm,ah,Dp,Cu,Wm,jn,Al,oh,Lp;const wa=class wa{constructor(t,e,s,i,r,a,o,l,h,c,f,g,m,A,y,v){d(this,Ba);d(this,sh);d(this,mu);d(this,bu);d(this,Un);d(this,Au);d(this,yu);d(this,wu);d(this,ih);d(this,vu);d(this,nh);d(this,rh);d(this,_u);d(this,Ht);d(this,qe);d(this,Su);d(this,Eu);d(this,ah);d(this,Cu);d(this,jn);d(this,oh);d(this,ka,new AbortController);d(this,ue,null);d(this,Pa,null);d(this,Ct,new Map);d(this,Bt,new Map);d(this,Ma,null);d(this,zs,null);d(this,Ra,null);d(this,Fe,new ny);d(this,Gs,null);d(this,Li,null);d(this,Ii,null);d(this,Da,0);d(this,$n,new Set);d(this,cs,null);d(this,Ne,null);d(this,zn,new Set);k(this,"_editorUndoBar",null);d(this,Xl,!1);d(this,ql,!1);d(this,La,!1);d(this,Yl,null);d(this,ds,null);d(this,Fi,null);d(this,Ia,null);d(this,Ni,!1);d(this,us,null);d(this,gu,new iy);d(this,Oi,!1);d(this,Fa,!1);d(this,Kl,!1);d(this,Bi,null);d(this,Gn,null);d(this,Na,null);d(this,Hi,null);d(this,Ql,null);d(this,Tt,$.NONE);d(this,Q,new Set);d(this,Us,null);d(this,$i,null);d(this,zi,null);d(this,Jl,null);d(this,Oa,null);d(this,Zl,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1});d(this,Gi,[0,0]);d(this,fs,null);d(this,js,null);d(this,th,null);d(this,eh,null);d(this,Oe,null);const w=this._signal=n(this,ka).signal;p(this,js,t),p(this,th,e),p(this,eh,s),p(this,Ma,i),p(this,Gs,r),p(this,$i,a),p(this,Oa,l),this._eventBus=o,o._on("editingaction",this.onEditingAction.bind(this),{signal:w}),o._on("pagechanging",this.onPageChanging.bind(this),{signal:w}),o._on("scalechanging",this.onScaleChanging.bind(this),{signal:w}),o._on("rotationchanging",this.onRotationChanging.bind(this),{signal:w}),o._on("setpreference",this.onSetPreference.bind(this),{signal:w}),o._on("switchannotationeditorparams",S=>this.updateParams(S.type,S.value),{signal:w}),window.addEventListener("pointerdown",()=>{p(this,Fa,!0)},{capture:!0,signal:w}),window.addEventListener("pointerup",()=>{p(this,Fa,!1)},{capture:!0,signal:w}),b(this,Au,Hm).call(this),b(this,_u,Um).call(this),b(this,ih,Pp).call(this),p(this,zs,l.annotationStorage),p(this,Yl,l.filterFactory),p(this,zi,h),p(this,Ia,c||null),p(this,Xl,f),p(this,ql,g),p(this,La,m),p(this,Ql,A||null),this.viewParameters={realScale:Pn.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=y||null,this._supportsPinchToZoom=v!==!1}static get _keyboardManager(){const t=wa.prototype,e=a=>n(a,js).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&a.hasSomethingToControl(),s=(a,{target:o})=>{if(o instanceof HTMLInputElement){const{type:l}=o;return l!=="text"&&l!=="number"}return!0},i=this.TRANSLATE_SMALL,r=this.TRANSLATE_BIG;return V(this,"_keyboardManager",new hd([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:s}],[["ctrl+z","mac+meta+z"],t.undo,{checker:s}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:s}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:s}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:(a,{target:o})=>!(o instanceof HTMLButtonElement)&&n(a,js).contains(o)&&!a.isEnterHandled}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:(a,{target:o})=>!(o instanceof HTMLButtonElement)&&n(a,js).contains(document.activeElement)}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-i,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-r,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[i,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[r,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-i],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-r],checker:e}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,i],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,r],checker:e}]]))}destroy(){var t,e,s,i,r,a,o,l,h;(t=n(this,Oe))==null||t.resolve(),p(this,Oe,null),(e=n(this,ka))==null||e.abort(),p(this,ka,null),this._signal=null;for(const c of n(this,Bt).values())c.destroy();n(this,Bt).clear(),n(this,Ct).clear(),n(this,zn).clear(),(s=n(this,Hi))==null||s.clear(),p(this,ue,null),n(this,Q).clear(),n(this,Fe).destroy(),(i=n(this,Ma))==null||i.destroy(),(r=n(this,Gs))==null||r.destroy(),(a=n(this,$i))==null||a.destroy(),(o=n(this,us))==null||o.hide(),p(this,us,null),(l=n(this,Na))==null||l.destroy(),p(this,Na,null),p(this,Pa,null),n(this,ds)&&(clearTimeout(n(this,ds)),p(this,ds,null)),n(this,fs)&&(clearTimeout(n(this,fs)),p(this,fs,null)),(h=this._editorUndoBar)==null||h.destroy(),p(this,Oa,null)}combinedSignal(t){return AbortSignal.any([this._signal,t.signal])}get mlManager(){return n(this,Ql)}get useNewAltTextFlow(){return n(this,ql)}get useNewAltTextWhenAddingImage(){return n(this,La)}get hcmFilter(){return V(this,"hcmFilter",n(this,zi)?n(this,Yl).addHCMFilter(n(this,zi).foreground,n(this,zi).background):"none")}get direction(){return V(this,"direction",getComputedStyle(n(this,js)).direction)}get _highlightColors(){return V(this,"_highlightColors",n(this,Ia)?new Map(n(this,Ia).split(",").map(t=>(t=t.split("=").map(e=>e.trim()),t[1]=t[1].toUpperCase(),t))):null)}get highlightColors(){const{_highlightColors:t}=this;if(!t)return V(this,"highlightColors",null);const e=new Map,s=!!n(this,zi);for(const[i,r]of t){const a=i.endsWith("_HCM");if(s&&a){e.set(i.replace("_HCM",""),r);continue}!s&&!a&&e.set(i,r)}return V(this,"highlightColors",e)}get highlightColorNames(){return V(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,t=>t.reverse())):null)}getNonHCMColor(t){if(!this._highlightColors)return t;const e=this.highlightColorNames.get(t);return this._highlightColors.get(e)||t}getNonHCMColorName(t){return this.highlightColorNames.get(t)||t}setCurrentDrawingSession(t){t?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),p(this,Ii,t)}setMainHighlightColorPicker(t){p(this,Na,t)}editAltText(t,e=!1){var s;(s=n(this,Ma))==null||s.editAltText(this,t,e)}hasCommentManager(){return!!n(this,Gs)}editComment(t,e){var s;(s=n(this,Gs))==null||s.open(this,t,e)}getSignature(t){var e;(e=n(this,$i))==null||e.getSignature({uiManager:this,editor:t})}get signatureManager(){return n(this,$i)}switchToMode(t,e){this._eventBus.on("annotationeditormodechanged",e,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:t})}setPreference(t,e){this._eventBus.dispatch("setpreference",{source:this,name:t,value:e})}onSetPreference({name:t,value:e}){switch(t){case"enableNewAltTextWhenAddingImage":p(this,La,e);break}}onPageChanging({pageNumber:t}){p(this,Da,t-1)}focusMainContainer(){n(this,js).focus()}findParent(t,e){for(const s of n(this,Bt).values()){const{x:i,y:r,width:a,height:o}=s.div.getBoundingClientRect();if(t>=i&&t<=i+a&&e>=r&&e<=r+o)return s}return null}disableUserSelect(t=!1){n(this,th).classList.toggle("noUserSelect",t)}addShouldRescale(t){n(this,zn).add(t)}removeShouldRescale(t){n(this,zn).delete(t)}onScaleChanging({scale:t}){var e;this.commitOrRemove(),this.viewParameters.realScale=t*Pn.PDF_TO_CSS_UNITS;for(const s of n(this,zn))s.onScaleChanging();(e=n(this,Ii))==null||e.onScaleChanging()}onRotationChanging({pagesRotation:t}){this.commitOrRemove(),this.viewParameters.rotation=t}highlightSelection(t="",e=!1){const s=document.getSelection();if(!s||s.isCollapsed)return;const{anchorNode:i,anchorOffset:r,focusNode:a,focusOffset:o}=s,l=s.toString(),c=b(this,Ba,Sd).call(this,s).closest(".textLayer"),f=this.getSelectionBoxes(c);if(!f)return;s.empty();const g=b(this,sh,kp).call(this,c),m=n(this,Tt)===$.NONE,A=()=>{const y=g==null?void 0:g.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:t,boxes:f,anchorNode:i,anchorOffset:r,focusNode:a,focusOffset:o,text:l});m&&this.showAllEditors("highlight",!0,!0),e&&(y==null||y.editComment())};if(m){this.switchToMode($.HIGHLIGHT,A);return}A()}commentSelection(t=""){this.highlightSelection(t,!0)}addToAnnotationStorage(t){!t.isEmpty()&&n(this,zs)&&!n(this,zs).has(t.id)&&n(this,zs).setValue(t.id,t)}a11yAlert(t,e=null){const s=n(this,eh);s&&(s.setAttribute("data-l10n-id",t),e?s.setAttribute("data-l10n-args",JSON.stringify(e)):s.removeAttribute("data-l10n-args"))}blur(){if(this.isShiftKeyDown=!1,n(this,Ni)&&(p(this,Ni,!1),b(this,Un,bl).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:t}=document;for(const e of n(this,Q))if(e.div.contains(t)){p(this,Gn,[e,t]),e._focusEventsAllowed=!1;break}}focus(){if(!n(this,Gn))return;const[t,e]=n(this,Gn);p(this,Gn,null),e.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this._signal}),e.focus()}addEditListeners(){b(this,ih,Pp).call(this),b(this,nh,Mp).call(this)}removeEditListeners(){b(this,vu,Gm).call(this),b(this,rh,Rp).call(this)}dragOver(t){for(const{type:e}of t.dataTransfer.items)for(const s of n(this,Ne))if(s.isHandlingMimeForPasting(e)){t.dataTransfer.dropEffect="copy",t.preventDefault();return}}drop(t){for(const e of t.dataTransfer.items)for(const s of n(this,Ne))if(s.isHandlingMimeForPasting(e.type)){s.paste(e,this.currentLayer),t.preventDefault();return}}copy(t){var s;if(t.preventDefault(),(s=n(this,ue))==null||s.commitOrRemove(),!this.hasSelection)return;const e=[];for(const i of n(this,Q)){const r=i.serialize(!0);r&&e.push(r)}e.length!==0&&t.clipboardData.setData("application/pdfjs",JSON.stringify(e))}cut(t){this.copy(t),this.delete()}async paste(t){t.preventDefault();const{clipboardData:e}=t;for(const r of e.items)for(const a of n(this,Ne))if(a.isHandlingMimeForPasting(r.type)){a.paste(r,this.currentLayer);return}let s=e.getData("application/pdfjs");if(!s)return;try{s=JSON.parse(s)}catch(r){z(`paste: "${r.message}".`);return}if(!Array.isArray(s))return;this.unselectAll();const i=this.currentLayer;try{const r=[];for(const l of s){const h=await i.deserialize(l);if(!h)return;r.push(h)}const a=()=>{for(const l of r)b(this,ah,Dp).call(this,l);b(this,oh,Lp).call(this,r)},o=()=>{for(const l of r)l.remove()};this.addCommands({cmd:a,undo:o,mustExec:!0})}catch(r){z(`paste: "${r.message}".`)}}keydown(t){!this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!0),n(this,Tt)!==$.NONE&&!this.isEditorHandlingKeyboard&&wa._keyboardManager.exec(this,t)}keyup(t){this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!1,n(this,Ni)&&(p(this,Ni,!1),b(this,Un,bl).call(this,"main_toolbar")))}onEditingAction({name:t}){switch(t){case"undo":case"redo":case"delete":case"selectAll":this[t]();break;case"highlightSelection":this.highlightSelection("context_menu");break;case"commentSelection":this.commentSelection("context_menu");break}}setEditingState(t){t?(b(this,yu,$m).call(this),b(this,nh,Mp).call(this),b(this,Ht,Qt).call(this,{isEditing:n(this,Tt)!==$.NONE,isEmpty:b(this,jn,Al).call(this),hasSomethingToUndo:n(this,Fe).hasSomethingToUndo(),hasSomethingToRedo:n(this,Fe).hasSomethingToRedo(),hasSelectedEditor:!1})):(b(this,wu,zm).call(this),b(this,rh,Rp).call(this),b(this,Ht,Qt).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(t){if(!n(this,Ne)){p(this,Ne,t);for(const e of n(this,Ne))b(this,qe,Fs).call(this,e.defaultPropertiesToUpdate)}}getId(){return n(this,gu).id}get currentLayer(){return n(this,Bt).get(n(this,Da))}getLayer(t){return n(this,Bt).get(t)}get currentPageIndex(){return n(this,Da)}addLayer(t){n(this,Bt).set(t.pageIndex,t),n(this,Oi)?t.enable():t.disable()}removeLayer(t){n(this,Bt).delete(t.pageIndex)}async updateMode(t,e=null,s=!1,i=!1,r=!1){var a,o,l,h,c;if(n(this,Tt)!==t&&!(n(this,Oe)&&(await n(this,Oe).promise,!n(this,Oe)))){if(p(this,Oe,Promise.withResolvers()),(a=n(this,Ii))==null||a.commitOrRemove(),n(this,Tt)===$.POPUP&&((o=n(this,Gs))==null||o.hideSidebar()),p(this,Tt,t),t===$.NONE){this.setEditingState(!1),b(this,Eu,Vm).call(this),(l=this._editorUndoBar)==null||l.hide(),n(this,Oe).resolve();return}t===$.SIGNATURE&&await((h=n(this,$i))==null?void 0:h.loadSignatures()),t===$.POPUP&&(n(this,Pa)||p(this,Pa,await n(this,Oa).getAnnotationsByType(new Set(n(this,Ne).map(f=>f._editorType)))),(c=n(this,Gs))==null||c.showSidebar(n(this,Pa))),this.setEditingState(!0),await b(this,Su,jm).call(this),this.unselectAll();for(const f of n(this,Bt).values())f.updateMode(t);if(!e){s&&this.addNewEditorFromKeyboard(),n(this,Oe).resolve();return}for(const f of n(this,Ct).values())f.annotationElementId===e||f.id===e?(this.setSelected(f),r?f.editComment():i&&f.enterInEditMode()):f.unselect();n(this,Oe).resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(t){t.mode!==n(this,Tt)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,...t})}updateParams(t,e){if(n(this,Ne)){switch(t){case X.CREATE:this.currentLayer.addNewEditor(e);return;case X.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(n(this,Jl)||p(this,Jl,new Map)).set(t,e),this.showAllEditors("highlight",e);break}if(this.hasSelection)for(const s of n(this,Q))s.updateParams(t,e);else for(const s of n(this,Ne))s.updateDefaultParams(t,e)}}showAllEditors(t,e,s=!1){var r;for(const a of n(this,Ct).values())a.editorType===t&&a.show(e);(((r=n(this,Jl))==null?void 0:r.get(X.HIGHLIGHT_SHOW_ALL))??!0)!==e&&b(this,qe,Fs).call(this,[[X.HIGHLIGHT_SHOW_ALL,e]])}enableWaiting(t=!1){if(n(this,Kl)!==t){p(this,Kl,t);for(const e of n(this,Bt).values())t?e.disableClick():e.enableClick(),e.div.classList.toggle("waiting",t)}}getEditors(t){const e=[];for(const s of n(this,Ct).values())s.pageIndex===t&&e.push(s);return e}getEditor(t){return n(this,Ct).get(t)}addEditor(t){n(this,Ct).set(t.id,t)}removeEditor(t){var e,s;t.div.contains(document.activeElement)&&(n(this,ds)&&clearTimeout(n(this,ds)),p(this,ds,setTimeout(()=>{this.focusMainContainer(),p(this,ds,null)},0))),n(this,Ct).delete(t.id),t.annotationElementId&&((e=n(this,Hi))==null||e.delete(t.annotationElementId)),this.unselect(t),(!t.annotationElementId||!n(this,$n).has(t.annotationElementId))&&((s=n(this,zs))==null||s.remove(t.id))}addDeletedAnnotationElement(t){n(this,$n).add(t.annotationElementId),this.addChangedExistingAnnotation(t),t.deleted=!0}isDeletedAnnotationElement(t){return n(this,$n).has(t)}removeDeletedAnnotationElement(t){n(this,$n).delete(t.annotationElementId),this.removeChangedExistingAnnotation(t),t.deleted=!1}setActiveEditor(t){n(this,ue)!==t&&(p(this,ue,t),t&&b(this,qe,Fs).call(this,t.propertiesToUpdate))}updateUI(t){n(this,Cu,Wm)===t&&b(this,qe,Fs).call(this,t.propertiesToUpdate)}updateUIForDefaultProperties(t){b(this,qe,Fs).call(this,t.defaultPropertiesToUpdate)}toggleSelected(t){if(n(this,Q).has(t)){n(this,Q).delete(t),t.unselect(),b(this,Ht,Qt).call(this,{hasSelectedEditor:this.hasSelection});return}n(this,Q).add(t),t.select(),b(this,qe,Fs).call(this,t.propertiesToUpdate),b(this,Ht,Qt).call(this,{hasSelectedEditor:!0})}setSelected(t){var e;this.updateToolbar({mode:t.mode,editId:t.id}),(e=n(this,Ii))==null||e.commitOrRemove();for(const s of n(this,Q))s!==t&&s.unselect();n(this,Q).clear(),n(this,Q).add(t),t.select(),b(this,qe,Fs).call(this,t.propertiesToUpdate),b(this,Ht,Qt).call(this,{hasSelectedEditor:!0})}isSelected(t){return n(this,Q).has(t)}get firstSelectedEditor(){return n(this,Q).values().next().value}unselect(t){t.unselect(),n(this,Q).delete(t),b(this,Ht,Qt).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return n(this,Q).size!==0}get isEnterHandled(){return n(this,Q).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){var t;n(this,Fe).undo(),b(this,Ht,Qt).call(this,{hasSomethingToUndo:n(this,Fe).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:b(this,jn,Al).call(this)}),(t=this._editorUndoBar)==null||t.hide()}redo(){n(this,Fe).redo(),b(this,Ht,Qt).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:n(this,Fe).hasSomethingToRedo(),isEmpty:b(this,jn,Al).call(this)})}addCommands(t){n(this,Fe).add(t),b(this,Ht,Qt).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:b(this,jn,Al).call(this)})}cleanUndoStack(t){n(this,Fe).cleanType(t)}delete(){var r;this.commitOrRemove();const t=(r=this.currentLayer)==null?void 0:r.endDrawingSession(!0);if(!this.hasSelection&&!t)return;const e=t?[t]:[...n(this,Q)],s=()=>{var a;(a=this._editorUndoBar)==null||a.show(i,e.length===1?e[0].editorType:e.length);for(const o of e)o.remove()},i=()=>{for(const a of e)b(this,ah,Dp).call(this,a)};this.addCommands({cmd:s,undo:i,mustExec:!0})}commitOrRemove(){var t;(t=n(this,ue))==null||t.commitOrRemove()}hasSomethingToControl(){return n(this,ue)||this.hasSelection}selectAll(){for(const t of n(this,Q))t.commit();b(this,oh,Lp).call(this,n(this,Ct).values())}unselectAll(){var t;if(!(n(this,ue)&&(n(this,ue).commitOrRemove(),n(this,Tt)!==$.NONE))&&!((t=n(this,Ii))!=null&&t.commitOrRemove())&&this.hasSelection){for(const e of n(this,Q))e.unselect();n(this,Q).clear(),b(this,Ht,Qt).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(t,e,s=!1){if(s||this.commitOrRemove(),!this.hasSelection)return;n(this,Gi)[0]+=t,n(this,Gi)[1]+=e;const[i,r]=n(this,Gi),a=[...n(this,Q)],o=1e3;n(this,fs)&&clearTimeout(n(this,fs)),p(this,fs,setTimeout(()=>{p(this,fs,null),n(this,Gi)[0]=n(this,Gi)[1]=0,this.addCommands({cmd:()=>{for(const l of a)n(this,Ct).has(l.id)&&(l.translateInPage(i,r),l.translationDone())},undo:()=>{for(const l of a)n(this,Ct).has(l.id)&&(l.translateInPage(-i,-r),l.translationDone())},mustExec:!1})},o));for(const l of a)l.translateInPage(t,e),l.translationDone()}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),p(this,cs,new Map);for(const t of n(this,Q))n(this,cs).set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!n(this,cs))return!1;this.disableUserSelect(!1);const t=n(this,cs);p(this,cs,null);let e=!1;for(const[{x:i,y:r,pageIndex:a},o]of t)o.newX=i,o.newY=r,o.newPageIndex=a,e||(e=i!==o.savedX||r!==o.savedY||a!==o.savedPageIndex);if(!e)return!1;const s=(i,r,a,o)=>{if(n(this,Ct).has(i.id)){const l=n(this,Bt).get(o);l?i._setParentAndPosition(l,r,a):(i.pageIndex=o,i.x=r,i.y=a)}};return this.addCommands({cmd:()=>{for(const[i,{newX:r,newY:a,newPageIndex:o}]of t)s(i,r,a,o)},undo:()=>{for(const[i,{savedX:r,savedY:a,savedPageIndex:o}]of t)s(i,r,a,o)},mustExec:!0}),!0}dragSelectedEditors(t,e){if(n(this,cs))for(const s of n(this,cs).keys())s.drag(t,e)}rebuild(t){if(t.parent===null){const e=this.getLayer(t.pageIndex);e?(e.changeParent(t),e.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}get isEditorHandlingKeyboard(){var t;return((t=this.getActive())==null?void 0:t.shouldGetKeyboardEvents())||n(this,Q).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(t){return n(this,ue)===t}getActive(){return n(this,ue)}getMode(){return n(this,Tt)}get imageManager(){return V(this,"imageManager",new Tp)}getSelectionBoxes(t){if(!t)return null;const e=document.getSelection();for(let h=0,c=e.rangeCount;h({x:(c-i)/a,y:1-(h+f-s)/r,width:g/a,height:f/r});break;case"180":o=(h,c,f,g)=>({x:1-(h+f-s)/r,y:1-(c+g-i)/a,width:f/r,height:g/a});break;case"270":o=(h,c,f,g)=>({x:1-(c+g-i)/a,y:(h-s)/r,width:g/a,height:f/r});break;default:o=(h,c,f,g)=>({x:(h-s)/r,y:(c-i)/a,width:f/r,height:g/a});break}const l=[];for(let h=0,c=e.rangeCount;h{g.type==="pointerup"&&g.button!==0||(h.abort(),l==null||l.toggleDrawing(!0),g.type==="pointerup"&&b(this,Un,bl).call(this,"main_toolbar"))};window.addEventListener("pointerup",f,{signal:c}),window.addEventListener("blur",f,{signal:c})}else l==null||l.toggleDrawing(!0),b(this,Un,bl).call(this,"main_toolbar")}},Un=new WeakSet,bl=function(t=""){n(this,Tt)===$.HIGHLIGHT?this.highlightSelection(t):n(this,Xl)&&b(this,mu,Om).call(this)},Au=new WeakSet,Hm=function(){document.addEventListener("selectionchange",b(this,bu,Bm).bind(this),{signal:this._signal})},yu=new WeakSet,$m=function(){if(n(this,Fi))return;p(this,Fi,new AbortController);const t=this.combinedSignal(n(this,Fi));window.addEventListener("focus",this.focus.bind(this),{signal:t}),window.addEventListener("blur",this.blur.bind(this),{signal:t})},wu=new WeakSet,zm=function(){var t;(t=n(this,Fi))==null||t.abort(),p(this,Fi,null)},ih=new WeakSet,Pp=function(){if(n(this,Bi))return;p(this,Bi,new AbortController);const t=this.combinedSignal(n(this,Bi));window.addEventListener("keydown",this.keydown.bind(this),{signal:t}),window.addEventListener("keyup",this.keyup.bind(this),{signal:t})},vu=new WeakSet,Gm=function(){var t;(t=n(this,Bi))==null||t.abort(),p(this,Bi,null)},nh=new WeakSet,Mp=function(){if(n(this,Li))return;p(this,Li,new AbortController);const t=this.combinedSignal(n(this,Li));document.addEventListener("copy",this.copy.bind(this),{signal:t}),document.addEventListener("cut",this.cut.bind(this),{signal:t}),document.addEventListener("paste",this.paste.bind(this),{signal:t})},rh=new WeakSet,Rp=function(){var t;(t=n(this,Li))==null||t.abort(),p(this,Li,null)},_u=new WeakSet,Um=function(){const t=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:t}),document.addEventListener("drop",this.drop.bind(this),{signal:t})},Ht=new WeakSet,Qt=function(t){Object.entries(t).some(([s,i])=>n(this,Zl)[s]!==i)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(n(this,Zl),t)}),n(this,Tt)===$.HIGHLIGHT&&t.hasSelectedEditor===!1&&b(this,qe,Fs).call(this,[[X.HIGHLIGHT_FREE,!0]]))},qe=new WeakSet,Fs=function(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})},Su=new WeakSet,jm=async function(){if(!n(this,Oi)){p(this,Oi,!0);const t=[];for(const e of n(this,Bt).values())t.push(e.enable());await Promise.all(t);for(const e of n(this,Ct).values())e.enable()}},Eu=new WeakSet,Vm=function(){if(this.unselectAll(),n(this,Oi)){p(this,Oi,!1);for(const t of n(this,Bt).values())t.disable();for(const t of n(this,Ct).values())t.disable()}},ah=new WeakSet,Dp=function(t){const e=n(this,Bt).get(t.pageIndex);e?e.addOrRebuild(t):(this.addEditor(t),this.addToAnnotationStorage(t))},Cu=new WeakSet,Wm=function(){let t=null;for(t of n(this,Q));return t},jn=new WeakSet,Al=function(){if(n(this,Ct).size===0)return!0;if(n(this,Ct).size===1)for(const t of n(this,Ct).values())return t.isEmpty();return!1},oh=new WeakSet,Lp=function(t){for(const e of n(this,Q))e.unselect();n(this,Q).clear();for(const e of t)e.isEmpty()||(n(this,Q).add(e),e.select());b(this,Ht,Qt).call(this,{hasSelectedEditor:this.hasSelection})},k(wa,"TRANSLATE_SMALL",1),k(wa,"TRANSLATE_BIG",10);let aa=wa;var Mt,ps,Ye,Ha,gs,fe,$a,ms,oe,Vs,Vn,bs,Ui,Wn,yl,za,Ed;const Jt=class Jt{constructor(t){d(this,Wn);d(this,za);d(this,Mt,null);d(this,ps,!1);d(this,Ye,null);d(this,Ha,null);d(this,gs,null);d(this,fe,null);d(this,$a,!1);d(this,ms,null);d(this,oe,null);d(this,Vs,null);d(this,Vn,null);d(this,bs,!1);p(this,oe,t),p(this,bs,t._uiManager.useNewAltTextFlow),n(Jt,Ui)||p(Jt,Ui,Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"}))}static initialize(t){Jt._l10n??(Jt._l10n=t)}async render(){const t=p(this,Ye,document.createElement("button"));t.className="altText",t.tabIndex="0";const e=p(this,Ha,document.createElement("span"));t.append(e),n(this,bs)?(t.classList.add("new"),t.setAttribute("data-l10n-id",n(Jt,Ui).missing),e.setAttribute("data-l10n-id",n(Jt,Ui)["missing-label"])):(t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const s=n(this,oe)._uiManager._signal;t.addEventListener("contextmenu",je,{signal:s}),t.addEventListener("pointerdown",r=>r.stopPropagation(),{signal:s});const i=r=>{r.preventDefault(),n(this,oe)._uiManager.editAltText(n(this,oe)),n(this,bs)&&n(this,oe)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:n(this,Wn,yl)}})};return t.addEventListener("click",i,{capture:!0,signal:s}),t.addEventListener("keydown",r=>{r.target===t&&r.key==="Enter"&&(p(this,$a,!0),i(r))},{signal:s}),await b(this,za,Ed).call(this),t}finish(){n(this,Ye)&&(n(this,Ye).focus({focusVisible:n(this,$a)}),p(this,$a,!1))}isEmpty(){return n(this,bs)?n(this,Mt)===null:!n(this,Mt)&&!n(this,ps)}hasData(){return n(this,bs)?n(this,Mt)!==null||!!n(this,Vs):this.isEmpty()}get guessedText(){return n(this,Vs)}async setGuessedText(t){n(this,Mt)===null&&(p(this,Vs,t),p(this,Vn,await Jt._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:t})),b(this,za,Ed).call(this))}toggleAltTextBadge(t=!1){var e;if(!n(this,bs)||n(this,Mt)){(e=n(this,ms))==null||e.remove(),p(this,ms,null);return}if(!n(this,ms)){const s=p(this,ms,document.createElement("div"));s.className="noAltTextBadge",n(this,oe).div.append(s)}n(this,ms).classList.toggle("hidden",!t)}serialize(t){let e=n(this,Mt);return!t&&n(this,Vs)===e&&(e=n(this,Vn)),{altText:e,decorative:n(this,ps),guessedText:n(this,Vs),textWithDisclaimer:n(this,Vn)}}get data(){return{altText:n(this,Mt),decorative:n(this,ps)}}set data({altText:t,decorative:e,guessedText:s,textWithDisclaimer:i,cancel:r=!1}){s&&(p(this,Vs,s),p(this,Vn,i)),!(n(this,Mt)===t&&n(this,ps)===e)&&(r||(p(this,Mt,t),p(this,ps,e)),b(this,za,Ed).call(this))}toggle(t=!1){n(this,Ye)&&(!t&&n(this,fe)&&(clearTimeout(n(this,fe)),p(this,fe,null)),n(this,Ye).disabled=!t)}shown(){n(this,oe)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:n(this,Wn,yl)}})}destroy(){var t,e;(t=n(this,Ye))==null||t.remove(),p(this,Ye,null),p(this,Ha,null),p(this,gs,null),(e=n(this,ms))==null||e.remove(),p(this,ms,null)}};Mt=new WeakMap,ps=new WeakMap,Ye=new WeakMap,Ha=new WeakMap,gs=new WeakMap,fe=new WeakMap,$a=new WeakMap,ms=new WeakMap,oe=new WeakMap,Vs=new WeakMap,Vn=new WeakMap,bs=new WeakMap,Ui=new WeakMap,Wn=new WeakSet,yl=function(){return n(this,Mt)&&"added"||n(this,Mt)===null&&this.guessedText&&"review"||"missing"},za=new WeakSet,Ed=async function(){var i,r,a;const t=n(this,Ye);if(!t)return;if(n(this,bs)){if(t.classList.toggle("done",!!n(this,Mt)),t.setAttribute("data-l10n-id",n(Jt,Ui)[n(this,Wn,yl)]),(i=n(this,Ha))==null||i.setAttribute("data-l10n-id",n(Jt,Ui)[`${n(this,Wn,yl)}-label`]),!n(this,Mt)){(r=n(this,gs))==null||r.remove();return}}else{if(!n(this,Mt)&&!n(this,ps)){t.classList.remove("done"),(a=n(this,gs))==null||a.remove();return}t.classList.add("done"),t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let e=n(this,gs);if(!e){p(this,gs,e=document.createElement("span")),e.className="tooltip",e.setAttribute("role","tooltip"),e.id=`alt-text-tooltip-${n(this,oe).id}`;const o=100,l=n(this,oe)._uiManager._signal;l.addEventListener("abort",()=>{clearTimeout(n(this,fe)),p(this,fe,null)},{once:!0}),t.addEventListener("mouseenter",()=>{p(this,fe,setTimeout(()=>{p(this,fe,null),n(this,gs).classList.add("show"),n(this,oe)._reportTelemetry({action:"alt_text_tooltip"})},o))},{signal:l}),t.addEventListener("mouseleave",()=>{var h;n(this,fe)&&(clearTimeout(n(this,fe)),p(this,fe,null)),(h=n(this,gs))==null||h.classList.remove("show")},{signal:l})}n(this,ps)?e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(e.removeAttribute("data-l10n-id"),e.textContent=n(this,Mt)),e.parentNode||t.append(e);const s=n(this,oe).getElementForAltText();s==null||s.setAttribute("aria-describedby",e.id)},d(Jt,Ui,null),k(Jt,"_l10n",null);let Jd=Jt;var As,Xn,Ke,lh,Ws,Ga,ji;class fd{constructor(t){d(this,As,null);d(this,Xn,!1);d(this,Ke,null);d(this,lh,null);d(this,Ws,null);d(this,Ga,null);d(this,ji,!1);p(this,Ke,t),this.toolbar=null}render(){if(!n(this,Ke)._uiManager.hasCommentManager())return null;const t=p(this,As,document.createElement("button"));t.className="comment",t.tabIndex="0",t.setAttribute("data-l10n-id","pdfjs-editor-edit-comment-button");const e=n(this,Ke)._uiManager._signal;if(!(e instanceof AbortSignal)||e.aborted)return t;t.addEventListener("contextmenu",je,{signal:e}),t.addEventListener("pointerdown",i=>i.stopPropagation(),{signal:e});const s=i=>{i.preventDefault(),this.edit()};return t.addEventListener("click",s,{capture:!0,signal:e}),t.addEventListener("keydown",i=>{i.target===t&&i.key==="Enter"&&(p(this,Xn,!0),s(i))},{signal:e}),t}edit(){const{bottom:t,left:e,right:s}=n(this,Ke).getClientDimensions(),i={top:t};n(this,Ke)._uiManager.direction==="ltr"?i.right=s:i.left=e,n(this,Ke)._uiManager.editComment(n(this,Ke),i)}finish(){n(this,As)&&(n(this,As).focus({focusVisible:n(this,Xn)}),p(this,Xn,!1))}isDeleted(){return n(this,ji)||n(this,Ws)===""}hasBeenEdited(){return this.isDeleted()||n(this,Ws)!==n(this,lh)}serialize(){return this.data}get data(){return{text:n(this,Ws),date:n(this,Ga),deleted:n(this,ji)}}set data(t){if(t===null){p(this,Ws,""),p(this,ji,!0);return}p(this,Ws,t),p(this,Ga,new Date),p(this,ji,!1)}setInitialText(t){p(this,lh,t),this.data=t}toggle(t=!1){n(this,As)&&(n(this,As).disabled=!t)}shown(){}destroy(){var t;(t=n(this,As))==null||t.remove(),p(this,As,null),p(this,Ws,""),p(this,Ga,null),p(this,Ke,null),p(this,Xn,!1),p(this,ji,!1)}}As=new WeakMap,Xn=new WeakMap,Ke=new WeakMap,lh=new WeakMap,Ws=new WeakMap,Ga=new WeakMap,ji=new WeakMap;var Ua,qn,hh,ch,dh,uh,fh,Xs,Yn,qs,Kn,Ys,Tu,Xm,xu,qm,ku,Ym;const Kg=class Kg{constructor({container:t,isPinchingDisabled:e=null,isPinchingStopped:s=null,onPinchStart:i=null,onPinching:r=null,onPinchEnd:a=null,signal:o}){d(this,Tu);d(this,xu);d(this,ku);d(this,Ua,void 0);d(this,qn,!1);d(this,hh,null);d(this,ch,void 0);d(this,dh,void 0);d(this,uh,void 0);d(this,fh,void 0);d(this,Xs,null);d(this,Yn,void 0);d(this,qs,null);d(this,Kn,void 0);d(this,Ys,null);p(this,Ua,t),p(this,hh,s),p(this,ch,e),p(this,dh,i),p(this,uh,r),p(this,fh,a),p(this,Kn,new AbortController),p(this,Yn,AbortSignal.any([o,n(this,Kn).signal])),t.addEventListener("touchstart",b(this,Tu,Xm).bind(this),{passive:!1,signal:n(this,Yn)})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return 35/Ds.pixelRatio}destroy(){var t,e;(t=n(this,Kn))==null||t.abort(),p(this,Kn,null),(e=n(this,Xs))==null||e.abort(),p(this,Xs,null)}};Ua=new WeakMap,qn=new WeakMap,hh=new WeakMap,ch=new WeakMap,dh=new WeakMap,uh=new WeakMap,fh=new WeakMap,Xs=new WeakMap,Yn=new WeakMap,qs=new WeakMap,Kn=new WeakMap,Ys=new WeakMap,Tu=new WeakSet,Xm=function(t){var i,r,a;if((i=n(this,ch))!=null&&i.call(this))return;if(t.touches.length===1){if(n(this,Xs))return;const o=p(this,Xs,new AbortController),l=AbortSignal.any([n(this,Yn),o.signal]),h=n(this,Ua),c={capture:!0,signal:l,passive:!1},f=g=>{var m;g.pointerType==="touch"&&((m=n(this,Xs))==null||m.abort(),p(this,Xs,null))};h.addEventListener("pointerdown",g=>{g.pointerType==="touch"&&(vt(g),f(g))},c),h.addEventListener("pointerup",f,c),h.addEventListener("pointercancel",f,c);return}if(!n(this,Ys)){p(this,Ys,new AbortController);const o=AbortSignal.any([n(this,Yn),n(this,Ys).signal]),l=n(this,Ua),h={signal:o,capture:!1,passive:!1};l.addEventListener("touchmove",b(this,xu,qm).bind(this),h);const c=b(this,ku,Ym).bind(this);l.addEventListener("touchend",c,h),l.addEventListener("touchcancel",c,h),h.capture=!0,l.addEventListener("pointerdown",vt,h),l.addEventListener("pointermove",vt,h),l.addEventListener("pointercancel",vt,h),l.addEventListener("pointerup",vt,h),(r=n(this,dh))==null||r.call(this)}if(vt(t),t.touches.length!==2||(a=n(this,hh))!=null&&a.call(this)){p(this,qs,null);return}let[e,s]=t.touches;e.identifier>s.identifier&&([e,s]=[s,e]),p(this,qs,{touch0X:e.screenX,touch0Y:e.screenY,touch1X:s.screenX,touch1Y:s.screenY})},xu=new WeakSet,qm=function(t){var E;if(!n(this,qs)||t.touches.length!==2)return;vt(t);let[e,s]=t.touches;e.identifier>s.identifier&&([e,s]=[s,e]);const{screenX:i,screenY:r}=e,{screenX:a,screenY:o}=s,l=n(this,qs),{touch0X:h,touch0Y:c,touch1X:f,touch1Y:g}=l,m=f-h,A=g-c,y=a-i,v=o-r,w=Math.hypot(y,v)||1,S=Math.hypot(m,A)||1;if(!n(this,qn)&&Math.abs(S-w)<=Kg.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(l.touch0X=i,l.touch0Y=r,l.touch1X=a,l.touch1Y=o,!n(this,qn)){p(this,qn,!0);return}const _=[(i+a)/2,(r+o)/2];(E=n(this,uh))==null||E.call(this,_,S,w)},ku=new WeakSet,Ym=function(t){var e;t.touches.length>=2||(n(this,Ys)&&(n(this,Ys).abort(),p(this,Ys,null),(e=n(this,fh))==null||e.call(this)),n(this,qs)&&(vt(t),p(this,qs,null),p(this,qn,!1)))};let Zd=Kg;var Qn,Qe,ot,$t,ja,Vi,ph,Jn,zt,Zn,Ks,Wi,gh,tr,pe,mh,er,Qs,ys,Va,Wa,Be,sr,bh,Pu,Ah,Ip,yh,Fp,Xa,Cd,Mu,Km,Ru,Qm,wh,Np,qa,Td,vh,Op,Du,Jm,Lu,Zm,Iu,tb,_h,Bp,Fu,eb,Sh,Hp,Nu,sb,Ou,ib,Bu,nb,Eh,$p,ir,wl;const G=class G{constructor(t){d(this,Ah);d(this,Xa);d(this,Mu);d(this,Ru);d(this,wh);d(this,qa);d(this,vh);d(this,Du);d(this,Lu);d(this,Iu);d(this,_h);d(this,Fu);d(this,Sh);d(this,Nu);d(this,Ou);d(this,Bu);d(this,Eh);d(this,ir);d(this,Qn,null);d(this,Qe,null);d(this,ot,null);d(this,$t,null);d(this,ja,!1);d(this,Vi,null);d(this,ph,"");d(this,Jn,!1);d(this,zt,null);d(this,Zn,null);d(this,Ks,null);d(this,Wi,null);d(this,gh,"");d(this,tr,!1);d(this,pe,null);d(this,mh,!1);d(this,er,!1);d(this,Qs,!1);d(this,ys,null);d(this,Va,0);d(this,Wa,0);d(this,Be,null);d(this,sr,null);k(this,"isSelected",!1);k(this,"_isCopy",!1);k(this,"_editToolbar",null);k(this,"_initialOptions",Object.create(null));k(this,"_initialData",null);k(this,"_isVisible",!0);k(this,"_uiManager",null);k(this,"_focusEventsAllowed",!0);d(this,bh,!1);d(this,Pu,G._zIndex++);this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null,this.annotationElementId=t.annotationElementId||null;const{rotation:e,rawDims:{pageWidth:s,pageHeight:i,pageX:r,pageY:a}}=this.parent.viewport;this.rotation=e,this.pageRotation=(360+e-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[s,i],this.pageTranslation=[r,a];const[o,l]=this.parentDimensions;this.x=t.x/o,this.y=t.y/l,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const t=G.prototype._resizeWithKeyboard,e=aa.TRANSLATE_SMALL,s=aa.TRANSLATE_BIG;return V(this,"_resizerKeyboardManager",new hd([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-e,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-s,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[e,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[s,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-e]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-s]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,e]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,s]}],[["Escape","mac+Escape"],G.prototype._stopResizingWithKeyboard]]))}get editorType(){return Object.getPrototypeOf(this).constructor._type}get mode(){return Object.getPrototypeOf(this).constructor._editorType}static get isDrawer(){return!1}static get _defaultLineColor(){return V(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){const e=new ry({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});e.annotationElementId=t.annotationElementId,e.deleted=!0,e._uiManager.addToAnnotationStorage(e)}static initialize(t,e){if(G._l10n??(G._l10n=t),G._l10nResizer||(G._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),G._borderLineWidth!==-1)return;const s=getComputedStyle(document.documentElement);G._borderLineWidth=parseFloat(s.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,e){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,e){st("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return n(this,bh)}set _isDraggable(t){var e;p(this,bh,t),(e=this.div)==null||e.classList.toggle("draggable",t)}get isEnterHandled(){return!0}center(){const[t,e]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*e/(t*2),this.y+=this.width*t/(e*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*e/(t*2),this.y-=this.width*t/(e*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=n(this,Pu)}setParent(t){t!==null?(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions):b(this,ir,wl).call(this),this.parent=t}focusin(t){this._focusEventsAllowed&&(n(this,tr)?p(this,tr,!1):this.parent.setSelected(this))}focusout(t){var s;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const e=t.relatedTarget;e!=null&&e.closest(`#${this.id}`)||(t.preventDefault(),(s=this.parent)!=null&&s.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.isInEditMode()&&this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,e,s,i){const[r,a]=this.parentDimensions;[s,i]=this.screenToPageTranslation(s,i),this.x=(t+s)/r,this.y=(e+i)/a,this.fixAndSetPosition()}_moveAfterPaste(t,e){const[s,i]=this.parentDimensions;this.setAt(t*s,e*i,this.width*s,this.height*i),this._onTranslated()}translate(t,e){b(this,Ah,Ip).call(this,this.parentDimensions,t,e)}translateInPage(t,e){n(this,pe)||p(this,pe,[this.x,this.y,this.width,this.height]),b(this,Ah,Ip).call(this,this.pageDimensions,t,e),this.div.scrollIntoView({block:"nearest"})}translationDone(){this._onTranslated(this.x,this.y)}drag(t,e){n(this,pe)||p(this,pe,[this.x,this.y,this.width,this.height]);const{div:s,parentDimensions:[i,r]}=this;if(this.x+=t/i,this.y+=e/r,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:f,y:g}=this.div.getBoundingClientRect();this.parent.findNewParent(this,f,g)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:a,y:o}=this;const[l,h]=this.getBaseTranslation();a+=l,o+=h;const{style:c}=s;c.left=`${(100*a).toFixed(2)}%`,c.top=`${(100*o).toFixed(2)}%`,this._onTranslating(a,o),s.scrollIntoView({block:"nearest"})}_onTranslating(t,e){}_onTranslated(t,e){}get _hasBeenMoved(){return!!n(this,pe)&&(n(this,pe)[0]!==this.x||n(this,pe)[1]!==this.y)}get _hasBeenResized(){return!!n(this,pe)&&(n(this,pe)[2]!==this.width||n(this,pe)[3]!==this.height)}getBaseTranslation(){const[t,e]=this.parentDimensions,{_borderLineWidth:s}=G,i=s/t,r=s/e;switch(this.rotation){case 90:return[-i,r];case 180:return[i,r];case 270:return[i,-r];default:return[-i,-r]}}get _mustFixPosition(){return!0}fixAndSetPosition(t=this.rotation){const{div:{style:e},pageDimensions:[s,i]}=this;let{x:r,y:a,width:o,height:l}=this;if(o*=s,l*=i,r*=s,a*=i,this._mustFixPosition)switch(t){case 0:r=ne(r,0,s-o),a=ne(a,0,i-l);break;case 90:r=ne(r,0,s-l),a=ne(a,o,i);break;case 180:r=ne(r,o,s),a=ne(a,l,i);break;case 270:r=ne(r,l,s),a=ne(a,0,i-o);break}this.x=r/=s,this.y=a/=i;const[h,c]=this.getBaseTranslation();r+=h,a+=c,e.left=`${(100*r).toFixed(2)}%`,e.top=`${(100*a).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(t,e){var s;return b(s=G,yh,Fp).call(s,t,e,this.parentRotation)}pageTranslationToScreen(t,e){var s;return b(s=G,yh,Fp).call(s,t,e,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:t,pageDimensions:[e,s]}=this;return[e*t,s*t]}setDims(t,e){const[s,i]=this.parentDimensions,{style:r}=this.div;r.width=`${(100*t/s).toFixed(2)}%`,n(this,Jn)||(r.height=`${(100*e/i).toFixed(2)}%`)}fixDims(){const{style:t}=this.div,{height:e,width:s}=t,i=s.endsWith("%"),r=!n(this,Jn)&&e.endsWith("%");if(i&&r)return;const[a,o]=this.parentDimensions;i||(t.width=`${(100*parseFloat(s)/a).toFixed(2)}%`),!n(this,Jn)&&!r&&(t.height=`${(100*parseFloat(e)/o).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}_onResized(){}static _round(t){return Math.round(t*1e4)/1e4}_onResizing(){}altTextFinish(){var t;(t=n(this,ot))==null||t.finish()}get toolbarButtons(){return null}async addEditToolbar(){if(this._editToolbar||n(this,er))return this._editToolbar;this._editToolbar=new Ep(this),this.div.append(this._editToolbar.render());const{toolbarButtons:t}=this;if(t)for(const[e,s]of t)await this._editToolbar.addButton(e,s);return this._editToolbar.addButton("comment",this.addCommentButton()),this._editToolbar.addButton("delete"),this._editToolbar}removeEditToolbar(){var t;this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,(t=n(this,ot))==null||t.destroy())}addContainer(t){var s;const e=(s=this._editToolbar)==null?void 0:s.div;e?e.before(t):this.div.append(t)}getClientDimensions(){return this.div.getBoundingClientRect()}createAltText(){return n(this,ot)||(Jd.initialize(G._l10n),p(this,ot,new Jd(this)),n(this,Qn)&&(n(this,ot).data=n(this,Qn),p(this,Qn,null))),n(this,ot)}get altTextData(){var t;return(t=n(this,ot))==null?void 0:t.data}set altTextData(t){n(this,ot)&&(n(this,ot).data=t)}get guessedAltText(){var t;return(t=n(this,ot))==null?void 0:t.guessedText}async setGuessedAltText(t){var e;await((e=n(this,ot))==null?void 0:e.setGuessedText(t))}serializeAltText(t){var e;return(e=n(this,ot))==null?void 0:e.serialize(t)}hasAltText(){return!!n(this,ot)&&!n(this,ot).isEmpty()}hasAltTextData(){var t;return((t=n(this,ot))==null?void 0:t.hasData())??!1}addCommentButton(){return n(this,$t)?n(this,$t):p(this,$t,new fd(this))}get commentColor(){return null}get comment(){const t=n(this,$t);return{text:t.data.text,date:t.data.date,deleted:t.isDeleted(),color:this.commentColor}}set comment(t){n(this,$t)||p(this,$t,new fd(this)),n(this,$t).data=t}setCommentData(t){n(this,$t)||p(this,$t,new fd(this)),n(this,$t).setInitialText(t)}get hasEditedComment(){var t;return(t=n(this,$t))==null?void 0:t.hasBeenEdited()}async editComment(){n(this,$t)||p(this,$t,new fd(this)),n(this,$t).edit()}addComment(t){if(this.hasEditedComment){const[,,,i]=t.rect,[r]=this.pageDimensions,[a]=this.pageTranslation,o=a+r+1,l=i-100,h=o+180;t.popup={contents:this.comment.text,deleted:this.comment.deleted,rect:[o,l,h,i]}}}render(){var a;const t=this.div=document.createElement("div");t.setAttribute("data-editor-rotation",(360-this.rotation)%360),t.className=this.name,t.setAttribute("id",this.id),t.tabIndex=n(this,ja)?-1:0,t.setAttribute("role","application"),this.defaultL10nId&&t.setAttribute("data-l10n-id",this.defaultL10nId),this._isVisible||t.classList.add("hidden"),this.setInForeground(),b(this,Sh,Hp).call(this);const[e,s]=this.parentDimensions;this.parentRotation%180!==0&&(t.style.maxWidth=`${(100*s/e).toFixed(2)}%`,t.style.maxHeight=`${(100*e/s).toFixed(2)}%`);const[i,r]=this.getInitialTranslation();return this.translate(i,r),Fm(this,t,["keydown","pointerdown","dblclick"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(n(this,sr)||p(this,sr,new Zd({container:t,isPinchingDisabled:()=>!this.isSelected,onPinchStart:b(this,Du,Jm).bind(this),onPinching:b(this,Lu,Zm).bind(this),onPinchEnd:b(this,Iu,tb).bind(this),signal:this._uiManager._signal}))),(a=this._uiManager._editorUndoBar)==null||a.hide(),t}pointerdown(t){const{isMac:e}=Wt.platform;if(t.button!==0||t.ctrlKey&&e){t.preventDefault();return}if(p(this,tr,!0),this._isDraggable){b(this,Fu,eb).call(this,t);return}b(this,_h,Bp).call(this,t)}_onStartDragging(){}_onStopDragging(){}moveInDOM(){n(this,ys)&&clearTimeout(n(this,ys)),p(this,ys,setTimeout(()=>{var t;p(this,ys,null),(t=this.parent)==null||t.moveEditorInDOM(this)},0))}_setParentAndPosition(t,e,s){t.changeParent(this),this.x=e,this.y=s,this.fixAndSetPosition(),this._onTranslated()}getRect(t,e,s=this.rotation){const i=this.parentScale,[r,a]=this.pageDimensions,[o,l]=this.pageTranslation,h=t/i,c=e/i,f=this.x*r,g=this.y*a,m=this.width*r,A=this.height*a;switch(s){case 0:return[f+h+o,a-g-c-A+l,f+h+m+o,a-g-c+l];case 90:return[f+c+o,a-g+h+l,f+c+A+o,a-g+h+m+l];case 180:return[f-h-m+o,a-g+c+l,f-h+o,a-g+c+A+l];case 270:return[f-c-A+o,a-g-h-m+l,f-c+o,a-g-h+l];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,e){const[s,i,r,a]=t,o=r-s,l=a-i;switch(this.rotation){case 0:return[s,e-a,o,l];case 90:return[s,e-i,l,o];case 180:return[r,e-i,o,l];case 270:return[r,e-a,l,o];default:throw new Error("Invalid rotation")}}getPDFRect(){return this.getRect(0,0)}onceAdded(t){}isEmpty(){return!1}enableEditMode(){return this.isInEditMode()?!1:(this.parent.setEditingState(!1),p(this,er,!0),!0)}disableEditMode(){return this.isInEditMode()?(this.parent.setEditingState(!0),p(this,er,!1),!0):!1}isInEditMode(){return n(this,er)}shouldGetKeyboardEvents(){return n(this,Qs)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top:t,left:e,bottom:s,right:i}=this.getClientDimensions(),{innerHeight:r,innerWidth:a}=window;return e0&&t0}rebuild(){b(this,Sh,Hp).call(this)}rotate(t){}resize(){}serializeDeleted(){var t;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:((t=this._initialData)==null?void 0:t.popupRef)||""}}serialize(t=!1,e=null){st("An editor must be serializable")}static async deserialize(t,e,s){const i=new this.prototype.constructor({parent:e,id:e.getNextId(),uiManager:s,annotationElementId:t.annotationElementId});i.rotation=t.rotation,p(i,Qn,t.accessibilityData),i._isCopy=t.isCopy||!1;const[r,a]=i.pageDimensions,[o,l,h,c]=i.getRectInCurrentCoords(t.rect,a);return i.x=o/r,i.y=l/a,i.width=h/r,i.height=c/a,i}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var t,e;if((t=n(this,Wi))==null||t.abort(),p(this,Wi,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),n(this,ys)&&(clearTimeout(n(this,ys)),p(this,ys,null)),b(this,ir,wl).call(this),this.removeEditToolbar(),n(this,Be)){for(const s of n(this,Be).values())clearTimeout(s);p(this,Be,null)}this.parent=null,(e=n(this,sr))==null||e.destroy(),p(this,sr,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(b(this,Mu,Km).call(this),n(this,zt).classList.remove("hidden"))}get toolbarPosition(){return null}keydown(t){if(!this.isResizable||t.target!==this.div||t.key!=="Enter")return;this._uiManager.setSelected(this),p(this,Ks,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const e=n(this,zt).children;if(!n(this,Qe)){p(this,Qe,Array.from(e));const a=b(this,Nu,sb).bind(this),o=b(this,Ou,ib).bind(this),l=this._uiManager._signal;for(const h of n(this,Qe)){const c=h.getAttribute("data-resizer-name");h.setAttribute("role","spinbutton"),h.addEventListener("keydown",a,{signal:l}),h.addEventListener("blur",o,{signal:l}),h.addEventListener("focus",b(this,Bu,nb).bind(this,c),{signal:l}),h.setAttribute("data-l10n-id",G._l10nResizer[c])}}const s=n(this,Qe)[0];let i=0;for(const a of e){if(a===s)break;i++}const r=(360-this.rotation+this.parentRotation)%360/90*(n(this,Qe).length/4);if(r!==i){if(ri)for(let o=0;o{var i,r;(i=this.div)!=null&&i.classList.contains("selectedEditor")&&((r=this._editToolbar)==null||r.show())});return}(e=this._editToolbar)==null||e.show(),(s=n(this,ot))==null||s.toggleAltTextBadge(!1)}}unselect(){var t,e,s,i,r;this.isSelected&&(this.isSelected=!1,(t=n(this,zt))==null||t.classList.add("hidden"),(e=this.div)==null||e.classList.remove("selectedEditor"),(s=this.div)!=null&&s.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(i=this._editToolbar)==null||i.hide(),(r=n(this,ot))==null||r.toggleAltTextBadge(!0))}updateParams(t,e){}disableEditing(){}enableEditing(){}get canChangeContent(){return!1}enterInEditMode(){this.canChangeContent&&(this.enableEditMode(),this.div.focus())}dblclick(t){this.enterInEditMode(),this.parent.updateToolbar({mode:this.constructor._editorType,editId:this.id})}getElementForAltText(){return this.div}get contentDiv(){return this.div}get isEditing(){return n(this,mh)}set isEditing(t){p(this,mh,t),this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(t,e){p(this,Jn,!0);const s=t/e,{style:i}=this.div;i.aspectRatio=s,i.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(t,e=!1){if(e){n(this,Be)||p(this,Be,new Map);const{action:s}=t;let i=n(this,Be).get(s);i&&clearTimeout(i),i=setTimeout(()=>{this._reportTelemetry(t),n(this,Be).delete(s),n(this,Be).size===0&&p(this,Be,null)},G._telemetryTimeout),n(this,Be).set(s,i);return}t.type||(t.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:t}})}show(t=this._isVisible){this.div.classList.toggle("hidden",!t),this._isVisible=t}enable(){this.div&&(this.div.tabIndex=0),p(this,ja,!1)}disable(){this.div&&(this.div.tabIndex=-1),p(this,ja,!0)}renderAnnotationElement(t){if(this.deleted)return t.hide(),null;let e=t.container.querySelector(".annotationContent");if(!e)e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),t.container.prepend(e);else if(e.nodeName==="CANVAS"){const s=e;e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),s.before(e)}return e}resetAnnotationElement(t){const{firstChild:e}=t.container;(e==null?void 0:e.nodeName)==="DIV"&&e.classList.contains("annotationContent")&&e.remove()}};Qn=new WeakMap,Qe=new WeakMap,ot=new WeakMap,$t=new WeakMap,ja=new WeakMap,Vi=new WeakMap,ph=new WeakMap,Jn=new WeakMap,zt=new WeakMap,Zn=new WeakMap,Ks=new WeakMap,Wi=new WeakMap,gh=new WeakMap,tr=new WeakMap,pe=new WeakMap,mh=new WeakMap,er=new WeakMap,Qs=new WeakMap,ys=new WeakMap,Va=new WeakMap,Wa=new WeakMap,Be=new WeakMap,sr=new WeakMap,bh=new WeakMap,Pu=new WeakMap,Ah=new WeakSet,Ip=function([t,e],s,i){[s,i]=this.screenToPageTranslation(s,i),this.x+=s/t,this.y+=i/e,this._onTranslating(this.x,this.y),this.fixAndSetPosition()},yh=new WeakSet,Fp=function(t,e,s){switch(s){case 90:return[e,-t];case 180:return[-t,-e];case 270:return[-e,t];default:return[t,e]}},Xa=new WeakSet,Cd=function(t){switch(t){case 90:{const[e,s]=this.pageDimensions;return[0,-e/s,s/e,0]}case 180:return[-1,0,0,-1];case 270:{const[e,s]=this.pageDimensions;return[0,e/s,-s/e,0]}default:return[1,0,0,1]}},Mu=new WeakSet,Km=function(){if(n(this,zt))return;p(this,zt,document.createElement("div")),n(this,zt).classList.add("resizers");const t=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],e=this._uiManager._signal;for(const s of t){const i=document.createElement("div");n(this,zt).append(i),i.classList.add("resizer",s),i.setAttribute("data-resizer-name",s),i.addEventListener("pointerdown",b(this,Ru,Qm).bind(this,s),{signal:e}),i.addEventListener("contextmenu",je,{signal:e}),i.tabIndex=-1}this.div.prepend(n(this,zt))},Ru=new WeakSet,Qm=function(t,e){var c;e.preventDefault();const{isMac:s}=Wt.platform;if(e.button!==0||e.ctrlKey&&s)return;(c=n(this,ot))==null||c.toggle(!1);const i=this._isDraggable;this._isDraggable=!1,p(this,Zn,[e.screenX,e.screenY]);const r=new AbortController,a=this._uiManager.combinedSignal(r);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",b(this,vh,Op).bind(this,t),{passive:!0,capture:!0,signal:a}),window.addEventListener("touchmove",vt,{passive:!1,signal:a}),window.addEventListener("contextmenu",je,{signal:a}),p(this,Ks,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const o=this.parent.div.style.cursor,l=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(e.target).cursor;const h=()=>{var f;r.abort(),this.parent.togglePointerEvents(!0),(f=n(this,ot))==null||f.toggle(!0),this._isDraggable=i,this.parent.div.style.cursor=o,this.div.style.cursor=l,b(this,qa,Td).call(this)};window.addEventListener("pointerup",h,{signal:a}),window.addEventListener("blur",h,{signal:a})},wh=new WeakSet,Np=function(t,e,s,i){this.width=s,this.height=i,this.x=t,this.y=e;const[r,a]=this.parentDimensions;this.setDims(r*s,a*i),this.fixAndSetPosition(),this._onResized()},qa=new WeakSet,Td=function(){if(!n(this,Ks))return;const{savedX:t,savedY:e,savedWidth:s,savedHeight:i}=n(this,Ks);p(this,Ks,null);const r=this.x,a=this.y,o=this.width,l=this.height;r===t&&a===e&&o===s&&l===i||this.addCommands({cmd:b(this,wh,Np).bind(this,r,a,o,l),undo:b(this,wh,Np).bind(this,t,e,s,i),mustExec:!0})},vh=new WeakSet,Op=function(t,e){const[s,i]=this.parentDimensions,r=this.x,a=this.y,o=this.width,l=this.height,h=G.MIN_SIZE/s,c=G.MIN_SIZE/i,f=b(this,Xa,Cd).call(this,this.rotation),g=(B,N)=>[f[0]*B+f[2]*N,f[1]*B+f[3]*N],m=b(this,Xa,Cd).call(this,360-this.rotation),A=(B,N)=>[m[0]*B+m[2]*N,m[1]*B+m[3]*N];let y,v,w=!1,S=!1;switch(t){case"topLeft":w=!0,y=(B,N)=>[0,0],v=(B,N)=>[B,N];break;case"topMiddle":y=(B,N)=>[B/2,0],v=(B,N)=>[B/2,N];break;case"topRight":w=!0,y=(B,N)=>[B,0],v=(B,N)=>[0,N];break;case"middleRight":S=!0,y=(B,N)=>[B,N/2],v=(B,N)=>[0,N/2];break;case"bottomRight":w=!0,y=(B,N)=>[B,N],v=(B,N)=>[0,0];break;case"bottomMiddle":y=(B,N)=>[B/2,N],v=(B,N)=>[B/2,0];break;case"bottomLeft":w=!0,y=(B,N)=>[0,N],v=(B,N)=>[B,0];break;case"middleLeft":S=!0,y=(B,N)=>[0,N/2],v=(B,N)=>[B,N/2];break}const _=y(o,l),E=v(o,l);let C=g(...E);const T=G._round(r+C[0]),x=G._round(a+C[1]);let P=1,M=1,D,R;if(e.fromKeyboard)({deltaX:D,deltaY:R}=e);else{const{screenX:B,screenY:N}=e,[Pt,At]=n(this,Zn);[D,R]=this.screenToPageTranslation(B-Pt,N-At),n(this,Zn)[0]=B,n(this,Zn)[1]=N}if([D,R]=A(D/s,R/i),w){const B=Math.hypot(o,l);P=M=Math.max(Math.min(Math.hypot(E[0]-_[0]-D,E[1]-_[1]-R)/B,1/o,1/l),h/o,c/l)}else S?P=ne(Math.abs(E[0]-_[0]-D),h,1)/o:M=ne(Math.abs(E[1]-_[1]-R),c,1)/l;const H=G._round(o*P),U=G._round(l*M);C=g(...v(H,U));const W=T-C[0],Y=x-C[1];n(this,pe)||p(this,pe,[this.x,this.y,this.width,this.height]),this.width=H,this.height=U,this.x=W,this.y=Y,this.setDims(s*H,i*U),this.fixAndSetPosition(),this._onResizing()},Du=new WeakSet,Jm=function(){var t;p(this,Ks,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height}),(t=n(this,ot))==null||t.toggle(!1),this.parent.togglePointerEvents(!1)},Lu=new WeakSet,Zm=function(t,e,s){let r=.7*(s/e)+1-.7;if(r===1)return;const a=b(this,Xa,Cd).call(this,this.rotation),o=(T,x)=>[a[0]*T+a[2]*x,a[1]*T+a[3]*x],[l,h]=this.parentDimensions,c=this.x,f=this.y,g=this.width,m=this.height,A=G.MIN_SIZE/l,y=G.MIN_SIZE/h;r=Math.max(Math.min(r,1/g,1/m),A/g,y/m);const v=G._round(g*r),w=G._round(m*r);if(v===g&&w===m)return;n(this,pe)||p(this,pe,[c,f,g,m]);const S=o(g/2,m/2),_=G._round(c+S[0]),E=G._round(f+S[1]),C=o(v/2,w/2);this.x=_-C[0],this.y=E-C[1],this.width=v,this.height=w,this.setDims(l*v,h*w),this.fixAndSetPosition(),this._onResizing()},Iu=new WeakSet,tb=function(){var t;(t=n(this,ot))==null||t.toggle(!0),this.parent.togglePointerEvents(!0),b(this,qa,Td).call(this)},_h=new WeakSet,Bp=function(t){const{isMac:e}=Wt.platform;t.ctrlKey&&!e||t.shiftKey||t.metaKey&&e?this.parent.toggleSelected(this):this.parent.setSelected(this)},Fu=new WeakSet,eb=function(t){const{isSelected:e}=this;this._uiManager.setUpDragSession();let s=!1;const i=new AbortController,r=this._uiManager.combinedSignal(i),a={capture:!0,passive:!1,signal:r},o=h=>{i.abort(),p(this,Vi,null),p(this,tr,!1),this._uiManager.endDragSession()||b(this,_h,Bp).call(this,h),s&&this._onStopDragging()};e&&(p(this,Va,t.clientX),p(this,Wa,t.clientY),p(this,Vi,t.pointerId),p(this,ph,t.pointerType),window.addEventListener("pointermove",h=>{s||(s=!0,this._onStartDragging());const{clientX:c,clientY:f,pointerId:g}=h;if(g!==n(this,Vi)){vt(h);return}const[m,A]=this.screenToPageTranslation(c-n(this,Va),f-n(this,Wa));p(this,Va,c),p(this,Wa,f),this._uiManager.dragSelectedEditors(m,A)},a),window.addEventListener("touchmove",vt,a),window.addEventListener("pointerdown",h=>{h.pointerType===n(this,ph)&&(n(this,sr)||h.isPrimary)&&o(h),vt(h)},a));const l=h=>{if(!n(this,Vi)||n(this,Vi)===h.pointerId){o(h);return}vt(h)};window.addEventListener("pointerup",l,{signal:r}),window.addEventListener("blur",l,{signal:r})},Sh=new WeakSet,Hp=function(){if(n(this,Wi)||!this.div)return;p(this,Wi,new AbortController);const t=this._uiManager.combinedSignal(n(this,Wi));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:t}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:t})},Nu=new WeakSet,sb=function(t){G._resizerKeyboardManager.exec(this,t)},Ou=new WeakSet,ib=function(t){var e;n(this,Qs)&&((e=t.relatedTarget)==null?void 0:e.parentNode)!==n(this,zt)&&b(this,ir,wl).call(this)},Bu=new WeakSet,nb=function(t){p(this,gh,n(this,Qs)?t:"")},Eh=new WeakSet,$p=function(t){if(n(this,Qe))for(const e of n(this,Qe))e.tabIndex=t},ir=new WeakSet,wl=function(){p(this,Qs,!1),b(this,Eh,$p).call(this,-1),b(this,qa,Td).call(this)},d(G,yh),k(G,"_l10n",null),k(G,"_l10nResizer",null),k(G,"_borderLineWidth",-1),k(G,"_colorManager",new xp),k(G,"_zIndex",1),k(G,"_telemetryTimeout",1e3);let rt=G;class ry extends rt{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const rm=3285377520,De=4294901760,ls=65535;class rb{constructor(t){this.h1=t?t&4294967295:rm,this.h2=t?t&4294967295:rm}update(t){let e,s;if(typeof t=="string"){e=new Uint8Array(t.length*2),s=0;for(let y=0,v=t.length;y>>8,e[s++]=w&255)}}else if(ArrayBuffer.isView(t))e=t.slice(),s=e.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const i=s>>2,r=s-i*4,a=new Uint32Array(e.buffer,0,i);let o=0,l=0,h=this.h1,c=this.h2;const f=3432918353,g=461845907,m=f&ls,A=g&ls;for(let y=0;y>>17,o=o*g&De|o*A&ls,h^=o,h=h<<13|h>>>19,h=h*5+3864292196):(l=a[y],l=l*f&De|l*m&ls,l=l<<15|l>>>17,l=l*g&De|l*A&ls,c^=l,c=c<<13|c>>>19,c=c*5+3864292196);switch(o=0,r){case 3:o^=e[i*4+2]<<16;case 2:o^=e[i*4+1]<<8;case 1:o^=e[i*4],o=o*f&De|o*m&ls,o=o<<15|o>>>17,o=o*g&De|o*A&ls,i&1?h^=o:c^=o}this.h1=h,this.h2=c}hexdigest(){let t=this.h1,e=this.h2;return t^=e>>>1,t=t*3981806797&De|t*36045&ls,e=e*4283543511&De|((e<<16|t>>>16)*2950163797&De)>>>16,t^=e>>>1,t=t*444984403&De|t*60499&ls,e=e*3301882366&De|((e<<16|t>>>16)*3120437893&De)>>>16,t^=e>>>1,(t>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}}const zp=Object.freeze({map:null,hash:"",transfer:void 0});var nr,rr,Gt,Hu,ab;class Gg{constructor(){d(this,Hu);d(this,nr,!1);d(this,rr,null);d(this,Gt,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(t,e){const s=n(this,Gt).get(t);return s===void 0?e:Object.assign(e,s)}getRawValue(t){return n(this,Gt).get(t)}remove(t){if(n(this,Gt).delete(t),n(this,Gt).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const e of n(this,Gt).values())if(e instanceof rt)return;this.onAnnotationEditor(null)}}setValue(t,e){const s=n(this,Gt).get(t);let i=!1;if(s!==void 0)for(const[r,a]of Object.entries(e))s[r]!==a&&(i=!0,s[r]=a);else i=!0,n(this,Gt).set(t,e);i&&b(this,Hu,ab).call(this),e instanceof rt&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(e.constructor._type)}has(t){return n(this,Gt).has(t)}get size(){return n(this,Gt).size}resetModified(){n(this,nr)&&(p(this,nr,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new ob(this)}get serializable(){if(n(this,Gt).size===0)return zp;const t=new Map,e=new rb,s=[],i=Object.create(null);let r=!1;for(const[a,o]of n(this,Gt)){const l=o instanceof rt?o.serialize(!1,i):o;l&&(t.set(a,l),e.update(`${a}:${JSON.stringify(l)}`),r||(r=!!l.bitmap))}if(r)for(const a of t.values())a.bitmap&&s.push(a.bitmap);return t.size>0?{map:t,hash:e.hexdigest(),transfer:s}:zp}get editorStats(){let t=null;const e=new Map;for(const s of n(this,Gt).values()){if(!(s instanceof rt))continue;const i=s.telemetryFinalData;if(!i)continue;const{type:r}=i;e.has(r)||e.set(r,Object.getPrototypeOf(s).constructor),t||(t=Object.create(null));const a=t[r]||(t[r]=new Map);for(const[o,l]of Object.entries(i)){if(o==="type")continue;let h=a.get(o);h||(h=new Map,a.set(o,h));const c=h.get(l)??0;h.set(l,c+1)}}for(const[s,i]of e)t[s]=i.computeTelemetryFinalData(t[s]);return t}resetModifiedIds(){p(this,rr,null)}get modifiedIds(){if(n(this,rr))return n(this,rr);const t=[];for(const e of n(this,Gt).values())!(e instanceof rt)||!e.annotationElementId||!e.serialize()||t.push(e.annotationElementId);return p(this,rr,{ids:new Set(t),hash:t.join(",")})}[Symbol.iterator](){return n(this,Gt).entries()}}nr=new WeakMap,rr=new WeakMap,Gt=new WeakMap,Hu=new WeakSet,ab=function(){n(this,nr)||(p(this,nr,!0),typeof this.onSetModified=="function"&&this.onSetModified())};var Ch;class ob extends Gg{constructor(e){super();d(this,Ch,void 0);const{map:s,hash:i,transfer:r}=e.serializable,a=structuredClone(s,r?{transfer:r}:null);p(this,Ch,{map:a,hash:i,transfer:r})}get print(){st("Should not call PrintAnnotationStorage.print")}get serializable(){return n(this,Ch)}get modifiedIds(){return V(this,"modifiedIds",{ids:new Set,hash:""})}}Ch=new WeakMap;var Ya;class ay{constructor({ownerDocument:t=globalThis.document,styleElement:e=null}){d(this,Ya,new Set);this._document=t,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const e=this.styleElement.sheet;e.insertRule(t,e.cssRules.length)}clear(){for(const t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),n(this,Ya).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:t,disableFontFace:e,_inspectFont:s}){if(!(!t||n(this,Ya).has(t.loadedName))){if(_t(!e,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:i,src:r,style:a}=t,o=new FontFace(i,r,a);this.addNativeFontFace(o);try{await o.load(),n(this,Ya).add(i),s==null||s(t)}catch{z(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(o)}return}st("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(t){if(t.attached||t.missingFile&&!t.systemFontInfo)return;if(t.attached=!0,t.systemFontInfo){await this.loadSystemFont(t);return}if(this.isFontLoadingAPISupported){const s=t.createNativeFontFace();if(s){this.addNativeFontFace(s);try{await s.loaded}catch(i){throw z(`Failed to load font '${s.family}': '${i}'.`),t.disableFontFace=!0,i}}return}const e=t.createFontFaceRule();if(e){if(this.insertRule(e),this.isSyncFontLoadingSupported)return;await new Promise(s=>{const i=this._queueLoadingCallback(s);this._prepareFontLoadEvent(t,i)})}}get isFontLoadingAPISupported(){var e;const t=!!((e=this._document)!=null&&e.fonts);return V(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){return V(this,"isSyncFontLoadingSupported",ie||Wt.platform.isFirefox)}_queueLoadingCallback(t){function e(){for(_t(!i.done,"completeRequest() cannot be called twice."),i.done=!0;s.length>0&&s[0].done;){const r=s.shift();setTimeout(r.callback,0)}}const{loadingRequests:s}=this,i={done:!1,complete:e,callback:t};return s.push(i),i}get _loadTestFont(){const t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return V(this,"_loadTestFont",t)}_prepareFontLoadEvent(t,e){function s(E,C){return E.charCodeAt(C)<<24|E.charCodeAt(C+1)<<16|E.charCodeAt(C+2)<<8|E.charCodeAt(C+3)&255}function i(E,C,T,x){const P=E.substring(0,C),M=E.substring(C+T);return P+x+M}let r,a;const o=this._document.createElement("canvas");o.width=1,o.height=1;const l=o.getContext("2d");let h=0;function c(E,C){if(++h>30){z("Load test font never loaded."),C();return}if(l.font="30px "+E,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0){C();return}setTimeout(c.bind(null,E,C))}const f=`lt${Date.now()}${this.loadTestFontId++}`;let g=this._loadTestFont;g=i(g,976,f.length,f);const A=16,y=1482184792;let v=s(g,A);for(r=0,a=f.length-3;r{_.remove(),e.complete()})}}Ya=new WeakMap;class oy{constructor(t,e=null){this.compiledGlyphs=Object.create(null);for(const s in t)this[s]=t[s];this._inspectFont=e}createNativeFontFace(){var e;if(!this.data||this.disableFontFace)return null;let t;if(!this.cssFontInfo)t=new FontFace(this.loadedName,this.data,{});else{const s={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(s.style=`oblique ${this.cssFontInfo.italicAngle}deg`),t=new FontFace(this.cssFontInfo.fontFamily,this.data,s)}return(e=this._inspectFont)==null||e.call(this,this),t}createFontFaceRule(){var s;if(!this.data||this.disableFontFace)return null;const t=`url(data:${this.mimetype};base64,${Pm(this.data)});`;let e;if(!this.cssFontInfo)e=`@font-face {font-family:"${this.loadedName}";src:${t}}`;else{let i=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(i+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),e=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${i}src:${t}}`}return(s=this._inspectFont)==null||s.call(this,this,t),e}getPathGenerator(t,e){if(this.compiledGlyphs[e]!==void 0)return this.compiledGlyphs[e];const s=this.loadedName+"_path_"+e;let i;try{i=t.get(s)}catch(a){z(`getPathGenerator - ignoring character: "${a}".`)}const r=new Path2D(i||"");return this.fontExtraProperties||t.delete(s),this.compiledGlyphs[e]=r}}function ly(u){if(u instanceof URL)return u.href;if(typeof u=="string"){if(ie)return u;const t=URL.parse(u,window.location);if(t)return t.href}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function hy(u){if(ie&&typeof Buffer<"u"&&u instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(u instanceof Uint8Array&&u.byteLength===u.buffer.byteLength)return u;if(typeof u=="string")return ad(u);if(u instanceof ArrayBuffer||ArrayBuffer.isView(u)||typeof u=="object"&&!isNaN(u==null?void 0:u.length))return new Uint8Array(u);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function pd(u){if(typeof u!="string")return null;if(u.endsWith("/"))return u;throw new Error(`Invalid factory url: "${u}" must include trailing slash.`)}const Gp=u=>typeof u=="object"&&Number.isInteger(u==null?void 0:u.num)&&u.num>=0&&Number.isInteger(u==null?void 0:u.gen)&&u.gen>=0,cy=u=>typeof u=="object"&&typeof(u==null?void 0:u.name)=="string",dy=YA.bind(null,Gp,cy);var Js,$u;class uy{constructor(){d(this,Js,new Map);d(this,$u,Promise.resolve())}postMessage(t,e){const s={data:structuredClone(t,e?{transfer:e}:null)};n(this,$u).then(()=>{for(const[i]of n(this,Js))i.call(this,s)})}addEventListener(t,e,s=null){let i=null;if((s==null?void 0:s.signal)instanceof AbortSignal){const{signal:r}=s;if(r.aborted){z("LoopbackPort - cannot use an `aborted` signal.");return}const a=()=>this.removeEventListener(t,e);i=()=>r.removeEventListener("abort",a),r.addEventListener("abort",a)}n(this,Js).set(e,i)}removeEventListener(t,e){const s=n(this,Js).get(e);s==null||s(),n(this,Js).delete(e)}terminate(){for(const[,t]of n(this,Js))t==null||t();n(this,Js).clear()}}Js=new WeakMap,$u=new WeakMap;const gd={DATA:1,ERROR:2},yt={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function am(){}function re(u){if(u instanceof kn||u instanceof vp||u instanceof sm||u instanceof Kd||u instanceof fp)return u;switch(u instanceof Error||typeof u=="object"&&u!==null||st('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),u.name){case"AbortException":return new kn(u.message);case"InvalidPDFException":return new vp(u.message);case"PasswordException":return new sm(u.message,u.code);case"ResponseException":return new Kd(u.message,u.status,u.missing);case"UnknownErrorException":return new fp(u.message,u.details)}return new fp(u.message,u.toString())}var Ka,zu,lb,Gu,hb,Uu,cb,Qa,xd;class vl{constructor(t,e,s){d(this,zu);d(this,Gu);d(this,Uu);d(this,Qa);d(this,Ka,new AbortController);this.sourceName=t,this.targetName=e,this.comObj=s,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),s.addEventListener("message",b(this,zu,lb).bind(this),{signal:n(this,Ka).signal})}on(t,e){const s=this.actionHandler;if(s[t])throw new Error(`There is already an actionName called "${t}"`);s[t]=e}send(t,e,s){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:e},s)}sendWithPromise(t,e,s){const i=this.callbackId++,r=Promise.withResolvers();this.callbackCapabilities[i]=r;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:i,data:e},s)}catch(a){r.reject(a)}return r.promise}sendWithStream(t,e,s,i){const r=this.streamId++,a=this.sourceName,o=this.targetName,l=this.comObj;return new ReadableStream({start:h=>{const c=Promise.withResolvers();return this.streamControllers[r]={controller:h,startCall:c,pullCall:null,cancelCall:null,isClosed:!1},l.postMessage({sourceName:a,targetName:o,action:t,streamId:r,data:e,desiredSize:h.desiredSize},i),c.promise},pull:h=>{const c=Promise.withResolvers();return this.streamControllers[r].pullCall=c,l.postMessage({sourceName:a,targetName:o,stream:yt.PULL,streamId:r,desiredSize:h.desiredSize}),c.promise},cancel:h=>{_t(h instanceof Error,"cancel must have a valid reason");const c=Promise.withResolvers();return this.streamControllers[r].cancelCall=c,this.streamControllers[r].isClosed=!0,l.postMessage({sourceName:a,targetName:o,stream:yt.CANCEL,streamId:r,reason:re(h)}),c.promise}},s)}destroy(){var t;(t=n(this,Ka))==null||t.abort(),p(this,Ka,null)}}Ka=new WeakMap,zu=new WeakSet,lb=function({data:t}){if(t.targetName!==this.sourceName)return;if(t.stream){b(this,Uu,cb).call(this,t);return}if(t.callback){const s=t.callbackId,i=this.callbackCapabilities[s];if(!i)throw new Error(`Cannot resolve callback ${s}`);if(delete this.callbackCapabilities[s],t.callback===gd.DATA)i.resolve(t.data);else if(t.callback===gd.ERROR)i.reject(re(t.reason));else throw new Error("Unexpected callback case");return}const e=this.actionHandler[t.action];if(!e)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){const s=this.sourceName,i=t.sourceName,r=this.comObj;Promise.try(e,t.data).then(function(a){r.postMessage({sourceName:s,targetName:i,callback:gd.DATA,callbackId:t.callbackId,data:a})},function(a){r.postMessage({sourceName:s,targetName:i,callback:gd.ERROR,callbackId:t.callbackId,reason:re(a)})});return}if(t.streamId){b(this,Gu,hb).call(this,t);return}e(t.data)},Gu=new WeakSet,hb=function(t){const e=t.streamId,s=this.sourceName,i=t.sourceName,r=this.comObj,a=this,o=this.actionHandler[t.action],l={enqueue(h,c=1,f){if(this.isCancelled)return;const g=this.desiredSize;this.desiredSize-=c,g>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),r.postMessage({sourceName:s,targetName:i,stream:yt.ENQUEUE,streamId:e,chunk:h},f)},close(){this.isCancelled||(this.isCancelled=!0,r.postMessage({sourceName:s,targetName:i,stream:yt.CLOSE,streamId:e}),delete a.streamSinks[e])},error(h){_t(h instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,r.postMessage({sourceName:s,targetName:i,stream:yt.ERROR,streamId:e,reason:re(h)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};l.sinkCapability.resolve(),l.ready=l.sinkCapability.promise,this.streamSinks[e]=l,Promise.try(o,t.data,l).then(function(){r.postMessage({sourceName:s,targetName:i,stream:yt.START_COMPLETE,streamId:e,success:!0})},function(h){r.postMessage({sourceName:s,targetName:i,stream:yt.START_COMPLETE,streamId:e,reason:re(h)})})},Uu=new WeakSet,cb=function(t){const e=t.streamId,s=this.sourceName,i=t.sourceName,r=this.comObj,a=this.streamControllers[e],o=this.streamSinks[e];switch(t.stream){case yt.START_COMPLETE:t.success?a.startCall.resolve():a.startCall.reject(re(t.reason));break;case yt.PULL_COMPLETE:t.success?a.pullCall.resolve():a.pullCall.reject(re(t.reason));break;case yt.PULL:if(!o){r.postMessage({sourceName:s,targetName:i,stream:yt.PULL_COMPLETE,streamId:e,success:!0});break}o.desiredSize<=0&&t.desiredSize>0&&o.sinkCapability.resolve(),o.desiredSize=t.desiredSize,Promise.try(o.onPull||am).then(function(){r.postMessage({sourceName:s,targetName:i,stream:yt.PULL_COMPLETE,streamId:e,success:!0})},function(h){r.postMessage({sourceName:s,targetName:i,stream:yt.PULL_COMPLETE,streamId:e,reason:re(h)})});break;case yt.ENQUEUE:if(_t(a,"enqueue should have stream controller"),a.isClosed)break;a.controller.enqueue(t.chunk);break;case yt.CLOSE:if(_t(a,"close should have stream controller"),a.isClosed)break;a.isClosed=!0,a.controller.close(),b(this,Qa,xd).call(this,a,e);break;case yt.ERROR:_t(a,"error should have stream controller"),a.controller.error(re(t.reason)),b(this,Qa,xd).call(this,a,e);break;case yt.CANCEL_COMPLETE:t.success?a.cancelCall.resolve():a.cancelCall.reject(re(t.reason)),b(this,Qa,xd).call(this,a,e);break;case yt.CANCEL:if(!o)break;const l=re(t.reason);Promise.try(o.onCancel||am,l).then(function(){r.postMessage({sourceName:s,targetName:i,stream:yt.CANCEL_COMPLETE,streamId:e,success:!0})},function(h){r.postMessage({sourceName:s,targetName:i,stream:yt.CANCEL_COMPLETE,streamId:e,reason:re(h)})}),o.sinkCapability.reject(l),o.isCancelled=!0,delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}},Qa=new WeakSet,xd=async function(t,e){var s,i,r;await Promise.allSettled([(s=t.startCall)==null?void 0:s.promise,(i=t.pullCall)==null?void 0:i.promise,(r=t.cancelCall)==null?void 0:r.promise]),delete this.streamControllers[e]};var Th;class db{constructor({enableHWA:t=!1}){d(this,Th,!1);p(this,Th,t)}create(t,e){if(t<=0||e<=0)throw new Error("Invalid canvas size");const s=this._createCanvas(t,e);return{canvas:s,context:s.getContext("2d",{willReadFrequently:!n(this,Th)})}}reset(t,e,s){if(!t.canvas)throw new Error("Canvas is not specified");if(e<=0||s<=0)throw new Error("Invalid canvas size");t.canvas.width=e,t.canvas.height=s}destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0,t.canvas.height=0,t.canvas=null,t.context=null}_createCanvas(t,e){st("Abstract method `_createCanvas` called.")}}Th=new WeakMap;class fy extends db{constructor({ownerDocument:t=globalThis.document,enableHWA:e=!1}){super({enableHWA:e}),this._document=t}_createCanvas(t,e){const s=this._document.createElement("canvas");return s.width=t,s.height=e,s}}class ub{constructor({baseUrl:t=null,isCompressed:e=!0}){this.baseUrl=t,this.isCompressed=e}async fetch({name:t}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!t)throw new Error("CMap name must be specified.");const e=this.baseUrl+t+(this.isCompressed?".bcmap":"");return this._fetch(e).then(s=>({cMapData:s,isCompressed:this.isCompressed})).catch(s=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${e}`)})}async _fetch(t){st("Abstract method `_fetch` called.")}}class om extends ub{async _fetch(t){const e=await od(t,this.isCompressed?"arraybuffer":"text");return e instanceof ArrayBuffer?new Uint8Array(e):ad(e)}}class fb{addFilter(t){return"none"}addHCMFilter(t,e){return"none"}addAlphaFilter(t){return"none"}addLuminosityFilter(t){return"none"}addHighlightHCMFilter(t,e,s,i,r){return"none"}destroy(t=!1){}}var ar,Ja,Zs,ti,Yt,or,lr,Rt,Xt,hr,_l,Xi,fa,Za,kd,qi,pa,ju,pb,xh,Up,Yi,ga,cr,Sl,dr,El,kh,jp,ur,Cl;class py extends fb{constructor({docId:e,ownerDocument:s=globalThis.document}){super();d(this,Rt);d(this,hr);d(this,Xi);d(this,Za);d(this,qi);d(this,ju);d(this,xh);d(this,Yi);d(this,cr);d(this,dr);d(this,kh);d(this,ur);d(this,ar,void 0);d(this,Ja,void 0);d(this,Zs,void 0);d(this,ti,void 0);d(this,Yt,void 0);d(this,or,void 0);d(this,lr,0);p(this,ti,e),p(this,Yt,s)}addFilter(e){if(!e)return"none";let s=n(this,Rt,Xt).get(e);if(s)return s;const[i,r,a]=b(this,Za,kd).call(this,e),o=e.length===1?i:`${i}${r}${a}`;if(s=n(this,Rt,Xt).get(o),s)return n(this,Rt,Xt).set(e,s),s;const l=`g_${n(this,ti)}_transfer_map_${St(this,lr)._++}`,h=b(this,qi,pa).call(this,l);n(this,Rt,Xt).set(e,h),n(this,Rt,Xt).set(o,h);const c=b(this,Yi,ga).call(this,l);return b(this,dr,El).call(this,i,r,a,c),h}addHCMFilter(e,s){var A;const i=`${e}-${s}`,r="base";let a=n(this,hr,_l).get(r);if((a==null?void 0:a.key)===i||(a?((A=a.filter)==null||A.remove(),a.key=i,a.url="none",a.filter=null):(a={key:i,url:"none",filter:null},n(this,hr,_l).set(r,a)),!e||!s))return a.url;const o=b(this,ur,Cl).call(this,e);e=I.makeHexColor(...o);const l=b(this,ur,Cl).call(this,s);if(s=I.makeHexColor(...l),n(this,Xi,fa).style.color="",e==="#000000"&&s==="#ffffff"||e===s)return a.url;const h=new Array(256);for(let y=0;y<=255;y++){const v=y/255;h[y]=v<=.03928?v/12.92:((v+.055)/1.055)**2.4}const c=h.join(","),f=`g_${n(this,ti)}_hcm_filter`,g=a.filter=b(this,Yi,ga).call(this,f);b(this,dr,El).call(this,c,c,c,g),b(this,xh,Up).call(this,g);const m=(y,v)=>{const w=o[y]/255,S=l[y]/255,_=new Array(v+1);for(let E=0;E<=v;E++)_[E]=w+E/v*(S-w);return _.join(",")};return b(this,dr,El).call(this,m(0,5),m(1,5),m(2,5),g),a.url=b(this,qi,pa).call(this,f),a.url}addAlphaFilter(e){let s=n(this,Rt,Xt).get(e);if(s)return s;const[i]=b(this,Za,kd).call(this,[e]),r=`alpha_${i}`;if(s=n(this,Rt,Xt).get(r),s)return n(this,Rt,Xt).set(e,s),s;const a=`g_${n(this,ti)}_alpha_map_${St(this,lr)._++}`,o=b(this,qi,pa).call(this,a);n(this,Rt,Xt).set(e,o),n(this,Rt,Xt).set(r,o);const l=b(this,Yi,ga).call(this,a);return b(this,kh,jp).call(this,i,l),o}addLuminosityFilter(e){let s=n(this,Rt,Xt).get(e||"luminosity");if(s)return s;let i,r;if(e?([i]=b(this,Za,kd).call(this,[e]),r=`luminosity_${i}`):r="luminosity",s=n(this,Rt,Xt).get(r),s)return n(this,Rt,Xt).set(e,s),s;const a=`g_${n(this,ti)}_luminosity_map_${St(this,lr)._++}`,o=b(this,qi,pa).call(this,a);n(this,Rt,Xt).set(e,o),n(this,Rt,Xt).set(r,o);const l=b(this,Yi,ga).call(this,a);return b(this,ju,pb).call(this,l),e&&b(this,kh,jp).call(this,i,l),o}addHighlightHCMFilter(e,s,i,r,a){var S;const o=`${s}-${i}-${r}-${a}`;let l=n(this,hr,_l).get(e);if((l==null?void 0:l.key)===o||(l?((S=l.filter)==null||S.remove(),l.key=o,l.url="none",l.filter=null):(l={key:o,url:"none",filter:null},n(this,hr,_l).set(e,l)),!s||!i))return l.url;const[h,c]=[s,i].map(b(this,ur,Cl).bind(this));let f=Math.round(.2126*h[0]+.7152*h[1]+.0722*h[2]),g=Math.round(.2126*c[0]+.7152*c[1]+.0722*c[2]),[m,A]=[r,a].map(b(this,ur,Cl).bind(this));g{const T=new Array(256),x=(g-f)/C,P=_/255,M=(E-_)/(255*C);let D=0;for(let R=0;R<=C;R++){const H=Math.round(f+R*x),U=P+R*M;for(let W=D;W<=H;W++)T[W]=U;D=H+1}for(let R=D;R<256;R++)T[R]=T[D-1];return T.join(",")},v=`g_${n(this,ti)}_hcm_${e}_filter`,w=l.filter=b(this,Yi,ga).call(this,v);return b(this,xh,Up).call(this,w),b(this,dr,El).call(this,y(m[0],A[0],5),y(m[1],A[1],5),y(m[2],A[2],5),w),l.url=b(this,qi,pa).call(this,v),l.url}destroy(e=!1){var s,i,r,a;e&&((s=n(this,or))!=null&&s.size)||((i=n(this,Zs))==null||i.parentNode.parentNode.remove(),p(this,Zs,null),(r=n(this,Ja))==null||r.clear(),p(this,Ja,null),(a=n(this,or))==null||a.clear(),p(this,or,null),p(this,lr,0))}}ar=new WeakMap,Ja=new WeakMap,Zs=new WeakMap,ti=new WeakMap,Yt=new WeakMap,or=new WeakMap,lr=new WeakMap,Rt=new WeakSet,Xt=function(){return n(this,Ja)||p(this,Ja,new Map)},hr=new WeakSet,_l=function(){return n(this,or)||p(this,or,new Map)},Xi=new WeakSet,fa=function(){if(!n(this,Zs)){const e=n(this,Yt).createElement("div"),{style:s}=e;s.visibility="hidden",s.contain="strict",s.width=s.height=0,s.position="absolute",s.top=s.left=0,s.zIndex=-1;const i=n(this,Yt).createElementNS(Is,"svg");i.setAttribute("width",0),i.setAttribute("height",0),p(this,Zs,n(this,Yt).createElementNS(Is,"defs")),e.append(i),i.append(n(this,Zs)),n(this,Yt).body.append(e)}return n(this,Zs)},Za=new WeakSet,kd=function(e){if(e.length===1){const h=e[0],c=new Array(256);for(let g=0;g<256;g++)c[g]=h[g]/255;const f=c.join(",");return[f,f,f]}const[s,i,r]=e,a=new Array(256),o=new Array(256),l=new Array(256);for(let h=0;h<256;h++)a[h]=s[h]/255,o[h]=i[h]/255,l[h]=r[h]/255;return[a.join(","),o.join(","),l.join(",")]},qi=new WeakSet,pa=function(e){if(n(this,ar)===void 0){p(this,ar,"");const s=n(this,Yt).URL;s!==n(this,Yt).baseURI&&(np(s)?z('#createUrl: ignore "data:"-URL for performance reasons.'):p(this,ar,Tm(s,"")))}return`url(${n(this,ar)}#${e})`},ju=new WeakSet,pb=function(e){const s=n(this,Yt).createElementNS(Is,"feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),e.append(s)},xh=new WeakSet,Up=function(e){const s=n(this,Yt).createElementNS(Is,"feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),e.append(s)},Yi=new WeakSet,ga=function(e){const s=n(this,Yt).createElementNS(Is,"filter");return s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("id",e),n(this,Xi,fa).append(s),s},cr=new WeakSet,Sl=function(e,s,i){const r=n(this,Yt).createElementNS(Is,s);r.setAttribute("type","discrete"),r.setAttribute("tableValues",i),e.append(r)},dr=new WeakSet,El=function(e,s,i,r){const a=n(this,Yt).createElementNS(Is,"feComponentTransfer");r.append(a),b(this,cr,Sl).call(this,a,"feFuncR",e),b(this,cr,Sl).call(this,a,"feFuncG",s),b(this,cr,Sl).call(this,a,"feFuncB",i)},kh=new WeakSet,jp=function(e,s){const i=n(this,Yt).createElementNS(Is,"feComponentTransfer");s.append(i),b(this,cr,Sl).call(this,i,"feFuncA",e)},ur=new WeakSet,Cl=function(e){return n(this,Xi,fa).style.color=e,rp(getComputedStyle(n(this,Xi,fa)).getPropertyValue("color"))};class gb{constructor({baseUrl:t=null}){this.baseUrl=t}async fetch({filename:t}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!t)throw new Error("Font filename must be specified.");const e=`${this.baseUrl}${t}`;return this._fetch(e).catch(s=>{throw new Error(`Unable to load font data at: ${e}`)})}async _fetch(t){st("Abstract method `_fetch` called.")}}class lm extends gb{async _fetch(t){const e=await od(t,"arraybuffer");return new Uint8Array(e)}}class mb{constructor({baseUrl:t=null}){this.baseUrl=t}async fetch({filename:t}){if(!this.baseUrl)throw new Error("Ensure that the `wasmUrl` API parameter is provided.");if(!t)throw new Error("Wasm filename must be specified.");const e=`${this.baseUrl}${t}`;return this._fetch(e).catch(s=>{throw new Error(`Unable to load wasm data at: ${e}`)})}async _fetch(t){st("Abstract method `_fetch` called.")}}class hm extends mb{async _fetch(t){const e=await od(t,"arraybuffer");return new Uint8Array(e)}}ie&&z("Please use the `legacy` build in Node.js environments.");async function Ug(u){const e=await process.getBuiltinModule("fs").promises.readFile(u);return new Uint8Array(e)}class gy extends fb{}class my extends db{_createCanvas(t,e){return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(t,e)}}class by extends ub{async _fetch(t){return Ug(t)}}class Ay extends gb{async _fetch(t){return Ug(t)}}class yy extends mb{async _fetch(t){return Ug(t)}}const ca="__forcedDependency";var ge,Zt,to,ws,eo,ei,J,tt,si,me,Ki,so,Qi,Ji;class wy{constructor(t){d(this,ge,{__proto__:null});d(this,Zt,{__proto__:null,transform:[],moveText:[],sameLineText:[],[ca]:[]});d(this,to,new Map);d(this,ws,[]);d(this,eo,[]);d(this,ei,[[1,0,0,1,0,0]]);d(this,J,[-1/0,-1/0,1/0,1/0]);d(this,tt,new Float64Array([1/0,1/0,-1/0,-1/0]));d(this,si,-1);d(this,me,new Set);d(this,Ki,new Map);d(this,so,new Map);d(this,Qi,void 0);d(this,Ji,void 0);p(this,Qi,t.width),p(this,Ji,t.height)}save(t){return p(this,ge,{__proto__:n(this,ge)}),p(this,Zt,{__proto__:n(this,Zt),transform:{__proto__:n(this,Zt).transform},moveText:{__proto__:n(this,Zt).moveText},sameLineText:{__proto__:n(this,Zt).sameLineText},[ca]:{__proto__:n(this,Zt)[ca]}}),p(this,J,{__proto__:n(this,J)}),n(this,ws).push([t,null]),this}restore(t){const e=Object.getPrototypeOf(n(this,ge));if(e===null)return this;p(this,ge,e),p(this,Zt,Object.getPrototypeOf(n(this,Zt))),p(this,J,Object.getPrototypeOf(n(this,J)));const s=n(this,ws).pop();return s!==void 0&&(s[1]=t),this}recordOpenMarker(t){return n(this,ws).push([t,null]),this}getOpenMarker(){return n(this,ws).length===0?null:n(this,ws).at(-1)[0]}recordCloseMarker(t){const e=n(this,ws).pop();return e!==void 0&&(e[1]=t),this}beginMarkedContent(t){return n(this,eo).push([t,null]),this}endMarkedContent(t){const e=n(this,eo).pop();return e!==void 0&&(e[1]=t),this}pushBaseTransform(t){return n(this,ei).push(I.multiplyByDOMMatrix(n(this,ei).at(-1),t.getTransform())),this}popBaseTransform(){return n(this,ei).length>1&&n(this,ei).pop(),this}recordSimpleData(t,e){return n(this,ge)[t]=e,this}recordIncrementalData(t,e){return n(this,Zt)[t].push(e),this}resetIncrementalData(t,e){return n(this,Zt)[t].length=0,this}recordNamedData(t,e){return n(this,to).set(t,e),this}recordFutureForcedDependency(t,e){return this.recordIncrementalData(ca,e),this}inheritSimpleDataAsFutureForcedDependencies(t){for(const e of t)e in n(this,ge)&&this.recordFutureForcedDependency(e,n(this,ge)[e]);return this}inheritPendingDependenciesAsFutureForcedDependencies(){for(const t of n(this,me))this.recordFutureForcedDependency(ca,t);return this}resetBBox(t){return p(this,si,t),n(this,tt)[0]=1/0,n(this,tt)[1]=1/0,n(this,tt)[2]=-1/0,n(this,tt)[3]=-1/0,this}get hasPendingBBox(){return n(this,si)!==-1}recordClipBox(t,e,s,i,r,a){const o=I.multiplyByDOMMatrix(n(this,ei).at(-1),e.getTransform()),l=[1/0,1/0,-1/0,-1/0];I.axialAlignedBoundingBox([s,r,i,a],o,l);const h=I.intersect(n(this,J),l);return h?(n(this,J)[0]=h[0],n(this,J)[1]=h[1],n(this,J)[2]=h[2],n(this,J)[3]=h[3]):(n(this,J)[0]=n(this,J)[1]=1/0,n(this,J)[2]=n(this,J)[3]=-1/0),this}recordBBox(t,e,s,i,r,a){const o=n(this,J);if(o[0]===1/0)return this;const l=I.multiplyByDOMMatrix(n(this,ei).at(-1),e.getTransform());if(o[0]===-1/0)return I.axialAlignedBoundingBox([s,r,i,a],l,n(this,tt)),this;const h=[1/0,1/0,-1/0,-1/0];return I.axialAlignedBoundingBox([s,r,i,a],l,h),n(this,tt)[0]=Math.min(n(this,tt)[0],Math.max(h[0],o[0])),n(this,tt)[1]=Math.min(n(this,tt)[1],Math.max(h[1],o[1])),n(this,tt)[2]=Math.max(n(this,tt)[2],Math.min(h[2],o[2])),n(this,tt)[3]=Math.max(n(this,tt)[3],Math.min(h[3],o[3])),this}recordCharacterBBox(t,e,s,i=1,r=0,a=0,o){const l=s.bbox;let h,c;if(l&&(h=l[2]!==l[0]&&l[3]!==l[1]&&n(this,so).get(s),h!==!1&&(c=[0,0,0,0],I.axialAlignedBoundingBox(l,s.fontMatrix,c),(i!==1||r!==0||a!==0)&&I.scaleMinMax([i,0,0,-i,r,a],c),h)))return this.recordBBox(t,e,c[0],c[2],c[1],c[3]);if(!o)return this.recordFullPageBBox(t);const f=o();return l&&c&&h===void 0&&(h=c[0]<=r-f.actualBoundingBoxLeft&&c[2]>=r+f.actualBoundingBoxRight&&c[1]<=a-f.actualBoundingBoxAscent&&c[3]>=a+f.actualBoundingBoxDescent,n(this,so).set(s,h),h)?this.recordBBox(t,e,c[0],c[2],c[1],c[3]):this.recordBBox(t,e,r-f.actualBoundingBoxLeft,r+f.actualBoundingBoxRight,a-f.actualBoundingBoxAscent,a+f.actualBoundingBoxDescent)}recordFullPageBBox(t){return n(this,tt)[0]=Math.max(0,n(this,J)[0]),n(this,tt)[1]=Math.max(0,n(this,J)[1]),n(this,tt)[2]=Math.min(n(this,Qi),n(this,J)[2]),n(this,tt)[3]=Math.min(n(this,Ji),n(this,J)[3]),this}getSimpleIndex(t){return n(this,ge)[t]}recordDependencies(t,e){const s=n(this,me),i=n(this,ge),r=n(this,Zt);for(const a of e)a in n(this,ge)?s.add(i[a]):a in r&&r[a].forEach(s.add,s);return this}copyDependenciesFromIncrementalOperation(t,e){const s=n(this,Ki),i=n(this,me);for(const r of n(this,Zt)[e])s.get(r).dependencies.forEach(i.add,i.add(r));return this}recordNamedDependency(t,e){return n(this,to).has(e)&&n(this,me).add(n(this,to).get(e)),this}recordOperation(t,e=!1){this.recordDependencies(t,[ca]);const s=new Set(n(this,me)),i=n(this,ws).concat(n(this,eo)),r=n(this,si)===t?{minX:n(this,tt)[0],minY:n(this,tt)[1],maxX:n(this,tt)[2],maxY:n(this,tt)[3]}:null;return n(this,Ki).set(t,{bbox:r,pairs:i,dependencies:s}),e||p(this,si,-1),n(this,me).clear(),this}bboxToClipBoxDropOperation(t){return n(this,si)!==-1&&(p(this,si,-1),n(this,J)[0]=Math.max(n(this,J)[0],n(this,tt)[0]),n(this,J)[1]=Math.max(n(this,J)[1],n(this,tt)[1]),n(this,J)[2]=Math.min(n(this,J)[2],n(this,tt)[2]),n(this,J)[3]=Math.min(n(this,J)[3],n(this,tt)[3])),n(this,me).clear(),this}_takePendingDependencies(){const t=n(this,me);return p(this,me,new Set),t}_extractOperation(t){const e=n(this,Ki).get(t);return n(this,Ki).delete(t),e}_pushPendingDependencies(t){for(const e of t)n(this,me).add(e)}take(){return n(this,so).clear(),Array.from(n(this,Ki),([t,{bbox:e,pairs:s,dependencies:i}])=>(s.forEach(r=>r.forEach(i.add,i)),i.delete(t),{minX:((e==null?void 0:e.minX)??0)/n(this,Qi),maxX:((e==null?void 0:e.maxX)??n(this,Qi))/n(this,Qi),minY:((e==null?void 0:e.minY)??0)/n(this,Ji),maxY:((e==null?void 0:e.maxY)??n(this,Ji))/n(this,Ji),dependencies:Array.from(i).sort((r,a)=>r-a),idx:t}))}}ge=new WeakMap,Zt=new WeakMap,to=new WeakMap,ws=new WeakMap,eo=new WeakMap,ei=new WeakMap,J=new WeakMap,tt=new WeakMap,si=new WeakMap,me=new WeakMap,Ki=new WeakMap,so=new WeakMap,Qi=new WeakMap,Ji=new WeakMap;var K,ct,io,Zi,no;const Qg=class Qg{constructor(t,e){d(this,K,void 0);d(this,ct,void 0);d(this,io,0);d(this,Zi,void 0);d(this,no,0);if(t instanceof Qg)return t;p(this,K,t),p(this,Zi,t._takePendingDependencies()),p(this,ct,e)}save(t){return St(this,no)._++,n(this,K).save(n(this,ct)),this}restore(t){return n(this,no)>0&&(n(this,K).restore(n(this,ct)),St(this,no)._--),this}recordOpenMarker(t){return St(this,io)._++,this}getOpenMarker(){return n(this,io)>0?n(this,ct):n(this,K).getOpenMarker()}recordCloseMarker(t){return St(this,io)._--,this}beginMarkedContent(t){return this}endMarkedContent(t){return this}pushBaseTransform(t){return n(this,K).pushBaseTransform(t),this}popBaseTransform(){return n(this,K).popBaseTransform(),this}recordSimpleData(t,e){return n(this,K).recordSimpleData(t,n(this,ct)),this}recordIncrementalData(t,e){return n(this,K).recordIncrementalData(t,n(this,ct)),this}resetIncrementalData(t,e){return n(this,K).resetIncrementalData(t,n(this,ct)),this}recordNamedData(t,e){return this}recordFutureForcedDependency(t,e){return n(this,K).recordFutureForcedDependency(t,n(this,ct)),this}inheritSimpleDataAsFutureForcedDependencies(t){return n(this,K).inheritSimpleDataAsFutureForcedDependencies(t),this}inheritPendingDependenciesAsFutureForcedDependencies(){return n(this,K).inheritPendingDependenciesAsFutureForcedDependencies(),this}resetBBox(t){return n(this,K).hasPendingBBox||n(this,K).resetBBox(n(this,ct)),this}get hasPendingBBox(){return n(this,K).hasPendingBBox}recordClipBox(t,e,s,i,r,a){return n(this,K).recordClipBox(n(this,ct),e,s,i,r,a),this}recordBBox(t,e,s,i,r,a){return n(this,K).recordBBox(n(this,ct),e,s,i,r,a),this}recordCharacterBBox(t,e,s,i,r,a,o){return n(this,K).recordCharacterBBox(n(this,ct),e,s,i,r,a,o),this}recordFullPageBBox(t){return n(this,K).recordFullPageBBox(n(this,ct)),this}getSimpleIndex(t){return n(this,K).getSimpleIndex(t)}recordDependencies(t,e){return n(this,K).recordDependencies(n(this,ct),e),this}copyDependenciesFromIncrementalOperation(t,e){return n(this,K).copyDependenciesFromIncrementalOperation(n(this,ct),e),this}recordNamedDependency(t,e){return n(this,K).recordNamedDependency(n(this,ct),e),this}recordOperation(t){n(this,K).recordOperation(n(this,ct),!0);const e=n(this,K)._extractOperation(n(this,ct));for(const s of e.dependencies)n(this,Zi).add(s);return n(this,Zi).delete(n(this,ct)),n(this,Zi).delete(null),this}bboxToClipBoxDropOperation(t){return n(this,K).bboxToClipBoxDropOperation(n(this,ct)),this}recordNestedDependencies(){n(this,K)._pushPendingDependencies(n(this,Zi))}take(){throw new Error("Unreachable")}};K=new WeakMap,ct=new WeakMap,io=new WeakMap,Zi=new WeakMap,no=new WeakMap;let tu=Qg;const Le={stroke:["path","transform","filter","strokeColor","strokeAlpha","lineWidth","lineCap","lineJoin","miterLimit","dash"],fill:["path","transform","filter","fillColor","fillAlpha","globalCompositeOperation","SMask"],imageXObject:["transform","SMask","filter","fillAlpha","strokeAlpha","globalCompositeOperation"],rawFillPath:["filter","fillColor","fillAlpha"],showText:["transform","leading","charSpacing","wordSpacing","hScale","textRise","moveText","textMatrix","font","filter","fillColor","textRenderingMode","SMask","fillAlpha","strokeAlpha","globalCompositeOperation"],transform:["transform"],transformAndFill:["transform","fillColor"]},Vt={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function Vp(u,t){if(!t)return;const e=t[2]-t[0],s=t[3]-t[1],i=new Path2D;i.rect(t[0],t[1],e,s),u.clip(i)}class jg{isModifyingCurrentTransform(){return!1}getPattern(){st("Abstract method `getPattern` called.")}}class vy extends jg{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}_createGradient(t){let e;this._type==="axial"?e=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(e=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const s of this._colorStops)e.addColorStop(s[0],s[1]);return e}getPattern(t,e,s,i){let r;if(i===Vt.STROKE||i===Vt.FILL){const a=e.current.getClippedPathBoundingBox(i,dt(t))||[0,0,0,0],o=Math.ceil(a[2]-a[0])||1,l=Math.ceil(a[3]-a[1])||1,h=e.cachedCanvases.getCanvas("pattern",o,l),c=h.context;c.clearRect(0,0,c.canvas.width,c.canvas.height),c.beginPath(),c.rect(0,0,c.canvas.width,c.canvas.height),c.translate(-a[0],-a[1]),s=I.transform(s,[1,0,0,1,a[0],a[1]]),c.transform(...e.baseTransform),this.matrix&&c.transform(...this.matrix),Vp(c,this._bbox),c.fillStyle=this._createGradient(c),c.fill(),r=t.createPattern(h.canvas,"no-repeat");const f=new DOMMatrix(s);r.setTransform(f)}else Vp(t,this._bbox),r=this._createGradient(t);return r}}function mp(u,t,e,s,i,r,a,o){const l=t.coords,h=t.colors,c=u.data,f=u.width*4;let g;l[e+1]>l[s+1]&&(g=e,e=s,s=g,g=r,r=a,a=g),l[s+1]>l[i+1]&&(g=s,s=i,i=g,g=a,a=o,o=g),l[e+1]>l[s+1]&&(g=e,e=s,s=g,g=r,r=a,a=g);const m=(l[e]+t.offsetX)*t.scaleX,A=(l[e+1]+t.offsetY)*t.scaleY,y=(l[s]+t.offsetX)*t.scaleX,v=(l[s+1]+t.offsetY)*t.scaleY,w=(l[i]+t.offsetX)*t.scaleX,S=(l[i+1]+t.offsetY)*t.scaleY;if(A>=S)return;const _=h[r],E=h[r+1],C=h[r+2],T=h[a],x=h[a+1],P=h[a+2],M=h[o],D=h[o+1],R=h[o+2],H=Math.round(A),U=Math.round(S);let W,Y,B,N,Pt,At,Re,as;for(let it=H;it<=U;it++){if(itS?pt=1:v===S?pt=0:pt=(v-it)/(v-S),W=y-(y-w)*pt,Y=T-(T-M)*pt,B=x-(x-D)*pt,N=P-(P-R)*pt}let Z;itS?Z=1:Z=(A-it)/(A-S),Pt=m-(m-w)*Z,At=_-(_-M)*Z,Re=E-(E-D)*Z,as=C-(C-R)*Z;const Ls=Math.round(Math.min(W,Pt)),Ve=Math.round(Math.max(W,Pt));let We=f*it+Ls*4;for(let pt=Ls;pt<=Ve;pt++)Z=(W-pt)/(W-Pt),Z<0?Z=0:Z>1&&(Z=1),c[We++]=Y-(Y-At)*Z|0,c[We++]=B-(B-Re)*Z|0,c[We++]=N-(N-as)*Z|0,c[We++]=255}}function _y(u,t,e){const s=t.coords,i=t.colors;let r,a;switch(t.type){case"lattice":const o=t.verticesPerRow,l=Math.floor(s.length/o)-1,h=o-1;for(r=0;r=R?C=l:x=!0,D>=H?T=h:P=!0;const U=this.getSizeAndScale(C,this.ctx.canvas.width,_),W=this.getSizeAndScale(T,this.ctx.canvas.height,E),Y=t.cachedCanvases.getCanvas("pattern",U.size,W.size),B=Y.context,N=o.createCanvasGraphics(B);if(N.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(N,i,a),B.translate(-U.scale*c,-W.scale*f),N.transform(0,U.scale,0,0,W.scale,0,0),B.save(),(Pt=N.dependencyTracker)==null||Pt.save(),this.clipBbox(N,c,f,g,m),N.baseTransform=dt(N.ctx),N.executeOperatorList(s),N.endDrawing(),(as=(At=N.dependencyTracker)==null?void 0:(Re=At.restore()).recordNestedDependencies)==null||as.call(Re),B.restore(),x||P){const it=Y.canvas;x&&(C=l),P&&(T=h);const Z=this.getSizeAndScale(C,this.ctx.canvas.width,_),Ls=this.getSizeAndScale(T,this.ctx.canvas.height,E),Ve=Z.size,We=Ls.size,pt=t.cachedCanvases.getCanvas("pattern-workaround",Ve,We),lp=pt.context,hp=x?Math.floor(A/l):0,cp=P?Math.floor(y/h):0;for(let Mn=0;Mn<=hp;Mn++)for(let Rn=0;Rn<=cp;Rn++)lp.drawImage(it,Ve*Mn,We*Rn,Ve,We,0,0,Ve,We);return{canvas:pt.canvas,scaleX:Z.scale,scaleY:Ls.scale,offsetX:c,offsetY:f}}return{canvas:Y.canvas,scaleX:U.scale,scaleY:W.scale,offsetX:c,offsetY:f}}getSizeAndScale(t,e,s){const i=Math.max(Vu.MAX_PATTERN_SIZE,e);let r=Math.ceil(t*s);return r>=i?r=i:s=r/t,{scale:s,size:r}}clipBbox(t,e,s,i,r){const a=i-e,o=r-s;t.ctx.rect(e,s,a,o),I.axialAlignedBoundingBox([e,s,i,r],dt(t.ctx),t.current.minMax),t.clip(),t.endPath()}setFillAndStrokeStyleToContext(t,e,s){const i=t.ctx,r=t.current;switch(e){case cm.COLORED:const{fillStyle:a,strokeStyle:o}=this.ctx;i.fillStyle=r.fillColor=a,i.strokeStyle=r.strokeColor=o;break;case cm.UNCOLORED:i.fillStyle=i.strokeStyle=s,r.fillColor=r.strokeColor=s;break;default:throw new UA(`Unsupported paint type: ${e}`)}}isModifyingCurrentTransform(){return!1}getPattern(t,e,s,i){let r=s;i!==Vt.SHADING&&(r=I.transform(r,e.baseTransform),this.matrix&&(r=I.transform(r,this.matrix)));const a=this.createPatternCanvas(e);let o=new DOMMatrix(r);o=o.translate(a.offsetX,a.offsetY),o=o.scale(1/a.scaleX,1/a.scaleY);const l=t.createPattern(a.canvas,"repeat");return l.setTransform(o),l}};k(Vu,"MAX_PATTERN_SIZE",3e3);let Wp=Vu;function Ty({src:u,srcPos:t=0,dest:e,width:s,height:i,nonBlackColor:r=4294967295,inverseDecode:a=!1}){const o=Wt.isLittleEndian?4278190080:255,[l,h]=a?[r,o]:[o,r],c=s>>3,f=s&7,g=u.length;e=new Uint32Array(e.buffer);let m=0;for(let A=0;A{u.save=u.__originalSave,u.restore=u.__originalRestore,u.rotate=u.__originalRotate,u.scale=u.__originalScale,u.translate=u.__originalTranslate,u.transform=u.__originalTransform,u.setTransform=u.__originalSetTransform,u.resetTransform=u.__originalResetTransform,u.clip=u.__originalClip,u.moveTo=u.__originalMoveTo,u.lineTo=u.__originalLineTo,u.bezierCurveTo=u.__originalBezierCurveTo,u.rect=u.__originalRect,u.closePath=u.__originalClosePath,u.beginPath=u.__originalBeginPath,delete u._removeMirroring},u.save=function(){t.save(),this.__originalSave()},u.restore=function(){t.restore(),this.__originalRestore()},u.translate=function(e,s){t.translate(e,s),this.__originalTranslate(e,s)},u.scale=function(e,s){t.scale(e,s),this.__originalScale(e,s)},u.transform=function(e,s,i,r,a,o){t.transform(e,s,i,r,a,o),this.__originalTransform(e,s,i,r,a,o)},u.setTransform=function(e,s,i,r,a,o){t.setTransform(e,s,i,r,a,o),this.__originalSetTransform(e,s,i,r,a,o)},u.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},u.rotate=function(e){t.rotate(e),this.__originalRotate(e)},u.clip=function(e){t.clip(e),this.__originalClip(e)},u.moveTo=function(e,s){t.moveTo(e,s),this.__originalMoveTo(e,s)},u.lineTo=function(e,s){t.lineTo(e,s),this.__originalLineTo(e,s)},u.bezierCurveTo=function(e,s,i,r,a,o){t.bezierCurveTo(e,s,i,r,a,o),this.__originalBezierCurveTo(e,s,i,r,a,o)},u.rect=function(e,s,i,r){t.rect(e,s,i,r),this.__originalRect(e,s,i,r)},u.closePath=function(){t.closePath(),this.__originalClosePath()},u.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}class Py{constructor(t){this.canvasFactory=t,this.cache=Object.create(null)}getCanvas(t,e,s){let i;return this.cache[t]!==void 0?(i=this.cache[t],this.canvasFactory.reset(i,e,s)):(i=this.canvasFactory.create(e,s),this.cache[t]=i),i}delete(t){delete this.cache[t]}clear(){for(const t in this.cache){const e=this.cache[t];this.canvasFactory.destroy(e),delete this.cache[t]}}}function md(u,t,e,s,i,r,a,o,l,h){const[c,f,g,m,A,y]=dt(u);if(f===0&&g===0){const S=a*c+A,_=Math.round(S),E=o*m+y,C=Math.round(E),T=(a+l)*c+A,x=Math.abs(Math.round(T)-_)||1,P=(o+h)*m+y,M=Math.abs(Math.round(P)-C)||1;return u.setTransform(Math.sign(c),0,0,Math.sign(m),_,C),u.drawImage(t,e,s,i,r,0,0,x,M),u.setTransform(c,f,g,m,A,y),[x,M]}if(c===0&&m===0){const S=o*g+A,_=Math.round(S),E=a*f+y,C=Math.round(E),T=(o+h)*g+A,x=Math.abs(Math.round(T)-_)||1,P=(a+l)*f+y,M=Math.abs(Math.round(P)-C)||1;return u.setTransform(0,Math.sign(f),Math.sign(g),0,_,C),u.drawImage(t,e,s,i,r,0,0,M,x),u.setTransform(c,f,g,m,A,y),[M,x]}u.drawImage(t,e,s,i,r,a,o,l,h);const v=Math.hypot(c,f),w=Math.hypot(g,m);return[v*l,w*h]}class pm{constructor(t,e,s){k(this,"alphaIsShape",!1);k(this,"fontSize",0);k(this,"fontSizeScale",1);k(this,"textMatrix",null);k(this,"textMatrixScale",1);k(this,"fontMatrix",wp);k(this,"leading",0);k(this,"x",0);k(this,"y",0);k(this,"lineX",0);k(this,"lineY",0);k(this,"charSpacing",0);k(this,"wordSpacing",0);k(this,"textHScale",1);k(this,"textRenderingMode",Ot.FILL);k(this,"textRise",0);k(this,"fillColor","#000000");k(this,"strokeColor","#000000");k(this,"patternFill",!1);k(this,"patternStroke",!1);k(this,"fillAlpha",1);k(this,"strokeAlpha",1);k(this,"lineWidth",1);k(this,"activeSMask",null);k(this,"transferMaps","none");s==null||s(this),this.clipBox=new Float32Array([0,0,t,e]),this.minMax=ya.slice()}clone(){const t=Object.create(this);return t.clipBox=this.clipBox.slice(),t.minMax=this.minMax.slice(),t}getPathBoundingBox(t=Vt.FILL,e=null){const s=this.minMax.slice();if(t===Vt.STROKE){e||st("Stroke bounding box must include transform."),I.singularValueDecompose2dScale(e,Me);const i=Me[0]*this.lineWidth/2,r=Me[1]*this.lineWidth/2;s[0]-=i,s[1]-=r,s[2]+=i,s[3]+=r}return s}updateClipFromPath(){const t=I.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minMax[0]===1/0}startNewPathAndClipBox(t){this.clipBox.set(t,0),this.minMax.set(ya,0)}getClippedPathBoundingBox(t=Vt.FILL,e=null){return I.intersect(this.clipBox,this.getPathBoundingBox(t,e))}}function gm(u,t){if(t instanceof ImageData){u.putImageData(t,0,0);return}const e=t.height,s=t.width,i=e%ce,r=(e-i)/ce,a=i===0?r:r+1,o=u.createImageData(s,ce);let l=0,h;const c=t.data,f=o.data;let g,m,A,y;if(t.kind===wd.GRAYSCALE_1BPP){const v=c.byteLength,w=new Uint32Array(f.buffer,0,f.byteLength>>2),S=w.length,_=s+7>>3,E=4294967295,C=Wt.isLittleEndian?4278190080:255;for(g=0;g_?s:T*8-7,M=P&-8;let D=0,R=0;for(;x>=1}for(;h=r&&(A=i,y=s*A),h=0,m=y;m--;)f[h++]=c[l++],f[h++]=c[l++],f[h++]=c[l++],f[h++]=255;u.putImageData(o,0,g*ce)}else throw new Error(`bad image kind: ${t.kind}`)}function mm(u,t){if(t.bitmap){u.drawImage(t.bitmap,0,0);return}const e=t.height,s=t.width,i=e%ce,r=(e-i)/ce,a=i===0?r:r+1,o=u.createImageData(s,ce);let l=0;const h=t.data,c=o.data;for(let f=0;ffm&&typeof s=="function",f=c?Date.now()+xy:0;let g=0;const m=this.commonObjs,A=this.objs;let y,v;for(;;){if(i!==void 0&&l===i.nextBreakPoint)return i.breakIt(l,s),l;if(!r||r.has(l))if(y=o[l],v=a[l]??null,y!==Fl.dependency)v===null?this[y](l):this[y](l,...v);else for(const S of v){(w=this.dependencyTracker)==null||w.recordNamedData(S,l);const _=S.startsWith("g_")?m:A;if(!_.has(S))return _.get(S,s),l}if(l++,l===h)return l;if(c&&++g>fm){if(Date.now()>f)return s(),l;g=0}}}endDrawing(){b(this,Ph,Xp).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const t of this._cachedBitmapsMap.values()){for(const e of t.values())typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement&&(e.width=e.height=0);t.clear()}this._cachedBitmapsMap.clear(),b(this,Mh,qp).call(this)}_scaleImage(t,e){const s=t.width??t.displayWidth,i=t.height??t.displayHeight;let r=Math.max(Math.hypot(e[0],e[1]),1),a=Math.max(Math.hypot(e[2],e[3]),1),o=s,l=i,h="prescale1",c,f;for(;r>2&&o>1||a>2&&l>1;){let g=o,m=l;r>2&&o>1&&(g=o>=16384?Math.floor(o/2)-1||1:Math.ceil(o/2),r/=o/g),a>2&&l>1&&(m=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l)/2,a/=l/m),c=this.cachedCanvases.getCanvas(h,g,m),f=c.context,f.clearRect(0,0,g,m),f.drawImage(t,0,0,o,l,0,0,g,m),t=c.canvas,o=g,l=m,h=h==="prescale1"?"prescale2":"prescale1"}return{img:t,paintWidth:o,paintHeight:l}}_createMaskCanvas(t,e){var D,R;const s=this.ctx,{width:i,height:r}=e,a=this.current.fillColor,o=this.current.patternFill,l=dt(s);let h,c,f,g;if((e.bitmap||e.data)&&e.count>1){const H=e.bitmap||e.data.buffer;c=JSON.stringify(o?l:[l.slice(0,4),a]),h=this._cachedBitmapsMap.get(H),h||(h=new Map,this._cachedBitmapsMap.set(H,h));const U=h.get(c);if(U&&!o){const W=Math.round(Math.min(l[0],l[2])+l[4]),Y=Math.round(Math.min(l[1],l[3])+l[5]);return(D=this.dependencyTracker)==null||D.recordDependencies(t,Le.transformAndFill),{canvas:U,offsetX:W,offsetY:Y}}f=U}f||(g=this.cachedCanvases.getCanvas("maskCanvas",i,r),mm(g.context,e));let m=I.transform(l,[1/i,0,0,-1/r,0,0]);m=I.transform(m,[1,0,0,1,0,-r]);const A=ya.slice();I.axialAlignedBoundingBox([0,0,i,r],m,A);const[y,v,w,S]=A,_=Math.round(w-y)||1,E=Math.round(S-v)||1,C=this.cachedCanvases.getCanvas("fillCanvas",_,E),T=C.context,x=y,P=v;T.translate(-x,-P),T.transform(...m),f||(f=this._scaleImage(g.canvas,os(T)),f=f.img,h&&o&&h.set(c,f)),T.imageSmoothingEnabled=bm(dt(T),e.interpolate),md(T,f,0,0,f.width,f.height,0,0,i,r),T.globalCompositeOperation="source-in";const M=I.transform(os(T),[1,0,0,1,-x,-P]);return T.fillStyle=o?a.getPattern(s,this,M,Vt.FILL):a,T.fillRect(0,0,i,r),h&&!o&&(this.cachedCanvases.delete("fillCanvas"),h.set(c,C.canvas)),(R=this.dependencyTracker)==null||R.recordDependencies(t,Le.transformAndFill),{canvas:C.canvas,offsetX:Math.round(x),offsetY:Math.round(P)}}setLineWidth(t,e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("lineWidth",t),e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(t,e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("lineCap",t),this.ctx.lineCap=My[e]}setLineJoin(t,e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("lineJoin",t),this.ctx.lineJoin=Ry[e]}setMiterLimit(t,e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("miterLimit",t),this.ctx.miterLimit=e}setDash(t,e,s){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("dash",t);const i=this.ctx;i.setLineDash!==void 0&&(i.setLineDash(e),i.lineDashOffset=s)}setRenderingIntent(t,e){}setFlatness(t,e){}setGState(t,e){var s,i,r,a,o;for(const[l,h]of e)switch(l){case"LW":this.setLineWidth(t,h);break;case"LC":this.setLineCap(t,h);break;case"LJ":this.setLineJoin(t,h);break;case"ML":this.setMiterLimit(t,h);break;case"D":this.setDash(t,h[0],h[1]);break;case"RI":this.setRenderingIntent(t,h);break;case"FL":this.setFlatness(t,h);break;case"Font":this.setFont(t,h[0],h[1]);break;case"CA":(s=this.dependencyTracker)==null||s.recordSimpleData("strokeAlpha",t),this.current.strokeAlpha=h;break;case"ca":(i=this.dependencyTracker)==null||i.recordSimpleData("fillAlpha",t),this.ctx.globalAlpha=this.current.fillAlpha=h;break;case"BM":(r=this.dependencyTracker)==null||r.recordSimpleData("globalCompositeOperation",t),this.ctx.globalCompositeOperation=h;break;case"SMask":(a=this.dependencyTracker)==null||a.recordSimpleData("SMask",t),this.current.activeSMask=h?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":(o=this.dependencyTracker)==null||o.recordSimpleData("filter",t),this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(h);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}beginSMaskMode(t){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const e=this.ctx.canvas.width,s=this.ctx.canvas.height,i="smaskGroupAt"+this.groupLevel,r=this.cachedCanvases.getCanvas(i,e,s);this.suspendedCtx=this.ctx;const a=this.ctx=r.context;a.setTransform(this.suspendedCtx.getTransform()),dl(this.suspendedCtx,a),ky(a,this.suspendedCtx),this.setGState(t,[["BM","source-over"]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),dl(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(t){if(!this.current.activeSMask)return;t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const e=this.current.activeSMask,s=this.suspendedCtx;this.composeSMask(s,e,this.ctx,t),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(t,e,s,i){const r=i[0],a=i[1],o=i[2]-r,l=i[3]-a;o===0||l===0||(this.genericComposeSMask(e.context,s,o,l,e.subtype,e.backdrop,e.transferMap,r,a,e.offsetX,e.offsetY),t.save(),t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(s.canvas,0,0),t.restore())}genericComposeSMask(t,e,s,i,r,a,o,l,h,c,f){let g=t.canvas,m=l-c,A=h-f;if(a)if(m<0||A<0||m+s>g.width||A+i>g.height){const v=this.cachedCanvases.getCanvas("maskExtension",s,i),w=v.context;w.drawImage(g,-m,-A),w.globalCompositeOperation="destination-atop",w.fillStyle=a,w.fillRect(0,0,s,i),w.globalCompositeOperation="source-over",g=v.canvas,m=A=0}else{t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0);const v=new Path2D;v.rect(m,A,s,i),t.clip(v),t.globalCompositeOperation="destination-atop",t.fillStyle=a,t.fillRect(m,A,s,i),t.restore()}e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0),r==="Alpha"&&o?e.filter=this.filterFactory.addAlphaFilter(o):r==="Luminosity"&&(e.filter=this.filterFactory.addLuminosityFilter(o));const y=new Path2D;y.rect(l,h,s,i),e.clip(y),e.globalCompositeOperation="destination-in",e.drawImage(g,m,A,s,i,l,h,s,i),e.restore()}save(t){var s;this.inSMaskMode&&dl(this.ctx,this.suspendedCtx),this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone(),(s=this.dependencyTracker)==null||s.save(t)}restore(t){var e;if((e=this.dependencyTracker)==null||e.restore(t),this.stateStack.length===0){this.inSMaskMode&&this.endSMaskMode();return}this.current=this.stateStack.pop(),this.ctx.restore(),this.inSMaskMode&&dl(this.suspendedCtx,this.ctx),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}transform(t,e,s,i,r,a,o){var l;(l=this.dependencyTracker)==null||l.recordIncrementalData("transform",t),this.ctx.transform(e,s,i,r,a,o),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(t,e,s,i){let[r]=s;if(!i){r||(r=s[0]=new Path2D),this[e](t,r);return}if(this.dependencyTracker!==null){const a=e===Fl.stroke?this.current.lineWidth/2:0;this.dependencyTracker.resetBBox(t).recordBBox(t,this.ctx,i[0]-a,i[2]+a,i[1]-a,i[3]+a).recordDependencies(t,["transform"])}if(!(r instanceof Path2D)){const a=s[0]=new Path2D;for(let o=0,l=r.length;oum&&(c=um),this.current.fontSizeScale=s/c,this.ctx.font=`${h} ${l} ${c}px ${o}`}setTextRenderingMode(t,e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("textRenderingMode",t),this.current.textRenderingMode=e}setTextRise(t,e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("textRise",t),this.current.textRise=e}moveText(t,e,s){var i;(i=this.dependencyTracker)==null||i.resetIncrementalData("sameLineText").recordIncrementalData("moveText",t),this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=s}setLeadingMoveText(t,e,s){this.setLeading(t,-s),this.moveText(t,e,s)}setTextMatrix(t,e){var i;(i=this.dependencyTracker)==null||i.recordSimpleData("textMatrix",t);const{current:s}=this;s.textMatrix=e,s.textMatrixScale=Math.hypot(e[0],e[1]),s.x=s.lineX=0,s.y=s.lineY=0}nextLine(t){var e;this.moveText(t,0,this.current.leading),(e=this.dependencyTracker)==null||e.recordIncrementalData("moveText",this.dependencyTracker.getSimpleIndex("leading")??t)}paintChar(t,e,s,i,r,a){var w,S,_,E;const o=this.ctx,l=this.current,h=l.font,c=l.textRenderingMode,f=l.fontSize/l.fontSizeScale,g=c&Ot.FILL_STROKE_MASK,m=!!(c&Ot.ADD_TO_PATH_FLAG),A=l.patternFill&&!h.missingFile,y=l.patternStroke&&!h.missingFile;let v;if((h.disableFontFace||m||A||y)&&!h.missingFile&&(v=h.getPathGenerator(this.commonObjs,e)),v&&(h.disableFontFace||A||y)){o.save(),o.translate(s,i),o.scale(f,-f),(w=this.dependencyTracker)==null||w.recordCharacterBBox(t,o,h);let C;if(g===Ot.FILL||g===Ot.FILL_STROKE)if(r){C=o.getTransform(),o.setTransform(...r);const T=b(this,Rh,Yp).call(this,v,C,r);o.fill(T)}else o.fill(v);if(g===Ot.STROKE||g===Ot.FILL_STROKE)if(a){C||(C=o.getTransform()),o.setTransform(...a);const{a:T,b:x,c:P,d:M}=C,D=I.inverseTransform(a),R=I.transform([T,x,P,M,0,0],D);I.singularValueDecompose2dScale(R,Me),o.lineWidth*=Math.max(Me[0],Me[1])/f,o.stroke(b(this,Rh,Yp).call(this,v,C,a))}else o.lineWidth/=f,o.stroke(v);o.restore()}else(g===Ot.FILL||g===Ot.FILL_STROKE)&&(o.fillText(e,s,i),(S=this.dependencyTracker)==null||S.recordCharacterBBox(t,o,h,f,s,i,()=>o.measureText(e))),(g===Ot.STROKE||g===Ot.FILL_STROKE)&&(this.dependencyTracker&&((_=this.dependencyTracker)==null||_.recordCharacterBBox(t,o,h,f,s,i,()=>o.measureText(e)).recordDependencies(t,Le.stroke)),o.strokeText(e,s,i));m&&((this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:dt(o),x:s,y:i,fontSize:f,path:v}),(E=this.dependencyTracker)==null||E.recordCharacterBBox(t,o,h,f,s,i))}get isFontSubpixelAAEnabled(){const{context:t}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);t.scale(1.5,1),t.fillText("I",0,10);const e=t.getImageData(0,0,10,10).data;let s=!1;for(let i=3;i0&&e[i]<255){s=!0;break}return V(this,"isFontSubpixelAAEnabled",s)}showText(t,e){var P,M,D,R;this.dependencyTracker&&(this.dependencyTracker.recordDependencies(t,Le.showText).copyDependenciesFromIncrementalOperation(t,"sameLineText").resetBBox(t),this.current.textRenderingMode&Ot.ADD_TO_PATH_FLAG&&this.dependencyTracker.recordFutureForcedDependency("textClip",t).inheritPendingDependenciesAsFutureForcedDependencies());const s=this.current,i=s.font;if(i.isType3Font){this.showType3Text(t,e),(P=this.dependencyTracker)==null||P.recordOperation(t).recordIncrementalData("sameLineText",t);return}const r=s.fontSize;if(r===0){(M=this.dependencyTracker)==null||M.recordOperation(t);return}const a=this.ctx,o=s.fontSizeScale,l=s.charSpacing,h=s.wordSpacing,c=s.fontDirection,f=s.textHScale*c,g=e.length,m=i.vertical,A=m?1:-1,y=i.defaultVMetrics,v=r*s.fontMatrix[0],w=s.textRenderingMode===Ot.FILL&&!i.disableFontFace&&!s.patternFill;a.save(),s.textMatrix&&a.transform(...s.textMatrix),a.translate(s.x,s.y+s.textRise),c>0?a.scale(f,-1):a.scale(f,1);let S,_;if(s.patternFill){a.save();const H=s.fillColor.getPattern(a,this,os(a),Vt.FILL);S=dt(a),a.restore(),a.fillStyle=H}if(s.patternStroke){a.save();const H=s.strokeColor.getPattern(a,this,os(a),Vt.STROKE);_=dt(a),a.restore(),a.strokeStyle=H}let E=s.lineWidth;const C=s.textMatrixScale;if(C===0||E===0){const H=s.textRenderingMode&Ot.FILL_STROKE_MASK;(H===Ot.STROKE||H===Ot.FILL_STROKE)&&(E=this.getSinglePixelWidth())}else E/=C;if(o!==1&&(a.scale(o,o),E/=o),a.lineWidth=E,i.isInvalidPDFjsFont){const H=[];let U=0;for(const Y of e)H.push(Y.unicode),U+=Y.width;const W=H.join("");if(a.fillText(W,0,0),this.dependencyTracker!==null){const Y=a.measureText(W);this.dependencyTracker.recordBBox(t,this.ctx,-Y.actualBoundingBoxLeft,Y.actualBoundingBoxRight,-Y.actualBoundingBoxAscent,Y.actualBoundingBoxDescent).recordOperation(t).recordIncrementalData("sameLineText",t)}s.x+=U*v*f,a.restore(),this.compose();return}let T=0,x;for(x=0;x0){Re=a.measureText(Y);const it=Re.width*1e3/r*o;if(AtRe??a.measureText(Y));else if(this.paintChar(t,Y,N,Pt,S,_),B){const it=N+r*B.offset.x/o,Z=Pt-r*B.offset.y/o;this.paintChar(t,B.fontChar,it,Z,S,_)}}const as=m?At*v-W*c:At*v+W*c;T+=as,U&&a.restore()}m?s.y-=T:s.x+=T*f,a.restore(),this.compose(),(R=this.dependencyTracker)==null||R.recordOperation(t).recordIncrementalData("sameLineText",t)}showType3Text(t,e){const s=this.ctx,i=this.current,r=i.font,a=i.fontSize,o=i.fontDirection,l=r.vertical?1:-1,h=i.charSpacing,c=i.wordSpacing,f=i.textHScale*o,g=i.fontMatrix||wp,m=e.length,A=i.textRenderingMode===Ot.INVISIBLE;let y,v,w,S;if(A||a===0)return;this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,s.save(),i.textMatrix&&s.transform(...i.textMatrix),s.translate(i.x,i.y+i.textRise),s.scale(f,o);const _=this.dependencyTracker;for(this.dependencyTracker=_?new tu(_,t):null,y=0;ynew Jg(a,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack},void 0,void 0,this.dependencyTracker?new tu(this.dependencyTracker,t):null)};s=new Wp(e,this.ctx,r,i)}else s=this._getPattern(t,e[1],e[2]);return s}setStrokeColorN(t,...e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("strokeColor",t),this.current.strokeColor=this.getColorN_Pattern(t,e),this.current.patternStroke=!0}setFillColorN(t,...e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("fillColor",t),this.current.fillColor=this.getColorN_Pattern(t,e),this.current.patternFill=!0}setStrokeRGBColor(t,e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("strokeColor",t),this.ctx.strokeStyle=this.current.strokeColor=e,this.current.patternStroke=!1}setStrokeTransparent(t){var e;(e=this.dependencyTracker)==null||e.recordSimpleData("strokeColor",t),this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(t,e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("fillColor",t),this.ctx.fillStyle=this.current.fillColor=e,this.current.patternFill=!1}setFillTransparent(t){var e;(e=this.dependencyTracker)==null||e.recordSimpleData("fillColor",t),this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(t,e,s=null){let i;return this.cachedPatterns.has(e)?i=this.cachedPatterns.get(e):(i=Cy(this.getObject(t,e)),this.cachedPatterns.set(e,i)),s&&(i.matrix=s),i}shadingFill(t,e){var a;if(!this.contentVisible)return;const s=this.ctx;this.save(t);const i=this._getPattern(t,e);s.fillStyle=i.getPattern(s,this,os(s),Vt.SHADING);const r=os(s);if(r){const{width:o,height:l}=s.canvas,h=ya.slice();I.axialAlignedBoundingBox([0,0,o,l],r,h);const[c,f,g,m]=h;this.ctx.fillRect(c,f,g-c,m-f)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);(a=this.dependencyTracker)==null||a.resetBBox(t).recordFullPageBBox(t).recordDependencies(t,Le.transform).recordDependencies(t,Le.fill).recordOperation(t),this.compose(this.current.getClippedPathBoundingBox()),this.restore(t)}beginInlineImage(){st("Should not call beginInlineImage")}beginImageData(){st("Should not call beginImageData")}paintFormXObjectBegin(t,e,s){var i;if(this.contentVisible&&(this.save(t),this.baseTransformStack.push(this.baseTransform),e&&this.transform(t,...e),this.baseTransform=dt(this.ctx),s)){I.axialAlignedBoundingBox(s,this.baseTransform,this.current.minMax);const[r,a,o,l]=s,h=new Path2D;h.rect(r,a,o-r,l-a),this.ctx.clip(h),(i=this.dependencyTracker)==null||i.recordClipBox(t,this.ctx,r,o,a,l),this.endPath(t)}}paintFormXObjectEnd(t){this.contentVisible&&(this.restore(t),this.baseTransform=this.baseTransformStack.pop())}beginGroup(t,e){var _;if(!this.contentVisible)return;this.save(t),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const s=this.ctx;e.isolated||ip("TODO: Support non-isolated groups."),e.knockout&&z("Knockout groups not supported.");const i=dt(s);if(e.matrix&&s.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.");let r=ya.slice();I.axialAlignedBoundingBox(e.bbox,dt(s),r);const a=[0,0,s.canvas.width,s.canvas.height];r=I.intersect(r,a)||[0,0,0,0];const o=Math.floor(r[0]),l=Math.floor(r[1]),h=Math.max(Math.ceil(r[2])-o,1),c=Math.max(Math.ceil(r[3])-l,1);this.current.startNewPathAndClipBox([0,0,h,c]);let f="groupAt"+this.groupLevel;e.smask&&(f+="_smask_"+this.smaskCounter++%2);const g=this.cachedCanvases.getCanvas(f,h,c),m=g.context;m.translate(-o,-l),m.transform(...i);let A=new Path2D;const[y,v,w,S]=e.bbox;if(A.rect(y,v,w-y,S-v),e.matrix){const E=new Path2D;E.addPath(A,new DOMMatrix(e.matrix)),A=E}m.clip(A),e.smask&&this.smaskStack.push({canvas:g.canvas,context:m,offsetX:o,offsetY:l,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}),(!e.smask||this.dependencyTracker)&&(s.setTransform(1,0,0,1,0,0),s.translate(o,l),s.save()),dl(s,m),this.ctx=m,(_=this.dependencyTracker)==null||_.inheritSimpleDataAsFutureForcedDependencies(["fillAlpha","strokeAlpha","globalCompositeOperation"]).pushBaseTransform(s),this.setGState(t,[["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(s),this.groupLevel++}endGroup(t,e){var r;if(!this.contentVisible)return;this.groupLevel--;const s=this.ctx,i=this.groupStack.pop();if(this.ctx=i,this.ctx.imageSmoothingEnabled=!1,(r=this.dependencyTracker)==null||r.popBaseTransform(),e.smask)this.tempSMask=this.smaskStack.pop(),this.restore(t),this.dependencyTracker&&this.ctx.restore();else{this.ctx.restore();const a=dt(this.ctx);this.restore(t),this.ctx.save(),this.ctx.setTransform(...a);const o=ya.slice();I.axialAlignedBoundingBox([0,0,s.canvas.width,s.canvas.height],a,o),this.ctx.drawImage(s.canvas,0,0),this.ctx.restore(),this.compose(o)}}beginAnnotation(t,e,s,i,r,a){if(b(this,Ph,Xp).call(this),bd(this.ctx),this.ctx.save(),this.save(t),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),s){const o=s[2]-s[0],l=s[3]-s[1];if(a&&this.annotationCanvasMap){i=i.slice(),i[4]-=s[0],i[5]-=s[1],s=s.slice(),s[0]=s[1]=0,s[2]=o,s[3]=l,I.singularValueDecompose2dScale(dt(this.ctx),Me);const{viewportScale:h}=this,c=Math.ceil(o*this.outputScaleX*h),f=Math.ceil(l*this.outputScaleY*h);this.annotationCanvas=this.canvasFactory.create(c,f);const{canvas:g,context:m}=this.annotationCanvas;this.annotationCanvasMap.set(e,g),this.annotationCanvas.savedCtx=this.ctx,this.ctx=m,this.ctx.save(),this.ctx.setTransform(Me[0],0,0,-Me[1],0,l*Me[1]),bd(this.ctx)}else{bd(this.ctx),this.endPath(t);const h=new Path2D;h.rect(s[0],s[1],o,l),this.ctx.clip(h)}}this.current=new pm(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(t,...i),this.transform(t,...r)}endAnnotation(t){this.annotationCanvas&&(this.ctx.restore(),b(this,Mh,qp).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(t,e){var o;if(!this.contentVisible)return;const s=e.count;e=this.getObject(t,e.data,e),e.count=s;const i=this.ctx,r=this._createMaskCanvas(t,e),a=r.canvas;i.save(),i.setTransform(1,0,0,1,0,0),i.drawImage(a,r.offsetX,r.offsetY),(o=this.dependencyTracker)==null||o.resetBBox(t).recordBBox(t,this.ctx,r.offsetX,r.offsetX+a.width,r.offsetY,r.offsetY+a.height).recordOperation(t),i.restore(),this.compose()}paintImageMaskXObjectRepeat(t,e,s,i=0,r=0,a,o){var f,g,m;if(!this.contentVisible)return;e=this.getObject(t,e.data,e);const l=this.ctx;l.save();const h=dt(l);l.transform(s,i,r,a,0,0);const c=this._createMaskCanvas(t,e);l.setTransform(1,0,0,1,c.offsetX-h[4],c.offsetY-h[5]),(f=this.dependencyTracker)==null||f.resetBBox(t);for(let A=0,y=o.length;Af?c/f:1,o=h>f?h/f:1}}this._cachedScaleForStroking[0]=a,this._cachedScaleForStroking[1]=o}return this._cachedScaleForStroking}rescaleAndStroke(t,e){const{ctx:s,current:{lineWidth:i}}=this,[r,a]=this.getScaleForStroking();if(r===a){s.lineWidth=(i||1)*r,s.stroke(t);return}const o=s.getLineDash();e&&s.save(),s.scale(r,a),bp.a=1/r,bp.d=1/a;const l=new Path2D;if(l.addPath(t,bp),o.length>0){const h=Math.max(r,a);s.setLineDash(o.map(c=>c/h)),s.lineDashOffset/=h}s.lineWidth=i||1,s.stroke(l),e&&s.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}};Ph=new WeakSet,Xp=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},Mh=new WeakSet,qp=function(){if(this.pageColors){const t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(t!=="none"){const e=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=e}}},Rh=new WeakSet,Yp=function(t,e,s){const i=new Path2D;return i.addPath(t,new DOMMatrix(s).invertSelf().multiplySelf(e)),i};let _a=Jg;for(const u in Fl)_a.prototype[u]!==void 0&&(_a.prototype[Fl[u]]=_a.prototype[u]);var Dh,Lh;class Ti{static get workerPort(){return n(this,Dh)}static set workerPort(t){if(!(typeof Worker<"u"&&t instanceof Worker)&&t!==null)throw new Error("Invalid `workerPort` type.");p(this,Dh,t)}static get workerSrc(){return n(this,Lh)}static set workerSrc(t){if(typeof t!="string")throw new Error("Invalid `workerSrc` type.");p(this,Lh,t)}}Dh=new WeakMap,Lh=new WeakMap,d(Ti,Dh,null),d(Ti,Lh,"");var ro,Ih;class Ly{constructor({parsedData:t,rawData:e}){d(this,ro,void 0);d(this,Ih,void 0);p(this,ro,t),p(this,Ih,e)}getRaw(){return n(this,Ih)}get(t){return n(this,ro).get(t)??null}[Symbol.iterator](){return n(this,ro).entries()}}ro=new WeakMap,Ih=new WeakMap;const ma=Symbol("INTERNAL");var Fh,Nh,Oh,ao;class Iy{constructor(t,{name:e,intent:s,usage:i,rbGroups:r}){d(this,Fh,!1);d(this,Nh,!1);d(this,Oh,!1);d(this,ao,!0);p(this,Fh,!!(t&Pe.DISPLAY)),p(this,Nh,!!(t&Pe.PRINT)),this.name=e,this.intent=s,this.usage=i,this.rbGroups=r}get visible(){if(n(this,Oh))return n(this,ao);if(!n(this,ao))return!1;const{print:t,view:e}=this.usage;return n(this,Fh)?(e==null?void 0:e.viewState)!=="OFF":n(this,Nh)?(t==null?void 0:t.printState)!=="OFF":!0}_setVisible(t,e,s=!1){t!==ma&&st("Internal method `_setVisible` called."),p(this,Oh,s),p(this,ao,e)}}Fh=new WeakMap,Nh=new WeakMap,Oh=new WeakMap,ao=new WeakMap;var tn,et,oo,lo,Bh,Kp;class Fy{constructor(t,e=Pe.DISPLAY){d(this,Bh);d(this,tn,null);d(this,et,new Map);d(this,oo,null);d(this,lo,null);if(this.renderingIntent=e,this.name=null,this.creator=null,t!==null){this.name=t.name,this.creator=t.creator,p(this,lo,t.order);for(const s of t.groups)n(this,et).set(s.id,new Iy(e,s));if(t.baseState==="OFF")for(const s of n(this,et).values())s._setVisible(ma,!1);for(const s of t.on)n(this,et).get(s)._setVisible(ma,!0);for(const s of t.off)n(this,et).get(s)._setVisible(ma,!1);p(this,oo,this.getHash())}}isVisible(t){if(n(this,et).size===0)return!0;if(!t)return ip("Optional content group not defined."),!0;if(t.type==="OCG")return n(this,et).has(t.id)?n(this,et).get(t.id).visible:(z(`Optional content group not found: ${t.id}`),!0);if(t.type==="OCMD"){if(t.expression)return b(this,Bh,Kp).call(this,t.expression);if(!t.policy||t.policy==="AnyOn"){for(const e of t.ids){if(!n(this,et).has(e))return z(`Optional content group not found: ${e}`),!0;if(n(this,et).get(e).visible)return!0}return!1}else if(t.policy==="AllOn"){for(const e of t.ids){if(!n(this,et).has(e))return z(`Optional content group not found: ${e}`),!0;if(!n(this,et).get(e).visible)return!1}return!0}else if(t.policy==="AnyOff"){for(const e of t.ids){if(!n(this,et).has(e))return z(`Optional content group not found: ${e}`),!0;if(!n(this,et).get(e).visible)return!0}return!1}else if(t.policy==="AllOff"){for(const e of t.ids){if(!n(this,et).has(e))return z(`Optional content group not found: ${e}`),!0;if(n(this,et).get(e).visible)return!1}return!0}return z(`Unknown optional content policy ${t.policy}.`),!0}return z(`Unknown group type ${t.type}.`),!0}setVisibility(t,e=!0,s=!0){var r;const i=n(this,et).get(t);if(!i){z(`Optional content group not found: ${t}`);return}if(s&&e&&i.rbGroups.length)for(const a of i.rbGroups)for(const o of a)o!==t&&((r=n(this,et).get(o))==null||r._setVisible(ma,!1,!0));i._setVisible(ma,!!e,!0),p(this,tn,null)}setOCGState({state:t,preserveRB:e}){let s;for(const i of t){switch(i){case"ON":case"OFF":case"Toggle":s=i;continue}const r=n(this,et).get(i);if(r)switch(s){case"ON":this.setVisibility(i,!0,e);break;case"OFF":this.setVisibility(i,!1,e);break;case"Toggle":this.setVisibility(i,!r.visible,e);break}}p(this,tn,null)}get hasInitialVisibility(){return n(this,oo)===null||this.getHash()===n(this,oo)}getOrder(){return n(this,et).size?n(this,lo)?n(this,lo).slice():[...n(this,et).keys()]:null}getGroup(t){return n(this,et).get(t)||null}getHash(){if(n(this,tn)!==null)return n(this,tn);const t=new rb;for(const[e,s]of n(this,et))t.update(`${e}:${s.visible}`);return p(this,tn,t.hexdigest())}[Symbol.iterator](){return n(this,et).entries()}}tn=new WeakMap,et=new WeakMap,oo=new WeakMap,lo=new WeakMap,Bh=new WeakSet,Kp=function(t){const e=t.length;if(e<2)return!0;const s=t[0];for(let i=1;i0){const l=r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength?r.buffer:new Uint8Array(r).buffer;this._queuedChunks.push(l)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!s,this._isRangeSupported=!e,this._contentLength=i,this._fullRequestReader=null,this._rangeReaders=[],t.addRangeListener((l,h)=>{this._onReceiveData({begin:l,chunk:h})}),t.addProgressListener((l,h)=>{this._onProgress({loaded:l,total:h})}),t.addProgressiveReadListener(l=>{this._onReceiveData({chunk:l})}),t.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),t.transportReady()}_onReceiveData({begin:t,chunk:e}){const s=e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer;if(t===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(s):this._queuedChunks.push(s);else{const i=this._rangeReaders.some(function(r){return r._begin!==t?!1:(r._enqueue(s),!0)});_t(i,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var t;return((t=this._fullRequestReader)==null?void 0:t._loaded)??0}_onProgress(t){var e,s,i,r;t.total===void 0?(s=(e=this._rangeReaders[0])==null?void 0:e.onProgress)==null||s.call(e,{loaded:t.loaded}):(r=(i=this._fullRequestReader)==null?void 0:i.onProgress)==null||r.call(i,{loaded:t.loaded,total:t.total})}_onProgressiveDone(){var t;(t=this._fullRequestReader)==null||t.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(t){const e=this._rangeReaders.indexOf(t);e>=0&&this._rangeReaders.splice(e,1)}getFullReader(){_t(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const t=this._queuedChunks;return this._queuedChunks=null,new Oy(this,t,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const s=new By(this,t,e);return this._pdfDataRangeTransport.requestDataRange(t,e),this._rangeReaders.push(s),s}cancelAllRequests(t){var e;(e=this._fullRequestReader)==null||e.cancel(t);for(const s of this._rangeReaders.slice(0))s.cancel(t);this._pdfDataRangeTransport.abort()}}class Oy{constructor(t,e,s=!1,i=null){this._stream=t,this._done=s||!1,this._filename=zg(i)?i:null,this._queuedChunks=e||[],this._loaded=0;for(const r of this._queuedChunks)this._loaded+=r.byteLength;this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}_enqueue(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class By{constructor(t,e,s){this._stream=t,this._begin=e,this._end=s,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(t){if(!this._done){if(this._requests.length===0)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});for(const s of this._requests)s.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function Hy(u){let t=!0,e=s("filename\\*","i").exec(u);if(e){e=e[1];let c=o(e);return c=unescape(c),c=l(c),c=h(c),r(c)}if(e=a(u),e){const c=h(e);return r(c)}if(e=s("filename","i").exec(u),e){e=e[1];let c=o(e);return c=h(c),r(c)}function s(c,f){return new RegExp("(?:^|;)\\s*"+c+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',f)}function i(c,f){if(c){if(!/^[\x00-\xFF]+$/.test(f))return f;try{const g=new TextDecoder(c,{fatal:!0}),m=ad(f);f=g.decode(m),t=!1}catch{}}return f}function r(c){return t&&/[\x80-\xff]/.test(c)&&(c=i("utf-8",c),t&&(c=i("iso-8859-1",c))),c}function a(c){const f=[];let g;const m=s("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(g=m.exec(c))!==null;){let[,y,v,w]=g;if(y=parseInt(y,10),y in f){if(y===0)break;continue}f[y]=[v,w]}const A=[];for(let y=0;y{if(t._responseOrigin=ap(r.url),!wb(r.status))throw cd(r.status,i);this._reader=r.body.getReader(),this._headersCapability.resolve();const a=r.headers,{allowRangeRequests:o,suggestedLength:l}=Ab({responseHeaders:a,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=o,this._contentLength=l||this._contentLength,this._filename=yb(a),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new kn("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var s;await this._headersCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,(s=this.onProgress)==null||s.call(this,{loaded:this._loaded,total:this._contentLength}),{value:_b(t),done:!1})}cancel(t){var e;(e=this._reader)==null||e.cancel(t),this._abortController.abort()}}class Gy{constructor(t,e,s){this._stream=t,this._reader=null,this._loaded=0;const i=t.source;this._withCredentials=i.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!i.disableStream,this._abortController=new AbortController;const r=new Headers(t.headers);r.append("Range",`bytes=${e}-${s-1}`);const a=i.url;fetch(a,vb(r,this._withCredentials,this._abortController)).then(o=>{const l=ap(o.url);if(l!==t._responseOrigin)throw new Error(`Expected range response-origin "${l}" to match "${t._responseOrigin}".`);if(!wb(o.status))throw cd(o.status,a);this._readCapability.resolve(),this._reader=o.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var s;await this._readCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,(s=this.onProgress)==null||s.call(this,{loaded:this._loaded}),{value:_b(t),done:!1})}cancel(t){var e;(e=this._reader)==null||e.cancel(t),this._abortController.abort()}}const Ap=200,yp=206;function Uy(u){const t=u.response;return typeof t!="string"?t:ad(t).buffer}class jy{constructor({url:t,httpHeaders:e,withCredentials:s}){k(this,"_responseOrigin",null);this.url=t,this.isHttp=/^https?:/i.test(t),this.headers=bb(this.isHttp,e),this.withCredentials=s||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}request(t){const e=new XMLHttpRequest,s=this.currXhrId++,i=this.pendingRequests[s]={xhr:e};e.open("GET",this.url),e.withCredentials=this.withCredentials;for(const[r,a]of this.headers)e.setRequestHeader(r,a);return this.isHttp&&"begin"in t&&"end"in t?(e.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),i.expectedStatus=yp):i.expectedStatus=Ap,e.responseType="arraybuffer",_t(t.onError,"Expected `onError` callback to be provided."),e.onerror=()=>{t.onError(e.status)},e.onreadystatechange=this.onStateChange.bind(this,s),e.onprogress=this.onProgress.bind(this,s),i.onHeadersReceived=t.onHeadersReceived,i.onDone=t.onDone,i.onError=t.onError,i.onProgress=t.onProgress,e.send(null),s}onProgress(t,e){var i;const s=this.pendingRequests[t];s&&((i=s.onProgress)==null||i.call(s,e))}onStateChange(t,e){const s=this.pendingRequests[t];if(!s)return;const i=s.xhr;if(i.readyState>=2&&s.onHeadersReceived&&(s.onHeadersReceived(),delete s.onHeadersReceived),i.readyState!==4||!(t in this.pendingRequests))return;if(delete this.pendingRequests[t],i.status===0&&this.isHttp){s.onError(i.status);return}const r=i.status||Ap;if(!(r===Ap&&s.expectedStatus===yp)&&r!==s.expectedStatus){s.onError(i.status);return}const o=Uy(i);if(r===yp){const l=i.getResponseHeader("Content-Range"),h=/bytes (\d+)-(\d+)\/(\d+)/.exec(l);h?s.onDone({begin:parseInt(h[1],10),chunk:o}):(z('Missing or invalid "Content-Range" header.'),s.onError(0))}else o?s.onDone({begin:0,chunk:o}):s.onError(i.status)}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortRequest(t){const e=this.pendingRequests[t].xhr;delete this.pendingRequests[t],e.abort()}}class Vy{constructor(t){this._source=t,this._manager=new jy(t),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){const e=this._rangeRequestReaders.indexOf(t);e>=0&&this._rangeRequestReaders.splice(e,1)}getFullReader(){return _t(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new Wy(this._manager,this._source),this._fullRequestReader}getRangeReader(t,e){const s=new Xy(this._manager,t,e);return s.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(s),s}cancelAllRequests(t){var e;(e=this._fullRequestReader)==null||e.cancel(t);for(const s of this._rangeRequestReaders.slice(0))s.cancel(t)}}class Wy{constructor(t,e){this._manager=t,this._url=e.url,this._fullRequestId=t.request({onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._headersCapability=Promise.withResolvers(),this._disableRange=e.disableRange||!1,this._contentLength=e.length,this._rangeChunkSize=e.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const t=this._fullRequestId,e=this._manager.getRequestXhr(t);this._manager._responseOrigin=ap(e.responseURL);const s=e.getAllResponseHeaders(),i=new Headers(s?s.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(o=>{const[l,...h]=o.split(": ");return[l,h.join(": ")]}):[]),{allowRangeRequests:r,suggestedLength:a}=Ab({responseHeaders:i,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});r&&(this._isRangeSupported=!0),this._contentLength=a||this._contentLength,this._filename=yb(i),this._isRangeSupported&&this._manager.abortRequest(t),this._headersCapability.resolve()}_onDone(t){if(t&&(this._requests.length>0?this._requests.shift().resolve({value:t.chunk,done:!1}):this._cachedChunks.push(t.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(t){this._storedError=cd(t,this._url),this._headersCapability.reject(this._storedError);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(t){var e;(e=this.onProgress)==null||e.call(this,{loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._headersCapability.reject(t);for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class Xy{constructor(t,e,s){this._manager=t,this._url=t.url,this._requestId=t.request({begin:e,end:s,onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_onHeadersReceived(){var e;const t=ap((e=this._manager.getRequestXhr(this._requestId))==null?void 0:e.responseURL);t!==this._manager._responseOrigin&&(this._storedError=new Error(`Expected range response-origin "${t}" to match "${this._manager._responseOrigin}".`),this._onError(0))}_close(){var t;(t=this.onClosed)==null||t.call(this,this)}_onDone(t){const e=t.chunk;this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunk=e,this._done=!0;for(const s of this._requests)s.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(t){this._storedError??(this._storedError=cd(t,this._url));for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(t){var e;this.isStreamingSupported||(e=this.onProgress)==null||e.call(this,{loaded:t.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const qy=/^[a-z][a-z0-9\-+.]+:/i;function Yy(u){if(qy.test(u))return new URL(u);const t=process.getBuiltinModule("url");return new URL(t.pathToFileURL(u))}class Ky{constructor(t){this.source=t,this.url=Yy(t.url),_t(this.url.protocol==="file:","PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var t;return((t=this._fullRequestReader)==null?void 0:t._loaded)??0}getFullReader(){return _t(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new Qy(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const s=new Jy(this,t,e);return this._rangeRequestReaders.push(s),s}cancelAllRequests(t){var e;(e=this._fullRequestReader)==null||e.cancel(t);for(const s of this._rangeRequestReaders.slice(0))s.cancel(t)}}class Qy{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;const e=t.source;this._contentLength=e.length,this._loaded=0,this._filename=null,this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers();const s=process.getBuiltinModule("fs");s.promises.lstat(this._url).then(i=>{this._contentLength=i.size,this._setReadableStream(s.createReadStream(this._url)),this._headersCapability.resolve()},i=>{i.code==="ENOENT"&&(i=cd(0,this._url.href)),this._storedError=i,this._headersCapability.reject(i)})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var s;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,(s=this.onProgress)==null||s.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",e=>{this._error(e)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new kn("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class Jy{constructor(t,e,s){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const i=t.source;this._isStreamingSupported=!i.disableStream;const r=process.getBuiltinModule("fs");this._setReadableStream(r.createReadStream(this._url,{start:e,end:s-1}))}get isStreamingSupported(){return this._isStreamingSupported}async read(){var s;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,(s=this.onProgress)==null||s.call(this,{loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",e=>{this._error(e)}),this._storedError&&this._readableStream.destroy(this._storedError)}}const ul=Symbol("INITIAL_DATA");var be,Hh,Qp;class Sb{constructor(){d(this,Hh);d(this,be,Object.create(null))}get(t,e=null){if(e){const i=b(this,Hh,Qp).call(this,t);return i.promise.then(()=>e(i.data)),null}const s=n(this,be)[t];if(!s||s.data===ul)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return s.data}has(t){const e=n(this,be)[t];return!!e&&e.data!==ul}delete(t){const e=n(this,be)[t];return!e||e.data===ul?!1:(delete n(this,be)[t],!0)}resolve(t,e=null){const s=b(this,Hh,Qp).call(this,t);s.data=e,s.resolve()}clear(){var t;for(const e in n(this,be)){const{data:s}=n(this,be)[e];(t=s==null?void 0:s.bitmap)==null||t.close()}p(this,be,Object.create(null))}*[Symbol.iterator](){for(const t in n(this,be)){const{data:e}=n(this,be)[t];e!==ul&&(yield[t,e])}}}be=new WeakMap,Hh=new WeakSet,Qp=function(t){var e;return(e=n(this,be))[t]||(e[t]={...Promise.withResolvers(),data:ul})};const Zy=1e5,ym=30;var Sm,en,le,$h,zh,fr,ii,Gh,Uh,pr,ho,co,sn,uo,jh,fo,gr,Vh,Wh,po,mr,Xh,nn,go,Wu,Eb,Xu,Cb,qh,Jp,mo,Pd,Yh,Zp,qu,Tb,Yu,xb;const ut=class ut{constructor({textContentSource:t,container:e,viewport:s}){d(this,Wu);d(this,Xu);d(this,qh);d(this,en,Promise.withResolvers());d(this,le,null);d(this,$h,!1);d(this,zh,!!((Sm=globalThis.FontInspector)!=null&&Sm.enabled));d(this,fr,null);d(this,ii,null);d(this,Gh,0);d(this,Uh,0);d(this,pr,null);d(this,ho,null);d(this,co,0);d(this,sn,0);d(this,uo,Object.create(null));d(this,jh,[]);d(this,fo,null);d(this,gr,[]);d(this,Vh,new WeakMap);d(this,Wh,null);var l;if(t instanceof ReadableStream)p(this,fo,t);else if(typeof t=="object")p(this,fo,new ReadableStream({start(h){h.enqueue(t),h.close()}}));else throw new Error('No "textContentSource" parameter specified.');p(this,le,p(this,ho,e)),p(this,sn,s.scale*Ds.pixelRatio),p(this,co,s.rotation),p(this,ii,{div:null,properties:null,ctx:null});const{pageWidth:i,pageHeight:r,pageX:a,pageY:o}=s.rawDims;p(this,Wh,[1,0,0,-1,-a,o+r]),p(this,Uh,i),p(this,Gh,r),b(l=ut,qu,Tb).call(l),ra(e,s),n(this,en).promise.finally(()=>{n(ut,go).delete(this),p(this,ii,null),p(this,uo,null)}).catch(()=>{})}static get fontFamilyMap(){const{isWindows:t,isFirefox:e}=Wt.platform;return V(this,"fontFamilyMap",new Map([["sans-serif",`${t&&e?"Calibri, ":""}sans-serif`],["monospace",`${t&&e?"Lucida Console, ":""}monospace`]]))}render(){const t=()=>{n(this,pr).read().then(({value:e,done:s})=>{if(s){n(this,en).resolve();return}n(this,fr)??p(this,fr,e.lang),Object.assign(n(this,uo),e.styles),b(this,Wu,Eb).call(this,e.items),t()},n(this,en).reject)};return p(this,pr,n(this,fo).getReader()),n(ut,go).add(this),t(),n(this,en).promise}update({viewport:t,onBefore:e=null}){var r;const s=t.scale*Ds.pixelRatio,i=t.rotation;if(i!==n(this,co)&&(e==null||e(),p(this,co,i),ra(n(this,ho),{rotation:i})),s!==n(this,sn)){e==null||e(),p(this,sn,s);const a={div:null,properties:null,ctx:b(r=ut,mo,Pd).call(r,n(this,fr))};for(const o of n(this,gr))a.properties=n(this,Vh).get(o),a.div=o,b(this,qh,Jp).call(this,a)}}cancel(){var e;const t=new kn("TextLayer task cancelled.");(e=n(this,pr))==null||e.cancel(t).catch(()=>{}),p(this,pr,null),n(this,en).reject(t)}get textDivs(){return n(this,gr)}get textContentItemsStr(){return n(this,jh)}static cleanup(){if(!(n(this,go).size>0)){n(this,po).clear();for(const{canvas:t}of n(this,mr).values())t.remove();n(this,mr).clear()}}};en=new WeakMap,le=new WeakMap,$h=new WeakMap,zh=new WeakMap,fr=new WeakMap,ii=new WeakMap,Gh=new WeakMap,Uh=new WeakMap,pr=new WeakMap,ho=new WeakMap,co=new WeakMap,sn=new WeakMap,uo=new WeakMap,jh=new WeakMap,fo=new WeakMap,gr=new WeakMap,Vh=new WeakMap,Wh=new WeakMap,po=new WeakMap,mr=new WeakMap,Xh=new WeakMap,nn=new WeakMap,go=new WeakMap,Wu=new WeakSet,Eb=function(t){var i,r;if(n(this,$h))return;(r=n(this,ii)).ctx??(r.ctx=b(i=ut,mo,Pd).call(i,n(this,fr)));const e=n(this,gr),s=n(this,jh);for(const a of t){if(e.length>Zy){z("Ignoring additional textDivs for performance reasons."),p(this,$h,!0);return}if(a.str===void 0){if(a.type==="beginMarkedContentProps"||a.type==="beginMarkedContent"){const o=n(this,le);p(this,le,document.createElement("span")),n(this,le).classList.add("markedContent"),a.id&&n(this,le).setAttribute("id",`${a.id}`),o.append(n(this,le))}else a.type==="endMarkedContent"&&p(this,le,n(this,le).parentNode);continue}s.push(a.str),b(this,Xu,Cb).call(this,a)}},Xu=new WeakSet,Cb=function(t){var y;const e=document.createElement("span"),s={angle:0,canvasWidth:0,hasText:t.str!=="",hasEOL:t.hasEOL,fontSize:0};n(this,gr).push(e);const i=I.transform(n(this,Wh),t.transform);let r=Math.atan2(i[1],i[0]);const a=n(this,uo)[t.fontName];a.vertical&&(r+=Math.PI/2);let o=n(this,zh)&&a.fontSubstitution||a.fontFamily;o=ut.fontFamilyMap.get(o)||o;const l=Math.hypot(i[2],i[3]),h=l*b(y=ut,Yu,xb).call(y,o,a,n(this,fr));let c,f;r===0?(c=i[4],f=i[5]-h):(c=i[4]+h*Math.sin(r),f=i[5]-h*Math.cos(r));const g="calc(var(--total-scale-factor) *",m=e.style;n(this,le)===n(this,ho)?(m.left=`${(100*c/n(this,Uh)).toFixed(2)}%`,m.top=`${(100*f/n(this,Gh)).toFixed(2)}%`):(m.left=`${g}${c.toFixed(2)}px)`,m.top=`${g}${f.toFixed(2)}px)`),m.fontSize=`${g}${(n(ut,nn)*l).toFixed(2)}px)`,m.fontFamily=o,s.fontSize=l,e.setAttribute("role","presentation"),e.textContent=t.str,e.dir=t.dir,n(this,zh)&&(e.dataset.fontName=a.fontSubstitutionLoadedName||t.fontName),r!==0&&(s.angle=r*(180/Math.PI));let A=!1;if(t.str.length>1)A=!0;else if(t.str!==" "&&t.transform[0]!==t.transform[3]){const v=Math.abs(t.transform[0]),w=Math.abs(t.transform[3]);v!==w&&Math.max(v,w)/Math.min(v,w)>1.5&&(A=!0)}if(A&&(s.canvasWidth=a.vertical?t.height:t.width),n(this,Vh).set(e,s),n(this,ii).div=e,n(this,ii).properties=s,b(this,qh,Jp).call(this,n(this,ii)),s.hasText&&n(this,le).append(e),s.hasEOL){const v=document.createElement("br");v.setAttribute("role","presentation"),n(this,le).append(v)}},qh=new WeakSet,Jp=function(t){var o;const{div:e,properties:s,ctx:i}=t,{style:r}=e;let a="";if(n(ut,nn)>1&&(a=`scale(${1/n(ut,nn)})`),s.canvasWidth!==0&&s.hasText){const{fontFamily:l}=r,{canvasWidth:h,fontSize:c}=s;b(o=ut,Yh,Zp).call(o,i,c*n(this,sn),l);const{width:f}=i.measureText(e.textContent);f>0&&(a=`scaleX(${h*n(this,sn)/f}) ${a}`)}s.angle!==0&&(a=`rotate(${s.angle}deg) ${a}`),a.length>0&&(r.transform=a)},mo=new WeakSet,Pd=function(t=null){let e=n(this,mr).get(t||(t=""));if(!e){const s=document.createElement("canvas");s.className="hiddenCanvasElement",s.lang=t,document.body.append(s),e=s.getContext("2d",{alpha:!1,willReadFrequently:!0}),n(this,mr).set(t,e),n(this,Xh).set(e,{size:0,family:""})}return e},Yh=new WeakSet,Zp=function(t,e,s){const i=n(this,Xh).get(t);e===i.size&&s===i.family||(t.font=`${e}px ${s}`,i.size=e,i.family=s)},qu=new WeakSet,Tb=function(){if(n(this,nn)!==null)return;const t=document.createElement("div");t.style.opacity=0,t.style.lineHeight=1,t.style.fontSize="1px",t.style.position="absolute",t.textContent="X",document.body.append(t),p(this,nn,t.getBoundingClientRect().height),t.remove()},Yu=new WeakSet,xb=function(t,e,s){const i=n(this,po).get(t);if(i)return i;const r=b(this,mo,Pd).call(this,s);r.canvas.width=r.canvas.height=ym,b(this,Yh,Zp).call(this,r,ym,t);const a=r.measureText(""),o=a.fontBoundingBoxAscent,l=Math.abs(a.fontBoundingBoxDescent);r.canvas.width=r.canvas.height=0;let h=.8;return o?h=o/(o+l):(Wt.platform.isFirefox&&z("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."),e.ascent?h=e.ascent:e.descent&&(h=1+e.descent)),n(this,po).set(t,h),h},d(ut,mo),d(ut,Yh),d(ut,qu),d(ut,Yu),d(ut,po,new Map),d(ut,mr,new Map),d(ut,Xh,new WeakMap),d(ut,nn,null),d(ut,go,new Set);let Nl=ut;class Ol{static textContent(t){const e=[],s={items:e,styles:Object.create(null)};function i(r){var l;if(!r)return;let a=null;const o=r.name;if(o==="#text")a=r.value;else if(Ol.shouldBuildText(o))(l=r==null?void 0:r.attributes)!=null&&l.textContent?a=r.attributes.textContent:r.value&&(a=r.value);else return;if(a!==null&&e.push({str:a}),!!r.children)for(const h of r.children)i(h)}return i(t),s}static shouldBuildText(t){return!(t==="textarea"||t==="input"||t==="option"||t==="select")}}const tw=100;function ew(u={}){typeof u=="string"||u instanceof URL?u={url:u}:(u instanceof ArrayBuffer||ArrayBuffer.isView(u))&&(u={data:u});const t=new tg,{docId:e}=t,s=u.url?ly(u.url):null,i=u.data?hy(u.data):null,r=u.httpHeaders||null,a=u.withCredentials===!0,o=u.password??null,l=u.range instanceof kb?u.range:null,h=Number.isInteger(u.rangeChunkSize)&&u.rangeChunkSize>0?u.rangeChunkSize:2**16;let c=u.worker instanceof Bl?u.worker:null;const f=u.verbosity,g=typeof u.docBaseUrl=="string"&&!np(u.docBaseUrl)?u.docBaseUrl:null,m=pd(u.cMapUrl),A=u.cMapPacked!==!1,y=u.CMapReaderFactory||(ie?by:om),v=pd(u.iccUrl),w=pd(u.standardFontDataUrl),S=u.StandardFontDataFactory||(ie?Ay:lm),_=pd(u.wasmUrl),E=u.WasmFactory||(ie?yy:hm),C=u.stopAtErrors!==!0,T=Number.isInteger(u.maxImageSize)&&u.maxImageSize>-1?u.maxImageSize:-1,x=u.isEvalSupported!==!1,P=typeof u.isOffscreenCanvasSupported=="boolean"?u.isOffscreenCanvasSupported:!ie,M=typeof u.isImageDecoderSupported=="boolean"?u.isImageDecoderSupported:!ie&&(Wt.platform.isFirefox||!globalThis.chrome),D=Number.isInteger(u.canvasMaxAreaInBytes)?u.canvasMaxAreaInBytes:-1,R=typeof u.disableFontFace=="boolean"?u.disableFontFace:ie,H=u.fontExtraProperties===!0,U=u.enableXfa===!0,W=u.ownerDocument||globalThis.document,Y=u.disableRange===!0,B=u.disableStream===!0,N=u.disableAutoFetch===!0,Pt=u.pdfBug===!0,At=u.CanvasFactory||(ie?my:fy),Re=u.FilterFactory||(ie?gy:py),as=u.enableHWA===!0,it=u.useWasm!==!1,Z=l?l.length:u.length??NaN,Ls=typeof u.useSystemFonts=="boolean"?u.useSystemFonts:!ie&&!R,Ve=typeof u.useWorkerFetch=="boolean"?u.useWorkerFetch:!!(y===om&&S===lm&&E===hm&&m&&w&&_&&gl(m,document.baseURI)&&gl(w,document.baseURI)&&gl(_,document.baseURI)),We=null;$A(f);const pt={canvasFactory:new At({ownerDocument:W,enableHWA:as}),filterFactory:new Re({docId:e,ownerDocument:W}),cMapReaderFactory:Ve?null:new y({baseUrl:m,isCompressed:A}),standardFontDataFactory:Ve?null:new S({baseUrl:w}),wasmFactory:Ve?null:new E({baseUrl:_})};c||(c=Bl.create({verbosity:f,port:Ti.workerPort}),t._worker=c);const lp={docId:e,apiVersion:"5.4.149",data:i,password:o,disableAutoFetch:N,rangeChunkSize:h,length:Z,docBaseUrl:g,enableXfa:U,evaluatorOptions:{maxImageSize:T,disableFontFace:R,ignoreErrors:C,isEvalSupported:x,isOffscreenCanvasSupported:P,isImageDecoderSupported:M,canvasMaxAreaInBytes:D,fontExtraProperties:H,useSystemFonts:Ls,useWasm:it,useWorkerFetch:Ve,cMapUrl:m,iccUrl:v,standardFontDataUrl:w,wasmUrl:_}},hp={ownerDocument:W,pdfBug:Pt,styleElement:We,loadingParams:{disableAutoFetch:N,enableXfa:U}};return c.promise.then(function(){if(t.destroyed)throw new Error("Loading aborted");if(c.destroyed)throw new Error("Worker was destroyed");const cp=c.messageHandler.sendWithPromise("GetDocRequest",lp,i?[i.buffer]:null);let Mn;if(l)Mn=new Ny(l,{disableRange:Y,disableStream:B});else if(!i){if(!s)throw new Error("getDocument - no `url` parameter provided.");const Rn=gl(s)?$y:ie?Ky:Vy;Mn=new Rn({url:s,length:Z,httpHeaders:r,withCredentials:a,rangeChunkSize:h,disableRange:Y,disableStream:B})}return cp.then(Rn=>{if(t.destroyed)throw new Error("Loading aborted");if(c.destroyed)throw new Error("Worker was destroyed");const em=new vl(e,Rn,c.port),IA=new nw(em,t,Mn,hp,pt,as);t._transport=IA,em.send("Ready",null)})}).catch(t._capability.reject),t}var Ku;const Qu=class Qu{constructor(){k(this,"_capability",Promise.withResolvers());k(this,"_transport",null);k(this,"_worker",null);k(this,"docId",`d${St(Qu,Ku)._++}`);k(this,"destroyed",!1);k(this,"onPassword",null);k(this,"onProgress",null)}get promise(){return this._capability.promise}async destroy(){var t,e,s,i;this.destroyed=!0;try{(t=this._worker)!=null&&t.port&&(this._worker._pendingDestroy=!0),await((e=this._transport)==null?void 0:e.destroy())}catch(r){throw(s=this._worker)!=null&&s.port&&delete this._worker._pendingDestroy,r}this._transport=null,(i=this._worker)==null||i.destroy(),this._worker=null}async getData(){return this._transport.getData()}};Ku=new WeakMap,d(Qu,Ku,0);let tg=Qu;var br,Kh,Qh,Jh,Zh;class kb{constructor(t,e,s=!1,i=null){d(this,br,Promise.withResolvers());d(this,Kh,[]);d(this,Qh,[]);d(this,Jh,[]);d(this,Zh,[]);this.length=t,this.initialData=e,this.progressiveDone=s,this.contentDispositionFilename=i}addRangeListener(t){n(this,Zh).push(t)}addProgressListener(t){n(this,Jh).push(t)}addProgressiveReadListener(t){n(this,Qh).push(t)}addProgressiveDoneListener(t){n(this,Kh).push(t)}onDataRange(t,e){for(const s of n(this,Zh))s(t,e)}onDataProgress(t,e){n(this,br).promise.then(()=>{for(const s of n(this,Jh))s(t,e)})}onDataProgressiveRead(t){n(this,br).promise.then(()=>{for(const e of n(this,Qh))e(t)})}onDataProgressiveDone(){n(this,br).promise.then(()=>{for(const t of n(this,Kh))t()})}transportReady(){n(this,br).resolve()}requestDataRange(t,e){st("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}br=new WeakMap,Kh=new WeakMap,Qh=new WeakMap,Jh=new WeakMap,Zh=new WeakMap;class sw{constructor(t,e){this._pdfInfo=t,this._transport=e}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return V(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getAnnotationsByType(t,e){return this._transport.getAnnotationsByType(t,e)}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:t="display"}={}){const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getOptionalContentConfig(e)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(t=!1){return this._transport.startCleanup(t||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(t){return this._transport.cachedPageNumber(t)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}var ni,Ar,Tl;class iw{constructor(t,e,s,i=!1){d(this,Ar);d(this,ni,!1);this._pageIndex=t,this._pageInfo=e,this._transport=s,this._stats=i?new nm:null,this._pdfBug=i,this.commonObjs=s.commonObjs,this.objs=new Sb,this._intentStates=new Map,this.destroyed=!1,this.recordedGroups=null}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:t,rotation:e=this.rotate,offsetX:s=0,offsetY:i=0,dontFlip:r=!1}={}){return new ld({viewBox:this.view,userUnit:this.userUnit,scale:t,rotation:e,offsetX:s,offsetY:i,dontFlip:r})}getAnnotations({intent:t="display"}={}){const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,e)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return V(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var t;return((t=this._transport._htmlForXfa)==null?void 0:t.children[this._pageIndex])||null}render({canvasContext:t,canvas:e=t.canvas,viewport:s,intent:i="display",annotationMode:r=ki.ENABLE,transform:a=null,background:o=null,optionalContentConfigPromise:l=null,annotationCanvasMap:h=null,pageColors:c=null,printAnnotationStorage:f=null,isEditing:g=!1,recordOperations:m=!1,filteredOperationIndexes:A=null}){var P,M,D;(P=this._stats)==null||P.time("Overall");const y=this._transport.getRenderingIntent(i,r,f,g),{renderingIntent:v,cacheKey:w}=y;p(this,ni,!1),l||(l=this._transport.getOptionalContentConfig(v));let S=this._intentStates.get(w);S||(S=Object.create(null),this._intentStates.set(w,S)),S.streamReaderCancelTimeout&&(clearTimeout(S.streamReaderCancelTimeout),S.streamReaderCancelTimeout=null);const _=!!(v&Pe.PRINT);S.displayReadyCapability||(S.displayReadyCapability=Promise.withResolvers(),S.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(M=this._stats)==null||M.time("Page Request"),this._pumpOperatorList(y));const E=!this.recordedGroups&&(m||this._pdfBug&&((D=globalThis.StepperManager)==null?void 0:D.enabled)),C=R=>{var H,U,W;if(S.renderTasks.delete(T),E){const Y=(H=T.gfx)==null?void 0:H.dependencyTracker.take();Y?((U=T.stepper)==null||U.setOperatorGroups(Y),m&&(this.recordedGroups=Y)):m&&(this.recordedGroups=[])}_&&p(this,ni,!0),b(this,Ar,Tl).call(this),R?(T.capability.reject(R),this._abortOperatorList({intentState:S,reason:R instanceof Error?R:new Error(R)})):T.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(W=globalThis.Stats)!=null&&W.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},T=new eg({callback:C,params:{canvas:e,canvasContext:t,dependencyTracker:E?new wy(e):null,viewport:s,transform:a,background:o},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:h,operatorList:S.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!_,pdfBug:this._pdfBug,pageColors:c,enableHWA:this._transport.enableHWA,filteredOperationIndexes:A});(S.renderTasks||(S.renderTasks=new Set)).add(T);const x=T.task;return Promise.all([S.displayReadyCapability.promise,l]).then(([R,H])=>{var U;if(this.destroyed){C();return}if((U=this._stats)==null||U.time("Rendering"),!(H.renderingIntent&v))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");T.initializeGraphics({transparency:R,optionalContentConfig:H}),T.operatorListChanged()}).catch(C),x}getOperatorList({intent:t="display",annotationMode:e=ki.ENABLE,printAnnotationStorage:s=null,isEditing:i=!1}={}){var h;function r(){o.operatorList.lastChunk&&(o.opListReadCapability.resolve(o.operatorList),o.renderTasks.delete(l))}const a=this._transport.getRenderingIntent(t,e,s,i,!0);let o=this._intentStates.get(a.cacheKey);o||(o=Object.create(null),this._intentStates.set(a.cacheKey,o));let l;return o.opListReadCapability||(l=Object.create(null),l.operatorListChanged=r,o.opListReadCapability=Promise.withResolvers(),(o.renderTasks||(o.renderTasks=new Set)).add(l),o.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(h=this._stats)==null||h.time("Page Request"),this._pumpOperatorList(a)),o.opListReadCapability.promise}streamTextContent({includeMarkedContent:t=!1,disableNormalization:e=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:t===!0,disableNormalization:e===!0},{highWaterMark:100,size(i){return i.items.length}})}getTextContent(t={}){if(this._transport._htmlForXfa)return this.getXfa().then(s=>Ol.textContent(s));const e=this.streamTextContent(t);return new Promise(function(s,i){function r(){a.read().then(function({value:l,done:h}){if(h){s(o);return}o.lang??(o.lang=l.lang),Object.assign(o.styles,l.styles),o.items.push(...l.items),r()},i)}const a=e.getReader(),o={items:[],styles:Object.create(null),lang:null};r()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const t=[];for(const e of this._intentStates.values())if(this._abortOperatorList({intentState:e,reason:new Error("Page was destroyed."),force:!0}),!e.opListReadCapability)for(const s of e.renderTasks)t.push(s.completed),s.cancel();return this.objs.clear(),p(this,ni,!1),Promise.all(t)}cleanup(t=!1){p(this,ni,!0);const e=b(this,Ar,Tl).call(this);return t&&e&&this._stats&&(this._stats=new nm),e}_startRenderPage(t,e){var i,r;const s=this._intentStates.get(e);s&&((i=this._stats)==null||i.timeEnd("Page Request"),(r=s.displayReadyCapability)==null||r.resolve(t))}_renderPageChunk(t,e){for(let s=0,i=t.length;s{l.read().then(({value:f,done:g})=>{if(g){h.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(f,h),c())},f=>{if(h.streamReader=null,!this._transport.destroyed){if(h.operatorList){h.operatorList.lastChunk=!0;for(const g of h.renderTasks)g.operatorListChanged();b(this,Ar,Tl).call(this)}if(h.displayReadyCapability)h.displayReadyCapability.reject(f);else if(h.opListReadCapability)h.opListReadCapability.reject(f);else throw f}})};c()}_abortOperatorList({intentState:t,reason:e,force:s=!1}){if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!s){if(t.renderTasks.size>0)return;if(e instanceof $g){let i=tw;e.extraDelay>0&&e.extraDelay<1e3&&(i+=e.extraDelay),t.streamReaderCancelTimeout=setTimeout(()=>{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:e,force:!0})},i);return}}if(t.streamReader.cancel(new kn(e.message)).catch(()=>{}),t.streamReader=null,!this._transport.destroyed){for(const[i,r]of this._intentStates)if(r===t){this._intentStates.delete(i);break}this.cleanup()}}}get stats(){return this._stats}}ni=new WeakMap,Ar=new WeakSet,Tl=function(){if(!n(this,ni)||this.destroyed)return!1;for(const{renderTasks:t,operatorList:e}of this._intentStates.values())if(t.size>0||!e.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),p(this,ni,!1),!0};var rn,Je,ri,yr,Ju,wr,vr,bo,Md,Zu,Pb,tf,Mb,_r,xl,Ao,Rd;const at=class at{constructor({name:t=null,port:e=null,verbosity:s=zA()}={}){d(this,bo);d(this,Zu);d(this,tf);d(this,_r);d(this,rn,Promise.withResolvers());d(this,Je,null);d(this,ri,null);d(this,yr,null);if(this.name=t,this.destroyed=!1,this.verbosity=s,e){if(n(at,vr).has(e))throw new Error("Cannot use more than one PDFWorker per port.");n(at,vr).set(e,this),b(this,Zu,Pb).call(this,e)}else b(this,tf,Mb).call(this)}get promise(){return n(this,rn).promise}get port(){return n(this,ri)}get messageHandler(){return n(this,Je)}destroy(){var t,e;this.destroyed=!0,(t=n(this,yr))==null||t.terminate(),p(this,yr,null),n(at,vr).delete(n(this,ri)),p(this,ri,null),(e=n(this,Je))==null||e.destroy(),p(this,Je,null)}static create(t){const e=n(this,vr).get(t==null?void 0:t.port);if(e){if(e._pendingDestroy)throw new Error("PDFWorker.create - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return e}return new at(t)}static get workerSrc(){if(Ti.workerSrc)return Ti.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return V(this,"_setupFakeWorkerGlobal",(async()=>n(this,Ao,Rd)?n(this,Ao,Rd):(await OA(()=>import(this.workerSrc),[])).WorkerMessageHandler)())}};rn=new WeakMap,Je=new WeakMap,ri=new WeakMap,yr=new WeakMap,Ju=new WeakMap,wr=new WeakMap,vr=new WeakMap,bo=new WeakSet,Md=function(){n(this,rn).resolve(),n(this,Je).send("configure",{verbosity:this.verbosity})},Zu=new WeakSet,Pb=function(t){p(this,ri,t),p(this,Je,new vl("main","worker",t)),n(this,Je).on("ready",()=>{}),b(this,bo,Md).call(this)},tf=new WeakSet,Mb=function(){if(n(at,wr)||n(at,Ao,Rd)){b(this,_r,xl).call(this);return}let{workerSrc:t}=at;try{at._isSameOrigin(window.location,t)||(t=at._createCDNWrapper(new URL(t,window.location).href));const e=new Worker(t,{type:"module"}),s=new vl("main","worker",e),i=()=>{r.abort(),s.destroy(),e.terminate(),this.destroyed?n(this,rn).reject(new Error("Worker was destroyed")):b(this,_r,xl).call(this)},r=new AbortController;e.addEventListener("error",()=>{n(this,yr)||i()},{signal:r.signal}),s.on("test",o=>{if(r.abort(),this.destroyed||!o){i();return}p(this,Je,s),p(this,ri,e),p(this,yr,e),b(this,bo,Md).call(this)}),s.on("ready",o=>{if(r.abort(),this.destroyed){i();return}try{a()}catch{b(this,_r,xl).call(this)}});const a=()=>{const o=new Uint8Array;s.send("test",o,[o.buffer])};a();return}catch{ip("The worker has been disabled.")}b(this,_r,xl).call(this)},_r=new WeakSet,xl=function(){n(at,wr)||(z("Setting up fake worker."),p(at,wr,!0)),at._setupFakeWorkerGlobal.then(t=>{if(this.destroyed){n(this,rn).reject(new Error("Worker was destroyed"));return}const e=new uy;p(this,ri,e);const s=`fake${St(at,Ju)._++}`,i=new vl(s+"_worker",s,e);t.setup(i,e),p(this,Je,new vl(s,s+"_worker",e)),b(this,bo,Md).call(this)}).catch(t=>{n(this,rn).reject(new Error(`Setting up fake worker failed: "${t.message}".`))})},Ao=new WeakSet,Rd=function(){var t;try{return((t=globalThis.pdfjsWorker)==null?void 0:t.WorkerMessageHandler)||null}catch{return null}},d(at,Ao),d(at,Ju,0),d(at,wr,!1),d(at,vr,new WeakMap),ie&&(p(at,wr,!0),Ti.workerSrc||(Ti.workerSrc="./pdf.worker.mjs")),at._isSameOrigin=(t,e)=>{const s=URL.parse(t);if(!(s!=null&&s.origin)||s.origin==="null")return!1;const i=new URL(e,s);return s.origin===i.origin},at._createCDNWrapper=t=>{const e=`await import("${t}");`;return URL.createObjectURL(new Blob([e],{type:"text/javascript"}))},at.fromPort=t=>{if(ZA("`PDFWorker.fromPort` - please use `PDFWorker.create` instead."),!(t!=null&&t.port))throw new Error("PDFWorker.fromPort - invalid method signature.");return at.create(t)};let Bl=at;var ai,vs,yo,wo,oi,Sr,kl;class nw{constructor(t,e,s,i,r,a){d(this,Sr);d(this,ai,new Map);d(this,vs,new Map);d(this,yo,new Map);d(this,wo,new Map);d(this,oi,null);this.messageHandler=t,this.loadingTask=e,this.commonObjs=new Sb,this.fontLoader=new ay({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this.loadingParams=i.loadingParams,this._params=i,this.canvasFactory=r.canvasFactory,this.filterFactory=r.filterFactory,this.cMapReaderFactory=r.cMapReaderFactory,this.standardFontDataFactory=r.standardFontDataFactory,this.wasmFactory=r.wasmFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=s,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.enableHWA=a,this.setupMessageHandler()}get annotationStorage(){return V(this,"annotationStorage",new Gg)}getRenderingIntent(t,e=ki.ENABLE,s=null,i=!1,r=!1){let a=Pe.DISPLAY,o=zp;switch(t){case"any":a=Pe.ANY;break;case"display":break;case"print":a=Pe.PRINT;break;default:z(`getRenderingIntent - invalid intent: ${t}`)}const l=a&Pe.PRINT&&s instanceof ob?s:this.annotationStorage;switch(e){case ki.DISABLE:a+=Pe.ANNOTATIONS_DISABLE;break;case ki.ENABLE:break;case ki.ENABLE_FORMS:a+=Pe.ANNOTATIONS_FORMS;break;case ki.ENABLE_STORAGE:a+=Pe.ANNOTATIONS_STORAGE,o=l.serializable;break;default:z(`getRenderingIntent - invalid annotationMode: ${e}`)}i&&(a+=Pe.IS_EDITING),r&&(a+=Pe.OPLIST);const{ids:h,hash:c}=l.modifiedIds,f=[a,o.hash,c];return{renderingIntent:a,cacheKey:f.join("_"),annotationStorageSerializable:o,modifiedIds:h}}destroy(){var s;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(s=n(this,oi))==null||s.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const i of n(this,vs).values())t.push(i._destroy());n(this,vs).clear(),n(this,yo).clear(),n(this,wo).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const e=this.messageHandler.sendWithPromise("Terminate",null);return t.push(e),Promise.all(t).then(()=>{var i,r;this.commonObjs.clear(),this.fontLoader.clear(),n(this,ai).clear(),this.filterFactory.destroy(),Nl.cleanup(),(i=this._networkStream)==null||i.cancelAllRequests(new kn("Worker was terminated.")),(r=this.messageHandler)==null||r.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:e}=this;t.on("GetReader",(s,i)=>{_t(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=r=>{this._lastProgress={loaded:r.loaded,total:r.total}},i.onPull=()=>{this._fullReader.read().then(function({value:r,done:a}){if(a){i.close();return}_t(r instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(r),1,[r])}).catch(r=>{i.error(r)})},i.onCancel=r=>{this._fullReader.cancel(r),i.ready.catch(a=>{if(!this.destroyed)throw a})}}),t.on("ReaderHeadersReady",async s=>{var o;await this._fullReader.headersReady;const{isStreamingSupported:i,isRangeSupported:r,contentLength:a}=this._fullReader;return(!i||!r)&&(this._lastProgress&&((o=e.onProgress)==null||o.call(e,this._lastProgress)),this._fullReader.onProgress=l=>{var h;(h=e.onProgress)==null||h.call(e,{loaded:l.loaded,total:l.total})}),{isStreamingSupported:i,isRangeSupported:r,contentLength:a}}),t.on("GetRangeReader",(s,i)=>{_t(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const r=this._networkStream.getRangeReader(s.begin,s.end);if(!r){i.close();return}i.onPull=()=>{r.read().then(function({value:a,done:o}){if(o){i.close();return}_t(a instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(a),1,[a])}).catch(a=>{i.error(a)})},i.onCancel=a=>{r.cancel(a),i.ready.catch(o=>{if(!this.destroyed)throw o})}}),t.on("GetDoc",({pdfInfo:s})=>{this._numPages=s.numPages,this._htmlForXfa=s.htmlForXfa,delete s.htmlForXfa,e._capability.resolve(new sw(s,this))}),t.on("DocException",s=>{e._capability.reject(re(s))}),t.on("PasswordRequest",s=>{p(this,oi,Promise.withResolvers());try{if(!e.onPassword)throw re(s);const i=r=>{r instanceof Error?n(this,oi).reject(r):n(this,oi).resolve({password:r})};e.onPassword(i,s.code)}catch(i){n(this,oi).reject(i)}return n(this,oi).promise}),t.on("DataLoaded",s=>{var i;(i=e.onProgress)==null||i.call(e,{loaded:s.length,total:s.length}),this.downloadInfoCapability.resolve(s)}),t.on("StartRenderPage",s=>{if(this.destroyed)return;n(this,vs).get(s.pageIndex)._startRenderPage(s.transparency,s.cacheKey)}),t.on("commonobj",([s,i,r])=>{var a;if(this.destroyed||this.commonObjs.has(s))return null;switch(i){case"Font":if("error"in r){const c=r.error;z(`Error during font loading: ${c}`),this.commonObjs.resolve(s,c);break}const o=this._params.pdfBug&&((a=globalThis.FontInspector)!=null&&a.enabled)?(c,f)=>globalThis.FontInspector.fontAdded(c,f):null,l=new oy(r,o);this.fontLoader.bind(l).catch(()=>t.sendWithPromise("FontFallback",{id:s})).finally(()=>{!l.fontExtraProperties&&l.data&&(l.data=null),this.commonObjs.resolve(s,l)});break;case"CopyLocalImage":const{imageRef:h}=r;_t(h,"The imageRef must be defined.");for(const c of n(this,vs).values())for(const[,f]of c.objs)if((f==null?void 0:f.ref)===h)return f.dataLen?(this.commonObjs.resolve(s,structuredClone(f)),f.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(s,r);break;default:throw new Error(`Got unknown common object type ${i}`)}return null}),t.on("obj",([s,i,r,a])=>{var l;if(this.destroyed)return;const o=n(this,vs).get(i);if(!o.objs.has(s)){if(o._intentStates.size===0){(l=a==null?void 0:a.bitmap)==null||l.close();return}switch(r){case"Image":case"Pattern":o.objs.resolve(s,a);break;default:throw new Error(`Got unknown object type ${r}`)}}}),t.on("DocProgress",s=>{var i;this.destroyed||(i=e.onProgress)==null||i.call(e,{loaded:s.loaded,total:s.total})}),t.on("FetchBinaryData",async s=>{if(this.destroyed)throw new Error("Worker was destroyed.");const i=this[s.type];if(!i)throw new Error(`${s.type} not initialized, see the \`useWorkerFetch\` parameter.`);return i.fetch(s)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var s;this.annotationStorage.size<=0&&z("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:t,transfer:e}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:((s=this._fullReader)==null?void 0:s.filename)??null},e).finally(()=>{this.annotationStorage.resetModified()})}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));const e=t-1,s=n(this,yo).get(e);if(s)return s;const i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:e}).then(r=>{if(this.destroyed)throw new Error("Transport destroyed");r.refStr&&n(this,wo).set(r.refStr,t);const a=new iw(e,r,this,this._params.pdfBug);return n(this,vs).set(e,a),a});return n(this,yo).set(e,i),i}getPageIndex(t){return Gp(t)?this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:e})}getFieldObjects(){return b(this,Sr,kl).call(this,"GetFieldObjects")}hasJSActions(){return b(this,Sr,kl).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return typeof t!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getAnnotationsByType(t,e){return this.messageHandler.sendWithPromise("GetAnnotationsByType",{types:t,pageIndexesToSkip:e})}getDocJSActions(){return b(this,Sr,kl).call(this,"GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(t){return b(this,Sr,kl).call(this,"GetOptionalContentConfig").then(e=>new Fy(e,t))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const t="GetMetadata",e=n(this,ai).get(t);if(e)return e;const s=this.messageHandler.sendWithPromise(t,null).then(i=>{var r,a;return{info:i[0],metadata:i[1]?new Ly(i[1]):null,contentDispositionFilename:((r=this._fullReader)==null?void 0:r.filename)??null,contentLength:((a=this._fullReader)==null?void 0:a.contentLength)??null}});return n(this,ai).set(t,s),s}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(t=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const e of n(this,vs).values())if(!e.cleanup())throw new Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`);this.commonObjs.clear(),t||this.fontLoader.clear(),n(this,ai).clear(),this.filterFactory.destroy(!0),Nl.cleanup()}}cachedPageNumber(t){if(!Gp(t))return null;const e=t.gen===0?`${t.num}R`:`${t.num}R${t.gen}`;return n(this,wo).get(e)??null}}ai=new WeakMap,vs=new WeakMap,yo=new WeakMap,wo=new WeakMap,oi=new WeakMap,Sr=new WeakSet,kl=function(t,e=null){const s=n(this,ai).get(t);if(s)return s;const i=this.messageHandler.sendWithPromise(t,e);return n(this,ai).set(t,i),i};var an;class rw{constructor(t){d(this,an,null);k(this,"onContinue",null);k(this,"onError",null);p(this,an,t)}get promise(){return n(this,an).capability.promise}cancel(t=0){n(this,an).cancel(null,t)}get separateAnnots(){const{separateAnnots:t}=n(this,an).operatorList;if(!t)return!1;const{annotationCanvasMap:e}=n(this,an);return t.form||t.canvas&&(e==null?void 0:e.size)>0}}an=new WeakMap;var on,Er;const Nn=class Nn{constructor({callback:t,params:e,objs:s,commonObjs:i,annotationCanvasMap:r,operatorList:a,pageIndex:o,canvasFactory:l,filterFactory:h,useRequestAnimationFrame:c=!1,pdfBug:f=!1,pageColors:g=null,enableHWA:m=!1,filteredOperationIndexes:A=null}){d(this,on,null);this.callback=t,this.params=e,this.objs=s,this.commonObjs=i,this.annotationCanvasMap=r,this.operatorListIdx=null,this.operatorList=a,this._pageIndex=o,this.canvasFactory=l,this.filterFactory=h,this._pdfBug=f,this.pageColors=g,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=c===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new rw(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=e.canvas,this._canvasContext=e.canvas?null:e.canvasContext,this._enableHWA=m,this._dependencyTracker=e.dependencyTracker,this._filteredOperationIndexes=A}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:t=!1,optionalContentConfig:e}){var l,h;if(this.cancelled)return;if(this._canvas){if(n(Nn,Er).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");n(Nn,Er).add(this._canvas)}this._pdfBug&&((l=globalThis.StepperManager)!=null&&l.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{viewport:s,transform:i,background:r,dependencyTracker:a}=this.params,o=this._canvasContext||this._canvas.getContext("2d",{alpha:!1,willReadFrequently:!this._enableHWA});this.gfx=new _a(o,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:e},this.annotationCanvasMap,this.pageColors,a),this.gfx.beginDrawing({transform:i,viewport:s,transparency:t,background:r}),this.operatorListIdx=0,this.graphicsReady=!0,(h=this.graphicsReadyCallback)==null||h.call(this)}cancel(t=null,e=0){var s,i,r;this.running=!1,this.cancelled=!0,(s=this.gfx)==null||s.endDrawing(),n(this,on)&&(window.cancelAnimationFrame(n(this,on)),p(this,on,null)),n(Nn,Er).delete(this._canvas),t||(t=new $g(`Rendering cancelled, page ${this._pageIndex+1}`,e)),this.callback(t),(r=(i=this.task).onError)==null||r.call(i,t)}operatorListChanged(){var t;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(t=this.stepper)==null||t.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?p(this,on,window.requestAnimationFrame(()=>{p(this,on,null),this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper,this._filteredOperationIndexes),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),n(Nn,Er).delete(this._canvas),this.callback())))}};on=new WeakMap,Er=new WeakMap,d(Nn,Er,new WeakSet);let eg=Nn;const aw="5.4.149",ow="9e2e9e209";var Ae,Cr,vo,xt,tc,_o,li,ec,ln,Ze,sc,ic,sg,nc,ig,rc,ng,hi,Dn,ef,Rb,_s,xi;const ae=class ae{constructor({editor:t=null,uiManager:e=null}){d(this,ic);d(this,nc);d(this,rc);d(this,hi);d(this,ef);d(this,_s);d(this,Ae,null);d(this,Cr,null);d(this,vo,void 0);d(this,xt,null);d(this,tc,!1);d(this,_o,!1);d(this,li,null);d(this,ec,void 0);d(this,ln,null);d(this,Ze,null);var s,i;t?(p(this,_o,!1),p(this,li,t)):p(this,_o,!0),p(this,Ze,(t==null?void 0:t._uiManager)||e),p(this,ec,n(this,Ze)._eventBus),p(this,vo,((s=t==null?void 0:t.color)==null?void 0:s.toUpperCase())||((i=n(this,Ze))==null?void 0:i.highlightColors.values().next().value)||"#FFFF98"),n(ae,sc)||p(ae,sc,Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"}))}static get _keyboardManager(){return V(this,"_keyboardManager",new hd([[["Escape","mac+Escape"],ae.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],ae.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],ae.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],ae.prototype._moveToPrevious],[["Home","mac+Home"],ae.prototype._moveToBeginning],[["End","mac+End"],ae.prototype._moveToEnd]]))}renderButton(){const t=p(this,Ae,document.createElement("button"));t.className="colorPicker",t.tabIndex="0",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),t.ariaHasPopup="true",n(this,li)&&(t.ariaControls=`${n(this,li).id}_colorpicker_dropdown`);const e=n(this,Ze)._signal;t.addEventListener("click",b(this,hi,Dn).bind(this),{signal:e}),t.addEventListener("keydown",b(this,rc,ng).bind(this),{signal:e});const s=p(this,Cr,document.createElement("span"));return s.className="swatch",s.ariaHidden="true",s.style.backgroundColor=n(this,vo),t.append(s),t}renderMainDropdown(){const t=p(this,xt,b(this,ic,sg).call(this));return t.ariaOrientation="horizontal",t.ariaLabelledBy="highlightColorPickerLabel",t}_colorSelectFromKeyboard(t){if(t.target===n(this,Ae)){b(this,hi,Dn).call(this,t);return}const e=t.target.getAttribute("data-color");e&&b(this,nc,ig).call(this,e,t)}_moveToNext(t){var e,s;if(!n(this,_s,xi)){b(this,hi,Dn).call(this,t);return}if(t.target===n(this,Ae)){(e=n(this,xt).firstChild)==null||e.focus();return}(s=t.target.nextSibling)==null||s.focus()}_moveToPrevious(t){var e,s;if(t.target===((e=n(this,xt))==null?void 0:e.firstChild)||t.target===n(this,Ae)){n(this,_s,xi)&&this._hideDropdownFromKeyboard();return}n(this,_s,xi)||b(this,hi,Dn).call(this,t),(s=t.target.previousSibling)==null||s.focus()}_moveToBeginning(t){var e;if(!n(this,_s,xi)){b(this,hi,Dn).call(this,t);return}(e=n(this,xt).firstChild)==null||e.focus()}_moveToEnd(t){var e;if(!n(this,_s,xi)){b(this,hi,Dn).call(this,t);return}(e=n(this,xt).lastChild)==null||e.focus()}hideDropdown(){var t,e;(t=n(this,xt))==null||t.classList.add("hidden"),n(this,Ae).ariaExpanded="false",(e=n(this,ln))==null||e.abort(),p(this,ln,null)}_hideDropdownFromKeyboard(){var t;if(!n(this,_o)){if(!n(this,_s,xi)){(t=n(this,li))==null||t.unselect();return}this.hideDropdown(),n(this,Ae).focus({preventScroll:!0,focusVisible:n(this,tc)})}}updateColor(t){if(n(this,Cr)&&(n(this,Cr).style.backgroundColor=t),!n(this,xt))return;const e=n(this,Ze).highlightColors.values();for(const s of n(this,xt).children)s.ariaSelected=e.next().value===t.toUpperCase()}destroy(){var t,e;(t=n(this,Ae))==null||t.remove(),p(this,Ae,null),p(this,Cr,null),(e=n(this,xt))==null||e.remove(),p(this,xt,null)}};Ae=new WeakMap,Cr=new WeakMap,vo=new WeakMap,xt=new WeakMap,tc=new WeakMap,_o=new WeakMap,li=new WeakMap,ec=new WeakMap,ln=new WeakMap,Ze=new WeakMap,sc=new WeakMap,ic=new WeakSet,sg=function(){const t=document.createElement("div"),e=n(this,Ze)._signal;t.addEventListener("contextmenu",je,{signal:e}),t.className="dropdown",t.role="listbox",t.ariaMultiSelectable="false",t.ariaOrientation="vertical",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown"),n(this,li)&&(t.id=`${n(this,li).id}_colorpicker_dropdown`);for(const[s,i]of n(this,Ze).highlightColors){const r=document.createElement("button");r.tabIndex="0",r.role="option",r.setAttribute("data-color",i),r.title=s,r.setAttribute("data-l10n-id",n(ae,sc)[s]);const a=document.createElement("span");r.append(a),a.className="swatch",a.style.backgroundColor=i,r.ariaSelected=i===n(this,vo),r.addEventListener("click",b(this,nc,ig).bind(this,i),{signal:e}),t.append(r)}return t.addEventListener("keydown",b(this,rc,ng).bind(this),{signal:e}),t},nc=new WeakSet,ig=function(t,e){e.stopPropagation(),n(this,ec).dispatch("switchannotationeditorparams",{source:this,type:X.HIGHLIGHT_COLOR,value:t}),this.updateColor(t)},rc=new WeakSet,ng=function(t){ae._keyboardManager.exec(this,t)},hi=new WeakSet,Dn=function(t){if(n(this,_s,xi)){this.hideDropdown();return}if(p(this,tc,t.detail===0),n(this,ln)||(p(this,ln,new AbortController),window.addEventListener("pointerdown",b(this,ef,Rb).bind(this),{signal:n(this,Ze).combinedSignal(n(this,ln))})),n(this,Ae).ariaExpanded="true",n(this,xt)){n(this,xt).classList.remove("hidden");return}const e=p(this,xt,b(this,ic,sg).call(this));n(this,Ae).append(e)},ef=new WeakSet,Rb=function(t){var e;(e=n(this,xt))!=null&&e.contains(t.target)||this.hideDropdown()},_s=new WeakSet,xi=function(){return n(this,xt)&&!n(this,xt).classList.contains("hidden")},d(ae,sc,null);let eu=ae;var Ss,ac,So,oc;const On=class On{constructor(t){d(this,Ss,null);d(this,ac,null);d(this,So,null);p(this,ac,t),p(this,So,t._uiManager),n(On,oc)||p(On,oc,Object.freeze({freetext:"pdfjs-editor-color-picker-free-text-input",ink:"pdfjs-editor-color-picker-ink-input"}))}renderButton(){if(n(this,Ss))return n(this,Ss);const{editorType:t,colorType:e,colorValue:s}=n(this,ac),i=p(this,Ss,document.createElement("input"));return i.type="color",i.value=s||"#000000",i.className="basicColorPicker",i.tabIndex=0,i.setAttribute("data-l10n-id",n(On,oc)[t]),i.addEventListener("input",()=>{n(this,So).updateParams(e,i.value)},{signal:n(this,So)._signal}),i}update(t){n(this,Ss)&&(n(this,Ss).value=t)}destroy(){var t;(t=n(this,Ss))==null||t.remove(),p(this,Ss,null)}hideDropdown(){}};Ss=new WeakMap,ac=new WeakMap,So=new WeakMap,oc=new WeakMap,d(On,oc,null);let su=On;function wm(u){return Math.floor(Math.max(0,Math.min(1,u))*255).toString(16).padStart(2,"0")}function fl(u){return Math.max(0,Math.min(255,255*u))}class vm{static CMYK_G([t,e,s,i]){return["G",1-Math.min(1,.3*t+.59*s+.11*e+i)]}static G_CMYK([t]){return["CMYK",0,0,0,1-t]}static G_RGB([t]){return["RGB",t,t,t]}static G_rgb([t]){return t=fl(t),[t,t,t]}static G_HTML([t]){const e=wm(t);return`#${e}${e}${e}`}static RGB_G([t,e,s]){return["G",.3*t+.59*e+.11*s]}static RGB_rgb(t){return t.map(fl)}static RGB_HTML(t){return`#${t.map(wm).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([t,e,s,i]){return["RGB",1-Math.min(1,t+i),1-Math.min(1,s+i),1-Math.min(1,e+i)]}static CMYK_rgb([t,e,s,i]){return[fl(1-Math.min(1,t+i)),fl(1-Math.min(1,s+i)),fl(1-Math.min(1,e+i))]}static CMYK_HTML(t){const e=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(e)}static RGB_CMYK([t,e,s]){const i=1-t,r=1-e,a=1-s,o=Math.min(i,r,a);return["CMYK",i,r,a,o]}}class lw{create(t,e,s=!1){if(t<=0||e<=0)throw new Error("Invalid SVG dimensions");const i=this._createSVG("svg:svg");return i.setAttribute("version","1.1"),s||(i.setAttribute("width",`${t}px`),i.setAttribute("height",`${e}px`)),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("viewBox",`0 0 ${t} ${e}`),i}createElement(t){if(typeof t!="string")throw new Error("Invalid SVG element type");return this._createSVG(t)}_createSVG(t){st("Abstract method `_createSVG` called.")}}class iu extends lw{_createSVG(t){return document.createElementNS(Is,t)}}class Db{static setupStorage(t,e,s,i,r){const a=i.getValue(e,{value:null});switch(s.name){case"textarea":if(a.value!==null&&(t.textContent=a.value),r==="print")break;t.addEventListener("input",o=>{i.setValue(e,{value:o.target.value})});break;case"input":if(s.attributes.type==="radio"||s.attributes.type==="checkbox"){if(a.value===s.attributes.xfaOn?t.setAttribute("checked",!0):a.value===s.attributes.xfaOff&&t.removeAttribute("checked"),r==="print")break;t.addEventListener("change",o=>{i.setValue(e,{value:o.target.checked?o.target.getAttribute("xfaOn"):o.target.getAttribute("xfaOff")})})}else{if(a.value!==null&&t.setAttribute("value",a.value),r==="print")break;t.addEventListener("input",o=>{i.setValue(e,{value:o.target.value})})}break;case"select":if(a.value!==null){t.setAttribute("value",a.value);for(const o of s.children)o.attributes.value===a.value?o.attributes.selected=!0:o.attributes.hasOwnProperty("selected")&&delete o.attributes.selected}t.addEventListener("input",o=>{const l=o.target.options,h=l.selectedIndex===-1?"":l[l.selectedIndex].value;i.setValue(e,{value:h})});break}}static setAttributes({html:t,element:e,storage:s=null,intent:i,linkService:r}){const{attributes:a}=e,o=t instanceof HTMLAnchorElement;a.type==="radio"&&(a.name=`${a.name}-${i}`);for(const[l,h]of Object.entries(a))if(h!=null)switch(l){case"class":h.length&&t.setAttribute(l,h.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",h);break;case"style":Object.assign(t.style,h);break;case"textContent":t.textContent=h;break;default:(!o||l!=="href"&&l!=="newWindow")&&t.setAttribute(l,h)}o&&r.addLinkAttributes(t,a.href,a.newWindow),s&&a.dataId&&this.setupStorage(t,a.dataId,e,s)}static render(t){var f,g;const e=t.annotationStorage,s=t.linkService,i=t.xfaHtml,r=t.intent||"display",a=document.createElement(i.name);i.attributes&&this.setAttributes({html:a,element:i,intent:r,linkService:s});const o=r!=="richText",l=t.div;if(l.append(a),t.viewport){const m=`matrix(${t.viewport.transform.join(",")})`;l.style.transform=m}o&&l.setAttribute("class","xfaLayer xfaFont");const h=[];if(i.children.length===0){if(i.value){const m=document.createTextNode(i.value);a.append(m),o&&Ol.shouldBuildText(i.name)&&h.push(m)}return{textDivs:h}}const c=[[i,-1,a]];for(;c.length>0;){const[m,A,y]=c.at(-1);if(A+1===m.children.length){c.pop();continue}const v=m.children[++c.at(-1)[1]];if(v===null)continue;const{name:w}=v;if(w==="#text"){const _=document.createTextNode(v.value);h.push(_),y.append(_);continue}const S=(f=v==null?void 0:v.attributes)!=null&&f.xmlns?document.createElementNS(v.attributes.xmlns,w):document.createElement(w);if(y.append(S),v.attributes&&this.setAttributes({html:S,element:v,storage:e,intent:r,linkService:s}),((g=v.children)==null?void 0:g.length)>0)c.push([v,-1,S]);else if(v.value){const _=document.createTextNode(v.value);o&&Ol.shouldBuildText(w)&&h.push(_),S.append(_)}}for(const m of l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))m.setAttribute("readOnly",!0);return{textDivs:h}}static update(t){const e=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=e,t.div.hidden=!1}}const hw=9,oa=new WeakSet,cw=new Date().getTimezoneOffset()*60*1e3;class _m{static create(t){switch(t.data.annotationType){case wt.LINK:return new Vg(t);case wt.TEXT:return new dw(t);case wt.WIDGET:switch(t.data.fieldType){case"Tx":return new uw(t);case"Btn":return t.data.radioButton?new Nb(t):t.data.checkBox?new pw(t):new gw(t);case"Ch":return new mw(t);case"Sig":return new fw(t)}return new ha(t);case wt.POPUP:return new ag(t);case wt.FREETEXT:return new Ub(t);case wt.LINE:return new Aw(t);case wt.SQUARE:return new yw(t);case wt.CIRCLE:return new ww(t);case wt.POLYLINE:return new jb(t);case wt.CARET:return new _w(t);case wt.INK:return new Wg(t);case wt.POLYGON:return new vw(t);case wt.HIGHLIGHT:return new Vb(t);case wt.UNDERLINE:return new Sw(t);case wt.SQUIGGLY:return new Ew(t);case wt.STRIKEOUT:return new Cw(t);case wt.STAMP:return new Wb(t);case wt.FILEATTACHMENT:return new Tw(t);default:return new bt(t)}}}var Tr,Eo,ci,sf,Lb,lc,rg;const Zg=class Zg{constructor(t,{isRenderable:e=!1,ignoreBorder:s=!1,createQuadrilaterals:i=!1}={}){d(this,sf);d(this,lc);d(this,Tr,null);d(this,Eo,!1);d(this,ci,null);this.isRenderable=e,this.data=t.data,this.layer=t.layer,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableComment=t.enableComment,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this.parent=t.parent,e&&(this.container=this._createContainer(s)),i&&this._createQuadrilaterals()}static _hasPopupData({contentsObj:t,richText:e}){return!!(t!=null&&t.str||e!=null&&e.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return Zg._hasPopupData(this.data)}get hasCommentButton(){return this.enableComment&&this._isEditable&&this.hasPopupElement}get commentButtonPosition(){const{quadPoints:t,rect:e}=this.data;let s=-1/0,i=-1/0;if((t==null?void 0:t.length)>=8){for(let r=0;ri?(i=t[r+1],s=t[r+2]):t[r+1]===i&&(s=Math.max(s,t[r+2]));return[s,i]}return e?[e[2],e[3]]:null}get commentButtonColor(){if(!this.data.color)return null;const[t,e,s]=this.data.color,r=255*(1-(this.data.opacity??1));return b(this,sf,Lb).call(this,Math.min(t+r,255),Math.min(e+r,255),Math.min(s+r,255))}_normalizePoint(t){const{page:{view:e},viewport:{rawDims:{pageWidth:s,pageHeight:i,pageX:r,pageY:a}}}=this.parent;return t[1]=e[3]-t[1]+e[1],t[0]=100*(t[0]-r)/s,t[1]=100*(t[1]-a)/i,t}updateEdited(t){var r;if(!this.container)return;t.rect&&(n(this,Tr)||p(this,Tr,{rect:this.data.rect.slice(0)}));const{rect:e,popup:s}=t;e&&b(this,lc,rg).call(this,e);let i=((r=n(this,ci))==null?void 0:r.popup)||this.popup;!i&&(s!=null&&s.text)&&(this._createPopup(s),i=n(this,ci).popup),i&&(i.updateEdited(t),s!=null&&s.deleted&&(i.remove(),p(this,ci,null),this.popup=null))}resetEdited(){var t;n(this,Tr)&&(b(this,lc,rg).call(this,n(this,Tr).rect),(t=n(this,ci))==null||t.popup.resetEdited(),p(this,Tr,null))}_createContainer(t){const{data:e,parent:{page:s,viewport:i}}=this,r=document.createElement("section");r.setAttribute("data-annotation-id",e.id),!(this instanceof ha)&&!(this instanceof Vg)&&(r.tabIndex=0);const{style:a}=r;if(a.zIndex=this.parent.zIndex,this.parent.zIndex+=2,e.alternativeText&&(r.title=e.alternativeText),e.noRotate&&r.classList.add("norotate"),!e.rect||this instanceof ag){const{rotation:y}=e;return!e.hasOwnCanvas&&y!==0&&this.setRotation(y,r),r}const{width:o,height:l}=this;if(!t&&e.borderStyle.width>0){a.borderWidth=`${e.borderStyle.width}px`;const y=e.borderStyle.horizontalCornerRadius,v=e.borderStyle.verticalCornerRadius;if(y>0||v>0){const S=`calc(${y}px * var(--total-scale-factor)) / calc(${v}px * var(--total-scale-factor))`;a.borderRadius=S}else if(this instanceof Nb){const S=`calc(${o}px * var(--total-scale-factor)) / calc(${l}px * var(--total-scale-factor))`;a.borderRadius=S}switch(e.borderStyle.style){case da.SOLID:a.borderStyle="solid";break;case da.DASHED:a.borderStyle="dashed";break;case da.BEVELED:z("Unimplemented border style: beveled");break;case da.INSET:z("Unimplemented border style: inset");break;case da.UNDERLINE:a.borderBottomStyle="solid";break}const w=e.borderColor||null;w?(p(this,Eo,!0),a.borderColor=I.makeHexColor(w[0]|0,w[1]|0,w[2]|0)):a.borderWidth=0}const h=I.normalizeRect([e.rect[0],s.view[3]-e.rect[1]+s.view[1],e.rect[2],s.view[3]-e.rect[3]+s.view[1]]),{pageWidth:c,pageHeight:f,pageX:g,pageY:m}=i.rawDims;a.left=`${100*(h[0]-g)/c}%`,a.top=`${100*(h[1]-m)/f}%`;const{rotation:A}=e;return e.hasOwnCanvas||A===0?(a.width=`${100*o/c}%`,a.height=`${100*l/f}%`):this.setRotation(A,r),r}setRotation(t,e=this.container){if(!this.data.rect)return;const{pageWidth:s,pageHeight:i}=this.parent.viewport.rawDims;let{width:r,height:a}=this;t%180!==0&&([r,a]=[a,r]),e.style.width=`${100*r/s}%`,e.style.height=`${100*a/i}%`,e.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){const t=(e,s,i)=>{const r=i.detail[e],a=r[0],o=r.slice(1);i.target.style[s]=vm[`${a}_HTML`](o),this.annotationStorage.setValue(this.data.id,{[s]:vm[`${a}_rgb`](o)})};return V(this,"_commonActions",{display:e=>{const{display:s}=e.detail,i=s%2===1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:s===1||s===2})},print:e=>{this.annotationStorage.setValue(this.data.id,{noPrint:!e.detail.print})},hidden:e=>{const{hidden:s}=e.detail;this.container.style.visibility=s?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:s,noView:s})},focus:e=>{setTimeout(()=>e.target.focus({preventScroll:!1}),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.target.disabled=e.detail.readonly},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:e=>{t("bgColor","backgroundColor",e)},fillColor:e=>{t("fillColor","backgroundColor",e)},fgColor:e=>{t("fgColor","color",e)},textColor:e=>{t("textColor","color",e)},borderColor:e=>{t("borderColor","borderColor",e)},strokeColor:e=>{t("strokeColor","borderColor",e)},rotation:e=>{const s=e.detail.rotation;this.setRotation(s),this.annotationStorage.setValue(this.data.id,{rotation:s})}})}_dispatchEventFromSandbox(t,e){const s=this._commonActions;for(const i of Object.keys(e.detail)){const r=t[i]||s[i];r==null||r(e)}}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;const e=this.annotationStorage.getRawValue(this.data.id);if(!e)return;const s=this._commonActions;for(const[i,r]of Object.entries(e)){const a=s[i];if(a){const o={detail:{[i]:r},target:t};a(o),delete e[i]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:t}=this.data;if(!t)return;const[e,s,i,r]=this.data.rect.map(y=>Math.fround(y));if(t.length===8){const[y,v,w,S]=t.subarray(2,6);if(i===y&&r===v&&e===w&&s===S)return}const{style:a}=this.container;let o;if(n(this,Eo)){const{borderColor:y,borderWidth:v}=a;a.borderWidth=0,o=["url('data:image/svg+xml;utf8,",'',``],this.container.classList.add("hasBorder")}const l=i-e,h=r-s,{svgFactory:c}=this,f=c.createElement("svg");f.classList.add("quadrilateralsContainer"),f.setAttribute("width",0),f.setAttribute("height",0),f.role="none";const g=c.createElement("defs");f.append(g);const m=c.createElement("clipPath"),A=`clippath_${this.data.id}`;m.setAttribute("id",A),m.setAttribute("clipPathUnits","objectBoundingBox"),g.append(m);for(let y=2,v=t.length;y`)}n(this,Eo)&&(o.push("')"),a.backgroundImage=o.join("")),this.container.append(f),this.container.style.clipPath=`url(#${A})`}_createPopup(t=null){const{data:e}=this;let s,i;t?(s={str:t.text},i=t.date):(s=e.contentsObj,i=e.modificationDate);const r=p(this,ci,new ag({data:{color:e.color,titleObj:e.titleObj,modificationDate:i,contentsObj:s,richText:e.richText,parentRect:e.rect,borderStyle:0,id:`popup_${e.id}`,rotation:e.rotation,noRotate:!0},linkService:this.linkService,parent:this.parent,elements:[this]}));this.parent.div.append(r.render())}get hasPopupElement(){return!!(n(this,ci)||this.popup||this.data.popupRef)}render(){st("Abstract method `AnnotationElement.render` called")}_getElementsByName(t,e=null){const s=[];if(this._fieldObjects){const i=this._fieldObjects[t];if(i)for(const{page:r,id:a,exportValues:o}of i){if(r===-1||a===e)continue;const l=typeof o=="string"?o:null,h=document.querySelector(`[data-element-id="${a}"]`);if(h&&!oa.has(h)){z(`_getElementsByName - element not allowed: ${a}`);continue}s.push({id:a,exportValue:l,domElement:h})}return s}for(const i of document.getElementsByName(t)){const{exportValue:r}=i,a=i.getAttribute("data-element-id");a!==e&&oa.has(i)&&s.push({id:a,exportValue:r,domElement:i})}return s}show(){var t;this.container&&(this.container.hidden=!1),(t=this.popup)==null||t.maybeShow()}hide(){var t;this.container&&(this.container.hidden=!0),(t=this.popup)==null||t.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(const e of t)e.classList.add("highlightArea");else t.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:t,data:{id:e}}=this;this.container.addEventListener("dblclick",()=>{var s;(s=this.linkService.eventBus)==null||s.dispatch("switchannotationeditormode",{source:this,mode:t,editId:e,mustEnterInEditMode:!0})})}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}};Tr=new WeakMap,Eo=new WeakMap,ci=new WeakMap,sf=new WeakSet,Lb=function(t,e,s){t/=255,e/=255,s/=255;const i=Math.max(t,e,s),r=Math.min(t,e,s),a=(i+r)/2,o=((1+Math.sqrt(a))/2*100).toFixed(2);if(i===r)return`hsl(0, 0%, ${o}%)`;const l=i-r;let h;i===t?h=(e-s)/l+(e(s&&this.linkService.goToDestination(s),!1),(s||s==="")&&b(this,di,Ln).call(this),i&&(e.title=i)}_bindNamedAction(e,s,i=""){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(s),!1),i&&(e.title=i),b(this,di,Ln).call(this)}_bindJSAction(e,s){e.href=this.linkService.getAnchorUrl("");const i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const r of Object.keys(s.actions)){const a=i.get(r);a&&(e[a]=()=>{var o;return(o=this.linkService.eventBus)==null||o.dispatch("dispatcheventinsandbox",{source:this,detail:{id:s.id,name:r}}),!1})}s.overlaidText&&(e.title=s.overlaidText),e.onclick||(e.onclick=()=>!1),b(this,di,Ln).call(this)}_bindResetFormAction(e,s){const i=e.onclick;if(i||(e.href=this.linkService.getAnchorUrl("")),b(this,di,Ln).call(this),!this._fieldObjects){z('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),i||(e.onclick=()=>!1);return}e.onclick=()=>{var f;i==null||i();const{fields:r,refs:a,include:o}=s,l=[];if(r.length!==0||a.length!==0){const g=new Set(a);for(const m of r){const A=this._fieldObjects[m]||[];for(const{id:y}of A)g.add(y)}for(const m of Object.values(this._fieldObjects))for(const A of m)g.has(A.id)===o&&l.push(A)}else for(const g of Object.values(this._fieldObjects))l.push(...g);const h=this.annotationStorage,c=[];for(const g of l){const{id:m}=g;switch(c.push(m),g.type){case"text":{const y=g.defaultValue||"";h.setValue(m,{value:y});break}case"checkbox":case"radiobutton":{const y=g.defaultValue===g.exportValues;h.setValue(m,{value:y});break}case"combobox":case"listbox":{const y=g.defaultValue||"";h.setValue(m,{value:y});break}default:continue}const A=document.querySelector(`[data-element-id="${m}"]`);if(A){if(!oa.has(A)){z(`_bindResetFormAction - element not allowed: ${m}`);continue}}else continue;A.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((f=this.linkService.eventBus)==null||f.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:c,name:"ResetForm"}})),!1}}}di=new WeakSet,Ln=function(){this.container.setAttribute("data-internal-link","")},nf=new WeakSet,Ib=function(e,s,i="",r=null){e.href=this.linkService.getAnchorUrl(""),s.description?e.title=s.description:i&&(e.title=i),e.onclick=()=>{var a;return(a=this.downloadManager)==null||a.openOrDownloadData(s.content,s.filename,r),!1},b(this,di,Ln).call(this)},rf=new WeakSet,Fb=function(e,s,i=""){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(s),!1),i&&(e.title=i),b(this,di,Ln).call(this)};class dw extends bt{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(t),this.container}}class ha extends bt{render(){return this.container}showElementAndHideCanvas(t){var e;this.data.hasOwnCanvas&&(((e=t.previousSibling)==null?void 0:e.nodeName)==="CANVAS"&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){return Wt.platform.isMac?t.metaKey:t.ctrlKey}_setEventListener(t,e,s,i,r){s.includes("mouse")?t.addEventListener(s,a=>{var o;(o=this.linkService.eventBus)==null||o.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:r(a),shift:a.shiftKey,modifier:this._getKeyModifier(a)}})}):t.addEventListener(s,a=>{var o;if(s==="blur"){if(!e.focused||!a.relatedTarget)return;e.focused=!1}else if(s==="focus"){if(e.focused)return;e.focused=!0}r&&((o=this.linkService.eventBus)==null||o.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:r(a)}}))})}_setEventListeners(t,e,s,i){var r,a,o;for(const[l,h]of s)(h==="Action"||(r=this.data.actions)!=null&&r[h])&&((h==="Focus"||h==="Blur")&&(e||(e={focused:!1})),this._setEventListener(t,e,l,h,i),h==="Focus"&&!((a=this.data.actions)!=null&&a.Blur)?this._setEventListener(t,e,"blur","Blur",null):h==="Blur"&&!((o=this.data.actions)!=null&&o.Focus)&&this._setEventListener(t,e,"focus","Focus",null))}_setBackgroundColor(t){const e=this.data.backgroundColor||null;t.style.backgroundColor=e===null?"transparent":I.makeHexColor(e[0],e[1],e[2])}_setTextStyle(t){const e=["left","center","right"],{fontColor:s}=this.data.defaultAppearanceData,i=this.data.defaultAppearanceData.fontSize||hw,r=t.style;let a;const o=2,l=h=>Math.round(10*h)/10;if(this.data.multiLine){const h=Math.abs(this.data.rect[3]-this.data.rect[1]-o),c=Math.round(h/(up*i))||1,f=h/c;a=Math.min(i,l(f/up))}else{const h=Math.abs(this.data.rect[3]-this.data.rect[1]-o);a=Math.min(i,l(h/up))}r.fontSize=`calc(${a}px * var(--total-scale-factor))`,r.color=I.makeHexColor(s[0],s[1],s[2]),this.data.textAlignment!==null&&(r.textAlign=e[this.data.textAlignment])}_setRequired(t,e){e?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",e)}}class uw extends ha{constructor(t){const e=t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue;super(t,{isRenderable:e})}setPropertyOnSiblings(t,e,s,i){const r=this.annotationStorage;for(const a of this._getElementsByName(t.name,t.id))a.domElement&&(a.domElement[e]=s),r.setValue(a.id,{[i]:s})}render(){var i,r;const t=this.annotationStorage,e=this.data.id;this.container.classList.add("textWidgetAnnotation");let s=null;if(this.renderForms){const a=t.getValue(e,{value:this.data.fieldValue});let o=a.value||"";const l=t.getValue(e,{charLimit:this.data.maxLen}).charLimit;l&&o.length>l&&(o=o.slice(0,l));let h=a.formattedValue||((i=this.data.textContent)==null?void 0:i.join(` `))||null;h&&this.data.comb&&(h=h.replaceAll(/\s+/g,""));const c={userValue:o,formattedValue:h,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(s=document.createElement("textarea"),s.textContent=h??o,this.data.doNotScroll&&(s.style.overflowY="hidden")):(s=document.createElement("input"),s.type=this.data.password?"password":"text",s.setAttribute("value",h??o),this.data.doNotScroll&&(s.style.overflowX="hidden")),this.data.hasOwnCanvas&&(s.hidden=!0),oa.add(s),s.setAttribute("data-element-id",e),s.disabled=this.data.readOnly,s.name=this.data.fieldName,s.tabIndex=0;const{datetimeFormat:f,datetimeType:g,timeStep:m}=this.data,A=!!g&&this.enableScripting;f&&(s.title=f),this._setRequired(s,this.data.required),l&&(s.maxLength=l),s.addEventListener("input",v=>{t.setValue(e,{value:v.target.value}),this.setPropertyOnSiblings(s,"value",v.target.value,"value"),c.formattedValue=null}),s.addEventListener("resetform",v=>{const w=this.data.defaultFieldValue??"";s.value=c.userValue=w,c.formattedValue=null});let y=v=>{const{formattedValue:w}=c;w!=null&&(v.target.value=w),v.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){s.addEventListener("focus",w=>{var _;if(c.focused)return;const{target:S}=w;if(A&&(S.type=g,m&&(S.step=m)),c.userValue){const E=c.userValue;if(A)if(g==="time"){const C=new Date(E),T=[C.getHours(),C.getMinutes(),C.getSeconds()];S.value=T.map(x=>x.toString().padStart(2,"0")).join(":")}else S.value=new Date(E-cw).toISOString().split(g==="date"?"T":".",1)[0];else S.value=E}c.lastCommittedValue=S.value,c.commitKey=1,(_=this.data.actions)!=null&&_.Focus||(c.focused=!0)}),s.addEventListener("updatefromsandbox",w=>{this.showElementAndHideCanvas(w.target);const S={value(_){c.userValue=_.detail.value??"",A||t.setValue(e,{value:c.userValue.toString()}),_.target.value=c.userValue},formattedValue(_){const{formattedValue:E}=_.detail;c.formattedValue=E,E!=null&&_.target!==document.activeElement&&(_.target.value=E);const C={formattedValue:E};A&&(C.value=E),t.setValue(e,C)},selRange(_){_.target.setSelectionRange(..._.detail.selRange)},charLimit:_=>{var x;const{charLimit:E}=_.detail,{target:C}=_;if(E===0){C.removeAttribute("maxLength");return}C.setAttribute("maxLength",E);let T=c.userValue;!T||T.length<=E||(T=T.slice(0,E),C.value=c.userValue=T,t.setValue(e,{value:T}),(x=this.linkService.eventBus)==null||x.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:T,willCommit:!0,commitKey:1,selStart:C.selectionStart,selEnd:C.selectionEnd}}))}};this._dispatchEventFromSandbox(S,w)}),s.addEventListener("keydown",w=>{var E;c.commitKey=1;let S=-1;if(w.key==="Escape"?S=0:w.key==="Enter"&&!this.data.multiLine?S=2:w.key==="Tab"&&(c.commitKey=3),S===-1)return;const{value:_}=w.target;c.lastCommittedValue!==_&&(c.lastCommittedValue=_,c.userValue=_,(E=this.linkService.eventBus)==null||E.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:_,willCommit:!0,commitKey:S,selStart:w.target.selectionStart,selEnd:w.target.selectionEnd}}))});const v=y;y=null,s.addEventListener("blur",w=>{var E,C;if(!c.focused||!w.relatedTarget)return;(E=this.data.actions)!=null&&E.Blur||(c.focused=!1);const{target:S}=w;let{value:_}=S;if(A){if(_&&g==="time"){const T=_.split(":").map(x=>parseInt(x,10));_=new Date(2e3,0,1,T[0],T[1],T[2]||0).valueOf(),S.step=""}else _=new Date(_).valueOf();S.type="text"}c.userValue=_,c.lastCommittedValue!==_&&((C=this.linkService.eventBus)==null||C.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:_,willCommit:!0,commitKey:c.commitKey,selStart:w.target.selectionStart,selEnd:w.target.selectionEnd}})),v(w)}),(r=this.data.actions)!=null&&r.Keystroke&&s.addEventListener("beforeinput",w=>{var M;c.lastCommittedValue=null;const{data:S,target:_}=w,{value:E,selectionStart:C,selectionEnd:T}=_;let x=C,P=T;switch(w.inputType){case"deleteWordBackward":{const D=E.substring(0,C).match(/\w*[^\w]*$/);D&&(x-=D[0].length);break}case"deleteWordForward":{const D=E.substring(C).match(/^[^\w]*\w*/);D&&(P+=D[0].length);break}case"deleteContentBackward":C===T&&(x-=1);break;case"deleteContentForward":C===T&&(P+=1);break}w.preventDefault(),(M=this.linkService.eventBus)==null||M.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:E,change:S||"",willCommit:!1,selStart:x,selEnd:P}})}),this._setEventListeners(s,c,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],w=>w.target.value)}if(y&&s.addEventListener("blur",y),this.data.comb){const w=(this.data.rect[2]-this.data.rect[0])/l;s.classList.add("comb"),s.style.letterSpacing=`calc(${w}px * var(--total-scale-factor) - 1ch)`}}else s=document.createElement("div"),s.textContent=this.data.fieldValue,s.style.verticalAlign="middle",s.style.display="table-cell",this.data.hasOwnCanvas&&(s.hidden=!0);return this._setTextStyle(s),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class fw extends ha{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class pw extends ha{constructor(t){super(t,{isRenderable:t.renderForms})}render(){const t=this.annotationStorage,e=this.data,s=e.id;let i=t.getValue(s,{value:e.exportValue===e.fieldValue}).value;typeof i=="string"&&(i=i!=="Off",t.setValue(s,{value:i})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const r=document.createElement("input");return oa.add(r),r.setAttribute("data-element-id",s),r.disabled=e.readOnly,this._setRequired(r,this.data.required),r.type="checkbox",r.name=e.fieldName,i&&r.setAttribute("checked",!0),r.setAttribute("exportValue",e.exportValue),r.tabIndex=0,r.addEventListener("change",a=>{const{name:o,checked:l}=a.target;for(const h of this._getElementsByName(o,s)){const c=l&&h.exportValue===e.exportValue;h.domElement&&(h.domElement.checked=c),t.setValue(h.id,{value:c})}t.setValue(s,{value:l})}),r.addEventListener("resetform",a=>{const o=e.defaultFieldValue||"Off";a.target.checked=o===e.exportValue}),this.enableScripting&&this.hasJSActions&&(r.addEventListener("updatefromsandbox",a=>{const o={value(l){l.target.checked=l.detail.value!=="Off",t.setValue(s,{value:l.target.checked})}};this._dispatchEventFromSandbox(o,a)}),this._setEventListeners(r,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],a=>a.target.checked)),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class Nb extends ha{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const t=this.annotationStorage,e=this.data,s=e.id;let i=t.getValue(s,{value:e.fieldValue===e.buttonValue}).value;if(typeof i=="string"&&(i=i!==e.buttonValue,t.setValue(s,{value:i})),i)for(const a of this._getElementsByName(e.fieldName,s))t.setValue(a.id,{value:!1});const r=document.createElement("input");if(oa.add(r),r.setAttribute("data-element-id",s),r.disabled=e.readOnly,this._setRequired(r,this.data.required),r.type="radio",r.name=e.fieldName,i&&r.setAttribute("checked",!0),r.tabIndex=0,r.addEventListener("change",a=>{const{name:o,checked:l}=a.target;for(const h of this._getElementsByName(o,s))t.setValue(h.id,{value:!1});t.setValue(s,{value:l})}),r.addEventListener("resetform",a=>{const o=e.defaultFieldValue;a.target.checked=o!=null&&o===e.buttonValue}),this.enableScripting&&this.hasJSActions){const a=e.buttonValue;r.addEventListener("updatefromsandbox",o=>{const l={value:h=>{const c=a===h.detail.value;for(const f of this._getElementsByName(h.target.name)){const g=c&&f.id===s;f.domElement&&(f.domElement.checked=g),t.setValue(f.id,{value:g})}}};this._dispatchEventFromSandbox(l,o)}),this._setEventListeners(r,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],o=>o.target.checked)}return this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class gw extends Vg{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){const t=super.render();t.classList.add("buttonWidgetAnnotation","pushButton");const e=t.lastChild;return this.enableScripting&&this.hasJSActions&&e&&(this._setDefaultPropertiesFromJS(e),e.addEventListener("updatefromsandbox",s=>{this._dispatchEventFromSandbox({},s)})),t}}class mw extends ha{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const t=this.annotationStorage,e=this.data.id,s=t.getValue(e,{value:this.data.fieldValue}),i=document.createElement("select");oa.add(i),i.setAttribute("data-element-id",e),i.disabled=this.data.readOnly,this._setRequired(i,this.data.required),i.name=this.data.fieldName,i.tabIndex=0;let r=this.data.combo&&this.data.options.length>0;this.data.combo||(i.size=this.data.options.length,this.data.multiSelect&&(i.multiple=!0)),i.addEventListener("resetform",c=>{const f=this.data.defaultFieldValue;for(const g of i.options)g.selected=g.value===f});for(const c of this.data.options){const f=document.createElement("option");f.textContent=c.displayValue,f.value=c.exportValue,s.value.includes(c.exportValue)&&(f.setAttribute("selected",!0),r=!1),i.append(f)}let a=null;if(r){const c=document.createElement("option");c.value=" ",c.setAttribute("hidden",!0),c.setAttribute("selected",!0),i.prepend(c),a=()=>{c.remove(),i.removeEventListener("input",a),a=null},i.addEventListener("input",a)}const o=c=>{const f=c?"value":"textContent",{options:g,multiple:m}=i;return m?Array.prototype.filter.call(g,A=>A.selected).map(A=>A[f]):g.selectedIndex===-1?null:g[g.selectedIndex][f]};let l=o(!1);const h=c=>{const f=c.target.options;return Array.prototype.map.call(f,g=>({displayValue:g.textContent,exportValue:g.value}))};return this.enableScripting&&this.hasJSActions?(i.addEventListener("updatefromsandbox",c=>{const f={value(g){a==null||a();const m=g.detail.value,A=new Set(Array.isArray(m)?m:[m]);for(const y of i.options)y.selected=A.has(y.value);t.setValue(e,{value:o(!0)}),l=o(!1)},multipleSelection(g){i.multiple=!0},remove(g){const m=i.options,A=g.detail.remove;m[A].selected=!1,i.remove(A),m.length>0&&Array.prototype.findIndex.call(m,v=>v.selected)===-1&&(m[0].selected=!0),t.setValue(e,{value:o(!0),items:h(g)}),l=o(!1)},clear(g){for(;i.length!==0;)i.remove(0);t.setValue(e,{value:null,items:[]}),l=o(!1)},insert(g){const{index:m,displayValue:A,exportValue:y}=g.detail.insert,v=i.children[m],w=document.createElement("option");w.textContent=A,w.value=y,v?v.before(w):i.append(w),t.setValue(e,{value:o(!0),items:h(g)}),l=o(!1)},items(g){const{items:m}=g.detail;for(;i.length!==0;)i.remove(0);for(const A of m){const{displayValue:y,exportValue:v}=A,w=document.createElement("option");w.textContent=y,w.value=v,i.append(w)}i.options.length>0&&(i.options[0].selected=!0),t.setValue(e,{value:o(!0),items:h(g)}),l=o(!1)},indices(g){const m=new Set(g.detail.indices);for(const A of g.target.options)A.selected=m.has(A.index);t.setValue(e,{value:o(!0)}),l=o(!1)},editable(g){g.target.disabled=!g.detail.editable}};this._dispatchEventFromSandbox(f,c)}),i.addEventListener("input",c=>{var m;const f=o(!0),g=o(!1);t.setValue(e,{value:f}),c.preventDefault(),(m=this.linkService.eventBus)==null||m.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:l,change:g,changeEx:f,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(i,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],c=>c.target.value)):i.addEventListener("input",function(c){t.setValue(e,{value:o(!0)})}),this.data.combo&&this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class ag extends bt{constructor(t){const{data:e,elements:s}=t;super(t,{isRenderable:bt._hasPopupData(e)}),this.elements=s,this.popup=null}render(){const{container:t}=this;t.classList.add("popupAnnotation"),t.role="comment";const e=this.popup=new bw({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate||this.data.creationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open,eventBus:this.linkService.eventBus}),s=[];for(const i of this.elements)i.popup=e,i.container.ariaHasPopup="dialog",s.push(i.data.id),i.addHighlightArea();return this.container.setAttribute("aria-controls",s.map(i=>`${Hg}${i}`).join(",")),this.container}}var xr,af,of,kr,Co,ft,ui,hn,fi,hc,cc,To,Es,ye,pi,gi,dc,cn,xo,uc,mi,ko,Pr,dn,Po,Dd,lf,Ob,hf,Bb,Mo,Ld,fc,og,cf,Hb,df,$b,uf,zb,ff,Gb,Ro,Id,Do,Fd,pc,lg;class bw{constructor({container:t,color:e,elements:s,titleObj:i,modificationDate:r,contentsObj:a,richText:o,parent:l,rect:h,parentRect:c,open:f,eventBus:g=null}){d(this,Po);d(this,lf);d(this,hf);d(this,Mo);d(this,fc);d(this,cf);d(this,df);d(this,uf);d(this,ff);d(this,Ro);d(this,Do);d(this,pc);d(this,xr,b(this,uf,zb).bind(this));d(this,af,b(this,pc,lg).bind(this));d(this,of,b(this,Do,Fd).bind(this));d(this,kr,b(this,Ro,Id).bind(this));d(this,Co,null);d(this,ft,null);d(this,ui,null);d(this,hn,null);d(this,fi,null);d(this,hc,null);d(this,cc,null);d(this,To,null);d(this,Es,!1);d(this,ye,null);d(this,pi,null);d(this,gi,null);d(this,dc,null);d(this,cn,null);d(this,xo,null);d(this,uc,null);d(this,mi,null);d(this,ko,null);d(this,Pr,null);d(this,dn,!1);p(this,ft,t),p(this,ko,i),p(this,ui,a),p(this,mi,o),p(this,cc,l),p(this,Co,e),p(this,uc,h),p(this,To,c),p(this,fi,s),p(this,hc,g),p(this,hn,Qd.toDateObject(r)),this.trigger=s.flatMap(m=>m.getElementsToTriggerPopup()),b(this,Po,Dd).call(this),n(this,ft).hidden=!0,f&&b(this,Ro,Id).call(this)}render(){var i;if(n(this,ye))return;const t=p(this,ye,document.createElement("div"));if(t.className="popup",n(this,Co)){const r=t.style.outlineColor=I.makeHexColor(...n(this,Co));t.style.backgroundColor=`color-mix(in srgb, ${r} 30%, white)`}const e=document.createElement("span");if(e.className="header",(i=n(this,ko))!=null&&i.str){const r=document.createElement("span");r.className="title",e.append(r),{dir:r.dir,str:r.textContent}=n(this,ko)}if(t.append(e),n(this,hn)){const r=document.createElement("time");r.className="popupDate",r.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),r.setAttribute("data-l10n-args",JSON.stringify({dateObj:n(this,hn).valueOf()})),r.dateTime=n(this,hn).toISOString(),e.append(r)}const s=n(this,Mo,Ld);if(s)Db.render({xfaHtml:s,intent:"richText",div:t}),t.lastChild.classList.add("richText","popupContent");else{const r=this._formatContents(n(this,ui));t.append(r)}n(this,ft).append(t)}_formatContents({str:t,dir:e}){const s=document.createElement("p");s.classList.add("popupContent"),s.dir=e;const i=t.split(/(?:\r\n?|\n)/);for(let r=0,a=i.length;re.hasCommentButton);t&&(p(this,cn,t._normalizePoint(t.commentButtonPosition)),p(this,xo,t.commentButtonColor))},hf=new WeakSet,Bb=function(){if(n(this,dc)||(n(this,cn)||b(this,lf,Ob).call(this),!n(this,cn)))return;const t=p(this,dc,document.createElement("button"));t.className="annotationCommentButton";const e=n(this,fi)[0].container;t.style.zIndex=e.style.zIndex+1,t.tabIndex=0;const{signal:s}=n(this,pi);t.addEventListener("hover",n(this,kr),{signal:s}),t.addEventListener("keydown",n(this,xr),{signal:s}),t.addEventListener("click",()=>{var o;const[{data:{id:r},annotationEditorType:a}]=n(this,fi);(o=n(this,hc))==null||o.dispatch("switchannotationeditormode",{source:this,editId:r,mode:a,editComment:!0})},{signal:s});const{style:i}=t;i.left=`calc(${n(this,cn)[0]}%)`,i.top=`calc(${n(this,cn)[1]}% - var(--comment-button-dim))`,n(this,xo)&&(i.backgroundColor=n(this,xo)),e.after(t)},Mo=new WeakSet,Ld=function(){const t=n(this,mi),e=n(this,ui);return t!=null&&t.str&&(!(e!=null&&e.str)||e.str===t.str)&&n(this,mi).html||null},fc=new WeakSet,og=function(){var t,e,s;return((s=(e=(t=n(this,Mo,Ld))==null?void 0:t.attributes)==null?void 0:e.style)==null?void 0:s.fontSize)||0},cf=new WeakSet,Hb=function(){var t,e,s;return((s=(e=(t=n(this,Mo,Ld))==null?void 0:t.attributes)==null?void 0:e.style)==null?void 0:s.color)||null},df=new WeakSet,$b=function(t){const e=[],s={str:t,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:e}]}},i={style:{color:n(this,cf,Hb),fontSize:n(this,fc,og)?`calc(${n(this,fc,og)}px * var(--total-scale-factor))`:""}};for(const r of t.split(` `))e.push({name:"span",value:r,attributes:i});return s},uf=new WeakSet,zb=function(t){t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||(t.key==="Enter"||t.key==="Escape"&&n(this,Es))&&b(this,Ro,Id).call(this)},ff=new WeakSet,Gb=function(){if(n(this,gi)!==null)return;const{page:{view:t},viewport:{rawDims:{pageWidth:e,pageHeight:s,pageX:i,pageY:r}}}=n(this,cc);let a=!!n(this,To),o=a?n(this,To):n(this,uc);for(const A of n(this,fi))if(!o||I.intersect(A.data.rect,o)!==null){o=A.data.rect,a=!0;break}const l=I.normalizeRect([o[0],t[3]-o[1]+t[1],o[2],t[3]-o[3]+t[1]]),h=5,c=a?o[2]-o[0]+h:0,f=l[0]+c,g=l[1];p(this,gi,[100*(f-i)/e,100*(g-r)/s]);const{style:m}=n(this,ft);m.left=`${n(this,gi)[0]}%`,m.top=`${n(this,gi)[1]}%`},Ro=new WeakSet,Id=function(){p(this,Es,!n(this,Es)),n(this,Es)?(b(this,Do,Fd).call(this),n(this,ft).addEventListener("click",n(this,kr)),n(this,ft).addEventListener("keydown",n(this,xr))):(b(this,pc,lg).call(this),n(this,ft).removeEventListener("click",n(this,kr)),n(this,ft).removeEventListener("keydown",n(this,xr)))},Do=new WeakSet,Fd=function(){n(this,ye)||this.render(),this.isVisible?n(this,Es)&&n(this,ft).classList.add("focused"):(b(this,ff,Gb).call(this),n(this,ft).hidden=!1,n(this,ft).style.zIndex=parseInt(n(this,ft).style.zIndex)+1e3)},pc=new WeakSet,lg=function(){n(this,ft).classList.remove("focused"),!(n(this,Es)||!this.isVisible)&&(n(this,ft).hidden=!0,n(this,ft).style.zIndex=parseInt(n(this,ft).style.zIndex)-1e3)};class Ub extends bt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.textContent=t.data.textContent,this.textPosition=t.data.textPosition,this.annotationEditorType=$.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const t=document.createElement("div");t.classList.add("annotationTextContent"),t.setAttribute("role","comment");for(const e of this.textContent){const s=document.createElement("span");s.textContent=e,t.append(s)}this.container.append(t)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}var gc;class Aw extends bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});d(this,gc,null)}render(){this.container.classList.add("lineAnnotation");const{data:e,width:s,height:i}=this,r=this.svgFactory.create(s,i,!0),a=p(this,gc,this.svgFactory.createElement("svg:line"));return a.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),a.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),a.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),a.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),a.setAttribute("stroke-width",e.borderStyle.width||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),r.append(a),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return n(this,gc)}addHighlightArea(){this.container.classList.add("highlightArea")}}gc=new WeakMap;var mc;class yw extends bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});d(this,mc,null)}render(){this.container.classList.add("squareAnnotation");const{data:e,width:s,height:i}=this,r=this.svgFactory.create(s,i,!0),a=e.borderStyle.width,o=p(this,mc,this.svgFactory.createElement("svg:rect"));return o.setAttribute("x",a/2),o.setAttribute("y",a/2),o.setAttribute("width",s-a),o.setAttribute("height",i-a),o.setAttribute("stroke-width",a||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),r.append(o),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return n(this,mc)}addHighlightArea(){this.container.classList.add("highlightArea")}}mc=new WeakMap;var bc;class ww extends bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});d(this,bc,null)}render(){this.container.classList.add("circleAnnotation");const{data:e,width:s,height:i}=this,r=this.svgFactory.create(s,i,!0),a=e.borderStyle.width,o=p(this,bc,this.svgFactory.createElement("svg:ellipse"));return o.setAttribute("cx",s/2),o.setAttribute("cy",i/2),o.setAttribute("rx",s/2-a/2),o.setAttribute("ry",i/2-a/2),o.setAttribute("stroke-width",a||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),r.append(o),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return n(this,bc)}addHighlightArea(){this.container.classList.add("highlightArea")}}bc=new WeakMap;var Ac;class jb extends bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});d(this,Ac,null);this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:e,vertices:s,borderStyle:i,popupRef:r},width:a,height:o}=this;if(!s)return this.container;const l=this.svgFactory.create(a,o,!0);let h=[];for(let f=0,g=s.length;f=0&&a.setAttribute("stroke-width",s||1),i)for(let o=0,l=n(this,Mr).length;o=1){let i=-1/0,r=-1/0;for(const a of e)for(let o=0,l=a.length;or?(r=a[o+1],i=a[o]):a[o+1]===r&&(i=Math.max(i,a[o]));if(i!==1/0)return[i,r]}return s?[s[2],s[3]]:null}}yc=new WeakMap,Mr=new WeakMap,wc=new WeakSet,hg=function(e,s){switch(e){case 90:return{transform:`rotate(90) translate(${-s[0]},${s[1]}) scale(1,-1)`,width:s[3]-s[1],height:s[2]-s[0]};case 180:return{transform:`rotate(180) translate(${-s[2]},${s[1]}) scale(1,-1)`,width:s[2]-s[0],height:s[3]-s[1]};case 270:return{transform:`rotate(270) translate(${-s[2]},${s[3]}) scale(1,-1)`,width:s[3]-s[1],height:s[2]-s[0]};default:return{transform:`translate(${-s[0]},${s[3]}) scale(1,-1)`,width:s[2]-s[0],height:s[3]-s[1]}}};class Vb extends bt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=$.HIGHLIGHT}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),t){const s=document.createElement("mark");s.classList.add("overlaidText"),s.textContent=t,this.container.append(s)}return this.container}}class Sw extends bt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),t){const s=document.createElement("u");s.classList.add("overlaidText"),s.textContent=t,this.container.append(s)}return this.container}}class Ew extends bt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),t){const s=document.createElement("u");s.classList.add("overlaidText"),s.textContent=t,this.container.append(s)}return this.container}}class Cw extends bt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),t){const s=document.createElement("s");s.classList.add("overlaidText"),s.textContent=t,this.container.append(s)}return this.container}}class Wb extends bt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=$.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}var vc,_c,cg;class Tw extends bt{constructor(e){var i;super(e,{isRenderable:!0});d(this,_c);d(this,vc,null);const{file:s}=this.data;this.filename=s.filename,this.content=s.content,(i=this.linkService.eventBus)==null||i.dispatch("fileattachmentannotation",{source:this,...s})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:e,data:s}=this;let i;s.hasAppearance||s.fillAlpha===0?i=document.createElement("div"):(i=document.createElement("img"),i.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(s.name)?"paperclip":"pushpin"}.svg`,s.fillAlpha&&s.fillAlpha<1&&(i.style=`filter: opacity(${Math.round(s.fillAlpha*100)}%);`)),i.addEventListener("dblclick",b(this,_c,cg).bind(this)),p(this,vc,i);const{isMac:r}=Wt.platform;return e.addEventListener("keydown",a=>{a.key==="Enter"&&(r?a.metaKey:a.ctrlKey)&&b(this,_c,cg).call(this)}),!s.popupRef&&this.hasPopupData?this._createPopup():i.classList.add("popupTriggerArea"),e.append(i),e}getElementsToTriggerPopup(){return n(this,vc)}addHighlightArea(){this.container.classList.add("highlightArea")}}vc=new WeakMap,_c=new WeakSet,cg=function(){var e;(e=this.downloadManager)==null||e.openOrDownloadData(this.content,this.filename)};var Sc,Rr,un,Ec,Cc,ug,Tc,fg;const tm=class tm{constructor({div:t,accessibilityManager:e,annotationCanvasMap:s,annotationEditorUIManager:i,page:r,viewport:a,structTreeLayer:o}){d(this,Cc);d(this,Tc);d(this,Sc,null);d(this,Rr,null);d(this,un,new Map);d(this,Ec,null);this.div=t,p(this,Sc,e),p(this,Rr,s),p(this,Ec,o||null),this.page=r,this.viewport=a,this.zIndex=0,this._annotationEditorUIManager=i}hasEditableAnnotations(){return n(this,un).size>0}async render(t){var a;const{annotations:e}=t,s=this.div;ra(s,this.viewport);const i=new Map,r={data:null,layer:s,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:t.renderForms!==!1,svgFactory:new iu,annotationStorage:t.annotationStorage||new Gg,enableComment:t.enableComment===!0,enableScripting:t.enableScripting===!0,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(const o of e){if(o.noHTML)continue;const l=o.annotationType===wt.POPUP;if(l){const f=i.get(o.id);if(!f)continue;r.elements=f}else if(o.rect[2]===o.rect[0]||o.rect[3]===o.rect[1])continue;r.data=o;const h=_m.create(r);if(!h.isRenderable)continue;if(!l&&o.popupRef){const f=i.get(o.popupRef);f?f.push(h):i.set(o.popupRef,[h])}const c=h.render();o.hidden&&(c.style.visibility="hidden"),await b(this,Cc,ug).call(this,c,o.id,r.elements),h._isEditable&&(n(this,un).set(h.data.id,h),(a=this._annotationEditorUIManager)==null||a.renderAnnotationElement(h))}b(this,Tc,fg).call(this)}async addLinkAnnotations(t,e){const s={data:null,layer:this.div,linkService:e,svgFactory:new iu,parent:this};for(const i of t){i.borderStyle||(i.borderStyle=tm._defaultBorderStyle),s.data=i;const r=_m.create(s);if(!r.isRenderable)continue;const a=r.render();await b(this,Cc,ug).call(this,a,i.id,null)}}update({viewport:t}){const e=this.div;this.viewport=t,ra(e,{rotation:t.rotation}),b(this,Tc,fg).call(this),e.hidden=!1}getEditableAnnotations(){return Array.from(n(this,un).values())}getEditableAnnotation(t){return n(this,un).get(t)}static get _defaultBorderStyle(){return V(this,"_defaultBorderStyle",Object.freeze({width:1,rawWidth:1,style:da.SOLID,dashArray:[3],horizontalCornerRadius:0,verticalCornerRadius:0}))}};Sc=new WeakMap,Rr=new WeakMap,un=new WeakMap,Ec=new WeakMap,Cc=new WeakSet,ug=async function(t,e,s){var o,l;const i=t.firstChild||t,r=i.id=`${Hg}${e}`,a=await((o=n(this,Ec))==null?void 0:o.getAriaAttributes(r));if(a)for(const[h,c]of a)i.setAttribute(h,c);s?s.at(-1).container.after(t):(this.div.append(t),(l=n(this,Sc))==null||l.moveElementInDOM(this.div,t,i,!1))},Tc=new WeakSet,fg=function(){var e;if(!n(this,Rr))return;const t=this.div;for(const[s,i]of n(this,Rr)){const r=t.querySelector(`[data-annotation-id="${s}"]`);if(!r)continue;i.className="annotationContent";const{firstChild:a}=r;a?a.nodeName==="CANVAS"?a.replaceWith(i):a.classList.contains("annotationContent")?a.after(i):a.before(i):r.append(i);const o=n(this,un).get(s);o&&(o._hasNoCanvas?((e=this._annotationEditorUIManager)==null||e.setMissingCanvas(s,r.id,i),o._hasNoCanvas=!1):o.canvas=i)}n(this,Rr).clear()};let dg=tm;const Ad=/\r\n?|\n/g;var He,we,xc,Dr,ve,pf,Xb,gf,qb,mf,Yb,Lo,Nd,Io,Od,Fo,Bd,bf,Kb,kc,gg,Af,Qb;const nt=class nt extends rt{constructor(e){super({...e,name:"freeTextEditor"});d(this,pf);d(this,gf);d(this,mf);d(this,Lo);d(this,Fo);d(this,bf);d(this,Af);d(this,He,void 0);d(this,we,"");d(this,xc,`${this.id}-editor`);d(this,Dr,null);d(this,ve,void 0);k(this,"_colorPicker",null);p(this,He,e.color||nt._defaultColor||rt._defaultLineColor),p(this,ve,e.fontSize||nt._defaultFontSize),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert")}static get _keyboardManager(){const e=nt.prototype,s=a=>a.isEmpty(),i=aa.TRANSLATE_SMALL,r=aa.TRANSLATE_BIG;return V(this,"_keyboardManager",new hd([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],e.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],e.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],e._translateEmpty,{args:[-i,0],checker:s}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e._translateEmpty,{args:[-r,0],checker:s}],[["ArrowRight","mac+ArrowRight"],e._translateEmpty,{args:[i,0],checker:s}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e._translateEmpty,{args:[r,0],checker:s}],[["ArrowUp","mac+ArrowUp"],e._translateEmpty,{args:[0,-i],checker:s}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e._translateEmpty,{args:[0,-r],checker:s}],[["ArrowDown","mac+ArrowDown"],e._translateEmpty,{args:[0,i],checker:s}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e._translateEmpty,{args:[0,r],checker:s}]]))}static initialize(e,s){rt.initialize(e,s);const i=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(i.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,s){switch(e){case X.FREETEXT_SIZE:nt._defaultFontSize=s;break;case X.FREETEXT_COLOR:nt._defaultColor=s;break}}updateParams(e,s){switch(e){case X.FREETEXT_SIZE:b(this,pf,Xb).call(this,s);break;case X.FREETEXT_COLOR:b(this,gf,qb).call(this,s);break}}static get defaultPropertiesToUpdate(){return[[X.FREETEXT_SIZE,nt._defaultFontSize],[X.FREETEXT_COLOR,nt._defaultColor||rt._defaultLineColor]]}get propertiesToUpdate(){return[[X.FREETEXT_SIZE,n(this,ve)],[X.FREETEXT_COLOR,n(this,He)]]}get toolbarButtons(){return this._colorPicker||(this._colorPicker=new su(this)),[["colorPicker",this._colorPicker]]}get colorType(){return X.FREETEXT_COLOR}get colorValue(){return n(this,He)}_translateEmpty(e,s){this._uiManager.translateSelectedEditors(e,s,!0)}getInitialTranslation(){const e=this.parentScale;return[-nt._internalPadding*e,-(nt._internalPadding+n(this,ve))*e]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(!super.enableEditMode())return!1;this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),p(this,Dr,new AbortController);const e=this._uiManager.combinedSignal(n(this,Dr));return this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:e}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:e}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:e}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:e}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:e}),!0}disableEditMode(){var e;return super.disableEditMode()?(this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",n(this,xc)),this._isDraggable=!0,(e=n(this,Dr))==null||e.abort(),p(this,Dr,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"),!0):!1}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(e){var s;this.width||(this.enableEditMode(),e&&this.editorDiv.focus(),(s=this._initialOptions)!=null&&s.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const e=n(this,we),s=p(this,we,b(this,mf,Yb).call(this).trimEnd());if(e===s)return;const i=r=>{if(p(this,we,r),!r){this.remove();return}b(this,Fo,Bd).call(this),this._uiManager.rebuild(this),b(this,Lo,Nd).call(this)};this.addCommands({cmd:()=>{i(s)},undo:()=>{i(e)},mustExec:!1}),b(this,Lo,Nd).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}keydown(e){e.target===this.div&&e.key==="Enter"&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(e){nt._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}get canChangeContent(){return!0}render(){if(this.div)return this.div;let e,s;(this._isCopy||this.annotationElementId)&&(e=this.x,s=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",n(this,xc)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:i}=this.editorDiv;if(i.fontSize=`calc(${n(this,ve)}px * var(--total-scale-factor))`,i.color=n(this,He),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),this._isCopy||this.annotationElementId){const[r,a]=this.parentDimensions;if(this.annotationElementId){const{position:o}=this._initialData;let[l,h]=this.getInitialTranslation();[l,h]=this.pageTranslationToScreen(l,h);const[c,f]=this.pageDimensions,[g,m]=this.pageTranslation;let A,y;switch(this.rotation){case 0:A=e+(o[0]-g)/c,y=s+this.height-(o[1]-m)/f;break;case 90:A=e+(o[0]-g)/c,y=s-(o[1]-m)/f,[l,h]=[h,-l];break;case 180:A=e-this.width+(o[0]-g)/c,y=s-(o[1]-m)/f,[l,h]=[-l,-h];break;case 270:A=e+(o[0]-g-this.height*f)/c,y=s+(o[1]-m-this.width*c)/f,[l,h]=[-h,l];break}this.setAt(A*r,y*a,l,h)}else this._moveAfterPaste(e,s);b(this,Fo,Bd).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(e){var A,y,v;const s=e.clipboardData||window.clipboardData,{types:i}=s;if(i.length===1&&i[0]==="text/plain")return;e.preventDefault();const r=b(A=nt,kc,gg).call(A,s.getData("text")||"").replaceAll(Ad,` diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 9737579..ed289f9 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -23,8 +23,8 @@ flex-direction: column; } - - + +
    diff --git a/frontend/src/components/MindMap.vue b/frontend/src/components/MindMap.vue index 6d837af..5cd6be1 100644 --- a/frontend/src/components/MindMap.vue +++ b/frontend/src/components/MindMap.vue @@ -135,6 +135,34 @@ + +
    +
    +
    + {{ imagePreviewTitle }} + +
    +
    +
    +
    +

    加载图片中...

    +
    +
    +

    ❌ 图片加载失败

    +

    {{ imagePreviewError }}

    + +
    + +
    +
    +
    @@ -213,6 +241,13 @@ const isDragging = ref(false); const dragStartPos = ref({ x: 0, y: 0 }); const currentNodeId = ref(null); +// 图片预览相关状态 +const showImagePreview = ref(false); +const imagePreviewUrl = ref(''); +const imagePreviewTitle = ref(''); +const imagePreviewLoading = ref(false); +const imagePreviewError = ref(''); + // 显示欢迎页面 @@ -238,6 +273,106 @@ const showMindMapPage = () => { showWelcome.value = false; }; +// 图片预览相关方法 +const openImagePreview = (imageUrl, altText = '') => { + console.log('🖼️ 打开图片预览:', { imageUrl, altText }); + + // 处理图片URL,确保是有效的URL + let processedUrl = imageUrl; + if (typeof imageUrl === 'string') { + // 如果是相对路径,转换为绝对路径 + if (imageUrl.startsWith('/') || imageUrl.startsWith('./') || imageUrl.startsWith('../')) { + processedUrl = new URL(imageUrl, window.location.origin).href; + } + // 如果是base64图片,直接使用 + else if (imageUrl.startsWith('data:image/')) { + processedUrl = imageUrl; + } + // 如果是完整URL,直接使用 + else if (imageUrl.startsWith('http://') || imageUrl.startsWith('https://')) { + processedUrl = imageUrl; + } + } + + console.log('🖼️ 处理后的图片URL:', processedUrl); + + showImagePreview.value = true; + imagePreviewTitle.value = altText || '图片预览'; + imagePreviewLoading.value = true; + imagePreviewError.value = ''; + + // 启动超时机制 + startImageLoadTimeout(); + + // 预加载图片,确保URL有效 + const img = new Image(); + img.onload = () => { + console.log('✅ 图片预加载成功'); + // 预加载成功后,直接设置图片URL并停止加载状态 + imagePreviewUrl.value = processedUrl; + imagePreviewLoading.value = false; + clearImageLoadTimeout(); + }; + img.onerror = () => { + console.error('❌ 图片预加载失败:', processedUrl); + clearImageLoadTimeout(); + imagePreviewLoading.value = false; + imagePreviewError.value = `图片加载失败: ${processedUrl}`; + }; + img.src = processedUrl; +}; + +const closeImagePreview = () => { + clearImageLoadTimeout(); + showImagePreview.value = false; + imagePreviewUrl.value = ''; + imagePreviewTitle.value = ''; + imagePreviewLoading.value = false; + imagePreviewError.value = ''; +}; + +const onImageLoad = () => { + console.log('✅ 模态框图片加载成功'); + // 图片已经在预加载阶段处理了状态,这里只是确认 +}; + +const onImageError = (event) => { + console.error('❌ 模态框图片加载失败:', event); + console.error('❌ 失败的图片URL:', imagePreviewUrl.value); + // 这种情况应该很少发生,因为预加载已经验证了URL + imagePreviewLoading.value = false; + imagePreviewError.value = `图片显示失败: ${imagePreviewUrl.value}`; +}; + +const retryLoadImage = () => { + console.log('🔄 重试加载图片'); + imagePreviewLoading.value = true; + imagePreviewError.value = ''; + startImageLoadTimeout(); +}; + +// 图片加载超时处理 +let imageLoadTimeout = null; +const startImageLoadTimeout = () => { + if (imageLoadTimeout) { + clearTimeout(imageLoadTimeout); + } + imageLoadTimeout = setTimeout(() => { + if (imagePreviewLoading.value) { + console.warn('⚠️ 图片加载超时'); + imagePreviewLoading.value = false; + imagePreviewError.value = '图片加载超时,请检查网络连接或图片URL是否正确'; + } + }, 10000); // 10秒超时 +}; + +const clearImageLoadTimeout = () => { + if (imageLoadTimeout) { + clearTimeout(imageLoadTimeout); + imageLoadTimeout = null; + } +}; + // 加载已有思维导图 const loadExistingMindmap = async () => { // 这里可以实现一个思维导图列表选择器 @@ -484,6 +619,12 @@ const loadMindmapData = async (data, keepPosition = false, shouldCenterRoot = tr fixInitialRendering(); + // 添加图片预览事件监听器 + mindElixir.value.bus.addListener('showImagePreview', (imageUrl, altText) => { + console.log('🖼️ 收到图片预览事件:', { imageUrl, altText }); + openImagePreview(imageUrl, altText); + }); + // Mind Elixir现在会自动使用markdown解析器渲染内容 } else { @@ -565,6 +706,12 @@ const loadMindmapData = async (data, keepPosition = false, shouldCenterRoot = tr fixDelayedRendering(); + // 添加图片预览事件监听器 + mindElixir.value.bus.addListener('showImagePreview', (imageUrl, altText) => { + console.log('🖼️ 收到图片预览事件(延迟创建):', { imageUrl, altText }); + openImagePreview(imageUrl, altText); + }); + // 延迟执行后续操作 setTimeout(() => { // Mind Elixir现在会自动使用markdown解析器渲染内容 @@ -4576,5 +4723,149 @@ const updateMindMapRealtime = async (data, title) => { margin-bottom: 8px !important; object-fit: cover !important; } + +/* 图片预览模态框样式 */ +.image-preview-modal { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.8); + display: flex; + justify-content: center; + align-items: center; + z-index: 10000; + animation: fadeIn 0.3s ease; +} + +@keyframes fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} + +.image-preview-content { + background: white; + border-radius: 8px; + max-width: 90%; + max-height: 90%; + overflow: hidden; + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); + animation: slideIn 0.3s ease; +} + +@keyframes slideIn { + from { + transform: translateY(-20px); + opacity: 0; + } + to { + transform: translateY(0); + opacity: 1; + } +} + +.image-preview-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 16px 20px; + border-bottom: 1px solid #e0e0e0; + background: #f5f5f5; +} + +.image-preview-title { + font-size: 16px; + font-weight: 600; + color: #333; +} + +.image-preview-close { + background: none; + border: none; + font-size: 28px; + color: #666; + cursor: pointer; + width: 32px; + height: 32px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 4px; + transition: all 0.2s; +} + +.image-preview-close:hover { + background: #e0e0e0; + color: #333; +} + +.image-preview-body { + padding: 20px; + display: flex; + justify-content: center; + align-items: center; + min-height: 200px; + max-height: 80vh; + overflow: auto; +} + +.preview-image { + max-width: 100%; + max-height: 75vh; + height: auto; + object-fit: contain; + border-radius: 4px; +} + +.image-preview-loading, +.image-preview-error { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 40px; + color: #666; +} + +.loading-spinner { + width: 40px; + height: 40px; + border: 4px solid #f3f3f3; + border-top: 4px solid #660874; + border-radius: 50%; + animation: spin 1s linear infinite; + margin-bottom: 16px; +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + +.image-preview-error p { + margin: 8px 0; + text-align: center; +} + +.retry-button { + margin-top: 16px; + padding: 8px 16px; + background: #660874; + color: white; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 14px; + transition: background 0.2s; +} + +.retry-button:hover { + background: #7d0a8e; +} diff --git a/frontend/src/lib/mind-elixir/src/mouse.ts b/frontend/src/lib/mind-elixir/src/mouse.ts index 9bba19f..201e706 100644 --- a/frontend/src/lib/mind-elixir/src/mouse.ts +++ b/frontend/src/lib/mind-elixir/src/mouse.ts @@ -46,16 +46,58 @@ export default function (mind: MindElixirInstance) { } const handleDblClick = (e: MouseEvent) => { - if (!mind.editable) return const target = e.target as HTMLElement - if (isTopic(target)) { - mind.beginEdit(target) + + // 检查是否双击了图片 + if (target.tagName === 'IMG') { + const img = target as HTMLImageElement + const imageUrl = img.src + const altText = img.alt || img.title || '' + + console.log('🖼️ 双击图片节点,准备预览:', { imageUrl, altText }) + + // 触发图片预览事件 + mind.bus.fire('showImagePreview', imageUrl, altText) + return } - const trySvg = target.parentElement?.parentElement as unknown as SVGElement - if (trySvg.getAttribute('class') === 'topiclinks') { - mind.editArrowLabel(target.parentElement as unknown as CustomSvg) - } else if (trySvg.getAttribute('class') === 'summary') { - mind.editSummary(target.parentElement as unknown as SummarySvgGroup) + + // 检查是否双击了包含图片的节点 + if (isTopic(target)) { + const topic = target as Topic + + // 检查节点是否有图片 + if (topic.nodeObj?.image) { + const imageUrl = typeof topic.nodeObj.image === 'string' ? topic.nodeObj.image : topic.nodeObj.image.url + console.log('🖼️ 双击包含图片的节点,准备预览:', imageUrl) + mind.bus.fire('showImagePreview', imageUrl, topic.nodeObj.topic || '') + return + } + + // 检查节点内容中是否包含图片 + const imgInContent = topic.querySelector('img') + if (imgInContent) { + const imageUrl = imgInContent.src + const altText = imgInContent.alt || imgInContent.title || topic.nodeObj?.topic || '' + + console.log('🖼️ 双击包含HTML图片的节点,准备预览:', { imageUrl, altText }) + mind.bus.fire('showImagePreview', imageUrl, altText) + return + } + + // 如果没有图片,则进入编辑模式 + if (mind.editable) { + mind.beginEdit(target) + } + } + + // 处理其他双击事件 + if (mind.editable) { + const trySvg = target.parentElement?.parentElement as unknown as SVGElement + if (trySvg.getAttribute('class') === 'topiclinks') { + mind.editArrowLabel(target.parentElement as unknown as CustomSvg) + } else if (trySvg.getAttribute('class') === 'summary') { + mind.editSummary(target.parentElement as unknown as SummarySvgGroup) + } } } diff --git a/frontend/src/lib/mind-elixir/src/plugin/contextMenu.ts b/frontend/src/lib/mind-elixir/src/plugin/contextMenu.ts index 7385058..e9f0779 100644 --- a/frontend/src/lib/mind-elixir/src/plugin/contextMenu.ts +++ b/frontend/src/lib/mind-elixir/src/plugin/contextMenu.ts @@ -48,6 +48,7 @@ export default function (mind: MindElixirInstance, option: true | ContextMenuOpt const link = createLi('cm-link', lang.link, '') const linkBidirectional = createLi('cm-link-bidirectional', lang.linkBidirectional, '') const summary = createLi('cm-summary', lang.summary, '') + const imagePreview = createLi('cm-image-preview', '预览图片', '') const menuUl = document.createElement('ul') menuUl.className = 'menu-list' @@ -93,6 +94,18 @@ export default function (mind: MindElixirInstance, option: true | ContextMenuOpt } else { isRoot = false } + + // 检查节点是否有图片,决定是否显示预览图片选项 + const topic = target as Topic + const hasImage = topic.nodeObj?.image || topic.querySelector('img') + + if (hasImage) { + imagePreview.style.display = 'block' + imagePreview.className = '' + } else { + imagePreview.style.display = 'none' + } + if (isRoot) { focus.className = 'disabled' up.className = 'disabled' @@ -211,6 +224,28 @@ export default function (mind: MindElixirInstance, option: true | ContextMenuOpt mind.createSummary() mind.unselectNodes(mind.currentNodes) } + imagePreview.onclick = () => { + menuContainer.hidden = true + const target = mind.currentNode as Topic + if (target) { + // 检查节点是否有图片 + if (target.nodeObj?.image) { + const imageUrl = typeof target.nodeObj.image === 'string' ? target.nodeObj.image : target.nodeObj.image.url + console.log('🖼️ 右键菜单预览图片:', imageUrl) + mind.bus.fire('showImagePreview', imageUrl, target.nodeObj.topic || '') + } else { + // 检查节点内容中是否包含图片 + const imgInContent = target.querySelector('img') + if (imgInContent) { + const imageUrl = imgInContent.src + const altText = imgInContent.alt || imgInContent.title || target.nodeObj?.topic || '' + + console.log('🖼️ 右键菜单预览HTML图片:', { imageUrl, altText }) + mind.bus.fire('showImagePreview', imageUrl, altText) + } + } + } + } return () => { // maybe useful? add_child.onclick = null diff --git a/frontend/src/lib/mind-elixir/src/utils/pubsub.ts b/frontend/src/lib/mind-elixir/src/utils/pubsub.ts index 105cf97..95c761b 100644 --- a/frontend/src/lib/mind-elixir/src/utils/pubsub.ts +++ b/frontend/src/lib/mind-elixir/src/utils/pubsub.ts @@ -83,6 +83,7 @@ export type EventMap = { */ updateArrowDelta: (arrow: Arrow) => void showContextMenu: (e: MouseEvent) => void + showImagePreview: (imageUrl: string, altText?: string) => void } export function createBus void> = EventMap>() {