import{C as S}from"./index.991aca48.entry.js";function U(a,d){for(var o=0;o<d.length;o++){const f=d[o];if(typeof f!="string"&&!Array.isArray(f)){for(const l in f)if(l!=="default"&&!(l in a)){const u=Object.getOwnPropertyDescriptor(f,l);u&&Object.defineProperty(a,l,u.get?u:{enumerable:!0,get:()=>f[l]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var _={};(function(a,d){(function(o){o(S)})(function(o){o.registerHelper("wordChars","r",/[\w.]/),o.defineMode("r",function(f){function l(e){for(var n={},r=0;r<e.length;++r)n[e[r]]=!0;return n}var u=["NULL","NA","Inf","NaN","NA_integer_","NA_real_","NA_complex_","NA_character_","TRUE","FALSE"],g=["list","quote","bquote","eval","return","call","parse","deparse"],k=["if","else","repeat","while","function","for","in","next","break"],A=["if","else","repeat","while","function","for"];o.registerHelper("hintWords","r",u.concat(g,k));var E=l(u),w=l(g),N=l(k),I=l(A),y=/[+\-*\/^<>=!&|~$:]/,t;function s(e,n){t=null;var r=e.next();if(r=="#")return e.skipToEnd(),"comment";if(r=="0"&&e.eat("x"))return e.eatWhile(/[\da-f]/i),"number";if(r=="."&&e.eat(/\d/))return e.match(/\d*(?:e[+\-]?\d+)?/),"number";if(/\d/.test(r))return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/),"number";if(r=="'"||r=='"')return n.tokenize=L(r),"string";if(r=="`")return e.match(/[^`]+`/),"variable-3";if(r=="."&&e.match(/.(?:[.]|\d+)/))return"keyword";if(/[a-zA-Z\.]/.test(r)){e.eatWhile(/[\w\.]/);var i=e.current();return E.propertyIsEnumerable(i)?"atom":N.propertyIsEnumerable(i)?(I.propertyIsEnumerable(i)&&!e.match(/\s*if(\s+|$)/,!1)&&(t="block"),"keyword"):w.propertyIsEnumerable(i)?"builtin":"variable"}else return r=="%"?(e.skipTo("%")&&e.next(),"operator variable-2"):r=="<"&&e.eat("-")||r=="<"&&e.match("<-")||r=="-"&&e.match(/>>?/)?"operator arrow":r=="="&&n.ctx.argList?"arg-is":y.test(r)?r=="$"?"operator dollar":(e.eatWhile(y),"operator"):/[\(\){}\[\];]/.test(r)?(t=r,r==";"?"semi":null):null}function L(e){return function(n,r){if(n.eat("\\")){var i=n.next();return i=="x"?n.match(/^[a-f0-9]{2}/i):(i=="u"||i=="U")&&n.eat("{")&&n.skipTo("}")?n.next():i=="u"?n.match(/^[a-f0-9]{4}/i):i=="U"?n.match(/^[a-f0-9]{8}/i):/[0-7]/.test(i)&&n.match(/^[0-7]{1,2}/),"string-2"}else{for(var c;(c=n.next())!=null;){if(c==e){r.tokenize=s;break}if(c=="\\"){n.backUp(1);break}}return"string"}}}var h=1,v=2,b=4;function p(e,n,r){e.ctx={type:n,indent:e.indent,flags:0,column:r.column(),prev:e.ctx}}function m(e,n){var r=e.ctx;e.ctx={type:r.type,indent:r.indent,flags:r.flags|n,column:r.column,prev:r.prev}}function x(e){e.indent=e.ctx.indent,e.ctx=e.ctx.prev}return{startState:function(){return{tokenize:s,ctx:{type:"top",indent:-f.indentUnit,flags:v},indent:0,afterIdent:!1}},token:function(e,n){if(e.sol()&&(n.ctx.flags&3||(n.ctx.flags|=v),n.ctx.flags&b&&x(n),n.indent=e.indentation()),e.eatSpace())return null;var r=n.tokenize(e,n);return r!="comment"&&!(n.ctx.flags&v)&&m(n,h),(t==";"||t=="{"||t=="}")&&n.ctx.type=="block"&&x(n),t=="{"?p(n,"}",e):t=="("?(p(n,")",e),n.afterIdent&&(n.ctx.argList=!0)):t=="["?p(n,"]",e):t=="block"?p(n,"block",e):t==n.ctx.type?x(n):n.ctx.type=="block"&&r!="comment"&&m(n,b),n.afterIdent=r=="variable"||r=="keyword",r},indent:function(e,n){if(e.tokenize!=s)return 0;var r=n&&n.charAt(0),i=e.ctx,c=r==i.type;return i.flags&b&&(i=i.prev),i.type=="block"?i.indent+(r=="{"?0:f.indentUnit):i.flags&h?i.column+(c?0:1):i.indent+(c?0:f.indentUnit)},lineComment:"#"}}),o.defineMIME("text/x-rsrc","r")})})();const O=U({__proto__:null,default:_},[_]);export{O as r};
