import{g as M}from"./emoji-picker-DlAAdvrL.chunk.mjs";function y(t,a){for(var n=0;n<a.length;n++){const r=a[n];if(typeof r!="string"&&!Array.isArray(r)){for(const e in r)if(e!=="default"&&!(e in t)){const s=Object.getOwnPropertyDescriptor(r,e);s&&Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>r[e]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function _(t){const a=t.regex,n={keyword:["assert","else","if","in","inherit","let","or","rec","then","with"],literal:["true","false","null"],built_in:["abort","baseNameOf","builtins","derivation","derivationStrict","dirOf","fetchGit","fetchMercurial","fetchTarball","fetchTree","fromTOML","import","isNull","map","placeholder","removeAttrs","scopedImport","throw","toString"]},r={scope:"built_in",match:a.either(...["abort","add","addDrvOutputDependencies","addErrorContext","all","any","appendContext","attrNames","attrValues","baseNameOf","bitAnd","bitOr","bitXor","break","builtins","catAttrs","ceil","compareVersions","concatLists","concatMap","concatStringsSep","convertHash","currentSystem","currentTime","deepSeq","derivation","derivationStrict","dirOf","div","elem","elemAt","false","fetchGit","fetchMercurial","fetchTarball","fetchTree","fetchurl","filter","filterSource","findFile","flakeRefToString","floor","foldl'","fromJSON","fromTOML","functionArgs","genList","genericClosure","getAttr","getContext","getEnv","getFlake","groupBy","hasAttr","hasContext","hashFile","hashString","head","import","intersectAttrs","isAttrs","isBool","isFloat","isFunction","isInt","isList","isNull","isPath","isString","langVersion","length","lessThan","listToAttrs","map","mapAttrs","match","mul","nixPath","nixVersion","null","parseDrvName","parseFlakeRef","partition","path","pathExists","placeholder","readDir","readFile","readFileType","removeAttrs","replaceStrings","scopedImport","seq","sort","split","splitVersion","storeDir","storePath","stringLength","sub","substring","tail","throw","toFile","toJSON","toPath","toString","toXML","trace","traceVerbose","true","tryEval","typeOf","unsafeDiscardOutputDependency","unsafeDiscardStringContext","unsafeGetAttrPos","warn","zipAttrsWith"].map(E=>`builtins\\.${E}`)),relevance:10},e="[A-Za-z_][A-Za-z0-9_'-]*",s={scope:"symbol",match:new RegExp(`<${e}(/${e})*>`)},o="[A-Za-z0-9_\\+\\.-]+",g={scope:"symbol",match:new RegExp(`(\\.\\.|\\.|~)?/(${o})?(/${o})*(?=[\\s;])`)},c=a.either("==","=","\\+\\+","\\+","<=","<\\|","<",">=",">","->","//","/","!=","!","\\|\\|","\\|>","\\?","\\*","&&"),m={scope:"operator",match:a.concat(c,/(?!-)/),relevance:0},f={scope:"number",match:new RegExp(`${t.NUMBER_RE}(?!-)`),relevance:0},u={variants:[{scope:"operator",beforeMatch:/\s/,begin:/-(?!>)/},{begin:[new RegExp(`${t.NUMBER_RE}`),/-/,/(?!>)/],beginScope:{1:"number",2:"operator"}},{begin:[c,/-/,/(?!>)/],beginScope:{1:"operator",2:"operator"}}],relevance:0},b={beforeMatch:/(^|\{|;)\s*/,begin:new RegExp(`${e}(\\.${e})*\\s*=(?!=)`),returnBegin:!0,relevance:0,contains:[{scope:"attr",match:new RegExp(`${e}(\\.${e})*(?=\\s*=)`),relevance:.2}]},d={scope:"char.escape",match:/\\\$/},v={scope:"char.escape",match:/''\$/},i={scope:"subst",begin:/\$\{/,end:/\}/,keywords:n},O={scope:"char.escape",match:/'''/},l={scope:"char.escape",match:/\\(?!\$)./},x={scope:"string",variants:[{begin:"''",end:"''",contains:[v,i,O,l]},{begin:'"',end:'"',contains:[d,i,l]}]},S={scope:"params",match:new RegExp(`${e}\\s*:(?=\\s)`)},p=[f,t.HASH_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.COMMENT(/\/\*\*(?!\/)/,/\*\//,{subLanguage:"markdown",relevance:0}),r,x,s,g,S,b,u,m];i.contains=p;const A=[{scope:"meta.prompt",match:/^nix-repl>(?=\s)/,relevance:10},{scope:"meta",beforeMatch:/\s+/,begin:/:([a-z]+|\?)/}];return{name:"Nix",aliases:["nixos"],keywords:n,contains:p.concat(A)}}var h=_;const w=M(h),$=y({__proto__:null,default:w},[h]);export{h as a,$ as n};
//# sourceMappingURL=nix-sM4TXOtu.chunk.mjs.map
