diff --git a/__test__/playground.spec.js b/__test__/playground.spec.js index 0418765..6362f89 100644 --- a/__test__/playground.spec.js +++ b/__test__/playground.spec.js @@ -12,7 +12,7 @@ describe('playground', () => { propsData: { template: '#app' } - })).toThrowError('#app is not found') + }).$mount()).toThrowError('#app is not found') }) it('work', () => { diff --git a/dist/vuep.common.js b/dist/vuep.common.js index 575a3bc..cdf734c 100644 --- a/dist/vuep.common.js +++ b/dist/vuep.common.js @@ -339,8 +339,11 @@ var Vuep$2 = { }, created: function created () { - /* istanbul ignore next */ + /* istanbul ignore next */ if (this.$isServer) { return } + }, + + mounted: function mounted () { var content = this.template; if (/^[\.#]/.test(this.template)) { diff --git a/dist/vuep.js b/dist/vuep.js index b339659..e69cdb4 100644 --- a/dist/vuep.js +++ b/dist/vuep.js @@ -9573,8 +9573,11 @@ var Vuep$1 = { }, created: function created () { - /* istanbul ignore next */ + /* istanbul ignore next */ if (this.$isServer) { return } + }, + + mounted: function mounted () { var content = this.template; if (/^[\.#]/.test(this.template)) { diff --git a/dist/vuep.min.js b/dist/vuep.min.js index e7a2318..fd077cf 100644 --- a/dist/vuep.min.js +++ b/dist/vuep.min.js @@ -3,7 +3,7 @@ function qt(e){return e.display.scroller.clientHeight-Rt(e)-e.display.barHeight} }function Dn(e,t,r){for(var n=[],i=E(e.first,0),o=i,a=0;a1&&e.remove(l.line+1,m-1),e.insert(l.line+1,y)}kt(e,"change",e,t)}function Rn(e,t,r){function n(e,i,o){if(e.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges?(e.done.pop(),h(e.done)):void 0}function Gn(e,t,r,n){var i=e.history;i.undone.length=0;var o,a,l=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>l-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=Kn(i,i.lastOp==n)))a=h(o.changes),0==j(t.from,t.to)&&0==j(t.from,a.to)?a.to=Wn(t):o.changes.push(Vn(e,t));else{var s=h(i.done);for(s&&s.ranges||Yn(e.sel,i.done),o={changes:[Vn(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||ze(e,"historyAdded")}function _n(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Xn(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||_n(e,o,h(i.done),t))?i.done[i.done.length-1]=t:Yn(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&Un(i.undone)}function Yn(e,t){var r=h(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Zn(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function Qn(e){if(!e)return null;for(var t,r=0;r-1&&(h(l)[f]=c[f],delete c[f])}}}return n}function ri(e,t,r,n){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(n){var o=j(r,i)<0;o!=j(n,i)<0?(i=r,r=n):o!=j(r,n)<0&&(r=n)}return new nl(i,r)}return new nl(n||r,r)}function ni(e,t,r,n){ci(e,new rl([ri(e,e.sel.primary(),t,r)],0),n)}function ii(e,t,r){for(var n=[],i=0;i=t.ch:l.to>t.ch))){if(i&&(ze(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(r){var c=s.find(n<0?1:-1),u=void 0;if((n<0?s.inclusiveRight:s.inclusiveLeft)&&(c=gi(e,c,-n,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=j(c,r))&&(n<0?u<0:u>0))return hi(e,c,t,n,i)}var d=s.find(n<0?-1:1);return(n<0?s.inclusiveLeft:s.inclusiveRight)&&(d=gi(e,d,n,d.line==t.line?o:null)),d?hi(e,d,t,n,i):null}}return t}function mi(e,t,r,n,i){var o=n||1,a=hi(e,t,r,o,i)||!i&&hi(e,t,r,o,!0)||hi(e,t,r,-o,i)||!i&&hi(e,t,r,-o,!0);return a?a:(e.cantEdit=!0,E(e.first,0))}function gi(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?R(e,E(t.line-1)):null:r>0&&t.ch==(n||L(e,t.line)).text.length?t.line=0;--i)wi(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text});else wi(e,t)}}function wi(e,t){if(1!=t.text.length||""!=t.text[0]||0!=j(t.from,t.to)){var r=En(e,t);Gn(e,t,r,e.cm?e.cm.curOp.id:NaN),Ci(e,t,r,Q(e,t));var n=[];Rn(e,function(e,r){r||d(n,e.history)!=-1||(Ai(e.history,t),n.push(e.history)),Ci(e,t,null,Q(e,t))})}}function xi(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,l="undo"==t?i.undone:i.done,s=0;s=0;--p){var m=f(p);if(m)return m.v}}}}function ki(e,t){if(0!=t&&(e.first+=t,e.sel=new rl(m(e.sel.ranges,function(e){return new nl(E(e.anchor.line+t,e.anchor.ch),E(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){pn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.lineo&&(t={from:t.from,to:E(o,L(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=T(e,t.from,t.to),r||(r=En(e,t)),e.cm?Si(e.cm,t,n):Bn(e,t,n),ui(e,r,xa)}}function Si(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=N(ue(L(n,o.line))),n.iter(s,a.line+1,function(e){if(e==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Oe(e),Bn(n,t,r,wr(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(e){var t=ye(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),n.frontier=Math.min(n.frontier,o.line),bn(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?pn(e):o.line!=a.line||1!=t.text.length||Fn(e.doc,t)?pn(e,o.line,a.line+1,c):hn(e,o.line,"text");var u=We(e,"changes"),d=We(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&kt(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function Mi(e,t,r,n,i){if(n||(n=r),j(n,r)<0){var o=n;n=r,r=o}"string"==typeof t&&(t=e.splitLines(t)),bi(e,{from:r,to:n,text:t,origin:i})}function Li(e,t,r,n){r0||0==l&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=n("span",[a.replacedWith],"CodeMirror-widget"),a.widgetNode.setAttribute("role","presentation"),i.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ce(e,t.line,t,r,a)||t.line!=r.line&&ce(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");U()}a.addToHistory&&Gn(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,u=t.line,d=e.cm;if(e.iter(u,r.line+1,function(e){d&&a.collapsed&&!d.options.lineWrapping&&ue(e)==d.display.maxLine&&(s=!0),a.collapsed&&u!=t.line&&z(e,0),X(e,new K(a,u==t.line?t.ch:null,u==r.line?r.ch:null)),++u}),a.collapsed&&e.iter(t.line,r.line+1,function(t){me(e,t)&&z(t,0)}),a.clearOnEnter&&Wa(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(V(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++ll,a.atomic=!0),d){if(s&&(d.curOp.updateMaxLine=!0),a.collapsed)pn(d,t.line,r.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var f=t.line;f<=r.line;f++)hn(d,f,"text");a.atomic&&fi(d.doc),kt(d,"markerAdded",d,a)}return a}function Pi(e,t,r,n,i){n=c(n),n.shared=!1;var o=[Wi(e,t,r,n,i)],a=o[0],l=n.widgetNode;return Rn(e,function(e){l&&(n.widgetNode=l.cloneNode(!0)),o.push(Wi(e,R(e,t),R(e,r),n,i));for(var s=0;s-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),ui(t.doc,On(r,r)),u)for(var f=0;f=0;t--)Mi(e.doc,"",n[t].from,n[t].to,"+delete");Qr(e)})}function Qi(e,t){var r=L(e.doc,t),n=ue(r);return n!=r&&(t=N(n)),Me(!0,e,n,t,1)}function Ji(e,t){var r=L(e.doc,t),n=de(r);return n!=r&&(t=N(n)),Me(!0,e,r,t,-1)}function eo(e,t){var r=Qi(e,t.line),n=L(e.doc,r.line),i=ke(n);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return E(r.line,a?0:o,r.sticky)}return r}function to(e,t,r){if("string"==typeof t&&(t=xl[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=wa}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function ro(e,t,r){for(var n=0;ni-400&&0==j(wl.pos,r)?n="triple":bl&&bl.time>i-400&&0==j(bl.pos,r)?(n="double",wl={time:i,pos:r}):(n="single",bl={time:i,pos:r});var a,l=e.doc.sel,c=la?t.metaKey:t.ctrlKey;e.options.dragDrop&&Pa&&!e.isReadOnly()&&"single"==n&&(a=l.contains(r))>-1&&(j((a=l.ranges[a]).from(),r)<0||r.xRel>0)&&(j(a.to(),r)>0||r.xRel<0)?po(e,t,r,c):ho(e,t,r,n,c)}function po(e,t,r,n){var i=e.display,o=+new Date,a=un(e,function(l){Qo&&(i.scroller.draggable=!1),e.state.draggingText=!1,Ae(document,"mouseup",a),Ae(i.scroller,"drop",a),Math.abs(t.clientX-l.clientX)+Math.abs(t.clientY-l.clientY)<10&&(Ee(l),!n&&+new Date-200w&&i.push(new nl(E(g,w),E(g,f(y,c,o))))}i.length||i.push(new nl(r,r)),ci(d,Nn(m.ranges.slice(0,h).concat(i),h),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x=p,k=x.anchor,C=t;if("single"!=n){var S;S="double"==n?e.findWordAt(t):new nl(E(t.line,0),R(d,E(t.line+1,0))),j(S.anchor,k)>0?(C=S.head,k=F(x.from(),S.anchor)):(C=S.anchor,k=I(x.to(),S.head))}var M=m.ranges.slice(0);M[h]=new nl(R(d,k),C),ci(d,Nn(M,h),ka)}}function l(t){var r=++x,i=kr(e,t,!0,"rect"==n);if(i)if(0!=j(i,b)){e.curOp.focus=o(),a(i);var s=Hr(c,d);(i.line>=s.to||i.linew.bottom?20:0;u&&setTimeout(un(e,function(){x==r&&(c.scroller.scrollTop+=u,l(t))}),50)}}function s(t){e.state.selectingText=!1,x=1/0,Ee(t),c.input.focus(),Ae(document,"mousemove",k),Ae(document,"mouseup",C),d.history.lastSelOrigin=null}var c=e.display,d=e.doc;Ee(t);var p,h,m=d.sel,g=m.ranges;if(i&&!t.shiftKey?(h=d.sel.contains(r),p=h>-1?g[h]:new nl(r,r)):(p=d.sel.primary(),h=d.sel.primIndex),sa?t.shiftKey&&t.metaKey:t.altKey)n="rect",i||(p=new nl(r,r)),r=kr(e,t,!0,!0),h=-1;else if("double"==n){var v=e.findWordAt(r);p=e.display.shift||d.extend?ri(d,p,v.anchor,v.head):v}else if("triple"==n){var y=new nl(E(r.line,0),R(d,E(r.line+1,0)));p=e.display.shift||d.extend?ri(d,p,y.anchor,y.head):y}else p=ri(d,p,r);i?h==-1?(h=g.length,ci(d,Nn(g.concat([p]),h),{scroll:!1,origin:"*mouse"})):g.length>1&&g[h].empty()&&"single"==n&&!t.shiftKey?(ci(d,Nn(g.slice(0,h).concat(g.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),m=d.sel):oi(d,h,p,ka):(h=0,ci(d,new rl([p],0),ka),m=d.sel);var b=r,w=c.wrapper.getBoundingClientRect(),x=0,k=un(e,function(e){Fe(e)?l(e):s(e)}),C=un(e,s);e.state.selectingText=C,Wa(document,"mousemove",k),Wa(document,"mouseup",C)}function mo(e,t,r,n){var i,o;try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Ee(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!We(e,r))return De(t);o-=l.top-a.viewOffset;for(var s=0;s=i){var u=O(e.doc,o),d=e.options.gutters[s];return ze(e,r,e,u,d,t),De(t)}}}function go(e,t){return mo(e,t,"gutterClick",!0)}function vo(e,t){Ht(e.display,t)||yo(e,t)||Ne(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function yo(e,t){return!!We(e,"gutterContextMenu")&&mo(e,t,"gutterContextMenu",!1)}function bo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),nr(e)}function wo(e){function t(t,n,i,o){e.defaults[t]=n,i&&(r[t]=o?function(e,t,r){r!=Sl&&i(e,t,r)}:i)}var r=e.optionHandlers;e.defineOption=t,e.Init=Sl,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Hn(e)},!0),t("indentUnit",2,Hn,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){In(e),nr(e),pn(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(o==-1)break;i=o+t.length,r.push(E(n,o))}n++});for(var i=r.length-1;i>=0;i--)Mi(e.doc,t,r[i],E(r[i].line,r[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Sl&&e.refresh()}),t("specialCharPlaceholder",dt,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",aa?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!ca),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){bo(e),xo(e)},!0),t("keyMap","default",function(e,t,r){var n=Yi(t),i=r!=Sl&&Yi(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),t("extraKeys",null),t("lineWrapping",!1,Co,!0),t("gutters",[],function(e){zn(e.options),xo(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?br(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return Vr(e)},!0),t("scrollbarStyle","native",function(e){Kr(e),Vr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){zn(e.options),xo(e)},!0),t("firstLineNumber",1,xo,!0),t("lineNumberFormatter",function(e){return e},xo,!0),t("showCursorWhenSelecting",!1,Sr,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("readOnly",!1,function(e,t){"nocursor"==t?(Wr(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,ko),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Sr,!0),t("singleCursorHeightPerLine",!0,Sr,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,In,!0),t("addModeClass",!1,In,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,In,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null)}function xo(e){An(e),pn(e),Pr(e)}function ko(e,t,r){var n=r&&r!=Sl;if(!t!=!n){var i=e.display.dragFunctions,o=t?Wa:Ae;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Co(e){e.options.lineWrapping?(a(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(ha(e.display.wrapper,"CodeMirror-wrap"),be(e)),xr(e),pn(e),nr(e),setTimeout(function(){return Vr(e)},100)}function So(e,t){var r=this;if(!(this instanceof So))return new So(e,t);this.options=t=t?c(t):{},c(Ml,t,!1),zn(t);var n=t.value;"string"==typeof n&&(n=new dl(n,t.mode,null,t.lineSeparator)),this.doc=n;var i=new So.inputStyles[t.inputStyle](this),o=this.display=new M(e,n,i);o.wrapper.CodeMirror=this,An(this),bo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Kr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new ga,keySeq:null,specialChars:null},t.autofocus&&!aa&&o.input.focus(),Yo&&Zo<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Mo(this),$i(),en(this),this.curOp.forceUpdate=!0,$n(this,n),t.autofocus&&!aa||this.hasFocus()?setTimeout(s(Or,this),20):Wr(this);for(var a in Ll)Ll.hasOwnProperty(a)&&Ll[a](r,t[a],Sl);Er(this),t.finishInit&&t.finishInit(this);for(var l=0;l400}var i=e.display;Wa(i.scroller,"mousedown",un(e,uo)),Yo&&Zo<11?Wa(i.scroller,"dblclick",un(e,function(t){if(!Ne(e,t)){var r=kr(e,t);if(r&&!go(e,t)&&!Ht(e.display,t)){Ee(t);var n=e.findWordAt(r);ni(e.doc,n.anchor,n.head)}}})):Wa(i.scroller,"dblclick",function(t){return Ne(e,t)||Ee(t)}),pa||Wa(i.scroller,"contextmenu",function(t){return vo(e,t)});var o,a={end:0};Wa(i.scroller,"touchstart",function(t){if(!Ne(e,t)&&!r(t)){i.input.ensurePolled(),clearTimeout(o);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-a.end<=300?a:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Wa(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Wa(i.scroller,"touchend",function(r){var o=i.activeTouch;if(o&&!Ht(i,r)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,l=e.coordsChar(i.activeTouch,"page");a=!o.prev||n(o,o.prev)?new nl(l,l):!o.prev.prev||n(o,o.prev.prev)?e.findWordAt(l):new nl(E(l.line,0),R(e.doc,E(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Ee(r)}t()}),Wa(i.scroller,"touchcancel",t),Wa(i.scroller,"scroll",function(){ i.scroller.clientHeight&&(Ir(e,i.scroller.scrollTop),Fr(e,i.scroller.scrollLeft,!0),ze(e,"scroll",e))}),Wa(i.scroller,"mousewheel",function(t){return $r(e,t)}),Wa(i.scroller,"DOMMouseScroll",function(t){return $r(e,t)}),Wa(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Ne(e,t)||He(t)},over:function(t){Ne(e,t)||(Fi(e,t),He(t))},start:function(t){return Ii(e,t)},drop:un(e,Hi),leave:function(t){Ne(e,t)||Bi(e)}};var l=i.input.getField();Wa(l,"keyup",function(t){return so.call(e,t)}),Wa(l,"keydown",un(e,ao)),Wa(l,"keypress",un(e,co)),Wa(l,"focus",function(t){return Or(e,t)}),Wa(l,"blur",function(t){return Wr(e,t)})}function Lo(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=Je(e,t):r="prev");var a=e.options.tabSize,l=L(o,t),s=u(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c,d=l.text.match(/^\s*/)[0];if(n||/\S/.test(l.text)){if("smart"==r&&(c=o.mode.indent(i,l.text.slice(d.length),l.text),c==wa||c>150)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>o.first?u(L(o,t-1).text,null,a):0:"add"==r?c=s+e.options.indentUnit:"subtract"==r?c=s-e.options.indentUnit:"number"==typeof r&&(c=s+r),c=Math.max(0,c);var f="",h=0;if(e.options.indentWithTabs)for(var m=Math.floor(c/a);m;--m)h+=a,f+="\t";if(h1)if(Al&&Al.text.join("\n")==t){if(n.ranges.length%Al.text.length==0){s=[];for(var c=0;c=0;d--){var f=n.ranges[d],p=f.from(),g=f.to();f.empty()&&(r&&r>0?p=E(p.line,p.ch-r):e.state.overwrite&&!a?g=E(g.line,Math.min(L(o,g.line).text.length,g.ch+h(l).length)):Al&&Al.lineWise&&Al.text.join("\n")==t&&(p=g=E(p.line,0))),u=e.curOp.updateInput;var v={from:p,to:g,text:s?s[d%s.length]:l,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};bi(e.doc,v),kt(e,"inputRead",e,v)}t&&!a&&No(e,t),Qr(e),e.curOp.updateInput=u,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function zo(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||cn(t,function(){return Ao(t,r,0,null,"paste")}),!0}function No(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l-1){a=Lo(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(L(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Lo(e,i.head.line,"smart"));a&&kt(e,"electricInput",e,i.head.line)}}}function Oo(e){for(var t=[],r=[],n=0;nn&&(Lo(t,o.head.line,e,!0),n=o.head.line,i==t.doc.sel.primIndex&&Qr(t));else{var a=o.from(),l=o.to(),s=Math.max(n,a.line);n=Math.min(t.lastLine(),l.line-(l.ch?0:1))+1;for(var c=s;c0&&oi(t.doc,i,new nl(a,u[i].to()),xa)}}}),getTokenAt:function(e,t){return nt(this,e,t)},getLineTokens:function(e,t){return nt(this,E(e),t,!0)},getTokenTypeAt:function(e){e=R(this.doc,e);var t,r=Qe(this,L(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var a=n+i>>1;if((a?r[2*a-1]:0)>=o)i=a;else{if(!(r[2*a+1]o&&(e=o,i=!0),n=L(this.doc,e)}else n=e;return ar(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-ve(n):0)},defaultTextHeight:function(){return gr(this.display)},defaultCharWidth:function(){return vr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=cr(this,R(this.doc,e));var a=e.bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),r&&Xr(this,l,a,l+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:dn(ao),triggerOnKeyPress:dn(co),triggerOnKeyUp:so,execCommand:function(e){if(xl.hasOwnProperty(e))return xl[e].call(null,this)},triggerElectric:dn(function(e){No(this,e)}),findPosH:function(e,t,r,n){var i=this,o=1;t<0&&(o=-1,t=-t);for(var a=R(this.doc,e),l=0;l0&&l(r.charAt(n-1));)--n;for(;i.5)&&xr(this),ze(this,"refresh",this)}),swapDoc:dn(function(e){var t=this.doc;return t.cm=null,$n(this,e),nr(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,kt(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Pe(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}function jo(e,t,r,n,i){function o(){var n=t.line+r;return!(n=e.first+e.size)&&(t=new E(n,t.ch,t.sticky),c=L(e,n))}function a(n){var a;if(a=i?Le(e.cm,c,t,r):Se(c,t,r),null==a){if(n||!o())return!1;t=Me(i,e.cm,c,t.line,r)}else t=a;return!0}var l=t,s=r,c=L(e,t.line);if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var u=null,d="group"==n,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(r<0)||a(!p);p=!1){var h=c.text.charAt(t.ch)||"\n",m=w(h,f)?"w":d&&"\n"==h?"n":!d||/\s/.test(h)?null:"p";if(!d||p||m||(m="s"),u&&u!=m){r<0&&(r=1,a(),t.sticky="after");break}if(m&&(u=m),r>0&&!a(!p))break}var g=mi(e,t,l,s,!0);return D(l,g)&&(g.hitSide=!0),g}function Do(e,t,r,n){var i,o=e.doc,a=t.left;if("page"==n){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(l-.5*gr(e.display),3);i=(r>0?t.bottom:t.top)+r*s}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(var c;c=fr(e,a,i),c.outside;){if(r<0?i<=0:i>=o.height){c.hitSide=!0;break}i+=5*r}return c}function Ho(e,t){var r=_t(e,t.line);if(!r||r.hidden)return null;var n=L(e.doc,t.line),i=Ut(r,n,t.line),o=ke(n),a="left";if(o){var l=xe(o,t.ch);a=l%2?"right":"left"}var s=Zt(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Io(e,t){return t&&(e.bad=!0),e}function Fo(e,t,r,n,i){function o(e){return function(t){return t.id==e}}function a(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return void(l+=""==r?t.textContent.replace(/\u200b/g,""):r);var u,d=t.getAttribute("cm-marker");if(d){var f=e.findMarks(E(n,0),E(i+1,0),o(+d));return void(f.length&&(u=f[0].find())&&(l+=T(e.doc,u.from,u.to).join(c)))}if("false"==t.getAttribute("contenteditable"))return;for(var p=0;p=15&&(ta=!1,Qo=!0);var da,fa=la&&(Jo||ta&&(null==ua||ua<12.11)),pa=Ko||Yo&&Zo>=9,ha=function(t,r){var n=t.className,i=e(r).exec(n);if(i){var o=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(o?i[1]+o:"")}};da=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var ma=function(e){e.select()};oa?ma=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:Yo&&(ma=function(e){try{e.select()}catch(e){}});var ga=function(){this.id=null};ga.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var va,ya,ba=30,wa={toString:function(){return"CodeMirror.Pass"}},xa={scroll:!1},ka={origin:"*mouse"},Ca={origin:"+move"},Sa=[""],Ma=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,La=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,Ta=!1,Aa=!1,za=null,Na=function(){function e(e){return e<=247?r.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?n.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,s=/[1n]/,c="L";return function(r){if(!i.test(r))return!1;for(var n=r.length,u=[],d=0;d=this.string.length},Ra.prototype.sol=function(){return this.pos==this.lineStart},Ra.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ra.prototype.next=function(){if(this.post},Ra.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},Ra.prototype.skipToEnd=function(){this.pos=this.string.length},Ra.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ra.prototype.backUp=function(e){this.pos-=e},Ra.prototype.column=function(){return this.lastColumnPos0?null:(n&&t!==!1&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return t!==!1&&(this.pos+=e.length),!0},Ra.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ra.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}};var $a=function(e,t,r){this.text=e,re(this,t),this.height=r?r(this):1};$a.prototype.lineNo=function(){return N(this)},Pe($a);var qa,Va={},Ua={},Ka=null,Ga=null,_a={left:0,right:0,top:0,bottom:0},Xa=0,Ya=null;Yo?Ya=-.53:Ko?Ya=15:ea?Ya=-.7:ra&&(Ya=-1/3);var Za=function(e,t,r){this.cm=r;var i=this.vert=n("div",[n("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=n("div",[n("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(o),Wa(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),Wa(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Yo&&Zo<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Za.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Za.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},Za.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},Za.prototype.zeroWidthHack=function(){var e=la&&!na?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ga,this.disableVert=new ga},Za.prototype.enableZeroWidthBar=function(e,t){function r(){var n=e.getBoundingClientRect(),i=document.elementFromPoint(n.left+1,n.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},Za.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Qa=function(){};Qa.prototype.update=function(){return{bottom:0,right:0}},Qa.prototype.setScrollLeft=function(){},Qa.prototype.setScrollTop=function(){},Qa.prototype.clear=function(){};var Ja={native:Za,null:Qa},el=0,tl=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Hr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=$t(e),this.force=r,this.dims=yr(e),this.events=[]};tl.prototype.signal=function(e,t){We(e,t)&&this.events.push(arguments)},tl.prototype.finish=function(){for(var e=this,t=0;t=0&&j(e,i.to())<=0)return n}return-1};var nl=function(e,t){this.anchor=e,this.head=t};nl.prototype.from=function(){return F(this.anchor,this.head)},nl.prototype.to=function(){return I(this.anchor,this.head)},nl.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};var il=function(e){var t=this;this.lines=e,this.parent=null;for(var r=0,n=0;n1||!(this.children[0]instanceof il))){var s=[];this.collapse(s),this.children=[new il(s)],this.children[0].parent=this}},ol.prototype.collapse=function(e){for(var t=this,r=0;r50){for(var l=o.lines.length%25+25,s=l;s10);e.parent.maybeSpill()}},ol.prototype.iterN=function(e,t,r){for(var n=this,i=0;it.display.maxLineLength&&(t.display.maxLine=u,t.display.maxLineLength=d,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&pn(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&fi(t.doc)),t&&kt(t,"markerCleared",t,this),r&&tn(t),this.parent&&this.parent.clear()}},sl.prototype.find=function(e,t){var r=this;null==e&&"bookmark"==this.type&&(e=1);for(var n,i,o=0;o=0;c--)bi(n,i[c]);s?si(this,s):this.cm&&Qr(this.cm)}),undo:fn(function(){xi(this,"undo")}),redo:fn(function(){xi(this,"redo")}),undoSelection:fn(function(){xi(this,"undo",!0)}),redoSelection:fn(function(){xi(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=R(this,e),t=R(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;ne?(t=e,!0):(e-=o,void++r)}),R(this,E(r,t))},indexFromPos:function(e){e=R(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to0)i=new E(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),E(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=L(e.doc,i.line-1).text;a&&(i=new E(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),E(i.line-1,a.length-1),i,"+transpose"))}r.push(new nl(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return cn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;ne.firstLine()&&(n=E(n.line-1,L(e.doc,n.line-1).length)),i.ch==L(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var o,a,l;n.line==t.viewFrom||0==(o=Cr(e,n.line))?(a=N(t.view[0].line),l=t.view[0].node):(a=N(t.view[o].line),l=t.view[o-1].node.nextSibling);var s,c,u=Cr(e,i.line);if(u==t.view.length-1?(s=t.viewTo-1,c=t.lineDiv.lastChild):(s=N(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling),!l)return!1;for(var d=e.doc.splitLines(Fo(e,l,c,a,s)),f=T(e.doc,E(a,0),E(s,L(e.doc,s).text.length));d.length>1&&f.length>1;)if(h(d)==h(f))d.pop(),f.pop(),s--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),a++}for(var p=0,m=0,g=d[0],v=f[0],y=Math.min(g.length,v.length);p1||d[0]||j(k,C)?(Mi(e.doc,d,k,C,"+input"),!0):void 0},zl.prototype.ensurePolled=function(){this.forceCompositionEnd()},zl.prototype.reset=function(){this.forceCompositionEnd()},zl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.pollContent()||pn(this.cm),this.div.blur(),this.div.focus())},zl.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}!e.cm.isReadOnly()&&e.pollContent()||cn(e.cm,function(){return pn(e.cm)})},80))},zl.prototype.setUneditable=function(e){e.contentEditable="false"},zl.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||un(this.cm,Ao)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},zl.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},zl.prototype.onContextMenu=function(){},zl.prototype.resetPosition=function(){},zl.prototype.needsContentAttribute=!0;var Nl=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ga,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null};Nl.prototype.init=function(e){function t(e){if(!Ne(i,e)){if(i.somethingSelected())To({lineWise:!1,text:i.getSelections()}),n.inaccurateSelection&&(n.prevInput="",n.inaccurateSelection=!1,a.value=Al.text.join("\n"),ma(a));else{if(!i.options.lineWiseCopyCut)return;var t=Oo(i);To({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,xa):(n.prevInput="",a.value=t.text.join("\n"),ma(a))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var r=this,n=this,i=this.cm,o=this.wrapper=Po(),a=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),oa&&(a.style.width="0px"),Wa(a,"input",function(){Yo&&Zo>=9&&r.hasSelection&&(r.hasSelection=null),n.poll()}),Wa(a,"paste",function(e){Ne(i,e)||zo(e,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),Wa(a,"cut",t),Wa(a,"copy",t),Wa(e.scroller,"paste",function(t){Ht(e,t)||Ne(i,t)||(i.state.pasteIncoming=!0,n.focus())}),Wa(e.lineSpace,"selectstart",function(t){Ht(e,t)||Ee(t)}),Wa(a,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Wa(a,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Nl.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Mr(e);if(e.options.moveInputWithCursor){var i=cr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},Nl.prototype.showSelection=function(e){var t=this.cm,n=t.display;r(n.cursorDiv,e.cursors),r(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Nl.prototype.reset=function(e){if(!this.contextMenuPending){var t,r,n=this.cm,i=n.doc;if(n.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=Da&&(o.to().line-o.from().line>100||(r=n.getSelection()).length>1e3);var a=t?"-":r||n.getSelection();this.textarea.value=a,n.state.focused&&ma(this.textarea),Yo&&Zo>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",Yo&&Zo>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},Nl.prototype.getField=function(){return this.textarea},Nl.prototype.supportsTouch=function(){return!1},Nl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!aa||o()!=this.textarea))try{this.textarea.focus()}catch(e){}},Nl.prototype.blur=function(){this.textarea.blur()},Nl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Nl.prototype.receivedFocus=function(){this.slowPoll()},Nl.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Nl.prototype.fastPoll=function(){function e(){var n=r.poll();n||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},Nl.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||ja(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(Yo&&Zo>=9&&this.hasSelection===i||la&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(n.length,i.length);a1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Nl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Nl.prototype.onKeyPress=function(){Yo&&Zo>=9&&(this.hasSelection=null),this.fastPoll()},Nl.prototype.onContextMenu=function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,n.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=d,a.style.cssText=u,Yo&&Zo<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=s),null!=a.selectionStart){(!Yo||Yo&&Zo<9)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==n.prevInput?un(i,vi)(i):e++<10?o.detectingSelectAll=setTimeout(r,500):(o.selForContextMenu=null, -o.input.reset())};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,a=n.textarea,l=kr(i,e),s=o.scroller.scrollTop;if(l&&!ta){var c=i.options.resetSelectionOnContextMenu;c&&i.doc.sel.contains(l)==-1&&un(i,ci)(i.doc,On(l),xa);var u=a.style.cssText,d=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var f=n.wrapper.getBoundingClientRect();a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(Yo?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var p;if(Qo&&(p=window.scrollY),o.input.focus(),Qo&&window.scrollTo(null,p),o.input.reset(),i.somethingSelected()||(a.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),Yo&&Zo>=9&&t(),pa){He(e);var h=function(){Ae(window,"mouseup",h),setTimeout(r,20)};Wa(window,"mouseup",h)}else setTimeout(r,50)}},Nl.prototype.readOnlyChanged=function(e){e||this.reset()},Nl.prototype.setUneditable=function(){},Nl.prototype.needsContentAttribute=!1,wo(So),Eo(So);var Ol="iter insert remove copy getEditor constructor".split(" ");for(var Wl in dl.prototype)dl.prototype.hasOwnProperty(Wl)&&d(Ol,Wl)<0&&(So.prototype[Wl]=function(e){return function(){return e.apply(this.doc,arguments)}}(dl.prototype[Wl]));return Pe(dl),So.inputStyles={textarea:Nl,contenteditable:zl},So.defineMode=function(e){So.defaults.mode||"null"==e||(So.defaults.mode=e),qe.apply(this,arguments)},So.defineMIME=Ve,So.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),So.defineMIME("text/plain","null"),So.defineExtension=function(e,t){So.prototype[e]=t},So.defineDocExtension=function(e,t){dl.prototype[e]=t},So.fromTextArea=$o,qo(So),So.version="5.24.0",So})}),d=function(e){for(var t=arguments,r=1;r$/g.test(r)?r:r+"\n",template:n?n.innerHTML:"",script:i?i.innerHTML:"",styles:o}:{content:r,script:r}}catch(e){return{error:e}}},v=/\.((js)|(jsx))$/,y={};window.require=o;var b=function(e,t){var r=e.template,n=e.script;void 0===n&&(n="module.exports={}");var i=e.styles;void 0===t&&(t={});try{if("module.exports={}"===n&&!r)throw Error("no data");var o=l(n,t);return r&&(o.template=r),{result:o,styles:i&&i.join(" ")}}catch(e){return{error:e}}},w={name:"Vuep",props:{template:String,options:{},keepData:Boolean,value:String,scope:Object,iframe:Boolean},data:function(){return{content:"",preview:"",styles:"",error:""}},render:function(e){var t,r=this;return t=this.error?e("div",{class:"vuep-error"},[this.error]):e(m,{class:"vuep-preview",props:{value:this.preview,styles:this.styles,keepData:this.keepData,iframe:this.iframe},on:{error:this.handleError}}),e("div",{class:"vuep"},[e(h,{class:"vuep-editor",props:{value:this.content,options:this.options},on:{change:[this.executeCode,function(e){return r.$emit("input",e)}]}}),t])},watch:{value:{immediate:!0,handler:function(e){e&&this.executeCode(e)}}},created:function(){if(!this.$isServer){var e=this.template;if(/^[\.#]/.test(this.template)){var t=document.querySelector(this.template);if(!t)throw Error(this.template+" is not found");e=t.innerHTML}e&&(this.executeCode(e),this.$emit("input",e))}},methods:{handleError:function(e){this.error=e},executeCode:function(e){this.error="";var t=g(e);if(t.error)return void(this.error=t.error.message);var r=b(t,this.scope);return r.error?void(this.error=r.error.message):(this.content=t.content,this.preview=r.result,void(r.styles&&(this.styles=r.styles)))}}};w.config=function(e){w.props.options.default=function(){return e}},w.install=s,"undefined"!=typeof Vue&&Vue.use(s);var x=r(function(e,t){!function(r){r("object"==typeof t&&"object"==typeof e?u:CodeMirror)}(function(e){e.overlayMode=function(t,r,n){return{startState:function(){return{base:e.startState(t),overlay:e.startState(r),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(n){return{base:e.copyState(t,n.base),overlay:e.copyState(r,n.overlay),basePos:n.basePos,baseCur:null,overlayPos:n.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)2){n.pending=[];for(var f=2;f-1)return e.Pass;var a=n.indent.length-1,l=t[n.state];e:for(;;){for(var c=0;c*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):"u"==r&&e.match(/rl(-prefix)?\(/)||"d"==r&&e.match("omain(")||"r"==r&&e.match("egexp(")?(e.backUp(1),t.tokenize=a,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function o(e){return function(t,r){for(var i,o=!1;null!=(i=t.next());){if(i==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==i}return(i==e||!o&&")"!=e)&&(r.tokenize=null),n("string","string")}}function a(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=o(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(n===!1?0:g),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function u(e,t,r){return O[r.context.type](e,t,r)}function d(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev;return u(e,t,r)}function f(e){var t=e.current().toLowerCase();m=T.hasOwnProperty(t)?"atom":L.hasOwnProperty(t)?"keyword":"variable"}var p=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var h,m,g=t.indentUnit,v=r.tokenHooks,y=r.documentTypes||{},b=r.mediaTypes||{},w=r.mediaFeatures||{},x=r.mediaValueKeywords||{},k=r.propertyKeywords||{},C=r.nonStandardPropertyKeywords||{},S=r.fontProperties||{},M=r.counterDescriptors||{},L=r.colorKeywords||{},T=r.valueKeywords||{},A=r.allowNested,z=r.lineComment,N=r.supportsAtComponent===!0,O={};return O.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(N&&/@component/.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)m="builtin";else if("word"==e)m="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(A&&"("==e)return s(r,t,"parens")}return r.context.type},O.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return k.hasOwnProperty(n)?(m="property","maybeprop"):C.hasOwnProperty(n)?(m="string-2","maybeprop"):A?(m=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(m+=" error","maybeprop")}return"meta"==e?"block":A||"hash"!=e&&"qualifier"!=e?O.top(e,t,r):(m="error","block")},O.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):u(e,t,r)},O.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&A)return s(r,t,"propBlock");if("}"==e||"{"==e)return d(e,t,r);if("("==e)return s(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)f(t);else if("interpolation"==e)return s(r,t,"interpolation")}else m+=" error";return"prop"},O.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(m="property","maybeprop"):r.context.type},O.parens=function(e,t,r){return"{"==e||"}"==e?d(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&f(t),"parens")},O.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(m="variable-3",r.context.type):u(e,t,r)},O.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(m="tag",r.context.type):O.atBlock(e,t,r)},O.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,r);if("{"==e)return c(r)&&s(r,t,A?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();m="only"==n||"not"==n||"and"==n||"or"==n?"keyword":b.hasOwnProperty(n)?"attribute":w.hasOwnProperty(n)?"property":x.hasOwnProperty(n)?"keyword":k.hasOwnProperty(n)?"property":C.hasOwnProperty(n)?"string-2":T.hasOwnProperty(n)?"atom":L.hasOwnProperty(n)?"keyword":"error"}return r.context.type},O.atComponentBlock=function(e,t,r){return"}"==e?d(e,t,r):"{"==e?c(r)&&s(r,t,A?"block":"top",!1):("word"==e&&(m="error"),r.context.type)},O.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?d(e,t,r,2):O.atBlock(e,t,r)},O.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(m="variable","restricted_atBlock_before"):u(e,t,r)},O.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(m="@font-face"==r.stateArg&&!S.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!M.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},O.keyframes=function(e,t,r){return"word"==e?(m="variable","keyframes"):"{"==e?s(r,t,"top"):u(e,t,r)},O.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?d(e,t,r):("word"==e?m="tag":"hash"==e&&(m="builtin"),"at")},O.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?d(e,t,r):("word"==e?m="variable":"variable"!=e&&"("!=e&&")"!=e&&(m="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:p?"block":"top",stateArg:null,context:new l(p?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||i)(e,t);return r&&"object"==typeof r&&(h=r[1],r=r[0]),m=r,t.state=O[t.state](h,e,t),m},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),i=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(i=Math.max(0,r.indent-g),r=r.prev):(r=r.prev,i=r.indent)),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:z,fold:"brace"}});var n=["domain","regexp","url","url-prefix"],i=t(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(o),l=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","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-decoration-break","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","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","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","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","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","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","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],f=t(d),p=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],h=t(p),m=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=t(m),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(v),b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],w=t(b),x=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],k=t(x),C=n.concat(o).concat(l).concat(c).concat(d).concat(p).concat(b).concat(x); +o.input.reset())};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,a=n.textarea,l=kr(i,e),s=o.scroller.scrollTop;if(l&&!ta){var c=i.options.resetSelectionOnContextMenu;c&&i.doc.sel.contains(l)==-1&&un(i,ci)(i.doc,On(l),xa);var u=a.style.cssText,d=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var f=n.wrapper.getBoundingClientRect();a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(Yo?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var p;if(Qo&&(p=window.scrollY),o.input.focus(),Qo&&window.scrollTo(null,p),o.input.reset(),i.somethingSelected()||(a.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),Yo&&Zo>=9&&t(),pa){He(e);var h=function(){Ae(window,"mouseup",h),setTimeout(r,20)};Wa(window,"mouseup",h)}else setTimeout(r,50)}},Nl.prototype.readOnlyChanged=function(e){e||this.reset()},Nl.prototype.setUneditable=function(){},Nl.prototype.needsContentAttribute=!1,wo(So),Eo(So);var Ol="iter insert remove copy getEditor constructor".split(" ");for(var Wl in dl.prototype)dl.prototype.hasOwnProperty(Wl)&&d(Ol,Wl)<0&&(So.prototype[Wl]=function(e){return function(){return e.apply(this.doc,arguments)}}(dl.prototype[Wl]));return Pe(dl),So.inputStyles={textarea:Nl,contenteditable:zl},So.defineMode=function(e){So.defaults.mode||"null"==e||(So.defaults.mode=e),qe.apply(this,arguments)},So.defineMIME=Ve,So.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),So.defineMIME("text/plain","null"),So.defineExtension=function(e,t){So.prototype[e]=t},So.defineDocExtension=function(e,t){dl.prototype[e]=t},So.fromTextArea=$o,qo(So),So.version="5.24.0",So})}),d=function(e){for(var t=arguments,r=1;r$/g.test(r)?r:r+"\n",template:n?n.innerHTML:"",script:i?i.innerHTML:"",styles:o}:{content:r,script:r}}catch(e){return{error:e}}},v=/\.((js)|(jsx))$/,y={};window.require=o;var b=function(e,t){var r=e.template,n=e.script;void 0===n&&(n="module.exports={}");var i=e.styles;void 0===t&&(t={});try{if("module.exports={}"===n&&!r)throw Error("no data");var o=l(n,t);return r&&(o.template=r),{result:o,styles:i&&i.join(" ")}}catch(e){return{error:e}}},w={name:"Vuep",props:{template:String,options:{},keepData:Boolean,value:String,scope:Object,iframe:Boolean},data:function(){return{content:"",preview:"",styles:"",error:""}},render:function(e){var t,r=this;return t=this.error?e("div",{class:"vuep-error"},[this.error]):e(m,{class:"vuep-preview",props:{value:this.preview,styles:this.styles,keepData:this.keepData,iframe:this.iframe},on:{error:this.handleError}}),e("div",{class:"vuep"},[e(h,{class:"vuep-editor",props:{value:this.content,options:this.options},on:{change:[this.executeCode,function(e){return r.$emit("input",e)}]}}),t])},watch:{value:{immediate:!0,handler:function(e){e&&this.executeCode(e)}}},created:function(){this.$isServer},mounted:function(){var e=this.template;if(/^[\.#]/.test(this.template)){var t=document.querySelector(this.template);if(!t)throw Error(this.template+" is not found");e=t.innerHTML}e&&(this.executeCode(e),this.$emit("input",e))},methods:{handleError:function(e){this.error=e},executeCode:function(e){this.error="";var t=g(e);if(t.error)return void(this.error=t.error.message);var r=b(t,this.scope);return r.error?void(this.error=r.error.message):(this.content=t.content,this.preview=r.result,void(r.styles&&(this.styles=r.styles)))}}};w.config=function(e){w.props.options.default=function(){return e}},w.install=s,"undefined"!=typeof Vue&&Vue.use(s);var x=r(function(e,t){!function(r){r("object"==typeof t&&"object"==typeof e?u:CodeMirror)}(function(e){e.overlayMode=function(t,r,n){return{startState:function(){return{base:e.startState(t),overlay:e.startState(r),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(n){return{base:e.copyState(t,n.base),overlay:e.copyState(r,n.overlay),basePos:n.basePos,baseCur:null,overlayPos:n.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)2){n.pending=[];for(var f=2;f-1)return e.Pass;var a=n.indent.length-1,l=t[n.state];e:for(;;){for(var c=0;c*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):"u"==r&&e.match(/rl(-prefix)?\(/)||"d"==r&&e.match("omain(")||"r"==r&&e.match("egexp(")?(e.backUp(1),t.tokenize=a,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function o(e){return function(t,r){for(var i,o=!1;null!=(i=t.next());){if(i==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==i}return(i==e||!o&&")"!=e)&&(r.tokenize=null),n("string","string")}}function a(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=o(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(n===!1?0:g),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function u(e,t,r){return O[r.context.type](e,t,r)}function d(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev;return u(e,t,r)}function f(e){var t=e.current().toLowerCase();m=T.hasOwnProperty(t)?"atom":L.hasOwnProperty(t)?"keyword":"variable"}var p=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var h,m,g=t.indentUnit,v=r.tokenHooks,y=r.documentTypes||{},b=r.mediaTypes||{},w=r.mediaFeatures||{},x=r.mediaValueKeywords||{},k=r.propertyKeywords||{},C=r.nonStandardPropertyKeywords||{},S=r.fontProperties||{},M=r.counterDescriptors||{},L=r.colorKeywords||{},T=r.valueKeywords||{},A=r.allowNested,z=r.lineComment,N=r.supportsAtComponent===!0,O={};return O.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(N&&/@component/.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)m="builtin";else if("word"==e)m="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(A&&"("==e)return s(r,t,"parens")}return r.context.type},O.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return k.hasOwnProperty(n)?(m="property","maybeprop"):C.hasOwnProperty(n)?(m="string-2","maybeprop"):A?(m=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(m+=" error","maybeprop")}return"meta"==e?"block":A||"hash"!=e&&"qualifier"!=e?O.top(e,t,r):(m="error","block")},O.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):u(e,t,r)},O.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&A)return s(r,t,"propBlock");if("}"==e||"{"==e)return d(e,t,r);if("("==e)return s(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)f(t);else if("interpolation"==e)return s(r,t,"interpolation")}else m+=" error";return"prop"},O.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(m="property","maybeprop"):r.context.type},O.parens=function(e,t,r){return"{"==e||"}"==e?d(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&f(t),"parens")},O.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(m="variable-3",r.context.type):u(e,t,r)},O.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(m="tag",r.context.type):O.atBlock(e,t,r)},O.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,r);if("{"==e)return c(r)&&s(r,t,A?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();m="only"==n||"not"==n||"and"==n||"or"==n?"keyword":b.hasOwnProperty(n)?"attribute":w.hasOwnProperty(n)?"property":x.hasOwnProperty(n)?"keyword":k.hasOwnProperty(n)?"property":C.hasOwnProperty(n)?"string-2":T.hasOwnProperty(n)?"atom":L.hasOwnProperty(n)?"keyword":"error"}return r.context.type},O.atComponentBlock=function(e,t,r){return"}"==e?d(e,t,r):"{"==e?c(r)&&s(r,t,A?"block":"top",!1):("word"==e&&(m="error"),r.context.type)},O.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?d(e,t,r,2):O.atBlock(e,t,r)},O.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(m="variable","restricted_atBlock_before"):u(e,t,r)},O.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(m="@font-face"==r.stateArg&&!S.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!M.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},O.keyframes=function(e,t,r){return"word"==e?(m="variable","keyframes"):"{"==e?s(r,t,"top"):u(e,t,r)},O.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?d(e,t,r):("word"==e?m="tag":"hash"==e&&(m="builtin"),"at")},O.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?d(e,t,r):("word"==e?m="variable":"variable"!=e&&"("!=e&&")"!=e&&(m="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:p?"block":"top",stateArg:null,context:new l(p?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||i)(e,t);return r&&"object"==typeof r&&(h=r[1],r=r[0]),m=r,t.state=O[t.state](h,e,t),m},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),i=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(i=Math.max(0,r.indent-g),r=r.prev):(r=r.prev,i=r.indent)),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:z,fold:"brace"}});var n=["domain","regexp","url","url-prefix"],i=t(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(o),l=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","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-decoration-break","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","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","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","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","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","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","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],f=t(d),p=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],h=t(p),m=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=t(m),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(v),b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],w=t(b),x=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],k=t(x),C=n.concat(o).concat(l).concat(c).concat(d).concat(p).concat(b).concat(x); e.registerHelper("hintWords","css",C),e.defineMIME("text/css",{documentTypes:i,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:h,fontProperties:g,counterDescriptors:y,colorKeywords:w,valueKeywords:k,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:h,colorKeywords:w,valueKeywords:k,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/)&&[null,"{"]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:h,colorKeywords:w,valueKeywords:k,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:i,mediaTypes:a,mediaFeatures:s,propertyKeywords:f,nonStandardPropertyKeywords:h,fontProperties:g,counterDescriptors:y,colorKeywords:w,valueKeywords:k,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})})}),S=r(function(e,t){!function(r){r("object"==typeof t&&"object"==typeof e?u:CodeMirror)}(function(e){var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(n,i){function o(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(s("atom","]]>")):null:e.match("--")?r(s("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(L=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==n){var i;return i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),i?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=o,L=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return L="equals",null;if("<"==r){t.tokenize=o,t.state=p,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\'\-]*[^\s\u00a0=<>\"\'\/\-]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=o;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=o;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function u(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(C.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function f(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!C.contextGrabbers.hasOwnProperty(r)||!C.contextGrabbers[r].hasOwnProperty(t))return;d(e)}}function p(e,t,r){return"openTag"==e?(r.tagStart=t.column(),h):"closeTag"==e?m:p}function h(e,t,r){return"word"==e?(r.tagName=t.current(),T="tag",y):(T="error",h)}function m(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&C.implicitlyClosed.hasOwnProperty(r.context.tagName)&&d(r),r.context&&r.context.tagName==n||C.matchClosing===!1?(T="tag",g):(T="tag error",v)}return T="error",v}function g(e,t,r){return"endTag"!=e?(T="error",g):(d(r),p)}function v(e,t,r){return T="error",g(e,t,r)}function y(e,t,r){if("word"==e)return T="attribute",b;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||C.autoSelfClosers.hasOwnProperty(n)?f(r,n):(f(r,n),r.context=new u(r,n,i==r.indented)),p}return T="error",y}function b(e,t,r){return"equals"==e?w:(C.allowMissing||(T="error"),y(e,t,r))}function w(e,t,r){return"string"==e?x:"word"==e&&C.allowUnquoted?(T="string",y):(T="error",y(e,t,r))}function x(e,t,r){return"string"==e?x:y(e,t,r)}var k=n.indentUnit,C={},S=i.htmlMode?t:r;for(var M in S)C[M]=S[M];for(var M in i)C[M]=i[M];var L,T;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:p,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;L=null;var r=t.tokenize(e,t);return(r||L)&&"comment"!=r&&(T=null,t.state=t.state(L||r,e,t),T&&(r="error"==T?r+" error":T)),r},indent:function(t,r,n){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+k;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=o)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return C.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+k*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/$/,blockCommentStart:"",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(e){e.state==w&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})}),M=r(function(e,t){!function(r){r("object"==typeof t&&"object"==typeof e?u:CodeMirror)}(function(e){function t(e,t,r){return/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}e.defineMode("javascript",function(r,n){function i(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function o(e,t,r){return Me=e,Le=r,t}function a(e,r){var n=e.next();if('"'==n||"'"==n)return r.tokenize=l(n),r.tokenize(e,r);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==n&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return o(n);if("="==n&&e.eat(">"))return o("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if("0"==n&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),o("number","number");if("0"==n&&e.eat(/b/i))return e.eatWhile(/[01]/i),o("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==n)return e.eat("*")?(r.tokenize=s,s(e,r)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):t(e,r,1)?(i(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(e.eatWhile(Ee),o("operator","operator",e.current()));if("`"==n)return r.tokenize=c,c(e,r);if("#"==n)return e.skipToEnd(),o("error","error");if(Ee.test(n))return">"==n&&r.lexical&&">"==r.lexical.type||e.eatWhile(Ee),o("operator","operator",e.current());if(We.test(n)){e.eatWhile(We);var a=e.current(),u=Pe.propertyIsEnumerable(a)&&Pe[a];return u&&"."!=r.lastType?o(u.type,u.style,a):o("variable","variable",a)}}function l(e){return function(t,r){var n,i=!1;if(ze&&"@"==t.peek()&&t.match(je))return r.tokenize=a,o("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=a),o("string","string")}}function s(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=a;break}n="*"==r}return o("comment","comment")}function c(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=a;break}n=!n&&"\\"==r}return o("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Oe){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,a=r-1;a>=0;--a){var l=e.string.charAt(a),s=De.indexOf(l);if(s>=0&&s<3){if(!i){++a;break}if(0==--i){"("==l&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(We.test(l))o=!0;else{if(/["'\/]/.test(l))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}function d(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function f(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function p(e,t,r,n,i){var o=e.cc;for(Ie.state=e,Ie.stream=i,Ie.marked=null,Ie.cc=o,Ie.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():Ne?C:k;if(a(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Ie.marked?Ie.marked:"variable"==r&&f(e,n)?"variable-2":t}}}function h(){for(var e=arguments,t=arguments.length-1;t>=0;t--)Ie.cc.push(e[t])}function m(){return h.apply(null,arguments),!0}function g(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var r=Ie.state;if(Ie.marked="def",r.context){if(t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function v(){Ie.state.context={prev:Ie.state.context,vars:Ie.state.localVars},Ie.state.localVars=Fe}function y(){Ie.state.localVars=Ie.state.context.vars,Ie.state.context=Ie.state.context.prev}function b(e,t){var r=function(){var r=Ie.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new d(n,Ie.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function w(){var e=Ie.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function x(e){function t(r){return r==e?m():";"==e?h():m(t)}return t}function k(e,t){return"var"==e?m(b("vardef",t.length),Q,x(";"),w):"keyword a"==e?m(b("form"),M,k,w):"keyword b"==e?m(b("form"),k,w):"{"==e?m(b("}"),U,w):";"==e?m():"if"==e?("else"==Ie.state.lexical.info&&Ie.state.cc[Ie.state.cc.length-1]==w&&Ie.state.cc.pop()(),m(b("form"),M,k,w,ne)):"function"==e?m(ce):"for"==e?m(b("form"),ie,k,w):"variable"==e?m(b("stat"),I):"switch"==e?m(b("form"),M,b("}","switch"),x("{"),U,w,w):"case"==e?m(C,x(":")):"default"==e?m(x(":")):"catch"==e?m(b("form"),v,x("("),ue,x(")"),k,w,y):"class"==e?m(b("form"),fe,w):"export"==e?m(b("stat"),ge,w):"import"==e?m(b("stat"),ye,w):"module"==e?m(b("form"),J,b("}"),x("{"),U,w,w):"type"==e?m(G,x("operator"),G,x(";")):"async"==e?m(k):h(b("stat"),C,x(";"),w)}function C(e){return L(e,!1)}function S(e){return L(e,!0)}function M(e){return"("!=e?h():m(b(")"),C,x(")"),w)}function L(e,t){if(Ie.state.fatArrowAt==Ie.stream.start){var r=t?E:P;if("("==e)return m(v,b(")"),q(J,")"),w,x("=>"),r,y);if("variable"==e)return h(v,J,x("=>"),r,y)}var n=t?N:z;return He.hasOwnProperty(e)?m(n):"function"==e?m(ce,n):"class"==e?m(b("form"),de,w):"keyword c"==e||"async"==e?m(t?A:T):"("==e?m(b(")"),T,x(")"),w,n):"operator"==e||"spread"==e?m(t?S:C):"["==e?m(b("]"),Ce,w,n):"{"==e?V(B,"}",null,n):"quasi"==e?h(O,n):"new"==e?m(j(t)):m()}function T(e){return e.match(/[;\}\)\],]/)?h():h(C)}function A(e){return e.match(/[;\}\)\],]/)?h():h(S)}function z(e,t){return","==e?m(C):N(e,t,!1)}function N(e,t,r){var n=0==r?z:N,i=0==r?C:S;return"=>"==e?m(v,r?E:P,y):"operator"==e?/\+\+|--/.test(t)?m(n):"?"==t?m(C,x(":"),i):m(i):"quasi"==e?h(O,n):";"!=e?"("==e?V(S,")","call",n):"."==e?m(F,n):"["==e?m(b("]"),T,x("]"),w,n):void 0:void 0}function O(e,t){return"quasi"!=e?h():"${"!=t.slice(t.length-2)?m(O):m(C,W)}function W(e){if("}"==e)return Ie.marked="string-2",Ie.state.tokenize=c,m(O)}function P(e){return u(Ie.stream,Ie.state),h("{"==e?k:C)}function E(e){return u(Ie.stream,Ie.state),h("{"==e?k:S)}function j(e){return function(t){return"."==t?m(e?H:D):h(e?S:C)}}function D(e,t){if("target"==t)return Ie.marked="keyword",m(z)}function H(e,t){if("target"==t)return Ie.marked="keyword",m(N)}function I(e){return":"==e?m(w,k):h(z,x(";"),w)}function F(e){if("variable"==e)return Ie.marked="property",m()}function B(e,t){return"async"==e?(Ie.marked="property",m(B)):"variable"==e||"keyword"==Ie.style?(Ie.marked="property",m("get"==t||"set"==t?R:$)):"number"==e||"string"==e?(Ie.marked=ze?"property":Ie.style+" property",m($)):"jsonld-keyword"==e?m($):"modifier"==e?m(B):"["==e?m(C,x("]"),$):"spread"==e?m(C):":"==e?h($):void 0}function R(e){return"variable"!=e?h($):(Ie.marked="property",m(ce))}function $(e){return":"==e?m(S):"("==e?h(ce):void 0}function q(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var a=Ie.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),m(function(r,n){return r==t||n==t?h():h(e)},n)}return i==t||o==t?m():m(x(t))}return function(r,i){return r==t||i==t?m():h(e,n)}}function V(e,t,r){for(var n=arguments,i=3;i"==e)return m(G)}function X(e,t){return"variable"==e||"keyword"==Ie.style?(Ie.marked="property",m(X)):"?"==t?m(X):":"==e?m(G):void 0}function Y(e){return"variable"==e?m(Y):":"==e?m(G):void 0}function Z(e,t){return"<"==t?m(b(">"),q(G,">"),w,Z):"|"==t||"."==e?m(G):"["==e?m(x("]"),Z):void 0}function Q(){return h(J,K,te,re)}function J(e,t){return"modifier"==e?m(J):"variable"==e?(g(t),m()):"spread"==e?m(J):"["==e?V(J,"]"):"{"==e?V(ee,"}"):void 0}function ee(e,t){return"variable"!=e||Ie.stream.match(/^\s*:/,!1)?("variable"==e&&(Ie.marked="property"),"spread"==e?m(J):"}"==e?h():m(x(":"),J,te)):(g(t),m(te))}function te(e,t){if("="==t)return m(S)}function re(e){if(","==e)return m(Q)}function ne(e,t){if("keyword b"==e&&"else"==t)return m(b("form","else"),k,w)}function ie(e){if("("==e)return m(b(")"),oe,x(")"),w)}function oe(e){return"var"==e?m(Q,x(";"),le):";"==e?m(le):"variable"==e?m(ae):h(C,x(";"),le)}function ae(e,t){return"in"==t||"of"==t?(Ie.marked="keyword",m(C)):m(z,le)}function le(e,t){return";"==e?m(se):"in"==t||"of"==t?(Ie.marked="keyword",m(C)):h(C,x(";"),se)}function se(e){")"!=e&&m(C)}function ce(e,t){return"*"==t?(Ie.marked="keyword",m(ce)):"variable"==e?(g(t),m(ce)):"("==e?m(v,b(")"),q(ue,")"),w,K,k,y):void 0}function ue(e){return"spread"==e?m(ue):h(J,K,te)}function de(e,t){return"variable"==e?fe(e,t):pe(e,t)}function fe(e,t){if("variable"==e)return g(t),m(pe)}function pe(e,t){return"extends"==t||"implements"==t||Oe&&","==e?m(Oe?G:C,pe):"{"==e?m(b("}"),he,w):void 0}function he(e,t){return"variable"==e||"keyword"==Ie.style?("async"==t||"static"==t||"get"==t||"set"==t||Oe&&("public"==t||"private"==t||"protected"==t||"readonly"==t||"abstract"==t))&&Ie.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Ie.marked="keyword",m(he)):(Ie.marked="property",m(Oe?me:ce,he)):"*"==t?(Ie.marked="keyword",m(he)):";"==e?m(he):"}"==e?m():void 0}function me(e,t){return"?"==t?m(me):":"==e?m(G,te):h(ce)}function ge(e,t){return"*"==t?(Ie.marked="keyword",m(ke,x(";"))):"default"==t?(Ie.marked="keyword",m(C,x(";"))):"{"==e?m(q(ve,"}"),ke,x(";")):h(k)}function ve(e,t){return"as"==t?(Ie.marked="keyword",m(x("variable"))):"variable"==e?h(S,ve):void 0}function ye(e){return"string"==e?m():h(be,we,ke)}function be(e,t){return"{"==e?V(be,"}"):("variable"==e&&g(t),"*"==t&&(Ie.marked="keyword"),m(xe))}function we(e){if(","==e)return m(be,we)}function xe(e,t){if("as"==t)return Ie.marked="keyword",m(be)}function ke(e,t){if("from"==t)return Ie.marked="keyword",m(C)}function Ce(e){return"]"==e?m():h(q(S,"]"))}function Se(e,t){return"operator"==e.lastType||","==e.lastType||Ee.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var Me,Le,Te=r.indentUnit,Ae=n.statementIndent,ze=n.jsonld,Ne=n.json||ze,Oe=n.typescript,We=n.wordCharacters||/[\w$\xa1-\uffff]/,Pe=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},a={if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:n,break:n,continue:n,new:e("new"),delete:n,throw:n,debugger:n,var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n,async:e("async")};if(Oe){var l={type:"variable",style:"variable-3"},s={interface:e("class"),implements:n,namespace:n,module:e("module"),enum:e("module"),type:e("type"),public:e("modifier"),private:e("modifier"),protected:e("modifier"),abstract:e("modifier"),as:i,string:l,number:l,boolean:l,any:l};for(var c in s)a[c]=s[c]}return a}(),Ee=/[+\-*&%=<>!?|~^]/,je=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,De="([{}])",He={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Ie={state:null,column:null,marked:null,cc:null},Fe={name:"this",next:{name:"arguments"}};return w.lex=!0,{startState:function(e){var t={tokenize:a,lastType:"sof",cc:[],lexical:new d((e||0)-Te,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=s&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Me?r:(t.lastType="operator"!=Me||"++"!=Le&&"--"!=Le?Me:"incdec",p(t,r,Me,Le,e))},indent:function(t,r){if(t.tokenize==s)return e.Pass;if(t.tokenize!=a)return 0;var i,o=r&&r.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==w)l=l.prev;else if(u!=ne)break}for(;("stat"==l.type||"form"==l.type)&&("}"==o||(i=t.cc[t.cc.length-1])&&(i==z||i==N)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;Ae&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var d=l.type,f=o==d;return"vardef"==d?l.indented+("operator"==t.lastType||","==t.lastType?l.info+1:0):"form"==d&&"{"==o?l.indented:"form"==d?l.indented+Te:"stat"==d?l.indented+(Se(t,r)?Ae||Te:0):"switch"!=l.info||f||0==n.doubleIndentSwitch?l.align?l.column+(f?0:1):l.indented+(f?0:Te):l.indented+(/^(?:case|default)\b/.test(r)?Te:2*Te)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Ne?null:"/*",blockCommentEnd:Ne?null:"*/",lineComment:Ne?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Ne?"json":"javascript",jsonldMode:ze,jsonMode:Ne,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=C&&t!=S||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})}),L=r(function(e,t){!function(r){"object"==typeof t&&"object"==typeof e?r(u,S,M,C):r(CodeMirror)}(function(e){function t(e,t,r){var n=e.current(),i=n.search(t);return i>-1?e.backUp(n.length-i):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function r(e){var t=s[e];return t?t:s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function n(e,t){var n=e.match(r(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function i(e,t){return new RegExp((t?"^":"")+"","i")}function o(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),i=e[r],o=i.length-1;o>=0;o--)n.unshift(i[o])}function a(e,t){for(var r=0;r\s\/]/.test(n.current())&&(l=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(l))o.inTag=l+" ";else if(o.inTag&&f&&/>$/.test(n.current())){var p=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var h=">"==n.current()&&a(u[p[1]],p[2]),m=e.getMode(r,h),g=i(p[1],!0),v=i(p[1],!1);o.token=function(e,r){return e.match(g,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,v,r.localMode.token(e,r.localState))},o.localMode=m,o.localState=e.startState(m,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=n.current(),n.eol()&&(o.inTag+=" "));return d}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),u={},d=n&&n.tags,f=n&&n.scriptTypes;if(o(l,u),d&&o(d,u),f)for(var p=f.length-1;p>=0;p--)u.script.unshift(["type",f[p].matches,f[p].mode]);return{startState:function(){var t=e.startState(c);return{token:s,inTag:null,localMode:null,localState:null,htmlState:t}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r){return!t.localMode||/^\s*<\//.test(r)?c.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})}),T=r(function(e,t){!function(r){r("object"==typeof t&&"object"==typeof e?u:CodeMirror)}(function(e){e.defineMode("coffeescript",function(e,t){function r(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}function n(e,t){if(e.sol()){null===t.scope.align&&(t.scope.align=!1);var r=t.scope.offset;if(e.eatSpace()){var n=e.indentation();return n>r&&"coffee"==t.scope.type?"indent":n0&&l(e,t)}if(e.eatSpace())return null;var a=e.peek();if(e.match("####"))return e.skipToEnd(),"comment";if(e.match("###"))return t.tokenize=o,t.tokenize(e,t);if("#"===a)return e.skipToEnd(),"comment";if(e.match(/^-?[0-9\.]/,!1)){var s=!1;if(e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(s=!0),e.match(/^-?\d+\.\d*/)&&(s=!0),e.match(/^-?\.\d+/)&&(s=!0),s)return"."==e.peek()&&e.backUp(1),"number";var m=!1;if(e.match(/^-?0x[0-9a-f]+/i)&&(m=!0),e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(m=!0),e.match(/^-?0(?![\dx])/i)&&(m=!0),m)return"number"}if(e.match(y))return t.tokenize=i(e.current(),!1,"string"),t.tokenize(e,t);if(e.match(b)){if("/"!=e.current()||e.match(/^.*\//,!1))return t.tokenize=i(e.current(),!0,"string-2"),t.tokenize(e,t);e.backUp(1)}return e.match(u)||e.match(h)?"operator":e.match(d)?"punctuation":e.match(x)?"atom":e.match(p)||t.prop&&e.match(f)?"property":e.match(v)?"keyword":e.match(f)?"variable":(e.next(),c)}function i(e,r,i){return function(o,a){for(;!o.eol();)if(o.eatWhile(/[^'"\/\\]/),o.eat("\\")){if(o.next(),r&&o.eol())return i}else{if(o.match(e))return a.tokenize=n,i;o.eat(/['"\/]/)}return r&&(t.singleLineStringErrors?i=c:a.tokenize=n),i}}function o(e,t){for(;!e.eol();){if(e.eatWhile(/[^#]/),e.match("###")){t.tokenize=n;break}e.eatWhile("#")}return"comment"}function a(t,r,n){n=n||"coffee";for(var i=0,o=!1,a=null,l=r.scope;l;l=l.prev)if("coffee"===l.type||"}"==l.type){i=l.offset+e.indentUnit;break}"coffee"!==n?(o=null,a=t.column()+t.current().length):r.scope.align&&(r.scope.align=!1),r.scope={offset:i,type:n,prev:r.scope,align:o,alignOffset:a}}function l(e,t){if(t.scope.prev){if("coffee"===t.scope.type){for(var r=e.indentation(),n=!1,i=t.scope;i;i=i.prev)if(r===i.offset){n=!0;break}if(!n)return!0;for(;t.scope.prev&&t.scope.offset!==r;)t.scope=t.scope.prev;return!1}return t.scope=t.scope.prev,!1}}function s(e,t){var r=t.tokenize(e,t),n=e.current();"return"===n&&(t.dedent=!0),(("->"===n||"=>"===n)&&e.eol()||"indent"===r)&&a(e,t);var i="[({".indexOf(n);if(i!==-1&&a(e,t,"])}".slice(i,i+1)),m.exec(n)&&a(e,t),"then"==n&&l(e,t),"dedent"===r&&l(e,t))return c;if(i="])}".indexOf(n),i!==-1){for(;"coffee"==t.scope.type&&t.scope.prev;)t.scope=t.scope.prev;t.scope.type==n&&(t.scope=t.scope.prev)}return t.dedent&&e.eol()&&("coffee"==t.scope.type&&t.scope.prev&&(t.scope=t.scope.prev),t.dedent=!1),r}var c="error",u=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,d=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,f=/^[_A-Za-z$][_A-Za-z$0-9]*/,p=/^@[_A-Za-z$][_A-Za-z$0-9]*/,h=r(["and","or","not","is","isnt","in","instanceof","typeof"]),m=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],g=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"],v=r(m.concat(g));m=r(m);var y=/^('{3}|\"{3}|['\"])/,b=/^(\/{3}|\/)/,w=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],x=r(w),k={startState:function(e){return{tokenize:n,scope:{offset:e||0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(e,t){var r=null===t.scope.align&&t.scope;r&&e.sol()&&(r.align=!1);var n=s(e,t);return n&&"comment"!=n&&(r&&(r.align=!0),t.prop="punctuation"==n&&"."==e.current()),n},indent:function(e,t){if(e.tokenize!=n)return 0;var r=e.scope,i=t&&"])}".indexOf(t.charAt(0))>-1;if(i)for(;"coffee"==r.type&&r.prev;)r=r.prev;var o=i&&r.type===t.charAt(0);return r.align?r.alignOffset-(o?1:0):(o?r.prev:r).offset},lineComment:"#",fold:"indent"};return k}),e.defineMIME("text/x-coffeescript","coffeescript"),e.defineMIME("text/coffeescript","coffeescript")})}),A=r(function(e,t){!function(r){"object"==typeof t&&"object"==typeof e?r(u,C):r(CodeMirror)}(function(e){e.defineMode("sass",function(t){function r(e){return new RegExp("^"+e.join("|"))}function n(e){return!e.peek()||e.match(/\s+$/,!1)}function i(e,t){var r=e.peek();return")"===r?(e.next(),t.tokenizer=u,"operator"):"("===r?(e.next(),e.eatSpace(),"operator"):"'"===r||'"'===r?(t.tokenizer=a(e.next()),"string"):(t.tokenizer=a(")",!1),"string")}function o(e,t){return function(r,n){return r.sol()&&r.indentation()<=e?(n.tokenizer=u,u(r,n)):(t&&r.skipTo("*/")?(r.next(),r.next(),n.tokenizer=u):r.skipToEnd(),"comment")}}function a(e,t){function r(i,o){var a=i.next(),s=i.peek(),c=i.string.charAt(i.pos-2),d="\\"!==a&&s===e||a===e&&"\\"!==c;return d?(a!==e&&t&&i.next(),n(i)&&(o.cursorHalf=0),o.tokenizer=u,"string"):"#"===a&&"{"===s?(o.tokenizer=l(r),i.next(),"operator"):"string"}return null==t&&(t=!0),r}function l(e){return function(t,r){return"}"===t.peek()?(t.next(),r.tokenizer=e,"operator"):u(t,r)}}function s(e){if(0==e.indentCount){e.indentCount++;var r=e.scopes[0].offset,n=r+t.indentUnit;e.scopes.unshift({offset:n})}}function c(e){1!=e.scopes.length&&e.scopes.shift()}function u(e,t){var r=e.peek();if(e.match("/*"))return t.tokenizer=o(e.indentation(),!0),t.tokenizer(e,t);if(e.match("//"))return t.tokenizer=o(e.indentation(),!1),t.tokenizer(e,t);if(e.match("#{"))return t.tokenizer=l(u),"operator";if('"'===r||"'"===r)return e.next(),t.tokenizer=a(r),"string";if(t.cursorHalf){if("#"===r&&(e.next(),e.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)))return n(e)&&(t.cursorHalf=0),"number";if(e.match(/^-?[0-9\.]+/))return n(e)&&(t.cursorHalf=0),"number";if(e.match(/^(px|em|in)\b/))return n(e)&&(t.cursorHalf=0),"unit";if(e.match(b))return n(e)&&(t.cursorHalf=0),"keyword";if(e.match(/^url/)&&"("===e.peek())return t.tokenizer=i,n(e)&&(t.cursorHalf=0),"atom";if("$"===r)return e.next(),e.eatWhile(/[\w-]/),n(e)&&(t.cursorHalf=0),"variable-2";if("!"===r)return e.next(),t.cursorHalf=0,e.match(/^[\w]+/)?"keyword":"operator";if(e.match(x))return n(e)&&(t.cursorHalf=0),"operator";if(e.eatWhile(/[\w-]/))return n(e)&&(t.cursorHalf=0),f=e.current().toLowerCase(),g.hasOwnProperty(f)?"atom":m.hasOwnProperty(f)?"keyword":h.hasOwnProperty(f)?(t.prevProp=e.current().toLowerCase(),"property"):"tag";if(n(e))return t.cursorHalf=0,null}else{if("-"===r&&e.match(/^-\w+-/))return"meta";if("."===r){if(e.next(),e.match(/^[\w-]+/))return s(t),"qualifier";if("#"===e.peek())return s(t),"tag"}if("#"===r){if(e.next(),e.match(/^[\w-]+/))return s(t),"builtin";if("#"===e.peek())return s(t),"tag"}if("$"===r)return e.next(),e.eatWhile(/[\w-]/),"variable-2";if(e.match(/^-?[0-9\.]+/))return"number";if(e.match(/^(px|em|in)\b/))return"unit";if(e.match(b))return"keyword";if(e.match(/^url/)&&"("===e.peek())return t.tokenizer=i,"atom";if("="===r&&e.match(/^=[\w-]+/))return s(t),"meta";if("+"===r&&e.match(/^\+[\w-]+/))return"variable-3";if("@"===r&&e.match(/@extend/)&&(e.match(/\s*[\w]/)||c(t)),e.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return s(t),"def";if("@"===r)return e.next(),e.eatWhile(/[\w-]/),"def";if(e.eatWhile(/[\w-]/)){if(e.match(/ *: *[\w-\+\$#!\("']/,!1)){f=e.current().toLowerCase();var d=t.prevProp+"-"+f;return h.hasOwnProperty(d)?"property":h.hasOwnProperty(f)?(t.prevProp=f,"property"):v.hasOwnProperty(f)?"property":"tag"}return e.match(/ *:/,!1)?(s(t),t.cursorHalf=1,t.prevProp=e.current().toLowerCase(),"property"):e.match(/ *,/,!1)?"tag":(s(t),"tag")}if(":"===r)return e.match(k)?"variable-3":(e.next(),t.cursorHalf=1,"operator")}return e.match(x)?"operator":(e.next(),null)}function d(e,r){e.sol()&&(r.indentCount=0);var n=r.tokenizer(e,r),i=e.current();if("@return"!==i&&"}"!==i||c(r),null!==n){for(var o=e.pos-i.length,a=o+t.indentUnit*r.indentCount,l=[],s=0;s","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"],x=r(w),k=/^::?[a-zA-Z_][\w\-]*/;return{startState:function(){return{tokenizer:u,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(e,t){var r=d(e,t);return t.lastToken={style:r,content:e.current()},r},indent:function(e){return e.scopes[0].offset}}}),e.defineMIME("text/x-sass","sass")})}),z=r(function(e,t){!function(r){r("object"==typeof t&&"object"==typeof e?u:CodeMirror)}(function(e){function t(e){return e=e.sort(function(e,t){return t>e}),new RegExp("^(("+e.join(")|(")+"))\\b")}function r(e){for(var t={},r=0;r|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),t.context.line.firstWord=ne?ne[0].replace(/^\s*/,""):"",t.context.line.indent=e.indentation(),D=e.peek(),e.match("//"))return e.skipToEnd(),["comment","comment"];if(e.match("/*"))return t.tokenize=v,v(e,t);if('"'==D||"'"==D)return e.next(),t.tokenize=y(D),t.tokenize(e,t);if("@"==D)return e.next(),e.eatWhile(/[\w\\-]/),["def",e.current()];if("#"==D){if(e.next(),e.match(/^[0-9a-f]{6}|[0-9a-f]{3}/i))return["atom","atom"];if(e.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return e.match(te)?["meta","vendor-prefixes"]:e.match(/^-?[0-9]?\.?[0-9]/)?(e.eatWhile(/[a-z%]/i),["number","unit"]):"!"==D?(e.next(),[e.match(/^(important|optional)/i)?"keyword":"operator","important"]):"."==D&&e.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:e.match(_)?("("==e.peek()&&(t.tokenize=b),["property","word"]):e.match(/^[a-z][\w-]*\(/i)?(e.backUp(1),["keyword","mixin"]):e.match(/^(\+|-)[a-z][\w-]*\(/i)?(e.backUp(1),["keyword","block-mixin"]):e.string.match(/^\s*&/)&&e.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:e.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?(e.backUp(1),["variable-3","reference"]):e.match(/^&{1}\s*$/)?["variable-3","reference"]:e.match(J)?["operator","operator"]:e.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?e.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!M(e.current())?(e.match(/\./),["variable-2","variable-name"]):["variable-2","word"]:e.match(Q)?["operator",e.current()]:/[:;,{}\[\]\(\)]/.test(D)?(e.next(),[null,D]):(e.next(),[null,null])}function v(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}function y(e){return function(t,r){for(var n,i=!1;null!=(n=t.next());){if(n==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==n}return(n==e||!i&&")"!=e)&&(r.tokenize=null),["string","string"]}}function b(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=y(")"),[null,"("]}function w(e,t,r,n){this.type=e,this.indent=t,this.prev=r,this.line=n||{firstWord:"",indent:0}}function x(e,t,r,n){return n=n>=0?n:B,e.context=new w(r,t.indentation()+n,e.context),r}function k(e,t){var r=e.context.indent-B;return t=t||!1,e.context=e.context.prev,t&&(e.context.indent=r),e.context.type}function C(e,t,r){return ie[r.context.type](e,t,r)}function S(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev;return C(e,t,r)}function M(e){return e.toLowerCase()in R}function L(e){return e=e.toLowerCase(),e in q||e in Z}function T(e){return e.toLowerCase()in ee}function A(e){return e.toLowerCase().match(te)}function z(e){var t=e.toLowerCase(),r="variable-2";return M(e)?r="tag":T(e)?r="block-keyword":L(e)?r="property":t in U||t in re?r="atom":"return"==t||t in K?r="keyword":e.match(/^[A-Z]/)&&(r="string"),r}function N(e,t){return E(t)&&("{"==e||"]"==e||"hash"==e||"qualifier"==e)||"block-mixin"==e}function O(e,t){return"{"==e&&t.match(/^\s*\$?[\w-]+/i,!1)}function W(e,t){return":"==e&&t.match(/^[a-z-]+/,!1)}function P(e){return e.sol()||e.string.match(new RegExp("^\\s*"+n(e.current())))}function E(e){return e.eol()||e.match(/^\s*$/,!1)}function j(e){var t=/^\s*[-_]*[a-z0-9]+[\w-]*/i,r="string"==typeof e?e.match(t):e.string.match(t);return r?r[0].replace(/^\s*/,""):""}var D,H,I,F,B=e.indentUnit,R=r(i),$=/^(a|b|i|s|col|em)$/i,q=r(s),V=r(c),U=r(f),K=r(d),G=r(o),_=t(o),X=r(l),Y=r(a),Z=r(u),Q=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,J=t(p),ee=r(h),te=new RegExp(/^\-(moz|ms|o|webkit)-/i),re=r(m),ne="",ie={};return ie.block=function(e,t,r){if("comment"==e&&P(t)||","==e&&E(t)||"mixin"==e)return x(r,t,"block",0);if(O(e,t))return x(r,t,"interpolation");if(E(t)&&"]"==e&&!/^\s*(\.|#|:|\[|\*|&)/.test(t.string)&&!M(j(t)))return x(r,t,"block",0);if(N(e,t,r))return x(r,t,"block");if("}"==e&&E(t))return x(r,t,"block",0);if("variable-name"==e)return t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||T(j(t))?x(r,t,"variableName"):x(r,t,"variableName",0);if("="==e)return E(t)||T(j(t))?x(r,t,"block"):x(r,t,"block",0);if("*"==e&&(E(t)||t.match(/\s*(,|\.|#|\[|:|{)/,!1)))return F="tag",x(r,t,"block");if(W(e,t))return x(r,t,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test(e))return x(r,t,E(t)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return x(r,t,"keyframes");if(/@extends?/.test(e))return x(r,t,"extend",0);if(e&&"@"==e.charAt(0))return t.indentation()>0&&L(t.current().slice(1))?(F="variable-2","block"):/(@import|@require|@charset)/.test(e)?x(r,t,"block",0):x(r,t,"block");if("reference"==e&&E(t))return x(r,t,"block");if("("==e)return x(r,t,"parens");if("vendor-prefixes"==e)return x(r,t,"vendorPrefixes");if("word"==e){var n=t.current();if(F=z(n),"property"==F)return P(t)?x(r,t,"block",0):(F="atom","block");if("tag"==F){if(/embed|menu|pre|progress|sub|table/.test(n)&&L(j(t)))return F="atom","block";if(t.string.match(new RegExp("\\[\\s*"+n+"|"+n+"\\s*\\]")))return F="atom","block";if($.test(n)&&(P(t)&&t.string.match(/=/)||!P(t)&&!t.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!M(j(t))))return F="variable-2",T(j(t))?"block":x(r,t,"block",0);if(E(t))return x(r,t,"block")}if("block-keyword"==F)return F="keyword",t.current(/(if|unless)/)&&!P(t)?"block":x(r,t,"block");if("return"==n)return x(r,t,"block",0);if("variable-2"==F&&t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return x(r,t,"block")}return r.context.type},ie.parens=function(e,t,r){if("("==e)return x(r,t,"parens");if(")"==e)return"parens"==r.context.prev.type?k(r):t.string.match(/^[a-z][\w-]*\(/i)&&E(t)||T(j(t))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(j(t))||!t.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&M(j(t))?x(r,t,"block"):t.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||t.string.match(/^\s*(\(|\)|[0-9])/)||t.string.match(/^\s+[a-z][\w-]*\(/i)||t.string.match(/^\s+[\$-]?[a-z]/i)?x(r,t,"block",0):E(t)?x(r,t,"block"):x(r,t,"block",0);if(e&&"@"==e.charAt(0)&&L(t.current().slice(1))&&(F="variable-2"),"word"==e){var n=t.current();F=z(n),"tag"==F&&$.test(n)&&(F="variable-2"),"property"!=F&&"to"!=n||(F="atom")}return"variable-name"==e?x(r,t,"variableName"):W(e,t)?x(r,t,"pseudo"):r.context.type},ie.vendorPrefixes=function(e,t,r){return"word"==e?(F="property",x(r,t,"block",0)):k(r)},ie.pseudo=function(e,t,r){return L(j(t.string))?S(e,t,r):(t.match(/^[a-z-]+/),F="variable-3",E(t)?x(r,t,"block"):k(r))},ie.atBlock=function(e,t,r){if("("==e)return x(r,t,"atBlock_parens");if(N(e,t,r))return x(r,t,"block");if(O(e,t))return x(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();if(F=/^(only|not|and|or)$/.test(n)?"keyword":G.hasOwnProperty(n)?"tag":Y.hasOwnProperty(n)?"attribute":X.hasOwnProperty(n)?"property":V.hasOwnProperty(n)?"string-2":z(t.current()),"tag"==F&&E(t))return x(r,t,"block")}return"operator"==e&&/^(not|and|or)$/.test(t.current())&&(F="keyword"),r.context.type},ie.atBlock_parens=function(e,t,r){if("{"==e||"}"==e)return r.context.type;if(")"==e)return E(t)?x(r,t,"block"):x(r,t,"atBlock");if("word"==e){var n=t.current().toLowerCase();return F=z(n),/^(max|min)/.test(n)&&(F="property"),"tag"==F&&(F=$.test(n)?"variable-2":"atom"),r.context.type}return ie.atBlock(e,t,r)},ie.keyframes=function(e,t,r){return"0"==t.indentation()&&("}"==e&&P(t)||"]"==e||"hash"==e||"qualifier"==e||M(t.current()))?S(e,t,r):"{"==e?x(r,t,"keyframes"):"}"==e?P(t)?k(r,!0):x(r,t,"keyframes"):"unit"==e&&/^[0-9]+\%$/.test(t.current())?x(r,t,"keyframes"):"word"==e&&(F=z(t.current()),"block-keyword"==F)?(F="keyword",x(r,t,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test(e)?x(r,t,E(t)?"block":"atBlock"):"mixin"==e?x(r,t,"block",0):r.context.type},ie.interpolation=function(e,t,r){return"{"==e&&k(r)&&x(r,t,"block"),"}"==e?t.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||t.string.match(/^\s*[a-z]/i)&&M(j(t))?x(r,t,"block"):!t.string.match(/^(\{|\s*\&)/)||t.match(/\s*[\w-]/,!1)?x(r,t,"block",0):x(r,t,"block"):"variable-name"==e?x(r,t,"variableName",0):("word"==e&&(F=z(t.current()),"tag"==F&&(F="atom")),r.context.type)},ie.extend=function(e,t,r){return"["==e||"="==e?"extend":"]"==e?k(r):"word"==e?(F=z(t.current()),"extend"):k(r)},ie.variableName=function(e,t,r){return"string"==e||"["==e||"]"==e||t.current().match(/^(\.|\$)/)?(t.current().match(/^\.[\w-]+/i)&&(F="variable-2"),"variableName"):S(e,t,r)},{startState:function(e){return{tokenize:null,state:"block",context:new w("block",e||0,null)}},token:function(e,t){return!t.tokenize&&e.eatSpace()?null:(H=(t.tokenize||g)(e,t),H&&"object"==typeof H&&(I=H[1],H=H[0]),F=H,t.state=ie[t.state](I,e,t),F)},indent:function(e,t,r){var n=e.context,i=t&&t.charAt(0),o=n.indent,a=j(t),l=r.length-r.replace(/^\s*/,"").length,s=e.context.prev?e.context.prev.line.firstWord:"",c=e.context.prev?e.context.prev.line.indent:l;return n.prev&&("}"==i&&("block"==n.type||"atBlock"==n.type||"keyframes"==n.type)||")"==i&&("parens"==n.type||"atBlock_parens"==n.type)||"{"==i&&"at"==n.type)?(o=n.indent-B,n=n.prev):/(\})/.test(i)||(/@|\$|\d/.test(i)||/^\{/.test(t)||/^\s*\/(\/|\*)/.test(t)||/^\s*\/\*/.test(s)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(t)||/^(\+|-)?[a-z][\w-]*\(/i.test(t)||/^return/.test(t)||T(a)?o=l:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(i)||M(a)?o=/\,\s*$/.test(s)?c:/^\s+/.test(r)&&(/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(s)||M(s))?l<=c?c:c+B:l:/,\s*$/.test(r)||!A(a)&&!L(a)||(o=T(s)?l<=c?c:c+B:/^\{/.test(s)?l<=c?l:c+B:A(s)||L(s)?l>=c?c:l:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(s)||/=\s*$/.test(s)||M(s)||/^\$[\w-\.\[\]\'\"]/.test(s)?c+B:l)),o},electricChars:"}",lineComment:"//",fold:"indent"}});var i=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","bgsound","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video"],o=["domain","regexp","url","url-prefix"],a=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],l=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"],s=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","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-decoration-break","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","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","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","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","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","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","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","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-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode","font-smoothing","osx-font-smoothing"],c=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],u=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],d=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],f=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","x-large","x-small","xor","xx-large","xx-small","bicubic","optimizespeed","grayscale","row","row-reverse","wrap","wrap-reverse","column-reverse","flex-start","flex-end","space-between","space-around","unset"],p=["in","and","or","not","is not","is a","is","isnt","defined","if unless"],h=["for","if","else","unless","from","to"],m=["null","true","false","href","title","type","not-allowed","readonly","disabled"],g=["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"],v=i.concat(o,a,l,s,c,d,f,u,p,h,m,g);e.registerHelper("hintWords","stylus",v),e.defineMIME("text/x-styl","stylus")})}),N=r(function(e,t){!function(r){"object"==typeof t&&"object"==typeof e?r(u,M,C,L):r(CodeMirror)}(function(e){e.defineMode("pug",function(t){function r(){this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=e.startState(Z),this.restOfLine="",this.isIncludeFiltered=!1,this.isEach=!1,this.lastTag="",this.scriptType="",this.isAttrs=!1,this.attrsNest=[],this.inAttributeName=!0,this.attributeIsType=!1,this.attrValue="",this.indentOf=1/0,this.indentToken="",this.innerMode=null,this.innerState=null,this.innerModeForLine=!1}function n(e,t){if(e.sol()&&(t.javaScriptLine=!1,t.javaScriptLineExcludesColon=!1),t.javaScriptLine){if(t.javaScriptLineExcludesColon&&":"===e.peek())return t.javaScriptLine=!1,void(t.javaScriptLineExcludesColon=!1);var r=Z.token(e,t.jsState);return e.eol()&&(t.javaScriptLine=!1),r||!0}}function i(e,t){if(t.javaScriptArguments){if(0===t.javaScriptArgumentsDepth&&"("!==e.peek())return void(t.javaScriptArguments=!1);if("("===e.peek()?t.javaScriptArgumentsDepth++:")"===e.peek()&&t.javaScriptArgumentsDepth--,0===t.javaScriptArgumentsDepth)return void(t.javaScriptArguments=!1);var r=Z.token(e,t.jsState);return r||!0}}function o(e){if(e.match(/^yield\b/))return"keyword"}function a(e){if(e.match(/^(?:doctype) *([^\n]+)?/))return G}function l(e,t){if(e.match("#{"))return t.isInterpolating=!0,t.interpolationNesting=0,"punctuation"}function s(e,t){if(t.isInterpolating){if("}"===e.peek()){if(t.interpolationNesting--,t.interpolationNesting<0)return e.next(),t.isInterpolating=!1,"punctuation"}else"{"===e.peek()&&t.interpolationNesting++;return Z.token(e,t.jsState)||!0}}function c(e,t){if(e.match(/^case\b/))return t.javaScriptLine=!0,K}function u(e,t){if(e.match(/^when\b/))return t.javaScriptLine=!0,t.javaScriptLineExcludesColon=!0,K}function d(e){if(e.match(/^default\b/))return K}function f(e,t){if(e.match(/^extends?\b/))return t.restOfLine="string",K}function p(e,t){if(e.match(/^append\b/))return t.restOfLine="variable",K}function h(e,t){if(e.match(/^prepend\b/))return t.restOfLine="variable",K}function m(e,t){if(e.match(/^block\b *(?:(prepend|append)\b)?/))return t.restOfLine="variable",K}function g(e,t){if(e.match(/^include\b/))return t.restOfLine="string",K}function v(e,t){if(e.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&e.match("include"))return t.isIncludeFiltered=!0,K}function y(e,t){if(t.isIncludeFiltered){var r=T(e,t);return t.isIncludeFiltered=!1,t.restOfLine="string",r}}function b(e,t){if(e.match(/^mixin\b/))return t.javaScriptLine=!0,K}function w(e,t){return e.match(/^\+([-\w]+)/)?(e.match(/^\( *[-\w]+ *=/,!1)||(t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0),"variable"):e.match(/^\+#{/,!1)?(e.next(),t.mixinCallAfter=!0,l(e,t)):void 0}function x(e,t){if(t.mixinCallAfter)return t.mixinCallAfter=!1,e.match(/^\( *[-\w]+ *=/,!1)||(t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0),!0}function k(e,t){if(e.match(/^(if|unless|else if|else)\b/))return t.javaScriptLine=!0,K}function C(e,t){if(e.match(/^(- *)?(each|for)\b/))return t.isEach=!0,K}function S(e,t){if(t.isEach){if(e.match(/^ in\b/))return t.javaScriptLine=!0,t.isEach=!1,K;if(e.sol()||e.eol())t.isEach=!1;else if(e.next()){for(;!e.match(/^ in\b/,!1)&&e.next(););return"variable"}}}function M(e,t){if(e.match(/^while\b/))return t.javaScriptLine=!0,K}function L(e,t){var r;if(r=e.match(/^(\w(?:[-:\w]*\w)?)\/?/))return t.lastTag=r[1].toLowerCase(),"script"===t.lastTag&&(t.scriptType="application/javascript"),"tag"}function T(r,n){if(r.match(/^:([\w\-]+)/)){var i;return t&&t.innerModes&&(i=t.innerModes(r.current().substring(1))),i||(i=r.current().substring(1)),"string"==typeof i&&(i=e.getMode(t,i)),B(r,n,i),"atom"}}function A(e,t){if(e.match(/^(!?=|-)/))return t.javaScriptLine=!0,"punctuation"}function z(e){if(e.match(/^#([\w-]+)/))return _}function N(e){if(e.match(/^\.([\w-]+)/))return X}function O(e,t){if("("==e.peek())return e.next(),t.isAttrs=!0,t.attrsNest=[],t.inAttributeName=!0,t.attrValue="",t.attributeIsType=!1,"punctuation"}function W(t,r){if(r.isAttrs){if(Y[t.peek()]&&r.attrsNest.push(Y[t.peek()]),r.attrsNest[r.attrsNest.length-1]===t.peek())r.attrsNest.pop();else if(t.eat(")"))return r.isAttrs=!1,"punctuation";if(r.inAttributeName&&t.match(/^[^=,\)!]+/))return"="!==t.peek()&&"!"!==t.peek()||(r.inAttributeName=!1,r.jsState=e.startState(Z),"script"===r.lastTag&&"type"===t.current().trim().toLowerCase()?r.attributeIsType=!0:r.attributeIsType=!1),"attribute";var n=Z.token(t,r.jsState);if(r.attributeIsType&&"string"===n&&(r.scriptType=t.current().toString()),0===r.attrsNest.length&&("string"===n||"variable"===n||"keyword"===n))try{return Function("","var x "+r.attrValue.replace(/,\s*$/,"").replace(/^!/,"")),r.inAttributeName=!0,r.attrValue="",t.backUp(t.current().length),W(t,r)}catch(e){}return r.attrValue+=t.current(),n||!0}}function P(e,t){if(e.match(/^&attributes\b/))return t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0,"keyword"}function E(e){if(e.sol()&&e.eatSpace())return"indent"}function j(e,t){if(e.match(/^ *\/\/(-)?([^\n]*)/))return t.indentOf=e.indentation(),t.indentToken="comment","comment"}function D(e){if(e.match(/^: */))return"colon"; }function H(e,t){return e.match(/^(?:\| ?| )([^\n]+)/)?"string":e.match(/^(<[^\n]*)/,!1)?(B(e,t,"htmlmixed"),t.innerModeForLine=!0,R(e,t,!0)):void 0}function I(e,t){if(e.eat(".")){var r=null;return"script"===t.lastTag&&t.scriptType.toLowerCase().indexOf("javascript")!=-1?r=t.scriptType.toLowerCase().replace(/"|'/g,""):"style"===t.lastTag&&(r="css"),B(e,t,r),"dot"}}function F(e){return e.next(),null}function B(r,n,i){i=e.mimeModes[i]||i,i=t.innerModes?t.innerModes(i)||i:i,i=e.mimeModes[i]||i,i=e.getMode(t,i),n.indentOf=r.indentation(),i&&"null"!==i.name?n.innerMode=i:n.indentToken="string"}function R(t,r,n){return t.indentation()>r.indentOf||r.innerModeForLine&&!t.sol()||n?r.innerMode?(r.innerState||(r.innerState=r.innerMode.startState?e.startState(r.innerMode,t.indentation()):{}),t.hideFirstChars(r.indentOf+2,function(){return r.innerMode.token(t,r.innerState)||!0})):(t.skipToEnd(),r.indentToken):void(t.sol()&&(r.indentOf=1/0,r.indentToken=null,r.innerMode=null,r.innerState=null))}function $(e,t){if(e.sol()&&(t.restOfLine=""),t.restOfLine){e.skipToEnd();var r=t.restOfLine;return t.restOfLine="",r}}function q(){return new r}function V(e){return e.copy()}function U(e,t){var r=R(e,t)||$(e,t)||s(e,t)||y(e,t)||S(e,t)||W(e,t)||n(e,t)||i(e,t)||x(e,t)||o(e,t)||a(e,t)||l(e,t)||c(e,t)||u(e,t)||d(e,t)||f(e,t)||p(e,t)||h(e,t)||m(e,t)||g(e,t)||v(e,t)||b(e,t)||w(e,t)||k(e,t)||C(e,t)||M(e,t)||L(e,t)||T(e,t)||A(e,t)||z(e,t)||N(e,t)||O(e,t)||P(e,t)||E(e,t)||H(e,t)||j(e,t)||D(e,t)||I(e,t)||F(e,t);return r===!0?null:r}var K="keyword",G="meta",_="builtin",X="qualifier",Y={"{":"}","(":")","[":"]"},Z=e.getMode(t,"javascript");return r.prototype.copy=function(){var t=new r;return t.javaScriptLine=this.javaScriptLine,t.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,t.javaScriptArguments=this.javaScriptArguments,t.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,t.isInterpolating=this.isInterpolating,t.interpolationNesting=this.interpolationNesting,t.jsState=e.copyState(Z,this.jsState),t.innerMode=this.innerMode,this.innerMode&&this.innerState&&(t.innerState=e.copyState(this.innerMode,this.innerState)),t.restOfLine=this.restOfLine,t.isIncludeFiltered=this.isIncludeFiltered,t.isEach=this.isEach,t.lastTag=this.lastTag,t.scriptType=this.scriptType,t.isAttrs=this.isAttrs,t.attrsNest=this.attrsNest.slice(),t.inAttributeName=this.inAttributeName,t.attributeIsType=this.attributeIsType,t.attrValue=this.attrValue,t.indentOf=this.indentOf,t.indentToken=this.indentToken,t.innerModeForLine=this.innerModeForLine,t},{startState:q,copyState:V,token:U}},"javascript","css","htmlmixed"),e.defineMIME("text/x-pug","pug"),e.defineMIME("text/x-jade","pug")})}),O=r(function(e,t){!function(r){r("object"==typeof t&&"object"==typeof e?u:CodeMirror)}(function(e){e.multiplexingMode=function(t){function r(e,t,r,n){if("string"==typeof t){var i=e.indexOf(t,r);return n&&i>-1?i+t.length:i}var o=t.exec(r?e.slice(r):e);return o?o.index+r+(n?o[0].length:0):-1}var n=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(r){return{outer:e.copyState(t,r.outer),innerActive:r.innerActive,inner:r.innerActive&&e.copyState(r.innerActive.mode,r.inner)}},token:function(i,o){if(o.innerActive){var a=o.innerActive,l=i.string;if(!a.close&&i.sol())return o.innerActive=o.inner=null,this.token(i,o);var s=a.close?r(l,a.close,i.pos,a.parseDelimiters):-1;if(s==i.pos&&!a.parseDelimiters)return i.match(a.close),o.innerActive=o.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";s>-1&&(i.string=l.slice(0,s));var c=a.mode.token(i,o.inner);return s>-1&&(i.string=l),s==i.pos&&a.parseDelimiters&&(o.innerActive=o.inner=null),a.innerStyle&&(c=c?c+" "+a.innerStyle:a.innerStyle),c}for(var u=1/0,l=i.string,d=0;d|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}]}),e.defineMode("handlebars",function(t,r){var n=e.getMode(t,"handlebars-tags");return r&&r.base?e.multiplexingMode(e.getMode(t,r.base),{open:"{{",close:"}}",mode:n,parseDelimiters:!0}):n}),e.defineMIME("text/x-handlebars-template","handlebars")})});r(function(e,t){!function(r){"object"==typeof t&&"object"==typeof e?r(u,x,S,M,T,C,A,z,N,W):r(CodeMirror)}(function(e){var t={script:[["lang",/coffee(script)?/,"coffeescript"],["type",/^(?:text|application)\/(?:x-)?coffee(?:script)?$/,"coffeescript"]],style:[["lang",/^stylus$/i,"stylus"],["lang",/^sass$/i,"sass"],["type",/^(text\/)?(x-)?styl(us)?$/i,"stylus"],["type",/^text\/sass/i,"sass"]],template:[["lang",/^vue-template$/i,"vue"],["lang",/^pug$/i,"pug"],["lang",/^handlebars$/i,"handlebars"],["type",/^(text\/)?(x-)?pug$/i,"pug"],["type",/^text\/x-handlebars-template$/i,"handlebars"],[null,null,"vue-template"]]};e.defineMode("vue-template",function(t,r){var n={token:function(e){if(e.match(/^\{\{.*?\}\}/))return"meta mustache";for(;e.next()&&!e.match("{{",!1););return null}};return e.overlayMode(e.getMode(t,r.backdrop||"text/html"),n)}),e.defineMode("vue",function(r){return e.getMode(r,{name:"htmlmixed",tags:t})},"htmlmixed","xml","javascript","coffeescript","css","sass","stylus","pug","handlebars"),e.defineMIME("script/x-vue","vue"),e.defineMIME("text/x-vue","vue")})}),r(function(e,t){!function(r){"object"==typeof t&&"object"==typeof e?r(u,S,M):r(CodeMirror)}(function(e){function t(e,t,r,n){this.state=e,this.mode=t,this.depth=r,this.prev=n}function r(n){return new t(e.copyState(n.mode,n.state),n.mode,n.depth,n.prev&&r(n.prev))}e.defineMode("jsx",function(n,i){function o(e){var t=e.tagName;e.tagName=null;var r=c.indent(e,"");return e.tagName=t,r}function a(e,t){return t.context.mode==c?l(e,t,t.context):s(e,t,t.context)}function l(r,i,l){if(2==l.depth)return r.match(/^.*?\*\//)?l.depth=1:r.skipToEnd(),"comment";if("{"==r.peek()){c.skipAttribute(l.state);var s=o(l.state),d=l.state.context;if(d&&r.match(/^[^>]*>\s*$/,!1)){for(;d.prev&&!d.startOfLine;)d=d.prev;d.startOfLine?s-=n.indentUnit:l.prev.state.lexical&&(s=l.prev.state.lexical.indented)}else 1==l.depth&&(s+=n.indentUnit);return i.context=new t(e.startState(u,s),u,0,i.context),null}if(1==l.depth){if("<"==r.peek())return c.skipAttribute(l.state),i.context=new t(e.startState(c,o(l.state)),c,0,i.context),null;if(r.match("//"))return r.skipToEnd(),"comment";if(r.match("/*"))return l.depth=2,a(r,i)}var f,p=c.token(r,l.state),h=r.current();return/\btag\b/.test(p)?/>$/.test(h)?l.state.context?l.depth=0:i.context=i.context.prev:/^-1&&r.backUp(h.length-f),p}function s(r,n,i){if("<"==r.peek()&&u.expressionAllowed(r,i.state))return u.skipExpression(i.state),n.context=new t(e.startState(c,u.indent(i.state,"")),c,0,n.context),null;var o=u.token(r,i.state);if(!o&&null!=i.depth){var a=r.current();"{"==a?i.depth++:"}"==a&&0==--i.depth&&(n.context=n.context.prev)}return o}var c=e.getMode(n,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1}),u=e.getMode(n,i&&i.base||"javascript");return{startState:function(){return{context:new t(e.startState(u),u)}},copyState:function(e){return{context:r(e.context)}},token:a,indent:function(e,t,r){return e.context.mode.indent(e.context.state,t,r)},innerMode:function(e){return e.context}}},"xml","javascript"),e.defineMIME("text/jsx","jsx"),e.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})});Object.defineProperty(e,"__esModule",{value:!0})}); diff --git a/src/components/playground.js b/src/components/playground.js index b62a861..fa9f5b7 100644 --- a/src/components/playground.js +++ b/src/components/playground.js @@ -72,8 +72,11 @@ export default { }, created () { - /* istanbul ignore next */ + /* istanbul ignore next */ if (this.$isServer) return + }, + + mounted () { let content = this.template if (/^[\.#]/.test(this.template)) {