<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>ttyd - Terminal</title>
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAcCAYAAAAAwr0iAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA0xpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OTgyRjc1RjA3MTZEMTFFNjg2M0NCOEY3RjJBMEY3N0EiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OTgyRjc1RUY3MTZEMTFFNjg2M0NCOEY3RjJBMEY3N0EiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjU3YmQxNjhjLWI5ZDctMTE3OS1hM2RlLWZmNjQyYTM4NTJmMCIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjU3YmQxNjhjLWI5ZDctMTE3OS1hM2RlLWZmNjQyYTM4NTJmMCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PhsssMYAAALDSURBVHjaxFa9jxJBFH8zDMdCYrhIAppgIjaG5C5RQ+zO2Gty5gpbY2KsbOyu1MrGGEtj/A9stLPXs6CjJ5GYIF6AE5IDBHZmfG92F4ZzvQAnyyO7O8zX+73f+5gRd3bvvSgffN4/l948YgASFhQ9aWhqM6+pYfrVjD5WH9NK8f7x8ebNnVtvWC6b/RaPxy8zxsxmbB5lIfNsIDMggreezqG1o9GIGj8E45zFNzYgnU4D5xyUUkBglpFAKfgWa5gFY89rNVvgJJMgSBkpjcViIISA4XAI4/EYkBXTdyYQ9LOUU9sw7bmG2lqgPwwAKSV9D/P5/G2csNtoNJ71+32HFjqOszyQkDY9xLbrjkEorSe+wYGc67o72Wz2dSqV+tjr9e4iiAfdbnfL+G4B10wtDV/nBSYAN5O053eivVqtvq1UKr/RDaVCofCyVCo9ogXE0qISppgsJ3GlCzzGkQHcOEgT8n2xWLyfy+XeDwaDK7Va7Xm73X4YUHaaRfMwcbIPdTNBGWBSwkP3Ewdr9Xr9FcbAUwpICkyKAXuTRdkIAxH4QThOEn61W2YSKruAVpeJiUQiYRQjqHImk9nDjDiPijnO+d7pdN5hXOwRuGXdYRggANIdM9sy2tTeGPsuNpvNJwgkRVUMpYPdV5dJURsIZZ9WBEB6aRhKkeeWSzi2j9kxk8vLFqsABFkvlWSYhoqdni6zY2dRfHJfYoErvxBFLb5expVUDFlYCwDpM8CU0pEDoADUGH9YCf8dgKuQSRagXoo/Lg0Da3CBVwm9syBKBv46FfHNIlc+BYFZQHe0yBnQPgN0HFtV8H8VmXko8ABgEOo1uIDZMbCWALRiQAR/gkvpqsU+Rcl4gW9zR6JLCXXQ5XTVAKR/sqIvGODl89BnJfLHcRJNceP6tQ9fDr4+RmRHmAUqoiLEkOnM1vb2pz8CDACUMgcHE3VMqAAAAABJRU5ErkJggg==" />
- <style>.terminal{background-color:#000;color:#fff;font-family:courier-new,courier,monospace;font-feature-settings:"liga" 0;position:relative}.terminal.focus,.terminal:focus{outline:none}.terminal .xterm-helpers{position:absolute;top:0}.terminal .xterm-helper-textarea{position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-10;white-space:nowrap;overflow:hidden;resize:none}.terminal a{color:inherit;text-decoration:none}.terminal a:hover{cursor:pointer;text-decoration:underline}.terminal a.xterm-invalid-link:hover{cursor:text;text-decoration:none}.terminal.focus:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar) .terminal-cursor{background-color:#fff;color:#000}.terminal:not(.focus) .terminal-cursor{outline:1px solid #fff;outline-offset:-1px;background-color:transparent}.terminal:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar).focus.xterm-cursor-blink-on .terminal-cursor{background-color:transparent;color:inherit}.terminal.xterm-cursor-style-bar .terminal-cursor,.terminal.xterm-cursor-style-underline .terminal-cursor{position:relative}.terminal.xterm-cursor-style-bar .terminal-cursor::before,.terminal.xterm-cursor-style-underline .terminal-cursor::before{content:"";display:block;position:absolute;background-color:#fff}.terminal.xterm-cursor-style-bar .terminal-cursor::before{top:0;bottom:0;left:0;width:1px}.terminal.xterm-cursor-style-underline .terminal-cursor::before{bottom:0;left:0;right:0;height:1px}.terminal.xterm-cursor-style-bar.focus.xterm-cursor-blink.xterm-cursor-blink-on .terminal-cursor::before,.terminal.xterm-cursor-style-underline.focus.xterm-cursor-blink.xterm-cursor-blink-on .terminal-cursor::before{background-color:transparent}.terminal.xterm-cursor-style-bar.focus.xterm-cursor-blink .terminal-cursor::before,.terminal.xterm-cursor-style-underline.focus.xterm-cursor-blink .terminal-cursor::before{background-color:#fff}.terminal .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.terminal .composition-view.active{display:block}.terminal .xterm-viewport{background-color:#000;overflow-y:scroll}.terminal .xterm-normal-char,.terminal .xterm-wide-char{display:inline-block}.terminal .xterm-rows{position:absolute;left:0;top:0}.terminal .xterm-rows>div{white-space:nowrap}.terminal .xterm-scroll-area{visibility:hidden}.terminal .xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;left:-9999em}.terminal .xterm-bold{font-weight:700}.terminal .xterm-underline{text-decoration:underline}.terminal .xterm-blink{text-decoration:blink}.terminal .xterm-hidden{visibility:hidden}.terminal .xterm-color-0{color:#2e3436}.terminal .xterm-bg-color-0{background-color:#2e3436}.terminal .xterm-color-1{color:#c00}.terminal .xterm-bg-color-1{background-color:#c00}.terminal .xterm-color-2{color:#4e9a06}.terminal .xterm-bg-color-2{background-color:#4e9a06}.terminal .xterm-color-3{color:#c4a000}.terminal .xterm-bg-color-3{background-color:#c4a000}.terminal .xterm-color-4{color:#3465a4}.terminal .xterm-bg-color-4{background-color:#3465a4}.terminal .xterm-color-5{color:#75507b}.terminal .xterm-bg-color-5{background-color:#75507b}.terminal .xterm-color-6{color:#06989a}.terminal .xterm-bg-color-6{background-color:#06989a}.terminal .xterm-color-7{color:#d3d7cf}.terminal .xterm-bg-color-7{background-color:#d3d7cf}.terminal .xterm-color-8{color:#555753}.terminal .xterm-bg-color-8{background-color:#555753}.terminal .xterm-color-9{color:#ef2929}.terminal .xterm-bg-color-9{background-color:#ef2929}.terminal .xterm-color-10{color:#8ae234}.terminal .xterm-bg-color-10{background-color:#8ae234}.terminal .xterm-color-11{color:#fce94f}.terminal .xterm-bg-color-11{background-color:#fce94f}.terminal .xterm-color-12{color:#729fcf}.terminal .xterm-bg-color-12{background-color:#729fcf}.terminal .xterm-color-13{color:#ad7fa8}.terminal .xterm-bg-color-13{background-color:#ad7fa8}.terminal .xterm-color-14{color:#34e2e2}.terminal .xterm-bg-color-14{background-color:#34e2e2}.terminal .xterm-color-15{color:#eeeeec}.terminal .xterm-bg-color-15{background-color:#eeeeec}.terminal .xterm-color-16{color:#000}.terminal .xterm-bg-color-16{background-color:#000}.terminal .xterm-color-17{color:#00005f}.terminal .xterm-bg-color-17{background-color:#00005f}.terminal .xterm-color-18{color:#000087}.terminal .xterm-bg-color-18{background-color:#000087}.terminal .xterm-color-19{color:#0000af}.terminal .xterm-bg-color-19{background-color:#0000af}.terminal .xterm-color-20{color:#0000d7}.terminal .xterm-bg-color-20{background-color:#0000d7}.terminal .xterm-color-21{color:#00f}.terminal .xterm-bg-color-21{background-color:#00f}.terminal .xterm-color-22{color:#005f00}.terminal .xterm-bg-color-22{background-color:#005f00}.terminal .xterm-color-23{color:#005f5f}.terminal .xterm-bg-color-23{background-color:#005f5f}.terminal .xterm-color-24{color:#005f87}.terminal .xterm-bg-color-24{background-color:#005f87}.terminal .xterm-color-25{color:#005faf}.terminal .xterm-bg-color-25{background-color:#005faf}.terminal .xterm-color-26{color:#005fd7}.terminal .xterm-bg-color-26{background-color:#005fd7}.terminal .xterm-color-27{color:#005fff}.terminal .xterm-bg-color-27{background-color:#005fff}.terminal .xterm-color-28{color:#008700}.terminal .xterm-bg-color-28{background-color:#008700}.terminal .xterm-color-29{color:#00875f}.terminal .xterm-bg-color-29{background-color:#00875f}.terminal .xterm-color-30{color:#008787}.terminal .xterm-bg-color-30{background-color:#008787}.terminal .xterm-color-31{color:#0087af}.terminal .xterm-bg-color-31{background-color:#0087af}.terminal .xterm-color-32{color:#0087d7}.terminal .xterm-bg-color-32{background-color:#0087d7}.terminal .xterm-color-33{color:#0087ff}.terminal .xterm-bg-color-33{background-color:#0087ff}.terminal .xterm-color-34{color:#00af00}.terminal .xterm-bg-color-34{background-color:#00af00}.terminal .xterm-color-35{color:#00af5f}.terminal .xterm-bg-color-35{background-color:#00af5f}.terminal .xterm-color-36{color:#00af87}.terminal .xterm-bg-color-36{background-color:#00af87}.terminal .xterm-color-37{color:#00afaf}.terminal .xterm-bg-color-37{background-color:#00afaf}.terminal .xterm-color-38{color:#00afd7}.terminal .xterm-bg-color-38{background-color:#00afd7}.terminal .xterm-color-39{color:#00afff}.terminal .xterm-bg-color-39{background-color:#00afff}.terminal .xterm-color-40{color:#00d700}.terminal .xterm-bg-color-40{background-color:#00d700}.terminal .xterm-color-41{color:#00d75f}.terminal .xterm-bg-color-41{background-color:#00d75f}.terminal .xterm-color-42{color:#00d787}.terminal .xterm-bg-color-42{background-color:#00d787}.terminal .xterm-color-43{color:#00d7af}.terminal .xterm-bg-color-43{background-color:#00d7af}.terminal .xterm-color-44{color:#00d7d7}.terminal .xterm-bg-color-44{background-color:#00d7d7}.terminal .xterm-color-45{color:#00d7ff}.terminal .xterm-bg-color-45{background-color:#00d7ff}.terminal .xterm-color-46{color:#0f0}.terminal .xterm-bg-color-46{background-color:#0f0}.terminal .xterm-color-47{color:#00ff5f}.terminal .xterm-bg-color-47{background-color:#00ff5f}.terminal .xterm-color-48{color:#00ff87}.terminal .xterm-bg-color-48{background-color:#00ff87}.terminal .xterm-color-49{color:#00ffaf}.terminal .xterm-bg-color-49{background-color:#00ffaf}.terminal .xterm-color-50{color:#00ffd7}.terminal .xterm-bg-color-50{background-color:#00ffd7}.terminal .xterm-color-51{color:#0ff}.terminal .xterm-bg-color-51{background-color:#0ff}.terminal .xterm-color-52{color:#5f0000}.terminal .xterm-bg-color-52{background-color:#5f0000}.terminal .xterm-color-53{color:#5f005f}.terminal .xterm-bg-color-53{background-color:#5f005f}.terminal .xterm-color-54{color:#5f0087}.terminal .xterm-bg-color-54{background-color:#5f0087}.terminal .xterm-color-55{color:#5f00af}.terminal .xterm-bg-color-55{background-color:#5f00af}.terminal .xterm-color-56{color:#5f00d7}.terminal .xterm-bg-color-56{background-color:#5f00d7}.terminal .xterm-color-57{color:#5f00ff}.terminal .xterm-bg-color-57{background-color:#5f00ff}.terminal .xterm-color-58{color:#5f5f00}.terminal .xterm-bg-color-58{background-color:#5f5f00}.terminal .xterm-color-59{color:#5f5f5f}.terminal .xterm-bg-color-59{background-color:#5f5f5f}.terminal .xterm-color-60{color:#5f5f87}.terminal .xterm-bg-color-60{background-color:#5f5f87}.terminal .xterm-color-61{color:#5f5faf}.terminal .xterm-bg-color-61{background-color:#5f5faf}.terminal .xterm-color-62{color:#5f5fd7}.terminal .xterm-bg-color-62{background-color:#5f5fd7}.terminal .xterm-color-63{color:#5f5fff}.terminal .xterm-bg-color-63{background-color:#5f5fff}.terminal .xterm-color-64{color:#5f8700}.terminal .xterm-bg-color-64{background-color:#5f8700}.terminal .xterm-color-65{color:#5f875f}.terminal .xterm-bg-color-65{background-color:#5f875f}.terminal .xterm-color-66{color:#5f8787}.terminal .xterm-bg-color-66{background-color:#5f8787}.terminal .xterm-color-67{color:#5f87af}.terminal .xterm-bg-color-67{background-color:#5f87af}.terminal .xterm-color-68{color:#5f87d7}.terminal .xterm-bg-color-68{background-color:#5f87d7}.terminal .xterm-color-69{color:#5f87ff}.terminal .xterm-bg-color-69{background-color:#5f87ff}.terminal .xterm-color-70{color:#5faf00}.terminal .xterm-bg-color-70{background-color:#5faf00}.terminal .xterm-color-71{color:#5faf5f}.terminal .xterm-bg-color-71{background-color:#5faf5f}.terminal .xterm-color-72{color:#5faf87}.terminal .xterm-bg-color-72{background-color:#5faf87}.terminal .xterm-color-73{color:#5fafaf}.terminal .xterm-bg-color-73{background-color:#5fafaf}.terminal .xterm-color-74{color:#5fafd7}.terminal .xterm-bg-color-74{background-color:#5fafd7}.terminal .xterm-color-75{color:#5fafff}.terminal .xterm-bg-color-75{background-color:#5fafff}.terminal .xterm-color-76{color:#5fd700}.terminal .xterm-bg-color-76{background-color:#5fd700}.terminal .xterm-color-77{color:#5fd75f}.terminal .xterm-bg-color-77{background-color:#5fd75f}.terminal .xterm-color-78{color:#5fd787}.terminal .xterm-bg-color-78{background-color:#5fd787}.terminal .xterm-color-79{color:#5fd7af}.terminal .xterm-bg-color-79{background-color:#5fd7af}.terminal .xterm-color-80{color:#5fd7d7}.terminal .xterm-bg-color-80{background-color:#5fd7d7}.terminal .xterm-color-81{color:#5fd7ff}.terminal .xterm-bg-color-81{background-color:#5fd7ff}.terminal .xterm-color-82{color:#5fff00}.terminal .xterm-bg-color-82{background-color:#5fff00}.terminal .xterm-color-83{color:#5fff5f}.terminal .xterm-bg-color-83{background-color:#5fff5f}.terminal .xterm-color-84{color:#5fff87}.terminal .xterm-bg-color-84{background-color:#5fff87}.terminal .xterm-color-85{color:#5fffaf}.terminal .xterm-bg-color-85{background-color:#5fffaf}.terminal .xterm-color-86{color:#5fffd7}.terminal .xterm-bg-color-86{background-color:#5fffd7}.terminal .xterm-color-87{color:#5fffff}.terminal .xterm-bg-color-87{background-color:#5fffff}.terminal .xterm-color-88{color:#870000}.terminal .xterm-bg-color-88{background-color:#870000}.terminal .xterm-color-89{color:#87005f}.terminal .xterm-bg-color-89{background-color:#87005f}.terminal .xterm-color-90{color:#870087}.terminal .xterm-bg-color-90{background-color:#870087}.terminal .xterm-color-91{color:#8700af}.terminal .xterm-bg-color-91{background-color:#8700af}.terminal .xterm-color-92{color:#8700d7}.terminal .xterm-bg-color-92{background-color:#8700d7}.terminal .xterm-color-93{color:#8700ff}.terminal .xterm-bg-color-93{background-color:#8700ff}.terminal .xterm-color-94{color:#875f00}.terminal .xterm-bg-color-94{background-color:#875f00}.terminal .xterm-color-95{color:#875f5f}.terminal .xterm-bg-color-95{background-color:#875f5f}.terminal .xterm-color-96{color:#875f87}.terminal .xterm-bg-color-96{background-color:#875f87}.terminal .xterm-color-97{color:#875faf}.terminal .xterm-bg-color-97{background-color:#875faf}.terminal .xterm-color-98{color:#875fd7}.terminal .xterm-bg-color-98{background-color:#875fd7}.terminal .xterm-color-99{color:#875fff}.terminal .xterm-bg-color-99{background-color:#875fff}.terminal .xterm-color-100{color:#878700}.terminal .xterm-bg-color-100{background-color:#878700}.terminal .xterm-color-101{color:#87875f}.terminal .xterm-bg-color-101{background-color:#87875f}.terminal .xterm-color-102{color:#878787}.terminal .xterm-bg-color-102{background-color:#878787}.terminal .xterm-color-103{color:#8787af}.terminal .xterm-bg-color-103{background-color:#8787af}.terminal .xterm-color-104{color:#8787d7}.terminal .xterm-bg-color-104{background-color:#8787d7}.terminal .xterm-color-105{color:#8787ff}.terminal .xterm-bg-color-105{background-color:#8787ff}.terminal .xterm-color-106{color:#87af00}.terminal .xterm-bg-color-106{background-color:#87af00}.terminal .xterm-color-107{color:#87af5f}.terminal .xterm-bg-color-107{background-color:#87af5f}.terminal .xterm-color-108{color:#87af87}.terminal .xterm-bg-color-108{background-color:#87af87}.terminal .xterm-color-109{color:#87afaf}.terminal .xterm-bg-color-109{background-color:#87afaf}.terminal .xterm-color-110{color:#87afd7}.terminal .xterm-bg-color-110{background-color:#87afd7}.terminal .xterm-color-111{color:#87afff}.terminal .xterm-bg-color-111{background-color:#87afff}.terminal .xterm-color-112{color:#87d700}.terminal .xterm-bg-color-112{background-color:#87d700}.terminal .xterm-color-113{color:#87d75f}.terminal .xterm-bg-color-113{background-color:#87d75f}.terminal .xterm-color-114{color:#87d787}.terminal .xterm-bg-color-114{background-color:#87d787}.terminal .xterm-color-115{color:#87d7af}.terminal .xterm-bg-color-115{background-color:#87d7af}.terminal .xterm-color-116{color:#87d7d7}.terminal .xterm-bg-color-116{background-color:#87d7d7}.terminal .xterm-color-117{color:#87d7ff}.terminal .xterm-bg-color-117{background-color:#87d7ff}.terminal .xterm-color-118{color:#87ff00}.terminal .xterm-bg-color-118{background-color:#87ff00}.terminal .xterm-color-119{color:#87ff5f}.terminal .xterm-bg-color-119{background-color:#87ff5f}.terminal .xterm-color-120{color:#87ff87}.terminal .xterm-bg-color-120{background-color:#87ff87}.terminal .xterm-color-121{color:#87ffaf}.terminal .xterm-bg-color-121{background-color:#87ffaf}.terminal .xterm-color-122{color:#87ffd7}.terminal .xterm-bg-color-122{background-color:#87ffd7}.terminal .xterm-color-123{color:#87ffff}.terminal .xterm-bg-color-123{background-color:#87ffff}.terminal .xterm-color-124{color:#af0000}.terminal .xterm-bg-color-124{background-color:#af0000}.terminal .xterm-color-125{color:#af005f}.terminal .xterm-bg-color-125{background-color:#af005f}.terminal .xterm-color-126{color:#af0087}.terminal .xterm-bg-color-126{background-color:#af0087}.terminal .xterm-color-127{color:#af00af}.terminal .xterm-bg-color-127{background-color:#af00af}.terminal .xterm-color-128{color:#af00d7}.terminal .xterm-bg-color-128{background-color:#af00d7}.terminal .xterm-color-129{color:#af00ff}.terminal .xterm-bg-color-129{background-color:#af00ff}.terminal .xterm-color-130{color:#af5f00}.terminal .xterm-bg-color-130{background-color:#af5f00}.terminal .xterm-color-131{color:#af5f5f}.terminal .xterm-bg-color-131{background-color:#af5f5f}.terminal .xterm-color-132{color:#af5f87}.terminal .xterm-bg-color-132{background-color:#af5f87}.terminal .xterm-color-133{color:#af5faf}.terminal .xterm-bg-color-133{background-color:#af5faf}.terminal .xterm-color-134{color:#af5fd7}.terminal .xterm-bg-color-134{background-color:#af5fd7}.terminal .xterm-color-135{color:#af5fff}.terminal .xterm-bg-color-135{background-color:#af5fff}.terminal .xterm-color-136{color:#af8700}.terminal .xterm-bg-color-136{background-color:#af8700}.terminal .xterm-color-137{color:#af875f}.terminal .xterm-bg-color-137{background-color:#af875f}.terminal .xterm-color-138{color:#af8787}.terminal .xterm-bg-color-138{background-color:#af8787}.terminal .xterm-color-139{color:#af87af}.terminal .xterm-bg-color-139{background-color:#af87af}.terminal .xterm-color-140{color:#af87d7}.terminal .xterm-bg-color-140{background-color:#af87d7}.terminal .xterm-color-141{color:#af87ff}.terminal .xterm-bg-color-141{background-color:#af87ff}.terminal .xterm-color-142{color:#afaf00}.terminal .xterm-bg-color-142{background-color:#afaf00}.terminal .xterm-color-143{color:#afaf5f}.terminal .xterm-bg-color-143{background-color:#afaf5f}.terminal .xterm-color-144{color:#afaf87}.terminal .xterm-bg-color-144{background-color:#afaf87}.terminal .xterm-color-145{color:#afafaf}.terminal .xterm-bg-color-145{background-color:#afafaf}.terminal .xterm-color-146{color:#afafd7}.terminal .xterm-bg-color-146{background-color:#afafd7}.terminal .xterm-color-147{color:#afafff}.terminal .xterm-bg-color-147{background-color:#afafff}.terminal .xterm-color-148{color:#afd700}.terminal .xterm-bg-color-148{background-color:#afd700}.terminal .xterm-color-149{color:#afd75f}.terminal .xterm-bg-color-149{background-color:#afd75f}.terminal .xterm-color-150{color:#afd787}.terminal .xterm-bg-color-150{background-color:#afd787}.terminal .xterm-color-151{color:#afd7af}.terminal .xterm-bg-color-151{background-color:#afd7af}.terminal .xterm-color-152{color:#afd7d7}.terminal .xterm-bg-color-152{background-color:#afd7d7}.terminal .xterm-color-153{color:#afd7ff}.terminal .xterm-bg-color-153{background-color:#afd7ff}.terminal .xterm-color-154{color:#afff00}.terminal .xterm-bg-color-154{background-color:#afff00}.terminal .xterm-color-155{color:#afff5f}.terminal .xterm-bg-color-155{background-color:#afff5f}.terminal .xterm-color-156{color:#afff87}.terminal .xterm-bg-color-156{background-color:#afff87}.terminal .xterm-color-157{color:#afffaf}.terminal .xterm-bg-color-157{background-color:#afffaf}.terminal .xterm-color-158{color:#afffd7}.terminal .xterm-bg-color-158{background-color:#afffd7}.terminal .xterm-color-159{color:#afffff}.terminal .xterm-bg-color-159{background-color:#afffff}.terminal .xterm-color-160{color:#d70000}.terminal .xterm-bg-color-160{background-color:#d70000}.terminal .xterm-color-161{color:#d7005f}.terminal .xterm-bg-color-161{background-color:#d7005f}.terminal .xterm-color-162{color:#d70087}.terminal .xterm-bg-color-162{background-color:#d70087}.terminal .xterm-color-163{color:#d700af}.terminal .xterm-bg-color-163{background-color:#d700af}.terminal .xterm-color-164{color:#d700d7}.terminal .xterm-bg-color-164{background-color:#d700d7}.terminal .xterm-color-165{color:#d700ff}.terminal .xterm-bg-color-165{background-color:#d700ff}.terminal .xterm-color-166{color:#d75f00}.terminal .xterm-bg-color-166{background-color:#d75f00}.terminal .xterm-color-167{color:#d75f5f}.terminal .xterm-bg-color-167{background-color:#d75f5f}.terminal .xterm-color-168{color:#d75f87}.terminal .xterm-bg-color-168{background-color:#d75f87}.terminal .xterm-color-169{color:#d75faf}.terminal .xterm-bg-color-169{background-color:#d75faf}.terminal .xterm-color-170{color:#d75fd7}.terminal .xterm-bg-color-170{background-color:#d75fd7}.terminal .xterm-color-171{color:#d75fff}.terminal .xterm-bg-color-171{background-color:#d75fff}.terminal .xterm-color-172{color:#d78700}.terminal .xterm-bg-color-172{background-color:#d78700}.terminal .xterm-color-173{color:#d7875f}.terminal .xterm-bg-color-173{background-color:#d7875f}.terminal .xterm-color-174{color:#d78787}.terminal .xterm-bg-color-174{background-color:#d78787}.terminal .xterm-color-175{color:#d787af}.terminal .xterm-bg-color-175{background-color:#d787af}.terminal .xterm-color-176{color:#d787d7}.terminal .xterm-bg-color-176{background-color:#d787d7}.terminal .xterm-color-177{color:#d787ff}.terminal .xterm-bg-color-177{background-color:#d787ff}.terminal .xterm-color-178{color:#d7af00}.terminal .xterm-bg-color-178{background-color:#d7af00}.terminal .xterm-color-179{color:#d7af5f}.terminal .xterm-bg-color-179{background-color:#d7af5f}.terminal .xterm-color-180{color:#d7af87}.terminal .xterm-bg-color-180{background-color:#d7af87}.terminal .xterm-color-181{color:#d7afaf}.terminal .xterm-bg-color-181{background-color:#d7afaf}.terminal .xterm-color-182{color:#d7afd7}.terminal .xterm-bg-color-182{background-color:#d7afd7}.terminal .xterm-color-183{color:#d7afff}.terminal .xterm-bg-color-183{background-color:#d7afff}.terminal .xterm-color-184{color:#d7d700}.terminal .xterm-bg-color-184{background-color:#d7d700}.terminal .xterm-color-185{color:#d7d75f}.terminal .xterm-bg-color-185{background-color:#d7d75f}.terminal .xterm-color-186{color:#d7d787}.terminal .xterm-bg-color-186{background-color:#d7d787}.terminal .xterm-color-187{color:#d7d7af}.terminal .xterm-bg-color-187{background-color:#d7d7af}.terminal .xterm-color-188{color:#d7d7d7}.terminal .xterm-bg-color-188{background-color:#d7d7d7}.terminal .xterm-color-189{color:#d7d7ff}.terminal .xterm-bg-color-189{background-color:#d7d7ff}.terminal .xterm-color-190{color:#d7ff00}.terminal .xterm-bg-color-190{background-color:#d7ff00}.terminal .xterm-color-191{color:#d7ff5f}.terminal .xterm-bg-color-191{background-color:#d7ff5f}.terminal .xterm-color-192{color:#d7ff87}.terminal .xterm-bg-color-192{background-color:#d7ff87}.terminal .xterm-color-193{color:#d7ffaf}.terminal .xterm-bg-color-193{background-color:#d7ffaf}.terminal .xterm-color-194{color:#d7ffd7}.terminal .xterm-bg-color-194{background-color:#d7ffd7}.terminal .xterm-color-195{color:#d7ffff}.terminal .xterm-bg-color-195{background-color:#d7ffff}.terminal .xterm-color-196{color:red}.terminal .xterm-bg-color-196{background-color:red}.terminal .xterm-color-197{color:#ff005f}.terminal .xterm-bg-color-197{background-color:#ff005f}.terminal .xterm-color-198{color:#ff0087}.terminal .xterm-bg-color-198{background-color:#ff0087}.terminal .xterm-color-199{color:#ff00af}.terminal .xterm-bg-color-199{background-color:#ff00af}.terminal .xterm-color-200{color:#ff00d7}.terminal .xterm-bg-color-200{background-color:#ff00d7}.terminal .xterm-color-201{color:#f0f}.terminal .xterm-bg-color-201{background-color:#f0f}.terminal .xterm-color-202{color:#ff5f00}.terminal .xterm-bg-color-202{background-color:#ff5f00}.terminal .xterm-color-203{color:#ff5f5f}.terminal .xterm-bg-color-203{background-color:#ff5f5f}.terminal .xterm-color-204{color:#ff5f87}.terminal .xterm-bg-color-204{background-color:#ff5f87}.terminal .xterm-color-205{color:#ff5faf}.terminal .xterm-bg-color-205{background-color:#ff5faf}.terminal .xterm-color-206{color:#ff5fd7}.terminal .xterm-bg-color-206{background-color:#ff5fd7}.terminal .xterm-color-207{color:#ff5fff}.terminal .xterm-bg-color-207{background-color:#ff5fff}.terminal .xterm-color-208{color:#ff8700}.terminal .xterm-bg-color-208{background-color:#ff8700}.terminal .xterm-color-209{color:#ff875f}.terminal .xterm-bg-color-209{background-color:#ff875f}.terminal .xterm-color-210{color:#ff8787}.terminal .xterm-bg-color-210{background-color:#ff8787}.terminal .xterm-color-211{color:#ff87af}.terminal .xterm-bg-color-211{background-color:#ff87af}.terminal .xterm-color-212{color:#ff87d7}.terminal .xterm-bg-color-212{background-color:#ff87d7}.terminal .xterm-color-213{color:#ff87ff}.terminal .xterm-bg-color-213{background-color:#ff87ff}.terminal .xterm-color-214{color:#ffaf00}.terminal .xterm-bg-color-214{background-color:#ffaf00}.terminal .xterm-color-215{color:#ffaf5f}.terminal .xterm-bg-color-215{background-color:#ffaf5f}.terminal .xterm-color-216{color:#ffaf87}.terminal .xterm-bg-color-216{background-color:#ffaf87}.terminal .xterm-color-217{color:#ffafaf}.terminal .xterm-bg-color-217{background-color:#ffafaf}.terminal .xterm-color-218{color:#ffafd7}.terminal .xterm-bg-color-218{background-color:#ffafd7}.terminal .xterm-color-219{color:#ffafff}.terminal .xterm-bg-color-219{background-color:#ffafff}.terminal .xterm-color-220{color:gold}.terminal .xterm-bg-color-220{background-color:gold}.terminal .xterm-color-221{color:#ffd75f}.terminal .xterm-bg-color-221{background-color:#ffd75f}.terminal .xterm-color-222{color:#ffd787}.terminal .xterm-bg-color-222{background-color:#ffd787}.terminal .xterm-color-223{color:#ffd7af}.terminal .xterm-bg-color-223{background-color:#ffd7af}.terminal .xterm-color-224{color:#ffd7d7}.terminal .xterm-bg-color-224{background-color:#ffd7d7}.terminal .xterm-color-225{color:#ffd7ff}.terminal .xterm-bg-color-225{background-color:#ffd7ff}.terminal .xterm-color-226{color:#ff0}.terminal .xterm-bg-color-226{background-color:#ff0}.terminal .xterm-color-227{color:#ffff5f}.terminal .xterm-bg-color-227{background-color:#ffff5f}.terminal .xterm-color-228{color:#ffff87}.terminal .xterm-bg-color-228{background-color:#ffff87}.terminal .xterm-color-229{color:#ffffaf}.terminal .xterm-bg-color-229{background-color:#ffffaf}.terminal .xterm-color-230{color:#ffffd7}.terminal .xterm-bg-color-230{background-color:#ffffd7}.terminal .xterm-color-231{color:#fff}.terminal .xterm-bg-color-231{background-color:#fff}.terminal .xterm-color-232{color:#080808}.terminal .xterm-bg-color-232{background-color:#080808}.terminal .xterm-color-233{color:#121212}.terminal .xterm-bg-color-233{background-color:#121212}.terminal .xterm-color-234{color:#1c1c1c}.terminal .xterm-bg-color-234{background-color:#1c1c1c}.terminal .xterm-color-235{color:#262626}.terminal .xterm-bg-color-235{background-color:#262626}.terminal .xterm-color-236{color:#303030}.terminal .xterm-bg-color-236{background-color:#303030}.terminal .xterm-color-237{color:#3a3a3a}.terminal .xterm-bg-color-237{background-color:#3a3a3a}.terminal .xterm-color-238{color:#444}.terminal .xterm-bg-color-238{background-color:#444}.terminal .xterm-color-239{color:#4e4e4e}.terminal .xterm-bg-color-239{background-color:#4e4e4e}.terminal .xterm-color-240{color:#585858}.terminal .xterm-bg-color-240{background-color:#585858}.terminal .xterm-color-241{color:#626262}.terminal .xterm-bg-color-241{background-color:#626262}.terminal .xterm-color-242{color:#6c6c6c}.terminal .xterm-bg-color-242{background-color:#6c6c6c}.terminal .xterm-color-243{color:#767676}.terminal .xterm-bg-color-243{background-color:#767676}.terminal .xterm-color-244{color:gray}.terminal .xterm-bg-color-244{background-color:gray}.terminal .xterm-color-245{color:#8a8a8a}.terminal .xterm-bg-color-245{background-color:#8a8a8a}.terminal .xterm-color-246{color:#949494}.terminal .xterm-bg-color-246{background-color:#949494}.terminal .xterm-color-247{color:#9e9e9e}.terminal .xterm-bg-color-247{background-color:#9e9e9e}.terminal .xterm-color-248{color:#a8a8a8}.terminal .xterm-bg-color-248{background-color:#a8a8a8}.terminal .xterm-color-249{color:#b2b2b2}.terminal .xterm-bg-color-249{background-color:#b2b2b2}.terminal .xterm-color-250{color:#bcbcbc}.terminal .xterm-bg-color-250{background-color:#bcbcbc}.terminal .xterm-color-251{color:#c6c6c6}.terminal .xterm-bg-color-251{background-color:#c6c6c6}.terminal .xterm-color-252{color:#d0d0d0}.terminal .xterm-bg-color-252{background-color:#d0d0d0}.terminal .xterm-color-253{color:#dadada}.terminal .xterm-bg-color-253{background-color:#dadada}.terminal .xterm-color-254{color:#e4e4e4}.terminal .xterm-bg-color-254{background-color:#e4e4e4}.terminal .xterm-color-255{color:#eee}.terminal .xterm-bg-color-255{background-color:#eee}</style>
- <style>body,html{height:100%;min-height:100%;margin:0;overflow:hidden}#terminal-container{width:auto;height:100%;margin:0 auto;padding:5px 0 0 8px;background-color:#101010}.terminal{background-color:#101010;color:#f0f0f0;font-size:10pt;font-family:Menlo,Consolas,"DejaVu Sans Mono","Liberation Mono",Courier,monospace;font-variant-ligatures:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.terminal .xterm-viewport{background-color:rgba(121,121,121,0);-webkit-background-clip:text;-webkit-text-fill-color:transparent;transition:background-color 800ms linear}.terminal .xterm-viewport::-webkit-scrollbar{width:10px}.terminal .xterm-viewport::-webkit-scrollbar-track{opacity:0}.terminal .xterm-viewport::-webkit-scrollbar-thumb{background-color:rgba(121,121,121,.4)}.terminal .xterm-viewport::-webkit-scrollbar-thumb:hover{transition:opacity 0ms linear;background-color:rgba(100,100,100,.7)}.terminal .xterm-viewport::-webkit-scrollbar-thumb:window-inactive{background-color:inherit}.terminal .terminal-cursor{background-color:#f0f0f0;color:#101010;opacity:.7}.terminal:not(.focus) .terminal-cursor{outline:1px solid #f0f0f0}@keyframes blink-cursor{0%{background-color:#f0f0f0;color:#101010}50%{background-color:transparent;color:#f0f0f0}}</style>
- <script>!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Terminal=t()}}(function(){var t;return function t(e,i,r){function s(a,o){if(!i[a]){if(!e[a]){var l="function"==typeof require&&require;if(!o&&l)return l(a,!0);if(n)return n(a,!0);var h=new Error("Cannot find module '"+a+"'");throw h.code="MODULE_NOT_FOUND",h}var c=i[a]={exports:{}};e[a][0].call(c.exports,function(t){var i=e[a][1][t];return s(i?i:t)},c,c.exports,t,e,i,r)}return i[a].exports}for(var n="function"==typeof require&&require,a=0;a<r.length;a++)s(r[a]);return s}({1:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.CHARSETS={},i.DEFAULT_CHARSET=i.CHARSETS.B,i.CHARSETS[0]={"`":"◆",a:"▒",b:"\t",c:"\f",d:"\r",e:"\n",f:"°",g:"±",h:"",i:"\v",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},i.CHARSETS.A={"#":"£"},i.CHARSETS.B=null,i.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},i.CHARSETS.C=i.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},i.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},i.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},i.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},i.CHARSETS.E=i.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},i.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},i.CHARSETS.H=i.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},{}],2:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t,e,i){this.textarea=t,this.compositionView=e,this.terminal=i,this.isComposing=!1,this.isSendingComposition=!1,this.compositionPosition={start:null,end:null}}return t.prototype.compositionstart=function(){this.isComposing=!0,this.compositionPosition.start=this.textarea.value.length,this.compositionView.textContent="",this.compositionView.classList.add("active")},t.prototype.compositionupdate=function(t){var e=this;this.compositionView.textContent=t.data,this.updateCompositionElements(),setTimeout(function(){e.compositionPosition.end=e.textarea.value.length},0)},t.prototype.compositionend=function(){this.finalizeComposition(!0)},t.prototype.keydown=function(t){if(this.isComposing||this.isSendingComposition){if(229===t.keyCode)return!1;if(16===t.keyCode||17===t.keyCode||18===t.keyCode)return!1;this.finalizeComposition(!1)}return 229!==t.keyCode||(this.handleAnyTextareaChanges(),!1)},t.prototype.finalizeComposition=function(t){var e=this;if(this.compositionView.classList.remove("active"),this.isComposing=!1,this.clearTextareaPosition(),t){var i={start:this.compositionPosition.start,end:this.compositionPosition.end};this.isSendingComposition=!0,setTimeout(function(){if(e.isSendingComposition){e.isSendingComposition=!1;var t=void 0;t=e.isComposing?e.textarea.value.substring(i.start,i.end):e.textarea.value.substring(i.start),e.terminal.handler(t)}},0)}else{this.isSendingComposition=!1;var r=this.textarea.value.substring(this.compositionPosition.start,this.compositionPosition.end);this.terminal.handler(r)}},t.prototype.handleAnyTextareaChanges=function(){var t=this,e=this.textarea.value;setTimeout(function(){if(!t.isComposing){var i=t.textarea.value,r=i.replace(e,"");r.length>0&&t.terminal.handler(r)}},0)},t.prototype.updateCompositionElements=function(t){var e=this;if(this.isComposing){var i=this.terminal.element.querySelector(".terminal-cursor");if(i){var r=this.terminal.element.querySelector(".xterm-rows"),s=r.offsetTop+i.offsetTop;this.compositionView.style.left=i.offsetLeft+"px",this.compositionView.style.top=s+"px",this.compositionView.style.height=i.offsetHeight+"px",this.compositionView.style.lineHeight=i.offsetHeight+"px";var n=this.compositionView.getBoundingClientRect();this.textarea.style.left=i.offsetLeft+"px",this.textarea.style.top=s+"px",this.textarea.style.width=n.width+"px",this.textarea.style.height=n.height+"px",this.textarea.style.lineHeight=n.height+"px"}t||setTimeout(function(){return e.updateCompositionElements(!0)},0)}},t.prototype.clearTextareaPosition=function(){this.textarea.style.left="",this.textarea.style.top=""},t}();i.CompositionHelper=r},{}],3:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r;!function(t){t.NUL="\0",t.SOH="\ 1",t.STX="\ 2",t.ETX="\ 3",t.EOT="\ 4",t.ENQ="\ 5",t.ACK="\ 6",t.BEL="\a",t.BS="\b",t.HT="\t",t.LF="\n",t.VT="\v",t.FF="\f",t.CR="\r",t.SO="\ e",t.SI="\ f",t.DLE="\10",t.DC1="\11",t.DC2="\12",t.DC3="\13",t.DC4="\14",t.NAK="\15",t.SYN="\16",t.ETB="\17",t.CAN="\18",t.EM="\19",t.SUB="\1a",t.ESC="\e",t.FS="\1c",t.GS="\1d",t.RS="\1e",t.US="\1f",t.SP=" ",t.DEL="\7f"}(r=i.C0||(i.C0={}))},{}],4:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(){this._events=this._events||{}}return t.prototype.on=function(t,e){this._events[t]=this._events[t]||[],this._events[t].push(e)},t.prototype.off=function(t,e){if(this._events[t])for(var i=this._events[t],r=i.length;r--;)if(i[r]===e||i[r].listener===e)return void i.splice(r,1)},t.prototype.removeAllListeners=function(t){this._events[t]&&delete this._events[t]},t.prototype.once=function(t,e){function i(){var r=Array.prototype.slice.call(arguments);return this.off(t,i),e.apply(this,r)}return i.listener=e,this.on(t,i)},t.prototype.emit=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(this._events[t])for(var r=this._events[t],s=0;s<r.length;s++)r[s].apply(this,e)},t.prototype.listeners=function(t){return this._events[t]||[]},t}();i.EventEmitter=r},{}],5:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./EscapeSequences"),s=t("./Charsets"),n=function(){function t(t){this._terminal=t}return t.prototype.addChar=function(t,e){if(t>=" "){var i=a(e);this._terminal.charset&&this._terminal.charset[t]&&(t=this._terminal.charset[t]);var r=this._terminal.y+this._terminal.ybase;if(!i&&this._terminal.x)return void(this._terminal.lines.get(r)[this._terminal.x-1]&&(this._terminal.lines.get(r)[this._terminal.x-1][2]?this._terminal.lines.get(r)[this._terminal.x-1][1]+=t:this._terminal.lines.get(r)[this._terminal.x-2]&&(this._terminal.lines.get(r)[this._terminal.x-2][1]+=t),this._terminal.updateRange(this._terminal.y)));if(this._terminal.x+i-1>=this._terminal.cols)if(this._terminal.wraparoundMode)this._terminal.x=0,this._terminal.y++,this._terminal.y>this._terminal.scrollBottom&&(this._terminal.y--,this._terminal.scroll());else if(2===i)return;if(r=this._terminal.y+this._terminal.ybase,this._terminal.insertMode)for(var s=0;s<i;++s){var n=this._terminal.lines.get(this._terminal.y+this._terminal.ybase).pop();0===n[2]&&this._terminal.lines.get(r)[this._terminal.cols-2]&&2===this._terminal.lines.get(r)[this._terminal.cols-2][2]&&(this._terminal.lines.get(r)[this._terminal.cols-2]=[this._terminal.curAttr," ",1]),this._terminal.lines.get(r).splice(this._terminal.x,0,[this._terminal.curAttr," ",1])}this._terminal.lines.get(r)[this._terminal.x]=[this._terminal.curAttr,t,i],this._terminal.x++,this._terminal.updateRange(this._terminal.y),2===i&&(this._terminal.lines.get(r)[this._terminal.x]=[this._terminal.curAttr,"",0],this._terminal.x++)}},t.prototype.bell=function(){var t=this;this._terminal.visualBell&&(this._terminal.element.style.borderColor="white",setTimeout(function(){return t._terminal.element.style.borderColor=""},10),this._terminal.popOnBell&&this._terminal.focus())},t.prototype.lineFeed=function(){this._terminal.convertEol&&(this._terminal.x=0),this._terminal.y++,this._terminal.y>this._terminal.scrollBottom&&(this._terminal.y--,this._terminal.scroll()),this._terminal.x>=this._terminal.cols&&this._terminal.x--},t.prototype.carriageReturn=function(){this._terminal.x=0},t.prototype.backspace=function(){this._terminal.x>0&&this._terminal.x--},t.prototype.tab=function(){this._terminal.x=this._terminal.nextStop()},t.prototype.shiftOut=function(){this._terminal.setgLevel(1)},t.prototype.shiftIn=function(){this._terminal.setgLevel(0)},t.prototype.insertChars=function(t){var e,i,r,s;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,r=this._terminal.x,s=[this._terminal.eraseAttr()," ",1];e--&&r<this._terminal.cols;)this._terminal.lines.get(i).splice(r++,0,s),this._terminal.lines.get(i).pop()},t.prototype.cursorUp=function(t){var e=t[0];e<1&&(e=1),this._terminal.y-=e,this._terminal.y<0&&(this._terminal.y=0)},t.prototype.cursorDown=function(t){var e=t[0];e<1&&(e=1),this._terminal.y+=e,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x>=this._terminal.cols&&this._terminal.x--},t.prototype.cursorForward=function(t){var e=t[0];e<1&&(e=1),this._terminal.x+=e,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},t.prototype.cursorBackward=function(t){var e=t[0];e<1&&(e=1),this._terminal.x>=this._terminal.cols&&this._terminal.x--,this._terminal.x-=e,this._terminal.x<0&&(this._terminal.x=0)},t.prototype.cursorNextLine=function(t){var e=t[0];e<1&&(e=1),this._terminal.y+=e,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x=0},t.prototype.cursorPrecedingLine=function(t){var e=t[0];e<1&&(e=1),this._terminal.y-=e,this._terminal.y<0&&(this._terminal.y=0),this._terminal.x=0},t.prototype.cursorCharAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.x=e-1},t.prototype.cursorPosition=function(t){var e,i;e=t[0]-1,i=t.length>=2?t[1]-1:0,e<0?e=0:e>=this._terminal.rows&&(e=this._terminal.rows-1),i<0?i=0:i>=this._terminal.cols&&(i=this._terminal.cols-1),this._terminal.x=i,this._terminal.y=e},t.prototype.cursorForwardTab=function(t){for(var e=t[0]||1;e--;)this._terminal.x=this._terminal.nextStop()},t.prototype.eraseInDisplay=function(t){var e;switch(t[0]){case 0:for(this._terminal.eraseRight(this._terminal.x,this._terminal.y),e=this._terminal.y+1;e<this._terminal.rows;e++)this._terminal.eraseLine(e);break;case 1:for(this._terminal.eraseLeft(this._terminal.x,this._terminal.y),e=this._terminal.y;e--;)this._terminal.eraseLine(e);break;case 2:for(e=this._terminal.rows;e--;)this._terminal.eraseLine(e);break;case 3:var i=this._terminal.lines.length-this._terminal.rows;i>0&&(this._terminal.lines.trimStart(i),this._terminal.ybase=Math.max(this._terminal.ybase-i,0),this._terminal.ydisp=Math.max(this._terminal.ydisp-i,0))}},t.prototype.eraseInLine=function(t){switch(t[0]){case 0:this._terminal.eraseRight(this._terminal.x,this._terminal.y);break;case 1:this._terminal.eraseLeft(this._terminal.x,this._terminal.y);break;case 2:this._terminal.eraseLine(this._terminal.y)}},t.prototype.insertLines=function(t){var e,i,r;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,r=this._terminal.rows-1-this._terminal.scrollBottom,r=this._terminal.rows-1+this._terminal.ybase-r+1;e--;)this._terminal.lines.length===this._terminal.lines.maxLength&&(this._terminal.lines.trimStart(1),this._terminal.ybase--,this._terminal.ydisp--,i--,r--),this._terminal.lines.splice(i,0,this._terminal.blankLine(!0)),this._terminal.lines.splice(r,1);this._terminal.updateRange(this._terminal.y),this._terminal.updateRange(this._terminal.scrollBottom)},t.prototype.deleteLines=function(t){var e,i,r;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,r=this._terminal.rows-1-this._terminal.scrollBottom,r=this._terminal.rows-1+this._terminal.ybase-r;e--;)this._terminal.lines.length===this._terminal.lines.maxLength&&(this._terminal.lines.trimStart(1),this._terminal.ybase-=1,this._terminal.ydisp-=1),this._terminal.lines.splice(r+1,0,this._terminal.blankLine(!0)),this._terminal.lines.splice(i,1);this._terminal.updateRange(this._terminal.y),this._terminal.updateRange(this._terminal.scrollBottom)},t.prototype.deleteChars=function(t){var e,i,r;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,r=[this._terminal.eraseAttr()," ",1];e--;)this._terminal.lines.get(i).splice(this._terminal.x,1),this._terminal.lines.get(i).push(r)},t.prototype.scrollUp=function(t){for(var e=t[0]||1;e--;)this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollTop,1),this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollBottom,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.scrollTop),this._terminal.updateRange(this._terminal.scrollBottom)},t.prototype.scrollDown=function(t){for(var e=t[0]||1;e--;)this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollBottom,1),this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollTop,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.scrollTop),this._terminal.updateRange(this._terminal.scrollBottom)},t.prototype.eraseChars=function(t){var e,i,r,s;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,r=this._terminal.x,s=[this._terminal.eraseAttr()," ",1];e--&&r<this._terminal.cols;)this._terminal.lines.get(i)[r++]=s},t.prototype.cursorBackwardTab=function(t){for(var e=t[0]||1;e--;)this._terminal.x=this._terminal.prevStop()},t.prototype.charPosAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.x=e-1,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},t.prototype.HPositionRelative=function(t){var e=t[0];e<1&&(e=1),this._terminal.x+=e,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},t.prototype.repeatPrecedingCharacter=function(t){for(var e=t[0]||1,i=this._terminal.lines.get(this._terminal.ybase+this._terminal.y),r=i[this._terminal.x-1]||[this._terminal.defAttr," ",1];e--;)i[this._terminal.x++]=r},t.prototype.sendDeviceAttributes=function(t){t[0]>0||(this._terminal.prefix?">"===this._terminal.prefix&&(this._terminal.is("xterm")?this._terminal.send(r.C0.ESC+"[>0;276;0c"):this._terminal.is("rxvt-unicode")?this._terminal.send(r.C0.ESC+"[>85;95;0c"):this._terminal.is("linux")?this._terminal.send(t[0]+"c"):this._terminal.is("screen")&&this._terminal.send(r.C0.ESC+"[>83;40003;0c")):this._terminal.is("xterm")||this._terminal.is("rxvt-unicode")||this._terminal.is("screen")?this._terminal.send(r.C0.ESC+"[?1;2c"):this._terminal.is("linux")&&this._terminal.send(r.C0.ESC+"[?6c"))},t.prototype.linePosAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.y=e-1,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1)},t.prototype.VPositionRelative=function(t){var e=t[0];e<1&&(e=1),this._terminal.y+=e,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x>=this._terminal.cols&&this._terminal.x--},t.prototype.HVPosition=function(t){t[0]<1&&(t[0]=1),t[1]<1&&(t[1]=1),this._terminal.y=t[0]-1,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x=t[1]-1,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},t.prototype.tabClear=function(t){var e=t[0];e<=0?delete this._terminal.tabs[this._terminal.x]:3===e&&(this._terminal.tabs={})},t.prototype.setMode=function(t){if(t.length>1)for(var e=0;e<t.length;e++)this.setMode([t[e]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 1:this._terminal.applicationCursor=!0;break;case 2:this._terminal.setgCharset(0,s.DEFAULT_CHARSET),this._terminal.setgCharset(1,s.DEFAULT_CHARSET),this._terminal.setgCharset(2,s.DEFAULT_CHARSET),this._terminal.setgCharset(3,s.DEFAULT_CHARSET);break;case 3:this._terminal.savedCols=this._terminal.cols,this._terminal.resize(132,this._terminal.rows);break;case 6:this._terminal.originMode=!0;break;case 7:this._terminal.wraparoundMode=!0;break;case 12:break;case 66:this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this._terminal.x10Mouse=9===t[0],this._terminal.vt200Mouse=1e3===t[0],this._terminal.normalMouse=t[0]>1e3,this._terminal.mouseEvents=!0,this._terminal.element.style.cursor="default",this._terminal.log("Binding to mouse events.");break;case 1004:this._terminal.sendFocus=!0;break;case 1005:this._terminal.utfMouse=!0;break;case 1006:this._terminal.sgrMouse=!0;break;case 1015:this._terminal.urxvtMouse=!0;break;case 25:this._terminal.cursorHidden=!1;break;case 1049:case 47:case 1047:if(!this._terminal.normal){var i={lines:this._terminal.lines,ybase:this._terminal.ybase,ydisp:this._terminal.ydisp,x:this._terminal.x,y:this._terminal.y,scrollTop:this._terminal.scrollTop,scrollBottom:this._terminal.scrollBottom,tabs:this._terminal.tabs};this._terminal.reset(),this._terminal.viewport.syncScrollArea(),this._terminal.normal=i,this._terminal.showCursor()}}}else switch(t[0]){case 4:this._terminal.insertMode=!0;break;case 20:}},t.prototype.resetMode=function(t){if(t.length>1)for(var e=0;e<t.length;e++)this.resetMode([t[e]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 1:this._terminal.applicationCursor=!1;break;case 3:132===this._terminal.cols&&this._terminal.savedCols&&this._terminal.resize(this._terminal.savedCols,this._terminal.rows),delete this._terminal.savedCols;break;case 6:this._terminal.originMode=!1;break;case 7:this._terminal.wraparoundMode=!1;break;case 12:break;case 66:this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this._terminal.x10Mouse=!1,this._terminal.vt200Mouse=!1,this._terminal.normalMouse=!1,this._terminal.mouseEvents=!1,this._terminal.element.style.cursor="";break;case 1004:this._terminal.sendFocus=!1;break;case 1005:this._terminal.utfMouse=!1;break;case 1006:this._terminal.sgrMouse=!1;break;case 1015:this._terminal.urxvtMouse=!1;break;case 25:this._terminal.cursorHidden=!0;break;case 1049:case 47:case 1047:this._terminal.normal&&(this._terminal.lines=this._terminal.normal.lines,this._terminal.ybase=this._terminal.normal.ybase,this._terminal.ydisp=this._terminal.normal.ydisp,this._terminal.x=this._terminal.normal.x,this._terminal.y=this._terminal.normal.y,this._terminal.scrollTop=this._terminal.normal.scrollTop,this._terminal.scrollBottom=this._terminal.normal.scrollBottom,this._terminal.tabs=this._terminal.normal.tabs,this._terminal.normal=null,this._terminal.refresh(0,this._terminal.rows-1),this._terminal.viewport.syncScrollArea(),this._terminal.showCursor())}}else switch(t[0]){case 4:this._terminal.insertMode=!1;break;case 20:}},t.prototype.charAttributes=function(t){if(1===t.length&&0===t[0])return void(this._terminal.curAttr=this._terminal.defAttr);for(var e,i=t.length,r=0,s=this._terminal.curAttr>>18,n=this._terminal.curAttr>>9&511,a=511&this._terminal.curAttr;r<i;r++)e=t[r],e>=30&&e<=37?n=e-30:e>=40&&e<=47?a=e-40:e>=90&&e<=97?(e+=8,n=e-90):e>=100&&e<=107?(e+=8,a=e-100):0===e?(s=this._terminal.defAttr>>18,n=this._terminal.defAttr>>9&511,a=511&this._terminal.defAttr):1===e?s|=1:4===e?s|=2:5===e?s|=4:7===e?s|=8:8===e?s|=16:22===e?s&=-2:24===e?s&=-3:25===e?s&=-5:27===e?s&=-9:28===e?s&=-17:39===e?n=this._terminal.defAttr>>9&511:49===e?a=511&this._terminal.defAttr:38===e?2===t[r+1]?(r+=2,n=this._terminal.matchColor(255&t[r],255&t[r+1],255&t[r+2]),n===-1&&(n=511),r+=2):5===t[r+1]&&(r+=2,e=255&t[r],n=e):48===e?2===t[r+1]?(r+=2,a=this._terminal.matchColor(255&t[r],255&t[r+1],255&t[r+2]),a===-1&&(a=511),r+=2):5===t[r+1]&&(r+=2,e=255&t[r],a=e):100===e?(n=this._terminal.defAttr>>9&511,a=511&this._terminal.defAttr):this._terminal.error("Unknown SGR attribute: %d.",e);this._terminal.curAttr=s<<18|n<<9|a},t.prototype.deviceStatus=function(t){if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 6:this._terminal.send(r.C0.ESC+"[?"+(this._terminal.y+1)+";"+(this._terminal.x+1)+"R");break;case 15:break;case 25:break;case 26:break;case 53:}}else switch(t[0]){case 5:this._terminal.send(r.C0.ESC+"[0n");break;case 6:this._terminal.send(r.C0.ESC+"["+(this._terminal.y+1)+";"+(this._terminal.x+1)+"R")}},t.prototype.softReset=function(t){this._terminal.cursorHidden=!1,this._terminal.insertMode=!1,this._terminal.originMode=!1,this._terminal.wraparoundMode=!0,this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea(),this._terminal.applicationCursor=!1,this._terminal.scrollTop=0,this._terminal.scrollBottom=this._terminal.rows-1,this._terminal.curAttr=this._terminal.defAttr,this._terminal.x=this._terminal.y=0,this._terminal.charset=null,this._terminal.glevel=0,this._terminal.charsets=[null]},t.prototype.setCursorStyle=function(t){var e=t[0]<1?1:t[0];switch(e){case 1:case 2:this._terminal.setOption("cursorStyle","block");break;case 3:case 4:this._terminal.setOption("cursorStyle","underline");break;case 5:case 6:this._terminal.setOption("cursorStyle","bar")}var i=e%2===1;this._terminal.setOption("cursorBlink",i)},t.prototype.setScrollRegion=function(t){this._terminal.prefix||(this._terminal.scrollTop=(t[0]||1)-1,this._terminal.scrollBottom=(t[1]&&t[1]<=this._terminal.rows?t[1]:this._terminal.rows)-1,this._terminal.x=0,this._terminal.y=0)},t.prototype.saveCursor=function(t){this._terminal.savedX=this._terminal.x,this._terminal.savedY=this._terminal.y},t.prototype.restoreCursor=function(t){this._terminal.x=this._terminal.savedX||0,this._terminal.y=this._terminal.savedY||0},t}();i.InputHandler=n;var a=function(t){function e(t){var e,i=0,r=s.length-1;if(t<s[0][0]||t>s[r][1])return!1;for(;r>=i;)if(e=Math.floor((i+r)/2),t>s[e][1])i=e+1;else{if(!(t<s[e][0]))return!0;r=e-1}return!1}function i(i){return 0===i?t.nul:i<32||i>=127&&i<160?t.control:e(i)?0:r(i)?2:1}function r(t){return t>=4352&&(t<=4447||9001===t||9002===t||t>=11904&&t<=42191&&12351!==t||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65135||t>=65280&&t<=65376||t>=65504&&t<=65510||t>=131072&&t<=196605||t>=196608&&t<=262141)}var s=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];return i}({nul:0,control:0})},{"./Charsets":1,"./EscapeSequences":3}],6:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r="xterm-invalid-link",s="(https?:\\/\\/)",n="[\\da-z\\.-]+",a="[^\\da-z\\.-]+",o="("+n+")",l="([a-z\\.]{2,6})",h="((\\d{1,3}\\.){3}\\d{1,3})",c="(localhost)",u="(:\\d{1,5})",m="(("+o+"\\."+l+")|"+h+"|"+c+")"+u+"?",p="(\\/[\\/\\w\\.\\-%~]*)*",f="[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*",d="(\\?"+f+")?",_="(#"+f+")?",y="[^\\/\\w\\.\\-%]+",C=m+p+d+_,g="(?:^|"+a+")(",v=")($|"+y+")",b=new RegExp(g+s+C+v),k=0,w=function(){function t(){this._nextLinkMatcherId=k,this._rowTimeoutIds=[],this._linkMatchers=[],this.registerLinkMatcher(b,null,{matchIndex:1})}return t.prototype.attachToDom=function(t,e){this._document=t,this._rows=e},t.prototype.linkifyRow=function(e){if(this._document){var i=this._rowTimeoutIds[e];i&&clearTimeout(i),this._rowTimeoutIds[e]=setTimeout(this._linkifyRow.bind(this,e),t.TIME_BEFORE_LINKIFY)}},t.prototype.setHypertextLinkHandler=function(t){this._linkMatchers[k].handler=t},t.prototype.setHypertextValidationCallback=function(t){this._linkMatchers[k].validationCallback=t},t.prototype.registerLinkMatcher=function(t,e,i){if(void 0===i&&(i={}),this._nextLinkMatcherId!==k&&!e)throw new Error("handler must be defined");var r={id:this._nextLinkMatcherId++,regex:t,handler:e,matchIndex:i.matchIndex,validationCallback:i.validationCallback,priority:i.priority||0};return this._addLinkMatcherToList(r),r.id},t.prototype._addLinkMatcherToList=function(t){if(0===this._linkMatchers.length)return void this._linkMatchers.push(t);for(var e=this._linkMatchers.length-1;e>=0;e--)if(t.priority<=this._linkMatchers[e].priority)return void this._linkMatchers.splice(e+1,0,t);this._linkMatchers.splice(0,0,t)},t.prototype.deregisterLinkMatcher=function(t){for(var e=1;e<this._linkMatchers.length;e++)if(this._linkMatchers[e].id===t)return this._linkMatchers.splice(e,1),!0;return!1},t.prototype._linkifyRow=function(t){var e=this._rows[t];if(e)for(var i=(e.textContent,0);i<this._linkMatchers.length;i++){var s=this._linkMatchers[i],n=this._doLinkifyRow(e,s);if(n.length>0){if(s.validationCallback)for(var a=function(t){var e=n[t];s.validationCallback(e.textContent,e,function(t){t||e.classList.add(r)})},o=0;o<n.length;o++)a(o);return}}},t.prototype._doLinkifyRow=function(t,e){var i=[],r=e.id===k,s=t.childNodes,n=t.textContent.match(e.regex);if(!n||0===n.length)return i;for(var a=n["number"!=typeof e.matchIndex?0:e.matchIndex],o=n.index+a.length,l=0;l<s.length;l++){var h=s[l],c=h.textContent.indexOf(a);if(c>=0){var u=this._createAnchorElement(a,e.handler,r);if(h.textContent.length===a.length)if(3===h.nodeType)this._replaceNode(h,u);else{var m=h;if("A"===m.nodeName)return i;m.innerHTML="",m.appendChild(u)}else{var p=this._replaceNodeSubstringWithNode(h,u,a,c);l+=p}if(i.push(u),n=t.textContent.substring(o).match(e.regex),!n||0===n.length)return i;a=n["number"!=typeof e.matchIndex?0:e.matchIndex],o+=n.index+a.length}}return i},t.prototype._createAnchorElement=function(t,e,i){var s=this._document.createElement("a");return s.textContent=t,s.draggable=!1,i?(s.href=t,s.target="_blank",s.addEventListener("click",function(i){if(e)return e(i,t)})):s.addEventListener("click",function(i){if(!s.classList.contains(r))return e(i,t)}),s},t.prototype._replaceNode=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];for(var r=t.parentNode,s=0;s<e.length;s++)r.insertBefore(e[s],t);r.removeChild(t)},t.prototype._replaceNodeSubstringWithNode=function(t,e,i,r){var s=t;if(3!==s.nodeType&&(s=s.childNodes[0]),0===s.childNodes.length&&3!==s.nodeType)throw new Error("targetNode must be a text node or only contain a single text node");var n=s.textContent;if(0===r){var a=n.substring(i.length),o=this._document.createTextNode(a);return this._replaceNode(s,e,o),0}if(r===t.textContent.length-i.length){var l=n.substring(0,r),h=this._document.createTextNode(l);return this._replaceNode(s,h,e),0}var c=n.substring(0,r),u=this._document.createTextNode(c),m=n.substring(r+i.length),p=this._document.createTextNode(m);return this._replaceNode(s,u,e,p),1},t}();w.TIME_BEFORE_LINKIFY=200,i.Linkifier=w},{}],7:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./EscapeSequences"),s=t("./Charsets"),n={};n[r.C0.BEL]=function(t,e){return e.bell()},n[r.C0.LF]=function(t,e){return e.lineFeed()},n[r.C0.VT]=n[r.C0.LF],n[r.C0.FF]=n[r.C0.LF],n[r.C0.CR]=function(t,e){return e.carriageReturn()},n[r.C0.BS]=function(t,e){return e.backspace()},n[r.C0.HT]=function(t,e){return e.tab()},n[r.C0.SO]=function(t,e){return e.shiftOut()},n[r.C0.SI]=function(t,e){return e.shiftIn()},n[r.C0.ESC]=function(t,e){return t.setState(h.ESCAPED)};var a={};a["["]=function(t,e){e.params=[],e.currentParam=0,t.setState(h.CSI_PARAM)},a["]"]=function(t,e){e.params=[],e.currentParam=0,t.setState(h.OSC)},a.P=function(t,e){e.params=[],e.currentParam=0,t.setState(h.DCS)},a._=function(t,e){t.setState(h.IGNORE)},a["^"]=function(t,e){t.setState(h.IGNORE)},a.c=function(t,e){e.reset()},a.E=function(t,e){e.x=0,e.index(),t.setState(h.NORMAL)},a.D=function(t,e){e.index(),t.setState(h.NORMAL)},a.M=function(t,e){e.reverseIndex(),t.setState(h.NORMAL)},a["%"]=function(t,e){e.setgLevel(0),e.setgCharset(0,s.DEFAULT_CHARSET),t.setState(h.NORMAL),t.skipNextChar()},a[r.C0.CAN]=function(t){return t.setState(h.NORMAL)};var o={};o["?"]=function(t){return t.setPrefix("?")},o[">"]=function(t){return t.setPrefix(">")},o["!"]=function(t){return t.setPrefix("!")},o[0]=function(t){return t.setParam(10*t.getParam())},o[1]=function(t){return t.setParam(10*t.getParam()+1)},o[2]=function(t){return t.setParam(10*t.getParam()+2)},o[3]=function(t){return t.setParam(10*t.getParam()+3)},o[4]=function(t){return t.setParam(10*t.getParam()+4)},o[5]=function(t){return t.setParam(10*t.getParam()+5)},o[6]=function(t){return t.setParam(10*t.getParam()+6)},o[7]=function(t){return t.setParam(10*t.getParam()+7)},o[8]=function(t){return t.setParam(10*t.getParam()+8)},o[9]=function(t){return t.setParam(10*t.getParam()+9)},o.$=function(t){return t.setPostfix("$")},o['"']=function(t){return t.setPostfix('"')},o[" "]=function(t){return t.setPostfix(" ")},o["'"]=function(t){return t.setPostfix("'")},o[";"]=function(t){return t.finalizeParam()},o[r.C0.CAN]=function(t){return t.setState(h.NORMAL)};var l={};l["@"]=function(t,e,i){return t.insertChars(e)},l.A=function(t,e,i){return t.cursorUp(e)},l.B=function(t,e,i){return t.cursorDown(e)},l.C=function(t,e,i){return t.cursorForward(e)},l.D=function(t,e,i){return t.cursorBackward(e)},l.E=function(t,e,i){return t.cursorNextLine(e)},l.F=function(t,e,i){return t.cursorPrecedingLine(e)},l.G=function(t,e,i){return t.cursorCharAbsolute(e)},l.H=function(t,e,i){return t.cursorPosition(e)},l.I=function(t,e,i){return t.cursorForwardTab(e)},l.J=function(t,e,i){return t.eraseInDisplay(e)},l.K=function(t,e,i){return t.eraseInLine(e)},l.L=function(t,e,i){return t.insertLines(e)},l.M=function(t,e,i){return t.deleteLines(e)},l.P=function(t,e,i){return t.deleteChars(e)},l.S=function(t,e,i){return t.scrollUp(e)},l.T=function(t,e,i){e.length<2&&!i&&t.scrollDown(e)},l.X=function(t,e,i){return t.eraseChars(e)},l.Z=function(t,e,i){return t.cursorBackwardTab(e)},l["`"]=function(t,e,i){return t.charPosAbsolute(e)},l.a=function(t,e,i){return t.HPositionRelative(e)},l.b=function(t,e,i){return t.repeatPrecedingCharacter(e)},l.c=function(t,e,i){return t.sendDeviceAttributes(e)},l.d=function(t,e,i){return t.linePosAbsolute(e)},l.e=function(t,e,i){return t.VPositionRelative(e)},l.f=function(t,e,i){return t.HVPosition(e)},l.g=function(t,e,i){return t.tabClear(e)},l.h=function(t,e,i){return t.setMode(e)},l.l=function(t,e,i){return t.resetMode(e)},l.m=function(t,e,i){return t.charAttributes(e)},l.n=function(t,e,i){return t.deviceStatus(e)},l.p=function(t,e,i){switch(i){case"!":
-t.softReset(e)}},l.q=function(t,e,i,r){" "===r&&t.setCursorStyle(e)},l.r=function(t,e){return t.setScrollRegion(e)},l.s=function(t,e){return t.saveCursor(e)},l.u=function(t,e){return t.restoreCursor(e)},l[r.C0.CAN]=function(t,e,i,r,s){return s.setState(h.NORMAL)};var h;!function(t){t[t.NORMAL=0]="NORMAL",t[t.ESCAPED=1]="ESCAPED",t[t.CSI_PARAM=2]="CSI_PARAM",t[t.CSI=3]="CSI",t[t.OSC=4]="OSC",t[t.CHARSET=5]="CHARSET",t[t.DCS=6]="DCS",t[t.IGNORE=7]="IGNORE"}(h||(h={}));var c=function(){function t(t,e){this._inputHandler=t,this._terminal=e,this._state=h.NORMAL}return t.prototype.parse=function(t){var e,i,c,u,m=t.length;for(this._position=0,this._terminal.surrogate_high&&(t=this._terminal.surrogate_high+t,this._terminal.surrogate_high="");this._position<m;this._position++){if(i=t[this._position],c=t.charCodeAt(this._position),55296<=c&&c<=56319){if(u=t.charCodeAt(this._position+1),isNaN(u)){this._terminal.surrogate_high=i;continue}c=1024*(c-55296)+(u-56320)+65536,i+=t.charAt(this._position+1)}if(!(56320<=c&&c<=57343))switch(this._state){case h.NORMAL:i in n?n[i](this,this._inputHandler):this._inputHandler.addChar(i,c);break;case h.ESCAPED:if(i in a){a[i](this,this._terminal);break}switch(i){case"(":case")":case"*":case"+":case"-":case".":switch(i){case"(":this._terminal.gcharset=0;break;case")":this._terminal.gcharset=1;break;case"*":this._terminal.gcharset=2;break;case"+":this._terminal.gcharset=3;break;case"-":this._terminal.gcharset=1;break;case".":this._terminal.gcharset=2}this._state=h.CHARSET;break;case"/":this._terminal.gcharset=3,this._state=h.CHARSET,this._position--;break;case"N":break;case"O":break;case"n":this._terminal.setgLevel(2);break;case"o":this._terminal.setgLevel(3);break;case"|":this._terminal.setgLevel(3);break;case"}":this._terminal.setgLevel(2);break;case"~":this._terminal.setgLevel(1);break;case"7":this._inputHandler.saveCursor(),this._state=h.NORMAL;break;case"8":this._inputHandler.restoreCursor(),this._state=h.NORMAL;break;case"#":this._state=h.NORMAL,this._position++;break;case"H":this._terminal.tabSet(),this._state=h.NORMAL;break;case"=":this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport.syncScrollArea(),this._state=h.NORMAL;break;case">":this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea(),this._state=h.NORMAL;break;default:this._state=h.NORMAL,this._terminal.error("Unknown ESC control: %s.",i)}break;case h.CHARSET:i in s.CHARSETS?(e=s.CHARSETS[i],"/"===i&&this.skipNextChar()):e=s.DEFAULT_CHARSET,this._terminal.setgCharset(this._terminal.gcharset,e),this._terminal.gcharset=null,this._state=h.NORMAL;break;case h.OSC:if(i===r.C0.ESC||i===r.C0.BEL){switch(i===r.C0.ESC&&this._position++,this._terminal.params.push(this._terminal.currentParam),this._terminal.params[0]){case 0:case 1:case 2:this._terminal.params[1]&&(this._terminal.title=this._terminal.params[1],this._terminal.handleTitle(this._terminal.title));break;case 3:break;case 4:case 5:break;case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:break;case 46:break;case 50:break;case 51:break;case 52:break;case 104:case 105:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:}this._terminal.params=[],this._terminal.currentParam=0,this._state=h.NORMAL}else this._terminal.params.length?this._terminal.currentParam+=i:i>="0"&&i<="9"?this._terminal.currentParam=10*this._terminal.currentParam+i.charCodeAt(0)-48:";"===i&&(this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam="");break;case h.CSI_PARAM:if(i in o){o[i](this);break}this.finalizeParam(),this._state=h.CSI;case h.CSI:i in l?l[i](this._inputHandler,this._terminal.params,this._terminal.prefix,this._terminal.postfix,this):this._terminal.error("Unknown CSI code: %s.",i),this._state=h.NORMAL,this._terminal.prefix="",this._terminal.postfix="";break;case h.DCS:if(i===r.C0.ESC||i===r.C0.BEL){i===r.C0.ESC&&this._position++;var p=void 0,f=void 0;switch(this._terminal.prefix){case"":break;case"$q":switch(p=this._terminal.currentParam,f=!1,p){case'"q':p='0"q';break;case'"p':p='61"p';break;case"r":p=""+(this._terminal.scrollTop+1)+";"+(this._terminal.scrollBottom+1)+"r";break;case"m":p="0m";break;default:this._terminal.error("Unknown DCS Pt: %s.",p),p=""}this._terminal.send(r.C0.ESC+"P"+ +f+"$r"+p+r.C0.ESC+"\\");break;case"+p":break;case"+q":p=this._terminal.currentParam,f=!1,this._terminal.send(r.C0.ESC+"P"+ +f+"+r"+p+r.C0.ESC+"\\");break;default:this._terminal.error("Unknown DCS prefix: %s.",this._terminal.prefix)}this._terminal.currentParam=0,this._terminal.prefix="",this._state=h.NORMAL}else this._terminal.currentParam?this._terminal.currentParam+=i:this._terminal.prefix||"$"===i||"+"===i?2===this._terminal.prefix.length?this._terminal.currentParam=i:this._terminal.prefix+=i:this._terminal.currentParam=i;break;case h.IGNORE:i!==r.C0.ESC&&i!==r.C0.BEL||(i===r.C0.ESC&&this._position++,this._state=h.NORMAL)}}return this._state},t.prototype.setState=function(t){this._state=t},t.prototype.setPrefix=function(t){this._terminal.prefix=t},t.prototype.setPostfix=function(t){this._terminal.postfix=t},t.prototype.setParam=function(t){this._terminal.currentParam=t},t.prototype.getParam=function(){return this._terminal.currentParam},t.prototype.finalizeParam=function(){this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam=0},t.prototype.skipNextChar=function(){this._position++},t}();i.Parser=c},{"./Charsets":1,"./EscapeSequences":3}],8:[function(t,e,i){"use strict";function r(t){var e=t.ownerDocument,i=e.createElement("span");i.innerHTML="hello world",t.appendChild(i);var r=i.offsetWidth,s=i.offsetHeight;i.style.fontWeight="bold";var n=i.offsetWidth,a=i.offsetHeight;return t.removeChild(i),r!==n||s!==a}Object.defineProperty(i,"__esModule",{value:!0});var s,n=t("./utils/DomElementObjectPool"),a=5;!function(t){t[t.BOLD=1]="BOLD",t[t.UNDERLINE=2]="UNDERLINE",t[t.BLINK=4]="BLINK",t[t.INVERSE=8]="INVERSE",t[t.INVISIBLE=16]="INVISIBLE"}(s||(s={}));var o=null,l=function(){function t(t){this._terminal=t,this._refreshRowsQueue=[],this._refreshFramesSkipped=0,this._refreshAnimationFrame=null,this._spanElementObjectPool=new n.DomElementObjectPool("span"),null===o&&(o=r(this._terminal.element)),this._spanElementObjectPool=new n.DomElementObjectPool("span")}return t.prototype.queueRefresh=function(t,e){this._refreshRowsQueue.push({start:t,end:e}),this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(this._refreshLoop.bind(this)))},t.prototype._refreshLoop=function(){var t=this._terminal.writeBuffer.length>0&&this._refreshFramesSkipped++<=a;if(t)return void(this._refreshAnimationFrame=window.requestAnimationFrame(this._refreshLoop.bind(this)));this._refreshFramesSkipped=0;var e,i;if(this._refreshRowsQueue.length>4)e=0,i=this._terminal.rows-1;else{e=this._refreshRowsQueue[0].start,i=this._refreshRowsQueue[0].end;for(var r=1;r<this._refreshRowsQueue.length;r++)this._refreshRowsQueue[r].start<e&&(e=this._refreshRowsQueue[r].start),this._refreshRowsQueue[r].end>i&&(i=this._refreshRowsQueue[r].end)}this._refreshRowsQueue=[],this._refreshAnimationFrame=null,this._refresh(e,i)},t.prototype._refresh=function(t,e){var i;e-t>=this._terminal.rows/2&&(i=this._terminal.element.parentNode,i&&this._terminal.element.removeChild(this._terminal.rowContainer));var r=this._terminal.cols,n=t;for(e>=this._terminal.rows&&(this._terminal.log("`end` is too large. Most likely a bad CSR."),e=this._terminal.rows-1);n<=e;n++){var a=n+this._terminal.ydisp,l=this._terminal.lines.get(a),h=void 0;h=this._terminal.y===n-(this._terminal.ybase-this._terminal.ydisp)&&this._terminal.cursorState&&!this._terminal.cursorHidden?this._terminal.x:-1;for(var c=this._terminal.defAttr,u=document.createDocumentFragment(),m="",p=void 0;this._terminal.children[n].children.length;){var f=this._terminal.children[n].children[0];this._terminal.children[n].removeChild(f),this._spanElementObjectPool.release(f)}for(var d=0;d<r;d++){var _=l[d][0],y=l[d][1],C=l[d][2];if(C){if(d===h&&(_=-1),_!==c&&(c!==this._terminal.defAttr&&(m&&(p.innerHTML=m,m=""),u.appendChild(p),p=null),_!==this._terminal.defAttr))if(m&&!p&&(p=this._spanElementObjectPool.acquire()),p&&(m&&(p.innerHTML=m,m=""),u.appendChild(p)),p=this._spanElementObjectPool.acquire(),_===-1)p.classList.add("reverse-video","terminal-cursor");else{var g=511&_,v=_>>9&511,b=_>>18;if(b&s.BOLD&&(o||p.classList.add("xterm-bold"),v<8&&(v+=8)),b&s.UNDERLINE&&p.classList.add("xterm-underline"),b&s.BLINK&&p.classList.add("xterm-blink"),b&s.INVERSE){var k=g;g=v,v=k,1&b&&v<8&&(v+=8)}b&s.INVISIBLE&&p.classList.add("xterm-hidden"),b&s.INVERSE&&(257===g&&(g=15),256===v&&(v=0)),g<256&&p.classList.add("xterm-bg-color-"+g),v<256&&p.classList.add("xterm-color-"+v)}if(2===C)m+='<span class="xterm-wide-char">'+y+"</span>";else if(y.charCodeAt(0)>255)m+='<span class="xterm-normal-char">'+y+"</span>";else switch(y){case"&":m+="&";break;case"<":m+="<";break;case">":m+=">";break;default:m+=y<=" "?" ":y}c=_}}m&&!p&&(p=this._spanElementObjectPool.acquire()),p&&(m&&(p.innerHTML=m,m=""),u.appendChild(p),p=null),this._terminal.children[n].appendChild(u)}i&&this._terminal.element.appendChild(this._terminal.rowContainer),this._terminal.emit("refresh",{element:this._terminal.element,start:t,end:e})},t}();i.Renderer=l},{"./utils/DomElementObjectPool":14}],9:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t,e,i,r){var s=this;this.terminal=t,this.viewportElement=e,this.scrollArea=i,this.charMeasure=r,this.currentRowHeight=0,this.lastRecordedBufferLength=0,this.lastRecordedViewportHeight=0,this.terminal.on("scroll",this.syncScrollArea.bind(this)),this.terminal.on("resize",this.syncScrollArea.bind(this)),this.viewportElement.addEventListener("scroll",this.onScroll.bind(this)),setTimeout(function(){return s.syncScrollArea()},0)}return t.prototype.refresh=function(){if(this.charMeasure.height>0){var t=this.charMeasure.height!==this.currentRowHeight;t&&(this.currentRowHeight=this.charMeasure.height,this.viewportElement.style.lineHeight=this.charMeasure.height+"px",this.terminal.rowContainer.style.lineHeight=this.charMeasure.height+"px");var e=this.lastRecordedViewportHeight!==this.terminal.rows;(t||e)&&(this.lastRecordedViewportHeight=this.terminal.rows,this.viewportElement.style.height=this.charMeasure.height*this.terminal.rows+"px"),this.scrollArea.style.height=this.charMeasure.height*this.lastRecordedBufferLength+"px"}},t.prototype.syncScrollArea=function(){this.lastRecordedBufferLength!==this.terminal.lines.length?(this.lastRecordedBufferLength=this.terminal.lines.length,this.refresh()):this.lastRecordedViewportHeight!==this.terminal.rows?this.refresh():this.charMeasure.height!==this.currentRowHeight&&this.refresh();var t=this.terminal.ydisp*this.currentRowHeight;this.viewportElement.scrollTop!==t&&(this.viewportElement.scrollTop=t)},t.prototype.onScroll=function(t){var e=Math.round(this.viewportElement.scrollTop/this.currentRowHeight),i=e-this.terminal.ydisp;this.terminal.scrollDisp(i,!0)},t.prototype.onWheel=function(t){if(0!==t.deltaY){var e=1;t.deltaMode===WheelEvent.DOM_DELTA_LINE?e=this.currentRowHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e=this.currentRowHeight*this.terminal.rows),this.viewportElement.scrollTop+=t.deltaY*e,t.preventDefault()}},t}();i.Viewport=r},{}],10:[function(t,e,i){"use strict";function r(t){var e=String.fromCharCode(32),i=String.fromCharCode(160),r=new RegExp(i,"g"),s=t.split("\n").map(function(t){var i=t.replace(/\s+$/g,"").replace(r,e);return i}).join("\n");return s}function s(t,e){return e?t.replace(/\r?\n/g,"\n"):t}function n(t,e){var i=window.getSelection().toString(),s=r(i);e.browser.isMSIE?window.clipboardData.setData("Text",s):t.clipboardData.setData("text/plain",s),t.preventDefault()}function a(t,e){t.stopPropagation();var i,r=function(i){return i=s(i,e.browser.isMSWindows),e.handler(i),e.textarea.value="",e.emit("paste",i),e.cancel(t)};e.browser.isMSIE?window.clipboardData&&(i=window.clipboardData.getData("Text"),r(i)):t.clipboardData&&(i=t.clipboardData.getData("text/plain"),r(i))}function o(t,e){var i=document.getSelection(),s=r(i.toString()),n=!1,a=t.clientX,o=t.clientY;if(i.rangeCount){for(var l=i.getRangeAt(0),h=l.getClientRects(),c=0;c<h.length;c++){var u=h[c];if(n=a>u.left&&a<u.right&&o>u.top&&o<u.bottom)break}!s.match(/^\s$/)&&s.length||(n=!1)}n||(e.textarea.style.position="fixed",e.textarea.style.width="20px",e.textarea.style.height="20px",e.textarea.style.left=a-10+"px",e.textarea.style.top=o-10+"px",e.textarea.style.zIndex="1000",e.textarea.focus(),setTimeout(function(){e.textarea.style.position=null,e.textarea.style.width=null,e.textarea.style.height=null,e.textarea.style.left=null,e.textarea.style.top=null,e.textarea.style.zIndex=null},4))}Object.defineProperty(i,"__esModule",{value:!0}),i.prepareTextForClipboard=r,i.prepareTextForTerminal=s,i.copyHandler=n,i.pasteHandler=a,i.rightClickHandler=o},{}],11:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./Generic"),s="undefined"==typeof navigator,n=s?"node":navigator.userAgent,a=s?"node":navigator.platform;i.isFirefox=!!~n.indexOf("Firefox"),i.isMSIE=!!~n.indexOf("MSIE")||!!~n.indexOf("Trident"),i.isMac=r.contains(["Macintosh","MacIntel","MacPPC","Mac68K"],a),i.isIpad="iPad"===a,i.isIphone="iPhone"===a,i.isMSWindows=r.contains(["Windows","Win16","Win32","WinCE"],a)},{"./Generic":15}],12:[function(t,e,i){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(i,"__esModule",{value:!0});var s=t("../EventEmitter.js"),n=function(t){function e(e,i){var r=t.call(this)||this;return r._document=e,r._parentElement=i,r}return r(e,t),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),e.prototype.measure=function(){var t=this;this._measureElement?this._doMeasure():(this._measureElement=this._document.createElement("span"),this._measureElement.style.position="absolute",this._measureElement.style.top="0",this._measureElement.style.left="-9999em",this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement),setTimeout(function(){return t._doMeasure()},0))},e.prototype._doMeasure=function(){var t=this._measureElement.getBoundingClientRect();0!==t.width&&0!==t.height&&(this._width===t.width&&this._height===t.height||(this._width=t.width,this._height=t.height,this.emit("charsizechanged")))},e}(s.EventEmitter);i.CharMeasure=n},{"../EventEmitter.js":4}],13:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t){this._array=new Array(t),this._startIndex=0,this._length=0}return Object.defineProperty(t.prototype,"maxLength",{get:function(){return this._array.length},set:function(t){for(var e=new Array(t),i=0;i<Math.min(t,this.length);i++)e[i]=this._array[this._getCyclicIndex(i)];this._array=e,this._startIndex=0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._length},set:function(t){if(t>this._length)for(var e=this._length;e<t;e++)this._array[e]=void 0;this._length=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"forEach",{get:function(){return this._array.forEach},enumerable:!0,configurable:!0}),t.prototype.get=function(t){return this._array[this._getCyclicIndex(t)]},t.prototype.set=function(t,e){this._array[this._getCyclicIndex(t)]=e},t.prototype.push=function(t){this._array[this._getCyclicIndex(this._length)]=t,this._length===this.maxLength?(this._startIndex++,this._startIndex===this.maxLength&&(this._startIndex=0)):this._length++},t.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length-- -1)]},t.prototype.splice=function(t,e){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];if(e){for(var s=t;s<this._length-e;s++)this._array[this._getCyclicIndex(s)]=this._array[this._getCyclicIndex(s+e)];this._length-=e}if(i&&i.length){for(var s=this._length-1;s>=t;s--)this._array[this._getCyclicIndex(s+i.length)]=this._array[this._getCyclicIndex(s)];for(var s=0;s<i.length;s++)this._array[this._getCyclicIndex(t+s)]=i[s];this._length+i.length>this.maxLength?(this._startIndex+=this._length+i.length-this.maxLength,this._length=this.maxLength):this._length+=i.length}},t.prototype.trimStart=function(t){t>this._length&&(t=this._length),this._startIndex+=t,this._length-=t},t.prototype.shiftElements=function(t,e,i){if(!(e<=0)){if(t<0||t>=this._length)throw new Error("start argument out of range");if(t+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(i>0){for(var r=e-1;r>=0;r--)this.set(t+r+i,this.get(t+r));var s=t+e+i-this._length;if(s>0)for(this._length+=s;this._length>this.maxLength;)this._length--,this._startIndex++}else for(var r=0;r<e;r++)this.set(t+r+i,this.get(t+r))}},t.prototype._getCyclicIndex=function(t){return(this._startIndex+t)%this.maxLength},t}();i.CircularList=r},{}],14:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t){this.type=t,this._type=t,this._pool=[],this._inUse={}}return t.prototype.acquire=function(){var e;return e=0===this._pool.length?this._createNew():this._pool.pop(),this._inUse[e.getAttribute(t.OBJECT_ID_ATTRIBUTE)]=e,e},t.prototype.release=function(e){if(!this._inUse[e.getAttribute(t.OBJECT_ID_ATTRIBUTE)])throw new Error("Could not release an element not yet acquired");delete this._inUse[e.getAttribute(t.OBJECT_ID_ATTRIBUTE)],this._cleanElement(e),this._pool.push(e)},t.prototype._createNew=function(){var e=document.createElement(this._type),i=t._objectCount++;return e.setAttribute(t.OBJECT_ID_ATTRIBUTE,i.toString(10)),e},t.prototype._cleanElement=function(t){t.className="",t.innerHTML=""},t}();r.OBJECT_ID_ATTRIBUTE="data-obj-id",r._objectCount=0,i.DomElementObjectPool=r},{}],15:[function(t,e,i){"use strict";function r(t,e){return t.indexOf(e)>=0}Object.defineProperty(i,"__esModule",{value:!0}),i.contains=r},{}],16:[function(t,e,i){"use strict";function r(t,e,i){if(null==t.pageX)return null;for(var r=t.pageX,s=t.pageY,n=e;n&&n!==self.document.documentElement;)r-=n.offsetLeft,s-=n.offsetTop,n="offsetParent"in n?n.offsetParent:n.parentElement;return r=Math.ceil(r/i.width),s=Math.ceil(s/i.height),[r,s]}function s(t,e,i,s,n){var a=r(t,e,i),o=a[0],l=a[1];return o=Math.min(Math.max(o,0),s),l=Math.min(Math.max(l,0),n),o+=32,l+=32,{x:o,y:l}}Object.defineProperty(i,"__esModule",{value:!0}),i.getCoords=r,i.getRawByteCoords=s},{}],17:[function(e,i,r){"use strict";function s(t){var e=this;if(!(this instanceof s))return new s(arguments[0],arguments[1],arguments[2]);e.browser=S,e.cancel=s.cancel,d.EventEmitter.call(this),"number"==typeof t&&(t={cols:arguments[0],rows:arguments[1],handler:arguments[2]}),t=t||{},Object.keys(s.defaults).forEach(function(i){null==t[i]&&(t[i]=s.options[i],s[i]!==s.defaults[i]&&(t[i]=s[i])),e[i]=t[i]}),8===t.colors.length?t.colors=t.colors.concat(s._colors.slice(8)):16===t.colors.length?t.colors=t.colors.concat(s._colors.slice(16)):10===t.colors.length?t.colors=t.colors.slice(0,-2).concat(s._colors.slice(8,-2),t.colors.slice(-2)):18===t.colors.length&&(t.colors=t.colors.concat(s._colors.slice(16,-2),t.colors.slice(-2))),this.colors=t.colors,this.options=t,this.parent=t.body||t.parent||(M?M.getElementsByTagName("body")[0]:null),this.cols=t.cols||t.geometry[0],this.rows=t.rows||t.geometry[1],this.geometry=[this.cols,this.rows],t.handler&&this.on("data",t.handler),this.ybase=0,this.ydisp=0,this.x=0,this.y=0,this.cursorState=0,this.cursorHidden=!1,this.convertEol,this.queue="",this.scrollTop=0,this.scrollBottom=this.rows-1,this.customKeydownHandler=null,this.cursorBlinkInterval=null,this.applicationKeypad=!1,this.applicationCursor=!1,this.originMode=!1,this.insertMode=!1,this.wraparoundMode=!0,this.normal=null,this.charset=null,this.gcharset=null,this.glevel=0,this.charsets=[null],this.decLocator,this.x10Mouse,this.vt200Mouse,this.vt300Mouse,this.normalMouse,this.mouseEvents,this.sendFocus,this.utfMouse,this.sgrMouse,this.urxvtMouse,this.element,this.children,this.refreshStart,this.refreshEnd,this.savedX,this.savedY,this.savedCols,this.readable=!0,this.writable=!0,this.defAttr=131840,this.curAttr=this.defAttr,this.params=[],this.currentParam=0,this.prefix="",this.postfix="",this.inputHandler=new v.InputHandler(this),this.parser=new b.Parser(this.inputHandler,this),this.renderer=this.renderer||null,this.linkifier=this.linkifier||new w.Linkifier,this.writeBuffer=[],this.writeInProgress=!1,this.xoffSentToCatchUp=!1,this.writeStopped=!1,this.surrogate_high="",this.lines=new C.CircularList(this.scrollback);for(var i=this.rows;i--;)this.lines.push(this.blankLine());this.tabs,this.setupStops(),this.userScrolling=!1}function n(t,e,i,r){Array.isArray(t)||(t=[t]),t.forEach(function(t){t.addEventListener(e,i,r||!1)})}function a(t,e,i,r){t.removeEventListener(e,i,r||!1)}function o(t,e){if(this.cancelEvents||e)return t.preventDefault(),t.stopPropagation(),!1}function l(t,e){function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i}function h(t,e){var i=t.browser.isMac&&e.altKey&&!e.ctrlKey&&!e.metaKey||t.browser.isMSWindows&&e.altKey&&e.ctrlKey&&!e.metaKey;return"keypress"==e.type?i:i&&(!e.keyCode||e.keyCode>47)}function c(t,e,i){var r=t<<16|e<<8|i;if(null!=c._cache[r])return c._cache[r];for(var n,a,o,l,h,u=1/0,m=-1,p=0;p<s.vcolors.length;p++){if(n=s.vcolors[p],a=n[0],o=n[1],l=n[2],h=c.distance(t,e,i,a,o,l),0===h){m=p;break}h<u&&(u=h,m=p)}return c._cache[r]=m}function u(t,e,i){if(t.forEach)return t.forEach(e,i);for(var r=0;r<t.length;r++)e.call(i,t[r],r,t)}function m(t){return 16===t.keyCode||17===t.keyCode||18===t.keyCode}function p(t){if(Object.keys)return Object.keys(t);var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i}Object.defineProperty(r,"__esModule",{value:!0});var f=e("./CompositionHelper"),d=e("./EventEmitter"),_=e("./Viewport"),y=e("./handlers/Clipboard"),C=e("./utils/CircularList"),g=e("./EscapeSequences"),v=e("./InputHandler"),b=e("./Parser"),k=e("./Renderer"),w=e("./Linkifier"),x=e("./utils/CharMeasure"),S=e("./utils/Browser"),E=e("./utils/Mouse"),M="undefined"!=typeof window?window.document:null,A=5,L=300,R=600;l(s,d.EventEmitter),s.prototype.eraseAttr=function(){return this.defAttr&-512|511&this.curAttr},s.tangoColors=["#2e3436","#cc0000","#4e9a06","#c4a000","#3465a4","#75507b","#06989a","#d3d7cf","#555753","#ef2929","#8ae234","#fce94f","#729fcf","#ad7fa8","#34e2e2","#eeeeec"],s.colors=function(){function t(t,i,s){r.push("#"+e(t)+e(i)+e(s))}function e(t){return t=t.toString(16),t.length<2?"0"+t:t}var i,r=s.tangoColors.slice(),n=[0,95,135,175,215,255];for(i=0;i<216;i++)t(n[i/36%6|0],n[i/6%6|0],n[i%6]);for(i=0;i<24;i++)n=8+10*i,t(n,n,n);return r}(),s._colors=s.colors.slice(),s.vcolors=function(){for(var t,e=[],i=s.colors,r=0;r<256;r++)t=parseInt(i[r].substring(1),16),e.push([t>>16&255,t>>8&255,255&t]);return e}(),s.defaults={colors:s.colors,theme:"default",convertEol:!1,termName:"xterm",geometry:[80,24],cursorBlink:!1,cursorStyle:"block",visualBell:!1,popOnBell:!1,scrollback:1e3,screenKeys:!1,debug:!1,cancelEvents:!1,disableStdin:!1,useFlowControl:!1,tabStopWidth:8},s.options={},s.focus=null,u(p(s.defaults),function(t){s[t]=s.defaults[t],s.options[t]=s.defaults[t]}),s.prototype.focus=function(){return this.textarea.focus()},s.prototype.getOption=function(t,e){if(!(t in s.defaults))throw new Error('No option with key "'+t+'"');return"undefined"!=typeof this.options[t]?this.options[t]:this[t]},s.prototype.setOption=function(t,e){if(!(t in s.defaults))throw new Error('No option with key "'+t+'"');switch(t){case"scrollback":if(this.options[t]!==e){if(this.lines.length>e){var i=this.lines.length-e,r=this.ydisp-i<0;this.lines.trimStart(i),this.ybase=Math.max(this.ybase-i,0),this.ydisp=Math.max(this.ydisp-i,0),r&&this.refresh(0,this.rows-1)}this.lines.maxLength=e,this.viewport.syncScrollArea()}}switch(this[t]=e,this.options[t]=e,t){case"cursorBlink":this.setCursorBlinking(e);break;case"cursorStyle":this.element.classList.toggle("xterm-cursor-style-underline","underline"===e),this.element.classList.toggle("xterm-cursor-style-bar","bar"===e);break;case"tabStopWidth":this.setupStops()}},s.prototype.restartCursorBlinking=function(){this.setCursorBlinking(this.options.cursorBlink)},s.prototype.setCursorBlinking=function(t){if(this.element.classList.toggle("xterm-cursor-blink",t),this.clearCursorBlinkingInterval(),t){var e=this;this.cursorBlinkInterval=setInterval(function(){e.element.classList.toggle("xterm-cursor-blink-on")},R)}},s.prototype.clearCursorBlinkingInterval=function(){this.element.classList.remove("xterm-cursor-blink-on"),this.cursorBlinkInterval&&(clearInterval(this.cursorBlinkInterval),this.cursorBlinkInterval=null)},s.bindFocus=function(t){n(t.textarea,"focus",function(e){t.sendFocus&&t.send(g.C0.ESC+"[I"),t.element.classList.add("focus"),t.showCursor(),t.restartCursorBlinking.apply(t),s.focus=t,t.emit("focus",{terminal:t})})},s.prototype.blur=function(){return this.textarea.blur()},s.bindBlur=function(t){n(t.textarea,"blur",function(e){t.refresh(t.y,t.y),t.sendFocus&&t.send(g.C0.ESC+"[O"),t.element.classList.remove("focus"),t.clearCursorBlinkingInterval.apply(t),s.focus=null,t.emit("blur",{terminal:t})})},s.prototype.initGlobal=function(){function t(t){y.rightClickHandler.call(this,t,e)}var e=this;s.bindKeys(this),s.bindFocus(this),s.bindBlur(this),n(this.element,"copy",function(t){y.copyHandler.call(this,t,e)}),n(this.textarea,"paste",function(t){y.pasteHandler.call(this,t,e)}),n(this.element,"paste",function(t){y.pasteHandler.call(this,t,e)}),e.browser.isFirefox?n(this.element,"mousedown",function(e){2==e.button&&t(e)}):n(this.element,"contextmenu",t)},s.bindKeys=function(t){n(t.element,"keydown",function(e){M.activeElement==this&&t.keyDown(e)},!0),n(t.element,"keypress",function(e){M.activeElement==this&&t.keyPress(e)},!0),n(t.element,"keyup",function(e){m(e)||t.focus(t)},!0),n(t.textarea,"keydown",function(e){t.keyDown(e)},!0),n(t.textarea,"keypress",function(e){t.keyPress(e),this.value=""},!0),n(t.textarea,"compositionstart",t.compositionHelper.compositionstart.bind(t.compositionHelper)),n(t.textarea,"compositionupdate",t.compositionHelper.compositionupdate.bind(t.compositionHelper)),n(t.textarea,"compositionend",t.compositionHelper.compositionend.bind(t.compositionHelper)),t.on("refresh",t.compositionHelper.updateCompositionElements.bind(t.compositionHelper)),t.on("refresh",function(e){t.queueLinkification(e.start,e.end)})},s.prototype.insertRow=function(t){return"object"!=typeof t&&(t=M.createElement("div")),this.rowContainer.appendChild(t),this.children.push(t),t},s.prototype.open=function(t,e){var i=this,r=0;if(this.parent=t||this.parent,!this.parent)throw new Error("Terminal requires a parent element.");for(this.context=this.parent.ownerDocument.defaultView,this.document=this.parent.ownerDocument,this.body=this.document.getElementsByTagName("body")[0],this.element=this.document.createElement("div"),this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.classList.add("xterm-theme-"+this.theme),this.setCursorBlinking(this.options.cursorBlink),this.element.style.height,this.element.setAttribute("tabindex",0),this.viewportElement=M.createElement("div"),this.viewportElement.classList.add("xterm-viewport"),this.element.appendChild(this.viewportElement),this.viewportScrollArea=M.createElement("div"),this.viewportScrollArea.classList.add("xterm-scroll-area"),this.viewportElement.appendChild(this.viewportScrollArea),this.rowContainer=M.createElement("div"),this.rowContainer.classList.add("xterm-rows"),this.element.appendChild(this.rowContainer),this.children=[],this.linkifier.attachToDom(M,this.children),this.helperContainer=M.createElement("div"),this.helperContainer.classList.add("xterm-helpers"),this.element.appendChild(this.helperContainer),this.textarea=M.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.textarea.addEventListener("focus",function(){i.emit("focus",{terminal:i})}),this.textarea.addEventListener("blur",function(){i.emit("blur",{terminal:i})}),this.helperContainer.appendChild(this.textarea),this.compositionView=M.createElement("div"),this.compositionView.classList.add("composition-view"),this.compositionHelper=new f.CompositionHelper(this.textarea,this.compositionView,this),this.helperContainer.appendChild(this.compositionView),this.charSizeStyleElement=M.createElement("style"),this.helperContainer.appendChild(this.charSizeStyleElement);r<this.rows;r++)this.insertRow();if(this.parent.appendChild(this.element),this.charMeasure=new x.CharMeasure(M,this.helperContainer),this.charMeasure.on("charsizechanged",function(){i.updateCharSizeCSS()}),this.charMeasure.measure(),this.viewport=new _.Viewport(this,this.viewportElement,this.viewportScrollArea,this.charMeasure),this.renderer=new k.Renderer(this),this.refresh(0,this.rows-1),this.initGlobal(),"undefined"==typeof e){var s="You did not pass the `focus` argument in `Terminal.prototype.open()`.\n";s+="The `focus` argument now defaults to `true` but starting with xterm.js 3.0 ",s+="it will default to `false`.",console.warn(s),e=!0}e&&this.focus(),n(this.element,"click",function(){var t=M.getSelection(),e=t.isCollapsed,r="boolean"==typeof e?!e:"Range"==t.type;r||i.focus()}),this.bindMouse(),this.emit("open")},s.loadAddon=function(s,n){return"object"==typeof r&&"object"==typeof i?e("./addons/"+s+"/"+s):"function"==typeof t?e(["./addons/"+s+"/"+s],n):(console.error("Cannot load a module without a CommonJS or RequireJS environment."),!1)},s.prototype.updateCharSizeCSS=function(){this.charSizeStyleElement.textContent=".xterm-wide-char{width:"+2*this.charMeasure.width+"px;}"+(".xterm-normal-char{width:"+this.charMeasure.width+"px;}")},s.prototype.bindMouse=function(){function t(t){var e,i;if(e=s(t),i=E.getRawByteCoords(t,l.rowContainer,l.charMeasure,l.cols,l.rows))switch(r(e,i),t.overrideType||t.type){case"mousedown":h=e;break;case"mouseup":h=32;break;case"wheel":}}function e(t){var e,i=h;e=E.getRawByteCoords(t,l.rowContainer,l.charMeasure,l.cols,l.rows),e&&(i+=32,r(i,e))}function i(t,e){if(l.utfMouse){if(2047===e)return t.push(0);e<127?t.push(e):(e>2047&&(e=2047),t.push(192|e>>6),t.push(128|63&e))}else{if(255===e)return t.push(0);e>127&&(e=127),t.push(e)}}function r(t,e){if(l.vt300Mouse){t&=3,e.x-=32,e.y-=32;var r=g.C0.ESC+"[24";if(0===t)r+="1";else if(1===t)r+="3";else if(2===t)r+="5";else{if(3===t)return;r+="0"}return r+="~["+e.x+","+e.y+"]\r",void l.send(r)}if(l.decLocator)return t&=3,e.x-=32,e.y-=32,0===t?t=2:1===t?t=4:2===t?t=6:3===t&&(t=3),void l.send(g.C0.ESC+"["+t+";"+(3===t?4:0)+";"+e.y+";"+e.x+";"+(e.page||0)+"&w");if(l.urxvtMouse)return e.x-=32,e.y-=32,e.x++,e.y++,void l.send(g.C0.ESC+"["+t+";"+e.x+";"+e.y+"M");if(l.sgrMouse)return e.x-=32,e.y-=32,void l.send(g.C0.ESC+"[<"+((3===(3&t)?t&-4:t)-32)+";"+e.x+";"+e.y+(3===(3&t)?"m":"M"));var r=[];i(r,t),i(r,e.x),i(r,e.y),l.send(g.C0.ESC+"[M"+String.fromCharCode.apply(String,r))}function s(t){var e,i,r,s,n;switch(t.overrideType||t.type){case"mousedown":e=null!=t.button?+t.button:null!=t.which?t.which-1:null,l.browser.isMSIE&&(e=1===e?0:4===e?1:e);
-break;case"mouseup":e=3;break;case"DOMMouseScroll":e=t.detail<0?64:65;break;case"wheel":e=t.wheelDeltaY>0?64:65}return i=t.shiftKey?4:0,r=t.metaKey?8:0,s=t.ctrlKey?16:0,n=i|r|s,l.vt200Mouse?n&=s:l.normalMouse||(n=0),e=32+(n<<2)+e}var o=this.element,l=this,h=32;n(o,"mousedown",function(i){if(l.mouseEvents)return t(i),l.focus(),l.vt200Mouse?(i.overrideType="mouseup",t(i),l.cancel(i)):(l.normalMouse&&n(l.document,"mousemove",e),l.x10Mouse||n(l.document,"mouseup",function i(r){return t(r),l.normalMouse&&a(l.document,"mousemove",e),a(l.document,"mouseup",i),l.cancel(r)}),l.cancel(i))}),n(o,"wheel",function(e){if(l.mouseEvents&&!(l.x10Mouse||l.vt300Mouse||l.decLocator))return t(e),l.cancel(e)}),n(o,"wheel",function(t){if(!l.mouseEvents)return l.viewport.onWheel(t),l.cancel(t)})},s.prototype.destroy=function(){this.readable=!1,this.writable=!1,this._events={},this.handler=function(){},this.write=function(){},this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},s.prototype.refresh=function(t,e){this.renderer&&this.renderer.queueRefresh(t,e)},s.prototype.queueLinkification=function(t,e){if(this.linkifier)for(var i=t;i<=e;i++)this.linkifier.linkifyRow(i)},s.prototype.showCursor=function(){this.cursorState||(this.cursorState=1,this.refresh(this.y,this.y))},s.prototype.scroll=function(){var t;this.lines.length===this.lines.maxLength&&(this.lines.trimStart(1),this.ybase--,0!==this.ydisp&&this.ydisp--),this.ybase++,this.userScrolling||(this.ydisp=this.ybase),t=this.ybase+this.rows-1,t-=this.rows-1-this.scrollBottom,t===this.lines.length?this.lines.push(this.blankLine()):this.lines.splice(t,0,this.blankLine()),0!==this.scrollTop&&(0!==this.ybase&&(this.ybase--,this.userScrolling||(this.ydisp=this.ybase)),this.lines.splice(this.ybase+this.scrollTop,1)),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom),this.emit("scroll",this.ydisp)},s.prototype.scrollDisp=function(t,e){t<0?this.userScrolling=!0:t+this.ydisp>=this.ybase&&(this.userScrolling=!1),this.ydisp+=t,this.ydisp>this.ybase?this.ydisp=this.ybase:this.ydisp<0&&(this.ydisp=0),e||this.emit("scroll",this.ydisp),this.refresh(0,this.rows-1)},s.prototype.scrollPages=function(t){this.scrollDisp(t*(this.rows-1))},s.prototype.scrollToTop=function(){this.scrollDisp(-this.ydisp)},s.prototype.scrollToBottom=function(){this.scrollDisp(this.ybase-this.ydisp)},s.prototype.write=function(t){if(this.writeBuffer.push(t),this.options.useFlowControl&&!this.xoffSentToCatchUp&&this.writeBuffer.length>=A&&(this.send(g.C0.DC3),this.xoffSentToCatchUp=!0),!this.writeInProgress&&this.writeBuffer.length>0){this.writeInProgress=!0;var e=this;setTimeout(function(){e.innerWrite()})}},s.prototype.innerWrite=function(){for(var t=this.writeBuffer.splice(0,L);t.length>0;){var e=t.shift();e.length;this.xoffSentToCatchUp&&0===t.length&&0===this.writeBuffer.length&&(this.send(g.C0.DC1),this.xoffSentToCatchUp=!1),this.refreshStart=this.y,this.refreshEnd=this.y;var i=this.parser.parse(e);this.parser.setState(i),this.updateRange(this.y),this.refresh(this.refreshStart,this.refreshEnd)}if(this.writeBuffer.length>0){var r=this;setTimeout(function(){r.innerWrite()},0)}else this.writeInProgress=!1},s.prototype.writeln=function(t){this.write(t+"\r\n")},s.prototype.attachCustomKeydownHandler=function(t){this.customKeydownHandler=t},s.prototype.setHypertextLinkHandler=function(t){if(!this.linkifier)throw new Error("Cannot attach a hypertext link handler before Terminal.open is called");this.linkifier.setHypertextLinkHandler(t),this.refresh(0,this.rows-1)},s.prototype.setHypertextValidationCallback=function(t){if(!this.linkifier)throw new Error("Cannot attach a hypertext validation callback before Terminal.open is called");this.linkifier.setHypertextValidationCallback(t),this.refresh(0,this.rows-1)},s.prototype.registerLinkMatcher=function(t,e,i){if(this.linkifier){var r=this.linkifier.registerLinkMatcher(t,e,i);return this.refresh(0,this.rows-1),r}},s.prototype.deregisterLinkMatcher=function(t){this.linkifier&&this.linkifier.deregisterLinkMatcher(t)&&this.refresh(0,this.rows-1)},s.prototype.keyDown=function(t){if(this.customKeydownHandler&&this.customKeydownHandler(t)===!1)return!1;if(this.restartCursorBlinking(),!this.compositionHelper.keydown.bind(this.compositionHelper)(t))return this.ybase!==this.ydisp&&this.scrollToBottom(),!1;var e=this.evaluateKeyEscapeSequence(t);return e.key===g.C0.DC3?this.writeStopped=!0:e.key===g.C0.DC1&&(this.writeStopped=!1),e.scrollDisp?(this.scrollDisp(e.scrollDisp),this.cancel(t,!0)):!!h(this,t)||(e.cancel&&this.cancel(t,!0),!e.key||(this.emit("keydown",t),this.emit("key",e.key,t),this.showCursor(),this.handler(e.key),this.cancel(t,!0)))},s.prototype.evaluateKeyEscapeSequence=function(t){var e={cancel:!1,key:void 0,scrollDisp:void 0},i=t.shiftKey<<0|t.altKey<<1|t.ctrlKey<<2|t.metaKey<<3;switch(t.keyCode){case 8:if(t.shiftKey){e.key=g.C0.BS;break}e.key=g.C0.DEL;break;case 9:if(t.shiftKey){e.key=g.C0.ESC+"[Z";break}e.key=g.C0.HT,e.cancel=!0;break;case 13:e.key=g.C0.CR,e.cancel=!0;break;case 27:e.key=g.C0.ESC,e.cancel=!0;break;case 37:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"D",e.key==g.C0.ESC+"[1;3D"&&(e.key=this.browser.isMac?g.C0.ESC+"b":g.C0.ESC+"[1;5D")):this.applicationCursor?e.key=g.C0.ESC+"OD":e.key=g.C0.ESC+"[D";break;case 39:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"C",e.key==g.C0.ESC+"[1;3C"&&(e.key=this.browser.isMac?g.C0.ESC+"f":g.C0.ESC+"[1;5C")):this.applicationCursor?e.key=g.C0.ESC+"OC":e.key=g.C0.ESC+"[C";break;case 38:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"A",e.key==g.C0.ESC+"[1;3A"&&(e.key=g.C0.ESC+"[1;5A")):this.applicationCursor?e.key=g.C0.ESC+"OA":e.key=g.C0.ESC+"[A";break;case 40:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"B",e.key==g.C0.ESC+"[1;3B"&&(e.key=g.C0.ESC+"[1;5B")):this.applicationCursor?e.key=g.C0.ESC+"OB":e.key=g.C0.ESC+"[B";break;case 45:t.shiftKey||t.ctrlKey||(e.key=g.C0.ESC+"[2~");break;case 46:i?e.key=g.C0.ESC+"[3;"+(i+1)+"~":e.key=g.C0.ESC+"[3~";break;case 36:i?e.key=g.C0.ESC+"[1;"+(i+1)+"H":this.applicationCursor?e.key=g.C0.ESC+"OH":e.key=g.C0.ESC+"[H";break;case 35:i?e.key=g.C0.ESC+"[1;"+(i+1)+"F":this.applicationCursor?e.key=g.C0.ESC+"OF":e.key=g.C0.ESC+"[F";break;case 33:t.shiftKey?e.scrollDisp=-(this.rows-1):e.key=g.C0.ESC+"[5~";break;case 34:t.shiftKey?e.scrollDisp=this.rows-1:e.key=g.C0.ESC+"[6~";break;case 112:i?e.key=g.C0.ESC+"[1;"+(i+1)+"P":e.key=g.C0.ESC+"OP";break;case 113:i?e.key=g.C0.ESC+"[1;"+(i+1)+"Q":e.key=g.C0.ESC+"OQ";break;case 114:i?e.key=g.C0.ESC+"[1;"+(i+1)+"R":e.key=g.C0.ESC+"OR";break;case 115:i?e.key=g.C0.ESC+"[1;"+(i+1)+"S":e.key=g.C0.ESC+"OS";break;case 116:i?e.key=g.C0.ESC+"[15;"+(i+1)+"~":e.key=g.C0.ESC+"[15~";break;case 117:i?e.key=g.C0.ESC+"[17;"+(i+1)+"~":e.key=g.C0.ESC+"[17~";break;case 118:i?e.key=g.C0.ESC+"[18;"+(i+1)+"~":e.key=g.C0.ESC+"[18~";break;case 119:i?e.key=g.C0.ESC+"[19;"+(i+1)+"~":e.key=g.C0.ESC+"[19~";break;case 120:i?e.key=g.C0.ESC+"[20;"+(i+1)+"~":e.key=g.C0.ESC+"[20~";break;case 121:i?e.key=g.C0.ESC+"[21;"+(i+1)+"~":e.key=g.C0.ESC+"[21~";break;case 122:i?e.key=g.C0.ESC+"[23;"+(i+1)+"~":e.key=g.C0.ESC+"[23~";break;case 123:i?e.key=g.C0.ESC+"[24;"+(i+1)+"~":e.key=g.C0.ESC+"[24~";break;default:!t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?this.browser.isMac||!t.altKey||t.ctrlKey||t.metaKey||(t.keyCode>=65&&t.keyCode<=90?e.key=g.C0.ESC+String.fromCharCode(t.keyCode+32):192===t.keyCode?e.key=g.C0.ESC+"`":t.keyCode>=48&&t.keyCode<=57&&(e.key=g.C0.ESC+(t.keyCode-48))):t.keyCode>=65&&t.keyCode<=90?e.key=String.fromCharCode(t.keyCode-64):32===t.keyCode?e.key=String.fromCharCode(0):t.keyCode>=51&&t.keyCode<=55?e.key=String.fromCharCode(t.keyCode-51+27):56===t.keyCode?e.key=String.fromCharCode(127):219===t.keyCode?e.key=String.fromCharCode(27):220===t.keyCode?e.key=String.fromCharCode(28):221===t.keyCode&&(e.key=String.fromCharCode(29))}return e},s.prototype.setgLevel=function(t){this.glevel=t,this.charset=this.charsets[t]},s.prototype.setgCharset=function(t,e){this.charsets[t]=e,this.glevel===t&&(this.charset=e)},s.prototype.keyPress=function(t){var e;if(this.cancel(t),t.charCode)e=t.charCode;else if(null==t.which)e=t.keyCode;else{if(0===t.which||0===t.charCode)return!1;e=t.which}return!(!e||(t.altKey||t.ctrlKey||t.metaKey)&&!h(this,t))&&(e=String.fromCharCode(e),this.emit("keypress",e,t),this.emit("key",e,t),this.showCursor(),this.handler(e),!1)},s.prototype.send=function(t){var e=this;this.queue||setTimeout(function(){e.handler(e.queue),e.queue=""},1),this.queue+=t},s.prototype.bell=function(){if(this.visualBell){var t=this;this.element.style.borderColor="white",setTimeout(function(){t.element.style.borderColor=""},10),this.popOnBell&&this.focus()}},s.prototype.log=function(){if(this.debug&&this.context.console&&this.context.console.log){var t=Array.prototype.slice.call(arguments);this.context.console.log.apply(this.context.console,t)}},s.prototype.error=function(){if(this.debug&&this.context.console&&this.context.console.error){var t=Array.prototype.slice.call(arguments);this.context.console.error.apply(this.context.console,t)}},s.prototype.resize=function(t,e){if(!isNaN(t)&&!isNaN(e)){var i,r,s,n,a;if(t!==this.cols||e!==this.rows){if(t<1&&(t=1),e<1&&(e=1),s=this.cols,s<t)for(n=[this.defAttr," ",1],r=this.lines.length;r--;)for(;this.lines.get(r).length<t;)this.lines.get(r).push(n);if(this.cols=t,this.setupStops(this.cols),s=this.rows,a=0,s<e)for(i=this.element;s++<e;)this.lines.length<e+this.ybase&&(this.ybase>0&&this.lines.length<=this.ybase+this.y+a+1?(this.ybase--,a++,this.ydisp>0&&this.ydisp--):this.lines.push(this.blankLine())),this.children.length<e&&this.insertRow();else for(;s-- >e;)if(this.lines.length>e+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++)),this.children.length>e){if(i=this.children.shift(),!i)continue;i.parentNode.removeChild(i)}this.rows=e,this.y>=e&&(this.y=e-1),a&&(this.y+=a),this.x>=t&&(this.x=t-1),this.scrollTop=0,this.scrollBottom=e-1,this.charMeasure.measure(),this.refresh(0,this.rows-1),this.normal=null,this.geometry=[this.cols,this.rows],this.emit("resize",{terminal:this,cols:t,rows:e})}}},s.prototype.updateRange=function(t){t<this.refreshStart&&(this.refreshStart=t),t>this.refreshEnd&&(this.refreshEnd=t)},s.prototype.maxRange=function(){this.refreshStart=0,this.refreshEnd=this.rows-1},s.prototype.setupStops=function(t){for(null!=t?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t<this.cols;t+=this.getOption("tabStopWidth"))this.tabs[t]=!0},s.prototype.prevStop=function(t){for(null==t&&(t=this.x);!this.tabs[--t]&&t>0;);return t>=this.cols?this.cols-1:t<0?0:t},s.prototype.nextStop=function(t){for(null==t&&(t=this.x);!this.tabs[++t]&&t<this.cols;);return t>=this.cols?this.cols-1:t<0?0:t},s.prototype.eraseRight=function(t,e){var i=this.lines.get(this.ybase+e);if(i){for(var r=[this.eraseAttr()," ",1];t<this.cols;t++)i[t]=r;this.updateRange(e)}},s.prototype.eraseLeft=function(t,e){var i=this.lines.get(this.ybase+e);if(i){var r=[this.eraseAttr()," ",1];for(t++;t--;)i[t]=r;this.updateRange(e)}},s.prototype.clear=function(){if(0!==this.ybase||0!==this.y){this.lines.set(0,this.lines.get(this.ybase+this.y)),this.lines.length=1,this.ydisp=0,this.ybase=0,this.y=0;for(var t=1;t<this.rows;t++)this.lines.push(this.blankLine());this.refresh(0,this.rows-1),this.emit("scroll",this.ydisp)}},s.prototype.eraseLine=function(t){this.eraseRight(0,t)},s.prototype.blankLine=function(t){for(var e=t?this.eraseAttr():this.defAttr,i=[e," ",1],r=[],s=0;s<this.cols;s++)r[s]=i;return r},s.prototype.ch=function(t){return t?[this.eraseAttr()," ",1]:[this.defAttr," ",1]},s.prototype.is=function(t){var e=this.termName;return 0===(e+"").indexOf(t)},s.prototype.handler=function(t){this.options.disableStdin||(this.ybase!==this.ydisp&&this.scrollToBottom(),this.emit("data",t))},s.prototype.handleTitle=function(t){this.emit("title",t)},s.prototype.index=function(){this.y++,this.y>this.scrollBottom&&(this.y--,this.scroll()),this.x>=this.cols&&this.x--},s.prototype.reverseIndex=function(){this.y===this.scrollTop?(this.lines.shiftElements(this.y+this.ybase,this.rows-1,1),this.lines.set(this.y+this.ybase,this.blankLine(!0)),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom)):this.y--},s.prototype.reset=function(){this.options.rows=this.rows,this.options.cols=this.cols;var t=this.customKeydownHandler,e=this.cursorBlinkInterval;s.call(this,this.options),this.customKeydownHandler=t,this.cursorBlinkInterval=e,this.refresh(0,this.rows-1),this.viewport.syncScrollArea()},s.prototype.tabSet=function(){this.tabs[this.x]=!0},s.prototype.matchColor=c,c._cache={},c.distance=function(t,e,i,r,s,n){return Math.pow(30*(t-r),2)+Math.pow(59*(e-s),2)+Math.pow(11*(i-n),2)},s.EventEmitter=d.EventEmitter,s.inherits=l,s.on=n,s.off=a,s.cancel=o,i.exports=s},{"./CompositionHelper":2,"./EscapeSequences":3,"./EventEmitter":4,"./InputHandler":5,"./Linkifier":6,"./Parser":7,"./Renderer":8,"./Viewport":9,"./handlers/Clipboard":10,"./utils/Browser":11,"./utils/CharMeasure":12,"./utils/CircularList":13,"./utils/Mouse":16}]},{},[17])(17)});</script>
+ <style>.terminal{background-color:#000;color:#fff;font-family:courier-new,courier,monospace;font-feature-settings:"liga" 0;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.terminal.focus,.terminal:focus{outline:none}.terminal .xterm-helpers{position:absolute;top:0}.terminal .xterm-helper-textarea{position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-10;white-space:nowrap;overflow:hidden;resize:none}.terminal a{color:inherit;text-decoration:none}.terminal a:hover{cursor:pointer;text-decoration:underline}.terminal a.xterm-invalid-link:hover{cursor:text;text-decoration:none}.terminal.focus:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar) .terminal-cursor{background-color:#fff;color:#000}.terminal:not(.focus) .terminal-cursor{outline:1px solid #fff;outline-offset:-1px;background-color:transparent}.terminal:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar).focus.xterm-cursor-blink-on .terminal-cursor{background-color:transparent;color:inherit}.terminal.xterm-cursor-style-bar .terminal-cursor,.terminal.xterm-cursor-style-underline .terminal-cursor{position:relative}.terminal.xterm-cursor-style-bar .terminal-cursor::before,.terminal.xterm-cursor-style-underline .terminal-cursor::before{content:"";display:block;position:absolute;background-color:#fff}.terminal.xterm-cursor-style-bar .terminal-cursor::before{top:0;bottom:0;left:0;width:1px}.terminal.xterm-cursor-style-underline .terminal-cursor::before{bottom:0;left:0;right:0;height:1px}.terminal.xterm-cursor-style-bar.focus.xterm-cursor-blink.xterm-cursor-blink-on .terminal-cursor::before,.terminal.xterm-cursor-style-underline.focus.xterm-cursor-blink.xterm-cursor-blink-on .terminal-cursor::before{background-color:transparent}.terminal.xterm-cursor-style-bar.focus.xterm-cursor-blink .terminal-cursor::before,.terminal.xterm-cursor-style-underline.focus.xterm-cursor-blink .terminal-cursor::before{background-color:#fff}.terminal .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.terminal .composition-view.active{display:block}.terminal .xterm-viewport{background-color:#000;overflow-y:scroll}.terminal .xterm-normal-char,.terminal .xterm-wide-char{display:inline-block}.terminal .xterm-rows{position:absolute;left:0;top:0}.terminal .xterm-rows>div{white-space:nowrap}.terminal .xterm-scroll-area{visibility:hidden}.terminal .xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;left:-9999em}.terminal.enable-mouse-events{cursor:default}.terminal .xterm-selection{position:absolute;top:0;left:0;z-index:1;opacity:.3;pointer-events:none}.terminal .xterm-selection div{position:absolute;background-color:#fff}.terminal .xterm-bold{font-weight:700}.terminal .xterm-underline{text-decoration:underline}.terminal .xterm-blink{text-decoration:blink}.terminal .xterm-hidden{visibility:hidden}.terminal .xterm-color-0{color:#2e3436}.terminal .xterm-bg-color-0{background-color:#2e3436}.terminal .xterm-color-1{color:#c00}.terminal .xterm-bg-color-1{background-color:#c00}.terminal .xterm-color-2{color:#4e9a06}.terminal .xterm-bg-color-2{background-color:#4e9a06}.terminal .xterm-color-3{color:#c4a000}.terminal .xterm-bg-color-3{background-color:#c4a000}.terminal .xterm-color-4{color:#3465a4}.terminal .xterm-bg-color-4{background-color:#3465a4}.terminal .xterm-color-5{color:#75507b}.terminal .xterm-bg-color-5{background-color:#75507b}.terminal .xterm-color-6{color:#06989a}.terminal .xterm-bg-color-6{background-color:#06989a}.terminal .xterm-color-7{color:#d3d7cf}.terminal .xterm-bg-color-7{background-color:#d3d7cf}.terminal .xterm-color-8{color:#555753}.terminal .xterm-bg-color-8{background-color:#555753}.terminal .xterm-color-9{color:#ef2929}.terminal .xterm-bg-color-9{background-color:#ef2929}.terminal .xterm-color-10{color:#8ae234}.terminal .xterm-bg-color-10{background-color:#8ae234}.terminal .xterm-color-11{color:#fce94f}.terminal .xterm-bg-color-11{background-color:#fce94f}.terminal .xterm-color-12{color:#729fcf}.terminal .xterm-bg-color-12{background-color:#729fcf}.terminal .xterm-color-13{color:#ad7fa8}.terminal .xterm-bg-color-13{background-color:#ad7fa8}.terminal .xterm-color-14{color:#34e2e2}.terminal .xterm-bg-color-14{background-color:#34e2e2}.terminal .xterm-color-15{color:#eeeeec}.terminal .xterm-bg-color-15{background-color:#eeeeec}.terminal .xterm-color-16{color:#000}.terminal .xterm-bg-color-16{background-color:#000}.terminal .xterm-color-17{color:#00005f}.terminal .xterm-bg-color-17{background-color:#00005f}.terminal .xterm-color-18{color:#000087}.terminal .xterm-bg-color-18{background-color:#000087}.terminal .xterm-color-19{color:#0000af}.terminal .xterm-bg-color-19{background-color:#0000af}.terminal .xterm-color-20{color:#0000d7}.terminal .xterm-bg-color-20{background-color:#0000d7}.terminal .xterm-color-21{color:#00f}.terminal .xterm-bg-color-21{background-color:#00f}.terminal .xterm-color-22{color:#005f00}.terminal .xterm-bg-color-22{background-color:#005f00}.terminal .xterm-color-23{color:#005f5f}.terminal .xterm-bg-color-23{background-color:#005f5f}.terminal .xterm-color-24{color:#005f87}.terminal .xterm-bg-color-24{background-color:#005f87}.terminal .xterm-color-25{color:#005faf}.terminal .xterm-bg-color-25{background-color:#005faf}.terminal .xterm-color-26{color:#005fd7}.terminal .xterm-bg-color-26{background-color:#005fd7}.terminal .xterm-color-27{color:#005fff}.terminal .xterm-bg-color-27{background-color:#005fff}.terminal .xterm-color-28{color:#008700}.terminal .xterm-bg-color-28{background-color:#008700}.terminal .xterm-color-29{color:#00875f}.terminal .xterm-bg-color-29{background-color:#00875f}.terminal .xterm-color-30{color:#008787}.terminal .xterm-bg-color-30{background-color:#008787}.terminal .xterm-color-31{color:#0087af}.terminal .xterm-bg-color-31{background-color:#0087af}.terminal .xterm-color-32{color:#0087d7}.terminal .xterm-bg-color-32{background-color:#0087d7}.terminal .xterm-color-33{color:#0087ff}.terminal .xterm-bg-color-33{background-color:#0087ff}.terminal .xterm-color-34{color:#00af00}.terminal .xterm-bg-color-34{background-color:#00af00}.terminal .xterm-color-35{color:#00af5f}.terminal .xterm-bg-color-35{background-color:#00af5f}.terminal .xterm-color-36{color:#00af87}.terminal .xterm-bg-color-36{background-color:#00af87}.terminal .xterm-color-37{color:#00afaf}.terminal .xterm-bg-color-37{background-color:#00afaf}.terminal .xterm-color-38{color:#00afd7}.terminal .xterm-bg-color-38{background-color:#00afd7}.terminal .xterm-color-39{color:#00afff}.terminal .xterm-bg-color-39{background-color:#00afff}.terminal .xterm-color-40{color:#00d700}.terminal .xterm-bg-color-40{background-color:#00d700}.terminal .xterm-color-41{color:#00d75f}.terminal .xterm-bg-color-41{background-color:#00d75f}.terminal .xterm-color-42{color:#00d787}.terminal .xterm-bg-color-42{background-color:#00d787}.terminal .xterm-color-43{color:#00d7af}.terminal .xterm-bg-color-43{background-color:#00d7af}.terminal .xterm-color-44{color:#00d7d7}.terminal .xterm-bg-color-44{background-color:#00d7d7}.terminal .xterm-color-45{color:#00d7ff}.terminal .xterm-bg-color-45{background-color:#00d7ff}.terminal .xterm-color-46{color:#0f0}.terminal .xterm-bg-color-46{background-color:#0f0}.terminal .xterm-color-47{color:#00ff5f}.terminal .xterm-bg-color-47{background-color:#00ff5f}.terminal .xterm-color-48{color:#00ff87}.terminal .xterm-bg-color-48{background-color:#00ff87}.terminal .xterm-color-49{color:#00ffaf}.terminal .xterm-bg-color-49{background-color:#00ffaf}.terminal .xterm-color-50{color:#00ffd7}.terminal .xterm-bg-color-50{background-color:#00ffd7}.terminal .xterm-color-51{color:#0ff}.terminal .xterm-bg-color-51{background-color:#0ff}.terminal .xterm-color-52{color:#5f0000}.terminal .xterm-bg-color-52{background-color:#5f0000}.terminal .xterm-color-53{color:#5f005f}.terminal .xterm-bg-color-53{background-color:#5f005f}.terminal .xterm-color-54{color:#5f0087}.terminal .xterm-bg-color-54{background-color:#5f0087}.terminal .xterm-color-55{color:#5f00af}.terminal .xterm-bg-color-55{background-color:#5f00af}.terminal .xterm-color-56{color:#5f00d7}.terminal .xterm-bg-color-56{background-color:#5f00d7}.terminal .xterm-color-57{color:#5f00ff}.terminal .xterm-bg-color-57{background-color:#5f00ff}.terminal .xterm-color-58{color:#5f5f00}.terminal .xterm-bg-color-58{background-color:#5f5f00}.terminal .xterm-color-59{color:#5f5f5f}.terminal .xterm-bg-color-59{background-color:#5f5f5f}.terminal .xterm-color-60{color:#5f5f87}.terminal .xterm-bg-color-60{background-color:#5f5f87}.terminal .xterm-color-61{color:#5f5faf}.terminal .xterm-bg-color-61{background-color:#5f5faf}.terminal .xterm-color-62{color:#5f5fd7}.terminal .xterm-bg-color-62{background-color:#5f5fd7}.terminal .xterm-color-63{color:#5f5fff}.terminal .xterm-bg-color-63{background-color:#5f5fff}.terminal .xterm-color-64{color:#5f8700}.terminal .xterm-bg-color-64{background-color:#5f8700}.terminal .xterm-color-65{color:#5f875f}.terminal .xterm-bg-color-65{background-color:#5f875f}.terminal .xterm-color-66{color:#5f8787}.terminal .xterm-bg-color-66{background-color:#5f8787}.terminal .xterm-color-67{color:#5f87af}.terminal .xterm-bg-color-67{background-color:#5f87af}.terminal .xterm-color-68{color:#5f87d7}.terminal .xterm-bg-color-68{background-color:#5f87d7}.terminal .xterm-color-69{color:#5f87ff}.terminal .xterm-bg-color-69{background-color:#5f87ff}.terminal .xterm-color-70{color:#5faf00}.terminal .xterm-bg-color-70{background-color:#5faf00}.terminal .xterm-color-71{color:#5faf5f}.terminal .xterm-bg-color-71{background-color:#5faf5f}.terminal .xterm-color-72{color:#5faf87}.terminal .xterm-bg-color-72{background-color:#5faf87}.terminal .xterm-color-73{color:#5fafaf}.terminal .xterm-bg-color-73{background-color:#5fafaf}.terminal .xterm-color-74{color:#5fafd7}.terminal .xterm-bg-color-74{background-color:#5fafd7}.terminal .xterm-color-75{color:#5fafff}.terminal .xterm-bg-color-75{background-color:#5fafff}.terminal .xterm-color-76{color:#5fd700}.terminal .xterm-bg-color-76{background-color:#5fd700}.terminal .xterm-color-77{color:#5fd75f}.terminal .xterm-bg-color-77{background-color:#5fd75f}.terminal .xterm-color-78{color:#5fd787}.terminal .xterm-bg-color-78{background-color:#5fd787}.terminal .xterm-color-79{color:#5fd7af}.terminal .xterm-bg-color-79{background-color:#5fd7af}.terminal .xterm-color-80{color:#5fd7d7}.terminal .xterm-bg-color-80{background-color:#5fd7d7}.terminal .xterm-color-81{color:#5fd7ff}.terminal .xterm-bg-color-81{background-color:#5fd7ff}.terminal .xterm-color-82{color:#5fff00}.terminal .xterm-bg-color-82{background-color:#5fff00}.terminal .xterm-color-83{color:#5fff5f}.terminal .xterm-bg-color-83{background-color:#5fff5f}.terminal .xterm-color-84{color:#5fff87}.terminal .xterm-bg-color-84{background-color:#5fff87}.terminal .xterm-color-85{color:#5fffaf}.terminal .xterm-bg-color-85{background-color:#5fffaf}.terminal .xterm-color-86{color:#5fffd7}.terminal .xterm-bg-color-86{background-color:#5fffd7}.terminal .xterm-color-87{color:#5fffff}.terminal .xterm-bg-color-87{background-color:#5fffff}.terminal .xterm-color-88{color:#870000}.terminal .xterm-bg-color-88{background-color:#870000}.terminal .xterm-color-89{color:#87005f}.terminal .xterm-bg-color-89{background-color:#87005f}.terminal .xterm-color-90{color:#870087}.terminal .xterm-bg-color-90{background-color:#870087}.terminal .xterm-color-91{color:#8700af}.terminal .xterm-bg-color-91{background-color:#8700af}.terminal .xterm-color-92{color:#8700d7}.terminal .xterm-bg-color-92{background-color:#8700d7}.terminal .xterm-color-93{color:#8700ff}.terminal .xterm-bg-color-93{background-color:#8700ff}.terminal .xterm-color-94{color:#875f00}.terminal .xterm-bg-color-94{background-color:#875f00}.terminal .xterm-color-95{color:#875f5f}.terminal .xterm-bg-color-95{background-color:#875f5f}.terminal .xterm-color-96{color:#875f87}.terminal .xterm-bg-color-96{background-color:#875f87}.terminal .xterm-color-97{color:#875faf}.terminal .xterm-bg-color-97{background-color:#875faf}.terminal .xterm-color-98{color:#875fd7}.terminal .xterm-bg-color-98{background-color:#875fd7}.terminal .xterm-color-99{color:#875fff}.terminal .xterm-bg-color-99{background-color:#875fff}.terminal .xterm-color-100{color:#878700}.terminal .xterm-bg-color-100{background-color:#878700}.terminal .xterm-color-101{color:#87875f}.terminal .xterm-bg-color-101{background-color:#87875f}.terminal .xterm-color-102{color:#878787}.terminal .xterm-bg-color-102{background-color:#878787}.terminal .xterm-color-103{color:#8787af}.terminal .xterm-bg-color-103{background-color:#8787af}.terminal .xterm-color-104{color:#8787d7}.terminal .xterm-bg-color-104{background-color:#8787d7}.terminal .xterm-color-105{color:#8787ff}.terminal .xterm-bg-color-105{background-color:#8787ff}.terminal .xterm-color-106{color:#87af00}.terminal .xterm-bg-color-106{background-color:#87af00}.terminal .xterm-color-107{color:#87af5f}.terminal .xterm-bg-color-107{background-color:#87af5f}.terminal .xterm-color-108{color:#87af87}.terminal .xterm-bg-color-108{background-color:#87af87}.terminal .xterm-color-109{color:#87afaf}.terminal .xterm-bg-color-109{background-color:#87afaf}.terminal .xterm-color-110{color:#87afd7}.terminal .xterm-bg-color-110{background-color:#87afd7}.terminal .xterm-color-111{color:#87afff}.terminal .xterm-bg-color-111{background-color:#87afff}.terminal .xterm-color-112{color:#87d700}.terminal .xterm-bg-color-112{background-color:#87d700}.terminal .xterm-color-113{color:#87d75f}.terminal .xterm-bg-color-113{background-color:#87d75f}.terminal .xterm-color-114{color:#87d787}.terminal .xterm-bg-color-114{background-color:#87d787}.terminal .xterm-color-115{color:#87d7af}.terminal .xterm-bg-color-115{background-color:#87d7af}.terminal .xterm-color-116{color:#87d7d7}.terminal .xterm-bg-color-116{background-color:#87d7d7}.terminal .xterm-color-117{color:#87d7ff}.terminal .xterm-bg-color-117{background-color:#87d7ff}.terminal .xterm-color-118{color:#87ff00}.terminal .xterm-bg-color-118{background-color:#87ff00}.terminal .xterm-color-119{color:#87ff5f}.terminal .xterm-bg-color-119{background-color:#87ff5f}.terminal .xterm-color-120{color:#87ff87}.terminal .xterm-bg-color-120{background-color:#87ff87}.terminal .xterm-color-121{color:#87ffaf}.terminal .xterm-bg-color-121{background-color:#87ffaf}.terminal .xterm-color-122{color:#87ffd7}.terminal .xterm-bg-color-122{background-color:#87ffd7}.terminal .xterm-color-123{color:#87ffff}.terminal .xterm-bg-color-123{background-color:#87ffff}.terminal .xterm-color-124{color:#af0000}.terminal .xterm-bg-color-124{background-color:#af0000}.terminal .xterm-color-125{color:#af005f}.terminal .xterm-bg-color-125{background-color:#af005f}.terminal .xterm-color-126{color:#af0087}.terminal .xterm-bg-color-126{background-color:#af0087}.terminal .xterm-color-127{color:#af00af}.terminal .xterm-bg-color-127{background-color:#af00af}.terminal .xterm-color-128{color:#af00d7}.terminal .xterm-bg-color-128{background-color:#af00d7}.terminal .xterm-color-129{color:#af00ff}.terminal .xterm-bg-color-129{background-color:#af00ff}.terminal .xterm-color-130{color:#af5f00}.terminal .xterm-bg-color-130{background-color:#af5f00}.terminal .xterm-color-131{color:#af5f5f}.terminal .xterm-bg-color-131{background-color:#af5f5f}.terminal .xterm-color-132{color:#af5f87}.terminal .xterm-bg-color-132{background-color:#af5f87}.terminal .xterm-color-133{color:#af5faf}.terminal .xterm-bg-color-133{background-color:#af5faf}.terminal .xterm-color-134{color:#af5fd7}.terminal .xterm-bg-color-134{background-color:#af5fd7}.terminal .xterm-color-135{color:#af5fff}.terminal .xterm-bg-color-135{background-color:#af5fff}.terminal .xterm-color-136{color:#af8700}.terminal .xterm-bg-color-136{background-color:#af8700}.terminal .xterm-color-137{color:#af875f}.terminal .xterm-bg-color-137{background-color:#af875f}.terminal .xterm-color-138{color:#af8787}.terminal .xterm-bg-color-138{background-color:#af8787}.terminal .xterm-color-139{color:#af87af}.terminal .xterm-bg-color-139{background-color:#af87af}.terminal .xterm-color-140{color:#af87d7}.terminal .xterm-bg-color-140{background-color:#af87d7}.terminal .xterm-color-141{color:#af87ff}.terminal .xterm-bg-color-141{background-color:#af87ff}.terminal .xterm-color-142{color:#afaf00}.terminal .xterm-bg-color-142{background-color:#afaf00}.terminal .xterm-color-143{color:#afaf5f}.terminal .xterm-bg-color-143{background-color:#afaf5f}.terminal .xterm-color-144{color:#afaf87}.terminal .xterm-bg-color-144{background-color:#afaf87}.terminal .xterm-color-145{color:#afafaf}.terminal .xterm-bg-color-145{background-color:#afafaf}.terminal .xterm-color-146{color:#afafd7}.terminal .xterm-bg-color-146{background-color:#afafd7}.terminal .xterm-color-147{color:#afafff}.terminal .xterm-bg-color-147{background-color:#afafff}.terminal .xterm-color-148{color:#afd700}.terminal .xterm-bg-color-148{background-color:#afd700}.terminal .xterm-color-149{color:#afd75f}.terminal .xterm-bg-color-149{background-color:#afd75f}.terminal .xterm-color-150{color:#afd787}.terminal .xterm-bg-color-150{background-color:#afd787}.terminal .xterm-color-151{color:#afd7af}.terminal .xterm-bg-color-151{background-color:#afd7af}.terminal .xterm-color-152{color:#afd7d7}.terminal .xterm-bg-color-152{background-color:#afd7d7}.terminal .xterm-color-153{color:#afd7ff}.terminal .xterm-bg-color-153{background-color:#afd7ff}.terminal .xterm-color-154{color:#afff00}.terminal .xterm-bg-color-154{background-color:#afff00}.terminal .xterm-color-155{color:#afff5f}.terminal .xterm-bg-color-155{background-color:#afff5f}.terminal .xterm-color-156{color:#afff87}.terminal .xterm-bg-color-156{background-color:#afff87}.terminal .xterm-color-157{color:#afffaf}.terminal .xterm-bg-color-157{background-color:#afffaf}.terminal .xterm-color-158{color:#afffd7}.terminal .xterm-bg-color-158{background-color:#afffd7}.terminal .xterm-color-159{color:#afffff}.terminal .xterm-bg-color-159{background-color:#afffff}.terminal .xterm-color-160{color:#d70000}.terminal .xterm-bg-color-160{background-color:#d70000}.terminal .xterm-color-161{color:#d7005f}.terminal .xterm-bg-color-161{background-color:#d7005f}.terminal .xterm-color-162{color:#d70087}.terminal .xterm-bg-color-162{background-color:#d70087}.terminal .xterm-color-163{color:#d700af}.terminal .xterm-bg-color-163{background-color:#d700af}.terminal .xterm-color-164{color:#d700d7}.terminal .xterm-bg-color-164{background-color:#d700d7}.terminal .xterm-color-165{color:#d700ff}.terminal .xterm-bg-color-165{background-color:#d700ff}.terminal .xterm-color-166{color:#d75f00}.terminal .xterm-bg-color-166{background-color:#d75f00}.terminal .xterm-color-167{color:#d75f5f}.terminal .xterm-bg-color-167{background-color:#d75f5f}.terminal .xterm-color-168{color:#d75f87}.terminal .xterm-bg-color-168{background-color:#d75f87}.terminal .xterm-color-169{color:#d75faf}.terminal .xterm-bg-color-169{background-color:#d75faf}.terminal .xterm-color-170{color:#d75fd7}.terminal .xterm-bg-color-170{background-color:#d75fd7}.terminal .xterm-color-171{color:#d75fff}.terminal .xterm-bg-color-171{background-color:#d75fff}.terminal .xterm-color-172{color:#d78700}.terminal .xterm-bg-color-172{background-color:#d78700}.terminal .xterm-color-173{color:#d7875f}.terminal .xterm-bg-color-173{background-color:#d7875f}.terminal .xterm-color-174{color:#d78787}.terminal .xterm-bg-color-174{background-color:#d78787}.terminal .xterm-color-175{color:#d787af}.terminal .xterm-bg-color-175{background-color:#d787af}.terminal .xterm-color-176{color:#d787d7}.terminal .xterm-bg-color-176{background-color:#d787d7}.terminal .xterm-color-177{color:#d787ff}.terminal .xterm-bg-color-177{background-color:#d787ff}.terminal .xterm-color-178{color:#d7af00}.terminal .xterm-bg-color-178{background-color:#d7af00}.terminal .xterm-color-179{color:#d7af5f}.terminal .xterm-bg-color-179{background-color:#d7af5f}.terminal .xterm-color-180{color:#d7af87}.terminal .xterm-bg-color-180{background-color:#d7af87}.terminal .xterm-color-181{color:#d7afaf}.terminal .xterm-bg-color-181{background-color:#d7afaf}.terminal .xterm-color-182{color:#d7afd7}.terminal .xterm-bg-color-182{background-color:#d7afd7}.terminal .xterm-color-183{color:#d7afff}.terminal .xterm-bg-color-183{background-color:#d7afff}.terminal .xterm-color-184{color:#d7d700}.terminal .xterm-bg-color-184{background-color:#d7d700}.terminal .xterm-color-185{color:#d7d75f}.terminal .xterm-bg-color-185{background-color:#d7d75f}.terminal .xterm-color-186{color:#d7d787}.terminal .xterm-bg-color-186{background-color:#d7d787}.terminal .xterm-color-187{color:#d7d7af}.terminal .xterm-bg-color-187{background-color:#d7d7af}.terminal .xterm-color-188{color:#d7d7d7}.terminal .xterm-bg-color-188{background-color:#d7d7d7}.terminal .xterm-color-189{color:#d7d7ff}.terminal .xterm-bg-color-189{background-color:#d7d7ff}.terminal .xterm-color-190{color:#d7ff00}.terminal .xterm-bg-color-190{background-color:#d7ff00}.terminal .xterm-color-191{color:#d7ff5f}.terminal .xterm-bg-color-191{background-color:#d7ff5f}.terminal .xterm-color-192{color:#d7ff87}.terminal .xterm-bg-color-192{background-color:#d7ff87}.terminal .xterm-color-193{color:#d7ffaf}.terminal .xterm-bg-color-193{background-color:#d7ffaf}.terminal .xterm-color-194{color:#d7ffd7}.terminal .xterm-bg-color-194{background-color:#d7ffd7}.terminal .xterm-color-195{color:#d7ffff}.terminal .xterm-bg-color-195{background-color:#d7ffff}.terminal .xterm-color-196{color:red}.terminal .xterm-bg-color-196{background-color:red}.terminal .xterm-color-197{color:#ff005f}.terminal .xterm-bg-color-197{background-color:#ff005f}.terminal .xterm-color-198{color:#ff0087}.terminal .xterm-bg-color-198{background-color:#ff0087}.terminal .xterm-color-199{color:#ff00af}.terminal .xterm-bg-color-199{background-color:#ff00af}.terminal .xterm-color-200{color:#ff00d7}.terminal .xterm-bg-color-200{background-color:#ff00d7}.terminal .xterm-color-201{color:#f0f}.terminal .xterm-bg-color-201{background-color:#f0f}.terminal .xterm-color-202{color:#ff5f00}.terminal .xterm-bg-color-202{background-color:#ff5f00}.terminal .xterm-color-203{color:#ff5f5f}.terminal .xterm-bg-color-203{background-color:#ff5f5f}.terminal .xterm-color-204{color:#ff5f87}.terminal .xterm-bg-color-204{background-color:#ff5f87}.terminal .xterm-color-205{color:#ff5faf}.terminal .xterm-bg-color-205{background-color:#ff5faf}.terminal .xterm-color-206{color:#ff5fd7}.terminal .xterm-bg-color-206{background-color:#ff5fd7}.terminal .xterm-color-207{color:#ff5fff}.terminal .xterm-bg-color-207{background-color:#ff5fff}.terminal .xterm-color-208{color:#ff8700}.terminal .xterm-bg-color-208{background-color:#ff8700}.terminal .xterm-color-209{color:#ff875f}.terminal .xterm-bg-color-209{background-color:#ff875f}.terminal .xterm-color-210{color:#ff8787}.terminal .xterm-bg-color-210{background-color:#ff8787}.terminal .xterm-color-211{color:#ff87af}.terminal .xterm-bg-color-211{background-color:#ff87af}.terminal .xterm-color-212{color:#ff87d7}.terminal .xterm-bg-color-212{background-color:#ff87d7}.terminal .xterm-color-213{color:#ff87ff}.terminal .xterm-bg-color-213{background-color:#ff87ff}.terminal .xterm-color-214{color:#ffaf00}.terminal .xterm-bg-color-214{background-color:#ffaf00}.terminal .xterm-color-215{color:#ffaf5f}.terminal .xterm-bg-color-215{background-color:#ffaf5f}.terminal .xterm-color-216{color:#ffaf87}.terminal .xterm-bg-color-216{background-color:#ffaf87}.terminal .xterm-color-217{color:#ffafaf}.terminal .xterm-bg-color-217{background-color:#ffafaf}.terminal .xterm-color-218{color:#ffafd7}.terminal .xterm-bg-color-218{background-color:#ffafd7}.terminal .xterm-color-219{color:#ffafff}.terminal .xterm-bg-color-219{background-color:#ffafff}.terminal .xterm-color-220{color:gold}.terminal .xterm-bg-color-220{background-color:gold}.terminal .xterm-color-221{color:#ffd75f}.terminal .xterm-bg-color-221{background-color:#ffd75f}.terminal .xterm-color-222{color:#ffd787}.terminal .xterm-bg-color-222{background-color:#ffd787}.terminal .xterm-color-223{color:#ffd7af}.terminal .xterm-bg-color-223{background-color:#ffd7af}.terminal .xterm-color-224{color:#ffd7d7}.terminal .xterm-bg-color-224{background-color:#ffd7d7}.terminal .xterm-color-225{color:#ffd7ff}.terminal .xterm-bg-color-225{background-color:#ffd7ff}.terminal .xterm-color-226{color:#ff0}.terminal .xterm-bg-color-226{background-color:#ff0}.terminal .xterm-color-227{color:#ffff5f}.terminal .xterm-bg-color-227{background-color:#ffff5f}.terminal .xterm-color-228{color:#ffff87}.terminal .xterm-bg-color-228{background-color:#ffff87}.terminal .xterm-color-229{color:#ffffaf}.terminal .xterm-bg-color-229{background-color:#ffffaf}.terminal .xterm-color-230{color:#ffffd7}.terminal .xterm-bg-color-230{background-color:#ffffd7}.terminal .xterm-color-231{color:#fff}.terminal .xterm-bg-color-231{background-color:#fff}.terminal .xterm-color-232{color:#080808}.terminal .xterm-bg-color-232{background-color:#080808}.terminal .xterm-color-233{color:#121212}.terminal .xterm-bg-color-233{background-color:#121212}.terminal .xterm-color-234{color:#1c1c1c}.terminal .xterm-bg-color-234{background-color:#1c1c1c}.terminal .xterm-color-235{color:#262626}.terminal .xterm-bg-color-235{background-color:#262626}.terminal .xterm-color-236{color:#303030}.terminal .xterm-bg-color-236{background-color:#303030}.terminal .xterm-color-237{color:#3a3a3a}.terminal .xterm-bg-color-237{background-color:#3a3a3a}.terminal .xterm-color-238{color:#444}.terminal .xterm-bg-color-238{background-color:#444}.terminal .xterm-color-239{color:#4e4e4e}.terminal .xterm-bg-color-239{background-color:#4e4e4e}.terminal .xterm-color-240{color:#585858}.terminal .xterm-bg-color-240{background-color:#585858}.terminal .xterm-color-241{color:#626262}.terminal .xterm-bg-color-241{background-color:#626262}.terminal .xterm-color-242{color:#6c6c6c}.terminal .xterm-bg-color-242{background-color:#6c6c6c}.terminal .xterm-color-243{color:#767676}.terminal .xterm-bg-color-243{background-color:#767676}.terminal .xterm-color-244{color:gray}.terminal .xterm-bg-color-244{background-color:gray}.terminal .xterm-color-245{color:#8a8a8a}.terminal .xterm-bg-color-245{background-color:#8a8a8a}.terminal .xterm-color-246{color:#949494}.terminal .xterm-bg-color-246{background-color:#949494}.terminal .xterm-color-247{color:#9e9e9e}.terminal .xterm-bg-color-247{background-color:#9e9e9e}.terminal .xterm-color-248{color:#a8a8a8}.terminal .xterm-bg-color-248{background-color:#a8a8a8}.terminal .xterm-color-249{color:#b2b2b2}.terminal .xterm-bg-color-249{background-color:#b2b2b2}.terminal .xterm-color-250{color:#bcbcbc}.terminal .xterm-bg-color-250{background-color:#bcbcbc}.terminal .xterm-color-251{color:#c6c6c6}.terminal .xterm-bg-color-251{background-color:#c6c6c6}.terminal .xterm-color-252{color:#d0d0d0}.terminal .xterm-bg-color-252{background-color:#d0d0d0}.terminal .xterm-color-253{color:#dadada}.terminal .xterm-bg-color-253{background-color:#dadada}.terminal .xterm-color-254{color:#e4e4e4}.terminal .xterm-bg-color-254{background-color:#e4e4e4}.terminal .xterm-color-255{color:#eee}.terminal .xterm-bg-color-255{background-color:#eee}</style>
+ <style>body,html{height:100%;min-height:100%;margin:0;overflow:hidden}#terminal-container{width:auto;height:100%;margin:0 auto;padding:0 5px;background-color:#101010}.terminal{background-color:#101010;color:#f0f0f0;font-size:10pt;font-family:Menlo,Consolas,"DejaVu Sans Mono","Liberation Mono",Courier,monospace;font-variant-ligatures:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.terminal .xterm-viewport{background-color:rgba(121,121,121,0);-webkit-background-clip:text;-webkit-text-fill-color:transparent;transition:background-color 800ms linear}.terminal .xterm-viewport::-webkit-scrollbar{width:10px}.terminal .xterm-viewport::-webkit-scrollbar-track{opacity:0}.terminal .xterm-viewport::-webkit-scrollbar-thumb{background-color:rgba(121,121,121,.4)}.terminal .xterm-viewport::-webkit-scrollbar-thumb:hover{transition:opacity 0ms linear;background-color:rgba(100,100,100,.7)}.terminal .xterm-viewport::-webkit-scrollbar-thumb:window-inactive{background-color:inherit}.terminal .terminal-cursor{background-color:#f0f0f0;color:#101010;opacity:.7}.terminal:not(.focus) .terminal-cursor{outline:1px solid #f0f0f0}@keyframes blink-cursor{0%{background-color:#f0f0f0;color:#101010}50%{background-color:transparent;color:#f0f0f0}}</style>
+ <script>!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Terminal=t()}}(function(){var t;return function t(e,i,r){function s(o,a){if(!i[o]){if(!e[o]){var l="function"==typeof require&&require;if(!a&&l)return l(o,!0);if(n)return n(o,!0);var h=new Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var c=i[o]={exports:{}};e[o][0].call(c.exports,function(t){var i=e[o][1][t];return s(i?i:t)},c,c.exports,t,e,i,r)}return i[o].exports}for(var n="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.CHARSETS={},i.DEFAULT_CHARSET=i.CHARSETS.B,i.CHARSETS[0]={"`":"◆",a:"▒",b:"\t",c:"\f",d:"\r",e:"\n",f:"°",g:"±",h:"",i:"\v",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},i.CHARSETS.A={"#":"£"},i.CHARSETS.B=null,i.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},i.CHARSETS.C=i.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},i.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},i.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},i.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},i.CHARSETS.E=i.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},i.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},i.CHARSETS.H=i.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},{}],2:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t,e,i){this.textarea=t,this.compositionView=e,this.terminal=i,this.isComposing=!1,this.isSendingComposition=!1,this.compositionPosition={start:null,end:null}}return t.prototype.compositionstart=function(){this.isComposing=!0,this.compositionPosition.start=this.textarea.value.length,this.compositionView.textContent="",this.compositionView.classList.add("active")},t.prototype.compositionupdate=function(t){var e=this;this.compositionView.textContent=t.data,this.updateCompositionElements(),setTimeout(function(){e.compositionPosition.end=e.textarea.value.length},0)},t.prototype.compositionend=function(){this.finalizeComposition(!0)},t.prototype.keydown=function(t){if(this.isComposing||this.isSendingComposition){if(229===t.keyCode)return!1;if(16===t.keyCode||17===t.keyCode||18===t.keyCode)return!1;this.finalizeComposition(!1)}return 229!==t.keyCode||(this.handleAnyTextareaChanges(),!1)},t.prototype.finalizeComposition=function(t){var e=this;if(this.compositionView.classList.remove("active"),this.isComposing=!1,this.clearTextareaPosition(),t){var i={start:this.compositionPosition.start,end:this.compositionPosition.end};this.isSendingComposition=!0,setTimeout(function(){if(e.isSendingComposition){e.isSendingComposition=!1;var t=void 0;t=e.isComposing?e.textarea.value.substring(i.start,i.end):e.textarea.value.substring(i.start),e.terminal.handler(t)}},0)}else{this.isSendingComposition=!1;var r=this.textarea.value.substring(this.compositionPosition.start,this.compositionPosition.end);this.terminal.handler(r)}},t.prototype.handleAnyTextareaChanges=function(){var t=this,e=this.textarea.value;setTimeout(function(){if(!t.isComposing){var i=t.textarea.value,r=i.replace(e,"");r.length>0&&t.terminal.handler(r)}},0)},t.prototype.updateCompositionElements=function(t){var e=this;if(this.isComposing){var i=this.terminal.element.querySelector(".terminal-cursor");if(i){var r=this.terminal.element.querySelector(".xterm-rows"),s=r.offsetTop+i.offsetTop;this.compositionView.style.left=i.offsetLeft+"px",this.compositionView.style.top=s+"px",this.compositionView.style.height=i.offsetHeight+"px",this.compositionView.style.lineHeight=i.offsetHeight+"px";var n=this.compositionView.getBoundingClientRect();this.textarea.style.left=i.offsetLeft+"px",this.textarea.style.top=s+"px",this.textarea.style.width=n.width+"px",this.textarea.style.height=n.height+"px",this.textarea.style.lineHeight=n.height+"px"}t||setTimeout(function(){return e.updateCompositionElements(!0)},0)}},t.prototype.clearTextareaPosition=function(){this.textarea.style.left="",this.textarea.style.top=""},t}();i.CompositionHelper=r},{}],3:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r;!function(t){t.NUL="\0",t.SOH="\ 1",t.STX="\ 2",t.ETX="\ 3",t.EOT="\ 4",t.ENQ="\ 5",t.ACK="\ 6",t.BEL="\a",t.BS="\b",t.HT="\t",t.LF="\n",t.VT="\v",t.FF="\f",t.CR="\r",t.SO="\ e",t.SI="\ f",t.DLE="\10",t.DC1="\11",t.DC2="\12",t.DC3="\13",t.DC4="\14",t.NAK="\15",t.SYN="\16",t.ETB="\17",t.CAN="\18",t.EM="\19",t.SUB="\1a",t.ESC="\e",t.FS="\1c",t.GS="\1d",t.RS="\1e",t.US="\1f",t.SP=" ",t.DEL="\7f"}(r=i.C0||(i.C0={}))},{}],4:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(){this._events=this._events||{}}return t.prototype.on=function(t,e){this._events[t]=this._events[t]||[],this._events[t].push(e)},t.prototype.off=function(t,e){if(this._events[t])for(var i=this._events[t],r=i.length;r--;)if(i[r]===e||i[r].listener===e)return void i.splice(r,1)},t.prototype.removeAllListeners=function(t){this._events[t]&&delete this._events[t]},t.prototype.once=function(t,e){function i(){var r=Array.prototype.slice.call(arguments);return this.off(t,i),e.apply(this,r)}return i.listener=e,this.on(t,i)},t.prototype.emit=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(this._events[t])for(var r=this._events[t],s=0;s<r.length;s++)r[s].apply(this,e)},t.prototype.listeners=function(t){return this._events[t]||[]},t}();i.EventEmitter=r},{}],5:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./EscapeSequences"),s=t("./Charsets"),n=function(){function t(t){this._terminal=t}return t.prototype.addChar=function(t,e){if(t>=" "){var i=o(e);this._terminal.charset&&this._terminal.charset[t]&&(t=this._terminal.charset[t]);var r=this._terminal.y+this._terminal.ybase;if(!i&&this._terminal.x)return void(this._terminal.lines.get(r)[this._terminal.x-1]&&(this._terminal.lines.get(r)[this._terminal.x-1][2]?this._terminal.lines.get(r)[this._terminal.x-1][1]+=t:this._terminal.lines.get(r)[this._terminal.x-2]&&(this._terminal.lines.get(r)[this._terminal.x-2][1]+=t),this._terminal.updateRange(this._terminal.y)));if(this._terminal.x+i-1>=this._terminal.cols)if(this._terminal.wraparoundMode)this._terminal.x=0,this._terminal.y++,this._terminal.y>this._terminal.scrollBottom?(this._terminal.y--,this._terminal.scroll(!0)):this._terminal.lines.get(this._terminal.y).isWrapped=!0;else if(2===i)return;if(r=this._terminal.y+this._terminal.ybase,this._terminal.insertMode)for(var s=0;s<i;++s){var n=this._terminal.lines.get(this._terminal.y+this._terminal.ybase).pop();0===n[2]&&this._terminal.lines.get(r)[this._terminal.cols-2]&&2===this._terminal.lines.get(r)[this._terminal.cols-2][2]&&(this._terminal.lines.get(r)[this._terminal.cols-2]=[this._terminal.curAttr," ",1]),this._terminal.lines.get(r).splice(this._terminal.x,0,[this._terminal.curAttr," ",1])}this._terminal.lines.get(r)[this._terminal.x]=[this._terminal.curAttr,t,i],this._terminal.x++,this._terminal.updateRange(this._terminal.y),2===i&&(this._terminal.lines.get(r)[this._terminal.x]=[this._terminal.curAttr,"",0],this._terminal.x++)}},t.prototype.bell=function(){var t=this;this._terminal.visualBell&&(this._terminal.element.style.borderColor="white",setTimeout(function(){return t._terminal.element.style.borderColor=""},10),this._terminal.popOnBell&&this._terminal.focus())},t.prototype.lineFeed=function(){this._terminal.convertEol&&(this._terminal.x=0),this._terminal.y++,this._terminal.y>this._terminal.scrollBottom&&(this._terminal.y--,this._terminal.scroll()),this._terminal.x>=this._terminal.cols&&this._terminal.x--},t.prototype.carriageReturn=function(){this._terminal.x=0},t.prototype.backspace=function(){this._terminal.x>0&&this._terminal.x--},t.prototype.tab=function(){this._terminal.x=this._terminal.nextStop()},t.prototype.shiftOut=function(){this._terminal.setgLevel(1)},t.prototype.shiftIn=function(){this._terminal.setgLevel(0)},t.prototype.insertChars=function(t){var e,i,r,s;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,r=this._terminal.x,s=[this._terminal.eraseAttr()," ",1];e--&&r<this._terminal.cols;)this._terminal.lines.get(i).splice(r++,0,s),this._terminal.lines.get(i).pop()},t.prototype.cursorUp=function(t){var e=t[0];e<1&&(e=1),this._terminal.y-=e,this._terminal.y<0&&(this._terminal.y=0)},t.prototype.cursorDown=function(t){var e=t[0];e<1&&(e=1),this._terminal.y+=e,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x>=this._terminal.cols&&this._terminal.x--},t.prototype.cursorForward=function(t){var e=t[0];e<1&&(e=1),this._terminal.x+=e,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},t.prototype.cursorBackward=function(t){var e=t[0];e<1&&(e=1),this._terminal.x>=this._terminal.cols&&this._terminal.x--,this._terminal.x-=e,this._terminal.x<0&&(this._terminal.x=0)},t.prototype.cursorNextLine=function(t){var e=t[0];e<1&&(e=1),this._terminal.y+=e,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x=0},t.prototype.cursorPrecedingLine=function(t){var e=t[0];e<1&&(e=1),this._terminal.y-=e,this._terminal.y<0&&(this._terminal.y=0),this._terminal.x=0},t.prototype.cursorCharAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.x=e-1},t.prototype.cursorPosition=function(t){var e,i;e=t[0]-1,i=t.length>=2?t[1]-1:0,e<0?e=0:e>=this._terminal.rows&&(e=this._terminal.rows-1),i<0?i=0:i>=this._terminal.cols&&(i=this._terminal.cols-1),this._terminal.x=i,this._terminal.y=e},t.prototype.cursorForwardTab=function(t){for(var e=t[0]||1;e--;)this._terminal.x=this._terminal.nextStop()},t.prototype.eraseInDisplay=function(t){var e;switch(t[0]){case 0:for(this._terminal.eraseRight(this._terminal.x,this._terminal.y),e=this._terminal.y+1;e<this._terminal.rows;e++)this._terminal.eraseLine(e);break;case 1:for(this._terminal.eraseLeft(this._terminal.x,this._terminal.y),e=this._terminal.y;e--;)this._terminal.eraseLine(e);break;case 2:for(e=this._terminal.rows;e--;)this._terminal.eraseLine(e);break;case 3:var i=this._terminal.lines.length-this._terminal.rows;i>0&&(this._terminal.lines.trimStart(i),this._terminal.ybase=Math.max(this._terminal.ybase-i,0),this._terminal.ydisp=Math.max(this._terminal.ydisp-i,0))}},t.prototype.eraseInLine=function(t){switch(t[0]){case 0:this._terminal.eraseRight(this._terminal.x,this._terminal.y);break;case 1:this._terminal.eraseLeft(this._terminal.x,this._terminal.y);break;case 2:this._terminal.eraseLine(this._terminal.y)}},t.prototype.insertLines=function(t){var e,i,r;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,r=this._terminal.rows-1-this._terminal.scrollBottom,r=this._terminal.rows-1+this._terminal.ybase-r+1;e--;)this._terminal.lines.length===this._terminal.lines.maxLength&&(this._terminal.lines.trimStart(1),this._terminal.ybase--,this._terminal.ydisp--,i--,r--),this._terminal.lines.splice(i,0,this._terminal.blankLine(!0)),this._terminal.lines.splice(r,1);this._terminal.updateRange(this._terminal.y),this._terminal.updateRange(this._terminal.scrollBottom)},t.prototype.deleteLines=function(t){var e,i,r;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,r=this._terminal.rows-1-this._terminal.scrollBottom,r=this._terminal.rows-1+this._terminal.ybase-r;e--;)this._terminal.lines.length===this._terminal.lines.maxLength&&(this._terminal.lines.trimStart(1),this._terminal.ybase-=1,this._terminal.ydisp-=1),this._terminal.lines.splice(r+1,0,this._terminal.blankLine(!0)),this._terminal.lines.splice(i,1);this._terminal.updateRange(this._terminal.y),this._terminal.updateRange(this._terminal.scrollBottom)},t.prototype.deleteChars=function(t){var e,i,r;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,r=[this._terminal.eraseAttr()," ",1];e--;)this._terminal.lines.get(i).splice(this._terminal.x,1),this._terminal.lines.get(i).push(r)},t.prototype.scrollUp=function(t){for(var e=t[0]||1;e--;)this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollTop,1),this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollBottom,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.scrollTop),this._terminal.updateRange(this._terminal.scrollBottom)},t.prototype.scrollDown=function(t){for(var e=t[0]||1;e--;)this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollBottom,1),this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollTop,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.scrollTop),this._terminal.updateRange(this._terminal.scrollBottom)},t.prototype.eraseChars=function(t){var e,i,r,s;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,r=this._terminal.x,s=[this._terminal.eraseAttr()," ",1];e--&&r<this._terminal.cols;)this._terminal.lines.get(i)[r++]=s},t.prototype.cursorBackwardTab=function(t){for(var e=t[0]||1;e--;)this._terminal.x=this._terminal.prevStop()},t.prototype.charPosAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.x=e-1,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},t.prototype.HPositionRelative=function(t){var e=t[0];e<1&&(e=1),this._terminal.x+=e,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},t.prototype.repeatPrecedingCharacter=function(t){for(var e=t[0]||1,i=this._terminal.lines.get(this._terminal.ybase+this._terminal.y),r=i[this._terminal.x-1]||[this._terminal.defAttr," ",1];e--;)i[this._terminal.x++]=r},t.prototype.sendDeviceAttributes=function(t){t[0]>0||(this._terminal.prefix?">"===this._terminal.prefix&&(this._terminal.is("xterm")?this._terminal.send(r.C0.ESC+"[>0;276;0c"):this._terminal.is("rxvt-unicode")?this._terminal.send(r.C0.ESC+"[>85;95;0c"):this._terminal.is("linux")?this._terminal.send(t[0]+"c"):this._terminal.is("screen")&&this._terminal.send(r.C0.ESC+"[>83;40003;0c")):this._terminal.is("xterm")||this._terminal.is("rxvt-unicode")||this._terminal.is("screen")?this._terminal.send(r.C0.ESC+"[?1;2c"):this._terminal.is("linux")&&this._terminal.send(r.C0.ESC+"[?6c"))},t.prototype.linePosAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.y=e-1,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1)},t.prototype.VPositionRelative=function(t){var e=t[0];e<1&&(e=1),this._terminal.y+=e,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x>=this._terminal.cols&&this._terminal.x--},t.prototype.HVPosition=function(t){t[0]<1&&(t[0]=1),t[1]<1&&(t[1]=1),this._terminal.y=t[0]-1,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x=t[1]-1,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},t.prototype.tabClear=function(t){var e=t[0];e<=0?delete this._terminal.tabs[this._terminal.x]:3===e&&(this._terminal.tabs={})},t.prototype.setMode=function(t){if(t.length>1)for(var e=0;e<t.length;e++)this.setMode([t[e]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 1:this._terminal.applicationCursor=!0;break;case 2:this._terminal.setgCharset(0,s.DEFAULT_CHARSET),this._terminal.setgCharset(1,s.DEFAULT_CHARSET),this._terminal.setgCharset(2,s.DEFAULT_CHARSET),this._terminal.setgCharset(3,s.DEFAULT_CHARSET);break;case 3:this._terminal.savedCols=this._terminal.cols,this._terminal.resize(132,this._terminal.rows);break;case 6:this._terminal.originMode=!0;break;case 7:this._terminal.wraparoundMode=!0;break;case 12:break;case 66:this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this._terminal.x10Mouse=9===t[0],this._terminal.vt200Mouse=1e3===t[0],this._terminal.normalMouse=t[0]>1e3,this._terminal.mouseEvents=!0,this._terminal.element.classList.add("enable-mouse-events"),this._terminal.selectionManager.disable(),this._terminal.log("Binding to mouse events.");break;case 1004:this._terminal.sendFocus=!0;break;case 1005:this._terminal.utfMouse=!0;break;case 1006:this._terminal.sgrMouse=!0;break;case 1015:this._terminal.urxvtMouse=!0;break;case 25:this._terminal.cursorHidden=!1;break;case 1049:case 47:case 1047:if(!this._terminal.normal){var i={lines:this._terminal.lines,ybase:this._terminal.ybase,ydisp:this._terminal.ydisp,x:this._terminal.x,y:this._terminal.y,scrollTop:this._terminal.scrollTop,scrollBottom:this._terminal.scrollBottom,tabs:this._terminal.tabs};this._terminal.reset(),this._terminal.viewport.syncScrollArea(),this._terminal.normal=i,this._terminal.showCursor()}}}else switch(t[0]){case 4:this._terminal.insertMode=!0;break;case 20:}},t.prototype.resetMode=function(t){if(t.length>1)for(var e=0;e<t.length;e++)this.resetMode([t[e]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 1:this._terminal.applicationCursor=!1;break;case 3:132===this._terminal.cols&&this._terminal.savedCols&&this._terminal.resize(this._terminal.savedCols,this._terminal.rows),delete this._terminal.savedCols;break;case 6:this._terminal.originMode=!1;break;case 7:this._terminal.wraparoundMode=!1;break;case 12:break;case 66:this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this._terminal.x10Mouse=!1,this._terminal.vt200Mouse=!1,this._terminal.normalMouse=!1,this._terminal.mouseEvents=!1,this._terminal.element.classList.remove("enable-mouse-events"),this._terminal.selectionManager.enable();break;case 1004:this._terminal.sendFocus=!1;break;case 1005:this._terminal.utfMouse=!1;break;case 1006:this._terminal.sgrMouse=!1;break;case 1015:this._terminal.urxvtMouse=!1;break;case 25:this._terminal.cursorHidden=!0;break;case 1049:case 47:case 1047:this._terminal.normal&&(this._terminal.lines=this._terminal.normal.lines,this._terminal.ybase=this._terminal.normal.ybase,this._terminal.ydisp=this._terminal.normal.ydisp,this._terminal.x=this._terminal.normal.x,this._terminal.y=this._terminal.normal.y,this._terminal.scrollTop=this._terminal.normal.scrollTop,this._terminal.scrollBottom=this._terminal.normal.scrollBottom,this._terminal.tabs=this._terminal.normal.tabs,this._terminal.normal=null,this._terminal.selectionManager.setBuffer(this._terminal.lines),this._terminal.refresh(0,this._terminal.rows-1),this._terminal.viewport.syncScrollArea(),this._terminal.showCursor())}}else switch(t[0]){case 4:this._terminal.insertMode=!1;break;case 20:}},t.prototype.charAttributes=function(t){if(1===t.length&&0===t[0])return void(this._terminal.curAttr=this._terminal.defAttr);for(var e,i=t.length,r=0,s=this._terminal.curAttr>>18,n=this._terminal.curAttr>>9&511,o=511&this._terminal.curAttr;r<i;r++)e=t[r],e>=30&&e<=37?n=e-30:e>=40&&e<=47?o=e-40:e>=90&&e<=97?(e+=8,n=e-90):e>=100&&e<=107?(e+=8,o=e-100):0===e?(s=this._terminal.defAttr>>18,n=this._terminal.defAttr>>9&511,o=511&this._terminal.defAttr):1===e?s|=1:4===e?s|=2:5===e?s|=4:7===e?s|=8:8===e?s|=16:22===e?s&=-2:24===e?s&=-3:25===e?s&=-5:27===e?s&=-9:28===e?s&=-17:39===e?n=this._terminal.defAttr>>9&511:49===e?o=511&this._terminal.defAttr:38===e?2===t[r+1]?(r+=2,n=this._terminal.matchColor(255&t[r],255&t[r+1],255&t[r+2]),n===-1&&(n=511),r+=2):5===t[r+1]&&(r+=2,e=255&t[r],n=e):48===e?2===t[r+1]?(r+=2,o=this._terminal.matchColor(255&t[r],255&t[r+1],255&t[r+2]),o===-1&&(o=511),r+=2):5===t[r+1]&&(r+=2,e=255&t[r],o=e):100===e?(n=this._terminal.defAttr>>9&511,o=511&this._terminal.defAttr):this._terminal.error("Unknown SGR attribute: %d.",e);this._terminal.curAttr=s<<18|n<<9|o},t.prototype.deviceStatus=function(t){if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 6:this._terminal.send(r.C0.ESC+"[?"+(this._terminal.y+1)+";"+(this._terminal.x+1)+"R");break;case 15:break;case 25:break;case 26:break;case 53:}}else switch(t[0]){case 5:this._terminal.send(r.C0.ESC+"[0n");break;case 6:this._terminal.send(r.C0.ESC+"["+(this._terminal.y+1)+";"+(this._terminal.x+1)+"R")}},t.prototype.softReset=function(t){this._terminal.cursorHidden=!1,this._terminal.insertMode=!1,this._terminal.originMode=!1,this._terminal.wraparoundMode=!0,this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea(),this._terminal.applicationCursor=!1,this._terminal.scrollTop=0,this._terminal.scrollBottom=this._terminal.rows-1,this._terminal.curAttr=this._terminal.defAttr,this._terminal.x=this._terminal.y=0,this._terminal.charset=null,this._terminal.glevel=0,this._terminal.charsets=[null]},t.prototype.setCursorStyle=function(t){var e=t[0]<1?1:t[0];switch(e){case 1:case 2:this._terminal.setOption("cursorStyle","block");break;case 3:case 4:this._terminal.setOption("cursorStyle","underline");break;case 5:case 6:this._terminal.setOption("cursorStyle","bar")}var i=e%2===1;this._terminal.setOption("cursorBlink",i)},t.prototype.setScrollRegion=function(t){this._terminal.prefix||(this._terminal.scrollTop=(t[0]||1)-1,this._terminal.scrollBottom=(t[1]&&t[1]<=this._terminal.rows?t[1]:this._terminal.rows)-1,this._terminal.x=0,this._terminal.y=0)},t.prototype.saveCursor=function(t){this._terminal.savedX=this._terminal.x,this._terminal.savedY=this._terminal.y},t.prototype.restoreCursor=function(t){this._terminal.x=this._terminal.savedX||0,this._terminal.y=this._terminal.savedY||0},t}();i.InputHandler=n;var o=function(t){function e(t){var e,i=0,r=s.length-1;if(t<s[0][0]||t>s[r][1])return!1;for(;r>=i;)if(e=Math.floor((i+r)/2),t>s[e][1])i=e+1;else{if(!(t<s[e][0]))return!0;r=e-1}return!1}function i(i){return 0===i?t.nul:i<32||i>=127&&i<160?t.control:e(i)?0:r(i)?2:1}function r(t){return t>=4352&&(t<=4447||9001===t||9002===t||t>=11904&&t<=42191&&12351!==t||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65135||t>=65280&&t<=65376||t>=65504&&t<=65510||t>=131072&&t<=196605||t>=196608&&t<=262141)}var s=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];return i}({nul:0,control:0})},{"./Charsets":1,"./EscapeSequences":3}],6:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r="xterm-invalid-link",s="(https?:\\/\\/)",n="[\\da-z\\.-]+",o="[^\\da-z\\.-]+",a="("+n+")",l="([a-z\\.]{2,6})",h="((\\d{1,3}\\.){3}\\d{1,3})",c="(localhost)",u="(:\\d{1,5})",m="(("+a+"\\."+l+")|"+h+"|"+c+")"+u+"?",p="(\\/[\\/\\w\\.\\-%~]*)*",f="[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*",d="(\\?"+f+")?",_="(#"+f+")?",y="[^\\/\\w\\.\\-%]+",C=m+p+d+_,g="(?:^|"+o+")(",v=")($|"+y+")",b=new RegExp(g+s+C+v),S=0,w=function(){function t(){this._nextLinkMatcherId=S,this._rowTimeoutIds=[],this._linkMatchers=[],this.registerLinkMatcher(b,null,{matchIndex:1})}return t.prototype.attachToDom=function(t,e){this._document=t,this._rows=e},t.prototype.linkifyRow=function(e){if(this._document){var i=this._rowTimeoutIds[e];i&&clearTimeout(i),this._rowTimeoutIds[e]=setTimeout(this._linkifyRow.bind(this,e),t.TIME_BEFORE_LINKIFY)}},t.prototype.setHypertextLinkHandler=function(t){this._linkMatchers[S].handler=t},t.prototype.setHypertextValidationCallback=function(t){this._linkMatchers[S].validationCallback=t},t.prototype.registerLinkMatcher=function(t,e,i){if(void 0===i&&(i={}),this._nextLinkMatcherId!==S&&!e)throw new Error("handler must be defined");var r={id:this._nextLinkMatcherId++,regex:t,handler:e,matchIndex:i.matchIndex,validationCallback:i.validationCallback,priority:i.priority||0};return this._addLinkMatcherToList(r),r.id},t.prototype._addLinkMatcherToList=function(t){if(0===this._linkMatchers.length)return void this._linkMatchers.push(t);for(var e=this._linkMatchers.length-1;e>=0;e--)if(t.priority<=this._linkMatchers[e].priority)return void this._linkMatchers.splice(e+1,0,t);this._linkMatchers.splice(0,0,t)},t.prototype.deregisterLinkMatcher=function(t){for(var e=1;e<this._linkMatchers.length;e++)if(this._linkMatchers[e].id===t)return this._linkMatchers.splice(e,1),!0;return!1},t.prototype._linkifyRow=function(t){var e=this._rows[t];if(e)for(var i=(e.textContent,0);i<this._linkMatchers.length;i++){var s=this._linkMatchers[i],n=this._doLinkifyRow(e,s);if(n.length>0){if(s.validationCallback)for(var o=function(t){var e=n[t];s.validationCallback(e.textContent,e,function(t){t||e.classList.add(r)})},a=0;a<n.length;a++)o(a);return}}},t.prototype._doLinkifyRow=function(t,e){var i=[],r=e.id===S,s=t.childNodes,n=t.textContent.match(e.regex);if(!n||0===n.length)return i;for(var o=n["number"!=typeof e.matchIndex?0:e.matchIndex],a=n.index+o.length,l=0;l<s.length;l++){var h=s[l],c=h.textContent.indexOf(o);if(c>=0){var u=this._createAnchorElement(o,e.handler,r);if(h.textContent.length===o.length)if(3===h.nodeType)this._replaceNode(h,u);else{var m=h;if("A"===m.nodeName)return i;m.innerHTML="",m.appendChild(u)}else if(h.childNodes.length>1)for(var p=0;p<h.childNodes.length;p++){var f=h.childNodes[p],d=f.textContent.indexOf(o);if(d!==-1){this._replaceNodeSubstringWithNode(f,u,o,d);break}}else{var _=this._replaceNodeSubstringWithNode(h,u,o,c);l+=_}if(i.push(u),n=t.textContent.substring(a).match(e.regex),!n||0===n.length)return i;o=n["number"!=typeof e.matchIndex?0:e.matchIndex],a+=n.index+o.length}}return i},t.prototype._createAnchorElement=function(t,e,i){var s=this._document.createElement("a");return s.textContent=t,s.draggable=!1,i?(s.href=t,s.target="_blank",s.addEventListener("click",function(i){if(e)return e(i,t)})):s.addEventListener("click",function(i){if(!s.classList.contains(r))return e(i,t)}),s},t.prototype._replaceNode=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];for(var r=t.parentNode,s=0;s<e.length;s++)r.insertBefore(e[s],t);r.removeChild(t)},t.prototype._replaceNodeSubstringWithNode=function(t,e,i,r){if(1===t.childNodes.length&&(t=t.childNodes[0]),3!==t.nodeType)throw new Error("targetNode must be a text node or only contain a single text node");var s=t.textContent;if(0===r){var n=s.substring(i.length),o=this._document.createTextNode(n);return this._replaceNode(t,e,o),0}if(r===t.textContent.length-i.length){var a=s.substring(0,r),l=this._document.createTextNode(a);return this._replaceNode(t,l,e),0}var h=s.substring(0,r),c=this._document.createTextNode(h),u=s.substring(r+i.length),m=this._document.createTextNode(u);return this._replaceNode(t,c,e,m),1},t}();w.TIME_BEFORE_LINKIFY=200,i.Linkifier=w},{}],7:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./EscapeSequences"),s=t("./Charsets"),n={};n[r.C0.BEL]=function(t,e){return e.bell()},n[r.C0.LF]=function(t,e){return e.lineFeed()},n[r.C0.VT]=n[r.C0.LF],n[r.C0.FF]=n[r.C0.LF],n[r.C0.CR]=function(t,e){return e.carriageReturn()},n[r.C0.BS]=function(t,e){return e.backspace()},n[r.C0.HT]=function(t,e){return e.tab()},n[r.C0.SO]=function(t,e){return e.shiftOut()},n[r.C0.SI]=function(t,e){return e.shiftIn()},n[r.C0.ESC]=function(t,e){return t.setState(h.ESCAPED)};var o={};o["["]=function(t,e){e.params=[],e.currentParam=0,t.setState(h.CSI_PARAM)},o["]"]=function(t,e){e.params=[],e.currentParam=0,t.setState(h.OSC)},o.P=function(t,e){e.params=[],e.currentParam=0,t.setState(h.DCS)},o._=function(t,e){t.setState(h.IGNORE)},o["^"]=function(t,e){t.setState(h.IGNORE)},o.c=function(t,e){e.reset()},o.E=function(t,e){e.x=0,e.index(),t.setState(h.NORMAL)},o.D=function(t,e){e.index(),t.setState(h.NORMAL)},o.M=function(t,e){e.reverseIndex(),t.setState(h.NORMAL)},o["%"]=function(t,e){e.setgLevel(0),e.setgCharset(0,s.DEFAULT_CHARSET),t.setState(h.NORMAL),t.skipNextChar()},o[r.C0.CAN]=function(t){return t.setState(h.NORMAL)};var a={};a["?"]=function(t){return t.setPrefix("?")},a[">"]=function(t){return t.setPrefix(">")},a["!"]=function(t){return t.setPrefix("!")},a[0]=function(t){return t.setParam(10*t.getParam())},a[1]=function(t){return t.setParam(10*t.getParam()+1)},a[2]=function(t){return t.setParam(10*t.getParam()+2)},a[3]=function(t){return t.setParam(10*t.getParam()+3)},a[4]=function(t){return t.setParam(10*t.getParam()+4)},a[5]=function(t){return t.setParam(10*t.getParam()+5)},a[6]=function(t){return t.setParam(10*t.getParam()+6)},a[7]=function(t){return t.setParam(10*t.getParam()+7)},a[8]=function(t){return t.setParam(10*t.getParam()+8)},a[9]=function(t){return t.setParam(10*t.getParam()+9)},a.$=function(t){return t.setPostfix("$")},a['"']=function(t){return t.setPostfix('"')},a[" "]=function(t){return t.setPostfix(" ")},a["'"]=function(t){return t.setPostfix("'")},a[";"]=function(t){return t.finalizeParam()},a[r.C0.CAN]=function(t){return t.setState(h.NORMAL)};var l={};l["@"]=function(t,e,i){return t.insertChars(e)},l.A=function(t,e,i){return t.cursorUp(e)},l.B=function(t,e,i){return t.cursorDown(e)},l.C=function(t,e,i){return t.cursorForward(e)},l.D=function(t,e,i){return t.cursorBackward(e)},l.E=function(t,e,i){return t.cursorNextLine(e)},l.F=function(t,e,i){return t.cursorPrecedingLine(e)},l.G=function(t,e,i){return t.cursorCharAbsolute(e)},l.H=function(t,e,i){return t.cursorPosition(e)},l.I=function(t,e,i){return t.cursorForwardTab(e)},l.J=function(t,e,i){return t.eraseInDisplay(e)},l.K=function(t,e,i){return t.eraseInLine(e)},l.L=function(t,e,i){return t.insertLines(e)},l.M=function(t,e,i){return t.deleteLines(e)},l.P=function(t,e,i){return t.deleteChars(e)},l.S=function(t,e,i){return t.scrollUp(e)},l.T=function(t,e,i){e.length<2&&!i&&t.scrollDown(e)},l.X=function(t,e,i){return t.eraseChars(e)},l.Z=function(t,e,i){return t.cursorBackwardTab(e)},l["`"]=function(t,e,i){return t.charPosAbsolute(e)},l.a=function(t,e,i){return t.HPositionRelative(e)},l.b=function(t,e,i){return t.repeatPrecedingCharacter(e)},l.c=function(t,e,i){return t.sendDeviceAttributes(e)},
+l.d=function(t,e,i){return t.linePosAbsolute(e)},l.e=function(t,e,i){return t.VPositionRelative(e)},l.f=function(t,e,i){return t.HVPosition(e)},l.g=function(t,e,i){return t.tabClear(e)},l.h=function(t,e,i){return t.setMode(e)},l.l=function(t,e,i){return t.resetMode(e)},l.m=function(t,e,i){return t.charAttributes(e)},l.n=function(t,e,i){return t.deviceStatus(e)},l.p=function(t,e,i){switch(i){case"!":t.softReset(e)}},l.q=function(t,e,i,r){" "===r&&t.setCursorStyle(e)},l.r=function(t,e){return t.setScrollRegion(e)},l.s=function(t,e){return t.saveCursor(e)},l.u=function(t,e){return t.restoreCursor(e)},l[r.C0.CAN]=function(t,e,i,r,s){return s.setState(h.NORMAL)};var h;!function(t){t[t.NORMAL=0]="NORMAL",t[t.ESCAPED=1]="ESCAPED",t[t.CSI_PARAM=2]="CSI_PARAM",t[t.CSI=3]="CSI",t[t.OSC=4]="OSC",t[t.CHARSET=5]="CHARSET",t[t.DCS=6]="DCS",t[t.IGNORE=7]="IGNORE"}(h||(h={}));var c=function(){function t(t,e){this._inputHandler=t,this._terminal=e,this._state=h.NORMAL}return t.prototype.parse=function(t){var e,i,c,u,m=t.length;for(this._position=0,this._terminal.surrogate_high&&(t=this._terminal.surrogate_high+t,this._terminal.surrogate_high="");this._position<m;this._position++){if(i=t[this._position],c=t.charCodeAt(this._position),55296<=c&&c<=56319){if(u=t.charCodeAt(this._position+1),isNaN(u)){this._terminal.surrogate_high=i;continue}c=1024*(c-55296)+(u-56320)+65536,i+=t.charAt(this._position+1)}if(!(56320<=c&&c<=57343))switch(this._state){case h.NORMAL:i in n?n[i](this,this._inputHandler):this._inputHandler.addChar(i,c);break;case h.ESCAPED:if(i in o){o[i](this,this._terminal);break}switch(i){case"(":case")":case"*":case"+":case"-":case".":switch(i){case"(":this._terminal.gcharset=0;break;case")":this._terminal.gcharset=1;break;case"*":this._terminal.gcharset=2;break;case"+":this._terminal.gcharset=3;break;case"-":this._terminal.gcharset=1;break;case".":this._terminal.gcharset=2}this._state=h.CHARSET;break;case"/":this._terminal.gcharset=3,this._state=h.CHARSET,this._position--;break;case"N":break;case"O":break;case"n":this._terminal.setgLevel(2);break;case"o":this._terminal.setgLevel(3);break;case"|":this._terminal.setgLevel(3);break;case"}":this._terminal.setgLevel(2);break;case"~":this._terminal.setgLevel(1);break;case"7":this._inputHandler.saveCursor(),this._state=h.NORMAL;break;case"8":this._inputHandler.restoreCursor(),this._state=h.NORMAL;break;case"#":this._state=h.NORMAL,this._position++;break;case"H":this._terminal.tabSet(),this._state=h.NORMAL;break;case"=":this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport.syncScrollArea(),this._state=h.NORMAL;break;case">":this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea(),this._state=h.NORMAL;break;default:this._state=h.NORMAL,this._terminal.error("Unknown ESC control: %s.",i)}break;case h.CHARSET:i in s.CHARSETS?(e=s.CHARSETS[i],"/"===i&&this.skipNextChar()):e=s.DEFAULT_CHARSET,this._terminal.setgCharset(this._terminal.gcharset,e),this._terminal.gcharset=null,this._state=h.NORMAL;break;case h.OSC:if(i===r.C0.ESC||i===r.C0.BEL){switch(i===r.C0.ESC&&this._position++,this._terminal.params.push(this._terminal.currentParam),this._terminal.params[0]){case 0:case 1:case 2:this._terminal.params[1]&&(this._terminal.title=this._terminal.params[1],this._terminal.handleTitle(this._terminal.title));break;case 3:break;case 4:case 5:break;case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:break;case 46:break;case 50:break;case 51:break;case 52:break;case 104:case 105:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:}this._terminal.params=[],this._terminal.currentParam=0,this._state=h.NORMAL}else this._terminal.params.length?this._terminal.currentParam+=i:i>="0"&&i<="9"?this._terminal.currentParam=10*this._terminal.currentParam+i.charCodeAt(0)-48:";"===i&&(this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam="");break;case h.CSI_PARAM:if(i in a){a[i](this);break}this.finalizeParam(),this._state=h.CSI;case h.CSI:i in l?l[i](this._inputHandler,this._terminal.params,this._terminal.prefix,this._terminal.postfix,this):this._terminal.error("Unknown CSI code: %s.",i),this._state=h.NORMAL,this._terminal.prefix="",this._terminal.postfix="";break;case h.DCS:if(i===r.C0.ESC||i===r.C0.BEL){i===r.C0.ESC&&this._position++;var p=void 0,f=void 0;switch(this._terminal.prefix){case"":break;case"$q":switch(p=this._terminal.currentParam,f=!1,p){case'"q':p='0"q';break;case'"p':p='61"p';break;case"r":p=""+(this._terminal.scrollTop+1)+";"+(this._terminal.scrollBottom+1)+"r";break;case"m":p="0m";break;default:this._terminal.error("Unknown DCS Pt: %s.",p),p=""}this._terminal.send(r.C0.ESC+"P"+ +f+"$r"+p+r.C0.ESC+"\\");break;case"+p":break;case"+q":p=this._terminal.currentParam,f=!1,this._terminal.send(r.C0.ESC+"P"+ +f+"+r"+p+r.C0.ESC+"\\");break;default:this._terminal.error("Unknown DCS prefix: %s.",this._terminal.prefix)}this._terminal.currentParam=0,this._terminal.prefix="",this._state=h.NORMAL}else this._terminal.currentParam?this._terminal.currentParam+=i:this._terminal.prefix||"$"===i||"+"===i?2===this._terminal.prefix.length?this._terminal.currentParam=i:this._terminal.prefix+=i:this._terminal.currentParam=i;break;case h.IGNORE:i!==r.C0.ESC&&i!==r.C0.BEL||(i===r.C0.ESC&&this._position++,this._state=h.NORMAL)}}return this._state},t.prototype.setState=function(t){this._state=t},t.prototype.setPrefix=function(t){this._terminal.prefix=t},t.prototype.setPostfix=function(t){this._terminal.postfix=t},t.prototype.setParam=function(t){this._terminal.currentParam=t},t.prototype.getParam=function(){return this._terminal.currentParam},t.prototype.finalizeParam=function(){this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam=0},t.prototype.skipNextChar=function(){this._position++},t}();i.Parser=c},{"./Charsets":1,"./EscapeSequences":3}],8:[function(t,e,i){"use strict";function r(t){var e=t.ownerDocument,i=e.createElement("span");i.innerHTML="hello world",t.appendChild(i);var r=i.offsetWidth,s=i.offsetHeight;i.style.fontWeight="bold";var n=i.offsetWidth,o=i.offsetHeight;return t.removeChild(i),r!==n||s!==o}Object.defineProperty(i,"__esModule",{value:!0});var s,n=t("./utils/DomElementObjectPool"),o=5;!function(t){t[t.BOLD=1]="BOLD",t[t.UNDERLINE=2]="UNDERLINE",t[t.BLINK=4]="BLINK",t[t.INVERSE=8]="INVERSE",t[t.INVISIBLE=16]="INVISIBLE"}(s||(s={}));var a=null,l=function(){function t(t){this._terminal=t,this._refreshRowsQueue=[],this._refreshFramesSkipped=0,this._refreshAnimationFrame=null,this._spanElementObjectPool=new n.DomElementObjectPool("span"),null===a&&(a=r(this._terminal.element)),this._spanElementObjectPool=new n.DomElementObjectPool("span")}return t.prototype.queueRefresh=function(t,e){this._refreshRowsQueue.push({start:t,end:e}),this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(this._refreshLoop.bind(this)))},t.prototype._refreshLoop=function(){var t=this._terminal.writeBuffer.length>0&&this._refreshFramesSkipped++<=o;if(t)return void(this._refreshAnimationFrame=window.requestAnimationFrame(this._refreshLoop.bind(this)));this._refreshFramesSkipped=0;var e,i;if(this._refreshRowsQueue.length>4)e=0,i=this._terminal.rows-1;else{e=this._refreshRowsQueue[0].start,i=this._refreshRowsQueue[0].end;for(var r=1;r<this._refreshRowsQueue.length;r++)this._refreshRowsQueue[r].start<e&&(e=this._refreshRowsQueue[r].start),this._refreshRowsQueue[r].end>i&&(i=this._refreshRowsQueue[r].end)}this._refreshRowsQueue=[],this._refreshAnimationFrame=null,this._refresh(e,i)},t.prototype._refresh=function(t,e){var i;e-t>=this._terminal.rows/2&&(i=this._terminal.element.parentNode,i&&this._terminal.element.removeChild(this._terminal.rowContainer));var r=this._terminal.cols,n=t;for(e>=this._terminal.rows&&(this._terminal.log("`end` is too large. Most likely a bad CSR."),e=this._terminal.rows-1);n<=e;n++){var o=n+this._terminal.ydisp,l=this._terminal.lines.get(o),h=void 0;h=this._terminal.y===n-(this._terminal.ybase-this._terminal.ydisp)&&this._terminal.cursorState&&!this._terminal.cursorHidden?this._terminal.x:-1;for(var c=this._terminal.defAttr,u=document.createDocumentFragment(),m="",p=void 0;this._terminal.children[n].children.length;){var f=this._terminal.children[n].children[0];this._terminal.children[n].removeChild(f),this._spanElementObjectPool.release(f)}for(var d=0;d<r;d++){var _=l[d][0],y=l[d][1],C=l[d][2];if(C){if(d===h&&(_=-1),_!==c&&(c!==this._terminal.defAttr&&(m&&(p.innerHTML=m,m=""),u.appendChild(p),p=null),_!==this._terminal.defAttr))if(m&&!p&&(p=this._spanElementObjectPool.acquire()),p&&(m&&(p.innerHTML=m,m=""),u.appendChild(p)),p=this._spanElementObjectPool.acquire(),_===-1)p.classList.add("reverse-video"),p.classList.add("terminal-cursor");else{var g=511&_,v=_>>9&511,b=_>>18;if(b&s.BOLD&&(a||p.classList.add("xterm-bold"),v<8&&(v+=8)),b&s.UNDERLINE&&p.classList.add("xterm-underline"),b&s.BLINK&&p.classList.add("xterm-blink"),b&s.INVERSE){var S=g;g=v,v=S,1&b&&v<8&&(v+=8)}b&s.INVISIBLE&&p.classList.add("xterm-hidden"),b&s.INVERSE&&(257===g&&(g=15),256===v&&(v=0)),g<256&&p.classList.add("xterm-bg-color-"+g),v<256&&p.classList.add("xterm-color-"+v)}if(2===C)m+='<span class="xterm-wide-char">'+y+"</span>";else if(y.charCodeAt(0)>255)m+='<span class="xterm-normal-char">'+y+"</span>";else switch(y){case"&":m+="&";break;case"<":m+="<";break;case">":m+=">";break;default:m+=y<=" "?" ":y}c=_}}m&&!p&&(p=this._spanElementObjectPool.acquire()),p&&(m&&(p.innerHTML=m,m=""),u.appendChild(p),p=null),this._terminal.children[n].appendChild(u)}i&&this._terminal.element.appendChild(this._terminal.rowContainer),this._terminal.emit("refresh",{element:this._terminal.element,start:t,end:e})},t.prototype.refreshSelection=function(t,e){for(;this._terminal.selectionContainer.children.length;)this._terminal.selectionContainer.removeChild(this._terminal.selectionContainer.children[0]);if(t&&e){var i=t[1]-this._terminal.ydisp,r=e[1]-this._terminal.ydisp,s=Math.max(i,0),n=Math.min(r,this._terminal.rows-1);if(!(s>=this._terminal.rows||n<0)){var o=document.createDocumentFragment(),a=i===s?t[0]:0,l=s===n?e[0]:this._terminal.cols;o.appendChild(this._createSelectionElement(s,a,l));var h=n-s-1;if(o.appendChild(this._createSelectionElement(s+1,0,this._terminal.cols,h)),s!==n){var c=r===n?e[0]:this._terminal.cols;o.appendChild(this._createSelectionElement(n,0,c))}this._terminal.selectionContainer.appendChild(o)}}},t.prototype._createSelectionElement=function(t,e,i,r){void 0===r&&(r=1);var s=document.createElement("div");return s.style.height=r*this._terminal.charMeasure.height+"px",s.style.top=t*this._terminal.charMeasure.height+"px",s.style.left=e*this._terminal.charMeasure.width+"px",s.style.width=this._terminal.charMeasure.width*(i-e)+"px",s},t}();i.Renderer=l},{"./utils/DomElementObjectPool":16}],9:[function(t,e,i){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(i,"__esModule",{value:!0});var s,n=t("./utils/Mouse"),o=t("./utils/Browser"),a=t("./EventEmitter"),l=t("./SelectionModel"),h=50,c=15,u=50,m=400,p=10,f=" ()[]{}'\"",d=1,_=2,y=String.fromCharCode(160),C=new RegExp(y,"g");!function(t){t[t.NORMAL=0]="NORMAL",t[t.WORD=1]="WORD",t[t.LINE=2]="LINE"}(s||(s={}));var g=function(t){function e(e,i,r,n){var o=t.call(this)||this;return o._terminal=e,o._buffer=i,o._rowContainer=r,o._charMeasure=n,o._initListeners(),o.enable(),o._model=new l.SelectionModel(e),o._lastMouseDownTime=0,o._activeSelectionMode=s.NORMAL,o}return r(e,t),e.prototype._initListeners=function(){var t=this;this._bufferTrimListener=function(e){return t._onTrim(e)},this._mouseMoveListener=function(e){return t._onMouseMove(e)},this._mouseDownListener=function(e){return t._onMouseDown(e)},this._mouseUpListener=function(e){return t._onMouseUp(e)}},e.prototype.disable=function(){this.clearSelection(),this._buffer.off("trim",this._bufferTrimListener),this._rowContainer.removeEventListener("mousedown",this._mouseDownListener)},e.prototype.enable=function(){this._buffer.on("trim",this._bufferTrimListener),this._rowContainer.addEventListener("mousedown",this._mouseDownListener)},e.prototype.setBuffer=function(t){this._buffer=t,this.clearSelection()},Object.defineProperty(e.prototype,"hasSelection",{get:function(){var t=this._model.finalSelectionStart,e=this._model.finalSelectionEnd;return!(!t||!e)&&(t[0]!==e[0]||t[1]!==e[1])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectionText",{get:function(){var t=this._model.finalSelectionStart,e=this._model.finalSelectionEnd;if(!t||!e)return"";var i=t[1]===e[1]?e[0]:null,r=[];r.push(this._translateBufferLineToString(this._buffer.get(t[1]),!0,t[0],i));for(var s=t[1]+1;s<=e[1]-1;s++){var n=this._buffer.get(s),a=this._translateBufferLineToString(n,!0);n.isWrapped?r[r.length-1]+=a:r.push(a)}if(t[1]!==e[1]){var n=this._buffer.get(e[1]),a=this._translateBufferLineToString(n,!0,0,e[0]);n.isWrapped?r[r.length-1]+=a:r.push(a)}var l=r.map(function(t){return t.replace(C," ")}).join(o.isMSWindows?"\r\n":"\n");return l},enumerable:!0,configurable:!0}),e.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh()},e.prototype._translateBufferLineToString=function(t,e,i,r){void 0===i&&(i=0),void 0===r&&(r=null);for(var s="",n=i,o=r,a=0;a<t.length;a++){var l=t[a];s+=l[d],0===l[_]&&(i>=a&&n--,r>=a&&o--)}var h=o||t.length;if(e){var c=s.search(/\s+$/);if(c!==-1&&(h=Math.min(h,c)),h<=n)return""}return s.substring(n,h)},e.prototype.refresh=function(t){var e=this;if(this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return e._refresh()})),o.isLinux&&t){var i=this.selectionText;i.length&&this.emit("newselection",this.selectionText)}},e.prototype._refresh=function(){this._refreshAnimationFrame=null,this.emit("refresh",{start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd})},e.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh()},e.prototype._onTrim=function(t){var e=this._model.onTrim(t);e&&this.refresh()},e.prototype._getMouseBufferCoords=function(t){var e=n.getCoords(t,this._rowContainer,this._charMeasure,this._terminal.cols,this._terminal.rows,!0);return e[0]--,e[1]--,e[1]+=this._terminal.ydisp,e},e.prototype._getMouseEventScrollAmount=function(t){var e=n.getCoordsRelativeToElement(t,this._rowContainer)[1],i=this._terminal.rows*this._charMeasure.height;return e>=0&&e<=i?0:(e>i&&(e-=i),e=Math.min(Math.max(e,-h),h),e/=h,e/Math.abs(e)+Math.round(e*(c-1)))},e.prototype._onMouseDown=function(t){0===t.button&&(t.preventDefault(),this._dragScrollAmount=0,this._setMouseClickCount(t),t.shiftKey?this._onShiftClick(t):1===this._clickCount?this._onSingleClick(t):2===this._clickCount?this._onDoubleClick(t):3===this._clickCount&&this._onTripleClick(t),this._addMouseDownListeners(),this.refresh(!0))},e.prototype._addMouseDownListeners=function(){var t=this;this._rowContainer.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._rowContainer.ownerDocument.addEventListener("mouseup",this._mouseUpListener),this._dragScrollIntervalTimer=setInterval(function(){return t._dragScroll()},u)},e.prototype._removeMouseDownListeners=function(){this._rowContainer.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._rowContainer.ownerDocument.removeEventListener("mouseup",this._mouseUpListener),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=null},e.prototype._onShiftClick=function(t){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(t))},e.prototype._onSingleClick=function(t){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=s.NORMAL,this._model.selectionStart=this._getMouseBufferCoords(t),this._model.selectionStart){this._model.selectionEnd=null;var e=this._buffer.get(this._model.selectionStart[1])[this._model.selectionStart[0]];0===e[_]&&this._model.selectionStart[0]++}},e.prototype._onDoubleClick=function(t){var e=this._getMouseBufferCoords(t);e&&(this._activeSelectionMode=s.WORD,this._selectWordAt(e))},e.prototype._onTripleClick=function(t){var e=this._getMouseBufferCoords(t);e&&(this._activeSelectionMode=s.LINE,this._selectLineAt(e[1]))},e.prototype._setMouseClickCount=function(t){var e=(new Date).getTime();(e-this._lastMouseDownTime>m||this._distanceFromLastMousePosition(t)>p)&&(this._clickCount=0),this._lastMouseDownTime=e,this._lastMousePosition=[t.pageX,t.pageY],this._clickCount++},e.prototype._distanceFromLastMousePosition=function(t){var e=Math.max(Math.abs(this._lastMousePosition[0]-t.pageX),Math.abs(this._lastMousePosition[1]-t.pageY));return e},e.prototype._onMouseMove=function(t){var e=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(t),this._activeSelectionMode===s.LINE?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._terminal.cols:this._activeSelectionMode===s.WORD&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(t),this._dragScrollAmount>0?this._model.selectionEnd[0]=this._terminal.cols-1:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]<this._buffer.length){var i=this._buffer.get(this._model.selectionEnd[1])[this._model.selectionEnd[0]];i&&0===i[2]&&this._model.selectionEnd[0]++}e&&e[0]===this._model.selectionEnd[0]&&e[1]===this._model.selectionEnd[1]||this.refresh(!0)},e.prototype._dragScroll=function(){this._dragScrollAmount&&(this._terminal.scrollDisp(this._dragScrollAmount,!1),this._dragScrollAmount>0?this._model.selectionEnd=[this._terminal.cols-1,this._terminal.ydisp+this._terminal.rows]:this._model.selectionEnd=[0,this._terminal.ydisp],this.refresh())},e.prototype._onMouseUp=function(t){this._removeMouseDownListeners()},e.prototype._convertViewportColToCharacterIndex=function(t,e){for(var i=e[0],r=0;e[0]>=r;r++){var s=t[r];0===s[_]&&i--}return i},e.prototype._getWordAt=function(t){var e=this._buffer.get(t[1]),i=this._translateBufferLineToString(e,!1),r=this._convertViewportColToCharacterIndex(e,t),s=r,n=t[0]-s,o=0,a=0;if(" "===i.charAt(s)){for(;s>0&&" "===i.charAt(s-1);)s--;for(;r<i.length&&" "===i.charAt(r+1);)r++}else{var l=t[0],h=t[0];for(0===e[l][_]&&(o++,l--),2===e[h][_]&&(a++,h++);s>0&&!this._isCharWordSeparator(i.charAt(s-1));)0===e[l-1][_]&&(o++,l--),s--,l--;for(;r+1<i.length&&!this._isCharWordSeparator(i.charAt(r+1));)2===e[h+1][_]&&(a++,h++),r++,h++}var c=s+n-o,u=Math.min(r-s+o+a+1,this._terminal.cols);return{start:c,length:u}},e.prototype._selectWordAt=function(t){var e=this._getWordAt(t);this._model.selectionStart=[e.start,t[1]],this._model.selectionStartLength=e.length},e.prototype._selectToWordAt=function(t){var e=this._getWordAt(t);this._model.selectionEnd=[this._model.areSelectionValuesReversed()?e.start:e.start+e.length,t[1]]},e.prototype._isCharWordSeparator=function(t){return f.indexOf(t)>=0},e.prototype._selectLineAt=function(t){this._model.selectionStart=[0,t],this._model.selectionStartLength=this._terminal.cols},e}(a.EventEmitter);i.SelectionManager=g},{"./EventEmitter":4,"./SelectionModel":10,"./utils/Browser":13,"./utils/Mouse":18}],10:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t){this._terminal=t,this.clearSelection()}return t.prototype.clearSelection=function(){this.selectionStart=null,this.selectionEnd=null,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(t.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"finalSelectionEnd",{get:function(){return this.isSelectAllActive?[this._terminal.cols,this._terminal.ybase+this._terminal.rows-1]:this.selectionStart?!this.selectionEnd||this.areSelectionValuesReversed()?[this.selectionStart[0]+this.selectionStartLength,this.selectionStart[1]]:this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd:null},enumerable:!0,configurable:!0}),t.prototype.areSelectionValuesReversed=function(){var t=this.selectionStart,e=this.selectionEnd;return t[1]>e[1]||t[1]===e[1]&&t[0]>e[0]},t.prototype.onTrim=function(t){return this.selectionStart&&(this.selectionStart[1]-=t),this.selectionEnd&&(this.selectionEnd[1]-=t),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},t}();i.SelectionModel=r},{}],11:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t,e,i,r){var s=this;this.terminal=t,this.viewportElement=e,this.scrollArea=i,this.charMeasure=r,this.currentRowHeight=0,this.lastRecordedBufferLength=0,this.lastRecordedViewportHeight=0,this.terminal.on("scroll",this.syncScrollArea.bind(this)),this.terminal.on("resize",this.syncScrollArea.bind(this)),this.viewportElement.addEventListener("scroll",this.onScroll.bind(this)),setTimeout(function(){return s.syncScrollArea()},0)}return t.prototype.refresh=function(){if(this.charMeasure.height>0){var t=this.charMeasure.height!==this.currentRowHeight;t&&(this.currentRowHeight=this.charMeasure.height,this.viewportElement.style.lineHeight=this.charMeasure.height+"px",this.terminal.rowContainer.style.lineHeight=this.charMeasure.height+"px");var e=this.lastRecordedViewportHeight!==this.terminal.rows;(t||e)&&(this.lastRecordedViewportHeight=this.terminal.rows,this.viewportElement.style.height=this.charMeasure.height*this.terminal.rows+"px",this.terminal.selectionContainer.style.height=this.viewportElement.style.height),this.scrollArea.style.height=this.charMeasure.height*this.lastRecordedBufferLength+"px"}},t.prototype.syncScrollArea=function(){this.lastRecordedBufferLength!==this.terminal.lines.length?(this.lastRecordedBufferLength=this.terminal.lines.length,this.refresh()):this.lastRecordedViewportHeight!==this.terminal.rows?this.refresh():this.charMeasure.height!==this.currentRowHeight&&this.refresh();var t=this.terminal.ydisp*this.currentRowHeight;this.viewportElement.scrollTop!==t&&(this.viewportElement.scrollTop=t)},t.prototype.onScroll=function(t){var e=Math.round(this.viewportElement.scrollTop/this.currentRowHeight),i=e-this.terminal.ydisp;this.terminal.scrollDisp(i,!0)},t.prototype.onWheel=function(t){if(0!==t.deltaY){var e=1;t.deltaMode===WheelEvent.DOM_DELTA_LINE?e=this.currentRowHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e=this.currentRowHeight*this.terminal.rows),this.viewportElement.scrollTop+=t.deltaY*e,t.preventDefault()}},t.prototype.onTouchStart=function(t){this.lastTouchY=t.touches[0].pageY},t.prototype.onTouchMove=function(t){var e=this.lastTouchY-t.touches[0].pageY;this.lastTouchY=t.touches[0].pageY,0!==e&&(this.viewportElement.scrollTop+=e,t.preventDefault())},t}();i.Viewport=r},{}],12:[function(t,e,i){"use strict";function r(t,e){return e?t.replace(/\r?\n/g,"\r"):t}function s(t,e,i){e.browser.isMSIE?window.clipboardData.setData("Text",i.selectionText):t.clipboardData.setData("text/plain",i.selectionText),t.preventDefault()}function n(t,e){t.stopPropagation();var i,s=function(i){return i=r(i,e.browser.isMSWindows),e.handler(i),e.textarea.value="",e.emit("paste",i),e.cancel(t)};e.browser.isMSIE?window.clipboardData&&(i=window.clipboardData.getData("Text"),s(i)):t.clipboardData&&(i=t.clipboardData.getData("text/plain"),s(i))}function o(t,e){e.style.position="fixed",e.style.width="20px",e.style.height="20px",e.style.left=t.clientX-10+"px",e.style.top=t.clientY-10+"px",e.style.zIndex="1000",e.focus(),setTimeout(function(){e.style.position=null,e.style.width=null,e.style.height=null,e.style.left=null,e.style.top=null,e.style.zIndex=null},4)}function a(t,e,i){o(t,e),e.value=i.selectionText,e.select()}Object.defineProperty(i,"__esModule",{value:!0}),i.prepareTextForTerminal=r,i.copyHandler=s,i.pasteHandler=n,i.moveTextAreaUnderMouseCursor=o,i.rightClickHandler=a},{}],13:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./Generic"),s="undefined"==typeof navigator,n=s?"node":navigator.userAgent,o=s?"node":navigator.platform;i.isFirefox=!!~n.indexOf("Firefox"),i.isMSIE=!!~n.indexOf("MSIE")||!!~n.indexOf("Trident"),i.isMac=r.contains(["Macintosh","MacIntel","MacPPC","Mac68K"],o),i.isIpad="iPad"===o,i.isIphone="iPhone"===o,i.isMSWindows=r.contains(["Windows","Win16","Win32","WinCE"],o),i.isLinux=o.indexOf("Linux")>=0},{"./Generic":17}],14:[function(t,e,i){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(i,"__esModule",{value:!0});var s=t("../EventEmitter.js"),n=function(t){function e(e,i){var r=t.call(this)||this;return r._document=e,r._parentElement=i,r}return r(e,t),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),e.prototype.measure=function(){var t=this;this._measureElement?this._doMeasure():(this._measureElement=this._document.createElement("span"),this._measureElement.style.position="absolute",this._measureElement.style.top="0",this._measureElement.style.left="-9999em",this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement),setTimeout(function(){return t._doMeasure()},0))},e.prototype._doMeasure=function(){var t=this._measureElement.getBoundingClientRect();0!==t.width&&0!==t.height&&(this._width===t.width&&this._height===t.height||(this._width=t.width,this._height=t.height,this.emit("charsizechanged")))},e}(s.EventEmitter);i.CharMeasure=n},{"../EventEmitter.js":4}],15:[function(t,e,i){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(i,"__esModule",{value:!0});var s=t("../EventEmitter"),n=function(t){function e(e){var i=t.call(this)||this;return i._array=new Array(e),i._startIndex=0,i._length=0,i}return r(e,t),Object.defineProperty(e.prototype,"maxLength",{get:function(){return this._array.length},set:function(t){for(var e=new Array(t),i=0;i<Math.min(t,this.length);i++)e[i]=this._array[this._getCyclicIndex(i)];this._array=e,this._startIndex=0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._length},set:function(t){if(t>this._length)for(var e=this._length;e<t;e++)this._array[e]=void 0;this._length=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"forEach",{get:function(){var t=this;return function(e){for(var i=t.length,r=0;r<i;r++)e(t.get(r),r)}},enumerable:!0,configurable:!0}),e.prototype.get=function(t){return this._array[this._getCyclicIndex(t)]},e.prototype.set=function(t,e){this._array[this._getCyclicIndex(t)]=e},e.prototype.push=function(t){this._array[this._getCyclicIndex(this._length)]=t,this._length===this.maxLength?(this._startIndex++,this._startIndex===this.maxLength&&(this._startIndex=0),this.emit("trim",1)):this._length++},e.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length-- -1)]},e.prototype.splice=function(t,e){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];if(e){for(var s=t;s<this._length-e;s++)this._array[this._getCyclicIndex(s)]=this._array[this._getCyclicIndex(s+e)];this._length-=e}if(i&&i.length){for(var s=this._length-1;s>=t;s--)this._array[this._getCyclicIndex(s+i.length)]=this._array[this._getCyclicIndex(s)];for(var s=0;s<i.length;s++)this._array[this._getCyclicIndex(t+s)]=i[s];if(this._length+i.length>this.maxLength){var n=this._length+i.length-this.maxLength;this._startIndex+=n,this._length=this.maxLength,this.emit("trim",n)}else this._length+=i.length}},e.prototype.trimStart=function(t){t>this._length&&(t=this._length),this._startIndex+=t,this._length-=t,this.emit("trim",t)},e.prototype.shiftElements=function(t,e,i){if(!(e<=0)){if(t<0||t>=this._length)throw new Error("start argument out of range");if(t+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(i>0){for(var r=e-1;r>=0;r--)this.set(t+r+i,this.get(t+r));var s=t+e+i-this._length;if(s>0)for(this._length+=s;this._length>this.maxLength;)this._length--,this._startIndex++,this.emit("trim",1)}else for(var r=0;r<e;r++)this.set(t+r+i,this.get(t+r))}},e.prototype._getCyclicIndex=function(t){return(this._startIndex+t)%this.maxLength},e}(s.EventEmitter);i.CircularList=n},{"../EventEmitter":4}],16:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t){this.type=t,this._type=t,this._pool=[],this._inUse={}}return t.prototype.acquire=function(){var e;return e=0===this._pool.length?this._createNew():this._pool.pop(),this._inUse[e.getAttribute(t.OBJECT_ID_ATTRIBUTE)]=e,e},t.prototype.release=function(e){if(!this._inUse[e.getAttribute(t.OBJECT_ID_ATTRIBUTE)])throw new Error("Could not release an element not yet acquired");delete this._inUse[e.getAttribute(t.OBJECT_ID_ATTRIBUTE)],this._cleanElement(e),this._pool.push(e)},t.prototype._createNew=function(){var e=document.createElement(this._type),i=t._objectCount++;return e.setAttribute(t.OBJECT_ID_ATTRIBUTE,i.toString(10)),e},t.prototype._cleanElement=function(t){t.className="",t.innerHTML=""},t}();r.OBJECT_ID_ATTRIBUTE="data-obj-id",r._objectCount=0,i.DomElementObjectPool=r},{}],17:[function(t,e,i){"use strict";function r(t,e){return t.indexOf(e)>=0}Object.defineProperty(i,"__esModule",{value:!0}),i.contains=r},{}],18:[function(t,e,i){"use strict";function r(t,e){if(null==t.pageX)return null;for(var i=t.pageX,r=t.pageY;e&&e!==self.document.documentElement;)i-=e.offsetLeft,r-=e.offsetTop,e="offsetParent"in e?e.offsetParent:e.parentElement;return[i,r]}function s(t,e,i,s,n,o){var a=r(t,e);return a[0]=Math.ceil((a[0]+(o?i.width/2:0))/i.width),a[1]=Math.ceil(a[1]/i.height),a[0]=Math.min(Math.max(a[0],1),s+1),a[1]=Math.min(Math.max(a[1],1),n+1),a}function n(t,e,i,r,n){var o=s(t,e,i,r,n),a=o[0],l=o[1];return a+=32,l+=32,{x:a,y:l}}Object.defineProperty(i,"__esModule",{value:!0}),i.getCoordsRelativeToElement=r,i.getCoords=s,i.getRawByteCoords=n},{}],19:[function(e,i,r){"use strict";function s(t){var e=this;if(!(this instanceof s))return new s(arguments[0],arguments[1],arguments[2]);e.browser=x,e.cancel=s.cancel,d.EventEmitter.call(this),"number"==typeof t&&(t={cols:arguments[0],rows:arguments[1],handler:arguments[2]}),t=t||{},Object.keys(s.defaults).forEach(function(i){null==t[i]&&(t[i]=s.options[i],s[i]!==s.defaults[i]&&(t[i]=s[i])),e[i]=t[i]}),8===t.colors.length?t.colors=t.colors.concat(s._colors.slice(8)):16===t.colors.length?t.colors=t.colors.concat(s._colors.slice(16)):10===t.colors.length?t.colors=t.colors.slice(0,-2).concat(s._colors.slice(8,-2),t.colors.slice(-2)):18===t.colors.length&&(t.colors=t.colors.concat(s._colors.slice(16,-2),t.colors.slice(-2))),
+this.colors=t.colors,this.options=t,this.parent=t.body||t.parent||(L?L.getElementsByTagName("body")[0]:null),this.cols=t.cols||t.geometry[0],this.rows=t.rows||t.geometry[1],this.geometry=[this.cols,this.rows],t.handler&&this.on("data",t.handler),this.ybase=0,this.ydisp=0,this.x=0,this.y=0,this.cursorState=0,this.cursorHidden=!1,this.convertEol,this.queue="",this.scrollTop=0,this.scrollBottom=this.rows-1,this.customKeyEventHandler=null,this.cursorBlinkInterval=null,this.applicationKeypad=!1,this.applicationCursor=!1,this.originMode=!1,this.insertMode=!1,this.wraparoundMode=!0,this.normal=null,this.charset=null,this.gcharset=null,this.glevel=0,this.charsets=[null],this.decLocator,this.x10Mouse,this.vt200Mouse,this.vt300Mouse,this.normalMouse,this.mouseEvents,this.sendFocus,this.utfMouse,this.sgrMouse,this.urxvtMouse,this.element,this.children,this.refreshStart,this.refreshEnd,this.savedX,this.savedY,this.savedCols,this.readable=!0,this.writable=!0,this.defAttr=131840,this.curAttr=this.defAttr,this.params=[],this.currentParam=0,this.prefix="",this.postfix="",this.inputHandler=new v.InputHandler(this),this.parser=new b.Parser(this.inputHandler,this),this.renderer=this.renderer||null,this.selectionManager=this.selectionManager||null,this.linkifier=this.linkifier||new w.Linkifier,this.writeBuffer=[],this.writeInProgress=!1,this.xoffSentToCatchUp=!1,this.writeStopped=!1,this.surrogate_high="",this.lines=new C.CircularList(this.scrollback);for(var i=this.rows;i--;)this.lines.push(this.blankLine());this.selectionManager&&this.selectionManager.setBuffer(this.lines),this.tabs,this.setupStops(),this.userScrolling=!1}function n(t,e,i,r){Array.isArray(t)||(t=[t]),t.forEach(function(t){t.addEventListener(e,i,r||!1)})}function o(t,e,i,r){t.removeEventListener(e,i,r||!1)}function a(t,e){if(this.cancelEvents||e)return t.preventDefault(),t.stopPropagation(),!1}function l(t,e){function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i}function h(t,e){var i=t.browser.isMac&&e.altKey&&!e.ctrlKey&&!e.metaKey||t.browser.isMSWindows&&e.altKey&&e.ctrlKey&&!e.metaKey;return"keypress"==e.type?i:i&&(!e.keyCode||e.keyCode>47)}function c(t,e,i){var r=t<<16|e<<8|i;if(null!=c._cache[r])return c._cache[r];for(var n,o,a,l,h,u=1/0,m=-1,p=0;p<s.vcolors.length;p++){if(n=s.vcolors[p],o=n[0],a=n[1],l=n[2],h=c.distance(t,e,i,o,a,l),0===h){m=p;break}h<u&&(u=h,m=p)}return c._cache[r]=m}function u(t,e,i){if(t.forEach)return t.forEach(e,i);for(var r=0;r<t.length;r++)e.call(i,t[r],r,t)}function m(t){return 16===t.keyCode||17===t.keyCode||18===t.keyCode}function p(t){if(Object.keys)return Object.keys(t);var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i}Object.defineProperty(r,"__esModule",{value:!0});var f=e("./CompositionHelper"),d=e("./EventEmitter"),_=e("./Viewport"),y=e("./handlers/Clipboard"),C=e("./utils/CircularList"),g=e("./EscapeSequences"),v=e("./InputHandler"),b=e("./Parser"),S=e("./Renderer"),w=e("./Linkifier"),E=e("./SelectionManager"),k=e("./utils/CharMeasure"),x=e("./utils/Browser"),M=e("./utils/Mouse"),L="undefined"!=typeof window?window.document:null,A=5,T=300,R=600;l(s,d.EventEmitter),s.prototype.eraseAttr=function(){return this.defAttr&-512|511&this.curAttr},s.tangoColors=["#2e3436","#cc0000","#4e9a06","#c4a000","#3465a4","#75507b","#06989a","#d3d7cf","#555753","#ef2929","#8ae234","#fce94f","#729fcf","#ad7fa8","#34e2e2","#eeeeec"],s.colors=function(){function t(t,i,s){r.push("#"+e(t)+e(i)+e(s))}function e(t){return t=t.toString(16),t.length<2?"0"+t:t}var i,r=s.tangoColors.slice(),n=[0,95,135,175,215,255];for(i=0;i<216;i++)t(n[i/36%6|0],n[i/6%6|0],n[i%6]);for(i=0;i<24;i++)n=8+10*i,t(n,n,n);return r}(),s._colors=s.colors.slice(),s.vcolors=function(){for(var t,e=[],i=s.colors,r=0;r<256;r++)t=parseInt(i[r].substring(1),16),e.push([t>>16&255,t>>8&255,255&t]);return e}(),s.defaults={colors:s.colors,theme:"default",convertEol:!1,termName:"xterm",geometry:[80,24],cursorBlink:!1,cursorStyle:"block",visualBell:!1,popOnBell:!1,scrollback:1e3,screenKeys:!1,debug:!1,cancelEvents:!1,disableStdin:!1,useFlowControl:!1,tabStopWidth:8},s.options={},s.focus=null,u(p(s.defaults),function(t){s[t]=s.defaults[t],s.options[t]=s.defaults[t]}),s.prototype.focus=function(){return this.textarea.focus()},s.prototype.getOption=function(t,e){if(!(t in s.defaults))throw new Error('No option with key "'+t+'"');return"undefined"!=typeof this.options[t]?this.options[t]:this[t]},s.prototype.setOption=function(t,e){if(!(t in s.defaults))throw new Error('No option with key "'+t+'"');switch(t){case"scrollback":if(e<this.rows){var i="Setting the scrollback value less than the number of rows ";return i+="("+this.rows+") is not allowed.",console.warn(i),!1}if(this.options[t]!==e){if(this.lines.length>e){var r=this.lines.length-e,n=this.ydisp-r<0;this.lines.trimStart(r),this.ybase=Math.max(this.ybase-r,0),this.ydisp=Math.max(this.ydisp-r,0),n&&this.refresh(0,this.rows-1)}this.lines.maxLength=e,this.viewport.syncScrollArea()}}switch(this[t]=e,this.options[t]=e,t){case"cursorBlink":this.setCursorBlinking(e);break;case"cursorStyle":this.element.classList.toggle("xterm-cursor-style-underline","underline"===e),this.element.classList.toggle("xterm-cursor-style-bar","bar"===e);break;case"tabStopWidth":this.setupStops()}},s.prototype.restartCursorBlinking=function(){this.setCursorBlinking(this.options.cursorBlink)},s.prototype.setCursorBlinking=function(t){if(this.element.classList.toggle("xterm-cursor-blink",t),this.clearCursorBlinkingInterval(),t){var e=this;this.cursorBlinkInterval=setInterval(function(){e.element.classList.toggle("xterm-cursor-blink-on")},R)}},s.prototype.clearCursorBlinkingInterval=function(){this.element.classList.remove("xterm-cursor-blink-on"),this.cursorBlinkInterval&&(clearInterval(this.cursorBlinkInterval),this.cursorBlinkInterval=null)},s.bindFocus=function(t){n(t.textarea,"focus",function(e){t.sendFocus&&t.send(g.C0.ESC+"[I"),t.element.classList.add("focus"),t.showCursor(),t.restartCursorBlinking.apply(t),s.focus=t,t.emit("focus",{terminal:t})})},s.prototype.blur=function(){return this.textarea.blur()},s.bindBlur=function(t){n(t.textarea,"blur",function(e){t.refresh(t.y,t.y),t.sendFocus&&t.send(g.C0.ESC+"[O"),t.element.classList.remove("focus"),t.clearCursorBlinkingInterval.apply(t),s.focus=null,t.emit("blur",{terminal:t})})},s.prototype.initGlobal=function(){var t=this,e=this;s.bindKeys(this),s.bindFocus(this),s.bindBlur(this),n(this.element,"copy",function(i){t.mouseEvents||y.copyHandler(i,e,t.selectionManager)});var i=function(t){return y.pasteHandler(t,e)};n(this.textarea,"paste",i),n(this.element,"paste",i),e.browser.isFirefox?n(this.element,"mousedown",function(e){2==e.button&&y.rightClickHandler(e,t.textarea,t.selectionManager)}):n(this.element,"contextmenu",function(e){y.rightClickHandler(e,t.textarea,t.selectionManager)}),e.browser.isLinux&&n(this.element,"auxclick",function(e){1===e.button&&y.moveTextAreaUnderMouseCursor(e,t.textarea,t.selectionManager)})},s.bindKeys=function(t){n(t.element,"keydown",function(e){L.activeElement==this&&t.keyDown(e)},!0),n(t.element,"keypress",function(e){L.activeElement==this&&t.keyPress(e)},!0),n(t.element,"keyup",function(e){m(e)||t.focus(t)},!0),n(t.textarea,"keydown",function(e){t.keyDown(e)},!0),n(t.textarea,"keypress",function(e){t.keyPress(e),this.value=""},!0),n(t.textarea,"compositionstart",t.compositionHelper.compositionstart.bind(t.compositionHelper)),n(t.textarea,"compositionupdate",t.compositionHelper.compositionupdate.bind(t.compositionHelper)),n(t.textarea,"compositionend",t.compositionHelper.compositionend.bind(t.compositionHelper)),t.on("refresh",t.compositionHelper.updateCompositionElements.bind(t.compositionHelper)),t.on("refresh",function(e){t.queueLinkification(e.start,e.end)})},s.prototype.insertRow=function(t){return"object"!=typeof t&&(t=L.createElement("div")),this.rowContainer.appendChild(t),this.children.push(t),t},s.prototype.open=function(t,e){var i=this,r=this,s=0;if(this.parent=t||this.parent,!this.parent)throw new Error("Terminal requires a parent element.");for(this.context=this.parent.ownerDocument.defaultView,this.document=this.parent.ownerDocument,this.body=this.document.getElementsByTagName("body")[0],this.element=this.document.createElement("div"),this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.classList.add("xterm-theme-"+this.theme),this.setCursorBlinking(this.options.cursorBlink),this.element.setAttribute("tabindex",0),this.viewportElement=L.createElement("div"),this.viewportElement.classList.add("xterm-viewport"),this.element.appendChild(this.viewportElement),this.viewportScrollArea=L.createElement("div"),this.viewportScrollArea.classList.add("xterm-scroll-area"),this.viewportElement.appendChild(this.viewportScrollArea),this.selectionContainer=L.createElement("div"),this.selectionContainer.classList.add("xterm-selection"),this.element.appendChild(this.selectionContainer),this.rowContainer=L.createElement("div"),this.rowContainer.classList.add("xterm-rows"),this.element.appendChild(this.rowContainer),this.children=[],this.linkifier.attachToDom(L,this.children),this.helperContainer=L.createElement("div"),this.helperContainer.classList.add("xterm-helpers"),this.element.appendChild(this.helperContainer),this.textarea=L.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.textarea.addEventListener("focus",function(){r.emit("focus",{terminal:r})}),this.textarea.addEventListener("blur",function(){r.emit("blur",{terminal:r})}),this.helperContainer.appendChild(this.textarea),this.compositionView=L.createElement("div"),this.compositionView.classList.add("composition-view"),this.compositionHelper=new f.CompositionHelper(this.textarea,this.compositionView,this),this.helperContainer.appendChild(this.compositionView),this.charSizeStyleElement=L.createElement("style"),this.helperContainer.appendChild(this.charSizeStyleElement);s<this.rows;s++)this.insertRow();if(this.parent.appendChild(this.element),this.charMeasure=new k.CharMeasure(L,this.helperContainer),this.charMeasure.on("charsizechanged",function(){r.updateCharSizeStyles()}),this.charMeasure.measure(),this.viewport=new _.Viewport(this,this.viewportElement,this.viewportScrollArea,this.charMeasure),this.renderer=new S.Renderer(this),this.selectionManager=new E.SelectionManager(this,this.lines,this.rowContainer,this.charMeasure),this.selectionManager.on("refresh",function(t){i.renderer.refreshSelection(t.start,t.end)}),this.selectionManager.on("newselection",function(t){i.textarea.value=t,i.textarea.focus(),i.textarea.select()}),this.on("scroll",function(){return i.selectionManager.refresh()}),this.viewportElement.addEventListener("scroll",function(){return i.selectionManager.refresh()}),this.refresh(0,this.rows-1),this.initGlobal(),"undefined"==typeof e){var o="You did not pass the `focus` argument in `Terminal.prototype.open()`.\n";o+="The `focus` argument now defaults to `true` but starting with xterm.js 3.0 ",o+="it will default to `false`.",console.warn(o),e=!0}e&&this.focus(),n(this.element,"click",function(){var t=L.getSelection(),e=t.isCollapsed,i="boolean"==typeof e?!e:"Range"==t.type;i||r.focus()}),this.bindMouse(),this.emit("open")},s.loadAddon=function(s,n){return"object"==typeof r&&"object"==typeof i?e("./addons/"+s+"/"+s):"function"==typeof t?e(["./addons/"+s+"/"+s],n):(console.error("Cannot load a module without a CommonJS or RequireJS environment."),!1)},s.prototype.updateCharSizeStyles=function(){this.charSizeStyleElement.textContent=".xterm-wide-char{width:"+2*this.charMeasure.width+"px;}"+(".xterm-normal-char{width:"+this.charMeasure.width+"px;}")+(".xterm-rows > div{height:"+this.charMeasure.height+"px;}")},s.prototype.bindMouse=function(){function t(t){var e,i;if(e=s(t),i=M.getRawByteCoords(t,l.rowContainer,l.charMeasure,l.cols,l.rows))switch(r(e,i),t.overrideType||t.type){case"mousedown":h=e;break;case"mouseup":h=32;break;case"wheel":}}function e(t){var e,i=h;e=M.getRawByteCoords(t,l.rowContainer,l.charMeasure,l.cols,l.rows),e&&(i+=32,r(i,e))}function i(t,e){if(l.utfMouse){if(2047===e)return t.push(0);e<127?t.push(e):(e>2047&&(e=2047),t.push(192|e>>6),t.push(128|63&e))}else{if(255===e)return t.push(0);e>127&&(e=127),t.push(e)}}function r(t,e){if(l.vt300Mouse){t&=3,e.x-=32,e.y-=32;var r=g.C0.ESC+"[24";if(0===t)r+="1";else if(1===t)r+="3";else if(2===t)r+="5";else{if(3===t)return;r+="0"}return r+="~["+e.x+","+e.y+"]\r",void l.send(r)}if(l.decLocator)return t&=3,e.x-=32,e.y-=32,0===t?t=2:1===t?t=4:2===t?t=6:3===t&&(t=3),void l.send(g.C0.ESC+"["+t+";"+(3===t?4:0)+";"+e.y+";"+e.x+";"+(e.page||0)+"&w");if(l.urxvtMouse)return e.x-=32,e.y-=32,e.x++,e.y++,void l.send(g.C0.ESC+"["+t+";"+e.x+";"+e.y+"M");if(l.sgrMouse)return e.x-=32,e.y-=32,void l.send(g.C0.ESC+"[<"+((3===(3&t)?t&-4:t)-32)+";"+e.x+";"+e.y+(3===(3&t)?"m":"M"));var r=[];i(r,t),i(r,e.x),i(r,e.y),l.send(g.C0.ESC+"[M"+String.fromCharCode.apply(String,r))}function s(t){var e,i,r,s,n;switch(t.overrideType||t.type){case"mousedown":e=null!=t.button?+t.button:null!=t.which?t.which-1:null,l.browser.isMSIE&&(e=1===e?0:4===e?1:e);break;case"mouseup":e=3;break;case"DOMMouseScroll":e=t.detail<0?64:65;break;case"wheel":e=t.wheelDeltaY>0?64:65}return i=t.shiftKey?4:0,r=t.metaKey?8:0,s=t.ctrlKey?16:0,n=i|r|s,l.vt200Mouse?n&=s:l.normalMouse||(n=0),e=32+(n<<2)+e}var a=this.element,l=this,h=32;n(a,"mousedown",function(i){if(l.mouseEvents)return t(i),l.focus(),l.vt200Mouse?(i.overrideType="mouseup",t(i),l.cancel(i)):(l.normalMouse&&n(l.document,"mousemove",e),l.x10Mouse||n(l.document,"mouseup",function i(r){return t(r),l.normalMouse&&o(l.document,"mousemove",e),o(l.document,"mouseup",i),l.cancel(r)}),l.cancel(i))}),n(a,"wheel",function(e){if(l.mouseEvents&&!(l.x10Mouse||l.vt300Mouse||l.decLocator))return t(e),l.cancel(e)}),n(a,"wheel",function(t){if(!l.mouseEvents)return l.viewport.onWheel(t),l.cancel(t)}),n(a,"touchstart",function(t){if(!l.mouseEvents)return l.viewport.onTouchStart(t),l.cancel(t)}),n(a,"touchmove",function(t){if(!l.mouseEvents)return l.viewport.onTouchMove(t),l.cancel(t)})},s.prototype.destroy=function(){this.readable=!1,this.writable=!1,this._events={},this.handler=function(){},this.write=function(){},this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},s.prototype.refresh=function(t,e){this.renderer&&this.renderer.queueRefresh(t,e)},s.prototype.queueLinkification=function(t,e){if(this.linkifier)for(var i=t;i<=e;i++)this.linkifier.linkifyRow(i)},s.prototype.showCursor=function(){this.cursorState||(this.cursorState=1,this.refresh(this.y,this.y))},s.prototype.scroll=function(t){var e;this.lines.length===this.lines.maxLength&&(this.lines.trimStart(1),this.ybase--,0!==this.ydisp&&this.ydisp--),this.ybase++,this.userScrolling||(this.ydisp=this.ybase),e=this.ybase+this.rows-1,e-=this.rows-1-this.scrollBottom,e===this.lines.length?this.lines.push(this.blankLine(void 0,t)):this.lines.splice(e,0,this.blankLine(void 0,t)),0!==this.scrollTop&&(0!==this.ybase&&(this.ybase--,this.userScrolling||(this.ydisp=this.ybase)),this.lines.splice(this.ybase+this.scrollTop,1)),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom),this.emit("scroll",this.ydisp)},s.prototype.scrollDisp=function(t,e){if(t<0){if(0===this.ydisp)return;this.userScrolling=!0}else t+this.ydisp>=this.ybase&&(this.userScrolling=!1);this.ydisp+=t,this.ydisp>this.ybase?this.ydisp=this.ybase:this.ydisp<0&&(this.ydisp=0),e||this.emit("scroll",this.ydisp),this.refresh(0,this.rows-1)},s.prototype.scrollPages=function(t){this.scrollDisp(t*(this.rows-1))},s.prototype.scrollToTop=function(){this.scrollDisp(-this.ydisp)},s.prototype.scrollToBottom=function(){this.scrollDisp(this.ybase-this.ydisp)},s.prototype.write=function(t){if(this.writeBuffer.push(t),this.options.useFlowControl&&!this.xoffSentToCatchUp&&this.writeBuffer.length>=A&&(this.send(g.C0.DC3),this.xoffSentToCatchUp=!0),!this.writeInProgress&&this.writeBuffer.length>0){this.writeInProgress=!0;var e=this;setTimeout(function(){e.innerWrite()})}},s.prototype.innerWrite=function(){for(var t=this.writeBuffer.splice(0,T);t.length>0;){var e=t.shift();e.length;this.xoffSentToCatchUp&&0===t.length&&0===this.writeBuffer.length&&(this.send(g.C0.DC1),this.xoffSentToCatchUp=!1),this.refreshStart=this.y,this.refreshEnd=this.y;var i=this.parser.parse(e);this.parser.setState(i),this.updateRange(this.y),this.refresh(this.refreshStart,this.refreshEnd)}if(this.writeBuffer.length>0){var r=this;setTimeout(function(){r.innerWrite()},0)}else this.writeInProgress=!1},s.prototype.writeln=function(t){this.write(t+"\r\n")},s.prototype.attachCustomKeydownHandler=function(t){var e="attachCustomKeydownHandler() is DEPRECATED and will be removed soon. Please use attachCustomKeyEventHandler() instead.";console.warn(e),this.attachCustomKeyEventHandler(t)},s.prototype.attachCustomKeyEventHandler=function(t){this.customKeyEventHandler=t},s.prototype.setHypertextLinkHandler=function(t){if(!this.linkifier)throw new Error("Cannot attach a hypertext link handler before Terminal.open is called");this.linkifier.setHypertextLinkHandler(t),this.refresh(0,this.rows-1)},s.prototype.setHypertextValidationCallback=function(t){if(!this.linkifier)throw new Error("Cannot attach a hypertext validation callback before Terminal.open is called");this.linkifier.setHypertextValidationCallback(t),this.refresh(0,this.rows-1)},s.prototype.registerLinkMatcher=function(t,e,i){if(this.linkifier){var r=this.linkifier.registerLinkMatcher(t,e,i);return this.refresh(0,this.rows-1),r}},s.prototype.deregisterLinkMatcher=function(t){this.linkifier&&this.linkifier.deregisterLinkMatcher(t)&&this.refresh(0,this.rows-1)},s.prototype.hasSelection=function(){return this.selectionManager.hasSelection},s.prototype.getSelection=function(){return this.selectionManager.selectionText},s.prototype.clearSelection=function(){this.selectionManager.clearSelection()},s.prototype.selectAll=function(){this.selectionManager.selectAll()},s.prototype.keyDown=function(t){if(this.customKeyEventHandler&&this.customKeyEventHandler(t)===!1)return!1;if(this.restartCursorBlinking(),!this.compositionHelper.keydown.bind(this.compositionHelper)(t))return this.ybase!==this.ydisp&&this.scrollToBottom(),!1;var e=this.evaluateKeyEscapeSequence(t);return e.key===g.C0.DC3?this.writeStopped=!0:e.key===g.C0.DC1&&(this.writeStopped=!1),e.scrollDisp?(this.scrollDisp(e.scrollDisp),this.cancel(t,!0)):!!h(this,t)||(e.cancel&&this.cancel(t,!0),!e.key||(this.emit("keydown",t),this.emit("key",e.key,t),this.showCursor(),this.handler(e.key),this.cancel(t,!0)))},s.prototype.evaluateKeyEscapeSequence=function(t){var e={cancel:!1,key:void 0,scrollDisp:void 0},i=t.shiftKey<<0|t.altKey<<1|t.ctrlKey<<2|t.metaKey<<3;switch(t.keyCode){case 8:if(t.shiftKey){e.key=g.C0.BS;break}e.key=g.C0.DEL;break;case 9:if(t.shiftKey){e.key=g.C0.ESC+"[Z";break}e.key=g.C0.HT,e.cancel=!0;break;case 13:e.key=g.C0.CR,e.cancel=!0;break;case 27:e.key=g.C0.ESC,e.cancel=!0;break;case 37:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"D",e.key==g.C0.ESC+"[1;3D"&&(e.key=this.browser.isMac?g.C0.ESC+"b":g.C0.ESC+"[1;5D")):this.applicationCursor?e.key=g.C0.ESC+"OD":e.key=g.C0.ESC+"[D";break;case 39:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"C",e.key==g.C0.ESC+"[1;3C"&&(e.key=this.browser.isMac?g.C0.ESC+"f":g.C0.ESC+"[1;5C")):this.applicationCursor?e.key=g.C0.ESC+"OC":e.key=g.C0.ESC+"[C";break;case 38:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"A",e.key==g.C0.ESC+"[1;3A"&&(e.key=g.C0.ESC+"[1;5A")):this.applicationCursor?e.key=g.C0.ESC+"OA":e.key=g.C0.ESC+"[A";break;case 40:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"B",e.key==g.C0.ESC+"[1;3B"&&(e.key=g.C0.ESC+"[1;5B")):this.applicationCursor?e.key=g.C0.ESC+"OB":e.key=g.C0.ESC+"[B";break;case 45:t.shiftKey||t.ctrlKey||(e.key=g.C0.ESC+"[2~");break;case 46:i?e.key=g.C0.ESC+"[3;"+(i+1)+"~":e.key=g.C0.ESC+"[3~";break;case 36:i?e.key=g.C0.ESC+"[1;"+(i+1)+"H":this.applicationCursor?e.key=g.C0.ESC+"OH":e.key=g.C0.ESC+"[H";break;case 35:i?e.key=g.C0.ESC+"[1;"+(i+1)+"F":this.applicationCursor?e.key=g.C0.ESC+"OF":e.key=g.C0.ESC+"[F";break;case 33:t.shiftKey?e.scrollDisp=-(this.rows-1):e.key=g.C0.ESC+"[5~";break;case 34:t.shiftKey?e.scrollDisp=this.rows-1:e.key=g.C0.ESC+"[6~";break;case 112:i?e.key=g.C0.ESC+"[1;"+(i+1)+"P":e.key=g.C0.ESC+"OP";break;case 113:i?e.key=g.C0.ESC+"[1;"+(i+1)+"Q":e.key=g.C0.ESC+"OQ";break;case 114:i?e.key=g.C0.ESC+"[1;"+(i+1)+"R":e.key=g.C0.ESC+"OR";break;case 115:i?e.key=g.C0.ESC+"[1;"+(i+1)+"S":e.key=g.C0.ESC+"OS";break;case 116:i?e.key=g.C0.ESC+"[15;"+(i+1)+"~":e.key=g.C0.ESC+"[15~";break;case 117:i?e.key=g.C0.ESC+"[17;"+(i+1)+"~":e.key=g.C0.ESC+"[17~";break;case 118:i?e.key=g.C0.ESC+"[18;"+(i+1)+"~":e.key=g.C0.ESC+"[18~";break;case 119:i?e.key=g.C0.ESC+"[19;"+(i+1)+"~":e.key=g.C0.ESC+"[19~";break;case 120:i?e.key=g.C0.ESC+"[20;"+(i+1)+"~":e.key=g.C0.ESC+"[20~";break;case 121:i?e.key=g.C0.ESC+"[21;"+(i+1)+"~":e.key=g.C0.ESC+"[21~";break;case 122:i?e.key=g.C0.ESC+"[23;"+(i+1)+"~":e.key=g.C0.ESC+"[23~";break;case 123:i?e.key=g.C0.ESC+"[24;"+(i+1)+"~":e.key=g.C0.ESC+"[24~";break;default:!t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?this.browser.isMac||!t.altKey||t.ctrlKey||t.metaKey?this.browser.isMac&&!t.altKey&&!t.ctrlKey&&t.metaKey&&65===t.keyCode&&this.selectAll():t.keyCode>=65&&t.keyCode<=90?e.key=g.C0.ESC+String.fromCharCode(t.keyCode+32):192===t.keyCode?e.key=g.C0.ESC+"`":t.keyCode>=48&&t.keyCode<=57&&(e.key=g.C0.ESC+(t.keyCode-48)):t.keyCode>=65&&t.keyCode<=90?e.key=String.fromCharCode(t.keyCode-64):32===t.keyCode?e.key=String.fromCharCode(0):t.keyCode>=51&&t.keyCode<=55?e.key=String.fromCharCode(t.keyCode-51+27):56===t.keyCode?e.key=String.fromCharCode(127):219===t.keyCode?e.key=String.fromCharCode(27):220===t.keyCode?e.key=String.fromCharCode(28):221===t.keyCode&&(e.key=String.fromCharCode(29))}return e},s.prototype.setgLevel=function(t){this.glevel=t,this.charset=this.charsets[t]},s.prototype.setgCharset=function(t,e){this.charsets[t]=e,this.glevel===t&&(this.charset=e)},s.prototype.keyPress=function(t){var e;if(this.customKeyEventHandler&&this.customKeyEventHandler(t)===!1)return!1;if(this.cancel(t),t.charCode)e=t.charCode;else if(null==t.which)e=t.keyCode;else{if(0===t.which||0===t.charCode)return!1;e=t.which}return!(!e||(t.altKey||t.ctrlKey||t.metaKey)&&!h(this,t))&&(e=String.fromCharCode(e),this.emit("keypress",e,t),this.emit("key",e,t),this.showCursor(),this.handler(e),!0)},s.prototype.send=function(t){var e=this;this.queue||setTimeout(function(){e.handler(e.queue),e.queue=""},1),this.queue+=t},s.prototype.bell=function(){if(this.visualBell){var t=this;this.element.style.borderColor="white",setTimeout(function(){t.element.style.borderColor=""},10),this.popOnBell&&this.focus()}},s.prototype.log=function(){if(this.debug&&this.context.console&&this.context.console.log){var t=Array.prototype.slice.call(arguments);this.context.console.log.apply(this.context.console,t)}},s.prototype.error=function(){if(this.debug&&this.context.console&&this.context.console.error){var t=Array.prototype.slice.call(arguments);this.context.console.error.apply(this.context.console,t)}},s.prototype.resize=function(t,e){if(!isNaN(t)&&!isNaN(e)){e>this.getOption("scrollback")&&this.setOption("scrollback",e);var i,r,s,n,o;if(t!==this.cols||e!==this.rows){if(t<1&&(t=1),e<1&&(e=1),s=this.cols,s<t)for(n=[this.defAttr," ",1],r=this.lines.length;r--;)for(;this.lines.get(r).length<t;)this.lines.get(r).push(n);if(this.cols=t,this.setupStops(this.cols),s=this.rows,o=0,s<e)for(i=this.element;s++<e;)this.lines.length<e+this.ybase&&(this.ybase>0&&this.lines.length<=this.ybase+this.y+o+1?(this.ybase--,o++,this.ydisp>0&&this.ydisp--):this.lines.push(this.blankLine())),this.children.length<e&&this.insertRow();else for(;s-- >e;)if(this.lines.length>e+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++)),this.children.length>e){if(i=this.children.shift(),!i)continue;i.parentNode.removeChild(i)}this.rows=e,this.y>=e&&(this.y=e-1),o&&(this.y+=o),this.x>=t&&(this.x=t-1),this.scrollTop=0,this.scrollBottom=e-1,this.charMeasure.measure(),this.refresh(0,this.rows-1),this.normal=null,this.geometry=[this.cols,this.rows],this.emit("resize",{terminal:this,cols:t,rows:e})}}},s.prototype.updateRange=function(t){t<this.refreshStart&&(this.refreshStart=t),t>this.refreshEnd&&(this.refreshEnd=t)},s.prototype.maxRange=function(){this.refreshStart=0,this.refreshEnd=this.rows-1},s.prototype.setupStops=function(t){for(null!=t?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t<this.cols;t+=this.getOption("tabStopWidth"))this.tabs[t]=!0},s.prototype.prevStop=function(t){for(null==t&&(t=this.x);!this.tabs[--t]&&t>0;);return t>=this.cols?this.cols-1:t<0?0:t},s.prototype.nextStop=function(t){for(null==t&&(t=this.x);!this.tabs[++t]&&t<this.cols;);return t>=this.cols?this.cols-1:t<0?0:t},s.prototype.eraseRight=function(t,e){var i=this.lines.get(this.ybase+e);if(i){for(var r=[this.eraseAttr()," ",1];t<this.cols;t++)i[t]=r;this.updateRange(e)}},s.prototype.eraseLeft=function(t,e){var i=this.lines.get(this.ybase+e);if(i){var r=[this.eraseAttr()," ",1];for(t++;t--;)i[t]=r;this.updateRange(e)}},s.prototype.clear=function(){if(0!==this.ybase||0!==this.y){this.lines.set(0,this.lines.get(this.ybase+this.y)),this.lines.length=1,this.ydisp=0,this.ybase=0,this.y=0;for(var t=1;t<this.rows;t++)this.lines.push(this.blankLine());this.refresh(0,this.rows-1),this.emit("scroll",this.ydisp)}},s.prototype.eraseLine=function(t){this.eraseRight(0,t)},s.prototype.blankLine=function(t,e){var i=t?this.eraseAttr():this.defAttr,r=[i," ",1],s=[],n=0;for(e&&(s.isWrapped=e);n<this.cols;n++)s[n]=r;return s},s.prototype.ch=function(t){return t?[this.eraseAttr()," ",1]:[this.defAttr," ",1]},s.prototype.is=function(t){var e=this.termName;return 0===(e+"").indexOf(t)},s.prototype.handler=function(t){this.options.disableStdin||(this.ybase!==this.ydisp&&this.scrollToBottom(),this.emit("data",t))},s.prototype.handleTitle=function(t){this.emit("title",t)},s.prototype.index=function(){this.y++,this.y>this.scrollBottom&&(this.y--,this.scroll()),this.x>=this.cols&&this.x--},s.prototype.reverseIndex=function(){this.y===this.scrollTop?(this.lines.shiftElements(this.y+this.ybase,this.rows-1,1),this.lines.set(this.y+this.ybase,this.blankLine(!0)),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom)):this.y--},s.prototype.reset=function(){this.options.rows=this.rows,this.options.cols=this.cols;var t=this.customKeyEventHandler,e=this.cursorBlinkInterval;s.call(this,this.options),this.customKeyEventHandler=t,this.cursorBlinkInterval=e,this.refresh(0,this.rows-1),this.viewport.syncScrollArea()},s.prototype.tabSet=function(){this.tabs[this.x]=!0},s.prototype.matchColor=c,c._cache={},c.distance=function(t,e,i,r,s,n){return Math.pow(30*(t-r),2)+Math.pow(59*(e-s),2)+Math.pow(11*(i-n),2)},s.EventEmitter=d.EventEmitter,s.inherits=l,s.on=n,s.off=o,s.cancel=a,i.exports=s},{"./CompositionHelper":2,"./EscapeSequences":3,"./EventEmitter":4,"./InputHandler":5,"./Linkifier":6,"./Parser":7,"./Renderer":8,"./SelectionManager":9,"./Viewport":11,"./handlers/Clipboard":12,"./utils/Browser":13,"./utils/CharMeasure":14,"./utils/CircularList":15,"./utils/Mouse":18}]},{},[19])(19)});</script>
<script>!function(e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("../../xterm")):"function"==typeof define?define(["../../xterm"],e):e(window.Terminal)}(function(e){var t={};return t.proposeGeometry=function(e){if(!e.element.parentElement)return null;var t,n,r,o,i,p=window.getComputedStyle(e.element.parentElement),a=parseInt(p.getPropertyValue("height")),l=Math.max(0,parseInt(p.getPropertyValue("width"))-17),s=window.getComputedStyle(e.element),u=parseInt(s.getPropertyValue("padding-top"))+parseInt(s.getPropertyValue("padding-bottom")),d=parseInt(s.getPropertyValue("padding-right"))+parseInt(s.getPropertyValue("padding-left")),y=a-u,g=l-d,m=(e.rowContainer,e.rowContainer.firstElementChild),f=m.innerHTML;return m.style.display="inline",m.innerHTML="W",r=m.getBoundingClientRect().width,m.style.display="",t=m.getBoundingClientRect().height,m.innerHTML=f,n=parseInt(y/t),o=parseInt(g/r),i={cols:o,rows:n}},t.fit=function(e){var n=t.proposeGeometry(e);n&&e.resize(n.cols,n.rows)},e.prototype.proposeGeometry=function(){return t.proposeGeometry(this)},e.prototype.fit=function(){return t.fit(this)},t});</script>
<script>UTF8Decoder=function(){this.bytesLeft=0,this.codePoint=0,this.lowerBound=0},UTF8Decoder.prototype.decode=function(t){for(var e="",o=0;o<t.length;o++){var i=t.charCodeAt(o);if(0==this.bytesLeft)i<=127?e+=t.charAt(o):192<=i&&i<=223?(this.codePoint=i-192,this.bytesLeft=1,this.lowerBound=128):224<=i&&i<=239?(this.codePoint=i-224,this.bytesLeft=2,this.lowerBound=2048):240<=i&&i<=247?(this.codePoint=i-240,this.bytesLeft=3,this.lowerBound=65536):248<=i&&i<=251?(this.codePoint=i-248,this.bytesLeft=4,this.lowerBound=2097152):252<=i&&i<=253?(this.codePoint=i-252,this.bytesLeft=5,this.lowerBound=67108864):e+="�";else if(128<=i&&i<=191){if(this.bytesLeft--,this.codePoint=(this.codePoint<<6)+(i-128),0==this.bytesLeft){var r=this.codePoint;r<this.lowerBound||55296<=r&&r<=57343||r>1114111?e+="�":r<65536?e+=String.fromCharCode(r):(r-=65536,e+=String.fromCharCode(55296+(r>>>10&1023),56320+(1023&r)))}}else e+="�",this.bytesLeft=0,o--}return e},Terminal.prototype.decodeUTF8=function(t){return(new UTF8Decoder).decode(t)},Terminal.prototype.encodeUTF8=function(t){for(var e="",o=0;o<t.length;o++){var i=t.charCodeAt(o);if(56320<=i&&i<=57343)i=65533;else if(55296<=i&&i<=56319)if(o+1<t.length){var r=t.charCodeAt(o+1);56320<=r&&r<=57343?(i=65536+((1023&i)<<10)+(1023&r),o++):i=65533}else i=65533;var n;if(i<=127)e+=t.charAt(o);else for(i<=2047?(e+=String.fromCharCode(192|i>>>6),n=1):i<=65535?(e+=String.fromCharCode(224|i>>>12),n=2):(e+=String.fromCharCode(240|i>>>18),n=3);n>0;)n--,e+=String.fromCharCode(128|i>>>6*n&63)}return e},Terminal.prototype.writeUTF8=function(t){this.write(this.decodeUTF8(t))};</script>
<script>Terminal.prototype.showOverlay=function(e,t){if(!this.overlayNode_){if(!this.element)return;this.overlayNode_=document.createElement("div"),this.overlayNode_.style.cssText="border-radius: 15px;font-size: xx-large;opacity: 0.75;padding: 0.2em 0.5em 0.2em 0.5em;position: absolute;-webkit-user-select: none;-webkit-transition: opacity 180ms ease-in;-moz-user-select: none;-moz-transition: opacity 180ms ease-in;",this.overlayNode_.addEventListener("mousedown",function(e){e.preventDefault(),e.stopPropagation()},!0)}this.overlayNode_.style.color="#101010",this.overlayNode_.style.backgroundColor="#f0f0f0",this.overlayNode_.textContent=e,this.overlayNode_.style.opacity="0.75",this.overlayNode_.parentNode||this.element.appendChild(this.overlayNode_);var o=this.element.getBoundingClientRect(),i=this.overlayNode_.getBoundingClientRect();this.overlayNode_.style.top=(o.height-i.height)/2+"px",this.overlayNode_.style.left=(o.width-i.width)/2+"px";var l=this;this.overlayTimeout_&&clearTimeout(this.overlayTimeout_),null!==t&&(this.overlayTimeout_=setTimeout(function(){l.overlayNode_.style.opacity="0",l.overlayTimeout_=setTimeout(function(){l.overlayNode_.parentNode&&l.overlayNode_.parentNode.removeChild(l.overlayNode_),l.overlayTimeout_=null,l.overlayNode_.style.opacity="0.75"},200)},t||1500))};</script>