/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/******************************************************************************* 
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation 
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * Copyright (c) 2012 VMware, Inc.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     Andrew Eisenberg - rename to jsTemplateContentAssist.js
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation 

 Copyright (c) 2011, 2012 IBM Corporation and others.
 Copyright (c) 2012 VMware, Inc.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation
 Andrew Eisenberg - rename to jsTemplateContentAssist.js

 Copyright (c) 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation
*/
(function(){var b=this;if(!b.define)b.define=function(h){b.orion=b.orion||{};b.orion.PluginProvider=h();b.eclipse=b.orion;delete b.define}})();
define("orion/plugin",[],function(){return function(b){function h(a){j&&(typeof ArrayBuffer==="undefined"&&(a=JSON.stringify(a)),j===self?j.postMessage(a):j.postMessage(a,"*"))}function c(a,c){if(c&&c instanceof XMLHttpRequest){var d,g;try{d=c.status,g=c.statusText}catch(e){d=0,g=""}return{status:d||0,statusText:g}}return c}function g(a){var d=a?JSON.parse(JSON.stringify(a,c)):a;if(a instanceof Error)d.__isError=!0,d.message=d.message||a.message,d.name=d.name||a.name;return d}function a(a){return function(c){e&&
h({serviceId:a,method:"dispatchEvent",params:[c]})}}function f(c){if(c.source===j){var e=typeof c.data!=="string"?c.data:JSON.parse(c.data);if(typeof e.cancel==="string"){var i=k[e.id];i&&(delete k[e.id],i.cancel&&i.cancel(e.cancel))}else{var c=e.serviceId,f=e.method,b=e.params,o=d[c],s=o.implementation,t=s[f];f==="addEventListener"?(f=b[0],o.listeners[f]=o.listeners[f]||a(c),b=[f,o.listeners[f]]):f==="removeEventListener"&&(f=b[0],b=[f,o.listeners[f]],delete o.listeners[f]);var l={id:e.id,result:null,
error:null};try{(i=t.apply(s,b))&&typeof i.then==="function"?(k[e.id]=i,i.then(function(a){delete k[e.id];l.result=a;h(l)},function(a){if(k[e.id])delete k[e.id],l.error=g(a),h(l)},function(){h({requestId:e.id,method:"progress",params:Array.prototype.slice.call(arguments)})})):(l.result=i,h(l))}catch(u){l.error=g(u),h(l)}}}}var i=b,d=[],e=!1,k={},j=null;this.updateHeaders=function(a){if(e)throw Error("Cannot update headers. Plugin Provider is connected");i=a};this.registerServiceProvider=this.registerService=
function(a,c,g){if(e)throw Error("Cannot register service. Plugin Provider is connected");typeof a==="string"?a=[a]:Array.isArray(a)||(a=[]);var f=null,i=[];for(f in c)typeof c[f]==="function"&&i.push(f);d[d.length]={names:a,methods:i,implementation:c,properties:g||{},listeners:{}}};this.connect=function(a,c){if(!e){if(typeof window==="undefined")j=self;else if(window!==window.parent)j=window.parent;else if(window.opener!==null)j=window.opener;else{c&&c("No valid plugin target");return}addEventListener("message",
f,!1);for(var g=[],b=0;b<d.length;b++)g.push({serviceId:b,names:d[b].names,methods:d[b].methods,properties:d[b].properties});h({method:"plugin",params:[{headers:i||{},services:g}]});e=!0}a&&a()};this.disconnect=function(){e&&(removeEventListener("message",f),j=null,e=!1)}}});
define("orion/editor/templates",[],function(){function b(c,g,a){this.prefix=c;this.description=g;this.template=a;this._parse()}function h(c,g){this._keywords=c||[];this._templates=[];this.addTemplates(g||[])}b.prototype={getProposal:function(c,g,a){var c=g-c.length,g={},f,i=a.delimiter!==void 0?a.delimiter:"\n";a.indentation&&(i+=a.indentation);for(var d=a.tab!==void 0?a.tab:"\t",e=0,b=this.variables,j=this.segments,a=[],p=0;p<j.length;p++){var h=j[p],m=b[h];if(m!==void 0)switch(h){case "${tab}":h=
d;break;case "${delimiter}":h=i;break;case "${cursor}":h="";f=e;break;default:var n=g[h];n||(n=g[h]={data:m.data,positions:[]});h=m.substitution;n.data&&n.data.values&&(h=n.data.values[0]);n.positions.push({offset:c+e,length:h.length})}a.push(h);e+=h.length}var i=[],r;for(r in g)g.hasOwnProperty(r)&&i.push(g[r]);a=a.join("");if(f===void 0)f=a.length;return{proposal:a,description:this.description,groups:i,escapePosition:c+f}},match:function(c){return this.prefix.indexOf(c)===0},_parse:function(){var c=
this.template,g=[],a={},f,i=0,c=c.replace(/\n/g,"${delimiter}"),c=c.replace(/\t/g,"${tab}");c.replace(/\$\{((?:[^\\}]+|\\.))*\}/g,function(d,e,b){var j=d.substring(2,d.length-1),e=d,h=j,q=null,m=h.indexOf(":");m!==-1&&(h=h.substring(0,m),e="${"+h+"}",q=JSON.parse(j.substring(m+1).replace("\\}","}").trim()));(j=a[e])||(j=a[e]={});j.substitution=h;if(q)j.data=q;(f=c.substring(i,b))&&g.push(f);g.push(e);i=b+d.length;return h});(f=c.substring(i,c.length))&&g.push(f);this.segments=g;this.variables=a}};
h.prototype={addTemplates:function(c){for(var g=this.getTemplates(),a=0;a<c.length;a++)g.push(new b(c[a].prefix,c[a].description,c[a].template))},computeProposals:function(c,g,a){var f=this.getPrefix(c,g,a),b=[];if(!this.isValid(f,c,g,a))return b;b=b.concat(this.getTemplateProposals(f,g,a));return b=b.concat(this.getKeywordProposals(f))},getKeywords:function(){return this._keywords},getKeywordProposals:function(c){var b=[],a=this.getKeywords();if(a)for(var f=0;f<a.length;f++)a[f].indexOf(c)===0&&
b.push({proposal:a[f].substring(c.length),description:a[f]});return b},getPrefix:function(c,b,a){return a.prefix},getTemplates:function(){return this._templates},getTemplateProposals:function(c,b,a){for(var f=[],i=this.getTemplates(),d=0;d<i.length;d++){var e=i[d];e.match(c)&&(e=e.getProposal(c,b,a),this.removePrefix(c,e),f.push(e))}return f},removePrefix:function(c,b){if(!(b.overwrite=b.proposal.substring(0,c.length)!==c))b.proposal=b.proposal.substring(c.length)},isValid:function(){return!0}};return{Template:b,
TemplateContentAssist:h}});
define("orion/editor/keywords",[],function(){return{JSKeywords:"break,case,class,catch,continue,const,debugger,default,delete,do,else,enum,export,extends,false,finally,for,function,if,implements,import,in,instanceof,interface,let,new,null,package,private,protected,public,return,static,super,switch,this,throw,true,try,typeof,undefined,var,void,while,with,yield".split(","),CSSKeywords:"alignment-adjust,alignment-baseline,animation,animation-delay,animation-direction,animation-duration,animation-iteration-count,animation-name,animation-play-state,animation-timing-function,appearance,azimuth,backface-visibility,background,background-attachment,background-clip,background-color,background-image,background-origin,background-position,background-repeat,background-size,baseline-shift,binding,bleed,bookmark-label,bookmark-level,bookmark-state,bookmark-target,border,border-bottom,border-bottom-color,border-bottom-left-radius,border-bottom-right-radius,border-bottom-style,border-bottom-width,border-collapse,border-color,border-image,border-image-outset,border-image-repeat,border-image-slice,border-image-source,border-image-width,border-left,border-left-color,border-left-style,border-left-width,border-radius,border-right,border-right-color,border-right-style,border-right-width,border-spacing,border-style,border-top,border-top-color,border-top-left-radius,border-top-right-radius,border-top-style,border-top-width,border-width,bottom,box-align,box-decoration-break,box-direction,box-flex,box-flex-group,box-lines,box-ordinal-group,box-orient,box-pack,box-shadow,box-sizing,break-after,break-before,break-inside,caption-side,clear,clip,color,color-profile,column-count,column-fill,column-gap,column-rule,column-rule-color,column-rule-style,column-rule-width,column-span,column-width,columns,content,counter-increment,counter-reset,crop,cue,cue-after,cue-before,cursor,direction,display,dominant-baseline,drop-initial-after-adjust,drop-initial-after-align,drop-initial-before-adjust,drop-initial-before-align,drop-initial-size,drop-initial-value,elevation,empty-cells,fit,fit-position,flex-align,flex-flow,flex-inline-pack,flex-order,flex-pack,float,float-offset,font,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,grid-columns,grid-rows,hanging-punctuation,height,hyphenate-after,hyphenate-before,hyphenate-character,hyphenate-lines,hyphenate-resource,hyphens,icon,image-orientation,image-rendering,image-resolution,inline-box-align,left,letter-spacing,line-height,line-stacking,line-stacking-ruby,line-stacking-shift,line-stacking-strategy,list-style,list-style-image,list-style-position,list-style-type,margin,margin-bottom,margin-left,margin-right,margin-top,mark,mark-after,mark-before,marker-offset,marks,marquee-direction,marquee-loop,marquee-play-count,marquee-speed,marquee-style,max-height,max-width,min-height,min-width,move-to,nav-down,nav-index,nav-left,nav-right,nav-up,opacity,orphans,outline,outline-color,outline-offset,outline-style,outline-width,overflow,overflow-style,overflow-x,overflow-y,padding,padding-bottom,padding-left,padding-right,padding-top,page,page-break-after,page-break-before,page-break-inside,page-policy,pause,pause-after,pause-before,perspective,perspective-origin,phonemes,pitch,pitch-range,play-during,position,presentation-level,punctuation-trim,quotes,rendering-intent,resize,rest,rest-after,rest-before,richness,right,rotation,rotation-point,ruby-align,ruby-overhang,ruby-position,ruby-span,size,speak,speak-header,speak-numeral,speak-punctuation,speech-rate,stress,string-set,table-layout,target,target-name,target-new,target-position,text-align,text-align-last,text-decoration,text-emphasis,text-height,text-indent,text-justify,text-outline,text-shadow,text-transform,text-wrap,top,transform,transform-origin,transform-style,transition,transition-delay,transition-duration,transition-property,transition-timing-function,unicode-bidi,vertical-align,visibility,voice-balance,voice-duration,voice-family,voice-pitch,voice-pitch-range,voice-rate,voice-stress,voice-volume,volume,white-space,white-space-collapse,widows,width,word-break,word-spacing,word-wrap,z-index".split(","),JAVAKeywords:"abstract,boolean,break,byte,case,catch,char,class,continue,default,do,double,else,extends,false,final,finally,float,for,if,implements,import,instanceof,int,interface,long,native,new,null,package,private,protected,public,return,short,static,super,switch,synchronized,this,throw,throws,transient,true,try,void,volatile,while".split(",")}});
define("orion/editor/cssContentAssist",["orion/editor/templates","orion/editor/keywords"],function(b,h){function c(a){return JSON.stringify(a).replace("}","\\}")}function g(){}for(var a={type:"link",values:"visible,hidden,scroll,auto,no-display,no-content".split(",")},f={type:"link",values:"solid,dashed,dotted,double,groove,ridge,inset,outset".split(",")},i={type:"link",values:[]},d=0;d<10;d++)i.values.push(d.toString());for(var e={type:"link",values:"black,white,red,green,blue,magenta,yellow,cyan,grey,darkred,darkgreen,darkblue,darkmagenta,darkcyan,darkyellow,darkgray,lightgray".split(",")},
k=[{prefix:"rule",description:"rule - class selector rule",template:".${class} {\n\t${cursor}\n}"},{prefix:"rule",description:"rule - id selector rule",template:"#${id} {\n\t${cursor}\n}"},{prefix:"outline",description:"outline - outline style",template:"outline: ${color:"+c(e)+"} ${style:"+c(f)+"} ${width:"+c(i)+"}px;"},{prefix:"background-image",description:"background-image - image style",template:'background-image: url("${uri}");'},{prefix:"url",description:"url - url image",template:'url("${uri}");'},
{prefix:"rgb",description:"rgb - rgb color",template:"rgb(${red},${green},${blue});"},{prefix:"@",description:"import - import style sheet",template:'@import "${uri}";'}],j=[{prop:"display",values:{type:"link",values:"none,block,box,flex,inline,inline-block,inline-flex,inline-table,list-item,table,table-caption,table-cell,table-column,table-column-group,table-footer-group,table-header-group,table-row,table-row-group,inherit".split(",")}},{prop:"overflow",values:a},{prop:"overflow-x",values:a},{prop:"overflow-y",
values:a},{prop:"float",values:{type:"link",values:["left","right","none","inherit"]}},{prop:"position",values:{type:"link",values:["absolute","fixed","relative","static","inherit"]}},{prop:"cursor",values:{type:"link",values:"auto,crosshair,default,e-resize,help,move,n-resize,ne-resize,nw-resize,pointer,progress,s-resize,se-resize,sw-resize,text,w-resize,wait,inherit".split(",")}},{prop:"color",values:e},{prop:"border-top-color",values:e},{prop:"border-bottom-color",values:e},{prop:"border-right-color",
values:e},{prop:"border-left-color",values:e},{prop:"background-color",values:e},{prop:"font-style",values:{type:"link",values:["italic","normal","oblique","inherit"]}},{prop:"font-weight",values:{type:"link",values:"bold,normal,bolder,lighter,100,200,300,400,500,600,700,800,900,inherit".split(",")}},{prop:"white-space",values:{type:"link",values:"pre,pre-line,pre-wrap,nowrap,normal,inherit".split(",")}},{prop:"word-wrap",values:{type:"link",values:["normal","break-word"]}},{prop:"visibility",values:{type:"link",
values:["hidden","visible","collapse","inherit"]}}],d=0;d<j.length;d++)a=j[d],k.push({prefix:a.prop,description:a.prop+" - "+a.prop+" style",template:a.prop+": ${value:"+c(a.values)+"};"});j="width,height,top,bottom,left,right,min-width,min-height,max-width,max-height,margin,padding,padding-left,padding-right,padding-top,padding-bottom,margin-left,margin-top,margin-bottom,margin-right".split(",");for(d=0;d<j.length;d++)a=j[d],k.push({prefix:a,description:a+" - "+a+" pixel style",template:a+": ${value}px;"});
j=["padding","margin"];for(d=0;d<j.length;d++)a=j[d],k.push({prefix:a,description:a+" - "+a+" top right bottom left style",template:a+": ${top}px ${left}px ${bottom}px ${right}px;"}),k.push({prefix:a,description:a+" - "+a+" top right,left bottom style",template:a+": ${top}px ${right_left}px ${bottom}px;"}),k.push({prefix:a,description:a+" - "+a+" top,bottom right,left style",template:a+": ${top_bottom}px ${right_left}px"});j=["border","border-top","border-bottom","border-left","border-right"];for(d=
0;d<j.length;d++)a=j[d],k.push({prefix:a,description:a+" - "+a+" style",template:a+": ${width:"+c(i)+"}px ${style:"+c(f)+"} ${color:"+c(e)+"};"});g.prototype=new b.TemplateContentAssist(h.CSSKeywords,k);g.prototype.getPrefix=function(a,c){for(var b=c;b&&/[A-Za-z\-\@]/.test(a.charAt(b-1));)b--;return b?a.substring(b,c):""};return{CssContentAssistProvider:g}});
define("orion/editor/htmlContentAssist",["orion/editor/templates"],function(b){function h(){}var c=new b.Template("","Simple HTML document",'<!DOCTYPE html>\n<html lang="en">\n\t<head>\n\t\t<meta charset=utf-8>\n\t\t<title>${title}</title>\n\t</head>\n\t<body>\n\t\t<h1>${header}</h1>\n\t\t<p>\n\t\t\t${cursor}\n\t\t</p>\n\t</body>\n</html>'),g=[{prefix:"<img",description:"<img> - HTML image element",template:'<img src="${cursor}" alt="${Image}"/>'},{prefix:"<a",description:"<a> - HTML anchor element",
template:'<a href="${cursor}"></a>'},{prefix:"<ul",description:"<ul> - HTML unordered list",template:"<ul>\n\t<li>${cursor}</li>\n</ul>"},{prefix:"<ol",description:"<ol> - HTML ordered list",template:"<ol>\n\t<li>${cursor}</li>\n</ol>"},{prefix:"<dl",description:"<dl> - HTML definition list",template:"<dl>\n\t<dt>${cursor}</dt>\n\t<dd></dd>\n</dl>"},{prefix:"<table",description:"<table> - basic HTML table",template:"<table>\n\t<tr>\n\t\t<td>${cursor}</td>\n\t</tr>\n</table>"}],a,f,i,d,e="abbr,b,button,canvas,cite,command,dd,del,dfn,dt,em,embed,font,h1,h2,h3,h4,h5,h6,i,ins,kbd,label,li,mark,meter,object,option,output,progress,q,rp,rt,samp,small,strong,sub,sup,td,time,title,tt,u,var".split(",");
for(d=0;d<e.length;d++)a=e[d],i="<"+a+"></"+a+">",f="<"+a+">${cursor}</"+a+">",g.push({prefix:"<"+a,description:i,template:f});e="address,article,aside,audio,bdo,blockquote,body,caption,code,colgroup,datalist,details,div,fieldset,figure,footer,form,head,header,hgroup,iframe,legend,map,menu,nav,noframes,noscript,optgroup,p,pre,ruby,script,section,select,span,style,tbody,textarea,tfoot,th,thead,tr,video".split(",");for(d=0;d<e.length;d++)a=e[d],i="<"+a+"></"+a+">",f="<"+a+">\n\t${cursor}\n</"+a+">",
g.push({prefix:"<"+a,description:i,template:f});e="area,base,br,col,hr,input,link,meta,param,keygen,source".split(",");for(d=0;d<e.length;d++)a=e[d],f=i="<"+a+"/>",g.push({prefix:"<"+a,description:i,template:f});h.prototype=new b.TemplateContentAssist([],g);h.prototype.getPrefix=function(a,c){for(var b=c;b&&/[A-Za-z<]/.test(a.charAt(b-1));)if(b--,a.charAt(b)==="<")break;return b?a.substring(b,c):""};h.prototype.computeProposals=function(a,d,e){return a.length===0?[c.getProposal("",d,e)]:b.TemplateContentAssist.prototype.computeProposals.call(this,
a,d,e)};return{HTMLContentAssistProvider:h}});
define("orion/editor/htmlGrammar",[],function(){return{HtmlGrammar:function(){return{scopeName:"source.html",uuid:"3B5C76FB-EBB5-D930-F40C-047D082CE99B",patterns:[{begin:"<!(doctype|DOCTYPE)",end:">",contentName:"entity.name.tag.doctype.html",beginCaptures:{0:{name:"entity.name.tag.doctype.html"}},endCaptures:{0:{name:"entity.name.tag.doctype.html"}}},{begin:"<\!--",end:"--\>",beginCaptures:{0:{name:"punctuation.definition.comment.html"}},endCaptures:{0:{name:"punctuation.definition.comment.html"}},patterns:[{match:"--",
name:"invalid.illegal.badcomment.html"}],contentName:"comment.block.html"},{match:"<[A-Za-z0-9_\\-:]+(?= ?)",name:"entity.name.tag.html"},{include:"#attrName"},{include:"#qString"},{include:"#qqString"},{include:"#entity"},{match:"</[A-Za-z0-9_\\-:]+>",name:"entity.name.tag.html"},{match:">",name:"entity.name.tag.html"}],repository:{attrName:{match:"[A-Za-z\\-:]+(?=\\s*=\\s*['\"])",name:"entity.other.attribute.name.html"},qqString:{match:'(")[^"]+(")',name:"string.quoted.double.html"},qString:{match:"(')[^']+(')",
name:"string.quoted.single.html"},entity:{match:"&[A-Za-z0-9]+;",name:"constant.character.entity.html"}}}}}});
define("orion/editor/jsTemplateContentAssist",["orion/editor/templates","orion/editor/keywords"],function(b,h){function c(){}var g=[{prefix:"if",description:"if - if statement",template:"if (${condition}) {\n\t${cursor}\n}"},{prefix:"if",description:"if - if else statement",template:"if (${condition}) {\n\t${cursor}\n} else {\n\t\n}"},{prefix:"for",description:"for - iterate over array",template:"for (var ${i}=0; ${i}<${array}.length; ${i}++) {\n\t${cursor}\n}"},{prefix:"for",description:"for - iterate over array with local var",
template:"for (var ${i}=0; ${i}<${array}.length; ${i}++) {\n\tvar ${value} = ${array}[${i}];\n\t${cursor}\n}"},{prefix:"for",description:"for..in - iterate over properties of an object",template:"for (var ${property} in ${object}) {\n\tif (${object}.hasOwnProperty(${property})) {\n\t\t${cursor}\n\t}\n}"},{prefix:"while",description:"while - while loop with condition",template:"while (${condition}) {\n\t${cursor}\n}"},{prefix:"do",description:"do - do while loop with condition",template:"do {\n\t${cursor}\n} while (${condition});"},
{prefix:"switch",description:"switch - switch case statement",template:"switch (${expression}) {\n\tcase ${value1}:\n\t\t${cursor}\n\t\tbreak;\n\tdefault:\n}"},{prefix:"case",description:"case - case statement",template:"case ${value}:\n\t${cursor}\n\tbreak;"},{prefix:"try",description:"try - try..catch statement",template:"try {\n\t${cursor}\n} catch (${err}) {\n}"},{prefix:"try",description:"try - try..catch statement with finally block",template:"try {\n\t${cursor}\n} catch (${err}) {\n} finally {\n}"},
{prefix:"var",description:"var - variable declaration",template:"var ${name};"},{prefix:"var",description:"var - variable declaration with value",template:"var ${name} = ${value};"},{prefix:"let",description:"let - local scope variable declaration",template:"let ${name};"},{prefix:"let",description:"let - local scope variable declaration with value",template:"let ${name} = ${value};"},{prefix:"return",description:"return - return result",template:"return ${result};"},{prefix:"typeof",description:"typeof - typeof statement",
template:'typeof ${object} === "${type:'+JSON.stringify({type:"link",values:"undefined,object,boolean,number,string,function,xml".split(",")}).replace("}","\\}")+'}"'},{prefix:"instanceof",description:"instanceof - instanceof statement",template:"${object} instanceof ${type}"},{prefix:"with",description:"with - with statement",template:"with (${object}) {\n\t${cursor}\n}"},{prefix:"function",description:"function - function declaration",template:"function ${name} (${parameter}) {\n\t${cursor}\n}"},
{prefix:"log",description:"log - console log",template:"console.log(${object});"}];c.prototype=new b.TemplateContentAssist(h.JSKeywords,g);c.prototype.isValid=function(a,c,b){a=b-a.length-1;for(b="";a>=0;)if(b=c[a],b==="\n"||b==="\r")break;else if(/\s/.test(b))a--;else break;return":!@#$^&*.?<>".indexOf(b)===-1};return{JSTemplateContentAssistProvider:c}});
define('built-webEditingPlugin.js',"orion/plugin,orion/editor/cssContentAssist,orion/editor/htmlContentAssist,orion/editor/htmlGrammar,orion/editor/jsTemplateContentAssist,orion/editor/keywords,orion/editor/templates".split(","),function(b,h,c,g,a){b=new b({name:"Orion Web Editing Plugin",version:"1.0",description:"This plugin provides editor link support for the navigator and provides default editing capabilities for HTML, JavaScript, and CSS."});b.registerService("orion.core.contenttype",{},{contentTypes:[{id:"text/plain",
name:"Text",extension:["txt"],image:"../images/file_model.gif"},{id:"text/html","extends":"text/plain",name:"HTML",extension:["html","htm"],image:"../images/html.gif"},{id:"text/css","extends":"text/plain",name:"CSS",extension:["css"],image:"../images/stylesheet.gif"},{id:"application/javascript","extends":"text/plain",name:"JavaScript",extension:["js"],image:"../images/javascript.gif"},{id:"application/json","extends":"text/plain",name:"JSON",extension:["json"],image:"../images/wtp/json.gif"},{id:"application/xml",
"extends":"text/plain",name:"XML",extension:["xml"],image:"../images/wtp/xmlfile.gif"},{id:"text/x-java-source","extends":"text/plain",name:"Java",extension:["java"]},{id:"text/x-markdown","extends":"text/plain",name:"Markdown",extension:["md"]},{id:"text/x-yaml","extends":"text/plain",name:"YAML",extension:["yaml","yml"]},{id:"text/conf","extends":"text/plain",name:"Conf",extension:["conf"]},{id:"text/sh","extends":"text/plain",name:"sh",extension:["sh"]},{id:"image/gif",name:"GIF",extension:["gif"],
image:"../images/wtp/image.gif"},{id:"image/jpeg",name:"JPG",extension:["jpg","jpeg","jpe"],image:"../images/wtp/image.gif"},{id:"image/ico",name:"ICO",extension:["ico"],image:"../images/wtp/image.gif"},{id:"image/png",name:"PNG",extension:["png"],image:"../images/wtp/image.gif"},{id:"image/tiff",name:"TIFF",extension:["tif","tiff"],image:"../images/wtp/image.gif"},{id:"image/svg",name:"SVG",extension:["svg"],image:"../images/wtp/image.gif"}]});b.registerService("orion.navigate.command",{},{name:"Raw",
id:"orion.view.raw",tooltip:"Open the raw file or folder in the browser",uriTemplate:"{Location}",forceSingleItem:!0});b.registerService("orion.edit.editor",{},{id:"orion.editor",nameKey:"Orion Editor",nls:"orion/nls/messages",uriTemplate:"../edit/edit.html#{Location,params*}",orionTemplate:"../edit/edit.html#{,Location,params*}"});b.registerService("orion.navigate.openWith",{},{editor:"orion.editor",contentType:"text/plain,text/html,text/css,application/javascript,application/json,application/xml,text/x-java-source".split(",")});
b.registerService("orion.navigate.openWith.default",{},{editor:"orion.editor"});b.registerService("orion.edit.contentAssist",new h.CssContentAssistProvider,{name:"CSS content assist",contentType:["text/css"]});b.registerService("orion.edit.contentAssist",new a.JSTemplateContentAssistProvider,{name:"JavaScript content assist",contentType:["application/javascript"]});b.registerService("orion.edit.contentAssist",new c.HTMLContentAssistProvider,{name:"HTML content assist",contentType:["text/html"]});
b.registerService("orion.edit.highlighter",{},{type:"grammar",contentType:["text/html"],grammar:new g.HtmlGrammar});b.connect()});