Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
+
+
\ No newline at end of file
diff --git a/AUTHORS.md b/AUTHORS.md
deleted file mode 100644
index b2184a1..0000000
--- a/AUTHORS.md
+++ /dev/null
@@ -1 +0,0 @@
-* Austin Turner @paustint
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 50c027a..0000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,959 +0,0 @@
-# Changelog
-
-## 6.0.0
-
-June 16, 2024
-
-- Package has been moved to `@jetstreamapp` npm organization
-
-## 5.0.2
-
-Jan 18, 2024
-
-- Nested NOT negation WHERE clauses were not properly formed (#242)
-
-## 5.0.1
-
-Jan 13, 2024
-
-💥 Breaking Changes
-Fixed a bug where with typescript types to properly represent that `WhereClause` can have a null value for `left` in the case of a negation operator.
-This was always the case, but prior to enabling strict typescript types, this went under the radar.
-
-For Typescript consumers that have strict null checks enabled, they may need to make code changes depending on usage.
-
-## 5.0.0
-
-💥 Did not publish correct assets - package was marked as deprecated on npm.
-
-## 4.10.1
-
-Jan 13, 2024
-
-Revert accidental breaking change to types. `WhereClause` left can have `null` in the negation case, but the types did not represent this.
-Updating types to match reality is a breaking change for consumers, so worked around issue and will publish version 5 with breaking change.
-
-## 4.10.0
-
-💥 Use 4.10.1, this version was marked as deprecated because of accidental breaking change with is reverted in 4.10.1
-
-Jan 13, 2024
-
-- Fixed where clause's that have a field name beginning with `In` preceded by the `NOT` operator. These were parsed as `NOT IN` instead of `NOT` followed by a field name, example: `NOT Invoice__c`
- - https://github.com/jetstreamapp/jetstream/issues/702
-- Fixed queries that have two consecutive `NOT` operators (#237)
-- Enabled Typescript strict mode and made a number of minor fixes related to this.
-- When using `getField` which return `FieldFunctionExpression` will now always return an empty array even if no parameters are provided.
-
-## 4.9.2
-
-July 24, 2023
-
-Ensure `getFlattenedFields` does not throw exception if query does not have `fields` property.
-
-## 4.9.1
-
-May 29, 2023
-
-Fixed bug with composeQuery when some of the WHERE clause values were not strings.
-
-## 4.9.0
-
-May 23, 2023
-
-Upgraded Chevrotain to version 10. Chevrotain dropped support for older browsers, but since this library has a build step, the target output from the processed build should remain in the same target format that was previously available.
-
-## 4.8.3
-
-May 22, 2023
-
-- Included `src` folder in npm package
-
-## 4.8.2
-
-May 22, 2023
-
-- Fix output files to ensure sourcemaps are included in npm package for esm_build. (#227)
- - There was a typo in one of the output paths.
-
-## 4.8.1
-
-April 9, 2023
-
-- Fix output files to ensure sourcemaps are included in npm package. (#227)
-
-## 4.8.0
-
-April 9, 2023
-
-- Fix `isAggregateFn` (#228)
- - Date functions, such as `HOUR_IN_DAY(CreatedDate)` did not properly have the `isAggregateFn` property set to true for the field.
- - As a result, `getFlattenedFields` would produce incorrect results for these fields if they were not aliased.
-- Upgraded webpack, migrated from Travis CI to Github Actions
-- Update dependencies to resolve reported security issues
-- Update build process to fix invalid sourcemap mapping (#227)
- - Removed non-minified version of application which had incorrect path to sourcemaps
- - Ensure webpack generates a sourcemap for the minified code output
-
-## 4.7.1
-
-January 23rd, 2023
-
-The repository was moved from `paustint` to `jetstreamapp`. No code changes.
-
-## 4.7.0
-
-October 6, 2022
-
-- Ensure the `literalType` is populated on subqueries that are part of a WHERE clause.
-
-## 4.6.1
-
-July 17, 2022
-
-- Ensure boolean return from some utility functions.
-- Re-designed the documentation website.
-
-## 4.6
-
-July 7, 2022
-
-- Converted test framework from mocha to jest.
-- Fixed bug where non-string values passed in to a where clause would throw an exception. (#121)
-- Fixed bug where in some cases a soql query would be improperly formed if the operator was an array type, such as `IN`, but the value and literal types were not arrays. (#107)
-- Added additional test-cases for stand-alone compose functions to test non-standard usage.
-
-## 4.5.0 / 4.5.1
-
-June 21, 2022
-
-- Added support for [accessLevel parameters](https://developer.salesforce.com/docs/atlas.en-us.238.0.apexcode.meta/apexcode/apex_classes_enforce_usermode.htm) in a `WITH` clause (#193)
- - Examples:
- - `SELECT Id FROM Account WITH USER_MODE`
- - `SELECT Id FROM Account WITH SYSTEM_MODE`
- - Thank you @ghingis
-- Patch release - changed property from `accessLevel` to `withAccessLevel`
-
-## 4.4.1
-
-June 11, 2022
-
-- Fixed parser error where `'mi'` and `'km'` could not be used in a WHERE clause because they were being parsed as a GeoLocationUnit (#188)
- - Thank you @divijklenty for reporting this.
-
-## 4.4
-
-March 11, 2022
-
-- Add support for partial parse and compose #182
- - Added support for parsing and composing partial queries. When parsing, the new option `allowPartialQuery` enables this functionality.
- - Added a third argument for `formatQuery`, allowing `ParseQueryConfig` options to be provided.
- - Some types on the `Query` interface were made optional to support partial queries
- - Updated CLI to include additional commands
-
-## 4.3
-
-September 19, 2021
-
-- Added cli support, check out the readme for usage details
-
-## 4.2.2
-
-August 1, 2021
-
-#160 - `getFlattenedFields()` Did not return correct results if a normal field used an alias, such as `SELECT Count(Id), Name account_name FROM Account GROUP BY Name`
-
-## 4.2.1
-
-June 18, 2021
-
-#157 - `getFlattenedFields()` Did not return correct results if the aggregate function was nested in another function, such as `FORMAT(MAX(CreatedDate))`.
-This bug only applied if there was not a field alias defined.
-
-## 4.2.0
-
-June 8, 2021
-
-#155 - Apex bind variable support is improved to allow parsing of more complex Apex.
-
-Review test cases 112 - 117 for examples of supported apex bind variables.
-
-## 4.1.1
-
-June 6, 2021
-
-#153 - A new parser option has been added named `ignoreParseErrors`, which will remove invalid parts of a query if there are parsing errors.
-
-The general structure of the query must be valid and the `SELECT` and `WHERE` clauses must both be valid, but any other clause may be removed from the parsed output if there are errors parsing the query and `ignoreParseErrors` is set to `true`.
-
-This option has been added to the documentation application.
-
-## 4.0.0
-
-April 13, 20201
-
-💥 Breaking Changes 💥
-
-Release 4.x has changed the way the `groupBy` and `having` clauses are parsed. (#149)
-Previously, the `groupBy` clause only allowed multiple entries for fields, but not functions.
-
-The `groupBy` and `orderBy` are now always returned as arrays from parsed queries to normalize the returned data structure.
-
-For backwards compatibility, a single `groupBy` or `orderBy` object is allowed to be passed in to `composeQuery()`, but a parsed query will always return an array.
-
-The `Query` object now has
-
-- A list of group by clauses (a single groupBy clause is allowed if you build the data structure yourself)
-- A Having clause (this was previously nested in the groupBy clause)
-- A list of orderBy clauses (a single orderBy clause is allowed if you build the data structure yourself)
-
-```diff
--groupBy?: GroupByClause;
-+groupBy?: GroupByClause | GroupByClause[]; // a parsed query will always be undefined or an array
-+having?: HavingClause;
-orderBy?: OrderByClause | OrderByClause[]; // a parsed query will always be undefined or an array
-```
-
-Each groupBy clause
-
-- No longer has a nested having clause
-- Is an object with a single `field` or `fn` property
-
-```diff
-type GroupByClause = GroupByFieldClause | GroupByFnClause;
-
--interface GroupByOptionalFieldsClause {
-- having?: HavingClause;
--}
-
--interface GroupByFieldClause extends GroupByOptionalFieldsClause {
-+interface GroupByFieldClause {
-- field: string | string[];
-+ field: string;
-}
-
--interface GroupByFnClause extends GroupByOptionalFieldsClause {
-+interface GroupByFnClause {
- fn: FunctionExp;
-}
-```
-
-Here are a few examples of how the `groupBy` is parsed or expected when composing a query:
-
-`SELECT UserId, CALENDAR_MONTH(LoginTime) month FROM LoginHistory WHERE NetworkId != NULL GROUP BY UserId, CALENDAR_MONTH(LoginTime)`
-
-```javascript
-{
- fields: [
- {
- type: 'Field',
- field: 'UserId',
- },
- {
- type: 'FieldFunctionExpression',
- functionName: 'CALENDAR_MONTH',
- rawValue: 'CALENDAR_MONTH(LoginTime)',
- parameters: ['LoginTime'],
- alias: 'month',
- },
- ],
- sObject: 'LoginHistory',
- where: {
- left: {
- field: 'NetworkId',
- operator: '!=',
- literalType: 'NULL',
- value: 'NULL',
- },
- },
- groupBy: [
- { field: 'UserId' },
- {
- fn: {
- functionName: 'CALENDAR_MONTH',
- rawValue: 'CALENDAR_MONTH(LoginTime)',
- parameters: ['LoginTime'],
- },
- },
- ],
-}
-```
-
-`SELECT ProductCode FROM Product2 GROUP BY ProductCode HAVING COUNT(Id) > 1 ORDER BY COUNT(Id) DESC`
-
-```javascript
-{
- fields: [{ type: 'Field', field: 'ProductCode' }],
- sObject: 'Product2',
- groupBy: [{
- field: 'ProductCode',
- }],
- having: {
- left: {
- operator: '>',
- value: '1',
- literalType: 'INTEGER',
- fn: { rawValue: 'COUNT(Id)', functionName: 'COUNT', parameters: ['Id'] },
- },
- },
- orderBy: [{
- fn: { rawValue: 'COUNT(Id)', functionName: 'COUNT', parameters: ['Id'] },
- order: 'DESC',
- }],
-}
-```
-
-`SELECT SBQQ__Product__r.Name foo, SBQQ__Quote__c foo1 FROM SBQQ__Quoteline__c GROUP BY SBQQ__Quote__c, SBQQ__Product__r.Name`
-
-```javascript
-{
- fields: [
- {
- type: 'FieldRelationship',
- field: 'Name',
- relationships: ['SBQQ__Product__r'],
- rawValue: 'SBQQ__Product__r.Name',
- alias: 'foo',
- },
- {
- type: 'Field',
- field: 'SBQQ__Quote__c',
- alias: 'foo1',
- },
- ],
- sObject: 'SBQQ__Quoteline__c',
- groupBy: [{ field: 'SBQQ__Quote__c' }, { field: 'SBQQ__Product__r.Name' }],
-}
-```
-
-## 3.2.0
-
-March 27, 2021
-
-A number of improvements to the formatter have been made with this release.
-
-- The formatter option `whereClauseOperatorsIndented` has been deprecated and will always be applied.
-- A new boolean formatter option named `newLineAfterKeywords` has been added and will ensure that there is always a new line after any keyword. (#137)
-- `TYPEOF` fields will now always be included on their own line be default, or will span multiple lines, split by keywords if `newLineAfterKeywords` is set to true. (#135)
-
-## Example
-
-`SELECT Id, TYPEOF What WHEN Account THEN Phone, NumberOfEmployees WHEN Opportunity THEN Amount, CloseDate ELSE Name, Email END, Name FROM Event`
-
-`formatOptions: { newLineAfterKeywords: true, fieldMaxLineLength: 1 },`
-
-```sql
-SELECT
- Id,
- TYPEOF What
- WHEN
- Account
- THEN
- Phone, NumberOfEmployees
- WHEN
- Opportunity
- THEN
- Amount, CloseDate
- ELSE
- Name, Email
- END,
- Name
-FROM
- Event
-```
-
-## 3.1.0
-
-March 27, 2021
-
-1. Added support for the `FIELDS()` function
-
-## 3.0.2
-
-March 6, 2021
-
-1. Date functions were not properly parsed when used in order by clauses. (#139)
-2. Modified names of functions / types (internal)
-3. Removed improper import of `isString` from node utils
-
-Changes also released to 2.5.6
-
-## 3.0.1
-
-January 7, 20201
-
-1. `getFlattenedFields` did not properly handle the alias for an aggregate function within an aggregate query. (#131)
-
-## 3.0.0
-
-October 14, 2020
-
-🔥 Breaking Changes 🔥
-
-This version changes the `WHERE` clause structure when using the `NOT` operator t0 fix issue #122, and has implemented stricter type definitions.
-
-The `NOT` operator is now treated as a `LogicalOperator` and will be set in the `operator` field between `left` and `right`.
-In cases where this is populated, the preceding `left` condition will either be set to `null` or will at most have the `openParens` field populated.
-
-The `logicalPrefix` property has been removed from `Condition`.
-
-Example of the change in structure for queries using NOT - `SELECT Id FROM Account WHERE NOT Id = '2'`
-
-```diff
-{
- "fields": [
- {
- "type": "Field",
- "field": "Id"
- }
- ],
- "sObject": "Account",
- "where": {
-- "left": {
-- "logicalPrefix": "NOT",
-- "field": "Id",
-- "operator": "=",
-- "value": "'2'",
-- "literalType": "STRING"
-- }
-+ "left": null
-+ "operator": "NOT",
-+ "right": {
-+ "left": {
-+ "field": "Id",
-+ "operator": "=",
-+ "value": "'2'",
-+ "literalType": "STRING"
-+ }
- }
-}
-```
-
-If you are using Typescript in strict mode, you may encounter some breaking changes to your types depending on how you pre-checked for the presence of fields.
-
-`Field` and `FieldRelationship` are now made up of two types, one with and one without alias.
-`Condition` is now made up of multiple individual interfaces that represent different data types based on what data is populated.
-`OrderByClause` is now made up of multiple individual interfaces that represent different data types based on what data is populated.
-`GroupByClause` is now made up of multiple individual interfaces that represent different data types based on what data is populated.
-`HavingClause` is now made up of multiple individual interfaces that represent different data types based on what data is populated.
-
-Previously you could have just done null/undefined checks in Typescript strict mode.
-Now, to avoid using the `any` type, you can use the newly introduced utility methods that provide type detection and type narrowing.
-
-- `hasAlias()`
-- `isFieldSubquery()`
-- `isGroupByField()`
-- `isGroupByFn()`
-- `isHavingClauseWithRightCondition()`b
-- `isNegationCondition()`
-- `isOrderByField()`
-- `isOrderByFn()`
-- `isString()`
-- `isSubquery()`
-- `isValueCondition()`
-- `isValueFunctionCondition()`
-- `isValueQueryCondition()`
-- `isValueWithDateLiteralCondition()`
-- `isValueWithDateNLiteralCondition()`
-- `isWhereClauseWithRightCondition()`
-- `isWhereOrHavingClauseWithRightCondition()`
-
-Here is a summary of the core changes, view the `Readme` for the comprehensive types.
-
-```diff
-export type FieldType =
- | Field
-+ | FieldWithAlias
- | FieldFunctionExpression
- | FieldRelationship
-+ | FieldRelationshipWithAlias
- | FieldSubquery
- | FieldTypeOf;
-```
-
-```diff
--export interface WhereClause {
-- left: Condition & ValueQuery;
-- right?: WhereClause;
-- operator?: LogicalOperator;
--}
-
-+export type WhereClause = WhereClauseWithoutOperator | WhereClauseWithRightCondition;
-
--export interface Condition {
-- openParen?: number;
-- closeParen?: number;
-- logicalPrefix?: LogicalPrefix;
-- field?: string;
-- fn?: FunctionExp;
-- operator: Operator;
-- value?: string | string[];
-- literalType?: LiteralType | LiteralType[]; // If populated with STRING on compose, the value(s) will be wrapped in "'" if they are not already. - All other values ignored
-- dateLiteralVariable?: number | number[]; // not required for compose, will be populated if SOQL is parsed
--}
-
-+export type Condition =
-+ | ValueCondition
-+ | ValueWithDateLiteralCondition
-+ | ValueWithDateNLiteralCondition
-+ | ValueFunctionCondition
-+ | NegationCondition;
-```
-
-```diff
--export interface OrderByClause {
-- field?: string;
-- fn?: FunctionExp;
-- order?: OrderByCriterion;
-- nulls?: NullsOrder;
--}
-
-+export type OrderByClause = OrderByFieldClause | OrderByFnClause;
-```
-
-```diff
--export interface GroupByClause {
-- field?: string | string[];
-- fn?: FunctionExp;
-- having?: HavingClause;
--}
-
-+export type GroupByClause = GroupByFieldClause | GroupByFnClause;
-
--export interface HavingClause {
-- left: Condition;
-- right?: HavingClause;
-- operator?: LogicalOperator;
--}
-
-+export type HavingClause = HavingClauseWithoutOperator | HavingClauseWithRightCondition;
-```
-
-## 2.5.5
-
-Aug 23, 2020
-
-1. `getFlattenedFields` ignores `typeof` clauses in query. (#115)
-
-## 2.5.4
-
-April 12, 2020
-
-1. `getFlattenedFields` returns incorrect results if relationship field is grouped and you are grouping for only one field (#113)
-
-## 2.5.3
-
-April 24, 2020
-
-1. Fixed nanoseconds on date (#102)
-
-## 2.5.2
-
-April 23, 2020
-
-1. Added support for dates formatted with nanoseconds, such as `2020-04-15T02:40:03.000+0000`. (#102)
-2. Added support for aggregate function in the `ORDER BY` clause (#103)
-3. Queries would not be properly composed if an order by had a function and also specified ASC or DESC (#104)
-
-## 2.5.1
-
-April 23, 2020
-
-1. Queries with date functions in a WHERE clause would throw an error when parsing. (#100)
-
-## 2.5.0
-
-April 3, 2020
-
-1. Passing in null or undefined to compose query no longer throws an exception, but instead returns an empty string. (#95)
-2. Regular fields in a select clause now allow aliases because this is allowed if the field is used as part of a group by clause. (#97)
-3. `getFlattenedFields()` now considers if a relationship field was used as part of a group by, and if so it returns just the field name instead of the entire field path, as this is how Salesforce will return the records. (#98)
-
-## 2.4.1
-
-Mar 22, 2020
-
-1. Updated dependencies to resolve known security vulnerabilities.
-
-## 2.4
-
-Feb 25, 2020
-
-1. Date literals were not properly parsed if they were included as part of a SET within a WHERE clause, such as `WHERE IN (TODAY, LAST_N_DAYS:5)`.
- 1. As part of this change, the `dateLiteralVariable` property in the `Condition` will be an array if a variable date literal is included in a SET where clause. Refer to test cases `93` through `98` for examples
-
-## 2.3.0
-
-Jan 13, 2020
-
-1. The `DESC` operator in the `ORDER BY` clause was treated as a case-sensitive field.
-2. The following fields we treated as case-sensitive:
- 1. `NEXT_N_FISCAL_QUARTERS`, `LAST_N_FISCAL_QUARTERS`, `N_FISCAL_QUARTERS_AGO`, `NEXT_N_FISCAL_YEARS`, `LAST_N_FISCAL_YEARS`,
- 2. `mi`, `km` on `GEOLOCATION` functions
-3. Updated the `DISTANCE` function to properly be tagged as `isAggregateFn=true` if used as a field
- 1. This fixed an issue where `getFlattenedFields()` would throw an exception
-
-## 2.2.3
-
-Jan 4, 2020
-
-1. Added logo to README and updated docs.
-
-## 2.2.2
-
-Dec 2, 2019
-
-1. When composing a query, if an empty OrderBy array was provided, the composed query would still include the `ORDER BY` clause in the composed query.
-
-## 2.2.1
-
-Nov 17, 2019
-
-1. `GROUP BY` did not allow multiple fields to be listed, for example: `SELECT BillingState, BillingStreet, COUNT(Id) FROM Account GROUP BY BillingState, BillingStreet` would fail to parse.
-
-## 2.2.0
-
-Nov 6, 2019
-
-1. `DISTANCE` and `GEOLOCATION` functions failed to parse when used in a `WHERE` clauses and `ORDER BY` clauses.
-
-## 2.1.0
-
-Oct 28, 2019
-
-1. The method signature for `getFlattenedFields` has changed to allow `Query | Subquery | FieldSubquery` to be passed in. this is not being considered a breaking change because it is fully backwards compatible.
-2. A new helper method `isFieldSubquery(value: any)` was added to allow determining if a Field is a FieldSubquery. This is used internally for `getFlattenedFields()`.
-
-## 2.0.0
-
-Oct 6, 2019
-
-### Summary
-
-Version 2.0 brings some significant bundle size and performance improvements. This library now uses [Chevrotain](https://github.com/SAP/chevrotain) instead of [antlr4](https://github.com/antlr/antlr4). With this change, everything related to parsing had to be re-written from scratch. Chevrotain uses pure javascript to handle lexing, parsing, and visiting the generated ast/cst as opposed to using a grammar file and generating a javascript parser based on the grammar.
-
-With this change, the data model was reviewed and analyzed, and there are some significant breaking changes to the data structures. Review the 🔥breaking changes🔥 below for a detailed description of each breaking change.
-
-#### Bundle Size
-
-To compare the bundle size, the following small program was written and then compiled using the default configuration of webpack, and the resulting webpack bundle was compared to determine the full size of the library.
-
-Minified, uncompressed:
-
-- Version 1.x: **545kb**
-- Version 2.0: **207kb**
-
-```javascript
-var soqlParser = require('@jetstreamapp/soql-parser-js');
-
-const query = soqlParser.parseQuery(`SELECT Id FROM Account WHERE Id = 'FOO'`);
-console.log('query', query);
-const soql = soqlParser.composeQuery(query);
-console.log('soql', soql);
-```
-
-#### Benchmarks
-
-Performance testing was done by iterating the unit tests 60K times, here are the results:
-
-**Version 1.x parser**
-
-```
-Library import (startup time): 0.8671 milliseconds
-Parsing: 58 X 1000 = 58000 iterations.
-Duration: 5.7648 seconds
-Average of 0.0994 milliseconds per query
-```
-
-**Version 2.0 parser**
-
-```
-Library import (startup time): 1.3793 milliseconds
-Parsing: 87 X 1000 = 87000 iterations.
-Duration: 3.6582 seconds
-Average of 0.0420 milliseconds per query
-```
-
-### Breaking Changes 🔥
-
-#### General Changes
-
-- The CLI was removed.
-- The `parseQuery()` `options` have changed. The only option allowed is `allowApexBindVariables` with will allow parsing queries with apex variables.
-- `rawValue` will always have a space between parameters `GROUPING(Id, BillingCountry)`
-- Some `literalType` values may have differing case from prior versions, regardless of the data input.
- - `TRUE`, `FALSE`, and all functions except those listed below will always be returned in uppercase, regardless of case of input.
- - **Exceptions**:
- - `toLabel`, `convertTimezone`, `convertCurrency` will always be in camelCase.
- - Added types for `DateLiteral` and `DateNLiteral` values. If you are using TypeScript, you can utilize these types.
-- A new `LiteralType` value was added for `APEX_BIND_VARIABLE`.
-- When composing functions in a where clause or group by clause, the `rawValue` will be preferred (if it exists) (no change here), but if rawValue is not provided, then the function will be composed using the `functionName` and `parameters`.
-- A new `LiteralType` value was added for `INTEGER_WITH_CURRENCY_PREFIX` and `DECIMAL_WITH_CURRENCY_PREFIX`. e.x. `USD500.01`
-
-#### Compose Query
-
-- `getComposedField()` is deprecated, you should now use `getField()`. `getComposedField()` will remain available for backward compatibility.
-- `getField()`/`getComposedField()` has the following changes:
- 1. `fn` property is has been deprecated (but still exists), you should now use `functionName` instead.
- 2. The `from` property has been removed for subqueries. The `relationshipName` is required to be populated to compose a subquery.
-- On the FormatOptions interface `fieldMaxLineLen` was renamed to `fieldMaxLineLength`.
-- Added support for `usingScope` - https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_using_scope.htm?search_text=format()
-- The `having` clause condition (e.x. `left`) now uses the `Condition` interface instead of having it's own structure.
-
-```diff
-export interface FormatOptions {
- numIndent?: number;
-- fieldMaxLineLen?: number;
-+ fieldMaxLineLength?: number;
- fieldSubqueryParensOnOwnLine?: boolean;
- whereClauseOperatorsIndented?: boolean;
- logging?: boolean;
-}
-```
-
-#### Parse Query
-
-- `rawValue` will now be included on `Field` if `objectPrefix` is defined.
-- `alias` may be included on `Field`, if defined.
-- On `FieldFunctionExpression`, `fn` was renamed to `functionName`. this was done because all other usages of `fn` were `FunctionExp`, but it was a string in this case.
-- The `parameters` type on `FieldFunctionExpression` was modified to allow an array of varying types.
-- Removed `from` property from `FieldSubquery`.
-- `having` was removed from `QueryBase` and now lives as a property on `GroupByClause`.
-- On the `Condition` object, `literalType` may be an array. This will be an array if `value` is an array and there are variable types within the `value`. For example: `WHERE Foo IN ('a', null, 'b')` would produce `literalType: ['STRING', 'NULL', 'STRING']`.
-- The `GroupByClause` has the following modifications:
- - `field` is now optional, and will be populated only if the grouping is on a single field.
- - `type` has been renamed to `fn` and will be populated when `CUBE` and `ROLLUP` are used.
- - The `having` clause has been added as a top-level property to the `GroupByClause` and will be populated only if a `having` clause is present.
-- The `HavingCondition` interface has been removed and now uses the same `Condition` interface that the `WhereClause` uses, but without `valueQuery`.
- - The parser uses the same code to process both of these, so the `having` clause now supports the exact same capability as a `where` clause.
-- `FunctionExp` has the following modifications
- - `text` was renamed to `rawValue` to be more consistent with other places in the data model.
- - `name` was renamed to `functionName`.
- - `parameter` was renamed to `parameters` and the type was changed to `(string | FunctionExp)[]` to support nested functions. This will ALWAYS be an array now even if there is only one parameter.
- - `fn` was removed, as nested functionParameters are always stored as an entry in the `parameters` array.
- - Added support for `usingScope` - https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_using_scope.htm?search_text=format()
-
-```diff
-export type LiteralType =
- | 'STRING'
- | 'INTEGER'
- | 'DECIMAL'
-+ | 'INTEGER_WITH_CURRENCY_PREFIX'
-+ | 'DECIMAL_WITH_CURRENCY_PREFIX'
- | 'BOOLEAN'
- | 'NULL'
- | 'DATETIME'
- | 'DATE'
- | 'DATE_LITERAL'
- | 'DATE_N_LITERAL'
-+ | 'APEX_BIND_VARIABLE';
-
-+ export type DateLiteral =
-+ | 'YESTERDAY'
-+ | 'TODAY'
-+ | 'TOMORROW'
-+ | 'LAST_WEEK'
-+ | 'THIS_WEEK'
-+ | 'NEXT_WEEK'
-+ | 'LAST_MONTH'
-+ | 'THIS_MONTH'
-+ | 'NEXT_MONTH'
-+ | 'LAST_90_DAYS'
-+ | 'NEXT_90_DAYS'
-+ | 'THIS_QUARTER'
-+ | 'LAST_QUARTER'
-+ | 'NEXT_QUARTER'
-+ | 'THIS_YEAR'
-+ | 'LAST_YEAR'
-+ | 'NEXT_YEAR'
-+ | 'THIS_FISCAL_QUARTER'
-+ | 'LAST_FISCAL_QUARTER'
-+ | 'NEXT_FISCAL_QUARTER'
-+ | 'THIS_FISCAL_YEAR'
-+ | 'LAST_FISCAL_YEAR'
-+ | 'NEXT_FISCAL_YEAR';
-
-+ export type DateNLiteral =
-+ | 'YESTERDAY'
-+ | 'NEXT_N_DAYS'
-+ | 'LAST_N_DAYS'
-+ | 'N_DAYS_AGO'
-+ | 'NEXT_N_WEEKS'
-+ | 'LAST_N_WEEKS'
-+ | 'N_WEEKS_AGO'
-+ | 'NEXT_N_MONTHS'
-+ | 'LAST_N_MONTHS'
-+ | 'N_MONTHS_AGO'
-+ | 'NEXT_N_QUARTERS'
-+ | 'LAST_N_QUARTERS'
-+ | 'N_QUARTERS_AGO'
-+ | 'NEXT_N_YEARS'
-+ | 'LAST_N_YEARS'
-+ | 'N_YEARS_AGO'
-+ | 'NEXT_N_FISCAL_QUARTERS'
-+ | 'LAST_N_FISCAL_QUARTERS'
-+ | 'N_FISCAL_QUARTERS_AGO'
-+ | 'NEXT_N_FISCAL_YEARS'
-+ | 'LAST_N_FISCAL_YEARS'
-+ | 'N_FISCAL_YEARS_AGO';
-
-export interface Field {
- type: 'Field';
- field: string;
- objectPrefix?: string;
-+ rawValue?: string;
-+ alias?: string;
-}
-
-export interface FieldFunctionExpression {
- type: 'FieldFunctionExpression';
-- fn: string;
-+ functionName: string;
-- parameters?: string[] | FieldFunctionExpression[];
-+ parameters: (string | FieldFunctionExpression)[];
- alias?: string;
- isAggregateFn?: boolean;
- rawValue?: string;
-}
-
-export interface FieldRelationship {
- type: 'FieldRelationship';
- field: string;
- relationships: string[];
- objectPrefix?: string;
- rawValue?: string;
-+ alias?: string;
-}
-
-export interface FieldSubquery {
- type: 'FieldSubquery';
- subquery: Subquery;
-- from?: string;
-}
-
-export interface QueryBase {
- fields: FieldType[];
- sObjectAlias?: string;
-+ usingScope?: string;
- where?: WhereClause;
- limit?: number;
- offset?: number;
- groupBy?: GroupByClause;
-- having?: HavingClause;
- orderBy?: OrderByClause | OrderByClause[];
- withDataCategory?: WithDataCategoryClause;
- withSecurityEnforced?: boolean;
- for?: ForClause;
- update?: UpdateClause;
-}
-
-export interface WhereClause {
-- left: Condition;
-+ left: Condition & ValueQuery;
- right?: WhereClause;
- operator?: LogicalOperator;
-}
-
-
-+ export interface ValueQuery {
-+ valueQuery?: Query;
-+ }
-
-export interface Condition {
- openParen?: number;
- closeParen?: number;
- logicalPrefix?: LogicalPrefix;
- field?: string;
- fn?: FunctionExp;
- operator: Operator;
- value?: string | string[];
-- valueQuery?: Query;
-- literalType?: LiteralType;
-+ literalType?: LiteralType | LiteralType[];
- dateLiteralVariable?: number;
-}
-
-export interface GroupByClause {
-- field: string | string[];
-+ field?: string | string[];
-- type?: GroupByType;
-+ fn?: FunctionExp;
-+ having?: HavingClause;
-}
-
-export interface HavingClause {
-+ left: Condition;
- right?: HavingClause;
- operator?: LogicalOperator;
-}
-
-- export interface HavingCondition {
-- openParen?: number;
-- closeParen?: number;
-- field?: string;
-- fn?: FunctionExp;
-- operator: string;
-- value: string | number;
-- }
-
-export interface FunctionExp {
-- text?: string;
-+ rawValue?: string;
-- name?: string;
-+ functionName?: string;
- alias?: string;
-- parameter?: string | string[];
-+ parameters?: (string | FunctionExp)[];
- isAggregateFn?: boolean;
-- fn?: FunctionExp;
-}
-```
-
-## 1.2.1
-
-- Queries with multiple consecutive left parens in a where clause were not correctly parsed. (#69)
-- Fixed npm reported security vulnerabilities.
-
-## 1.2.0
-
-- Changed compose methods to public to allow external access (#65)
-- Fixed lodash security vulnerability
-- Updated README to reflect new changes and other minor changes
-
-## 1.1.1
-
-- Removed files that accidentally got included with release with update of `release-it`
-
-## 1.1.0
-
-- Updated `Contributing.md` with more detailed instructions on grammar updates
-- Added support for `WITH SECURITY_ENFORCED` (#61)
-
-## 1.0.2
-
-- If a field in a query happened to have a function reserved word, such as `Format`, then parsing the query failed. (#59)
-
-## 1.0.1
-
-- Ensured that nothing is logged directly to the console unless logging is enabled
-
-## 1.0.0
-
-### Changed
-
-**!BREAKING CHANGES!**
-
-- Added literal type information to fields to provide additional information about the field type. (#51)
- - WHERE clause fields have one of the following types `'STRING' | 'INTEGER' | 'DECIMAL' | 'BOOLEAN' | 'NULL' | 'DATE_LITERAL' | 'DATE_N_LITERAL';` stored in the condition.
- - For date literal fields that have variables, `dateLiteralVariable` will be populated with the value
-- Modified Field data structure to have explicit type information. (#46, #52)
- - The data structure for fields has been modified to include specific information about the structure of a given field to ease making sense of a parsed query,
- - To aid in creating compose fields, a new helper method is available - `getComposedField()`. This takes in a simple data structure (or even a string) and will return the structure needed to compose a query.
-
-### New
-
-- An additional `queryUtils` object is available with the following functions:
- - `function getComposedField(input: string | ComposeFieldInput): FieldType`
- - `function getFlattenedFields(query: Query, isAggregateResult?: boolean): string[]`
- - `function isSubquery(query: Query | Subquery): query is Subquery`
- - Look at the README and refer to the unit tests for example usage.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index 24af1f6..0000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# How to contribute
-
-Contributions of any kind are welcome and appreciated.
-
-# What features are allowed
-
-Any feature that is part of the core project and does not deviate from what the product is will be considered to be accepted.
-
-# Making Changes
-
-- Fork the repository
-- Create a new branch from master (usually) and with a meaningful name for your changes
-- Make your changes
-- Commit and push your change
- - Please run `prettier` on all modified files prior to opening your pull request
-- open a Pull Request for the master branch
-
-# Re-generating parse after grammar change
-
-:beetle: There is a bug in the generated ANTLR output that must be corrected by hand in the generated output to make this work.
-
-- Note: I am not an expert with language parsing/antler and I did not create the grammar, so I was not able to figure this bug out. I believe the problem relies with `antlr4ts-cli` and the way imports are always added to the end of the file
-
-## Generate lexer and parser
-
-- Run `npm run antlr`
- - This will remove and re-generate all of the lexer and parser files required to parse SOQL
- - :beetle: Manual steps:
- - Open `SOQLParser.ts` after the file generation
- - Find the class `Keywords_alias_allowedContext` somewhere near line ~44K
- - Cut this class and all remaining classes through the end of the file and paste right underneath the `import` statements
-- Run all unit tests afterwards `npm run test` - if anything is broken, please troubleshoot or create a PR and ask for assistance
-
-## Update code to support new grammar
-
-- Start with adding a new unit test
- - This will ensure the parser and composer support the syntax
-- Update the parser to listen for the new grammar (this depends on grammar change that was implemented)
- - Assuming there is a new clause somewhere, look in `lib/generated/SOQLListener.ts` to find the new enter/exit methods that were added
- - Implement these methods in `lib/SOQLListener.ts` to handle parsing the logic
- - Update `lib/SOQLComposer.ts` to handle creating the SOQL query from the parsed query
-
-## Unit tests
-
-- ensure your new unit tests cover all the cases
-- Ensure unit tests are all passing, or open a PR and ask for assistance
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
deleted file mode 100644
index 97d57aa..0000000
--- a/CONTRIBUTORS.md
+++ /dev/null
@@ -1,2 +0,0 @@
-- Austin Turner @paustint
-- Alfredo Benassi @ABenassi87
diff --git a/ISSUE_TEMPLATE b/ISSUE_TEMPLATE
deleted file mode 100644
index f3abab4..0000000
--- a/ISSUE_TEMPLATE
+++ /dev/null
@@ -1,5 +0,0 @@
-- [ ] Feature
-- [ ] Bug
-
-
-## Description
diff --git a/LICENSE.txt b/LICENSE.txt
deleted file mode 100644
index 04ab36f..0000000
--- a/LICENSE.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-Copyright 2024 Austin Turner
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 100644
index 3b9a843..0000000
--- a/README.md
+++ /dev/null
@@ -1,949 +0,0 @@
-
-
-[](https://travis-ci.com/jetstreamapp/soql-parser-js)
-[](https://badge.fury.io/js/soql-parser-js)
-[](https://david-dm.org/jetstreamapp/soql-parser-js)
-
-## Description
-
-**This library allows parsing and composing SOQL queries from Salesforce using JavaScript or Typescript.**
-
-### Installation
-
-👉 **As of version 6.0.0**, this package is now part of the `@jetstreamapp` npm organization.
-
-```bash
-npm install @jetstreamapp/soql-parser-js
-```
-
-**Available Features:**
-
-1. Parse SOQL queries into a common `Query` data structure.
-2. Deterministically compose a `Query` data structure back into a SOQL query string.
-3. Validate a query to check if the syntax is valid.
- 1. _Even if a query is returned as valid, it might still be invalid based on your Salesforce configuration_
-
-Migrating from version 1 to version 2? [Check out the changelog](CHANGELOG.md#200) for a full list of changes.
-
-Migrating from version 2 to version 3? [Check out the changelog](CHANGELOG.md#300) for a full list of changes.
-
-## Documentation
-
-**[Read the documentation on our docs site](https://paustint.github.io/soql-parser-js/)**.
-
-## Compatibility
-
-**Node**: version 11 or higher, or a polyfill for [Array.flat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat)
-**Browser**: Tested in all modern browsers, may not work with older browsers.
-
-The **commander** dependency is only required for the cli, the other two dependencies **chevrotain** and **lodash.get** are bundled with the non-cli code.
-
-## Quick Start
-
-```javascript
-import { parseQuery, composeQuery, isQueryValid } from '@jetstreamapp/soql-parser-js';
-
-const query = parseQuery(`SELECT Id FROM Account WHERE Id = 'FOO'`);
-console.log('query', query);
-
-const soql = composeQuery(query);
-console.log('soql', soql); // SELECT Id FROM Account WHERE Id = 'FOO'
-
-isQueryValid('SELECT Id, Foo FROM Baz'); // true
-isQueryValid('SELECT Id Foo FROM Baz'); // false
-```
-
-## Available Features
-
-| Function | Description | Arguments |
-| ------------ | ------------------------------------------------------ | ------------------------------------------ |
-| parseQuery | Parse a SOQL query string into a Query data structure. | soql: Query config?: ParseQueryConfig |
-| isQueryValid | Returns true if the query was able to be parsed. | soql: Query config?: ParseQueryConfig |
-| composeQuery | Turn a Query object back into a SOQL statement. | soql: Query config?: SoqlComposeConfig |
-| formatQuery | Format a SOQL query string. | soql: Query config?: FormatOptions |
-
-## Utility Functions
-
-**General Utility**
-
-Many of hte utility functions are provided to easily determine the shape of specific data since there are many variants. If you are using Typescript in strict mode, you can use these to narrow your types.
-
-| Function | Description | Arguments |
-| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
-| hasAlias | Returns `true` if the field passed in has the `alias` property. | input: `string \| ComposeFieldInput` |
-| getField | Convenience method to construct fields in the correct format when using `composeQuery()`. Look in the data models section below for the structure of `ComposeFieldInput`. | input: `string \| ComposeFieldInput` |
-| getFlattenedFields | Flatten a Salesforce record based on the parsed SOQL Query. this is useful if you have relationships in your query and want to show the results in a table, using `.` dot notation for the relationship field headings. | soql: `Query \| Subquery \| FieldSubquery` config?: `SoqlComposeConfig` |
-| isSubquery | Returns `true` if the data passed in is a subquery. | query: `Query \| Subquery` |
-| isFieldSubquery | Returns `true` if the data passed in is a FieldSubquery. | value: `any` |
-| isWhereClauseWithRightCondition | Returns `true` if the value passed in is a `WhereClause` with an `operator` and `right` property | value: `WhereClause` |
-| isHavingClauseWithRightCondition | Returns `true` if the value passed in is a `HavingClause` with an `operator` and `right` property | value: `HavingClause` |
-| isWhereOrHavingClauseWithRightCondition | Returns `true` if the value passed in is a `WhereClause` or `HavingClause` with an `operator` and `right` property | value: `WhereClause \| HavingClause` |
-| isValueCondition | Returns `true` if the value passed in has `field`, `operator` and `value` properties | value: `Condition` |
-| isValueWithDateLiteralCondition | Returns `true` if the value passed in has `field`, `operator` and `value` properties and has a `literalType` property that is `DATE_LITERAL` of `['DATE_LITERAL',...]` | value: `Condition` |
-| isValueWithDateNLiteralCondition | Returns `true` if the value passed in has `field`, `operator`, `value` and `dateLiteralVariable` properties | value: `Condition` |
-| isValueFunctionCondition | Returns `true` if the value passed in has `fn`, `operator` and `value` properties | value: `Condition` |
-| isNegationCondition | Returns `true` if the value passed in has a `openParen` property and does not have `fn`, `field`, `operator`, `value`, and `closeParen` properties | value: `Condition` |
-| isValueQueryCondition | Returns `true` if the value passed in has `field`, `operator` and `valueQuery` properties and does not have a `value` property | value: `Condition \| ValueQueryCondition` |
-| isOrderByField | Returns `true` if the value passed in has `field` property | value: `OrderByClause` |
-| isOrderByFn | Returns `true` if the value passed in has `fn` property | value: `OrderByClause` |
-| isGroupByField | Returns `true` if the value passed in has `field` property | value: `GroupByClause` |
-| isGroupByFn | Returns `true` if the value passed in has `fn` property | value: `GroupByClause` |
-
-**ParseQueryConfig**
-
-| Property | Type | Description | required | default |
-| ---------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
-| allowApexBindVariables | boolean | Determines if apex variables are allowed in parsed query. Example: `WHERE Id IN :accountIds`. Only simple Apex is supported. Function calls are not supported. (e.x. `accountMap.keyset()` is not supported) | FALSE | FALSE |
-| allowPartialQuery | boolean | If provided, you can provide an incomplete soql query. This is useful if you need to parse WHERE clauses, for example. Subqueries are required to be valid. | FALSE | FALSE |
-| ignoreParseErrors | boolean | If set to true, then queries with partially invalid syntax will still be parsed, but any clauses with invalid parts will be omitted. The SELECT clause and FROM clause must always be valid, but all other clauses can contain invalid parts. | FALSE | FALSE |
-| logErrors | boolean | If true, parsing and lexing errors will be logged to the console. | FALSE | FALSE |
-
-**SoqlComposeConfig**
-
-| Property | Type | Description | required | default |
-| ------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
-| format | boolean | Apply formatting the the composed query. This will result in a multi-line soql statement. | FALSE | TRUE |
-| formatOptions | FormatOptions | Options to apply to the formatter. | FALSE | |
-| autoCompose | boolean | If you need to compose just part of a query, you can create your own instance of the Compose class and set this to false, then call any methods that you need to just for what you would like to turn into a SOQL query. | FALSE | TRUE |
-| logging | boolean | Print out logging statements to the console about the format operation. | FALSE | FALSE |
-
-**FormatOptions**
-
-| Property | Type | Description | required | default |
-| -------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
-| numIndent | number | The number of tab characters to indent. | FALSE | 1 |
-| fieldMaxLineLength | number | The number of characters that the fields should take up before making a new line. Set this to 1 to have every field on its own line. | FALSE | 60 |
-| fieldSubqueryParensOnOwnLine | boolean | If true, the opening and closing parentheses will be on their own line for subqueries. | FALSE | TRUE |
-| newLineAfterKeywords | boolean | Adds a new line and indent after all keywords (such as SELECT, FROM, WHERE, ORDER BY, etc..) Setting this to true will add new lines in other places as well, such as complex WHERE clauses | FALSE | FALSE |
-| ~~whereClauseOperatorsIndented~~ | boolean | **Deprecated** If true, indents the where clause operators. | FALSE | FALSE |
-| logging | boolean | Print out logging statements to the console about the format operation. | FALSE | FALSE |
-
-## Examples
-
-### Parsing Queries
-
-Parsing a SOQL query can be completed by calling `parseQuery(soqlQueryString)`. A `Query` data structure will be returned.
-
-```typescript
-import { parseQuery } from '@jetstreamapp/soql-parser-js';
-
-const soql = `
- SELECT UserId, COUNT(Id)
- FROM LoginHistory
- WHERE LoginTime > 2010-09-20T22:16:30.000Z
- AND LoginTime < 2010-09-21T22:16:30.000Z
- GROUP BY UserId
-`;
-
-const soqlQuery = parseQuery(soql);
-
-console.log(JSON.stringify(soqlQuery, null, 2));
-```
-
-
- Results (click to show)
-
-```json
-{
- "fields": [
- {
- "type": "Field",
- "field": "UserId"
- },
- {
- "type": "FieldFunctionExpression",
- "functionName": "COUNT",
- "parameters": ["Id"],
- "isAggregateFn": true,
- "rawValue": "COUNT(Id)"
- }
- ],
- "sObject": "LoginHistory",
- "where": {
- "left": {
- "field": "LoginTime",
- "operator": ">",
- "value": "2010-09-20T22:16:30.000Z",
- "literalType": "DATETIME"
- },
- "operator": "AND",
- "right": {
- "left": {
- "field": "LoginTime",
- "operator": "<",
- "value": "2010-09-21T22:16:30.000Z",
- "literalType": "DATETIME"
- }
- }
- },
- "groupBy": {
- "field": "UserId"
- }
-}
-```
-
-
-
-### Parsing a partial query
-
-Added support for `allowPartialQuery` in version `4.4.0`
-
-```typescript
-import { parseQuery } from '@jetstreamapp/soql-parser-js';
-
-const soql = `
- WHERE LoginTime > 2010-09-20T22:16:30.000Z
- AND LoginTime < 2010-09-21T22:16:30.000Z
- GROUP BY UserId
-`;
-
-const soqlQuery = parseQuery(soql, { allowPartialQuery: true });
-
-console.log(JSON.stringify(soqlQuery, null, 2));
-```
-
-
- Results (click to show)
-
-```json
-{
- "where": {
- "left": {
- "field": "LoginTime",
- "operator": ">",
- "value": "2010-09-20T22:16:30.000Z",
- "literalType": "DATETIME"
- },
- "operator": "AND",
- "right": {
- "left": {
- "field": "LoginTime",
- "operator": "<",
- "value": "2010-09-21T22:16:30.000Z",
- "literalType": "DATETIME"
- }
- }
- },
- "groupBy": {
- "field": "UserId"
- }
-}
-```
-
-
-
-### Validating Queries
-
-```typescript
-import { isQueryValid } from '@jetstreamapp/soql-parser-js';
-
-const invalidSoql = `SELECT UserId, COUNT(Id) Account`;
-const validSoql = `SELECT UserId, COUNT(Id) Account`;
-
-console.log(isQueryValid(soql));
-console.log(isQueryValid(soql));
-```
-
-### Composing Queries
-
-Build a `Query` data structure to have it converted back into a SOQL query.
-
-Composing a query will turn a Query object back to a SOQL query string. The exact same data structure returned from `parseQuery()` can be used,
-but depending on your use-case, you may need to build your own data structure to compose a query.
-These examples show building your own Query object with the minimum required fields.
-
-Some utility methods have been provided to make it easier to build the field data structures.
-
-**Note:** Some operators may be converted to uppercase (e.x. NOT, AND)
-
-**Note:** There are a number of fields populated on the Query object when `parseQuery()` is called that are not required to compose a query. Look at the examples below and the comments in the data model for more information.
-
-```typescript
-import { composeQuery, getField, Query } from '@jetstreamapp/soql-parser-js';
-
-// Build a subquery
-const oppLineItemsSubquery = {
- fields: [
- getField('Quantity'),
- getField('ListPrice'),
- getField({
- field: 'UnitPrice',
- relationships: ['PricebookEntry'],
- }),
- getField({
- field: 'Name',
- relationships: ['PricebookEntry'],
- }),
- ],
- relationshipName: 'OpportunityLineItems',
-};
-
-// build the main query and add the subquery as a field
-const soqlQuery: Query = {
- fields: [
- getField('Id'),
- getField('Name'),
- getField({
- functionName: 'FORMAT',
- parameters: 'Amount',
- alias: 'MyFormattedAmount',
- }),
- getField({ subquery: oppLineItemsSubquery }),
- ],
- sObject: 'Opportunity',
- where: {
- left: {
- field: 'CreatedDate',
- operator: '>',
- value: 'LAST_N_YEARS:1',
- },
- operator: 'AND',
- right: {
- left: {
- field: 'StageName',
- operator: '=',
- value: 'Closed Won',
- // literalType is optional, but if set to STRING and our value is not already wrapped in "'", they will be added
- // All other literalType values are ignored when composing a query
- literalType: 'STRING',
- },
- },
- },
- limit: 150,
-};
-
-const composedQuery = composeQuery(soqlQuery, { format: true });
-
-console.log(composedQuery);
-```
-
-**Results**
-
-```sql
-SELECT Id, Name, FORMAT(Amount) MyFormattedAmount,
- (
- SELECT Quantity, ListPrice, PricebookEntry.UnitPrice,
- PricebookEntry.Name
- FROM OpportunityLineItems
- )
-FROM Opportunity
-WHERE CreatedDate > LAST_N_YEARS:1
-AND StageName = 'Closed Won'
-LIMIT 150
-```
-
-### Composing a partial query
-
-Starting in version `4.4`, compose will not fail if there are missing `SELECT` and `FROM` clauses in your query.
-
-Partial compose support it supported without any additional steps.
-
-```typescript
-import { Compose, parseQuery } from '@jetstreamapp/soql-parser-js';
-
-const soql = `WHERE Name LIKE 'A%' AND MailingCity = 'California`;
-const parsedQuery = parseQuery(soql, { allowPartialQuery: true });
-
-// Results of Parsed Query:
-/**
-{
- where: {
- left: { field: 'Name', operator: 'LIKE', value: "'A%'", literalType: 'STRING' },
- operator: 'AND',
- right: { left: { field: 'MailingCity', operator: '=', value: "'California'", literalType: 'STRING' } },
- },
-}
-*/
-
-const composedQuery = composeQuery(soqlQuery, { format: true });
-
-console.log(composedQuery);
-```
-
-**Results**
-
-```sql
-WHERE Name LIKE 'A%' AND MailingCity = 'California
-```
-
-
- See the alternate way to compose partial queries by calling the Compose class directly
-
-If you need to compose just a part of a query instead of the entire query, you can create an instance of the Compose class directly.
-
-For example, if you just need the `WHERE` clause from a query as a string, you can do the following:
-
-```typescript
-import { Compose, parseQuery } from '@jetstreamapp/soql-parser-js';
-
-const soql = `SELECT Id FROM Account WHERE Name = 'Foo'`;
-const parsedQuery = parseQuery(soql);
-
-// Results of Parsed Query:
- // const parsedQuery = {
- // fields: [
- // {
- // type: 'Field',
- // field: 'Id',
- // },
- // ],
- // sObject: 'Account',
- // where: {
- // left: {
- // field: 'Name',
- // operator: '=',
- // value: "'Foo'",
- // literalType: 'STRING',
- // },
- // },
- // };
-
- // Create a new instance of the compose class and set the autoCompose to false to avoid composing the entire query
- const composer = new Compose(parsedQuery, { autoCompose: false });
-
-
- const whereClause = composer.parseWhereOrHavingClause(parsedQuery.where);
-
- console.log(whereClause);
-}
-```
-
-#### Available methods on the `Compose` class
-
-These are used internally, but are public and available for use.
-
-```typescript
-parseQuery(query: Query | Subquery): string;
-parseFields(fields: FieldType[]): { text: string; typeOfClause?: string[] }[];
-parseTypeOfField(typeOfField: FieldTypeOf): string[];
-parseWhereOrHavingClause(whereOrHaving: WhereClause | HavingClause, tabOffset = 0, priorConditionIsNegation = false): string;
-parseGroupByClause(groupBy: GroupByClause | GroupByClause[]): string;
-parseOrderBy(orderBy: OrderByClause | OrderByClause[]): string;
-parseWithDataCategory(withDataCategory: WithDataCategoryClause): string;
-```
-
-
-
-## Format Query
-
-This function is provided as a convenience and just calls parse and compose.
-[Check out the demo](https://jetstreamapp.github.io/soql-parser-js/) to see the outcome of the various format options.
-
-```typescript
-import { formatQuery } from '@jetstreamapp/soql-parser-js';
-
-const query = `SELECT Id, Name, AccountNumber, AccountSource, AnnualRevenue, BillingAddress, BillingCity, BillingCountry, BillingGeocodeAccuracy, ShippingStreet, Sic, SicDesc, Site, SystemModstamp, TickerSymbol, Type, Website, (SELECT Id, Name, AccountId, Amount, CampaignId, CloseDate, CreatedById, Type FROM Opportunities), (SELECT Id, Name, AccountNumber, AccountSource, AnnualRevenue, BillingAddress, Website FROM ChildAccounts) FROM Account WHERE Name LIKE 'a%' OR Name LIKE 'b%' OR Name LIKE 'c%'`;
-
-const formattedQuery1 = formatQuery(query);
-const formattedQuery2 = formatQuery(query, {
- fieldMaxLineLength: 20,
- fieldSubqueryParensOnOwnLine: false,
- whereClauseOperatorsIndented: true,
-});
-const formattedQuery3 = formatQuery(query, { fieldSubqueryParensOnOwnLine: true, whereClauseOperatorsIndented: true });
-```
-
-```sql
--- formattedQuery1
-SELECT Id, Name, AccountNumber, AccountSource, AnnualRevenue,
- BillingAddress, BillingCity, BillingCountry, BillingGeocodeAccuracy,
- ShippingStreet, Sic, SicDesc, Site, SystemModstamp, TickerSymbol, Type,
- Website,
- (
- SELECT Id, Name, AccountId, Amount, CampaignId, CloseDate,
- CreatedById, Type
- FROM Opportunities
- ),
- (
- SELECT Id, Name, AccountNumber, AccountSource, AnnualRevenue,
- BillingAddress, Website
- FROM ChildAccounts
- )
-FROM Account
-WHERE Name LIKE 'a%'
-OR Name LIKE 'b%'
-OR Name LIKE 'c%'
-
--- formattedQuery2
-SELECT Id, Name,
- AccountNumber, AccountSource,
- AnnualRevenue, BillingAddress,
- BillingCity, BillingCountry,
- BillingGeocodeAccuracy, ShippingStreet,
- Sic, SicDesc, Site,
- SystemModstamp, TickerSymbol, Type,
- Website,
- (SELECT Id, Name,
- AccountId, Amount, CampaignId,
- CloseDate, CreatedById, Type
- FROM Opportunities),
- (SELECT Id, Name,
- AccountNumber, AccountSource,
- AnnualRevenue, BillingAddress,
- Website
- FROM ChildAccounts)
-FROM Account
-WHERE Name LIKE 'a%'
- OR Name LIKE 'b%'
- OR Name LIKE 'c%'
-
-
--- formattedQuery3
-SELECT Id, Name, AccountNumber, AccountSource, AnnualRevenue,
- BillingAddress, BillingCity, BillingCountry, BillingGeocodeAccuracy,
- ShippingStreet, Sic, SicDesc, Site, SystemModstamp, TickerSymbol, Type,
- Website,
- (
- SELECT Id, Name, AccountId, Amount, CampaignId, CloseDate,
- CreatedById, Type
- FROM Opportunities
- ),
- (
- SELECT Id, Name, AccountNumber, AccountSource, AnnualRevenue,
- BillingAddress, Website
- FROM ChildAccounts
- )
-FROM Account
-WHERE Name LIKE 'a%'
- OR Name LIKE 'b%'
- OR Name LIKE 'c%'
-```
-
-## CLI
-
-Install globally or use `npx` to interact with the cli.
-
-### Available Commands
-
-- `soql-parser-js --help` (or using `npx`: `npx soql-parser-js --help`)
-- `soql-parser-js parse --help`
-- `soql-parser-js compose --help`
-- `soql-parser-js format --help`
-
-### Examples
-
-#### Parse
-
-`npx soql-parser-js parse "SELECT Id FROM Account"`
-
-```bash
-{"fields":[{"type":"Field","field":"Id"}],"sObject":"Account"}
-```
-
-#### Compose
-
-`npx soql-parser-js compose "{\"fields\":[{\"type\":\"Field\",\"field\":\"Id\"}],\"sObject\":\"Account\"}"`
-
-```bash
-SELECT Id FROM Account
-```
-
-`npx soql-parser-js compose "{\"fields\":[{\"type\":\"Field\",\"field\":\"Id\"}],\"sObject\":\"Account\"}" --json` or -j
-
-```json
-{ "query": "SELECT Id FROM Account" }
-```
-
-#### Format
-
-`npx soql-parser-js format "SELECT Name, COUNT(Id) FROM Account GROUP BY Name HAVING COUNT(Id) > 1"`
-
-```bash
-SELECT Name, COUNT(Id)
-FROM Account
-GROUP BY Name
-HAVING COUNT(Id) > 1
-```
-
-`npx soql-parser-js format "SELECT Name, COUNT(Id) FROM Account GROUP BY Name HAVING COUNT(Id) > 1 -j`
-
-```json
-{ "query": "SELECT Name, COUNT(Id)\nFROM Account\nGROUP BY Name\nHAVING COUNT(Id) > 1" }
-```
-
-#### Is Valid
-
-`npx soql-parser-js valid "SELECT Id FROM Account"`
-
-```bash
-true
-```
-
-`npx soql-parser-js valid "SELECT Id invalid FROM Account"`
-
-ℹ️ this returns an exit code of 1
-
-```bash
-false
-```
-
-`npx soql-parser-js valid "SELECT Id FROM Account" -j`
-
-```json
-{ "isValid": true }
-```
-
-`npx soql-parser-js valid "SELECT Id invalid invalid FROM Account" -j`
-
-ℹ️ this returns an exit code of 0
-
-```json
-{ "isValid": false }
-```
-
-### List of options
-
-`soql-parser-js --help`
-
-```bash
-Usage: soql-parser-js [options] [command]
-
-Options:
- -h, --help output usage information
-
-Commands:
- parse [options]
- compose [options]
- format [options]
- valid
-```
-
-`soql-parser-js parse --help`
-
-```bash
-Usage: parse [options]
-
-Options:
- -a, --allow-apex allow apex bind variables
- -p, --allow-partial allow partial queries
- -i, --ignore-errors ignore parse errors, return as much of query as possible
- -h, --help output usage information
-```
-
-`soql-parser-js compose --help`
-
-```bash
-Usage: compose [options]
-
-Options:
- -f, --format format output
- -i --indent number of tab characters to indent (default: 1)
- -m --line-length max number of characters per lins (default: 60)
- -s --subquery-parens-new-line subquery parens on own line
- -k --keywords-new-line new line after keywords
- -j, --json output as JSON
- -h, --help output usage information
-```
-
-`soql-parser-js format --help`
-
-```bash
-Usage: format [options]
-
-Options:
- -a, --allow-apex allow apex bind variables
- -p, --allow-partial allow partial queries
- -i --indent number of tab characters to indent (default: 1)
- -m --line-length max number of characters per lins (default: 60)
- -s --subquery-parens-new-line subquery parens on own line
- -k --keywords-new-line new line after keywords
- -j, --json output as JSON
- -h, --help output usage information
-```
-
-`soql-parser-js valid --help`
-
-```bash
-Usage: valid [options]
-
-Options:
- -a, --allow-apex allow apex bind variables
- -p, --allow-partial allow partial queries
- -j, --json output as JSON
- -h, --help output usage information
-```
-
-## Data Models
-
-### Query
-
-```typescript
-export type LogicalOperator = 'AND' | 'OR' | 'NOT';
-export type Operator = '=' | '!=' | '<=' | '>=' | '>' | '<' | 'LIKE' | 'IN' | 'NOT IN' | 'INCLUDES' | 'EXCLUDES';
-export type FieldTypeOfConditionType = 'WHEN' | 'ELSE';
-export type GroupSelector = 'ABOVE' | 'AT' | 'BELOW' | 'ABOVE_OR_BELOW';
-export type ForClause = 'VIEW' | 'UPDATE' | 'REFERENCE';
-export type UpdateClause = 'TRACKING' | 'VIEWSTAT';
-export type LiteralType =
- | 'STRING'
- | 'INTEGER'
- | 'DECIMAL'
- | 'INTEGER_WITH_CURRENCY_PREFIX'
- | 'DECIMAL_WITH_CURRENCY_PREFIX'
- | 'BOOLEAN'
- | 'NULL'
- | 'DATETIME'
- | 'DATE'
- | 'DATE_LITERAL'
- | 'DATE_N_LITERAL'
- | 'APEX_BIND_VARIABLE';
-export type FieldType =
- | Field
- | FieldWithAlias
- | FieldFunctionExpression
- | FieldRelationship
- | FieldRelationshipWithAlias
- | FieldSubquery
- | FieldTypeOf;
-export type OrderByCriterion = 'ASC' | 'DESC';
-export type NullsOrder = 'FIRST' | 'LAST';
-export type GroupByType = 'CUBE' | 'ROLLUP';
-export type DateLiteral =
- | 'YESTERDAY'
- | 'TODAY'
- | 'TOMORROW'
- | 'LAST_WEEK'
- | 'THIS_WEEK'
- | 'NEXT_WEEK'
- | 'LAST_MONTH'
- | 'THIS_MONTH'
- | 'NEXT_MONTH'
- | 'LAST_90_DAYS'
- | 'NEXT_90_DAYS'
- | 'THIS_QUARTER'
- | 'LAST_QUARTER'
- | 'NEXT_QUARTER'
- | 'THIS_YEAR'
- | 'LAST_YEAR'
- | 'NEXT_YEAR'
- | 'THIS_FISCAL_QUARTER'
- | 'LAST_FISCAL_QUARTER'
- | 'NEXT_FISCAL_QUARTER'
- | 'THIS_FISCAL_YEAR'
- | 'LAST_FISCAL_YEAR'
- | 'NEXT_FISCAL_YEAR';
-
-export type DateNLiteral =
- | 'YESTERDAY'
- | 'NEXT_N_DAYS'
- | 'LAST_N_DAYS'
- | 'N_DAYS_AGO'
- | 'NEXT_N_WEEKS'
- | 'LAST_N_WEEKS'
- | 'N_WEEKS_AGO'
- | 'NEXT_N_MONTHS'
- | 'LAST_N_MONTHS'
- | 'N_MONTHS_AGO'
- | 'NEXT_N_QUARTERS'
- | 'LAST_N_QUARTERS'
- | 'N_QUARTERS_AGO'
- | 'NEXT_N_YEARS'
- | 'LAST_N_YEARS'
- | 'N_YEARS_AGO'
- | 'NEXT_N_FISCAL_QUARTERS'
- | 'LAST_N_FISCAL_QUARTERS'
- | 'N_FISCAL_QUARTERS_AGO'
- | 'NEXT_N_FISCAL_YEARS'
- | 'LAST_N_FISCAL_YEARS'
- | 'N_FISCAL_YEARS_AGO';
-
-export interface Field {
- type: 'Field';
- field: string;
- alias?: string;
-}
-
-export interface FieldWithAlias extends Field {
- objectPrefix: string;
- rawValue: string;
-}
-
-export interface FieldFunctionExpression {
- type: 'FieldFunctionExpression';
- functionName: string;
- parameters: (string | FieldFunctionExpression)[];
- alias?: string;
- isAggregateFn?: boolean; // not required for compose, will be populated if SOQL is parsed
- rawValue?: string; // not required for compose, will be populated if SOQL is parsed
-}
-
-export interface FieldRelationship {
- type: 'FieldRelationship';
- field: string;
- relationships: string[];
- rawValue?: string; // not required for compose, will be populated if SOQL is parsed with the raw value of the entire field
-}
-
-export interface FieldRelationshipWithAlias extends FieldRelationship {
- objectPrefix: string;
- alias: string;
-}
-
-export interface FieldSubquery {
- type: 'FieldSubquery';
- subquery: Subquery;
-}
-
-export interface FieldTypeOf {
- type: 'FieldTypeof';
- field: string;
- conditions: FieldTypeOfCondition[];
-}
-
-export interface FieldTypeOfCondition {
- type: FieldTypeOfConditionType;
- objectType?: string; // not present when ELSE
- fieldList: string[];
-}
-
-export interface QueryBase {
- fields?: FieldType[];
- sObjectAlias?: string;
- usingScope?: string;
- where?: WhereClause;
- limit?: number;
- offset?: number;
- groupBy?: GroupByClause;
- orderBy?: OrderByClause | OrderByClause[];
- withDataCategory?: WithDataCategoryClause;
- withSecurityEnforced?: boolean;
- withAccessLevel?: boolean;
- for?: ForClause;
- update?: UpdateClause;
-}
-
-export interface Query extends QueryBase {
- sObject?: string;
-}
-
-export interface Subquery extends QueryBase {
- relationshipName: string;
- sObjectPrefix?: string[];
-}
-
-export type WhereClause = WhereClauseWithoutOperator | WhereClauseWithRightCondition;
-
-export interface WhereClauseWithoutOperator {
- left: ConditionWithValueQuery;
-}
-
-export interface WhereClauseWithRightCondition extends WhereClauseWithoutOperator {
- operator: LogicalOperator;
- right: WhereClause;
-}
-
-export type Condition =
- | ValueCondition
- | ValueWithDateLiteralCondition
- | ValueWithDateNLiteralCondition
- | ValueFunctionCondition
- | NegationCondition;
-
-export type ConditionWithValueQuery = Condition | ValueQueryCondition;
-
-export interface OptionalParentheses {
- openParen?: number;
- closeParen?: number;
-}
-
-export interface ValueCondition extends OptionalParentheses {
- field: string;
- operator: Operator;
- value: string | string[];
- literalType?: LiteralType | LiteralType[];
-}
-
-export interface ValueWithDateLiteralCondition extends OptionalParentheses {
- field: string;
- operator: Operator;
- value: DateLiteral | DateLiteral[];
- literalType?: 'DATE_LITERAL' | 'DATE_LITERAL'[];
-}
-
-export interface ValueWithDateNLiteralCondition extends OptionalParentheses {
- field: string;
- operator: Operator;
- value: string | string[];
- literalType?: 'DATE_N_LITERAL' | 'DATE_N_LITERAL'[];
- dateLiteralVariable: number | number[];
-}
-
-export interface ValueQueryCondition extends OptionalParentheses {
- field: string;
- operator: Operator;
- valueQuery: Query;
-}
-
-export interface ValueFunctionCondition extends OptionalParentheses {
- fn: FunctionExp;
- operator: Operator;
- value: string | string[];
- literalType?: LiteralType | LiteralType[];
-}
-
-export interface NegationCondition {
- openParen: number;
-}
-
-export type OrderByClause = OrderByFieldClause | OrderByFnClause;
-
-export interface OrderByOptionalFieldsClause {
- order?: OrderByCriterion;
- nulls?: NullsOrder;
-}
-
-export interface OrderByFieldClause extends OrderByOptionalFieldsClause {
- field: string;
-}
-
-export interface OrderByFnClause extends OrderByOptionalFieldsClause {
- fn: FunctionExp;
-}
-
-export type GroupByClause = GroupByFieldClause | GroupByFnClause;
-
-export interface GroupByOptionalFieldsClause {
- having?: HavingClause;
-}
-
-export interface GroupByFieldClause extends GroupByOptionalFieldsClause {
- field: string | string[];
-}
-
-export interface GroupByFnClause extends GroupByOptionalFieldsClause {
- fn: FunctionExp;
-}
-
-export type HavingClause = HavingClauseWithoutOperator | HavingClauseWithRightCondition;
-
-export interface HavingClauseWithoutOperator {
- left: Condition;
-}
-
-export interface HavingClauseWithRightCondition extends HavingClauseWithoutOperator {
- operator: LogicalOperator;
- right: HavingClause;
-}
-
-export interface FunctionExp {
- rawValue?: string; // only used for compose fields if useRawValueForFn=true. Should be formatted like this: Count(Id)
- functionName?: string; // only used for compose fields if useRawValueForFn=false, will be populated if SOQL is parsed
- alias?: string;
- parameters?: (string | FunctionExp)[]; // only used for compose fields if useRawValueForFn=false, will be populated if SOQL is parsed
- isAggregateFn?: boolean; // not used for compose, will be populated if SOQL is parsed
-}
-
-export interface WithDataCategoryClause {
- conditions: WithDataCategoryCondition[];
-}
-
-export interface WithDataCategoryCondition {
- groupName: string;
- selector: GroupSelector;
- parameters: string[];
-}
-```
-
-## Contributing
-
-All contributions are welcome on the project. Please read the [contribution guidelines](https://github.com/jetstreamapp/soql-parser-js/blob/master/CONTRIBUTING.md).
diff --git a/assets/css/styles.092ad08f.css b/assets/css/styles.092ad08f.css
new file mode 100644
index 0000000..7d9a7d5
--- /dev/null
+++ b/assets/css/styles.092ad08f.css
@@ -0,0 +1 @@
+.col,.container{padding:0 var(--ifm-spacing-horizontal);width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown li,body{word-wrap:break-word}body,ol ol,ol ul,ul ol,ul ul{margin:0}pre,table{overflow:auto}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button,code{vertical-align:middle}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.menu,.navbar-sidebar{overflow-x:hidden}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.toggleButton_gllP,html{-webkit-tap-highlight-color:transparent}.clean-list,.containsTaskList_mC6p,.details_lb9f>summary,.dropdown__menu,.list_VMDG,.menu__list{list-style:none}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:#0000;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:#0000000d;--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 #0000001a;--ifm-global-shadow-md:0 5px 40px #0003;--ifm-global-shadow-tl:0 12px 28px 0 #0003,0 2px 4px 0 #0000001a;--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:#0000;--ifm-table-stripe-background:#00000008;--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem;--docusaurus-progress-bar-color:var(--ifm-color-primary);--ifm-color-primary:#2e8555;--ifm-color-primary-dark:#29784c;--ifm-color-primary-darker:#277148;--ifm-color-primary-darkest:#205d3b;--ifm-color-primary-light:#33925d;--ifm-color-primary-lighter:#359962;--ifm-color-primary-lightest:#3cad6e;--ifm-code-font-size:95%;--docusaurus-highlighted-code-line-bg:#0000001a;--docusaurus-announcement-bar-height:auto;--docusaurus-tag-list-border:var(--ifm-color-emphasis-300);--docusaurus-collapse-button-bg:#0000;--docusaurus-collapse-button-bg-hover:#0000001a;--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:#0000}*{box-sizing:border-box}html{background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;-webkit-text-size-adjust:100%;text-size-adjust:100%}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.menuExternalLink_NmtK,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width)}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid #0000001a;border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal)}a code{color:inherit}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);padding:var(--ifm-pre-padding)}pre code{background-color:initial;border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color);font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight);line-height:var(--ifm-heading-line-height);margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}h1{font-size:var(--ifm-h1-font-size)}h2{font-size:var(--ifm-h2-font-size)}h3{font-size:var(--ifm-h3-font-size)}h4{font-size:var(--ifm-h4-font-size)}h5{font-size:var(--ifm-h5-font-size)}h6{font-size:var(--ifm-h6-font-size)}img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:var(--ifm-spacing-vertical)}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary,.wordWrapButtonEnabled_EoeP .wordWrapButtonIcon_Bwma{color:var(--ifm-color-primary)}.text--secondary{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.admonitionHeading_Gvgb,.alert__heading,.featuresSubHeading_pF2l,.text--uppercase{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:#3578e526;--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:#ebedf026;--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:#00a40026;--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:#54c7ec26;--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:#ffba0026;--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:#fa383e26;--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover{opacity:1}.alert a{text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button,.dropdown>.navbar__link:after{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover){color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:any-link:hover,.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area[href].breadcrumbs__link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;-webkit-user-select:none;user-select:none;white-space:nowrap}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:#0000;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);text-decoration:none}.close{color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_Tfdd:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{border-radius:.25rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor #0000;border-style:solid;border-width:.4em .4em 0;content:"";margin-left:.3em;position:relative;top:2px;transform:translateY(-50%)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_Djhp article>:first-child,.docItemContainer_Djhp header+*,.footer__item{margin-top:0}.admonitionContent_BuS1>:last-child,.collapsibleContent_i85q p:last-child,.details_lb9f>summary>p:last-child,.footer__items{margin-bottom:0}.codeBlockStandalone_MEMb,[type=checkbox]{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu__list{margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.details_lb9f[data-collapsed=false].isBrowser_bmU9>summary:before,.details_lb9f[open]:not(.isBrowser_bmU9)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__caret:before,.menu__link--sublist-caret:after{content:"";height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast) linear;width:1.25rem;filter:var(--ifm-menu-link-sublist-icon-filter)}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;margin-left:auto;min-width:1.25rem}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.navbar__brand,.navbar__link{color:var(--ifm-navbar-link-color)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;position:fixed;transition-duration:var(--ifm-transition-fast);transition-timing-function:ease-in-out;left:0;top:0;visibility:hidden}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.announcementBarContent_xLdY,.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center .navbar__brand{margin:0}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:#ffffff1a;--ifm-navbar-search-input-placeholder-color:#ffffff80;color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:#ffffff0d;--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:.9rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);transform:translate3d(-100%,0,0);transition-property:opacity,visibility,transform;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:#0009;right:0;transition-property:opacity,visibility}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.label,label>input[type=checkbox]{margin-right:.5rem}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination__link:hover{text-decoration:none}.pagination-nav{display:grid;grid-gap:var(--ifm-spacing-horizontal);gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:var(--ifm-heading-line-height);padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.listItem_WVMh.selected_LEl_,.listItem_WVMh:hover{border-left:5px solid grey}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto}.tabs__item{border-bottom:3px solid #0000;border-radius:var(--ifm-global-radius);cursor:pointer;display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:#ffffff0d;--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:#ffffff1a;--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:#ffffff12;--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}[data-theme=dark]{--ifm-color-primary:#25c2a0;--ifm-color-primary-dark:#21af90;--ifm-color-primary-darker:#1fa588;--ifm-color-primary-darkest:#1a8870;--ifm-color-primary-light:#29d5b0;--ifm-color-primary-lighter:#32d8b4;--ifm-color-primary-lightest:#4fddbf;--docusaurus-highlighted-code-line-bg:#0000004d}.label{color:var(--ifm-color-primary);font-size:.8rem;font-weight:700}.label.label--large{font-size:1.2rem}label.disabled{opacity:.75}label>input[type=number]{margin-left:.5rem}.wrap-text{overflow-wrap:anywhere;white-space:pre-wrap}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}#__docusaurus-base-url-issue-banner-container,.navbarSearchContainer_Bca1:empty,.themedComponent_mlkZ,[data-theme=dark] .lightToggleIcon_pyhR,[data-theme=light] .darkToggleIcon_wfgR,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j{display:none}.skipToContent_fXgn{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem;z-index:calc(var(--ifm-z-index-fixed) + 1)}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_CVFx{line-height:0;padding:0}.content_knG7{font-size:85%;padding:5px 0;text-align:center}.content_knG7 a{color:inherit;text-decoration:underline}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px}.toggle_vylO{height:2rem;width:2rem}.toggleButton_gllP{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast);width:100%}.toggleButton_gllP:hover{background:var(--ifm-color-emphasis-200)}.toggleButtonDisabled_aARS{cursor:not-allowed}.dropdownNavbarItemMobile_S0Fm,.listItem_WVMh{cursor:pointer}.darkNavbarColorModeToggle_X3D1:hover{background:var(--ifm-color-gray-800)}[data-theme=dark] .themedComponent--dark_xIcU,[data-theme=light] .themedComponent--light_NVdE,html:not([data-theme]) .themedComponent--light_NVdE{display:initial}.iconExternalLink_nPIU{margin-left:.3rem}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}.navbarHideable_m1mJ{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_jGov{transform:translate3d(0,calc(-100% - 2px),0)}.errorBoundaryError_a6uf{color:red;white-space:pre-wrap}.errorBoundaryFallback_VBag{color:red;padding:.55rem}.footerLogoLink_BH7S{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.footerLogoLink_BH7S:hover,.hash-link:focus,:hover>.hash-link{opacity:1}.anchorWithStickyNavbar_LWe7{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_WYt5{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;user-select:none}.hash-link:before{content:"#"}.mainWrapper_z2l0{display:flex;flex:1 0 auto;flex-direction:column}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.textarea_hv9b{height:300px}.textarea_MD8h,.textarea_hv9b{border:2px solid #ccc;border-radius:4px;box-sizing:border-box;font-size:16px;padding:12px 20px;resize:vertical;width:100%}.textarea_MD8h{height:150px}.container_f1_9{border-right:1px solid #e5e5e5;font-size:.8rem;margin-right:2rem;min-height:4rem;min-width:1.25rem;position:relative}.container_f1_9.collapsed_m3ao{border-right:none!important}.collapseIcon_fTmE{border:none;border-radius:50%;height:2rem;position:absolute;right:-1rem;top:1rem;width:2rem}.list_VMDG{margin:.2rem 0 0;max-height:calc(100vh - var(--ifm-navbar-height) - 62px - 1rem);overflow-y:scroll;padding:0}.listItem_WVMh{border-left:5px solid #0000;padding:.5rem}[data-theme=dark] .listItem_WVMh:hover{border-left:5px solid #e5e5e5;text-decoration:none}.listItem_WVMh:hover{text-decoration:none}.tag_zVej{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_zVej:hover{--docusaurus-tag-list-border:var(--ifm-link-color);text-decoration:none}.tagRegular_sFm0{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_h2kH{align-items:center;border-left:0;display:flex;padding:0 .5rem 0 1rem;position:relative}.tagWithCount_h2kH:after,.tagWithCount_h2kH:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_h2kH:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_h2kH:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_h2kH span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.tags_jXut{display:inline}.tag_QGVx{display:inline-block;margin:0 .4rem .5rem 0}.iconEdit_Z9Sw{margin-right:.3em;vertical-align:sub}.lastUpdated_JAkA{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_TO0P{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton_TO0P:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MG3E:after,.tocCollapsibleExpanded_sAul{transform:none}.tocCollapsible_ETCw{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.buttonGroup__atx button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}.tocCollapsibleContent_vkbj>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_vkbj ul li{margin:.4rem .8rem}.tocCollapsibleContent_vkbj a{display:block}.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.codeBlockContainer_Ckt0{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_biex{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_Ktv7{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_bY9V{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_Ktv7+.codeBlockContent_biex .codeBlock_bY9V{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_e6Vv{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_o6Pm{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup__atx{column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup__atx button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity var(--ifm-transition-fast) ease-in-out}.buttonGroup__atx button:focus-visible,.buttonGroup__atx button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup__atx button{opacity:.4}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_lJS_{counter-increment:a;display:table-row}.codeLineNumber_Tfdd{background:var(--ifm-pre-background);display:table-cell;left:0;overflow-wrap:normal;padding:0 var(--ifm-pre-padding);position:sticky;text-align:right;width:1%}.codeLineNumber_Tfdd:before{content:counter(a);opacity:.4}.codeLineContent_feaV{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_obH4{opacity:1!important}.copyButtonIcons_eSgA{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_y97N,.copyButtonSuccessIcon_LjdS{left:0;position:absolute;top:0;fill:currentColor;height:inherit;opacity:inherit;transition:all var(--ifm-transition-fast) ease;width:inherit}.copyButtonSuccessIcon_LjdS{color:#00d600;left:50%;opacity:0;top:50%;transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_obH4 .copyButtonIcon_y97N{opacity:0;transform:scale(.33)}.copyButtonCopied_obH4 .copyButtonSuccessIcon_LjdS{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.wordWrapButtonIcon_Bwma{height:1.2rem;width:1.2rem}.details_lb9f{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_lb9f>summary{cursor:pointer;padding-left:1rem;position:relative}.details_lb9f>summary::-webkit-details-marker{display:none}.details_lb9f>summary:before{border-color:#0000 #0000 #0000 var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;transform:rotate(0);transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_i85q{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_b_Ee{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.img_ev3q{height:auto}.admonition_xJq3{margin-bottom:1em}.admonitionHeading_Gvgb{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family)}.admonitionHeading_Gvgb:not(:last-child){margin-bottom:.3rem}.admonitionHeading_Gvgb code{text-transform:none}.admonitionIcon_Rf37{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_Rf37 svg{display:inline-block;height:1.6em;width:1.6em;fill:var(--ifm-alert-foreground-color)}.breadcrumbHomeIcon_YNFT{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.breadcrumbsContainer_Z_bl{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}.features_t9lD{align-items:center;display:flex;padding:2rem 0;width:100%}.featuresSubHeading_pF2l{font-weight:semi-bold;margin:.5rem 0;text-align:center}.featureSvg_GfXr{height:200px;width:200px}.heroBanner_qdFl{overflow:hidden;padding:4rem 0;position:relative;text-align:center}.buttons_AeoN{align-items:center;display:flex;gap:1rem;justify-content:center}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;transform:scale(1);visibility:visible}[data-theme=dark]:root{--docusaurus-collapse-button-bg:#ffffff0d;--docusaurus-collapse-button-bg-hover:#ffffff1a}.collapseSidebarButton_PEFL{display:none;margin:0}.docSidebarContainer_YfHR,.sidebarLogo_isFc{display:none}.docMainContainer_TBSr,.docRoot_UBD9{display:flex;width:100%}.docsWrapper_hBAB{display:flex;flex:1 0 auto}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_TmdG{background-color:var(--docusaurus-collapse-button-bg)}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.navbarSearchContainer_Bca1{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.lastUpdated_JAkA{text-align:right}.tocMobile_ITEo{display:none}.docItemCol_VOVn{max-width:75%!important}.collapseSidebarButton_PEFL{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:sticky}.collapseSidebarButtonIcon_kv0_{margin-top:4px;transform:rotate(180deg)}.expandButtonIcon_i1dp,[dir=rtl] .collapseSidebarButtonIcon_kv0_{transform:rotate(0)}.collapseSidebarButton_PEFL:focus,.collapseSidebarButton_PEFL:hover,.expandButton_TmdG:focus,.expandButton_TmdG:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_SIkG{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_SIkG{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_GW3s{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_njMd{display:flex;flex-direction:column;height:100%;padding-top:var(--ifm-navbar-height);width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_wUlq{padding-top:0}.sidebarHidden_VK0M{opacity:0;visibility:hidden}.sidebarLogo_isFc{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo_isFc img{height:2rem;margin-right:.5rem}.expandButton_TmdG{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;transition:background-color var(--ifm-transition-fast) ease;width:100%}[dir=rtl] .expandButtonIcon_i1dp{transform:rotate(180deg)}.docSidebarContainer_YfHR{border-right:1px solid var(--ifm-toc-border-color);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_DPk8{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.sidebarViewport_aRkj{height:100%;max-height:100vh;position:sticky;top:0}.docMainContainer_TBSr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_lQrH{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_JWYK{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_DEke,.footer__link-separator,.navbar__item,.tableOfContents_bqdL{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.navbarSearchContainer_Bca1{position:absolute;right:var(--ifm-navbar-padding-horizontal)}.docItemContainer_F8PC{padding:0 .3rem}}@media screen and (max-width:996px){.heroBanner_qdFl{padding:2rem}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media (prefers-reduced-motion:reduce){:root{--ifm-transition-fast:0ms;--ifm-transition-slow:0ms}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_e6Vv{white-space:pre-wrap}}
\ No newline at end of file
diff --git a/assets/js/09d5ad39.7d614dcb.js b/assets/js/09d5ad39.7d614dcb.js
new file mode 100644
index 0000000..b4b9d81
--- /dev/null
+++ b/assets/js/09d5ad39.7d614dcb.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[30],{8058:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>a,toc:()=>c});var t=r(5893),s=r(1151);const o={sidebar_position:4},i="Other Examples",a={id:"examples",title:"Other Examples",description:"Parsing Queries",source:"@site/docs/examples.md",sourceDirName:".",slug:"/examples",permalink:"/soql-parser-js/docs/examples",draft:!1,unlisted:!1,editUrl:"https://github.com/jetstreamapp/soql-parser-js/docs/docs/docs/examples.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"tutorialSidebar",previous:{title:"CLI",permalink:"/soql-parser-js/docs/cli"}},l={},c=[{value:"Parsing Queries",id:"parsing-queries",level:3},{value:"Parsing a partial query",id:"parsing-a-partial-query",level:3},{value:"Validating Queries",id:"validating-queries",level:3},{value:"Composing Queries",id:"composing-queries",level:3},{value:"Composing a partial query",id:"composing-a-partial-query",level:3},{value:"Available methods on the Compose class",id:"available-methods-on-the-compose-class",level:4},{value:"Format Query",id:"format-query",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",strong:"strong",...(0,s.a)(),...e.components},{Details:r}=n;return r||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"other-examples",children:"Other Examples"}),"\n",(0,t.jsx)(n.h3,{id:"parsing-queries",children:"Parsing Queries"}),"\n",(0,t.jsxs)(n.p,{children:["Parsing a SOQL query can be completed by calling ",(0,t.jsx)(n.code,{children:"parseQuery(soqlQueryString)"}),". A ",(0,t.jsx)(n.code,{children:"Query"})," data structure will be returned."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",children:"import { parseQuery } from '@jetstreamapp/soql-parser-js';\n\nconst soql = `\n SELECT UserId, COUNT(Id)\n FROM LoginHistory\n WHERE LoginTime > 2010-09-20T22:16:30.000Z\n AND LoginTime < 2010-09-21T22:16:30.000Z\n GROUP BY UserId\n`;\n\nconsole.log(JSON.stringify(soqlQuery, null, 2));\n"})}),"\n",(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:(0,t.jsx)("b",{children:"Results (click to show)"})}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "fields": [\n {\n "type": "Field",\n "field": "UserId"\n },\n {\n "type": "FieldFunctionExpression",\n "functionName": "COUNT",\n "parameters": ["Id"],\n "isAggregateFn": true,\n "rawValue": "COUNT(Id)"\n }\n ],\n "sObject": "LoginHistory",\n "where": {\n "left": {\n "field": "LoginTime",\n "operator": ">",\n "value": "2010-09-20T22:16:30.000Z",\n "literalType": "DATETIME"\n },\n "operator": "AND",\n "right": {\n "left": {\n "field": "LoginTime",\n "operator": "<",\n "value": "2010-09-21T22:16:30.000Z",\n "literalType": "DATETIME"\n }\n }\n },\n "groupBy": {\n "field": "UserId"\n }\n}\n'})})]}),"\n",(0,t.jsx)(n.h3,{id:"parsing-a-partial-query",children:"Parsing a partial query"}),"\n",(0,t.jsxs)(n.p,{children:["Added support for ",(0,t.jsx)(n.code,{children:"allowPartialQuery"})," in version ",(0,t.jsx)(n.code,{children:"4.4.0"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",children:"import { parseQuery } from '@jetstreamapp/soql-parser-js';\n\nconst soql = `\n WHERE LoginTime > 2010-09-20T22:16:30.000Z\n AND LoginTime < 2010-09-21T22:16:30.000Z\n GROUP BY UserId\n`;\n\nconst soqlQuery = parseQuery(soql, { allowPartialQuery: true });\n\nconsole.log(JSON.stringify(soqlQuery, null, 2));\n"})}),"\n",(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:(0,t.jsx)("b",{children:"Results (click to show)"})}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "where": {\n "left": {\n "field": "LoginTime",\n "operator": ">",\n "value": "2010-09-20T22:16:30.000Z",\n "literalType": "DATETIME"\n },\n "operator": "AND",\n "right": {\n "left": {\n "field": "LoginTime",\n "operator": "<",\n "value": "2010-09-21T22:16:30.000Z",\n "literalType": "DATETIME"\n }\n }\n },\n "groupBy": {\n "field": "UserId"\n }\n}\n'})})]}),"\n",(0,t.jsx)(n.h3,{id:"validating-queries",children:"Validating Queries"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",children:"import { isQueryValid } from '@jetstreamapp/soql-parser-js';\n\nconst invalidSoql = `SELECT UserId, COUNT(Id) Account`;\nconst validSoql = `SELECT UserId, COUNT(Id) Account`;\n\nconsole.log(isQueryValid(soql));\nconsole.log(isQueryValid(soql));\n"})}),"\n",(0,t.jsx)(n.h3,{id:"composing-queries",children:"Composing Queries"}),"\n",(0,t.jsxs)(n.p,{children:["Build a ",(0,t.jsx)(n.code,{children:"Query"})," data structure to have it converted back into a SOQL query."]}),"\n",(0,t.jsxs)(n.p,{children:["Composing a query will turn a Query object back to a SOQL query string. The exact same data structure returned from ",(0,t.jsx)(n.code,{children:"parseQuery()"})," can be used,\nbut depending on your use-case, you may need to build your own data structure to compose a query.\nThese examples show building your own Query object with the minimum required fields."]}),"\n",(0,t.jsx)(n.p,{children:"Some utility methods have been provided to make it easier to build the field data structures."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Note:"})," Some operators may be converted to uppercase (e.x. NOT, AND)"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Note:"})," There are a number of fields populated on the Query object when ",(0,t.jsx)(n.code,{children:"parseQuery()"})," is called that are not required to compose a query. Look at the examples below and the comments in the data model for more information."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",children:"import { composeQuery, getField, Query } from '@jetstreamapp/soql-parser-js';\n\n// Build a subquery\nconst oppLineItemsSubquery = {\n fields: [\n getField('Quantity'),\n getField('ListPrice'),\n getField({\n field: 'UnitPrice',\n relationships: ['PricebookEntry'],\n }),\n getField({\n field: 'Name',\n relationships: ['PricebookEntry'],\n }),\n ],\n relationshipName: 'OpportunityLineItems',\n};\n\n// build the main query and add the subquery as a field\nconst soqlQuery: Query = {\n fields: [\n getField('Id'),\n getField('Name'),\n getField({\n functionName: 'FORMAT',\n parameters: 'Amount',\n alias: 'MyFormattedAmount',\n }),\n getField({ subquery: oppLineItemsSubquery }),\n ],\n sObject: 'Opportunity',\n where: {\n left: {\n field: 'CreatedDate',\n operator: '>',\n value: 'LAST_N_YEARS:1',\n },\n operator: 'AND',\n right: {\n left: {\n field: 'StageName',\n operator: '=',\n value: 'Closed Won',\n // literalType is optional, but if set to STRING and our value is not already wrapped in \"'\", they will be added\n // All other literalType values are ignored when composing a query\n literalType: 'STRING',\n },\n },\n },\n limit: 150,\n};\n\nconst composedQuery = composeQuery(soqlQuery, { format: true });\n\nconsole.log(composedQuery);\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Results"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sql",children:"SELECT Id, Name, FORMAT(Amount) MyFormattedAmount,\n (\n SELECT Quantity, ListPrice, PricebookEntry.UnitPrice,\n PricebookEntry.Name\n FROM OpportunityLineItems\n )\nFROM Opportunity\nWHERE CreatedDate > LAST_N_YEARS:1\nAND StageName = 'Closed Won'\nLIMIT 150\n"})}),"\n",(0,t.jsx)(n.h3,{id:"composing-a-partial-query",children:"Composing a partial query"}),"\n",(0,t.jsxs)(n.p,{children:["Starting in version ",(0,t.jsx)(n.code,{children:"4.4"}),", compose will not fail if there are missing ",(0,t.jsx)(n.code,{children:"SELECT"})," and ",(0,t.jsx)(n.code,{children:"FROM"})," clauses in your query."]}),"\n",(0,t.jsx)(n.p,{children:"Partial compose support it supported without any additional steps."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",children:"import { Compose, parseQuery } from '@jetstreamapp/soql-parser-js';\n\nconst soql = `WHERE Name LIKE 'A%' AND MailingCity = 'California`;\nconst parsedQuery = parseQuery(soql, { allowPartialQuery: true });\n\n// Results of Parsed Query:\n/**\n{\n where: {\n left: { field: 'Name', operator: 'LIKE', value: \"'A%'\", literalType: 'STRING' },\n operator: 'AND',\n right: { left: { field: 'MailingCity', operator: '=', value: \"'California'\", literalType: 'STRING' } },\n },\n}\n*/\n\nconst composedQuery = composeQuery(soqlQuery, { format: true });\n\nconsole.log(composedQuery);\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Results"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sql",children:"WHERE Name LIKE 'A%' AND MailingCity = 'California\n"})}),"\n",(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:(0,t.jsx)("b",{children:"See the alternate way to compose partial queries by calling the Compose class directly"})}),(0,t.jsx)(n.p,{children:"If you need to compose just a part of a query instead of the entire query, you can create an instance of the Compose class directly."}),(0,t.jsxs)(n.p,{children:["For example, if you just need the ",(0,t.jsx)(n.code,{children:"WHERE"})," clause from a query as a string, you can do the following:"]}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",children:"import { Compose, parseQuery } from '@jetstreamapp/soql-parser-js';\n\nconst soql = `SELECT Id FROM Account WHERE Name = 'Foo'`;\nconst parsedQuery = parseQuery(soql);\n\n// Results of Parsed Query:\n // const parsedQuery = {\n // fields: [\n // {\n // type: 'Field',\n // field: 'Id',\n // },\n // ],\n // sObject: 'Account',\n // where: {\n // left: {\n // field: 'Name',\n // operator: '=',\n // value: \"'Foo'\",\n // literalType: 'STRING',\n // },\n // },\n // };\n\n // Create a new instance of the compose class and set the autoCompose to false to avoid composing the entire query\n const composer = new Compose(parsedQuery, { autoCompose: false });\n\n\n const whereClause = composer.parseWhereOrHavingClause(parsedQuery.where);\n\n console.log(whereClause);\n}\n"})}),(0,t.jsxs)(n.h4,{id:"available-methods-on-the-compose-class",children:["Available methods on the ",(0,t.jsx)(n.code,{children:"Compose"})," class"]}),(0,t.jsx)(n.p,{children:"These are used internally, but are public and available for use."}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",children:"parseQuery(query: Query | Subquery): string;\nparseFields(fields: FieldType[]): { text: string; typeOfClause?: string[] }[];\nparseTypeOfField(typeOfField: FieldTypeOf): string[];\nparseWhereOrHavingClause(whereOrHaving: WhereClause | HavingClause, tabOffset = 0, priorConditionIsNegation = false): string;\nparseGroupByClause(groupBy: GroupByClause | GroupByClause[]): string;\nparseOrderBy(orderBy: OrderByClause | OrderByClause[]): string;\nparseWithDataCategory(withDataCategory: WithDataCategoryClause): string;\n"})})]}),"\n",(0,t.jsx)(n.h2,{id:"format-query",children:"Format Query"}),"\n",(0,t.jsxs)(n.p,{children:["This function is provided as a convenience and just calls parse and compose.\n",(0,t.jsx)(n.a,{href:"https://paustint.github.io/soql-parser-js/",children:"Check out the demo"})," to see the outcome of the various format options."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",children:"import { formatQuery } from '@jetstreamapp/soql-parser-js';\n\nconst query = `SELECT Id, Name, AccountNumber, AccountSource, AnnualRevenue, BillingAddress, BillingCity, BillingCountry, BillingGeocodeAccuracy, ShippingStreet, Sic, SicDesc, Site, SystemModstamp, TickerSymbol, Type, Website, (SELECT Id, Name, AccountId, Amount, CampaignId, CloseDate, CreatedById, Type FROM Opportunities), (SELECT Id, Name, AccountNumber, AccountSource, AnnualRevenue, BillingAddress, Website FROM ChildAccounts) FROM Account WHERE Name LIKE 'a%' OR Name LIKE 'b%' OR Name LIKE 'c%'`;\n\nconst formattedQuery1 = formatQuery(query);\nconst formattedQuery2 = formatQuery(query, {\n fieldMaxLineLength: 20,\n fieldSubqueryParensOnOwnLine: false,\n whereClauseOperatorsIndented: true,\n});\nconst formattedQuery3 = formatQuery(query, { fieldSubqueryParensOnOwnLine: true, whereClauseOperatorsIndented: true });\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sql",children:"-- formattedQuery1\nSELECT Id, Name, AccountNumber, AccountSource, AnnualRevenue,\n\tBillingAddress, BillingCity, BillingCountry, BillingGeocodeAccuracy,\n\tShippingStreet, Sic, SicDesc, Site, SystemModstamp, TickerSymbol, Type,\n\tWebsite,\n\t(\n\t\tSELECT Id, Name, AccountId, Amount, CampaignId, CloseDate,\n\t\t\tCreatedById, Type\n\t\tFROM Opportunities\n\t),\n\t(\n\t\tSELECT Id, Name, AccountNumber, AccountSource, AnnualRevenue,\n\t\t\tBillingAddress, Website\n\t\tFROM ChildAccounts\n\t)\nFROM Account\nWHERE Name LIKE 'a%'\nOR Name LIKE 'b%'\nOR Name LIKE 'c%'\n\n-- formattedQuery2\nSELECT Id, Name,\n\tAccountNumber, AccountSource,\n\tAnnualRevenue, BillingAddress,\n\tBillingCity, BillingCountry,\n\tBillingGeocodeAccuracy, ShippingStreet,\n\tSic, SicDesc, Site,\n\tSystemModstamp, TickerSymbol, Type,\n\tWebsite,\n\t(SELECT Id, Name,\n\t\tAccountId, Amount, CampaignId,\n\t\tCloseDate, CreatedById, Type\n\tFROM Opportunities),\n\t(SELECT Id, Name,\n\t\tAccountNumber, AccountSource,\n\t\tAnnualRevenue, BillingAddress,\n\t\tWebsite\n\tFROM ChildAccounts)\nFROM Account\nWHERE Name LIKE 'a%'\n\tOR Name LIKE 'b%'\n\tOR Name LIKE 'c%'\n\n\n-- formattedQuery3\nSELECT Id, Name, AccountNumber, AccountSource, AnnualRevenue,\n\tBillingAddress, BillingCity, BillingCountry, BillingGeocodeAccuracy,\n\tShippingStreet, Sic, SicDesc, Site, SystemModstamp, TickerSymbol, Type,\n\tWebsite,\n\t(\n\t\tSELECT Id, Name, AccountId, Amount, CampaignId, CloseDate,\n\t\t\tCreatedById, Type\n\t\tFROM Opportunities\n\t),\n\t(\n\t\tSELECT Id, Name, AccountNumber, AccountSource, AnnualRevenue,\n\t\t\tBillingAddress, Website\n\t\tFROM ChildAccounts\n\t)\nFROM Account\nWHERE Name LIKE 'a%'\n\tOR Name LIKE 'b%'\n\tOR Name LIKE 'c%'\n"})})]})}function u(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},1151:(e,n,r)=>{r.d(n,{Z:()=>a,a:()=>i});var t=r(7294);const s={},o=t.createContext(s);function i(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/0ce74438.339dfbce.js b/assets/js/0ce74438.339dfbce.js
new file mode 100644
index 0000000..39a8233
--- /dev/null
+++ b/assets/js/0ce74438.339dfbce.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[342],{977:(e,t,a)=>{a.d(t,{y:()=>o});var n=a(2573),i=a(2949),l=a(5893);function o(e){let{code:t,language:a,classNames:o={}}=e;const{colorMode:E}=(0,i.I)(),s="light"===E?n.np.github:n.np.shadesOfPurple;return(0,l.jsx)(n.y$,{theme:s,code:t,language:a,children:e=>{let{style:t,tokens:a,getLineProps:n,getTokenProps:i}=e;return(0,l.jsx)("pre",{className:o?.pre,style:{...t,margin:0},children:a.map(((e,t)=>(0,l.jsx)("div",{...n({line:e}),children:e.map(((e,t)=>(0,l.jsx)("span",{...i({token:e})},t)))},t)))})}})}},791:(e,t,a)=>{a.r(t),a.d(t,{default:()=>B});var n=a(512),i=a(7294),l=a(1867),o=a(977),E=a(5893);function s(e){let{query:t}=e;return(0,E.jsx)("div",{className:"",children:t&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{className:"label",children:"Output"}),(0,E.jsx)(o.y,{code:t,language:"sql"})]})})}const c={textarea:"textarea_hv9b"};function r(e){let{queryObj:t,onChange:a}=e;return(0,E.jsx)("div",{children:(0,E.jsxs)("label",{className:"label",children:["Query Object",(0,E.jsx)("textarea",{className:c.textarea,value:t,onChange:e=>a(e.target.value)})]})})}function u(e){let{selectedQuery:t}=e;const[a,o]=(0,i.useState)(!0),[c,u]=(0,i.useState)(1),[d,O]=(0,i.useState)(60),[N,C]=(0,i.useState)(!0),[R,T]=(0,i.useState)(!1),[S,L]=(0,i.useState)(""),[I,m]=(0,i.useState)("");return(0,i.useEffect)((()=>{try{L(JSON.stringify((0,l.mB)(t,{allowApexBindVariables:!0}),null,2))}catch(e){L("{\n}")}}),[t]),(0,i.useEffect)((()=>{try{S&&m((0,l.IC)(JSON.parse(S),{format:a,formatOptions:{fieldMaxLineLength:d,fieldSubqueryParensOnOwnLine:N,newLineAfterKeywords:R,numIndent:c}}))}catch(e){}}),[S,a,c,d,N,R]),(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(r,{queryObj:S,onChange:function(e){L(e)}}),(0,E.jsxs)("fieldset",{children:[(0,E.jsx)("legend",{className:"label",children:"Parse Options"}),(0,E.jsx)("div",{children:(0,E.jsxs)("label",{title:"Set this to true to apply formatting to the parsed query",children:[(0,E.jsx)("input",{type:"checkbox",checked:a,onChange:e=>o(e.target.checked)}),"formatQuery"]})}),(0,E.jsx)("div",{children:(0,E.jsxs)("label",{className:(0,n.Z)({disabled:!a}),title:"The number of tab characters to indent.",children:["numIndent",(0,E.jsx)("input",{disabled:!a,type:"number",min:0,value:c,onChange:e=>u(Number(e.target.value??0))})]})}),(0,E.jsx)("div",{children:(0,E.jsxs)("label",{className:(0,n.Z)({disabled:!a}),title:"The number of characters that the fields should take up before making a new line. Set this to 1 or 0 to have every field on its own line.",children:["fieldMaxLineLength",(0,E.jsx)("input",{disabled:!a,type:"number",min:0,value:d,onChange:e=>O(Number(e.target.value??0))})]})}),(0,E.jsx)("div",{children:(0,E.jsxs)("label",{className:(0,n.Z)({disabled:!a}),title:"If true, the opening and closing parentheses will be on their own line for subqueries.",children:[(0,E.jsx)("input",{disabled:!a,type:"checkbox",checked:N,onChange:e=>C(e.target.checked)}),"fieldSubqueryParensOnOwnLine"]})}),(0,E.jsx)("div",{children:(0,E.jsxs)("label",{className:(0,n.Z)({disabled:!a}),title:"Adds a new line and indent after all keywords (such as SELECT, FROM, WHERE, ORDER BY, etc..) Setting this to true will add new lines in other places as well, such as complex WHERE clauses.",children:[(0,E.jsx)("input",{disabled:!a,type:"checkbox",checked:R,onChange:e=>T(e.target.checked)}),"newLineAfterKeywords"]})})]}),(0,E.jsx)(s,{query:I})]})}function d(e){let{query:t}=e;const[a,n]=(0,i.useState)(!0),[s,c]=(0,i.useState)(!1),[r,u]=(0,i.useState)(!0),[d,O]=(0,i.useState)(null),[N,C]=(0,i.useState)(null);(0,i.useEffect)((()=>{try{t&&O((0,l.mB)(t,{allowPartialQuery:a,ignoreParseErrors:s,allowApexBindVariables:r}))}catch(e){O(null),C(e.message)}}),[t,a,s,r]);const R=d?JSON.stringify(d,null,2):N;return(0,E.jsxs)("div",{className:"",children:[(0,E.jsxs)("fieldset",{children:[(0,E.jsx)("legend",{className:"label",children:"Parse Options"}),(0,E.jsx)("div",{children:(0,E.jsxs)("label",{title:"Determines if apex variables are allowed in parsed query. Example: `WHERE Id IN :accountIds`. Only simple Apex is supported. Function calls are not supported. (e.x. `accountMap.keyset()` is not supported)",children:[(0,E.jsx)("input",{type:"checkbox",checked:r,onChange:e=>u(e.target.checked)}),"allowApexBindVariables"]})}),(0,E.jsx)("div",{children:(0,E.jsxs)("label",{title:"If provided, you can provide an incomplete soql query. This is useful if you need to parse WHERE clauses, for example. Subqueries are required to be valid.",children:[(0,E.jsx)("input",{type:"checkbox",checked:a,onChange:e=>n(e.target.checked)}),"allowPartialQuery"]})}),(0,E.jsx)("div",{children:(0,E.jsxs)("label",{title:"If set to true, then queries with partially invalid syntax will still be parsed, but any clauses with invalid parts will be omitted. The SELECT clause and FROM clause must always be valid, but all other clauses can contain invalid parts.",children:[(0,E.jsx)("input",{type:"checkbox",checked:s,onChange:e=>c(e.target.checked)}),"ignoreParseErrors"]})})]}),(d||N)&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{className:"label",children:"Output"}),(0,E.jsx)(o.y,{code:R,language:"json"})]})]})}const O={textarea:"textarea_MD8h"};function N(e){let{soql:t,onChange:a}=e;return(0,E.jsx)("div",{children:(0,E.jsxs)("label",{className:"label",children:["SOQL Query",(0,E.jsx)("textarea",{className:O.textarea,value:t,onChange:e=>a(e.target.value)})]})})}function C(e){let{selectedQuery:t}=e;const[a,n]=(0,i.useState)(t);return(0,i.useEffect)((()=>{n(t)}),[t]),(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(N,{soql:a,onChange:function(e){n(e)}}),(0,E.jsx)(d,{query:a})]})}const R={container:"container_f1_9",collapsed:"collapsed_m3ao",collapseIcon:"collapseIcon_fTmE",list:"list_VMDG",listItem:"listItem_WVMh",selected:"selected_LEl_"},T=JSON.parse('["SELECT Id, Name, BillingCity FROM Account","SELECT Id FROM Contact WHERE Name LIKE \'A%\' AND MailingCity = \'California\'","SELECT Name FROM Account ORDER BY Name DESC NULLS LAST","SELECT Name FROM Account WHERE Industry = \'media\' LIMIT 125","SELECT Name FROM Account WHERE Industry = \'media\' ORDER BY BillingPostalCode ASC NULLS LAST LIMIT 125","SELECT COUNT() FROM Contact","SELECT LeadSource, COUNT(Name) FROM Lead GROUP BY LeadSource","SELECT Name, COUNT(Id) FROM Account GROUP BY Name HAVING COUNT(Id) > 1","SELECT Name, Id FROM Merchandise__c ORDER BY Name OFFSET 100","SELECT Name, Id FROM Merchandise__c ORDER BY Name LIMIT 20 OFFSET 100","SELECT Contact.FirstName, Contact.Account.Name FROM Contact","SELECT Id, Name, Account.Name FROM Contact WHERE Account.Industry = \'media\'","SELECT Name, (SELECT LastName FROM Contacts) FROM Account","SELECT Account.Name, (SELECT Contact.LastName FROM Account.Contacts) FROM Account","SELECT Name, (SELECT LastName FROM Contacts WHERE CreatedBy.Alias=\'x\') FROM Account WHERE Industry=\'media\'","SELECT Id, FirstName__c, Mother_of_Child__r.FirstName__c FROM Daughter__c WHERE Mother_of_Child__r.LastName__c LIKE \'C%\'","SELECT Name, (SELECT Name FROM Line_Items__r) FROM Merchandise__c WHERE Name LIKE \'Acme%\'","SELECT Id, Owner.Name FROM Task WHERE Owner.FirstName LIKE \'B%\'","SELECT Id, Who.FirstName, Who.LastName FROM Task WHERE Owner.FirstName LIKE \'B%\'","SELECT Id, What.Name FROM Event","SELECT TYPEOF What WHEN Account THEN Phone, NumberOfEmployees WHEN Opportunity THEN Amount, CloseDate ELSE Name, Email END FROM Event","SELECT Name, (SELECT CreatedBy.Name FROM Notes) FROM Account","SELECT Amount, Id, Name, (SELECT Quantity, ListPrice, PricebookEntry.UnitPrice, PricebookEntry.Name FROM OpportunityLineItems) FROM Opportunity","SELECT UserId, LoginTime FROM LoginHistory","SELECT UserId, COUNT(Id) FROM LoginHistory WHERE LoginTime > 2010-09-20T22:16:30.000Z AND LoginTime < 2010-09-21 GROUP BY UserId","SELECT Id, Name, IsActive, SobjectType, DeveloperName, Description FROM RecordType","SELECT CampaignId, AVG(Amount) avg FROM Opportunity GROUP BY CampaignId HAVING COUNT(Id, Name) > 1","SELECT LeadSource, COUNT(Name) cnt FROM Lead GROUP BY ROLLUP(LeadSource)","SELECT Status, LeadSource, COUNT(Name) cnt FROM Lead GROUP BY ROLLUP(Status, LeadSource)","SELECT Type, BillingCountry, GROUPING(Type)grpType, GROUPING(BillingCountry) grpCty, COUNT(id) accts FROM Account GROUP BY CUBE(Type,BillingCountry) ORDER BY GROUPING(Type), GROUPING(Id,BillingCountry), Name DESC NULLS FIRST, Id ASC NULLS LAST","SELECT c.Name, c.Account.Name FROM Contact c","SELECT Id FROM Account WHERE (Id IN (\'1\', \'2\', \'3\') OR (NOT Id = \'2\') OR (Name LIKE \'%FOO%\' OR (Name LIKE \'%ARM%\' AND FOO = \'bar\')))","SELECT LeadSource, COUNT(Name) FROM Lead GROUP BY LeadSource HAVING COUNT(Name) > 100 AND LeadSource > \'Phone\'","SELECT a.Id, a.Name, (SELECT a2.Id FROM ChildAccounts a2), (SELECT a1.Id FROM ChildAccounts1 a1) FROM Account a","SELECT Title FROM KnowledgeArticleVersion WHERE PublishStatus = \'online\' WITH DATA CATEGORY Geography__c ABOVE usa__c","SELECT Title FROM Question WHERE LastReplyDate > 2005-10-08T01:02:03Z WITH DATA CATEGORY Geography__c AT (usa__c, uk__c)","SELECT UrlName FROM KnowledgeArticleVersion WHERE PublishStatus = \'draft\' WITH DATA CATEGORY Geography__c AT usa__c AND Product__c ABOVE_OR_BELOW mobile_phones__c","SELECT Id FROM Contact FOR VIEW","SELECT Id FROM Contact FOR REFERENCE","SELECT Id FROM Contact FOR UPDATE","SELECT Id FROM FAQ__kav FOR UPDATE","SELECT Id FROM FAQ__kav FOR VIEW UPDATE TRACKING","SELECT Id FROM FAQ__kav UPDATE VIEWSTAT","SELECT amount, FORMAT(amount) Amt, convertCurrency(amount) editDate, FORMAT(convertCurrency(amount)) convertedCurrency FROM Opportunity WHERE id = \'12345\'","SELECT FORMAT(MIN(closedate)) Amt FROM Opportunity","SELECT Company, toLabel(Status) FROM Lead WHERE toLabel(Status) = \'le Draft\'","SELECT Id, Name FROM Account WHERE Id IN (SELECT AccountId FROM Opportunity WHERE StageName = \'Closed Lost\')","SELECT Id FROM Account WHERE Id NOT IN (SELECT AccountId FROM Opportunity WHERE IsClosed = TRUE)","SELECT Id, Name FROM Account WHERE Id IN (SELECT AccountId FROM Contact WHERE LastName LIKE \'apple%\') AND Id IN (SELECT AccountId FROM Opportunity WHERE isClosed = FALSE)","SELECT Account.Name, (SELECT Contact.LastName FROM Account.Contact.Foo.Bars) FROM Account","SELECT LeadSource, COUNT(Name)cnt FROM Lead","SELECT Id, Name FROM Account WHERE Name != \'foo\'","SELECT Id FROM Account WHERE Foo IN (\'1\', \'2\', \'3\') OR Bar IN (1, 2, 3) OR Baz IN (101.00, 102.50) OR Bam IN (\'FOO\', null)","SELECT Id, Name FROM Account WHERE CreatedDate > LAST_N_YEARS:1 AND LastModifiedDate > LAST_MONTH","SELECT Id, CreatedById, CreatedDate, DefType, IsDeleted, Format, LastModifiedById, LastModifiedDate, AuraDefinitionBundleId, ManageableState, Source, SystemModstamp FROM AuraDefinition","SELECT Id, Name, BillingCity FROM Account WITH SECURITY_ENFORCED","SELECT Title FROM KnowledgeArticleVersion WHERE PublishStatus = \'online\' WITH DATA CATEGORY Geography__c ABOVE usa__c WITH SECURITY_ENFORCED","SELECT Id FROM Account WHERE (((Name = \'1\' OR Name = \'2\') AND Name = \'3\')) AND (((Description = \'123\') OR (Id = \'1\' AND Id = \'2\'))) AND Id = \'1\'","SELECT TYPEOF What WHEN Account THEN Phone, NumberOfEmployees WHEN Opportunity THEN Amount, CloseDate END FROM Event","SELECT Name FROM Account WHERE CreatedById IN (SELECT TYPEOF Owner WHEN User THEN Id WHEN Group THEN CreatedById END FROM CASE)","SELECT Name FROM Account OFFSET 1","SELECT Name FROM Account WHERE Id = :foo","SELECT Name FROM Account WHERE Industry IN (\'media\', null, 1, \'media\', 2) LIMIT 125","SELECT Name FROM Account WHERE Foo = NULL","SELECT Name FROM Account WHERE Foo = TODAY","SELECT Name FROM Account WHERE Foo = LAST_N_YEARS:1","SELECT Name FROM Account WHERE Foo = 2010-09-20T22:16:30.000Z","SELECT Name FROM Account WHERE Foo = 1","SELECT Name FROM Account WHERE Foo = TRUE AND bar = FALSE","SELECT CALENDAR_YEAR(CreatedDate) calYear, SUM(Amount) mySum FROM Opportunity GROUP BY CALENDAR_YEAR(CreatedDate)","SELECT CALENDAR_YEAR(convertTimezone(CreatedDate)) calYear, SUM(Amount) mySum FROM Opportunity GROUP BY CALENDAR_YEAR(convertTimezone(CreatedDate))","SELECT COUNT_DISTINCT(Company) distinct FROM Lead","SELECT Name, toLabel(Recordtype.Name) FROM Account","SELECT Id, MSP1__c FROM CustObj__c WHERE MSP1__c INCLUDES (\'AAA;BBB\', \'CCC\')","SELECT Id FROM Account WHERE CreatedDate > LAST_N_FISCAL_QUARTERS:6","SELECT Id FROM Opportunity WHERE CloseDate < NEXT_N_FISCAL_YEARS:3","SELECT Id FROM Opportunity WHERE CloseDate > LAST_N_FISCAL_YEARS:3","SELECT Id, Title FROM Dashboard USING SCOPE allPrivate WHERE Type != \'SpecifiedUser\'","SELECT LeadSource, Rating, GROUPING(LeadSource) grpLS, GROUPING(Rating) grpRating, COUNT(Name) cnt FROM Lead GROUP BY ROLLUP(LeadSource, Rating)","SELECT Type, BillingCountry, GROUPING(Type) grpType, GROUPING(BillingCountry) grpCty, COUNT(id) accts FROM Account GROUP BY CUBE(Type, BillingCountry) ORDER BY GROUPING(Type), GROUPING(BillingCountry)","SELECT HOUR_IN_DAY(convertTimezone(CreatedDate)), SUM(Amount) FROM Opportunity GROUP BY HOUR_IN_DAY(convertTimezone(CreatedDate))","SELECT Id FROM Opportunity WHERE Amount > USD5000","SELECT Id FROM Opportunity WHERE Amount > USD5000.01","SELECT Id, Amount FROM Opportunity WHERE Amount IN (usd500.01, usd600)","SELECT Name, COUNT(Id) FROM Account GROUP BY Name HAVING COUNT(Id) > 0 AND (Name LIKE \'%testing%\' OR Name LIKE \'%123%\')","SELECT Name, COUNT(Id) FROM Account GROUP BY Name HAVING COUNT(Id) > 0 AND (Name IN (\'4/30 testing account\', \'amendment quote doc testing\', null))","SELECT Name, COUNT(Id) FROM Account GROUP BY Name HAVING COUNT(Id) > 0 AND (NOT Name IN (\'4/30 testing account\', \'amendment quote doc testing\'))","SELECT Name, Location__c FROM Warehouse__c WHERE DISTANCE(Location__c, GEOLOCATION(37.775, -122.418), \'mi\') < 20","SELECT Name, StreetAddress__c FROM Warehouse__c WHERE DISTANCE(Location__c, GEOLOCATION(37.775, -122.418), \'mi\') < 20 ORDER BY DISTANCE(Location__c, GEOLOCATION(37.775, -122.418), \'mi\') DESC LIMIT 10","SELECT Id, Name, Location, DISTANCE(Location, GEOLOCATION(10, 10), \'mi\') FROM CONTACT","SELECT BillingState, BillingStreet, COUNT(Id) FROM Account GROUP BY BillingState, BillingStreet","SELECT Id, Name, Location__c, DISTANCE(Location__c, GEOLOCATION(-10.775, -10.775), \'MI\') FROM CONTACT","SELECT Id FROM Account WHERE CreatedDate IN (TODAY)","SELECT Id FROM Account WHERE CreatedDate IN (TODAY)","SELECT Id FROM Account WHERE CreatedDate IN (TODAY, LAST_N_DAYS:4)","SELECT Id FROM Account WHERE CreatedDate IN (LAST_N_DAYS:2)","SELECT Id FROM Account WHERE CreatedDate IN (LAST_N_DAYS:4, LAST_N_DAYS:7)","SELECT SBQQ__Product__r.Name foo, SBQQ__Quote__c foo1 FROM SBQQ__Quoteline__c GROUP BY SBQQ__Quote__c, SBQQ__Product__r.Name","SELECT Id, convertCurrency(Amount) FROM Opportunity WHERE Amount > 0 AND CALENDAR_YEAR(CloseDate) = 2020","SELECT Id FROM LoginHistory WHERE LoginTime > 2020-04-23T09:00:00.00000000000000000000000000000000+00:00 AND LoginTime < 2020-04-15T02:40:03.000+0000","SELECT ProductCode FROM Product2 GROUP BY ProductCode HAVING COUNT(Id) > 1 ORDER BY COUNT(Id) DESC","SELECT AnnualRevenue FROM Account WHERE NOT (AnnualRevenue > 0 AND AnnualRevenue < 200000)","SELECT AnnualRevenue FROM Account WHERE ((NOT AnnualRevenue > 0) AND AnnualRevenue < 200000)","SELECT Id FROM Account WHERE NOT Id = \'2\'","SELECT WEEK_IN_YEAR(CloseDate), SUM(amount) FROM Opportunity GROUP BY WEEK_IN_YEAR(CloseDate) ORDER BY WEEK_IN_YEAR(CloseDate)","SELECT WEEK_IN_YEAR(CloseDate), SUM(amount) FROM Opportunity GROUP BY WEEK_IN_YEAR(CloseDate) ORDER BY WEEK_IN_YEAR(CloseDate) DESC NULLS FIRST","SELECT WEEK_IN_YEAR(CloseDate), SUM(amount) FROM Opportunity GROUP BY WEEK_IN_YEAR(CloseDate) ORDER BY WEEK_IN_YEAR(CloseDate) DESC NULLS LAST, SUM(amount) ASC NULLS LAST","SELECT FIELDS(ALL) FROM Account","SELECT FIELDS(CUSTOM), FIELDS(STANDARD) FROM Account","SELECT Id, (SELECT FIELDS(ALL) FROM Contacts) FROM Account","SELECT UserId, CALENDAR_MONTH(LoginTime) month FROM LoginHistory WHERE NetworkId != NULL GROUP BY UserId, CALENDAR_MONTH(LoginTime)","SELECT Id, (SELECT Id FROM Contacts WHERE Id IN :contactMap.keySet()) FROM Account WHERE Id IN :accountMap.keySet()","SELECT Id, (SELECT Id FROM Contacts WHERE Id IN :contact_900Map.keySet()) FROM Account WHERE Id IN :acco INVALID untMap.keySet()","SELECT Id FROM Account WHERE Id IN :new Map(someVar).keySet()","SELECT Id FROM Account WHERE Id IN :new Map(someVar).getSomeClass().records","SELECT Id FROM SBQQ__QuoteTerm__c WHERE SBQQ__StandardTerm__c = :CPQ_Hard_Coded_Ids__c.getInstance().Standard_Quote_Term_Id__c","SELECT Id FROM Opportunity WHERE SBQQ__StandardTerm__c = :quotes[3].SBQQ__QuoteLine__r[0].Term__c","SELECT Name FROM Account WHERE Name IN (\'GenePoint\\\\\'s \\\\n Ok!?!@#$^%$&*()_+\')","SELECT State_Abbr_c FROM Contact WHERE State_Abbr_c = \'MI\' OR State_Abbr_c = \'km\'","SELECT State_Abbr_c FROM Contact WHERE State_Abbr_c = \'KM\'","SELECT State_Abbr_c FROM Contact WHERE State_Abbr_c IN (\'mi\', \'KM\')","SELECT LeadSource, COUNT(Name) FROM Lead GROUP BY LeadSource HAVING COUNT(Name) > 100 AND LeadSource > \'km\'","SELECT Id FROM Account WITH USER_MODE","SELECT Id FROM Account WITH SYSTEM_MODE","SELECT Id, BillingCity FROM Account WHERE NOT (NOT BillingCity LIKE \'%123%\')","SELECT Id FROM Account WHERE NOT (NOT Invoice_Type__c LIKE \'%Usage%\')","SELECT Id FROM Account WHERE (NOT Invoice_Type__c LIKE \'%Usage%\')","SELECT Id, City FROM Lead WHERE NOT ((NOT (City LIKE \'%LHR%\')) AND City LIKE \'%KHR%\')"]');function S(e){let{isOpen:t=!0,selected:a,onSelected:i,onToggleOpen:l}=e;return(0,E.jsxs)("div",{className:(0,n.Z)(R.container,{[R.collapsed]:!t}),children:[(0,E.jsx)("button",{className:R.collapseIcon,onClick:l,title:"Toggle sidebar",children:t?"<":">"}),t&&(0,E.jsx)("ul",{className:R.list,children:T.map(((e,t)=>(0,E.jsx)("li",{className:(0,n.Z)(R.listItem,{[R.selected]:a===e}),onClick:()=>i(e),children:(0,E.jsx)(o.y,{code:e,language:"sql",classNames:{pre:"wrap-text"}})},e+t)))})]})}function L(e){let{initialTab:t,className:a,tabs:l=[]}=e;const[o,s]=(0,i.useState)(t||l[0]?.id);return(0,E.jsxs)("div",{children:[(0,E.jsx)("ul",{className:"tabs tabs--block",children:l.map((e=>{let{id:t,label:a}=e;return(0,E.jsx)("li",{className:(0,n.Z)("tabs__item",{"tabs__item--active":t===o}),onClick:()=>s(t),children:a},t)}))}),(0,E.jsx)("div",{className:a,children:l.find((e=>{let{id:t}=e;return t===o}))?.content})]})}var I=a(6040);const m={fields:[{type:"Field",field:"Id"},{type:"Field",field:"Name"},{type:"FieldRelationship",field:"Name",relationships:["Account"],rawValue:"Account.Name"}],sObject:"Contact"},A={type:"FieldFunctionExpression",functionName:"FORMAT",parameters:[{type:"FieldFunctionExpression",functionName:"MIN",parameters:["closedate"],isAggregateFn:!0,rawValue:"MIN(closedate)"}],rawValue:"FORMAT(MIN(closedate))",alias:"Amt"},p={fields:[{type:"Field",field:"Name"}],relationshipName:"Line_Items__r"},F={type:"FieldSubquery",subquery:p},_={left:{field:"LoginTime",operator:">",value:"2010-09-20T22:16:30.000Z",literalType:"DATETIME"},operator:"AND",right:{left:{field:"LoginTime",operator:"<",value:"2010-09-21",literalType:"DATE"}}},y={left:{fn:{functionName:"COUNT",parameters:["Id"],rawValue:"COUNT(Id)"},operator:">",value:"1",literalType:"INTEGER"}},M={field:"Amount",operator:"IN",value:["usd500.01","usd600"],literalType:["DECIMAL_WITH_CURRENCY_PREFIX","INTEGER_WITH_CURRENCY_PREFIX"]},g={field:"CreatedDate",operator:"IN",value:["TODAY"],literalType:"DATE_LITERAL"},h={field:"CreatedDate",operator:"IN",value:["LAST_N_DAYS:2"],literalType:"DATE_N_LITERAL",dateLiteralVariable:[2]},f={fn:{functionName:"DISTANCE",parameters:["Location__c",{functionName:"GEOLOCATION",parameters:["37.775","-122.418"],rawValue:"GEOLOCATION(37.775, -122.418)"},"'mi'"],rawValue:"DISTANCE(Location__c, GEOLOCATION(37.775, -122.418), 'mi')"},operator:"<",value:"20",literalType:"INTEGER"},D={field:"CreatedById",operator:"IN",valueQuery:{fields:[{type:"FieldTypeof",field:"Owner",conditions:[{type:"WHEN",objectType:"User",fieldList:["Id"]},{type:"WHEN",objectType:"Group",fieldList:["CreatedById"]}]}],sObject:"CASE"}},b={field:"Name",order:"DESC",nulls:"LAST"},W={fn:{functionName:"COUNT",parameters:["Id"],rawValue:"COUNT(Id)"},order:"DESC"},H={field:"LeadSource"},v={fn:{functionName:"CUBE",parameters:["Type","BillingCountry"],rawValue:"CUBE(Type, BillingCountry)"}},U=[{label:"hasAlias(value)",input:`hasAlias(${JSON.stringify(A,null,2)});`,output:JSON.stringify((0,l.nu)(A),null,2)||"false"},{label:"getField(value)",input:"getField(Name);",output:JSON.stringify((0,l.rz)("Name"),null,2)||"false"},{label:"getFlattenedFields(value)",input:`getFlattenedFields(${JSON.stringify(m,null,2)});`,output:JSON.stringify((0,l.dV)(m),null,2)||"false"},{label:"isSubquery(value)",input:`isSubquery(${JSON.stringify(p,null,2)});`,output:JSON.stringify((0,l.tJ)(p),null,2)||"false"},{label:"isFieldSubquery(value)",input:`isFieldSubquery(${JSON.stringify(F,null,2)});`,output:JSON.stringify((0,l.OV)(F),null,2)||"false"},{label:"isWhereClauseWithRightCondition(value)",input:`isWhereClauseWithRightCondition(${JSON.stringify(_,null,2)});`,output:JSON.stringify((0,l.g3)(_),null,2)||"false"},{label:"isHavingClauseWithRightCondition(value)",input:`isHavingClauseWithRightCondition(${JSON.stringify(y,null,2)});`,output:JSON.stringify((0,l.xL)(y),null,2)||"false"},{label:"isWhereOrHavingClauseWithRightCondition(value)",input:`isWhereOrHavingClauseWithRightCondition(${JSON.stringify(_,null,2)});`,output:JSON.stringify((0,l.Y3)(_),null,2)||"false"},{label:"isValueCondition(value)",input:`isValueCondition(${JSON.stringify(M,null,2)});`,output:JSON.stringify((0,l.v$)(M),null,2)||"false"},{label:"isValueWithDateLiteralCondition(value)",input:`isValueWithDateLiteralCondition(${JSON.stringify(g,null,2)});`,output:JSON.stringify((0,l.Ti)(g),null,2)||"false"},{label:"isValueWithDateNLiteralCondition(value)",input:`isValueWithDateNLiteralCondition(${JSON.stringify(h,null,2)});`,output:JSON.stringify((0,l.fS)(h),null,2)||"false"},{label:"isValueFunctionCondition(value)",input:`isValueFunctionCondition(${JSON.stringify(f,null,2)});`,output:JSON.stringify((0,l.pH)(f),null,2)||"false"},{label:"isNegationCondition(value)",input:"TODO",output:"TODO"},{label:"isValueQueryCondition(value)",input:`isValueQueryCondition(${JSON.stringify(D,null,2)});`,output:JSON.stringify((0,l.CL)(D),null,2)||"false"},{label:"isOrderByField(value)",input:`isOrderByField(${JSON.stringify(b,null,2)});`,output:JSON.stringify((0,l.Jp)(b),null,2)||"false"},{label:"isOrderByFn(value)",input:`isOrderByFn(${JSON.stringify(W,null,2)});`,output:JSON.stringify((0,l.tk)(W),null,2)||"false"},{label:"isGroupByField(value)",input:`isGroupByField(${JSON.stringify(H,null,2)});`,output:JSON.stringify((0,l.sC)(H),null,2)||"false"},{label:"isGroupByFn(value)",input:`isGroupByFn(${JSON.stringify(v,null,2)});`,output:JSON.stringify((0,l.vf)(v),null,2)||"false"}];function x(e){let{}=e;return(0,E.jsx)(E.Fragment,{children:U.map((e=>(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"label label--large",children:e.label}),(0,E.jsxs)("div",{className:"row",children:[(0,E.jsxs)("div",{className:"col col--6",children:[(0,E.jsx)("div",{children:"Input"}),(0,E.jsx)(o.y,{code:e.input,language:"javascript"})]}),(0,E.jsxs)("div",{className:"col col--6",children:[(0,E.jsx)("div",{children:"Output"}),(0,E.jsx)(o.y,{code:e.output,language:"javascript"})]})]})]},e.label)))})}function B(){const[e,t]=(0,i.useState)("SELECT Id, Name, BillingCity FROM Account"),[a,l]=(0,i.useState)("SELECT Id, Name, BillingCity FROM Account"),[o,s]=(0,i.useState)(!0);function c(e){l(e),t(e)}function r(){s(!o)}return(0,E.jsx)(I.Z,{title:"Hello",description:"Hello React Page",noFooter:!0,children:(0,E.jsx)("div",{className:"container",children:(0,E.jsx)(L,{tabs:[{id:"parse",label:"Parse Queries",content:(0,E.jsxs)("div",{className:"row row--no-gutters",children:[(0,E.jsx)("div",{className:(0,n.Z)({col:o}),children:(0,E.jsx)(S,{isOpen:o,selected:a,onSelected:c,onToggleOpen:r})}),(0,E.jsx)("div",{className:"col",style:{overflow:"hidden"},children:(0,E.jsx)(C,{selectedQuery:a})})]})},{id:"compose",label:"Compose Queries",content:(0,E.jsxs)("div",{className:"row row--no-gutters",children:[(0,E.jsx)("div",{className:(0,n.Z)({col:o}),children:(0,E.jsx)(S,{isOpen:o,selected:a,onSelected:c,onToggleOpen:r})}),(0,E.jsx)("div",{className:"col",style:{overflow:"hidden"},children:(0,E.jsx)(u,{selectedQuery:a})})]})},{id:"utilities",label:"Utility Functions",content:(0,E.jsx)("div",{className:"row row--no-gutters",children:(0,E.jsx)("div",{className:"col",style:{overflow:"hidden"},children:(0,E.jsx)(x,{})})})}]})})})}}}]);
\ No newline at end of file
diff --git a/assets/js/17896441.1b812a84.js b/assets/js/17896441.1b812a84.js
new file mode 100644
index 0000000..8d779c6
--- /dev/null
+++ b/assets/js/17896441.1b812a84.js
@@ -0,0 +1 @@
+(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[918],{9762:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>qt});var s=n(7294),a=n(1944),o=n(902),i=n(5893);const l=s.createContext(null);function c(e){let{children:t,content:n}=e;const a=function(e){return(0,s.useMemo)((()=>({metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc})),[e])}(n);return(0,i.jsx)(l.Provider,{value:a,children:t})}function r(){const e=(0,s.useContext)(l);if(null===e)throw new o.i6("DocProvider");return e}function d(){const{metadata:e,frontMatter:t,assets:n}=r();return(0,i.jsx)(a.d,{title:e.title,description:e.description,keywords:t.keywords,image:n.image??t.image})}var u=n(512),m=n(7524),h=n(5999),p=n(3692);function f(e){const{permalink:t,title:n,subLabel:s,isNext:a}=e;return(0,i.jsxs)(p.Z,{className:(0,u.Z)("pagination-nav__link",a?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t,children:[s&&(0,i.jsx)("div",{className:"pagination-nav__sublabel",children:s}),(0,i.jsx)("div",{className:"pagination-nav__label",children:n})]})}function x(e){const{previous:t,next:n}=e;return(0,i.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,h.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[t&&(0,i.jsx)(f,{...t,subLabel:(0,i.jsx)(h.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),n&&(0,i.jsx)(f,{...n,subLabel:(0,i.jsx)(h.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}function b(){const{metadata:e}=r();return(0,i.jsx)(x,{previous:e.previous,next:e.next})}var g=n(2263),j=n(143),v=n(5281),N=n(373),C=n(4477);const k={unreleased:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,i.jsx)(h.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:(0,i.jsx)("b",{children:n.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,i.jsx)(h.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:(0,i.jsx)("b",{children:n.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function L(e){const t=k[e.versionMetadata.banner];return(0,i.jsx)(t,{...e})}function y(e){let{versionLabel:t,to:n,onClick:s}=e;return(0,i.jsx)(h.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:(0,i.jsx)("b",{children:(0,i.jsx)(p.Z,{to:n,onClick:s,children:(0,i.jsx)(h.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function _(e){let{className:t,versionMetadata:n}=e;const{siteConfig:{title:s}}=(0,g.Z)(),{pluginId:a}=(0,j.gA)({failfast:!0}),{savePreferredVersionName:o}=(0,N.J)(a),{latestDocSuggestion:l,latestVersionSuggestion:c}=(0,j.Jo)(a),r=l??(d=c).docs.find((e=>e.id===d.mainDocId));var d;return(0,i.jsxs)("div",{className:(0,u.Z)(t,v.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,i.jsx)("div",{children:(0,i.jsx)(L,{siteTitle:s,versionMetadata:n})}),(0,i.jsx)("div",{className:"margin-top--md",children:(0,i.jsx)(y,{versionLabel:c.label,to:r.path,onClick:()=>o(c.name)})})]})}function B(e){let{className:t}=e;const n=(0,C.E)();return n.banner?(0,i.jsx)(_,{className:t,versionMetadata:n}):null}function w(e){let{className:t}=e;const n=(0,C.E)();return n.badge?(0,i.jsx)("span",{className:(0,u.Z)(t,v.k.docs.docVersionBadge,"badge badge--secondary"),children:(0,i.jsx)(h.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label},children:"Version: {versionLabel}"})}):null}const Z={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function T(e){let{permalink:t,label:n,count:s,description:a}=e;return(0,i.jsxs)(p.Z,{href:t,title:a,className:(0,u.Z)(Z.tag,s?Z.tagWithCount:Z.tagRegular),children:[n,s&&(0,i.jsx)("span",{children:s})]})}const E={tags:"tags_jXut",tag:"tag_QGVx"};function H(e){let{tags:t}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("b",{children:(0,i.jsx)(h.Z,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,i.jsx)("ul",{className:(0,u.Z)(E.tags,"padding--none","margin-left--sm"),children:t.map((e=>(0,i.jsx)("li",{className:E.tag,children:(0,i.jsx)(T,{...e})},e.permalink)))})]})}const A={iconEdit:"iconEdit_Z9Sw"};function I(e){let{className:t,...n}=e;return(0,i.jsx)("svg",{fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,u.Z)(A.iconEdit,t),"aria-hidden":"true",...n,children:(0,i.jsx)("g",{children:(0,i.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})})}function M(e){let{editUrl:t}=e;return(0,i.jsxs)(p.Z,{to:t,className:v.k.common.editThisPage,children:[(0,i.jsx)(I,{}),(0,i.jsx)(h.Z,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}function S(e){void 0===e&&(e={});const{i18n:{currentLocale:t}}=(0,g.Z)(),n=function(){const{i18n:{currentLocale:e,localeConfigs:t}}=(0,g.Z)();return t[e].calendar}();return new Intl.DateTimeFormat(t,{calendar:n,...e})}function U(e){let{lastUpdatedAt:t}=e;const n=new Date(t),s=S({day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}).format(n);return(0,i.jsx)(h.Z,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,i.jsx)("b",{children:(0,i.jsx)("time",{dateTime:n.toISOString(),itemProp:"dateModified",children:s})})},children:" on {date}"})}function z(e){let{lastUpdatedBy:t}=e;return(0,i.jsx)(h.Z,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,i.jsx)("b",{children:t})},children:" by {user}"})}function V(e){let{lastUpdatedAt:t,lastUpdatedBy:n}=e;return(0,i.jsxs)("span",{className:v.k.common.lastUpdated,children:[(0,i.jsx)(h.Z,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t?(0,i.jsx)(U,{lastUpdatedAt:t}):"",byUser:n?(0,i.jsx)(z,{lastUpdatedBy:n}):""},children:"Last updated{atDate}{byUser}"}),!1]})}const R={lastUpdated:"lastUpdated_JAkA"};function P(e){let{className:t,editUrl:n,lastUpdatedAt:s,lastUpdatedBy:a}=e;return(0,i.jsxs)("div",{className:(0,u.Z)("row",t),children:[(0,i.jsx)("div",{className:"col",children:n&&(0,i.jsx)(M,{editUrl:n})}),(0,i.jsx)("div",{className:(0,u.Z)("col",R.lastUpdated),children:(s||a)&&(0,i.jsx)(V,{lastUpdatedAt:s,lastUpdatedBy:a})})]})}function O(){const{metadata:e}=r(),{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:s,tags:a}=e,o=a.length>0,l=!!(t||n||s);return o||l?(0,i.jsxs)("footer",{className:(0,u.Z)(v.k.docs.docFooter,"docusaurus-mt-lg"),children:[o&&(0,i.jsx)("div",{className:(0,u.Z)("row margin-top--sm",v.k.docs.docFooterTagsRow),children:(0,i.jsx)("div",{className:"col",children:(0,i.jsx)(H,{tags:a})})}),l&&(0,i.jsx)(P,{className:(0,u.Z)("margin-top--sm",v.k.docs.docFooterEditMetaRow),editUrl:t,lastUpdatedAt:n,lastUpdatedBy:s})]}):null}var D=n(6043),$=n(6668);function W(e){const t=e.map((e=>({...e,parentIndex:-1,children:[]}))),n=Array(7).fill(-1);t.forEach(((e,t)=>{const s=n.slice(2,e.level);e.parentIndex=Math.max(...s),n[e.level]=t}));const s=[];return t.forEach((e=>{const{parentIndex:n,...a}=e;n>=0?t[n].children.push(a):s.push(a)})),s}function F(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:s}=e;return t.flatMap((e=>{const t=F({toc:e.children,minHeadingLevel:n,maxHeadingLevel:s});return function(e){return e.level>=n&&e.level<=s}(e)?[{...e,children:t}]:t}))}function q(e){const t=e.getBoundingClientRect();return t.top===t.bottom?q(e.parentNode):t}function G(e,t){let{anchorTopOffset:n}=t;const s=e.find((e=>q(e).top>=n));if(s){return function(e){return e.top>0&&e.bottom{e.current=t?0:document.querySelector(".navbar").clientHeight}),[t]),e}function Y(e){const t=(0,s.useRef)(void 0),n=J();(0,s.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:s,linkActiveClassName:a,minHeadingLevel:o,maxHeadingLevel:i}=e;function l(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(s),l=function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e;const s=[];for(let a=t;a<=n;a+=1)s.push(`h${a}.anchor`);return Array.from(document.querySelectorAll(s.join()))}({minHeadingLevel:o,maxHeadingLevel:i}),c=G(l,{anchorTopOffset:n.current}),r=e.find((e=>c&&c.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e)));e.forEach((e=>{!function(e,n){n?(t.current&&t.current!==e&&t.current.classList.remove(a),e.classList.add(a),t.current=e):e.classList.remove(a)}(e,e===r)}))}return document.addEventListener("scroll",l),document.addEventListener("resize",l),l(),()=>{document.removeEventListener("scroll",l),document.removeEventListener("resize",l)}}),[e,n])}function Q(e){let{toc:t,className:n,linkClassName:s,isChild:a}=e;return t.length?(0,i.jsx)("ul",{className:a?void 0:n,children:t.map((e=>(0,i.jsxs)("li",{children:[(0,i.jsx)(p.Z,{to:`#${e.id}`,className:s??void 0,dangerouslySetInnerHTML:{__html:e.value}}),(0,i.jsx)(Q,{isChild:!0,toc:e.children,className:n,linkClassName:s})]},e.id)))}):null}const X=s.memo(Q);function K(e){let{toc:t,className:n="table-of-contents table-of-contents__left-border",linkClassName:a="table-of-contents__link",linkActiveClassName:o,minHeadingLevel:l,maxHeadingLevel:c,...r}=e;const d=(0,$.L)(),u=l??d.tableOfContents.minHeadingLevel,m=c??d.tableOfContents.maxHeadingLevel,h=function(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:a}=e;return(0,s.useMemo)((()=>F({toc:W(t),minHeadingLevel:n,maxHeadingLevel:a})),[t,n,a])}({toc:t,minHeadingLevel:u,maxHeadingLevel:m});return Y((0,s.useMemo)((()=>{if(a&&o)return{linkClassName:a,linkActiveClassName:o,minHeadingLevel:u,maxHeadingLevel:m}}),[a,o,u,m])),(0,i.jsx)(X,{toc:h,className:n,linkClassName:a,...r})}const ee={tocCollapsibleButton:"tocCollapsibleButton_TO0P",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_MG3E"};function te(e){let{collapsed:t,...n}=e;return(0,i.jsx)("button",{type:"button",...n,className:(0,u.Z)("clean-btn",ee.tocCollapsibleButton,!t&&ee.tocCollapsibleButtonExpanded,n.className),children:(0,i.jsx)(h.Z,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component",children:"On this page"})})}const ne={tocCollapsible:"tocCollapsible_ETCw",tocCollapsibleContent:"tocCollapsibleContent_vkbj",tocCollapsibleExpanded:"tocCollapsibleExpanded_sAul"};function se(e){let{toc:t,className:n,minHeadingLevel:s,maxHeadingLevel:a}=e;const{collapsed:o,toggleCollapsed:l}=(0,D.u)({initialState:!0});return(0,i.jsxs)("div",{className:(0,u.Z)(ne.tocCollapsible,!o&&ne.tocCollapsibleExpanded,n),children:[(0,i.jsx)(te,{collapsed:o,onClick:l}),(0,i.jsx)(D.z,{lazy:!0,className:ne.tocCollapsibleContent,collapsed:o,children:(0,i.jsx)(K,{toc:t,minHeadingLevel:s,maxHeadingLevel:a})})]})}const ae={tocMobile:"tocMobile_ITEo"};function oe(){const{toc:e,frontMatter:t}=r();return(0,i.jsx)(se,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:(0,u.Z)(v.k.docs.docTocMobile,ae.tocMobile)})}const ie={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"},le="table-of-contents__link toc-highlight",ce="table-of-contents__link--active";function re(e){let{className:t,...n}=e;return(0,i.jsx)("div",{className:(0,u.Z)(ie.tableOfContents,"thin-scrollbar",t),children:(0,i.jsx)(K,{...n,linkClassName:le,linkActiveClassName:ce})})}function de(){const{toc:e,frontMatter:t}=r();return(0,i.jsx)(re,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:v.k.docs.docTocDesktop})}var ue=n(2503),me=n(1151),he=n(5742),pe=n(2389),fe=n(2949);function xe(){const{prism:e}=(0,$.L)(),{colorMode:t}=(0,fe.I)(),n=e.theme,s=e.darkTheme||n;return"dark"===t?s:n}var be=n(7594),ge=n.n(be);const je=/title=(?["'])(?.*?)\1/,ve=/\{(?[\d,-]+)\}/,Ne={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},Ce={...Ne,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},ke=Object.keys(Ne);function Le(e,t){const n=e.map((e=>{const{start:n,end:s}=Ce[e];return`(?:${n}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${s})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function ye(e,t){let n=e.replace(/\n$/,"");const{language:s,magicComments:a,metastring:o}=t;if(o&&ve.test(o)){const e=o.match(ve).groups.range;if(0===a.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${o}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=a[0].className,s=ge()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(s),code:n}}if(void 0===s)return{lineClassNames:{},code:n};const i=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return Le(["js","jsBlock"],t);case"jsx":case"tsx":return Le(["js","jsBlock","jsx"],t);case"html":return Le(["js","jsBlock","html"],t);case"python":case"py":case"bash":return Le(["bash"],t);case"markdown":case"md":return Le(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return Le(["tex"],t);case"lua":case"haskell":case"sql":return Le(["lua"],t);case"wasm":return Le(["wasm"],t);case"vb":case"vba":case"visual-basic":return Le(["vb","rem"],t);case"vbnet":return Le(["vbnet","rem"],t);case"batch":return Le(["rem"],t);case"basic":return Le(["rem","f90"],t);case"fsharp":return Le(["js","ml"],t);case"ocaml":case"sml":return Le(["ml"],t);case"fortran":return Le(["f90"],t);case"cobol":return Le(["cobol"],t);default:return Le(ke,t)}}(s,a),l=n.split("\n"),c=Object.fromEntries(a.map((e=>[e.className,{start:0,range:""}]))),r=Object.fromEntries(a.filter((e=>e.line)).map((e=>{let{className:t,line:n}=e;return[n,t]}))),d=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.start,t]}))),u=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.end,t]})));for(let h=0;hvoid 0!==e));r[t]?c[r[t]].range+=`${h},`:d[t]?c[d[t]].start=h:u[t]&&(c[u[t]].range+=`${c[u[t]].start}-${h-1},`),l.splice(h,1)}n=l.join("\n");const m={};return Object.entries(c).forEach((e=>{let[t,{range:n}]=e;ge()(n).forEach((e=>{m[e]??=[],m[e].push(t)}))})),{lineClassNames:m,code:n}}const _e={codeBlockContainer:"codeBlockContainer_Ckt0"};function Be(e){let{as:t,...n}=e;const s=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((e=>{let[s,a]=e;const o=t[s];o&&"string"==typeof a&&(n[o]=a)})),n}(xe());return(0,i.jsx)(t,{...n,style:s,className:(0,u.Z)(n.className,_e.codeBlockContainer,v.k.common.codeBlock)})}const we={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function Ze(e){let{children:t,className:n}=e;return(0,i.jsx)(Be,{as:"pre",tabIndex:0,className:(0,u.Z)(we.codeBlockStandalone,"thin-scrollbar",n),children:(0,i.jsx)("code",{className:we.codeBlockLines,children:t})})}const Te={attributes:!0,characterData:!0,childList:!0,subtree:!0};function Ee(e,t){const[n,a]=(0,s.useState)(),i=(0,s.useCallback)((()=>{a(e.current?.closest("[role=tabpanel][hidden]"))}),[e,a]);(0,s.useEffect)((()=>{i()}),[i]),function(e,t,n){void 0===n&&(n=Te);const a=(0,o.zX)(t),i=(0,o.Ql)(n);(0,s.useEffect)((()=>{const t=new MutationObserver(a);return e&&t.observe(e,i),()=>t.disconnect()}),[e,a,i])}(n,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),i())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}var He=n(2573);const Ae={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function Ie(e){let{line:t,classNames:n,showLineNumbers:s,getLineProps:a,getTokenProps:o}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const l=a({line:t,className:(0,u.Z)(n,s&&Ae.codeLine)}),c=t.map(((e,t)=>(0,i.jsx)("span",{...o({token:e})},t)));return(0,i.jsxs)("span",{...l,children:[s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:Ae.codeLineNumber}),(0,i.jsx)("span",{className:Ae.codeLineContent,children:c})]}):c,(0,i.jsx)("br",{})]})}function Me(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function Se(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const Ue={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function ze(e){let{code:t,className:n}=e;const[a,o]=(0,s.useState)(!1),l=(0,s.useRef)(void 0),c=(0,s.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const s=document.createElement("textarea"),a=document.activeElement;s.value=e,s.setAttribute("readonly",""),s.style.contain="strict",s.style.position="absolute",s.style.left="-9999px",s.style.fontSize="12pt";const o=document.getSelection(),i=o.rangeCount>0&&o.getRangeAt(0);n.append(s),s.select(),s.selectionStart=0,s.selectionEnd=e.length;let l=!1;try{l=document.execCommand("copy")}catch{}s.remove(),i&&(o.removeAllRanges(),o.addRange(i)),a&&a.focus()}(t),o(!0),l.current=window.setTimeout((()=>{o(!1)}),1e3)}),[t]);return(0,s.useEffect)((()=>()=>window.clearTimeout(l.current)),[]),(0,i.jsx)("button",{type:"button","aria-label":a?(0,h.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,h.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,h.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,u.Z)("clean-btn",n,Ue.copyButton,a&&Ue.copyButtonCopied),onClick:c,children:(0,i.jsxs)("span",{className:Ue.copyButtonIcons,"aria-hidden":"true",children:[(0,i.jsx)(Me,{className:Ue.copyButtonIcon}),(0,i.jsx)(Se,{className:Ue.copyButtonSuccessIcon})]})})}function Ve(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}const Re={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function Pe(e){let{className:t,onClick:n,isEnabled:s}=e;const a=(0,h.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,i.jsx)("button",{type:"button",onClick:n,className:(0,u.Z)("clean-btn",t,s&&Re.wordWrapButtonEnabled),"aria-label":a,title:a,children:(0,i.jsx)(Ve,{className:Re.wordWrapButtonIcon,"aria-hidden":"true"})})}function Oe(e){let{children:t,className:n="",metastring:a,title:o,showLineNumbers:l,language:c}=e;const{prism:{defaultLanguage:r,magicComments:d}}=(0,$.L)(),m=function(e){return e?.toLowerCase()}(c??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(n)??r),h=xe(),p=function(){const[e,t]=(0,s.useState)(!1),[n,a]=(0,s.useState)(!1),o=(0,s.useRef)(null),i=(0,s.useCallback)((()=>{const n=o.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[o,e]),l=(0,s.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=o.current,n=e>t||o.current.querySelector("code").hasAttribute("style");a(n)}),[o]);return Ee(o,l),(0,s.useEffect)((()=>{l()}),[e,l]),(0,s.useEffect)((()=>(window.addEventListener("resize",l,{passive:!0}),()=>{window.removeEventListener("resize",l)})),[l]),{codeBlockRef:o,isEnabled:e,isCodeScrollable:n,toggle:i}}(),f=function(e){return e?.match(je)?.groups.title??""}(a)||o,{lineClassNames:x,code:b}=ye(t,{metastring:a,language:m,magicComments:d}),g=l??function(e){return Boolean(e?.includes("showLineNumbers"))}(a);return(0,i.jsxs)(Be,{as:"div",className:(0,u.Z)(n,m&&!n.includes(`language-${m}`)&&`language-${m}`),children:[f&&(0,i.jsx)("div",{className:we.codeBlockTitle,children:f}),(0,i.jsxs)("div",{className:we.codeBlockContent,children:[(0,i.jsx)(He.y$,{theme:h,code:b,language:m??"text",children:e=>{let{className:t,style:n,tokens:s,getLineProps:a,getTokenProps:o}=e;return(0,i.jsx)("pre",{tabIndex:0,ref:p.codeBlockRef,className:(0,u.Z)(t,we.codeBlock,"thin-scrollbar"),style:n,children:(0,i.jsx)("code",{className:(0,u.Z)(we.codeBlockLines,g&&we.codeBlockLinesWithNumbering),children:s.map(((e,t)=>(0,i.jsx)(Ie,{line:e,getLineProps:a,getTokenProps:o,classNames:x[t],showLineNumbers:g},t)))})})}}),(0,i.jsxs)("div",{className:we.buttonGroup,children:[(p.isEnabled||p.isCodeScrollable)&&(0,i.jsx)(Pe,{className:we.codeButton,onClick:()=>p.toggle(),isEnabled:p.isEnabled}),(0,i.jsx)(ze,{className:we.codeButton,code:b})]})]})]})}function De(e){let{children:t,...n}=e;const a=(0,pe.Z)(),o=function(e){return s.Children.toArray(e).some((e=>(0,s.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),l="string"==typeof o?Oe:Ze;return(0,i.jsx)(l,{...n,children:o},String(a))}function $e(e){return(0,i.jsx)("code",{...e})}var We=n(8138);const Fe={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function qe(e){return!!e&&("SUMMARY"===e.tagName||qe(e.parentElement))}function Ge(e,t){return!!e&&(e===t||Ge(e.parentElement,t))}function Je(e){let{summary:t,children:n,...a}=e;(0,We.Z)().collectAnchor(a.id);const o=(0,pe.Z)(),l=(0,s.useRef)(null),{collapsed:c,setCollapsed:r}=(0,D.u)({initialState:!a.open}),[d,m]=(0,s.useState)(a.open),h=s.isValidElement(t)?t:(0,i.jsx)("summary",{children:t??"Details"});return(0,i.jsxs)("details",{...a,ref:l,open:d,"data-collapsed":c,className:(0,u.Z)(Fe.details,o&&Fe.isBrowser,a.className),onMouseDown:e=>{qe(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;qe(t)&&Ge(t,l.current)&&(e.preventDefault(),c?(r(!1),m(!0)):r(!0))},children:[h,(0,i.jsx)(D.z,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{r(e),m(!e)},children:(0,i.jsx)("div",{className:Fe.collapsibleContent,children:n})})]})}const Ye={details:"details_b_Ee"},Qe="alert alert--info";function Xe(e){let{...t}=e;return(0,i.jsx)(Je,{...t,className:(0,u.Z)(Qe,Ye.details,t.className)})}function Ke(e){const t=s.Children.toArray(e.children),n=t.find((e=>s.isValidElement(e)&&"summary"===e.type)),a=(0,i.jsx)(i.Fragment,{children:t.filter((e=>e!==n))});return(0,i.jsx)(Xe,{...e,summary:n,children:a})}function et(e){return(0,i.jsx)(ue.Z,{...e})}const tt={containsTaskList:"containsTaskList_mC6p"};function nt(e){if(void 0!==e)return(0,u.Z)(e,e?.includes("contains-task-list")&&tt.containsTaskList)}const st={img:"img_ev3q"};function at(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=s.Children.toArray(e),n=t.find((e=>s.isValidElement(e)&&"mdxAdmonitionTitle"===e.type)),a=t.filter((e=>e!==n)),o=n?.props.children;return{mdxAdmonitionTitle:o,rest:a.length>0?(0,i.jsx)(i.Fragment,{children:a}):null}}(e.children),a=e.title??t;return{...e,...a&&{title:a},children:n}}const ot={admonition:"admonition_xJq3",admonitionHeading:"admonitionHeading_Gvgb",admonitionIcon:"admonitionIcon_Rf37",admonitionContent:"admonitionContent_BuS1"};function it(e){let{type:t,className:n,children:s}=e;return(0,i.jsx)("div",{className:(0,u.Z)(v.k.common.admonition,v.k.common.admonitionType(t),ot.admonition,n),children:s})}function lt(e){let{icon:t,title:n}=e;return(0,i.jsxs)("div",{className:ot.admonitionHeading,children:[(0,i.jsx)("span",{className:ot.admonitionIcon,children:t}),n]})}function ct(e){let{children:t}=e;return t?(0,i.jsx)("div",{className:ot.admonitionContent,children:t}):null}function rt(e){const{type:t,icon:n,title:s,children:a,className:o}=e;return(0,i.jsxs)(it,{type:t,className:o,children:[s||n?(0,i.jsx)(lt,{title:s,icon:n}):null,(0,i.jsx)(ct,{children:a})]})}function dt(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})}const ut={icon:(0,i.jsx)(dt,{}),title:(0,i.jsx)(h.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function mt(e){return(0,i.jsx)(rt,{...ut,...e,className:(0,u.Z)("alert alert--secondary",e.className),children:e.children})}function ht(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})}const pt={icon:(0,i.jsx)(ht,{}),title:(0,i.jsx)(h.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function ft(e){return(0,i.jsx)(rt,{...pt,...e,className:(0,u.Z)("alert alert--success",e.className),children:e.children})}function xt(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}const bt={icon:(0,i.jsx)(xt,{}),title:(0,i.jsx)(h.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function gt(e){return(0,i.jsx)(rt,{...bt,...e,className:(0,u.Z)("alert alert--info",e.className),children:e.children})}function jt(e){return(0,i.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}const vt={icon:(0,i.jsx)(jt,{}),title:(0,i.jsx)(h.Z,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function Nt(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})}const Ct={icon:(0,i.jsx)(Nt,{}),title:(0,i.jsx)(h.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const kt={icon:(0,i.jsx)(jt,{}),title:(0,i.jsx)(h.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const Lt={...{note:mt,tip:ft,info:gt,warning:function(e){return(0,i.jsx)(rt,{...vt,...e,className:(0,u.Z)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,i.jsx)(rt,{...Ct,...e,className:(0,u.Z)("alert alert--danger",e.className),children:e.children})}},...{secondary:e=>(0,i.jsx)(mt,{title:"secondary",...e}),important:e=>(0,i.jsx)(gt,{title:"important",...e}),success:e=>(0,i.jsx)(ft,{title:"success",...e}),caution:function(e){return(0,i.jsx)(rt,{...kt,...e,className:(0,u.Z)("alert alert--warning",e.className),children:e.children})}}};function yt(e){const t=at(e),n=(s=t.type,Lt[s]||(console.warn(`No admonition component found for admonition type "${s}". Using Info as fallback.`),Lt.info));var s;return(0,i.jsx)(n,{...t})}var _t=n(1875);const Bt={Head:he.Z,details:Ke,Details:Ke,code:function(e){return function(e){return void 0!==e.children&&s.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")))}(e)?(0,i.jsx)($e,{...e}):(0,i.jsx)(De,{...e})},a:function(e){return(0,i.jsx)(p.Z,{...e})},pre:function(e){return(0,i.jsx)(i.Fragment,{children:e.children})},ul:function(e){return(0,i.jsx)("ul",{...e,className:nt(e.className)})},li:function(e){return(0,We.Z)().collectAnchor(e.id),(0,i.jsx)("li",{...e})},img:function(e){return(0,i.jsx)("img",{decoding:"async",loading:"lazy",...e,className:(t=e.className,(0,u.Z)(t,st.img))});var t},h1:e=>(0,i.jsx)(et,{as:"h1",...e}),h2:e=>(0,i.jsx)(et,{as:"h2",...e}),h3:e=>(0,i.jsx)(et,{as:"h3",...e}),h4:e=>(0,i.jsx)(et,{as:"h4",...e}),h5:e=>(0,i.jsx)(et,{as:"h5",...e}),h6:e=>(0,i.jsx)(et,{as:"h6",...e}),admonition:yt,mermaid:_t.Z};function wt(e){let{children:t}=e;return(0,i.jsx)(me.Z,{components:Bt,children:t})}function Zt(e){let{children:t}=e;const n=function(){const{metadata:e,frontMatter:t,contentTitle:n}=r();return t.hide_title||void 0!==n?null:e.title}();return(0,i.jsxs)("div",{className:(0,u.Z)(v.k.docs.docMarkdown,"markdown"),children:[n&&(0,i.jsx)("header",{children:(0,i.jsx)(ue.Z,{as:"h1",children:n})}),(0,i.jsx)(wt,{children:t})]})}var Tt=n(2802),Et=n(8596),Ht=n(4996);function At(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const It={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function Mt(){const e=(0,Ht.ZP)("/");return(0,i.jsx)("li",{className:"breadcrumbs__item",children:(0,i.jsx)(p.Z,{"aria-label":(0,h.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,i.jsx)(At,{className:It.breadcrumbHomeIcon})})})}const St={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function Ut(e){let{children:t,href:n,isLast:s}=e;const a="breadcrumbs__link";return s?(0,i.jsx)("span",{className:a,itemProp:"name",children:t}):n?(0,i.jsx)(p.Z,{className:a,href:n,itemProp:"item",children:(0,i.jsx)("span",{itemProp:"name",children:t})}):(0,i.jsx)("span",{className:a,children:t})}function zt(e){let{children:t,active:n,index:s,addMicrodata:a}=e;return(0,i.jsxs)("li",{...a&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,u.Z)("breadcrumbs__item",{"breadcrumbs__item--active":n}),children:[t,(0,i.jsx)("meta",{itemProp:"position",content:String(s+1)})]})}function Vt(){const e=(0,Tt.s1)(),t=(0,Et.Ns)();return e?(0,i.jsx)("nav",{className:(0,u.Z)(v.k.docs.docBreadcrumbs,St.breadcrumbsContainer),"aria-label":(0,h.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,i.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[t&&(0,i.jsx)(Mt,{}),e.map(((t,n)=>{const s=n===e.length-1,a="category"===t.type&&t.linkUnlisted?void 0:t.href;return(0,i.jsx)(zt,{active:s,index:n,addMicrodata:!!a,children:(0,i.jsx)(Ut,{href:a,isLast:s,children:t.label})},n)}))]})}):null}function Rt(){return(0,i.jsx)(h.Z,{id:"theme.unlistedContent.title",description:"The unlisted content banner title",children:"Unlisted page"})}function Pt(){return(0,i.jsx)(h.Z,{id:"theme.unlistedContent.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function Ot(){return(0,i.jsx)(he.Z,{children:(0,i.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function Dt(e){let{className:t}=e;return(0,i.jsx)(yt,{type:"caution",title:(0,i.jsx)(Rt,{}),className:(0,u.Z)(t,v.k.common.unlistedBanner),children:(0,i.jsx)(Pt,{})})}function $t(e){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ot,{}),(0,i.jsx)(Dt,{...e})]})}const Wt={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function Ft(e){let{children:t}=e;const n=function(){const{frontMatter:e,toc:t}=r(),n=(0,m.i)(),s=e.hide_table_of_contents,a=!s&&t.length>0;return{hidden:s,mobile:a?(0,i.jsx)(oe,{}):void 0,desktop:!a||"desktop"!==n&&"ssr"!==n?void 0:(0,i.jsx)(de,{})}}(),{metadata:{unlisted:s}}=r();return(0,i.jsxs)("div",{className:"row",children:[(0,i.jsxs)("div",{className:(0,u.Z)("col",!n.hidden&&Wt.docItemCol),children:[s&&(0,i.jsx)($t,{}),(0,i.jsx)(B,{}),(0,i.jsxs)("div",{className:Wt.docItemContainer,children:[(0,i.jsxs)("article",{children:[(0,i.jsx)(Vt,{}),(0,i.jsx)(w,{}),n.mobile,(0,i.jsx)(Zt,{children:t}),(0,i.jsx)(O,{})]}),(0,i.jsx)(b,{})]})]}),n.desktop&&(0,i.jsx)("div",{className:"col col--3",children:n.desktop})]})}function qt(e){const t=`docs-doc-id-${e.content.metadata.id}`,n=e.content;return(0,i.jsx)(c,{content:e.content,children:(0,i.jsxs)(a.FG,{className:t,children:[(0,i.jsx)(d,{}),(0,i.jsx)(Ft,{children:(0,i.jsx)(n,{})})]})})}},7594:(e,t)=>{function n(e){let t,n=[];for(let s of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(s))n.push(parseInt(s,10));else if(t=s.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,s,a,o]=t;if(s&&o){s=parseInt(s),o=parseInt(o);const e=s{"use strict";n.d(t,{Z:()=>l,a:()=>i});var s=n(7294);const a={},o=s.createContext(a);function i(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/1a20bc57.013b53e5.js b/assets/js/1a20bc57.013b53e5.js
new file mode 100644
index 0000000..e694ce2
--- /dev/null
+++ b/assets/js/1a20bc57.013b53e5.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[468],{8916:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>p,frontMatter:()=>r,metadata:()=>i,toc:()=>d});var l=s(5893),a=s(1151);const r={sidebar_position:3},o="CLI",i={id:"cli",title:"CLI",description:"Install globally or use npx to interact with the cli.",source:"@site/docs/cli.md",sourceDirName:".",slug:"/cli",permalink:"/soql-parser-js/docs/cli",draft:!1,unlisted:!1,editUrl:"https://github.com/jetstreamapp/soql-parser-js/docs/docs/docs/cli.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"API",permalink:"/soql-parser-js/docs/api"},next:{title:"Other Examples",permalink:"/soql-parser-js/docs/examples"}},c={},d=[{value:"Available Commands",id:"available-commands",level:3},{value:"Examples",id:"examples",level:3},{value:"Parse",id:"parse",level:4},{value:"Compose",id:"compose",level:4},{value:"Format",id:"format",level:4},{value:"Is Valid",id:"is-valid",level:4},{value:"List of options",id:"list-of-options",level:3}];function t(e){const n={code:"code",h1:"h1",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.a)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h1,{id:"cli",children:"CLI"}),"\n",(0,l.jsxs)(n.p,{children:["Install globally or use ",(0,l.jsx)(n.code,{children:"npx"})," to interact with the cli."]}),"\n",(0,l.jsx)(n.h3,{id:"available-commands",children:"Available Commands"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"soql-parser-js --help"})," (or using ",(0,l.jsx)(n.code,{children:"npx"}),": ",(0,l.jsx)(n.code,{children:"npx soql-parser-js --help"}),")"]}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"soql-parser-js parse --help"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"soql-parser-js compose --help"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"soql-parser-js format --help"})}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"examples",children:"Examples"}),"\n",(0,l.jsx)(n.h4,{id:"parse",children:"Parse"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'npx soql-parser-js parse "SELECT Id FROM Account"'})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:'{"fields":[{"type":"Field","field":"Id"}],"sObject":"Account"}\n'})}),"\n",(0,l.jsx)(n.h4,{id:"compose",children:"Compose"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'npx soql-parser-js compose "{\\"fields\\":[{\\"type\\":\\"Field\\",\\"field\\":\\"Id\\"}],\\"sObject\\":\\"Account\\"}"'})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"SELECT Id FROM Account\n"})}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.code,{children:'npx soql-parser-js compose "{\\"fields\\":[{\\"type\\":\\"Field\\",\\"field\\":\\"Id\\"}],\\"sObject\\":\\"Account\\"}" --json'})," or -j"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-json",children:'{ "query": "SELECT Id FROM Account" }\n'})}),"\n",(0,l.jsx)(n.h4,{id:"format",children:"Format"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'npx soql-parser-js format "SELECT Name, COUNT(Id) FROM Account GROUP BY Name HAVING COUNT(Id) > 1"'})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"SELECT Name, COUNT(Id)\nFROM Account\nGROUP BY Name\nHAVING COUNT(Id) > 1\n"})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'npx soql-parser-js format "SELECT Name, COUNT(Id) FROM Account GROUP BY Name HAVING COUNT(Id) > 1 -j'})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-json",children:'{ "query": "SELECT Name, COUNT(Id)\\nFROM Account\\nGROUP BY Name\\nHAVING COUNT(Id) > 1" }\n'})}),"\n",(0,l.jsx)(n.h4,{id:"is-valid",children:"Is Valid"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'npx soql-parser-js valid "SELECT Id FROM Account"'})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"true\n"})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'npx soql-parser-js valid "SELECT Id invalid FROM Account"'})}),"\n",(0,l.jsx)(n.p,{children:"\u2139\ufe0f this returns an exit code of 1"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"false\n"})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'npx soql-parser-js valid "SELECT Id FROM Account" -j'})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-json",children:'{ "isValid": true }\n'})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:'npx soql-parser-js valid "SELECT Id invalid invalid FROM Account" -j'})}),"\n",(0,l.jsx)(n.p,{children:"\u2139\ufe0f this returns an exit code of 0"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-json",children:'{ "isValid": false }\n'})}),"\n",(0,l.jsx)(n.h3,{id:"list-of-options",children:"List of options"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"soql-parser-js --help"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"Usage: soql-parser-js [options] [command]\n\nOptions:\n -h, --help output usage information\n\nCommands:\n parse [options] \n compose [options] \n format [options] \n valid \n"})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"soql-parser-js parse --help"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"Usage: parse [options] \n\nOptions:\n -a, --allow-apex allow apex bind variables\n -p, --allow-partial allow partial queries\n -i, --ignore-errors ignore parse errors, return as much of query as possible\n -h, --help output usage information\n"})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"soql-parser-js compose --help"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"Usage: compose [options] \n\nOptions:\n -f, --format format output\n -i --indent number of tab characters to indent (default: 1)\n -m --line-length max number of characters per lins (default: 60)\n -s --subquery-parens-new-line subquery parens on own line\n -k --keywords-new-line new line after keywords\n -j, --json output as JSON\n -h, --help output usage information\n"})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"soql-parser-js format --help"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"Usage: format [options] \n\nOptions:\n -a, --allow-apex allow apex bind variables\n -p, --allow-partial allow partial queries\n -i --indent number of tab characters to indent (default: 1)\n -m --line-length max number of characters per lins (default: 60)\n -s --subquery-parens-new-line subquery parens on own line\n -k --keywords-new-line new line after keywords\n -j, --json output as JSON\n -h, --help output usage information\n"})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"soql-parser-js valid --help"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"Usage: valid [options] \n\nOptions:\n -a, --allow-apex allow apex bind variables\n -p, --allow-partial allow partial queries\n -j, --json output as JSON\n -h, --help output usage information\n"})})]})}function p(e={}){const{wrapper:n}={...(0,a.a)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(t,{...e})}):t(e)}},1151:(e,n,s)=>{s.d(n,{Z:()=>i,a:()=>o});var l=s(7294);const a={},r=l.createContext(a);function o(e){const n=l.useContext(r);return l.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),l.createElement(r.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/1db64337.a3de6501.js b/assets/js/1db64337.a3de6501.js
new file mode 100644
index 0000000..dcc893d
--- /dev/null
+++ b/assets/js/1db64337.a3de6501.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[372],{8658:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>d});var r=t(5893),i=t(1151);const o={sidebar_position:1},a="Overview",s={id:"overview",title:"Overview",description:"This library allows parsing and composing (aka generating) SOQL queries from Salesforce using JavaScript or Typescript.",source:"@site/docs/overview.md",sourceDirName:".",slug:"/overview",permalink:"/soql-parser-js/docs/overview",draft:!1,unlisted:!1,editUrl:"https://github.com/jetstreamapp/soql-parser-js/docs/docs/docs/overview.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"API",permalink:"/soql-parser-js/docs/api"}},l={},d=[{value:"Parse a query",id:"parse-a-query",level:2},{value:"Compose a query from an object",id:"compose-a-query-from-an-object",level:2},{value:"Compose using helper functions",id:"compose-using-helper-functions",level:3},{value:"Contributing",id:"contributing",level:2},{value:"Data Models",id:"data-models",level:2},{value:"Query",id:"query",level:3}];function p(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"overview",children:"Overview"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"This library allows parsing and composing (aka generating) SOQL queries from Salesforce using JavaScript or Typescript."})}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.a,{href:"/playground",children:"playground"})," is a great place to get familiar with soql-parser-js."]}),"\n",(0,r.jsx)(n.h1,{id:"quick-start",children:"Quick Start"}),"\n",(0,r.jsx)(n.p,{children:"These are the most common functions exported by the library:"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Function"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Arguments"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"parseQuery"}),(0,r.jsx)(n.td,{children:"Parse a SOQL query string into a Query data structure."}),(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"soql: string"}),", ",(0,r.jsx)(n.code,{children:"config?: ParseQueryConfig"})]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"composeQuery"}),(0,r.jsx)(n.td,{children:"Turn a Query object back into a SOQL statement."}),(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"query: Query"}),", ",(0,r.jsx)(n.code,{children:"config?: SoqlComposeConfig"})]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"isQueryValid"}),(0,r.jsx)(n.td,{children:"Returns true if the query was able to be parsed."}),(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"soql: string"}),", ",(0,r.jsx)(n.code,{children:"config?: ParseQueryConfig"})]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"formatQuery"}),(0,r.jsx)(n.td,{children:"Format a SOQL query string."}),(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"soql: string"}),", ",(0,r.jsx)(n.code,{children:"config?: FormatOptions"})]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"parse-a-query",children:"Parse a query"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"import { parseQuery, Query } from '@jetstreamapp/soql-parser-js';\n\nconst query = parseQuery(`SELECT Id FROM Account WHERE Name = 'foo'`);\n\nconsole.log(query);\n\n// Generated Query\n// {\n// fields: [\n// {\n// type: 'Field',\n// field: 'Id',\n// },\n// ],\n// sObject: 'Account',\n// where: {\n// left: {\n// field: 'Name',\n// operator: '=',\n// value: \"'Foo'\",\n// literalType: 'STRING',\n// },\n// },\n// }\n"})}),"\n",(0,r.jsx)(n.h2,{id:"compose-a-query-from-an-object",children:"Compose a query from an object"}),"\n",(0,r.jsx)(n.p,{children:"Composing a query will take a query object and return a soql query."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"import { composeQuery, Query } from '@jetstreamapp/soql-parser-js';\n\nconst query = {\n fields: [\n {\n type: 'Field',\n field: 'Id',\n },\n ],\n sObject: 'Account',\n where: {\n left: {\n field: 'Name',\n operator: '=',\n value: \"'Foo'\",\n literalType: 'STRING',\n },\n },\n};\n\nconst soql = composeQuery(query);\n\nconsole.log(soql);\n\n// SELECT Id FROM Account WHERE Name = 'foo'\n"})}),"\n",(0,r.jsx)(n.h3,{id:"compose-using-helper-functions",children:"Compose using helper functions"}),"\n",(0,r.jsxs)(n.p,{children:["You can use the ",(0,r.jsx)(n.code,{children:"getField"})," helper function to simplify the field generation. Read the api docs for more information."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"import { composeQuery, getField } from '@jetstreamapp/soql-parser-js';\n\nconst soql = composeQuery({\n fields: [\n getField('Id'),\n getField('Name'),\n getField('EntityDefinitionId'),\n getField('EntityDefinition.QualifiedApiName'),\n getField('IsIdLookup'),\n getField('DataType'),\n getField('ValueTypeId'),\n getField('ReferenceTo'),\n getField('IsCreatable'),\n getField('IsUpdatable'),\n getField('Label'),\n getField('MasterLabel'),\n getField('QualifiedApiName'),\n getField('RelationshipName'),\n ],\n sObject: 'EntityParticle',\n where: {\n left: {\n field: 'EntityDefinition.QualifiedApiName',\n operator: 'IN',\n value: sobjects,\n literalType: 'STRING',\n },\n operator: 'AND',\n right: {\n left: {\n field: 'QualifiedApiName',\n operator: '!=',\n value: 'Id',\n literalType: 'STRING',\n },\n operator: 'AND',\n right: {\n left: {\n field: 'DataType',\n operator: 'IN',\n value: ['string', 'phone', 'url', 'email'],\n literalType: 'STRING',\n },\n },\n },\n },\n orderBy: [\n {\n field: 'EntityDefinitionId',\n },\n { field: 'Label' },\n ],\n});\n"})}),"\n",(0,r.jsx)(n.h2,{id:"contributing",children:"Contributing"}),"\n",(0,r.jsxs)(n.p,{children:["All contributions are welcome on the project. Please read the ",(0,r.jsx)(n.a,{href:"https://github.com/paustint/soql-parser-js/blob/master/CONTRIBUTING.md",children:"contribution guidelines"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"data-models",children:"Data Models"}),"\n",(0,r.jsx)(n.h3,{id:"query",children:"Query"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"export type LogicalOperator = 'AND' | 'OR' | 'NOT';\nexport type Operator = '=' | '!=' | '<=' | '>=' | '>' | '<' | 'LIKE' | 'IN' | 'NOT IN' | 'INCLUDES' | 'EXCLUDES';\nexport type FieldTypeOfConditionType = 'WHEN' | 'ELSE';\nexport type GroupSelector = 'ABOVE' | 'AT' | 'BELOW' | 'ABOVE_OR_BELOW';\nexport type ForClause = 'VIEW' | 'UPDATE' | 'REFERENCE';\nexport type UpdateClause = 'TRACKING' | 'VIEWSTAT';\nexport type LiteralType =\n | 'STRING'\n | 'INTEGER'\n | 'DECIMAL'\n | 'INTEGER_WITH_CURRENCY_PREFIX'\n | 'DECIMAL_WITH_CURRENCY_PREFIX'\n | 'BOOLEAN'\n | 'NULL'\n | 'DATETIME'\n | 'DATE'\n | 'DATE_LITERAL'\n | 'DATE_N_LITERAL'\n | 'APEX_BIND_VARIABLE';\nexport type FieldType =\n | Field\n | FieldWithAlias\n | FieldFunctionExpression\n | FieldRelationship\n | FieldRelationshipWithAlias\n | FieldSubquery\n | FieldTypeOf;\nexport type OrderByCriterion = 'ASC' | 'DESC';\nexport type NullsOrder = 'FIRST' | 'LAST';\nexport type GroupByType = 'CUBE' | 'ROLLUP';\nexport type DateLiteral =\n | 'YESTERDAY'\n | 'TODAY'\n | 'TOMORROW'\n | 'LAST_WEEK'\n | 'THIS_WEEK'\n | 'NEXT_WEEK'\n | 'LAST_MONTH'\n | 'THIS_MONTH'\n | 'NEXT_MONTH'\n | 'LAST_90_DAYS'\n | 'NEXT_90_DAYS'\n | 'THIS_QUARTER'\n | 'LAST_QUARTER'\n | 'NEXT_QUARTER'\n | 'THIS_YEAR'\n | 'LAST_YEAR'\n | 'NEXT_YEAR'\n | 'THIS_FISCAL_QUARTER'\n | 'LAST_FISCAL_QUARTER'\n | 'NEXT_FISCAL_QUARTER'\n | 'THIS_FISCAL_YEAR'\n | 'LAST_FISCAL_YEAR'\n | 'NEXT_FISCAL_YEAR';\n\nexport type DateNLiteral =\n | 'YESTERDAY'\n | 'NEXT_N_DAYS'\n | 'LAST_N_DAYS'\n | 'N_DAYS_AGO'\n | 'NEXT_N_WEEKS'\n | 'LAST_N_WEEKS'\n | 'N_WEEKS_AGO'\n | 'NEXT_N_MONTHS'\n | 'LAST_N_MONTHS'\n | 'N_MONTHS_AGO'\n | 'NEXT_N_QUARTERS'\n | 'LAST_N_QUARTERS'\n | 'N_QUARTERS_AGO'\n | 'NEXT_N_YEARS'\n | 'LAST_N_YEARS'\n | 'N_YEARS_AGO'\n | 'NEXT_N_FISCAL_QUARTERS'\n | 'LAST_N_FISCAL_QUARTERS'\n | 'N_FISCAL_QUARTERS_AGO'\n | 'NEXT_N_FISCAL_YEARS'\n | 'LAST_N_FISCAL_YEARS'\n | 'N_FISCAL_YEARS_AGO';\n\nexport interface Field {\n type: 'Field';\n field: string;\n alias?: string;\n}\n\nexport interface FieldWithAlias extends Field {\n objectPrefix: string;\n rawValue: string;\n}\n\nexport interface FieldFunctionExpression {\n type: 'FieldFunctionExpression';\n functionName: string;\n parameters: (string | FieldFunctionExpression)[];\n alias?: string;\n isAggregateFn?: boolean; // not required for compose, will be populated if SOQL is parsed\n rawValue?: string; // not required for compose, will be populated if SOQL is parsed\n}\n\nexport interface FieldRelationship {\n type: 'FieldRelationship';\n field: string;\n relationships: string[];\n rawValue?: string; // not required for compose, will be populated if SOQL is parsed with the raw value of the entire field\n}\n\nexport interface FieldRelationshipWithAlias extends FieldRelationship {\n objectPrefix: string;\n alias: string;\n}\n\nexport interface FieldSubquery {\n type: 'FieldSubquery';\n subquery: Subquery;\n}\n\nexport interface FieldTypeOf {\n type: 'FieldTypeof';\n field: string;\n conditions: FieldTypeOfCondition[];\n}\n\nexport interface FieldTypeOfCondition {\n type: FieldTypeOfConditionType;\n objectType?: string; // not present when ELSE\n fieldList: string[];\n}\n\nexport interface QueryBase {\n fields?: FieldType[];\n sObjectAlias?: string;\n usingScope?: string;\n where?: WhereClause;\n limit?: number;\n offset?: number;\n groupBy?: GroupByClause;\n orderBy?: OrderByClause | OrderByClause[];\n withDataCategory?: WithDataCategoryClause;\n withSecurityEnforced?: boolean;\n withAccessLevel?: boolean;\n for?: ForClause;\n update?: UpdateClause;\n}\n\nexport interface Query extends QueryBase {\n sObject?: string;\n}\n\nexport interface Subquery extends QueryBase {\n relationshipName: string;\n sObjectPrefix?: string[];\n}\n\nexport type WhereClause = WhereClauseWithoutOperator | WhereClauseWithRightCondition;\n\nexport interface WhereClauseWithoutOperator {\n left: ConditionWithValueQuery;\n}\n\nexport interface WhereClauseWithRightCondition extends WhereClauseWithoutOperator {\n operator: LogicalOperator;\n right: WhereClause;\n}\n\nexport type Condition =\n | ValueCondition\n | ValueWithDateLiteralCondition\n | ValueWithDateNLiteralCondition\n | ValueFunctionCondition\n | NegationCondition;\n\nexport type ConditionWithValueQuery = Condition | ValueQueryCondition;\n\nexport interface OptionalParentheses {\n openParen?: number;\n closeParen?: number;\n}\n\nexport interface ValueCondition extends OptionalParentheses {\n field: string;\n operator: Operator;\n value: string | string[];\n literalType?: LiteralType | LiteralType[];\n}\n\nexport interface ValueWithDateLiteralCondition extends OptionalParentheses {\n field: string;\n operator: Operator;\n value: DateLiteral | DateLiteral[];\n literalType?: 'DATE_LITERAL' | 'DATE_LITERAL'[];\n}\n\nexport interface ValueWithDateNLiteralCondition extends OptionalParentheses {\n field: string;\n operator: Operator;\n value: string | string[];\n literalType?: 'DATE_N_LITERAL' | 'DATE_N_LITERAL'[];\n dateLiteralVariable: number | number[];\n}\n\nexport interface ValueQueryCondition extends OptionalParentheses {\n field: string;\n operator: Operator;\n valueQuery: Query;\n}\n\nexport interface ValueFunctionCondition extends OptionalParentheses {\n fn: FunctionExp;\n operator: Operator;\n value: string | string[];\n literalType?: LiteralType | LiteralType[];\n}\n\nexport interface NegationCondition {\n openParen: number;\n}\n\nexport type OrderByClause = OrderByFieldClause | OrderByFnClause;\n\nexport interface OrderByOptionalFieldsClause {\n order?: OrderByCriterion;\n nulls?: NullsOrder;\n}\n\nexport interface OrderByFieldClause extends OrderByOptionalFieldsClause {\n field: string;\n}\n\nexport interface OrderByFnClause extends OrderByOptionalFieldsClause {\n fn: FunctionExp;\n}\n\nexport type GroupByClause = GroupByFieldClause | GroupByFnClause;\n\nexport interface GroupByOptionalFieldsClause {\n having?: HavingClause;\n}\n\nexport interface GroupByFieldClause extends GroupByOptionalFieldsClause {\n field: string | string[];\n}\n\nexport interface GroupByFnClause extends GroupByOptionalFieldsClause {\n fn: FunctionExp;\n}\n\nexport type HavingClause = HavingClauseWithoutOperator | HavingClauseWithRightCondition;\n\nexport interface HavingClauseWithoutOperator {\n left: Condition;\n}\n\nexport interface HavingClauseWithRightCondition extends HavingClauseWithoutOperator {\n operator: LogicalOperator;\n right: HavingClause;\n}\n\nexport interface FunctionExp {\n rawValue?: string; // only used for compose fields if useRawValueForFn=true. Should be formatted like this: Count(Id)\n functionName?: string; // only used for compose fields if useRawValueForFn=false, will be populated if SOQL is parsed\n alias?: string;\n parameters?: (string | FunctionExp)[]; // only used for compose fields if useRawValueForFn=false, will be populated if SOQL is parsed\n isAggregateFn?: boolean; // not used for compose, will be populated if SOQL is parsed\n}\n\nexport interface WithDataCategoryClause {\n conditions: WithDataCategoryCondition[];\n}\n\nexport interface WithDataCategoryCondition {\n groupName: string;\n selector: GroupSelector;\n parameters: string[];\n}\n"})})]})}function u(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},1151:(e,n,t)=>{t.d(n,{Z:()=>s,a:()=>a});var r=t(7294);const i={},o=r.createContext(i);function a(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/1df93b7f.c7c0e958.js b/assets/js/1df93b7f.c7c0e958.js
new file mode 100644
index 0000000..2237867
--- /dev/null
+++ b/assets/js/1df93b7f.c7c0e958.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[237],{977:(e,s,n)=>{n.d(s,{y:()=>i});var t=n(2573),a=n(2949),r=n(5893);function i(e){let{code:s,language:n,classNames:i={}}=e;const{colorMode:l}=(0,a.I)(),o="light"===l?t.np.github:t.np.shadesOfPurple;return(0,r.jsx)(t.y$,{theme:o,code:s,language:n,children:e=>{let{style:s,tokens:n,getLineProps:t,getTokenProps:a}=e;return(0,r.jsx)("pre",{className:i?.pre,style:{...s,margin:0},children:n.map(((e,s)=>(0,r.jsx)("div",{...t({line:e}),children:e.map(((e,s)=>(0,r.jsx)("span",{...a({token:e})},s)))},s)))})}})}},8391:(e,s,n)=>{n.r(s),n.d(s,{default:()=>f});n(7294);var t=n(512),a=n(3692),r=n(2263),i=n(6040);const l={features:"features_t9lD",featuresSubHeading:"featuresSubHeading_pF2l",featureSvg:"featureSvg_GfXr"};var o=n(977),c=n(5893);const d="SELECT Name\nFROM Account\nWHERE Industry = 'media'\nORDER BY BillingPostalCode ASC NULLS LAST\nLIMIT 125",u=JSON.stringify({fields:[{type:"Field",field:"Name"}],sObject:"Account",where:{left:{field:"Industry",operator:"=",literalType:"STRING",value:"'media'"}},orderBy:[{field:"BillingPostalCode",order:"ASC",nulls:"LAST"}],limit:125},null,2),h=[{title:"Parse",description:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(o.y,{code:d,language:"sql"}),(0,c.jsx)("p",{className:l.featuresSubHeading,children:"into"}),(0,c.jsx)(o.y,{code:u,language:"json"})]})},{title:"Compose",description:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(o.y,{code:u,language:"json"}),(0,c.jsx)("p",{className:l.featuresSubHeading,children:"into"}),(0,c.jsx)(o.y,{code:d,language:"sql"})]})},{title:"Battle Tested",description:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("p",{children:["Your SOQL query is parsed using a language parser,"," ",(0,c.jsx)("a",{href:"https://chevrotain.io/docs/features/blazing_fast.html",target:"_blank",children:"Chevrotain JS"}),", and aims to support every SOQL feature."]}),(0,c.jsxs)("p",{children:["This library has been powering"," ",(0,c.jsx)("a",{href:"https://getjetstream.app/",target:"_blank",children:"Jetstream"})," ","in production for many years and has parsed and composed millions of queries from thousands of users."]})]})}];function g(e){let{title:s,description:n}=e;return(0,c.jsx)("div",{className:(0,t.Z)("col col--4"),children:(0,c.jsxs)("div",{className:"padding-horiz--md",children:[(0,c.jsx)("h2",{className:"text--center",children:s}),n]})})}function p(){return(0,c.jsx)("section",{className:l.features,children:(0,c.jsx)("div",{className:"container",children:(0,c.jsx)("div",{className:"row",children:h.map(((e,s)=>(0,c.jsx)(g,{...e},s)))})})})}const m={heroBanner:"heroBanner_qdFl",buttons:"buttons_AeoN"};function j(){const{siteConfig:e}=(0,r.Z)();return(0,c.jsx)("header",{className:(0,t.Z)("hero",m.heroBanner),children:(0,c.jsxs)("div",{className:"container",children:[(0,c.jsx)("h1",{className:"hero__title",children:e.title}),(0,c.jsx)("p",{className:"hero__subtitle",children:e.tagline}),(0,c.jsxs)("div",{className:m.buttons,children:[(0,c.jsx)(a.Z,{className:"button button--secondary button--lg",to:"/docs/overview",children:"Documentation"}),(0,c.jsx)(a.Z,{className:"button button--secondary button--lg",to:"/playground",children:"Playground"})]})]})})}function f(){const{siteConfig:e}=(0,r.Z)();return(0,c.jsxs)(i.Z,{title:e.title,description:"Javascript SOQL parser and builder.",children:[(0,c.jsx)(j,{}),(0,c.jsx)("main",{children:(0,c.jsx)(p,{})})]})}}}]);
\ No newline at end of file
diff --git a/assets/js/5e95c892.acf67b81.js b/assets/js/5e95c892.acf67b81.js
new file mode 100644
index 0000000..c4f1532
--- /dev/null
+++ b/assets/js/5e95c892.acf67b81.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[661],{1892:(e,s,r)=>{r.r(s),r.d(s,{default:()=>l});r(7294);var c=r(512),u=r(1944),a=r(5281),d=r(8790),n=r(6040),t=r(5893);function l(e){return(0,t.jsx)(u.FG,{className:(0,c.Z)(a.k.wrapper.docsPages),children:(0,t.jsx)(n.Z,{children:(0,d.H)(e.route.routes)})})}}}]);
\ No newline at end of file
diff --git a/assets/js/5fbc5cf1.3c25bd6f.js b/assets/js/5fbc5cf1.3c25bd6f.js
new file mode 100644
index 0000000..ae361db
--- /dev/null
+++ b/assets/js/5fbc5cf1.3c25bd6f.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[207],{4164:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>s,metadata:()=>t,toc:()=>a});var l=i(5893),r=i(1151);const s={sidebar_position:3},o="API",t={id:"api",title:"API",description:"Core",source:"@site/docs/api.md",sourceDirName:".",slug:"/api",permalink:"/soql-parser-js/docs/api",draft:!1,unlisted:!1,editUrl:"https://github.com/jetstreamapp/soql-parser-js/docs/docs/docs/api.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Overview",permalink:"/soql-parser-js/docs/overview"},next:{title:"CLI",permalink:"/soql-parser-js/docs/cli"}},d={},a=[{value:"Core",id:"core",level:2},{value:"ParseQuery",id:"parsequery",level:3},{value:"ComposeQuery",id:"composequery",level:3},{value:"IsQueryValid",id:"isqueryvalid",level:3},{value:"FormatQuery",id:"formatquery",level:3},{value:"Utility",id:"utility",level:2},{value:"getFlattenedFields(value)",id:"getflattenedfieldsvalue",level:4},{value:"getField(value)",id:"getfieldvalue",level:4},{value:"Other utility functions",id:"other-utility-functions",level:4}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.a)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h1,{id:"api",children:"API"}),"\n",(0,l.jsx)(n.h2,{id:"core",children:"Core"}),"\n",(0,l.jsx)(n.h3,{id:"parsequery",children:"ParseQuery"}),"\n",(0,l.jsx)(n.p,{children:"Parse a SOQL query string into a Query data structure."}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"function parseQuery(soql: string, options?: ParseQueryConfig): Query"})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"ParseQueryConfig"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"allowPartialQuery?: boolean;"})," - If provided, you can provide an incomplete soql query. This is useful if you need to parse WHERE clauses, for example. Subqueries are required to be valid."]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"allowApexBindVariables?: boolean;"})," - Determines if apex variables are allowed in parsed query. Example: ",(0,l.jsx)(n.code,{children:"WHERE Id IN :accountIds"}),". Only simple Apex is supported. Function calls are not supported. (e.x. ",(0,l.jsx)(n.code,{children:"accountMap.keyset()"})," is not supported)"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"ignoreParseErrors?: boolean;"})," - If set to true, then queries with partially invalid syntax will still be parsed, but any clauses with invalid parts will be omitted. The SELECT clause and FROM clause must always be valid, but all other clauses can contain invalid parts."]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"logErrors?: boolean;"})," - If true, parsing and lexing errors will be logged to the console."]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"composequery",children:"ComposeQuery"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"function composeQuery(soql: Query, config?: Partial): string"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"format?: boolean"})," - Apply formatting the the composed query. This will result in a multi-line soql statement."]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"formatOptions?: boolean"})," - Only applies if ",(0,l.jsx)(n.code,{children:"format"})," is set to true. Options to apply to the formatter.","\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"numIndent: number"})," - Number of tabs to indent on new lines."]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"fieldMaxLineLength: number"})," - Number of characters before wrapping fields."]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"fieldSubqueryParensOnOwnLine: boolean"})," - If true and the query includes a subquery, parentheses will be on their own line ."]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"whereClauseOperatorsIndented: boolean"})," - If true, operators (such as ",(0,l.jsx)(n.code,{children:"="})," or ",(0,l.jsx)(n.code,{children:"IN"}),") in WHERE clauses will be inputted on their own line."]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"newLineAfterKeywords: boolean"})," - If true, a new line will be inserted after keywords"]}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"logging: boolean"})}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"autoCompose?: boolean"})," - (superseded by ",(0,l.jsx)(n.code,{children:"allowPartialQuery"}),", you normally don't need to change this setting.) If you need to compose just part of a query, you can create your own instance of the Compose class and set this to false, then call any methods that you need to just for what you would like to turn into a SOQL query."]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"logging?: boolean"})," - Print out logging statements to the console about the format operation."]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"isqueryvalid",children:"IsQueryValid"}),"\n",(0,l.jsxs)(n.p,{children:["Return a boolean if the query was able to be parsed. Same options as ",(0,l.jsx)(n.code,{children:"parseQuery"}),"."]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"function isQueryValid(soql: string, options?: ParseQueryConfig): boolean"})}),"\n",(0,l.jsx)(n.h3,{id:"formatquery",children:"FormatQuery"}),"\n",(0,l.jsx)(n.p,{children:"Format a provided query. This parses the query then composes the query again to apply formatting."}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"function formatQuery(soql: string, formatOptions?: FormatOptions, parseOptions?: ParseQueryConfig): string"})}),"\n",(0,l.jsx)(n.h2,{id:"utility",children:"Utility"}),"\n",(0,l.jsxs)(n.p,{children:["Refer to the ",(0,l.jsx)(n.a,{href:"/playground",children:"playground"})," for usage examples."]}),"\n",(0,l.jsx)(n.h4,{id:"getflattenedfieldsvalue",children:(0,l.jsx)(n.code,{children:"getFlattenedFields(value)"})}),"\n",(0,l.jsx)(n.p,{children:"Turn a query object into a list of fields using dot notation. This is useful if you want to flatten a Salesforce record and display in a table, this function will provide the fields based on the query."}),"\n",(0,l.jsx)(n.h4,{id:"getfieldvalue",children:(0,l.jsx)(n.code,{children:"getField(value)"})}),"\n",(0,l.jsx)(n.p,{children:"Helper function easily get a a field for a compose function"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"function getField(input: string | ComposeFieldInput): SoqlModels.FieldType"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-typescript",children:"const soqlQuery: Query = {\n fields: [\n getField('Id'),\n getField('Name'),\n getField({\n functionName: 'FORMAT',\n parameters: 'Amount',\n alias: 'MyFormattedAmount',\n }),\n getField({ subquery: oppLineItemsSubquery }),\n ],\n sObject: 'Opportunity',\n where: {\n left: {\n field: 'CreatedDate',\n operator: '>',\n value: 'LAST_N_YEARS:1',\n },\n operator: 'AND',\n right: {\n left: {\n field: 'StageName',\n operator: '=',\n value: 'Closed Won',\n // literalType is optional, but if set to STRING and our value is not already wrapped in \"'\", they will be added\n // All other literalType values are ignored when composing a query\n literalType: 'STRING',\n },\n },\n },\n limit: 150,\n};\n"})}),"\n",(0,l.jsx)(n.h4,{id:"other-utility-functions",children:"Other utility functions"}),"\n",(0,l.jsx)(n.p,{children:"The following functions are generally useful for typescript type narrowing."}),"\n",(0,l.jsx)(n.p,{children:"These are used internally in the compose function but can be used to aid in processing a query object."}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"hasAlias(value)"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"isSubquery(value)"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"isFieldSubquery(value)"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"isWhereClauseWithRightCondition(value)"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"isHavingClauseWithRightCondition(value)"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"isWhereOrHavingClauseWithRightCondition(value)"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"isValueCondition(value)"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"isValueWithDateLiteralCondition(value)"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"isValueWithDateNLiteralCondition(value)"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"isValueFunctionCondition(value)"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"isNegationCondition(value)"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"isValueQueryCondition(value)"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"isOrderByField(value)"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"isOrderByFn(value)"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"isGroupByField(value)"})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.code,{children:"isGroupByFn(value)"})}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,r.a)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(c,{...e})}):c(e)}},1151:(e,n,i)=>{i.d(n,{Z:()=>t,a:()=>o});var l=i(7294);const r={},s=l.createContext(r);function o(e){const n=l.useContext(s);return l.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),l.createElement(s.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/772.3ac74133.js b/assets/js/772.3ac74133.js
new file mode 100644
index 0000000..b7e2563
--- /dev/null
+++ b/assets/js/772.3ac74133.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[772],{5658:(e,t,n)=>{n.d(t,{Z:()=>a});n(7294);var i=n(512),o=n(5999),s=n(2503),r=n(5893);function a(e){let{className:t}=e;return(0,r.jsx)("main",{className:(0,i.Z)("container margin-vert--xl",t),children:(0,r.jsx)("div",{className:"row",children:(0,r.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,r.jsx)(s.Z,{as:"h1",className:"hero__title",children:(0,r.jsx)(o.Z,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},1772:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});n(7294);var i=n(5999),o=n(1944),s=n(6040),r=n(5658),a=n(5893);function d(){const e=(0,i.I)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.d,{title:e}),(0,a.jsx)(s.Z,{children:(0,a.jsx)(r.Z,{})})]})}}}]);
\ No newline at end of file
diff --git a/assets/js/867.967e411c.js b/assets/js/867.967e411c.js
new file mode 100644
index 0000000..331d6a1
--- /dev/null
+++ b/assets/js/867.967e411c.js
@@ -0,0 +1 @@
+(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[867],{2688:function(t,e,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r extends ICstVisitor {\n ").concat((0,a.default)(n,(function(t){return function(t){var e=p(t.name);return"".concat(t.name,"(children: ").concat(e,", param?: IN): OUT;")}(t)})).join("\n "),"\n}")))),c.join("\n\n")+"\n"}},2222:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.buildModel=void 0;var a=r(3062),s=o(r(5161)),u=o(r(5564)),c=o(r(2628)),l=o(r(9704)),f=o(r(7739)),p=o(r(8583));e.buildModel=function(t){var e=new h,r=(0,c.default)(t);return(0,s.default)(r,(function(t){return e.visitRule(t)}))};var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.visitRule=function(t){var e=this.visitEach(t.definition),r=(0,f.default)(e,(function(t){return t.propertyName})),n=(0,s.default)(r,(function(t,e){var r=!(0,l.default)(t,(function(t){return!t.canBeNull})),n=t[0].type;return t.length>1&&(n=(0,s.default)(t,(function(t){return t.type}))),{name:e,type:n,optional:r}}));return{name:t.name,properties:n}},e.prototype.visitAlternative=function(t){return this.visitEachAndOverrideWith(t.definition,{canBeNull:!0})},e.prototype.visitOption=function(t){return this.visitEachAndOverrideWith(t.definition,{canBeNull:!0})},e.prototype.visitRepetition=function(t){return this.visitEachAndOverrideWith(t.definition,{canBeNull:!0})},e.prototype.visitRepetitionMandatory=function(t){return this.visitEach(t.definition)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){return this.visitEach(t.definition).concat({propertyName:t.separator.name,canBeNull:!0,type:d(t.separator)})},e.prototype.visitRepetitionWithSeparator=function(t){return this.visitEachAndOverrideWith(t.definition,{canBeNull:!0}).concat({propertyName:t.separator.name,canBeNull:!0,type:d(t.separator)})},e.prototype.visitAlternation=function(t){return this.visitEachAndOverrideWith(t.definition,{canBeNull:!0})},e.prototype.visitTerminal=function(t){return[{propertyName:t.label||t.terminalType.name,canBeNull:!1,type:d(t)}]},e.prototype.visitNonTerminal=function(t){return[{propertyName:t.label||t.nonTerminalName,canBeNull:!1,type:d(t)}]},e.prototype.visitEachAndOverrideWith=function(t,e){return(0,s.default)(this.visitEach(t),(function(t){return(0,p.default)({},t,e)}))},e.prototype.visitEach=function(t){var e=this;return(0,u.default)((0,s.default)(t,(function(t){return e.visit(t)})))},e}(a.GAstVisitor);function d(t){return t instanceof a.NonTerminal?{kind:"rule",name:t.referencedRule.name}:{kind:"token"}}},3062:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isSequenceProd=e.isBranchingProd=e.isOptionalProd=e.getProductionDslName=e.GAstVisitor=e.serializeProduction=e.serializeGrammar=e.Alternative=e.Alternation=e.RepetitionWithSeparator=e.RepetitionMandatoryWithSeparator=e.RepetitionMandatory=e.Repetition=e.Option=e.NonTerminal=e.Terminal=e.Rule=void 0;var n=r(4490);Object.defineProperty(e,"Rule",{enumerable:!0,get:function(){return n.Rule}}),Object.defineProperty(e,"Terminal",{enumerable:!0,get:function(){return n.Terminal}}),Object.defineProperty(e,"NonTerminal",{enumerable:!0,get:function(){return n.NonTerminal}}),Object.defineProperty(e,"Option",{enumerable:!0,get:function(){return n.Option}}),Object.defineProperty(e,"Repetition",{enumerable:!0,get:function(){return n.Repetition}}),Object.defineProperty(e,"RepetitionMandatory",{enumerable:!0,get:function(){return n.RepetitionMandatory}}),Object.defineProperty(e,"RepetitionMandatoryWithSeparator",{enumerable:!0,get:function(){return n.RepetitionMandatoryWithSeparator}}),Object.defineProperty(e,"RepetitionWithSeparator",{enumerable:!0,get:function(){return n.RepetitionWithSeparator}}),Object.defineProperty(e,"Alternation",{enumerable:!0,get:function(){return n.Alternation}}),Object.defineProperty(e,"Alternative",{enumerable:!0,get:function(){return n.Alternative}}),Object.defineProperty(e,"serializeGrammar",{enumerable:!0,get:function(){return n.serializeGrammar}}),Object.defineProperty(e,"serializeProduction",{enumerable:!0,get:function(){return n.serializeProduction}});var i=r(2156);Object.defineProperty(e,"GAstVisitor",{enumerable:!0,get:function(){return i.GAstVisitor}});var o=r(3559);Object.defineProperty(e,"getProductionDslName",{enumerable:!0,get:function(){return o.getProductionDslName}}),Object.defineProperty(e,"isOptionalProd",{enumerable:!0,get:function(){return o.isOptionalProd}}),Object.defineProperty(e,"isBranchingProd",{enumerable:!0,get:function(){return o.isBranchingProd}}),Object.defineProperty(e,"isSequenceProd",{enumerable:!0,get:function(){return o.isSequenceProd}})},3559:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getProductionDslName=e.isBranchingProd=e.isOptionalProd=e.isSequenceProd=void 0;var i=n(r(9704)),o=n(r(711)),a=n(r(4721)),s=r(4490);e.isSequenceProd=function(t){return t instanceof s.Alternative||t instanceof s.Option||t instanceof s.Repetition||t instanceof s.RepetitionMandatory||t instanceof s.RepetitionMandatoryWithSeparator||t instanceof s.RepetitionWithSeparator||t instanceof s.Terminal||t instanceof s.Rule},e.isOptionalProd=function t(e,r){return void 0===r&&(r=[]),!!(e instanceof s.Option||e instanceof s.Repetition||e instanceof s.RepetitionWithSeparator)||(e instanceof s.Alternation?(0,i.default)(e.definition,(function(e){return t(e,r)})):!(e instanceof s.NonTerminal&&(0,a.default)(r,e))&&(e instanceof s.AbstractProduction&&(e instanceof s.NonTerminal&&r.push(e),(0,o.default)(e.definition,(function(e){return t(e,r)})))))},e.isBranchingProd=function(t){return t instanceof s.Alternation},e.getProductionDslName=function(t){if(t instanceof s.NonTerminal)return"SUBRULE";if(t instanceof s.Option)return"OPTION";if(t instanceof s.Alternation)return"OR";if(t instanceof s.RepetitionMandatory)return"AT_LEAST_ONE";if(t instanceof s.RepetitionMandatoryWithSeparator)return"AT_LEAST_ONE_SEP";if(t instanceof s.RepetitionWithSeparator)return"MANY_SEP";if(t instanceof s.Repetition)return"MANY";if(t instanceof s.Terminal)return"CONSUME";throw Error("non exhaustive match")}},4490:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.serializeProduction=e.serializeGrammar=e.Terminal=e.Alternation=e.RepetitionWithSeparator=e.Repetition=e.RepetitionMandatoryWithSeparator=e.RepetitionMandatory=e.Option=e.Alternative=e.Rule=e.NonTerminal=e.AbstractProduction=void 0;var a=o(r(5161)),s=o(r(4486)),u=o(r(7037)),c=o(r(6347)),l=o(r(5937)),f=o(r(8583));function p(t){return e=t,(0,u.default)(e.LABEL)&&""!==e.LABEL?t.LABEL:t.name;var e}var h=function(){function t(t){this._definition=t}return Object.defineProperty(t.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),t.prototype.accept=function(t){t.visit(this),(0,s.default)(this.definition,(function(e){e.accept(t)}))},t}();e.AbstractProduction=h;var d=function(t){function e(e){var r=t.call(this,[])||this;return r.idx=1,(0,f.default)(r,(0,l.default)(e,(function(t){return void 0!==t}))),r}return i(e,t),Object.defineProperty(e.prototype,"definition",{get:function(){return void 0!==this.referencedRule?this.referencedRule.definition:[]},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.accept=function(t){t.visit(this)},e}(h);e.NonTerminal=d;var E=function(t){function e(e){var r=t.call(this,e.definition)||this;return r.orgText="",(0,f.default)(r,(0,l.default)(e,(function(t){return void 0!==t}))),r}return i(e,t),e}(h);e.Rule=E;var T=function(t){function e(e){var r=t.call(this,e.definition)||this;return r.ignoreAmbiguities=!1,(0,f.default)(r,(0,l.default)(e,(function(t){return void 0!==t}))),r}return i(e,t),e}(h);e.Alternative=T;var v=function(t){function e(e){var r=t.call(this,e.definition)||this;return r.idx=1,(0,f.default)(r,(0,l.default)(e,(function(t){return void 0!==t}))),r}return i(e,t),e}(h);e.Option=v;var m=function(t){function e(e){var r=t.call(this,e.definition)||this;return r.idx=1,(0,f.default)(r,(0,l.default)(e,(function(t){return void 0!==t}))),r}return i(e,t),e}(h);e.RepetitionMandatory=m;var y=function(t){function e(e){var r=t.call(this,e.definition)||this;return r.idx=1,(0,f.default)(r,(0,l.default)(e,(function(t){return void 0!==t}))),r}return i(e,t),e}(h);e.RepetitionMandatoryWithSeparator=y;var A=function(t){function e(e){var r=t.call(this,e.definition)||this;return r.idx=1,(0,f.default)(r,(0,l.default)(e,(function(t){return void 0!==t}))),r}return i(e,t),e}(h);e.Repetition=A;var _=function(t){function e(e){var r=t.call(this,e.definition)||this;return r.idx=1,(0,f.default)(r,(0,l.default)(e,(function(t){return void 0!==t}))),r}return i(e,t),e}(h);e.RepetitionWithSeparator=_;var g=function(t){function e(e){var r=t.call(this,e.definition)||this;return r.idx=1,r.ignoreAmbiguities=!1,r.hasPredicates=!1,(0,f.default)(r,(0,l.default)(e,(function(t){return void 0!==t}))),r}return i(e,t),Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),e}(h);e.Alternation=g;var O=function(){function t(t){this.idx=1,(0,f.default)(this,(0,l.default)(t,(function(t){return void 0!==t})))}return t.prototype.accept=function(t){t.visit(this)},t}();function L(t){function e(t){return(0,a.default)(t,L)}if(t instanceof d){var r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return(0,u.default)(t.label)&&(r.label=t.label),r}if(t instanceof T)return{type:"Alternative",definition:e(t.definition)};if(t instanceof v)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof m)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof y)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:L(new O({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof _)return{type:"RepetitionWithSeparator",idx:t.idx,separator:L(new O({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof A)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof g)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof O){var n={type:"Terminal",name:t.terminalType.name,label:p(t.terminalType),idx:t.idx};(0,u.default)(t.label)&&(n.terminalLabel=t.label);var i=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(n.pattern=(0,c.default)(i)?i.source:i),n}if(t instanceof E)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}e.Terminal=O,e.serializeGrammar=function(t){return(0,a.default)(t,L)},e.serializeProduction=L},2156:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GAstVisitor=void 0;var n=r(4490),i=function(){function t(){}return t.prototype.visit=function(t){var e=t;switch(e.constructor){case n.NonTerminal:return this.visitNonTerminal(e);case n.Alternative:return this.visitAlternative(e);case n.Option:return this.visitOption(e);case n.RepetitionMandatory:return this.visitRepetitionMandatory(e);case n.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(e);case n.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(e);case n.Repetition:return this.visitRepetition(e);case n.Alternation:return this.visitAlternation(e);case n.Terminal:return this.visitTerminal(e);case n.Rule:return this.visitRule(e);default:throw Error("non exhaustive match")}},t.prototype.visitNonTerminal=function(t){},t.prototype.visitAlternative=function(t){},t.prototype.visitOption=function(t){},t.prototype.visitRepetition=function(t){},t.prototype.visitRepetitionMandatory=function(t){},t.prototype.visitRepetitionMandatoryWithSeparator=function(t){},t.prototype.visitRepetitionWithSeparator=function(t){},t.prototype.visitAlternation=function(t){},t.prototype.visitTerminal=function(t){},t.prototype.visitRule=function(t){},t}();e.GAstVisitor=i},8877:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toFastProperties=e.timer=e.PRINT_ERROR=e.PRINT_WARNING=void 0;var n=r(3017);Object.defineProperty(e,"PRINT_WARNING",{enumerable:!0,get:function(){return n.PRINT_WARNING}}),Object.defineProperty(e,"PRINT_ERROR",{enumerable:!0,get:function(){return n.PRINT_ERROR}});var i=r(9870);Object.defineProperty(e,"timer",{enumerable:!0,get:function(){return i.timer}});var o=r(5591);Object.defineProperty(e,"toFastProperties",{enumerable:!0,get:function(){return o.toFastProperties}})},3017:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PRINT_WARNING=e.PRINT_ERROR=void 0,e.PRINT_ERROR=function(t){console&&console.error&&console.error("Error: ".concat(t))},e.PRINT_WARNING=function(t){console&&console.warn&&console.warn("Warning: ".concat(t))}},9870:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.timer=void 0,e.timer=function(t){var e=(new Date).getTime(),r=t();return{time:(new Date).getTime()-e,value:r}}},5591:(t,e)=>{"use strict";function r(t){function e(){}e.prototype=t;var r=new e;function n(){return typeof r.bar}return n(),n(),t}Object.defineProperty(e,"__esModule",{value:!0}),e.toFastProperties=void 0,e.toFastProperties=r},1867:(t,e,r)=>{"use strict";function n(t){return(t=Array.isArray(t)?t[0]:t).image&&!0}function i(t){return"string"==typeof t}function o(t){return Number.isFinite(t)}function a(t){return null==t}function s(t,e,r){return a(t)?"":`${r||""}${t}${e||""}`}function u(t){return t.parameters&&0!==t.parameters.length?(e=t.parameters)&&e.every((t=>i(t)))?t.parameters:i(t.parameters[0])?[t.parameters[0]]:u(t.parameters[0]):[];var e}function c(t){return t&&!a(t.alias)}function l(t){return i(t.relationshipName)}function f(t){return!!t&&!!t.type&&"FieldSubquery"===t.type}function p(t){return!!t&&!!t.operator&&!!t.right}function h(t){return!!t&&!!t.operator&&!!t.right}function d(t){return!!t&&!!t.operator&&!!t.right}function E(t){return t&&i(t.field)&&i(t.operator)&&!a(t.value)}function T(t){return t&&i(t.field)&&i(t.operator)&&!a(t.value)&&("DATE_LITERAL"===t.literalType||Array.isArray(t.literalType)&&"DATE_LITERAL"===t.literalType[0])}function v(t){return t&&i(t.field)&&i(t.operator)&&!a(t.value)&&!a(t.dateLiteralVariable)}function m(t){return t&&!a(t.fn)&&i(t.operator)&&!a(t.value)}function y(t){return t&&o(t.openParen)&&a(t.operator)&&a(t.field)&&a(t.fn)&&a(t.closeParen)}function A(t){return t&&i(t.field)&&i(t.operator)&&!a(t.valueQuery)&&a(t.value)}function _(t){return t&&!a(t.field)}function g(t){return t&&!a(t.fn)}function O(t){return t&&!a(t.field)}function L(t){return t&&!a(t.fn)}function N(t,e,r){if(a(e))return t;if(r&&"APEX_BIND_VARIABLE"!==e&&function(t){return["IN","NOT IN","INCLUDES","EXCLUDES"].includes(t)}(r)&&!Array.isArray(t)&&(t=[t],e=Array.isArray(e)?e:[e]),Array.isArray(e)&&Array.isArray(t))return t.map(((t,r)=>function(t,e){if("STRING"===e)return i(t)&&t.startsWith("'")?t:`'${t??""}'`;return t}(t,e?.[r])));switch(Array.isArray(e)&&(e=e[0]),e){case"STRING":return Array.isArray(t)?t.filter(Boolean).map((t=>i(t)&&t.startsWith("'")?t:`'${t??""}'`)):i(t=String(t??""))&&t.startsWith("'")?t:`'${t??""}'`;case"APEX_BIND_VARIABLE":return`:${t}`;default:return t}}r.d(e,{IC:()=>pn,rz:()=>cn,dV:()=>ln,nu:()=>c,OV:()=>f,sC:()=>O,vf:()=>L,xL:()=>h,Jp:()=>_,tk:()=>g,tJ:()=>l,v$:()=>E,pH:()=>m,CL:()=>A,Ti:()=>T,fS:()=>v,g3:()=>p,Y3:()=>d,mB:()=>un});var R=r(417);R.ue,R.r3;const S=R.wd,I=(R._o,R.sd,R.N7,R.nu,R.Mf,R.dV,R.hW),C=(R.Bw,R.P7,R.z5,R.Sj,R.Oq,R.Wx,R._b,R.b4,R.hI,R.ej,R.fK,R.pT,R.$9,R.oI,R.q4,R.LK,R.H7,R.V3),x=(R.dK,R.ZW,R.Hs,R.Kv,R.oC,R.bS,R.N$,R.SE,R.l$,R.ol,R.vA,C({name:"KeywordReserved",pattern:I.NA})),P=C({name:"Keyword",pattern:I.NA}),b=C({name:"DateFunction",pattern:I.NA}),M=C({name:"AggregateFunction",pattern:I.NA}),k=C({name:"LocationFunction",pattern:I.NA}),U=C({name:"FieldsFunction",pattern:I.NA}),F=C({name:"FieldsFunctionParamIdentifier",pattern:I.NA}),D=C({name:"OtherFunction",pattern:I.NA}),w=C({name:"DateLiteral",pattern:I.NA}),B=C({name:"DateLiteralNotIdentifier",pattern:I.NA}),j=C({name:"DateNLiteral",pattern:I.NA}),G=C({name:"RelationalOperator",pattern:I.NA}),W=C({name:"SymbolIdentifier",pattern:I.NA}),V=C({name:"DateIdentifier",pattern:I.NA}),Y=C({name:"NumberIdentifier",pattern:I.NA}),K=C({name:"DecimalNumberIdentifier",pattern:I.NA}),$=C({name:"IntegerNumberIdentifier",pattern:I.NA}),H=C({name:"IdentifierNotKeyword",pattern:I.NA}),z=C({name:"UsingScopeEnumeration",pattern:I.NA}),X=C({name:"RParenMismatch",pattern:I.NA}),q=/[a-zA-Z][a-zA-Z0-9_.]*/y;const Q=C({name:"Identifier",pattern:function(t,e){q.lastIndex=e;const r=q.exec(t);return r&&r[0].includes("..")?null:r},line_breaks:!1,categories:[H],start_chars_hint:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]}),Z=C({name:"StringIdentifier",line_breaks:!0,pattern:/(')(?:(?=(\\?))\2.)*?\1/}),J=C({name:"WhiteSpace",pattern:/\s+/,group:I.SKIPPED}),tt=C({name:"AND",pattern:/AND/i,longer_alt:Q,categories:[P,x]}),et=C({name:"AS",pattern:/AS/i,longer_alt:Q,categories:[P,x]}),rt=C({name:"DESC",pattern:/DESC/i,longer_alt:Q,categories:[P,x]}),nt=C({name:"ASC",pattern:/ASC/i,longer_alt:Q,categories:[P,x]}),it=C({name:"ORDER_BY",pattern:/ORDER BY/i,longer_alt:Q}),ot=C({name:"CUBE",pattern:/CUBE/i,longer_alt:Q,categories:[P,x]}),at=C({name:"ELSE",pattern:/ELSE/i,longer_alt:Q,categories:[P,x]}),st=C({name:"EXCLUDES",pattern:/EXCLUDES/i,longer_alt:Q,categories:[P,x]}),ut=C({name:"FALSE",pattern:/FALSE/i,longer_alt:Q,categories:[P,x]}),ct=C({name:"FIRST",pattern:/FIRST/i,longer_alt:Q,categories:[P,x]}),lt=C({name:"FROM",pattern:/FROM/i,longer_alt:Q,categories:[P,x]}),ft=C({name:"GROUP_BY",pattern:/GROUP BY/i,longer_alt:Q}),pt=C({name:"HAVING",pattern:/HAVING/i,longer_alt:Q,categories:[P,x]}),ht=C({name:"IN",pattern:/IN/i,longer_alt:Q,categories:[P,x]}),dt=C({name:"INCLUDES",pattern:/INCLUDES/i,longer_alt:Q,categories:[P,x]}),Et=C({name:"LAST",pattern:/LAST/i,longer_alt:Q,categories:[P,x]}),Tt=C({name:"LIKE",pattern:/LIKE/i,longer_alt:Q,categories:[P,x]}),vt=C({name:"LIMIT",pattern:/LIMIT/i,longer_alt:Q,categories:[P,x]}),mt=C({name:"NOT",pattern:/NOT/i,longer_alt:Q,categories:[P,x]}),yt=C({name:"NULL",pattern:/NULL/i,longer_alt:Q,categories:[P,x]}),At=C({name:"NULLS",pattern:/NULLS/i,longer_alt:Q,categories:[P,x]}),_t=C({name:"OR",pattern:/OR/i,longer_alt:Q,categories:[P,x]}),gt=C({name:"ROLLUP",pattern:/ROLLUP/i,longer_alt:Q,categories:[P,x]}),Ot=C({name:"SELECT",pattern:/SELECT/i,longer_alt:Q,categories:[P,x]}),Lt=C({name:"TRUE",pattern:/TRUE/i,longer_alt:Q,categories:[P,x]}),Nt=C({name:"USING",pattern:/USING/i,longer_alt:Q,categories:[P,x]}),Rt=C({name:"WHERE",pattern:/WHERE/i,longer_alt:Q,categories:[P,x]}),St=C({name:"WITH",pattern:/WITH/i,longer_alt:Q,categories:[P,x]}),It=C({name:"FOR",pattern:/FOR/i,longer_alt:Q,categories:[P,x]}),Ct=C({name:"UPDATE",pattern:/UPDATE/i,longer_alt:Q,categories:[P,x]}),xt=C({name:"ABOVE",pattern:/ABOVE/i,longer_alt:Q,categories:[P,Q]}),Pt=C({name:"ABOVE_OR_BELOW",pattern:/ABOVE_OR_BELOW/i,longer_alt:Q,categories:[P,Q]}),bt=C({name:"new",pattern:/new/i,longer_alt:Q,categories:[P,Q]}),Mt=C({name:"AT",pattern:/AT/i,longer_alt:Q,categories:[P,Q]}),kt=C({name:"BELOW",pattern:/BELOW/i,longer_alt:Q,categories:[P,Q]}),Ut=C({name:"DATA_CATEGORY",pattern:/DATA CATEGORY/i,longer_alt:Q,categories:[P]}),Ft=C({name:"END",pattern:/END/i,longer_alt:Q,categories:[P,Q]}),Dt=C({name:"OFFSET",pattern:/OFFSET/i,longer_alt:Q,categories:[P,Q]}),wt=C({name:"REFERENCE",pattern:/REFERENCE/i,longer_alt:Q,categories:[P,Q]}),Bt=C({name:"SCOPE",pattern:/SCOPE/i,longer_alt:Q,categories:[P,Q]}),jt=C({name:"TRACKING",pattern:/TRACKING/i,longer_alt:Q,categories:[P,Q]}),Gt=C({name:"THEN",pattern:/THEN/i,longer_alt:Q,categories:[P,Q]}),Wt=C({name:"TYPEOF",pattern:/TYPEOF/i,longer_alt:Q,categories:[P,Q]}),Vt=C({name:"VIEW",pattern:/VIEW/i,longer_alt:Q,categories:[P,Q]}),Yt=C({name:"VIEWSTAT",pattern:/VIEWSTAT/i,longer_alt:Q,categories:[P,Q]}),Kt=C({name:"WHEN",pattern:/WHEN/i,longer_alt:Q,categories:[P,Q]}),$t=C({name:"SECURITY_ENFORCED",pattern:/SECURITY_ENFORCED/i,longer_alt:Q,categories:[P,Q]}),Ht=C({name:"SYSTEM_MODE",pattern:/SYSTEM_MODE/i,longer_alt:Q,categories:[P,Q]}),zt=C({name:"USER_MODE",pattern:/USER_MODE/i,longer_alt:Q,categories:[P,Q]}),Xt=C({name:"CALENDAR_MONTH",pattern:/CALENDAR_MONTH/i,longer_alt:Q,categories:[b,Q]}),qt=C({name:"CALENDAR_QUARTER",pattern:/CALENDAR_QUARTER/i,longer_alt:Q,categories:[b,Q]}),Qt=C({name:"CALENDAR_YEAR",pattern:/CALENDAR_YEAR/i,longer_alt:Q,categories:[b,Q]}),Zt=C({name:"DAY_IN_MONTH",pattern:/DAY_IN_MONTH/i,longer_alt:Q,categories:[b,Q]}),Jt=C({name:"DAY_IN_WEEK",pattern:/DAY_IN_WEEK/i,longer_alt:Q,categories:[b,Q]}),te=C({name:"DAY_IN_YEAR",pattern:/DAY_IN_YEAR/i,longer_alt:Q,categories:[b,Q]}),ee=C({name:"DAY_ONLY",pattern:/DAY_ONLY/i,longer_alt:Q,categories:[b,Q]}),re=C({name:"FISCAL_MONTH",pattern:/FISCAL_MONTH/i,longer_alt:Q,categories:[b,Q]}),ne=C({name:"FISCAL_QUARTER",pattern:/FISCAL_QUARTER/i,longer_alt:Q,categories:[b,Q]}),ie=C({name:"FISCAL_YEAR",pattern:/FISCAL_YEAR/i,longer_alt:Q,categories:[b,Q]}),oe=C({name:"HOUR_IN_DAY",pattern:/HOUR_IN_DAY/i,longer_alt:Q,categories:[b,Q]}),ae=C({name:"WEEK_IN_MONTH",pattern:/WEEK_IN_MONTH/i,longer_alt:Q,categories:[b,Q]}),se=C({name:"WEEK_IN_YEAR",pattern:/WEEK_IN_YEAR/i,longer_alt:Q,categories:[b,Q]}),ue=C({name:"AVG",pattern:/AVG/i,longer_alt:Q,categories:[M,Q]}),ce=C({name:"COUNT",pattern:/COUNT/i,longer_alt:Q,categories:[M,Q]}),le=C({name:"COUNT_DISTINCT",pattern:/COUNT_DISTINCT/i,longer_alt:Q,categories:[M,Q]}),fe=C({name:"MIN",pattern:/MIN/i,longer_alt:Q,categories:[M,Q]}),pe=C({name:"MAX",pattern:/MAX/i,longer_alt:Q,categories:[M,Q]}),he=C({name:"SUM",pattern:/SUM/i,longer_alt:Q,categories:[M,Q]}),de=C({name:"DISTANCE",pattern:/DISTANCE/i,longer_alt:Q,categories:[k,Q]}),Ee=C({name:"GEOLOCATION",pattern:/GEOLOCATION/i,longer_alt:Q,categories:[k,Q]}),Te=C({name:"FIELDS",pattern:/FIELDS/i,longer_alt:Q,categories:[U,Q]}),ve=C({name:"FORMAT",pattern:/FORMAT/i,longer_alt:Q,categories:[D,Q]}),me=C({name:"toLabel",pattern:/TOLABEL/i,longer_alt:Q,categories:[D,Q]}),ye=C({name:"convertTimezone",pattern:/CONVERTTIMEZONE/i,longer_alt:Q,categories:[D,Q]}),Ae=C({name:"convertCurrency",pattern:/CONVERTCURRENCY/i,longer_alt:Q,categories:[D,Q]}),_e=C({name:"GROUPING",pattern:/GROUPING/i,longer_alt:Q,categories:[D,Q]}),ge=C({name:"ALL",pattern:/ALL/i,longer_alt:Q,categories:[F,Q]}),Oe=C({name:"CUSTOM",pattern:/CUSTOM/i,longer_alt:Q,categories:[F,Q]}),Le=C({name:"STANDARD",pattern:/STANDARD/i,longer_alt:Q,categories:[F,Q]}),Ne=C({name:"YESTERDAY",pattern:/YESTERDAY/i,longer_alt:Q,categories:[w,Q,B]}),Re=C({name:"TODAY",pattern:/TODAY/i,longer_alt:Q,categories:[w,Q,B]}),Se=C({name:"TOMORROW",pattern:/TOMORROW/i,longer_alt:Q,categories:[w,Q,B]}),Ie=C({name:"LAST_WEEK",pattern:/LAST_WEEK/i,longer_alt:Q,categories:[w,Q,B]}),Ce=C({name:"THIS_WEEK",pattern:/THIS_WEEK/i,longer_alt:Q,categories:[w,Q,B]}),xe=C({name:"NEXT_WEEK",pattern:/NEXT_WEEK/i,longer_alt:Q,categories:[w,Q,B]}),Pe=C({name:"LAST_MONTH",pattern:/LAST_MONTH/i,longer_alt:Q,categories:[w,Q,B]}),be=C({name:"THIS_MONTH",pattern:/THIS_MONTH/i,longer_alt:Q,categories:[w,Q,B]}),Me=C({name:"NEXT_MONTH",pattern:/NEXT_MONTH/i,longer_alt:Q,categories:[w,Q,B]}),ke=C({name:"LAST_90_DAYS",pattern:/LAST_90_DAYS/i,longer_alt:Q,categories:[w,Q,B]}),Ue=C({name:"NEXT_90_DAYS",pattern:/NEXT_90_DAYS/i,longer_alt:Q,categories:[w,Q,B]}),Fe=C({name:"THIS_QUARTER",pattern:/THIS_QUARTER/i,longer_alt:Q,categories:[w,Q,B]}),De=C({name:"LAST_QUARTER",pattern:/LAST_QUARTER/i,longer_alt:Q,categories:[w,Q,B]}),we=C({name:"NEXT_QUARTER",pattern:/NEXT_QUARTER/i,longer_alt:Q,categories:[w,Q,B]}),Be=C({name:"THIS_YEAR",pattern:/THIS_YEAR/i,longer_alt:Q,categories:[w,Q,B]}),je=C({name:"LAST_YEAR",pattern:/LAST_YEAR/i,longer_alt:Q,categories:[w,Q,B]}),Ge=C({name:"NEXT_YEAR",pattern:/NEXT_YEAR/i,longer_alt:Q,categories:[w,Q,B]}),We=C({name:"THIS_FISCAL_QUARTER",pattern:/THIS_FISCAL_QUARTER/i,longer_alt:Q,categories:[w,Q,B]}),Ve=C({name:"LAST_FISCAL_QUARTER",pattern:/LAST_FISCAL_QUARTER/i,longer_alt:Q,categories:[w,Q,B]}),Ye=C({name:"NEXT_FISCAL_QUARTER",pattern:/NEXT_FISCAL_QUARTER/i,longer_alt:Q,categories:[w,Q,B]}),Ke=C({name:"THIS_FISCAL_YEAR",pattern:/THIS_FISCAL_YEAR/i,longer_alt:Q,categories:[w,Q,B]}),$e=C({name:"LAST_FISCAL_YEAR",pattern:/LAST_FISCAL_YEAR/i,longer_alt:Q,categories:[w,Q,B]}),He=C({name:"NEXT_FISCAL_YEAR",pattern:/NEXT_FISCAL_YEAR/i,longer_alt:Q,categories:[w,Q,B]}),ze=C({name:"NEXT_N_DAYS",pattern:/NEXT_N_DAYS/i,longer_alt:Q,categories:[j,Q]}),Xe=C({name:"LAST_N_DAYS",pattern:/LAST_N_DAYS/i,longer_alt:Q,categories:[j,Q]}),qe=C({name:"N_DAYS_AGO",pattern:/N_DAYS_AGO/i,longer_alt:Q,categories:[j,Q]}),Qe=C({name:"NEXT_N_WEEKS",pattern:/NEXT_N_WEEKS/i,longer_alt:Q,categories:[j,Q]}),Ze=C({name:"LAST_N_WEEKS",pattern:/LAST_N_WEEKS/i,longer_alt:Q,categories:[j,Q]}),Je=C({name:"N_WEEKS_AGO",pattern:/N_WEEKS_AGO/i,longer_alt:Q,categories:[j,Q]}),tr=C({name:"NEXT_N_MONTHS",pattern:/NEXT_N_MONTHS/i,longer_alt:Q,categories:[j,Q]}),er=C({name:"LAST_N_MONTHS",pattern:/LAST_N_MONTHS/i,longer_alt:Q,categories:[j,Q]}),rr=C({name:"N_MONTHS_AGO",pattern:/N_MONTHS_AGO/i,longer_alt:Q,categories:[j,Q]}),nr=C({name:"NEXT_N_QUARTERS",pattern:/NEXT_N_QUARTERS/i,longer_alt:Q,categories:[j,Q]}),ir=C({name:"LAST_N_QUARTERS",pattern:/LAST_N_QUARTERS/i,longer_alt:Q,categories:[j,Q]}),or=C({name:"N_QUARTERS_AGO",pattern:/N_QUARTERS_AGO/i,longer_alt:Q,categories:[j,Q]}),ar=C({name:"NEXT_N_YEARS",pattern:/NEXT_N_YEARS/i,longer_alt:Q,categories:[j,Q]}),sr=C({name:"LAST_N_YEARS",pattern:/LAST_N_YEARS/i,longer_alt:Q,categories:[j,Q]}),ur=C({name:"N_YEARS_AGO",pattern:/N_YEARS_AGO/i,longer_alt:Q,categories:[j,Q]}),cr=C({name:"NEXT_N_FISCAL_QUARTERS",pattern:/NEXT_N_FISCAL_QUARTERS/i,longer_alt:Q,categories:[j,Q]}),lr=C({name:"LAST_N_FISCAL_QUARTERS",pattern:/LAST_N_FISCAL_QUARTERS/i,longer_alt:Q,categories:[j,Q]}),fr=C({name:"N_FISCAL_QUARTERS_AGO",pattern:/N_FISCAL_QUARTERS_AGO/i,longer_alt:Q,categories:[j,Q]}),pr=C({name:"NEXT_N_FISCAL_YEARS",pattern:/NEXT_N_FISCAL_YEARS/i,longer_alt:Q,categories:[j,Q]}),hr=C({name:"LAST_N_FISCAL_YEARS",pattern:/LAST_N_FISCAL_YEARS/i,longer_alt:Q,categories:[j,Q]}),dr=C({name:"N_FISCAL_YEARS_AGO",pattern:/N_FISCAL_YEARS_AGO/i,longer_alt:Q,categories:[j,Q]}),Er=C({name:"EQUAL",pattern:"=",categories:[G]}),Tr=C({name:"NOT_EQUAL",pattern:/!=|<>/,categories:[G]}),vr=C({name:"LESS_THAN",pattern:"<",categories:[G]}),mr=C({name:"LESS_THAN_OR_EQUAL",pattern:"<=",categories:[G]}),yr=C({name:"GREATER_THAN",pattern:">",categories:[G]}),Ar=C({name:"GREATER_THAN_OR_EQUAL",pattern:">=",categories:[G]}),_r=C({name:"DECIMAL",pattern:".",categories:[W]}),gr=C({name:"COLON",pattern:":",categories:[W]}),Or=C({name:"SEMICOLON",pattern:";",categories:[W]}),Lr=C({name:"COMMA",pattern:",",categories:[W]}),Nr=C({name:"ASTERISK",pattern:"*",categories:[W]}),Rr=C({name:"L_PAREN",pattern:"(",categories:[W]}),Sr=C({name:"R_PAREN",pattern:")",categories:[W]}),Ir=C({name:"L_SQUARE_BRACKET",pattern:"[",categories:[W]}),Cr=C({name:"R_SQUARE_BRACKET",pattern:"]",categories:[W]}),xr=C({name:"PLUS",pattern:"+",categories:[W]}),Pr=C({name:"MINUS",pattern:"-",categories:[W]}),br=C({name:"DATETIME",pattern:/[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?(\Z|\.[0-9]+Z|\+[0-9]{2}:[0-9]{2}|\-[0-9]{2}:[0-9]{2}|\+[0-9]{4}|\-[0-9]{4})/i,categories:[V]}),Mr=C({name:"DATE",pattern:/[0-9]{4}-[0-9]{2}-[0-9]{2}/,categories:[V]}),kr=C({name:"CURRENCY_PREFIXED_DECIMAL",pattern:/[a-zA-Z]{3}[0-9]+\.\d+/,longer_alt:Q,categories:[K]}),Ur=C({name:"SIGNED_DECIMAL",pattern:/(\-|\+)[0-9]*\.\d+/,categories:[Y,K]}),Fr=C({name:"UNSIGNED_DECIMAL",pattern:/[0-9]*\.\d+/,categories:[Y,K]}),Dr=C({name:"CURRENCY_PREFIXED_INTEGER",pattern:/[a-zA-Z]{3}[0-9]+/,longer_alt:Q,categories:[K,Q]}),wr=C({name:"SIGNED_INTEGER",pattern:/(\-|\+)[0-9]+/,categories:[Y,$]}),Br=C({name:"GEOLOCATION_UNIT",pattern:/'(mi|km)'/i,longer_alt:Q,categories:[Q]}),jr=C({name:"UNSIGNED_INTEGER",pattern:/0|[1-9]\d*/,categories:[Y,$]}),Gr=C({name:"Delegated",pattern:/DELEGATED/i,longer_alt:Q,categories:[z,Q],start_chars_hint:["D","d"]}),Wr=C({name:"Everything",pattern:/EVERYTHING/i,longer_alt:Q,categories:[z,Q],start_chars_hint:["E","e"]}),Vr=C({name:"MineAndMyGroups",pattern:/MINEANDMYGROUPS/i,longer_alt:Q,categories:[z,Q],start_chars_hint:["M","m"]}),Yr=C({name:"Mine",pattern:/MINE/i,longer_alt:Q,categories:[z,Q],start_chars_hint:["M","m"]}),Kr=C({name:"MyTerritory",pattern:/MY_TERRITORY/i,longer_alt:Q,categories:[z,Q],start_chars_hint:["M","m"]}),$r=C({name:"MyTeamTerritory",pattern:/MY_TEAM_TERRITORY/i,longer_alt:Q,categories:[z,Q],start_chars_hint:["M","m"]}),Hr=C({name:"Team",pattern:/TEAM/i,longer_alt:Q,categories:[z,Q],start_chars_hint:["T","t"]}),zr=C({name:"AllPrivate",pattern:/ALLPRIVATE/i,longer_alt:Q,categories:[z,Q],start_chars_hint:["A","a"]}),Xr=[J,tt,nt,et,it,ot,rt,at,st,ut,ct,lt,_e,ft,pt,dt,Tt,vt,At,yt,gt,Ot,Lt,Nt,Rt,St,Ct,Gr,Wr,Vr,Yr,Kr,$r,Hr,zr,Pt,xt,bt,Mt,kt,Ut,Ft,Dt,wt,Bt,jt,Gt,Wt,Yt,Vt,Kt,$t,Ht,zt,Xt,qt,Qt,Zt,Jt,te,ee,re,ne,ie,oe,ae,se,ue,le,ce,fe,pe,he,de,Ee,Te,ve,me,ye,Ae,Ne,Re,Se,Ie,Ce,xe,Pe,be,Me,ke,Ue,Fe,De,we,Be,je,Ge,We,Ve,Ye,Ke,$e,He,ze,Xe,qe,Qe,Ze,Je,tr,er,rr,nr,ir,or,ar,sr,ur,cr,lr,fr,pr,hr,dr,Br,ge,Oe,Le,ht,It,_t,Et,mt,kr,Dr,Z,Q,br,Mr,Ur,Fr,jr,wr,Er,Tr,mr,vr,Ar,yr,_r,gr,Or,Lr,Nr,Rr,Sr,Ir,Cr,xr,Pr],qr=new I(Xr,{ensureOptimizations:!0,skipValidations:!1});class Qr extends Error{constructor(t){super(`${t.message} (${t.line}:${t.column})`),this.name="LexingError"}}class Zr extends Error{constructor(t){super(t.message),this.name=t.name}}class Jr extends S{$_dateFunctionOr=void 0;$_aggregateFunction=void 0;$_otherFunction=void 0;$_atomicExpression=void 0;$_apexBindVariableExpression=void 0;$_arrayExpression=void 0;$_relationalOperator=void 0;$_selectClause=void 0;$_selectClauseFunctionIdentifier=void 0;$_withDataCategoryArr=void 0;allowApexBindVariables=!1;ignoreParseErrors=!1;constructor({ignoreParseErrors:t}={ignoreParseErrors:!1}){super(Xr,{skipValidations:!1,recoveryEnabled:!!t}),this.ignoreParseErrors=!!t,this.performSelfAnalysis()}selectStatement=this.RULE("selectStatement",(()=>{this.SUBRULE(this.selectClause),this.SUBRULE(this.fromClause),this.SUBRULE(this.clauseStatements)}));selectStatementPartial=this.RULE("selectStatementPartial",(()=>{this.OPTION((()=>{this.SUBRULE(this.selectClause)})),this.OPTION1((()=>{this.SUBRULE(this.fromClause)})),this.SUBRULE(this.clauseStatements)}));clauseStatements=this.RULE("clauseStatements",(()=>{this.OPTION((()=>{this.SUBRULE(this.usingScopeClause)})),this.OPTION1((()=>{this.SUBRULE(this.whereClause)})),this.OPTION2((()=>{this.MANY({DEF:()=>{this.SUBRULE(this.withClause)}})})),this.OPTION3((()=>{this.SUBRULE(this.groupByClause),this.OPTION4((()=>{this.SUBRULE(this.havingClause)}))})),this.OPTION5((()=>{this.SUBRULE(this.orderByClause)})),this.OPTION6((()=>{this.SUBRULE(this.limitClause)})),this.OPTION7((()=>{this.SUBRULE(this.offsetClause)})),this.OPTION8((()=>{this.SUBRULE(this.forViewOrReference)})),this.OPTION9((()=>{this.SUBRULE(this.updateTrackingViewstat)}))}));$_checkBalancedParens(t){if(!this.RECORDING_PHASE&&t){0!==t.left-t.right&&this.CONSUME(X,{ERR_MSG:"Expecting a token type of --\x3e RParen <-- but found --\x3e '' <--"})}}selectClause=this.RULE("selectClause",(()=>{this.CONSUME(Ot),this.AT_LEAST_ONE_SEP({SEP:Lr,DEF:()=>{this.OR(this.$_selectClause||(this.$_selectClause=[{ALT:()=>this.SUBRULE(this.selectClauseFunctionIdentifier,{LABEL:"field"})},{ALT:()=>this.SUBRULE(this.selectClauseSubqueryIdentifier,{LABEL:"field"})},{ALT:()=>this.SUBRULE(this.selectClauseTypeOf,{LABEL:"field"})},{ALT:()=>this.SUBRULE(this.selectClauseIdentifier,{LABEL:"field"})}]))}})}),{resyncEnabled:!1});selectClauseFunctionIdentifier=this.RULE("selectClauseFunctionIdentifier",(()=>{this.OR(this.$_selectClauseFunctionIdentifier||(this.$_selectClauseFunctionIdentifier=[{ALT:()=>this.SUBRULE(this.dateFunction,{LABEL:"fn"})},{ALT:()=>this.SUBRULE(this.aggregateFunction,{LABEL:"fn"})},{ALT:()=>this.SUBRULE(this.locationFunction,{LABEL:"fn"})},{ALT:()=>this.SUBRULE(this.fieldsFunction,{LABEL:"fn"})},{ALT:()=>this.SUBRULE(this.otherFunction,{LABEL:"fn"})}])),this.OPTION((()=>this.CONSUME(Q,{LABEL:"alias"})))}),{resyncEnabled:!1});selectClauseSubqueryIdentifier=this.RULE("selectClauseSubqueryIdentifier",(()=>{this.CONSUME(Rr),this.SUBRULE(this.selectStatement),this.CONSUME(Sr)}),{resyncEnabled:!1});selectClauseTypeOf=this.RULE("selectClauseTypeOf",(()=>{this.CONSUME(Wt),this.CONSUME(Q,{LABEL:"typeOfField"}),this.AT_LEAST_ONE({DEF:()=>{this.SUBRULE(this.selectClauseTypeOfThen)}}),this.OPTION((()=>{this.SUBRULE(this.selectClauseTypeOfElse)})),this.CONSUME(Ft)}),{resyncEnabled:!1});selectClauseIdentifier=this.RULE("selectClauseIdentifier",(()=>{this.CONSUME(Q,{LABEL:"field"}),this.OPTION((()=>this.CONSUME1(Q,{LABEL:"alias"})))}),{resyncEnabled:!1});selectClauseTypeOfThen=this.RULE("selectClauseTypeOfThen",(()=>{this.CONSUME(Kt),this.CONSUME(Q,{LABEL:"typeOfField"}),this.CONSUME(Gt),this.AT_LEAST_ONE_SEP({SEP:Lr,DEF:()=>{this.CONSUME1(Q,{LABEL:"field"})}})}),{resyncEnabled:!1});selectClauseTypeOfElse=this.RULE("selectClauseTypeOfElse",(()=>{this.CONSUME(at),this.AT_LEAST_ONE_SEP({SEP:Lr,DEF:()=>{this.CONSUME(Q,{LABEL:"field"})}})}),{resyncEnabled:!1});fromClause=this.RULE("fromClause",(()=>{this.CONSUME(lt),this.CONSUME(Q),this.OPTION({GATE:()=>!(this.LA(1).tokenType===Dt&&this.LA(2).tokenType===jr),DEF:()=>this.CONSUME1(Q,{LABEL:"alias"})})}),{resyncEnabled:!1});usingScopeClause=this.RULE("usingScopeClause",(()=>{this.CONSUME(Nt),this.CONSUME(Bt),this.CONSUME(z)}));whereClause=this.RULE("whereClause",(()=>{this.CONSUME(Rt);const t=this.getParenCount();this.AT_LEAST_ONE({DEF:()=>{this.SUBRULE(this.conditionExpression,{ARGS:[t,!0,!0]})}}),this.$_checkBalancedParens(t)}));whereClauseSubqueryIdentifier=this.RULE("whereClauseSubqueryIdentifier",(()=>{this.CONSUME(Rr),this.SUBRULE(this.selectStatement),this.CONSUME(Sr)}));conditionExpression=this.RULE("conditionExpression",((t,e,r)=>{t=this.getParenCount(t),this.OPTION((()=>{this.OR([{ALT:()=>this.CONSUME(tt,{LABEL:"logicalOperator"})},{ALT:()=>this.CONSUME(_t,{LABEL:"logicalOperator"})}])})),this.MANY({MAX_LOOKAHEAD:10,DEF:()=>this.SUBRULE(this.expressionPartWithNegation,{ARGS:[t],LABEL:"expressionNegation"})}),this.OR1({MAX_LOOKAHEAD:10,DEF:[{ALT:()=>this.SUBRULE(this.expression,{ARGS:[t,!1,e,r]})}]})}));withClause=this.RULE("withClause",(()=>{this.CONSUME(St),this.OR([{ALT:()=>this.CONSUME($t,{LABEL:"withSecurityEnforced"})},{ALT:()=>this.CONSUME(zt,{LABEL:"withAccessLevel"})},{ALT:()=>this.CONSUME(Ht,{LABEL:"withAccessLevel"})},{ALT:()=>this.SUBRULE(this.withDataCategory)}])}));withDataCategory=this.RULE("withDataCategory",(()=>{this.CONSUME(Ut),this.AT_LEAST_ONE_SEP({SEP:tt,DEF:()=>{this.SUBRULE(this.withDataCategoryArr)}})}));withDataCategoryArr=this.RULE("withDataCategoryArr",(()=>{this.CONSUME(Q,{LABEL:"dataCategoryGroupName"}),this.OR(this.$_withDataCategoryArr||(this.$_withDataCategoryArr=[{ALT:()=>this.CONSUME(Mt,{LABEL:"filteringSelector"})},{ALT:()=>this.CONSUME(xt,{LABEL:"filteringSelector"})},{ALT:()=>this.CONSUME(kt,{LABEL:"filteringSelector"})},{ALT:()=>this.CONSUME(Pt,{LABEL:"filteringSelector"})}])),this.OPTION((()=>{this.CONSUME1(Rr)})),this.AT_LEAST_ONE_SEP1({SEP:Lr,DEF:()=>{this.CONSUME1(Q,{LABEL:"dataCategoryName"})}}),this.OPTION1((()=>{this.CONSUME2(Sr)}))}));groupByClause=this.RULE("groupByClause",(()=>{this.CONSUME(ft),this.AT_LEAST_ONE_SEP({SEP:Lr,DEF:()=>{this.OR([{ALT:()=>this.SUBRULE(this.cubeFunction,{LABEL:"groupBy"})},{ALT:()=>this.SUBRULE(this.rollupFunction,{LABEL:"groupBy"})},{ALT:()=>this.SUBRULE(this.dateFunction,{LABEL:"groupBy"})},{ALT:()=>this.CONSUME(Q,{LABEL:"groupBy"})}])}})}));havingClause=this.RULE("havingClause",(()=>{this.CONSUME(pt);const t=this.getParenCount();this.AT_LEAST_ONE({DEF:()=>{this.SUBRULE(this.conditionExpression,{ARGS:[t,!0,!1]})}}),this.$_checkBalancedParens(t)}));orderByClause=this.RULE("orderByClause",(()=>{this.CONSUME(it),this.AT_LEAST_ONE_SEP({SEP:Lr,DEF:()=>{this.OR([{ALT:()=>this.SUBRULE(this.orderByGroupingFunctionExpression,{LABEL:"orderByExpressionOrFn"})},{ALT:()=>this.SUBRULE(this.orderBySpecialFunctionExpression,{LABEL:"orderByExpressionOrFn"})},{ALT:()=>this.SUBRULE(this.orderByExpression,{LABEL:"orderByExpressionOrFn"})}])}})}));orderByExpression=this.RULE("orderByExpression",(()=>{this.CONSUME(Q),this.OPTION((()=>{this.OR([{ALT:()=>this.CONSUME(nt,{LABEL:"order"})},{ALT:()=>this.CONSUME(rt,{LABEL:"order"})}])})),this.OPTION1((()=>{this.CONSUME(At),this.OR1([{ALT:()=>this.CONSUME(ct,{LABEL:"nulls"})},{ALT:()=>this.CONSUME(Et,{LABEL:"nulls"})}])}))}));orderByGroupingFunctionExpression=this.RULE("orderByGroupingFunctionExpression",(()=>{this.CONSUME(_e,{LABEL:"fn"}),this.SUBRULE(this.functionExpression)}));orderBySpecialFunctionExpression=this.RULE("orderBySpecialFunctionExpression",(()=>{this.OR([{ALT:()=>this.SUBRULE(this.aggregateFunction)},{ALT:()=>this.SUBRULE(this.dateFunction)},{ALT:()=>this.SUBRULE(this.locationFunction)}]),this.OPTION((()=>{this.OR1([{ALT:()=>this.CONSUME(nt,{LABEL:"order"})},{ALT:()=>this.CONSUME(rt,{LABEL:"order"})}])})),this.OPTION1((()=>{this.CONSUME(At),this.OR2([{ALT:()=>this.CONSUME(ct,{LABEL:"nulls"})},{ALT:()=>this.CONSUME(Et,{LABEL:"nulls"})}])}))}));limitClause=this.RULE("limitClause",(()=>{this.CONSUME(vt),this.CONSUME(jr,{LABEL:"value"})}));offsetClause=this.RULE("offsetClause",(()=>{this.CONSUME(Dt),this.CONSUME(jr,{LABEL:"value"})}));dateFunction=this.RULE("dateFunction",(()=>{this.OR(this.$_dateFunctionOr||(this.$_dateFunctionOr=[{ALT:()=>this.CONSUME(Xt,{LABEL:"fn"})},{ALT:()=>this.CONSUME(qt,{LABEL:"fn"})},{ALT:()=>this.CONSUME(Qt,{LABEL:"fn"})},{ALT:()=>this.CONSUME(Zt,{LABEL:"fn"})},{ALT:()=>this.CONSUME(Jt,{LABEL:"fn"})},{ALT:()=>this.CONSUME(te,{LABEL:"fn"})},{ALT:()=>this.CONSUME(ee,{LABEL:"fn"})},{ALT:()=>this.CONSUME(re,{LABEL:"fn"})},{ALT:()=>this.CONSUME(ne,{LABEL:"fn"})},{ALT:()=>this.CONSUME(ie,{LABEL:"fn"})},{ALT:()=>this.CONSUME(oe,{LABEL:"fn"})},{ALT:()=>this.CONSUME(ae,{LABEL:"fn"})},{ALT:()=>this.CONSUME(se,{LABEL:"fn"})}])),this.SUBRULE(this.functionExpression)}));aggregateFunction=this.RULE("aggregateFunction",(()=>{this.OR(this.$_aggregateFunction||(this.$_aggregateFunction=[{ALT:()=>this.CONSUME(ue,{LABEL:"fn"})},{ALT:()=>this.CONSUME(ce,{LABEL:"fn"})},{ALT:()=>this.CONSUME(le,{LABEL:"fn"})},{ALT:()=>this.CONSUME(fe,{LABEL:"fn"})},{ALT:()=>this.CONSUME(pe,{LABEL:"fn"})},{ALT:()=>this.CONSUME(he,{LABEL:"fn"})}])),this.SUBRULE(this.functionExpression,{ARGS:[!0]})}));fieldsFunction=this.RULE("fieldsFunction",(()=>{this.CONSUME(Te,{LABEL:"fn"}),this.CONSUME(Rr),this.CONSUME(F,{LABEL:"params"}),this.CONSUME(Sr)}));otherFunction=this.RULE("otherFunction",(()=>{this.OR(this.$_otherFunction||(this.$_otherFunction=[{ALT:()=>this.CONSUME(ve,{LABEL:"fn"})},{ALT:()=>this.CONSUME(me,{LABEL:"fn"})},{ALT:()=>this.CONSUME(ye,{LABEL:"fn"})},{ALT:()=>this.CONSUME(Ae,{LABEL:"fn"})},{ALT:()=>this.CONSUME(_e,{LABEL:"fn"})}])),this.SUBRULE(this.functionExpression)}));cubeFunction=this.RULE("cubeFunction",(()=>{this.CONSUME(ot,{LABEL:"fn"}),this.SUBRULE(this.functionExpression)}));rollupFunction=this.RULE("rollupFunction",(()=>{this.CONSUME(gt,{LABEL:"fn"}),this.SUBRULE(this.functionExpression)}));functionExpression=this.RULE("functionExpression",(t=>{this.CONSUME(Rr),this.MANY_SEP({SEP:Lr,DEF:()=>{this.OR([{GATE:()=>!t,ALT:()=>this.SUBRULE(this.aggregateFunction,{LABEL:"params"})},{ALT:()=>this.SUBRULE(this.otherFunction,{LABEL:"params"})},{ALT:()=>this.CONSUME(Z,{LABEL:"params"})},{ALT:()=>this.CONSUME(Y,{LABEL:"params"})},{ALT:()=>this.CONSUME(Q,{LABEL:"params"})}])}}),this.CONSUME(Sr)}));locationFunction=this.RULE("locationFunction",(()=>{this.CONSUME(de),this.CONSUME(Rr),this.CONSUME(Q,{LABEL:"location1"}),this.CONSUME(Lr),this.OR([{ALT:()=>this.SUBRULE(this.geolocationFunction,{LABEL:"location2"})},{ALT:()=>this.CONSUME1(Q,{LABEL:"location2"})}]),this.CONSUME1(Lr),this.CONSUME(Br,{LABEL:"unit"}),this.CONSUME(Sr)}));geolocationFunction=this.RULE("geolocationFunction",(()=>{this.CONSUME(Ee),this.CONSUME(Rr),this.CONSUME(Y,{LABEL:"latitude"}),this.CONSUME(Lr),this.CONSUME1(Y,{LABEL:"longitude"}),this.CONSUME(Sr)}));expressionPartWithNegation=this.RULE("expressionPartWithNegation",(t=>{let e=0;this.MANY((()=>{this.CONSUME(Rr),e++})),this.CONSUME(mt,{LABEL:"expressionNegation"}),t&&e&&(t.left+=e)}));expression=this.RULE("expression",((t,e,r,n)=>{this.OPTION1((()=>{this.MANY1((()=>{this.CONSUME(Rr),t&&t.left++}))})),this.OR1([{GATE:()=>!!r,ALT:()=>this.SUBRULE(this.aggregateFunction,{LABEL:"lhs"})},{GATE:()=>!!n,ALT:()=>this.SUBRULE(this.locationFunction,{LABEL:"lhs"})},{ALT:()=>this.SUBRULE(this.dateFunction,{LABEL:"lhs"})},{ALT:()=>this.SUBRULE(this.otherFunction,{LABEL:"lhs"})},{ALT:()=>this.CONSUME(Q,{LABEL:"lhs"})}]),this.OR2([{ALT:()=>this.SUBRULE(this.expressionWithRelationalOperator,{LABEL:"operator"})},{ALT:()=>this.SUBRULE(this.expressionWithSetOperator,{LABEL:"operator",ARGS:[e]})}]),this.OPTION3((()=>{this.MANY2({GATE:()=>!t||t.left>t.right,DEF:()=>{this.CONSUME(Sr),t&&t.right++}})}))}));expressionWithRelationalOperator=this.RULE("expressionWithRelationalOperator",(()=>{this.SUBRULE(this.relationalOperator),this.SUBRULE(this.atomicExpression,{LABEL:"rhs"})}));expressionWithSetOperator=this.RULE("expressionWithSetOperator",(t=>{this.SUBRULE(this.setOperator),this.SUBRULE2(this.atomicExpression,{LABEL:"rhs",ARGS:[!0,t]})}));atomicExpression=this.RULE("atomicExpression",((t,e)=>{this.OR(this.$_atomicExpression||(this.$_atomicExpression=[{GATE:()=>this.allowApexBindVariables,ALT:()=>this.SUBRULE(this.apexBindVariableExpression)},{GATE:()=>t,ALT:()=>this.SUBRULE(this.arrayExpression)},{GATE:()=>t&&e,ALT:()=>this.SUBRULE(this.whereClauseSubqueryIdentifier)},{GATE:()=>!t,ALT:()=>this.CONSUME(V)},{GATE:()=>!t,ALT:()=>this.CONSUME(kr,{LABEL:"CurrencyPrefixedDecimal"})},{GATE:()=>!t,ALT:()=>this.CONSUME(Dr,{LABEL:"CurrencyPrefixedInteger"})},{GATE:()=>!t,ALT:()=>this.CONSUME(Y)},{GATE:()=>!t,ALT:()=>this.CONSUME(yt)},{GATE:()=>!t,ALT:()=>this.SUBRULE(this.booleanValue)},{GATE:()=>!t,ALT:()=>this.CONSUME(w)},{GATE:()=>!t,ALT:()=>this.SUBRULE(this.dateNLiteral)},{GATE:()=>!t,ALT:()=>this.CONSUME(Br,{LABEL:"StringIdentifier"})},{GATE:()=>!t,ALT:()=>this.CONSUME(Z)}]))}));apexBindVariableExpression=this.RULE("apexBindVariableExpression",(()=>{this.CONSUME(gr),this.OPTION((()=>{this.SUBRULE(this.apexBindVariableNewInstantiation,{LABEL:"apex"}),this.OPTION1((()=>{this.CONSUME(_r)}))})),this.MANY_SEP({SEP:_r,DEF:()=>{this.OR(this.$_apexBindVariableExpression||(this.$_apexBindVariableExpression=[{ALT:()=>this.SUBRULE(this.apexBindVariableFunctionCall,{LABEL:"apex"})},{ALT:()=>this.SUBRULE(this.apexBindVariableIdentifier,{LABEL:"apex"})}]))}})}));apexBindVariableIdentifier=this.RULE("apexBindVariableIdentifier",(()=>{this.CONSUME(Q),this.OPTION((()=>this.SUBRULE(this.apexBindVariableFunctionArrayAccessor)))}));apexBindVariableNewInstantiation=this.RULE("apexBindVariableNewInstantiation",(()=>{this.CONSUME(bt,{LABEL:"new"}),this.CONSUME(Q,{LABEL:"function"}),this.OPTION((()=>{this.SUBRULE(this.apexBindVariableGeneric)})),this.SUBRULE(this.apexBindVariableFunctionParams),this.OPTION1((()=>this.SUBRULE(this.apexBindVariableFunctionArrayAccessor)))}));apexBindVariableFunctionCall=this.RULE("apexBindVariableFunctionCall",(()=>{this.CONSUME(Q,{LABEL:"function"}),this.SUBRULE(this.apexBindVariableFunctionParams),this.OPTION((()=>this.SUBRULE(this.apexBindVariableFunctionArrayAccessor)))}));apexBindVariableGeneric=this.RULE("apexBindVariableGeneric",(()=>{this.CONSUME(vr),this.AT_LEAST_ONE_SEP({SEP:Lr,DEF:()=>{this.CONSUME(Q,{LABEL:"parameter"})}}),this.CONSUME(yr)}));apexBindVariableFunctionParams=this.RULE("apexBindVariableFunctionParams",(()=>{this.CONSUME(Rr),this.MANY_SEP({SEP:Lr,DEF:()=>{this.CONSUME(Q,{LABEL:"parameter"})}}),this.CONSUME(Sr)}));apexBindVariableFunctionArrayAccessor=this.RULE("apexBindVariableFunctionArrayAccessor",(()=>{this.CONSUME(Ir),this.OR([{ALT:()=>this.CONSUME(jr,{LABEL:"value"})},{ALT:()=>this.CONSUME(Q,{LABEL:"value"})}]),this.CONSUME(Cr)}));arrayExpression=this.RULE("arrayExpression",(()=>{this.CONSUME(Rr),this.AT_LEAST_ONE_SEP({SEP:Lr,DEF:()=>{this.OR(this.$_arrayExpression||(this.$_arrayExpression=[{ALT:()=>this.CONSUME(kr,{LABEL:"value"})},{ALT:()=>this.CONSUME(Dr,{LABEL:"value"})},{ALT:()=>this.CONSUME(Y,{LABEL:"value"})},{ALT:()=>this.CONSUME(V,{LABEL:"value"})},{ALT:()=>this.CONSUME(yt,{LABEL:"value"})},{ALT:()=>this.CONSUME(Lt,{LABEL:"value"})},{ALT:()=>this.CONSUME(ut,{LABEL:"value"})},{ALT:()=>this.CONSUME(w,{LABEL:"value"})},{ALT:()=>this.SUBRULE(this.dateNLiteral,{LABEL:"value"})},{ALT:()=>this.CONSUME(Br,{LABEL:"value"})},{ALT:()=>this.CONSUME(Z,{LABEL:"value"})}]))}}),this.CONSUME(Sr)}));relationalOperator=this.RULE("relationalOperator",(()=>{this.OR(this.$_relationalOperator||(this.$_relationalOperator=[{ALT:()=>this.CONSUME(Er,{LABEL:"operator"})},{ALT:()=>this.CONSUME(Tr,{LABEL:"operator"})},{ALT:()=>this.CONSUME(yr,{LABEL:"operator"})},{ALT:()=>this.CONSUME(Ar,{LABEL:"operator"})},{ALT:()=>this.CONSUME(vr,{LABEL:"operator"})},{ALT:()=>this.CONSUME(mr,{LABEL:"operator"})},{ALT:()=>this.CONSUME(Tt,{LABEL:"operator"})}]))}));setOperator=this.RULE("setOperator",(()=>{this.OR([{ALT:()=>this.CONSUME(ht,{LABEL:"operator"})},{ALT:()=>this.SUBRULE(this.notInOperator,{LABEL:"notIn"})},{ALT:()=>this.CONSUME(dt,{LABEL:"operator"})},{ALT:()=>this.CONSUME(st,{LABEL:"operator"})}])}));notInOperator=this.RULE("notInOperator",(()=>{this.CONSUME(mt,{LABEL:"operator"}),this.CONSUME(ht,{LABEL:"operator"})}));booleanValue=this.RULE("booleanValue",(()=>{this.OR([{ALT:()=>this.CONSUME(Lt,{LABEL:"boolean"})},{ALT:()=>this.CONSUME(ut,{LABEL:"boolean"})}])}));dateNLiteral=this.RULE("dateNLiteral",(()=>{this.CONSUME(j,{LABEL:"dateNLiteral"}),this.CONSUME(gr),this.OR1([{ALT:()=>this.CONSUME(jr,{LABEL:"variable"})},{ALT:()=>this.CONSUME(wr,{LABEL:"variable"})}])}));forViewOrReference=this.RULE("forViewOrReference",(()=>{this.CONSUME(It),this.OR([{ALT:()=>this.CONSUME(Vt,{LABEL:"value"})},{ALT:()=>this.CONSUME(wt,{LABEL:"value"})},{ALT:()=>this.CONSUME(Ct,{LABEL:"value"})}])}));updateTrackingViewstat=this.RULE("updateTrackingViewstat",(()=>{this.CONSUME(Ct),this.OR([{ALT:()=>this.CONSUME(jt,{LABEL:"value"})},{ALT:()=>this.CONSUME(Yt,{LABEL:"value"})}])}));getParenCount(t){return t||{right:0,left:0}}}let tn=new Jr;function en(t,e){const{allowApexBindVariables:r,logErrors:n,ignoreParseErrors:i,allowPartialQuery:o}=e||{allowApexBindVariables:!1,logErrors:!1,ignoreParseErrors:!1},a=function(t){return qr.tokenize(t)}(t);if(a.errors.length>0)throw n&&(console.log("Lexing Errors:"),console.log(a.errors)),new Qr(a.errors[0]);let s;if(tn.ignoreParseErrors!==i&&(tn=new Jr({ignoreParseErrors:i})),tn.input=a.tokens,tn.allowApexBindVariables=r||!1,s=o?tn.selectStatementPartial():tn.selectStatement(),tn.errors.length>0&&(n&&(console.log("Parsing Errors:"),console.log(tn.errors)),!i))throw new Zr(tn.errors[0]);return{cst:s,parseErrors:tn.errors.map((t=>new Zr(t)))}}const rn=(new Jr).getBaseCstVisitorConstructor(),nn=["TRUE","FALSE"],on=["YESTERDAY","TODAY","TOMORROW","LAST_WEEK","THIS_WEEK","NEXT_WEEK","LAST_MONTH","THIS_MONTH","NEXT_MONTH","LAST_90_DAYS","NEXT_90_DAYS","THIS_QUARTER","LAST_QUARTER","NEXT_QUARTER","THIS_YEAR","LAST_YEAR","NEXT_YEAR","THIS_FISCAL_QUARTER","LAST_FISCAL_QUARTER","NEXT_FISCAL_QUARTER","THIS_FISCAL_YEAR","LAST_FISCAL_YEAR","NEXT_FISCAL_YEAR"],an=["NEXT_N_DAYS","LAST_N_DAYS","N_DAYS_AGO","NEXT_N_WEEKS","LAST_N_WEEKS","N_WEEKS_AGO","NEXT_N_MONTHS","LAST_N_MONTHS","N_MONTHS_AGO","NEXT_N_QUARTERS","LAST_N_QUARTERS","N_QUARTERS_AGO","NEXT_N_YEARS","LAST_N_YEARS","N_YEARS_AGO","NEXT_N_FISCAL_QUARTERS","LAST_N_FISCAL_QUARTERS","N_FISCAL_QUARTERS_AGO","NEXT_N_FISCAL_YEARS","LAST_N_FISCAL_YEARS","N_FISCAL_YEARS_AGO"];const sn=new class extends rn{constructor(){super(),this.validateVisitor()}helpers={$_getFieldFunction:(t,e=!1,r=!0)=>{const n=t.functionExpression?t.functionExpression.map((t=>this.visit(t,{includeType:r}))).flat():[],i={};return r&&(i.type="FieldFunctionExpression"),i.functionName=t.fn[0].tokenType.name,i.parameters=n,r&&e&&(i.isAggregateFn=e),i.rawValue=`${t.fn[0].image}(${n.map((t=>"string"==typeof t?t:t.rawValue)).join(", ")})`,i},$_getLiteralTypeFromTokenType:t=>"REAL_NUMBER"===t?"DECIMAL":"CURRENCY_PREFIXED_DECIMAL"===t?"DECIMAL_WITH_CURRENCY_PREFIX":"CURRENCY_PREFIXED_INTEGER"===t?"INTEGER_WITH_CURRENCY_PREFIX":"SIGNED_DECIMAL"===t||"UNSIGNED_DECIMAL"===t?"DECIMAL":"UNSIGNED_INTEGER"===t||"SIGNED_INTEGER"===t?"INTEGER":"DATETIME"===t?"DATETIME":"DATE"===t?"DATE":"NULL"===t?"NULL":"StringIdentifier"===t||"Identifier"===t?"STRING":nn.includes(t)?"BOOLEAN":on.includes(t)?"DATE_LITERAL":an.includes(t)?"DATE_N_LITERAL":"STRING",$_parseSelect(t,e){const{isSubquery:r}=e||{isSubquery:!1};let n={};if(t.selectClause&&(n.fields=this.visit(t.selectClause)),t.fromClause)if(function(t,e){return e}(0,r)){const{sObject:e,alias:r,sObjectPrefix:i}=this.visit(t.fromClause);n.relationshipName=e,r&&(n.sObjectAlias=r),i&&(n.sObjectPrefix=i)}else{const{sObject:e,alias:r}=this.visit(t.fromClause);n.sObject=e,r&&(n.sObjectAlias=r)}return Array.isArray(n.fields)&&n.sObjectAlias&&n.fields.forEach((t=>{t.relationships&&t.relationships[0]===n.sObjectAlias&&(t.relationships=t.relationships.slice(1),t.objectPrefix=n.sObjectAlias),t.relationships&&0===t.relationships.length&&(delete t.relationships,t.type="Field")})),n={...n,...this.visit(t.clauseStatements)},n}};selectStatement(t,e){return this.helpers.$_parseSelect.bind(this)(t,e)}selectStatementPartial(t,e){return this.helpers.$_parseSelect.bind(this)(t,e)}clauseStatements(t){const e={};return t.usingScopeClause&&!t.usingScopeClause[0].recoveredNode&&(e.usingScope=this.visit(t.usingScopeClause)),t.whereClause&&!t.whereClause[0].recoveredNode&&(e.where=this.visit(t.whereClause)),t.withClause&&t.withClause.filter((t=>!t.recoveredNode)).forEach((t=>{const{withSecurityEnforced:r,withAccessLevel:n,withDataCategory:i}=this.visit(t);r&&(e.withSecurityEnforced=r),n&&(e.withAccessLevel=n),i&&(e.withDataCategory=i)})),t.groupByClause&&!t.groupByClause[0].recoveredNode&&(e.groupBy=this.visit(t.groupByClause)),t.havingClause&&!t.havingClause[0].recoveredNode&&(e.having=this.visit(t.havingClause)),t.orderByClause&&!t.orderByClause[0].recoveredNode&&(e.orderBy=this.visit(t.orderByClause)),t.limitClause&&!t.limitClause[0].recoveredNode&&(e.limit=Number(this.visit(t.limitClause))),t.offsetClause&&!t.offsetClause[0].recoveredNode&&(e.offset=Number(this.visit(t.offsetClause))),t.forViewOrReference&&!t.forViewOrReference[0].recoveredNode&&(e.for=this.visit(t.forViewOrReference)),t.updateTrackingViewstat&&!t.updateTrackingViewstat[0].recoveredNode&&(e.update=this.visit(t.updateTrackingViewstat)),e}selectClause(t){return t.field?t.field.map((t=>{if(n(t)){const e=t.image;let r;if(e.includes(".")){const t=e.split(".");r={type:"FieldRelationship",field:t[t.length-1],relationships:t.slice(0,t.length-1),rawValue:e}}else r={type:"Field",field:e};return r}return this.visit(t)})):[]}selectClauseFunctionIdentifier(t){let e={...this.visit(t.fn)};return t.alias&&(e.alias=t.alias[0].image),e}selectClauseSubqueryIdentifier(t){return{type:"FieldSubquery",subquery:this.visit(t.selectStatement,{isSubquery:!0})}}selectClauseTypeOf(t){let e=t.selectClauseTypeOfThen.map((t=>this.visit(t)));return t.selectClauseTypeOfElse&&e.push(this.visit(t.selectClauseTypeOfElse)),{type:"FieldTypeof",field:t.typeOfField[0].image,conditions:e}}selectClauseIdentifier(t){const e=t.field[0],r=t.alias?t.alias[0].image:void 0,n=e.image;let i;if(n.includes(".")){const t=n.split(".");i={type:"FieldRelationship",field:t[t.length-1],relationships:t.slice(0,t.length-1),rawValue:n}}else i={type:"Field",field:n};return r&&(i.alias=r),i}selectClauseTypeOfThen(t){return{type:"WHEN",objectType:t.typeOfField[0].image,fieldList:t.field.map((t=>t.image))}}selectClauseTypeOfElse(t){return{type:"ELSE",fieldList:t.field.map((t=>t.image))}}fromClause(t){let e,r=t.Identifier[0].image;if(r.includes(".")){const t=r.split(".");e={sObjectPrefix:t.slice(0,t.length-1),sObject:t[t.length-1]}}else e={sObject:r};return t.alias&&t.alias[0]&&(e.alias=t.alias[0].image),e}usingScopeClause(t){return t.UsingScopeEnumeration[0].image}whereClauseSubqueryIdentifier(t){return this.visit(t.selectStatement,{isSubquery:!1})}whereClause(t){return t.conditionExpression.reduce(((t,e)=>{let r;t.expressionTree?(r=this.visit(e,{prevExpression:t.prevExpression}),t.prevExpression.right=r):(r=this.visit(e),t.expressionTree=r);let n=r.right,i=r.right;for(;p(i);)n=i,i=i.right;return t.prevExpression=i||r,t}),{prevExpression:void 0,expressionTree:void 0}).expressionTree}conditionExpression(t,e){(e=e||{}).prevExpression&&t.logicalOperator&&(e.prevExpression.operator=t.logicalOperator[0].tokenType.name);let r={},n=r;if(Array.isArray(t.expressionNegation))if(1===t.expressionNegation.length)r=this.visit(t.expressionNegation),n=r.right;else{r=this.visit(t.expressionNegation[0]);const e=r;t.expressionNegation.slice(1).forEach((t=>{e.right=this.visit(t),n=e.right.right}))}return n.left=this.visit(t.expression),r}withClause(t){return t.withSecurityEnforced?{withSecurityEnforced:!0}:t.withAccessLevel?{withAccessLevel:t.withAccessLevel[0].image}:{withDataCategory:{conditions:this.visit(t.withDataCategory)}}}withDataCategory(t){return t.withDataCategoryArr.map((t=>this.visit(t)))}withDataCategoryArr(t){return{groupName:t.dataCategoryGroupName[0].image,selector:t.filteringSelector[0].image,parameters:t.dataCategoryName.map((t=>t.image))}}groupByClause(t){return t.groupBy.map((t=>n(t)?{field:t.image}:{fn:this.visit(t,{includeType:!1})}))}havingClause(t){return t.conditionExpression.reduce(((t,e)=>(t.expressionTree?(t.prevExpression.right=this.visit(e,{prevExpression:t.prevExpression}),t.prevExpression=t.prevExpression.right):(t.expressionTree=this.visit(e),t.prevExpression=t.expressionTree),t)),{prevExpression:void 0,expressionTree:void 0}).expressionTree}orderByClause(t){return t.orderByExpressionOrFn.map((t=>this.visit(t)))}orderByExpression(t){const e={field:t.Identifier[0].image};return t.order&&t.order[0]&&(e.order=t.order[0].tokenType.name),t.nulls&&t.nulls[0]&&(e.nulls=t.nulls[0].tokenType.name),e}orderByGroupingFunctionExpression(t){const e={fn:this.helpers.$_getFieldFunction(t,!1,!1)};return t.order&&t.order[0]&&(e.order=t.order[0].tokenType.name),t.nulls&&t.nulls[0]&&(e.nulls=t.nulls[0].tokenType.name),e}orderBySpecialFunctionExpression(t){const e={};return t.aggregateFunction?e.fn=this.visit(t.aggregateFunction,{includeType:!1}):t.dateFunction?e.fn=this.visit(t.dateFunction,{includeType:!1}):t.locationFunction&&(e.fn=this.visit(t.locationFunction,{includeType:!1})),t.order&&t.order[0]&&(e.order=t.order[0].tokenType.name),t.nulls&&t.nulls[0]&&(e.nulls=t.nulls[0].tokenType.name),e}limitClause(t){return t.value[0].image}offsetClause(t){return t.value[0].image}dateFunction(t,e={includeType:!0}){return this.helpers.$_getFieldFunction(t,!0,e.includeType)}aggregateFunction(t,e={includeType:!0}){return this.helpers.$_getFieldFunction(t,!0,e.includeType)}fieldsFunction(t,e={includeType:!0}){let r={};return e.includeType&&(r.type="FieldFunctionExpression"),r={...r,functionName:"FIELDS",parameters:[t.params[0].image]},r.rawValue=`FIELDS(${r.parameters[0]})`,r}otherFunction(t,e={includeType:!0}){return this.helpers.$_getFieldFunction(t,!1,e.includeType)}cubeFunction(t){return this.helpers.$_getFieldFunction(t,!1,!1)}rollupFunction(t){return this.helpers.$_getFieldFunction(t,!1,!1)}locationFunction(t,e={includeType:!0}){let r={};return e.includeType&&(r.type="FieldFunctionExpression"),r={...r,functionName:"DISTANCE",parameters:[t.location1[0].image,n(t.location2)?t.location2[0].image:this.visit(t.location2,e),t.unit[0].image]},e.includeType&&(r.isAggregateFn=!0),r.rawValue=`DISTANCE(${r.parameters[0]}, ${i(r.parameters[1])?r.parameters[1]:r.parameters[1].rawValue}, ${r.parameters[2]})`,r}geolocationFunction(t,e={includeType:!0}){let r={};return e.includeType&&(r.type="FieldFunctionExpression"),r={...r,functionName:"GEOLOCATION",parameters:[t.latitude[0].image,t.longitude[0].image],rawValue:`GEOLOCATION(${t.latitude[0].image}, ${t.longitude[0].image})`},r}functionExpression(t,e={includeType:!0}){return t.params?t.params.map((t=>t.image?t.image:this.visit(t,e))):[]}expression(t){const{value:e,literalType:r,dateLiteralVariable:i,operator:o}=this.visit(t.operator,{returnLiteralType:!0}),a={};return n(t.lhs)?a.field=t.lhs[0].image:a.fn=this.visit(t.lhs,{includeType:!1}),a.operator=o,a.literalType=r,"SUBQUERY"===r?a.valueQuery=e:a.value=e,i&&(a.dateLiteralVariable=i),t.L_PAREN&&(a.openParen=t.L_PAREN.length),t.R_PAREN&&(a.closeParen=t.R_PAREN.length),a}expressionPartWithNegation(t){return{left:t.L_PAREN?{openParen:t.L_PAREN.length}:null,operator:"NOT",right:{left:{}}}}expressionWithRelationalOperator(t){return t.relationalOperator?{operator:this.visit(t.relationalOperator),...this.visit(t.rhs,{returnLiteralType:!0})}:{operator:this.visit(t.setOperator),...this.visit(t.rhs,{returnLiteralType:!0})}}expressionWithSetOperator(t){return t.relationalOperator?{operator:this.visit(t.relationalOperator),...this.visit(t.rhs,{returnLiteralType:!0})}:{operator:this.visit(t.setOperator),...this.visit(t.rhs,{returnLiteralType:!0})}}atomicExpression(t,e){let r,n,i;if(e=e||{},t.apexBindVariableExpression)r=this.visit(t.apexBindVariableExpression),n="APEX_BIND_VARIABLE";else if(t.NumberIdentifier)r=t.NumberIdentifier[0].image,n=this.helpers.$_getLiteralTypeFromTokenType(t.NumberIdentifier[0].tokenType.name);else if(t.UnsignedInteger)r=t.UnsignedInteger[0].image,n="INTEGER";else if(t.SignedInteger)r=t.SignedInteger[0].image,n="INTEGER";else if(t.RealNumber)r=t.RealNumber[0].image,n="DECIMAL";else if(t.DateIdentifier)r=t.DateIdentifier[0].image,n=this.helpers.$_getLiteralTypeFromTokenType(t.DateIdentifier[0].tokenType.name);else if(t.CurrencyPrefixedInteger)r=t.CurrencyPrefixedInteger[0].image,n="INTEGER_WITH_CURRENCY_PREFIX";else if(t.CurrencyPrefixedDecimal)r=t.CurrencyPrefixedDecimal[0].image,n="DECIMAL_WITH_CURRENCY_PREFIX";else if(t.DateTime)r=t.DateTime[0].image,n="DATETIME";else if(t.date)r=t.DateToken[0].image,n="DATE";else if(t.NULL)r="NULL",n="NULL";else if(t.StringIdentifier)r=t.StringIdentifier[0].image,n="STRING";else if(t.Identifier)r=t.Identifier[0].image,n="STRING";else if(t.booleanValue)r=this.visit(t.booleanValue),n="BOOLEAN";else if(t.DateLiteral)r=t.DateLiteral[0].image,n="DATE_LITERAL";else if(t.dateNLiteral){const e=this.visit(t.dateNLiteral);r=e.value,i=e.variable,n="DATE_N_LITERAL"}else if(t.arrayExpression){const e=this.visit(t.arrayExpression);r=e.map((t=>t.value));const o=e.map((t=>t.variable||null)),a=o.some((t=>null!==t));n=1===new Set(e.map((t=>t.type))).size?this.helpers.$_getLiteralTypeFromTokenType(e[0].type):e.map((t=>this.helpers.$_getLiteralTypeFromTokenType(t.type))),a&&(i=o),n=n||"STRING"}else t.whereClauseSubqueryIdentifier&&(r=this.visit(t.whereClauseSubqueryIdentifier),n="SUBQUERY");return e.returnLiteralType?{value:r,literalType:n,dateLiteralVariable:i}:r}apexBindVariableExpression(t){return t.apex.map((t=>this.visit(t))).join(".")}apexBindVariableIdentifier(t){let e=t.Identifier[0].image;return t.apexBindVariableFunctionArrayAccessor&&(e+=this.visit(t.apexBindVariableFunctionArrayAccessor[0])),e}apexBindVariableNewInstantiation(t){let e=`new ${t.function[0].image}`;return t.apexBindVariableGeneric&&(e+=this.visit(t.apexBindVariableGeneric[0])),e+=this.visit(t.apexBindVariableFunctionParams[0]),t.apexBindVariableFunctionArrayAccessor&&(e+=this.visit(t.apexBindVariableFunctionArrayAccessor[0])),e}apexBindVariableFunctionCall(t){let e=`${t.function[0].image}${this.visit(t.apexBindVariableFunctionParams[0])}`;return t.apexBindVariableFunctionArrayAccessor&&(e+=this.visit(t.apexBindVariableFunctionArrayAccessor[0])),e}apexBindVariableGeneric(t){return`<${t.parameter.map((t=>t.image)).join(", ")}>`}apexBindVariableFunctionParams(t){return`(${(Array.isArray(t.parameter)?t.parameter:[]).map((t=>t.image)).join(", ")})`}apexBindVariableFunctionArrayAccessor(t){return`[${t.value[0].image}]`}arrayExpression(t){return t.value.map((t=>n(t)?{type:t.tokenType.name,value:t.image}:this.visit(t,{includeType:!0})))}relationalOperator(t){return t.operator[0].image}setOperator(t){return Array.isArray(t.operator)?t.operator[0].tokenType.name.replace("_"," "):Array.isArray(t.notIn)?this.visit(t.notIn):void 0}notInOperator(t){return"NOT IN"}booleanValue(t){return t.boolean[0].tokenType.name}dateNLiteral(t,e){const r={value:`${t.dateNLiteral[0].image}:${t.variable[0].image}`,variable:Number(t.variable[0].image)};return e&&e.includeType&&(r.type=t.dateNLiteral[0].tokenType.name),r}forViewOrReference(t){return t.value[0].tokenType.name}updateTrackingViewstat(t){return t.value[0].tokenType.name}};function un(t,e){const{cst:r}=en(t,e);return sn.visit(r)}function cn(t){if("string"==typeof t)return{type:"Field",field:t};if(function(t){return!a(t.functionName||t.fn)}(t)){let e=[];return t.parameters&&(e=Array.isArray(t.parameters)?t.parameters:[t.parameters]),{type:"FieldFunctionExpression",functionName:t.functionName||t.fn,parameters:e,alias:t.alias}}if(function(t){return i(t.field)&&Array.isArray(t.relationships)}(t))return{type:"FieldRelationship",field:t.field,relationships:t.relationships,objectPrefix:t.objectPrefix};if(function(t){return!a(t.subquery)}(t))return{type:"FieldSubquery",subquery:t.subquery};if(function(t){return i(t.field)&&Array.isArray(t.conditions)}(t))return{type:"FieldTypeof",field:t.field,conditions:t.conditions};if(function(t){return i(t.field)&&!Array.isArray(t.relationships)&&!Array.isArray(t.conditions)}(t))return{type:"Field",field:t.field,objectPrefix:t.objectPrefix};throw new TypeError("The input object provided did not match any valid field types")}function ln(t,e){if(!t)return[];const r=(t=f(t)?t.subquery:t).fields;if(!r)return[];let n={};t.groupBy&&(n=(Array.isArray(t.groupBy)?t.groupBy:[t.groupBy]).reduce(((t,e)=>(O(e)&&(t[e.field.toLocaleLowerCase()]=e.field),t)),{}));let o=-1,a=(l(t)?t.relationshipName:t.sObject||"").toLowerCase(),s=(t.sObjectAlias||"").toLowerCase();const p=r.flatMap((t=>{switch(t.type){case"Field":return t.alias||t.field;case"FieldFunctionExpression":{let r=u(t);if(r=r.map((t=>{if(t.includes(".")){let e=t.split(".");const r=e[0].toLowerCase();return r!==s&&r!==a||(e=e.slice(1)),e.join(".")}return t})),t.alias&&(t.isAggregateFn||e))return t.alias;if(t.alias){const e=r[0];return e.includes(".")?(r=e.split(".").slice(0,-1),r.push(t.alias),r.join(".")):t.alias}return t.isAggregateFn||function(t){if(!t.parameters||0===t.parameters.length)return!1;const e=t.parameters[0];return!i(e)&&!!e.isAggregateFn}(t)||e?(o++,`expr${o}`):r.length>0?r.join("."):t.functionName}case"FieldRelationship":{const e=t.relationships[0].toLowerCase();return c(t)?t.alias:t.rawValue&&n[t.rawValue.toLocaleLowerCase()]?t.field:e===s||e===a?t.relationships.concat([t.field]).slice(1).join("."):t.relationships.concat([t.field]).join(".")}case"FieldSubquery":return t.subquery.relationshipName;case"FieldTypeof":{const e=new Set,r=[];return t.conditions.forEach((n=>{n.fieldList.forEach((n=>{e.has(n)||(e.add(n),r.push(`${t.field}.${n}`))}))})),r}}})).filter((t=>i(t)));return p}class fn{enabled;options;currIndent=1;constructor(t,e){this.enabled=t,this.options={numIndent:e.numIndent??1,fieldMaxLineLength:e.fieldMaxLineLength??60,fieldSubqueryParensOnOwnLine:e.fieldSubqueryParensOnOwnLine??!0,whereClauseOperatorsIndented:!0,newLineAfterKeywords:e.newLineAfterKeywords??!1,logging:e.logging??!1},this.options.newLineAfterKeywords&&(this.options.fieldSubqueryParensOnOwnLine=!0)}log(t){this.options.logging&&console.log(t)}getIndent(t=0){return this.repeatChar((this.currIndent+t)*(this.options.numIndent||1),"\t")}repeatChar(t,e){return new Array(t).fill(e).join("")}setSubquery(t){this.currIndent=t?this.currIndent+=1:this.currIndent-=1}stepCurrIndex(t){this.currIndent+=t}formatFields(t){function e(e){t.fields[e-1]&&(t.fields[e-1].suffix=t.fields[e-1].suffix.trim())}if(t.fields.forEach(((e,r)=>{e.suffix=t.fields.length-1===r?"":", "})),this.enabled){let r=0,n=!1;t.fields.forEach(((i,a)=>{i.isSubquery?(e(a),i.prefix=`\n${this.getIndent()}`,i.suffix=t.fields.length-1===a?"":", ",r=0,n=!0):Array.isArray(i.typeOfClause)?(e(a),i.prefix=`\n${this.getIndent()}`,n=!0):o(this.options.fieldMaxLineLength)&&(r+=i.text.length+i.suffix.length,(r>this.options.fieldMaxLineLength||n)&&(e(a),(!this.options.newLineAfterKeywords||a>0)&&(i.prefix+=`\n${this.getIndent()}`),r=0,n=!1)),this.log(i)}))}}formatTyeOfField(t,e){return this.enabled&&this.options.newLineAfterKeywords?e.map(((t,r)=>0===r?t:r===e.length-1?`${this.getIndent()}${t}`:`${this.getIndent()}\t${t}`)).join("\n"):t}formatTypeofFieldCondition(t){let e="";const r=t.fieldList.join(", ");if(this.enabled&&this.options.newLineAfterKeywords){const n=this.getIndent();e=`${t.type}`,t.objectType?e+=`\n${n}\t\t${t.objectType}\n${n}\tTHEN\n${n}\t\t${r}`:e+=`\n${n}\t\t${r}`}else e=t.type,t.objectType?e+=` ${t.objectType} THEN ${r}`:e+=` ${r}`;return e}formatSubquery(t,e=2,r=!1){r&&e++;let n="(",i=")";return this.enabled&&(this.options.fieldSubqueryParensOnOwnLine||this.options.newLineAfterKeywords?(t=t.replace(/\n/g,`\n${this.repeatChar(e,"\t")}`),n=`(\n${this.repeatChar(e,"\t")}`,i=`\n${this.repeatChar(e-1,"\t")})`):t=t.replace(/\n/g,"\n\t")),`${n}${t}${i}`}formatClause(t){return this.enabled?this.options.newLineAfterKeywords?`\n${t}\n\t`:`\n${t}`:` ${t}`}formatText(t){return this.enabled&&(this.options.newLineAfterKeywords||t.startsWith("\n"))?t:` ${t}`}formatWithIndent(t){return this.enabled?`${this.getIndent()}${t}`:t}formatOrderByArray(t){if(this.enabled){let e=0,r="";return t.forEach(((n,i)=>{const o=t[i+1];e+=n.length,o&&(e+o.length>(this.options.fieldMaxLineLength||0)||this.options.newLineAfterKeywords)?(r+=`${n},\n\t`,e=0):r+=`${n}${o?", ":""}`})),r}return t.join(", ")}formatParens(t,e,r=!1){let n="";if(o(t)&&t>0)if(this.enabled)if("("===e){for(let e=0;e1)&&this.currIndent++}else for(let i=t-1;i>=0;i--)r&&i===t-1?n+=")":(this.currIndent--,n+=`\n${this.getIndent()})`);else n+=function(t,e,r=""){return o(t)&&t>0?new Array(t).fill(e).join(r):""}(t,e);return n}formatWhereClauseOperators(t,e,r=0){const n="NOT"===t;return this.enabled&&!n?`\n${this.getIndent(r)}${t} ${e}`:`${n?"":" "}${t} ${e}`}formatAddNewLine(t=" ",e){return this.enabled&&!e?"\n":t}}function pn(t,e={}){if(!t)return"";(e=e||{}).format=!!e.format,e.logging&&(console.time("composer"),console.log("Composing Query:",t),console.log("Format output:",e.format));const r=new hn(t,e).query;return e.logging&&console.timeEnd("composer"),r}class hn{soql;logging=!1;format=!1;query;formatter;constructor(t,e={}){this.soql=t,e={autoCompose:!0,...e};const{logging:r,format:n}=e;this.logging=!!r,this.format=!!n,this.query="",this.formatter=new fn(this.format,{logging:this.logging,...e.formatOptions}),e.autoCompose&&this.start()}start(){this.query=this.parseQuery(this.soql)}log(t){this.logging&&console.log("Current SOQL:",t)}parseFn(t){let e;return t.rawValue?e=t.rawValue:(e=t.functionName,e+=`(${(t.parameters||[]).map((t=>i(t)?t:this.parseFn(t))).join(", ")})`),t.alias&&(e+=` ${t.alias}`),e}parseQuery(t){const e={fields:this.parseFields(t.fields||[]).map((t=>({text:t.text,typeOfClause:t.typeOfClause,isSubquery:t.text.startsWith("("),prefix:"",suffix:""}))),isSubquery:l(t),lineBreaks:[]};let r="";t.fields&&(r+=this.formatter.formatClause("SELECT").trimStart()),this.formatter.formatFields(e);let n="";if(e.fields.forEach((t=>{Array.isArray(t.typeOfClause)?n+=`${t.prefix}${this.formatter.formatTyeOfField(t.text,t.typeOfClause)}${t.suffix}`:n+=`${t.prefix}${t.text}${t.suffix}`})),r+=this.formatter.formatText(n),(l(t)?t.relationshipName:t.sObject)&&(r+=this.formatter.formatClause("FROM")),l(t)){const e=t.sObjectPrefix||[];e.push(t.relationshipName),r+=this.formatter.formatText(`${e.join(".")}${s(t.sObjectAlias,""," ")}`)}else t.sObject&&(r+=this.formatter.formatText(`${t.sObject}${s(t.sObjectAlias,""," ")}`));return this.log(r),t.usingScope&&(r+=this.formatter.formatClause("USING SCOPE"),r+=this.formatter.formatText(t.usingScope),this.log(r)),t.where&&(r+=this.formatter.formatClause("WHERE"),r+=this.formatter.formatText(this.parseWhereOrHavingClause(t.where)),this.log(r)),t.groupBy&&(r+=this.formatter.formatClause("GROUP BY"),r+=this.formatter.formatText(this.parseGroupByClause(t.groupBy)),this.log(r),t.having&&(r+=this.formatter.formatClause("HAVING"),r+=this.formatter.formatText(this.parseWhereOrHavingClause(t.having)),this.log(r))),t.orderBy&&(!Array.isArray(t.orderBy)||t.orderBy.length>0)&&(r+=this.formatter.formatClause("ORDER BY"),r+=this.formatter.formatText(this.parseOrderBy(t.orderBy)),this.log(r)),o(t.limit)&&(r+=this.formatter.formatClause("LIMIT"),r+=this.formatter.formatText(`${t.limit}`),this.log(r)),o(t.offset)&&(r+=this.formatter.formatClause("OFFSET"),r+=this.formatter.formatText(`${t.offset}`),this.log(r)),t.withDataCategory&&(r+=this.formatter.formatClause("WITH DATA CATEGORY"),r+=this.formatter.formatText(this.parseWithDataCategory(t.withDataCategory)),this.log(r)),t.withSecurityEnforced&&(r+=this.formatter.formatClause("WITH SECURITY_ENFORCED"),this.log(r)),t.withAccessLevel&&(r+=this.formatter.formatClause(`WITH ${t.withAccessLevel}`),this.log(r)),t.for&&(r+=this.formatter.formatClause("FOR"),r+=this.formatter.formatText(t.for),this.log(r)),t.update&&(r+=this.formatter.formatClause("UPDATE"),r+=this.formatter.formatText(t.update),this.log(r)),r.trim()}parseFields(t){return t.map((t=>{let e,r="";const n=t.objectPrefix?`${t.objectPrefix}.`:"";switch(t.type){case"Field":r=`${n}${t.field}${t.alias?` ${t.alias}`:""}`;break;case"FieldFunctionExpression":{let e="";t.parameters&&(e=t.parameters.map((t=>i(t)?t:this.parseFields([t]).map((t=>t.text)))).join(", ")),r=`${t.functionName}(${e})${t.alias?` ${t.alias}`:""}`;break}case"FieldRelationship":r=`${n}${t.relationships.join(".")}.${t.field}${c(t)?` ${t.alias}`:""}`;break;case"FieldSubquery":r=this.formatter.formatSubquery(this.parseQuery(t.subquery));break;case"FieldTypeof":e=this.parseTypeOfField(t),r=e.join(" ")}return{text:r,typeOfClause:e}}))}parseTypeOfField(t){const e=[`TYPEOF ${t.field}`].concat(t.conditions.map((t=>this.formatter.formatTypeofFieldCondition(t))));return e.push("END"),e}parseWhereOrHavingClause(t,e=0,r=!1){let n="";const i=t.left;let o=!1;if(i&&(n+=this.formatter.formatParens(i.openParen,"(",y(i)),!y(i))){e=e+(i.openParen||0)-(i.closeParen||0),r&&e++;let t="";t+=m(i)?this.parseFn(i.fn):i.field,t+=` ${i.operator} `,A(i)?t+=this.formatter.formatSubquery(this.parseQuery(i.valueQuery),1,!0):t+=function(t,e=!1){return Array.isArray(t)?t.length>0?`(${t.join(", ")})`:e?"()":"":e?`(${t||""})`:t||""}(N(i.value,i.literalType,i.operator)),n+=this.formatter.formatWithIndent(t),n+=this.formatter.formatParens(i.closeParen,")",r)}if(d(t)){const r=s(t.operator);o="NOT"===r;const a=this.formatter.formatWhereClauseOperators(r,this.parseWhereOrHavingClause(t.right,e,y(i)),e);return`${o?n.trimRight():n}${a}`.trim()}return n.trim()}parseGroupByClause(t){return(Array.isArray(t)?t:[t]).map((t=>O(t)?t.field:this.parseFn(t.fn))).join(", ")}parseOrderBy(t){if(Array.isArray(t))return this.formatter.formatOrderByArray(t.map((t=>this.parseOrderBy(t))));{let e="";return _(t)?e=`${s(t.field," ")}`:e+=`${this.parseFn(t.fn)} `,e+=`${s(t.order," ")}${s(t.nulls,"","NULLS ")}`,e.trim()}}parseWithDataCategory(t){return t.conditions.map((t=>{const e=t.parameters.length>1?`(${t.parameters.join(", ")})`:`${t.parameters.join(", ")}`;return`${t.groupName} ${t.selector} ${e}`})).join(" AND ")}}},417:(t,e,r)=>{"use strict";e._b=e.H7=e.LK=e.Kv=e.Mf=e.SE=e.N$=e.oI=e.$9=e.pT=e.fK=e.ej=e.hI=e.Wx=e.Sj=e.r3=e.ue=e.ZW=e.z5=e.Oq=e.P7=e.bS=e.N7=e.Hs=e.dV=e.oC=e.vA=e.ol=e.l$=e.sd=e.dK=e.V3=e.Bw=e.hW=e._o=e.b4=e.nu=e.wd=e.q4=void 0;var n=r(7657);Object.defineProperty(e,"q4",{enumerable:!0,get:function(){return n.VERSION}});var i=r(1183);Object.defineProperty(e,"wd",{enumerable:!0,get:function(){return i.CstParser}}),Object.defineProperty(e,"nu",{enumerable:!0,get:function(){return i.EmbeddedActionsParser}}),Object.defineProperty(e,"b4",{enumerable:!0,get:function(){return i.ParserDefinitionErrorType}}),Object.defineProperty(e,"_o",{enumerable:!0,get:function(){return i.EMPTY_ALT}});var o=r(8200);Object.defineProperty(e,"hW",{enumerable:!0,get:function(){return o.Lexer}}),Object.defineProperty(e,"Bw",{enumerable:!0,get:function(){return o.LexerDefinitionErrorType}});var a=r(8980);Object.defineProperty(e,"V3",{enumerable:!0,get:function(){return a.createToken}}),Object.defineProperty(e,"dK",{enumerable:!0,get:function(){return a.createTokenInstance}}),Object.defineProperty(e,"sd",{enumerable:!0,get:function(){return a.EOF}}),Object.defineProperty(e,"l$",{enumerable:!0,get:function(){return a.tokenLabel}}),Object.defineProperty(e,"ol",{enumerable:!0,get:function(){return a.tokenMatcher}}),Object.defineProperty(e,"vA",{enumerable:!0,get:function(){return a.tokenName}});var s=r(3670);Object.defineProperty(e,"oC",{enumerable:!0,get:function(){return s.getLookaheadPaths}});var u=r(3449);Object.defineProperty(e,"dV",{enumerable:!0,get:function(){return u.LLkLookaheadStrategy}});var c=r(7621);Object.defineProperty(e,"Hs",{enumerable:!0,get:function(){return c.defaultParserErrorProvider}});var l=r(4400);Object.defineProperty(e,"N7",{enumerable:!0,get:function(){return l.EarlyExitException}}),Object.defineProperty(e,"bS",{enumerable:!0,get:function(){return l.isRecognitionException}}),Object.defineProperty(e,"P7",{enumerable:!0,get:function(){return l.MismatchedTokenException}}),Object.defineProperty(e,"Oq",{enumerable:!0,get:function(){return l.NotAllInputParsedException}}),Object.defineProperty(e,"z5",{enumerable:!0,get:function(){return l.NoViableAltException}});var f=r(8232);Object.defineProperty(e,"ZW",{enumerable:!0,get:function(){return f.defaultLexerErrorProvider}});var p=r(3062);Object.defineProperty(e,"ue",{enumerable:!0,get:function(){return p.Alternation}}),Object.defineProperty(e,"r3",{enumerable:!0,get:function(){return p.Alternative}}),Object.defineProperty(e,"Sj",{enumerable:!0,get:function(){return p.NonTerminal}}),Object.defineProperty(e,"Wx",{enumerable:!0,get:function(){return p.Option}}),Object.defineProperty(e,"hI",{enumerable:!0,get:function(){return p.Repetition}}),Object.defineProperty(e,"ej",{enumerable:!0,get:function(){return p.RepetitionMandatory}}),Object.defineProperty(e,"fK",{enumerable:!0,get:function(){return p.RepetitionMandatoryWithSeparator}}),Object.defineProperty(e,"pT",{enumerable:!0,get:function(){return p.RepetitionWithSeparator}}),Object.defineProperty(e,"$9",{enumerable:!0,get:function(){return p.Rule}}),Object.defineProperty(e,"oI",{enumerable:!0,get:function(){return p.Terminal}});var h=r(3062);Object.defineProperty(e,"N$",{enumerable:!0,get:function(){return h.serializeGrammar}}),Object.defineProperty(e,"SE",{enumerable:!0,get:function(){return h.serializeProduction}}),Object.defineProperty(e,"Mf",{enumerable:!0,get:function(){return h.GAstVisitor}});var d=r(2688);Object.defineProperty(e,"Kv",{enumerable:!0,get:function(){return d.generateCstDts}}),e.LK=function(){console.warn("The clearCache function was 'soft' removed from the Chevrotain API.\n\t It performs no action other than printing this message.\n\t Please avoid using it as it will be completely removed in the future")};var E=r(7141);Object.defineProperty(e,"H7",{enumerable:!0,get:function(){return E.createSyntaxDiagramsCode}});var T=function(){throw new Error("The Parser class has been deprecated, use CstParser or EmbeddedActionsParser instead.\t\nSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_7-0-0")};e._b=T},7141:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createSyntaxDiagramsCode=void 0;var n=r(7657);e.createSyntaxDiagramsCode=function(t,e){var r=void 0===e?{}:e,i=r.resourceBase,o=void 0===i?"https://unpkg.com/chevrotain@".concat(n.VERSION,"/diagrams/"):i,a=r.css,s=void 0===a?"https://unpkg.com/chevrotain@".concat(n.VERSION,"/diagrams/diagrams.css"):a;return'\n\x3c!-- This is a generated file --\x3e\n\n\n\n\n'+"\n\n")+"\n
+
+
+
+
Parse a SOQL query string into a Query data structure.
+
function parseQuery(soql: string, options?: ParseQueryConfig): Query
+
ParseQueryConfig
+
+
allowPartialQuery?: boolean; - If provided, you can provide an incomplete soql query. This is useful if you need to parse WHERE clauses, for example. Subqueries are required to be valid.
+
allowApexBindVariables?: boolean; - Determines if apex variables are allowed in parsed query. Example: WHERE Id IN :accountIds. Only simple Apex is supported. Function calls are not supported. (e.x. accountMap.keyset() is not supported)
+
ignoreParseErrors?: boolean; - If set to true, then queries with partially invalid syntax will still be parsed, but any clauses with invalid parts will be omitted. The SELECT clause and FROM clause must always be valid, but all other clauses can contain invalid parts.
+
logErrors?: boolean; - If true, parsing and lexing errors will be logged to the console.
function composeQuery(soql: Query, config?: Partial<SoqlComposeConfig>): string
+
+
format?: boolean - Apply formatting the the composed query. This will result in a multi-line soql statement.
+
formatOptions?: boolean - Only applies if format is set to true. Options to apply to the formatter.
+
+
numIndent: number - Number of tabs to indent on new lines.
+
fieldMaxLineLength: number - Number of characters before wrapping fields.
+
fieldSubqueryParensOnOwnLine: boolean - If true and the query includes a subquery, parentheses will be on their own line .
+
whereClauseOperatorsIndented: boolean - If true, operators (such as = or IN) in WHERE clauses will be inputted on their own line.
+
newLineAfterKeywords: boolean - If true, a new line will be inserted after keywords
+
logging: boolean
+
+
+
autoCompose?: boolean - (superseded by allowPartialQuery, you normally don't need to change this setting.) If you need to compose just part of a query, you can create your own instance of the Compose class and set this to false, then call any methods that you need to just for what you would like to turn into a SOQL query.
+
logging?: boolean - Print out logging statements to the console about the format operation.
Turn a query object into a list of fields using dot notation. This is useful if you want to flatten a Salesforce record and display in a table, this function will provide the fields based on the query.
Helper function easily get a a field for a compose function
+
function getField(input: string | ComposeFieldInput): SoqlModels.FieldType
+
const soqlQuery: Query ={ fields:[ getField('Id'), getField('Name'), getField({ functionName:'FORMAT', parameters:'Amount', alias:'MyFormattedAmount', }), getField({ subquery: oppLineItemsSubquery }), ], sObject:'Opportunity', where:{ left:{ field:'CreatedDate', operator:'>', value:'LAST_N_YEARS:1', }, operator:'AND', right:{ left:{ field:'StageName', operator:'=', value:'Closed Won', // literalType is optional, but if set to STRING and our value is not already wrapped in "'", they will be added // All other literalType values are ignored when composing a query literalType:'STRING', }, }, }, limit:150, };