import{g as C}from"./index-CVJu9AGF.js";import{e as _}from"./index.CIHrN2LG.entry.js";function L(g,b){for(var f=0;f<b.length;f++){const l=b[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 $={exports:{}};(function(g,b){(function(f){f(_)})(function(f){function l(u){for(var p={},c=u.split(","),s=0;s<c.length;++s){var v=c[s].toUpperCase(),y=c[s].charAt(0).toUpperCase()+c[s].slice(1);p[c[s]]=!0,p[v]=!0,p[y]=!0}return p}function a(u){return u.eatWhile(/[\w\$_]/),"meta"}f.defineMode("vhdl",function(u,p){var c=u.indentUnit,s=p.atoms||l("null"),v=p.hooks||{"`":a,$:a},y=p.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"),E=l("architecture,entity,begin,case,port,else,elsif,end,for,function,if"),k=/[&|~><!\)\(*#%@+\/=?\:;}{,\.\^\-\[\]]/,i;function m(e,n){var t=e.next();if(v[t]){var r=v[t](e,n);if(r!==!1)return r}if(t=='"')return n.tokenize=j(t),n.tokenize(e,n);if(t=="'")return n.tokenize=S(t),n.tokenize(e,n);if(/[\[\]{}\(\),;\:\.]/.test(t))return i=t,null;if(/[\d']/.test(t))return e.eatWhile(/[\w\.']/),"number";if(t=="-"&&e.eat("-"))return e.skipToEnd(),"comment";if(k.test(t))return e.eatWhile(k),"operator";e.eatWhile(/[\w\$_]/);var o=e.current();return O.propertyIsEnumerable(o.toLowerCase())?(E.propertyIsEnumerable(o)&&(i="newstatement"),"keyword"):s.propertyIsEnumerable(o)?"atom":"variable"}function S(e){return function(n,t){for(var r=!1,o,h=!1;(o=n.next())!=null;){if(o==e&&!r){h=!0;break}r=!r&&o=="--"}return(h||!(r||y))&&(t.tokenize=m),"string"}}function j(e){return function(n,t){for(var r=!1,o,h=!1;(o=n.next())!=null;){if(o==e&&!r){h=!0;break}r=!r&&o=="--"}return(h||!(r||y))&&(t.tokenize=m),"string-2"}}function w(e,n,t,r,o){this.indented=e,this.column=n,this.type=t,this.align=r,this.prev=o}function x(e,n,t){return e.context=new w(e.indented,n,t,null,e.context)}function d(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;i=null;var r=(n.tokenize||m)(e,n);if(r=="comment"||r=="meta")return r;if(t.align==null&&(t.align=!0),(i==";"||i==":")&&t.type=="statement")d(n);else if(i=="{")x(n,e.column(),"}");else if(i=="[")x(n,e.column(),"]");else if(i=="(")x(n,e.column(),")");else if(i=="}"){for(;t.type=="statement";)t=d(n);for(t.type=="}"&&(t=d(n));t.type=="statement";)t=d(n)}else i==t.type?d(n):(t.type=="}"||t.type=="top"||t.type=="statement"&&i=="newstatement")&&x(n,e.column(),"statement");return n.startOfLine=!1,r},indent:function(e,n){if(e.tokenize!=m&&e.tokenize!=null)return 0;var t=n&&n.charAt(0),r=e.context,o=t==r.type;return r.type=="statement"?r.indented+(t=="{"?0:c):r.align?r.column+(o?0:1):r.indented+(o?0:c)},electricChars:"{}"}}),f.defineMIME("text/x-vhdl","vhdl")})})();var z=$.exports;const I=C(z),W=L({__proto__:null,default:I},[z]);export{W as v};
