Team Ai
Datasetpublic

Brunobkr/llama.cpp_AlgMor24_github

ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
index.js14600 linesDownload Raw Back to lib
1'use strict';2 3Object.defineProperty(exports, '__esModule', {4  value: true5});6function _objectWithoutPropertiesLoose(r, e) {7  if (null == r) return {};8  var t = {};9  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {10    if (-1 !== e.indexOf(n)) continue;11    t[n] = r[n];12  }13  return t;14}15class Position {16  constructor(line, col, index) {17    this.line = void 0;18    this.column = void 0;19    this.index = void 0;20    this.line = line;21    this.column = col;22    this.index = index;23  }24}25class SourceLocation {26  constructor(start, end) {27    this.start = void 0;28    this.end = void 0;29    this.filename = void 0;30    this.identifierName = void 0;31    this.start = start;32    this.end = end;33  }34}35function createPositionWithColumnOffset(position, columnOffset) {36  const {37    line,38    column,39    index40  } = position;41  return new Position(line, column + columnOffset, index + columnOffset);42}43const code = "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";44var ModuleErrors = {45  ImportMetaOutsideModule: {46    message: `import.meta may appear only with 'sourceType: "module"'`,47    code48  },49  ImportOutsideModule: {50    message: `'import' and 'export' may appear only with 'sourceType: "module"'`,51    code52  }53};54const NodeDescriptions = {55  ArrayPattern: "array destructuring pattern",56  AssignmentExpression: "assignment expression",57  AssignmentPattern: "assignment expression",58  ArrowFunctionExpression: "arrow function expression",59  ConditionalExpression: "conditional expression",60  CatchClause: "catch clause",61  ForOfStatement: "for-of statement",62  ForInStatement: "for-in statement",63  ForStatement: "for-loop",64  FormalParameters: "function parameter list",65  Identifier: "identifier",66  ImportSpecifier: "import specifier",67  ImportDefaultSpecifier: "import default specifier",68  ImportNamespaceSpecifier: "import namespace specifier",69  ObjectPattern: "object destructuring pattern",70  ParenthesizedExpression: "parenthesized expression",71  RestElement: "rest element",72  UpdateExpression: {73    true: "prefix operation",74    false: "postfix operation"75  },76  VariableDeclarator: "variable declaration",77  YieldExpression: "yield expression"78};79const toNodeDescription = node => node.type === "UpdateExpression" ? NodeDescriptions.UpdateExpression[`${node.prefix}`] : NodeDescriptions[node.type];80var StandardErrors = {81  AccessorIsGenerator: ({82    kind83  }) => `A ${kind}ter cannot be a generator.`,84  ArgumentsInClass: "'arguments' is only allowed in functions and class methods.",85  AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.",86  AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.",87  AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.",88  AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.",89  AwaitUsingNotInAsyncContext: "'await using' is only allowed within async functions and at the top levels of modules.",90  AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.",91  BadGetterArity: "A 'get' accessor must not have any formal parameters.",92  BadSetterArity: "A 'set' accessor must have exactly one formal parameter.",93  BadSetterRestParameter: "A 'set' accessor function argument must not be a rest parameter.",94  ConstructorClassField: "Classes may not have a field named 'constructor'.",95  ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.",96  ConstructorIsAccessor: "Class constructor may not be an accessor.",97  ConstructorIsAsync: "Constructor can't be an async function.",98  ConstructorIsGenerator: "Constructor can't be a generator.",99  DeclarationMissingInitializer: ({100    kind101  }) => `Missing initializer in ${kind} declaration.`,102  DecoratorArgumentsOutsideParentheses: "Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",103  DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",104  DecoratorsBeforeAfterExport: "Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",105  DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",106  DecoratorExportClass: "Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",107  DecoratorSemicolon: "Decorators must not be followed by a semicolon.",108  DecoratorStaticBlock: "Decorators can't be used with a static block.",109  DeferImportRequiresNamespace: 'Only `import defer * as x from "./module"` is valid.',110  DeletePrivateField: "Deleting a private field is not allowed.",111  DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.",112  DuplicateConstructor: "Duplicate constructor in the same class.",113  DuplicateDefaultExport: "Only one default export allowed per module.",114  DuplicateExport: ({115    exportName116  }) => `\`${exportName}\` has already been exported. Exported identifiers must be unique.`,117  DuplicateProto: "Redefinition of __proto__ property.",118  DuplicateRegExpFlags: "Duplicate regular expression flag.",119  ElementAfterRest: "Rest element must be last element.",120  EscapedCharNotAnIdentifier: "Invalid Unicode escape.",121  ExportBindingIsString: ({122    localName,123    exportName124  }) => `A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${localName}' as '${exportName}' } from 'some-module'\`?`,125  ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.",126  ForInOfLoopInitializer: ({127    type128  }) => `'${type === "ForInStatement" ? "for-in" : "for-of"}' loop variable declaration may not have an initializer.`,129  ForInUsing: "For-in loop may not start with 'using' declaration.",130  ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.",131  ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.",132  GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.",133  IllegalBreakContinue: ({134    type135  }) => `Unsyntactic ${type === "BreakStatement" ? "break" : "continue"}.`,136  IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.",137  IllegalReturn: "'return' outside of function.",138  ImportAttributesUseAssert: "The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",139  ImportBindingIsString: ({140    importName141  }) => `A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${importName}" as foo }\`?`,142  ImportCallArity: `\`import()\` requires exactly one or two arguments.`,143  ImportCallNotNewExpression: "Cannot use new with import(...).",144  ImportCallSpreadArgument: "`...` is not allowed in `import()`.",145  ImportJSONBindingNotDefault: "A JSON module can only be imported with `default`.",146  ImportReflectionHasAssertion: "`import module x` cannot have assertions.",147  ImportReflectionNotBinding: 'Only `import module x from "./module"` is valid.',148  IncompatibleRegExpUVFlags: "The 'u' and 'v' regular expression flags cannot be enabled at the same time.",149  InvalidBigIntLiteral: "Invalid BigIntLiteral.",150  InvalidCodePoint: "Code point out of bounds.",151  InvalidCoverDiscardElement: "'void' must be followed by an expression when not used in a binding position.",152  InvalidCoverInitializedName: "Invalid shorthand property initializer.",153  InvalidDecimal: "Invalid decimal.",154  InvalidDigit: ({155    radix156  }) => `Expected number in radix ${radix}.`,157  InvalidEscapeSequence: "Bad character escape sequence.",158  InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.",159  InvalidEscapedReservedWord: ({160    reservedWord161  }) => `Escape sequence in keyword ${reservedWord}.`,162  InvalidIdentifier: ({163    identifierName164  }) => `Invalid identifier ${identifierName}.`,165  InvalidLhs: ({166    ancestor167  }) => `Invalid left-hand side in ${toNodeDescription(ancestor)}.`,168  InvalidLhsBinding: ({169    ancestor170  }) => `Binding invalid left-hand side in ${toNodeDescription(ancestor)}.`,171  InvalidLhsOptionalChaining: ({172    ancestor173  }) => `Invalid optional chaining in the left-hand side of ${toNodeDescription(ancestor)}.`,174  InvalidNumber: "Invalid number.",175  InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.",176  InvalidOrUnexpectedToken: ({177    unexpected178  }) => `Unexpected character '${unexpected}'.`,179  InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.",180  InvalidPrivateFieldResolution: ({181    identifierName182  }) => `Private name #${identifierName} is not defined.`,183  InvalidPropertyBindingPattern: "Binding member expression.",184  InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.",185  InvalidRestAssignmentPattern: "Invalid rest operator's argument.",186  LabelRedeclaration: ({187    labelName188  }) => `Label '${labelName}' is already declared.`,189  LetInLexicalBinding: "'let' is disallowed as a lexically bound name.",190  LineTerminatorBeforeArrow: "No line break is allowed before '=>'.",191  MalformedRegExpFlags: "Invalid regular expression flag.",192  MissingClassName: "A class name is required.",193  MissingEqInAssignment: "Only '=' operator can be used for specifying default value.",194  MissingSemicolon: "Missing semicolon.",195  MissingPlugin: ({196    missingPlugin197  }) => `This experimental syntax requires enabling the parser plugin: ${missingPlugin.map(name => JSON.stringify(name)).join(", ")}.`,198  MissingOneOfPlugins: ({199    missingPlugin200  }) => `This experimental syntax requires enabling one of the following parser plugin(s): ${missingPlugin.map(name => JSON.stringify(name)).join(", ")}.`,201  MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.",202  MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators.",203  ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`.",204  ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values.",205  ModuleAttributesWithDuplicateKeys: ({206    key207  }) => `Duplicate key "${key}" is not allowed in module attributes.`,208  ModuleExportNameHasLoneSurrogate: ({209    surrogateCharCode210  }) => `An export name cannot include a lone surrogate, found '\\u${surrogateCharCode.toString(16)}'.`,211  ModuleExportUndefined: ({212    localName213  }) => `Export '${localName}' is not defined.`,214  MultipleDefaultsInSwitch: "Multiple default clauses.",215  NewlineAfterThrow: "Illegal newline after throw.",216  NoCatchOrFinally: "Missing catch or finally clause.",217  NumberIdentifier: "Identifier directly after number.",218  NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",219  ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.",220  OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.",221  OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.",222  OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.",223  ParamDupe: "Argument name clash.",224  PatternHasAccessor: "Object pattern can't contain getter or setter.",225  PatternHasMethod: "Object pattern can't contain methods.",226  PrivateInExpectedIn: ({227    identifierName228  }) => `Private names are only allowed in property accesses (\`obj.#${identifierName}\`) or in \`in\` expressions (\`#${identifierName} in obj\`).`,229  PrivateNameRedeclaration: ({230    identifierName231  }) => `Duplicate private name #${identifierName}.`,232  RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",233  RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",234  RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",235  RecordNoProto: "'__proto__' is not allowed in Record expressions.",236  RestTrailingComma: "Unexpected trailing comma after rest element.",237  SloppyFunction: "In non-strict mode code, functions can only be declared at top level or inside a block.",238  SloppyFunctionAnnexB: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",239  SourcePhaseImportRequiresDefault: 'Only `import source x from "./module"` is valid.',240  StaticPrototype: "Classes may not have static property named prototype.",241  SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",242  SuperPrivateField: "Private fields can't be accessed on super.",243  TrailingDecorator: "Decorators must be attached to a class element.",244  TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",245  TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",246  TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",247  UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.",248  UnexpectedAwaitAfterPipelineBody: 'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',249  UnexpectedDigitAfterHash: "Unexpected digit after hash token.",250  UnexpectedImportExport: "'import' and 'export' may only appear at the top level.",251  UnexpectedKeyword: ({252    keyword253  }) => `Unexpected keyword '${keyword}'.`,254  UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.",255  UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context.",256  UnexpectedNewTarget: "`new.target` can only be used in functions or class properties.",257  UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits.",258  UnexpectedPrivateField: "Unexpected private name.",259  UnexpectedReservedWord: ({260    reservedWord261  }) => `Unexpected reserved word '${reservedWord}'.`,262  UnexpectedSuper: "'super' is only allowed in object methods and classes.",263  UnexpectedToken: ({264    expected,265    unexpected266  }) => `Unexpected token${unexpected ? ` '${unexpected}'.` : ""}${expected ? `, expected "${expected}"` : ""}`,267  UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",268  UnexpectedUsingDeclaration: "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",269  UnexpectedVoidPattern: "Unexpected void binding.",270  UnsupportedBind: "Binding should be performed on object property.",271  UnsupportedDecoratorExport: "A decorated export must export a class declaration.",272  UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.",273  UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.",274  UnsupportedMetaProperty: ({275    target,276    onlyValidPropertyName277  }) => `The only valid meta property for ${target} is ${target}.${onlyValidPropertyName}.`,278  UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.",279  UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.",280  UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",281  UnterminatedComment: "Unterminated comment.",282  UnterminatedRegExp: "Unterminated regular expression.",283  UnterminatedString: "Unterminated string constant.",284  UnterminatedTemplate: "Unterminated template.",285  UsingDeclarationExport: "Using declaration cannot be exported.",286  UsingDeclarationHasBindingPattern: "Using declaration cannot have destructuring patterns.",287  VarRedeclaration: ({288    identifierName289  }) => `Identifier '${identifierName}' has already been declared.`,290  VoidPatternCatchClauseParam: "A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",291  VoidPatternInitializer: "A void binding may not have an initializer.",292  YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.",293  YieldInParameter: "Yield expression is not allowed in formal parameters.",294  YieldNotInGeneratorFunction: "'yield' is only allowed within generator functions.",295  ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0."296};297var StrictModeErrors = {298  StrictDelete: "Deleting local variable in strict mode.",299  StrictEvalArguments: ({300    referenceName301  }) => `Assigning to '${referenceName}' in strict mode.`,302  StrictEvalArgumentsBinding: ({303    bindingName304  }) => `Binding '${bindingName}' in strict mode.`,305  StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block.",306  StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.",307  StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.",308  StrictWith: "'with' in strict mode."309};310var ParseExpressionErrors = {311  ParseExpressionEmptyInput: "Unexpected parseExpression() input: The input is empty or contains only comments.",312  ParseExpressionExpectsEOF: ({313    unexpected314  }) => `Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(unexpected)}\`.`315};316const UnparenthesizedPipeBodyDescriptions = new Set(["ArrowFunctionExpression", "AssignmentExpression", "ConditionalExpression", "YieldExpression"]);317var PipelineOperatorErrors = Object.assign({318  PipeBodyIsTighter: "Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",319  PipeTopicRequiresHackPipes: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',320  PipeTopicUnbound: "Topic reference is unbound; it must be inside a pipe body.",321  PipeTopicUnconfiguredToken: ({322    token323  }) => `Invalid topic token ${token}. In order to use ${token} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${token}" }.`,324  PipeTopicUnused: "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",325  PipeUnparenthesizedBody: ({326    type327  }) => `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({328    type329  })}; please wrap it in parentheses.`330}, {331  PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',332  PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.",333  PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.",334  PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.",335  PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.",336  PrimaryTopicRequiresSmartPipeline: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'337});338const _excluded = ["message"];339function defineHidden(obj, key, value) {340  Object.defineProperty(obj, key, {341    enumerable: false,342    configurable: true,343    value344  });345}346function toParseErrorConstructor({347  toMessage,348  code,349  reasonCode,350  syntaxPlugin351}) {352  const hasMissingPlugin = reasonCode === "MissingPlugin" || reasonCode === "MissingOneOfPlugins";353  const oldReasonCodes = {354    AccessorCannotDeclareThisParameter: "AccesorCannotDeclareThisParameter",355    AccessorCannotHaveTypeParameters: "AccesorCannotHaveTypeParameters",356    ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: "ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",357    SetAccessorCannotHaveOptionalParameter: "SetAccesorCannotHaveOptionalParameter",358    SetAccessorCannotHaveRestParameter: "SetAccesorCannotHaveRestParameter",359    SetAccessorCannotHaveReturnType: "SetAccesorCannotHaveReturnType"360  };361  if (oldReasonCodes[reasonCode]) {362    reasonCode = oldReasonCodes[reasonCode];363  }364  return function constructor(loc, details) {365    const error = new SyntaxError();366    error.code = code;367    error.reasonCode = reasonCode;368    error.loc = loc;369    error.pos = loc.index;370    error.syntaxPlugin = syntaxPlugin;371    if (hasMissingPlugin) {372      error.missingPlugin = details.missingPlugin;373    }374    defineHidden(error, "clone", function clone(overrides = {}) {375      var _overrides$loc;376      const {377        line,378        column,379        index380      } = (_overrides$loc = overrides.loc) != null ? _overrides$loc : loc;381      return constructor(new Position(line, column, index), Object.assign({}, details, overrides.details));382    });383    defineHidden(error, "details", details);384    Object.defineProperty(error, "message", {385      configurable: true,386      get() {387        const message = `${toMessage(details)} (${loc.line}:${loc.column})`;388        this.message = message;389        return message;390      },391      set(value) {392        Object.defineProperty(this, "message", {393          value,394          writable: true395        });396      }397    });398    return error;399  };400}401function ParseErrorEnum(argument, syntaxPlugin) {402  if (Array.isArray(argument)) {403    return parseErrorTemplates => ParseErrorEnum(parseErrorTemplates, argument[0]);404  }405  const ParseErrorConstructors = {};406  for (const reasonCode of Object.keys(argument)) {407    const template = argument[reasonCode];408    const _ref = typeof template === "string" ? {409        message: () => template410      } : typeof template === "function" ? {411        message: template412      } : template,413      {414        message415      } = _ref,416      rest = _objectWithoutPropertiesLoose(_ref, _excluded);417    const toMessage = typeof message === "string" ? () => message : message;418    ParseErrorConstructors[reasonCode] = toParseErrorConstructor(Object.assign({419      code: "BABEL_PARSER_SYNTAX_ERROR",420      reasonCode,421      toMessage422    }, syntaxPlugin ? {423      syntaxPlugin424    } : {}, rest));425  }426  return ParseErrorConstructors;427}428const Errors = Object.assign({}, ParseErrorEnum(ModuleErrors), ParseErrorEnum(StandardErrors), ParseErrorEnum(StrictModeErrors), ParseErrorEnum(ParseExpressionErrors), ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors));429function createDefaultOptions() {430  return {431    sourceType: "script",432    sourceFilename: undefined,433    startIndex: 0,434    startColumn: 0,435    startLine: 1,436    allowAwaitOutsideFunction: false,437    allowReturnOutsideFunction: false,438    allowNewTargetOutsideFunction: false,439    allowImportExportEverywhere: false,440    allowSuperOutsideMethod: false,441    allowUndeclaredExports: false,442    allowYieldOutsideFunction: false,443    plugins: [],444    strictMode: undefined,445    ranges: false,446    tokens: false,447    createImportExpressions: false,448    createParenthesizedExpressions: false,449    errorRecovery: false,450    attachComment: true,451    annexB: true452  };453}454function getOptions(opts) {455  const options = createDefaultOptions();456  if (opts == null) {457    return options;458  }459  if (opts.annexB != null && opts.annexB !== false) {460    throw new Error("The `annexB` option can only be set to `false`.");461  }462  for (const key of Object.keys(options)) {463    if (opts[key] != null) options[key] = opts[key];464  }465  if (options.startLine === 1) {466    if (opts.startIndex == null && options.startColumn > 0) {467      options.startIndex = options.startColumn;468    } else if (opts.startColumn == null && options.startIndex > 0) {469      options.startColumn = options.startIndex;470    }471  } else if (opts.startColumn == null || opts.startIndex == null) {472    if (opts.startIndex != null) {473      throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");474    }475  }476  if (options.sourceType === "commonjs") {477    if (opts.allowAwaitOutsideFunction != null) {478      throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");479    }480    if (opts.allowReturnOutsideFunction != null) {481      throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");482    }483    if (opts.allowNewTargetOutsideFunction != null) {484      throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.");485    }486  }487  return options;488}489const {490  defineProperty491} = Object;492const toUnenumerable = (object, key) => {493  if (object) {494    defineProperty(object, key, {495      enumerable: false,496      value: object[key]497    });498  }499};500function toESTreeLocation(node) {501  toUnenumerable(node.loc.start, "index");502  toUnenumerable(node.loc.end, "index");503  return node;504}505var estree = superClass => class ESTreeParserMixin extends superClass {506  parse() {507    const file = toESTreeLocation(super.parse());508    if (this.optionFlags & 256) {509      file.tokens = file.tokens.map(toESTreeLocation);510    }511    return file;512  }513  parseRegExpLiteral({514    pattern,515    flags516  }) {517    let regex = null;518    try {519      regex = new RegExp(pattern, flags);520    } catch (_) {}521    const node = this.estreeParseLiteral(regex);522    node.regex = {523      pattern,524      flags525    };526    return node;527  }528  parseBigIntLiteral(value) {529    let bigInt;530    try {531      bigInt = BigInt(value);532    } catch (_unused) {533      bigInt = null;534    }535    const node = this.estreeParseLiteral(bigInt);536    node.bigint = String(node.value || value);537    return node;538  }539  parseDecimalLiteral(value) {540    const decimal = null;541    const node = this.estreeParseLiteral(decimal);542    node.decimal = String(node.value || value);543    return node;544  }545  estreeParseLiteral(value) {546    return this.parseLiteral(value, "Literal");547  }548  parseStringLiteral(value) {549    return this.estreeParseLiteral(value);550  }551  parseNumericLiteral(value) {552    return this.estreeParseLiteral(value);553  }554  parseNullLiteral() {555    return this.estreeParseLiteral(null);556  }557  parseBooleanLiteral(value) {558    return this.estreeParseLiteral(value);559  }560  estreeParseChainExpression(node, endLoc) {561    const chain = this.startNodeAtNode(node);562    chain.expression = node;563    return this.finishNodeAt(chain, "ChainExpression", endLoc);564  }565  directiveToStmt(directive) {566    const expression = directive.value;567    delete directive.value;568    this.castNodeTo(expression, "Literal");569    expression.raw = expression.extra.raw;570    expression.value = expression.extra.expressionValue;571    const stmt = this.castNodeTo(directive, "ExpressionStatement");572    stmt.expression = expression;573    stmt.directive = expression.extra.rawValue;574    delete expression.extra;575    return stmt;576  }577  fillOptionalPropertiesForTSESLint(node) {}578  cloneEstreeStringLiteral(node) {579    const {580      start,581      end,582      loc,583      range,584      raw,585      value586    } = node;587    const cloned = Object.create(node.constructor.prototype);588    cloned.type = "Literal";589    cloned.start = start;590    cloned.end = end;591    cloned.loc = loc;592    cloned.range = range;593    cloned.raw = raw;594    cloned.value = value;595    return cloned;596  }597  initFunction(node, isAsync) {598    super.initFunction(node, isAsync);599    node.expression = false;600  }601  checkDeclaration(node) {602    if (node != null && this.isObjectProperty(node)) {603      this.checkDeclaration(node.value);604    } else {605      super.checkDeclaration(node);606    }607  }608  getObjectOrClassMethodParams(method) {609    return method.value.params;610  }611  isValidDirective(stmt) {612    var _stmt$expression$extr;613    return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) != null && _stmt$expression$extr.parenthesized);614  }615  parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) {616    super.parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse);617    const directiveStatements = node.directives.map(d => this.directiveToStmt(d));618    node.body = directiveStatements.concat(node.body);619    delete node.directives;620  }621  parsePrivateName() {622    const node = super.parsePrivateName();623    if (!this.getPluginOption("estree", "classFeatures")) {624      return node;625    }626    return this.convertPrivateNameToPrivateIdentifier(node);627  }628  convertPrivateNameToPrivateIdentifier(node) {629    const name = super.getPrivateNameSV(node);630    delete node.id;631    node.name = name;632    return this.castNodeTo(node, "PrivateIdentifier");633  }634  isPrivateName(node) {635    if (!this.getPluginOption("estree", "classFeatures")) {636      return super.isPrivateName(node);637    }638    return node.type === "PrivateIdentifier";639  }640  getPrivateNameSV(node) {641    if (!this.getPluginOption("estree", "classFeatures")) {642      return super.getPrivateNameSV(node);643    }644    return node.name;645  }646  parseLiteral(value, type) {647    const node = super.parseLiteral(value, type);648    node.raw = node.extra.raw;649    delete node.extra;650    return node;651  }652  parseFunctionBody(node, allowExpression, isMethod = false) {653    super.parseFunctionBody(node, allowExpression, isMethod);654    node.expression = node.body.type !== "BlockStatement";655  }656  parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {657    let funcNode = this.startNode();658    funcNode.kind = node.kind;659    funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope);660    delete funcNode.kind;661    const {662      typeParameters663    } = node;664    if (typeParameters) {665      delete node.typeParameters;666      funcNode.typeParameters = typeParameters;667      this.resetStartLocationFromNode(funcNode, typeParameters);668    }669    const valueNode = this.castNodeTo(funcNode, "FunctionExpression");670    node.value = valueNode;671    if (type === "ClassPrivateMethod") {672      node.computed = false;673    }674    if (type === "ObjectMethod") {675      if (node.kind === "method") {676        node.kind = "init";677      }678      node.shorthand = false;679      return this.finishNode(node, "Property");680    } else {681      return this.finishNode(node, "MethodDefinition");682    }683  }684  nameIsConstructor(key) {685    if (key.type === "Literal") return key.value === "constructor";686    return super.nameIsConstructor(key);687  }688  parseClassProperty(...args) {689    const propertyNode = super.parseClassProperty(...args);690    if (!this.getPluginOption("estree", "classFeatures")) {691      return propertyNode;692    }693    this.castNodeTo(propertyNode, "PropertyDefinition");694    return propertyNode;695  }696  parseClassPrivateProperty(...args) {697    const propertyNode = super.parseClassPrivateProperty(...args);698    if (!this.getPluginOption("estree", "classFeatures")) {699      return propertyNode;700    }701    this.castNodeTo(propertyNode, "PropertyDefinition");702    propertyNode.computed = false;703    return propertyNode;704  }705  parseClassAccessorProperty(node) {706    const accessorPropertyNode = super.parseClassAccessorProperty(node);707    if (!this.getPluginOption("estree", "classFeatures")) {708      return accessorPropertyNode;709    }710    if (accessorPropertyNode.abstract && this.hasPlugin("typescript")) {711      delete accessorPropertyNode.abstract;712      this.castNodeTo(accessorPropertyNode, "TSAbstractAccessorProperty");713    } else {714      this.castNodeTo(accessorPropertyNode, "AccessorProperty");715    }716    return accessorPropertyNode;717  }718  parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors) {719    const node = super.parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors);720    if (node) {721      node.kind = "init";722      this.castNodeTo(node, "Property");723    }724    return node;725  }726  finishObjectProperty(node) {727    node.kind = "init";728    return this.finishNode(node, "Property");729  }730  isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding) {731    return type === "Property" ? "value" : super.isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding);732  }733  isAssignable(node, isBinding) {734    if (node != null && this.isObjectProperty(node)) {735      return this.isAssignable(node.value, isBinding);736    }737    return super.isAssignable(node, isBinding);738  }739  toAssignable(node, isLHS = false) {740    if (node != null && this.isObjectProperty(node)) {741      const {742        key,743        value744      } = node;745      if (this.isPrivateName(key)) {746        this.classScope.usePrivateName(this.getPrivateNameSV(key), key.loc.start);747      }748      this.toAssignable(value, isLHS);749    } else {750      super.toAssignable(node, isLHS);751    }752  }753  toAssignableObjectExpressionProp(prop, isLast, isLHS) {754    if (prop.type === "Property" && (prop.kind === "get" || prop.kind === "set")) {755      this.raise(Errors.PatternHasAccessor, prop.key);756    } else if (prop.type === "Property" && prop.method) {757      this.raise(Errors.PatternHasMethod, prop.key);758    } else {759      super.toAssignableObjectExpressionProp(prop, isLast, isLHS);760    }761  }762  finishCallExpression(unfinished, optional) {763    const node = super.finishCallExpression(unfinished, optional);764    if (node.callee.type === "Import") {765      var _ref, _ref2;766      this.castNodeTo(node, "ImportExpression");767      node.source = node.arguments[0];768      node.options = (_ref = node.arguments[1]) != null ? _ref : null;769      node.attributes = (_ref2 = node.arguments[1]) != null ? _ref2 : null;770      delete node.arguments;771      delete node.callee;772    } else if (node.type === "OptionalCallExpression") {773      this.castNodeTo(node, "CallExpression");774    } else {775      node.optional = false;776    }777    return node;778  }779  toReferencedArguments(node) {780    if (node.type === "ImportExpression") {781      return;782    }783    super.toReferencedArguments(node);784  }785  parseExport(unfinished, decorators) {786    const exportStartLoc = this.state.lastTokStartLoc;787    const node = super.parseExport(unfinished, decorators);788    switch (node.type) {789      case "ExportAllDeclaration":790        node.exported = null;791        break;792      case "ExportNamedDeclaration":793        if (node.specifiers.length === 1 && node.specifiers[0].type === "ExportNamespaceSpecifier") {794          this.castNodeTo(node, "ExportAllDeclaration");795          node.exported = node.specifiers[0].exported;796          delete node.specifiers;797        }798      case "ExportDefaultDeclaration":799        {800          var _declaration$decorato;801          const {802            declaration803          } = node;804          if ((declaration == null ? void 0 : declaration.type) === "ClassDeclaration" && ((_declaration$decorato = declaration.decorators) == null ? void 0 : _declaration$decorato.length) > 0 && declaration.start === node.start) {805            this.resetStartLocation(node, exportStartLoc);806          }807        }808        break;809    }810    return node;811  }812  stopParseSubscript(base, state) {813    const node = super.stopParseSubscript(base, state);814    if (state.optionalChainMember) {815      return this.estreeParseChainExpression(node, base.loc.end);816    }817    return node;818  }819  parseMember(base, startLoc, state, computed, optional) {820    const node = super.parseMember(base, startLoc, state, computed, optional);821    if (node.type === "OptionalMemberExpression") {822      this.castNodeTo(node, "MemberExpression");823    } else {824      node.optional = false;825    }826    return node;827  }828  isOptionalMemberExpression(node) {829    if (node.type === "ChainExpression") {830      return node.expression.type === "MemberExpression";831    }832    return super.isOptionalMemberExpression(node);833  }834  hasPropertyAsPrivateName(node) {835    if (node.type === "ChainExpression") {836      node = node.expression;837    }838    return super.hasPropertyAsPrivateName(node);839  }840  isObjectProperty(node) {841    return node.type === "Property" && node.kind === "init" && !node.method;842  }843  isObjectMethod(node) {844    return node.type === "Property" && (node.method || node.kind === "get" || node.kind === "set");845  }846  castNodeTo(node, type) {847    const result = super.castNodeTo(node, type);848    this.fillOptionalPropertiesForTSESLint(result);849    return result;850  }851  cloneIdentifier(node) {852    const cloned = super.cloneIdentifier(node);853    this.fillOptionalPropertiesForTSESLint(cloned);854    return cloned;855  }856  cloneStringLiteral(node) {857    if (node.type === "Literal") {858      return this.cloneEstreeStringLiteral(node);859    }860    return super.cloneStringLiteral(node);861  }862  finishNodeAt(node, type, endLoc) {863    return toESTreeLocation(super.finishNodeAt(node, type, endLoc));864  }865  finishNode(node, type) {866    const result = super.finishNode(node, type);867    this.fillOptionalPropertiesForTSESLint(result);868    return result;869  }870  resetStartLocation(node, startLoc) {871    super.resetStartLocation(node, startLoc);872    toESTreeLocation(node);873  }874  resetEndLocation(node, endLoc = this.state.lastTokEndLoc) {875    super.resetEndLocation(node, endLoc);876    toESTreeLocation(node);877  }878};879class TokContext {880  constructor(token, preserveSpace) {881    this.token = void 0;882    this.preserveSpace = void 0;883    this.token = token;884    this.preserveSpace = !!preserveSpace;885  }886}887const types = {888  brace: new TokContext("{"),889  j_oTag: new TokContext("<tag"),890  j_cTag: new TokContext("</tag"),891  j_expr: new TokContext("<tag>...</tag>", true)892};893types.template = new TokContext("`", true);894const beforeExpr = true;895const startsExpr = true;896const isLoop = true;897const isAssign = true;898const prefix = true;899const postfix = true;900class ExportedTokenType {901  constructor(label, conf = {}) {902    this.label = void 0;903    this.keyword = void 0;904    this.beforeExpr = void 0;905    this.startsExpr = void 0;906    this.rightAssociative = void 0;907    this.isLoop = void 0;908    this.isAssign = void 0;909    this.prefix = void 0;910    this.postfix = void 0;911    this.binop = void 0;912    this.label = label;913    this.keyword = conf.keyword;914    this.beforeExpr = !!conf.beforeExpr;915    this.startsExpr = !!conf.startsExpr;916    this.rightAssociative = !!conf.rightAssociative;917    this.isLoop = !!conf.isLoop;918    this.isAssign = !!conf.isAssign;919    this.prefix = !!conf.prefix;920    this.postfix = !!conf.postfix;921    this.binop = conf.binop != null ? conf.binop : null;922    this.updateContext = null;923  }924}925const keywords$1 = new Map();926function createKeyword(name, options = {}) {927  options.keyword = name;928  const token = createToken(name, options);929  keywords$1.set(name, token);930  return token;931}932function createBinop(name, binop) {933  return createToken(name, {934    beforeExpr,935    binop936  });937}938let tokenTypeCounter = -1;939const tokenTypes = [];940const tokenLabels = [];941const tokenBinops = [];942const tokenBeforeExprs = [];943const tokenStartsExprs = [];944const tokenPrefixes = [];945function createToken(name, options = {}) {946  var _options$binop, _options$beforeExpr, _options$startsExpr, _options$prefix;947  ++tokenTypeCounter;948  tokenLabels.push(name);949  tokenBinops.push((_options$binop = options.binop) != null ? _options$binop : -1);950  tokenBeforeExprs.push((_options$beforeExpr = options.beforeExpr) != null ? _options$beforeExpr : false);951  tokenStartsExprs.push((_options$startsExpr = options.startsExpr) != null ? _options$startsExpr : false);952  tokenPrefixes.push((_options$prefix = options.prefix) != null ? _options$prefix : false);953  tokenTypes.push(new ExportedTokenType(name, options));954  return tokenTypeCounter;955}956function createKeywordLike(name, options = {}) {957  var _options$binop2, _options$beforeExpr2, _options$startsExpr2, _options$prefix2;958  ++tokenTypeCounter;959  keywords$1.set(name, tokenTypeCounter);960  tokenLabels.push(name);961  tokenBinops.push((_options$binop2 = options.binop) != null ? _options$binop2 : -1);962  tokenBeforeExprs.push((_options$beforeExpr2 = options.beforeExpr) != null ? _options$beforeExpr2 : false);963  tokenStartsExprs.push((_options$startsExpr2 = options.startsExpr) != null ? _options$startsExpr2 : false);964  tokenPrefixes.push((_options$prefix2 = options.prefix) != null ? _options$prefix2 : false);965  tokenTypes.push(new ExportedTokenType("name", options));966  return tokenTypeCounter;967}968const tt = {969  bracketL: createToken("[", {970    beforeExpr,971    startsExpr972  }),973  bracketHashL: createToken("#[", {974    beforeExpr,975    startsExpr976  }),977  bracketBarL: createToken("[|", {978    beforeExpr,979    startsExpr980  }),981  bracketR: createToken("]"),982  bracketBarR: createToken("|]"),983  braceL: createToken("{", {984    beforeExpr,985    startsExpr986  }),987  braceBarL: createToken("{|", {988    beforeExpr,989    startsExpr990  }),991  braceHashL: createToken("#{", {992    beforeExpr,993    startsExpr994  }),995  braceR: createToken("}"),996  braceBarR: createToken("|}"),997  parenL: createToken("(", {998    beforeExpr,999    startsExpr1000  }),1001  parenR: createToken(")"),1002  comma: createToken(",", {1003    beforeExpr1004  }),1005  semi: createToken(";", {1006    beforeExpr1007  }),1008  colon: createToken(":", {1009    beforeExpr1010  }),1011  doubleColon: createToken("::", {1012    beforeExpr1013  }),1014  dot: createToken("."),1015  question: createToken("?", {1016    beforeExpr1017  }),1018  questionDot: createToken("?."),1019  arrow: createToken("=>", {1020    beforeExpr1021  }),1022  template: createToken("template"),1023  ellipsis: createToken("...", {1024    beforeExpr1025  }),1026  backQuote: createToken("`", {1027    startsExpr1028  }),1029  dollarBraceL: createToken("${", {1030    beforeExpr,1031    startsExpr1032  }),1033  templateTail: createToken("...`", {1034    startsExpr1035  }),1036  templateNonTail: createToken("...${", {1037    beforeExpr,1038    startsExpr1039  }),1040  at: createToken("@"),1041  hash: createToken("#", {1042    startsExpr1043  }),1044  interpreterDirective: createToken("#!..."),1045  eq: createToken("=", {1046    beforeExpr,1047    isAssign1048  }),1049  assign: createToken("_=", {1050    beforeExpr,1051    isAssign1052  }),1053  slashAssign: createToken("_=", {1054    beforeExpr,1055    isAssign1056  }),1057  xorAssign: createToken("_=", {1058    beforeExpr,1059    isAssign1060  }),1061  moduloAssign: createToken("_=", {1062    beforeExpr,1063    isAssign1064  }),1065  incDec: createToken("++/--", {1066    prefix,1067    postfix,1068    startsExpr1069  }),1070  bang: createToken("!", {1071    beforeExpr,1072    prefix,1073    startsExpr1074  }),1075  tilde: createToken("~", {1076    beforeExpr,1077    prefix,1078    startsExpr1079  }),1080  doubleCaret: createToken("^^", {1081    startsExpr1082  }),1083  doubleAt: createToken("@@", {1084    startsExpr1085  }),1086  pipeline: createBinop("|>", 0),1087  nullishCoalescing: createBinop("??", 1),1088  logicalOR: createBinop("||", 1),1089  logicalAND: createBinop("&&", 2),1090  bitwiseOR: createBinop("|", 3),1091  bitwiseXOR: createBinop("^", 4),1092  bitwiseAND: createBinop("&", 5),1093  equality: createBinop("==/!=/===/!==", 6),1094  lt: createBinop("</>/<=/>=", 7),1095  gt: createBinop("</>/<=/>=", 7),1096  relational: createBinop("</>/<=/>=", 7),1097  bitShift: createBinop("<</>>/>>>", 8),1098  bitShiftL: createBinop("<</>>/>>>", 8),1099  bitShiftR: createBinop("<</>>/>>>", 8),1100  plusMin: createToken("+/-", {1101    beforeExpr,1102    binop: 9,1103    prefix,1104    startsExpr1105  }),1106  modulo: createToken("%", {1107    binop: 10,1108    startsExpr1109  }),1110  star: createToken("*", {1111    binop: 101112  }),1113  slash: createBinop("/", 10),1114  exponent: createToken("**", {1115    beforeExpr,1116    binop: 11,1117    rightAssociative: true1118  }),1119  _in: createKeyword("in", {1120    beforeExpr,1121    binop: 71122  }),1123  _instanceof: createKeyword("instanceof", {1124    beforeExpr,1125    binop: 71126  }),1127  _break: createKeyword("break"),1128  _case: createKeyword("case", {1129    beforeExpr1130  }),1131  _catch: createKeyword("catch"),1132  _continue: createKeyword("continue"),1133  _debugger: createKeyword("debugger"),1134  _default: createKeyword("default", {1135    beforeExpr1136  }),1137  _else: createKeyword("else", {1138    beforeExpr1139  }),1140  _finally: createKeyword("finally"),1141  _function: createKeyword("function", {1142    startsExpr1143  }),1144  _if: createKeyword("if"),1145  _return: createKeyword("return", {1146    beforeExpr1147  }),1148  _switch: createKeyword("switch"),1149  _throw: createKeyword("throw", {1150    beforeExpr,1151    prefix,1152    startsExpr1153  }),1154  _try: createKeyword("try"),1155  _var: createKeyword("var"),1156  _const: createKeyword("const"),1157  _with: createKeyword("with"),1158  _new: createKeyword("new", {1159    beforeExpr,1160    startsExpr1161  }),1162  _this: createKeyword("this", {1163    startsExpr1164  }),1165  _super: createKeyword("super", {1166    startsExpr1167  }),1168  _class: createKeyword("class", {1169    startsExpr1170  }),1171  _extends: createKeyword("extends", {1172    beforeExpr1173  }),1174  _export: createKeyword("export"),1175  _import: createKeyword("import", {1176    startsExpr1177  }),1178  _null: createKeyword("null", {1179    startsExpr1180  }),1181  _true: createKeyword("true", {1182    startsExpr1183  }),1184  _false: createKeyword("false", {1185    startsExpr1186  }),1187  _typeof: createKeyword("typeof", {1188    beforeExpr,1189    prefix,1190    startsExpr1191  }),1192  _void: createKeyword("void", {1193    beforeExpr,1194    prefix,1195    startsExpr1196  }),1197  _delete: createKeyword("delete", {1198    beforeExpr,1199    prefix,1200    startsExpr

Showing the first 1,200 of 14600 lines. Download the file for the rest.

Brunobkr/llama.cpp_AlgMor24_github · Team Ai