/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/lib/common/beautify",["require","exports"],function(e,t){function n(e){return e}t.js_beautify=n}),/*! Microsoft grants you the right to use these JavaScript and CSS files for the sole purpose of either:
(i) interacting through your browser with the Microsoft website, subject to the website’s terms of use;
or (ii) using the files as included with a Microsoft product subject to that product’s license terms.
Microsoft reserves all other rights to the files not expressly granted by Microsoft, whether by implication,
estoppel or otherwise. The notices and licenses below are for informational purposes only.
*/
/*

  The MIT License (MIT)

  Copyright (c) 2007-2013 Einar Lielmanis and contributors.

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.


 CSS Beautifier
---------------

    Written by Harutyun Amirjanyan, (amirjanyan@gmail.com)

    Based on code initially developed by: Einar Lielmanis, <einar@jsbeautifier.org>
        http://jsbeautifier.org/

    Usage:
        css_beautify(source_text);
        css_beautify(source_text, options);

    The options are (default in brackets):
        indent_size (4)                   — indentation size,
        indent_char (space)               — character to indent with,
        selector_separator_newline (true) - separate selectors with newline or
                                            not (e.g. "a,\nbr" or "a, br")
        end_with_newline (false)          - end with a newline
        newline_between_rules (true)      - add a new line after every css rule

    e.g

    css_beautify(css_source_text, {
      'indent_size': 1,
      'indent_char': '\t',
      'selector_separator': ' ',
      'end_with_newline': false,
      'newline_between_rules': true
    });
*/
function(){function e(t,n){function r(){return _=t.charAt(++S),_||""}function o(e){var n="",o=S;return e&&a(),n=t.charAt(S+1)||"",S=o-1,r(),n}function i(e){for(var n=S;r();)if("\\"===_)r();else{if(-1!==e.indexOf(_))break;if("\n"===_)break}return t.substring(n,S+1)}function s(e){var t=S,n=i(e);return S=t-1,r(),n}function a(){for(var e="";w.test(o());)r(),e+=_;return e}function c(){var e="";for(_&&w.test(_)&&(e=_);w.test(r());)e+=_;return e}function l(e){var n=S;for(e="/"===o(),r();r();){if(!e&&"*"===_&&"/"===o()){r();break}if(e&&"\n"===_)return t.substring(n,S)}return t.substring(n,S)+_}function u(e){return t.substring(S-e.length,S).toLowerCase()===e}function h(){for(var e=0,n=S+1;n<t.length;n++){var r=t.charAt(n);if("{"===r)return!0;if("("===r)e+=1;else if(")"===r){if(0==e)return!1;e-=1}else if(";"===r||"}"===r)return!1}return!1}function d(){C++,x+=T}function p(){C--,x=x.slice(0,-m)}n=n||{},t=t||"",t=t.replace(/\r\n|[\r\u2028\u2029]/g,"\n");var m=n.indent_size||4,f=n.indent_char||" ",g=void 0===n.selector_separator_newline?!0:n.selector_separator_newline,v=void 0===n.end_with_newline?!1:n.end_with_newline,b=void 0===n.newline_between_rules?!0:n.newline_between_rules,y=n.eol?n.eol:"\n";"string"==typeof m&&(m=parseInt(m,10)),n.indent_with_tabs&&(f="	",m=1),y=y.replace(/\\r/,"\r").replace(/\\n/,"\n");var _,w=/^\s+$/,S=-1,k=0,x=t.match(/^[\t ]*/)[0],T=new Array(m+1).join(f),C=0,E=0,I={};I["{"]=function(e){I.singleSpace(),P.push(e),I.newLine()},I["}"]=function(e){I.newLine(),P.push(e),I.newLine()},I._lastCharWhitespace=function(){return w.test(P[P.length-1])},I.newLine=function(e){P.length&&(e||"\n"===P[P.length-1]||I.trim(),P.push("\n"),x&&P.push(x))},I.singleSpace=function(){P.length&&!I._lastCharWhitespace()&&P.push(" ")},I.preserveSingleSpace=function(){R&&I.singleSpace()},I.trim=function(){for(;I._lastCharWhitespace();)P.pop()};for(var P=[],A=!1,O=!1,M=!1,L="",N="";;){var j=c(),R=""!==j,F=-1!==j.indexOf("\n");if(N=L,L=_,!_)break;if("/"===_&&"*"===o()){var D=0===C;(F||D)&&I.newLine(),P.push(l()),I.newLine(),D&&I.newLine(!0)}else if("/"===_&&"/"===o())F||"{"===N||I.trim(),I.singleSpace(),P.push(l()),I.newLine();else if("@"===_){I.preserveSingleSpace(),P.push(_);var z=s(": ,;{}()[]/='\"");z.match(/[ :]$/)&&(r(),z=i(": ").replace(/\s$/,""),P.push(z),I.singleSpace()),z=z.replace(/\s$/,""),z in e.NESTED_AT_RULE&&(E+=1,z in e.CONDITIONAL_GROUP_RULE&&(M=!0))}else"#"===_&&"{"===o()?(I.preserveSingleSpace(),P.push(i("}"))):"{"===_?"}"===o(!0)?(a(),r(),I.singleSpace(),P.push("{}"),I.newLine(),b&&0===C&&I.newLine(!0)):(d(),I["{"](_),M?(M=!1,A=C>E):A=C>=E):"}"===_?(p(),I["}"](_),A=!1,O=!1,E&&E--,b&&0===C&&I.newLine(!0)):":"===_?(a(),!A&&!M||u("&")||h()?":"===o()?(r(),P.push("::")):P.push(":"):(O=!0,P.push(":"),I.singleSpace())):'"'===_||"'"===_?(I.preserveSingleSpace(),P.push(i(_))):";"===_?(O=!1,P.push(_),I.newLine()):"("===_?u("url")?(P.push(_),a(),r()&&(")"!==_&&'"'!==_&&"'"!==_?P.push(i(")")):S--)):(k++,I.preserveSingleSpace(),P.push(_),a()):")"===_?(P.push(_),k--):","===_?(P.push(_),a(),g&&!O&&1>k?I.newLine():I.singleSpace()):"]"===_?P.push(_):"["===_?(I.preserveSingleSpace(),P.push(_)):"="===_?(a(),_="=",P.push(_)):(I.preserveSingleSpace(),P.push(_))}var W="";return x&&(W+=x),W+=P.join("").replace(/[\r\n\t ]+$/,""),v&&(W+="\n"),"\n"!=y&&(W=W.replace(/[\n]/g,y)),W}e.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},e.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},"function"==typeof define&&define.amd?define("vs/languages/lib/common/beautify-css",[],function(){return{css_beautify:e}}):"undefined"!=typeof exports?exports.css_beautify=e:"undefined"!=typeof window?window.css_beautify=e:"undefined"!=typeof global&&(global.css_beautify=e)}(),/*! Microsoft grants you the right to use these JavaScript and CSS files for the sole purpose of either:
(i) interacting through your browser with the Microsoft website, subject to the website’s terms of use;
or (ii) using the files as included with a Microsoft product subject to that product’s license terms.
Microsoft reserves all other rights to the files not expressly granted by Microsoft, whether by implication,
estoppel or otherwise. The notices and licenses below are for informational purposes only.
*/
/*

  The MIT License (MIT)

  Copyright (c) 2007-2013 Einar Lielmanis and contributors.

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.


 Style HTML
---------------

  Written by Nochum Sossonko, (nsossonko@hotmail.com)

  Based on code initially developed by: Einar Lielmanis, <einar@jsbeautifier.org>
    http://jsbeautifier.org/

  Usage:
    style_html(html_source);

    style_html(html_source, options);

  The options are:
    indent_inner_html (default false)  — indent <head> and <body> sections,
    indent_size (default 4)          — indentation size,
    indent_char (default space)      — character to indent with,
    wrap_line_length (default 250)            -  maximum amount of characters per line (0 = disable)
    brace_style (default "collapse") - "collapse" | "expand" | "end-expand" | "none"
            put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line, or attempt to keep them where they are.
    unformatted (defaults to inline tags) - list of tags, that shouldn't be reformatted
    indent_scripts (default normal)  - "keep"|"separate"|"normal"
    preserve_newlines (default true) - whether existing line breaks before elements should be preserved
                                        Only works before elements, not inside tags or for text.
    max_preserve_newlines (default unlimited) - maximum number of line breaks to be preserved in one chunk
    indent_handlebars (default false) - format and indent {{#foo}} and {{/foo}}
    end_with_newline (false)          - end with a newline
    extra_liners (default [head,body,/html]) -List of tags that should have an extra newline before them.

    e.g.

    style_html(html_source, {
      'indent_inner_html': false,
      'indent_size': 2,
      'indent_char': ' ',
      'wrap_line_length': 78,
      'brace_style': 'expand',
      'unformatted': ['a', 'sub', 'sup', 'b', 'i', 'u'],
      'preserve_newlines': true,
      'max_preserve_newlines': 5,
      'indent_handlebars': false,
      'extra_liners': ['/html']
    });
*/
function(){function e(e){return e.replace(/^\s+/g,"")}function t(e){return e.replace(/\s+$/g,"")}function n(n,r,o,i){function s(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=c,this.Utils={whitespace:"\n\r	 ".split(""),single_token:"br,input,link,meta,source,!doctype,basefont,base,area,hr,wbr,param,img,isindex,embed".split(","),extra_liners:_,in_array:function(e,t){for(var n=0;n<t.length;n++)if(e===t[n])return!0;return!1}},this.is_whitespace=function(e){for(var t=0;t<e.length;e++)if(!this.Utils.in_array(e.charAt(t),this.Utils.whitespace))return!1;return!0},this.traverse_whitespace=function(){var e="";if(e=this.input.charAt(this.pos),this.Utils.in_array(e,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(e,this.Utils.whitespace);)m&&"\n"===e&&this.newlines<=f&&(this.newlines+=1),this.pos++,e=this.input.charAt(this.pos);return!0}return!1},this.space_or_wrap=function(e){this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,e),this.print_indentation(e)):(this.line_char_count++,e.push(" "))},this.get_content=function(){for(var e="",t=[];"<"!==this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(this.traverse_whitespace())this.space_or_wrap(t);else{if(g){var n=this.input.substr(this.pos,3);if("{{#"===n||"{{/"===n)break;if("{{!"===n)return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"];if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}e=this.input.charAt(this.pos),this.pos++,this.line_char_count++,t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos===this.input.length)return["","TK_EOF"];var t="",n=new RegExp("</"+e+"\\s*>","igm");n.lastIndex=this.pos;var r=n.exec(this.input),o=r?r.index:this.input.length;return this.pos<o&&(t=this.input.substring(this.pos,o),this.pos=o),t},this.record_tag=function(e){this.tags[e+"count"]?(this.tags[e+"count"]++,this.tags[e+this.tags[e+"count"]]=this.indent_level):(this.tags[e+"count"]=1,this.tags[e+this.tags[e+"count"]]=this.indent_level),this.tags[e+this.tags[e+"count"]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags[e+"count"]},this.retrieve_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags[e+"count"]+"parent"],delete this.tags[e+this.tags[e+"count"]],1===this.tags[e+"count"]?delete this.tags[e+"count"]:this.tags[e+"count"]--}},this.indent_to_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]])}},this.get_tag=function(e){var t,n,r,o="",i=[],s="",a=!1,c=!0,l=this.pos,h=this.line_char_count;e=void 0!==e?e:!1;do{if(this.pos>=this.input.length)return e&&(this.pos=l,this.line_char_count=h),i.length?i.join(""):["","TK_EOF"];if(o=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(o,this.Utils.whitespace))a=!0;else{if(("'"===o||'"'===o)&&(o+=this.get_unformatted(o),a=!0),"="===o&&(a=!1),i.length&&"="!==i[i.length-1]&&">"!==o&&a){if(this.space_or_wrap(i),a=!1,!c&&"force"===v&&"/"!==o){this.print_newline(!0,i),this.print_indentation(i);for(var d=0;b>d;d++)i.push(u)}for(var m=0;m<i.length;m++)if(" "===i[m]){c=!1;break}}if(g&&"<"===r&&o+this.input.charAt(this.pos)==="{{"&&(o+=this.get_unformatted("}}"),i.length&&" "!==i[i.length-1]&&"<"!==i[i.length-1]&&(o=" "+o),a=!0),"<"!==o||r||(t=this.pos-1,r="<"),g&&!r&&i.length>=2&&"{"===i[i.length-1]&&"{"===i[i.length-2]&&(t="#"===o||"/"===o||"!"===o?this.pos-3:this.pos-2,r="{"),this.line_char_count++,i.push(o),i[1]&&("!"===i[1]||"?"===i[1]||"%"===i[1])){i=[this.get_comment(t)];break}if(g&&i[1]&&"{"===i[1]&&i[2]&&"!"===i[2]){i=[this.get_comment(t)];break}if(g&&"{"===r&&i.length>2&&"}"===i[i.length-2]&&"}"===i[i.length-1])break}}while(">"!==o);var f,y,_=i.join("");f=-1!==_.indexOf(" ")?_.indexOf(" "):"{"===_.charAt(0)?_.indexOf("}"):_.indexOf(">"),y="<"!==_.charAt(0)&&g?"#"===_.charAt(2)?3:2:1;var w=_.substring(y,f).toLowerCase();return"/"===_.charAt(_.length-2)||this.Utils.in_array(w,this.Utils.single_token)?e||(this.tag_type="SINGLE"):g&&"{"===_.charAt(0)&&"else"===w?e||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(w,p)?(s=this.get_unformatted("</"+w+">",_),i.push(s),n=this.pos-1,this.tag_type="SINGLE"):"script"===w&&(-1===_.search("type")||_.search("type")>-1&&_.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript)/)>-1)?e||(this.record_tag(w),this.tag_type="SCRIPT"):"style"===w&&(-1===_.search("type")||_.search("type")>-1&&_.search("text/css")>-1)?e||(this.record_tag(w),this.tag_type="STYLE"):"!"===w.charAt(0)?e||(this.tag_type="SINGLE",this.traverse_whitespace()):e||("/"===w.charAt(0)?(this.retrieve_tag(w.substring(1)),this.tag_type="END"):(this.record_tag(w),"html"!==w.toLowerCase()&&(this.indent_content=!0),this.tag_type="START"),this.traverse_whitespace()&&this.space_or_wrap(i),this.Utils.in_array(w,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!==this.output[this.output.length-2]&&this.print_newline(!0,this.output))),e&&(this.pos=l,this.line_char_count=h),i.join("")},this.get_comment=function(e){var t="",n=">",r=!1;for(this.pos=e,input_char=this.input.charAt(this.pos),this.pos++;this.pos<=this.input.length&&(t+=input_char,t.charAt(t.length-1)!==n.charAt(n.length-1)||-1===t.indexOf(n));)!r&&t.length<10&&(0===t.indexOf("<![if")?(n="<![endif]>",r=!0):0===t.indexOf("<![cdata[")?(n="]]>",r=!0):0===t.indexOf("<![")?(n="]>",r=!0):0===t.indexOf("<!--")?(n="-->",r=!0):0===t.indexOf("{{!")?(n="}}",r=!0):0===t.indexOf("<?")?(n="?>",r=!0):0===t.indexOf("<%")&&(n="%>",r=!0)),input_char=this.input.charAt(this.pos),this.pos++;return t},this.get_unformatted=function(e,t){if(t&&-1!==t.toLowerCase().indexOf(e))return"";var n="",r="",o=0,i=!0;do{if(this.pos>=this.input.length)return r;if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace)){if(!i){this.line_char_count--;continue}if("\n"===n||"\r"===n){r+="\n",this.line_char_count=0;continue}}r+=n,this.line_char_count++,i=!0,g&&"{"===n&&r.length&&"{"===r.charAt(r.length-2)&&(r+=this.get_unformatted("}}"),o=r.length)}while(-1===r.toLowerCase().indexOf(e,o));return r},this.get_token=function(){var e;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var t=this.last_token.substr(7);return e=this.get_contents_to(t),"string"!=typeof e?e:[e,"TK_"+t]}if("CONTENT"===this.current_mode)return e=this.get_content(),"string"!=typeof e?e:[e,"TK_CONTENT"];if("TAG"===this.current_mode){if(e=this.get_tag(),"string"!=typeof e)return e;var n="TK_TAG_"+this.tag_type;return[e,n]}},this.get_full_indent=function(e){return e=this.indent_level+e||0,1>e?"":Array(e+1).join(this.indent_string)},this.is_unformatted=function(e,t){if(!this.Utils.in_array(e,t))return!1;if("a"!==e.toLowerCase()||!this.Utils.in_array("a",t))return!0;var n=this.get_tag(!0),r=(n||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!r||this.Utils.in_array(r,t)?!0:!1},this.printer=function(n,r,o,i,s){this.input=n||"",this.input=this.input.replace(/\r\n|[\r\u2028\u2029]/g,"\n"),this.output=[],this.indent_character=r,this.indent_string="",this.indent_size=o,this.brace_style=s,this.indent_level=0,this.wrap_line_length=i,this.line_char_count=0;for(var a=0;a<this.indent_size;a++)this.indent_string+=this.indent_character;this.print_newline=function(e,n){this.line_char_count=0,n&&n.length&&(e||"\n"!==n[n.length-1])&&("\n"!==n[n.length-1]&&(n[n.length-1]=t(n[n.length-1])),n.push("\n"))},this.print_indentation=function(e){for(var t=0;t<this.indent_level;t++)e.push(this.indent_string),this.line_char_count+=this.indent_string.length},this.print_token=function(t){(!this.is_whitespace(t)||this.output.length)&&((t||""!==t)&&this.output.length&&"\n"===this.output[this.output.length-1]&&(this.print_indentation(this.output),t=e(t)),this.print_token_raw(t))},this.print_token_raw=function(e){this.newlines>0&&(e=t(e)),e&&""!==e&&(e.length>1&&"\n"===e.charAt(e.length-1)?(this.output.push(e.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(e));for(var n=0;n<this.newlines;n++)this.print_newline(n>0,this.output);this.newlines=0},this.indent=function(){this.indent_level++},this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}var a,c,l,u,h,d,p,m,f,g,v,b,y,_,w;for(r=r||{},void 0!==r.wrap_line_length&&0!==parseInt(r.wrap_line_length,10)||void 0===r.max_char||0===parseInt(r.max_char,10)||(r.wrap_line_length=r.max_char),c=void 0===r.indent_inner_html?!1:r.indent_inner_html,l=void 0===r.indent_size?4:parseInt(r.indent_size,10),u=void 0===r.indent_char?" ":r.indent_char,d=void 0===r.brace_style?"collapse":r.brace_style,h=0===parseInt(r.wrap_line_length,10)?32786:parseInt(r.wrap_line_length||250,10),p=r.unformatted||["a","span","img","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"],m=void 0===r.preserve_newlines?!0:r.preserve_newlines,f=m?isNaN(parseInt(r.max_preserve_newlines,10))?32786:parseInt(r.max_preserve_newlines,10):0,g=void 0===r.indent_handlebars?!1:r.indent_handlebars,v=void 0===r.wrap_attributes?"auto":r.wrap_attributes,b=void 0===r.wrap_attributes_indent_size?l:parseInt(r.wrap_attributes_indent_size,10)||l,y=void 0===r.end_with_newline?!1:r.end_with_newline,_="object"==typeof r.extra_liners&&r.extra_liners?r.extra_liners.concat():"string"==typeof r.extra_liners?r.extra_liners.split(","):"head,body,/html".split(","),w=r.eol?r.eol:"\n",r.indent_with_tabs&&(u="	",l=1),w=w.replace(/\\r/,"\r").replace(/\\n/,"\n"),a=new s,a.printer(n,u,l,h,d);;){var S=a.get_token();if(a.token_text=S[0],a.token_type=S[1],"TK_EOF"===a.token_type)break;switch(a.token_type){case"TK_TAG_START":a.print_newline(!1,a.output),a.print_token(a.token_text),a.indent_content&&(a.indent(),a.indent_content=!1),a.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":a.print_newline(!1,a.output),a.print_token(a.token_text),a.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===a.last_token&&""===a.last_text){var k=a.token_text.match(/\w+/)[0],x=null;a.output.length&&(x=a.output[a.output.length-1].match(/(?:<|{{#)\s*(\w+)/)),(null===x||x[1]!==k&&!a.Utils.in_array(x[1],p))&&a.print_newline(!1,a.output)}a.print_token(a.token_text),a.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var T=a.token_text.match(/^\s*<([a-z-]+)/i);T&&a.Utils.in_array(T[1],p)||a.print_newline(!1,a.output),a.print_token(a.token_text),a.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":a.print_token(a.token_text),a.indent_content&&(a.indent(),a.indent_content=!1),a.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_COMMENT":a.print_token(a.token_text),a.current_mode="TAG";break;case"TK_CONTENT":a.print_token(a.token_text),a.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==a.token_text){a.print_newline(!1,a.output);var C,E=a.token_text,I=1;"TK_SCRIPT"===a.token_type?C="function"==typeof o&&o:"TK_STYLE"===a.token_type&&(C="function"==typeof i&&i),"keep"===r.indent_scripts?I=0:"separate"===r.indent_scripts&&(I=-a.indent_level);var P=a.get_full_indent(I);if(C){var A=function(){this.eol="\n"};A.prototype=r;var O=new A;E=C(E.replace(/^\s*/,P),O)}else{var M=E.match(/^\s*/)[0],L=M.match(/[^\n\r]*$/)[0].split(a.indent_string).length-1,N=a.get_full_indent(I-L);E=E.replace(/^\s*/,P).replace(/\r\n|\r|\n/g,"\n"+N).replace(/\s+$/,"")}E&&(a.print_token_raw(E),a.print_newline(!0,a.output))}a.current_mode="TAG";break;default:""!==a.token_text&&a.print_token(a.token_text)}a.last_token=a.token_type,a.last_text=a.token_text}var j=a.output.join("").replace(/[\r\n\t ]+$/,"");return y&&(j+="\n"),"\n"!=w&&(j=j.replace(/[\n]/g,w)),j}if("function"==typeof define&&define.amd)define("vs/languages/lib/common/beautify-html",["require","./beautify","./beautify-css"],function(e){var t=e("./beautify"),r=e("./beautify-css");return{html_beautify:function(e,o){return n(e,o,t.js_beautify,r.css_beautify)}}});else if("undefined"!=typeof exports){var r=require("./beautify.js"),o=require("./beautify-css.js");exports.html_beautify=function(e,t){return n(e,t,r.js_beautify,o.css_beautify)}}else"undefined"!=typeof window?window.html_beautify=function(e,t){return n(e,t,window.js_beautify,window.css_beautify)}:"undefined"!=typeof global&&(global.html_beautify=function(e,t){return n(e,t,global.js_beautify,global.css_beautify)})}();