Packages
ex_debug_toolbar
0.4.6
A debug web toolbar for Phoenix projects to display all sorts of information about request
Retired package: contains breaking change
Current section
Files
Jump to
Current section
Files
priv/static/js/toolbar.js
!function(){"use strict";var e="undefined"==typeof window?global:window;if("function"!=typeof e.require){var t={},n={},i={},r={}.hasOwnProperty,o=/^\.\.?(\/|$)/,s=function(e,t){for(var n,i=[],r=(o.test(t)?e+"/"+t:t).split("/"),s=0,a=r.length;s<a;s++)n=r[s],".."===n?i.pop():"."!==n&&""!==n&&i.push(n);return i.join("/")},a=function(e){return e.split("/").slice(0,-1).join("/")},l=function(t){return function(n){var i=s(a(t),n);return e.require(i,t)}},u=function(e,t){var i=null;i=g&&g.createHot(e);var r={id:e,exports:{},hot:i};return n[e]=r,t(r.exports,l(e),r),r.exports},c=function(e){return i[e]?c(i[e]):e},h=function(e,t){return c(s(a(e),t))},f=function(e,i){null==i&&(i="/");var o=c(e);if(r.call(n,o))return n[o].exports;if(r.call(t,o))return u(o,t[o]);throw new Error("Cannot find module '"+e+"' from '"+i+"'")};f.alias=function(e,t){i[t]=e};var p=/\.[^.\/]+$/,d=/\/index(\.[^\/]+)?$/,m=function(e){if(p.test(e)){var t=e.replace(p,"");r.call(i,t)&&i[t].replace(p,"")!==t+"/index"||(i[t]=e)}if(d.test(e)){var n=e.replace(d,"");r.call(i,n)||(i[n]=e)}};f.register=f.define=function(e,i){if("object"==typeof e)for(var o in e)r.call(e,o)&&f.register(o,e[o]);else t[e]=i,delete n[e],m(e)},f.list=function(){var e=[];for(var n in t)r.call(t,n)&&e.push(n);return e};var g=e._hmr&&new e._hmr(h,f,t,n);f._cache=n,f.hmr=g&&g.wrap,f.brunch=!0,e.require=f}}(),function(){var e,t=window,n=function(e,t,n){var i={},r=function(t,n){var o;try{return o=e(n+"/node_modules/"+t)}catch(s){if(s.toString().indexOf("Cannot find module")===-1)throw s;if(n.indexOf("node_modules")!==-1){var a=n.split("/"),l=a.lastIndexOf("node_modules"),u=a.slice(0,l).join("/");return r(t,u)}}return i};return function(o){if(o in t&&(o=t[o]),o){if("."!==o[0]&&n){var s=r(o,n);if(s!==i)return s}return e(o)}}};require.register("base64-js/index.js",function(e,t,i){t=n(t,{},"base64-js"),function(){"use strict";function t(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function n(e){return 3*e.length/4-t(e)}function i(e){var n,i,r,o,s,a=e.length;o=t(e),s=new u(3*a/4-o),i=o>0?a-4:a;var c=0;for(n=0;n<i;n+=4)r=l[e.charCodeAt(n)]<<18|l[e.charCodeAt(n+1)]<<12|l[e.charCodeAt(n+2)]<<6|l[e.charCodeAt(n+3)],s[c++]=r>>16&255,s[c++]=r>>8&255,s[c++]=255&r;return 2===o?(r=l[e.charCodeAt(n)]<<2|l[e.charCodeAt(n+1)]>>4,s[c++]=255&r):1===o&&(r=l[e.charCodeAt(n)]<<10|l[e.charCodeAt(n+1)]<<4|l[e.charCodeAt(n+2)]>>2,s[c++]=r>>8&255,s[c++]=255&r),s}function r(e){return a[e>>18&63]+a[e>>12&63]+a[e>>6&63]+a[63&e]}function o(e,t,n){for(var i,o=[],s=t;s<n;s+=3)i=(e[s]<<16)+(e[s+1]<<8)+e[s+2],o.push(r(i));return o.join("")}function s(e){for(var t,n=e.length,i=n%3,r="",s=[],l=16383,u=0,c=n-i;u<c;u+=l)s.push(o(e,u,u+l>c?c:u+l));return 1===i?(t=e[n-1],r+=a[t>>2],r+=a[t<<4&63],r+="=="):2===i&&(t=(e[n-2]<<8)+e[n-1],r+=a[t>>10],r+=a[t>>4&63],r+=a[t<<2&63],r+="="),s.push(r),s.join("")}e.byteLength=n,e.toByteArray=i,e.fromByteArray=s;for(var a=[],l=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,f=c.length;h<f;++h)a[h]=c[h],l[c.charCodeAt(h)]=h;l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63}()}),require.register("bootstrap-sass/assets/javascripts/bootstrap.js",function(e,t,i){t=n(t,{},"bootstrap-sass"),function(){if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(e){"use strict";var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,i=this;e(this).one("bsTransitionEnd",function(){n=!0});var r=function(){n||e(i).trigger(e.support.transition.end)};return setTimeout(r,t),this},e(function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var n=e(this),r=n.data("bs.alert");r||n.data("bs.alert",r=new i(this)),"string"==typeof t&&r[t].call(n)})}var n='[data-dismiss="alert"]',i=function(t){e(t).on("click",n,this.close)};i.VERSION="3.3.7",i.TRANSITION_DURATION=150,i.prototype.close=function(t){function n(){s.detach().trigger("closed.bs.alert").remove()}var r=e(this),o=r.attr("data-target");o||(o=r.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,""));var s=e("#"===o?[]:o);t&&t.preventDefault(),s.length||(s=r.closest(".alert")),s.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(s.removeClass("in"),e.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var r=e.fn.alert;e.fn.alert=t,e.fn.alert.Constructor=i,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.button"),o="object"==typeof t&&t;r||i.data("bs.button",r=new n(this,o)),"toggle"==t?r.toggle():t&&r.setState(t)})}var n=function(t,i){this.$element=e(t),this.options=e.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.7",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var n="disabled",i=this.$element,r=i.is("input")?"val":"html",o=i.data();t+="Text",null==o.resetText&&i.data("resetText",i[r]()),setTimeout(e.proxy(function(){i[r](null==o[t]?this.options[t]:o[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),e&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=e.fn.button;e.fn.button=t,e.fn.button.Constructor=n,e.fn.button.noConflict=function(){return e.fn.button=i,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=e(n.target).closest(".btn");t.call(i,"toggle"),e(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),i.is("input,button")?i.trigger("focus"):i.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.carousel"),o=e.extend({},n.DEFAULTS,i.data(),"object"==typeof t&&t),s="string"==typeof t?t:o.slide;r||i.data("bs.carousel",r=new n(this,o)),"number"==typeof t?r.to(t):s?r[s]():o.interval&&r.pause().cycle()})}var n=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},n.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},n.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t),i="prev"==e&&0===n||"next"==e&&n==this.$items.length-1;if(i&&!this.options.wrap)return t;var r="prev"==e?-1:1,o=(n+r)%this.$items.length;return this.$items.eq(o)},n.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){t.to(e)}):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",this.$items.eq(e))},n.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(t,i){var r=this.$element.find(".item.active"),o=i||this.getItemForDirection(t,r),s=this.interval,a="next"==t?"left":"right",l=this;if(o.hasClass("active"))return this.sliding=!1;var u=o[0],c=e.Event("slide.bs.carousel",{relatedTarget:u,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=e(this.$indicators.children()[this.getItemIndex(o)]);h&&h.addClass("active")}var f=e.Event("slid.bs.carousel",{relatedTarget:u,direction:a});return e.support.transition&&this.$element.hasClass("slide")?(o.addClass(t),o[0].offsetWidth,r.addClass(a),o.addClass(a),r.one("bsTransitionEnd",function(){o.removeClass([t,a].join(" ")).addClass("active"),r.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(f)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(r.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(f)),s&&this.cycle(),this}};var i=e.fn.carousel;e.fn.carousel=t,e.fn.carousel.Constructor=n,e.fn.carousel.noConflict=function(){return e.fn.carousel=i,this};var r=function(n){var i,r=e(this),o=e(r.attr("data-target")||(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var s=e.extend({},o.data(),r.data()),a=r.attr("data-slide-to");a&&(s.interval=!1),t.call(o,s),a&&o.data("bs.carousel").to(a),n.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r),e(window).on("load",function(){e('[data-ride="carousel"]').each(function(){var n=e(this);t.call(n,n.data())})})}(jQuery),+function(e){"use strict";function t(t){var n,i=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(i)}function n(t){return this.each(function(){var n=e(this),r=n.data("bs.collapse"),o=e.extend({},i.DEFAULTS,n.data(),"object"==typeof t&&t);!r&&o.toggle&&/show|hide/.test(t)&&(o.toggle=!1),r||n.data("bs.collapse",r=new i(this,o)),"string"==typeof t&&r[t]()})}var i=function(t,n){this.$element=e(t),this.options=e.extend({},i.DEFAULTS,n),this.$trigger=e('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.3.7",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var e=this.$element.hasClass("width");return e?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(r&&r.length&&(t=r.data("bs.collapse"),t&&t.transitioning))){var o=e.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){r&&r.length&&(n.call(r,"hide"),t||r.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return a.call(this);var l=e.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",e.proxy(a,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[s](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=e.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return e.support.transition?void this.$element[n](0).one("bsTransitionEnd",e.proxy(r,this)).emulateTransitionEnd(i.TRANSITION_DURATION):r.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return e(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy(function(n,i){var r=e(i);this.addAriaAndCollapsedClass(t(r),r)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var r=e.fn.collapse;e.fn.collapse=n,e.fn.collapse.Constructor=i,e.fn.collapse.noConflict=function(){return e.fn.collapse=r,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var r=e(this);r.attr("data-target")||i.preventDefault();var o=t(r),s=o.data("bs.collapse"),a=s?"toggle":r.data();n.call(o,a)})}(jQuery),+function(e){"use strict";function t(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&e(n);return i&&i.length?i:t.parent()}function n(n){n&&3===n.which||(e(r).remove(),e(o).each(function(){var i=e(this),r=t(i),o={relatedTarget:this};r.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&e.contains(r[0],n.target)||(r.trigger(n=e.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(i.attr("aria-expanded","false"),r.removeClass("open").trigger(e.Event("hidden.bs.dropdown",o)))))}))}function i(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new s(this)),"string"==typeof t&&i[t].call(n)})}var r=".dropdown-backdrop",o='[data-toggle="dropdown"]',s=function(t){e(t).on("click.bs.dropdown",this.toggle)};s.VERSION="3.3.7",s.prototype.toggle=function(i){var r=e(this);if(!r.is(".disabled, :disabled")){var o=t(r),s=o.hasClass("open");if(n(),!s){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",n);var a={relatedTarget:this};if(o.trigger(i=e.Event("show.bs.dropdown",a)),i.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger(e.Event("shown.bs.dropdown",a))}return!1}},s.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=e(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var r=t(i),s=r.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&r.find(o).trigger("focus"),i.trigger("click");var a=" li:not(.disabled):visible a",l=r.find(".dropdown-menu"+a);if(l.length){var u=l.index(n.target);38==n.which&&u>0&&u--,40==n.which&&u<l.length-1&&u++,~u||(u=0),l.eq(u).trigger("focus")}}}};var a=e.fn.dropdown;e.fn.dropdown=i,e.fn.dropdown.Constructor=s,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=a,this},e(document).on("click.bs.dropdown.data-api",n).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",o,s.prototype.toggle).on("keydown.bs.dropdown.data-api",o,s.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",s.prototype.keydown)}(jQuery),+function(e){"use strict";function t(t,i){return this.each(function(){var r=e(this),o=r.data("bs.modal"),s=e.extend({},n.DEFAULTS,r.data(),"object"==typeof t&&t);o||r.data("bs.modal",o=new n(this,s)),"string"==typeof t?o[t](i):s.show&&o.show(i)})}var n=function(t,n){this.options=n,this.$body=e(document.body),this.$element=e(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,e.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(e){return this.isShown?this.hide():this.show(e)},n.prototype.show=function(t){var i=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){i.$element.one("mouseup.dismiss.bs.modal",function(t){e(t.target).is(i.$element)&&(i.ignoreBackdropClick=!0)})}),this.backdrop(function(){var r=e.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),r&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus();var o=e.Event("shown.bs.modal",{relatedTarget:t});r?i.$dialog.one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(o)}).emulateTransitionEnd(n.TRANSITION_DURATION):i.$element.trigger("focus").trigger(o)}))},n.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",e.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){document===e.target||this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",e.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?e(window).on("resize.bs.modal",e.proxy(this.handleUpdate,this)):e(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.$body.removeClass("modal-open"),e.resetAdjustments(),e.resetScrollbar(),e.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(t){var i=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=e.support.transition&&r;if(this.$backdrop=e(document.createElement("div")).addClass("modal-backdrop "+r).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",e.proxy(function(e){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;o?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){i.removeBackdrop(),t&&t()};e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):s()}else t&&t()},n.prototype.handleUpdate=function(){this.adjustDialog()},n.prototype.adjustDialog=function(){var e=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth<e,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",e+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},n.prototype.measureScrollbar=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",this.$body.append(e);var t=e.offsetWidth-e.clientWidth;return this.$body[0].removeChild(e),t};var i=e.fn.modal;e.fn.modal=t,e.fn.modal.Constructor=n,e.fn.modal.noConflict=function(){return e.fn.modal=i,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var i=e(this),r=i.attr("href"),o=e(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=o.data("bs.modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},o.data(),i.data());i.is("a")&&n.preventDefault(),o.one("show.bs.modal",function(e){e.isDefaultPrevented()||o.one("hidden.bs.modal",function(){i.is(":visible")&&i.trigger("focus")})}),t.call(o,s,this)})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.tooltip"),o="object"==typeof t&&t;!r&&/destroy|hide/.test(t)||(r||i.data("bs.tooltip",r=new n(this,o)),"string"==typeof t&&r[t]())})}var n=function(e,t){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",e,t)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(t,n,i){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&e(e.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),o=r.length;o--;){var s=r[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",l="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},n.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,i){n[e]!=i&&(t[e]=i)}),t},n.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusin"==t.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},n.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusout"==t.type?"focus":"hover"]=!1),!n.isInStateTrue())return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},n.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var i=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!i)return;var r=this,o=this.tip(),s=this.getUID(this.type);this.setContent(),o.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&o.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,u=l.test(a);u&&(a=a.replace(l,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),h=o[0].offsetWidth,f=o[0].offsetHeight;if(u){var p=a,d=this.getPosition(this.$viewport);a="bottom"==a&&c.bottom+f>d.bottom?"top":"top"==a&&c.top-f<d.top?"bottom":"right"==a&&c.right+h>d.width?"left":"left"==a&&c.left-h<d.left?"right":a,o.removeClass(p).addClass(a)}var m=this.getCalculatedOffset(a,c,h,f);this.applyPlacement(m,a);var g=function(){var e=r.hoverState;r.$element.trigger("shown.bs."+r.type),r.hoverState=null,"out"==e&&r.leave(r)};e.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",g).emulateTransitionEnd(n.TRANSITION_DURATION):g()}},n.prototype.applyPlacement=function(t,n){var i=this.tip(),r=i[0].offsetWidth,o=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),t.top+=s,t.left+=a,e.offset.setOffset(i[0],e.extend({using:function(e){i.css({top:Math.round(e.top),left:Math.round(e.left)})}},t),0),i.addClass("in");var l=i[0].offsetWidth,u=i[0].offsetHeight;"top"==n&&u!=o&&(t.top=t.top+o-u);var c=this.getViewportAdjustedDelta(n,t,l,u);c.left?t.left+=c.left:t.top+=c.top;var h=/top|bottom/.test(n),f=h?2*c.left-r+l:2*c.top-o+u,p=h?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(f,i[0][p],h)},n.prototype.replaceArrow=function(e,t,n){this.arrow().css(n?"left":"top",50*(1-e/t)+"%").css(n?"top":"left","")},n.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},n.prototype.hide=function(t){function i(){"in"!=r.hoverState&&o.detach(),r.$element&&r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type),t&&t()}var r=this,o=e(this.$tip),s=e.Event("hide.bs."+this.type);if(this.$element.trigger(s),!s.isDefaultPrevented())return o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i(),this.hoverState=null,this},n.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},n.prototype.hasContent=function(){return this.getTitle()},n.prototype.getPosition=function(t){t=t||this.$element;var n=t[0],i="BODY"==n.tagName,r=n.getBoundingClientRect();null==r.width&&(r=e.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var o=window.SVGElement&&n instanceof window.SVGElement,s=i?{top:0,left:0}:o?null:t.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},l=i?{width:e(window).width(),height:e(window).height()}:null;return e.extend({},r,a,l,s)},n.prototype.getCalculatedOffset=function(e,t,n,i){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-i,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-i/2,left:t.left-n}:{top:t.top+t.height/2-i/2,left:t.left+t.width}},n.prototype.getViewportAdjustedDelta=function(e,t,n,i){var r={top:0,left:0};if(!this.$viewport)return r;var o=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(e)){var a=t.top-o-s.scroll,l=t.top+o-s.scroll+i;a<s.top?r.top=s.top-a:l>s.top+s.height&&(r.top=s.top+s.height-l)}else{var u=t.left-o,c=t.left+o+n;u<s.left?r.left=s.left-u:c>s.right&&(r.left=s.left+s.width-c)}return r},n.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},n.prototype.getUID=function(e){do e+=~~(1e6*Math.random());while(document.getElementById(e));return e},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(t){var n=this;t&&(n=e(t.currentTarget).data("bs."+this.type),n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),t?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide(function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null})};var i=e.fn.tooltip;e.fn.tooltip=t,e.fn.tooltip.Constructor=n,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=i,this}}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.popover"),o="object"==typeof t&&t;!r&&/destroy|hide/.test(t)||(r||i.data("bs.popover",r=new n(this,o)),"string"==typeof t&&r[t]())})}var n=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.7",n.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=e.fn.popover;e.fn.popover=t,e.fn.popover.Constructor=n,e.fn.popover.noConflict=function(){return e.fn.popover=i,this}}(jQuery),+function(e){"use strict";function t(n,i){this.$body=e(document.body),this.$scrollElement=e(e(n).is(document.body)?window:n),this.options=e.extend({},t.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var i=e(this),r=i.data("bs.scrollspy"),o="object"==typeof n&&n;r||i.data("bs.scrollspy",r=new t(this,o)),"string"==typeof n&&r[n]()})}t.VERSION="3.3.7",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=e(this),r=t.data("target")||t.attr("href"),o=/^#./.test(r)&&e(r);return o&&o.length&&o.is(":visible")&&[[o[n]().top+i,r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},t.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),r=this.offsets,o=this.targets,s=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),t>=i)return s!=(e=o[o.length-1])&&this.activate(e);if(s&&t<r[0])return this.activeTarget=null,this.clear();for(e=r.length;e--;)s!=o[e]&&t>=r[e]&&(void 0===r[e+1]||t<r[e+1])&&this.activate(o[e])},t.prototype.activate=function(t){this.activeTarget=t,this.clear();var n=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=e(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},t.prototype.clear=function(){e(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var i=e.fn.scrollspy;e.fn.scrollspy=n,e.fn.scrollspy.Constructor=t,e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=i,this},e(window).on("load.bs.scrollspy.data-api",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);n.call(t,t.data())})})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.tab");r||i.data("bs.tab",r=new n(this)),"string"==typeof t&&r[t]()})}var n=function(t){this.element=e(t)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=n.find(".active:last a"),o=e.Event("hide.bs.tab",{relatedTarget:t[0]}),s=e.Event("show.bs.tab",{relatedTarget:r[0]});if(r.trigger(o),t.trigger(s),!s.isDefaultPrevented()&&!o.isDefaultPrevented()){var a=e(i);this.activate(t.closest("li"),n),this.activate(a,a.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:r[0]})})}}},n.prototype.activate=function(t,i,r){function o(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),r&&r()}var s=i.find("> .active"),a=r&&e.support.transition&&(s.length&&s.hasClass("fade")||!!i.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",o).emulateTransitionEnd(n.TRANSITION_DURATION):o(),s.removeClass("in")};var i=e.fn.tab;e.fn.tab=t,e.fn.tab.Constructor=n,e.fn.tab.noConflict=function(){return e.fn.tab=i,this};var r=function(n){n.preventDefault(),t.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.affix"),o="object"==typeof t&&t;r||i.data("bs.affix",r=new n(this,o)),"string"==typeof t&&r[t]()})}var n=function(t,i){this.options=e.extend({},n.DEFAULTS,i),this.$target=e(this.options.target).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.7",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(e,t,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return r<n&&"top";if("bottom"==this.affixed)return null!=n?!(r+this.unpin<=o.top)&&"bottom":!(r+s<=e-i)&&"bottom";var a=null==this.affixed,l=a?r:o.top,u=a?s:t;return null!=n&&r<=n?"top":null!=i&&l+u>=e-i&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var e=this.$target.scrollTop(),t=this.$element.offset();return this.pinnedOffset=t.top-e},n.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),i=this.options.offset,r=i.top,o=i.bottom,s=Math.max(e(document).height(),e(document.body).height());"object"!=typeof i&&(o=r=i),"function"==typeof r&&(r=i.top(this.$element)),"function"==typeof o&&(o=i.bottom(this.$element));var a=this.getState(s,t,r,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),u=e.Event(l+".bs.affix");if(this.$element.trigger(u),u.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-t-o})}};var i=e.fn.affix;e.fn.affix=t,e.fn.affix.Constructor=n,e.fn.affix.noConflict=function(){return e.fn.affix=i,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var n=e(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),t.call(n,i)})})}(jQuery)}()}),require.register("buffer/index.js",function(e,i,r){i=n(i,{},"buffer");var o=i("buffer");o&&o.Buffer;!function(){"use strict";function n(){try{var e=new Uint8Array(1);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function r(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e){return this instanceof o?(o.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?s(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):l(this,e)):arguments.length>1?new o(e,arguments[1]):new o(e)}function s(e,t){if(e=m(e,t<0?0:0|g(t)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;n++)e[n]=0;return e}function a(e,t,n){"string"==typeof n&&""!==n||(n="utf8");var i=0|v(t,n);return e=m(e,i),e.write(t,n),e}function l(e,t){if(o.isBuffer(t))return u(e,t);if(X(t))return c(e,t);if(null==t)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(t.buffer instanceof ArrayBuffer)return h(e,t);if(t instanceof ArrayBuffer)return f(e,t)}return t.length?p(e,t):d(e,t)}function u(e,t){var n=0|g(t.length);return e=m(e,n),t.copy(e,0,0,n),e}function c(e,t){var n=0|g(t.length);e=m(e,n);for(var i=0;i<n;i+=1)e[i]=255&t[i];return e}function h(e,t){var n=0|g(t.length);e=m(e,n);for(var i=0;i<n;i+=1)e[i]=255&t[i];return e}function f(e,t){return t.byteLength,o.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=o.prototype):e=h(e,new Uint8Array(t)),e}function p(e,t){var n=0|g(t.length);e=m(e,n);for(var i=0;i<n;i+=1)e[i]=255&t[i];return e}function d(e,t){var n,i=0;"Buffer"===t.type&&X(t.data)&&(n=t.data,i=0|g(n.length)),e=m(e,i);for(var r=0;r<i;r+=1)e[r]=255&n[r];return e}function m(e,t){o.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=o.prototype):e.length=t;var n=0!==t&&t<=o.poolSize>>>1;return n&&(e.parent=Q),e}function g(e){if(e>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function y(e,t){if(!(this instanceof y))return new y(e,t);var n=new o(e,t);return delete n.parent,n}function v(e,t){"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(i)return F(e).length;t=(""+t).toLowerCase(),i=!0}}function b(e,t,n){var i=!1;if(t=0|t,n=void 0===n||n===1/0?this.length:0|n,e||(e="utf8"),t<0&&(t=0),n>this.length&&(n=this.length),n<=t)return"";for(;;)switch(e){case"hex":return N(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return R(this,t,n);case"binary":return L(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function _(e,t,n,i){n=Number(n)||0;var r=e.length-n;i?(i=Number(i),i>r&&(i=r)):i=r;var o=t.length;if(o%2!==0)throw new Error("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s<i;s++){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");e[n+s]=a}return s}function w(e,t,n,i){return z(F(t,e.length-n),e,n,i)}function C(e,t,n,i){return z(W(t),e,n,i)}function E(e,t,n,i){return C(e,t,n,i)}function x(e,t,n,i){return z(V(t),e,n,i)}function S(e,t,n,i){return z(Y(t,e.length-n),e,n,i)}function T(e,t,n){return 0===t&&n===e.length?K.fromByteArray(e):K.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;r<n;){var o=e[r],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r+a<=n){var l,u,c,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[r+1],128===(192&l)&&(h=(31&o)<<6|63&l,h>127&&(s=h));break;case 3:l=e[r+1],u=e[r+2],128===(192&l)&&128===(192&u)&&(h=(15&o)<<12|(63&l)<<6|63&u,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[r+1],u=e[r+2],c=e[r+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(h=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c,h>65535&&h<1114112&&(s=h))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|1023&s),i.push(s),r+=a}return A(i)}function A(e){var t=e.length;if(t<=J)return String.fromCharCode.apply(String,e);for(var n="",i=0;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=J));return n}function R(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;r++)i+=String.fromCharCode(127&e[r]);return i}function L(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;r++)i+=String.fromCharCode(e[r]);return i}function N(e,t,n){var i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var r="",o=t;o<n;o++)r+=U(e[o]);return r}function O(e,t,n){for(var i=e.slice(t,n),r="",o=0;o<i.length;o+=2)r+=String.fromCharCode(i[o]+256*i[o+1]);return r}function I(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,i,r,s){if(!o.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>r||t<s)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range")}function P(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r<o;r++)e[n+r]=(t&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function D(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r<o;r++)e[n+r]=t>>>8*(i?r:3-r)&255}function j(e,t,n,i,r,o){if(t>r||t<o)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range");if(n<0)throw new RangeError("index out of range")}function B(e,t,n,i,r){return r||j(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),G.write(e,t,n,i,23,4),n+4}function H(e,t,n,i,r){return r||j(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),G.write(e,t,n,i,52,8),n+8}function $(e){if(e=q(e).replace(Z,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function q(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){t=t||1/0;for(var n,i=e.length,r=null,o=[],s=0;s<i;s++){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),r=n;continue}n=(r-55296<<10|n-56320)+65536}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function W(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}function Y(e,t){for(var n,i,r,o=[],s=0;s<e.length&&!((t-=2)<0);s++)n=e.charCodeAt(s),i=n>>8,r=n%256,o.push(r),o.push(i);return o}function V(e){return K.toByteArray($(e))}function z(e,t,n,i){for(var r=0;r<i&&!(r+n>=t.length||r>=e.length);r++)t[r+n]=e[r];return r}var K=i("base64-js"),G=i("ieee754"),X=i("isarray");e.Buffer=o,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50,o.poolSize=8192;var Q={};o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:n(),o._augment=function(e){return e.__proto__=o.prototype,e},o.TYPED_ARRAY_SUPPORT?(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array):(o.prototype.length=void 0,o.prototype.parent=void 0),o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,r=0,s=Math.min(n,i);r<s&&e[r]===t[r];)++r;return r!==s&&(n=e[r],i=t[r]),n<i?-1:i<n?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!X(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new o(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;n++)t+=e[n].length;var i=new o(t),r=0;for(n=0;n<e.length;n++){var s=e[n];s.copy(i,r),r+=s.length}return i},o.byteLength=v,o.prototype._isBuffer=!0,o.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?k(this,0,e):b.apply(this,arguments)},o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},o.prototype.compare=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:o.compare(this,e)},o.prototype.indexOf=function(e,t){function n(e,t,n){for(var i=-1,r=0;n+r<e.length;r++)if(e[n+r]===t[i===-1?0:r-i]){if(i===-1&&(i=r),r-i+1===t.length)return n+i}else i=-1;return-1}if(t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t>>=0,0===this.length)return-1;if(t>=this.length)return-1;if(t<0&&(t=Math.max(this.length+t,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,t);if(o.isBuffer(e))return n(this,e,t);if("number"==typeof e)return o.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):n(this,[e],t);throw new TypeError("val must be string, number or Buffer")},o.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else if(isFinite(t))t=0|t,isFinite(n)?(n=0|n,void 0===i&&(i="utf8")):(i=n,n=void 0);else{var r=i;i=t,t=0|n,n=r}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return C(this,e,t,n);case"binary":return E(this,e,t,n);case"base64":return x(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;o.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var i;if(o.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=o.prototype;else{var r=t-e;i=new o(r,(void 0));for(var s=0;s<r;s++)i[s]=this[s+e]}return i.length&&(i.parent=this.parent||this),i},o.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||I(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;return i},o.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||I(e,t,this.length);for(var i=this[e+--t],r=1;t>0&&(r*=256);)i+=this[e+--t]*r;return i},o.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||I(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;return r*=128,i>=r&&(i-=Math.pow(2,8*t)),i},o.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||I(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;return r*=128,o>=r&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},o.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),G.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),G.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),G.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),G.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,i){e=+e,t=0|t,n=0|n,i||M(this,e,t,n,Math.pow(2,8*n),0);var r=1,o=0;for(this[t]=255&e;++o<n&&(r*=256);)this[t+o]=e/r&255;return t+n},o.prototype.writeUIntBE=function(e,t,n,i){e=+e,t=0|t,n=0|n,i||M(this,e,t,n,Math.pow(2,8*n),0);var r=n-1,o=1;for(this[t+r]=255&e;--r>=0&&(o*=256);)this[t+r]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=0|t,!i){var r=Math.pow(2,8*n-1);M(this,e,t,n,r-1,-r)}var o=0,s=1,a=e<0?1:0;for(this[t]=255&e;++o<n&&(s*=256);)this[t+o]=(e/s>>0)-a&255;return t+n},o.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=0|t,!i){var r=Math.pow(2,8*n-1);M(this,e,t,n,r-1,-r)}var o=n-1,s=1,a=e<0?1:0;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=(e/s>>0)-a&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return H(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return H(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var r,s=i-n;if(this===e&&n<t&&t<i)for(r=s-1;r>=0;r--)e[r+t]=this[r+n];else if(s<1e3||!o.TYPED_ARRAY_SUPPORT)for(r=0;r<s;r++)e[r+t]=this[r+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),t);return s},o.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),n<t)throw new RangeError("end < start");if(n!==t&&0!==this.length){if(t<0||t>=this.length)throw new RangeError("start out of bounds");if(n<0||n>this.length)throw new RangeError("end out of bounds");var i;if("number"==typeof e)for(i=t;i<n;i++)this[i]=e;else{var r=F(e.toString()),o=r.length;for(i=t;i<n;i++)this[i]=r[i%o]}return this}};var Z=/[^+\/0-9A-Za-z-_]/g}()}),require.register("ieee754/index.js",function(e,t,i){t=n(t,{},"ieee754"),function(){e.read=function(e,t,n,i,r){var o,s,a=8*r-i-1,l=(1<<a)-1,u=l>>1,c=-7,h=n?r-1:0,f=n?-1:1,p=e[t+h];for(h+=f,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+e[t+h],h+=f,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=i;c>0;s=256*s+e[t+h],h+=f,c-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,i),o-=u}return(p?-1:1)*s*Math.pow(2,o-i)},e.write=function(e,t,n,i,r,o){var s,a,l,u=8*o-r-1,c=(1<<u)-1,h=c>>1,f=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:o-1,d=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),t+=s+h>=1?f/l:f*Math.pow(2,1-h),t*l>=2&&(s++,l/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(t*l-1)*Math.pow(2,r),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,r),s=0));r>=8;e[n+p]=255&a,p+=d,a/=256,r-=8);for(s=s<<r|a,u+=r;u>0;e[n+p]=255&s,p+=d,s/=256,u-=8);e[n+p-d]|=128*m}}()}),require.register("isarray/index.js",function(e,t,i){t=n(t,{},"isarray"),function(){var e={}.toString;i.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}}()}),require.register("jquery/dist/jquery.js",function(e,t,i){t=n(t,{},"jquery"),function(){!function(e,t){"use strict";"object"==typeof i&&"object"==typeof i.exports?i.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t){t=t||ne;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function i(e){var t=!!e&&"length"in e&&e.length,n=me.type(e);return"function"!==n&&!me.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function o(e,t,n){return me.isFunction(t)?me.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?me.grep(e,function(e){return e===t!==n}):"string"!=typeof t?me.grep(e,function(e){return ae.call(t,e)>-1!==n}):Se.test(t)?me.filter(t,e,n):(t=me.filter(t,e),me.grep(e,function(e){return ae.call(t,e)>-1!==n&&1===e.nodeType}))}function s(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function a(e){var t={};return me.each(e.match(Ne)||[],function(e,n){t[n]=!0}),t}function l(e){return e}function u(e){throw e}function c(e,t,n,i){var r;try{e&&me.isFunction(r=e.promise)?r.call(e).done(t).fail(n):e&&me.isFunction(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}function h(){ne.removeEventListener("DOMContentLoaded",h),e.removeEventListener("load",h),me.ready()}function f(){this.expando=me.expando+f.uid++}function p(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Be.test(e)?JSON.parse(e):e)}function d(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(He,"-$&").toLowerCase(),n=e.getAttribute(i),"string"==typeof n){try{n=p(n)}catch(r){}je.set(e,t,n)}else n=void 0;return n}function m(e,t,n,i){var r,o=1,s=20,a=i?function(){return i.cur()}:function(){return me.css(e,t,"")},l=a(),u=n&&n[3]||(me.cssNumber[t]?"":"px"),c=(me.cssNumber[t]||"px"!==u&&+l)&&qe.exec(me.css(e,t));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do o=o||".5",c/=o,me.style(e,t,c+u);while(o!==(o=a()/l)&&1!==o&&--s)}return n&&(c=+c||+l||0,r=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=c,i.end=r)),r}function g(e){var t,n=e.ownerDocument,i=e.nodeName,r=Ye[i];return r?r:(t=n.body.appendChild(n.createElement(i)),r=me.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),Ye[i]=r,r)}function y(e,t){for(var n,i,r=[],o=0,s=e.length;o<s;o++)i=e[o],i.style&&(n=i.style.display,t?("none"===n&&(r[o]=De.get(i,"display")||null,r[o]||(i.style.display="")),""===i.style.display&&Fe(i)&&(r[o]=g(i))):"none"!==n&&(r[o]="none",De.set(i,"display",n)));for(o=0;o<s;o++)null!=r[o]&&(e[o].style.display=r[o]);return e}function v(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&r(e,t)?me.merge([e],n):n}function b(e,t){for(var n=0,i=e.length;n<i;n++)De.set(e[n],"globalEval",!t||De.get(t[n],"globalEval"))}function _(e,t,n,i,r){for(var o,s,a,l,u,c,h=t.createDocumentFragment(),f=[],p=0,d=e.length;p<d;p++)if(o=e[p],o||0===o)if("object"===me.type(o))me.merge(f,o.nodeType?[o]:o);else if(Xe.test(o)){for(s=s||h.appendChild(t.createElement("div")),a=(ze.exec(o)||["",""])[1].toLowerCase(),l=Ge[a]||Ge._default,s.innerHTML=l[1]+me.htmlPrefilter(o)+l[2],c=l[0];c--;)s=s.lastChild;me.merge(f,s.childNodes),s=h.firstChild,s.textContent=""}else f.push(t.createTextNode(o));for(h.textContent="",p=0;o=f[p++];)if(i&&me.inArray(o,i)>-1)r&&r.push(o);else if(u=me.contains(o.ownerDocument,o),s=v(h.appendChild(o),"script"),u&&b(s),n)for(c=0;o=s[c++];)Ke.test(o.type||"")&&n.push(o);return h}function w(){return!0}function C(){return!1}function E(){try{return ne.activeElement}catch(e){}}function x(e,t,n,i,r,o){var s,a;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(a in t)x(e,a,n,i,t[a],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),r===!1)r=C;else if(!r)return e;return 1===o&&(s=r,r=function(e){return me().off(e),s.apply(this,arguments)},r.guid=s.guid||(s.guid=me.guid++)),e.each(function(){me.event.add(this,t,r,i,n)})}function S(e,t){return r(e,"table")&&r(11!==t.nodeType?t:t.firstChild,"tr")?me(">tbody",e)[0]||e:e}function T(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function k(e){var t=rt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function A(e,t){var n,i,r,o,s,a,l,u;if(1===t.nodeType){if(De.hasData(e)&&(o=De.access(e),s=De.set(t,o),u=o.events)){delete s.handle,s.events={};for(r in u)for(n=0,i=u[r].length;n<i;n++)me.event.add(t,r,u[r][n])}je.hasData(e)&&(a=je.access(e),l=me.extend({},a),je.set(t,l))}}function R(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ve.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function L(e,t,i,r){t=oe.apply([],t);var o,s,a,l,u,c,h=0,f=e.length,p=f-1,d=t[0],m=me.isFunction(d);if(m||f>1&&"string"==typeof d&&!pe.checkClone&&it.test(d))return e.each(function(n){var o=e.eq(n);m&&(t[0]=d.call(this,n,o.html())),L(o,t,i,r)});if(f&&(o=_(t,e[0].ownerDocument,!1,e,r),s=o.firstChild,1===o.childNodes.length&&(o=s),s||r)){for(a=me.map(v(o,"script"),T),l=a.length;h<f;h++)u=o,h!==p&&(u=me.clone(u,!0,!0),l&&me.merge(a,v(u,"script"))),i.call(e[h],u,h);if(l)for(c=a[a.length-1].ownerDocument,me.map(a,k),h=0;h<l;h++)u=a[h],Ke.test(u.type||"")&&!De.access(u,"globalEval")&&me.contains(c,u)&&(u.src?me._evalUrl&&me._evalUrl(u.src):n(u.textContent.replace(ot,""),c))}return e}function N(e,t,n){for(var i,r=t?me.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||me.cleanData(v(i)),i.parentNode&&(n&&me.contains(i.ownerDocument,i)&&b(v(i,"script")),i.parentNode.removeChild(i));return e}function O(e,t,n){var i,r,o,s,a=e.style;return n=n||lt(e),n&&(s=n.getPropertyValue(t)||n[t],""!==s||me.contains(e.ownerDocument,e)||(s=me.style(e,t)),!pe.pixelMarginRight()&&at.test(s)&&st.test(t)&&(i=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=r,a.maxWidth=o)),void 0!==s?s+"":s}function I(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function M(e){if(e in dt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=pt.length;n--;)if(e=pt[n]+t,e in dt)return e}function P(e){var t=me.cssProps[e];return t||(t=me.cssProps[e]=M(e)||e),t}function D(e,t,n){var i=qe.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function j(e,t,n,i,r){var o,s=0;for(o=n===(i?"border":"content")?4:"width"===t?1:0;o<4;o+=2)"margin"===n&&(s+=me.css(e,n+Ue[o],!0,r)),i?("content"===n&&(s-=me.css(e,"padding"+Ue[o],!0,r)),"margin"!==n&&(s-=me.css(e,"border"+Ue[o]+"Width",!0,r))):(s+=me.css(e,"padding"+Ue[o],!0,r),"padding"!==n&&(s+=me.css(e,"border"+Ue[o]+"Width",!0,r)));return s}function B(e,t,n){var i,r=lt(e),o=O(e,t,r),s="border-box"===me.css(e,"boxSizing",!1,r);return at.test(o)?o:(i=s&&(pe.boxSizingReliable()||o===e.style[t]),"auto"===o&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)]),o=parseFloat(o)||0,o+j(e,t,n||(s?"border":"content"),i,r)+"px")}function H(e,t,n,i,r){return new H.prototype.init(e,t,n,i,r)}function $(){gt&&(ne.hidden===!1&&e.requestAnimationFrame?e.requestAnimationFrame($):e.setTimeout($,me.fx.interval),me.fx.tick())}function q(){return e.setTimeout(function(){mt=void 0}),mt=me.now()}function U(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)n=Ue[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function F(e,t,n){for(var i,r=(V.tweeners[t]||[]).concat(V.tweeners["*"]),o=0,s=r.length;o<s;o++)if(i=r[o].call(n,t,e))return i}function W(e,t,n){var i,r,o,s,a,l,u,c,h="width"in t||"height"in t,f=this,p={},d=e.style,m=e.nodeType&&Fe(e),g=De.get(e,"fxshow");n.queue||(s=me._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,f.always(function(){f.always(function(){s.unqueued--,me.queue(e,"fx").length||s.empty.fire()})}));for(i in t)if(r=t[i],yt.test(r)){if(delete t[i],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;m=!0}p[i]=g&&g[i]||me.style(e,i)}if(l=!me.isEmptyObject(t),l||!me.isEmptyObject(p)){h&&1===e.nodeType&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],u=g&&g.display,null==u&&(u=De.get(e,"display")),c=me.css(e,"display"),"none"===c&&(u?c=u:(y([e],!0),u=e.style.display||u,c=me.css(e,"display"),y([e]))),("inline"===c||"inline-block"===c&&null!=u)&&"none"===me.css(e,"float")&&(l||(f.done(function(){d.display=u}),null==u&&(c=d.display,u="none"===c?"":c)),d.display="inline-block")),n.overflow&&(d.overflow="hidden",f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]})),l=!1;for(i in p)l||(g?"hidden"in g&&(m=g.hidden):g=De.access(e,"fxshow",{display:u}),o&&(g.hidden=!m),m&&y([e],!0),f.done(function(){m||y([e]),De.remove(e,"fxshow");for(i in p)me.style(e,i,p[i])})),l=F(m?g[i]:0,i,f),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}}function Y(e,t){var n,i,r,o,s;for(n in e)if(i=me.camelCase(n),r=t[i],o=e[n],Array.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),s=me.cssHooks[i],s&&"expand"in s){o=s.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=r)}else t[i]=r}function V(e,t,n){var i,r,o=0,s=V.prefilters.length,a=me.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=mt||q(),n=Math.max(0,u.startTime+u.duration-t),i=n/u.duration||0,o=1-i,s=0,l=u.tweens.length;s<l;s++)u.tweens[s].run(o);return a.notifyWith(e,[u,o,n]),o<1&&l?n:(l||a.notifyWith(e,[u,1,0]),a.resolveWith(e,[u]),!1)},u=a.promise({elem:e,props:me.extend({},t),opts:me.extend(!0,{specialEasing:{},easing:me.easing._default},n),originalProperties:t,originalOptions:n,startTime:mt||q(),duration:n.duration,tweens:[],createTween:function(t,n){var i=me.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(i),i},stop:function(t){var n=0,i=t?u.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)u.tweens[n].run(1);return t?(a.notifyWith(e,[u,1,0]),a.resolveWith(e,[u,t])):a.rejectWith(e,[u,t]),this}}),c=u.props;for(Y(c,u.opts.specialEasing);o<s;o++)if(i=V.prefilters[o].call(u,e,c,u.opts))return me.isFunction(i.stop)&&(me._queueHooks(u.elem,u.opts.queue).stop=me.proxy(i.stop,i)),i;return me.map(c,F,u),me.isFunction(u.opts.start)&&u.opts.start.call(e,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),me.fx.timer(me.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u}function z(e){var t=e.match(Ne)||[];return t.join(" ")}function K(e){return e.getAttribute&&e.getAttribute("class")||""}function G(e,t,n,i){var r;if(Array.isArray(t))me.each(t,function(t,r){n||At.test(e)?i(e,r):G(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)});else if(n||"object"!==me.type(t))i(e,t);else for(r in t)G(e+"["+r+"]",t[r],n,i)}function X(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(Ne)||[];if(me.isFunction(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Q(e,t,n,i){function r(a){var l;return o[a]=!0,me.each(e[a]||[],function(e,a){var u=a(t,n,i);return"string"!=typeof u||s||o[u]?s?!(l=u):void 0:(t.dataTypes.unshift(u),r(u),!1)}),l}var o={},s=e===$t;return r(t.dataTypes[0])||!o["*"]&&r("*")}function J(e,t){var n,i,r=me.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&me.extend(!0,e,i),e}function Z(e,t,n){for(var i,r,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),n[o]}function ee(e,t,n,i){var r,o,s,a,l,u={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)u[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(s=u[l+" "+o]||u["* "+o],!s)for(r in u)if(a=r.split(" "),a[1]===o&&(s=u[l+" "+a[0]]||u["* "+a[0]])){s===!0?s=u[r]:u[r]!==!0&&(o=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(h){return{state:"parsererror",error:s?h:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}var te=[],ne=e.document,ie=Object.getPrototypeOf,re=te.slice,oe=te.concat,se=te.push,ae=te.indexOf,le={},ue=le.toString,ce=le.hasOwnProperty,he=ce.toString,fe=he.call(Object),pe={},de="3.2.1",me=function(e,t){return new me.fn.init(e,t)},ge=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ye=/^-ms-/,ve=/-([a-z])/g,be=function(e,t){return t.toUpperCase()};me.fn=me.prototype={jquery:de,constructor:me,length:0,toArray:function(){return re.call(this)},get:function(e){return null==e?re.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=me.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return me.each(this,e)},map:function(e){return this.pushStack(me.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(re.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:se,sort:te.sort,splice:te.splice},me.extend=me.fn.extend=function(){var e,t,n,i,r,o,s=arguments[0]||{},a=1,l=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[a]||{},a++),"object"==typeof s||me.isFunction(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],i=e[t],s!==i&&(u&&i&&(me.isPlainObject(i)||(r=Array.isArray(i)))?(r?(r=!1,o=n&&Array.isArray(n)?n:[]):o=n&&me.isPlainObject(n)?n:{},s[t]=me.extend(u,o,i)):void 0!==i&&(s[t]=i));return s},me.extend({expando:"jQuery"+(de+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===me.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=me.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==ue.call(e))&&(!(t=ie(e))||(n=ce.call(t,"constructor")&&t.constructor,"function"==typeof n&&he.call(n)===fe))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?le[ue.call(e)]||"object":typeof e},globalEval:function(e){n(e)},camelCase:function(e){return e.replace(ye,"ms-").replace(ve,be)},each:function(e,t){var n,r=0;if(i(e))for(n=e.length;r<n&&t.call(e[r],r,e[r])!==!1;r++);else for(r in e)if(t.call(e[r],r,e[r])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ge,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(i(Object(e))?me.merge(n,"string"==typeof e?[e]:e):se.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:ae.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i,r=[],o=0,s=e.length,a=!n;o<s;o++)i=!t(e[o],o),i!==a&&r.push(e[o]);return r},map:function(e,t,n){var r,o,s=0,a=[];if(i(e))for(r=e.length;s<r;s++)o=t(e[s],s,n),null!=o&&a.push(o);else for(s in e)o=t(e[s],s,n),null!=o&&a.push(o);return oe.apply([],a)},guid:1,proxy:function(e,t){var n,i,r;if("string"==typeof t&&(n=e[t],t=e,e=n),me.isFunction(e))return i=re.call(arguments,2),r=function(){return e.apply(t||this,i.concat(re.call(arguments)))},r.guid=e.guid=e.guid||me.guid++,r},now:Date.now,support:pe}),"function"==typeof Symbol&&(me.fn[Symbol.iterator]=te[Symbol.iterator]),me.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){le["[object "+t+"]"]=t.toLowerCase()});var _e=function(e){function t(e,t,n,i){var r,o,s,a,l,u,c,f=t&&t.ownerDocument,d=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==d&&9!==d&&11!==d)return n;if(!i&&((t?t.ownerDocument||t:q)!==I&&O(t),t=t||I,P)){if(11!==d&&(l=ye.exec(e)))if(r=l[1]){if(9===d){if(!(s=t.getElementById(r)))return n;if(s.id===r)return n.push(s),n}else if(f&&(s=f.getElementById(r))&&H(t,s)&&s.id===r)return n.push(s),n}else{if(l[2])return J.apply(n,t.getElementsByTagName(e)),n;if((r=l[3])&&C.getElementsByClassName&&t.getElementsByClassName)return J.apply(n,t.getElementsByClassName(r)),n}if(C.qsa&&!V[e+" "]&&(!D||!D.test(e))){if(1!==d)f=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((a=t.getAttribute("id"))?a=a.replace(we,Ce):t.setAttribute("id",a=$),u=T(e),o=u.length;o--;)u[o]="#"+a+" "+p(u[o]);c=u.join(","),f=ve.test(e)&&h(t.parentNode)||t}if(c)try{return J.apply(n,f.querySelectorAll(c)),n}catch(m){}finally{a===$&&t.removeAttribute("id")}}}return A(e.replace(ae,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>E.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[$]=!0,e}function r(e){var t=I.createElement("fieldset");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=n.length;i--;)E.attrHandle[n[i]]=t}function s(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&xe(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function c(e){return i(function(t){return t=+t,i(function(n,i){for(var r,o=e([],n.length,t),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))})})}function h(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function p(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function d(e,t,n){var i=t.dir,r=t.next,o=r||i,s=n&&"parentNode"===o,a=F++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||s)return e(t,n,r);return!1}:function(t,n,l){var u,c,h,f=[U,a];if(l){for(;t=t[i];)if((1===t.nodeType||s)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||s)if(h=t[$]||(t[$]={}),c=h[t.uniqueID]||(h[t.uniqueID]={}),r&&r===t.nodeName.toLowerCase())t=t[i]||t;else{if((u=c[o])&&u[0]===U&&u[1]===a)return f[2]=u[2];if(c[o]=f,f[2]=e(t,n,l))return!0}return!1}}function m(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function g(e,n,i){for(var r=0,o=n.length;r<o;r++)t(e,n[r],i);return i}function y(e,t,n,i,r){for(var o,s=[],a=0,l=e.length,u=null!=t;a<l;a++)(o=e[a])&&(n&&!n(o,i,r)||(s.push(o),u&&t.push(a)));return s}function v(e,t,n,r,o,s){return r&&!r[$]&&(r=v(r)),o&&!o[$]&&(o=v(o,s)),i(function(i,s,a,l){var u,c,h,f=[],p=[],d=s.length,m=i||g(t||"*",a.nodeType?[a]:a,[]),v=!e||!i&&t?m:y(m,f,e,a,l),b=n?o||(i?e:d||r)?[]:s:v;if(n&&n(v,b,a,l),r)for(u=y(b,p),r(u,[],a,l),c=u.length;c--;)(h=u[c])&&(b[p[c]]=!(v[p[c]]=h));if(i){if(o||e){if(o){for(u=[],c=b.length;c--;)(h=b[c])&&u.push(v[c]=h);o(null,b=[],u,l)}for(c=b.length;c--;)(h=b[c])&&(u=o?ee(i,h):f[c])>-1&&(i[u]=!(s[u]=h))}}else b=y(b===s?b.splice(d,b.length):b),o?o(null,s,b,l):J.apply(s,b)})}function b(e){for(var t,n,i,r=e.length,o=E.relative[e[0].type],s=o||E.relative[" "],a=o?1:0,l=d(function(e){return e===t},s,!0),u=d(function(e){return ee(t,e)>-1},s,!0),c=[function(e,n,i){var r=!o&&(i||n!==R)||((t=n).nodeType?l(e,n,i):u(e,n,i));return t=null,r}];a<r;a++)if(n=E.relative[e[a].type])c=[d(m(c),n)];else{if(n=E.filter[e[a].type].apply(null,e[a].matches),n[$]){for(i=++a;i<r&&!E.relative[e[i].type];i++);return v(a>1&&m(c),a>1&&p(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ae,"$1"),n,a<i&&b(e.slice(a,i)),i<r&&b(e=e.slice(i)),i<r&&p(e))}c.push(n)}return m(c)}function _(e,n){var r=n.length>0,o=e.length>0,s=function(i,s,a,l,u){var c,h,f,p=0,d="0",m=i&&[],g=[],v=R,b=i||o&&E.find.TAG("*",u),_=U+=null==v?1:Math.random()||.1,w=b.length;for(u&&(R=s===I||s||u);d!==w&&null!=(c=b[d]);d++){if(o&&c){for(h=0,s||c.ownerDocument===I||(O(c),a=!P);f=e[h++];)if(f(c,s||I,a)){l.push(c);break}u&&(U=_)}r&&((c=!f&&c)&&p--,i&&m.push(c))}if(p+=d,r&&d!==p){for(h=0;f=n[h++];)f(m,g,s,a);if(i){if(p>0)for(;d--;)m[d]||g[d]||(g[d]=X.call(l));g=y(g)}J.apply(l,g),u&&!i&&g.length>0&&p+n.length>1&&t.uniqueSort(l)}return u&&(U=_,R=v),m};return r?i(s):s}var w,C,E,x,S,T,k,A,R,L,N,O,I,M,P,D,j,B,H,$="sizzle"+1*new Date,q=e.document,U=0,F=0,W=n(),Y=n(),V=n(),z=function(e,t){return e===t&&(N=!0),0},K={}.hasOwnProperty,G=[],X=G.pop,Q=G.push,J=G.push,Z=G.slice,ee=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",re="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+ne+"*\\]",oe=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+re+")*)|.*)\\)|)",se=new RegExp(ne+"+","g"),ae=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ue=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),he=new RegExp(oe),fe=new RegExp("^"+ie+"$"),pe={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+re),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},de=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),_e=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Ce=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Ee=function(){O()},xe=d(function(e){return e.disabled===!0&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{J.apply(G=Z.call(q.childNodes),q.childNodes),G[q.childNodes.length].nodeType}catch(Se){J={apply:G.length?function(e,t){Q.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}C=t.support={},S=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},O=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:q;return i!==I&&9===i.nodeType&&i.documentElement?(I=i,M=I.documentElement,P=!S(I),q!==I&&(n=I.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ee,!1):n.attachEvent&&n.attachEvent("onunload",Ee)),C.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),C.getElementsByTagName=r(function(e){return e.appendChild(I.createComment("")),!e.getElementsByTagName("*").length}),C.getElementsByClassName=ge.test(I.getElementsByClassName),C.getById=r(function(e){return M.appendChild(e).id=$,!I.getElementsByName||!I.getElementsByName($).length}),C.getById?(E.filter.ID=function(e){var t=e.replace(be,_e);return function(e){return e.getAttribute("id")===t}},E.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&P){var n=t.getElementById(e);return n?[n]:[]}}):(E.filter.ID=function(e){var t=e.replace(be,_e);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},E.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&P){var n,i,r,o=t.getElementById(e);if(o){if(n=o.getAttributeNode("id"),n&&n.value===e)return[o];for(r=t.getElementsByName(e),i=0;o=r[i++];)if(n=o.getAttributeNode("id"),n&&n.value===e)return[o]}return[]}}),E.find.TAG=C.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):C.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},E.find.CLASS=C.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&P)return t.getElementsByClassName(e)},j=[],D=[],(C.qsa=ge.test(I.querySelectorAll))&&(r(function(e){M.appendChild(e).innerHTML="<a id='"+$+"'></a><select id='"+$+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&D.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||D.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+$+"-]").length||D.push("~="),e.querySelectorAll(":checked").length||D.push(":checked"),e.querySelectorAll("a#"+$+"+*").length||D.push(".#.+[+~]")}),r(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=I.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&D.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&D.push(":enabled",":disabled"),M.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&D.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),D.push(",.*:")})),(C.matchesSelector=ge.test(B=M.matches||M.webkitMatchesSelector||M.mozMatchesSelector||M.oMatchesSelector||M.msMatchesSelector))&&r(function(e){C.disconnectedMatch=B.call(e,"*"),B.call(e,"[s!='']:x"),j.push("!=",oe)}),D=D.length&&new RegExp(D.join("|")),j=j.length&&new RegExp(j.join("|")),t=ge.test(M.compareDocumentPosition),H=t||ge.test(M.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},z=t?function(e,t){if(e===t)return N=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!C.sortDetached&&t.compareDocumentPosition(e)===n?e===I||e.ownerDocument===q&&H(q,e)?-1:t===I||t.ownerDocument===q&&H(q,t)?1:L?ee(L,e)-ee(L,t):0:4&n?-1:1)}:function(e,t){if(e===t)return N=!0,0;var n,i=0,r=e.parentNode,o=t.parentNode,a=[e],l=[t];if(!r||!o)return e===I?-1:t===I?1:r?-1:o?1:L?ee(L,e)-ee(L,t):0;if(r===o)return s(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;a[i]===l[i];)i++;return i?s(a[i],l[i]):a[i]===q?-1:l[i]===q?1:0},I):I},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==I&&O(e),n=n.replace(ce,"='$1']"),C.matchesSelector&&P&&!V[n+" "]&&(!j||!j.test(n))&&(!D||!D.test(n)))try{var i=B.call(e,n);if(i||C.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(r){}return t(n,I,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==I&&O(e),H(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==I&&O(e);var n=E.attrHandle[t.toLowerCase()],i=n&&K.call(E.attrHandle,t.toLowerCase())?n(e,t,!P):void 0;return void 0!==i?i:C.attributes||!P?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.escape=function(e){return(e+"").replace(we,Ce)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(N=!C.detectDuplicates,L=!C.sortStable&&e.slice(0),e.sort(z),N){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return L=null,e},x=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=x(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=x(t);return n},E=t.selectors={cacheLength:50,createPseudo:i,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,_e),e[3]=(e[3]||e[4]||e[5]||"").replace(be,_e),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&he.test(n)&&(t=T(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,_e).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var o=t.attr(r,e);return null==o?"!="===n:!n||(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(se," ")+" ").indexOf(i)>-1:"|="===n&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var u,c,h,f,p,d,m=o!==s?"nextSibling":"previousSibling",g=t.parentNode,y=a&&t.nodeName.toLowerCase(),v=!l&&!a,b=!1;if(g){if(o){for(;m;){for(f=t;f=f[m];)if(a?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;d=m="only"===e&&!d&&"nextSibling"}return!0}if(d=[s?g.firstChild:g.lastChild],s&&v){for(f=g,h=f[$]||(f[$]={}),c=h[f.uniqueID]||(h[f.uniqueID]={}),u=c[e]||[],p=u[0]===U&&u[1],b=p&&u[2],f=p&&g.childNodes[p];f=++p&&f&&f[m]||(b=p=0)||d.pop();)if(1===f.nodeType&&++b&&f===t){c[e]=[U,p,b];break}}else if(v&&(f=t,h=f[$]||(f[$]={}),c=h[f.uniqueID]||(h[f.uniqueID]={}),u=c[e]||[],p=u[0]===U&&u[1],b=p),b===!1)for(;(f=++p&&f&&f[m]||(b=p=0)||d.pop())&&((a?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++b||(v&&(h=f[$]||(f[$]={}),c=h[f.uniqueID]||(h[f.uniqueID]={}),c[e]=[U,b]),f!==t)););return b-=r,b===i||b%i===0&&b/i>=0}}},PSEUDO:function(e,n){var r,o=E.pseudos[e]||E.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[$]?o(n):o.length>1?(r=[e,e,"",n],E.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),s=r.length;s--;)i=ee(e,r[s]),e[i]=!(t[i]=r[s])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=k(e.replace(ae,"$1"));return r[$]?i(function(e,t,n,i){for(var o,s=r(e,null,i,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(be,_e),function(t){return(t.textContent||t.innerText||x(t)).indexOf(e)>-1}}),lang:i(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,_e).toLowerCase(),function(t){var n;do if(n=P?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===M},focus:function(e){return e===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:u(!1),disabled:u(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!E.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return de.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[n<0?n+t:n]}),even:c(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var i=n<0?n+t:n;--i>=0;)e.push(i);return e}),gt:c(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}},E.pseudos.nth=E.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})E.pseudos[w]=a(w);for(w in{submit:!0,reset:!0})E.pseudos[w]=l(w);return f.prototype=E.filters=E.pseudos,E.setFilters=new f,T=t.tokenize=function(e,n){var i,r,o,s,a,l,u,c=Y[e+" "];if(c)return n?0:c.slice(0);for(a=e,l=[],u=E.preFilter;a;){i&&!(r=le.exec(a))||(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),i=!1,(r=ue.exec(a))&&(i=r.shift(),o.push({value:i,type:r[0].replace(ae," ")}),a=a.slice(i.length));for(s in E.filter)!(r=pe[s].exec(a))||u[s]&&!(r=u[s](r))||(i=r.shift(),o.push({value:i,type:s,matches:r}),a=a.slice(i.length));if(!i)break}return n?a.length:a?t.error(e):Y(e,l).slice(0)},k=t.compile=function(e,t){var n,i=[],r=[],o=V[e+" "];if(!o){for(t||(t=T(e)),n=t.length;n--;)o=b(t[n]),o[$]?i.push(o):r.push(o);o=V(e,_(r,i)),o.selector=e}return o},A=t.select=function(e,t,n,i){var r,o,s,a,l,u="function"==typeof e&&e,c=!i&&T(e=u.selector||e);if(n=n||[],1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&9===t.nodeType&&P&&E.relative[o[1].type]){if(t=(E.find.ID(s.matches[0].replace(be,_e),t)||[])[0],!t)return n;u&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=pe.needsContext.test(e)?0:o.length;r--&&(s=o[r],!E.relative[a=s.type]);)if((l=E.find[a])&&(i=l(s.matches[0].replace(be,_e),ve.test(o[0].type)&&h(t.parentNode)||t))){if(o.splice(r,1),e=i.length&&p(o),!e)return J.apply(n,i),n;break}}return(u||k(e,c))(i,t,!P,n,!t||ve.test(e)&&h(t.parentNode)||t),n},C.sortStable=$.split("").sort(z).join("")===$,C.detectDuplicates=!!N,O(),C.sortDetached=r(function(e){return 1&e.compareDocumentPosition(I.createElement("fieldset"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),C.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var i;if(!n)return e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);me.find=_e,me.expr=_e.selectors,me.expr[":"]=me.expr.pseudos,me.uniqueSort=me.unique=_e.uniqueSort,me.text=_e.getText,me.isXMLDoc=_e.isXML,me.contains=_e.contains,me.escapeSelector=_e.escape;var we=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&me(e).is(n))break;i.push(e)}return i},Ce=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Ee=me.expr.match.needsContext,xe=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Se=/^.[^:#\[\.,]*$/;me.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?me.find.matchesSelector(i,e)?[i]:[]:me.find.matches(e,me.grep(t,function(e){return 1===e.nodeType}))},me.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(me(e).filter(function(){for(t=0;t<i;t++)if(me.contains(r[t],this))return!0}));for(n=this.pushStack([]),t=0;t<i;t++)me.find(e,r[t],n);return i>1?me.uniqueSort(n):n},filter:function(e){return this.pushStack(o(this,e||[],!1))},not:function(e){return this.pushStack(o(this,e||[],!0))},is:function(e){return!!o(this,"string"==typeof e&&Ee.test(e)?me(e):e||[],!1).length}});var Te,ke=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Ae=me.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||Te,"string"==typeof e){if(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ke.exec(e),!i||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof me?t[0]:t,me.merge(this,me.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:ne,!0)),xe.test(i[1])&&me.isPlainObject(t))for(i in t)me.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return r=ne.getElementById(i[2]),r&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):me.isFunction(e)?void 0!==n.ready?n.ready(e):e(me):me.makeArray(e,this)};Ae.prototype=me.fn,Te=me(ne);var Re=/^(?:parents|prev(?:Until|All))/,Le={children:!0,contents:!0,next:!0,prev:!0};me.fn.extend({has:function(e){var t=me(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(me.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,r=this.length,o=[],s="string"!=typeof e&&me(e);if(!Ee.test(e))for(;i<r;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&me.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?me.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?ae.call(me(e),this[0]):ae.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(me.uniqueSort(me.merge(this.get(),me(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),me.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return we(e,"parentNode")},parentsUntil:function(e,t,n){return we(e,"parentNode",n)},next:function(e){return s(e,"nextSibling")},prev:function(e){return s(e,"previousSibling")},nextAll:function(e){return we(e,"nextSibling")},prevAll:function(e){return we(e,"previousSibling")},nextUntil:function(e,t,n){return we(e,"nextSibling",n)},prevUntil:function(e,t,n){return we(e,"previousSibling",n)},siblings:function(e){return Ce((e.parentNode||{}).firstChild,e)},children:function(e){return Ce(e.firstChild)},contents:function(e){return r(e,"iframe")?e.contentDocument:(r(e,"template")&&(e=e.content||e),me.merge([],e.childNodes))}},function(e,t){me.fn[e]=function(n,i){var r=me.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=me.filter(i,r)),this.length>1&&(Le[e]||me.uniqueSort(r),Re.test(e)&&r.reverse()),this.pushStack(r)}});var Ne=/[^\x20\t\r\n\f]+/g;me.Callbacks=function(e){e="string"==typeof e?a(e):me.extend({},e);var t,n,i,r,o=[],s=[],l=-1,u=function(){for(r=r||e.once,i=t=!0;s.length;l=-1)for(n=s.shift();++l<o.length;)o[l].apply(n[0],n[1])===!1&&e.stopOnFalse&&(l=o.length,n=!1);e.memory||(n=!1),t=!1,r&&(o=n?[]:"")},c={add:function(){return o&&(n&&!t&&(l=o.length-1,s.push(n)),function i(t){me.each(t,function(t,n){me.isFunction(n)?e.unique&&c.has(n)||o.push(n):n&&n.length&&"string"!==me.type(n)&&i(n)})}(arguments),n&&!t&&u()),this},remove:function(){return me.each(arguments,function(e,t){for(var n;(n=me.inArray(t,o,n))>-1;)o.splice(n,1),n<=l&&l--}),this},has:function(e){return e?me.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=s=[],n||t||(o=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},me.extend({Deferred:function(t){var n=[["notify","progress",me.Callbacks("memory"),me.Callbacks("memory"),2],["resolve","done",me.Callbacks("once memory"),me.Callbacks("once memory"),0,"resolved"],["reject","fail",me.Callbacks("once memory"),me.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return r.then(null,e)},pipe:function(){var e=arguments;return me.Deferred(function(t){me.each(n,function(n,i){var r=me.isFunction(e[i[4]])&&e[i[4]];o[i[1]](function(){var e=r&&r.apply(this,arguments);e&&me.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(t,i,r){function o(t,n,i,r){return function(){var a=this,c=arguments,h=function(){var e,h;if(!(t<s)){if(e=i.apply(a,c),e===n.promise())throw new TypeError("Thenable self-resolution");h=e&&("object"==typeof e||"function"==typeof e)&&e.then,me.isFunction(h)?r?h.call(e,o(s,n,l,r),o(s,n,u,r)):(s++,h.call(e,o(s,n,l,r),o(s,n,u,r),o(s,n,l,n.notifyWith))):(i!==l&&(a=void 0,c=[e]),(r||n.resolveWith)(a,c))}},f=r?h:function(){try{h()}catch(e){me.Deferred.exceptionHook&&me.Deferred.exceptionHook(e,f.stackTrace),t+1>=s&&(i!==u&&(a=void 0,c=[e]),n.rejectWith(a,c))}};t?f():(me.Deferred.getStackHook&&(f.stackTrace=me.Deferred.getStackHook()),e.setTimeout(f))}}var s=0;return me.Deferred(function(e){n[0][3].add(o(0,e,me.isFunction(r)?r:l,e.notifyWith)),n[1][3].add(o(0,e,me.isFunction(t)?t:l)),n[2][3].add(o(0,e,me.isFunction(i)?i:u))}).promise()},promise:function(e){return null!=e?me.extend(e,r):r}},o={};return me.each(n,function(e,t){var s=t[2],a=t[5];r[t[1]]=s.add,a&&s.add(function(){i=a},n[3-e][2].disable,n[0][2].lock),s.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=s.fireWith}),r.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,i=Array(n),r=re.call(arguments),o=me.Deferred(),s=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?re.call(arguments):n,--t||o.resolveWith(i,r)}};if(t<=1&&(c(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||me.isFunction(r[n]&&r[n].then)))return o.then();for(;n--;)c(r[n],s(n),o.reject);return o.promise()}});var Oe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;me.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&Oe.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},me.readyException=function(t){e.setTimeout(function(){throw t})};var Ie=me.Deferred();me.fn.ready=function(e){return Ie.then(e)["catch"](function(e){me.readyException(e)}),this},me.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--me.readyWait:me.isReady)||(me.isReady=!0,e!==!0&&--me.readyWait>0||Ie.resolveWith(ne,[me]))}}),me.ready.then=Ie.then,"complete"===ne.readyState||"loading"!==ne.readyState&&!ne.documentElement.doScroll?e.setTimeout(me.ready):(ne.addEventListener("DOMContentLoaded",h),e.addEventListener("load",h));var Me=function(e,t,n,i,r,o,s){var a=0,l=e.length,u=null==n;if("object"===me.type(n)){r=!0;for(a in n)Me(e,t,a,n[a],!0,o,s)}else if(void 0!==i&&(r=!0,me.isFunction(i)||(s=!0),u&&(s?(t.call(e,i),t=null):(u=t,t=function(e,t,n){return u.call(me(e),n)})),t))for(;a<l;a++)t(e[a],n,s?i:i.call(e[a],a,t(e[a],n)));return r?e:u?t.call(e):l?t(e[0],n):o},Pe=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};f.uid=1,f.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Pe(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,r=this.cache(e);if("string"==typeof t)r[me.camelCase(t)]=n;else for(i in t)r[me.camelCase(i)]=t[i];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][me.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){Array.isArray(t)?t=t.map(me.camelCase):(t=me.camelCase(t),t=t in i?[t]:t.match(Ne)||[]),n=t.length;for(;n--;)delete i[t[n]]}(void 0===t||me.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!me.isEmptyObject(t)}};var De=new f,je=new f,Be=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,He=/[A-Z]/g;me.extend({hasData:function(e){return je.hasData(e)||De.hasData(e)},data:function(e,t,n){return je.access(e,t,n)},removeData:function(e,t){je.remove(e,t)},_data:function(e,t,n){return De.access(e,t,n)},_removeData:function(e,t){De.remove(e,t)}}),me.fn.extend({data:function(e,t){var n,i,r,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(r=je.get(o),1===o.nodeType&&!De.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(i=s[n].name,0===i.indexOf("data-")&&(i=me.camelCase(i.slice(5)),d(o,i,r[i])));De.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each(function(){je.set(this,e)}):Me(this,function(t){var n;if(o&&void 0===t){if(n=je.get(o,e),void 0!==n)return n;if(n=d(o,e),void 0!==n)return n}else this.each(function(){je.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){je.remove(this,e)})}}),me.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=De.get(e,t),n&&(!i||Array.isArray(n)?i=De.access(e,t,me.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=me.queue(e,t),i=n.length,r=n.shift(),o=me._queueHooks(e,t),s=function(){me.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,s,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return De.get(e,n)||De.access(e,n,{empty:me.Callbacks("once memory").add(function(){De.remove(e,[t+"queue",n])})})}}),me.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?me.queue(this[0],e):void 0===t?this:this.each(function(){var n=me.queue(this,e,t);me._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&me.dequeue(this,e)})},dequeue:function(e){return this.each(function(){me.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=me.Deferred(),o=this,s=this.length,a=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)n=De.get(o[s],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(a));return a(),r.promise(t)}});var $e=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,qe=new RegExp("^(?:([+-])=|)("+$e+")([a-z%]*)$","i"),Ue=["Top","Right","Bottom","Left"],Fe=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&me.contains(e.ownerDocument,e)&&"none"===me.css(e,"display")},We=function(e,t,n,i){var r,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];r=n.apply(e,i||[]);for(o in t)e.style[o]=s[o];return r},Ye={};me.fn.extend({show:function(){return y(this,!0)},hide:function(){return y(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Fe(this)?me(this).show():me(this).hide()})}});var Ve=/^(?:checkbox|radio)$/i,ze=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Ke=/^$|\/(?:java|ecma)script/i,Ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ge.optgroup=Ge.option,Ge.tbody=Ge.tfoot=Ge.colgroup=Ge.caption=Ge.thead,Ge.th=Ge.td;var Xe=/<|&#?\w+;/;!function(){var e=ne.createDocumentFragment(),t=e.appendChild(ne.createElement("div")),n=ne.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),pe.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",pe.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Qe=ne.documentElement,Je=/^key/,Ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,et=/^([^.]*)(?:\.(.+)|)/;me.event={global:{},add:function(e,t,n,i,r){var o,s,a,l,u,c,h,f,p,d,m,g=De.get(e);if(g)for(n.handler&&(o=n,n=o.handler,r=o.selector),r&&me.find.matchesSelector(Qe,r),n.guid||(n.guid=me.guid++),(l=g.events)||(l=g.events={}),(s=g.handle)||(s=g.handle=function(t){return"undefined"!=typeof me&&me.event.triggered!==t.type?me.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Ne)||[""],u=t.length;u--;)a=et.exec(t[u])||[],p=m=a[1],d=(a[2]||"").split(".").sort(),p&&(h=me.event.special[p]||{},p=(r?h.delegateType:h.bindType)||p,h=me.event.special[p]||{},c=me.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&me.expr.match.needsContext.test(r),namespace:d.join(".")},o),(f=l[p])||(f=l[p]=[],f.delegateCount=0,h.setup&&h.setup.call(e,i,d,s)!==!1||e.addEventListener&&e.addEventListener(p,s)),h.add&&(h.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),r?f.splice(f.delegateCount++,0,c):f.push(c),me.event.global[p]=!0)},remove:function(e,t,n,i,r){var o,s,a,l,u,c,h,f,p,d,m,g=De.hasData(e)&&De.get(e);if(g&&(l=g.events)){for(t=(t||"").match(Ne)||[""],u=t.length;u--;)if(a=et.exec(t[u])||[],p=m=a[1],d=(a[2]||"").split(".").sort(),p){for(h=me.event.special[p]||{},p=(i?h.delegateType:h.bindType)||p,f=l[p]||[],a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=f.length;o--;)c=f[o],!r&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,h.remove&&h.remove.call(e,c));s&&!f.length&&(h.teardown&&h.teardown.call(e,d,g.handle)!==!1||me.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)me.event.remove(e,p+t[u],n,i,!0);me.isEmptyObject(l)&&De.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,o,s,a=me.event.fix(e),l=new Array(arguments.length),u=(De.get(this,"events")||{})[a.type]||[],c=me.event.special[a.type]||{};for(l[0]=a,t=1;t<arguments.length;t++)l[t]=arguments[t];if(a.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,a)!==!1){for(s=me.event.handlers.call(this,a,u),t=0;(r=s[t++])&&!a.isPropagationStopped();)for(a.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(o.namespace)||(a.handleObj=o,a.data=o.data,i=((me.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,l),void 0!==i&&(a.result=i)===!1&&(a.preventDefault(),a.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,a),a.result}},handlers:function(e,t){var n,i,r,o,s,a=[],l=t.delegateCount,u=e.target;if(l&&u.nodeType&&!("click"===e.type&&e.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||u.disabled!==!0)){for(o=[],s={},n=0;n<l;n++)i=t[n],r=i.selector+" ",void 0===s[r]&&(s[r]=i.needsContext?me(r,this).index(u)>-1:me.find(r,this,null,[u]).length),s[r]&&o.push(i);o.length&&a.push({elem:u,handlers:o})}return u=this,l<t.length&&a.push({elem:u,handlers:t.slice(l)}),a},addProp:function(e,t){Object.defineProperty(me.Event.prototype,e,{enumerable:!0,configurable:!0,get:me.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[me.expando]?e:new me.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==E()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===E()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&r(this,"input"))return this.click(),!1},_default:function(e){return r(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},me.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},me.Event=function(e,t){return this instanceof me.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?w:C,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&me.extend(this,t),this.timeStamp=e&&e.timeStamp||me.now(),void(this[me.expando]=!0)):new me.Event(e,t)},me.Event.prototype={constructor:me.Event,isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=w,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=w,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=w,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},me.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Je.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ze.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},me.event.addProp),me.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){me.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,o=e.handleObj;return r&&(r===i||me.contains(i,r))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),me.fn.extend({on:function(e,t,n,i){return x(this,e,t,n,i)},one:function(e,t,n,i){return x(this,e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,me(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return t!==!1&&"function"!=typeof t||(n=t,t=void 0),n===!1&&(n=C),this.each(function(){me.event.remove(this,e,n,t)})}});var tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,nt=/<script|<style|<link/i,it=/checked\s*(?:[^=]|=\s*.checked.)/i,rt=/^true\/(.*)/,ot=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;me.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1></$2>")},clone:function(e,t,n){var i,r,o,s,a=e.cloneNode(!0),l=me.contains(e.ownerDocument,e);if(!(pe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||me.isXMLDoc(e)))for(s=v(a),o=v(e),i=0,r=o.length;i<r;i++)R(o[i],s[i]);if(t)if(n)for(o=o||v(e),s=s||v(a),i=0,r=o.length;i<r;i++)A(o[i],s[i]);else A(e,a);return s=v(a,"script"),s.length>0&&b(s,!l&&v(e,"script")),a},cleanData:function(e){for(var t,n,i,r=me.event.special,o=0;void 0!==(n=e[o]);o++)if(Pe(n)){if(t=n[De.expando]){if(t.events)for(i in t.events)r[i]?me.event.remove(n,i):me.removeEvent(n,i,t.handle);n[De.expando]=void 0}n[je.expando]&&(n[je.expando]=void 0)}}}),me.fn.extend({detach:function(e){return N(this,e,!0)},remove:function(e){return N(this,e)},text:function(e){return Me(this,function(e){return void 0===e?me.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return L(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=S(this,e);t.appendChild(e)}})},prepend:function(){return L(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=S(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return L(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return L(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(me.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return me.clone(this,e,t)})},html:function(e){return Me(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!nt.test(e)&&!Ge[(ze.exec(e)||["",""])[1].toLowerCase()]){e=me.htmlPrefilter(e);try{for(;n<i;n++)t=this[n]||{},1===t.nodeType&&(me.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return L(this,arguments,function(t){var n=this.parentNode;me.inArray(this,e)<0&&(me.cleanData(v(this)),n&&n.replaceChild(t,this))},e)}}),me.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){me.fn[e]=function(e){for(var n,i=[],r=me(e),o=r.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),me(r[s])[t](n),se.apply(i,n.get());return this.pushStack(i)}});var st=/^margin/,at=new RegExp("^("+$e+")(?!px)[a-z%]+$","i"),lt=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)};!function(){function t(){if(a){a.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Qe.appendChild(s);var t=e.getComputedStyle(a);n="1%"!==t.top,o="2px"===t.marginLeft,i="4px"===t.width,a.style.marginRight="50%",r="4px"===t.marginRight,Qe.removeChild(s),a=null}}var n,i,r,o,s=ne.createElement("div"),a=ne.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",pe.clearCloneStyle="content-box"===a.style.backgroundClip,s.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",s.appendChild(a),me.extend(pe,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return t(),i},pixelMarginRight:function(){return t(),r},reliableMarginLeft:function(){return t(),o}}))}();var ut=/^(none|table(?!-c[ea]).+)/,ct=/^--/,ht={position:"absolute",visibility:"hidden",display:"block"},ft={letterSpacing:"0",fontWeight:"400"},pt=["Webkit","Moz","ms"],dt=ne.createElement("div").style;me.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=O(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,s,a=me.camelCase(t),l=ct.test(t),u=e.style;return l||(t=P(a)),s=me.cssHooks[t]||me.cssHooks[a],void 0===n?s&&"get"in s&&void 0!==(r=s.get(e,!1,i))?r:u[t]:(o=typeof n,"string"===o&&(r=qe.exec(n))&&r[1]&&(n=m(e,t,r),o="number"),null!=n&&n===n&&("number"===o&&(n+=r&&r[3]||(me.cssNumber[a]?"":"px")),pe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,i))||(l?u.setProperty(t,n):u[t]=n)),void 0)}},css:function(e,t,n,i){var r,o,s,a=me.camelCase(t),l=ct.test(t);return l||(t=P(a)),s=me.cssHooks[t]||me.cssHooks[a],s&&"get"in s&&(r=s.get(e,!0,n)),void 0===r&&(r=O(e,t,i)),"normal"===r&&t in ft&&(r=ft[t]),""===n||n?(o=parseFloat(r),n===!0||isFinite(o)?o||0:r):r}}),me.each(["height","width"],function(e,t){me.cssHooks[t]={get:function(e,n,i){if(n)return!ut.test(me.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?B(e,t,i):We(e,ht,function(){return B(e,t,i)})},set:function(e,n,i){var r,o=i&<(e),s=i&&j(e,t,i,"border-box"===me.css(e,"boxSizing",!1,o),o);return s&&(r=qe.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=me.css(e,t)),D(e,n,s)}}}),me.cssHooks.marginLeft=I(pe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(O(e,"marginLeft"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),me.each({margin:"",padding:"",border:"Width"},function(e,t){me.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[e+Ue[i]+t]=o[i]||o[i-2]||o[0];return r}},st.test(e)||(me.cssHooks[e+t].set=D)}),me.fn.extend({css:function(e,t){return Me(this,function(e,t,n){var i,r,o={},s=0;if(Array.isArray(t)){for(i=lt(e),r=t.length;s<r;s++)o[t[s]]=me.css(e,t[s],!1,i);return o}return void 0!==n?me.style(e,t,n):me.css(e,t)},e,t,arguments.length>1)}}),me.Tween=H,H.prototype={constructor:H,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||me.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(me.cssNumber[n]?"":"px")},cur:function(){var e=H.propHooks[this.prop];return e&&e.get?e.get(this):H.propHooks._default.get(this)},run:function(e){var t,n=H.propHooks[this.prop];return this.options.duration?this.pos=t=me.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):H.propHooks._default.set(this),this}},H.prototype.init.prototype=H.prototype,H.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=me.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){me.fx.step[e.prop]?me.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[me.cssProps[e.prop]]&&!me.cssHooks[e.prop]?e.elem[e.prop]=e.now:me.style(e.elem,e.prop,e.now+e.unit)}}},H.propHooks.scrollTop=H.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},me.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},me.fx=H.prototype.init,me.fx.step={};var mt,gt,yt=/^(?:toggle|show|hide)$/,vt=/queueHooks$/;me.Animation=me.extend(V,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return m(n.elem,e,qe.exec(t),n),n}]},tweener:function(e,t){me.isFunction(e)?(t=e,e=["*"]):e=e.match(Ne);for(var n,i=0,r=e.length;i<r;i++)n=e[i],V.tweeners[n]=V.tweeners[n]||[],V.tweeners[n].unshift(t)},prefilters:[W],prefilter:function(e,t){t?V.prefilters.unshift(e):V.prefilters.push(e)}}),me.speed=function(e,t,n){var i=e&&"object"==typeof e?me.extend({},e):{complete:n||!n&&t||me.isFunction(e)&&e,duration:e,easing:n&&t||t&&!me.isFunction(t)&&t};return me.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in me.fx.speeds?i.duration=me.fx.speeds[i.duration]:i.duration=me.fx.speeds._default),null!=i.queue&&i.queue!==!0||(i.queue="fx"),i.old=i.complete,i.complete=function(){me.isFunction(i.old)&&i.old.call(this),i.queue&&me.dequeue(this,i.queue)},i},me.fn.extend({fadeTo:function(e,t,n,i){return this.filter(Fe).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=me.isEmptyObject(e),o=me.speed(t,n,i),s=function(){var t=V(this,me.extend({},e),o);(r||De.get(this,"finish"))&&t.stop(!0)};return s.finish=s,r||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",o=me.timers,s=De.get(this);if(r)s[r]&&s[r].stop&&i(s[r]);else for(r in s)s[r]&&s[r].stop&&vt.test(r)&&i(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));!t&&n||me.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=De.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=me.timers,s=i?i.length:0;for(n.finish=!0,me.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),me.each(["toggle","show","hide"],function(e,t){var n=me.fn[t];me.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(U(t,!0),e,i,r)}}),me.each({slideDown:U("show"),slideUp:U("hide"),slideToggle:U("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){me.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),me.timers=[],me.fx.tick=function(){var e,t=0,n=me.timers;for(mt=me.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||me.fx.stop(),mt=void 0},me.fx.timer=function(e){me.timers.push(e),me.fx.start()},me.fx.interval=13,me.fx.start=function(){gt||(gt=!0,$())},me.fx.stop=function(){gt=null},me.fx.speeds={slow:600,fast:200,_default:400},me.fn.delay=function(t,n){return t=me.fx?me.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,i){var r=e.setTimeout(n,t);i.stop=function(){e.clearTimeout(r)}})},function(){var e=ne.createElement("input"),t=ne.createElement("select"),n=t.appendChild(ne.createElement("option"));e.type="checkbox",pe.checkOn=""!==e.value,pe.optSelected=n.selected,e=ne.createElement("input"),e.value="t",e.type="radio",pe.radioValue="t"===e.value}();var bt,_t=me.expr.attrHandle;me.fn.extend({attr:function(e,t){return Me(this,me.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){me.removeAttr(this,e)})}}),me.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?me.prop(e,t,n):(1===o&&me.isXMLDoc(e)||(r=me.attrHooks[t.toLowerCase()]||(me.expr.match.bool.test(t)?bt:void 0)),void 0!==n?null===n?void me.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=me.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!pe.radioValue&&"radio"===t&&r(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(Ne);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),bt={set:function(e,t,n){return t===!1?me.removeAttr(e,n):e.setAttribute(n,n),n}},me.each(me.expr.match.bool.source.match(/\w+/g),function(e,t){var n=_t[t]||me.find.attr;_t[t]=function(e,t,i){var r,o,s=t.toLowerCase();return i||(o=_t[s],_t[s]=r,r=null!=n(e,t,i)?s:null,_t[s]=o),r}});var wt=/^(?:input|select|textarea|button)$/i,Ct=/^(?:a|area)$/i;me.fn.extend({prop:function(e,t){return Me(this,me.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[me.propFix[e]||e]})}}),me.extend({prop:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&me.isXMLDoc(e)||(t=me.propFix[t]||t,r=me.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=me.find.attr(e,"tabindex");return t?parseInt(t,10):wt.test(e.nodeName)||Ct.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),pe.optSelected||(me.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),me.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){me.propFix[this.toLowerCase()]=this}),me.fn.extend({addClass:function(e){var t,n,i,r,o,s,a,l=0;if(me.isFunction(e))return this.each(function(t){me(this).addClass(e.call(this,t,K(this)))});if("string"==typeof e&&e)for(t=e.match(Ne)||[];n=this[l++];)if(r=K(n),i=1===n.nodeType&&" "+z(r)+" "){for(s=0;o=t[s++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");a=z(i),r!==a&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,i,r,o,s,a,l=0;if(me.isFunction(e))return this.each(function(t){me(this).removeClass(e.call(this,t,K(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Ne)||[];n=this[l++];)if(r=K(n),i=1===n.nodeType&&" "+z(r)+" "){for(s=0;o=t[s++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");a=z(i),r!==a&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):me.isFunction(e)?this.each(function(n){me(this).toggleClass(e.call(this,n,K(this),t),t)}):this.each(function(){var t,i,r,o;if("string"===n)for(i=0,r=me(this),o=e.match(Ne)||[];t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&"boolean"!==n||(t=K(this),t&&De.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":De.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+z(K(n))+" ").indexOf(t)>-1)return!0;return!1}});var Et=/\r/g;me.fn.extend({val:function(e){var t,n,i,r=this[0];{if(arguments.length)return i=me.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,me(this).val()):e,null==r?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=me.map(r,function(e){return null==e?"":e+""})),t=me.valHooks[this.type]||me.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))});if(r)return t=me.valHooks[r.type]||me.valHooks[r.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(Et,""):null==n?"":n)}}}),me.extend({valHooks:{option:{get:function(e){var t=me.find.attr(e,"value");return null!=t?t:z(me.text(e))}},select:{get:function(e){var t,n,i,o=e.options,s=e.selectedIndex,a="select-one"===e.type,l=a?null:[],u=a?s+1:o.length;for(i=s<0?u:a?s:0;i<u;i++)if(n=o[i],(n.selected||i===s)&&!n.disabled&&(!n.parentNode.disabled||!r(n.parentNode,"optgroup"))){if(t=me(n).val(),a)return t;l.push(t)}return l},set:function(e,t){for(var n,i,r=e.options,o=me.makeArray(t),s=r.length;s--;)i=r[s],(i.selected=me.inArray(me.valHooks.option.get(i),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),me.each(["radio","checkbox"],function(){me.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=me.inArray(me(e).val(),t)>-1}},pe.checkOn||(me.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var xt=/^(?:focusinfocus|focusoutblur)$/;me.extend(me.event,{trigger:function(t,n,i,r){var o,s,a,l,u,c,h,f=[i||ne],p=ce.call(t,"type")?t.type:t,d=ce.call(t,"namespace")?t.namespace.split("."):[];if(s=a=i=i||ne,3!==i.nodeType&&8!==i.nodeType&&!xt.test(p+me.event.triggered)&&(p.indexOf(".")>-1&&(d=p.split("."),p=d.shift(),d.sort()),u=p.indexOf(":")<0&&"on"+p,t=t[me.expando]?t:new me.Event(p,"object"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=d.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:me.makeArray(n,[t]),h=me.event.special[p]||{},r||!h.trigger||h.trigger.apply(i,n)!==!1)){if(!r&&!h.noBubble&&!me.isWindow(i)){for(l=h.delegateType||p,xt.test(l+p)||(s=s.parentNode);s;s=s.parentNode)f.push(s),a=s;a===(i.ownerDocument||ne)&&f.push(a.defaultView||a.parentWindow||e)}for(o=0;(s=f[o++])&&!t.isPropagationStopped();)t.type=o>1?l:h.bindType||p,c=(De.get(s,"events")||{})[t.type]&&De.get(s,"handle"),c&&c.apply(s,n),c=u&&s[u],c&&c.apply&&Pe(s)&&(t.result=c.apply(s,n),t.result===!1&&t.preventDefault());return t.type=p,r||t.isDefaultPrevented()||h._default&&h._default.apply(f.pop(),n)!==!1||!Pe(i)||u&&me.isFunction(i[p])&&!me.isWindow(i)&&(a=i[u],a&&(i[u]=null),me.event.triggered=p,i[p](),me.event.triggered=void 0,a&&(i[u]=a)),t.result}},simulate:function(e,t,n){var i=me.extend(new me.Event,n,{type:e,isSimulated:!0});me.event.trigger(i,null,t)}}),me.fn.extend({trigger:function(e,t){return this.each(function(){me.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return me.event.trigger(e,t,n,!0)}}),me.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){me.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),me.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),pe.focusin="onfocusin"in e,pe.focusin||me.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){me.event.simulate(t,e.target,me.event.fix(e))};me.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=De.access(i,t);r||i.addEventListener(e,n,!0),De.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=De.access(i,t)-1;r?De.access(i,t,r):(i.removeEventListener(e,n,!0),De.remove(i,t))}}});var St=e.location,Tt=me.now(),kt=/\?/;me.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(i){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||me.error("Invalid XML: "+t),n};var At=/\[\]$/,Rt=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;me.param=function(e,t){var n,i=[],r=function(e,t){var n=me.isFunction(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!me.isPlainObject(e))me.each(e,function(){r(this.name,this.value)});else for(n in e)G(n,e[n],t,r);return i.join("&")},me.fn.extend({serialize:function(){return me.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=me.prop(this,"elements");return e?me.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!me(this).is(":disabled")&&Nt.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!Ve.test(e))}).map(function(e,t){var n=me(this).val();return null==n?null:Array.isArray(n)?me.map(n,function(e){return{name:t.name,value:e.replace(Rt,"\r\n")}}):{name:t.name,value:n.replace(Rt,"\r\n")}}).get()}});var Ot=/%20/g,It=/#.*$/,Mt=/([?&])_=[^&]*/,Pt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Dt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,jt=/^(?:GET|HEAD)$/,Bt=/^\/\//,Ht={},$t={},qt="*/".concat("*"),Ut=ne.createElement("a");Ut.href=St.href,me.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:"GET",isLocal:Dt.test(St.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":me.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?J(J(e,me.ajaxSettings),t):J(me.ajaxSettings,e)},ajaxPrefilter:X(Ht),ajaxTransport:X($t),ajax:function(t,n){function i(t,n,i,a){var u,f,p,_,w,C=n;c||(c=!0,l&&e.clearTimeout(l),r=void 0,s=a||"",E.readyState=t>0?4:0,u=t>=200&&t<300||304===t,i&&(_=Z(d,E,i)),_=ee(d,_,E,u),u?(d.ifModified&&(w=E.getResponseHeader("Last-Modified"),w&&(me.lastModified[o]=w),w=E.getResponseHeader("etag"),w&&(me.etag[o]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=_.state,f=_.data,p=_.error,u=!p)):(p=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",u?y.resolveWith(m,[f,C,E]):y.rejectWith(m,[E,C,p]),E.statusCode(b),b=void 0,h&&g.trigger(u?"ajaxSuccess":"ajaxError",[E,d,u?f:p]),v.fireWith(m,[E,C]),h&&(g.trigger("ajaxComplete",[E,d]),--me.active||me.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,o,s,a,l,u,c,h,f,p,d=me.ajaxSetup({},n),m=d.context||d,g=d.context&&(m.nodeType||m.jquery)?me(m):me.event,y=me.Deferred(),v=me.Callbacks("once memory"),b=d.statusCode||{},_={},w={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!a)for(a={};t=Pt.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?s:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==c&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||C;return r&&r.abort(t),i(0,t),this}};if(y.promise(E),d.url=((t||d.url||St.href)+"").replace(Bt,St.protocol+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(Ne)||[""],null==d.crossDomain){u=ne.createElement("a");try{u.href=d.url,u.href=u.href,d.crossDomain=Ut.protocol+"//"+Ut.host!=u.protocol+"//"+u.host}catch(x){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=me.param(d.data,d.traditional)),Q(Ht,d,n,E),c)return E;h=me.event&&d.global,h&&0===me.active++&&me.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!jt.test(d.type),o=d.url.replace(It,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(Ot,"+")):(p=d.url.slice(o.length),d.data&&(o+=(kt.test(o)?"&":"?")+d.data,delete d.data),d.cache===!1&&(o=o.replace(Mt,"$1"),p=(kt.test(o)?"&":"?")+"_="+Tt++ +p),d.url=o+p),d.ifModified&&(me.lastModified[o]&&E.setRequestHeader("If-Modified-Since",me.lastModified[o]),me.etag[o]&&E.setRequestHeader("If-None-Match",me.etag[o])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&E.setRequestHeader("Content-Type",d.contentType),E.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+qt+"; q=0.01":""):d.accepts["*"]);for(f in d.headers)E.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(d.beforeSend.call(m,E,d)===!1||c))return E.abort();if(C="abort",v.add(d.complete),E.done(d.success),E.fail(d.error),r=Q($t,d,n,E)){if(E.readyState=1,h&&g.trigger("ajaxSend",[E,d]),c)return E;d.async&&d.timeout>0&&(l=e.setTimeout(function(){E.abort("timeout")},d.timeout));try{c=!1,r.send(_,i)}catch(x){if(c)throw x;i(-1,x)}}else i(-1,"No Transport");return E},getJSON:function(e,t,n){return me.get(e,t,n,"json")},getScript:function(e,t){return me.get(e,void 0,t,"script")}}),me.each(["get","post"],function(e,t){me[t]=function(e,n,i,r){return me.isFunction(n)&&(r=r||i,i=n,n=void 0),me.ajax(me.extend({url:e,type:t,dataType:r,data:n,success:i},me.isPlainObject(e)&&e))}}),me._evalUrl=function(e){return me.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},me.fn.extend({wrapAll:function(e){var t;return this[0]&&(me.isFunction(e)&&(e=e.call(this[0])),t=me(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return me.isFunction(e)?this.each(function(t){me(this).wrapInner(e.call(this,t))}):this.each(function(){var t=me(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=me.isFunction(e);return this.each(function(n){me(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){me(this).replaceWith(this.childNodes)}),this}}),me.expr.pseudos.hidden=function(e){return!me.expr.pseudos.visible(e)},me.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},me.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(t){}};var Ft={0:200,1223:204},Wt=me.ajaxSettings.xhr();pe.cors=!!Wt&&"withCredentials"in Wt,pe.ajax=Wt=!!Wt,me.ajaxTransport(function(t){var n,i;if(pe.cors||Wt&&!t.crossDomain)return{send:function(r,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(s in r)a.setRequestHeader(s,r[s]);n=function(e){return function(){n&&(n=i=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Ft[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),i=a.onerror=n("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout(function(){n&&i()})},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(l){if(n)throw l}},abort:function(){n&&n()}}}),me.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),me.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return me.globalEval(e),e}}}),me.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),me.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,r){t=me("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),ne.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Yt=[],Vt=/(=)\?(?=&|$)|\?\?/;me.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Yt.pop()||me.expando+"_"+Tt++;return this[e]=!0,e}}),me.ajaxPrefilter("json jsonp",function(t,n,i){var r,o,s,a=t.jsonp!==!1&&(Vt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=me.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Vt,"$1"+r):t.jsonp!==!1&&(t.url+=(kt.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return s||me.error(r+" was not called"),s[0]},t.dataTypes[0]="json",o=e[r],e[r]=function(){s=arguments},i.always(function(){void 0===o?me(e).removeProp(r):e[r]=o,t[r]&&(t.jsonpCallback=n.jsonpCallback,Yt.push(r)),s&&me.isFunction(o)&&o(s[0]),s=o=void 0}),"script"}),pe.createHTMLDocument=function(){var e=ne.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),me.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,r,o;return t||(pe.createHTMLDocument?(t=ne.implementation.createHTMLDocument(""),i=t.createElement("base"),i.href=ne.location.href,t.head.appendChild(i)):t=ne),r=xe.exec(e),o=!n&&[],r?[t.createElement(r[1])]:(r=_([e],t,o),o&&o.length&&me(o).remove(),me.merge([],r.childNodes))},me.fn.load=function(e,t,n){var i,r,o,s=this,a=e.indexOf(" ");return a>-1&&(i=z(e.slice(a)),e=e.slice(0,a)),me.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),s.length>0&&me.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done(function(e){o=arguments,s.html(i?me("<div>").append(me.parseHTML(e)).find(i):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},me.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){me.fn[t]=function(e){return this.on(t,e)}}),me.expr.pseudos.animated=function(e){return me.grep(me.timers,function(t){return e===t.elem}).length},me.offset={setOffset:function(e,t,n){var i,r,o,s,a,l,u,c=me.css(e,"position"),h=me(e),f={};"static"===c&&(e.style.position="relative"),a=h.offset(),o=me.css(e,"top"),l=me.css(e,"left"),u=("absolute"===c||"fixed"===c)&&(o+l).indexOf("auto")>-1,u?(i=h.position(),s=i.top,r=i.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),me.isFunction(t)&&(t=t.call(e,n,me.extend({},a))),null!=t.top&&(f.top=t.top-a.top+s),null!=t.left&&(f.left=t.left-a.left+r),"using"in t?t.using.call(e,f):h.css(f)}},me.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){me.offset.setOffset(this,e,t)});var t,n,i,r,o=this[0];if(o)return o.getClientRects().length?(i=o.getBoundingClientRect(),t=o.ownerDocument,n=t.documentElement,r=t.defaultView,{top:i.top+r.pageYOffset-n.clientTop,left:i.left+r.pageXOffset-n.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],i={top:0,left:0};return"fixed"===me.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),r(e[0],"html")||(i=e.offset()),i={top:i.top+me.css(e[0],"borderTopWidth",!0),left:i.left+me.css(e[0],"borderLeftWidth",!0)}),{top:t.top-i.top-me.css(n,"marginTop",!0),left:t.left-i.left-me.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===me.css(e,"position");)e=e.offsetParent;return e||Qe})}}),me.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;me.fn[e]=function(i){return Me(this,function(e,i,r){var o;return me.isWindow(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===r?o?o[t]:e[i]:void(o?o.scrollTo(n?o.pageXOffset:r,n?r:o.pageYOffset):e[i]=r)},e,i,arguments.length)}}),me.each(["top","left"],function(e,t){me.cssHooks[t]=I(pe.pixelPosition,function(e,n){if(n)return n=O(e,t),at.test(n)?me(e).position()[t]+"px":n})}),me.each({Height:"height",Width:"width"},function(e,t){me.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){me.fn[i]=function(r,o){var s=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||o===!0?"margin":"border");return Me(this,function(t,n,r){var o;return me.isWindow(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===r?me.css(t,n,a):me.style(t,n,r,a)},t,s?r:void 0,s)}})}),me.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),me.holdReady=function(e){e?me.readyWait++:me.ready(!0)},me.isArray=Array.isArray,me.parseJSON=JSON.parse,me.nodeName=r,"function"==typeof define&&define.amd&&define("jquery",[],function(){return me});var zt=e.jQuery,Kt=e.$;return me.noConflict=function(t){return e.$===me&&(e.$=Kt),t&&e.jQuery===me&&(e.jQuery=zt),me},t||(e.jQuery=e.$=me),me})}()}),require.register("phoenix/priv/static/phoenix.js",function(e,t,i){t=n(t,{},"phoenix"),function(){!function(t,n){"object"==typeof e?n(e):"function"==typeof define&&define.amd?define(["exports"],n):n(t.Phoenix=t.Phoenix||{})}(this,function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(l){r=!0,o=l}finally{try{!i&&a["return"]&&a["return"]()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s="2.0.0",a={connecting:0,open:1,closing:2,closed:3},l=1e4,u=1e3,c={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},h={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},f=[h.close,h.error,h.join,h.reply,h.leave],p={longpoll:"longpoll",websocket:"websocket"},d=function(){function e(t,i,r,o){n(this,e),this.channel=t,this.event=i,this.payload=r||{},this.receivedResp=null,this.timeout=o,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}return o(e,[{key:"resend",value:function(e){this.timeout=e,this.reset(),this.send()}},{key:"send",value:function(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel.joinRef()}))}},{key:"receive",value:function(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}},{key:"reset",value:function(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}},{key:"matchReceive",value:function(e){var t=e.status,n=e.response;e.ref;this.recHooks.filter(function(e){return e.status===t}).forEach(function(e){return e.callback(n)})}},{key:"cancelRefEvent",value:function(){this.refEvent&&this.channel.off(this.refEvent)}},{key:"cancelTimeout",value:function(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}},{key:"startTimeout",value:function(){var e=this;this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,function(t){e.cancelRefEvent(),e.cancelTimeout(),e.receivedResp=t,e.matchReceive(t)}),this.timeoutTimer=setTimeout(function(){e.trigger("timeout",{})},this.timeout)}},{key:"hasReceived",value:function(e){return this.receivedResp&&this.receivedResp.status===e}},{key:"trigger",value:function(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}}]),e}(),m=e.Channel=function(){function e(t,i,r){var o=this;n(this,e),this.state=c.closed,this.topic=t,this.params=i||{},this.socket=r,this.bindings=[],this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new d(this,h.join,this.params,this.timeout),this.pushBuffer=[],this.rejoinTimer=new b(function(){return o.rejoinUntilConnected()},this.socket.reconnectAfterMs),this.joinPush.receive("ok",function(){o.state=c.joined,o.rejoinTimer.reset(),o.pushBuffer.forEach(function(e){return e.send()}),o.pushBuffer=[]}),this.onClose(function(){o.rejoinTimer.reset(),o.socket.log("channel","close "+o.topic+" "+o.joinRef()),o.state=c.closed,o.socket.remove(o)}),this.onError(function(e){o.isLeaving()||o.isClosed()||(o.socket.log("channel","error "+o.topic,e),o.state=c.errored,o.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",function(){if(o.isJoining()){o.socket.log("channel","timeout "+o.topic+" ("+o.joinRef()+")",o.joinPush.timeout);var e=new d(o,h.leave,{},o.timeout);e.send(),o.state=c.errored,o.joinPush.reset(),o.rejoinTimer.scheduleTimeout()}}),this.on(h.reply,function(e,t){o.trigger(o.replyEventName(t),e)})}return o(e,[{key:"rejoinUntilConnected",value:function(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this.rejoin()}},{key:"join",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;if(this.joinedOnce)throw"tried to join multiple times. 'join' can only be called a single time per channel instance";return this.joinedOnce=!0,this.rejoin(e),this.joinPush}},{key:"onClose",value:function(e){this.on(h.close,e)}},{key:"onError",value:function(e){this.on(h.error,function(t){return e(t)})}},{key:"on",value:function(e,t){this.bindings.push({event:e,callback:t})}},{key:"off",value:function(e){this.bindings=this.bindings.filter(function(t){return t.event!==e})}},{key:"canPush",value:function(){return this.socket.isConnected()&&this.isJoined()}},{key:"push",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.timeout;if(!this.joinedOnce)throw"tried to push '"+e+"' to '"+this.topic+"' before joining. Use channel.join() before pushing events";var i=new d(this,e,t,n);return this.canPush()?i.send():(i.startTimeout(),this.pushBuffer.push(i)),i}},{key:"leave",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.state=c.leaving;var n=function(){e.socket.log("channel","leave "+e.topic),e.trigger(h.close,"leave")},i=new d(this,h.leave,{},t);return i.receive("ok",function(){return n()}).receive("timeout",function(){return n()}),i.send(),this.canPush()||i.trigger("ok",{}),i}},{key:"onMessage",value:function(e,t,n){return t}},{key:"isMember",value:function(e,t,n,i){if(this.topic!==e)return!1;var r=f.indexOf(t)>=0;return!i||!r||i===this.joinRef()||(this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:i}),!1)}},{key:"joinRef",value:function(){return this.joinPush.ref}},{key:"sendJoin",value:function(e){this.state=c.joining,this.joinPush.resend(e)}},{key:"rejoin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.isLeaving()||this.sendJoin(e)}},{key:"trigger",value:function(e,t,n,i){var r=this,o=this.onMessage(e,t,n,i);if(t&&!o)throw"channel onMessage callbacks must return the payload, modified or unmodified";this.bindings.filter(function(t){return t.event===e}).map(function(e){return e.callback(o,n,i||r.joinRef())})}},{key:"replyEventName",value:function(e){return"chan_reply_"+e}},{key:"isClosed",value:function(){return this.state===c.closed}},{key:"isErrored",value:function(){return this.state===c.errored}},{key:"isJoined",value:function(){return this.state===c.joined}},{key:"isJoining",value:function(){return this.state===c.joining}},{key:"isLeaving",value:function(){return this.state===c.leaving}}]),e}(),g={encode:function(e,t){var n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))},decode:function(e,t){var n=JSON.parse(e),i=r(n,5),o=i[0],s=i[1],a=i[2],l=i[3],u=i[4];return t({join_ref:o,ref:s,topic:a,event:l,payload:u})}},y=(e.Socket=function(){function e(t){var i=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,e),this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=r.timeout||l,this.transport=r.transport||window.WebSocket||y,this.defaultEncoder=g.encode,this.defaultDecoder=g.decode,this.transport!==y?(this.encode=r.encode||this.defaultEncoder,this.decode=r.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder),this.heartbeatIntervalMs=r.heartbeatIntervalMs||3e4,this.reconnectAfterMs=r.reconnectAfterMs||function(e){return[1e3,2e3,5e3,1e4][e-1]||1e4},this.logger=r.logger||function(){},this.longpollerTimeout=r.longpollerTimeout||2e4,this.params=r.params||{},this.endPoint=t+"/"+p.websocket,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new b(function(){i.disconnect(function(){return i.connect()})},this.reconnectAfterMs)}return o(e,[{key:"protocol",value:function(){return location.protocol.match(/^https/)?"wss":"ws"}},{key:"endPointURL",value:function(){var e=v.appendParams(v.appendParams(this.endPoint,this.params),{vsn:s});return"/"!==e.charAt(0)?e:"/"===e.charAt(1)?this.protocol()+":"+e:this.protocol()+"://"+location.host+e}},{key:"disconnect",value:function(e,t,n){this.conn&&(this.conn.onclose=function(){},t?this.conn.close(t,n||""):this.conn.close(),this.conn=null),e&&e()}},{key:"connect",value:function(e){var t=this;e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=e),this.conn||(this.conn=new this.transport(this.endPointURL()),this.conn.timeout=this.longpollerTimeout,this.conn.onopen=function(){return t.onConnOpen()},this.conn.onerror=function(e){return t.onConnError(e)},this.conn.onmessage=function(e){return t.onConnMessage(e)},this.conn.onclose=function(e){return t.onConnClose(e)})}},{key:"log",value:function(e,t,n){this.logger(e,t,n)}},{key:"onOpen",value:function(e){this.stateChangeCallbacks.open.push(e)}},{key:"onClose",value:function(e){this.stateChangeCallbacks.close.push(e)}},{key:"onError",value:function(e){this.stateChangeCallbacks.error.push(e)}},{key:"onMessage",value:function(e){this.stateChangeCallbacks.message.push(e)}},{key:"onConnOpen",value:function(){var e=this;this.log("transport","connected to "+this.endPointURL()),this.flushSendBuffer(),this.reconnectTimer.reset(),this.conn.skipHeartbeat||(clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(function(){return e.sendHeartbeat()},this.heartbeatIntervalMs)),this.stateChangeCallbacks.open.forEach(function(e){return e()})}},{key:"onConnClose",value:function(e){this.log("transport","close",e),this.triggerChanError(),clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(function(t){return t(e)})}},{key:"onConnError",value:function(e){this.log("transport",e),this.triggerChanError(),this.stateChangeCallbacks.error.forEach(function(t){return t(e)})}},{key:"triggerChanError",value:function(){this.channels.forEach(function(e){return e.trigger(h.error)})}},{key:"connectionState",value:function(){switch(this.conn&&this.conn.readyState){case a.connecting:return"connecting";case a.open:return"open";case a.closing:return"closing";default:return"closed"}}},{key:"isConnected",value:function(){return"open"===this.connectionState()}},{key:"remove",value:function(e){this.channels=this.channels.filter(function(t){return t.joinRef()!==e.joinRef()})}},{key:"channel",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new m(e,t,this);return this.channels.push(n),n}},{key:"push",value:function(e){var t=this,n=e.topic,i=e.event,r=e.payload,o=e.ref,s=e.join_ref,a=function(){t.encode(e,function(e){t.conn.send(e)})};this.log("push",n+" "+i+" ("+s+", "+o+")",r),this.isConnected()?a():this.sendBuffer.push(a)}},{key:"makeRef",value:function(){var e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}},{key:"sendHeartbeat",value:function(){if(this.isConnected()){if(this.pendingHeartbeatRef)return this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),void this.conn.close(u,"hearbeat timeout");this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef})}}},{key:"flushSendBuffer",value:function(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(function(e){return e()}),this.sendBuffer=[])}},{key:"onConnMessage",value:function(e){var t=this;this.decode(e.data,function(e){var n=e.topic,i=e.event,r=e.payload,o=e.ref,s=e.join_ref;o&&o===t.pendingHeartbeatRef&&(t.pendingHeartbeatRef=null),t.log("receive",(r.status||"")+" "+n+" "+i+" "+(o&&"("+o+")"||""),r),t.channels.filter(function(e){return e.isMember(n,i,r,s)}).forEach(function(e){return e.trigger(i,r,o,s)}),t.stateChangeCallbacks.message.forEach(function(t){return t(e)})})}}]),e}(),e.LongPoll=function(){function e(t){n(this,e),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=a.connecting,this.poll()}return o(e,[{key:"normalizeEndpoint",value:function(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+p.websocket),"$1/"+p.longpoll)}},{key:"endpointURL",value:function(){return v.appendParams(this.pollEndpoint,{token:this.token})}},{key:"closeAndRetry",value:function(){this.close(),this.readyState=a.connecting}},{key:"ontimeout",value:function(){this.onerror("timeout"),this.closeAndRetry()}},{key:"poll",value:function(){var e=this;this.readyState!==a.open&&this.readyState!==a.connecting||v.request("GET",this.endpointURL(),"application/json",null,this.timeout,this.ontimeout.bind(this),function(t){if(t){var n=t.status,i=t.token,r=t.messages;e.token=i}else var n=0;switch(n){case 200:r.forEach(function(t){return e.onmessage({data:t})}),e.poll();break;case 204:e.poll();break;case 410:e.readyState=a.open,e.onopen(),e.poll();break;case 0:case 500:e.onerror(),e.closeAndRetry();break;default:throw"unhandled poll status "+n}})}},{key:"send",value:function(e){var t=this;v.request("POST",this.endpointURL(),"application/json",e,this.timeout,this.onerror.bind(this,"timeout"),function(e){e&&200===e.status||(t.onerror(e&&e.status),t.closeAndRetry())})}},{key:"close",value:function(e,t){this.readyState=a.closed,this.onclose()}}]),e}()),v=e.Ajax=function(){function e(){n(this,e)}return o(e,null,[{key:"request",value:function(e,t,n,i,r,o,s){if(window.XDomainRequest){var a=new XDomainRequest;this.xdomainRequest(a,e,t,i,r,o,s)}else{var l=window.XMLHttpRequest?new window.XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");this.xhrRequest(l,e,t,n,i,r,o,s)}}},{key:"xdomainRequest",value:function(e,t,n,i,r,o,s){var a=this;e.timeout=r,e.open(t,n),e.onload=function(){var t=a.parseJSON(e.responseText);s&&s(t)},o&&(e.ontimeout=o),e.onprogress=function(){},e.send(i)}},{key:"xhrRequest",value:function(e,t,n,i,r,o,s,a){var l=this;e.open(t,n,!0),e.timeout=o,e.setRequestHeader("Content-Type",i),e.onerror=function(){a&&a(null)},e.onreadystatechange=function(){if(e.readyState===l.states.complete&&a){var t=l.parseJSON(e.responseText);a(t)}},s&&(e.ontimeout=s),e.send(r)}},{key:"parseJSON",value:function(e){if(!e||""===e)return null;try{return JSON.parse(e)}catch(t){return console&&console.log("failed to parse JSON response",e),null}}},{key:"serialize",value:function(e,t){var n=[];for(var r in e)if(e.hasOwnProperty(r)){var o=t?t+"["+r+"]":r,s=e[r];"object"===("undefined"==typeof s?"undefined":i(s))?n.push(this.serialize(s,o)):n.push(encodeURIComponent(o)+"="+encodeURIComponent(s))}return n.join("&")}},{key:"appendParams",value:function(e,t){if(0===Object.keys(t).length)return e;var n=e.match(/\?/)?"&":"?";return""+e+n+this.serialize(t)}}]),e}();v.states={complete:4};var b=(e.Presence={syncState:function(e,t,n,i){var r=this,o=this.clone(e),s={},a={};return this.map(o,function(e,n){t[e]||(a[e]=n)}),this.map(t,function(e,t){var n=o[e];if(n){var i=t.metas.map(function(e){return e.phx_ref}),l=n.metas.map(function(e){return e.phx_ref}),u=t.metas.filter(function(e){return l.indexOf(e.phx_ref)<0}),c=n.metas.filter(function(e){return i.indexOf(e.phx_ref)<0});u.length>0&&(s[e]=t,s[e].metas=u),c.length>0&&(a[e]=r.clone(n),a[e].metas=c)}else s[e]=t}),this.syncDiff(o,{joins:s,leaves:a},n,i)},syncDiff:function(e,n,i,r){var o=n.joins,s=n.leaves,a=this.clone(e);return i||(i=function(){}),r||(r=function(){}),this.map(o,function(e,n){var r=a[e];if(a[e]=n,r){var o;(o=a[e].metas).unshift.apply(o,t(r.metas))}i(e,r,n)}),this.map(s,function(e,t){var n=a[e];if(n){var i=t.metas.map(function(e){return e.phx_ref});n.metas=n.metas.filter(function(e){return i.indexOf(e.phx_ref)<0}),r(e,n,t),0===n.metas.length&&delete a[e]}}),a},list:function(e,t){return t||(t=function(e,t){return t}),this.map(e,function(e,n){return t(e,n)})},map:function(e,t){return Object.getOwnPropertyNames(e).map(function(n){return t(n,e[n])})},clone:function(e){return JSON.parse(JSON.stringify(e))}},function(){function e(t,i){n(this,e),this.callback=t,this.timerCalc=i,this.timer=null,this.tries=0}return o(e,[{key:"reset",value:function(){this.tries=0,clearTimeout(this.timer)}},{key:"scheduleTimeout",value:function(){var e=this;clearTimeout(this.timer),this.timer=setTimeout(function(){e.tries=e.tries+1,e.callback()},this.timerCalc(this.tries+1))}}]),e}())})}()}),require.register("prismjs/components/prism-elixir.js",function(e,t,i){t=n(t,{},"prismjs"),function(){Prism.languages.elixir={comment:{pattern:/(^|[^#])#(?![{#]).*/m,lookbehind:!0},regex:/~[rR](?:("""|'''|[\/|"'])(?:\\.|(?!\1)[^\\])+\1|\((?:\\\)|[^)])+\)|\[(?:\\\]|[^\]])+\]|\{(?:\\\}|[^}])+\}|<(?:\\>|[^>])+>)[uismxfr]*/,string:[{pattern:/~[cCsSwW](?:("""|'''|[\/|"'])(?:\\.|(?!\1)[^\\])+\1|\((?:\\\)|[^)])+\)|\[(?:\\\]|[^\]])+\]|\{(?:\\\}|#\{[^}]+\}|[^}])+\}|<(?:\\>|[^>])+>)[csa]?/,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,inside:{}},{pattern:/("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},"attr-name":/\w+:(?!:)/,capture:{pattern:/(^|[^&])&(?:[^&\s\d()][^\s()]*|(?=\())/,lookbehind:!0,alias:"function"},argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@[\S]+/,alias:"variable"},number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|require|rescue|try|unless|use|when)\b/,"boolean":/\b(?:true|false|nil)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},Prism.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:Prism.util.clone(Prism.languages.elixir)}}}})}()}),require.register("prismjs/components/prism-sql.js",function(e,t,i){t=n(t,{},"prismjs"),function(){Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},string:{pattern:/(^|[^@\\])("|')(?:\\?[\s\S])*?\2/,lookbehind:!0},variable:/@[\w.$]+|@("|'|`)(?:\\?[\s\S])+?\1/,"function":/\b(?:COUNT|SUM|AVG|MIN|MAX|FIRST|LAST|UCASE|LCASE|MID|LEN|ROUND|NOW|FORMAT)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR VARYING|CHARACTER (?:SET|VARYING)|CHARSET|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|DATA(?:BASES?)?|DATE(?:TIME)?|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITER(?:S)?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE(?: PRECISION)?|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE KEY|ELSE|ENABLE|ENCLOSED BY|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPE(?:D BY)?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTO|INVOKER|ISOLATION LEVEL|JOIN|KEYS?|KILL|LANGUAGE SQL|LAST|LEFT|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MODIFIES SQL DATA|MODIFY|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL(?: CHAR VARYING| CHARACTER(?: VARYING)?| VARCHAR)?|NATURAL|NCHAR(?: VARCHAR)?|NEXT|NO(?: SQL|CHECK|CYCLE)?|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READ(?:S SQL DATA|TEXT)?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEATABLE|REPLICATION|REQUIRE|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE MODE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|START(?:ING BY)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED BY|TEXT(?:SIZE)?|THEN|TIMESTAMP|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNPIVOT|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?)\b/i,"boolean":/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b-?(?:0x)?\d*\.?[\da-f]+\b/,operator:/[-+*\/=%^~]|&&?|\|?\||!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}()}),require.register("prismjs/plugins/line-highlight/prism-line-highlight.js",function(e,t,i){t=n(t,{},"prismjs"),function(){!function(){function e(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function t(e,t){return t=" "+t+" ",(" "+e.className+" ").replace(/[\n\t]/g," ").indexOf(t)>-1}function n(e,n,i){for(var o,s=n.replace(/\s+/g,"").split(","),a=+e.getAttribute("data-line-offset")||0,l=r()?parseInt:parseFloat,u=l(getComputedStyle(e).lineHeight),c=0;o=s[c++];){o=o.split("-");var h=+o[0],f=+o[1]||h,p=document.createElement("div");p.textContent=Array(f-h+2).join(" \n"),p.setAttribute("aria-hidden","true"),p.className=(i||"")+" line-highlight",t(e,"line-numbers")||(p.setAttribute("data-start",h),f>h&&p.setAttribute("data-end",f)),p.style.top=(h-a-1)*u+"px",t(e,"line-numbers")?e.appendChild(p):(e.querySelector("code")||e).appendChild(p)}}function i(){var t=location.hash.slice(1);e(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var i=(t.match(/\.([\d,-]+)$/)||[,""])[1];if(i&&!document.getElementById(t)){var r=t.slice(0,t.lastIndexOf(".")),o=document.getElementById(r);o&&(o.hasAttribute("data-line")||o.setAttribute("data-line",""),n(o,i,"temporary "),document.querySelector(".temporary.line-highlight").scrollIntoView())}}if("undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector){var r=function(){var e;return function(){if("undefined"==typeof e){var t=document.createElement("div");t.style.fontSize="13px",t.style.lineHeight="1.5",t.style.padding=0,t.style.border=0,t.innerHTML=" <br /> ",document.body.appendChild(t),e=38===t.offsetHeight,document.body.removeChild(t)}return e}}(),o=0;Prism.hooks.add("complete",function(t){var r=t.element.parentNode,s=r&&r.getAttribute("data-line");r&&s&&/pre/i.test(r.nodeName)&&(clearTimeout(o),e(".line-highlight",r).forEach(function(e){e.parentNode.removeChild(e)}),n(r,s),o=setTimeout(i,1))}),window.addEventListener&&window.addEventListener("hashchange",i)}}()}()}),require.register("prismjs/plugins/line-numbers/prism-line-numbers.js",function(e,t,i){t=n(t,{},"prismjs"),function(){!function(){"undefined"!=typeof self&&self.Prism&&self.document&&Prism.hooks.add("complete",function(e){if(e.code){var t=e.element.parentNode,n=/\s*\bline-numbers\b\s*/;if(t&&/pre/i.test(t.nodeName)&&(n.test(t.className)||n.test(e.element.className))&&!e.element.querySelector(".line-numbers-rows")){n.test(e.element.className)&&(e.element.className=e.element.className.replace(n,"")),n.test(t.className)||(t.className+=" line-numbers");var i,r=e.code.match(/\n(?!$)/g),o=r?r.length+1:1,s=new Array(o+1);s=s.join("<span></span>"),i=document.createElement("span"),i.setAttribute("aria-hidden","true"),i.className="line-numbers-rows",i.innerHTML=s,t.hasAttribute("data-start")&&(t.style.counterReset="linenumber "+(parseInt(t.getAttribute("data-start"),10)-1)),e.element.appendChild(i)}}})}()}()}),require.register("prismjs/plugins/normalize-whitespace/prism-normalize-whitespace.js",function(e,t,i){t=n(t,{},"prismjs"),function(){!function(){function e(e){this.defaults=i({},e)}function t(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function n(e){for(var t=0,n=0;n<e.length;++n)e.charCodeAt(n)=="\t".charCodeAt(0)&&(t+=3);return e.length+t}if("undefined"!=typeof self&&self.Prism&&self.document){var i=Object.assign||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e};e.prototype={setDefaults:function(e){this.defaults=i(this.defaults,e)},normalize:function(e,n){n=i(this.defaults,n);for(var r in n){var o=t(r);"normalize"!==r&&"setDefaults"!==o&&n[r]&&this[o]&&(e=this[o].call(this,e,n[r]))}return e},leftTrim:function(e){return e.replace(/^\s+/,"")},rightTrim:function(e){return e.replace(/\s+$/,"")},tabsToSpaces:function(e,t){return t=0|t||4,e.replace(/\t/g,new Array((++t)).join(" "))},spacesToTabs:function(e,t){return t=0|t||4,e.replace(new RegExp(" {"+t+"}","g"),"\t")},removeTrailing:function(e){return e.replace(/\s*?$/gm,"")},removeInitialLineFeed:function(e){return e.replace(/^(?:\r?\n|\r)/,"")},removeIndent:function(e){var t=e.match(/^[^\S\n\r]*(?=\S)/gm);return t&&t[0].length?(t.sort(function(e,t){return e.length-t.length}),t[0].length?e.replace(new RegExp("^"+t[0],"gm"),""):e):e},indent:function(e,t){return e.replace(/^[^\S\n\r]*(?=\S)/gm,new Array((++t)).join("\t")+"$&")},breakLines:function(e,t){t=t===!0?80:0|t||80;for(var i=e.split("\n"),r=0;r<i.length;++r)if(!(n(i[r])<=t)){for(var o=i[r].split(/(\s+)/g),s=0,a=0;a<o.length;++a){var l=n(o[a]);s+=l,s>t&&(o[a]="\n"+o[a],s=l)}i[r]=o.join("")}return i.join("\n")}},Prism.plugins.NormalizeWhitespace=new e({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(e){var t=e.element.parentNode,n=/\bno-whitespace-normalization\b/;if(!(!e.code||!t||"pre"!==t.nodeName.toLowerCase()||e.settings&&e.settings["whitespace-normalization"]===!1||n.test(t.className)||n.test(e.element.className))){for(var i=t.childNodes,r="",o="",s=!1,a=Prism.plugins.NormalizeWhitespace,l=0;l<i.length;++l){var u=i[l];u==e.element?s=!0:"#text"===u.nodeName&&(s?o+=u.nodeValue:r+=u.nodeValue,t.removeChild(u),--l)}if(e.element.children.length&&Prism.plugins.KeepMarkup){var c=r+e.element.innerHTML+o;e.element.innerHTML=a.normalize(c,e.settings),e.code=e.element.textContent}else e.code=r+e.code+o,e.code=a.normalize(e.code,e.settings)}})}}()}()}),require.register("prismjs/prism.js",function(e,i,r){i=n(i,{},"prismjs"),function(){var e="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},n=function(){var t=/\blang(?:uage)?-(\w+)\b/i,n=0,i=e.Prism={util:{encode:function(e){return e instanceof r?new r(e.type,i.util.encode(e.content),e.alias):"Array"===i.util.type(e)?e.map(i.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function(e){var t=i.util.type(e);switch(t){case"Object":var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=i.util.clone(e[r]));return n;case"Array":return e.map&&e.map(function(e){return i.util.clone(e)})}return e}},languages:{extend:function(e,t){var n=i.util.clone(i.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r=r||i.languages;var o=r[e];if(2==arguments.length){n=arguments[1];for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s]);return o}var a={};for(var l in o)if(o.hasOwnProperty(l)){if(l==t)for(var s in n)n.hasOwnProperty(s)&&(a[s]=n[s]);a[l]=o[l]}return i.languages.DFS(i.languages,function(t,n){n===r[e]&&t!=e&&(this[t]=a)}),r[e]=a},DFS:function(e,t,n,r){r=r||{};for(var o in e)e.hasOwnProperty(o)&&(t.call(e,o,e[o],n||o),"Object"!==i.util.type(e[o])||r[i.util.objId(e[o])]?"Array"!==i.util.type(e[o])||r[i.util.objId(e[o])]||(r[i.util.objId(e[o])]=!0,i.languages.DFS(e[o],t,o,r)):(r[i.util.objId(e[o])]=!0,i.languages.DFS(e[o],t,null,r)))}},plugins:{},highlightAll:function(e,t){var n={callback:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",n);for(var r,o=n.elements||document.querySelectorAll(n.selector),s=0;r=o[s++];)i.highlightElement(r,e===!0,n.callback)},highlightElement:function(n,r,o){for(var s,a,l=n;l&&!t.test(l.className);)l=l.parentNode;l&&(s=(l.className.match(t)||[,""])[1].toLowerCase(),a=i.languages[s]),n.className=n.className.replace(t,"").replace(/\s+/g," ")+" language-"+s,l=n.parentNode,/pre/i.test(l.nodeName)&&(l.className=l.className.replace(t,"").replace(/\s+/g," ")+" language-"+s);var u=n.textContent,c={element:n,language:s,grammar:a,code:u};if(i.hooks.run("before-sanity-check",c),!c.code||!c.grammar)return c.code&&(c.element.textContent=c.code),void i.hooks.run("complete",c);if(i.hooks.run("before-highlight",c),r&&e.Worker){var h=new Worker(i.filename);h.onmessage=function(e){c.highlightedCode=e.data,i.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,o&&o.call(c.element),i.hooks.run("after-highlight",c),i.hooks.run("complete",c)},h.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else c.highlightedCode=i.highlight(c.code,c.grammar,c.language),i.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,o&&o.call(n),i.hooks.run("after-highlight",c),i.hooks.run("complete",c)},highlight:function(e,t,n){var o=i.tokenize(e,t);return r.stringify(i.util.encode(o),n)},tokenize:function(e,t,n){var r=i.Token,o=[e],s=t.rest;if(s){for(var a in s)t[a]=s[a];delete t.rest}e:for(var a in t)if(t.hasOwnProperty(a)&&t[a]){var l=t[a];l="Array"===i.util.type(l)?l:[l];for(var u=0;u<l.length;++u){var c=l[u],h=c.inside,f=!!c.lookbehind,p=!!c.greedy,d=0,m=c.alias;if(p&&!c.pattern.global){var g=c.pattern.toString().match(/[imuy]*$/)[0];c.pattern=RegExp(c.pattern.source,g+"g")}c=c.pattern||c;for(var y=0,v=0;y<o.length;v+=o[y].length,++y){var b=o[y];if(o.length>e.length)break e;if(!(b instanceof r)){c.lastIndex=0;var _=c.exec(b),w=1;if(!_&&p&&y!=o.length-1){if(c.lastIndex=v,_=c.exec(e),!_)break;for(var C=_.index+(f?_[1].length:0),E=_.index+_[0].length,x=y,S=v,T=o.length;x<T&&S<E;++x)S+=o[x].length,C>=S&&(++y,v=S);if(o[y]instanceof r||o[x-1].greedy)continue;w=x-y,b=e.slice(v,S),_.index-=v}if(_){f&&(d=_[1].length);var C=_.index+d,_=_[0].slice(d),E=C+_.length,k=b.slice(0,C),A=b.slice(E),R=[y,w];k&&R.push(k);var L=new r(a,h?i.tokenize(_,h):_,m,_,p);R.push(L),A&&R.push(A),Array.prototype.splice.apply(o,R)}}}}}return o},hooks:{all:{},add:function(e,t){var n=i.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=i.hooks.all[e];if(n&&n.length)for(var r,o=0;r=n[o++];)r(t)}}},r=i.Token=function(e,t,n,i,r){this.type=e,this.content=t,this.alias=n,this.length=0|(i||"").length,this.greedy=!!r};if(r.stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===i.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var o={type:e.type,content:r.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if("comment"==o.type&&(o.attributes.spellcheck="true"),e.alias){var s="Array"===i.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(o.classes,s)}i.hooks.run("wrap",o);var a=Object.keys(o.attributes).map(function(e){return e+'="'+(o.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+(a?" "+a:"")+">"+o.content+"</"+o.tag+">"},!e.document)return e.addEventListener?(e.addEventListener("message",function(t){var n=JSON.parse(t.data),r=n.language,o=n.code,s=n.immediateClose;e.postMessage(i.highlight(o,i.languages[r],r)),s&&e.close()},!1),e.Prism):e.Prism;var o=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return o&&(i.filename=o.src,document.addEventListener&&!o.hasAttribute("data-manual")&&("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(i.highlightAll):window.setTimeout(i.highlightAll,16):document.addEventListener("DOMContentLoaded",i.highlightAll))),e.Prism}();"undefined"!=typeof r&&r.exports&&(r.exports=n),"undefined"!=typeof t&&(t.Prism=n),n.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/i,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},n.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),n.languages.xml=n.languages.markup,n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:{pattern:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},n.languages.css.atrule.inside.rest=n.util.clone(n.languages.css),n.languages.markup&&(n.languages.insertBefore("markup","tag",{style:{pattern:/(<style[\w\W]*?>)[\w\W]*?(?=<\/style>)/i,lookbehind:!0,inside:n.languages.css,alias:"language-css"}}),n.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:n.languages.css}},alias:"language-css"}},n.languages.markup.tag)),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*\*?|\/|~|\^|%|\.{3}/}),n.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}}),n.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\\\|\\?[^\\])*?`/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}}}),n.languages.markup&&n.languages.insertBefore("markup","tag",{script:{pattern:/(<script[\w\W]*?>)[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:n.languages.javascript,alias:"language-javascript"}}),n.languages.js=n.languages.javascript,function(){"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(){var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.forEach&&Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(t){for(var i,r=t.getAttribute("data-src"),o=t,s=/\blang(?:uage)?-(?!\*)(\w+)\b/i;o&&!s.test(o.className);)o=o.parentNode;if(o&&(i=(t.className.match(s)||[,""])[1]),!i){var a=(r.match(/\.(\w+)$/)||[,""])[1];i=e[a]||a}var l=document.createElement("code");l.className="language-"+i,t.textContent="",l.textContent="Loading…",t.appendChild(l);var u=new XMLHttpRequest;u.open("GET",r,!0),u.onreadystatechange=function(){4==u.readyState&&(u.status<400&&u.responseText?(l.textContent=u.responseText,n.highlightElement(l)):u.status>=400?l.textContent="✖ Error "+u.status+" while fetching file: "+u.statusText:l.textContent="✖ Error: File does not exist or is empty")},u.send(null)})},document.addEventListener("DOMContentLoaded",self.Prism.fileHighlight))}()}()}),require.register("process/browser.js",function(e,t,i){t=n(t,{},"process"),function(){function e(){throw new Error("setTimeout has not been defined")}function t(){throw new Error("clearTimeout has not been defined")}function n(t){if(u===setTimeout)return setTimeout(t,0);if((u===e||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(n){try{return u.call(null,t,0)}catch(n){return u.call(this,t,0)}}}function r(e){if(c===clearTimeout)return clearTimeout(e);if((c===t||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(e);try{return c(e)}catch(n){try{return c.call(null,e)}catch(n){return c.call(this,e)}}}function o(){d&&f&&(d=!1,f.length?p=f.concat(p):m=-1,p.length&&s())}function s(){if(!d){var e=n(o);d=!0;for(var t=p.length;t;){for(f=p,p=[];++m<t;)f&&f[m].run();m=-1,t=p.length}f=null,d=!1,r(e)}}function a(e,t){this.fun=e,this.array=t}function l(){}var u,c,h=i.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:e}catch(n){u=e}try{c="function"==typeof clearTimeout?clearTimeout:t}catch(n){c=t}}();var f,p=[],d=!1,m=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];p.push(new a(e,t)),1!==p.length||d||n(s)},a.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=l,h.addListener=l,h.once=l,h.off=l,h.removeListener=l,h.removeAllListeners=l,h.emit=l,h.prependListener=l,h.prependOnceListener=l,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}}()}),require.register("xterm/lib/Buffer.js",function(e,t,i){t=n(t,{},"xterm");var r=t("buffer");r&&r.Buffer;!function(){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=t("./utils/CircularList"),i=function(){function e(e){this._terminal=e,this.clear()}return Object.defineProperty(e.prototype,"lines",{get:function(){return this._lines},enumerable:!0,configurable:!0}),e.prototype.fillViewportRows=function(){if(0===this._lines.length)for(var e=this._terminal.rows;e--;)this.lines.push(this._terminal.blankLine())},e.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.scrollBottom=0,this.scrollTop=0,this.tabs={},this._lines=new n.CircularList(this._terminal.scrollback),this.scrollBottom=this._terminal.rows-1},e.prototype.resize=function(e,t){if(0!==this._lines.length){if(this._terminal.cols<e)for(var n=[this._terminal.defAttr," ",1],i=0;i<this._lines.length;i++)for(void 0===this._lines.get(i)&&this._lines.set(i,this._terminal.blankLine());this._lines.get(i).length<e;)this._lines.get(i).push(n);var r=0;if(this._terminal.rows<t)for(var o=this._terminal.rows;o<t;o++)this._lines.length<t+this.ybase&&(this.ybase>0&&this._lines.length<=this.ybase+this.y+r+1?(this.ybase--,r++,this.ydisp>0&&this.ydisp--):this._lines.push(this._terminal.blankLine()));else for(var o=this._terminal.rows;o>t;o--)this._lines.length>t+this.ybase&&(this._lines.length>this.ybase+this.y+1?this._lines.pop():(this.ybase++,this.ydisp++));this.y>=t&&(this.y=t-1),r&&(this.y+=r),this.x>=e&&(this.x=e-1),this.scrollTop=0,this.scrollBottom=t-1}},e}();e.Buffer=i}()}),require.register("xterm/lib/BufferSet.js",function(e,t,i){t=n(t,{},"xterm");var r=t("buffer");r&&r.Buffer;!function(){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=t("./Buffer"),r=t("./EventEmitter"),o=function(e){function t(t){var n=e.call(this)||this;return n._terminal=t,n._normal=new i.Buffer(n._terminal),n._normal.fillViewportRows(),n._alt=new i.Buffer(n._terminal),n._activeBuffer=n._normal,n}return n(t,e),Object.defineProperty(t.prototype,"alt",{get:function(){return this._alt},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"normal",{get:function(){return this._normal},enumerable:!0,configurable:!0}),t.prototype.activateNormalBuffer=function(){this._alt.clear(),this._activeBuffer=this._normal,this.emit("activate",this._normal)},t.prototype.activateAltBuffer=function(){this._alt.fillViewportRows(),this._activeBuffer=this._alt,this.emit("activate",this._alt)},t.prototype.resize=function(e,t){this._normal.resize(e,t),this._alt.resize(e,t)},t}(r.EventEmitter);e.BufferSet=o}()}),require.register("xterm/lib/Charsets.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CHARSETS={},e.DEFAULT_CHARSET=e.CHARSETS.B,e.CHARSETS[0]={"`":"◆",a:"▒",b:"\t",c:"\f",d:"\r",e:"\n",f:"°",g:"±",h:"",i:"\x0B",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},e.CHARSETS.A={"#":"£"},e.CHARSETS.B=null,e.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},e.CHARSETS.C=e.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},e.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},e.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},e.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},e.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},e.CHARSETS.E=e.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},e.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},e.CHARSETS.H=e.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},e.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}}()}),require.register("xterm/lib/CompositionHelper.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t,n){this.textarea=e,this.compositionView=t,this.terminal=n,this.isComposing=!1,this.isSendingComposition=!1,this.compositionPosition={start:null,end:null}}return e.prototype.compositionstart=function(){this.isComposing=!0,this.compositionPosition.start=this.textarea.value.length,this.compositionView.textContent="",this.compositionView.classList.add("active")},e.prototype.compositionupdate=function(e){var t=this;this.compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(function(){t.compositionPosition.end=t.textarea.value.length},0)},e.prototype.compositionend=function(){this.finalizeComposition(!0)},e.prototype.keydown=function(e){if(this.isComposing||this.isSendingComposition){if(229===e.keyCode)return!1;if(16===e.keyCode||17===e.keyCode||18===e.keyCode)return!1;this.finalizeComposition(!1)}return 229!==e.keyCode||(this.handleAnyTextareaChanges(),!1)},e.prototype.finalizeComposition=function(e){var t=this;if(this.compositionView.classList.remove("active"),this.isComposing=!1,this.clearTextareaPosition(),e){var n={start:this.compositionPosition.start,end:this.compositionPosition.end};this.isSendingComposition=!0,setTimeout(function(){if(t.isSendingComposition){t.isSendingComposition=!1;var e=void 0;e=t.isComposing?t.textarea.value.substring(n.start,n.end):t.textarea.value.substring(n.start),t.terminal.handler(e)}},0)}else{this.isSendingComposition=!1;var i=this.textarea.value.substring(this.compositionPosition.start,this.compositionPosition.end);this.terminal.handler(i)}},e.prototype.handleAnyTextareaChanges=function(){var e=this,t=this.textarea.value;setTimeout(function(){if(!e.isComposing){var n=e.textarea.value,i=n.replace(t,"");i.length>0&&e.terminal.handler(i)}},0)},e.prototype.updateCompositionElements=function(e){var t=this;if(this.isComposing){var n=this.terminal.element.querySelector(".terminal-cursor");if(n){var i=this.terminal.element.querySelector(".xterm-rows"),r=i.offsetTop+n.offsetTop;this.compositionView.style.left=n.offsetLeft+"px",this.compositionView.style.top=r+"px",this.compositionView.style.height=n.offsetHeight+"px",this.compositionView.style.lineHeight=n.offsetHeight+"px";var o=this.compositionView.getBoundingClientRect();this.textarea.style.left=n.offsetLeft+"px",this.textarea.style.top=r+"px",this.textarea.style.width=o.width+"px",this.textarea.style.height=o.height+"px",this.textarea.style.lineHeight=o.height+"px"}e||setTimeout(function(){return t.updateCompositionElements(!0)},0)}},e.prototype.clearTextareaPosition=function(){this.textarea.style.left="",this.textarea.style.top=""},e}();e.CompositionHelper=t}()}),require.register("xterm/lib/EscapeSequences.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t;!function(e){e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="",e.BS="\b",e.HT="\t",e.LF="\n",e.VT="\x0B",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL=""}(t=e.C0||(e.C0={}))}()}),require.register("xterm/lib/EventEmitter.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(){this._events=this._events||{}}return e.prototype.on=function(e,t){this._events[e]=this._events[e]||[],this._events[e].push(t)},e.prototype.off=function(e,t){if(this._events[e])for(var n=this._events[e],i=n.length;i--;)if(n[i]===t||n[i].listener===t)return void n.splice(i,1)},e.prototype.removeAllListeners=function(e){this._events[e]&&delete this._events[e]},e.prototype.once=function(e,t){function n(){var i=Array.prototype.slice.call(arguments);return this.off(e,n),t.apply(this,i)}return n.listener=t,this.on(e,n)},e.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(this._events[e])for(var i=this._events[e],r=0;r<i.length;r++)i[r].apply(this,t)},e.prototype.listeners=function(e){return this._events[e]||[]},e}();e.EventEmitter=t}()}),require.register("xterm/lib/InputHandler.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=t("./EscapeSequences"),i=t("./Charsets"),r=function(){function t(e){this._terminal=e}return t.prototype.addChar=function(t,n){if(t>=" "){var i=e.wcwidth(n);this._terminal.charset&&this._terminal.charset[t]&&(t=this._terminal.charset[t]);var r=this._terminal.buffer.y+this._terminal.buffer.ybase;if(!i&&this._terminal.buffer.x)return void(this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-1]&&(this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-1][2]?this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-1][1]+=t:this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-2]&&(this._terminal.buffer.lines.get(r)[this._terminal.buffer.x-2][1]+=t),this._terminal.updateRange(this._terminal.buffer.y)));if(this._terminal.buffer.x+i-1>=this._terminal.cols)if(this._terminal.wraparoundMode)this._terminal.buffer.x=0,this._terminal.buffer.y++,this._terminal.buffer.y>this._terminal.buffer.scrollBottom?(this._terminal.buffer.y--,this._terminal.scroll(!0)):this._terminal.buffer.lines.get(this._terminal.buffer.y).isWrapped=!0;else if(2===i)return;if(r=this._terminal.buffer.y+this._terminal.buffer.ybase,this._terminal.insertMode)for(var o=0;o<i;++o){var s=this._terminal.buffer.lines.get(this._terminal.buffer.y+this._terminal.buffer.ybase).pop();0===s[2]&&this._terminal.buffer.lines.get(r)[this._terminal.cols-2]&&2===this._terminal.buffer.lines.get(r)[this._terminal.cols-2][2]&&(this._terminal.buffer.lines.get(r)[this._terminal.cols-2]=[this._terminal.curAttr," ",1]),this._terminal.buffer.lines.get(r).splice(this._terminal.buffer.x,0,[this._terminal.curAttr," ",1])}this._terminal.buffer.lines.get(r)[this._terminal.buffer.x]=[this._terminal.curAttr,t,i],this._terminal.buffer.x++,this._terminal.updateRange(this._terminal.buffer.y),2===i&&(this._terminal.buffer.lines.get(r)[this._terminal.buffer.x]=[this._terminal.curAttr,"",0],this._terminal.buffer.x++)}},t.prototype.bell=function(){var e=this;this._terminal.visualBell&&(this._terminal.element.style.borderColor="white",setTimeout(function(){return e._terminal.element.style.borderColor=""},10),this._terminal.popOnBell&&this._terminal.focus())},t.prototype.lineFeed=function(){this._terminal.convertEol&&(this._terminal.buffer.x=0),this._terminal.buffer.y++,this._terminal.buffer.y>this._terminal.buffer.scrollBottom&&(this._terminal.buffer.y--,this._terminal.scroll()),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--,this._terminal.emit("lineFeed")},t.prototype.carriageReturn=function(){this._terminal.buffer.x=0},t.prototype.backspace=function(){this._terminal.buffer.x>0&&this._terminal.buffer.x--},t.prototype.tab=function(){this._terminal.buffer.x=this._terminal.nextStop()},t.prototype.shiftOut=function(){this._terminal.setgLevel(1)},t.prototype.shiftIn=function(){this._terminal.setgLevel(0)},t.prototype.insertChars=function(e){var t,n,i,r;for(t=e[0],t<1&&(t=1),n=this._terminal.buffer.y+this._terminal.buffer.ybase,i=this._terminal.buffer.x,r=[this._terminal.eraseAttr()," ",1];t--&&i<this._terminal.cols;)this._terminal.buffer.lines.get(n).splice(i++,0,r),this._terminal.buffer.lines.get(n).pop()},t.prototype.cursorUp=function(e){var t=e[0];t<1&&(t=1),this._terminal.buffer.y-=t,this._terminal.buffer.y<0&&(this._terminal.buffer.y=0)},t.prototype.cursorDown=function(e){var t=e[0];t<1&&(t=1),this._terminal.buffer.y+=t,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--},t.prototype.cursorForward=function(e){var t=e[0];t<1&&(t=1),this._terminal.buffer.x+=t,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.cursorBackward=function(e){var t=e[0];t<1&&(t=1),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--,this._terminal.buffer.x-=t,this._terminal.buffer.x<0&&(this._terminal.buffer.x=0)},t.prototype.cursorNextLine=function(e){var t=e[0];t<1&&(t=1),this._terminal.buffer.y+=t,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x=0},t.prototype.cursorPrecedingLine=function(e){var t=e[0];t<1&&(t=1),this._terminal.buffer.y-=t,this._terminal.buffer.y<0&&(this._terminal.buffer.y=0),this._terminal.buffer.x=0},t.prototype.cursorCharAbsolute=function(e){var t=e[0];t<1&&(t=1),this._terminal.buffer.x=t-1},t.prototype.cursorPosition=function(e){var t,n;t=e[0]-1,n=e.length>=2?e[1]-1:0,t<0?t=0:t>=this._terminal.rows&&(t=this._terminal.rows-1),n<0?n=0:n>=this._terminal.cols&&(n=this._terminal.cols-1),this._terminal.buffer.x=n,this._terminal.buffer.y=t},t.prototype.cursorForwardTab=function(e){for(var t=e[0]||1;t--;)this._terminal.buffer.x=this._terminal.nextStop()},t.prototype.eraseInDisplay=function(e){var t;switch(e[0]){case 0:for(this._terminal.eraseRight(this._terminal.buffer.x,this._terminal.buffer.y),t=this._terminal.buffer.y+1;t<this._terminal.rows;t++)this._terminal.eraseLine(t);break;case 1:for(this._terminal.eraseLeft(this._terminal.buffer.x,this._terminal.buffer.y),t=this._terminal.buffer.y;t--;)this._terminal.eraseLine(t);break;case 2:for(t=this._terminal.rows;t--;)this._terminal.eraseLine(t);break;case 3:var n=this._terminal.buffer.lines.length-this._terminal.rows;n>0&&(this._terminal.buffer.lines.trimStart(n),this._terminal.buffer.ybase=Math.max(this._terminal.buffer.ybase-n,0),this._terminal.buffer.ydisp=Math.max(this._terminal.buffer.ydisp-n,0),this._terminal.emit("scroll",0))}},t.prototype.eraseInLine=function(e){switch(e[0]){case 0:this._terminal.eraseRight(this._terminal.buffer.x,this._terminal.buffer.y);break;case 1:this._terminal.eraseLeft(this._terminal.buffer.x,this._terminal.buffer.y);break;case 2:this._terminal.eraseLine(this._terminal.buffer.y)}},t.prototype.insertLines=function(e){var t,n,i;for(t=e[0],t<1&&(t=1),n=this._terminal.buffer.y+this._terminal.buffer.ybase,i=this._terminal.rows-1-this._terminal.buffer.scrollBottom,i=this._terminal.rows-1+this._terminal.buffer.ybase-i+1;t--;)this._terminal.buffer.lines.length===this._terminal.buffer.lines.maxLength&&(this._terminal.buffer.lines.trimStart(1),this._terminal.buffer.ybase--,this._terminal.buffer.ydisp--,n--,i--),this._terminal.buffer.lines.splice(n,0,this._terminal.blankLine(!0)),this._terminal.buffer.lines.splice(i,1);this._terminal.updateRange(this._terminal.buffer.y),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.deleteLines=function(e){var t,n,i;for(t=e[0],t<1&&(t=1),n=this._terminal.buffer.y+this._terminal.buffer.ybase,i=this._terminal.rows-1-this._terminal.buffer.scrollBottom,i=this._terminal.rows-1+this._terminal.buffer.ybase-i;t--;)this._terminal.buffer.lines.length===this._terminal.buffer.lines.maxLength&&(this._terminal.buffer.lines.trimStart(1),this._terminal.buffer.ybase-=1,this._terminal.buffer.ydisp-=1),this._terminal.buffer.lines.splice(i+1,0,this._terminal.blankLine(!0)),this._terminal.buffer.lines.splice(n,1);this._terminal.updateRange(this._terminal.buffer.y),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.deleteChars=function(e){var t,n,i;for(t=e[0],t<1&&(t=1),n=this._terminal.buffer.y+this._terminal.buffer.ybase,i=[this._terminal.eraseAttr()," ",1];t--;)this._terminal.buffer.lines.get(n).splice(this._terminal.buffer.x,1),this._terminal.buffer.lines.get(n).push(i)},t.prototype.scrollUp=function(e){for(var t=e[0]||1;t--;)this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollTop,1),this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollBottom,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.buffer.scrollTop),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.scrollDown=function(e){for(var t=e[0]||1;t--;)this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollBottom,1),this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollTop,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.buffer.scrollTop),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.eraseChars=function(e){var t,n,i,r;for(t=e[0],t<1&&(t=1),n=this._terminal.buffer.y+this._terminal.buffer.ybase,i=this._terminal.buffer.x,r=[this._terminal.eraseAttr()," ",1];t--&&i<this._terminal.cols;)this._terminal.buffer.lines.get(n)[i++]=r},t.prototype.cursorBackwardTab=function(e){for(var t=e[0]||1;t--;)this._terminal.buffer.x=this._terminal.prevStop()},t.prototype.charPosAbsolute=function(e){var t=e[0];t<1&&(t=1),this._terminal.buffer.x=t-1,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.HPositionRelative=function(e){var t=e[0];t<1&&(t=1),this._terminal.buffer.x+=t,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.repeatPrecedingCharacter=function(e){for(var t=e[0]||1,n=this._terminal.buffer.lines.get(this._terminal.buffer.ybase+this._terminal.buffer.y),i=n[this._terminal.buffer.x-1]||[this._terminal.defAttr," ",1];t--;)n[this._terminal.buffer.x++]=i},t.prototype.sendDeviceAttributes=function(e){e[0]>0||(this._terminal.prefix?">"===this._terminal.prefix&&(this._terminal.is("xterm")?this._terminal.send(n.C0.ESC+"[>0;276;0c"):this._terminal.is("rxvt-unicode")?this._terminal.send(n.C0.ESC+"[>85;95;0c"):this._terminal.is("linux")?this._terminal.send(e[0]+"c"):this._terminal.is("screen")&&this._terminal.send(n.C0.ESC+"[>83;40003;0c")):this._terminal.is("xterm")||this._terminal.is("rxvt-unicode")||this._terminal.is("screen")?this._terminal.send(n.C0.ESC+"[?1;2c"):this._terminal.is("linux")&&this._terminal.send(n.C0.ESC+"[?6c"))},t.prototype.linePosAbsolute=function(e){var t=e[0];t<1&&(t=1),this._terminal.buffer.y=t-1,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1)},t.prototype.VPositionRelative=function(e){var t=e[0];t<1&&(t=1),this._terminal.buffer.y+=t,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--},t.prototype.HVPosition=function(e){e[0]<1&&(e[0]=1),e[1]<1&&(e[1]=1),this._terminal.buffer.y=e[0]-1,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x=e[1]-1,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.tabClear=function(e){var t=e[0];t<=0?delete this._terminal.buffer.tabs[this._terminal.buffer.x]:3===t&&(this._terminal.buffer.tabs={})},t.prototype.setMode=function(e){if(e.length>1)for(var t=0;t<e.length;t++)this.setMode([e[t]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(e[0]){case 1:this._terminal.applicationCursor=!0;break;case 2:this._terminal.setgCharset(0,i.DEFAULT_CHARSET),this._terminal.setgCharset(1,i.DEFAULT_CHARSET),this._terminal.setgCharset(2,i.DEFAULT_CHARSET),this._terminal.setgCharset(3,i.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===e[0],this._terminal.vt200Mouse=1e3===e[0],this._terminal.normalMouse=e[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:this._terminal.buffers.activateAltBuffer(),this._terminal.viewport.syncScrollArea(),this._terminal.showCursor()}}else switch(e[0]){case 4:this._terminal.insertMode=!0;break;case 20:}},t.prototype.resetMode=function(e){if(e.length>1)for(var t=0;t<e.length;t++)this.resetMode([e[t]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(e[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.buffers.activateNormalBuffer(),this._terminal.selectionManager.setBuffer(this._terminal.buffer.lines),this._terminal.refresh(0,this._terminal.rows-1),this._terminal.viewport.syncScrollArea(),this._terminal.showCursor()}}else switch(e[0]){case 4:this._terminal.insertMode=!1;break;case 20:}},t.prototype.charAttributes=function(e){if(1===e.length&&0===e[0])return void(this._terminal.curAttr=this._terminal.defAttr);for(var t,n=e.length,i=0,r=this._terminal.curAttr>>18,o=this._terminal.curAttr>>9&511,s=511&this._terminal.curAttr;i<n;i++)t=e[i],t>=30&&t<=37?o=t-30:t>=40&&t<=47?s=t-40:t>=90&&t<=97?(t+=8,o=t-90):t>=100&&t<=107?(t+=8,s=t-100):0===t?(r=this._terminal.defAttr>>18,o=this._terminal.defAttr>>9&511,s=511&this._terminal.defAttr):1===t?r|=1:4===t?r|=2:5===t?r|=4:7===t?r|=8:8===t?r|=16:22===t?r&=-2:24===t?r&=-3:25===t?r&=-5:27===t?r&=-9:28===t?r&=-17:39===t?o=this._terminal.defAttr>>9&511:49===t?s=511&this._terminal.defAttr:38===t?2===e[i+1]?(i+=2,o=this._terminal.matchColor(255&e[i],255&e[i+1],255&e[i+2]),o===-1&&(o=511),i+=2):5===e[i+1]&&(i+=2,t=255&e[i],o=t):48===t?2===e[i+1]?(i+=2,s=this._terminal.matchColor(255&e[i],255&e[i+1],255&e[i+2]),s===-1&&(s=511),i+=2):5===e[i+1]&&(i+=2,t=255&e[i],s=t):100===t?(o=this._terminal.defAttr>>9&511,s=511&this._terminal.defAttr):this._terminal.error("Unknown SGR attribute: %d.",t);this._terminal.curAttr=r<<18|o<<9|s},t.prototype.deviceStatus=function(e){if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(e[0]){case 6:this._terminal.send(n.C0.ESC+"[?"+(this._terminal.buffer.y+1)+";"+(this._terminal.buffer.x+1)+"R");break;case 15:break;case 25:break;case 26:break;case 53:}}else switch(e[0]){case 5:this._terminal.send(n.C0.ESC+"[0n");break;case 6:this._terminal.send(n.C0.ESC+"["+(this._terminal.buffer.y+1)+";"+(this._terminal.buffer.x+1)+"R")}},t.prototype.softReset=function(e){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.buffer.scrollTop=0,this._terminal.buffer.scrollBottom=this._terminal.rows-1,this._terminal.curAttr=this._terminal.defAttr,this._terminal.buffer.x=this._terminal.buffer.y=0,this._terminal.charset=null,this._terminal.glevel=0,this._terminal.charsets=[null]},t.prototype.setCursorStyle=function(e){var t=e[0]<1?1:e[0];switch(t){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 n=t%2===1;this._terminal.setOption("cursorBlink",n)},t.prototype.setScrollRegion=function(e){this._terminal.prefix||(this._terminal.buffer.scrollTop=(e[0]||1)-1,this._terminal.buffer.scrollBottom=(e[1]&&e[1]<=this._terminal.rows?e[1]:this._terminal.rows)-1,this._terminal.buffer.x=0,this._terminal.buffer.y=0)},t.prototype.saveCursor=function(e){this._terminal.buffer.savedX=this._terminal.buffer.x,this._terminal.buffer.savedY=this._terminal.buffer.y},t.prototype.restoreCursor=function(e){this._terminal.buffer.x=this._terminal.buffer.savedX||0,this._terminal.buffer.y=this._terminal.buffer.savedY||0},t}();e.InputHandler=r,e.wcwidth=function(e){function t(e,t){var n,i=0,r=t.length-1;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=i;)if(n=i+r>>1,e>t[n][1])i=n+1;else{if(!(e<t[n][0]))return!0;r=n-1}return!1}function n(n){return 0===n?e.nul:n<32||n>=127&&n<160?e.control:t(n,s)?0:i(n)?2:1}function i(e){return e>=4352&&(e<=4447||9001===e||9002===e||e>=11904&&e<=42191&&12351!==e||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510)}function r(e){return t(e,a)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}function o(){var e=65536,t=2,i=32,r=e*t/i,o=i/t;u="undefined"==typeof Uint32Array?new Array(r):new Uint32Array(r);for(var s=0;s<r;++s){for(var a=0,l=o;l--;)a=a<<2|n(o*s+l);u[s]=a}return u}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]],a=[[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]],l=0|e.control,u=null;return function(e){if(e=0|e,e<32)return 0|l;if(e<127)return 1;var t=u||o();return e<65536?t[e>>4]>>((15&e)<<1)&3:r(e)}}({nul:0,control:0})}()}),require.register("xterm/lib/Linkifier.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t="xterm-invalid-link",n="(https?:\\/\\/)",i="[\\da-z\\.-]+",r="[^\\da-z\\.-]+",o="("+i+")",s="([a-z\\.]{2,6})",a="((\\d{1,3}\\.){3}\\d{1,3})",l="(localhost)",u="(:\\d{1,5})",c="(("+o+"\\."+s+")|"+a+"|"+l+")"+u+"?",h="(\\/[\\/\\w\\.\\-%~]*)*",f="[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*",p="(\\?"+f+")?",d="(#"+f+")?",m="[^\\/\\w\\.\\-%]+",g=c+h+p+d,y="(?:^|"+r+")(",v=")($|"+m+")",b=new RegExp(y+n+g+v),_=0,w=function(){function e(){this._nextLinkMatcherId=_,this._rowTimeoutIds=[],this._linkMatchers=[],this.registerLinkMatcher(b,null,{matchIndex:1})}return e.prototype.attachToDom=function(e,t){this._document=e,this._rows=t},e.prototype.linkifyRow=function(t){if(this._document){var n=this._rowTimeoutIds[t];n&&clearTimeout(n),this._rowTimeoutIds[t]=setTimeout(this._linkifyRow.bind(this,t),e.TIME_BEFORE_LINKIFY)}},e.prototype.setHypertextLinkHandler=function(e){this._linkMatchers[_].handler=e},e.prototype.setHypertextValidationCallback=function(e){this._linkMatchers[_].validationCallback=e},e.prototype.registerLinkMatcher=function(e,t,n){if(void 0===n&&(n={}),this._nextLinkMatcherId!==_&&!t)throw new Error("handler must be defined");var i={id:this._nextLinkMatcherId++,regex:e,handler:t,matchIndex:n.matchIndex,validationCallback:n.validationCallback,priority:n.priority||0};return this._addLinkMatcherToList(i),i.id},e.prototype._addLinkMatcherToList=function(e){if(0===this._linkMatchers.length)return void this._linkMatchers.push(e);for(var t=this._linkMatchers.length-1;t>=0;t--)if(e.priority<=this._linkMatchers[t].priority)return void this._linkMatchers.splice(t+1,0,e);this._linkMatchers.splice(0,0,e)},e.prototype.deregisterLinkMatcher=function(e){for(var t=1;t<this._linkMatchers.length;t++)if(this._linkMatchers[t].id===e)return this._linkMatchers.splice(t,1),!0;return!1},e.prototype._linkifyRow=function(e){var n=this._rows[e];if(n)for(var i=(n.textContent,0);i<this._linkMatchers.length;i++){var r=this._linkMatchers[i],o=this._doLinkifyRow(n,r);if(o.length>0){if(r.validationCallback)for(var s=function(e){var n=o[e];r.validationCallback(n.textContent,n,function(e){e||n.classList.add(t)})},a=0;a<o.length;a++)s(a);return}}},e.prototype._doLinkifyRow=function(e,t){var n=[],i=t.id===_,r=e.childNodes,o=e.textContent.match(t.regex);if(!o||0===o.length)return n;for(var s=o["number"!=typeof t.matchIndex?0:t.matchIndex],a=o.index+s.length,l=0;l<r.length;l++){var u=r[l],c=u.textContent.indexOf(s);if(c>=0){var h=this._createAnchorElement(s,t.handler,i);if(u.textContent.length===s.length)if(3===u.nodeType)this._replaceNode(u,h);else{var f=u;if("A"===f.nodeName)return n;f.innerHTML="",f.appendChild(h)}else if(u.childNodes.length>1)for(var p=0;p<u.childNodes.length;p++){var d=u.childNodes[p],m=d.textContent.indexOf(s);if(m!==-1){this._replaceNodeSubstringWithNode(d,h,s,m);break}}else{var g=this._replaceNodeSubstringWithNode(u,h,s,c);l+=g}if(n.push(h),o=e.textContent.substring(a).match(t.regex),!o||0===o.length)return n;s=o["number"!=typeof t.matchIndex?0:t.matchIndex],a+=o.index+s.length}}return n},e.prototype._createAnchorElement=function(e,n,i){var r=this._document.createElement("a");return r.textContent=e,r.draggable=!1,i?(r.href=e,r.target="_blank",r.addEventListener("click",function(t){if(n)return n(t,e)})):r.addEventListener("click",function(i){if(!r.classList.contains(t))return n(i,e)}),r},e.prototype._replaceNode=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=e.parentNode,r=0;r<t.length;r++)i.insertBefore(t[r],e);i.removeChild(e)},e.prototype._replaceNodeSubstringWithNode=function(e,t,n,i){if(1===e.childNodes.length&&(e=e.childNodes[0]),3!==e.nodeType)throw new Error("targetNode must be a text node or only contain a single text node");var r=e.textContent;if(0===i){var o=r.substring(n.length),s=this._document.createTextNode(o);return this._replaceNode(e,t,s),0}if(i===e.textContent.length-n.length){var a=r.substring(0,i),l=this._document.createTextNode(a);return this._replaceNode(e,l,t),0}var u=r.substring(0,i),c=this._document.createTextNode(u),h=r.substring(i+n.length),f=this._document.createTextNode(h);return this._replaceNode(e,c,t,f),1},e}();w.TIME_BEFORE_LINKIFY=200,e.Linkifier=w}()}),require.register("xterm/lib/Parser.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=t("./EscapeSequences"),i=t("./Charsets"),r={};r[n.C0.BEL]=function(e,t){return t.bell()},r[n.C0.LF]=function(e,t){return t.lineFeed()},r[n.C0.VT]=r[n.C0.LF],r[n.C0.FF]=r[n.C0.LF],r[n.C0.CR]=function(e,t){return t.carriageReturn()},r[n.C0.BS]=function(e,t){return t.backspace()},r[n.C0.HT]=function(e,t){return t.tab()},r[n.C0.SO]=function(e,t){return t.shiftOut()},r[n.C0.SI]=function(e,t){return t.shiftIn()},r[n.C0.ESC]=function(e,t){return e.setState(l.ESCAPED)};var o={};o["["]=function(e,t){t.params=[],t.currentParam=0,e.setState(l.CSI_PARAM)},o["]"]=function(e,t){t.params=[],t.currentParam=0,e.setState(l.OSC)},o.P=function(e,t){t.params=[],t.currentParam=0,e.setState(l.DCS)},o._=function(e,t){e.setState(l.IGNORE)},o["^"]=function(e,t){e.setState(l.IGNORE)},o.c=function(e,t){t.reset()},o.E=function(e,t){t.buffer.x=0,t.index(),e.setState(l.NORMAL)},o.D=function(e,t){t.index(),e.setState(l.NORMAL)},o.M=function(e,t){t.reverseIndex(),e.setState(l.NORMAL)},o["%"]=function(e,t){t.setgLevel(0),t.setgCharset(0,i.DEFAULT_CHARSET),e.setState(l.NORMAL),e.skipNextChar()},o[n.C0.CAN]=function(e){return e.setState(l.NORMAL)};var s={};s["?"]=function(e){return e.setPrefix("?")},s[">"]=function(e){return e.setPrefix(">")},s["!"]=function(e){return e.setPrefix("!")},s[0]=function(e){return e.setParam(10*e.getParam())},s[1]=function(e){return e.setParam(10*e.getParam()+1)},s[2]=function(e){return e.setParam(10*e.getParam()+2)},s[3]=function(e){return e.setParam(10*e.getParam()+3)},s[4]=function(e){return e.setParam(10*e.getParam()+4)},s[5]=function(e){return e.setParam(10*e.getParam()+5)},s[6]=function(e){return e.setParam(10*e.getParam()+6)},s[7]=function(e){return e.setParam(10*e.getParam()+7)},s[8]=function(e){return e.setParam(10*e.getParam()+8)},s[9]=function(e){return e.setParam(10*e.getParam()+9)},s.$=function(e){return e.setPostfix("$")},s['"']=function(e){return e.setPostfix('"')},s[" "]=function(e){return e.setPostfix(" ")},s["'"]=function(e){return e.setPostfix("'")},s[";"]=function(e){return e.finalizeParam()},s[n.C0.CAN]=function(e){return e.setState(l.NORMAL)};var a={};a["@"]=function(e,t,n){return e.insertChars(t)},a.A=function(e,t,n){return e.cursorUp(t)},a.B=function(e,t,n){return e.cursorDown(t)},a.C=function(e,t,n){return e.cursorForward(t)},a.D=function(e,t,n){return e.cursorBackward(t)},a.E=function(e,t,n){return e.cursorNextLine(t)},a.F=function(e,t,n){return e.cursorPrecedingLine(t)},a.G=function(e,t,n){return e.cursorCharAbsolute(t)},a.H=function(e,t,n){return e.cursorPosition(t)},a.I=function(e,t,n){return e.cursorForwardTab(t)},a.J=function(e,t,n){return e.eraseInDisplay(t)},a.K=function(e,t,n){return e.eraseInLine(t)},a.L=function(e,t,n){return e.insertLines(t)},a.M=function(e,t,n){return e.deleteLines(t)},a.P=function(e,t,n){return e.deleteChars(t)},a.S=function(e,t,n){return e.scrollUp(t)},a.T=function(e,t,n){t.length<2&&!n&&e.scrollDown(t)},a.X=function(e,t,n){return e.eraseChars(t)},a.Z=function(e,t,n){return e.cursorBackwardTab(t)},a["`"]=function(e,t,n){return e.charPosAbsolute(t)},a.a=function(e,t,n){return e.HPositionRelative(t)},a.b=function(e,t,n){return e.repeatPrecedingCharacter(t)},a.c=function(e,t,n){return e.sendDeviceAttributes(t)},a.d=function(e,t,n){return e.linePosAbsolute(t)},a.e=function(e,t,n){return e.VPositionRelative(t)},a.f=function(e,t,n){return e.HVPosition(t)},a.g=function(e,t,n){return e.tabClear(t)},a.h=function(e,t,n){return e.setMode(t)},a.l=function(e,t,n){return e.resetMode(t)},a.m=function(e,t,n){return e.charAttributes(t)},a.n=function(e,t,n){return e.deviceStatus(t)},a.p=function(e,t,n){switch(n){case"!":e.softReset(t)}},a.q=function(e,t,n,i){" "===i&&e.setCursorStyle(t)},a.r=function(e,t){return e.setScrollRegion(t)},a.s=function(e,t){return e.saveCursor(t)},a.u=function(e,t){return e.restoreCursor(t)},a[n.C0.CAN]=function(e,t,n,i,r){return r.setState(l.NORMAL)};var l;!function(e){e[e.NORMAL=0]="NORMAL",e[e.ESCAPED=1]="ESCAPED",e[e.CSI_PARAM=2]="CSI_PARAM",e[e.CSI=3]="CSI",e[e.OSC=4]="OSC",e[e.CHARSET=5]="CHARSET",e[e.DCS=6]="DCS",e[e.IGNORE=7]="IGNORE"}(l||(l={}));var u=function(){function e(e,t){this._inputHandler=e,this._terminal=t,this._state=l.NORMAL}return e.prototype.parse=function(e){var t,u,c,h,f=e.length;for(this._terminal.debug&&this._terminal.log("data: "+e),this._position=0,this._terminal.surrogate_high&&(e=this._terminal.surrogate_high+e,this._terminal.surrogate_high="");this._position<f;this._position++){if(u=e[this._position],c=e.charCodeAt(this._position),55296<=c&&c<=56319){if(h=e.charCodeAt(this._position+1),isNaN(h)){this._terminal.surrogate_high=u;continue}c=1024*(c-55296)+(h-56320)+65536,u+=e.charAt(this._position+1)}if(!(56320<=c&&c<=57343))switch(this._state){case l.NORMAL:u in r?r[u](this,this._inputHandler):this._inputHandler.addChar(u,c);break;case l.ESCAPED:if(u in o){o[u](this,this._terminal);break}switch(u){case"(":case")":case"*":case"+":case"-":case".":switch(u){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=l.CHARSET;break;case"/":this._terminal.gcharset=3,this._state=l.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=l.NORMAL;break;case"8":this._inputHandler.restoreCursor(),this._state=l.NORMAL;break;case"#":this._state=l.NORMAL,this._position++;break;case"H":this._terminal.tabSet(),this._state=l.NORMAL;break;case"=":this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport.syncScrollArea(),this._state=l.NORMAL;break;case">":this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea(),this._state=l.NORMAL;break;default:this._state=l.NORMAL,this._terminal.error("Unknown ESC control: %s.",u)}break;case l.CHARSET:u in i.CHARSETS?(t=i.CHARSETS[u],"/"===u&&this.skipNextChar()):t=i.DEFAULT_CHARSET,this._terminal.setgCharset(this._terminal.gcharset,t),this._terminal.gcharset=null,this._state=l.NORMAL;break;case l.OSC:if(u===n.C0.ESC||u===n.C0.BEL){switch(u===n.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=l.NORMAL}else this._terminal.params.length?this._terminal.currentParam+=u:u>="0"&&u<="9"?this._terminal.currentParam=10*this._terminal.currentParam+u.charCodeAt(0)-48:";"===u&&(this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam="");break;case l.CSI_PARAM:if(u in s){s[u](this);break}this.finalizeParam(),this._state=l.CSI;case l.CSI:u in a?(this._terminal.debug&&this._terminal.log("CSI "+(this._terminal.prefix?this._terminal.prefix:"")+" "+(this._terminal.params?this._terminal.params.join(";"):"")+" "+(this._terminal.postfix?this._terminal.postfix:"")+" "+u),a[u](this._inputHandler,this._terminal.params,this._terminal.prefix,this._terminal.postfix,this)):this._terminal.error("Unknown CSI code: %s.",u),this._state=l.NORMAL,this._terminal.prefix="",this._terminal.postfix="";break;case l.DCS:if(u===n.C0.ESC||u===n.C0.BEL){u===n.C0.ESC&&this._position++;var p=void 0,d=void 0;switch(this._terminal.prefix){case"":break;case"$q":switch(p=this._terminal.currentParam,d=!1,p){case'"q':p='0"q';break;case'"p':p='61"p';break;case"r":p=""+(this._terminal.buffer.scrollTop+1)+";"+(this._terminal.buffer.scrollBottom+1)+"r";break;case"m":p="0m";break;default:this._terminal.error("Unknown DCS Pt: %s.",p),p=""}this._terminal.send(n.C0.ESC+"P"+ +d+"$r"+p+n.C0.ESC+"\\");break;case"+p":break;case"+q":p=this._terminal.currentParam,d=!1,this._terminal.send(n.C0.ESC+"P"+ +d+"+r"+p+n.C0.ESC+"\\");break;default:this._terminal.error("Unknown DCS prefix: %s.",this._terminal.prefix)}this._terminal.currentParam=0,this._terminal.prefix="",this._state=l.NORMAL}else this._terminal.currentParam?this._terminal.currentParam+=u:this._terminal.prefix||"$"===u||"+"===u?2===this._terminal.prefix.length?this._terminal.currentParam=u:this._terminal.prefix+=u:this._terminal.currentParam=u;break;case l.IGNORE:u!==n.C0.ESC&&u!==n.C0.BEL||(u===n.C0.ESC&&this._position++,this._state=l.NORMAL)}}return this._state},e.prototype.setState=function(e){this._state=e},e.prototype.setPrefix=function(e){this._terminal.prefix=e},e.prototype.setPostfix=function(e){this._terminal.postfix=e},e.prototype.setParam=function(e){this._terminal.currentParam=e},e.prototype.getParam=function(){return this._terminal.currentParam},e.prototype.finalizeParam=function(){this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam=0},e.prototype.skipNextChar=function(){this._position++},e}();e.Parser=u}()}),require.register("xterm/lib/Renderer.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";function n(e){var t=e.ownerDocument,n=t.createElement("span");n.innerHTML="hello world",e.appendChild(n);var i=n.offsetWidth,r=n.offsetHeight;n.style.fontWeight="bold";var o=n.offsetWidth,s=n.offsetHeight;return e.removeChild(n),i!==o||r!==s}Object.defineProperty(e,"__esModule",{value:!0});var i,r=t("./utils/DomElementObjectPool"),o=5;!function(e){e[e.BOLD=1]="BOLD",e[e.UNDERLINE=2]="UNDERLINE",e[e.BLINK=4]="BLINK",e[e.INVERSE=8]="INVERSE",e[e.INVISIBLE=16]="INVISIBLE"}(i||(i={}));var s=null,a=function(){function e(e){this._terminal=e,this._refreshRowsQueue=[],this._refreshFramesSkipped=0,this._refreshAnimationFrame=null,this._spanElementObjectPool=new r.DomElementObjectPool("span"),null===s&&(s=n(this._terminal.element)),this._spanElementObjectPool=new r.DomElementObjectPool("span")}return e.prototype.queueRefresh=function(e,t){this._refreshRowsQueue.push({start:e,end:t}),this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(this._refreshLoop.bind(this)))},e.prototype._refreshLoop=function(){var e=this._terminal.writeBuffer.length>0&&this._refreshFramesSkipped++<=o;if(e)return void(this._refreshAnimationFrame=window.requestAnimationFrame(this._refreshLoop.bind(this)));this._refreshFramesSkipped=0;var t,n;if(this._refreshRowsQueue.length>4)t=0,n=this._terminal.rows-1;else{t=this._refreshRowsQueue[0].start,n=this._refreshRowsQueue[0].end;for(var i=1;i<this._refreshRowsQueue.length;i++)this._refreshRowsQueue[i].start<t&&(t=this._refreshRowsQueue[i].start),this._refreshRowsQueue[i].end>n&&(n=this._refreshRowsQueue[i].end)}this._refreshRowsQueue=[],this._refreshAnimationFrame=null,this._refresh(t,n)},e.prototype._refresh=function(e,t){var n;t-e>=this._terminal.rows/2&&(n=this._terminal.element.parentNode,n&&this._terminal.element.removeChild(this._terminal.rowContainer));var r=this._terminal.cols,o=e;for(t>=this._terminal.rows&&(this._terminal.log("`end` is too large. Most likely a bad CSR."),t=this._terminal.rows-1);o<=t;o++){var a=o+this._terminal.buffer.ydisp,l=this._terminal.buffer.lines.get(a),u=void 0;u=this._terminal.buffer.y===o-(this._terminal.buffer.ybase-this._terminal.buffer.ydisp)&&this._terminal.cursorState&&!this._terminal.cursorHidden?this._terminal.buffer.x:-1;for(var c=this._terminal.defAttr,h=document.createDocumentFragment(),f="",p=void 0;this._terminal.children[o].children.length;){var d=this._terminal.children[o].children[0];this._terminal.children[o].removeChild(d),this._spanElementObjectPool.release(d)}for(var m=0;m<r;m++){var g=l[m][0],y=l[m][1],v=l[m][2],b=m===u;if(v){if((g!==c||b)&&(c===this._terminal.defAttr||b||(f&&(p.innerHTML=f,f=""),h.appendChild(p),p=null),g!==this._terminal.defAttr||b)){f&&!p&&(p=this._spanElementObjectPool.acquire()),p&&(f&&(p.innerHTML=f,f=""),h.appendChild(p)),p=this._spanElementObjectPool.acquire();var _=511&g,w=g>>9&511,C=g>>18;if(b&&(p.classList.add("reverse-video"),p.classList.add("terminal-cursor")),C&i.BOLD&&(s||p.classList.add("xterm-bold"),w<8&&(w+=8)),C&i.UNDERLINE&&p.classList.add("xterm-underline"),C&i.BLINK&&p.classList.add("xterm-blink"),C&i.INVERSE){var E=_;_=w,w=E,1&C&&w<8&&(w+=8)}C&i.INVISIBLE&&!b&&p.classList.add("xterm-hidden"),C&i.INVERSE&&(257===_&&(_=15),256===w&&(w=0)),_<256&&p.classList.add("xterm-bg-color-"+_),w<256&&p.classList.add("xterm-color-"+w)}if(2===v)f+='<span class="xterm-wide-char">'+y+"</span>";else if(y.charCodeAt(0)>255)f+='<span class="xterm-normal-char">'+y+"</span>";else switch(y){case"&":f+="&";break;case"<":f+="<";break;case">":f+=">";break;default:f+=y<=" "?" ":y}c=b?-1:g}}f&&!p&&(p=this._spanElementObjectPool.acquire()),p&&(f&&(p.innerHTML=f,f=""),h.appendChild(p),p=null),this._terminal.children[o].appendChild(h)}n&&this._terminal.element.appendChild(this._terminal.rowContainer),this._terminal.emit("refresh",{element:this._terminal.element,start:e,end:t})},e.prototype.refreshSelection=function(e,t){for(;this._terminal.selectionContainer.children.length;)this._terminal.selectionContainer.removeChild(this._terminal.selectionContainer.children[0]);if(e&&t){var n=e[1]-this._terminal.buffer.ydisp,i=t[1]-this._terminal.buffer.ydisp,r=Math.max(n,0),o=Math.min(i,this._terminal.rows-1);if(!(r>=this._terminal.rows||o<0)){var s=document.createDocumentFragment(),a=n===r?e[0]:0,l=r===o?t[0]:this._terminal.cols;s.appendChild(this._createSelectionElement(r,a,l));var u=o-r-1;if(s.appendChild(this._createSelectionElement(r+1,0,this._terminal.cols,u)),r!==o){var c=i===o?t[0]:this._terminal.cols;s.appendChild(this._createSelectionElement(o,0,c))}this._terminal.selectionContainer.appendChild(s)}}},e.prototype._createSelectionElement=function(e,t,n,i){void 0===i&&(i=1);var r=document.createElement("div");return r.style.height=i*this._terminal.charMeasure.height+"px",r.style.top=e*this._terminal.charMeasure.height+"px",r.style.left=t*this._terminal.charMeasure.width+"px",r.style.width=this._terminal.charMeasure.width*(n-t)+"px",r},e}();e.Renderer=a}()}),require.register("xterm/lib/SelectionManager.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var i,r=t("./utils/Mouse"),o=t("./utils/Browser"),s=t("./EventEmitter"),a=t("./SelectionModel"),l=t("./utils/BufferLine"),u=50,c=15,h=50,f=" ()[]{}'\"",p=2,d=String.fromCharCode(160),m=new RegExp(d,"g");!function(e){e[e.NORMAL=0]="NORMAL",e[e.WORD=1]="WORD",e[e.LINE=2]="LINE"}(i||(i={}));var g=function(e){function t(t,n,r,o){var s=e.call(this)||this;return s._terminal=t,s._buffer=n,s._rowContainer=r,s._charMeasure=o,s._enabled=!0,s._initListeners(),s.enable(),s._model=new a.SelectionModel(t),s._activeSelectionMode=i.NORMAL,s}return n(t,e),t.prototype._initListeners=function(){var e=this;this._mouseMoveListener=function(t){return e._onMouseMove(t)},this._mouseUpListener=function(t){return e._onMouseUp(t)},this._rowContainer.addEventListener("mousedown",function(t){return e._onMouseDown(t)}),this._buffer.on("trim",function(t){return e._onTrim(t)})},t.prototype.disable=function(){this.clearSelection(),this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},t.prototype.setBuffer=function(e){this._buffer=e,this.clearSelection()},Object.defineProperty(t.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasSelection",{get:function(){var e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!(!e||!t)&&(e[0]!==t[0]||e[1]!==t[1])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectionText",{get:function(){var e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";var n=e[1]===t[1]?t[0]:null,i=[];i.push(l.translateBufferLineToString(this._buffer.get(e[1]),!0,e[0],n));for(var r=e[1]+1;r<=t[1]-1;r++){var s=this._buffer.get(r),a=l.translateBufferLineToString(s,!0);s.isWrapped?i[i.length-1]+=a:i.push(a)}if(e[1]!==t[1]){var s=this._buffer.get(t[1]),a=l.translateBufferLineToString(s,!0,0,t[0]);s.isWrapped?i[i.length-1]+=a:i.push(a)}var u=i.map(function(e){return e.replace(m," ")}).join(o.isMSWindows?"\r\n":"\n");return u},enumerable:!0,configurable:!0}),t.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh()},t.prototype.refresh=function(e){var t=this;if(this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return t._refresh()})),o.isLinux&&e){var n=this.selectionText;n.length&&this.emit("newselection",this.selectionText)}},t.prototype._refresh=function(){this._refreshAnimationFrame=null,this.emit("refresh",{start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd})},t.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh()},t.prototype._onTrim=function(e){var t=this._model.onTrim(e);t&&this.refresh()},t.prototype._getMouseBufferCoords=function(e){var t=r.getCoords(e,this._rowContainer,this._charMeasure,this._terminal.cols,this._terminal.rows,!0);return t?(t[0]--,t[1]--,t[1]+=this._terminal.buffer.ydisp,t):null},t.prototype._getMouseEventScrollAmount=function(e){var t=r.getCoordsRelativeToElement(e,this._rowContainer)[1],n=this._terminal.rows*this._charMeasure.height;return t>=0&&t<=n?0:(t>n&&(t-=n),t=Math.min(Math.max(t,-u),u),t/=u,t/Math.abs(t)+Math.round(t*(c-1)))},t.prototype._onMouseDown=function(e){if(2===e.button&&this.hasSelection)return void e.stopPropagation();if(0===e.button){if(!this._enabled){var t=o.isMac&&e.altKey;if(!t)return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._onIncrementalClick(e):1===e.detail?this._onSingleClick(e):2===e.detail?this._onDoubleClick(e):3===e.detail&&this._onTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}},t.prototype._addMouseDownListeners=function(){var e=this;this._rowContainer.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._rowContainer.ownerDocument.addEventListener("mouseup",this._mouseUpListener),this._dragScrollIntervalTimer=setInterval(function(){return e._dragScroll()},h)},t.prototype._removeMouseDownListeners=function(){this._rowContainer.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._rowContainer.ownerDocument.removeEventListener("mouseup",this._mouseUpListener),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=null},t.prototype._onIncrementalClick=function(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))},t.prototype._onSingleClick=function(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=i.NORMAL,this._model.selectionStart=this._getMouseBufferCoords(e),this._model.selectionStart){this._model.selectionEnd=null;var t=this._buffer.get(this._model.selectionStart[1]);if(t){var n=t[this._model.selectionStart[0]];0===n[p]&&this._model.selectionStart[0]++}}},t.prototype._onDoubleClick=function(e){var t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=i.WORD,this._selectWordAt(t))},t.prototype._onTripleClick=function(e){var t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=i.LINE,this._selectLineAt(t[1]))},t.prototype._onMouseMove=function(e){var t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd)return void this.refresh(!0);if(this._activeSelectionMode===i.LINE?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._terminal.cols:this._activeSelectionMode===i.WORD&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),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 n=this._buffer.get(this._model.selectionEnd[1])[this._model.selectionEnd[0]];n&&0===n[2]&&this._model.selectionEnd[0]++}t&&t[0]===this._model.selectionEnd[0]&&t[1]===this._model.selectionEnd[1]||this.refresh(!0)},t.prototype._dragScroll=function(){this._dragScrollAmount&&(this._terminal.scrollDisp(this._dragScrollAmount,!1),this._dragScrollAmount>0?this._model.selectionEnd=[this._terminal.cols-1,this._terminal.buffer.ydisp+this._terminal.rows]:this._model.selectionEnd=[0,this._terminal.buffer.ydisp],this.refresh())},t.prototype._onMouseUp=function(e){this._removeMouseDownListeners()},t.prototype._convertViewportColToCharacterIndex=function(e,t){for(var n=t[0],i=0;t[0]>=i;i++){var r=e[i];0===r[p]&&n--}return n},t.prototype.setSelection=function(e,t,n){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=n,this.refresh()},t.prototype._getWordAt=function(e){var t=this._buffer.get(e[1]);if(!t)return null;var n=l.translateBufferLineToString(t,!1),i=this._convertViewportColToCharacterIndex(t,e),r=i,o=e[0]-r,s=0,a=0;if(" "===n.charAt(r)){for(;r>0&&" "===n.charAt(r-1);)r--;for(;i<n.length&&" "===n.charAt(i+1);)i++}else{var u=e[0],c=e[0];for(0===t[u][p]&&(s++,u--),2===t[c][p]&&(a++,c++);r>0&&!this._isCharWordSeparator(n.charAt(r-1));)0===t[u-1][p]&&(s++,u--),r--,u--;for(;i+1<n.length&&!this._isCharWordSeparator(n.charAt(i+1));)2===t[c+1][p]&&(a++,c++),i++,c++}var h=r+o-s,f=Math.min(i-r+s+a+1,this._terminal.cols);return{start:h,length:f}},t.prototype._selectWordAt=function(e){var t=this._getWordAt(e);t&&(this._model.selectionStart=[t.start,e[1]],this._model.selectionStartLength=t.length)},t.prototype._selectToWordAt=function(e){var t=this._getWordAt(e);t&&(this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,e[1]])},t.prototype._isCharWordSeparator=function(e){return f.indexOf(e)>=0},t.prototype._selectLineAt=function(e){this._model.selectionStart=[0,e],this._model.selectionStartLength=this._terminal.cols},t}(s.EventEmitter);e.SelectionManager=g}()}),require.register("xterm/lib/SelectionModel.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e){this._terminal=e,this.clearSelection()}return e.prototype.clearSelection=function(){this.selectionStart=null,this.selectionEnd=null,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(e.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(e.prototype,"finalSelectionEnd",{get:function(){return this.isSelectAllActive?[this._terminal.cols,this._terminal.buffer.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}),e.prototype.areSelectionValuesReversed=function(){var e=this.selectionStart,t=this.selectionEnd;return e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]},e.prototype.onTrim=function(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},e}();e.SelectionModel=t}()}),require.register("xterm/lib/Viewport.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t,n,i){var r=this;this.terminal=e,this.viewportElement=t,this.scrollArea=n,this.charMeasure=i,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 r.syncScrollArea()},0)}return e.prototype.refresh=function(){if(this.charMeasure.height>0){var e=this.charMeasure.height!==this.currentRowHeight;e&&(this.currentRowHeight=this.charMeasure.height,this.viewportElement.style.lineHeight=this.charMeasure.height+"px",this.terminal.rowContainer.style.lineHeight=this.charMeasure.height+"px");var t=this.lastRecordedViewportHeight!==this.terminal.rows;(e||t)&&(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"}},e.prototype.syncScrollArea=function(){this.lastRecordedBufferLength!==this.terminal.buffer.lines.length?(this.lastRecordedBufferLength=this.terminal.buffer.lines.length,this.refresh()):this.lastRecordedViewportHeight!==this.terminal.rows?this.refresh():this.charMeasure.height!==this.currentRowHeight&&this.refresh();var e=this.terminal.buffer.ydisp*this.currentRowHeight;this.viewportElement.scrollTop!==e&&(this.viewportElement.scrollTop=e)},e.prototype.onScroll=function(e){var t=Math.round(this.viewportElement.scrollTop/this.currentRowHeight),n=t-this.terminal.buffer.ydisp;this.terminal.scrollDisp(n,!0)},e.prototype.onWheel=function(e){if(0!==e.deltaY){var t=1;e.deltaMode===WheelEvent.DOM_DELTA_LINE?t=this.currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t=this.currentRowHeight*this.terminal.rows),this.viewportElement.scrollTop+=e.deltaY*t,e.preventDefault()}},e.prototype.onTouchStart=function(e){this.lastTouchY=e.touches[0].pageY},e.prototype.onTouchMove=function(e){var t=this.lastTouchY-e.touches[0].pageY;this.lastTouchY=e.touches[0].pageY,0!==t&&(this.viewportElement.scrollTop+=t,e.preventDefault())},e}();e.Viewport=t}()}),require.register("xterm/lib/addons/fit/fit.js",function(e,t,i){t=n(t,{},"xterm"),function(){!function(n){"object"==typeof e&&"object"==typeof i?i.exports=n(t("../../xterm")):"function"==typeof define?define(["../../xterm"],n):n(window.Terminal)}(function(e){var t={};return t.proposeGeometry=function(e){if(!e.element.parentElement)return null;var t,n,i,r,o,s=window.getComputedStyle(e.element.parentElement),a=parseInt(s.getPropertyValue("height")),l=Math.max(0,parseInt(s.getPropertyValue("width"))-17),u=window.getComputedStyle(e.element),c=parseInt(u.getPropertyValue("padding-top"))+parseInt(u.getPropertyValue("padding-bottom")),h=parseInt(u.getPropertyValue("padding-right"))+parseInt(u.getPropertyValue("padding-left")),f=a-c,p=l-h,d=(e.rowContainer,e.rowContainer.firstElementChild),m=d.innerHTML;return d.style.display="inline",d.innerHTML="W",i=d.getBoundingClientRect().width,d.style.display="",t=d.getBoundingClientRect().height,d.innerHTML=m,n=parseInt(f/t),r=parseInt(p/i),o={cols:r,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})}()}),require.register("xterm/lib/addons/fullscreen/fullscreen.js",function(e,t,i){t=n(t,{},"xterm"),function(){!function(n){"object"==typeof e&&"object"==typeof i?i.exports=n(t("../../xterm")):"function"==typeof define?define(["../../xterm"],n):n(window.Terminal)}(function(e){var t={};return t.toggleFullScreen=function(e,t){var n;n="undefined"==typeof t?e.element.classList.contains("fullscreen")?"remove":"add":t?"add":"remove",e.element.classList[n]("fullscreen")},e.prototype.toggleFullscreen=function(e){t.toggleFullScreen(this,e)},t})}()}),require.register("xterm/lib/handlers/Clipboard.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";function t(e,t){return t?e.replace(/\r?\n/g,"\r"):e}function n(e,t,n){t.browser.isMSIE?window.clipboardData.setData("Text",n.selectionText):e.clipboardData.setData("text/plain",n.selectionText),e.preventDefault()}function i(e,n){e.stopPropagation();var i,r=function(i){return i=t(i,n.browser.isMSWindows),n.handler(i),n.textarea.value="",n.emit("paste",i),n.cancel(e)};n.browser.isMSIE?window.clipboardData&&(i=window.clipboardData.getData("Text"),r(i)):e.clipboardData&&(i=e.clipboardData.getData("text/plain"),r(i))}function r(e,t){t.style.position="fixed",t.style.width="20px",t.style.height="20px",t.style.left=e.clientX-10+"px",t.style.top=e.clientY-10+"px",t.style.zIndex="1000",t.focus(),setTimeout(function(){t.style.position=null,t.style.width=null,t.style.height=null,t.style.left=null,t.style.top=null,t.style.zIndex=null},4)}function o(e,t,n){r(e,t),t.value=n.selectionText,t.select()}Object.defineProperty(e,"__esModule",{value:!0}),e.prepareTextForTerminal=t,e.copyHandler=n,e.pasteHandler=i,e.moveTextAreaUnderMouseCursor=r,e.rightClickHandler=o}()}),require.register("xterm/lib/utils/Browser.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=t("./Generic"),i="undefined"==typeof navigator,r=i?"node":navigator.userAgent,o=i?"node":navigator.platform;e.isFirefox=!!~r.indexOf("Firefox"),e.isMSIE=!!~r.indexOf("MSIE")||!!~r.indexOf("Trident"),e.isMac=n.contains(["Macintosh","MacIntel","MacPPC","Mac68K"],o),e.isIpad="iPad"===o,e.isIphone="iPhone"===o,e.isMSWindows=n.contains(["Windows","Win16","Win32","WinCE"],o),e.isLinux=o.indexOf("Linux")>=0}()}),require.register("xterm/lib/utils/BufferLine.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";function t(e,t,r,o){void 0===r&&(r=0),void 0===o&&(o=null);for(var s="",a=r,l=o,u=0;u<e.length;u++){var c=e[u];s+=c[n],0===c[i]&&(r>=u&&a--,o>=u&&l--)}var h=l||e.length;if(t){var f=s.search(/\s+$/);if(f!==-1&&(h=Math.min(h,f)),h<=a)return""}return s.substring(a,h)}Object.defineProperty(e,"__esModule",{value:!0});var n=1,i=2;e.translateBufferLineToString=t}()}),require.register("xterm/lib/utils/CharMeasure.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=t("../EventEmitter.js"),r=function(e){function t(t,n){var i=e.call(this)||this;return i._document=t,i._parentElement=n,i}return n(t,e),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),t.prototype.measure=function(){var e=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 e._doMeasure()},0))},t.prototype._doMeasure=function(){var e=this._measureElement.getBoundingClientRect();0!==e.width&&0!==e.height&&(this._width===e.width&&this._height===e.height||(this._width=e.width,this._height=e.height,this.emit("charsizechanged")))},t}(i.EventEmitter);e.CharMeasure=r}()}),require.register("xterm/lib/utils/CircularList.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=t("../EventEmitter"),r=function(e){function t(t){var n=e.call(this)||this;return n._array=new Array(t),n._startIndex=0,n._length=0,n}return n(t,e),Object.defineProperty(t.prototype,"maxLength",{get:function(){return this._array.length},set:function(e){for(var t=new Array(e),n=0;n<Math.min(e,this.length);n++)t[n]=this._array[this._getCyclicIndex(n)];this._array=t,this._startIndex=0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._length},set:function(e){if(e>this._length)for(var t=this._length;t<e;t++)this._array[t]=void 0;this._length=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"forEach",{get:function(){var e=this;return function(t){for(var n=e.length,i=0;i<n;i++)t(e.get(i),i)}},enumerable:!0,configurable:!0}),t.prototype.get=function(e){return this._array[this._getCyclicIndex(e)]},t.prototype.set=function(e,t){this._array[this._getCyclicIndex(e)]=t},t.prototype.push=function(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this.maxLength?(this._startIndex++,this._startIndex===this.maxLength&&(this._startIndex=0),this.emit("trim",1)):this._length++},t.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length-- -1)]},t.prototype.splice=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(t){for(var r=e;r<this._length-t;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+t)];this._length-=t}if(n&&n.length){for(var r=this._length-1;r>=e;r--)this._array[this._getCyclicIndex(r+n.length)]=this._array[this._getCyclicIndex(r)];for(var r=0;r<n.length;r++)this._array[this._getCyclicIndex(e+r)]=n[r];if(this._length+n.length>this.maxLength){var o=this._length+n.length-this.maxLength;this._startIndex+=o,this._length=this.maxLength,this.emit("trim",o)}else this._length+=n.length}},t.prototype.trimStart=function(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.emit("trim",e)},t.prototype.shiftElements=function(e,t,n){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+n<0)throw new Error("Cannot shift elements in list beyond index 0");if(n>0){for(var i=t-1;i>=0;i--)this.set(e+i+n,this.get(e+i));var r=e+t+n-this._length;if(r>0)for(this._length+=r;this._length>this.maxLength;)this._length--,this._startIndex++,this.emit("trim",1)}else for(var i=0;i<t;i++)this.set(e+i+n,this.get(e+i))}},t.prototype._getCyclicIndex=function(e){return(this._startIndex+e)%this.maxLength},t}(i.EventEmitter);e.CircularList=r}()}),require.register("xterm/lib/utils/DomElementObjectPool.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e){this.type=e,this._type=e,this._pool=[],this._inUse={}}return e.prototype.acquire=function(){var t;return t=0===this._pool.length?this._createNew():this._pool.pop(),this._inUse[t.getAttribute(e.OBJECT_ID_ATTRIBUTE)]=t,t},e.prototype.release=function(t){if(!this._inUse[t.getAttribute(e.OBJECT_ID_ATTRIBUTE)])throw new Error("Could not release an element not yet acquired");delete this._inUse[t.getAttribute(e.OBJECT_ID_ATTRIBUTE)],this._cleanElement(t),this._pool.push(t)},e.prototype._createNew=function(){var t=document.createElement(this._type),n=e._objectCount++;return t.setAttribute(e.OBJECT_ID_ATTRIBUTE,n.toString(10)),t},e.prototype._cleanElement=function(e){e.className="",e.innerHTML=""},e}();t.OBJECT_ID_ATTRIBUTE="data-obj-id",t._objectCount=0,e.DomElementObjectPool=t}()}),require.register("xterm/lib/utils/Generic.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";function t(e,t){return e.indexOf(t)>=0}Object.defineProperty(e,"__esModule",{value:!0}),e.contains=t}()}),require.register("xterm/lib/utils/Mouse.js",function(e,t,i){t=n(t,{},"xterm"),function(){"use strict";function t(e,t){if(null==e.pageX)return null;for(var n=e.pageX,i=e.pageY;t&&t!==self.document.documentElement;)n-=t.offsetLeft,i-=t.offsetTop,t="offsetParent"in t?t.offsetParent:t.parentElement;return[n,i]}function n(e,n,i,r,o,s){if(!i.width||!i.height)return null;var a=t(e,n);return a?(a[0]=Math.ceil((a[0]+(s?i.width/2:0))/i.width),a[1]=Math.ceil(a[1]/i.height),a[0]=Math.min(Math.max(a[0],1),r+1),a[1]=Math.min(Math.max(a[1],1),o+1),a):null}function i(e,t,i,r,o){var s=n(e,t,i,r,o),a=s[0],l=s[1];return a+=32,l+=32,{x:a,y:l}}Object.defineProperty(e,"__esModule",{value:!0}),e.getCoordsRelativeToElement=t,e.getCoords=n,e.getRawByteCoords=i}()}),require.register("xterm/lib/xterm.js",function(e,t,i){t=n(t,{},"xterm");var r=t("buffer");r&&r.Buffer;!function(){"use strict";function n(e){var t=this;return this instanceof n?(t.browser=S,t.cancel=n.cancel,m.EventEmitter.call(this),"number"==typeof e&&(e={cols:arguments[0],rows:arguments[1],handler:arguments[2]}),e=e||{},Object.keys(n.defaults).forEach(function(i){null==e[i]&&(e[i]=n.options[i],n[i]!==n.defaults[i]&&(e[i]=n[i])),t[i]=e[i]}),8===e.colors.length?e.colors=e.colors.concat(n._colors.slice(8)):16===e.colors.length?e.colors=e.colors.concat(n._colors.slice(16)):10===e.colors.length?e.colors=e.colors.slice(0,-2).concat(n._colors.slice(8,-2),e.colors.slice(-2)):18===e.colors.length&&(e.colors=e.colors.concat(n._colors.slice(16,-2),e.colors.slice(-2))),this.colors=e.colors,this.options=e,this.parent=e.body||e.parent||(A?A.getElementsByTagName("body")[0]:null),this.cols=e.cols||e.geometry[0],this.rows=e.rows||e.geometry[1],this.geometry=[this.cols,this.rows],e.handler&&this.on("data",e.handler),this.cursorState=0,this.cursorHidden=!1,this.convertEol,this.queue="",this.customKeyEventHandler=null,this.cursorBlinkInterval=null,this.applicationKeypad=!1,this.applicationCursor=!1,this.originMode=!1,this.insertMode=!1,this.wraparoundMode=!0,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 b.InputHandler(this),this.parser=new _.Parser(this.inputHandler,this),this.renderer=this.renderer||null,this.selectionManager=this.selectionManager||null,this.linkifier=this.linkifier||new C.Linkifier,this.writeBuffer=[],this.writeInProgress=!1,this.xoffSentToCatchUp=!1,this.writeStopped=!1,this.surrogate_high="",this.buffers=new p.BufferSet(this),this.buffer=this.buffers.active,this.buffers.on("activate",function(e){this._terminal.buffer=e}),this.selectionManager&&this.selectionManager.setBuffer(this.buffer.lines),this.setupStops(),void(this.userScrolling=!1)):new n(arguments[0],arguments[1],arguments[2])}function r(e,t,n,i){Array.isArray(e)||(e=[e]),e.forEach(function(e){e.addEventListener(t,n,i||!1)})}function o(e,t,n,i){e.removeEventListener(t,n,i||!1)}function s(e,t){if(this.cancelEvents||t)return e.preventDefault(),e.stopPropagation(),!1}function a(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function l(e,t){var n=e.browser.isMac&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.browser.isMSWindows&&t.altKey&&t.ctrlKey&&!t.metaKey;return"keypress"==t.type?n:n&&(!t.keyCode||t.keyCode>47)}function u(e,t,i){var r=e<<16|t<<8|i;if(null!=u._cache[r])return u._cache[r];for(var o,s,a,l,c,h=1/0,f=-1,p=0;p<n.vcolors.length;p++){if(o=n.vcolors[p],s=o[0],a=o[1],l=o[2],c=u.distance(e,t,i,s,a,l),0===c){f=p;break}c<h&&(h=c,f=p)}return u._cache[r]=f}function c(e,t,n){if(e.forEach)return e.forEach(t,n);for(var i=0;i<e.length;i++)t.call(n,e[i],i,e)}function h(e){return 16===e.keyCode||17===e.keyCode||18===e.keyCode}function f(e){if(Object.keys)return Object.keys(e);var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push(t);return n}Object.defineProperty(e,"__esModule",{value:!0});var p=t("./BufferSet"),d=t("./CompositionHelper"),m=t("./EventEmitter"),g=t("./Viewport"),y=t("./handlers/Clipboard"),v=t("./EscapeSequences"),b=t("./InputHandler"),_=t("./Parser"),w=t("./Renderer"),C=t("./Linkifier"),E=t("./SelectionManager"),x=t("./utils/CharMeasure"),S=t("./utils/Browser"),T=t("./utils/Mouse"),k=t("./utils/BufferLine"),A="undefined"!=typeof window?window.document:null,R=5,L=300,N=600;a(n,m.EventEmitter),n.prototype.eraseAttr=function(){return this.defAttr&-512|511&this.curAttr},n.tangoColors=["#2e3436","#cc0000","#4e9a06","#c4a000","#3465a4","#75507b","#06989a","#d3d7cf","#555753","#ef2929","#8ae234","#fce94f","#729fcf","#ad7fa8","#34e2e2","#eeeeec"],n.colors=function(){function e(e,n,i){r.push("#"+t(e)+t(n)+t(i))}function t(e){return e=e.toString(16),e.length<2?"0"+e:e}var i,r=n.tangoColors.slice(),o=[0,95,135,175,215,255];for(i=0;i<216;i++)e(o[i/36%6|0],o[i/6%6|0],o[i%6]);for(i=0;i<24;i++)o=8+10*i,e(o,o,o);return r}(),n._colors=n.colors.slice(),n.vcolors=function(){for(var e,t=[],i=n.colors,r=0;r<256;r++)e=parseInt(i[r].substring(1),16),t.push([e>>16&255,e>>8&255,255&e]);return t}(),n.defaults={colors:n.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},n.options={},n.focus=null,c(f(n.defaults),function(e){n[e]=n.defaults[e],n.options[e]=n.defaults[e]}),n.prototype.focus=function(){return this.textarea.focus()},n.prototype.getOption=function(e){if(!(e in n.defaults))throw new Error('No option with key "'+e+'"');return"undefined"!=typeof this.options[e]?this.options[e]:this[e]},n.prototype.setOption=function(e,t){if(!(e in n.defaults))throw new Error('No option with key "'+e+'"');switch(e){case"scrollback":if(t<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[e]!==t){if(this.buffer.lines.length>t){var r=this.buffer.lines.length-t,o=this.buffer.ydisp-r<0;this.buffer.lines.trimStart(r),this.buffer.ybase=Math.max(this.buffer.ybase-r,0),this.buffer.ydisp=Math.max(this.buffer.ydisp-r,0),o&&this.refresh(0,this.rows-1)}this.buffer.lines.maxLength=t,this.viewport.syncScrollArea()}}switch(this[e]=t,this.options[e]=t,e){case"cursorBlink":this.setCursorBlinking(t);break;case"cursorStyle":this.element.classList.toggle("xterm-cursor-style-block","block"===t),this.element.classList.toggle("xterm-cursor-style-underline","underline"===t),this.element.classList.toggle("xterm-cursor-style-bar","bar"===t);break;case"tabStopWidth":this.setupStops()}},n.prototype.restartCursorBlinking=function(){this.setCursorBlinking(this.options.cursorBlink)},n.prototype.setCursorBlinking=function(e){if(this.element.classList.toggle("xterm-cursor-blink",e),this.clearCursorBlinkingInterval(),e){var t=this;this.cursorBlinkInterval=setInterval(function(){t.element.classList.toggle("xterm-cursor-blink-on")},N)}},n.prototype.clearCursorBlinkingInterval=function(){this.element.classList.remove("xterm-cursor-blink-on"),this.cursorBlinkInterval&&(clearInterval(this.cursorBlinkInterval),this.cursorBlinkInterval=null)},n.bindFocus=function(e){r(e.textarea,"focus",function(t){e.sendFocus&&e.send(v.C0.ESC+"[I"),e.element.classList.add("focus"),e.showCursor(),e.restartCursorBlinking.apply(e),n.focus=e,e.emit("focus",{terminal:e})})},n.prototype.blur=function(){return this.textarea.blur()},n.bindBlur=function(e){r(e.textarea,"blur",function(t){e.refresh(e.buffer.y,e.buffer.y),e.sendFocus&&e.send(v.C0.ESC+"[O"),e.element.classList.remove("focus"),e.clearCursorBlinkingInterval.apply(e),n.focus=null,e.emit("blur",{terminal:e})})},n.prototype.initGlobal=function(){var e=this,t=this;n.bindKeys(this),n.bindFocus(this),n.bindBlur(this),r(this.element,"copy",function(n){t.hasSelection()&&y.copyHandler(n,t,e.selectionManager)});var i=function(e){return y.pasteHandler(e,t)};r(this.textarea,"paste",i),r(this.element,"paste",i),t.browser.isFirefox?r(this.element,"mousedown",function(t){2==t.button&&y.rightClickHandler(t,e.textarea,e.selectionManager)}):r(this.element,"contextmenu",function(t){y.rightClickHandler(t,e.textarea,e.selectionManager)}),t.browser.isLinux&&r(this.element,"auxclick",function(t){1===t.button&&y.moveTextAreaUnderMouseCursor(t,e.textarea,e.selectionManager)})},n.bindKeys=function(e){r(e.element,"keydown",function(t){A.activeElement==this&&e.keyDown(t)},!0),r(e.element,"keypress",function(t){A.activeElement==this&&e.keyPress(t)},!0),r(e.element,"keyup",function(t){h(t)||e.focus(e)},!0),r(e.textarea,"keydown",function(t){e.keyDown(t)},!0),r(e.textarea,"keypress",function(t){e.keyPress(t),this.value=""},!0),r(e.textarea,"compositionstart",e.compositionHelper.compositionstart.bind(e.compositionHelper)),r(e.textarea,"compositionupdate",e.compositionHelper.compositionupdate.bind(e.compositionHelper)),r(e.textarea,"compositionend",e.compositionHelper.compositionend.bind(e.compositionHelper)),e.on("refresh",e.compositionHelper.updateCompositionElements.bind(e.compositionHelper)),e.on("refresh",function(t){e.queueLinkification(t.start,t.end)})},n.prototype.insertRow=function(e){return"object"!=typeof e&&(e=A.createElement("div")),this.rowContainer.appendChild(e),this.children.push(e),e},n.prototype.open=function(e,t){var n=this,i=this,r=0;if(this.parent=e||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.element.classList.add("xterm-cursor-style-"+this.options.cursorStyle),this.setCursorBlinking(this.options.cursorBlink),this.element.setAttribute("tabindex",0),this.viewportElement=A.createElement("div"),this.viewportElement.classList.add("xterm-viewport"),this.element.appendChild(this.viewportElement),this.viewportScrollArea=A.createElement("div"),this.viewportScrollArea.classList.add("xterm-scroll-area"),this.viewportElement.appendChild(this.viewportScrollArea),this.selectionContainer=A.createElement("div"),this.selectionContainer.classList.add("xterm-selection"),this.element.appendChild(this.selectionContainer),this.rowContainer=A.createElement("div"),this.rowContainer.classList.add("xterm-rows"),this.element.appendChild(this.rowContainer),this.children=[],this.linkifier.attachToDom(A,this.children),this.helperContainer=A.createElement("div"),this.helperContainer.classList.add("xterm-helpers"),this.element.appendChild(this.helperContainer),this.textarea=A.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=A.createElement("div"),this.compositionView.classList.add("composition-view"),this.compositionHelper=new d.CompositionHelper(this.textarea,this.compositionView,this),this.helperContainer.appendChild(this.compositionView),this.charSizeStyleElement=A.createElement("style"),this.helperContainer.appendChild(this.charSizeStyleElement);r<this.rows;r++)this.insertRow();if(this.parent.appendChild(this.element),this.charMeasure=new x.CharMeasure(A,this.helperContainer),this.charMeasure.on("charsizechanged",function(){i.updateCharSizeStyles()}),this.charMeasure.measure(),this.viewport=new g.Viewport(this,this.viewportElement,this.viewportScrollArea,this.charMeasure),this.renderer=new w.Renderer(this),this.selectionManager=new E.SelectionManager(this,this.buffer.lines,this.rowContainer,this.charMeasure),this.selectionManager.on("refresh",function(e){n.renderer.refreshSelection(e.start,e.end)}),this.selectionManager.on("newselection",function(e){n.textarea.value=e,n.textarea.focus(),n.textarea.select()}),this.on("scroll",function(){return n.selectionManager.refresh()}),this.viewportElement.addEventListener("scroll",function(){return n.selectionManager.refresh()}),this.refresh(0,this.rows-1),this.initGlobal(),"undefined"==typeof t){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),t=!0}t&&this.focus(),this.bindMouse(),this.emit("open")},n.loadAddon=function(n,r){return"object"==typeof e&&"object"==typeof i?t("./addons/"+n+"/"+n):"function"==typeof define?t(["./addons/"+n+"/"+n],r):(console.error("Cannot load a module without a CommonJS or RequireJS environment."),!1)},n.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;}")},n.prototype.bindMouse=function(){function e(e){var t,n;if(t=s(e),n=T.getRawByteCoords(e,l.rowContainer,l.charMeasure,l.cols,l.rows))switch(i(t,n),e.overrideType||e.type){case"mousedown":u=t;break;case"mouseup":u=32;break;case"wheel":}}function t(e){var t,n=u;t=T.getRawByteCoords(e,l.rowContainer,l.charMeasure,l.cols,l.rows),t&&(n+=32,i(n,t))}function n(e,t){if(l.utfMouse){if(2047===t)return e.push(0);t<127?e.push(t):(t>2047&&(t=2047),e.push(192|t>>6),e.push(128|63&t))}else{if(255===t)return e.push(0);t>127&&(t=127),e.push(t)}}function i(e,t){if(l.vt300Mouse){e&=3,t.x-=32,t.y-=32;var i=v.C0.ESC+"[24";if(0===e)i+="1";else if(1===e)i+="3";else if(2===e)i+="5";else{if(3===e)return;i+="0"}return i+="~["+t.x+","+t.y+"]\r",void l.send(i)}if(l.decLocator)return e&=3,t.x-=32,t.y-=32,0===e?e=2:1===e?e=4:2===e?e=6:3===e&&(e=3),void l.send(v.C0.ESC+"["+e+";"+(3===e?4:0)+";"+t.y+";"+t.x+";"+(t.page||0)+"&w");if(l.urxvtMouse)return t.x-=32,t.y-=32,t.x++,t.y++,void l.send(v.C0.ESC+"["+e+";"+t.x+";"+t.y+"M");if(l.sgrMouse)return t.x-=32,t.y-=32,void l.send(v.C0.ESC+"[<"+((3===(3&e)?e&-4:e)-32)+";"+t.x+";"+t.y+(3===(3&e)?"m":"M"));var i=[];n(i,e),n(i,t.x),n(i,t.y),l.send(v.C0.ESC+"[M"+String.fromCharCode.apply(String,i))}function s(e){var t,n,i,r,o;switch(e.overrideType||e.type){case"mousedown":t=null!=e.button?+e.button:null!=e.which?e.which-1:null,l.browser.isMSIE&&(t=1===t?0:4===t?1:t);break;case"mouseup":t=3;break;case"DOMMouseScroll":t=e.detail<0?64:65;break;case"wheel":t=e.wheelDeltaY>0?64:65}return n=e.shiftKey?4:0,i=e.metaKey?8:0,r=e.ctrlKey?16:0,o=n|i|r,l.vt200Mouse?o&=r:l.normalMouse||(o=0),t=32+(o<<2)+t}var a=this.element,l=this,u=32;r(a,"mousedown",function(n){if(n.preventDefault(),l.focus(),l.mouseEvents)return e(n),l.vt200Mouse?(n.overrideType="mouseup",e(n),l.cancel(n)):(l.normalMouse&&r(l.document,"mousemove",t),l.x10Mouse||r(l.document,"mouseup",function i(n){return e(n),l.normalMouse&&o(l.document,"mousemove",t),o(l.document,"mouseup",i),l.cancel(n)}),l.cancel(n))}),r(a,"wheel",function(t){if(l.mouseEvents&&!(l.x10Mouse||l.vt300Mouse||l.decLocator))return e(t),l.cancel(t)}),r(a,"wheel",function(e){if(!l.mouseEvents)return l.viewport.onWheel(e),l.cancel(e)}),r(a,"touchstart",function(e){if(!l.mouseEvents)return l.viewport.onTouchStart(e),l.cancel(e)}),r(a,"touchmove",function(e){if(!l.mouseEvents)return l.viewport.onTouchMove(e),l.cancel(e)})},n.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)},n.prototype.refresh=function(e,t){this.renderer&&this.renderer.queueRefresh(e,t)},n.prototype.queueLinkification=function(e,t){if(this.linkifier)for(var n=e;n<=t;n++)this.linkifier.linkifyRow(n)},n.prototype.showCursor=function(){this.cursorState||(this.cursorState=1,this.refresh(this.buffer.y,this.buffer.y))},n.prototype.scroll=function(e){var t;this.buffer.lines.length===this.buffer.lines.maxLength&&(this.buffer.lines.trimStart(1),this.buffer.ybase--,0!==this.buffer.ydisp&&this.buffer.ydisp--),this.buffer.ybase++,this.userScrolling||(this.buffer.ydisp=this.buffer.ybase),t=this.buffer.ybase+this.rows-1,t-=this.rows-1-this.buffer.scrollBottom,t===this.buffer.lines.length?this.buffer.lines.push(this.blankLine(void 0,e)):this.buffer.lines.splice(t,0,this.blankLine(void 0,e)),0!==this.buffer.scrollTop&&(0!==this.buffer.ybase&&(this.buffer.ybase--,this.userScrolling||(this.buffer.ydisp=this.buffer.ybase)),this.buffer.lines.splice(this.buffer.ybase+this.buffer.scrollTop,1)),this.updateRange(this.buffer.scrollTop),this.updateRange(this.buffer.scrollBottom),this.emit("scroll",this.buffer.ydisp)},n.prototype.scrollDisp=function(e,t){if(e<0){if(0===this.buffer.ydisp)return;this.userScrolling=!0}else e+this.buffer.ydisp>=this.buffer.ybase&&(this.userScrolling=!1);var n=this.buffer.ydisp;this.buffer.ydisp=Math.max(Math.min(this.buffer.ydisp+e,this.buffer.ybase),0),n!==this.buffer.ydisp&&(t||this.emit("scroll",this.buffer.ydisp),this.refresh(0,this.rows-1))},n.prototype.scrollPages=function(e){this.scrollDisp(e*(this.rows-1))},n.prototype.scrollToTop=function(){this.scrollDisp(-this.buffer.ydisp)},n.prototype.scrollToBottom=function(){this.scrollDisp(this.buffer.ybase-this.buffer.ydisp)},n.prototype.write=function(e){if(this.writeBuffer.push(e),this.options.useFlowControl&&!this.xoffSentToCatchUp&&this.writeBuffer.length>=R&&(this.send(v.C0.DC3),this.xoffSentToCatchUp=!0),!this.writeInProgress&&this.writeBuffer.length>0){this.writeInProgress=!0;var t=this;setTimeout(function(){t.innerWrite()})}},n.prototype.innerWrite=function(){for(var e=this.writeBuffer.splice(0,L);e.length>0;){var t=e.shift();t.length;this.xoffSentToCatchUp&&0===e.length&&0===this.writeBuffer.length&&(this.send(v.C0.DC1),this.xoffSentToCatchUp=!1),this.refreshStart=this.buffer.y,this.refreshEnd=this.buffer.y;var n=this.parser.parse(t);this.parser.setState(n),this.updateRange(this.buffer.y),this.refresh(this.refreshStart,this.refreshEnd)}if(this.writeBuffer.length>0){var i=this;setTimeout(function(){i.innerWrite()},0)}else this.writeInProgress=!1},n.prototype.writeln=function(e){this.write(e+"\r\n")},n.prototype.attachCustomKeydownHandler=function(e){var t="attachCustomKeydownHandler() is DEPRECATED and will be removed soon. Please use attachCustomKeyEventHandler() instead.";console.warn(t),this.attachCustomKeyEventHandler(e)},n.prototype.attachCustomKeyEventHandler=function(e){this.customKeyEventHandler=e},n.prototype.setHypertextLinkHandler=function(e){if(!this.linkifier)throw new Error("Cannot attach a hypertext link handler before Terminal.open is called");this.linkifier.setHypertextLinkHandler(e),this.refresh(0,this.rows-1)},n.prototype.setHypertextValidationCallback=function(e){if(!this.linkifier)throw new Error("Cannot attach a hypertext validation callback before Terminal.open is called");this.linkifier.setHypertextValidationCallback(e),this.refresh(0,this.rows-1)},n.prototype.registerLinkMatcher=function(e,t,n){if(this.linkifier){var i=this.linkifier.registerLinkMatcher(e,t,n);return this.refresh(0,this.rows-1),i}},n.prototype.deregisterLinkMatcher=function(e){this.linkifier&&this.linkifier.deregisterLinkMatcher(e)&&this.refresh(0,this.rows-1)},n.prototype.hasSelection=function(){return!!this.selectionManager&&this.selectionManager.hasSelection},n.prototype.getSelection=function(){return this.selectionManager?this.selectionManager.selectionText:""},n.prototype.clearSelection=function(){this.selectionManager&&this.selectionManager.clearSelection()},n.prototype.selectAll=function(){this.selectionManager&&this.selectionManager.selectAll()},n.prototype.keyDown=function(e){if(this.customKeyEventHandler&&this.customKeyEventHandler(e)===!1)return!1;if(this.restartCursorBlinking(),!this.compositionHelper.keydown.bind(this.compositionHelper)(e))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var t=this.evaluateKeyEscapeSequence(e);return t.key===v.C0.DC3?this.writeStopped=!0:t.key===v.C0.DC1&&(this.writeStopped=!1),t.scrollDisp?(this.scrollDisp(t.scrollDisp),this.cancel(e,!0)):!!l(this,e)||(t.cancel&&this.cancel(e,!0),!t.key||(this.emit("keydown",e),this.emit("key",t.key,e),this.showCursor(),this.handler(t.key),this.cancel(e,!0)))},n.prototype.evaluateKeyEscapeSequence=function(e){var t={cancel:!1,key:void 0,scrollDisp:void 0},n=e.shiftKey<<0|e.altKey<<1|e.ctrlKey<<2|e.metaKey<<3;switch(e.keyCode){case 8:if(e.shiftKey){t.key=v.C0.BS;break}t.key=v.C0.DEL;break;case 9:if(e.shiftKey){t.key=v.C0.ESC+"[Z";break}t.key=v.C0.HT,t.cancel=!0;break;case 13:t.key=v.C0.CR,t.cancel=!0;break;case 27:t.key=v.C0.ESC,t.cancel=!0;break;case 37:n?(t.key=v.C0.ESC+"[1;"+(n+1)+"D",t.key==v.C0.ESC+"[1;3D"&&(t.key=this.browser.isMac?v.C0.ESC+"b":v.C0.ESC+"[1;5D")):this.applicationCursor?t.key=v.C0.ESC+"OD":t.key=v.C0.ESC+"[D";break;case 39:n?(t.key=v.C0.ESC+"[1;"+(n+1)+"C",t.key==v.C0.ESC+"[1;3C"&&(t.key=this.browser.isMac?v.C0.ESC+"f":v.C0.ESC+"[1;5C")):this.applicationCursor?t.key=v.C0.ESC+"OC":t.key=v.C0.ESC+"[C";break;case 38:n?(t.key=v.C0.ESC+"[1;"+(n+1)+"A",t.key==v.C0.ESC+"[1;3A"&&(t.key=v.C0.ESC+"[1;5A")):this.applicationCursor?t.key=v.C0.ESC+"OA":t.key=v.C0.ESC+"[A";break;case 40:n?(t.key=v.C0.ESC+"[1;"+(n+1)+"B",t.key==v.C0.ESC+"[1;3B"&&(t.key=v.C0.ESC+"[1;5B")):this.applicationCursor?t.key=v.C0.ESC+"OB":t.key=v.C0.ESC+"[B";break;case 45:e.shiftKey||e.ctrlKey||(t.key=v.C0.ESC+"[2~");break;case 46:n?t.key=v.C0.ESC+"[3;"+(n+1)+"~":t.key=v.C0.ESC+"[3~";break;case 36:n?t.key=v.C0.ESC+"[1;"+(n+1)+"H":this.applicationCursor?t.key=v.C0.ESC+"OH":t.key=v.C0.ESC+"[H";break;case 35:n?t.key=v.C0.ESC+"[1;"+(n+1)+"F":this.applicationCursor?t.key=v.C0.ESC+"OF":t.key=v.C0.ESC+"[F";break;case 33:e.shiftKey?t.scrollDisp=-(this.rows-1):t.key=v.C0.ESC+"[5~";break;case 34:e.shiftKey?t.scrollDisp=this.rows-1:t.key=v.C0.ESC+"[6~";break;case 112:n?t.key=v.C0.ESC+"[1;"+(n+1)+"P":t.key=v.C0.ESC+"OP";break;case 113:n?t.key=v.C0.ESC+"[1;"+(n+1)+"Q":t.key=v.C0.ESC+"OQ";break;case 114:n?t.key=v.C0.ESC+"[1;"+(n+1)+"R":t.key=v.C0.ESC+"OR";break;case 115:n?t.key=v.C0.ESC+"[1;"+(n+1)+"S":t.key=v.C0.ESC+"OS";break;case 116:n?t.key=v.C0.ESC+"[15;"+(n+1)+"~":t.key=v.C0.ESC+"[15~";break;case 117:n?t.key=v.C0.ESC+"[17;"+(n+1)+"~":t.key=v.C0.ESC+"[17~";break;case 118:n?t.key=v.C0.ESC+"[18;"+(n+1)+"~":t.key=v.C0.ESC+"[18~";break;case 119:n?t.key=v.C0.ESC+"[19;"+(n+1)+"~":t.key=v.C0.ESC+"[19~";break;case 120:n?t.key=v.C0.ESC+"[20;"+(n+1)+"~":t.key=v.C0.ESC+"[20~";break;case 121:n?t.key=v.C0.ESC+"[21;"+(n+1)+"~":t.key=v.C0.ESC+"[21~";break;case 122:n?t.key=v.C0.ESC+"[23;"+(n+1)+"~":t.key=v.C0.ESC+"[23~";break;case 123:n?t.key=v.C0.ESC+"[24;"+(n+1)+"~":t.key=v.C0.ESC+"[24~";break;default:!e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?this.browser.isMac||!e.altKey||e.ctrlKey||e.metaKey?this.browser.isMac&&!e.altKey&&!e.ctrlKey&&e.metaKey&&65===e.keyCode&&this.selectAll():e.keyCode>=65&&e.keyCode<=90?t.key=v.C0.ESC+String.fromCharCode(e.keyCode+32):192===e.keyCode?t.key=v.C0.ESC+"`":e.keyCode>=48&&e.keyCode<=57&&(t.key=v.C0.ESC+(e.keyCode-48)):e.keyCode>=65&&e.keyCode<=90?t.key=String.fromCharCode(e.keyCode-64):32===e.keyCode?t.key=String.fromCharCode(0):e.keyCode>=51&&e.keyCode<=55?t.key=String.fromCharCode(e.keyCode-51+27):56===e.keyCode?t.key=String.fromCharCode(127):219===e.keyCode?t.key=String.fromCharCode(27):220===e.keyCode?t.key=String.fromCharCode(28):221===e.keyCode&&(t.key=String.fromCharCode(29))}return t},n.prototype.setgLevel=function(e){this.glevel=e,this.charset=this.charsets[e]},n.prototype.setgCharset=function(e,t){this.charsets[e]=t,this.glevel===e&&(this.charset=t)},n.prototype.keyPress=function(e){var t;if(this.customKeyEventHandler&&this.customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(null==e.which)t=e.keyCode;else{if(0===e.which||0===e.charCode)return!1;t=e.which}return!(!t||(e.altKey||e.ctrlKey||e.metaKey)&&!l(this,e))&&(t=String.fromCharCode(t),this.emit("keypress",t,e),this.emit("key",t,e),this.showCursor(),this.handler(t),!0)},n.prototype.send=function(e){var t=this;this.queue||setTimeout(function(){t.handler(t.queue),t.queue=""},1),this.queue+=e},n.prototype.bell=function(){if(this.visualBell){var e=this;this.element.style.borderColor="white",setTimeout(function(){e.element.style.borderColor=""},10),this.popOnBell&&this.focus()}},n.prototype.log=function(){if(this.debug&&this.context.console&&this.context.console.log){var e=Array.prototype.slice.call(arguments);this.context.console.log.apply(this.context.console,e)}},n.prototype.error=function(){if(this.debug&&this.context.console&&this.context.console.error){var e=Array.prototype.slice.call(arguments);this.context.console.error.apply(this.context.console,e)}},n.prototype.resize=function(e,t){if(!isNaN(e)&&!isNaN(t)){t>this.getOption("scrollback")&&this.setOption("scrollback",t);var n;if(e===this.cols&&t===this.rows)return void(this.charMeasure.width&&this.charMeasure.height||this.charMeasure.measure());for(e<1&&(e=1),t<1&&(t=1),this.buffers.resize(e,t);this.children.length<t;)this.insertRow();for(;this.children.length>t;)n=this.children.shift(),n&&n.parentNode.removeChild(n);this.cols=e,this.rows=t,this.setupStops(this.cols),this.charMeasure.measure(),this.refresh(0,this.rows-1),this.geometry=[this.cols,this.rows],this.emit("resize",{terminal:this,cols:e,rows:t})}},n.prototype.updateRange=function(e){e<this.refreshStart&&(this.refreshStart=e),e>this.refreshEnd&&(this.refreshEnd=e)},n.prototype.maxRange=function(){this.refreshStart=0,this.refreshEnd=this.rows-1},n.prototype.setupStops=function(e){for(null!=e?this.buffer.tabs[e]||(e=this.prevStop(e)):(this.buffer.tabs={},e=0);e<this.cols;e+=this.getOption("tabStopWidth"))this.buffer.tabs[e]=!0},n.prototype.prevStop=function(e){for(null==e&&(e=this.buffer.x);!this.buffer.tabs[--e]&&e>0;);return e>=this.cols?this.cols-1:e<0?0:e},n.prototype.nextStop=function(e){for(null==e&&(e=this.buffer.x);!this.buffer.tabs[++e]&&e<this.cols;);return e>=this.cols?this.cols-1:e<0?0:e},n.prototype.eraseRight=function(e,t){var n=this.buffer.lines.get(this.buffer.ybase+t);if(n){for(var i=[this.eraseAttr()," ",1];e<this.cols;e++)n[e]=i;this.updateRange(t)}},n.prototype.eraseLeft=function(e,t){var n=this.buffer.lines.get(this.buffer.ybase+t);if(n){var i=[this.eraseAttr()," ",1];for(e++;e--;)n[e]=i;this.updateRange(t)}},n.prototype.clear=function(){if(0!==this.buffer.ybase||0!==this.buffer.y){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var e=1;e<this.rows;e++)this.buffer.lines.push(this.blankLine());this.refresh(0,this.rows-1),this.emit("scroll",this.buffer.ydisp)}},n.prototype.eraseLine=function(e){this.eraseRight(0,e)},n.prototype.blankLine=function(e,t){var n=e?this.eraseAttr():this.defAttr,i=[n," ",1],r=[],o=0;for(t&&(r.isWrapped=t);o<this.cols;o++)r[o]=i;return r},n.prototype.ch=function(e){return e?[this.eraseAttr()," ",1]:[this.defAttr," ",1]},n.prototype.is=function(e){var t=this.termName;return 0===(t+"").indexOf(e)},n.prototype.handler=function(e){this.options.disableStdin||(this.selectionManager&&this.selectionManager.hasSelection&&this.selectionManager.clearSelection(),this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),this.emit("data",e))},n.prototype.handleTitle=function(e){this.emit("title",e)},n.prototype.index=function(){this.buffer.y++,this.buffer.y>this.buffer.scrollBottom&&(this.buffer.y--,this.scroll()),this.buffer.x>=this.cols&&this.buffer.x--},n.prototype.reverseIndex=function(){this.buffer.y===this.buffer.scrollTop?(this.buffer.lines.shiftElements(this.buffer.y+this.buffer.ybase,this.rows-1,1),this.buffer.lines.set(this.buffer.y+this.buffer.ybase,this.blankLine(!0)),this.updateRange(this.buffer.scrollTop),this.updateRange(this.buffer.scrollBottom)):this.buffer.y--},n.prototype.reset=function(){this.options.rows=this.rows,this.options.cols=this.cols;var e=this.customKeyEventHandler,t=this.cursorBlinkInterval,i=this.inputHandler;n.call(this,this.options),this.customKeyEventHandler=e,this.cursorBlinkInterval=t,this.inputHandler=i,this.refresh(0,this.rows-1),this.viewport.syncScrollArea()},n.prototype.tabSet=function(){this.buffer.tabs[this.buffer.x]=!0},n.prototype.matchColor=u,u._cache={},u.distance=function(e,t,n,i,r,o){return Math.pow(30*(e-i),2)+Math.pow(59*(t-r),2)+Math.pow(11*(n-o),2)},n.translateBufferLineToString=k.translateBufferLineToString,n.EventEmitter=m.EventEmitter,n.inherits=a,n.on=r,n.off=o,n.cancel=s,i.exports=n}()}),require.register("web/static/js/toolbar.js",function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=t("phoenix"),a=t("./toolbar/jquery"),l=i(a),u=t("./toolbar/logger"),c=i(u),h=t("./toolbar/breakpoints_panel"),f=i(h),p=t("./toolbar/history_panel"),d=i(p),m=t("prismjs"),g=i(m);t("prismjs/components/prism-elixir"),t("prismjs/components/prism-sql"),t("prismjs/plugins/normalize-whitespace/prism-normalize-whitespace"),t("prismjs/plugins/line-numbers/prism-line-numbers"),t("prismjs/plugins/line-highlight/prism-line-highlight");var y=function(){function e(t){r(this,e),this.logger=new c["default"](t.debug),this.originalRequestId=t.requestId,this.resetActivePanel(),this.socket=this.initSocket(),this.toolbar=(0,l["default"])("<div>",{id:"ex-debug-toolbar"}),this.breakpointsPanel=new f["default"](this.socket,this.toolbar),this.historyPanel=new d["default"](this.toolbar,this.originalRequestId,this.render.bind(this)),(0,l["default"])("body").append(this.toolbar)}return o(e,[{key:"render",value:function(e){this.logger.debug("Rendering request",e),this.joinToolbarChannel(this.socket,e)}},{key:"initSocket",value:function(){var e=new s.Socket("/__ex_debug_toolbar__/socket");return e.connect(),e}},{key:"joinToolbarChannel",value:function(e,t){var n=this;this.logger.debug("Joining channel",t);var i=e.channel("toolbar:request:"+t);i.join().receive("ok",this.onChannelResponse.bind(this)).receive("error",function(e){n.logger.debug("Unable to join channel",e)}),i.on("request:ready",this.onChannelResponse.bind(this))}},{key:"onChannelResponse",value:function(e){e.html?(this.logger.debug("Received response from channel"),this.renderToolbar(e)):this.logger.debug("Waiting for request to be processed")}},{key:"renderToolbar",value:function(e){var t=e.html,n=e.uuid,i=e.request;this.logger.debug("Request data",i);var r=(0,l["default"])("<div>").html(t);this.originalRequestId!=n&&(this.logger.debug("Historic request"),r.addClass("historic-request")),this.toolbar.html(r),this.renderPanels(this.toolbar),this.renderPopovers(this.toolbar),this.breakpointsPanel.render(n),this.historyPanel.render(n),this.highlightCode(this.toolbar)}},{key:"renderPanels",value:function(e){e.mouseleave(this.hideActivePanel.bind(this)).find('[data-toggle="panel"]').hover(this.showPanel.bind(this)),e.find(".panel-body").on("mousewheel DOMMouseScroll",this.scrollDivOnly)}},{key:"scrollDivOnly",value:function(e){e.preventDefault();var t=e.originalEvent,n=t.wheelDelta||-t.detail;this.scrollTop-=n}},{key:"hideActivePanel",value:function(){this.activePanel&&(this.activePanel.slideUp(150),this.resetActivePanel())}},{key:"showPanel",value:function(e){var t=e.target,n=(0,l["default"])(t).parent().find(".panel"),i=this.getPanelId(n);this.activePanelId!=i&&(n.slideDown(150),this.activePanel&&this.activePanel.slideUp(50),this.activePanel=n,this.activePanelId=i)}},{key:"resetActivePanel",value:function(){this.activePanel=null,this.activePanelId=null}},{key:"getPanelId",value:function(e){if(!e.data("panel-id")){var t=Math.round((new Date).getTime()+100*Math.random());e.data("panel-id",t)}return e.data("panel-id")}},{key:"highlightCode",value:function(e){g["default"].plugins.NormalizeWhitespace.setDefaults({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0,"remove-initial-line-feed":!0}),e.find(".code").each(function(e,t){g["default"].highlightElement(t,!1)})}},{key:"renderPopovers",value:function(e){(0,l["default"])(e).find('[data-toggle="popover"]').popover()}}]),e}(),v=window.ExDebugToolbar;new y(v).render(v.requestId)}),require.register("web/static/js/toolbar/breakpoints_panel.js",function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=t("./jquery"),a=i(s),l=t("xterm"),u=i(l);t("xterm/lib/addons/fit/fit"),t("xterm/lib/addons/fullscreen/fullscreen");var c=function(){function e(t,n){r(this,e),this.socket=t,this.toolbar=n}return o(e,[{key:"render",value:function(e){this.request_id=e,this.appendModalToBody(),this.renderModal(),this.renderCodeSnippets()}},{key:"appendModalToBody",value:function(){(0,a["default"])("#breakpoints-modal",this.toolbar).detach().appendTo(this.toolbar)}},{key:"renderModal",value:function(){(0,a["default"])("#breakpoints-modal",this.toolbar).on("shown.bs.modal",this.renderTerm.bind(this)).on("hidden.bs.modal",this.destroyTerm.bind(this)),(0,a["default"])(".breakpoint",this.toolbar).click(this.showModal.bind(this)),(0,a["default"])('[data-toggle="fullscreen"]',this.toolbar).click(this.toggleFullscreen.bind(this)),this.renderBindingPopover(),(0,a["default"])(window).resize(this.resizeTerm.bind(this))}},{key:"renderCodeSnippets",value:function(){this.toolbar.find(".breakpoint").each(function(e,t){var n=(0,a["default"])(t);n.hover(function(){var e=n.find(".code-snippet").html();(0,a["default"])("#code-snippet-container").html(e)})})}},{key:"renderBindingPopover",value:function(){var e=this;(0,a["default"])('[data-toggle="binding"]',this.toolbar).popover({container:"body",content:function(){return(0,a["default"])('*[data-breakpoint-id="'+e.breakpoint_id+'"] .binding-popover',e.toolbar).html()},html:!0,trigger:"hover",title:"Binding"})}},{key:"showModal",value:function(e){var t=e.target;this.breakpoint_id=(0,a["default"])(t).closest("tr").data("breakpoint-id"),(0,a["default"])("#breakpoints-modal",this.toolbar).modal()}},{key:"toggleFullscreen",value:function(){this.term.toggleFullscreen(),(0,a["default"])("#breakpoints-modal",this.toolbar).toggleClass("fullscreen"),this.term.focus(),this.resizeTerm()}},{key:"resizeTerm",value:function(){if(this.term){var e=(0,a["default"])("#breakpoints-modal .terminal.xterm.fullscreen",this.toolbar),t=(0,a["default"])("#terminal-container",this.toolbar);e[0]?(t.height(e.height()),t.width(e.width())):(t.height(""),t.width("")),this.term.fit()}}},{key:"destroyTerm",value:function(){this.channel.leave(),this.term.destroy(),(0,a["default"])("#breakpoints-modal",this.toolbar).removeClass("fullscreen")}},{key:"renderTerm",value:function(){var e=this;this.channel=this.joinBreakpointChannel(this.socket),this.term=new u["default"]({cursorBlink:!0}),this.term.open(document.getElementById("terminal-container"),!0),this.term.on("data",function(t){return e.channel.push("input",{input:t})}),this.resizeTerm()}},{key:"joinBreakpointChannel",value:function(e){var t=this,n=e.channel("breakpoint:"+this.breakpoint_id);return n.join(),n.on("output",function(e){var n=e.output;return t.term.write(n)}),n}}]),e}();e["default"]=c}),require.register("web/static/js/toolbar/history_panel.js",function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=t("./jquery"),a=i(s),l=function(){function e(t,n,i){r(this,e),this.toolbar=t,this.addEventListeners(i,n)}return o(e,[{key:"render",value:function(e){this.toolbar.find(".history-point").removeClass("active"),this.toolbar.find('.history-point[data-uuid="'+e+'"]').toggleClass("active")}},{key:"addEventListeners",value:function(e,t){this.toolbar.on("click",".history-point:not(.active)",function(t){console.log("history click"),t.preventDefault(),e((0,a["default"])(this).data("uuid"))}),this.toolbar.on("click",".back-to-current-request",function(n){n.preventDefault(),e(t)}),this.toolbar.on("click",".history-expand, .history-collapse",function(e){e.preventDefault(),e.stopPropagation();var t=(0,a["default"])(this).closest("tr");t.nextUntil(".last-request").fadeToggle(),t.find(".history-expand").toggle(),t.find(".history-collapse").toggle()})}}]),e}();e["default"]=l}),require.register("web/static/js/toolbar/jquery.js",function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(e,"__esModule",{value:!0});var r=t("jquery"),o=i(r),s=window.jQuery,a=window.$;window.jQuery=o["default"],window.$=o["default"],t("bootstrap-sass"),window.jQuery=s,window.$=a,e["default"]=o["default"]}),require.register("web/static/js/toolbar/logger.js",function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function(){function e(t){i(this,e),this.enabled=t}return r(e,[{key:"debug",value:function(){for(var e,t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];this.enabled&&(e=console).log.apply(e,["[ExDebugToolbar]"].concat(n))}}]),e}();e["default"]=o}),require.alias("bootstrap-sass/assets/javascripts/bootstrap.js","bootstrap-sass"),require.alias("jquery/dist/jquery.js","jquery"),require.alias("process/browser.js","process"),require.alias("prismjs/prism.js","prismjs"),require.alias("phoenix/priv/static/phoenix.js","phoenix"),require.alias("xterm/lib/xterm.js","xterm"),require.alias("buffer/index.js","buffer"),e=require("process"),require.register("___globals___",function(e,t,n){})}(),require("___globals___"),require("web/static/js/toolbar");