UNPKG

wfeditor

Version:
5 lines 143 kB
var emmet=function(e){function t(e,t,n){var r;return r=t&&t.hasOwnProperty("constructor")?t.constructor:function(){e.apply(this,arguments)},_.extend(r,e),s.prototype=e.prototype,r.prototype=new s,t&&_.extend(r.prototype,t),n&&_.extend(r,n),r.prototype.constructor=r,r.__super__=e.prototype,r}function n(e){return e in o||!l||l(e),o[e]}var r="html",i="plain";if("undefined"==typeof _)try{_=e[["require"][0]]("underscore")}catch(a){}if("undefined"==typeof _)throw"Cannot access to Underscore.js lib";var o={_:_},s=function(){},l=null;return{define:function(e,t){e in o||(o[e]=_.isFunction(t)?this.exec(t):t)},require:n,exec:function(t,r){return t.call(r||e,_.bind(n,this),_,this)},extend:function(e,n){var r=t(this,e,n);return r.extend=this.extend,e.hasOwnProperty("toString")&&(r.prototype.toString=e.toString),r},expandAbbreviation:function(e,t,i,a){if(!e)return"";t=t||r;var o=n("filters"),s=n("abbreviationParser");i=n("profile").get(i,t),n("tabStops").resetTabstopIndex();var l=o.extractFromAbbreviation(e),u=s.parse(l[0],{syntax:t,contextNode:a}),c=o.composeList(t,i,l[1]);return o.apply(u,c,i),u.toString()},defaultSyntax:function(){return r},defaultProfile:function(){return i},log:function(){e.console&&e.console.log&&e.console.log.apply(e.console,arguments)},setModuleLoader:function(e){l=e}}}(this);"undefined"!=typeof exports&&("undefined"!=typeof module&&module.exports&&(exports=module.exports=emmet),exports.emmet=emmet),"undefined"!=typeof define&&define(emmet),emmet.define("abbreviationParser",function(e,t){function n(e){this.parent=null,this.children=[],this._attributes=[],this.abbreviation="",this.counter=1,this._name=null,this._text="",this.repeatCount=1,this.hasImplicitRepeat=!1,this._data={},this.start="",this.end="",this.content="",this.padding=""}function r(e){return e.substring(1,e.length-1)}function i(e,t){for(var n;n=e.next();){if(n===t)return!0}return!1}function a(i){i=e("utils").trim(i);for(var o,s,l=new n,u=l.addChild(),c=e("stringStream").create(i),f=1e3;!c.eol()&&--f>0;)switch(o=c.peek()){case"(":if(c.start=c.pos,!c.skipToPair("(",")"))throw'Invalid abbreviation: mo matching ")" found for character at '+c.pos;var p=a(r(c.current()));(s=c.match(/^\*(\d+)?/,!0))&&u._setRepeat(s[1]),t.each(p.children,function(e){u.addChild(e)});break;case">":u=u.addChild(),c.next();break;case"+":u=u.parent.addChild(),c.next();break;case"^":var h=u.parent||u;u=(h.parent||h).addChild(),c.next();break;default:c.start=c.pos,c.eatWhile(function(e){if("["==e||"{"==e){if(c.skipToPair(e,m[e]))return c.backUp(1),!0;throw'Invalid abbreviation: mo matching "'+m[e]+'" found for character at '+c.pos}if("+"==e){c.next();var t=c.eol()||~"+>^*".indexOf(c.peek());return c.backUp(1),t}return"("!=e&&d(e)}),u.setAbbreviation(c.current()),c.start=c.pos}if(1>f)throw"Endless loop detected";return l}function o(t,n){t=e("utils").trim(t);var r=[],a=e("stringStream").create(t);for(a.eatSpace();!a.eol()&&(a.start=a.pos,a.eatWhile(h));){var o=a.current(),s="";if("="==a.peek()){a.next(),a.start=a.pos;var l=a.peek();if('"'==l||"'"==l){if(a.next(),!i(a,l))throw"Invalid attribute value";s=a.current(),s=s.substring(1,s.length-1)}else{if(!a.eatWhile(/[^\s\]]/))throw"Invalid attribute value";s=a.current()}}r.push({name:o,value:s}),a.eatSpace()}return r}function s(t){for(var n=[],i={"#":"id",".":"class"},a=null,s=e("stringStream").create(t);!s.eol();)switch(s.peek()){case"#":case".":null===a&&(a=s.pos);var u=i[s.peek()];s.next(),s.start=s.pos,s.eatWhile(h),n.push({name:u,value:s.current()});break;case"[":if(null===a&&(a=s.pos),s.start=s.pos,!s.skipToPair("[","]"))throw"Invalid attribute set definition";n=n.concat(o(r(s.current())));break;default:s.next()}return n.length?{element:t.substring(0,a),attributes:l(n)}:null}function l(e){e=t.map(e,function(e){return t.clone(e)});var n={};return t.filter(e,function(e){if(!(e.name in n))return n[e.name]=e;var t=n[e.name];return"class"==e.name.toLowerCase()?t.value+=(t.value.length?" ":"")+e.value:t.value=e.value,!1})}function u(t){if(!~t.indexOf("{"))return null;for(var n=e("stringStream").create(t);!n.eol();)switch(n.peek()){case"[":case"(":n.skipToPair(n.peek(),m[n.peek()]);break;case"{":return n.start=n.pos,n.skipToPair("{","}"),{element:t.substring(0,n.start),text:r(n.current())};default:n.next()}}function c(e){for(var n,r,i,a=e.children.length-1;a>=0;a--)if(r=e.children[a],r.isRepeating())for(i=n=r.repeatCount,r.repeatCount=1,r.updateProperty("counter",1),r.updateProperty("maxCount",i);--n>0;)r.parent.addChild(r.clone(),a+1).updateProperty("counter",n+1).updateProperty("maxCount",i);return t.each(e.children,c),e}function f(e){for(var n=e.children.length-1;n>=0;n--){var r=e.children[n];r.isGroup()?r.replace(f(r).children):r.isEmpty()&&r.remove()}return t.each(e.children,f),e}function d(e){var t=e.charCodeAt(0),n="#.*:$-_!@|%";return t>64&&91>t||t>96&&123>t||t>47&&58>t||-1!=n.indexOf(e)}var p=/^[\w\-\$\:@\!%]+\+?$/i,h=/[\w\-:\$@]/,m={"[":"]","(":")","{":"}"},g=Array.prototype.splice,b=[],v=[],x=[];return n.prototype={addChild:function(e,r){return e=e||new n,e.parent=this,t.isUndefined(r)?this.children.push(e):this.children.splice(r,0,e),e},clone:function(){var e=new n,r=["abbreviation","counter","_name","_text","repeatCount","hasImplicitRepeat","start","end","content","padding"];return t.each(r,function(t){e[t]=this[t]},this),e._attributes=t.map(this._attributes,function(e){return t.clone(e)}),e._data=t.clone(this._data),e.children=t.map(this.children,function(t){return t=t.clone(),t.parent=e,t}),e},remove:function(){return this.parent&&(this.parent.children=t.without(this.parent.children,this)),this},replace:function(){var e=this.parent,n=t.indexOf(e.children,this),r=t.flatten(arguments);g.apply(e.children,[n,1].concat(r)),t.each(r,function(t){t.parent=e})},updateProperty:function(e,n){return this[e]=n,t.each(this.children,function(t){t.updateProperty(e,n)}),this},find:function(e){return this.findAll(e)[0]},findAll:function(e){if(!t.isFunction(e)){var n=e.toLowerCase();e=function(e){return e.name().toLowerCase()==n}}var r=[];return t.each(this.children,function(t){e(t)&&r.push(t),r=r.concat(t.findAll(e))}),t.compact(r)},data:function(t,n){return 2==arguments.length&&(this._data[t]=n,"resource"==t&&e("elements").is(n,"snippet")&&(this.content=n.data,this._text&&(this.content=e("abbreviationUtils").insertChildContent(n.data,this._text)))),this._data[t]},name:function(){var t=this.matchedResource();return e("elements").is(t,"element")?t.name:this._name},attributeList:function(){var n=[],r=this.matchedResource();return e("elements").is(r,"element")&&t.isArray(r.attributes)&&(n=n.concat(r.attributes)),l(n.concat(this._attributes))},attribute:function(e,n){if(2==arguments.length){var r=t.indexOf(t.pluck(this._attributes,"name"),e.toLowerCase());~r?this._attributes[r].value=n:this._attributes.push({name:e,value:n})}return(t.find(this.attributeList(),function(t){return t.name==e})||{}).value},matchedResource:function(){return this.data("resource")},index:function(){return this.parent?t.indexOf(this.parent.children,this):-1},_setRepeat:function(e){e?this.repeatCount=parseInt(e,10)||1:this.hasImplicitRepeat=!0},setAbbreviation:function(e){e=e||"";var t=this;e=e.replace(/\*(\d+)?$/,function(e,n){return t._setRepeat(n),""}),this.abbreviation=e;var n=u(e);n&&(e=n.element,this.content=this._text=n.text);var r=s(e);if(r&&(e=r.element,this._attributes=r.attributes),this._name=e,this._name&&!p.test(this._name))throw"Invalid abbreviation"},toString:function(){var n=e("utils"),r=this.start,i=this.end,a=this.content,o=this;t.each(x,function(e){r=e(r,o,"start"),a=e(a,o,"content"),i=e(i,o,"end")});var s=t.map(this.children,function(e){return e.toString()}).join("");return a=e("abbreviationUtils").insertChildContent(a,s,{keepVariable:!1}),r+n.padString(a,this.padding)+i},hasEmptyChildren:function(){return!!t.find(this.children,function(e){return e.isEmpty()})},hasImplicitName:function(){return!this._name&&!this.isTextNode()},isGroup:function(){return!this.abbreviation},isEmpty:function(){return!this.abbreviation&&!this.children.length},isRepeating:function(){return this.repeatCount>1||this.hasImplicitRepeat},isTextNode:function(){return!this.name()&&!this.attributeList().length},isElement:function(){return!this.isEmpty()&&!this.isTextNode()},deepestChild:function(){if(!this.children.length)return null;for(var e=this;e.children.length;)e=t.last(e.children);return e}},x.push(function(t,n){return e("utils").replaceCounter(t,n.counter,n.maxCount)}),{parse:function(e,n){n=n||{};var r=a(e);if(n.contextNode){r._name=n.contextNode.name;var i={};t.each(r._attributes,function(e){i[e.name]=e}),t.each(n.contextNode.attributes,function(e){e.name in i?i[e.name].value=e.value:(e=t.clone(e),r._attributes.push(e),i[e.name]=e)})}return t.each(b,function(e){e(r,n)}),r=f(c(r)),t.each(v,function(e){e(r,n)}),r},AbbreviationNode:n,addPreprocessor:function(e){t.include(b,e)||b.push(e)},removeFilter:function(e){preprocessor=t.without(b,e)},addPostprocessor:function(e){t.include(v,e)||v.push(e)},removePostprocessor:function(e){v=t.without(v,e)},addOutputProcessor:function(e){t.include(x,e)||x.push(e)},removeOutputProcessor:function(e){x=t.without(x,e)},isAllowedChar:function(e){return e=String(e),d(e)||~">+^[](){}".indexOf(e)}}}),emmet.exec(function(e,t){function n(r,i){var a=e("resources"),o=e("elements"),s=e("abbreviationParser");t.each(t.clone(r.children),function(e){var r=a.getMatchedResource(e,i);if(t.isString(r))e.data("resource",o.create("snippet",r));else if(o.is(r,"reference")){var l=s.parse(r.data,{syntax:i});if(e.repeatCount>1){var u=l.findAll(function(e){return e.hasImplicitRepeat});t.each(u,function(t){t.repeatCount=e.repeatCount,t.hasImplicitRepeat=!1})}var c=l.deepestChild();c&&t.each(e.children,function(e){c.addChild(e)}),t.each(l.children,function(n){t.each(e.attributeList(),function(e){n.attribute(e.name,e.value)})}),e.replace(l.children)}else e.data("resource",r);n(e,i)})}e("abbreviationParser").addPreprocessor(function(e,t){var r=t.syntax||emmet.defaultSyntax();n(e,r)})}),emmet.exec(function(e,t){function n(t){for(var n=e("range"),r=[],i=e("stringStream").create(t);!i.eol();){if("\\"==i.peek())i.next();else if(i.start=i.pos,i.match(s,!0)){r.push(n.create(i.start,s));continue}i.next()}return r}function r(r,i){var a=e("utils"),o=n(r);return o.reverse(),t.each(o,function(e){r=a.replaceSubstring(r,i,e)}),r}function i(e){return n(e.content).length?!0:!!t.find(e.attributeList(),function(e){return!!n(e.value).length})}function a(n,a,o){var s=n.findAll(function(e){return i(e)});if(i(n)&&s.unshift(n),s.length)t.each(s,function(e){e.content=r(e.content,a),t.each(e._attributes,function(e){e.value=r(e.value,a)})});else{var l=n.deepestChild()||n;o?l.content=a:l.content=e("abbreviationUtils").insertChildContent(l.content,a)}}var o=e("abbreviationParser"),s="$#";o.addPreprocessor(function(n,r){if(r.pastedContent){var i=e("utils"),a=t.map(i.splitByLines(r.pastedContent,!0),i.trim);n.findAll(function(e){return e.hasImplicitRepeat?(e.data("paste",a),e.repeatCount=a.length):void 0})}}),o.addPostprocessor(function(e,n){var r=e.findAll(function(e){var n=e.data("paste"),r="";return t.isArray(n)?r=n[e.counter-1]:t.isFunction(n)?r=n(e.counter-1,e.content):n&&(r=n),r&&a(e,r,!!e.data("pasteOverwrites")),e.data("paste",null),!!n});!r.length&&n.pastedContent&&a(e,n.pastedContent)})}),emmet.exec(function(e,t){function n(r){var i=e("tagName");return t.each(r.children,function(e){(e.hasImplicitName()||e.data("forceNameResolving"))&&(e._name=i.resolve(e.parent.name())),n(e)}),r}e("abbreviationParser").addPostprocessor(n)}),emmet.define("cssParser",function(e,t){function n(e){return"undefined"!=typeof e}function r(){return{"char":m.chnum,line:m.linenum}}function i(e,t,r){var i=m,a=r||{};x.push({charstart:n(a["char"])?a["char"]:i.chnum,charend:n(a.charend)?a.charend:i.chnum,linestart:n(a.line)?a.line:i.linenum,lineend:n(a.lineend)?a.lineend:i.linenum,value:e,type:t||e})}function a(e,t){var r=m,i=t||{},a=n(i["char"])?i["char"]:r.chnum,o=n(i.line)?i.line:r.linenum;return{name:"ParseError",message:e+" at line "+(o+1)+" char "+(a+1),walker:r,tokens:x}}function o(){for(var e=m.ch,t="",n=r();" "===e||"	"===e;)t+=e,e=m.nextChar();i(t,"white",n)}function s(){var e,t=m,n=t.ch,a=n,o=r();if(e=t.nextChar(),"*"!==e)return o.charend=o["char"],o.lineend=o.line,i(a,a,o);for(;"*"!==n||"/"!==e;)a+=e,n=e,e=t.nextChar();a+=e,t.nextChar(),i(a,"comment",o)}function l(){var e,t=m,n=t.ch,o=n,s=n,l=r();for(n=t.nextChar();n!==o;){if("\n"===n){if(e=t.nextChar(),"\\"!==e)throw a("Unterminated string",l);s+=n+e}else s+="\\"===n?n+t.nextChar():n;n=t.nextChar()}s+=n,t.nextChar(),i(s,"string",l)}function u(){var e=m,t=e.ch,n=0,o=t,s=r();for(t=e.nextChar();")"!==t&&!n;){if("("===t)n++;else if(")"===t)n--;else if(t===!1)throw a("Unterminated brace",s);o+=t,t=e.nextChar()}o+=t,e.nextChar(),i(o,"brace",s)}function c(e){var t=m,n=t.ch,a=r(),o=e?e+n:n;for(n=t.nextChar(),e&&(a["char"]-=e.length);b(n)||v(n);)o+=n,n=t.nextChar();i(o,"identifier",a)}function f(){var e,t=m,n=t.ch,a=r(),o=n,s="."===o;if(n=t.nextChar(),e=!v(n),s&&e)return a.charend=a["char"],a.lineend=a.line,i(o,".",a);if("-"===o&&e)return c("-");for(;n!==!1&&(v(n)||!s&&"."===n);)"."===n&&(s=!0),o+=n,n=t.nextChar();i(o,"number",a)}function d(){var e=m,t=e.ch,n=r(),a=t,o=e.nextChar();return"="===o&&g(a,!0)?(a+=o,i(a,"match",n),void e.nextChar()):(n.charend=n["char"]+1,n.lineend=n.line,void i(a,a,n))}function p(){var e=m.ch;if(" "===e||"	"===e)return o();if("/"===e)return s();if('"'===e||"'"===e)return l();if("("===e)return u();if("-"===e||"."===e||v(e))return f();if(b(e))return c();if(g(e))return d();if("\n"===e)return i("line"),void m.nextChar();throw a("Unrecognized character")}function h(e,t){return"\r"==e.charAt(t)&&"\n"==e.charAt(t+1)?"\r\n":e.charAt(t)}var m,g,b,v,x=[];return m={lines:null,total_lines:0,linenum:-1,line:"",ch:"",chnum:-1,init:function(e){var t=m;t.lines=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n"),t.total_lines=t.lines.length,t.chnum=-1,t.linenum=-1,t.ch="",t.line="",t.nextLine(),t.nextChar()},nextLine:function(){var e=this;return e.linenum+=1,e.total_lines<=e.linenum?e.line=!1:e.line=e.lines[e.linenum],-1!==e.chnum&&(e.chnum=0),e.line},nextChar:function(){var e=this;for(e.chnum+=1;""===e.line.charAt(e.chnum);)return this.nextLine()===!1?(e.ch=!1,!1):(e.chnum=-1,e.ch="\n","\n");return e.ch=e.line.charAt(e.chnum),e.ch},peek:function(){return this.line.charAt(this.chnum+1)}},b=function(e){return"&"==e||"_"===e||"-"===e||e>="a"&&"z">=e||e>="A"&&"Z">=e},v=function(e){return e!==!1&&e>="0"&&"9">=e},g=function(){for(var e="{}[]()+*=.,;:>~|\\%$#@^!".split(""),t="*^|$~".split(""),n={},r={},i=0;i<e.length;i+=1)n[e[i]]=!0;for(i=0;i<t.length;i+=1)r[t[i]]=!0;return function(e,t){return t?!!r[e]:!!n[e]}}(),{lex:function(e){for(m.init(e),x=[];m.ch!==!1;)p();return x},parse:function(e){var n=0;return t.map(this.lex(e),function(t){return"line"==t.type&&(t.value=h(e,n)),{type:t.type,start:n,end:n+=t.value.length}})},toSource:function(e){for(var t,n=0,r=e.length,i="";r>n;n+=1)t=e[n],i+="line"===t.type?"\n":t.value;return i}}}),emmet.define("xmlParser",function(e,t){function n(e,t){function n(n){return t.tokenize=n,n(e,t)}var i=e.next();if("<"==i){if(e.eat("!"))return e.eat("[")?e.match("CDATA[")?n(a("atom","]]>")):null:e.match("--")?n(a("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(o(1))):null;if(e.eat("?"))return e.eatWhile(/[\w\._\-]/),t.tokenize=a("meta","?>"),"meta";C=e.eat("/")?"closeTag":"openTag",e.eatSpace(),k="";for(var s;s=e.eat(/[^\s\u00a0=<>\"\'\/?]/);)k+=s;return t.tokenize=r,"tag"}if("&"==i){var l;return l=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),l?"atom":"error"}return e.eatWhile(/[^&<]/),"text"}function r(e,t){var r=e.next();return">"==r||"/"==r&&e.eat(">")?(t.tokenize=n,C=">"==r?"endTag":"selfcloseTag","tag"):"="==r?(C="equals",null):/[\'\"]/.test(r)?(t.tokenize=i(r),t.tokenize(e,t)):(e.eatWhile(/[^\s\u00a0=<>\"\'\/?]/),"word")}function i(e){return function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=r;break}return"string"}}function a(e,t){return function(r,i){for(;!r.eol();){if(r.match(t)){i.tokenize=n;break}r.next()}return e}}function o(e){return function(t,r){for(var i;null!=(i=t.next());){if("<"==i)return r.tokenize=o(e+1),r.tokenize(t,r);if(">"==i){if(1==e){r.tokenize=n;break}return r.tokenize=o(e-1),r.tokenize(t,r)}}return"meta"}}function s(){for(var e=arguments.length-1;e>=0;e--)_.cc.push(arguments[e])}function l(){return s.apply(null,arguments),!0}function u(e,t){var n=S.doNotIndent.hasOwnProperty(e)||_.context&&_.context.noIndent;_.context={prev:_.context,tagName:e,indent:_.indented,startOfLine:t,noIndent:n}}function c(){_.context&&(_.context=_.context.prev)}function f(e){if("openTag"==e)return _.tagName=k,l(m,d(_.startOfLine));if("closeTag"==e){var t=!1;return _.context?_.context.tagName!=k&&(S.implicitlyClosed.hasOwnProperty(_.context.tagName.toLowerCase())&&c(),t=!_.context||_.context.tagName!=k):t=!0,t&&(w="error"),l(p(t))}return l()}function d(e){return function(t){return"selfcloseTag"==t||"endTag"==t&&S.autoSelfClosers.hasOwnProperty(_.tagName.toLowerCase())?(h(_.tagName.toLowerCase()),l()):"endTag"==t?(h(_.tagName.toLowerCase()),u(_.tagName,e),l()):l()}}function p(e){return function(t){return e&&(w="error"),"endTag"==t?(c(),l()):(w="error",l(arguments.callee))}}function h(e){for(var t;;){if(!_.context)return;if(t=_.context.tagName.toLowerCase(),!S.contextGrabbers.hasOwnProperty(t)||!S.contextGrabbers[t].hasOwnProperty(e))return;c()}}function m(e){return"word"==e?(w="attribute",l(g,m)):"endTag"==e||"selfcloseTag"==e?s():(w="error",l(m))}function g(e){return"equals"==e?l(b,m):(S.allowMissing||(w="error"),"endTag"==e||"selfcloseTag"==e?s():l())}function b(e){return"string"==e?l(v):"word"==e&&S.allowUnquoted?(w="string",l()):(w="error","endTag"==e||"selfCloseTag"==e?s():l())}function v(e){return"string"==e?l(v):s()}function x(){return{tokenize:n,cc:[],indented:0,startOfLine:!0,tagName:null,context:null}}function y(e,t){if(e.sol()&&(t.startOfLine=!0,t.indented=0),e.eatSpace())return null;w=C=k=null;var n=t.tokenize(e,t);if(t.type=C,(n||C)&&"comment"!=n)for(_=t;;){var r=t.cc.pop()||f;if(r(C||n))break}return t.startOfLine=!1,w||n}var w,S={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!0,allowMissing:!0},k=null,C=null,_=null;return{parse:function(t,n){n=n||0;for(var r=x(),i=e("stringStream").create(t),a=[];!i.eol();)a.push({type:y(i,r),start:i.start+n,end:i.pos+n}),i.start=i.pos;return a}}}),emmet.define("string-score",function(e,t){return{score:function(e,t,n){if(e==t)return 1;if(""==t)return 0;for(var r,i,a,o,s,l,u,c,f,d=0,p=t.length,h=e.length,m=1,g=0;p>g;++g){if(l=t.charAt(g),u=e.indexOf(l.toLowerCase()),c=e.indexOf(l.toUpperCase()),f=Math.min(u,c),s=f>-1?f:Math.max(u,c),-1===s){if(n){m+=1-n;continue}return 0}o=.1,e[s]===l&&(o+=.1),0===s?(o+=.6,0===g&&(r=1)):" "===e.charAt(s-1)&&(o+=.8),e=e.substring(s+1,h),d+=o}return i=d/p,a=(i*(p/h)+i)/2,a/=m,r&&1>a+.15&&(a+=.15),a}}}),emmet.define("utils",function(e,t){function n(e){this._data=[],this.length=0,e&&this.append(e)}var r="${0}";return n.prototype={append:function(e){this._data.push(e),this.length+=e.length},toString:function(){return this._data.join("")},valueOf:function(){return this.toString()}},{reTag:/<\/?[\w:\-]+(?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*\s*(\/?)>$/,endsWithTag:function(e){return this.reTag.test(e)},isNumeric:function(e){return"string"==typeof e&&(e=e.charCodeAt(0)),e&&e>47&&58>e},trim:function(e){return(e||"").replace(/^\s+|\s+$/g,"")},getNewline:function(){var n=e("resources");if(!n)return"\n";var r=n.getVariable("newline");return t.isString(r)?r:"\n"},setNewline:function(t){var n=e("resources");n.setVariable("newline",t),n.setVariable("nl",t)},splitByLines:function(e,n){var r=this.getNewline(),i=(e||"").replace(/\r\n/g,"\n").replace(/\n\r/g,"\n").replace(/\r/g,"\n").replace(/\n/g,r).split(r);return n&&(i=t.filter(i,function(e){return e.length&&!!this.trim(e)},this)),i},normalizeNewline:function(e){return this.splitByLines(e).join(this.getNewline())},repeatString:function(e,t){for(var n=[],r=0;t>r;r++)n.push(e);return n.join("")},getStringsPads:function(e){var n=t.map(e,function(e){return t.isString(e)?e.length:+e}),r=t.max(n);return t.map(n,function(e){var t=r-e;return t?this.repeatString(" ",t):""},this)},padString:function(n,r){var i=t.isNumber(r)?this.repeatString(e("resources").getVariable("indentation")||"	",r):r,a=[],o=this.splitByLines(n),s=this.getNewline();a.push(o[0]);for(var l=1;l<o.length;l++)a.push(s+i+o[l]);return a.join("")},zeroPadString:function(e,t){for(var n="",r=e.length;t>r++;)n+="0";return n+e},unindentString:function(e,t){for(var n=this.splitByLines(e),r=0;r<n.length;r++)0==n[r].search(t)&&(n[r]=n[r].substr(t.length));return n.join(this.getNewline())},replaceUnescapedSymbol:function(e,n,r){for(var i=0,a=e.length,o=n.length,s=0;a>i;)if("\\"==e.charAt(i))i+=o+1;else if(e.substr(i,o)==n){var l=o;s++;var u=r;if(t.isFunction(r)){var c=r(e,n,i,s);c?(l=c[0].length,u=c[1]):u=!1}if(u===!1){i++;continue}e=e.substring(0,i)+u+e.substring(i+l),a=e.length,i+=u.length}else i++;return e},replaceVariables:function(n,r){r=r||{};var i=t.isFunction(r)?r:function(e,t){return t in r?r[t]:null},a=e("resources");return e("tabStops").processText(n,{variable:function(e){var n=i(e.token,e.name,e);return null===n&&(n=a.getVariable(e.name)),(null===n||t.isUndefined(n))&&(n=e.token),n}})},replaceCounter:function(e,n,r){var i="$";e=String(e),n=String(n),/^\-?\d+$/.test(n)&&(n=+n);var a=this;return this.replaceUnescapedSymbol(e,i,function(e,i,o,s){if("{"==e.charAt(o+1)||a.isNumeric(e.charAt(o+1)))return!1;for(var l=o+1;"$"==e.charAt(l)&&"{"!=e.charAt(l+1);)l++;var u,c=l-o,f=0,d=!1;return(u=e.substr(l).match(/^@(\-?)(\d*)/))&&(l+=u[0].length,u[1]&&(d=!0),f=parseInt(u[2]||1)-1),d&&r&&t.isNumber(n)&&(n=r-n+1),n+=f,[e.substring(o,l),a.zeroPadString(n+"",c)]})},matchesTag:function(e){return this.reTag.test(e||"")},escapeText:function(e){return e.replace(/([\$\\])/g,"\\$1")},unescapeText:function(e){return e.replace(/\\(.)/g,"$1")},getCaretPlaceholder:function(){return t.isFunction(r)?r.apply(this,arguments):r},setCaretPlaceholder:function(e){r=e},getLinePadding:function(e){return(e.match(/^(\s+)/)||[""])[0]},getLinePaddingFromPosition:function(e,t){var n=this.findNewlineBounds(e,t);return this.getLinePadding(n.substring(e))},escapeForRegexp:function(e){var t=new RegExp("[.*+?|()\\[\\]{}\\\\]","g");return e.replace(t,"\\$&")},prettifyNumber:function(e,t){return e.toFixed("undefined"==typeof t?2:t).replace(/\.?0+$/,"")},stringBuilder:function(e){return new n(e)},replaceSubstring:function(e,n,r,i){return t.isObject(r)&&"end"in r&&(i=r.end,r=r.start),t.isString(i)&&(i=r+i.length),t.isUndefined(i)&&(i=r),0>r||r>e.length?e:e.substring(0,r)+n+e.substring(i)},narrowToNonSpace:function(t,n,r){for(var i=e("range").create(n,r),a=/[\s\n\r\u00a0]/;i.start<i.end&&a.test(t.charAt(i.start));)i.start++;for(;i.end>i.start;)if(i.end--,!a.test(t.charAt(i.end))){i.end++;break}return i},findNewlineBounds:function(t,n){for(var r=t.length,i=0,a=r-1,o=n-1;o>0;o--){var s=t.charAt(o);if("\n"==s||"\r"==s){i=o+1;break}}for(var l=n;r>l;l++){var s=t.charAt(l);if("\n"==s||"\r"==s){a=l;break}}return e("range").create(i,a-i)},deepMerge:function(){var e,n,r,i,a,o,s=arguments[0]||{},l=1,u=arguments.length;for(t.isObject(s)||t.isFunction(s)||(s={});u>l;l++)if(null!=(e=arguments[l]))for(n in e)r=s[n],i=e[n],s!==i&&(i&&(t.isObject(i)||(a=t.isArray(i)))?(a?(a=!1,o=r&&t.isArray(r)?r:[]):o=r&&t.isObject(r)?r:{},s[n]=this.deepMerge(o,i)):void 0!==i&&(s[n]=i));return s}}}),emmet.define("range",function(e,t){function n(e,t,n){switch(n){case"eq":case"==":return e===t;case"lt":case"<":return t>e;case"lte":case"<=":return t>=e;case"gt":case">":return e>t;case"gte":case">=":return e>=t}}function r(e,n){t.isObject(e)&&"start"in e?(this.start=Math.min(e.start,e.end),this.end=Math.max(e.start,e.end)):t.isArray(e)?(this.start=e[0],this.end=e[1]):(n=t.isString(n)?n.length:+n,this.start=e,this.end=e+n)}return r.prototype={length:function(){return Math.abs(this.end-this.start)},equal:function(e){return this.cmp(e,"eq","eq")},shift:function(e){return this.start+=e,this.end+=e,this},overlap:function(e){return e.start<=this.end&&e.end>=this.start},intersection:function(e){if(this.overlap(e)){var t=Math.max(e.start,this.start),n=Math.min(e.end,this.end);return new r(t,n-t)}return null},union:function(e){if(this.overlap(e)){var t=Math.min(e.start,this.start),n=Math.max(e.end,this.end);return new r(t,n-t)}return null},inside:function(e){return this.cmp(e,"lte","gt")},contains:function(e){return this.cmp(e,"lt","gt")},include:function(e){return this.cmp(loc,"lte","gte")},cmp:function(e,t,i){var a,o;return e instanceof r?(a=e.start,o=e.end):a=o=e,n(this.start,a,t||"<=")&&n(this.end,o,i||">")},substring:function(e){return this.length()>0?e.substring(this.start,this.end):""},clone:function(){return new r(this.start,this.length())},toArray:function(){return[this.start,this.end]},toString:function(){return"{"+this.start+", "+this.length()+"}"}},{create:function(e,n){return t.isUndefined(e)||null===e?null:e instanceof r?e:(t.isObject(e)&&"start"in e&&"end"in e&&(n=e.end-e.start,e=e.start),new r(e,n))},create2:function(e,n){return t.isNumber(e)&&t.isNumber(n)&&(n-=e),this.create(e,n)}}}),emmet.define("handlerList",function(e,t){function n(){this._list=[]}return n.prototype={add:function(e,n){this._list.push(t.extend({order:0},n||{},{fn:e}))},remove:function(e){this._list=t.without(this._list,t.find(this._list,function(t){return t.fn===e}))},list:function(){return t.sortBy(this._list,"order").reverse()},listFn:function(){return t.pluck(this.list(),"fn")},exec:function(e,n){n=n||[];var r=null;return t.find(this.list(),function(t){return r=t.fn.apply(t,n),r!==e?!0:void 0}),r}},{create:function(){return new n}}}),emmet.define("tokenIterator",function(e,t){function n(e){this.tokens=e,this._position=0,this.reset()}return n.prototype={next:function(){if(this.hasNext()){var e=this.tokens[++this._i];return this._position=e.start,e}return null},current:function(){return this.tokens[this._i]},position:function(){return this._position},hasNext:function(){return this._i<this._il-1},reset:function(){this._i=-1,this._il=this.tokens.length},item:function(){return this.tokens[this._i]},itemNext:function(){return this.tokens[this._i+1]},itemPrev:function(){return this.tokens[this._i-1]},nextUntil:function(e,n){for(var r,i=t.isString(e)?function(t){return t.type==e}:e;(r=this.next())&&(n&&n.call(this,r),!i.call(this,r)););}},{create:function(e){return new n(e)}}}),emmet.define("stringStream",function(e,t){function n(e){this.pos=this.start=0,this.string=e}return n.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return 0==this.pos},peek:function(){return this.string.charAt(this.pos)},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(e){var t,n=this.string.charAt(this.pos);return t="string"==typeof e?n==e:n&&(e.test?e.test(n):e(n)),t?(++this.pos,n):void 0},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},skipToPair:function(e,t){for(var n,r=0,i=this.pos,a=this.string.length;a>i;)if(n=this.string.charAt(i++),n==e)r++;else if(n==t&&(r--,1>r))return this.pos=i,!0;return!1},backUp:function(e){this.pos-=e},match:function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&t!==!1&&(this.pos+=r[0].length),r}var i=n?function(e){return e.toLowerCase()}:function(e){return e};return i(this.string).indexOf(i(e),this.pos)==this.pos?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)}},{create:function(e){return new n(e)}}}),emmet.define("resources",function(e,t){function n(t){var n=e("utils");return n.replaceUnescapedSymbol(t,"|",n.getCaretPlaceholder())}function r(t,r,a){return r=n(r),"snippets"==a?e("elements").create("snippet",r):"abbreviations"==a?i(t,r):void 0}function i(t,n){t=e("utils").trim(t);var r,i=e("elements");return(r=u.exec(n))?i.create("element",r[1],r[2],"/"==r[4]):i.create("reference",n)}function a(e){return e.replace(/:$/,"").replace(/:/g,"-")}var o="system",s="user",l={},u=/^<(\w+\:?[\w\-]*)((?:\s+[\w\:\-]+\s*=\s*(['"]).*?\3)*)\s*(\/?)>/,c={},f={},d=e("handlerList").create();return{setVocabulary:function(e,t){l={},t==o?c=e:f=e},getVocabulary:function(e){return e==o?c:f},getMatchedResource:function(e,n){return d.exec(null,t.toArray(arguments))||this.findSnippet(n,e.name())},getVariable:function(e){return(this.getSection("variables")||{})[e]},setVariable:function(e,t){var n=this.getVocabulary("user")||{};"variables"in n||(n.variables={}),n.variables[e]=t,this.setVocabulary(n,"user")},hasSyntax:function(e){return e in this.getVocabulary(s)||e in this.getVocabulary(o)},addResolver:function(e,t){d.add(e,t)},removeResolver:function(e){d.remove(e)},getSection:function(n){if(!n)return null;n in l||(l[n]=e("utils").deepMerge({},c[n],f[n]));for(var r,i=l[n],a=t.rest(arguments);i&&(r=a.shift());){if(!(r in i))return null;i=i[r]}return i},findItem:function(e,t){for(var n=this.getSection(e);n;){if(t in n)return n[t];n=this.getSection(n["extends"])}},findSnippet:function(e,n,i){if(!e||!n)return null;i=i||[];var a=[n];~n.indexOf("-")&&a.push(n.replace(/\-/g,":"));var o=this.getSection(e),s=null;return t.find(["snippets","abbreviations"],function(n){var i=this.getSection(e,n);return i?t.find(a,function(e){return i[e]?s=r(e,i[e],n):void 0}):void 0},this),i.push(e),s||!o["extends"]||t.include(i,o["extends"])?s:this.findSnippet(o["extends"],n,i)},fuzzyFindSnippet:function(n,r,i){i=i||.3;var o=this.getAllSnippets(n),s=e("string-score");r=a(r);var l=t.map(o,function(e,t){return{key:t,score:s.score(e.nk,r,.1)}}),u=t.last(t.sortBy(l,"score"));if(u&&u.score>=i){var c=u.key;return o[c].parsedValue}},getAllSnippets:function(e){var n="all-"+e;if(!l[n]){var i=[],o=e,s=[];do{var u=this.getSection(o);if(!u)break;t.each(["snippets","abbreviations"],function(e){var n={};t.each(u[e]||null,function(t,i){n[i]={nk:a(i),value:t,parsedValue:r(i,t,e),type:e}}),i.push(n)}),s.push(o),o=u["extends"]}while(o&&!t.include(s,o));l[n]=t.extend.apply(t,i.reverse())}return l[n]}}}),emmet.define("actions",function(e,t,n){function r(t){return e("utils").trim(t.charAt(0).toUpperCase()+t.substring(1).replace(/_[a-z]/g,function(e){return" "+e.charAt(1).toUpperCase()}))}var i={};return{add:function(e,t,n){e=e.toLowerCase(),n=n||{},n.label||(n.label=r(e)),i[e]={name:e,fn:t,options:n}},get:function(e){return i[e.toLowerCase()]},run:function(e,n){t.isArray(n)||(n=t.rest(arguments));var r=this.get(e);return r?r.fn.apply(emmet,n):(emmet.log('Action "%s" is not defined',e),!1)},getAll:function(){return i},getList:function(){return t.values(this.getAll())},getMenu:function(e){var n=[];return e=e||[],t.each(this.getList(),function(i){if(!i.options.hidden&&!t.include(e,i.name)){var a=r(i.name),o=n;if(i.options.label){var s=i.options.label.split("/");a=s.pop();for(var l,u;l=s.shift();)u=t.find(o,function(e){return"submenu"==e.type&&e.name==l}),u||(u={name:l,type:"submenu",items:[]},o.push(u)),o=u.items}o.push({type:"action",name:i.name,label:a})}}),n},getActionNameForMenuTitle:function(e,n){var r=null;return t.find(n||this.getMenu(),function(t){return"action"!=t.type?r=this.getActionNameForMenuTitle(e,t.items):t.label==e||t.name==e?r=t.name:void 0},this),r||null}}}),emmet.define("profile",function(e,t){function n(e){t.extend(this,s,e)}function r(e,t){switch(String(t||"").toLowerCase()){case"lower":return e.toLowerCase();case"upper":return e.toUpperCase();
}return e}function i(e,t){return o[e.toLowerCase()]=new n(t)}function a(){i("xhtml"),i("html",{self_closing_tag:!1}),i("xml",{self_closing_tag:!0,tag_nl:!0}),i("plain",{tag_nl:!1,indent:!1,place_cursor:!1}),i("line",{tag_nl:!1,indent:!1,extraFilters:"s"})}var o={},s={tag_case:"asis",attr_case:"asis",attr_quotes:"double",tag_nl:"decide",tag_nl_leaf:!1,place_cursor:!0,indent:!0,inline_break:3,self_closing_tag:"xhtml",filters:"",extraFilters:""};return n.prototype={tagName:function(e){return r(e,this.tag_case)},attributeName:function(e){return r(e,this.attr_case)},attributeQuote:function(){return"single"==this.attr_quotes?"'":'"'},selfClosing:function(e){return"xhtml"==this.self_closing_tag?" /":this.self_closing_tag===!0?"/":""},cursor:function(){return this.place_cursor?e("utils").getCaretPlaceholder():""}},a(),{create:function(e,r){return 2==arguments.length?i(e,r):new n(t.defaults(e||{},s))},get:function(r,i){if(!r&&i){var a=e("resources").findItem(i,"profile");a&&(r=a)}return r?r instanceof n?r:t.isString(r)&&r.toLowerCase()in o?o[r.toLowerCase()]:this.create(r):o.plain},remove:function(e){e=(e||"").toLowerCase(),e in o&&delete o[e]},reset:function(){o={},a()},stringCase:r}}),emmet.define("editorUtils",function(e,t){return{isInsideTag:function(e,t){for(var n=/^<\/?\w[\w\:\-]*.*?>/,r=t;r>-1&&"<"!=e.charAt(r);)r--;if(-1!=r){var i=n.exec(e.substring(r));if(i&&t>r&&t<r+i[0].length)return!0}return!1},outputInfo:function(e,t,n){return n=n||e.getProfileName(),{syntax:String(t||e.getSyntax()),profile:n?String(n):null,content:String(e.getContent())}},unindent:function(t,n){return e("utils").unindentString(n,this.getCurrentLinePadding(t))},getCurrentLinePadding:function(t){return e("utils").getLinePadding(t.getCurrentLine())}}}),emmet.define("actionUtils",function(e,t){return{mimeTypes:{gif:"image/gif",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",svg:"image/svg+xml",html:"text/html",htm:"text/html"},extractAbbreviation:function(t){for(var n=t.length,r=-1,i=0,a=0,o=0,s=e("utils"),l=e("abbreviationParser");;){if(n--,0>n){r=0;break}var u=t.charAt(n);if("]"==u)a++;else if("["==u){if(!a){r=n+1;break}a--}else if("}"==u)o++;else if("{"==u){if(!o){r=n+1;break}o--}else if(")"==u)i++;else if("("==u){if(!i){r=n+1;break}i--}else{if(a||o)continue;if(!l.isAllowedChar(u)||">"==u&&s.endsWithTag(t.substring(0,n+1))){r=n+1;break}}}return-1==r||o||a||i?"":t.substring(r).replace(/^[\*\+\>\^]+/,"")},getImageSize:function(e){var t="‰PNG\r\n\n",n="ÿØ",r="GIF8",i=function(){return e.charCodeAt(a++)};if(e.substr(0,8)===t){var a=e.indexOf("IHDR")+4;return{width:i()<<24|i()<<16|i()<<8|i(),height:i()<<24|i()<<16|i()<<8|i()}}if(e.substr(0,4)===r)return a=6,{width:i()|i()<<8,height:i()|i()<<8};if(e.substr(0,2)===n){a=2;for(var o=e.length;o>a;){if(255!=i())return;var s=i();if(218==s)break;var l=i()<<8|i();if(!(!(s>=192&&207>=s)||4&s||8&s))return a+=1,{height:i()<<8|i(),width:i()<<8|i()};a+=l-2}}},captureContext:function(t){var n={html:1,xml:1,xsl:1},r=String(t.getSyntax());if(r in n){var i=String(t.getContent()),a=e("htmlMatcher").find(i,t.getCaretPos());if(a&&"tag"==a.type){for(var o,s=/([\w\-:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,l=a.open,u=l.range.substring(i).replace(/^<[\w\-\:]+/,""),c={name:l.name,attributes:[]};o=s.exec(u);)c.attributes.push({name:o[1],value:o[2]});return c}}return null},findExpressionBounds:function(t,n){for(var r=String(t.getContent()),i=r.length,a=t.getCaretPos()-1,o=a+1;a>=0&&n(r.charAt(a),a,r);)a--;for(;i>o&&n(r.charAt(o),o,r);)o++;return o>a?e("range").create([++a,o]):void 0},compoundUpdate:function(e,t){if(t){var n=e.getSelectionRange();return e.replaceContent(t.data,t.start,t.end,!0),e.createSelection(t.caret,t.caret+n.end-n.start),!0}return!1},detectSyntax:function(t,n){var r=n||"html";return e("resources").hasSyntax(r)||(r="html"),"html"==r&&(this.isStyle(t)||this.isInlineCSS(t))&&(r="css"),r},detectProfile:function(t){var n=t.getSyntax(),r=e("resources").findItem(n,"profile");if(r)return r;switch(n){case"xml":case"xsl":return"xml";case"css":if(this.isInlineCSS(t))return"line";break;case"html":var r=e("resources").getVariable("profile");return r||(r=this.isXHTML(t)?"xhtml":"html"),r}return"xhtml"},isXHTML:function(e){return-1!=e.getContent().search(/<!DOCTYPE[^>]+XHTML/i)},isStyle:function(t){var n=String(t.getContent()),r=t.getCaretPos(),i=e("htmlMatcher").tag(n,r);return i&&"style"==i.open.name.toLowerCase()&&i.innerRange.cmp(r,"lte","gte")},isInlineCSS:function(t){var n=String(t.getContent()),r=t.getCaretPos(),i=e("xmlEditTree").parseFromPosition(n,r,!0);if(i){var a=i.itemFromPosition(r,!0);return a&&"style"==a.name().toLowerCase()&&a.valueRange(!0).cmp(r,"lte","gte")}return!1}}}),emmet.define("abbreviationUtils",function(e,t){return{isSnippet:function(t){return e("elements").is(t.matchedResource(),"snippet")},isUnary:function(t){var n=t.matchedResource();return t.children.length||this.isSnippet(t)?!1:n&&n.is_empty||e("tagName").isEmptyElement(t.name())},isInline:function(t){return t.isTextNode()||!t.name()||e("tagName").isInlineLevel(t.name())},isBlock:function(e){return this.isSnippet(e)||!this.isInline(e)},isSnippet:function(t){return e("elements").is(t.matchedResource(),"snippet")},hasTagsInContent:function(t){return e("utils").matchesTag(t.content)},hasBlockChildren:function(e){return this.hasTagsInContent(e)&&this.isBlock(e)||t.any(e.children,function(e){return this.isBlock(e)},this)},insertChildContent:function(n,r,i){i=t.extend({keepVariable:!0,appendIfNoChild:!0},i||{});var a=!1,o=e("utils");return n=o.replaceVariables(n,function(e,t,s){var l=e;return"child"==t&&(l=o.padString(r,o.getLinePaddingFromPosition(n,s.start)),a=!0,i.keepVariable&&(l+=e)),l}),!a&&i.appendIfNoChild&&(n+=r),n}}}),emmet.define("base64",function(e,t){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{encode:function(e){for(var t,r,i,a,o,s,l,u,c,f,d=[],p=0,h=e.length,m=n;h>p;)u=e.charCodeAt(p++),c=e.charCodeAt(p++),f=e.charCodeAt(p++),t=255&u,r=255&c,i=255&f,a=t>>2,o=(3&t)<<4|r>>4,s=(15&r)<<2|i>>6,l=63&i,isNaN(c)?s=l=64:isNaN(f)&&(l=64),d.push(m.charAt(a)+m.charAt(o)+m.charAt(s)+m.charAt(l));return d.join("")},decode:function(e){var t,r,i,a,o,s,l,u,c=0,f=0,d=[],p=n,h=e.length;if(!e)return e;e+="";do a=p.indexOf(e.charAt(c++)),o=p.indexOf(e.charAt(c++)),s=p.indexOf(e.charAt(c++)),l=p.indexOf(e.charAt(c++)),u=a<<18|o<<12|s<<6|l,t=u>>16&255,r=u>>8&255,i=255&u,64==s?d[f++]=String.fromCharCode(t):64==l?d[f++]=String.fromCharCode(t,r):d[f++]=String.fromCharCode(t,r,i);while(h>c);return d.join("")}}}),emmet.define("htmlMatcher",function(e,t){function n(t,n){return{name:n[1],selfClose:!!n[3],range:e("range").create(t,n[0]),type:"open"}}function r(t,n){return{name:n[1],range:e("range").create(t,n[0]),type:"close"}}function i(n,r){return{range:e("range").create(n,t.isNumber(r)?r-n:r[0]),type:"comment"}}function a(e){var t,i={};return{open:function(e){var t=this.matches(e);return t&&"open"==t.type?t:null},close:function(e){var t=this.matches(e);return t&&"close"==t.type?t:null},matches:function(a){var o="p"+a;if(!(o in i)&&"<"==e.charAt(a)){var s=e.slice(a);(t=s.match(l))?i[o]=n(a,t):(t=s.match(u))?i[o]=r(a,t):i[o]=!1}return i[o]},text:function(){return e}}}function o(e,t,n){return e.substring(t,t+n.length)==n}function s(e,n){for(var r=[],i=null,a=n.text(),s=e.range.end,l=a.length;l>s;s++){if(o(a,s,"<!--"))for(var u=s;l>u;u++)if(o(a,u,"-->")){s=u+3;break}if(i=n.matches(s))if("open"!=i.type||i.selfClose){if("close"==i.type){if(!r.length)return i.name==e.name?i:null;if(t.last(r)==i.name)r.pop();else{for(var c=!1;r.length&&!c;){var f=r.pop();f==i.name&&(c=!0)}if(!r.length&&!c)return i.name==e.name?i:null}}}else r.push(i.name)}}var l=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,u=/^<\/([\w\:\-]+)[^>]*>/;return{find:function(t,n){for(var r=e("range"),l=a(t),u=null,c=null,f=n;f>=0;f--)if(u=l.open(f)){if(u.selfClose){if(u.range.cmp(n,"lt","gt"))break;continue}if(c=s(u,l)){var d=r.create2(u.range.start,c.range.end);if(d.contains(n))break}else if(u.range.contains(n))break;u=null}else if(o(t,f,"-->")){for(var p=f-1;p>=0&&!o(t,p,"-->");p--)if(o(t,p,"<!--")){f=p;break}}else if(o(t,f,"<!--")){for(var p=f+4,h=t.length;h>p;p++)if(o(t,p,"-->")){p+=3;break}u=i(f,p);break}if(u){var m=null,g=null;if(c?(m=r.create2(u.range.start,c.range.end),g=r.create2(u.range.end,c.range.start)):m=g=r.create2(u.range.start,u.range.end),"comment"==u.type){var b=m.substring(t);g.start+=b.length-b.replace(/^<\!--\s*/,"").length,g.end-=b.length-b.replace(/\s*-->$/,"").length}return{open:u,close:c,type:"comment"==u.type?"comment":"tag",innerRange:g,innerContent:function(){return this.innerRange.substring(t)},outerRange:m,outerContent:function(){return this.outerRange.substring(t)},range:g.length()&&g.cmp(n,"lte","gte")?g:m,content:function(){return this.range.substring(t)},source:t}}},tag:function(e,t){var n=this.find(e,t);return n&&"tag"==n.type?n:void 0}}}),emmet.define("tabStops",function(e,t){var n=100,r=0,i={replaceCarets:!1,escape:function(e){return"\\"+e},tabstop:function(e){return e.token},variable:function(e){return e.token}};return e("abbreviationParser").addOutputProcessor(function(t,n,i){var a=0,o=e("tabStops"),s=e("utils"),l={tabstop:function(e){var t=parseInt(e.group);if(0==t)return"${0}";if(t>a&&(a=t),e.placeholder){var n=t+r,i=o.processText(e.placeholder,l);return"${"+n+":"+i+"}"}return"${"+(t+r)+"}"}};return t=o.processText(t,l),t=s.replaceVariables(t,o.variablesResolver(n)),r+=a+1,t}),{extract:function(n,r){var a=e("utils"),o={carets:""},s=[];r=t.extend({},i,r,{tabstop:function(e){var t=e.token,n="";return"cursor"==e.placeholder?s.push({start:e.start,end:e.start+t.length,group:"carets",value:""}):("placeholder"in e&&(o[e.group]=e.placeholder),e.group in o&&(n=o[e.group]),s.push({start:e.start,end:e.start+t.length,group:e.group,value:n})),t}}),r.replaceCarets&&(n=n.replace(new RegExp(a.escapeForRegexp(a.getCaretPlaceholder()),"g"),"${0:cursor}")),n=this.processText(n,r);var l=a.stringBuilder(),u=0,c=t.map(s,function(e){l.append(n.substring(u,e.start));var t=l.length,r=o[e.group]||"";return l.append(r),u=e.end,{group:e.group,start:t,end:t+r.length}});return l.append(n.substring(u)),{text:l.toString(),tabstops:t.sortBy(c,"start")}},processText:function(n,r){r=t.extend({},i,r);for(var a,o,s,l=e("utils").stringBuilder(),u=e("stringStream").create(n);a=u.next();)if("\\"!=a||u.eol()){if(s=a,"$"==a)if(u.start=u.pos-1,o=u.match(/^[0-9]+/))s=r.tabstop({start:l.length,group:u.current().substr(1),token:u.current()});else if(o=u.match(/^\{([a-z_\-][\w\-]*)\}/))s=r.variable({start:l.length,name:o[1],token:u.current()});else if(o=u.match(/^\{([0-9]+)(:.+?)?\}/,!1)){u.skipToPair("{","}");var c={start:l.length,group:o[1],token:u.current()},f=c.token.substring(c.group.length+2,c.token.length-1);f&&(c.placeholder=f.substr(1)),s=r.tabstop(c)}l.append(s)}else l.append(r.escape(u.next()));return l.toString()},upgrade:function(e,n){var r=0,i={tabstop:function(e){var t=parseInt(e.group);return t>r&&(r=t),e.placeholder?"${"+(t+n)+":"+e.placeholder+"}":"${"+(t+n)+"}"}};return t.each(["start","end","content"],function(t){e[t]=this.processText(e[t],i)},this),r},variablesResolver:function(r){var i={},a=e("resources");return function(o,s){if("child"==s)return o;if("cursor"==s)return e("utils").getCaretPlaceholder();var l=r.attribute(s);if(!t.isUndefined(l)&&l!==o)return l;var u=a.getVariable(s);return u?u:(i[s]||(i[s]=n++),"${"+i[s]+":"+s+"}")}},resetTabstopIndex:function(){r=0,n=100}}}),emmet.define("preferences",function(e,t){function n(e){return t.isString(e)?(e=e.toLowerCase(),"yes"==e||"true"==e||"1"==e):!!e}function r(e){return t.isObject(e)&&"value"in e&&t.keys(e).length<3}var i={},a={},o=null,s=null;return{define:function(e,n,i){var o=e;t.isString(e)&&(o={},o[e]={value:n,description:i}),t.each(o,function(e,t){a[t]=r(e)?e:{value:e}})},set:function(e,r){var o=e;t.isString(e)&&(o={},o[e]=r),t.each(o,function(e,t){if(!(t in a))throw'Property "'+t+'" is not defined. You should define it first with `define` method of current module';if(e!==a[t].value){switch(typeof a[t].value){case"boolean":e=n(e);break;case"number":e=parseInt(e+"",10)||0;break;default:e+=""}i[t]=e}else t in i&&delete i[t]})},get:function(e){return e in i?i[e]:e in a?a[e].value:void 0},getArray:function(n){var r=this.get(n);return t.isUndefined(r)||(r=t.map(r.split(","),e("utils").trim),r.length||(r=null)),r},getDict:function(e){var n={};return t.each(this.getArray(e),function(e){var t=e.split(":");n[t[0]]=t[1]}),n},description:function(e){return e in a?a[e].description:void 0},remove:function(e){t.isArray(e)||(e=[e]),t.each(e,function(e){e in i&&delete i[e],e in a&&delete a[e]})},list:function(){return t.map(t.keys(a).sort(),function(e){return{name:e,value:this.get(e),type:typeof a[e].value,description:a[e].description}},this)},load:function(e){t.each(e,function(e,t){this.set(t,e)},this)},exportModified:function(){return t.clone(i)},reset:function(){i={}},_startTest:function(){o=a,s=i,a={},i={}},_stopTest:function(){a=o,i=s}}}),emmet.define("filters",function(e,t){function n(e){return e?t.isString(e)?e.split(/[\|,]/g):e:[]}var r={},i="html";return{add:function(e,t){r[e]=t},apply:function(i,a,o){var s=e("utils");return o=e("profile").get(o),t.each(n(a),function(e){var t=s.trim(e.toLowerCase());t&&t in r&&(i=r[t](i,o))}),i},composeList:function(t,r,a){r=e("profile").get(r);var o=n(r.filters||e("resources").findItem(t,"filters")||i);return r.extraFilters&&(o=o.concat(n(r.extraFilters))),a&&(o=o.concat(n(a))),o&&o.length||(o=n(i)),o},extractFromAbbreviation:function(e){var t="";return e=e.replace(/\|([\w\|\-]+)$/,function(e,n){return t=n,""}),[e,n(t)]}}}),emmet.define("elements",function(e,t){function n(e){return{data:e}}var r={},i=/([\w\-]+)\s*=\s*(['"])(.*?)\2/g,a={add:function(e,t){var n=this;r[e]=function(){var r=t.apply(n,arguments);return r&&(r.type=e),r}},get:function(e){return r[e]},create:function(e){var t=[].slice.call(arguments,1),n=this.get(e);return n?n.apply(this,t):null},is:function(e,t){return e&&e.type===t}};return a.add("element",function(e,n,r){var a={name:e,is_empty:!!r};if(n)if(a.attributes=[],t.isArray(n))a.attributes=n;else if(t.isString(n))for(var o;o=i.exec(n);)a.attributes.push({name:o[1],value:o[3]});else t.each(n,function(e,t){a.attributes.push({name:t,value:e})});return a}),a.add("snippet",n),a.add("reference",n),a.add("empty",function(){return{}}),a}),emmet.define("editTree",function(e,t,n){function r(e,n){this.options=t.extend({offset:0},n),this.source=e,this._children=[],this._positions={name:0},this.initialize.apply(this,arguments)}function i(e,t,n){this.parent=e,this._name=t.value,this._value=n?n.value:"",this._positions={name:t.start,value:n?n.start:-1},this.initialize.apply(this,arguments)}var a=e("range").create;return r.extend=n.extend,r.prototype={initialize:function(){},_updateSource:function(n,r,i){var o=a(r,t.isUndefined(i)?0:i-r),s=n.length-o.length(),l=function(e){t.each(e,function(t,n){t>=o.end&&(e[n]+=s)})};l(this._positions),t.each(this.list(),function(e){l(e._positions)}),this.source=e("utils").replaceSubstring(this.source,n,o)},add:function(e,t,n){var r=new i(e,t);return this._children.push(r),r},get:function(e){return t.isNumber(e)?this.list()[e]:t.isString(e)?t.find(this.list(),function(t){return t.name()===e}):e},getAll:function(e){t.isArray(e)||(e=[e]);var n=[],r=[];return t.each(e,function(e){t.isString(e)?n.push(e):t.isNumber(e)&&r.push(e)}),t.filter(this.list(),function(e,i){return t.include(r,i)||t.include(n,e.name())})},value:function(e,n,r){var i=this.get(e);return i?i.value(n):t.isUndefined(n)?void 0:this.add(e,n,r)},values:function(e){return t.map(this.getAll(e),function(e){return e.value()})},remove:function(e){var n=this.get(e);n&&(this._updateSource("",n.fullRange()),this._children=t.without(this._children,n))},list:function(){return this._children},indexOf:function(e){return t.indexOf(this.list(),this.get(e))},name:function(e){return t.isUndefined(e)||this._name===(e=String(e))||(this._updateSource(e,this._positions.name,this._positions.name+this._name.length),this._name=e),this._name},nameRange:function(e){return a(this._positions.name+(e?this.options.offset:0),this.name())},range:function(e){return a(e?this.options.offset:0,this.toString())},itemFromPosition:function(e,n){return t.find(this.list(),function(t){return t.range(n).inside(e)})},toString:function(){return this.source}},i.extend=n.extend,i.prototype={initialize:function(){},_pos:function(e,t){return e+(t?this.parent.options.offset:0)},value:function(e){return t.isUndefined(e)||this._value===(e=String(e))||(this.parent._updateSource(e,this.valueRange()),this._value=e),this._value},name:function(e){return t.isUndefined(e)||this._name===(e=String(e))||(this.parent._updateSource(e,this.nameRange()),this._name=e),this._name},namePosition:function(e){return this._pos(this._positions.name,e)},valuePosition:function(e){return this._pos(this._positions.value,e)},range:function(e){return a(this.namePosition(e),this.toString())},fullRange:function(e){return this.range(e)},nameRange:function(e){return a(this.namePosition(e),this.name())},valueRange:function(e){return a(this.valuePosition(e),this.value())},toString:function(){return this.name()+this.value()},valueOf:function(){return this.toString()}},{EditContainer:r,EditElement:i,createToken:function(e,t,n){var r={start:e||0,value:t||"",type:n};return r.end=r.start+r.value.length,r}}}),emmet.define("cssEditTree",function(e,t){function n(t,n){return e("range").create(t,n)}function r(e,n){n=n||u|c;var r=["white","line"];if((n&c)==c)for(;e.length&&t.include(r,t.last(e).type);)e.pop();if((n&u)==u)for(;e.length&&t.include(r,e[0].type);)e.shift();return e}function i(e){for(var i,a,o=[],s=e.position();(i=e.next())&&"{"!=i.type;)o.push(i);return r(o),o.length?(s=o[0].start,a=t.last(o).end):a=s,n(s,a-s)}function a(e){var i,a,o,s=["white","line",":"],l=[];for(e.nextUntil(function(e){return!t.include(s,this.itemNext().type)}),a=e.current().end;i=e.next();){if("}"==i.type||";"==i.type)return r(l,u|("}"==i.type?c:0)),l.length?(a=l[0].start,o=t.last(l).end):o=a,n(a,o-a);l.push(i)}return l.length?n(l[0].start,t.last(l).end-l[0].start):void 0}function o(r){var i,a=e("stringStream").create(r),o=[],s=/[\s\u00a0,]/,l=function(){a.next(),o.push(n(a.start,a.current())),a.start=a.pos};for(a.eatSpace(),a.start=a.pos;i=a.next();)if('"'==i||"'"==i){if(a.next(),!a.skipTo(i))break;l()}else if("("==i){if(a.backUp(1),!a.skipToPair("(",")"))break;a.backUp(1),l()}else s.test(i)&&(o.push(n(a.start,a.current().length-1)),a.eatWhile(s),a.start=a.pos);return l(),t.chain(o).filter(function(e){return!!e.length()}).uniq(!1,function(e){return e.toString()}).value()}function s(e){for(var t=e.tokens,n=e._i+1,r=t.length;r>n;n++){if(":"==t[n].type)return!0;if("identifier"==t[n].type||"line"==t[n].type)return!1}return!1}var l={styleBefore:"\n	",styleSeparator:": ",offset:0},u=1,c=2,f=e("editTree").EditContainer.extend({initialize:function(r,o){t.defaults(this.options,l);var u=e("editTree"),c=e("tokenIterator").create(e("cssParser").parse(r)),f=i(c);if(this._positions.name=f.start,this._name=f.substring(r),!c.current()||"{"!=c.current().type)throw"Invalid CSS rule";this._positions.contentStart=c.position()+1;for(var p,h,m;m=c.next();)if("identifier"==m.type&&s(c)){p=n(m),h=a(c);var g=c.current()&&";"==c.current().type?n(c.current()):n(h.end,0);this._children.push(new d(this,u.createToken(p.start,p.substring(r)),u.createToken(h.start,h.substring(r)),u.createToken(g.start,g.substring(r))))}this._saveStyle()},_saveStyle:function(){var n=this._positions.contentStart,r=this.source,i=e("utils");t.each(this.list(),function(e){e.styleBefore=r.substring(n,e.namePosition());var a=i.splitByLines(e.styleBefore);a.length>1&&(e.styleBefore="\n"+t.last(a)),e.styleSeparator=r.substring(e.nameRange().end,e.valuePosition()),e.styleBefore=t.last(e.styleBefore.split("*/")),e.styleSeparator=e.styleSeparator.replace(/\/\*.*?\*\//g,""),n=e.range().end})},add:function(n,r,i){var a=this.list(),o=this._positions.contentStart,s=t.pick(this.options,"styleBefore","styleSeparator"),l=e("editTree");t.isUndefined(i)&&(i=a.length);var u=a[i];u?o=u.fullRange().start:(u=a[i-1])&&(u.end(";"),o=u.range().end),u&&(s=t.pick(u,"styleBefore","styleSeparator"));var c=l.createToken(o+s.styleBefore.length,n),f=l.createToken(c.end+s.styleSeparator.length,r),p=new d(this,c,f,l.createToken(f.end,";"));return t.extend(p,s),this._updateSource(p.styleBefore+p.toString(),o),this._children.splice(i,0,p),p}}),d=e("editTree").EditElement.extend({initialize:function(e,t,n,r){this.styleBefore=e.options.styleBefore,this.styleSeparator=e.options.styleSeparator,this._end=r.value,this._positions.end=r.start},valueParts:function(e){var n=o(this.value());if(e){var r=this.valuePosition(!0);t.each(n,function(e){e.shift(r)})}return n},end:function(e){return t.isUndefined(e)||this._end===e||(this.parent._updateSource(e,this._positions.end,this._positions.end+this._end.length),this._end=e),this._end},fullRange:function(e){var t=this.range(e);return t.start-=this.styleBefore.length,t},toString:function(){return this.name()+this.styleSeparator+this.value()+this.end()}});return{parse:function(e,t){return new f(e,t)},parseFromPosition:function(e,t,n){var r=this.extractRule(e,t,n);return r&&r.inside(t)?this.parse(r.substring(e),{offset:r.start}):null},extractRule:function(t,n,r){for(var i,a="",o=t.length,s=n,l="{}/\\<>\n\r",u=-1;s>=0;){if(i=t.charAt(s),"{"==i){u=s;break}if("}"==i&&!r){s++;break}s--}for(;o>s;){if(i=t.charAt(s),"{"==i)u=s;else if("}"==i){-1!=u&&(a=t.substring(u,s+1));break}s++}if(a){s=u-1;for(var c="";s>=0&&(i=t.charAt(s),-1==l.indexOf(i));)s--;return c=t.substring(s+1,u).replace(/^[\s\n\r]+/m,""),e("range").create(u-c.length,a.length+c.length)}return null},baseName:function(e){return e.replace(/^\s*\-\w+\-/,"")},findParts:o}}),emmet.define("xmlEditTree",function(e,t){var n={styleBefore:" ",styleSeparator:"=",styleQuote:'"',offset:0},r=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/m,i=e("editTree").EditContainer.extend({initialize:function(r,i){t.defaults(this.options,n),this._positions.name=1;var o=null,s=e("xmlParser").parse(r),l=e("range");t.each(s,function(e){switch(e.value=l.create(e).substring(r),e.type){case"tag":/^<[^\/]+/.test(e.value)&&(this._name=e.value.substring(1));break;case"attribute":o&&this._children.push(new a(this,o)),o=e;break;case"string":this._children.push(new a(this,o,e)),o=null}},this),o&&this._children.push(new a(this,o)),this._saveStyle()},_saveStyle:function(){var e=this.nameRange().end,n=this.source;t.each(this.list(),function(t){t.styleBefore=n.substring(e,t.namePosition()),-1!==t.valuePosition()&&(t.styleSeparator=n.substring(t.namePosition()+t.name().length,t.valuePosition()-t.styleQuote.length)),e=t.range().end})},add:function(n,r,i){var o=this.list(),s=this.nameRange().end,l=e("editTree"),u=t.pick(this.options,"styleBefore","styleSeparator","styleQuote");t.isUndefined(i)&&(i=o.length);var c=o[i];c?s=c.fullRange().start:(c=o[i-1])&&(s=c.range().end),c&&(u=t.pick(c,"styleBefore","styleSeparator","styleQuote")),r=u.styleQuote+r+u.styleQuote;var f=new a(this,l.createToken(s+u.styleBefore.length,n),l.createToken(s+u.styleBefore.length+n.length+u.styleSeparator.length,r));return t.extend(f,u),this._updateSource(f.styleBefore+f.toString(),s),this._children.splice(i,0,f),f}}),a=e("editTree").EditElement.extend({initialize:function(e,t,n){this.styleBefore=e.options.styleBefore,this.styleSeparator=e.options.styleSeparator;var r="",i=e.options.styleQuote;n&&(r=n.value,i=r.charAt(0),'"'==i||"'"==i?r=r.substring(1):i="",i&&r.charAt(r.length-1)==i&&(r=r.substring(0,r.length-1))),this.styleQuote=i,this._value=r,this._positions.value=n?n.start+i.length:-1},fullRange:function(e){var t=this.range(e);return t.start-=this.styleBefore.length,t},toString:function(){return this.name()+this.styleSeparator+this.styleQuote+this.value()+this.styleQuote}});return{parse:function(e,t){return new i(e,t)},parseFromPosition:function(e,t,n){var r=this.extractTag(e,t,n);return r&&r.inside(t)?this.parse(r.substring(e),{offset:r.start}):null},extractTag:function(t,n,i){var a,o=t.length,s=e("range"),l=Math.min(2e3,o),u=null,c=function(e){var n;return"<"==t.charAt(e)&&(n=t.substr(e,l).match(r))?s.create(e,n[0]):void 0};for(a=n;a>=0&&!(u=c(a));a--);if(u&&(u.inside(n)||i))return u;if(!u&&i)return null;for(a=n;o>a;a++)if(u=c(a))return u}}}),emmet.define("expandAbbreviation",function(e,t){var n=e("handlerList").create(),r=null,i=e("actions");return i.add("expand_abbreviation",function(r,i,a){var o=t.toArray(arguments),s=e("editorUtils").outputInfo(r,i,a);return o[1]=s.syntax,o[2]=s.profile,n.exec(!1,o)}),i.add("expand_abbreviation_with_tab",function(t,n,r){var a=t.getSelection(),o=e("resources").getVariable("indentation");if(a){var s=e("utils"),l=e("range").create(t.getSelectionRange()),u=s.padString(a,o);t.replaceContent(o+"${0}",t.getCaretPos());var c=e("range").create(t.getCaretPos(),l.length());return t.replaceContent(u,c.start,c.end,!0),t.createSelection(c.start,c.start+u.length),!0}return i.run("expand_abbreviation",t,n,r)||t.replaceContent(o,t.getCaretPos()),!0},{hidden:!0}),n.add(function(t,n,i){var a=t.getSelectionRange().end,o=r.findAbbreviation(t);if(o){var s=emmet.expandAbbreviation(o,n,i,e("actionUtils").captureContext(t));if(s)return t.replaceContent(s,a-o.length,a),!0}return!1},{order:-1}),r={addHandler:function(e,t){n.add(e,t)},removeHandler:function(e){n.remove(e,options)},findAbbreviation:function(t){var n=e("range").create(t.getSelectionRange()),r=String(t.getContent());if(n.length())return n.substring(r);var i=t.getCurrentLineRange();return e("actionUtils").extractAbbreviation(r.substring(i.start,n.start))}}}),emmet.define("wrapWithAbbreviation",function(e,t){var n=null;return e("actions").add("wrap_with_abbreviation",function(t,r,i,a){var o=e("editorUtils").outputInfo(t,i,a),s=e("utils"),l=e("editorUtils");if(r=r||t.prompt("Enter abbreviation"),!r)return null;r=String(r);var u=e("range").create(t.getSelectionRange());if(!u.length()){var c=e("htmlMatcher").tag(o.content,u.start);if(!c)return!1;u=s.narrowToNonSpace(o.content,c.range)}var f=s.escapeText(u.substring(o.content)),d=n.wrap(r,l.unindent(t,f),o.syntax,o.profile,e("actionUtils").captureContext(t));return d?(t.replaceContent(d,u.start,u.end),!0):!1}),n={wrap:function(t,n,r,i,a){var o=e("filters"),s=e("utils");r=r||emmet.defaultSyntax(),i=e("profile").get(i,r),e("tabStops").resetTabstopIndex();var l=o.extractFromAbbreviation(t),u=e("abbreviationParser").parse(l[0],{syntax:r,pastedContent:n,contextNode:a});if(u){var c=o.composeList(r,i,l[1]);return o.apply(u,c,i),s.replaceVariables(u.toString())}return null}}}),emmet.exec(function(e,t){function n(t){var n=e("range").create(t.getSelectionRange()),r=e("editorUtils").outputInfo(t);if(!n.length()){var i=e("htmlMatcher").tag(r.content,t.getCaretPos());i&&(n=i.outerRange)}return o(t,"<!--","-->",n)}function r(t){var n=e("range").create(t.getSelectionRange()),r=e("editorUtils").outputInfo(t);if(!n.length()){var a=e("cssEditTree").parseFromPosition(r.content,t.getCaretPos());if(a){var s=i(a,t.getCaretPos());n=s?s.range(!0):e("range").create(a.nameRange(!0).start,a.source)}}return n.length()||(n=e("range").create(t.getCurrentLineRange()),e("utils").narrowToNonSpace(r.content,n)),o(t,"/*","*/",n)}function i(e,n){var r=n-(e.options.offset||0),i=/^[\s\n\r]/;return t.find(e.list(),function(t){return t.range().end===r?i.test(e.source.charAt(r)):t.range().inside(r)})}function a(t,n,r,i){for(var a=-1,o=-1,s=function(e,n){return t.substr(n,e.length)==e};n--;)if(s(r,n)){a=n;break}if(-1!=a){n=a;for(var l=t.length;l>=n++;)if(s(i,n)){o=n+i.length;break}}return-1!=a&&-1!=o?e("range").create(a,o-a):null}function o(t,n,r,i){function o(e){return e.replace(new RegExp("^"+f.escapeForRegexp(n)+"\\s*"),function(e){return u-=e.length,""}).replace(new RegExp("\\s*"+f.escapeForRegexp(r)+"$"),"")}var s=e("editorUtils"),l=s.outputInfo(t).content,u=t.getCaretPos(),c=null,f=e("utils"),d=a(l,u,n,r);return d&&d.overlap(i)?(i=d,c=o(i.substring(l))):(c=n+" "+i.substring(l).replace(new RegExp(f.escapeForRegexp(n)+"\\s*|\\s*"+f.escapeForRegexp(r),"g"),"")+" "+r,u+=n.length+1),null!==c?(c=f.escapeText(c),t.setCaretPos(i.start),t.replaceContent(s.unindent(t,c),i.start,i.end),t.setCaretPos(u),!0):!1}e("actions").add("toggle_comment",function(t){var i=e("editorUtils").outputInfo(t);if("css"==i.syntax){var a=t.getCaretPos(),o=e("htmlMatcher").tag(i.content,a);o&&o.open.range.inside(a)&&(i.syntax="html")}return"css"==i.syntax?r(t):n(t)})}),emmet.exec(function(e,t){function n(e,t,n){function r(e){for(var t=e;t>=0;){var n=a.charAt(t);if("\n"==n||"\r"==n)break;t--}return a.substring(t,e)}t=t||1,n=n||0;for(var i=e.getCaretPos()+n,a=String(e.getContent()),o=a.length,s=-1,l=/^\s+$/;o>=i&&i>=0;){i+=t;var u=a.charAt(i),c=a.charAt(i+1),f=a.charAt(i-1);switch(u){case'"':case"'":c==u&&"="==f&&(s=i+1);break;case">":"<"==c&&(s=i+1);break;case"\n":case"\r":l.test(r(i-1))&&(s=i)}if(-1!=s)break}return s}var r=e("actions");r.add("prev_edit_point",function(e){var t=e.getCaretPos(),r=n(e,-1);return r==t&&(r=n(e,-1,-2)),-1!=r?(e.setCaretPos(r),!0):!1},{label:"Previous Edit Point"}),r.add("next_edit_point",function(e){var t=n(e,1);return-1!=t?(e.setCaretPos(t),!0):!1})}),emmet.exec(function(e,t){function n(t,n,r,i){for(var a,o,s=e("range"),l=e("editorUtils").outputInfo(t).content,u=l.length,c=s.create(-1,0),f=s.create(t.getSelectionRange()),d=f.start,p=1e5;d>=0&&u>d&&--p>0;){if(a=r(l,d,n)){if(c.equal(a))break;if(c=a.clone(),o=i(a.substring(l),a.start,f.clone()))return t.createSelection(o.start,o.end),!0;d=n?a.start:a.end-1}d+=n?-1:1}return!1}function r(e){var t=!0;return n(e,!1,function(e,n){return t?(t=!1,l(e,n)):u(e,n)},function(e,t,n){return s(e,t,n,!1)})}function i(e){return n(e,!0,u,function(e,t,n){return s(e,t,n,!0)})}function a(n,r,i){i=i||0;var a,s,l=e("range"),u=[],f=-1,d="",p="";return t.each(r,function(e){switch(e.type){case"tag":s=n.substring(e.start,e.end),/^<[\w\:\-]/.test(s)&&u.push(l.create({start:e.start+1,end:e.end}));break;case"attribute":f=e.start,d=n.substring(e.start,e.end);break;case"string":u.push(l.create(f,e.end-f)),a=l.create(e),p=a.substring(n),c(p.charAt(0))&&a.start++,c(p.charAt(p.length-1))&&a.end--,u.push(a),"class"==d&&(u=u.concat(o(a.substring(n),a.start)))}}),t.each(u,function(e){e.shift(i)}),t.chain(u).filter(function(e){return!!e.length()}).uniq(!1,function(e){return e.toString()}).value()}function o(t,n){n=n||0;var r=[],i=e("stringStream").create(t),a=e("range");i.eatSpace(),i.start=i.pos;for(var o;o=i.next();)/[\s\u00a0]/.test(o)&&(r.push(a.create(i.start+n,i.pos-i.start-1)),i.eatSpace(),i.start=i.pos);return r.push(a.create(i.start+n,i.pos-i.start)),r}function s(n,r,i,o){var s=a(n,e("xmlParser").parse(n),r);o&&s.reverse();var l=t.find(s,function(e){return e.equal(i)});if(l){var u=t.indexOf(s,l);return u<s.length-1?s[u+1]:null}if(o)return t.find(s,function(e){return e.start<i.start});if(!l){var c=t.filter(s,function(e){return e.inside(i.end)});if(c.length>1)return c[1]}return t.find(s,function(e){return e.end>i.end})}function l(e,t){for(var n;t>=0;){if(n=u(e,t))return n;t--}return null}function u(t,n){var r;return"<"==t.charAt(n)&&(r=t.substring(n,t.length).match(b))?e("range").create(n,r[0]):void 0}function c(e){return'"'==e||"'"==e}function f(n){var r=n.valueRange(!0),i=[n.range(!0),r],a=e("stringStream"),o=e("cssEditTree"),s=e("range"),l=n.value();return t.each(n.valueParts(),function(e){var n=e.clone();i.push(n.shift(r.start));var u=a.create(e.substring(l));if(u.match(/^[\w\-]+\(/,!0)){u.start=u.pos,u.skipToPair("(",")");var c=u.current();i.push(s.create(n.start+u.start,c)),t.each(o.findParts(c),function(e){i.push(s.create(n.start+u.start+e.start,e.substring(c)))})}}),t.chain(i).filter(function(e){return!!e.length()}).uniq(!1,function(e){return e.toString()}).value()}function d(e,n,r){
var i,a,o,s,l=null,u=null,c=e.list();for(r?(c.reverse(),o=function(e){return e.range(!0).start<=n.start},s=function(e){return e.start<n.start}):(o=function(e){return e.range(!0).end>=n.end},s=function(e){return e.end>n.start});l=t.find(c,o);){if(i=f(l),r&&i.reverse(),u=t.find(i,function(e){return e.equal(n)})){if(a=t.indexOf(i,u),a!=i.length-1){u=i[a+1];break}}else{var d=t.filter(i,function(e){return e.inside(n.end)});if(d.length>1){u=d[1];break}if(u=t.find(i,s))break}u=null,n.start=n.end=r?l.range(!0).start-1:l.range(!0).end+1}return u}function p(t){return n(t,!1,e("cssEditTree").extractRule,m)}function h(t){return n(t,!0,e("cssEditTree").extractRule,g)}function m(t,n,r){var i=e("cssEditTree").parse(t,{offset:n}),a=i.nameRange(!0);return r.end<a.end?a:d(i,r,!1)}function g(t,n,r){var i=e("cssEditTree").parse(t,{offset:n}),a=d(i,r,!0);if(!a){var o=i.nameRange(!0);if(r.start>o.start)return o}return a}var b=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,v=e("actions");v.add("select_next_item",function(e){return"css"==e.getSyntax()?p(e):r(e)}),v.add("select_previous_item",function(e){return"css"==e.getSyntax()?h(e):i(e)})}),emmet.exec(function(e,t){function n(t,n){n=String((n||"out").toLowerCase());var r=e("editorUtils").outputInfo(t),o=e("range"),s=o.create(t.getSelectionRange()),l=r.content;if(a&&!a.range.equal(s)&&(a=null),a&&s.length())if("in"==n){if("tag"==a.type&&!a.close)return!1;if(a.range.equal(a.outerRange))a.range=a.innerRange;else{var u=e("utils").narrowToNonSpace(l,a.innerRange);a=i.find(l,u.start+1),a&&a.range.equal(s)&&a.outerRange.equal(s)&&(a.range=a.innerRange)}}else!a.innerRange.equal(a.outerRange)&&a.range.equal(a.innerRange)&&s.equal(a.range)?a.range=a.outerRange:(a=i.find(l,s.start),a&&a.range.equal(s)&&a.innerRange.equal(s)&&(a.range=a.outerRange));else a=i.find(l,s.start);return a&&!a.range.equal(s)?(t.createSelection(a.range.start,a.range.end),!0):(a=null,!1)}var r=e("actions"),i=e("htmlMatcher"),a=null;r.add("match_pair",n,{hidden:!0}),r.add("match_pair_inward",function(e){return n(e,"in")},{label:"HTML/Match Pair Tag (inward)"}),r.add("match_pair_outward",function(e){return n(e,"out")},{label:"HTML/Match Pair Tag (outward)"}),r.add("matching_pair",function(e){var t=String(e.getContent()),n=e.getCaretPos();"<"==t.charAt(n)&&n++;var r=i.tag(t,n);return r&&r.close?(r.open.range.inside(n)?e.setCaretPos(r.close.range.start):e.setCaretPos(r.open.range.start),!0):!1},{label:"HTML/Go To Matching Tag Pair"})}),emmet.exec(function(e,t){e("actions").add("remove_tag",function(t){var n=e("utils"),r=e("editorUtils").outputInfo(t),i=e("htmlMatcher").tag(r.content,t.getCaretPos());if(i){if(i.close){var a=n.narrowToNonSpace(r.content,i.innerRange),o=n.findNewlineBounds(r.content,a.start),s=n.getLinePadding(o.substring(r.content)),l=a.substring(r.content);l=n.unindentString(l,s),t.replaceContent(n.getCaretPlaceholder()+n.escapeText(l),i.outerRange.start,i.outerRange.end)}else t.replaceContent(n.getCaretPlaceholder(),i.range.start,i.range.end);return!0}return!1},{label:"HTML/Remove Tag"})}),emmet.exec(function(e,t){function n(t,n,r){var i=e("utils"),a=n.selfClosing()||" /",o=r.open.range.substring(r.source).replace(/\s*>$/,a+">"),s=t.getCaretPos();return o.length+r.outerRange.start<s&&(s=o.length+r.outerRange.start),o=i.escapeText(o),t.replaceContent(o,r.outerRange.start,r.outerRange.end),t.setCaretPos(s),!0}function r(t,n,r){var i=e("utils"),a=i.getNewline(),o=e("resources").getVariable("indentation"),s=t.getCaretPos(),l=n.tag_nl===!0?a+o+a:"",u=r.outerContent().replace(/\s*\/>$/,">");return s=r.outerRange.start+u.length,u+=l+"</"+r.open.name+">",u=i.escapeText(u),t.replaceContent(u,r.outerRange.start,r.outerRange.end),t.setCaretPos(s),!0}e("actions").add("split_join_tag",function(t,i){var a=e("htmlMatcher"),o=e("editorUtils").outputInfo(t,null,i),s=e("profile").get(o.profile),l=a.tag(o.content,t.getCaretPos());return l?l.close?n(t,s,l):r(t,s,l):!1},{label:"HTML/Split\\Join Tag Declaration"})}),emmet.define("reflectCSSValue",function(e,t){function n(t){var n=e("cssEditTree"),r=e("editorUtils").outputInfo(t),i=t.getCaretPos(),a=n.parseFromPosition(r.content,i);if(a){var s=a.itemFromPosition(i,!0);if(s){var l=a.source,u=a.options.offset,c=i-u-s.range().start;return o.exec(!1,[s]),l!==a.source?{data:a.source,start:u,end:u+l.length,caret:u+s.range().start+c}:void 0}}}function r(t){t=e("cssEditTree").baseName(t);var n,r="^(?:\\-\\w+\\-)?";return"opacity"==t||"filter"==t?new RegExp(r+"(?:opacity|filter)$"):(n=t.match(/^border-radius-(top|bottom)(left|right)/))?new RegExp(r+"(?:"+t+"|border-"+n[1]+"-"+n[2]+"-radius)$"):(n=t.match(/^border-(top|bottom)-(left|right)-radius/))?new RegExp(r+"(?:"+t+"|border-radius-"+n[1]+n[2]+")$"):new RegExp(r+t+"$")}function i(e,t){var n=a(e.name(),e.value(),t.name(),t.value());t.value(n)}function a(t,n,r,i){var a=e("cssEditTree"),o=e("utils");if(t=a.baseName(t),r=a.baseName(r),"opacity"==t&&"filter"==r)return i.replace(/opacity=[^)]*/i,"opacity="+Math.floor(100*parseFloat(n)));if("filter"==t&&"opacity"==r){var s=n.match(/opacity=([^)]*)/i);return s?o.prettifyNumber(parseInt(s[1])/100):i}return n}var o=e("handlerList").create();return e("actions").add("reflect_css_value",function(t){return"css"!=t.getSyntax()?!1:e("actionUtils").compoundUpdate(t,n(t))},{label:"CSS/Reflect Value"}),o.add(function(e){var n=r(e.name());t.each(e.parent.list(),function(t){n.test(t.name())&&i(e,t)})},{order:-1}),{addHandler:function(e,t){o.add(e,t)},removeHandler:function(e){o.remove(e,options)}}}),emmet.exec(function(e,t){e("actions").add("evaluate_math_expression",function(t){var n=e("actionUtils"),r=e("utils"),i=String(t.getContent()),a=".+-*/\\",o=e("range").create(t.getSelectionRange());if(o.length()||(o=n.findExpressionBounds(t,function(e){return r.isNumeric(e)||-1!=a.indexOf(e)})),o&&o.length()){var s=o.substring(i);s=s.replace(/([\d\.\-]+)\\([\d\.\-]+)/g,"Math.round($1/$2)");try{var l=r.prettifyNumber(new Function("return "+s)());return t.replaceContent(l,o.start,o.end),t.setCaretPos(o.start+l.length),!0}catch(u){}}return!1},{label:"Numbers/Evaluate Math Expression"})}),emmet.exec(function(e,t){function n(n,i){var a=e("utils"),o=e("actionUtils"),s=!1,l=!1,u=o.findExpressionBounds(n,function(e,t,n){return a.isNumeric(e)?!0:"."==e?a.isNumeric(n.charAt(t+1))?l?!1:l=!0:!1:"-"==e?s?!1:s=!0:!1});if(u&&u.length()){var c=u.substring(String(n.getContent())),f=parseFloat(c);if(!t.isNaN(f)){if(f=a.prettifyNumber(f+i),/^(\-?)0+[1-9]/.test(c)){var d="";RegExp.$1&&(d="-",f=f.substring(1));var p=f.split(".");p[0]=a.zeroPadString(p[0],r(c)),f=d+p.join(".")}return n.replaceContent(f,u.start,u.end),n.createSelection(u.start,u.start+f.length),!0}}return!1}function r(e){return e=e.replace(/^\-/,""),~e.indexOf(".")?e.split(".")[0].length:e.length}var i=e("actions");t.each([1,-1,10,-10,.1,-.1],function(e){var t=e>0?"increment":"decrement";i.add(t+"_number_by_"+String(Math.abs(e)).replace(".","").substring(0,2),function(t){return n(t,e)},{label:"Numbers/"+t.charAt(0).toUpperCase()+t.substring(1)+" number by "+Math.abs(e)})})}),emmet.exec(function(e,t){var n=e("actions"),r=e("preferences");r.define("css.closeBraceIndentation","\n","Indentation before closing brace of CSS rule. Some users prefere indented closing brace of CSS rule for better readability. This preference’s value will be automatically inserted before closing brace when user adds newline in newly created CSS rule (e.g. when “Insert formatted linebreak” action will be performed in CSS file). If you’re such user, you may want to write put a value like <code>\\n\\t</code> in this preference."),n.add("insert_formatted_line_break_only",function(n){var i=e("utils"),a=e("resources"),o=e("editorUtils").outputInfo(n),s=n.getCaretPos(),l=i.getNewline();if(t.include(["html","xml","xsl"],o.syntax)){var u=a.getVariable("indentation"),c=e("htmlMatcher").tag(o.content,s);if(c&&!c.innerRange.length())return n.replaceContent(l+u+i.getCaretPlaceholder()+l,s),!0}else if("css"==o.syntax){var f=o.content;if(s&&"{"==f.charAt(s-1)){var d=r.get("css.closeBraceIndentation"),u=a.getVariable("indentation"),p="}"==f.charAt(s);if(!p)for(var h,m=s,g=f.length;g>m&&(h=f.charAt(m),"{"!=h);m++)if("}"==h){d="",p=!0;break}p||(d+="}");var b=l+u+i.getCaretPlaceholder()+d;return n.replaceContent(b,s),!0}}return!1},{hidden:!0}),n.add("insert_formatted_line_break",function(t){if(!n.run("insert_formatted_line_break_only",t)){for(var r,i=e("utils"),a=e("editorUtils").getCurrentLinePadding(t),o=String(t.getContent()),s=t.getCaretPos(),l=o.length,u=i.getNewline(),c=t.getCurrentLineRange(),f="",d=c.end+1;l>d&&(r=o.charAt(d)," "==r||"	"==r);d++)f+=r;f.length>a.length?t.replaceContent(u+f,s,s,!0):t.replaceContent(u,s)}return!0},{hidden:!0})}),emmet.exec(function(e,t){e("actions").add("merge_lines",function(t){var n=e("htmlMatcher"),r=e("utils"),i=e("editorUtils"),a=i.outputInfo(t),o=e("range").create(t.getSelectionRange());if(!o.length()){var s=n.find(a.content,t.getCaretPos());s&&(o=s.outerRange)}if(o.length()){for(var l=o.substring(a.content),u=r.splitByLines(l),c=1;c<u.length;c++)u[c]=u[c].replace(/^\s+/,"");l=u.join("").replace(/\s{2,}/," ");var f=l.length;return l=r.escapeText(l),t.replaceContent(l,o.start,o.end),t.createSelection(o.start,o.start+f),!0}return!1})}),emmet.exec(function(e,t){function n(e,t,n){return n=n||0,t.charAt(n)==e.charAt(0)&&t.substr(n,e.length)==e}function r(t,n,r){var i=e("file"),a=e("actionUtils"),o=t.getFilePath(),s="application/octet-stream";if(null===o)throw"You should save your file before using this action";var l=i.locateFile(o,n);if(null===l)throw"Can't find "+n+" file";return i.read(l,function(o,u){if(o)throw"Unable to read "+l+": "+o;var c=e("base64").encode(String(u));if(!c)throw"Can't encode file content to base64";c="data:"+(a.mimeTypes[String(i.getExt(l))]||s)+";base64,"+c,t.replaceContent("$0"+c,r,r+n.length)}),!0}function i(t,n,r){var i=String(t.prompt("Enter path to file (absolute or relative)"));if(!i)return!1;var a=e("file"),o=a.createPath(t.getFilePath(),i);if(!o)throw"Can't save file";return a.save(o,e("base64").decode(n.replace(/^data\:.+?;.+?,/,""))),t.replaceContent("$0"+i,r,r+n.length),!0}e("actions").add("encode_decode_data_url",function(e){var t=String(e.getSelection()),a=e.getCaretPos();if(!t)for(var o,s=String(e.getContent());a-->=0;){if(n("src=",s,a)){(o=s.substr(a).match(/^(src=(["'])?)([^'"<>\s]+)\1?/))&&(t=o[3],a+=o[1].length);break}if(n("url(",s,a)){(o=s.substr(a).match(/^(url\((['"])?)([^'"\)\s]+)\1?/))&&(t=o[3],a+=o[1].length);break}}return t?n("data:",t)?i(e,t,a):r(e,t,a):!1},{label:"Encode\\Decode data:URL image"})}),emmet.exec(function(e,t){function n(n){var r=n.getCaretPos(),a=e("editorUtils").outputInfo(n),o=e("xmlEditTree").parseFromPosition(a.content,r,!0);o&&"img"==(o.name()||"").toLowerCase()&&i(n,o.value("src"),function(i){if(i){var a=o.range(!0);o.value("width",i.width),o.value("height",i.height,o.indexOf("width")+1),e("actionUtils").compoundUpdate(n,t.extend(a,{data:o.toString(),caret:r}))}})}function r(n){var r=n.getCaretPos(),a=e("editorUtils").outputInfo(n),o=e("cssEditTree").parseFromPosition(a.content,r,!0);if(o){var s,l=o.itemFromPosition(r,!0);l&&(s=/url\((["']?)(.+?)\1\)/i.exec(l.value()||""))&&i(n,s[2],function(i){if(i){var a=o.range(!0);o.value("width",i.width+"px"),o.value("height",i.height+"px",o.indexOf("width")+1),e("actionUtils").compoundUpdate(n,t.extend(a,{data:o.toString(),caret:r}))}})}}function i(t,n,r){var i,a=e("actionUtils");if(n){if(/^data:/.test(n))return i=e("base64").decode(n.replace(/^data\:.+?;.+?,/,"")),r(a.getImageSize(i));var o=e("file"),s=o.locateFile(t.getFilePath(),n);if(null===s)throw"Can't find "+n+" file";o.read(s,function(e,t){if(e)throw"Unable to read "+s+": "+e;t=String(t),r(a.getImageSize(t))})}}e("actions").add("update_image_size",function(e){return t.include(["css","less","scss"],String(e.getSyntax()))?r(e):n(e),!0})}),emmet.define("cssResolver",function(e,t){function n(e){var t=e&&e.charCodeAt(0);return e&&"."==e||t>47&&58>t}function r(t){var n=e("utils");return t=n.trim(t),~t.indexOf("/*")||/[\n\r]/.test(t)?!1:/^[a-z0-9\-]+\s*\:/i.test(t)?(t=e("tabStops").processText(t,{replaceCarets:!0,tabstop:function(){return"value"}}),2==t.split(":").length):!1}function i(e){return"-"!=e.charAt(0)||/^\-[\.\d]/.test(e)||(e=e.replace(/^\-+/,"")),"#"==e.charAt(0)?a(e):o(e)}function a(t){var n=t.replace(/^#+/,"")||"0";if("t"==n.toLowerCase())return"transparent";var r=e("utils").repeatString,i=null;switch(n.length){case 1:i=r(n,6);break;case 2:i=r(n,3);break;case 3:i=n.charAt(0)+n.charAt(0)+n.charAt(1)+n.charAt(1)+n.charAt(2)+n.charAt(2);break;case 4:i=n+n.substr(0,2);break;case 5:i=n+n.charAt(0);break;default:i=n.substr(0,6)}if(y.get("css.color.short")){var a=i.split("");a[0]==a[1]&&a[2]==a[3]&&a[4]==a[5]&&(i=a[0]+a[2]+a[4])}switch(y.get("css.color.case")){case"upper":i=i.toUpperCase();break;case"lower":i=i.toLowerCase()}return"#"+i}function o(e){var t=y.getDict("css.keywordAliases");return e in t?t[e]:e}function s(e){var t=y.getDict("css.unitAliases");return e in t?t[e]:e}function l(e){return t.include(y.getArray("css.keywords"),o(e))}function u(e,n){var r=v[n];return r||(r=t.find(v,function(e){return e.prefix==n})),r&&r.supports(e)}function c(e,n){var r=[];return t.each(v,function(t,n){u(e,n)&&r.push(n)}),r.length||n||t.each(v,function(e,t){e.obsolete||r.push(t)}),r}function f(e,n){t.isString(n)&&(n={prefix:n}),v[e]=t.extend({},b,n)}function d(e,n){if(n){var r=y.get(n+"."+e);if(!t.isUndefined(r))return r}return y.get("css."+e)}function p(t,n){var r=t.indexOf(":");return t=t.substring(0,r).replace(/\s+$/,"")+d("valueSeparator",n)+e("utils").trim(t.substring(r+1)),t.replace(/\s*;\s*$/,d("propertyEnd",n))}function h(e,n,i){return t.isString(e)||(e=e.data),r(e)?(n&&(~e.indexOf(";")?e=e.split(";").join(" !important;"):e+=" !important"),p(e,i)):e}function m(e){var n=y.getArray(e);return t.each(y.getArray(e+"Addon"),function(e){"-"==e.charAt(0)?n=t.without(n,e.substr(1)):("+"==e.charAt(0)&&(e=e.substr(1)),n.push(e))}),n}var g=null,b={prefix:"emmet",obsolete:!1,transformName:function(e){return"-"+this.prefix+"-"+e},properties:function(){return m("css."+this.prefix+"Properties")||[]},supports:function(e){return t.include(this.properties(),e)}},v={},x="${1};",y=e("preferences");y.define("css.valueSeparator",": ","Defines a symbol that should be placed between CSS property and value when expanding CSS abbreviations."),y.define("css.propertyEnd",";","Defines a symbol that should be placed at the end of CSS property  when expanding CSS abbreviations."),y.define("stylus.valueSeparator"," ","Defines a symbol that should be placed between CSS property and value when expanding CSS abbreviations in Stylus dialect."),y.define("stylus.propertyEnd","","Defines a symbol that should be placed at the end of CSS property  when expanding CSS abbreviations in Stylus dialect."),y.define("sass.propertyEnd","","Defines a symbol that should be placed at the end of CSS property  when expanding CSS abbreviations in SASS dialect."),y.define("css.autoInsertVendorPrefixes",!0,"Automatically generate vendor-prefixed copies of expanded CSS property. By default, Emmet will generate vendor-prefixed properties only when you put dash before abbreviation (e.g. <code>-bxsh</code>). With this option enabled, you don’t need dashes before abbreviations: Emmet will produce vendor-prefixed properties for you.");var w=t.template("A comma-separated list of CSS properties that may have <code><%= vendor %></code> vendor prefix. This list is used to generate a list of prefixed properties when expanding <code>-property</code> abbreviations. Empty list means that all possible CSS values may have <code><%= vendor %></code> prefix."),S=t.template("A comma-separated list of <em>additional</em> CSS properties for <code>css.<%= vendor %>Preperties</code> preference. You should use this list if you want to add or remove a few CSS properties to original set. To add a new property, simply write its name, to remove it, precede property with hyphen.<br>For example, to add <em>foo</em> property and remove <em>border-radius</em> one, the preference value will look like this: <code>foo, -border-radius</code>."),k={webkit:"animation, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, appearance, backface-visibility, background-clip, background-composite, background-origin, background-size, border-fit, border-horizontal-spacing, border-image, border-vertical-spacing, box-align, box-direction, box-flex, box-flex-group, box-lines, box-ordinal-group, box-orient, box-pack, box-reflect, box-shadow, color-correction, column-break-after, column-break-before, column-break-inside, column-count, column-gap, column-rule-color, column-rule-style, column-rule-width, column-span, column-width, dashboard-region, font-smoothing, highlight, hyphenate-character, hyphenate-limit-after, hyphenate-limit-before, hyphens, line-box-contain, line-break, line-clamp, locale, margin-before-collapse, margin-after-collapse, marquee-direction, marquee-increment, marquee-repetition, marquee-style, mask-attachment, mask-box-image, mask-box-image-outset, mask-box-image-repeat, mask-box-image-slice, mask-box-image-source, mask-box-image-width, mask-clip, mask-composite, mask-image, mask-origin, mask-position, mask-repeat, mask-size, nbsp-mode, perspective, perspective-origin, rtl-ordering, text-combine, text-decorations-in-effect, text-emphasis-color, text-emphasis-position, text-emphasis-style, text-fill-color, text-orientation, text-security, text-stroke-color, text-stroke-width, transform, transition, transform-origin, transform-style, transition-delay, transition-duration, transition-property, transition-timing-function, user-drag, user-modify, user-select, writing-mode, svg-shadow, box-sizing, border-radius",moz:"animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, appearance, backface-visibility, background-inline-policy, binding, border-bottom-colors, border-image, border-left-colors, border-right-colors, border-top-colors, box-align, box-direction, box-flex, box-ordinal-group, box-orient, box-pack, box-shadow, box-sizing, column-count, column-gap, column-rule-color, column-rule-style, column-rule-width, column-width, float-edge, font-feature-settings, font-language-override, force-broken-image-icon, hyphens, image-region, orient, outline-radius-bottomleft, outline-radius-bottomright, outline-radius-topleft, outline-radius-topright, perspective, perspective-origin, stack-sizing, tab-size, text-blink, text-decoration-color, text-decoration-line, text-decoration-style, text-size-adjust, transform, transform-origin, transform-style, transition, transition-delay, transition-duration, transition-property, transition-timing-function, user-focus, user-input, user-modify, user-select, window-shadow, background-clip, border-radius",ms:"accelerator, backface-visibility, background-position-x, background-position-y, behavior, block-progression, box-align, box-direction, box-flex, box-line-progression, box-lines, box-ordinal-group, box-orient, box-pack, content-zoom-boundary, content-zoom-boundary-max, content-zoom-boundary-min, content-zoom-chaining, content-zoom-snap, content-zoom-snap-points, content-zoom-snap-type, content-zooming, filter, flow-from, flow-into, font-feature-settings, grid-column, grid-column-align, grid-column-span, grid-columns, grid-layer, grid-row, grid-row-align, grid-row-span, grid-rows, high-contrast-adjust, hyphenate-limit-chars, hyphenate-limit-lines, hyphenate-limit-zone, hyphens, ime-mode, interpolation-mode, layout-flow, layout-grid, layout-grid-char, layout-grid-line, layout-grid-mode, layout-grid-type, line-break, overflow-style, perspective, perspective-origin, perspective-origin-x, perspective-origin-y, scroll-boundary, scroll-boundary-bottom, scroll-boundary-left, scroll-boundary-right, scroll-boundary-top, scroll-chaining, scroll-rails, scroll-snap-points-x, scroll-snap-points-y, scroll-snap-type, scroll-snap-x, scroll-snap-y, scrollbar-arrow-color, scrollbar-base-color, scrollbar-darkshadow-color, scrollbar-face-color, scrollbar-highlight-color, scrollbar-shadow-color, scrollbar-track-color, text-align-last, text-autospace, text-justify, text-kashida-space, text-overflow, text-size-adjust, text-underline-position, touch-action, transform, transform-origin, transform-origin-x, transform-origin-y, transform-origin-z, transform-style, transition, transition-delay, transition-duration, transition-property, transition-timing-function, user-select, word-break, word-wrap, wrap-flow, wrap-margin, wrap-through, writing-mode",o:"dashboard-region, animation, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, border-image, link, link-source, object-fit, object-position, tab-size, table-baseline, transform, transform-origin, transition, transition-delay, transition-duration, transition-property, transition-timing-function, accesskey, input-format, input-required, marquee-dir, marquee-loop, marquee-speed, marquee-style"};t.each(k,function(e,t){y.define("css."+t+"Properties",e,w({vendor:t})),y.define("css."+t+"PropertiesAddon","",S({vendor:t}))}),y.define("css.unitlessProperties","z-index, line-height, opacity, font-weight, zoom","The list of properties whose values ​​must not contain units."),y.define("css.intUnit","px","Default unit for integer values"),y.define("css.floatUnit","em","Default unit for float values"),y.define("css.keywords","auto, inherit","A comma-separated list of valid keywords that can be used in CSS abbreviations."),y.define("css.keywordAliases","a:auto, i:inherit, s:solid, da:dashed, do:dotted, t:transparent","A comma-separated list of keyword aliases, used in CSS abbreviation. Each alias should be defined as <code>alias:keyword_name</code>."),y.define("css.unitAliases","e:em, p:%, x:ex, r:rem","A comma-separated list of unit aliases, used in CSS abbreviation. Each alias should be defined as <code>alias:unit_value</code>."),y.define("css.color.short",!0,"Should color values like <code>#ffffff</code> be shortened to <code>#fff</code> after abbreviation with color was expanded."),y.define("css.color.case","keep","Letter case of color values generated by abbreviations with color (like <code>c#0</code>). Possible values are <code>upper</code>, <code>lower</code> and <code>keep</code>."),y.define("css.fuzzySearch",!0,"Enable fuzzy search among CSS snippet names. When enabled, every <em>unknown</em> snippet will be scored against available snippet names (not values or CSS properties!). The match with best score will be used to resolve snippet value. For example, with this preference enabled, the following abbreviations are equal: <code>ov:h</code> == <code>ov-h</code> == <code>o-h</code> == <code>oh</code>"),y.define("css.fuzzySearchMinScore",.3,"The minium score (from 0 to 1) that fuzzy-matched abbreviation should achive. Lower values may produce many false-positive matches, higher values may reduce possible matches."),y.define("css.alignVendor",!1,"If set to <code>true</code>, all generated vendor-prefixed properties will be aligned by real property name."),f("w",{prefix:"webkit"}),f("m",{prefix:"moz"}),f("s",{prefix:"ms"}),f("o",{prefix:"o"});var C=["css","less","sass","scss","stylus"];e("resources").addResolver(function(e,n){return t.include(C,n)&&e.isElement()?g.expandToSnippet(e.abbreviation,n):null});var _=e("expandAbbreviation");return _.addHandler(function(e,n,r){if(!t.include(C,n))return!1;var i=e.getSelectionRange().end,a=_.findAbbreviation(e);if(a){var o=emmet.expandAbbreviation(a,n,r);if(o){var s=i-a.length,l=i;return";"==e.getContent().charAt(i)&&";"==o.charAt(o.length-1)&&l++,e.replaceContent(o,s,l),!0}}return!1}),g={addPrefix:f,supportsPrefix:u,prefixed:function(e,t){return u(e,t)?"-"+t+"-"+e:e},listPrefixes:function(){return t.map(v,function(e){return e.prefix})},getPrefix:function(e){return v[e]},removePrefix:function(e){e in v&&delete v[e]},extractPrefixes:function(e){if("-"!=e.charAt(0))return{property:e,prefixes:null};for(var t,n=1,r=e.length,i=[];r>n;){if(t=e.charAt(n),"-"==t){n++;break}if(!(t in v)){i.length=0,n=1;break}i.push(t),n++}return n==r-1&&(n=1,i.length=1),{property:e.substring(n),prefixes:i.length?i:"all"}},findValuesInAbbreviation:function(t,r){r=r||"css";for(var i,a=0,o=t.length,s="";o>a;){if(i=t.charAt(a),n(i)||"#"==i||"-"==i&&n(t.charAt(a+1))){s=t.substring(a);break}a++}for(var u=t.substring(0,t.length-s.length),c=e("resources"),f=[];~u.indexOf("-")&&!c.findSnippet(r,u);){var d=u.split("-"),p=d.pop();if(!l(p))break;f.unshift(p),u=d.join("-")}return f.join("-")+s},parseValues:function(r){for(var a=e("stringStream").create(r),o=[],s=null;s=a.next();)"#"==s?(a.match(/^t|[0-9a-f]+/i,!0),o.push(a.current())):"-"==s?((l(t.last(o))||a.start&&n(r.charAt(a.start-1)))&&(a.start=a.pos),a.match(/^\-?[0-9]*(\.[0-9]+)?[a-z%\.]*/,!0),o.push(a.current())):(a.match(/^[0-9]*(\.[0-9]*)?[a-z%]*/,!0),o.push(a.current())),a.start=a.pos;return t.map(t.compact(o),i)},extractValues:function(e){var t=this.findValuesInAbbreviation(e);return t?{property:e.substring(0,e.length-t.length).replace(/-$/,""),values:this.parseValues(t)}:{property:e,values:null}},normalizeValue:function(e,n){n=(n||"").toLowerCase();var r=y.getArray("css.unitlessProperties");return e.replace(/^(\-?[0-9\.]+)([a-z]*)$/,function(e,i,a){return a||"0"!=i&&!t.include(r,n)?a?i+s(a):i.replace(/\.$/,"")+y.get(~i.indexOf(".")?"css.floatUnit":"css.intUnit"):i})},expand:function(n,i,a){a=a||"css";var o,s=e("resources"),l=y.get("css.autoInsertVendorPrefixes");(o=/^(.+)\!$/.test(n))&&(n=RegExp.$1);var u=s.findSnippet(a,n);if(u&&!l)return h(u,o,a);var f=this.extractPrefixes(n),d=this.extractValues(f.property),p=t.extend(f,d);if(u?p.values=null:u=s.findSnippet(a,p.property),!u&&y.get("css.fuzzySearch")&&(u=s.fuzzyFindSnippet(a,p.property,parseFloat(y.get("css.fuzzySearchMinScore")))),u?t.isString(u)||(u=u.data):u=p.property+":"+x,!r(u))return u;var m=this.splitSnippet(u),g=[];!i&&p.values&&(i=t.map(p.values,function(e){return this.normalizeValue(e,m.name)},this).join(" ")+";"),m.value=i||m.value;var b,w="all"==p.prefixes||!p.prefixes&&l?c(m.name,l&&"all"!=p.prefixes):p.prefixes,S=[];if(t.each(w,function(e){e in v&&(b=v[e].transformName(m.name),S.push(b),g.push(h(b+":"+m.value,o,a)))}),g.push(h(m.name+":"+m.value,o,a)),S.push(m.name),y.get("css.alignVendor")){var k=e("utils").getStringsPads(S);g=t.map(g,function(e,t){return k[t]+e})}return g},expandToSnippet:function(e,n){var r=this.expand(e,null,n);return t.isArray(r)?r.join("\n"):t.isString(r)?String(r):r.data},splitSnippet:function(t){var n=e("utils");if(t=n.trim(t),-1==t.indexOf(":"))return{name:t,value:x};var r=t.split(":");return{name:n.trim(r.shift()),value:n.trim(r.join(":")).replace(/^(\$\{0\}|\$0)(\s*;?)$/,"${1}$2")}},getSyntaxPreference:d,transformSnippet:h}}),emmet.define("cssGradient",function(e,t){function n(t){return e("utils").trim(t).replace(/\s+/g," ")}function r(r){for(var a,o=m[0],s=e("stringStream").create(e("utils").trim(r)),l=[];a=s.next();)","==s.peek()?(l.push(s.current()),s.next(),s.eatSpace(),s.start=s.pos):"("==a&&s.skipTo(")");return l.push(s.current()),l=t.compact(t.map(l,n)),l.length?((v.test(l[0])||x.test(l[0]))&&(o=l.shift()),{type:"linear",direction:o,colorStops:t.map(l,i)}):null}function i(e){e=n(e);var t=null;if(e=e.replace(/^(\w+\(.+?\))\s*/,function(e,n){return t=n,""}),!t){var r=e.split(" ");t=r[0],e=r[1]||""}var i={color:t};return e&&e.replace(/^(\-?[\d\.]+)([a-z%]+)?$/,function(e,t,n){i.position=t,~t.indexOf(".")?n="":n||(n="%"),n&&(i.unit=n)}),i}function a(n,r){var i=e("resources"),a=e("preferences"),o=i.findSnippet(r,n);return!o&&a.get("css.fuzzySearch")&&(o=i.fuzzyFindSnippet(r,n,parseFloat(a.get("css.fuzzySearchMinScore")))),o?(t.isString(o)||(o=o.data),e("cssResolver").splitSnippet(o).name):void 0}function o(e){var n=0;t.each(e,function(r,i){if(!i)return r.position=r.position||0;if(i!=e.length-1||"position"in r||(r.position=1),"position"in r){var a=e[n].position||0,o=(r.position-a)/(i-n);t.each(e.slice(n,i),function(e,t){e.position=a+o*t}),n=i}})}function s(e){var n=parseFloat(e);if(!t.isNaN(n))switch(n%360){case 0:return"left";case 90:return"bottom";case 180:return"right";case 240:return"top"}return e}function l(e){if(e=s(e),v.test(e))throw"The direction is an angle that can’t be converted.";var t=function(t){return~e.indexOf(t)?"100%":"0"};return t("right")+" "+t("bottom")+", "+t("left")+" "+t("top")}function u(e){var n=y.getArray("css.gradient.prefixes"),r=t.map(n,function(t){return"-"+t+"-"+e});return r.push(e),r}function c(n,r){var i=[],a=e("cssResolver");return y.get("css.gradient.fallback")&&~r.toLowerCase().indexOf("background")&&i.push({name:"background-color",value:"${1:"+n.colorStops[0].color+"}"}),t.each(y.getArray("css.gradient.prefixes"),function(e){var t=a.prefixed(r,e);if("webkit"==e&&y.get("css.gradient.oldWebkit"))try{i.push({name:t,value:g.oldWebkitLinearGradient(n)})}catch(o){}i.push({name:t,value:g.toString(n,e)})}),i.sort(function(e,t){return t.name.length-e.name.length})}function f(n,r,i){var a=n.parent,o=e("utils"),s=e("preferences").get("css.alignVendor"),l=n.styleSeparator,f=n.styleBefore;if(t.each(a.getAll(u(n.name())),function(e){e!=n&&/gradient/i.test(e.value())&&(e.styleSeparator.length<l.length&&(l=e.styleSeparator),e.styleBefore.length<f.length&&(f=e.styleBefore),a.remove(e))}),s){if(f!=n.styleBefore){var d=n.fullRange();a._updateSource(f,d.start,d.start+n.styleBefore.length),n.styleBefore=f}l!=n.styleSeparator&&(a._updateSource(l,n.nameRange().end,n.valueRange().start),n.styleSeparator=l)}var p=n.value();i||(i=e("range").create(0,n.value()));var h=function(e){return o.replaceSubstring(p,e,i)};n.value(h(g.toString(r))+"${2}");var m=c(r,n.name());if(s){var b=t.pluck(m,"value"),v=t.pluck(m,"name");b.push(n.value()),v.push(n.name());var x=o.getStringsPads(t.map(b,function(e){return e.substring(0,e.indexOf("("))})),y=o.getStringsPads(v);n.name(t.last(y)+n.name()),t.each(m,function(e,t){e.name=y[t]+e.name,e.value=x[t]+e.value}),n.value(t.last(x)+n.value())}t.each(m,function(e){a.add(e.name,e.value,a.indexOf(n))})}function d(e){var n=e.value(),r=null,i=t.find(e.valueParts(),function(e){return r=g.parse(e.substring(n))});return i&&r?{gradient:r,valueRange:i}:null}function p(n,r){var i=y.get("css.gradient.defaultProperty");if(!i)return!1;var a=String(n.getContent()),o=e("range").create(n.getCurrentLineRange()),s=o.substring(a).replace(/^\s+/,function(e){return o.start+=e.length,""}).replace(/\s+$/,function(e){return o.end-=e.length,""}),l=e("cssResolver"),u=g.parse(s);if(u){var f=c(u,i);f.push({name:i,value:g.toString(u)+"${2}"});var d=l.getSyntaxPreference("valueSeparator",r),p=l.getSyntaxPreference("propertyEnd",r);if(e("preferences").get("css.alignVendor")){var h=e("utils").getStringsPads(t.map(f,function(e){return e.value.substring(0,e.value.indexOf("("))}));t.each(f,function(e,t){e.value=h[t]+e.value})}return f=t.map(f,function(e){return e.name+d+e.value+p}),n.replaceContent(f.join("\n"),o.start,o.end),!0}return!1}function h(n,r){var i=null,a=e("cssEditTree").parseFromPosition(n,r,!0);return a&&(i=a.itemFromPosition(r,!0),i||(i=t.find(a.list(),function(e){return e.range(!0).end==r}))),{rule:a,property:i}}var m=["top","to bottom","0deg"],g=null,b=["css","less","sass","scss","stylus","styl"],v=/\d+deg/i,x=/top|bottom|left|right/i,y=e("preferences");return y.define("css.gradient.prefixes","webkit, moz, o","A comma-separated list of vendor-prefixes for which values should be generated."),y.define("css.gradient.oldWebkit",!0,"Generate gradient definition for old Webkit implementations"),y.define("css.gradient.omitDefaultDirection",!0,"Do not output default direction definition in generated gradients."),
y.define("css.gradient.defaultProperty","background-image","When gradient expanded outside CSS value context, it will produce properties with this name."),y.define("css.gradient.fallback",!1,"With this option enabled, CSS gradient generator will produce <code>background-color</code> property with gradient first color as fallback for old browsers."),e("expandAbbreviation").addHandler(function(n,r,i){var o=e("editorUtils").outputInfo(n,r,i);if(!t.include(b,o.syntax))return!1;var s=n.getCaretPos(),l=o.content,u=h(l,s);if(u.property){var c=d(u.property);if(c){var m=u.rule.options.offset||0,g=m+u.rule.toString().length;if(/[\n\r]/.test(u.property.value())){var v=u.property.valueRange(!0).start+c.valueRange.end;l=e("utils").replaceSubstring(l,";",v);var x=h(l,s);x.property&&(c=d(x.property),u=x)}u.property.end(";");var y=a(u.property.name(),r);return y&&u.property.name(y),f(u.property,c.gradient,c.valueRange),n.replaceContent(u.rule.toString(),m,g,!0),!0}}return p(n,r)}),e("reflectCSSValue").addHandler(function(n){var r=e("utils"),i=d(n);if(!i)return!1;var a=n.value(),o=function(e){return r.replaceSubstring(a,e,i.valueRange)};return t.each(n.parent.getAll(u(n.name())),function(e){if(e!==n){var t=e.value().match(/^\s*(\-([a-z]+)\-)?linear\-gradient/);t?e.value(o(g.toString(i.gradient,t[2]||""))):(t=e.value().match(/\s*\-webkit\-gradient/))&&e.value(o(g.oldWebkitLinearGradient(i.gradient)))}}),!0}),g={parse:function(t){var n=null;return e("utils").trim(t).replace(/^([\w\-]+)\((.+?)\)$/,function(e,t,i){return t=t.toLowerCase().replace(/^\-[a-z]+\-/,""),"linear-gradient"==t||"lg"==t?(n=r(i),""):e}),n},oldWebkitLinearGradient:function(e){if(t.isString(e)&&(e=this.parse(e)),!e)return null;var n=t.map(e.colorStops,t.clone);return t.each(n,function(e){if("position"in e){if(!~e.position.indexOf(".")&&"%"!=e.unit)throw"Can't convert color stop '"+(e.position+(e.unit||""))+"'";e.position=parseFloat(e.position)/("%"==e.unit?100:1)}}),o(n),n=t.map(n,function(e,t){return e.position||t?1==e.position&&t==n.length-1?"to("+e.color+")":"color-stop("+e.position.toFixed(2).replace(/\.?0+$/,"")+", "+e.color+")":"from("+e.color+")"}),"-webkit-gradient(linear, "+l(e.direction)+", "+n.join(", ")+")"},toString:function(e,n){if("linear"==e.type){var r=(n?"-"+n+"-":"")+"linear-gradient",i=t.map(e.colorStops,function(e){return e.color+("position"in e?" "+e.position+(e.unit||""):"")});return!e.direction||y.get("css.gradient.omitDefaultDirection")&&t.include(m,e.direction)||i.unshift(e.direction),r+"("+i.join(", ")+")"}}}}),emmet.exec(function(e,t){var n=e("handlerList").create(),r=e("resources");t.extend(r,{addGenerator:function(e,r,i){t.isString(e)&&(e=new RegExp(e)),n.add(function(t,n){var i;return(i=e.exec(t.name()))?r(i,t,n):null},i)}}),r.addResolver(function(e,r){return n.exec(null,t.toArray(arguments))})}),emmet.define("tagName",function(e,t){var n={empty:"area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,keygen,command".split(","),blockLevel:"address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,link,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul,h1,h2,h3,h4,h5,h6".split(","),inlineLevel:"a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var".split(",")},r={p:"span",ul:"li",ol:"li",table:"tr",tr:"td",tbody:"tr",thead:"tr",tfoot:"tr",colgroup:"col",select:"option",optgroup:"option",audio:"source",video:"source",object:"param",map:"area"};return{resolve:function(e){return e=(e||"").toLowerCase(),e in r?this.getMapping(e):this.isInlineLevel(e)?"span":"div"},getMapping:function(e){return r[e.toLowerCase()]},isInlineLevel:function(e){return this.isTypeOf(e,"inlineLevel")},isBlockLevel:function(e){return this.isTypeOf(e,"blockLevel")},isEmptyElement:function(e){return this.isTypeOf(e,"empty")},isTypeOf:function(e,r){return t.include(n[r],e)},addMapping:function(e,t){r[e]=t},removeMapping:function(e){e in r&&delete r[e]},addElementToCollection:function(e,r){n[r]||(n[r]=[]);var i=this.getCollection(r);t.include(i,e)||i.push(e)},removeElementFromCollection:function(e,r){r in n&&(n[r]=t.without(this.getCollection(r),e))},getCollection:function(e){return n[e]}}}),emmet.exec(function(e,t){function n(){return{element:l.get("bem.elementSeparator"),modifier:l.get("bem.modifierSeparator")}}function r(n){if(e("abbreviationUtils").isSnippet(n))return n;n.__bem={block:"",element:"",modifier:""};var r=i(n.attribute("class")).split(" "),o=/^[a-z]\-/i;return n.__bem.block=t.find(r,function(e){return o.test(e)}),n.__bem.block||(o=/^[a-z]/i,n.__bem.block=t.find(r,function(e){return o.test(e)})||""),r=t.chain(r).map(function(e){return a(e,n)}).flatten().uniq().value().join(" "),r&&n.attribute("class",r),n}function i(t){var r=e("utils");t=(" "+(t||"")+" ").replace(/\s+/g," ");var i=l.get("bem.shortElementPrefix");if(i){var a=new RegExp("\\s("+r.escapeForRegexp(i)+"+)","g");t=t.replace(a,function(e,t){return" "+r.repeatString(n().element,t.length)})}return r.trim(t)}function a(e,t){e=o(e,t,"element"),e=o(e,t,"modifier");var r="",i="",a="",s=n();if(~e.indexOf(s.element)){var l=e.split(s.element),u=l[1].split(s.modifier);r=l[0],i=u.shift(),a=u.join(s.modifier)}else if(~e.indexOf(s.modifier)){var c=e.split(s.modifier);r=c.shift(),a=c.join(s.modifier)}if(r||i||a){r||(r=t.__bem.block);var f=r,d=[];return i?(f+=s.element+i,d.push(f)):d.push(f),a&&d.push(f+s.modifier+a),t.__bem.block=r,t.__bem.element=i,t.__bem.modifier=a,d}return e}function o(e,t,r){var i=n(),a=new RegExp("^("+i[r]+")+","g");if(a.test(e)){for(var o=0,s=e.replace(a,function(e,t){return o=e.length/i[r].length,""}),l=t;l.parent&&o--;)l=l.parent;if(l&&l.__bem||(l=t),l&&l.__bem){var u=l.__bem.block;return"modifier"==r&&l.__bem.element&&(u+=i.element+l.__bem.element),u+i[r]+s}}return e}function s(n,i){n.name&&r(n,i);var a=e("abbreviationUtils");return t.each(n.children,function(e){s(e,i),!a.isSnippet(e)&&e.start&&(u=!0)}),n}var l=e("preferences");l.define("bem.elementSeparator","__","Class name’s element separator."),l.define("bem.modifierSeparator","_","Class name’s modifier separator."),l.define("bem.shortElementPrefix","-","Symbol for describing short “block-element” notation. Class names prefixed with this symbol will be treated as element name for parent‘s block name. Each symbol instance traverses one level up in parsed tree for block name lookup. Empty value will disable short notation.");var u=!1;e("filters").add("bem",function(t,n){return u=!1,t=s(t,n),u&&(t=e("filters").apply(t,"html",n)),t})}),emmet.exec(function(e,t){function n(n,r,a){var o=e("utils"),s=i.get("filter.commentTrigger");if("*"!=s){var l=t.find(s.split(","),function(e){return!!n.attribute(o.trim(e))});if(!l)return}var u={node:n,name:n.name(),padding:n.parent?n.parent.padding:"",attr:function(e,t,r){var i=n.attribute(e);return i?(t||"")+i+(r||""):""}},c=o.normalizeNewline(r?r(u):""),f=o.normalizeNewline(a?a(u):"");n.start=n.start.replace(/</,c+"<"),n.end=n.end.replace(/>/,">"+f)}function r(i,a,o){var s=e("abbreviationUtils");return t.each(i.children,function(e){s.isBlock(e)&&n(e,a,o),r(e,a,o)}),i}var i=e("preferences");i.define("filter.commentAfter",'\n<!-- /<%= attr("id", "#") %><%= attr("class", ".") %> -->',"A definition of comment that should be placed <i>after</i> matched element when <code>comment</code> filter is applied. This definition is an ERB-style template passed to <code>_.template()</code> function (see Underscore.js docs for details). In template context, the following properties and functions are availabe:\n<ul><li><code>attr(name, before, after)</code> – a function that outputsspecified attribute value concatenated with <code>before</code> and <code>after</code> strings. If attribute doesn't exists, the empty string will be returned.</li><li><code>node</code> – current node (instance of <code>AbbreviationNode</code>)</li><li><code>name</code> – name of current tag</li><li><code>padding</code> – current string padding, can be used for formatting</li></ul>"),i.define("filter.commentBefore","","A definition of comment that should be placed <i>before</i> matched element when <code>comment</code> filter is applied. For more info, read description of <code>filter.commentAfter</code> property"),i.define("filter.commentTrigger","id, class","A comma-separated list of attribute names that should exist in abbreviatoin where comment should be added. If you wish to add comment for every element, set this option to <code>*</code>"),e("filters").add("c",function(e){var n=t.template(i.get("filter.commentBefore")),a=t.template(i.get("filter.commentAfter"));return r(e,n,a)})}),emmet.exec(function(e,t){function n(e){return e.replace(/([<>&])/g,function(e,t){return r[t]})}var r={"<":"&lt;",">":"&gt;","&":"&amp;"};e("filters").add("e",function i(e){return t.each(e.children,function(e){e.start=n(e.start),e.end=n(e.end),e.content=n(e.content),i(e)}),e})}),emmet.exec(function(e,t){function n(n){return t.include(p.getArray("format.noIndentTags")||[],n.name())?"":e("resources").getVariable("indentation")}function r(t){return t.parent&&e("abbreviationUtils").hasBlockChildren(t.parent)}function i(e){return e.parent&&!e.parent.parent&&!e.index()}function a(t,n){var r=e("abbreviationUtils");return n.tag_nl===!0||r.isBlock(t)?!0:t.parent&&n.inline_break?s(t.parent,n):!1}function o(e,t){return e.children.length&&a(e.children[0],t)}function s(n,r){var i=0,a=e("abbreviationUtils");return!!t.find(n.children,function(e){return e.isTextNode()||!a.isInline(e)?i=0:a.isInline(e)&&i++,i>=r.inline_break?!0:void 0})}function l(e){return!e.parent}function u(t,n,r){return t.start=t.end="",!i(t)&&n.tag_nl!==!1&&a(t,n)&&(l(t.parent)||!e("abbreviationUtils").isInline(t.parent))&&(t.start=e("utils").getNewline()+t.start),t}function c(n,r){var i=e("abbreviationUtils"),a=t.any(n.children,function(e){return i.isSnippet(e)?!1:!i.isInline(e)});return a?!0:s(n,r)}function f(s,l,u){s.start=s.end=d;var f=e("utils"),h=e("abbreviationUtils"),m=h.isUnary(s),g=f.getNewline(),b=n(s);if(l.tag_nl!==!1){var v=l.tag_nl===!0&&(l.tag_nl_leaf||s.children.length);v||(v=t.include(p.getArray("format.forceIndentationForTags")||[],s.name())),s.isTextNode()||(a(s,l)?(i(s)||h.isSnippet(s.parent)&&!s.index()||(s.start=g+s.start),(h.hasBlockChildren(s)||o(s,l)||v&&!m)&&(s.end=g+s.end),(h.hasTagsInContent(s)||v&&!s.children.length&&!m)&&(s.start+=g+b)):h.isInline(s)&&r(s)&&!i(s)?s.start=g+s.start:h.isInline(s)&&c(s,l)&&(s.end=g+s.end),s.padding=b)}return s}var d="%s",p=e("preferences");p.define("format.noIndentTags","html","A comma-separated list of tag names that should not get inner indentation."),p.define("format.forceIndentationForTags","body","A comma-separated list of tag names that should <em>always</em> get inner indentation."),e("filters").add("_format",function h(n,r,i){i=i||0;var a=e("abbreviationUtils");return t.each(n.children,function(e){a.isSnippet(e)?u(e,r,i):f(e,r,i),h(e,r,i+1)}),n})}),emmet.exec(function(e,t){function n(t){return e("utils").trim(t).replace(/\s+/g,".")}function r(e,r){var i="",a=[],o=r.attributeQuote(),s=r.cursor();return t.each(e.attributeList(),function(e){var t=r.attributeName(e.name);switch(t.toLowerCase()){case"id":i+="#"+(e.value||s);break;case"class":i+="."+n(e.value||s);break;default:a.push(":"+t+" => "+o+(e.value||s)+o)}}),a.length&&(i+="{"+a.join(", ")+"}"),i}function i(t,n,i){if(!t.parent)return t;var a=e("abbreviationUtils"),o=e("utils"),s=r(t,n),l=n.cursor(),u=a.isUnary(t),c=n.self_closing_tag&&u?"/":"",f="",d="%"+n.tagName(t.name());"%div"==d.toLowerCase()&&s&&-1==s.indexOf("{")&&(d=""),t.end="",f=d+s+c+" ";var p="%s";return t.start=o.replaceSubstring(t.start,f,t.start.indexOf(p),p),t.children.length||u||(t.start+=l),t}e("filters").add("haml",function a(n,r,o){o=o||0;var s=e("abbreviationUtils");return o||(n=e("filters").apply(n,"_format",r)),t.each(n.children,function(e){s.isSnippet(e)||i(e,r,o),a(e,r,o+1)}),n})}),emmet.exec(function(e,t){function n(e,n){var r=n.attributeQuote(),i=n.cursor();return t.map(e.attributeList(),function(e){var t=n.attributeName(e.name);return" "+t+"="+r+(e.value||i)+r}).join("")}function r(t,r,i){if(!t.parent)return t;var a=e("abbreviationUtils"),o=e("utils"),s=n(t,r),l=r.cursor(),u=a.isUnary(t),c="",f="";if(!t.isTextNode()){var d=r.tagName(t.name());u?(c="<"+d+s+r.selfClosing()+">",t.end=""):(c="<"+d+s+">",f="</"+d+">")}var p="%s";return t.start=o.replaceSubstring(t.start,c,t.start.indexOf(p),p),t.end=o.replaceSubstring(t.end,f,t.end.indexOf(p),p),t.children.length||u||~t.content.indexOf(l)||e("tabStops").extract(t.content).tabstops.length||(t.start+=l),t}e("filters").add("html",function i(n,a,o){o=o||0;var s=e("abbreviationUtils");return o||(n=e("filters").apply(n,"_format",a)),t.each(n.children,function(e){s.isSnippet(e)||r(e,a,o),i(e,a,o+1)}),n})}),emmet.exec(function(e,t){var n=/^\s+/,r=/[\n\r]/g;e("filters").add("s",function i(a,o,s){var l=e("abbreviationUtils");return t.each(a.children,function(e){l.isSnippet(e)||(e.start=e.start.replace(n,""),e.end=e.end.replace(n,"")),e.start=e.start.replace(r,""),e.end=e.end.replace(r,""),e.content=e.content.replace(r,""),i(e)}),a})}),emmet.exec(function(e,t){function n(e,r){return t.each(e.children,function(e){e.content&&(e.content=e.content.replace(r,"")),n(e,r)}),e}e("preferences").define("filter.trimRegexp","[\\s|\\u00a0]*[\\d|#|\\-|*|\\u2022]+\\.?\\s*","Regular expression used to remove list markers (numbers, dashes, bullets, etc.) in <code>t</code> (trim) filter. The trim filter is useful for wrapping with abbreviation lists, pased from other documents (for example, Word documents)."),e("filters").add("t",function(t){var r=new RegExp(e("preferences").get("filter.trimRegexp"));return n(t,r)})}),emmet.exec(function(e,t){function n(e){e.start=e.start.replace(/\s+select\s*=\s*(['"]).*?\1/,"")}var r={"xsl:variable":1,"xsl:with-param":1};e("filters").add("xsl",function i(a){var o=e("abbreviationUtils");return t.each(a.children,function(e){!o.isSnippet(e)&&(e.name()||"").toLowerCase()in r&&e.children.length&&n(e),i(e)}),a})}),emmet.exec(function(e,t){function n(e,t){return Math.round(Math.random()*(t-e)+e)}function r(e,r){for(var i=e.length,a=Math.min(i,r),o=[];o.length<a;){var s=n(0,i-1);t.include(o,s)||o.push(s)}return t.map(o,function(t){return e[t]})}function i(e){return t.isString(e)?e.charAt(n(0,e.length-1)):e[n(0,e.length-1)]}function a(e,t){return e.length&&(e[0]=e[0].charAt(0).toUpperCase()+e[0].substring(1)),e.join(" ")+(t||i("?!..."))}function o(e){var i=e.length,a=0;a=i>3&&6>=i?n(0,1):i>6&&12>=i?n(0,2):n(1,4),t.each(r(t.range(a)),function(t){e[t]+=","})}function s(e,t){var i,s=[],c=0;for(e=parseInt(e,10),t&&(i=l.slice(0,e),i.length>5&&(i[4]+=","),c+=i.length,s.push(a(i,".")));e>c;)i=r(u,Math.min(n(3,12)*n(1,5),e-c)),c+=i.length,o(i),s.push(a(i));return s.join(" ")}e("abbreviationParser").addPreprocessor(function(e,t){var n,r=/^(?:lorem|lipsum)(\d*)$/i;e.findAll(function(e){if(e._name&&(n=e._name.match(r))){var t=n[1]||30;e._name="",e.data("forceNameResolving",e.isRepeating()||e.attributeList().length),e.data("pasteOverwrites",!0),e.data("paste",function(e,n){return s(t,!e)})}})});var l="lorem ipsum dolor sit amet consectetur adipisicing elit".split(" "),u=["exercitationem","perferendis","perspiciatis","laborum","eveniet","sunt","iure","nam","nobis","eum","cum","officiis","excepturi","odio","consectetur","quasi","aut","quisquam","vel","eligendi","itaque","non","odit","tempore","quaerat","dignissimos","facilis","neque","nihil","expedita","vitae","vero","ipsum","nisi","animi","cumque","pariatur","velit","modi","natus","iusto","eaque","sequi","illo","sed","ex","et","voluptatibus","tempora","veritatis","ratione","assumenda","incidunt","nostrum","placeat","aliquid","fuga","provident","praesentium","rem","necessitatibus","suscipit","adipisci","quidem","possimus","voluptas","debitis","sint","accusantium","unde","sapiente","voluptate","qui","aspernatur","laudantium","soluta","amet","quo","aliquam","saepe","culpa","libero","ipsa","dicta","reiciendis","nesciunt","doloribus","autem","impedit","minima","maiores","repudiandae","ipsam","obcaecati","ullam","enim","totam","delectus","ducimus","quis","voluptates","dolores","molestiae","harum","dolorem","quia","voluptatem","molestias","magni","distinctio","omnis","illum","dolorum","voluptatum","ea","quas","quam","corporis","quae","blanditiis","atque","deserunt","laboriosam","earum","consequuntur","hic","cupiditate","quibusdam","accusamus","ut","rerum","error","minus","eius","ab","ad","nemo","fugit","officia","at","in","id","quos","reprehenderit","numquam","iste","fugiat","sit","inventore","beatae","repellendus","magnam","recusandae","quod","explicabo","doloremque","aperiam","consequatur","asperiores","commodi","optio","dolor","labore","temporibus","repellat","veniam","architecto","est","esse","mollitia","nulla","a","similique","eos","alias","dolore","tenetur","deleniti","porro","facere","maxime","corrupti"]}),emmet.exec(function(e,t){e("actions").add("select_line",function(e){var t=e.getCurrentLineRange();return e.createSelection(t.start,t.end),!0})}),emmet.exec(function(e,t){e("resources").setVocabulary({variables:{lang:"en",locale:"en-US",charset:"UTF-8",indentation:"	",newline:"\n"},css:{filters:"html",snippets:{"@i":"@import url(|);","@import":"@import url(|);","@m":"@media ${1:screen} {\n	|\n}","@media":"@media ${1:screen} {\n	|\n}","@f":"@font-face {\n	font-family:|;\n	src:url(|);\n}","@f+":"@font-face {\n	font-family: '${1:FontName}';\n	src: url('${2:FileName}.eot');\n	src: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\n		 url('${2:FileName}.woff') format('woff'),\n		 url('${2:FileName}.ttf') format('truetype'),\n		 url('${2:FileName}.svg#${1:FontName}') format('svg');\n	font-style: ${3:normal};\n	font-weight: ${4:normal};\n}","@kf":"@-webkit-keyframes ${1:identifier} {\n	${2:from} { ${3} }${6}\n	${4:to} { ${5} }\n}\n@-o-keyframes ${1:identifier} {\n	${2:from} { ${3} }${6}\n	${4:to} { ${5} }\n}\n@-moz-keyframes ${1:identifier} {\n	${2:from} { ${3} }${6}\n	${4:to} { ${5} }\n}\n@keyframes ${1:identifier} {\n	${2:from} { ${3} }${6}\n	${4:to} { ${5} }\n}",anim:"animation:|;","anim-":"animation:${1:name} ${2:duration} ${3:timing-function} ${4:delay} ${5:iteration-count} ${6:direction} ${7:fill-mode};",animdel:"animation-delay:${1:time};",animdir:"animation-direction:${1:normal};","animdir:n":"animation-direction:normal;","animdir:r":"animation-direction:reverse;","animdir:a":"animation-direction:alternate;","animdir:ar":"animation-direction:alternate-reverse;",animdur:"animation-duration:${1:0}s;",animfm:"animation-fill-mode:${1:both};","animfm:f":"animation-fill-mode:forwards;","animfm:b":"animation-fill-mode:backwards;","animfm:bt":"animation-fill-mode:both;","animfm:bh":"animation-fill-mode:both;",animic:"animation-iteration-count:${1:1};","animic:i":"animation-iteration-count:infinite;",animn:"animation-name:${1:none};",animps:"animation-play-state:${1:running};","animps:p":"animation-play-state:paused;","animps:r":"animation-play-state:running;",animtf:"animation-timing-function:${1:linear};","animtf:e":"animation-timing-function:ease;","animtf:ei":"animation-timing-function:ease-in;","animtf:eo":"animation-timing-function:ease-out;","animtf:eio":"animation-timing-function:ease-in-out;","animtf:l":"animation-timing-function:linear;","animtf:cb":"animation-timing-function:cubic-bezier(${1:0.1}, ${2:0.7}, ${3:1.0}, ${3:0.1});",ap:"appearance:${none}","!":"!important",pos:"position:${1:relative};","pos:s":"position:static;","pos:a":"position:absolute;","pos:r":"position:relative;","pos:f":"position:fixed;",t:"top:|;","t:a":"top:auto;",r:"right:|;","r:a":"right:auto;",b:"bottom:|;","b:a":"bottom:auto;",l:"left:|;","l:a":"left:auto;",z:"z-index:|;","z:a":"z-index:auto;",fl:"float:${1:left};","fl:n":"float:none;","fl:l":"float:left;","fl:r":"float:right;",cl:"clear:${1:both};","cl:n":"clear:none;","cl:l":"clear:left;","cl:r":"clear:right;","cl:b":"clear:both;",colm:"columns:|;",colmc:"column-count:|;",colmf:"column-fill:|;",colmg:"column-gap:|;",colmr:"column-rule:|;",colmrc:"column-rule-color:|;",colmrs:"column-rule-style:|;",colmrw:"column-rule-width:|;",colms:"column-span:|;",colmw:"column-width:|;",d:"display:${1:block};","d:n":"display:none;","d:b":"display:block;","d:i":"display:inline;","d:ib":"display:inline-block;","d:li":"display:list-item;","d:ri":"display:run-in;","d:cp":"display:compact;","d:tb":"display:table;","d:itb":"display:inline-table;","d:tbcp":"display:table-caption;","d:tbcl":"display:table-column;","d:tbclg":"display:table-column-group;","d:tbhg":"display:table-header-group;","d:tbfg":"display:table-footer-group;","d:tbr":"display:table-row;","d:tbrg":"display:table-row-group;","d:tbc":"display:table-cell;","d:rb":"display:ruby;","d:rbb":"display:ruby-base;","d:rbbg":"display:ruby-base-group;","d:rbt":"display:ruby-text;","d:rbtg":"display:ruby-text-group;",v:"visibility:${1:hidden};","v:v":"visibility:visible;","v:h":"visibility:hidden;","v:c":"visibility:collapse;",ov:"overflow:${1:hidden};","ov:v":"overflow:visible;","ov:h":"overflow:hidden;","ov:s":"overflow:scroll;","ov:a":"overflow:auto;",ovx:"overflow-x:${1:hidden};","ovx:v":"overflow-x:visible;","ovx:h":"overflow-x:hidden;","ovx:s":"overflow-x:scroll;","ovx:a":"overflow-x:auto;",ovy:"overflow-y:${1:hidden};","ovy:v":"overflow-y:visible;","ovy:h":"overflow-y:hidden;","ovy:s":"overflow-y:scroll;","ovy:a":"overflow-y:auto;",ovs:"overflow-style:${1:scrollbar};","ovs:a":"overflow-style:auto;","ovs:s":"overflow-style:scrollbar;","ovs:p":"overflow-style:panner;","ovs:m":"overflow-style:move;","ovs:mq":"overflow-style:marquee;",zoo:"zoom:1;",zm:"zoom:1;",cp:"clip:|;","cp:a":"clip:auto;","cp:r":"clip:rect(${1:top} ${2:right} ${3:bottom} ${4:left});",bxz:"box-sizing:${1:border-box};","bxz:cb":"box-sizing:content-box;","bxz:bb":"box-sizing:border-box;",bxsh:"box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:color};","bxsh:r":"box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:spread }rgb(${6:0}, ${7:0}, ${8:0});","bxsh:ra":"box-shadow:${1:inset }${2:h} ${3:v} ${4:blur} ${5:spread }rgba(${6:0}, ${7:0}, ${8:0}, .${9:5});","bxsh:n":"box-shadow:none;",m:"margin:|;","m:a":"margin:auto;",mt:"margin-top:|;","mt:a":"margin-top:auto;",mr:"margin-right:|;","mr:a":"margin-right:auto;",mb:"margin-bottom:|;","mb:a":"margin-bottom:auto;",ml:"margin-left:|;","ml:a":"margin-left:auto;",p:"padding:|;",pt:"padding-top:|;",pr:"padding-right:|;",pb:"padding-bottom:|;",pl:"padding-left:|;",w:"width:|;","w:a":"width:auto;",h:"height:|;","h:a":"height:auto;",maw:"max-width:|;","maw:n":"max-width:none;",mah:"max-height:|;","mah:n":"max-height:none;",miw:"min-width:|;",mih:"min-height:|;",mar:"max-resolution:${1:res};",mir:"min-resolution:${1:res};",ori:"orientation:|;","ori:l":"orientation:landscape;","ori:p":"orientation:portrait;",ol:"outline:|;","ol:n":"outline:none;",olo:"outline-offset:|;",olw:"outline-width:|;",ols:"outline-style:|;",olc:"outline-color:#${1:000};","olc:i":"outline-color:invert;",bd:"border:|;","bd+":"border:${1:1px} ${2:solid} ${3:#000};","bd:n":"border:none;",bdbk:"border-break:${1:close};","bdbk:c":"border-break:close;",bdcl:"border-collapse:|;","bdcl:c":"border-collapse:collapse;","bdcl:s":"border-collapse:separate;",bdc:"border-color:#${1:000};","bdc:t":"border-color:transparent;",bdi:"border-image:url(|);","bdi:n":"border-image:none;",bdti:"border-top-image:url(|);","bdti:n":"border-top-image:none;",bdri:"border-right-image:url(|);","bdri:n":"border-right-image:none;",bdbi:"border-bottom-image:url(|);","bdbi:n":"border-bottom-image:none;",bdli:"border-left-image:url(|);","bdli:n":"border-left-image:none;",bdci:"border-corner-image:url(|);","bdci:n":"border-corner-image:none;","bdci:c":"border-corner-image:continue;",bdtli:"border-top-left-image:url(|);","bdtli:n":"border-top-left-image:none;","bdtli:c":"border-top-left-image:continue;",bdtri:"border-top-right-image:url(|);","bdtri:n":"border-top-right-image:none;","bdtri:c":"border-top-right-image:continue;",bdbri:"border-bottom-right-image:url(|);","bdbri:n":"border-bottom-right-image:none;","bdbri:c":"border-bottom-right-image:continue;",bdbli:"border-bottom-left-image:url(|);","bdbli:n":"border-bottom-left-image:none;","bdbli:c":"border-bottom-left-image:continue;",bdf:"border-fit:${1:repeat};","bdf:c":"border-fit:clip;","bdf:r":"border-fit:repeat;","bdf:sc":"border-fit:scale;","bdf:st":"border-fit:stretch;","bdf:ow":"border-fit:overwrite;","bdf:of":"border-fit:overflow;","bdf:sp":"border-fit:space;",bdlen:"border-length:|;","bdlen:a":"border-length:auto;",bdsp:"border-spacing:|;",bds:"border-style:|;","bds:n":"border-style:none;","bds:h":"border-style:hidden;","bds:dt":"border-style:dotted;","bds:ds":"border-style:dashed;","bds:s":"border-style:solid;","bds:db":"border-style:double;","bds:dtds":"border-style:dot-dash;","bds:dtdtds":"border-style:dot-dot-dash;","bds:w":"border-style:wave;","bds:g":"border-style:groove;","bds:r":"border-style:ridge;","bds:i":"border-style:inset;","bds:o":"border-style:outset;",bdw:"border-width:|;",bdtw:"border-top-width:|;",bdrw:"border-right-width:|;",bdbw:"border-bottom-width:|;",bdlw:"border-left-width:|;",bdt:"border-top:|;",bt:"border-top:|;","bdt+":"border-top:${1:1px} ${2:solid} ${3:#000};","bdt:n":"border-top:none;",bdts:"border-top-style:|;","bdts:n":"border-top-style:none;",bdtc:"border-top-color:#${1:000};","bdtc:t":"border-top-color:transparent;",bdr:"border-right:|;",br:"border-right:|;","bdr+":"border-right:${1:1px} ${2:solid} ${3:#000};","bdr:n":"border-right:none;",bdrst:"border-right-style:|;","bdrst:n":"border-right-style:none;",bdrc:"border-right-color:#${1:000};","bdrc:t":"border-right-color:transparent;",bdb:"border-bottom:|;",bb:"border-bottom:|;","bdb+":"border-bottom:${1:1px} ${2:solid} ${3:#000};","bdb:n":"border-bottom:none;",bdbs:"border-bottom-style:|;","bdbs:n":"border-bottom-style:none;",bdbc:"border-bottom-color:#${1:000};","bdbc:t":"border-bottom-color:transparent;",bdl:"border-left:|;",bl:"border-left:|;","bdl+":"border-left:${1:1px} ${2:solid} ${3:#000};","bdl:n":"border-left:none;",bdls:"border-left-style:|;","bdls:n":"border-left-style:none;",bdlc:"border-left-color:#${1:000};","bdlc:t":"border-left-color:transparent;",bdrs:"border-radius:|;",bdtrrs:"border-top-right-radius:|;",bdtlrs:"border-top-left-radius:|;",bdbrrs:"border-bottom-right-radius:|;",bdblrs:"border-bottom-left-radius:|;",bg:"background:|;","bg+":"background:${1:#fff} url(${2}) ${3:0} ${4:0} ${5:no-repeat};","bg:n":"background:none;","bg:ie":"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1:x}.png',sizingMethod='${2:crop}');",bgc:"background-color:#${1:fff};","bgc:t":"background-color:transparent;",bgi:"background-image:url(|);","bgi:n":"background-image:none;",bgr:"background-repeat:|;","bgr:n":"background-repeat:no-repeat;","bgr:x":"background-repeat:repeat-x;","bgr:y":"background-repeat:repeat-y;","bgr:sp":"background-repeat:space;","bgr:rd":"background-repeat:round;",bga:"background-attachment:|;","bga:f":"background-attachment:fixed;","bga:s":"background-attachment:scroll;",bgp:"background-position:${1:0} ${2:0};",bgpx:"background-position-x:|;",bgpy:"background-position-y:|;",bgbk:"background-break:|;","bgbk:bb":"background-break:bounding-box;","bgbk:eb":"background-break:each-box;","bgbk:c":"background-break:continuous;",bgcp:"background-clip:${1:padding-box};","bgcp:bb":"background-clip:border-box;","bgcp:pb":"background-clip:padding-box;","bgcp:cb":"background-clip:content-box;","bgcp:nc":"background-clip:no-clip;",bgo:"background-origin:|;","bgo:pb":"background-origin:padding-box;","bgo:bb":"background-origin:border-box;","bgo:cb":"background-origin:content-box;",bgsz:"background-size:|;","bgsz:a":"background-size:auto;","bgsz:ct":"background-size:contain;","bgsz:cv":"background-size:cover;",c:"color:#${1:000};","c:r":"color:rgb(${1:0}, ${2:0}, ${3:0});","c:ra":"color:rgba(${1:0}, ${2:0}, ${3:0}, .${4:5});",cm:"/* |${child} */",cnt:"content:'|';","cnt:n":"content:normal;","cnt:oq":"content:open-quote;","cnt:noq":"content:no-open-quote;","cnt:cq":"content:close-quote;","cnt:ncq":"content:no-close-quote;","cnt:a":"content:attr(|);","cnt:c":"content:counter(|);","cnt:cs":"content:counters(|);",tbl:"table-layout:|;","tbl:a":"table-layout:auto;","tbl:f":"table-layout:fixed;",cps:"caption-side:|;","cps:t":"caption-side:top;","cps:b":"caption-side:bottom;",ec:"empty-cells:|;","ec:s":"empty-cells:show;","ec:h":"empty-cells:hide;",lis:"list-style:|;","lis:n":"list-style:none;",lisp:"list-style-position:|;","lisp:i":"list-style-position:inside;","lisp:o":"list-style-position:outside;",list:"list-style-type:|;","list:n":"list-style-type:none;","list:d":"list-style-type:disc;","list:c":"list-style-type:circle;","list:s":"list-style-type:square;","list:dc":"list-style-type:decimal;","list:dclz":"list-style-type:decimal-leading-zero;","list:lr":"list-style-type:lower-roman;","list:ur":"list-style-type:upper-roman;",lisi:"list-style-image:|;","lisi:n":"list-style-image:none;",q:"quotes:|;","q:n":"quotes:none;","q:ru":"quotes:'\\00AB' '\\00BB' '\\201E' '\\201C';","q:en":"quotes:'\\201C' '\\201D' '\\2018' '\\2019';",ct:"content:|;","ct:n":"content:normal;","ct:oq":"content:open-quote;","ct:noq":"content:no-open-quote;","ct:cq":"content:close-quote;","ct:ncq":"content:no-close-quote;","ct:a":"content:attr(|);","ct:c":"content:counter(|);","ct:cs":"content:counters(|);",coi:"counter-increment:|;",cor:"counter-reset:|;",va:"vertical-align:${1:top};","va:sup":"vertical-align:super;","va:t":"vertical-align:top;","va:tt":"vertical-align:text-top;","va:m":"vertical-align:middle;","va:bl":"vertical-align:baseline;","va:b":"vertical-align:bottom;","va:tb":"vertical-align:text-bottom;","va:sub":"vertical-align:sub;",ta:"text-align:${1:left};","ta:l":"text-align:left;","ta:c":"text-align:center;","ta:r":"text-align:right;","ta:j":"text-align:justify;","ta-lst":"text-align-last:|;","tal:a":"text-align-last:auto;","tal:l":"text-align-last:left;","tal:c":"text-align-last:center;","tal:r":"text-align-last:right;",td:"text-decoration:${1:none};","td:n":"text-decoration:none;","td:u":"text-decoration:underline;","td:o":"text-decoration:overline;","td:l":"text-decoration:line-through;",te:"text-emphasis:|;","te:n":"text-emphasis:none;","te:ac":"text-emphasis:accent;","te:dt":"text-emphasis:dot;","te:c":"text-emphasis:circle;","te:ds":"text-emphasis:disc;","te:b":"text-emphasis:before;","te:a":"text-emphasis:after;",th:"text-height:|;","th:a":"text-height:auto;","th:f":"text-height:font-size;","th:t":"text-height:text-size;","th:m":"text-height:max-size;",ti:"text-indent:|;","ti:-":"text-indent:-9999px;",tj:"text-justify:|;","tj:a":"text-justify:auto;","tj:iw":"text-justify:inter-word;","tj:ii":"text-justify:inter-ideograph;","tj:ic":"text-justify:inter-cluster;","tj:d":"text-justify:distribute;","tj:k":"text-justify:kashida;","tj:t":"text-justify:tibetan;",tov:"text-overflow:${ellipsis};","tov:e":"text-overflow:ellipsis;","tov:c":"text-overflow:clip;",to:"text-outline:|;","to+":"text-outline:${1:0} ${2:0} ${3:#000};","to:n":"text-outline:none;",tr:"text-replace:|;","tr:n":"text-replace:none;",tt:"text-transform:${1:uppercase};","tt:n":"text-transform:none;","tt:c":"text-transform:capitalize;","tt:u":"text-transform:uppercase;","tt:l":"text-transform:lowercase;",tw:"text-wrap:|;","tw:n":"text-wrap:normal;","tw:no":"text-wrap:none;","tw:u":"text-wrap:unrestricted;","tw:s":"text-wrap:suppress;",tsh:"text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000};","tsh:r":"text-shadow:${1:h} ${2:v} ${3:blur} rgb(${4:0}, ${5:0}, ${6:0});","tsh:ra":"text-shadow:${1:h} ${2:v} ${3:blur} rgba(${4:0}, ${5:0}, ${6:0}, .${7:5});","tsh+":"text-shadow:${1:0} ${2:0} ${3:0} ${4:#000};","tsh:n":"text-shadow:none;",trf:"transform:|;","trf:skx":"transform: skewX(${1:angle});","trf:sky":"transform: skewY(${1:angle});",
"trf:sc":"transform: scale(${1:x}, ${2:y});","trf:scx":"transform: scaleX(${1:x});","trf:scy":"transform: scaleY(${1:y});","trf:r":"transform: rotate(${1:angle});","trf:t":"transform: translate(${1:x}, ${2:y});","trf:tx":"transform: translateX(${1:x});","trf:ty":"transform: translateY(${1:y});",trfo:"transform-origin:|;",trfs:"transform-style:${1:preserve-3d};",trs:"transition:${1:prop} ${2:time};",trsde:"transition-delay:${1:time};",trsdu:"transition-duration:${1:time};",trsp:"transition-property:${1:prop};",trstf:"transition-timing-function:${1:tfunc};",lh:"line-height:|;",whs:"white-space:|;","whs:n":"white-space:normal;","whs:p":"white-space:pre;","whs:nw":"white-space:nowrap;","whs:pw":"white-space:pre-wrap;","whs:pl":"white-space:pre-line;",whsc:"white-space-collapse:|;","whsc:n":"white-space-collapse:normal;","whsc:k":"white-space-collapse:keep-all;","whsc:l":"white-space-collapse:loose;","whsc:bs":"white-space-collapse:break-strict;","whsc:ba":"white-space-collapse:break-all;",wob:"word-break:|;","wob:n":"word-break:normal;","wob:k":"word-break:keep-all;","wob:l":"word-break:loose;","wob:bs":"word-break:break-strict;","wob:ba":"word-break:break-all;",wos:"word-spacing:|;",wow:"word-wrap:|;","wow:nm":"word-wrap:normal;","wow:n":"word-wrap:none;","wow:u":"word-wrap:unrestricted;","wow:s":"word-wrap:suppress;",lts:"letter-spacing:|;",f:"font:|;","f+":"font:${1:1em} ${2:Arial,sans-serif};",fw:"font-weight:|;","fw:n":"font-weight:normal;","fw:b":"font-weight:bold;","fw:br":"font-weight:bolder;","fw:lr":"font-weight:lighter;",fs:"font-style:${italic};","fs:n":"font-style:normal;","fs:i":"font-style:italic;","fs:o":"font-style:oblique;",fv:"font-variant:|;","fv:n":"font-variant:normal;","fv:sc":"font-variant:small-caps;",fz:"font-size:|;",fza:"font-size-adjust:|;","fza:n":"font-size-adjust:none;",ff:"font-family:|;","ff:s":"font-family:serif;","ff:ss":"font-family:sans-serif;","ff:c":"font-family:cursive;","ff:f":"font-family:fantasy;","ff:m":"font-family:monospace;",fef:"font-effect:|;","fef:n":"font-effect:none;","fef:eg":"font-effect:engrave;","fef:eb":"font-effect:emboss;","fef:o":"font-effect:outline;",fem:"font-emphasize:|;",femp:"font-emphasize-position:|;","femp:b":"font-emphasize-position:before;","femp:a":"font-emphasize-position:after;",fems:"font-emphasize-style:|;","fems:n":"font-emphasize-style:none;","fems:ac":"font-emphasize-style:accent;","fems:dt":"font-emphasize-style:dot;","fems:c":"font-emphasize-style:circle;","fems:ds":"font-emphasize-style:disc;",fsm:"font-smooth:|;","fsm:a":"font-smooth:auto;","fsm:n":"font-smooth:never;","fsm:aw":"font-smooth:always;",fst:"font-stretch:|;","fst:n":"font-stretch:normal;","fst:uc":"font-stretch:ultra-condensed;","fst:ec":"font-stretch:extra-condensed;","fst:c":"font-stretch:condensed;","fst:sc":"font-stretch:semi-condensed;","fst:se":"font-stretch:semi-expanded;","fst:e":"font-stretch:expanded;","fst:ee":"font-stretch:extra-expanded;","fst:ue":"font-stretch:ultra-expanded;",op:"opacity:|;","op:ie":"filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);","op:ms":"-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';",rsz:"resize:|;","rsz:n":"resize:none;","rsz:b":"resize:both;","rsz:h":"resize:horizontal;","rsz:v":"resize:vertical;",cur:"cursor:${pointer};","cur:a":"cursor:auto;","cur:d":"cursor:default;","cur:c":"cursor:crosshair;","cur:ha":"cursor:hand;","cur:he":"cursor:help;","cur:m":"cursor:move;","cur:p":"cursor:pointer;","cur:t":"cursor:text;",pgbb:"page-break-before:|;","pgbb:au":"page-break-before:auto;","pgbb:al":"page-break-before:always;","pgbb:l":"page-break-before:left;","pgbb:r":"page-break-before:right;",pgbi:"page-break-inside:|;","pgbi:au":"page-break-inside:auto;","pgbi:av":"page-break-inside:avoid;",pgba:"page-break-after:|;","pgba:au":"page-break-after:auto;","pgba:al":"page-break-after:always;","pgba:l":"page-break-after:left;","pgba:r":"page-break-after:right;",orp:"orphans:|;",us:"user-select:${none};",wid:"widows:|;",wfsm:"-webkit-font-smoothing:${antialiased};","wfsm:a":"-webkit-font-smoothing:antialiased;","wfsm:s":"-webkit-font-smoothing:subpixel-antialiased;","wfsm:sa":"-webkit-font-smoothing:subpixel-antialiased;","wfsm:n":"-webkit-font-smoothing:none;"}},html:{filters:"html",profile:"html",snippets:{"!!!":"<!doctype html>","!!!4t":'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',"!!!4s":'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',"!!!xt":'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',"!!!xs":'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',"!!!xxs":'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',c:"<!-- |${child} -->","cc:ie6":"<!--[if lte IE 6]>\n	${child}|\n<![endif]-->","cc:ie":"<!--[if IE]>\n	${child}|\n<![endif]-->","cc:noie":"<!--[if !IE]><!-->\n	${child}|\n<!--<![endif]-->"},abbreviations:{"!":"html:5",a:'<a href="">',"a:link":'<a href="http://|">',"a:mail":'<a href="mailto:|">',abbr:'<abbr title="">',acronym:'<acronym title="">',base:'<base href="" />',bdo:'<bdo dir="">',"bdo:r":'<bdo dir="rtl">',"bdo:l":'<bdo dir="ltr">',link:'<link rel="stylesheet" href="" />',"link:css":'<link rel="stylesheet" href="${1:style}.css" media="all" />',"link:print":'<link rel="stylesheet" href="${1:print}.css" media="print" />',"link:favicon":'<link rel="shortcut icon" type="image/x-icon" href="${1:favicon.ico}" />',"link:touch":'<link rel="apple-touch-icon" href="${1:favicon.png}" />',"link:rss":'<link rel="alternate" type="application/rss+xml" title="RSS" href="${1:rss.xml}" />',"link:atom":'<link rel="alternate" type="application/atom+xml" title="Atom" href="${1:atom.xml}" />',"meta:utf":'<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />',"meta:win":'<meta http-equiv="Content-Type" content="text/html;charset=windows-1251" />',"meta:vp":'<meta name="viewport" content="width=${1:device-width}, user-scalable=${2:no}, initial-scale=${3:1.0}, maximum-scale=${4:1.0}, minimum-scale=${5:1.0}" />',"meta:compat":'<meta http-equiv="X-UA-Compatible" content="${1:IE=7}" />',style:"<style>",script:"<script>","script:src":'<script src="">',img:'<img src="" alt="" />',iframe:'<iframe src="" frameborder="0">',embed:'<embed src="" type="" />',object:'<object data="" type="">',param:'<param name="" value="" />',map:'<map name="">',area:'<area shape="" coords="" href="" alt="" />',"area:d":'<area shape="default" href="" alt="" />',"area:c":'<area shape="circle" coords="" href="" alt="" />',"area:r":'<area shape="rect" coords="" href="" alt="" />',"area:p":'<area shape="poly" coords="" href="" alt="" />',form:'<form action="">',"form:get":'<form action="" method="get">',"form:post":'<form action="" method="post">',label:'<label for="">',input:'<input type="${1:text}" />',inp:'<input type="${1:text}" name="" id="" />',"input:hidden":"input[type=hidden name]","input:h":"input:hidden","input:text":"inp","input:t":"inp","input:search":"inp[type=search]","input:email":"inp[type=email]","input:url":"inp[type=url]","input:password":"inp[type=password]","input:p":"input:password","input:datetime":"inp[type=datetime]","input:date":"inp[type=date]","input:datetime-local":"inp[type=datetime-local]","input:month":"inp[type=month]","input:week":"inp[type=week]","input:time":"inp[type=time]","input:number":"inp[type=number]","input:color":"inp[type=color]","input:checkbox":"inp[type=checkbox]","input:c":"input:checkbox","input:radio":"inp[type=radio]","input:r":"input:radio","input:range":"inp[type=range]","input:file":"inp[type=file]","input:f":"input:file","input:submit":'<input type="submit" value="" />',"input:s":"input:submit","input:image":'<input type="image" src="" alt="" />',"input:i":"input:image","input:button":'<input type="button" value="" />',"input:b":"input:button","input:reset":"input:button[type=reset]",select:'<select name="" id="">',option:'<option value="">',textarea:'<textarea name="" id="" cols="${1:30}" rows="${2:10}">',"menu:context":"menu[type=context]>","menu:c":"menu:context","menu:toolbar":"menu[type=toolbar]>","menu:t":"menu:toolbar",video:'<video src="">',audio:'<audio src="">',"html:xml":'<html xmlns="http://www.w3.org/1999/xhtml">',bq:"blockquote",acr:"acronym",fig:"figure",figc:"figcaption",ifr:"iframe",emb:"embed",obj:"object",src:"source",cap:"caption",colg:"colgroup",fst:"fieldset",btn:"button",optg:"optgroup",opt:"option",tarea:"textarea",leg:"legend",sect:"section",art:"article",hdr:"header",ftr:"footer",adr:"address",dlg:"dialog",str:"strong",prog:"progress",fset:"fieldset",datag:"datagrid",datal:"datalist",kg:"keygen",out:"output",det:"details",cmd:"command",doc:"html>(head>meta[charset=UTF-8]+title{${1:Document}})+body",doc4:'html>(head>meta[http-equiv="Content-Type" content="text/html;charset=${charset}"]+title{${1:Document}})',"html:4t":"!!!4t+doc4[lang=${lang}]","html:4s":"!!!4s+doc4[lang=${lang}]","html:xt":"!!!xt+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]","html:xs":"!!!xs+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]","html:xxs":"!!!xxs+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]","html:5":"!!!+doc[lang=${lang}]","ol+":"ol>li","ul+":"ul>li","dl+":"dl>dt+dd","map+":"map>area","table+":"table>tr>td","colgroup+":"colgroup>col","colg+":"colgroup>col","tr+":"tr>td","select+":"select>option","optgroup+":"optgroup>option","optg+":"optgroup>option"}},xml:{"extends":"html",profile:"xml",filters:"html"},xsl:{"extends":"html",profile:"xml",filters:"html, xsl",abbreviations:{tm:'<xsl:template match="" mode="">',tmatch:"tm",tn:'<xsl:template name="">',tname:"tn",call:'<xsl:call-template name=""/>',ap:'<xsl:apply-templates select="" mode=""/>',api:"<xsl:apply-imports/>",imp:'<xsl:import href=""/>',inc:'<xsl:include href=""/>',ch:"<xsl:choose>","xsl:when":'<xsl:when test="">',wh:"xsl:when",ot:"<xsl:otherwise>","if":'<xsl:if test="">',par:'<xsl:param name="">',pare:'<xsl:param name="" select=""/>',"var":'<xsl:variable name="">',vare:'<xsl:variable name="" select=""/>',wp:'<xsl:with-param name="" select=""/>',key:'<xsl:key name="" match="" use=""/>',elem:'<xsl:element name="">',attr:'<xsl:attribute name="">',attrs:'<xsl:attribute-set name="">',cp:'<xsl:copy select=""/>',co:'<xsl:copy-of select=""/>',val:'<xsl:value-of select=""/>',each:'<xsl:for-each select="">',"for":"each",tex:"<xsl:text></xsl:text>",com:"<xsl:comment>",msg:'<xsl:message terminate="no">',fall:"<xsl:fallback>",num:'<xsl:number value=""/>',nam:'<namespace-alias stylesheet-prefix="" result-prefix=""/>',pres:'<xsl:preserve-space elements=""/>',strip:'<xsl:strip-space elements=""/>',proc:'<xsl:processing-instruction name="">',sort:'<xsl:sort select="" order=""/>',"choose+":"xsl:choose>xsl:when+xsl:otherwise",xsl:"!!!+xsl:stylesheet[version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform]>{\n|}"},snippets:{"!!!":'<?xml version="1.0" encoding="UTF-8"?>'}},haml:{filters:"haml","extends":"html",profile:"xml"},scss:{"extends":"css"},sass:{"extends":"css"},less:{"extends":"css"},stylus:{"extends":"css"}},"system")}),emmet.define("cm-editor-proxy",function(e,t){function n(){var t=l.getSyntax();return e("resources").hasSyntax(t)}function r(t,r){if(l.setupContext(r),"expand_abbreviation_with_tab"==t&&(l.getSelection()||!n()))return CodeMirror.Pass;var i=!0;try{var a=e("actions").run(t,l);("next_edit_point"==t||"prev_edit_point"==t)&&r.replaceSelection(""),a||"insert_formatted_line_break_only"!=t||(i=!1)}catch(o){}return i?void 0:CodeMirror.Pass}var i=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),a=i||/Mac/.test(navigator.platform),o={"Cmd-E":"expand_abbreviation",Tab:"expand_abbreviation_with_tab","Cmd-D":"match_pair_outward","Shift-Cmd-D":"match_pair_inward","Cmd-T":"matching_pair","Shift-Cmd-A":"wrap_with_abbreviation","Ctrl-Alt-Right":"next_edit_point","Ctrl-Alt-Left":"prev_edit_point","Cmd-L":"select_line","Cmd-Shift-M":"merge_lines","Cmd-/":"toggle_comment","Cmd-J":"split_join_tag","Cmd-K":"remove_tag","Shift-Cmd-Y":"evaluate_math_expression","Ctrl-Up":"increment_number_by_1","Ctrl-Down":"decrement_number_by_1","Alt-Up":"increment_number_by_01","Alt-Down":"decrement_number_by_01","Ctrl-Alt-Up":"increment_number_by_10","Ctrl-Alt-Down":"decrement_number_by_10","Shift-Cmd-.":"select_next_item","Shift-Cmd-,":"select_previous_item","Cmd-B":"reflect_css_value",Enter:"insert_formatted_line_break_only"},s={"text/html":"html","application/xml":"xml","text/xsl":"xsl","text/css":"css","text/x-less":"less"};CodeMirror.defineOption?CodeMirror.defineOption("profile","html"):CodeMirror.defaults.profile="html";var l={context:null,getSelectionRange:function(){var e=this.getCaretPos();return{start:e,end:e+this.getSelection().length}},createSelection:function(e,t){e==t?this.context.setCursor(this.context.posFromIndex(e)):this.context.setSelection(this.context.posFromIndex(e),this.context.posFromIndex(t))},getCurrentLineRange:function(){var e=this.context.getCursor(!0);return{start:this.context.indexFromPos({line:e.line,ch:0}),end:this.context.indexFromPos({line:e.line,ch:this.context.getLine(e.line).length})}},getCaretPos:function(){return this.context.indexFromPos(this.context.getCursor(!0))},setCaretPos:function(e){this.createSelection(e,e)},getCurrentLine:function(){return this.context.getLine(this.context.getCursor(!0).line)||""},replaceContent:function(n,r,i,a){t.isUndefined(i)&&(i=t.isUndefined(r)?content.length:r),t.isUndefined(r)&&(r=0);var o=e("utils");a||(n=o.padString(n,o.getLinePaddingFromPosition(this.getContent(),r)));var s=e("tabStops").extract(n,{escape:function(e){return e}});n=s.text;var l=s.tabstops[0];l?(l.start+=r,l.end+=r):l={start:n.length+r,end:n.length+r};var u=this,c=this.context.operation||this.context.compoundChange;c.call(this.context,function(){u.context.replaceRange(n,u.context.posFromIndex(r),u.context.posFromIndex(i)),u.createSelection(l.start,l.end)})},getContent:function(){return this.context.getValue()},getSyntax:function(){var t=this.context.getOption("mode");return t in s&&(t=s[t]),e("actionUtils").detectSyntax(this,t)},getProfileName:function(){return this.context.getOption("profile")?this.context.getOption("profile"):e("actionUtils").detectProfile(this)},prompt:function(e){return prompt(e)},getSelection:function(){return this.context.getSelection()||""},getFilePath:function(){return location.href},setupContext:function(t){this.context=t;var n="	";t.getOption("indentWithTabs")||(n=e("utils").repeatString(" ",t.getOption("indentUnit"))),e("resources").setVariable("indentation",n)},addAction:function(e,t,n){var i="emmet."+e;CodeMirror.commands[i]||(CodeMirror.commands[i]=function(t){return r(e,t)}),t&&(n||(CodeMirror.keyMap&&CodeMirror.keyMap["default"]?n=CodeMirror.keyMap["default"]:(CodeMirror.defaults.extraKeys||(CodeMirror.defaults.extraKeys={}),n=CodeMirror.defaults.extraKeys)),a||(t=t.replace("Cmd","Ctrl")),n&&(n[t]=i))}};return"undefined"!=typeof emmetKeymap&&(o=emmetKeymap),t.each(o,function(e,t){l.addAction(e,t)}),l});