6 lines
9.8 KiB
JavaScript
6 lines
9.8 KiB
JavaScript
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[13202],{13202:function(k,y,C){k=C.nmd(k),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(g,b,T){"use strict";var h=g("../lib/oop"),p=g("./text_highlight_rules").TextHighlightRules,x=function(v){var r="[_:a-zA-Z\xC0-\uFFFF][-_:.a-zA-Z0-9\xC0-\uFFFF]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+r+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:r},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+r+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+r+":)?"+r+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:r},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===x&&this.normalizeRules()};(function(){this.embedTagRules=function(v,r,s){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(<)("+s+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:r+"start"}]}),this.$rules[s+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(i,o,a){return a.splice(0),this.token}}],this.embedRules(v,r,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(</)("+s+"(?=\\s|>|$))",next:s+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(p.prototype),h.inherits(x,p),b.XmlHighlightRules=x}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(g,b,T){"use strict";var h=g("../../lib/oop"),p=g("../behaviour").Behaviour,x=g("../../token_iterator").TokenIterator,v=g("../../lib/lang");function r(i,o){return i&&i.type.lastIndexOf(o+".xml")>-1}var s=function(){this.add("string_dquotes","insertion",function(i,o,a,e,l){if(l=='"'||l=="'"){var t=l,u=e.doc.getTextRange(a.getSelectionRange());if(u!==""&&u!=="'"&&u!='"'&&a.getWrapBehavioursEnabled())return{text:t+u+t,selection:!1};var n=a.getCursorPosition(),c=e.doc.getLine(n.row),d=c.substring(n.column,n.column+1),w=new x(e,n.row,n.column),m=w.getCurrentToken();if(d==t&&(r(m,"attribute-value")||r(m,"string")))return{text:"",selection:[1,1]};if(m||(m=w.stepBackward()),!m)return;for(;r(m,"tag-whitespace")||r(m,"whitespace");)m=w.stepBackward();var f=!d||d.match(/\s/);if(r(m,"attribute-equals")&&(f||d==">")||r(m,"decl-attribute-equals")&&(f||d=="?"))return{text:t+t,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(i,o,a,e,l){var t=e.doc.getTextRange(l);if(!l.isMultiLine()&&(t=='"'||t=="'")){var u=e.doc.getLine(l.start.row),n=u.substring(l.start.column+1,l.start.column+2);if(n==t)return l.end.column++,l}}),this.add("autoclosing","insertion",function(i,o,a,e,l){if(l==">"){var t=a.getSelectionRange().start,u=new x(e,t.row,t.column),n=u.getCurrentToken()||u.stepBackward();if(!n||!(r(n,"tag-name")||r(n,"tag-whitespace")||r(n,"attribute-name")||r(n,"attribute-equals")||r(n,"attribute-value"))||r(n,"reference.attribute-value"))return;if(r(n,"attribute-value")){var c=u.getCurrentTokenColumn()+n.value.length;if(t.column<c)return;if(t.column==c){var d=u.stepForward();if(d&&r(d,"attribute-value"))return;u.stepBackward()}}if(/^\s*>/.test(e.getLine(t.row).slice(t.column)))return;for(;!r(n,"tag-name");)if(n=u.stepBackward(),n.value=="<"){n=u.stepForward();break}var w=u.getCurrentTokenRow(),m=u.getCurrentTokenColumn();if(r(u.stepBackward(),"end-tag-open"))return;var f=n.value;return w==t.row&&(f=f.substring(0,t.column-m)),this.voidElements.hasOwnProperty(f.toLowerCase())?void 0:{text:"></"+f+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(i,o,a,e,l){if(l==`
|
|
`){var t=a.getCursorPosition(),u=e.getLine(t.row),n=new x(e,t.row,t.column),c=n.getCurrentToken();if(c&&c.type.indexOf("tag-close")!==-1){if(c.value=="/>")return;for(;c&&c.type.indexOf("tag-name")===-1;)c=n.stepBackward();if(!c)return;var d=c.value,w=n.getCurrentTokenRow();if(c=n.stepBackward(),!c||c.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[d]){var m=e.getTokenAt(t.row,t.column+1),u=e.getLine(w),f=this.$getIndent(u),_=f+e.getTabString();return m&&m.value==="</"?{text:`
|
|
`+_+`
|
|
`+f,selection:[1,_.length,1,_.length]}:{text:`
|
|
`+_}}}}})};h.inherits(s,p),b.XmlBehaviour=s}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(g,b,T){"use strict";var h=g("../../lib/oop"),p=g("../../range").Range,x=g("./fold_mode").FoldMode,v=b.FoldMode=function(i,o){x.call(this),this.voidElements=i||{},this.optionalEndTags=h.mixin({},this.voidElements),o&&h.mixin(this.optionalEndTags,o)};h.inherits(v,x);var r=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function s(i,o){return i.type.lastIndexOf(o+".xml")>-1}(function(){this.getFoldWidget=function(i,o,a){var e=this._getFirstTagInLine(i,a);return e?e.closing||!e.tagName&&e.selfClosing?o==="markbeginend"?"end":"":!e.tagName||e.selfClosing||this.voidElements.hasOwnProperty(e.tagName.toLowerCase())||this._findEndTagInLine(i,a,e.tagName,e.end.column)?"":"start":this.getCommentFoldWidget(i,a)},this.getCommentFoldWidget=function(i,o){return/comment/.test(i.getState(o))&&/<!-/.test(i.getLine(o))?"start":""},this._getFirstTagInLine=function(i,o){for(var a=i.getTokens(o),e=new r,l=0;l<a.length;l++){var t=a[l];if(s(t,"tag-open")){if(e.end.column=e.start.column+t.value.length,e.closing=s(t,"end-tag-open"),t=a[++l],!t)return null;for(e.tagName=t.value,e.end.column+=t.value.length,l++;l<a.length;l++)if(t=a[l],e.end.column+=t.value.length,s(t,"tag-close")){e.selfClosing=t.value=="/>";break}return e}else if(s(t,"tag-close"))return e.selfClosing=t.value=="/>",e;e.start.column+=t.value.length}return null},this._findEndTagInLine=function(i,o,a,e){for(var l=i.getTokens(o),t=0,u=0;u<l.length;u++){var n=l[u];if(t+=n.value.length,!(t<e)&&s(n,"end-tag-open")&&(n=l[u+1],n&&n.value==a))return!0}return!1},this.getFoldWidgetRange=function(i,o,a){var e=i.getMatchingTags({row:a,column:0});return e?new p(e.openTag.end.row,e.openTag.end.column,e.closeTag.start.row,e.closeTag.start.column):this.getCommentFoldWidget(i,a)&&i.getCommentFoldRange(a,i.getLine(a).length)}}).call(v.prototype)}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(g,b,T){"use strict";var h=g("../lib/oop"),p=g("../lib/lang"),x=g("./text").Mode,v=g("./xml_highlight_rules").XmlHighlightRules,r=g("./behaviour/xml").XmlBehaviour,s=g("./folding/xml").FoldMode,i=g("../worker/worker_client").WorkerClient,o=function(){this.HighlightRules=v,this.$behaviour=new r,this.foldingRules=new s};h.inherits(o,x),function(){this.voidElements=p.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(a){var e=new i(["ace"],"ace/mode/xml_worker","Worker");return e.attachToDocument(a.getDocument()),e.on("error",function(l){a.setAnnotations(l.data)}),e.on("terminate",function(){a.clearAnnotations()}),e},this.$id="ace/mode/xml"}.call(o.prototype),b.Mode=o}),function(){ace.require(["ace/mode/xml"],function(g){k&&(k.exports=g)})}()}}]);
|