(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[64068],{64068:function(ie,E,T){"use strict";T.r(E),T.d(E,{completeFromSchema:function(){return A},xml:function(){return se},xmlLanguage:function(){return Q}});var h=T(11705),$=T(79653);const v=1,I=2,j=3,J=4,U=5,z=35,q=36,D=37,F=11,B=13;function M(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function K(e){return e==9||e==10||e==13||e==32}let G=null,R=null,Z=0;function C(e,t){let n=e.pos+t;if(R==e&&Z==n)return G;for(;K(e.peek(t));)t++;let O="";for(;;){let a=e.peek(t);if(!M(a))break;O+=String.fromCharCode(a),t++}return R=e,Z=n,G=O||null}function k(e,t){this.name=e,this.parent=t,this.hash=t?t.hash:0;for(let n=0;n{if(e.next==60){if(e.advance(),e.next==47){e.advance();let n=C(e,0);if(!n)return e.acceptToken(U);if(t.context&&n==t.context.name)return e.acceptToken(I);for(let O=t.context;O;O=O.parent)if(O.name==n)return e.acceptToken(j,-2);e.acceptToken(J)}else if(e.next!=33&&e.next!=63)return e.acceptToken(v)}},{contextual:!0});function W(e,t){return new h.Jq(n=>{let O=0,a=t.charCodeAt(0);e:for(;!(n.next<0);n.advance(),O++)if(n.next==a){for(let l=1;l"),te=W(q,"?>"),Oe=W(D,"]]>"),ne=(0,$.Gv)({Text:$.pJ.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":$.pJ.angleBracket,TagName:$.pJ.tagName,"MismatchedCloseTag/Tagname":[$.pJ.tagName,$.pJ.invalid],AttributeName:$.pJ.attributeName,AttributeValue:$.pJ.attributeValue,Is:$.pJ.definitionOperator,"EntityReference CharacterReference":$.pJ.character,Comment:$.pJ.blockComment,ProcessingInst:$.pJ.processingInstruction,DoctypeDecl:$.pJ.documentMeta,Cdata:$.pJ.special($.pJ.string)}),ae=h.WQ.deserialize({version:14,states:",SOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOt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r%ysv%yw#h%y#h#iCd#i;'S%y;'S;=`&_<%lO%yXCiV{WOr%ysv%yw#m%y#m#nDO#n;'S%y;'S;=`&_<%lO%yXDTV{WOr%ysv%yw#d%y#d#eDj#e;'S%y;'S;=`&_<%lO%yXDoV{WOr%ysv%yw#X%y#X#Y9i#Y;'S%y;'S;=`&_<%lO%yXE]T!PP{WOr%ysv%yw;'S%y;'S;=`&_<%lO%yZEuWaQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$n_FhW[UVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nZGXYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_!`$n!`!aGw!a;'S$n;'S;=`&e<%lO$nZHQW!OQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nZHqYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_#P$n#P#QIa#Q;'S$n;'S;=`&e<%lO$nZIhYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_!`$n!`!aJW!a;'S$n;'S;=`&e<%lO$nZJaWwQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$n",tokenizers:[L,ee,te,Oe,0,1,2,3],topRules:{Document:[0,6]},tokenPrec:0});var d=T(16888);function V(e,t){let n=t&&t.getChild("TagName");return n?e.sliceString(n.from,n.to):""}function b(e,t){let n=t&&t.firstChild;return!n||n.name!="OpenTag"?"":V(e,n)}function le(e,t,n){let O=t&&t.getChildren("Attribute").find(l=>l.from<=n&&l.to>=n),a=O&&O.getChild("AttributeName");return a?e.sliceString(a.from,a.to):""}function _(e){for(let t=e&&e.parent;t;t=t.parent)if(t.name=="Element")return t;return null}function re(e,t){var n;let O=(0,d.qz)(e).resolveInner(t,-1),a=null;for(let l=O;!a&&l.parent;l=l.parent)(l.name=="OpenTag"||l.name=="CloseTag"||l.name=="SelfClosingTag"||l.name=="MismatchedCloseTag")&&(a=l);if(a&&(a.to>t||a.lastChild.type.isError)){let l=a.parent;if(O.name=="TagName")return a.name=="CloseTag"||a.name=="MismatchedCloseTag"?{type:"closeTag",from:O.from,context:l}:{type:"openTag",from:O.from,context:_(l)};if(O.name=="AttributeName")return{type:"attrName",from:O.from,context:a};if(O.name=="AttributeValue")return{type:"attrValue",from:O.from,context:a};let i=O==a||O.name=="Attribute"?O.childBefore(t):O;return(i==null?void 0:i.name)=="StartTag"?{type:"openTag",from:t,context:_(l)}:(i==null?void 0:i.name)=="StartCloseTag"&&i.to<=t?{type:"closeTag",from:t,context:l}:(i==null?void 0:i.name)=="Is"?{type:"attrValue",from:t,context:a}:i?{type:"attrName",from:t,context:a}:null}else if(O.name=="StartCloseTag")return{type:"closeTag",from:t,context:O.parent};for(;O.parent&&O.to==t&&!((n=O.lastChild)===null||n===void 0?void 0:n.type.isError);)O=O.parent;return O.name=="Element"||O.name=="Text"||O.name=="Document"?{type:"tag",from:t,context:O.name=="Element"?O:_(O)}:null}class oe{constructor(t,n,O){this.attrs=n,this.attrValues=O,this.children=[],this.name=t.name,this.completion=Object.assign(Object.assign({type:"type"},t.completion||{}),{label:this.name}),this.openCompletion=Object.assign(Object.assign({},this.completion),{label:"<"+this.name}),this.closeCompletion=Object.assign(Object.assign({},this.completion),{label:"",boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+">"}),this.text=t.textContent?t.textContent.map(a=>({label:a,type:"text"})):[]}}const w=/^[:\-\.\w\u00b7-\uffff]*$/;function Y(e){return Object.assign(Object.assign({type:"property"},e.completion||{}),{label:e.name})}function N(e){return typeof e=="string"?{label:`"${e}"`,type:"constant"}:/^"/.test(e.label)?e:Object.assign(Object.assign({},e),{label:`"${e.label}"`})}function A(e,t){let n=[],O=[],a=Object.create(null);for(let r of t){let g=Y(r);n.push(g),r.global&&O.push(g),r.values&&(a[r.name]=r.values.map(N))}let l=[],i=[],S=Object.create(null);for(let r of e){let g=O,o=a;r.attributes&&(g=g.concat(r.attributes.map(m=>typeof m=="string"?n.find(f=>f.label==m)||{label:m,type:"property"}:(m.values&&(o==a&&(o=Object.create(o)),o[m.name]=m.values.map(N)),Y(m)))));let u=new oe(r,g,o);S[u.name]=u,l.push(u),r.top&&i.push(u)}i.length||(i=l);for(let r=0;r{var g;let{doc:o}=r.state,u=re(r.state,r.pos);if(!u||u.type=="tag"&&!r.explicit)return null;let{type:m,from:f,context:p}=u;if(m=="openTag"){let s=i,y=b(o,p);if(y){let c=S[y];s=(c==null?void 0:c.children)||l}return{from:f,options:s.map(c=>c.completion),validFor:w}}else if(m=="closeTag"){let s=b(o,p);return s?{from:f,to:r.pos+(o.sliceString(r.pos,r.pos+1)==">"?1:0),options:[((g=S[s])===null||g===void 0?void 0:g.closeNameCompletion)||{label:s+">",type:"type"}],validFor:w}:null}else if(m=="attrName"){let s=S[V(o,p)];return{from:f,options:(s==null?void 0:s.attrs)||O,validFor:w}}else if(m=="attrValue"){let s=le(o,p,f);if(!s)return null;let y=S[V(o,p)],c=((y==null?void 0:y.attrValues)||a)[s];return!c||!c.length?null:{from:f,to:r.pos+(o.sliceString(r.pos,r.pos+1)=='"'?1:0),options:c,validFor:/^"[^"]*"?$/}}else if(m=="tag"){let s=b(o,p),y=S[s],c=[],X=p&&p.lastChild;s&&(!X||X.name!="CloseTag"||V(o,X)!=s)&&c.push(y?y.closeCompletion:{label:"",type:"type",boost:2});let x=c.concat(((y==null?void 0:y.children)||(p?l:i)).map(P=>P.openCompletion));if(p&&(y==null?void 0:y.text.length)){let P=p.firstChild;P.to>r.pos-20&&!/\S/.test(r.state.sliceDoc(P.to,r.pos))&&(x=x.concat(y.text))}return{from:f,options:x,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}else return null}}const Q=d.qp.define({name:"xml",parser:ae.configure({props:[d.uj.add({Element(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),d.x0.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!="OpenTag"?null:{from:t.to,to:n.name=="CloseTag"?n.from:e.to}}}),d.a0.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/$/}});function se(e={}){return new d.ri(Q,Q.data.of({autocomplete:A(e.elements||[],e.attributes||[])}))}}}]);