import{C as _}from"./index.991aca48.entry.js";function j(g,m){for(var f=0;f<m.length;f++){const l=m[f];if(typeof l!="string"&&!Array.isArray(l)){for(const a in l)if(a!=="default"&&!(a in g)){const u=Object.getOwnPropertyDescriptor(l,a);u&&Object.defineProperty(g,a,u.get?u:{enumerable:!0,get:()=>l[a]})}}}return Object.freeze(Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}))}var z={};(function(g,m){(function(f){f(_)})(function(f){function l(u){for(var d={},c=u.split(","),p=0;p<c.length;++p){var y=c[p].toUpperCase(),v=c[p].charAt(0).toUpperCase()+c[p].slice(1);d[c[p]]=!0,d[y]=!0,d[v]=!0}return d}function a(u){return u.eatWhile(/[\w\$_]/),"meta"}f.defineMode("vhdl",function(u,d){var c=u.indentUnit,p=d.atoms||l("null"),y=d.hooks||{"`":a,$:a},v=d.multiLineStrings,O=l("abs,access,after,alias,all,and,architecture,array,assert,attribute,begin,block,body,buffer,bus,case,component,configuration,constant,disconnect,downto,else,elsif,end,end block,end case,end component,end for,end generate,end if,end loop,end process,end record,end units,entity,exit,file,for,function,generate,generic,generic map,group,guarded,if,impure,in,inertial,inout,is,label,library,linkage,literal,loop,map,mod,nand,new,next,nor,null,of,on,open,or,others,out,package,package body,port,port map,postponed,procedure,process,pure,range,record,register,reject,rem,report,return,rol,ror,select,severity,signal,sla,sll,sra,srl,subtype,then,to,transport,type,unaffected,units,until,use,variable,wait,when,while,with,xnor,xor"),S=l("architecture,entity,begin,case,port,else,elsif,end,for,function,if"),x=/[&|~><!\)\(*#%@+\/=?\:;}{,\.\^\-\[\]]/,o;function b(e,n){var t=e.next();if(y[t]){var r=y[t](e,n);if(r!==!1)return r}if(t=='"')return n.tokenize=E(t),n.tokenize(e,n);if(t=="'")return n.tokenize=C(t),n.tokenize(e,n);if(/[\[\]{}\(\),;\:\.]/.test(t))return o=t,null;if(/[\d']/.test(t))return e.eatWhile(/[\w\.']/),"number";if(t=="-"&&e.eat("-"))return e.skipToEnd(),"comment";if(x.test(t))return e.eatWhile(x),"operator";e.eatWhile(/[\w\$_]/);var i=e.current();return O.propertyIsEnumerable(i.toLowerCase())?(S.propertyIsEnumerable(i)&&(o="newstatement"),"keyword"):p.propertyIsEnumerable(i)?"atom":"variable"}function C(e){return function(n,t){for(var r=!1,i,h=!1;(i=n.next())!=null;){if(i==e&&!r){h=!0;break}r=!r&&i=="--"}return(h||!(r||v))&&(t.tokenize=b),"string"}}function E(e){return function(n,t){for(var r=!1,i,h=!1;(i=n.next())!=null;){if(i==e&&!r){h=!0;break}r=!r&&i=="--"}return(h||!(r||v))&&(t.tokenize=b),"string-2"}}function w(e,n,t,r,i){this.indented=e,this.column=n,this.type=t,this.align=r,this.prev=i}function k(e,n,t){return e.context=new w(e.indented,n,t,null,e.context)}function s(e){var n=e.context.type;return(n==")"||n=="]"||n=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}return{startState:function(e){return{tokenize:null,context:new w((e||0)-c,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var t=n.context;if(e.sol()&&(t.align==null&&(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0),e.eatSpace())return null;o=null;var r=(n.tokenize||b)(e,n);if(r=="comment"||r=="meta")return r;if(t.align==null&&(t.align=!0),(o==";"||o==":")&&t.type=="statement")s(n);else if(o=="{")k(n,e.column(),"}");else if(o=="[")k(n,e.column(),"]");else if(o=="(")k(n,e.column(),")");else if(o=="}"){for(;t.type=="statement";)t=s(n);for(t.type=="}"&&(t=s(n));t.type=="statement";)t=s(n)}else o==t.type?s(n):(t.type=="}"||t.type=="top"||t.type=="statement"&&o=="newstatement")&&k(n,e.column(),"statement");return n.startOfLine=!1,r},indent:function(e,n){if(e.tokenize!=b&&e.tokenize!=null)return 0;var t=n&&n.charAt(0),r=e.context,i=t==r.type;return r.type=="statement"?r.indented+(t=="{"?0:c):r.align?r.column+(i?0:1):r.indented+(i?0:c)},electricChars:"{}"}}),f.defineMIME("text/x-vhdl","vhdl")})})();const I=j({__proto__:null,default:z},[z]);export{I as v};
