mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-30 09:03:15 +00:00
2 lines
3.3 KiB
JavaScript
2 lines
3.3 KiB
JavaScript
import{g as A}from"./index-TA8jW4qE.js";function y(e,o){for(var r=0;r<o.length;r++){const n=o[r];if(typeof n!="string"&&!Array.isArray(n)){for(const t in n)if(t!=="default"&&!(t in e)){const a=Object.getOwnPropertyDescriptor(n,t);a&&Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:()=>n[t]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const _=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],p=["true","false","null","undefined","NaN","Infinity"],b=["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],I=["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],m=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],N=["arguments","this","super","console","window","document","localStorage","module","global"],O=[].concat(m,N,b,I);function R(e){const o=["npm","print"],r=["yes","no","on","off"],n=["then","unless","until","loop","by","when","and","or","is","isnt","not"],t=["var","const","let","function","static"],a=f=>S=>!f.includes(S),s={keyword:_.concat(n).filter(a(t)),literal:p.concat(r),built_in:O.concat(o)},i="[A-Za-z$_][0-9A-Za-z$_]*",c={className:"subst",begin:/#\{/,end:/\}/,keywords:s},l=[e.BINARY_NUMBER_MODE,e.inherit(e.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,c]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,c]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[c,e.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)",relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+i},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{begin:"```",end:"```"},{begin:"`",end:"`"}]}];c.contains=l;const u=e.inherit(e.TITLE_MODE,{begin:i}),g="(\\(.*\\)\\s*)?\\B[-=]>",d={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(l)}]};return{name:"CoffeeScript",aliases:["coffee","cson","iced"],keywords:s,illegal:/\/\*/,contains:l.concat([e.COMMENT("###","###"),e.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+i+"\\s*=\\s*"+g,end:"[-=]>",returnBegin:!0,contains:[u,d]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:g,end:"[-=]>",returnBegin:!0,contains:[d]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[u]},u]},{begin:i+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}var E=R;const B=A(E),C=y({__proto__:null,default:B},[E]);export{C as c};
|