var _=function(){function h(a,b,c){if(a===b)return a!==0||1/a==1/b;if(a==null||b==null)return a===b;if(a._chain)a=a._wrapped;if(b._chain)b=b._wrapped;if(a.isEqual&&k.isFunction(a.isEqual))return a.isEqual(b);if(b.isEqual&&k.isFunction(b.isEqual))return b.isEqual(a);var e=g.call(a);if(e!=g.call(b))return!1;switch(e){case "[object String]":return a==String(b);case "[object Number]":return a!=+a?b!=+b:a==0?1/a==1/b:a==+b;case "[object Date]":case "[object Boolean]":return+a==+b;case "[object RegExp]":return a.source== b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if(typeof a!="object"||typeof b!="object")return!1;for(var d=c.length;d--;)if(c[d]==a)return!0;c.push(a);var d=0,j=!0;if(e=="[object Array]"){if(d=a.length,j=d==b.length)for(;d--;)if(!(j=d in a==d in b&&h(a[d],b[d],c)))break}else{if("constructor"in a!="constructor"in b||a.constructor!=b.constructor)return!1;for(var f in a)if(k.has(a,f)&&(d++,!(j=k.has(b,f)&&h(a[f],b[f],c))))break;if(j){for(f in b)if(k.has(b,f)&&!d--)break; j=!d}}c.pop();return j}var d=this,f=d._,i={},b=Array.prototype,c=Object.prototype,a=b.slice,e=b.unshift,g=c.toString,j=c.hasOwnProperty,l=b.forEach,m=b.map,n=b.reduce,o=b.reduceRight,q=b.filter,s=b.every,r=b.some,u=b.indexOf,p=b.lastIndexOf,c=Array.isArray,v=Object.keys,w=Function.prototype.bind,k=function(a){return new y(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=k;exports._=k}else d._=k;k.VERSION="1.3.3";var t=k.each=k.forEach=function(a, b,c){if(a!=null)if(l&&a.forEach===l)a.forEach(b,c);else if(a.length===+a.length)for(var g=0,e=a.length;g2;a==null&&(a=[]);if(n&& a.reduce===n)return g&&(b=k.bind(b,g)),e?a.reduce(b,c):a.reduce(b);t(a,function(a,d,j){e?c=b.call(g,c,a,d,j):(c=a,e=!0)});if(!e)throw new TypeError("Reduce of empty array with no initial value");return c};k.reduceRight=k.foldr=function(a,b,c,g){var e=arguments.length>2;a==null&&(a=[]);if(o&&a.reduceRight===o)return g&&(b=k.bind(b,g)),e?a.reduceRight(b,c):a.reduceRight(b);var d=k.toArray(a).reverse();g&&!e&&(b=k.bind(b,g));return e?k.reduce(d,b,c,g):k.reduce(d,b)};k.find=k.detect=function(a,b,c){var g; z(a,function(a,e,d){if(b.call(c,a,e,d))return g=a,!0});return g};k.filter=k.select=function(a,b,c){var g=[];if(a==null)return g;if(q&&a.filter===q)return a.filter(b,c);t(a,function(a,e,d){b.call(c,a,e,d)&&(g[g.length]=a)});return g};k.reject=function(a,b,c){var g=[];if(a==null)return g;t(a,function(a,e,d){b.call(c,a,e,d)||(g[g.length]=a)});return g};k.every=k.all=function(a,b,c){var g=!0;if(a==null)return g;if(s&&a.every===s)return a.every(b,c);t(a,function(a,e,d){if(!(g=g&&b.call(c,a,e,d)))return i}); return!!g};var z=k.some=k.any=function(a,b,c){b||(b=k.identity);var g=!1;if(a==null)return g;if(r&&a.some===r)return a.some(b,c);t(a,function(a,e,d){if(g||(g=b.call(c,a,e,d)))return i});return!!g};k.include=k.contains=function(a,b){var c=!1;return a==null?c:u&&a.indexOf===u?a.indexOf(b)!=-1:c=z(a,function(a){return a===b})};k.invoke=function(b,c){var g=a.call(arguments,2);return k.map(b,function(a){return(k.isFunction(c)?c||a:a[c]).apply(a,g)})};k.pluck=function(a,b){return k.map(a,function(a){return a[b]})}; k.max=function(a,b,c){if(!b&&k.isArray(a)&&a[0]===+a[0])return Math.max.apply(Math,a);if(!b&&k.isEmpty(a))return-Infinity;var g={computed:-Infinity};t(a,function(a,e,d){e=b?b.call(c,a,e,d):a;e>=g.computed&&(g={value:a,computed:e})});return g.value};k.min=function(a,b,c){if(!b&&k.isArray(a)&&a[0]===+a[0])return Math.min.apply(Math,a);if(!b&&k.isEmpty(a))return Infinity;var g={computed:Infinity};t(a,function(a,e,d){e=b?b.call(c,a,e,d):a;eg?1:0}),"value")};k.groupBy=function(a,b){var c={},g=k.isFunction(b)?b:function(a){return a[b]};t(a,function(a,b){var e=g(a,b);(c[e]||(c[e]=[])).push(a)}); return c};k.sortedIndex=function(a,b,c){c||(c=k.identity);for(var g=0,e=a.length;g>1;c(a[d])=0})})};k.difference=function(b){var c=k.flatten(a.call(arguments,1),!0);return k.filter(b,function(a){return!k.include(c,a)})};k.zip=function(){for(var b=a.call(arguments),c=k.max(k.pluck(b,"length")), g=Array(c),e=0;e=0;c--)b=[a[c].apply(this,b)];return b[0]}};k.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};k.keys=v||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[],c;for(c in a)k.has(a,c)&&(b[b.length]=c);return b};k.values=function(a){return k.map(a,k.identity)};k.functions=k.methods=function(a){var b=[],c;for(c in a)k.isFunction(a[c])&&b.push(c);return b.sort()};k.extend=function(b){t(a.call(arguments, 1),function(a){for(var c in a)b[c]=a[c]});return b};k.pick=function(b){var c={};t(k.flatten(a.call(arguments,1)),function(a){a in b&&(c[a]=b[a])});return c};k.defaults=function(b){t(a.call(arguments,1),function(a){for(var c in a)b[c]==null&&(b[c]=a[c])});return b};k.clone=function(a){return!k.isObject(a)?a:k.isArray(a)?a.slice():k.extend({},a)};k.tap=function(a,b){b(a);return a};k.isEqual=function(a,b){return h(a,b,[])};k.isEmpty=function(a){if(a==null)return!0;if(k.isArray(a)||k.isString(a))return a.length=== 0;for(var b in a)if(k.has(a,b))return!1;return!0};k.isElement=function(a){return!!(a&&a.nodeType==1)};k.isArray=c||function(a){return g.call(a)=="[object Array]"};k.isObject=function(a){return a===Object(a)};k.isArguments=function(a){return g.call(a)=="[object Arguments]"};if(!k.isArguments(arguments))k.isArguments=function(a){return!(!a||!k.has(a,"callee"))};k.isFunction=function(a){return g.call(a)=="[object Function]"};k.isString=function(a){return g.call(a)=="[object String]"};k.isNumber=function(a){return g.call(a)== "[object Number]"};k.isFinite=function(a){return k.isNumber(a)&&isFinite(a)};k.isNaN=function(a){return a!==a};k.isBoolean=function(a){return a===!0||a===!1||g.call(a)=="[object Boolean]"};k.isDate=function(a){return g.call(a)=="[object Date]"};k.isRegExp=function(a){return g.call(a)=="[object RegExp]"};k.isNull=function(a){return a===null};k.isUndefined=function(a){return a===void 0};k.has=function(a,b){return j.call(a,b)};k.noConflict=function(){d._=f;return this};k.identity=function(a){return a}; k.times=function(a,b,c){for(var g=0;g/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};k.result=function(a,b){if(a==null)return null;var c=a[b];return k.isFunction(c)?c.call(a):c};k.mixin=function(a){t(k.functions(a),function(b){F(b,k[b]=a[b])})};var G=0;k.uniqueId=function(a){var b=G++;return a?a+b:b};k.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g, escape:/<%-([\s\S]+?)%>/g};var B=/.^/,A={"\\":"\\","'":"'",r:"\r",n:"\n",t:"\t",u2028:"\u2028",u2029:"\u2029"},C;for(C in A)A[A[C]]=C;var H=/\\|'|\r|\n|\t|\u2028|\u2029/g,I=/\\(\\|'|r|n|t|u2028|u2029)/g,D=function(a){return a.replace(I,function(a,b){return A[b]})};k.template=function(a,b,c){c=k.defaults(c||{},k.templateSettings);a="__p+='"+a.replace(H,function(a){return"\\"+A[a]}).replace(c.escape||B,function(a,b){return"'+\n_.escape("+D(b)+")+\n'"}).replace(c.interpolate||B,function(a,b){return"'+\n("+ D(b)+")+\n'"}).replace(c.evaluate||B,function(a,b){return"';\n"+D(b)+"\n;__p+='"})+"';\n";c.variable||(a="with(obj||{}){\n"+a+"}\n");var a="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n"+a+"return __p;\n",g=new Function(c.variable||"obj","_",a);if(b)return g(b,k);b=function(a){return g.call(this,a,k)};b.source="function("+(c.variable||"obj")+"){\n"+a+"}";return b};k.chain=function(a){return k(a).chain()};var y=function(a){this._wrapped=a};k.prototype=y.prototype; var E=function(a,b){return b?k(a).chain():a},F=function(b,c){y.prototype[b]=function(){var b=a.call(arguments);e.call(b,this._wrapped);return E(c.apply(k,b),this._chain)}};k.mixin(k);t(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var c=b[a];y.prototype[a]=function(){var b=this._wrapped;c.apply(b,arguments);var g=b.length;(a=="shift"||a=="splice")&&g===0&&delete b[0];return E(b,this._chain)}});t(["concat","join","slice"],function(a){var c=b[a];y.prototype[a]=function(){return E(c.apply(this._wrapped, arguments),this._chain)}});y.prototype.chain=function(){this._chain=!0;return this};y.prototype.value=function(){return this._wrapped};return k}.call({}),emmet=function(h){function d(a,b,d){var f;f=b&&b.hasOwnProperty("constructor")?b.constructor:function(){a.apply(this,arguments)};_.extend(f,a);c.prototype=a.prototype;f.prototype=new c;b&&_.extend(f.prototype,b);d&&_.extend(f,d);f.prototype.constructor=f;f.__super__=a.prototype;return f}function f(c){!(c in b)&&a&&a(c);return b[c]}if(typeof _=="undefined")try{_= h.require("underscore")}catch(i){}if(typeof _=="undefined")throw"Cannot access to Underscore.js lib";var b={_:_},c=function(){},a=null;return{define:function(a,c){a in b||(b[a]=_.isFunction(c)?this.exec(c):c)},require:f,exec:function(a,b){return a.call(b||h,_.bind(f,this),_,this)},extend:function(a,b){var c=d(this,a,b);c.extend=this.extend;if(a.hasOwnProperty("toString"))c.prototype.toString=a.toString;return c},expandAbbreviation:function(a,b,c,d){if(!a)return"";var b=b||"html",h=f("filters"),i= f("abbreviationParser"),c=f("profile").get(c,b);f("tabStops").resetTabstopIndex();a=h.extractFromAbbreviation(a);d=i.parse(a[0],{syntax:b,contextNode:d});b=h.composeList(b,c,a[1]);h.apply(d,b,c);return d.toString()},defaultSyntax:function(){return"html"},defaultProfile:function(){return"plain"},log:function(){h.console&&h.console.log&&h.console.log.apply(h.console,arguments)},setModuleLoader:function(b){a=b}}}(this); if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=emmet;exports.emmet=emmet} emmet.define("abbreviationParser",function(h,d){function f(){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.padding=this.content=this.end=this.start=""}function i(a){return a.substring(1,a.length-1)}function b(a){for(var a=h("utils").trim(a),c=new f,g=c.addChild(),e,j=h("stringStream").create(a),a=1E3,l;!j.eol()&&--a>0;)switch(e=j.peek(),e){case "(":j.start=j.pos; if(j.skipToPair("(",")"))e=b(i(j.current())),(l=j.match(/^\*(\d+)?/,!0))&&g._setRepeat(l[1]),d.each(e.children,function(a){g.addChild(a)});else throw'Invalid abbreviation: mo matching ")" found for character at '+j.pos;break;case ">":g=g.addChild();j.next();break;case "+":g=g.parent.addChild();j.next();break;case "^":e=g.parent||g;g=(e.parent||e).addChild();j.next();break;default:j.start=j.pos,j.eatWhile(function(a){if(a=="["||a=="{"){if(j.skipToPair(a,q[a]))return j.backUp(1),!0;throw'Invalid abbreviation: mo matching "'+ q[a]+'" found for character at '+j.pos;}return a=="+"?(j.next(),a=j.eol()||~"+>^*".indexOf(j.peek()),j.backUp(1),a):a!="("&&m(a)}),g.setAbbreviation(j.current()),j.start=j.pos}if(a<1)throw"Endless loop detected";return c}function c(a){var a=h("utils").trim(a),b=[],a=h("stringStream").create(a);for(a.eatSpace();!a.eol();)if(a.start=a.pos,a.eatWhile(o)){var c=a.current(),g="";if(a.peek()=="="){a.next();a.start=a.pos;var e=a.peek();if(e=='"'||e=="'"){a.next();a:{for(var g=a,d=void 0;d=g.next();)if(d=== e){g=!0;break a}g=!1}if(g)g=a.current(),g=g.substring(1,g.length-1);else throw"Invalid attribute value";}else if(a.eatWhile(/[^\s\]]/))g=a.current();else throw"Invalid attribute value";}b.push({name:c,value:g});a.eatSpace()}else break;return b}function a(a){for(var b=[],g={"#":"id",".":"class"},d=null,j=h("stringStream").create(a);!j.eol();)switch(j.peek()){case "#":case ".":if(d===null)d=j.pos;var f=g[j.peek()];j.next();j.start=j.pos;j.eatWhile(o);b.push({name:f,value:j.current()});break;case "[":if(d=== null)d=j.pos;j.start=j.pos;if(!j.skipToPair("[","]"))throw"Invalid attribute set definition";b=b.concat(c(i(j.current())));break;default:j.next()}return!b.length?null:{element:a.substring(0,d),attributes:e(b)}}function e(a){var a=d.map(a,function(a){return d.clone(a)}),b={};return d.filter(a,function(a){if(!(a.name in b))return b[a.name]=a;var c=b[a.name];a.name.toLowerCase()=="class"?c.value+=(c.value.length?" ":"")+a.value:c.value=a.value;return!1})}function g(a){if(!~a.indexOf("{"))return null; for(var b=h("stringStream").create(a);!b.eol();)switch(b.peek()){case "[":case "(":b.skipToPair(b.peek(),q[b.peek()]);break;case "{":return b.start=b.pos,b.skipToPair("{","}"),{element:a.substring(0,b.start),text:i(b.current())};default:b.next()}}function j(a){for(var b=a.children.length-1,c,g;b>=0;b--)if(g=a.children[b],g.isRepeating()){c=g.repeatCount;g.repeatCount=1;for(g.updateProperty("counter",1);--c>0;)g.parent.addChild(g.clone(),b+1).updateProperty("counter",c+1)}d.each(a.children,j);return a} function l(a){for(var b=a.children.length-1;b>=0;b--){var c=a.children[b];c.isGroup()?c.replace(l(c).children):c.isEmpty()&&c.remove()}d.each(a.children,l);return a}function m(a){var b=a.charCodeAt(0);return b>64&&b<91||b>96&&b<123||b>47&&b<58||"#.*:$-_!@|%".indexOf(a)!=-1}var n=/^[\w\-\$\:@\!%]+\+?$/i,o=/[\w\-:\$]/,q={"[":"]","(":")","{":"}"},s=Array.prototype.splice,r=[],u=[],p=[];f.prototype={addChild:function(a,b){a=a||new f;a.parent=this;d.isUndefined(b)?this.children.push(a):this.children.splice(b, 0,a);return a},clone:function(){var a=new f;d.each(["abbreviation","counter","_name","_text","repeatCount","hasImplicitRepeat","start","end","content","padding"],function(b){a[b]=this[b]},this);a._attributes=d.map(this._attributes,function(a){return d.clone(a)});a._data=d.clone(this._data);a.children=d.map(this.children,function(b){b=b.clone();b.parent=a;return b});return a},remove:function(){if(this.parent)this.parent.children=d.without(this.parent.children,this);return this},replace:function(){var a= this.parent,b=d.indexOf(a.children,this),c=d.flatten(arguments);s.apply(a.children,[b,1].concat(c));d.each(c,function(b){b.parent=a})},updateProperty:function(a,b){this[a]=b;d.each(this.children,function(c){c.updateProperty(a,b)})},find:function(a){return this.findAll(a)[0]},findAll:function(a){if(!d.isFunction(a))var b=a.toLowerCase(),a=function(a){return a.name().toLowerCase()==b};var c=[];d.each(this.children,function(b){a(b)&&c.push(b);c=c.concat(b.findAll(a))});return d.compact(c)},data:function(a, b){if(arguments.length==2&&(this._data[a]=b,a=="resource"&&h("elements").is(b,"snippet")&&(this.content=b.data,this._text)))this.content=h("abbreviationUtils").insertChildContent(b.data,this._text);return this._data[a]},name:function(){var a=this.matchedResource();return h("elements").is(a,"element")?a.name:this._name},attributeList:function(){var a=[],b=this.matchedResource();h("elements").is(b,"element")&&d.isArray(b.attributes)&&(a=a.concat(b.attributes));return e(a.concat(this._attributes))}, attribute:function(a,b){if(arguments.length==2){var c=d.indexOf(d.pluck(this._attributes,"name"),a.toLowerCase());~c?this._attributes[c].value=b:this._attributes.push({name:a,value:b})}return(d.find(this.attributeList(),function(b){return b.name==a})||{}).value},matchedResource:function(){return this.data("resource")},index:function(){return this.parent?d.indexOf(this.parent.children,this):-1},_setRepeat:function(a){a?this.repeatCount=parseInt(a,10)||1:this.hasImplicitRepeat=!0},setAbbreviation:function(b){var c= this;this.abbreviation=b=(b||"").replace(/\*(\d+)?$/,function(a,b){c._setRepeat(b);return""});var e=g(b);if(e)b=e.element,this.content=this._text=e.text;if(e=a(b))b=e.element,this._attributes=e.attributes;if((this._name=b)&&!n.test(this._name))throw"Invalid abbreviation";},toString:function(){var a=h("utils"),b=this.start,c=this.end,g=this.content,e=this;d.each(p,function(a){b=a(b,e,"start");g=a(g,e,"content");c=a(c,e,"end")});var j=d.map(this.children,function(a){return a.toString()}).join(""),g= h("abbreviationUtils").insertChildContent(g,j,{keepVariable:!1});return b+a.padString(g,this.padding)+c},hasEmptyChildren:function(){return!!d.find(this.children,function(a){return a.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 a=this;a.children.length;)a=d.last(a.children);return a}};p.push(function(a,b){return h("utils").replaceCounter(a,b.counter)});return{parse:function(a,c){var c=c||{},g=b(a);if(c.contextNode){g._name=c.contextNode.name;var e={};d.each(g._attributes,function(a){e[a.name]=a});d.each(c.contextNode.attributes,function(a){a.name in e?e[a.name].value=a.value:(a=d.clone(a), g._attributes.push(a),e[a.name]=a)})}d.each(r,function(a){a(g,c)});g=l(j(g));d.each(u,function(a){a(g,c)});return g},AbbreviationNode:f,addPreprocessor:function(a){d.include(r,a)||r.push(a)},removeFilter:function(a){preprocessor=d.without(r,a)},addPostprocessor:function(a){d.include(u,a)||u.push(a)},removePostprocessor:function(a){u=d.without(u,a)},addOutputProcessor:function(a){d.include(p,a)||p.push(a)},removeOutputProcessor:function(a){p=d.without(p,a)},isAllowedChar:function(a){a=String(a);return m(a)|| ~">+^[](){}".indexOf(a)}}}); emmet.exec(function(h,d){function f(i,b){var c=h("resources"),a=h("elements"),e=h("abbreviationParser");d.each(d.clone(i.children),function(g){var j=c.getMatchedResource(g,b);if(d.isString(j))g.data("resource",a.create("snippet",j));else if(a.is(j,"reference")){j=e.parse(j.data,{syntax:b});if(g.repeatCount>1){var h=j.findAll(function(a){return a.hasImplicitRepeat});d.each(h,function(a){a.repeatCount=g.repeatCount;a.hasImplicitRepeat=!1})}var i=j.deepestChild();i&&d.each(g.children,function(a){i.addChild(a)}); d.each(j.children,function(a){d.each(g.attributeList(),function(b){a.attribute(b.name,b.value)})});g.replace(j.children)}else g.data("resource",j);f(g,b)})}h("abbreviationParser").addPreprocessor(function(d,b){var c=b.syntax||emmet.defaultSyntax();f(d,c)})}); emmet.exec(function(h,d){function f(a){for(var b=h("range"),c=[],a=h("stringStream").create(a);!a.eol();){if(a.peek()=="\\")a.next();else if(a.start=a.pos,a.match(e,!0)){c.push(b.create(a.start,e));continue}a.next()}return c}function i(a,b){var c=h("utils"),e=f(a);e.reverse();d.each(e,function(e){a=c.replaceSubstring(a,b,e)});return a}function b(a){return f(a.content).length?!0:!!d.find(a.attributeList(),function(a){return!!f(a.value).length})}function c(a,c,e){var f=a.findAll(function(a){return b(a)}); b(a)&&f.unshift(a);f.length?d.each(f,function(a){a.content=i(a.content,c);d.each(a._attributes,function(a){a.value=i(a.value,c)})}):(a=a.deepestChild()||a,a.content=e?c:h("abbreviationUtils").insertChildContent(a.content,c))}var a=h("abbreviationParser"),e="$#";a.addPreprocessor(function(a,b){if(b.pastedContent){var c=h("utils"),e=d.map(c.splitByLines(b.pastedContent,!0),c.trim);a.findAll(function(a){if(a.hasImplicitRepeat)return a.data("paste",e),a.repeatCount=e.length})}});a.addPostprocessor(function(a, b){!a.findAll(function(a){var b=a.data("paste"),g="";d.isArray(b)?g=b[a.counter-1]:d.isFunction(b)?g=b(a.counter-1,a.content):b&&(g=b);g&&c(a,g,!!a.data("pasteOverwrites"));a.data("paste",null);return!!b}).length&&b.pastedContent&&c(a,b.pastedContent)})});emmet.exec(function(h,d){function f(i){var b=h("tagName");d.each(i.children,function(c){if(c.hasImplicitName()||c.data("forceNameResolving"))c._name=b.resolve(c.parent.name());f(c)});return i}h("abbreviationParser").addPostprocessor(f)}); emmet.define("cssParser",function(h,d){function f(a){return typeof a!=="undefined"}function i(){return{"char":g.chnum,line:g.linenum}}function b(a,b,c){var e=g,c=c||{};j.push({charstart:f(c["char"])?c["char"]:e.chnum,charend:f(c.charend)?c.charend:e.chnum,linestart:f(c.line)?c.line:e.linenum,lineend:f(c.lineend)?c.lineend:e.linenum,value:a,type:b||a})}function c(a,b){var c=g,e=b||{},d=f(e["char"])?e["char"]:c.chnum,e=f(e.line)?e.line:c.linenum;return{name:"ParseError",message:a+" at line "+(e+1)+ " char "+(d+1),walker:c,tokens:j}}function a(a){var c=g,e=c.ch,d=i(),j=a?a+e:e,e=c.nextChar();for(a&&(d["char"]-=a.length);m(e)||n(e);)j+=e,e=c.nextChar();b(j,"identifier",d)}function e(){var e=g.ch;if(e===" "||e==="\t"){for(var d=g.ch,j="",f=i();d===" "||d==="\t";)j+=d,d=g.nextChar();b(j,"white",f)}else{if(e==="/"){var d=g,e=f=d.ch,h,p=i();h=d.nextChar();if(h!=="*")p.charend=p["char"],p.lineend=p.line,j=b(e,e,p);else{for(;!(f==="*"&&h==="/");)e+=h,f=h,h=d.nextChar();e+=h;d.nextChar();b(e,"comment", p)}return j}if(e==='"'||e==="'"){d=g;e=f=j=d.ch;p=i();for(j=d.nextChar();j!==f;){if(j==="\n")if(h=d.nextChar(),h==="\\")e+=j+h;else throw c("Unterminated string",p);else e+=j==="\\"?j+d.nextChar():j;j=d.nextChar()}e+=j;d.nextChar();b(e,"string",p)}else if(e==="("){d=g;j=d.ch;f=0;e=j;h=i();for(j=d.nextChar();j!==")"&&!f;){if(j==="(")f++;else if(j===")")f--;else if(j===!1)throw c("Unterminated brace",h);e+=j;j=d.nextChar()}e+=j;d.nextChar();b(e,"brace",h)}else{if(e==="-"||e==="."||n(e)){j=g;f=j.ch; e=i();h=f;var p=h===".",v,f=j.nextChar();v=!n(f);if(p&&v)e.charend=e["char"],e.lineend=e.line,d=b(h,".",e);else if(h==="-"&&v)d=a("-");else{for(;f!==!1&&(n(f)||!p&&f===".");)f==="."&&(p=!0),h+=f,f=j.nextChar();b(h,"number",e)}return d}if(m(e))return a();if(l(e))return d=g,e=d.ch,j=i(),h=d.nextChar(),h==="="&&l(e,!0)?(e+=h,b(e,"match",j),d.nextChar(),f=void 0):(j.charend=j["char"]+1,j.lineend=j.line,b(e,e,j)),f;if(e==="\n")b("line"),g.nextChar();else throw c("Unrecognized character");}}}var g,j=[], l,m,n;g={lines:null,total_lines:0,linenum:-1,line:"",ch:"",chnum:-1,init:function(a){var b=g;b.lines=a.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n");b.total_lines=b.lines.length;b.chnum=-1;b.linenum=-1;b.ch="";b.line="";b.nextLine();b.nextChar()},nextLine:function(){this.linenum+=1;this.line=this.total_lines<=this.linenum?!1:this.lines[this.linenum];if(this.chnum!==-1)this.chnum=0;return this.line},nextChar:function(){for(this.chnum+=1;this.line.charAt(this.chnum)==="";){if(this.nextLine()=== !1)return this.ch=!1;this.chnum=-1;return this.ch="\n"}return this.ch=this.line.charAt(this.chnum)},peek:function(){return this.line.charAt(this.chnum+1)}};m=function(a){return a=="&"||a==="_"||a==="-"||a>="a"&&a<="z"||a>="A"&&a<="Z"};n=function(a){return a!==!1&&a>="0"&&a<="9"};l=function(){for(var a="{}[]()+*=.,;:>~|\\%$#@^!".split(""),b="*^|$~".split(""),c={},e={},g=0;g")):null:a.match("--")?g(b("comment","--\>")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),g(c(1))):null;else if(a.eat("?"))return a.eatWhile(/[\w\._\-]/),e.tokenize=b("meta","?>"),"meta";else{w=a.eat("/")?"closeTag":"openTag";a.eatSpace();for(v="";d=a.eat(/[^\s\u00a0=<>\"\'\/?]/);)v+=d;e.tokenize=f;return"tag"}else return d== "&"?(a.eat("#")?a.eat("x")?a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):a.eatWhile(/[\d]/)&&a.eat(";"):a.eatWhile(/[\w\.\-:]/)&&a.eat(";"))?"atom":"error":(a.eatWhile(/[^&<]/),"text")}function f(a,b){var c=a.next();return c==">"||c=="/"&&a.eat(">")?(b.tokenize=d,w=c==">"?"endTag":"selfcloseTag","tag"):c=="="?(w="equals",null):/[\'\"]/.test(c)?(b.tokenize=i(c),b.tokenize(a,b)):(a.eatWhile(/[^\s\u00a0=<>\"\'\/?]/),"word")}function i(a){return function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=f;break}return"string"}} function b(a,b){return function(c,e){for(;!c.eol();){if(c.match(b)){e.tokenize=d;break}c.next()}return a}}function c(a){return function(b,e){for(var g;(g=b.next())!=null;)if(g=="<")return e.tokenize=c(a+1),e.tokenize(b,e);else if(g==">")if(a==1){e.tokenize=d;break}else return e.tokenize=c(a-1),e.tokenize(b,e);return"meta"}}function a(){for(var a=arguments.length-1;a>=0;a--)k.cc.push(arguments[a])}function e(){a.apply(null,arguments);return!0}function g(){if(k.context)k.context=k.context.prev}function j(a){if(a== "openTag")return k.tagName=v,e(o,l(k.startOfLine));else if(a=="closeTag")return a=!1,k.context?k.context.tagName!=v&&(p.implicitlyClosed.hasOwnProperty(k.context.tagName.toLowerCase())&&g(),a=!k.context||k.context.tagName!=v):a=!0,a&&(t="error"),e(m(a));return e()}function l(a){return function(b){if(b=="selfcloseTag"||b=="endTag"&&p.autoSelfClosers.hasOwnProperty(k.tagName.toLowerCase()))return n(k.tagName.toLowerCase()),e();if(b=="endTag"){n(k.tagName.toLowerCase());var b=k.tagName,c=p.doNotIndent.hasOwnProperty(b)|| k.context&&k.context.noIndent;k.context={prev:k.context,tagName:b,indent:k.indented,startOfLine:a,noIndent:c}}return e()}}function m(a){return function(b){a&&(t="error");if(b=="endTag")return g(),e();t="error";return e(arguments.callee)}}function n(a){for(var b;;){if(!k.context)break;b=k.context.tagName.toLowerCase();if(!p.contextGrabbers.hasOwnProperty(b)||!p.contextGrabbers[b].hasOwnProperty(a))break;g()}}function o(b){if(b=="word")return t="attribute",e(q,o);if(b=="endTag"||b=="selfcloseTag")return a(); t="error";return e(o)}function q(b){if(b=="equals")return e(s,o);p.allowMissing||(t="error");return b=="endTag"||b=="selfcloseTag"?a():e()}function s(b){if(b=="string")return e(r);if(b=="word"&&p.allowUnquoted)return t="string",e();t="error";return b=="endTag"||b=="selfCloseTag"?a():e()}function r(b){return b=="string"?e(r):a()}function u(a,b){if(a.sol())b.startOfLine=!0,b.indented=0;if(a.eatSpace())return null;t=w=v=null;var c=b.tokenize(a,b);b.type=w;if((c||w)&&c!="comment")for(k=b;;)if((b.cc.pop()|| j)(w||c))break;b.startOfLine=!1;return t||c}var p={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!0,allowMissing:!0},v=null,w=null,k=null,t;return{parse:function(a,b){for(var b=b||0,c={tokenize:d,cc:[],indented:0,startOfLine:!0,tagName:null,context:null},e=h("stringStream").create(a),g=[];!e.eol();)g.push({type:u(e,c),start:e.start+b,end:e.pos+b}),e.start=e.pos;return g}}}); emmet.define("string-score",function(){return{score:function(h,d,f){if(h==d)return 1;if(d=="")return 0;for(var i=0,b=d.length,c=h.length,a,e=1,g=0,j,l,m,n;g-1?n:Math.max(j,l);if(l===-1)if(f){e+=1-f;continue}else return 0;else j=0.1;h[l]===m&&(j+=0.1);l===0?(j+=0.6,g===0&&(a=1)):h.charAt(l-1)===" "&&(j+=0.8);h=h.substring(l+1,c);i+=j}h=i/b;b=(h*(b/c)+h)/2;b/=e;a&&b+0.15<1&&(b+=0.15);return b}}}); emmet.define("utils",function(h,d){function f(b){this._data=[];this.length=0;b&&this.append(b)}var i="${0}";f.prototype={append:function(b){this._data.push(b);this.length+=b.length},toString:function(){return this._data.join("")},valueOf:function(){return this.toString()}};return{reTag:/<\/?[\w:\-]+(?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*\s*(\/?)>$/,endsWithTag:function(b){return this.reTag.test(b)},isNumeric:function(b){typeof b=="string"&&(b=b.charCodeAt(0));return b&&b>47&& b<58},trim:function(b){return(b||"").replace(/^\s+|\s+$/g,"")},getNewline:function(){var b=h("resources");if(!b)return"\n";b=b.getVariable("newline");return d.isString(b)?b:"\n"},setNewline:function(b){var c=h("resources");c.setVariable("newline",b);c.setVariable("nl",b)},splitByLines:function(b,c){var a=this.getNewline(),a=(b||"").replace(/\r\n/g,"\n").replace(/\n\r/g,"\n").replace(/\r/g,"\n").replace(/\n/g,a).split(a);c&&(a=d.filter(a,function(a){return a.length&&!!this.trim(a)},this));return a}, normalizeNewline:function(b){return this.splitByLines(b).join(this.getNewline())},repeatString:function(b,c){for(var a=[],e=0;ee++;)a+="0";return a+b},unindentString:function(b, c){for(var a=this.splitByLines(b),e=0;eb.length?b:b.substring(0,a)+c+b.substring(e)},narrowToNonSpace:function(b,c,a){c=h("range").create(c,a);for(a=/[\s\n\r\u00a0]/;c.start c.start;)if(c.end--,!a.test(b.charAt(c.end))){c.end++;break}return c},findNewlineBounds:function(b,c){for(var a=b.length,e=0,g=a-1,d=c-1;d>0;d--){var f=b.charAt(d);if(f=="\n"||f=="\r"){e=d+1;break}}for(d=c;d":return b>c;case "gte":case ">=":return b>=c}}function i(b,c){d.isObject(b)&&"start"in b?(this.start=Math.min(b.start,b.end),this.end=Math.max(b.start,b.end)):d.isArray(b)?(this.start=b[0],this.end=b[1]):(c=d.isString(c)?c.length:+c,this.start=b,this.end=b+c)}i.prototype={length:function(){return Math.abs(this.end-this.start)}, equal:function(b){return this.cmp(b,"eq","eq")},shift:function(b){this.start+=b;this.end+=b;return this},overlap:function(b){return b.start<=this.end&&b.end>=this.start},intersection:function(b){if(this.overlap(b)){var c=Math.max(b.start,this.start);return new i(c,Math.min(b.end,this.end)-c)}return null},union:function(b){if(this.overlap(b)){var c=Math.min(b.start,this.start);return new i(c,Math.max(b.end,this.end)-c)}return null},inside:function(b){return this.cmp(b,"lte","gt")},contains:function(b){return this.cmp(b, "lt","gt")},include:function(){return this.cmp(loc,"lte","gte")},cmp:function(b,c,a){var e;b instanceof i?(e=b.start,b=b.end):e=b;return f(this.start,e,c||"<=")&&f(this.end,b,a||">")},substring:function(b){return this.length()>0?b.substring(this.start,this.end):""},clone:function(){return new i(this.start,this.length())},toArray:function(){return[this.start,this.end]},toString:function(){return"{"+this.start+", "+this.length()+"}"}};return{create:function(b,c){if(d.isUndefined(b)||b===null)return null; if(b instanceof i)return b;if(d.isObject(b)&&"start"in b&&"end"in b)c=b.end-b.start,b=b.start;return new i(b,c)},create2:function(b,c){d.isNumber(b)&&d.isNumber(c)&&(c-=b);return this.create(b,c)}}}); emmet.define("handlerList",function(h,d){function f(){this._list=[]}f.prototype={add:function(f,b){this._list.push(d.extend({order:0},b||{},{fn:f}))},remove:function(f){this._list=d.without(this._list,d.find(this._list,function(b){return b.fn===f}))},list:function(){return d.sortBy(this._list,"order").reverse()},listFn:function(){return d.pluck(this.list(),"fn")},exec:function(f,b){var b=b||[],c=null;d.find(this.list(),function(a){c=a.fn.apply(a,b);if(c!==f)return!0});return c}};return{create:function(){return new f}}}); emmet.define("tokenIterator",function(h,d){function f(d){this.tokens=d;this._position=0;this.reset()}f.prototype={next:function(){if(this.hasNext()){var d=this.tokens[++this._i];this._position=d.start;return d}return null},current:function(){return this.tokens[this._i]},position:function(){return this._position},hasNext:function(){return this._i=this.string.length},sol:function(){return this.pos==0},peek:function(){return this.string.charAt(this.pos)},next:function(){if(this.posf},eatSpace:function(){for(var d=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>d},skipToEnd:function(){this.pos=this.string.length},skipTo:function(d){d=this.string.indexOf(d,this.pos);if(d>-1)return this.pos=d,!0},skipToPair:function(d,f){for(var h=0,b,c=this.pos,a=this.string.length;c/,c={},a={},e=h("handlerList").create();return{setVocabulary:function(b,e){i={};e== "system"?c=b:a=b},getVocabulary:function(b){return b=="system"?c:a},getMatchedResource:function(a,b){return e.exec(null,d.toArray(arguments))||this.findSnippet(b,a.name())},getVariable:function(a){return(this.getSection("variables")||{})[a]},setVariable:function(a,b){var c=this.getVocabulary("user")||{};if(!("variables"in c))c.variables={};c.variables[a]=b;this.setVocabulary(c,"user")},hasSyntax:function(a){return a in this.getVocabulary("user")||a in this.getVocabulary("system")},addResolver:function(a, b){e.add(a,b)},removeResolver:function(a){e.remove(a)},getSection:function(b){if(!b)return null;b in i||(i[b]=h("utils").deepMerge({},c[b],a[b]));for(var e=i[b],f=d.rest(arguments),m;e&&(m=f.shift());)if(m in e)e=e[m];else return null;return e},findItem:function(a,b){for(var c=this.getSection(a);c;){if(b in c)return c[b];c=this.getSection(c["extends"])}},findSnippet:function(a,b,c){if(!a||!b)return null;var c=c||[],e=[b];~b.indexOf("-")&&e.push(b.replace(/\-/g,":"));var h=this.getSection(a),i=null; d.find(["snippets","abbreviations"],function(b){var c=this.getSection(a,b);if(c)return d.find(e,function(a){if(c[a])return i=f(a,c[a],b)})},this);c.push(a);return!i&&h["extends"]&&!d.include(c,h["extends"])?this.findSnippet(h["extends"],b,c):i},fuzzyFindSnippet:function(a,b,c){var c=c||0.3,a=this.getAllSnippets(a),e=h("string-score"),b=b.replace(/:$/,"").replace(/:/g,"-"),f=d.map(a,function(a,c){return{key:c,score:e.score(a.nk,b,0.1)}});if((f=d.last(d.sortBy(f,"score")))&&f.score>=c)return a[f.key].parsedValue}, getAllSnippets:function(a){var b="all-"+a;if(!i[b]){var c=[],e=[];do{var h=this.getSection(a);if(!h)break;d.each(["snippets","abbreviations"],function(a){var b={};d.each(h[a]||null,function(c,e){b[e]={nk:e.replace(/:$/,"").replace(/:/g,"-"),value:c,parsedValue:f(e,c,a),type:a}});c.push(b)});e.push(a);a=h["extends"]}while(a&&!d.include(e,a));i[b]=d.extend.apply(d,c.reverse())}return i[b]}}}); emmet.define("actions",function(h,d){function f(b){return h("utils").trim(b.charAt(0).toUpperCase()+b.substring(1).replace(/_[a-z]/g,function(b){return" "+b.charAt(1).toUpperCase()}))}var i={};return{add:function(b,c,a){b=b.toLowerCase();a=a||{};if(!a.label)a.label=f(b);i[b]={name:b,fn:c,options:a}},get:function(b){return i[b.toLowerCase()]},run:function(b,c){d.isArray(c)||(c=d.rest(arguments));var a=this.get(b);return a?a.fn.apply(emmet,c):(emmet.log('Action "%s" is not defined',b),!1)},getAll:function(){return i}, getList:function(){return d.values(this.getAll())},getMenu:function(b){var c=[],b=b||[];d.each(this.getList(),function(a){if(!a.options.hidden&&!d.include(b,a.name)){var e=f(a.name),g=c;if(a.options.label)for(var j=a.options.label.split("/"),e=j.pop(),h,i;h=j.shift();)i=d.find(g,function(a){return a.type=="submenu"&&a.name==h}),i||(i={name:h,type:"submenu",items:[]},g.push(i)),g=i.items;g.push({type:"action",name:a.name,label:e})}});return c},getActionNameForMenuTitle:function(b,c){var a=null;d.find(c|| this.getMenu(),function(c){if(c.type=="action"){if(c.label==b||c.name==b)return a=c.name}else return a=this.getActionNameForMenuTitle(b,c.items)},this);return a||null}}}); emmet.define("profile",function(h,d){function f(a){d.extend(this,e,a)}function i(a,b){switch(String(b||"").toLowerCase()){case "lower":return a.toLowerCase();case "upper":return a.toUpperCase()}return a}function b(b,c){return a[b.toLowerCase()]=new f(c)}function c(){b("xhtml");b("html",{self_closing_tag:!1});b("xml",{self_closing_tag:!0,tag_nl:!0});b("plain",{tag_nl:!1,indent:!1,place_cursor:!1});b("line",{tag_nl:!1,indent:!1,extraFilters:"s"})}var a={},e={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:""};f.prototype={tagName:function(a){return i(a,this.tag_case)},attributeName:function(a){return i(a,this.attr_case)},attributeQuote:function(){return this.attr_quotes=="single"?"'":'"'},selfClosing:function(){return this.self_closing_tag=="xhtml"?" /":this.self_closing_tag===!0?"/":""},cursor:function(){return this.place_cursor?h("utils").getCaretPlaceholder():""}};c();return{create:function(a, c){return arguments.length==2?b(a,c):new f(d.defaults(a||{},e))},get:function(b,c){if(!b&&c){var e=h("resources").findItem(c,"profile");e&&(b=e)}return!b?a.plain:b instanceof f?b:d.isString(b)&&b.toLowerCase()in a?a[b.toLowerCase()]:this.create(b)},remove:function(b){b=(b||"").toLowerCase();b in a&&delete a[b]},reset:function(){a={};c()},stringCase:i}}); emmet.define("editorUtils",function(h){return{isInsideTag:function(d,f){for(var h=/^<\/?\w[\w\:\-]*.*?>/,b=f;b>-1;){if(d.charAt(b)=="<")break;b--}return b!=-1&&(h=h.exec(d.substring(b)))&&f>b&&f"&&e.endsWithTag(d.substring(0,f+1)))){i=f+1;break}}return i!=-1&&!a&&!c&&!b?d.substring(i).replace(/^[\*\+\>\^]+/,""):""},getImageSize:function(d){var f=function(){return d.charCodeAt(h++)};if(d.substr(0,8)==="\u0089PNG\r\n\u001a\n"){var h=d.indexOf("IHDR")+4;return{width:f()<<24|f()<<16|f()<<8|f(),height:f()<<24|f()<<16|f()<<8|f()}}else if(d.substr(0,4)==="GIF8")return h=6,{width:f()|f()<<8,height:f()|f()<<8};else if(d.substr(0,2)==="\u00ff\u00d8")for(var h=2,b=d.length;h< b;){if(f()!=255)break;var c=f();if(c==218)break;var a=f()<<8|f();if(c>=192&&c<=207&&!(c&4)&&!(c&8))return h+=1,{height:f()<<8|f(),width:f()<<8|f()};else h+=a-2}},captureContext:function(d){if(String(d.getSyntax())in{html:1,xml:1,xsl:1}){var f=String(d.getContent()),i=h("htmlMatcher").find(f,d.getCaretPos());if(i&&i.type=="tag"){for(var d=/([\w\-:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,i=i.open,f=i.range.substring(f).replace(/^<[\w\-\:]+/,""),i={name:i.name,attributes:[]}, b;b=d.exec(f);)i.attributes.push({name:b[1],value:b[2]});return i}}return null},findExpressionBounds:function(d,f){for(var i=String(d.getContent()),b=i.length,c=d.getCaretPos()-1,a=c+1;c>=0&&f(i.charAt(c),c,i);)c--;for(;ac)return h("range").create([++c,a])},compoundUpdate:function(d,f){if(f){var h=d.getSelectionRange();d.replaceContent(f.data,f.start,f.end,!0);d.createSelection(f.caret,f.caret+h.end-h.start);return!0}return!1},detectSyntax:function(d,f){var i=f||"html"; h("resources").hasSyntax(i)||(i="html");if(i=="html"&&(this.isStyle(d)||this.isInlineCSS(d)))i="css";return i},detectProfile:function(d){var f=d.getSyntax(),i=h("resources").findItem(f,"profile");if(i)return i;switch(f){case "xml":case "xsl":return"xml";case "css":if(this.isInlineCSS(d))return"line";break;case "html":return(i=h("resources").getVariable("profile"))||(i=this.isXHTML(d)?"xhtml":"html"),i}return"xhtml"},isXHTML:function(d){return d.getContent().search(/]+XHTML/i)!=-1},isStyle:function(d){var f= String(d.getContent()),d=d.getCaretPos();return(f=h("htmlMatcher").tag(f,d))&&f.open.name.toLowerCase()=="style"&&f.innerRange.cmp(d,"lte","gte")},isInlineCSS:function(d){var f=String(d.getContent()),d=d.getCaretPos();return(f=h("xmlEditTree").parseFromPosition(f,d,!0))?(f=f.itemFromPosition(d,!0))&&f.name().toLowerCase()=="style"&&f.valueRange(!0).cmp(d,"lte","gte"):!1}}}); emmet.define("abbreviationUtils",function(h,d){return{isSnippet:function(d){return h("elements").is(d.matchedResource(),"snippet")},isUnary:function(d){var i=d.matchedResource();return d.children.length||this.isSnippet(d)?!1:i&&i.is_empty||h("tagName").isEmptyElement(d.name())},isInline:function(d){return d.isTextNode()||!d.name()||h("tagName").isInlineLevel(d.name())},isBlock:function(d){return this.isSnippet(d)||!this.isInline(d)},isSnippet:function(d){return h("elements").is(d.matchedResource(), "snippet")},hasTagsInContent:function(d){return h("utils").matchesTag(d.content)},hasBlockChildren:function(h){return this.hasTagsInContent(h)&&this.isBlock(h)||d.any(h.children,function(d){return this.isBlock(d)},this)},insertChildContent:function(f,i,b){var b=d.extend({keepVariable:!0,appendIfNoChild:!0},b||{}),c=!1,a=h("utils"),f=a.replaceVariables(f,function(e,d,h){var l=e;d=="child"&&(l=a.padString(i,a.getLinePaddingFromPosition(f,h.start)),c=!0,b.keepVariable&&(l+=e));return l});!c&&b.appendIfNoChild&& (f+=i);return f}}}); emmet.define("base64",function(){return{encode:function(h){for(var d=[],f,i,b,c,a,e,g=0,j=h.length;g>2,f=(f&3)<<4|i>>4,i=(i&15)<<2|b>>6,b&=63,isNaN(a)?i=b=64:isNaN(e)&&(b=64),d.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(c)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(i)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(b)); return d.join("")},decode:function(h){var d,f,i,b,c,a=0,e=0,g=[],j=h.length;if(!h)return h;h+="";do d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(h.charAt(a++)),f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(h.charAt(a++)),b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(h.charAt(a++)),c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(h.charAt(a++)),i=d<<18|f<<12|b<<6|c,d=i>>16& 255,f=i>>8&255,i&=255,b==64?g[e++]=String.fromCharCode(d):c==64?g[e++]=String.fromCharCode(d,f):g[e++]=String.fromCharCode(d,f,i);while(a")){n=h+3;break}if(h=b.matches(n))if(h.type=="open"&&!h.selfClose)c.push(h.name);else if(h.type=="close"){if(!c.length)return h.name==a.name?h:null;if(d.last(c)==h.name)c.pop();else{for(var q=!1;c.length&&!q;)c.pop()==h.name&&(q=!0);if(!c.length&&!q)return h.name==a.name?h:null}}}}var c=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, a=/^<\/([\w\:\-]+)[^>]*>/;return{find:function(a,c){for(var j=h("range"),l=f(a),m=null,n=null,o=c;o>=0;o--)if(m=l.open(o)){if(m.selfClose&&m.range.cmp(c,"lt","gt"))break;if(n=b(m,l)){if(j.create2(m.range.start,n.range.end).contains(c))break}else if(m.range.contains(c))break;m=null}else if(i(a,o,"--\>"))for(var q=o-1;q>=0;q--)if(i(a,q,"--\>"))break;else{if(i(a,q,"<\!--")){o=q;break}}else if(i(a,o,"<\!--")){q=o+4;for(m=a.length;q")){q+=3;break}m={range:h("range").create(o,d.isNumber(q)? q-o:q[0]),type:"comment"};break}if(m)return q=o=null,n?(o=j.create2(m.range.start,n.range.end),q=j.create2(m.range.end,n.range.start)):o=q=j.create2(m.range.start,m.range.end),m.type=="comment"&&(j=o.substring(a),q.start+=j.length-j.replace(/^<\!--\s*/,"").length,q.end-=j.length-j.replace(/\s*--\>$/,"").length),{open:m,close:n,type:m.type=="comment"?"comment":"tag",innerRange:q,innerContent:function(){return this.innerRange.substring(a)},outerRange:o,outerContent:function(){return this.outerRange.substring(a)}, range:!q.length()||!q.cmp(c,"lte","gte")?o:q,content:function(){return this.range.substring(a)},source:a}},tag:function(a,b){var c=this.find(a,b);if(c&&c.type=="tag")return c}}}); emmet.define("tabStops",function(h,d){var f=100,i=0,b={replaceCarets:!1,escape:function(b){return"\\"+b},tabstop:function(b){return b.token},variable:function(b){return b.token}};h("abbreviationParser").addOutputProcessor(function(b,a){var e=0,d=h("tabStops"),f=h("utils"),l={tabstop:function(a){var b=parseInt(a.group);if(b==0)return"${0}";b>e&&(e=b);return a.placeholder?(b+=i,a=d.processText(a.placeholder,l),"${"+b+":"+a+"}"):"${"+(b+i)+"}"}},b=d.processText(b,l),b=f.replaceVariables(b,d.variablesResolver(a)); i+=e+1;return b});return{extract:function(c,a){var e=h("utils"),g={carets:""},f=[],a=d.extend({},b,a,{tabstop:function(a){var b=a.token,c="";if(a.placeholder=="cursor")f.push({start:a.start,end:a.start+b.length,group:"carets",value:""});else{if("placeholder"in a)g[a.group]=a.placeholder;a.group in g&&(c=g[a.group]);f.push({start:a.start,end:a.start+b.length,group:a.group,value:c})}return b}});a.replaceCarets&&(c=c.replace(RegExp(e.escapeForRegexp(e.getCaretPlaceholder()),"g"),"${0:cursor}"));var c= this.processText(c,a),i=e.stringBuilder(),m=0,e=d.map(f,function(a){i.append(c.substring(m,a.start));var b=i.length,e=g[a.group]||"";i.append(e);m=a.end;return{group:a.group,start:b,end:b+e.length}});i.append(c.substring(m));return{text:i.toString(),tabstops:d.sortBy(e,"start")}},processText:function(c,a){for(var a=d.extend({},b,a),e=h("utils").stringBuilder(),g=h("stringStream").create(c),f,i;f=g.next();)if(f=="\\"&&!g.eol())e.append(a.escape(g.next()));else{i=f;if(f=="$")if(g.start=g.pos-1,g.match(/^[0-9]+/))i= a.tabstop({start:e.length,group:g.current().substr(1),token:g.current()});else if(f=g.match(/^\{([a-z_\-][\w\-]*)\}/))i=a.variable({start:e.length,name:f[1],token:g.current()});else if(f=g.match(/^\{([0-9]+)(:.+?)?\}/,!1)){g.skipToPair("{","}");i={start:e.length,group:f[1],token:g.current()};if(f=i.token.substring(i.group.length+2,i.token.length-1))i.placeholder=f.substr(1);i=a.tabstop(i)}e.append(i)}return e.toString()},upgrade:function(b,a){var e=0,g={tabstop:function(b){var c=parseInt(b.group); c>e&&(e=c);return b.placeholder?"${"+(c+a)+":"+b.placeholder+"}":"${"+(c+a)+"}"}};d.each(["start","end","content"],function(a){b[a]=this.processText(b[a],g)},this);return e},variablesResolver:function(b){var a={},e=h("resources");return function(g,j){if(j=="child")return g;if(j=="cursor")return h("utils").getCaretPlaceholder();var i=b.attribute(j);if(!d.isUndefined(i))return i;if(i=e.getVariable(j))return i;a[j]||(a[j]=f++);return"${"+a[j]+":"+j+"}"}},resetPlaceholderCounter:function(){console.log("deprecated"); f=100},resetTabstopIndex:function(){i=0;f=100}}}); emmet.define("preferences",function(h,d){var f={},i={},b=null,c=null;return{define:function(a,b,c){var h=a;d.isString(a)&&(h={},h[a]={value:b,description:c});d.each(h,function(a,b){i[b]=d.isObject(a)&&"value"in a&&d.keys(a).length<3?a:{value:a}})},set:function(a,b){var c=a;d.isString(a)&&(c={},c[a]=b);d.each(c,function(a,b){if(!(b in i))throw'Property "'+b+'" is not defined. You should define it first with `define` method of current module';if(a!==i[b].value){switch(typeof i[b].value){case "boolean":var c= a;d.isString(c)?(c=c.toLowerCase(),a=c=="yes"||c=="true"||c=="1"):a=!!c;break;case "number":a=parseInt(a+"",10)||0;break;default:a+=""}f[b]=a}else b in f&&delete f[b]})},get:function(a){if(a in f)return f[a];if(a in i)return i[a].value},getArray:function(a){a=this.get(a);d.isUndefined(a)||(a=d.map(a.split(","),h("utils").trim),a.length||(a=null));return a},getDict:function(a){var b={};d.each(this.getArray(a),function(a){a=a.split(":");b[a[0]]=a[1]});return b},description:function(a){return a in i? i[a].description:void 0},remove:function(a){d.isArray(a)||(a=[a]);d.each(a,function(a){a in f&&delete f[a];a in i&&delete i[a]})},list:function(){return d.map(d.keys(i).sort(),function(a){return{name:a,value:this.get(a),type:typeof i[a].value,description:i[a].description}},this)},load:function(a){d.each(a,function(a,b){this.set(b,a)},this)},exportModified:function(){return d.clone(f)},reset:function(){f={}},_startTest:function(){b=i;c=f;i={};f={}},_stopTest:function(){i=b;f=c}}}); emmet.define("filters",function(h,d){function f(b){return!b?[]:d.isString(b)?b.split(/[\|,]/g):b}var i={};return{add:function(b,c){i[b]=c},apply:function(b,c,a){var e=h("utils"),a=h("profile").get(a);d.each(f(c),function(c){(c=e.trim(c.toLowerCase()))&&c in i&&(b=i[c](b,a))});return b},composeList:function(b,c,a){c=h("profile").get(c);b=f(c.filters||h("resources").findItem(b,"filters")||"html");c.extraFilters&&(b=b.concat(f(c.extraFilters)));a&&(b=b.concat(f(a)));if(!b||!b.length)b=f("html");return b}, extractFromAbbreviation:function(b){var c="",b=b.replace(/\|([\w\|\-]+)$/,function(a,b){c=b;return""});return[b,f(c)]}}}); emmet.define("elements",function(h,d){function f(a){return{data:a}}var i={},b=/([\w\-]+)\s*=\s*(['"])(.*?)\2/g,c={add:function(a,b){var c=this;i[a]=function(){var d=b.apply(c,arguments);if(d)d.type=a;return d}},get:function(a){return i[a]},create:function(a){var b=[].slice.call(arguments,1),c=this.get(a);return c?c.apply(this,b):null},is:function(a,b){return a&&a.type===b}};c.add("element",function(a,c,g){var h={name:a,is_empty:!!g};if(c)if(h.attributes=[],d.isArray(c))h.attributes=c;else if(d.isString(c))for(;a= b.exec(c);)h.attributes.push({name:a[1],value:a[3]});else d.each(c,function(a,b){h.attributes.push({name:b,value:a})});return h});c.add("snippet",f);c.add("reference",f);c.add("empty",function(){return{}});return c}); emmet.define("editTree",function(h,d,f){function i(a,b){this.options=d.extend({offset:0},b);this.source=a;this._children=[];this._positions={name:0};this.initialize.apply(this,arguments)}function b(a,b,c){this.parent=a;this._name=b.value;this._value=c?c.value:"";this._positions={name:b.start,value:c?c.start:-1};this.initialize.apply(this,arguments)}var c=h("range").create;i.extend=f.extend;i.prototype={initialize:function(){},_updateSource:function(a,b,g){var f=c(b,d.isUndefined(g)?0:g-b),i=a.length- f.length(),m=function(a){d.each(a,function(b,c){b>=f.end&&(a[c]+=i)})};m(this._positions);d.each(this.list(),function(a){m(a._positions)});this.source=h("utils").replaceSubstring(this.source,a,f)},add:function(a,c){var d=new b(a,c);this._children.push(d);return d},get:function(a){return d.isNumber(a)?this.list()[a]:d.isString(a)?d.find(this.list(),function(b){return b.name()===a}):a},getAll:function(a){d.isArray(a)||(a=[a]);var b=[],c=[];d.each(a,function(a){d.isString(a)?b.push(a):d.isNumber(a)&& c.push(a)});return d.filter(this.list(),function(a,h){return d.include(c,h)||d.include(b,a.name())})},value:function(a,b,c){var h=this.get(a);if(h)return h.value(b);if(!d.isUndefined(b))return this.add(a,b,c)},values:function(a){return d.map(this.getAll(a),function(a){return a.value()})},remove:function(a){if(a=this.get(a))this._updateSource("",a.fullRange()),this._children=d.without(this._children,a)},list:function(){return this._children},indexOf:function(a){return d.indexOf(this.list(),this.get(a))}, name:function(a){if(!d.isUndefined(a)&&this._name!==(a=String(a)))this._updateSource(a,this._positions.name,this._positions.name+this._name.length),this._name=a;return this._name},nameRange:function(a){return c(this._positions.name+(a?this.options.offset:0),this.name())},range:function(a){return c(a?this.options.offset:0,this.toString())},itemFromPosition:function(a,b){return d.find(this.list(),function(c){return c.range(b).inside(a)})},toString:function(){return this.source}};b.extend=f.extend;b.prototype= {initialize:function(){},_pos:function(a,b){return a+(b?this.parent.options.offset:0)},value:function(a){if(!d.isUndefined(a)&&this._value!==(a=String(a)))this.parent._updateSource(a,this.valueRange()),this._value=a;return this._value},name:function(a){if(!d.isUndefined(a)&&this._name!==(a=String(a)))this.parent._updateSource(a,this.nameRange()),this._name=a;return this._name},namePosition:function(a){return this._pos(this._positions.name,a)},valuePosition:function(a){return this._pos(this._positions.value, a)},range:function(a){return c(this.namePosition(a),this.toString())},fullRange:function(a){return this.range(a)},nameRange:function(a){return c(this.namePosition(a),this.name())},valueRange:function(a){return c(this.valuePosition(a),this.value())},toString:function(){return this.name()+this.value()},valueOf:function(){return this.toString()}};return{EditContainer:i,EditElement:b,createToken:function(a,b,c){a={start:a||0,value:b||"",type:c};a.end=a.start+a.value.length;return a}}}); emmet.define("cssEditTree",function(h,d){function f(a,b){return h("range").create(a,b)}function i(a,b){var b=b||e|g,c=["white","line"];if((b&g)==g)for(;a.length&&d.include(c,d.last(a).type);)a.pop();if((b&e)==e)for(;a.length&&d.include(c,a[0].type);)a.shift();return a}function b(a){var b=["white","line",":"],c=[],h,j;a.nextUntil(function(){return!d.include(b,this.itemNext().type)});for(j=a.current().end;h=a.next();){if(h.type=="}"||h.type==";")return i(c,e|(h.type=="}"?g:0)),c.length?(j=c[0].start, a=d.last(c).end):a=j,f(j,a-j);c.push(h)}if(c.length)return f(c[0].start,d.last(c).end-c[0].start)}function c(a){var b=h("stringStream").create(a),c=[],e=/[\s\u00a0,]/,g=function(){b.next();c.push(f(b.start,b.current()));b.start=b.pos};b.eatSpace();for(b.start=b.pos;a=b.next();)if(a=='"'||a=="'"){b.next();if(!b.skipTo(a))break;g()}else if(a=="("){b.backUp(1);if(!b.skipToPair("(",")"))break;b.backUp(1);g()}else if(e.test(a))c.push(f(b.start,b.current().length-1)),b.eatWhile(e),b.start=b.pos;g();return d.chain(c).filter(function(a){return!!a.length()}).uniq(!1, function(a){return a.toString()}).value()}var a={styleBefore:"\n\t",styleSeparator:": ",offset:0},e=1,g=2,j=h("editTree").EditContainer.extend({initialize:function(c){d.defaults(this.options,a);var e=h("editTree"),g=h("tokenIterator").create(h("cssParser").parse(c)),j,s=[],r;for(j=g.position();r=g.next();){if(r.type=="{")break;s.push(r)}i(s);s.length?(j=s[0].start,s=d.last(s).end):s=j;j=f(j,s-j);this._positions.name=j.start;this._name=j.substring(c);if(!g.current()||g.current().type!="{")throw"Invalid CSS rule"; for(this._positions.contentStart=g.position()+1;j=g.next();){if(s=j.type=="identifier")a:{s=g.tokens;r=g._i+1;for(var u=s.length;r1)e.styleBefore="\n"+d.last(g);e.styleSeparator=b.substring(e.nameRange().end,e.valuePosition());e.styleBefore=d.last(e.styleBefore.split("*/"));e.styleSeparator=e.styleSeparator.replace(/\/\*.*?\*\//g,"");a=e.range().end})},add:function(a,b,c){var e=this.list(),g=this._positions.contentStart,f=d.pick(this.options,"styleBefore", "styleSeparator"),j=h("editTree");if(d.isUndefined(c))c=e.length;var i=e[c];if(i)g=i.fullRange().start;else if(i=e[c-1])i.end(";"),g=i.range().end;i&&(f=d.pick(i,"styleBefore","styleSeparator"));a=j.createToken(g+f.styleBefore.length,a);b=j.createToken(a.end+f.styleSeparator.length,b);j=new l(this,a,b,j.createToken(b.end,";"));d.extend(j,f);this._updateSource(j.styleBefore+j.toString(),g);this._children.splice(c,0,j);return j}}),l=h("editTree").EditElement.extend({initialize:function(a,b,c,d){this.styleBefore= a.options.styleBefore;this.styleSeparator=a.options.styleSeparator;this._end=d.value;this._positions.end=d.start},valueParts:function(a){var b=c(this.value());if(a){var e=this.valuePosition(!0);d.each(b,function(a){a.shift(e)})}return b},end:function(a){if(!d.isUndefined(a)&&this._end!==a)this.parent._updateSource(a,this._positions.end,this._positions.end+this._end.length),this._end=a;return this._end},fullRange:function(a){a=this.range(a);a.start-=this.styleBefore.length;return a},toString:function(){return this.name()+ this.styleSeparator+this.value()+this.end()}});return{parse:function(a,b){return new j(a,b)},parseFromPosition:function(a,b,c){c=this.extractRule(a,b,c);return!c||!c.inside(b)?null:this.parse(c.substring(a),{offset:c.start})},extractRule:function(a,b,c){for(var d="",e=a.length,g=-1,f;b>=0;){f=a.charAt(b);if(f=="{"){g=b;break}else if(f=="}"&&!c){b++;break}b--}for(;b=0;){f=a.charAt(b);if("{}/\\<>\n\r".indexOf(f)!= -1)break;b--}c=a.substring(b+1,g).replace(/^[\s\n\r]+/m,"");return h("range").create(g-c.length,d.length+c.length)}return null},baseName:function(a){return a.replace(/^\s*\-\w+\-/,"")},findParts:c}}); emmet.define("xmlEditTree",function(h,d){var f={styleBefore:" ",styleSeparator:"=",styleQuote:'"',offset:0},i=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/m,b=h("editTree").EditContainer.extend({initialize:function(a){d.defaults(this.options,f);this._positions.name=1;var b=null,g=h("xmlParser").parse(a),j=h("range");d.each(g,function(d){d.value=j.create(d).substring(a);switch(d.type){case "tag":if(/^<[^\/]+/.test(d.value))this._name=d.value.substring(1); break;case "attribute":b&&this._children.push(new c(this,b));b=d;break;case "string":this._children.push(new c(this,b,d)),b=null}},this);b&&this._children.push(new c(this,b));this._saveStyle()},_saveStyle:function(){var a=this.nameRange().end,b=this.source;d.each(this.list(),function(c){c.styleBefore=b.substring(a,c.namePosition());if(c.valuePosition()!==-1)c.styleSeparator=b.substring(c.namePosition()+c.name().length,c.valuePosition()-c.styleQuote.length);a=c.range().end})},add:function(a,b,g){var f= this.list(),i=this.nameRange().end,m=h("editTree"),n=d.pick(this.options,"styleBefore","styleSeparator","styleQuote");if(d.isUndefined(g))g=f.length;var o=f[g];if(o)i=o.fullRange().start;else if(o=f[g-1])i=o.range().end;o&&(n=d.pick(o,"styleBefore","styleSeparator","styleQuote"));b=n.styleQuote+b+n.styleQuote;a=new c(this,m.createToken(i+n.styleBefore.length,a),m.createToken(i+n.styleBefore.length+a.length+n.styleSeparator.length,b));d.extend(a,n);this._updateSource(a.styleBefore+a.toString(),i); this._children.splice(g,0,a);return a}}),c=h("editTree").EditElement.extend({initialize:function(a,b,c){this.styleBefore=a.options.styleBefore;this.styleSeparator=a.options.styleSeparator;b="";a=a.options.styleQuote;if(c)b=c.value,a=b.charAt(0),a=='"'||a=="'"?b=b.substring(1):a="",a&&b.charAt(b.length-1)==a&&(b=b.substring(0,b.length-1));this.styleQuote=a;this._value=b;this._positions.value=c?c.start+a.length:-1},fullRange:function(a){a=this.range(a);a.start-=this.styleBefore.length;return a},toString:function(){return this.name()+ this.styleSeparator+this.styleQuote+this.value()+this.styleQuote}});return{parse:function(a,c){return new b(a,c)},parseFromPosition:function(a,b,c){c=this.extractTag(a,b,c);return!c||!c.inside(b)?null:this.parse(c.substring(a),{offset:c.start})},extractTag:function(a,b,c){var d=a.length,f,m=h("range"),n=Math.min(2E3,d),o=null,q=function(b){var c;if(a.charAt(b)=="<"&&(c=a.substr(b,n).match(i)))return m.create(b,c[0])};for(f=b;f>=0;f--)if(o=q(f))break;if(o&&(o.inside(b)||c))return o;if(!o&&c)return null; for(f=b;f=a++;)if(b.substr(a,g.length)==g){i=a+g.length;break}}return f!=-1&&i!=-1?h("range").create(f,i-f):null}function b(b,a,d,g){function f(b){return b.replace(RegExp("^"+q.escapeForRegexp(a)+"\\s*"), function(a){n-=a.length;return""}).replace(RegExp("\\s*"+q.escapeForRegexp(d)+"$"),"")}var l=h("editorUtils"),m=l.outputInfo(b).content,n=b.getCaretPos(),o=null,q=h("utils");(o=i(m,n,a,d))&&o.overlap(g)?(g=o,o=f(g.substring(m))):(o=a+" "+g.substring(m).replace(RegExp(q.escapeForRegexp(a)+"\\s*|\\s*"+q.escapeForRegexp(d),"g"),"")+" "+d,n+=a.length+1);return o!==null?(o=q.escapeText(o),b.setCaretPos(g.start),b.replaceContent(l.unindent(b,o),g.start,g.end),b.setCaretPos(n),!0):!1}h("actions").add("toggle_comment", function(c){var a=h("editorUtils").outputInfo(c);if(a.syntax=="css"){var d=c.getCaretPos(),g=h("htmlMatcher").tag(a.content,d);if(g&&g.open.range.inside(d))a.syntax="html"}if(a.syntax=="css"){g=h("range").create(c.getSelectionRange());a=h("editorUtils").outputInfo(c);if(!g.length()&&(d=h("cssEditTree").parseFromPosition(a.content,c.getCaretPos())))g=(g=f(d,c.getCaretPos()))?g.range(!0):h("range").create(d.nameRange(!0).start,d.source);g.length()||(g=h("range").create(c.getCurrentLineRange()),h("utils").narrowToNonSpace(a.content, g));c=b(c,"/*","*/",g)}else{a=h("range").create(c.getSelectionRange());d=h("editorUtils").outputInfo(c);if(!a.length()&&(d=h("htmlMatcher").tag(d.content,c.getCaretPos())))a=d.outerRange;c=b(c,"<\!--","--\>",a)}return c})}); emmet.exec(function(h){function d(d,h,b){function c(b){for(var c=b;c>=0;){var d=a.charAt(c);if(d=="\n"||d=="\r")break;c--}return a.substring(c,b)}for(var h=h||1,b=d.getCaretPos()+(b||0),a=String(d.getContent()),d=a.length,e=-1,g=/^\s+$/;b<=d&&b>=0;){b+=h;var j=a.charAt(b),l=a.charAt(b+1),m=a.charAt(b-1);switch(j){case '"':case "'":l==j&&m=="="&&(e=b+1);break;case ">":l=="<"&&(e=b+1);break;case "\n":case "\r":g.test(c(b-1))&&(e=b)}if(e!=-1)break}return e}h=h("actions");h.add("prev_edit_point",function(f){var h= f.getCaretPos(),b=d(f,-1);b==h&&(b=d(f,-1,-2));return b!=-1?(f.setCaretPos(b),!0):!1},{label:"Previous Edit Point"});h.add("next_edit_point",function(f){var h=d(f,1);return h!=-1?(f.setCaretPos(h),!0):!1})}); emmet.exec(function(h,d){function f(a,b,c,d){var e=h("range"),g=h("editorUtils").outputInfo(a).content,f=g.length,j,i=e.create(-1,0),l=e.create(a.getSelectionRange());j=l.start;for(var o=1E5;j>=0&&j0;){if(e=c(g,j,b)){if(i.equal(e))break;i=e.clone();if(j=d(e.substring(g),e.start,l.clone()))return a.createSelection(j.start,j.end),!0;else j=b?e.start:e.end-1}j+=b?-1:1}return!1}function i(a){var b=!0;return f(a,!1,function(a,c){if(b){b=!1;var d;a:{d=c;for(var e;d>=0;){if(e=g(a,d)){d=e;break a}d--}d= null}return d}else return g(a,c)},function(a,b,c){return e(a,b,c,!1)})}function b(a){return f(a,!0,g,function(a,b,c){return e(a,b,c,!0)})}function c(b,c,e){var e=e||0,g=h("range"),f=[],i=-1,l="",z="",x,o;d.each(c,function(c){switch(c.type){case "tag":o=b.substring(c.start,c.end);/^<[\w\:\-]/.test(o)&&f.push(g.create({start:c.start+1,end:c.end}));break;case "attribute":i=c.start;l=b.substring(c.start,c.end);break;case "string":f.push(g.create(i,c.end-i)),x=g.create(c),z=x.substring(b),j(z.charAt(0))&& x.start++,j(z.charAt(z.length-1))&&x.end--,f.push(x),l=="class"&&(f=f.concat(a(x.substring(b),x.start)))}});d.each(f,function(a){a.shift(e)});return d.chain(f).filter(function(a){return!!a.length()}).uniq(!1,function(a){return a.toString()}).value()}function a(a,b){var b=b||0,c=[],d=h("stringStream").create(a),e=h("range");d.eatSpace();d.start=d.pos;for(var g;g=d.next();)if(/[\s\u00a0]/.test(g))c.push(e.create(d.start+b,d.pos-d.start-1)),d.eatSpace(),d.start=d.pos;c.push(e.create(d.start+b,d.pos- d.start));return c}function e(a,b,e,g){a=c(a,h("xmlParser").parse(a),b);g&&a.reverse();return(b=d.find(a,function(a){return a.equal(e)}))?(g=d.indexOf(a,b),g1)?g[1]:d.find(a,function(a){return a.end>e.end})}function g(a,b){var c;if(a.charAt(b)=="<"&&(c=a.substring(b,a.length).match(q)))return h("range").create(b,c[0])}function j(a){return a=='"'||a=="'"}function l(a){var b= a.valueRange(!0),c=[a.range(!0),b],e=h("stringStream"),g=h("cssEditTree"),f=h("range"),j=a.value();d.each(a.valueParts(),function(a){var h=a.clone();c.push(h.shift(b.start));var i=e.create(a.substring(j));if(i.match(/^[\w\-]+\(/,!0)){i.start=i.pos;i.skipToPair("(",")");var l=i.current();c.push(f.create(h.start+i.start,l));d.each(g.findParts(l),function(a){c.push(f.create(h.start+i.start+a.start,a.substring(l)))})}});return d.chain(c).filter(function(a){return!!a.length()}).uniq(!1,function(a){return a.toString()}).value()} function m(a,b,c){var e=null,g=null,f=a.list(),h,j;c?(f.reverse(),h=function(a){return a.range(!0).start<=b.start},j=function(a){return a.start=b.end},j=function(a){return a.end>b.start});for(;e=d.find(f,h);){a=l(e);c&&a.reverse();if(g=d.find(a,function(a){return a.equal(b)})){if(g=d.indexOf(a,g),g!=a.length-1){g=a[g+1];break}}else{g=d.filter(a,function(a){return a.inside(b.end)});if(g.length>1){g=g[1];break}if(g=d.find(a,j))break}g=null;b.start=b.end= c?e.range(!0).start-1:e.range(!0).end+1}return g}function n(a,b,c){a=h("cssEditTree").parse(a,{offset:b});b=a.nameRange(!0);return c.endb.start)?b:a}var q=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,s=h("actions");s.add("select_next_item",function(a){return a.getSyntax()=="css"?f(a,!1,h("cssEditTree").extractRule,n):i(a)});s.add("select_previous_item", function(a){return a.getSyntax()=="css"?f(a,!0,h("cssEditTree").extractRule,o):b(a)})}); emmet.exec(function(h){function d(c,a){var a=String((a||"out").toLowerCase()),d=h("editorUtils").outputInfo(c),g=h("range").create(c.getSelectionRange()),d=d.content;b&&!b.range.equal(g)&&(b=null);if(b&&g.length())if(a=="in")if(b.type=="tag"&&!b.close)return!1;else if(b.range.equal(b.outerRange))b.range=b.innerRange;else{var f=h("utils").narrowToNonSpace(d,b.innerRange);if((b=i.find(d,f.start+1))&&b.range.equal(g)&&b.outerRange.equal(g))b.range=b.innerRange}else if(!b.innerRange.equal(b.outerRange)&& b.range.equal(b.innerRange)&&g.equal(b.range))b.range=b.outerRange;else{if((b=i.find(d,g.start))&&b.range.equal(g)&&b.innerRange.equal(g))b.range=b.outerRange}else b=i.find(d,g.start);if(b&&!b.range.equal(g))return c.createSelection(b.range.start,b.range.end),!0;b=null;return!1}var f=h("actions"),i=h("htmlMatcher"),b=null;f.add("match_pair",d,{hidden:!0});f.add("match_pair_inward",function(b){return d(b,"in")},{label:"HTML/Match Pair Tag (inward)"});f.add("match_pair_outward",function(b){return d(b, "out")},{label:"HTML/Match Pair Tag (outward)"});f.add("matching_pair",function(b){var a=String(b.getContent()),d=b.getCaretPos();a.charAt(d)=="<"&&d++;return(a=i.tag(a,d))&&a.close?(a.open.range.inside(d)?b.setCaretPos(a.close.range.start):b.setCaretPos(a.open.range.start),!0):!1},{label:"HTML/Go To Matching Tag Pair"})}); emmet.exec(function(h){h("actions").add("remove_tag",function(d){var f=h("utils"),i=h("editorUtils").outputInfo(d),b=h("htmlMatcher").tag(i.content,d.getCaretPos());if(b){if(b.close){var c=f.narrowToNonSpace(i.content,b.innerRange),a=f.findNewlineBounds(i.content,c.start),a=f.getLinePadding(a.substring(i.content)),i=c.substring(i.content),i=f.unindentString(i,a);d.replaceContent(f.getCaretPlaceholder()+f.escapeText(i),b.outerRange.start,b.outerRange.end)}else d.replaceContent(f.getCaretPlaceholder(), b.range.start,b.range.end);return!0}return!1},{label:"HTML/Remove Tag"})}); emmet.exec(function(h){h("actions").add("split_join_tag",function(d,f){var i=h("htmlMatcher"),b=h("editorUtils").outputInfo(d,null,f),c=h("profile").get(b.profile);if(i=i.tag(b.content,d.getCaretPos())){if(i.close){var b=h("utils"),c=c.selfClosing()||" /",c=i.open.range.substring(i.source).replace(/\s*>$/,c+">"),a=d.getCaretPos();c.length+i.outerRange.start$/,">"),a=i.outerRange.start+e.length;e+=c+"";e=b.escapeText(e);d.replaceContent(e,i.outerRange.start,i.outerRange.end)}d.setCaretPos(a);i=!0}else i=!1;return i},{label:"HTML/Split\\Join Tag Declaration"})}); emmet.define("reflectCSSValue",function(h,d){function f(c){var a=h("cssEditTree"),d=h("editorUtils").outputInfo(c),c=c.getCaretPos();if(a=a.parseFromPosition(d.content,c))if(d=a.itemFromPosition(c,!0)){var g=a.source,f=a.options.offset,c=c-f-d.range().start;b.exec(!1,[d]);if(g!==a.source)return{data:a.source,start:f,end:f+g.length,caret:f+d.range().start+c}}}function i(b){var b=h("cssEditTree").baseName(b),a;if(b=="opacity"||b=="filter")return/^(?:\-\w+\-)?(?:opacity|filter)$/;else if(a=b.match(/^border-radius-(top|bottom)(left|right)/))return RegExp("^(?:\\-\\w+\\-)?(?:"+ b+"|border-"+a[1]+"-"+a[2]+"-radius)$");else if(a=b.match(/^border-(top|bottom)-(left|right)-radius/))return RegExp("^(?:\\-\\w+\\-)?(?:"+b+"|border-radius-"+a[1]+a[2]+")$");return RegExp("^(?:\\-\\w+\\-)?"+b+"$")}var b=h("handlerList").create();h("actions").add("reflect_css_value",function(b){return b.getSyntax()!="css"?!1:h("actionUtils").compoundUpdate(b,f(b))},{label:"CSS/Reflect Value"});b.add(function(b){var a=i(b.name());d.each(b.parent.list(),function(d){if(a.test(d.name())){var g;var f=b.name(), i=b.value(),m=d.name();g=d.value();var n=h("cssEditTree"),o=h("utils"),f=n.baseName(f),m=n.baseName(m);g=f=="opacity"&&m=="filter"?g.replace(/opacity=[^)]*/i,"opacity="+Math.floor(parseFloat(i)*100)):f=="filter"&&m=="opacity"?(f=i.match(/opacity=([^)]*)/i))?o.prettifyNumber(parseInt(f[1])/100):g:i;d.value(g)}})},{order:-1});return{addHandler:function(c,a){b.add(c,a)},removeHandler:function(c){b.remove(c,options)}}}); emmet.exec(function(h){h("actions").add("evaluate_math_expression",function(d){var f=h("actionUtils"),i=h("utils"),b=String(d.getContent()),c=h("range").create(d.getSelectionRange());c.length()||(c=f.findExpressionBounds(d,function(a){return i.isNumeric(a)||".+-*/\\".indexOf(a)!=-1}));if(c&&c.length()){f=c.substring(b);f=f.replace(/([\d\.\-]+)\\([\d\.\-]+)/g,"Math.round($1/$2)");try{var a=i.prettifyNumber((new Function("return "+f))());d.replaceContent(a,c.start,c.end);d.setCaretPos(c.start+a.length); return!0}catch(e){}}return!1},{label:"Numbers/Evaluate Math Expression"})}); emmet.exec(function(h,d){function f(b,a){var e=h("utils"),g=!1,f=!1,l=h("actionUtils").findExpressionBounds(b,function(a,b,c){return e.isNumeric(a)?!0:a=="."?!e.isNumeric(c.charAt(b+1))?!1:f?!1:f=!0:a=="-"?g?!1:g=!0:!1});if(l&&l.length()){var m=l.substring(String(b.getContent())),n=parseFloat(m);if(!d.isNaN(n)){n=e.prettifyNumber(n+a);if(/^(\-?)0+[1-9]/.test(m)){var o="";RegExp.$1&&(o="-",n=n.substring(1));n=n.split(".");n[0]=e.zeroPadString(n[0],i(m));n=o+n.join(".")}b.replaceContent(n,l.start,l.end); b.createSelection(l.start,l.start+n.length);return!0}}return!1}function i(b){b=b.replace(/^\-/,"");return~b.indexOf(".")?b.split(".")[0].length:b.length}var b=h("actions");d.each([1,-1,10,-10,0.1,-0.1],function(c){var a=c>0?"increment":"decrement";b.add(a+"_number_by_"+String(Math.abs(c)).replace(".","").substring(0,2),function(a){return f(a,c)},{label:"Numbers/"+a.charAt(0).toUpperCase()+a.substring(1)+" number by "+Math.abs(c)})})}); emmet.exec(function(h,d){var f=h("actions"),i=h("preferences");i.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\u2019s value will be automatically inserted before closing brace when user adds newline in newly created CSS rule (e.g. when \u201cInsert formatted linebreak\u201d action will be performed in CSS file). If you\u2019re such user, you may want to write put a value like \\n\\t in this preference."); f.add("insert_formatted_line_break_only",function(b){var c=h("utils"),a=h("resources"),e=h("editorUtils").outputInfo(b),g=b.getCaretPos(),f=c.getNewline();if(d.include(["html","xml","xsl"],e.syntax)){if(a=a.getVariable("indentation"),(e=h("htmlMatcher").tag(e.content,g))&&!e.innerRange.length())return b.replaceContent(f+a+c.getCaretPlaceholder()+f,g),!0}else if(e.syntax=="css"&&(e=e.content,g&&e.charAt(g-1)=="{")){var l=i.get("css.closeBraceIndentation"),a=a.getVariable("indentation"),m=e.charAt(g)== "}";if(!m)for(var n=g,o=e.length,q;na.length?b.replaceContent(c+l,g,g,!0):b.replaceContent(c,g)}return!0},{hidden:!0})}); emmet.exec(function(h){h("actions").add("merge_lines",function(d){var f=h("htmlMatcher"),i=h("utils"),b=h("editorUtils").outputInfo(d),c=h("range").create(d.getSelectionRange());if(!c.length()&&(f=f.find(b.content,d.getCaretPos())))c=f.outerRange;if(c.length()){b=c.substring(b.content);b=i.splitByLines(b);for(f=1;f=0;)if(d("src=",c,b)){if(c=c.substr(b).match(/^(src=(["'])?)([^'"<>\s]+)\1?/))i=c[3],b+=c[1].length;break}else if(d("url(",c,b)){if(c=c.substr(b).match(/^(url\((['"])?)([^'"\)\s]+)\1?/))i=c[3],b+=c[1].length;break}if(i)if(d("data:",i))if(c=String(f.prompt("Enter path to file (absolute or relative)"))){var a= h("file"),e=a.createPath(f.getFilePath(),c);if(!e)throw"Can't save file";a.save(e,h("base64").decode(i.replace(/^data\:.+?;.+?,/,"")));f.replaceContent("$0"+c,b,b+i.length);f=!0}else f=!1;else{c=h("file");a=h("actionUtils");e=f.getFilePath();if(e===null)throw"You should save your file before using this action";e=c.locateFile(e,i);if(e===null)throw"Can't find "+i+" file";var g=h("base64").encode(String(c.read(e)));if(!g)throw"Can't encode file content to base64";g="data:"+(a.mimeTypes[String(c.getExt(e))]|| "application/octet-stream")+";base64,"+g;f.replaceContent("$0"+g,b,b+i.length);f=!0}else f=!1;return f},{label:"Encode\\Decode data:URL image"})}); emmet.exec(function(h,d){function f(d,b){var c;if(b){if(/^data:/.test(b))c=h("base64").decode(b.replace(/^data\:.+?;.+?,/,""));else{c=h("file");var a=c.locateFile(d.getFilePath(),b);if(a===null)throw"Can't find "+b+" file";c=String(c.read(a))}return h("actionUtils").getImageSize(c)}}h("actions").add("update_image_size",function(i){var b;if(String(i.getSyntax())=="css")a:{b=i.getCaretPos();var c=h("editorUtils").outputInfo(i);if(c=h("cssEditTree").parseFromPosition(c.content,b,!0)){var a=c.itemFromPosition(b, !0),e;if(a&&(e=/url\((["']?)(.+?)\1\)/i.exec(a.value()||"")))if(e=f(i,e[2])){a=c.range(!0);c.value("width",e.width+"px");c.value("height",e.height+"px",c.indexOf("width")+1);b=d.extend(a,{data:c.toString(),caret:b});break a}}b=null}else a:{b=i.getCaretPos();c=h("editorUtils").outputInfo(i);if((c=h("xmlEditTree").parseFromPosition(c.content,b,!0))&&(c.name()||"").toLowerCase()=="img")if(e=f(i,c.value("src"))){a=c.range(!0);c.value("width",e.width);c.value("height",e.height,c.indexOf("width")+1);b= d.extend(a,{data:c.toString(),caret:b});break a}b=null}return h("actionUtils").compoundUpdate(i,b)})}); emmet.define("cssResolver",function(h,d){function f(a){var b=a&&a.charCodeAt(0);return a&&a=="."||b>47&&b<58}function i(a){a=h("utils").trim(a);if(~a.indexOf("/*")||/[\n\r]/.test(a))return!1;if(!/^[a-z0-9\-]+\s*\:/i.test(a))return!1;a=h("tabStops").processText(a,{replaceCarets:!0,tabstop:function(){return"value"}});return a.split(":").length==2}function b(a){a.charAt(0);if(a.charAt(0)=="#"){var b=a.replace(/^#+/,"")||"0",d=h("utils").repeatString,a=null;switch(b.length){case 1:a=d(b,6);break;case 2:a= d(b,3);break;case 3:a=b.charAt(0)+b.charAt(0)+b.charAt(1)+b.charAt(1)+b.charAt(2)+b.charAt(2);break;case 4:a=b+b.substr(0,2);break;case 5:a=b+b.charAt(0);break;default:a=b.substr(0,6)}p.get("css.color.short")&&(b=a.split(""),b[0]==b[1]&&b[2]==b[3]&&b[4]==b[5]&&(a=b[0]+b[2]+b[4]));switch(p.get("css.color.case")){case "upper":a=a.toUpperCase();break;case "lower":a=a.toLowerCase()}a="#"+a}else a=c(a);return a}function c(a){var b=p.getDict("css.keywordAliases");return a in b?b[a]:a}function a(a){return d.include(p.getArray("css.keywords"), c(a))}function e(a){var b=h("utils"),a=b.trim(a);if(a.indexOf(":")==-1)return{name:a,value:u};a=a.split(":");return{name:b.trim(a.shift()),value:b.trim(a.join(":")).replace(/^(\$\{0\}|\$0)(\s*;?)$/,"${1}$2")}}function g(a,b){var c=r[b];c||(c=d.find(r,function(a){return a.prefix==b}));return c&&c.supports(a)}function j(a,b){var c=[];d.each(r,function(b,d){g(a,d)&&c.push(d)});!c.length&&!b&&d.each(r,function(a,b){a.obsolete||c.push(b)});return c}function l(a,b){d.isString(b)&&(b={prefix:b});r[a]=d.extend({}, s,b)}function m(a,b){if(b){var c=p.get(b+"."+a);if(!d.isUndefined(c))return c}return p.get("css."+a)}function n(a,b,c){if(!d.isString(a))a=a.data;if(!i(a))return a;b&&(~a.indexOf(";")?a=a.split(";").join(" !important;"):a+=" !important");b=a.indexOf(":");a=a.substring(0,b).replace(/\s+$/,"")+m("valueSeparator",c)+h("utils").trim(a.substring(b+1));return a.replace(/\s*;\s*$/,m("propertyEnd",c))}function o(a){var b=p.getArray(a);d.each(p.getArray(a+"Addon"),function(a){a.charAt(0)=="-"?b=d.without(b, a.substr(1)):(a.charAt(0)=="+"&&(a=a.substr(1)),b.push(a))});return b}var q=null,s={prefix:"emmet",obsolete:!1,transformName:function(a){return"-"+this.prefix+"-"+a},properties:function(){return o("css."+this.prefix+"Properties")||[]},supports:function(a){return d.include(this.properties(),a)}},r={},u="${1};",p=h("preferences");p.define("css.valueSeparator",": ","Defines a symbol that should be placed between CSS property and value when expanding CSS abbreviations.");p.define("css.propertyEnd",";", "Defines a symbol that should be placed at the end of CSS property when expanding CSS abbreviations.");p.define("stylus.valueSeparator"," ","Defines a symbol that should be placed between CSS property and value when expanding CSS abbreviations in Stylus dialect.");p.define("stylus.propertyEnd","","Defines a symbol that should be placed at the end of CSS property when expanding CSS abbreviations in Stylus dialect.");p.define("sass.propertyEnd","","Defines a symbol that should be placed at the end of CSS property when expanding CSS abbreviations in SASS dialect."); p.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. -bxsh). With this option enabled, you don\u2019t need dashes before abbreviations: Emmet will produce vendor-prefixed properties for you.");var v=d.template("A comma-separated list of CSS properties that may have <%= vendor %> vendor prefix. This list is used to generate a list of prefixed properties when expanding -property abbreviations. Empty list means that all possible CSS values may have <%= vendor %> prefix."), w=d.template("A comma-separated list of additional CSS properties for css.<%= vendor %>Preperties 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.
For example, to add foo property and remove border-radius one, the preference value will look like this: foo, -border-radius.");d.each({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"}, function(a,b){p.define("css."+b+"Properties",a,v({vendor:b}));p.define("css."+b+"PropertiesAddon","",w({vendor:b}))});p.define("css.unitlessProperties","z-index, line-height, opacity, font-weight, zoom","The list of properties whose values \u200b\u200bmust not contain units.");p.define("css.intUnit","px","Default unit for integer values");p.define("css.floatUnit","em","Default unit for float values");p.define("css.keywords","auto, inherit","A comma-separated list of valid keywords that can be used in CSS abbreviations."); p.define("css.keywordAliases","a:auto, i:inherit, s:solid, da:dashed, do:dotted","A comma-separated list of keyword aliases, used in CSS abbreviation. Each alias should be defined as alias:keyword_name.");p.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 alias:unit_value.");p.define("css.color.short",!0,"Should color values like #ffffff be shortened to #fff after abbreviation with color was expanded."); p.define("css.color.case","keep","Letter case of color values generated by abbreviations with color (like c#0). Possible values are upper, lower and keep.");p.define("css.fuzzySearch",!0,"Enable fuzzy search among CSS snippet names. When enabled, every unknown 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: ov:h == ov-h == o-h == oh"); p.define("css.fuzzySearchMinScore",0.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.");l("w",{prefix:"webkit"});l("m",{prefix:"moz"});l("s",{prefix:"ms"});l("o",{prefix:"o"});var k=["css","less","sass","scss","stylus"];h("resources").addResolver(function(a,b){return d.include(k,b)&&a.isElement()?q.expandToSnippet(a.abbreviation,b):null});var t=h("expandAbbreviation");t.addHandler(function(a, b,c){if(!d.include(k,b))return!1;var e=a.getSelectionRange().end,g=t.findAbbreviation(a);return g&&(b=emmet.expandAbbreviation(g,b,c))?(g=e-g.length,c=e,a.getContent().charAt(e)==";"&&b.charAt(b.length-1)==";"&&c++,a.replaceContent(b,g,c),!0):!1});return q={addPrefix:l,supportsPrefix:g,prefixed:function(a,b){return g(a,b)?"-"+b+"-"+a:a},listPrefixes:function(){return d.map(r,function(a){return a.prefix})},getPrefix:function(a){return r[a]},removePrefix:function(a){a in r&&delete r[a]},extractPrefixes:function(a){if(a.charAt(0)!= "-")return{property:a,prefixes:null};for(var b=1,c=a.length,d,e=[];bbackground-color property with gradient first color as fallback for old browsers."); h("expandAbbreviation").addHandler(function(a,b,c){var e=h("editorUtils").outputInfo(a,b,c);if(!d.include(s,e.syntax))return!1;var c=a.getCaretPos(),g=e.content,e=n(g,c);if(e.property){var f=l(e.property);if(f){var b=e.rule.options.offset||0,i=b+e.rule.toString().length;if(/[\n\r]/.test(e.property.value())){var o=e.property.valueRange(!0).start+f.valueRange.end,g=h("utils").replaceSubstring(g,";",o),c=n(g,c);c.property&&(f=l(c.property),e=c)}e.property.end(";");j(e.property,f.gradient,f.valueRange); a.replaceContent(e.rule.toString(),b,i,!0);return!0}}return m(a,b)});h("reflectCSSValue").addHandler(function(a){var b=h("utils"),c=l(a);if(!c)return!1;var g=a.value(),f=function(a){return b.replaceSubstring(g,a,c.valueRange)};d.each(a.parent.getAll(e(a.name())),function(b){if(b!==a){var d=b.value().match(/^\s*(\-([a-z]+)\-)?linear\-gradient/);d?b.value(f(q.toString(c.gradient,d[2]||""))):b.value().match(/\s*\-webkit\-gradient/)&&b.value(f(q.oldWebkitLinearGradient(c.gradient)))}});return!0});return q= {parse:function(a){var b=null;h("utils").trim(a).replace(/^([\w\-]+)\((.+?)\)$/,function(a,c,e){c=c.toLowerCase().replace(/^\-[a-z]+\-/,"");if(c=="linear-gradient"||c=="lg"){for(var a=o[0],e=h("stringStream").create(h("utils").trim(e)),c=[],g;g=e.next();)e.peek()==","?(c.push(e.current()),e.next(),e.eatSpace(),e.start=e.pos):g=="("&&e.skipTo(")");c.push(e.current());c=d.compact(d.map(c,f));if(c.length){if(r.test(c[0])||u.test(c[0]))a=c.shift();b={type:"linear",direction:a,colorStops:d.map(c,i)}}else b= null;return""}return a});return b},oldWebkitLinearGradient:function(c){d.isString(c)&&(c=this.parse(c));if(!c)return null;var e=d.map(c.colorStops,d.clone);d.each(e,function(a){if("position"in a)if(~a.position.indexOf(".")||a.unit=="%")a.position=parseFloat(a.position)/(a.unit=="%"?100:1);else throw"Can't convert color stop '"+(a.position+(a.unit||""))+"'";});b(e);e=d.map(e,function(a,b){return!a.position&&!b?"from("+a.color+")":a.position==1&&b==e.length-1?"to("+a.color+")":"color-stop("+a.position.toFixed(2).replace(/\.?0+$/, "")+", "+a.color+")"});return"-webkit-gradient(linear, "+a(c.direction)+", "+e.join(", ")+")"},toString:function(a,b){if(a.type=="linear"){var c=(b?"-"+b+"-":"")+"linear-gradient",e=d.map(a.colorStops,function(a){return a.color+("position"in a?" "+a.position+(a.unit||""):"")});a.direction&&(!p.get("css.gradient.omitDefaultDirection")||!d.include(o,a.direction))&&e.unshift(a.direction);return c+"("+e.join(", ")+")"}}}}); emmet.exec(function(h,d){var f=h("handlerList").create(),i=h("resources");d.extend(i,{addGenerator:function(b,c,a){d.isString(b)&&(b=RegExp(b));f.add(function(a,d){var f;return(f=b.exec(a.name()))?c(f,a,d):null},a)}});i.addResolver(function(b,c){return f.exec(null,d.toArray(arguments))})}); emmet.define("tagName",function(h,d){var f={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(",")}, i={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(b){b=(b||"").toLowerCase();return b in i?this.getMapping(b):this.isInlineLevel(b)?"span":"div"},getMapping:function(b){return i[b.toLowerCase()]},isInlineLevel:function(b){return this.isTypeOf(b,"inlineLevel")},isBlockLevel:function(b){return this.isTypeOf(b,"blockLevel")},isEmptyElement:function(b){return this.isTypeOf(b, "empty")},isTypeOf:function(b,c){return d.include(f[c],b)},addMapping:function(b,c){i[b]=c},removeMapping:function(b){b in i&&delete i[b]},addElementToCollection:function(b,c){f[c]||(f[c]=[]);var a=this.getCollection(c);d.include(a,b)||a.push(b)},removeElementFromCollection:function(b,c){c in f&&(f[c]=d.without(this.getCollection(c),b))},getCollection:function(b){return f[b]}}}); emmet.exec(function(h,d){function f(){return{element:e.get("bem.elementSeparator"),modifier:e.get("bem.modifierSeparator")}}function i(a){if(h("abbreviationUtils").isSnippet(a))return a;a.__bem={block:"",element:"",modifier:""};var e=b(a.attribute("class")).split(" "),g=/^[a-z]\-/i;a.__bem.block=d.find(e,function(a){return g.test(a)});if(!a.__bem.block)g=/^[a-z]/i,a.__bem.block=d.find(e,function(a){return g.test(a)})||"";(e=d.chain(e).map(function(b){var d;d=c(b,a,"element");d=c(d,a,"modifier");var e= "",g="",h="",b=f();~d.indexOf(b.element)?(e=d.split(b.element),h=e[1].split(b.modifier),e=e[0],g=h.shift(),h=h.join(b.modifier)):~d.indexOf(b.modifier)&&(h=d.split(b.modifier),e=h.shift(),h=h.join(b.modifier));if(e||g||h){if(!e)e=a.__bem.block;d=e;var i=[];g&&(d+=b.element+g);i.push(d);h&&i.push(d+b.modifier+h);a.__bem.block=e;a.__bem.element=g;a.__bem.modifier=h;b=i}else b=d;return b}).flatten().uniq().value().join(" "))&&a.attribute("class",e);return a}function b(a){var b=h("utils"),a=(" "+(a|| "")+" ").replace(/\s+/g," "),c=e.get("bem.shortElementPrefix");c&&(c=RegExp("\\s("+b.escapeForRegexp(c)+"+)","g"),a=a.replace(c,function(a,c){return" "+b.repeatString(f().element,c.length)}));return b.trim(a)}function c(a,b,c){var d=f(),e=RegExp("^("+d[c]+")+","g");if(e.test(a)){for(var g=0,e=a.replace(e,function(a){g=a.length/d[c].length;return""}),h=b;h.parent&&g--;)h=h.parent;if(!h||!h.__bem)h=b;if(h&&h.__bem)return a=h.__bem.block,c=="modifier"&&h.__bem.element&&(a+=d.element+h.__bem.element), a+d[c]+e}return a}function a(b,c){b.name&&i(b,c);var e=h("abbreviationUtils");d.each(b.children,function(b){a(b,c);!e.isSnippet(b)&&b.start&&(g=!0)});return b}var e=h("preferences");e.define("bem.elementSeparator","__","Class name\u2019s element separator.");e.define("bem.modifierSeparator","_","Class name\u2019s modifier separator.");e.define("bem.shortElementPrefix","-","Symbol for describing short \u201cblock-element\u201d notation. Class names prefixed with this symbol will be treated as element name for parent\u2018s block name. Each symbol instance traverses one level up in parsed tree for block name lookup. Empty value will disable short notation."); var g=!1;h("filters").add("bem",function(b,c){g=!1;b=a(b,c);g&&(b=h("filters").apply(b,"html",c));return b})}); emmet.exec(function(h,d){function f(c,a,e){var g=h("utils"),f=b.get("filter.commentTrigger");if(f=="*"||d.find(f.split(","),function(a){return!!c.attribute(g.trim(a))}))f={node:c,name:c.name(),padding:c.parent?c.parent.padding:"",attr:function(a,b,d){return(a=c.attribute(a))?(b||"")+a+(d||""):""}},a=g.normalizeNewline(a?a(f):""),e=g.normalizeNewline(e?e(f):""),c.start=c.start.replace(//,">"+e)}function i(b,a,e){var g=h("abbreviationUtils");d.each(b.children,function(b){g.isBlock(b)&& f(b,a,e);i(b,a,e)});return b}var b=h("preferences");b.define("filter.commentAfter",'\n<\!-- /<%= attr("id", "#") %><%= attr("class", ".") %> --\>',"A definition of comment that should be placed after matched element when comment filter is applied. This definition is an ERB-style template passed to _.template() function (see Underscore.js docs for details). In template context, the following properties and functions are availabe:\n
  • attr(name, before, after) \u2013 a function that outputsspecified attribute value concatenated with before and after strings. If attribute doesn't exists, the empty string will be returned.
  • node \u2013 current node (instance of AbbreviationNode)
  • name \u2013 name of current tag
  • padding \u2013 current string padding, can be used for formatting
"); b.define("filter.commentBefore","","A definition of comment that should be placed before matched element when comment filter is applied. For more info, read description of filter.commentAfter property");b.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 *");h("filters").add("c",function(c){var a= d.template(b.get("filter.commentBefore")),e=d.template(b.get("filter.commentAfter"));return i(c,a,e)})});emmet.exec(function(h,d){function f(b){return b.replace(/([<>&])/g,function(b,a){return i[a]})}var i={"<":"<",">":">","&":"&"};h("filters").add("e",function c(a){d.each(a.children,function(a){a.start=f(a.start);a.end=f(a.end);a.content=f(a.content);c(a)});return a})}); emmet.exec(function(h,d){function f(){return h("resources").getVariable("indentation")}function i(a){return a.parent&&!a.parent.parent&&!a.index()}function b(a,b){var d=h("abbreviationUtils");return b.tag_nl===!0||d.isBlock(a)?!0:!a.parent||!b.inline_break?!1:c(a.parent,b)}function c(a,b){var c=0,f=h("abbreviationUtils");return!!d.find(a.children,function(a){a.isTextNode()||!f.isInline(a)?c=0:f.isInline(a)&&c++;if(c>=b.inline_break)return!0})}function a(a,b){var f=h("abbreviationUtils");return!d.any(a.children, function(a){return f.isSnippet(a)?!1:!f.isInline(a)})?c(a,b):!0}h("filters").add("_format",function g(c,l,m){var m=m||0,n=h("abbreviationUtils");d.each(c.children,function(c){if(n.isSnippet(c)){if(c.start=c.end="",!i(c)&&l.tag_nl!==!1&&b(c,l)&&!h("abbreviationUtils").isInline(c.parent))c.start=h("utils").getNewline()+c.start}else{c.start=c.end="%s";var d=h("utils"),j=h("abbreviationUtils"),r=j.isUnary(c),d=d.getNewline();if(l.tag_nl!==!1){var u=l.tag_nl===!0&&(l.tag_nl_leaf||c.children.length);if(!c.isTextNode()){if(b(c, l)){if(!i(c)&&(!j.isSnippet(c.parent)||c.index()))c.start=d+c.start;if(j.hasBlockChildren(c)||c.children.length&&b(c.children[0],l)||u&&!r)c.end=d+c.end;if(j.hasTagsInContent(c)||u&&!c.children.length&&!r)c.start+=d+f()}else if(j.isInline(c)&&c.parent&&h("abbreviationUtils").hasBlockChildren(c.parent)&&!i(c))c.start=d+c.start;else if(j.isInline(c)&&a(c,l))c.end=d+c.end;c.padding=f()}}}g(c,l,m+1)});return c})}); emmet.exec(function(h,d){function f(f,b){var c="",a=[],e=b.attributeQuote(),g=b.cursor();d.each(f.attributeList(),function(d){var f=b.attributeName(d.name);switch(f.toLowerCase()){case "id":c+="#"+(d.value||g);break;case "class":c+="."+h("utils").trim(d.value||g).replace(/\s+/g,".");break;default:a.push(":"+f+" => "+e+(d.value||g)+e)}});a.length&&(c+="{"+a.join(", ")+"}");return c}h("filters").add("haml",function b(c,a,e){var e=e||0,g=h("abbreviationUtils");e||(c=h("filters").apply(c,"_format",a)); d.each(c.children,function(c){if(!g.isSnippet(c)&&c.parent){var d=h("abbreviationUtils"),m=h("utils"),n=f(c,a),o=a.cursor(),d=d.isUnary(c),q=a.self_closing_tag&&d?"/":"",s="",s="%"+a.tagName(c.name());s.toLowerCase()=="%div"&&n&&n.indexOf("{")==-1&&(s="");c.end="";c.start=m.replaceSubstring(c.start,s+n+q+" ",c.start.indexOf("%s"),"%s");!c.children.length&&!d&&(c.start+=o)}b(c,a,e+1)});return c})}); emmet.exec(function(h,d){function f(f,b){var c=b.attributeQuote(),a=b.cursor();return d.map(f.attributeList(),function(d){return" "+b.attributeName(d.name)+"="+c+(d.value||a)+c}).join("")}h("filters").add("html",function b(c,a,e){var e=e||0,g=h("abbreviationUtils");e||(c=h("filters").apply(c,"_format",a));d.each(c.children,function(c){if(!g.isSnippet(c)&&c.parent){var d=h("abbreviationUtils"),m=h("utils"),n=f(c,a),o=a.cursor(),d=d.isUnary(c),q="",s="";if(!c.isTextNode()){var r=a.tagName(c.name()); d?(q="<"+r+n+a.selfClosing()+">",c.end=""):(q="<"+r+n+">",s="")}c.start=m.replaceSubstring(c.start,q,c.start.indexOf("%s"),"%s");c.end=m.replaceSubstring(c.end,s,c.end.indexOf("%s"),"%s");!c.children.length&&!d&&c.content.indexOf(o)==-1&&(c.start+=o)}b(c,a,e+1)});return c})}); emmet.exec(function(h,d){var f=/^\s+/,i=/[\n\r]/g;h("filters").add("s",function c(a){var e=h("abbreviationUtils");d.each(a.children,function(a){if(!e.isSnippet(a))a.start=a.start.replace(f,""),a.end=a.end.replace(f,"");a.start=a.start.replace(i,"");a.end=a.end.replace(i,"");a.content=a.content.replace(i,"");c(a)});return a})}); emmet.exec(function(h,d){function f(h,b){d.each(h.children,function(c){if(c.content)c.content=c.content.replace(b,"");f(c,b)});return h}h("preferences").define("filter.trimRegexp","[\\s|\\u00a0]*[\\d|#|\\-|*|\\u2022]+\\.?\\s*","Regular expression used to remove list markers (numbers, dashes, bullets, etc.) in t (trim) filter. The trim filter is useful for wrapping with abbreviation lists, pased from other documents (for example, Word documents).");h("filters").add("t",function(d){var b= RegExp(h("preferences").get("filter.trimRegexp"));return f(d,b)})});emmet.exec(function(h,d){var f={"xsl:variable":1,"xsl:with-param":1};h("filters").add("xsl",function b(c){var a=h("abbreviationUtils");d.each(c.children,function(c){if(!a.isSnippet(c)&&(c.name()||"").toLowerCase()in f&&c.children.length)c.start=c.start.replace(/\s+select\s*=\s*(['"]).*?\1/,"");b(c)});return c})}); emmet.exec(function(h,d){function f(a,b){return Math.round(Math.random()*(b-a)+a)}function i(a,b){for(var c=a.length,e=Math.min(c,b),h=[];h.length3&&b<=6?f(0,1):b>6&&b<=12?f(0,2):f(1,4);d.each(i(d.range(c)),function(b){a[b]+= ","})}h("abbreviationParser").addPreprocessor(function(d){var h=/^(?:lorem|lipsum)(\d*)$/i,l;d.findAll(function(d){if(d._name&&(l=d._name.match(h))){var g=l[1]||30;d._name="";d.data("forceNameResolving",d.isRepeating()||d.attributeList().length);d.data("pasteOverwrites",!0);d.data("paste",function(d){var h=g,j=!d,d=[],l=0,h=parseInt(h,10);j&&(j=a.slice(0,h),j.length>5&&(j[4]+=","),l+=j.length,d.push(b(j,".")));for(;l","cc:ie6":"<\!--[if lte IE 6]>\n\t${child}|\n","cc:ie":"<\!--[if IE]>\n\t${child}|\n","cc:noie":"<\!--[if !IE]><\!--\>\n\t${child}|\n<\!--","html:4t":'\n\n\n\t\n\t${1:Document}\n\n\n\t${child}${2}\n\n', "html:4s":'\n\n\n\t\n\t${1:Document}\n\n\n\t${child}${2}\n\n',"html:xt":'\n\n\n\t\n\t\n\n\n\t${child}${2}\n\n', "html:xs":'\n\n\n\t\n\t${1:Document}\n\n\n\t${child}${2}\n\n',"html:xxs":'\n\n\n\t\n\t${1:Document}\n\n\n\t${child}${2}\n\n', "html:5":'\n\n\n\t\n\t${1:Document}\n\n\n\t${child}${2}\n\n'},abbreviations:{"!":"html:5",a:'',"a:link":'',"a:mail":'',abbr:'',acronym:'',base:'',bdo:'',"bdo:r":'',"bdo:l":'',link:'',"link:css":'', "link:print":'',"link:favicon":'',"link:touch":'',"link:rss":'',"link:atom":'',"meta:utf":'', "meta:win":'',"meta:compat":'',style:"