@banyan_cloud/roots 1.0.59 → 1.0.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1442,13 +1442,13 @@ var getInitialsOfName = function getInitialsOfName() {
1442
1442
  }
1443
1443
  return initials;
1444
1444
  };
1445
- function safeJSONParse(object) {
1445
+ var safeJSONParse = function safeJSONParse(object) {
1446
1446
  try {
1447
1447
  return JSON.parse(object);
1448
1448
  } catch (error) {
1449
1449
  return null;
1450
1450
  }
1451
- }
1451
+ };
1452
1452
  function cloneDeep(object) {
1453
1453
  return safeJSONParse(JSON.stringify(object));
1454
1454
  }
@@ -1554,9 +1554,14 @@ var getDayInfo = function getDayInfo(date) {
1554
1554
  meridian: meridian
1555
1555
  };
1556
1556
  };
1557
- var getDatesInAMonth = function getDatesInAMonth(_ref) {
1558
- var month = _ref.month,
1559
- year = _ref.year;
1557
+ var getDatesInStringFormat = function getDatesInStringFormat(_ref) {
1558
+ var startingDate = _ref.startingDate,
1559
+ endingDate = _ref.endingDate;
1560
+ return ["".concat(startingDate.getDate(), " ").concat(MONTHS[startingDate.getMonth()].substring(0, 3), " ").concat(startingDate.getFullYear()), "".concat(endingDate.getDate(), " ").concat(MONTHS[endingDate.getMonth()].substring(0, 3), " ").concat(endingDate.getFullYear())];
1561
+ };
1562
+ var getDatesInAMonth = function getDatesInAMonth(_ref2) {
1563
+ var month = _ref2.month,
1564
+ year = _ref2.year;
1560
1565
  var date = new Date(Date.UTC(year, month, 1));
1561
1566
  var dates = [];
1562
1567
  var days = [];
@@ -1774,7 +1779,7 @@ var css$V = ".Chip_module_root__0aa07630[data-elem=base-cell] {\n position: rel
1774
1779
  var modules_31aa5fd7 = {"root":"Chip_module_root__0aa07630","sm":"Chip_module_sm__0aa07630","md":"Chip_module_md__0aa07630","status":"Chip_module_status__0aa07630","success":"Chip_module_success__0aa07630","info":"Chip_module_info__0aa07630","danger":"Chip_module_danger__0aa07630","warning":"Chip_module_warning__0aa07630","default":"Chip_module_default__0aa07630","input":"Chip_module_input__0aa07630"};
1775
1780
  n(css$V,{});
1776
1781
 
1777
- var Chip = function Chip(props) {
1782
+ var Chip = /*#__PURE__*/forwardRef(function Chip(props, ref) {
1778
1783
  var className = props.className,
1779
1784
  type = props.type,
1780
1785
  LeftComponent = props.leftComponent,
@@ -1788,6 +1793,7 @@ var Chip = function Chip(props) {
1788
1793
  variant = props.variant,
1789
1794
  color = props.color;
1790
1795
  return /*#__PURE__*/jsx(BaseButton, {
1796
+ ref: ref,
1791
1797
  type: type,
1792
1798
  component1: LeftComponent && /*#__PURE__*/jsx(LeftComponent, {}),
1793
1799
  title: title,
@@ -1800,7 +1806,7 @@ var Chip = function Chip(props) {
1800
1806
  variant: 'contained',
1801
1807
  className: classes(modules_31aa5fd7.root, modules_31aa5fd7["radius-".concat(radius)], modules_31aa5fd7[variant], modules_31aa5fd7[color], modules_31aa5fd7[size], className)
1802
1808
  });
1803
- };
1809
+ });
1804
1810
  Chip.propTypes = _objectSpread2(_objectSpread2({}, BaseButton.propTypes), {}, {
1805
1811
  size: propTypes$1.exports.oneOf(['sm', 'md']),
1806
1812
  variant: propTypes$1.exports.oneOf(['status', 'input']),
@@ -7712,7 +7718,7 @@ var checkForListedLanguage = (function (astGenerator, language) {
7712
7718
  return langs.indexOf(language) !== -1;
7713
7719
  });
7714
7720
 
7715
- var _excluded$1 = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "startingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "code", "astGenerator"];
7721
+ var _excluded$2 = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "startingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "code", "astGenerator"];
7716
7722
 
7717
7723
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7718
7724
 
@@ -8057,7 +8063,7 @@ function highlight$1 (defaultAstGenerator, defaultStyle) {
8057
8063
  _ref7$code = _ref7.code,
8058
8064
  code = _ref7$code === void 0 ? (Array.isArray(children) ? children[0] : children) || '' : _ref7$code,
8059
8065
  astGenerator = _ref7.astGenerator,
8060
- rest = _objectWithoutProperties(_ref7, _excluded$1);
8066
+ rest = _objectWithoutProperties(_ref7, _excluded$2);
8061
8067
 
8062
8068
  astGenerator = astGenerator || defaultAstGenerator;
8063
8069
  var allLineNumbers = showLineNumbers ? /*#__PURE__*/React__default.createElement(AllLineNumbers, {
@@ -17232,126 +17238,134 @@ function c(Prism) {
17232
17238
  delete Prism.languages.c['boolean'];
17233
17239
  }
17234
17240
 
17235
- var refractorC$1 = c_1;
17236
- var cpp_1 = cpp;
17237
- cpp.displayName = 'cpp';
17238
- cpp.aliases = [];
17239
- function cpp(Prism) {
17240
- Prism.register(refractorC$1)
17241
- ;(function (Prism) {
17242
- var keyword =
17243
- /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/;
17244
- var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(
17245
- /<keyword>/g,
17246
- function () {
17247
- return keyword.source
17248
- }
17249
- );
17250
- Prism.languages.cpp = Prism.languages.extend('c', {
17251
- 'class-name': [
17252
- {
17253
- pattern: RegExp(
17254
- /(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(
17255
- /<keyword>/g,
17256
- function () {
17257
- return keyword.source
17258
- }
17259
- )
17260
- ),
17261
- lookbehind: true
17262
- }, // This is intended to capture the class name of method implementations like:
17263
- // void foo::bar() const {}
17264
- // However! The `foo` in the above example could also be a namespace, so we only capture the class name if
17265
- // it starts with an uppercase letter. This approximation should give decent results.
17266
- /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, // This will capture the class name before destructors like:
17267
- // Foo::~Foo() {}
17268
- /\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i, // This also intends to capture the class name of method implementations but here the class has template
17269
- // parameters, so it can't be a namespace (until C++ adds generic namespaces).
17270
- /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
17271
- ],
17272
- keyword: keyword,
17273
- number: {
17274
- pattern:
17275
- /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
17276
- greedy: true
17277
- },
17278
- operator:
17279
- />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
17280
- boolean: /\b(?:false|true)\b/
17281
- });
17282
- Prism.languages.insertBefore('cpp', 'string', {
17283
- module: {
17284
- // https://en.cppreference.com/w/cpp/language/modules
17285
- pattern: RegExp(
17286
- /(\b(?:import|module)\s+)/.source +
17287
- '(?:' + // header-name
17288
- /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source +
17289
- '|' + // module name or partition or both
17290
- /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(
17291
- /<mod-name>/g,
17292
- function () {
17293
- return modName
17294
- }
17295
- ) +
17296
- ')'
17297
- ),
17298
- lookbehind: true,
17299
- greedy: true,
17300
- inside: {
17301
- string: /^[<"][\s\S]+/,
17302
- operator: /:/,
17303
- punctuation: /\./
17304
- }
17305
- },
17306
- 'raw-string': {
17307
- pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
17308
- alias: 'string',
17309
- greedy: true
17310
- }
17311
- });
17312
- Prism.languages.insertBefore('cpp', 'keyword', {
17313
- 'generic-function': {
17314
- pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
17315
- inside: {
17316
- function: /^\w+/,
17317
- generic: {
17318
- pattern: /<[\s\S]+/,
17319
- alias: 'class-name',
17320
- inside: Prism.languages.cpp
17321
- }
17322
- }
17323
- }
17324
- });
17325
- Prism.languages.insertBefore('cpp', 'operator', {
17326
- 'double-colon': {
17327
- pattern: /::/,
17328
- alias: 'punctuation'
17329
- }
17330
- });
17331
- Prism.languages.insertBefore('cpp', 'class-name', {
17332
- // the base clause is an optional list of parent classes
17333
- // https://en.cppreference.com/w/cpp/language/class
17334
- 'base-clause': {
17335
- pattern:
17336
- /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
17337
- lookbehind: true,
17338
- greedy: true,
17339
- inside: Prism.languages.extend('cpp', {})
17340
- }
17341
- });
17342
- Prism.languages.insertBefore(
17343
- 'inside',
17344
- 'double-colon',
17345
- {
17346
- // All untokenized words that are not namespaces should be class names
17347
- 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i
17348
- },
17349
- Prism.languages.cpp['base-clause']
17350
- );
17351
- })(Prism);
17241
+ var cpp_1;
17242
+ var hasRequiredCpp;
17243
+
17244
+ function requireCpp () {
17245
+ if (hasRequiredCpp) return cpp_1;
17246
+ hasRequiredCpp = 1;
17247
+ var refractorC = c_1;
17248
+ cpp_1 = cpp;
17249
+ cpp.displayName = 'cpp';
17250
+ cpp.aliases = [];
17251
+ function cpp(Prism) {
17252
+ Prism.register(refractorC)
17253
+ ;(function (Prism) {
17254
+ var keyword =
17255
+ /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/;
17256
+ var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(
17257
+ /<keyword>/g,
17258
+ function () {
17259
+ return keyword.source
17260
+ }
17261
+ );
17262
+ Prism.languages.cpp = Prism.languages.extend('c', {
17263
+ 'class-name': [
17264
+ {
17265
+ pattern: RegExp(
17266
+ /(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(
17267
+ /<keyword>/g,
17268
+ function () {
17269
+ return keyword.source
17270
+ }
17271
+ )
17272
+ ),
17273
+ lookbehind: true
17274
+ }, // This is intended to capture the class name of method implementations like:
17275
+ // void foo::bar() const {}
17276
+ // However! The `foo` in the above example could also be a namespace, so we only capture the class name if
17277
+ // it starts with an uppercase letter. This approximation should give decent results.
17278
+ /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, // This will capture the class name before destructors like:
17279
+ // Foo::~Foo() {}
17280
+ /\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i, // This also intends to capture the class name of method implementations but here the class has template
17281
+ // parameters, so it can't be a namespace (until C++ adds generic namespaces).
17282
+ /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
17283
+ ],
17284
+ keyword: keyword,
17285
+ number: {
17286
+ pattern:
17287
+ /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
17288
+ greedy: true
17289
+ },
17290
+ operator:
17291
+ />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
17292
+ boolean: /\b(?:false|true)\b/
17293
+ });
17294
+ Prism.languages.insertBefore('cpp', 'string', {
17295
+ module: {
17296
+ // https://en.cppreference.com/w/cpp/language/modules
17297
+ pattern: RegExp(
17298
+ /(\b(?:import|module)\s+)/.source +
17299
+ '(?:' + // header-name
17300
+ /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source +
17301
+ '|' + // module name or partition or both
17302
+ /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(
17303
+ /<mod-name>/g,
17304
+ function () {
17305
+ return modName
17306
+ }
17307
+ ) +
17308
+ ')'
17309
+ ),
17310
+ lookbehind: true,
17311
+ greedy: true,
17312
+ inside: {
17313
+ string: /^[<"][\s\S]+/,
17314
+ operator: /:/,
17315
+ punctuation: /\./
17316
+ }
17317
+ },
17318
+ 'raw-string': {
17319
+ pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
17320
+ alias: 'string',
17321
+ greedy: true
17322
+ }
17323
+ });
17324
+ Prism.languages.insertBefore('cpp', 'keyword', {
17325
+ 'generic-function': {
17326
+ pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
17327
+ inside: {
17328
+ function: /^\w+/,
17329
+ generic: {
17330
+ pattern: /<[\s\S]+/,
17331
+ alias: 'class-name',
17332
+ inside: Prism.languages.cpp
17333
+ }
17334
+ }
17335
+ }
17336
+ });
17337
+ Prism.languages.insertBefore('cpp', 'operator', {
17338
+ 'double-colon': {
17339
+ pattern: /::/,
17340
+ alias: 'punctuation'
17341
+ }
17342
+ });
17343
+ Prism.languages.insertBefore('cpp', 'class-name', {
17344
+ // the base clause is an optional list of parent classes
17345
+ // https://en.cppreference.com/w/cpp/language/class
17346
+ 'base-clause': {
17347
+ pattern:
17348
+ /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
17349
+ lookbehind: true,
17350
+ greedy: true,
17351
+ inside: Prism.languages.extend('cpp', {})
17352
+ }
17353
+ });
17354
+ Prism.languages.insertBefore(
17355
+ 'inside',
17356
+ 'double-colon',
17357
+ {
17358
+ // All untokenized words that are not namespaces should be class names
17359
+ 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i
17360
+ },
17361
+ Prism.languages.cpp['base-clause']
17362
+ );
17363
+ })(Prism);
17364
+ }
17365
+ return cpp_1;
17352
17366
  }
17353
17367
 
17354
- var refractorCpp$1 = cpp_1;
17368
+ var refractorCpp$1 = requireCpp();
17355
17369
  var arduino_1 = arduino;
17356
17370
  arduino.displayName = 'arduino';
17357
17371
  arduino.aliases = ['ino'];
@@ -17695,470 +17709,479 @@ function asmatmel(Prism) {
17695
17709
  };
17696
17710
  }
17697
17711
 
17698
- var csharp_1 = csharp;
17699
- csharp.displayName = 'csharp';
17700
- csharp.aliases = ['dotnet', 'cs'];
17701
- function csharp(Prism) {
17712
+ var csharp_1;
17713
+ var hasRequiredCsharp;
17714
+
17715
+ function requireCsharp () {
17716
+ if (hasRequiredCsharp) return csharp_1;
17717
+ hasRequiredCsharp = 1;
17718
+
17719
+ csharp_1 = csharp;
17720
+ csharp.displayName = 'csharp';
17721
+ csharp.aliases = ['dotnet', 'cs'];
17722
+ function csharp(Prism) {
17702
17723
  (function (Prism) {
17703
- /**
17704
- * Replaces all placeholders "<<n>>" of given pattern with the n-th replacement (zero based).
17705
- *
17706
- * Note: This is a simple text based replacement. Be careful when using backreferences!
17707
- *
17708
- * @param {string} pattern the given pattern.
17709
- * @param {string[]} replacements a list of replacement which can be inserted into the given pattern.
17710
- * @returns {string} the pattern with all placeholders replaced with their corresponding replacements.
17711
- * @example replace(/a<<0>>a/.source, [/b+/.source]) === /a(?:b+)a/.source
17712
- */
17713
- function replace(pattern, replacements) {
17714
- return pattern.replace(/<<(\d+)>>/g, function (m, index) {
17715
- return '(?:' + replacements[+index] + ')'
17716
- })
17717
- }
17718
- /**
17719
- * @param {string} pattern
17720
- * @param {string[]} replacements
17721
- * @param {string} [flags]
17722
- * @returns {RegExp}
17723
- */
17724
- function re(pattern, replacements, flags) {
17725
- return RegExp(replace(pattern, replacements), flags || '')
17726
- }
17727
- /**
17728
- * Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.
17729
- *
17730
- * @param {string} pattern
17731
- * @param {number} depthLog2
17732
- * @returns {string}
17733
- */
17734
- function nested(pattern, depthLog2) {
17735
- for (var i = 0; i < depthLog2; i++) {
17736
- pattern = pattern.replace(/<<self>>/g, function () {
17737
- return '(?:' + pattern + ')'
17738
- });
17739
- }
17740
- return pattern.replace(/<<self>>/g, '[^\\s\\S]')
17741
- } // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/
17742
- var keywordKinds = {
17743
- // keywords which represent a return or variable type
17744
- type: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void',
17745
- // keywords which are used to declare a type
17746
- typeDeclaration: 'class enum interface record struct',
17747
- // contextual keywords
17748
- // ("var" and "dynamic" are missing because they are used like types)
17749
- contextual:
17750
- 'add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)',
17751
- // all other keywords
17752
- other:
17753
- 'abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield'
17754
- }; // keywords
17755
- function keywordsToPattern(words) {
17756
- return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'
17757
- }
17758
- var typeDeclarationKeywords = keywordsToPattern(
17759
- keywordKinds.typeDeclaration
17760
- );
17761
- var keywords = RegExp(
17762
- keywordsToPattern(
17763
- keywordKinds.type +
17764
- ' ' +
17765
- keywordKinds.typeDeclaration +
17766
- ' ' +
17767
- keywordKinds.contextual +
17768
- ' ' +
17769
- keywordKinds.other
17770
- )
17771
- );
17772
- var nonTypeKeywords = keywordsToPattern(
17773
- keywordKinds.typeDeclaration +
17774
- ' ' +
17775
- keywordKinds.contextual +
17776
- ' ' +
17777
- keywordKinds.other
17778
- );
17779
- var nonContextualKeywords = keywordsToPattern(
17780
- keywordKinds.type +
17781
- ' ' +
17782
- keywordKinds.typeDeclaration +
17783
- ' ' +
17784
- keywordKinds.other
17785
- ); // types
17786
- var generic = nested(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source, 2); // the idea behind the other forbidden characters is to prevent false positives. Same for tupleElement.
17787
- var nestedRound = nested(/\((?:[^()]|<<self>>)*\)/.source, 2);
17788
- var name = /@?\b[A-Za-z_]\w*\b/.source;
17789
- var genericName = replace(/<<0>>(?:\s*<<1>>)?/.source, [name, generic]);
17790
- var identifier = replace(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [
17791
- nonTypeKeywords,
17792
- genericName
17793
- ]);
17794
- var array = /\[\s*(?:,\s*)*\]/.source;
17795
- var typeExpressionWithoutTuple = replace(
17796
- /<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,
17797
- [identifier, array]
17798
- );
17799
- var tupleElement = replace(
17800
- /[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,
17801
- [generic, nestedRound, array]
17802
- );
17803
- var tuple = replace(/\(<<0>>+(?:,<<0>>+)+\)/.source, [tupleElement]);
17804
- var typeExpression = replace(
17805
- /(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,
17806
- [tuple, identifier, array]
17807
- );
17808
- var typeInside = {
17809
- keyword: keywords,
17810
- punctuation: /[<>()?,.:[\]]/
17811
- }; // strings & characters
17812
- // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#character-literals
17813
- // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#string-literals
17814
- var character = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source; // simplified pattern
17815
- var regularString = /"(?:\\.|[^\\"\r\n])*"/.source;
17816
- var verbatimString = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;
17817
- Prism.languages.csharp = Prism.languages.extend('clike', {
17818
- string: [
17819
- {
17820
- pattern: re(/(^|[^$\\])<<0>>/.source, [verbatimString]),
17821
- lookbehind: true,
17822
- greedy: true
17823
- },
17824
- {
17825
- pattern: re(/(^|[^@$\\])<<0>>/.source, [regularString]),
17826
- lookbehind: true,
17827
- greedy: true
17828
- }
17829
- ],
17830
- 'class-name': [
17831
- {
17832
- // Using static
17833
- // using static System.Math;
17834
- pattern: re(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source, [
17835
- identifier
17836
- ]),
17837
- lookbehind: true,
17838
- inside: typeInside
17839
- },
17840
- {
17841
- // Using alias (type)
17842
- // using Project = PC.MyCompany.Project;
17843
- pattern: re(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source, [
17844
- name,
17845
- typeExpression
17846
- ]),
17847
- lookbehind: true,
17848
- inside: typeInside
17849
- },
17850
- {
17851
- // Using alias (alias)
17852
- // using Project = PC.MyCompany.Project;
17853
- pattern: re(/(\busing\s+)<<0>>(?=\s*=)/.source, [name]),
17854
- lookbehind: true
17855
- },
17856
- {
17857
- // Type declarations
17858
- // class Foo<A, B>
17859
- // interface Foo<out A, B>
17860
- pattern: re(/(\b<<0>>\s+)<<1>>/.source, [
17861
- typeDeclarationKeywords,
17862
- genericName
17863
- ]),
17864
- lookbehind: true,
17865
- inside: typeInside
17866
- },
17867
- {
17868
- // Single catch exception declaration
17869
- // catch(Foo)
17870
- // (things like catch(Foo e) is covered by variable declaration)
17871
- pattern: re(/(\bcatch\s*\(\s*)<<0>>/.source, [identifier]),
17872
- lookbehind: true,
17873
- inside: typeInside
17874
- },
17875
- {
17876
- // Name of the type parameter of generic constraints
17877
- // where Foo : class
17878
- pattern: re(/(\bwhere\s+)<<0>>/.source, [name]),
17879
- lookbehind: true
17880
- },
17881
- {
17882
- // Casts and checks via as and is.
17883
- // as Foo<A>, is Bar<B>
17884
- // (things like if(a is Foo b) is covered by variable declaration)
17885
- pattern: re(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [
17886
- typeExpressionWithoutTuple
17887
- ]),
17888
- lookbehind: true,
17889
- inside: typeInside
17890
- },
17891
- {
17892
- // Variable, field and parameter declaration
17893
- // (Foo bar, Bar baz, Foo[,,] bay, Foo<Bar, FooBar<Bar>> bax)
17894
- pattern: re(
17895
- /\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/
17896
- .source,
17897
- [typeExpression, nonContextualKeywords, name]
17898
- ),
17899
- inside: typeInside
17900
- }
17901
- ],
17902
- keyword: keywords,
17903
- // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#literals
17904
- number:
17905
- /(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,
17906
- operator: />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,
17907
- punctuation: /\?\.?|::|[{}[\];(),.:]/
17908
- });
17909
- Prism.languages.insertBefore('csharp', 'number', {
17910
- range: {
17911
- pattern: /\.\./,
17912
- alias: 'operator'
17913
- }
17914
- });
17915
- Prism.languages.insertBefore('csharp', 'punctuation', {
17916
- 'named-parameter': {
17917
- pattern: re(/([(,]\s*)<<0>>(?=\s*:)/.source, [name]),
17918
- lookbehind: true,
17919
- alias: 'punctuation'
17920
- }
17921
- });
17922
- Prism.languages.insertBefore('csharp', 'class-name', {
17923
- namespace: {
17924
- // namespace Foo.Bar {}
17925
- // using Foo.Bar;
17926
- pattern: re(
17927
- /(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,
17928
- [name]
17929
- ),
17930
- lookbehind: true,
17931
- inside: {
17932
- punctuation: /\./
17933
- }
17934
- },
17935
- 'type-expression': {
17936
- // default(Foo), typeof(Foo<Bar>), sizeof(int)
17937
- pattern: re(
17938
- /(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/
17939
- .source,
17940
- [nestedRound]
17941
- ),
17942
- lookbehind: true,
17943
- alias: 'class-name',
17944
- inside: typeInside
17945
- },
17946
- 'return-type': {
17947
- // Foo<Bar> ForBar(); Foo IFoo.Bar() => 0
17948
- // int this[int index] => 0; T IReadOnlyList<T>.this[int index] => this[index];
17949
- // int Foo => 0; int Foo { get; set } = 0;
17950
- pattern: re(
17951
- /<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,
17952
- [typeExpression, identifier]
17953
- ),
17954
- inside: typeInside,
17955
- alias: 'class-name'
17956
- },
17957
- 'constructor-invocation': {
17958
- // new List<Foo<Bar[]>> { }
17959
- pattern: re(/(\bnew\s+)<<0>>(?=\s*[[({])/.source, [typeExpression]),
17960
- lookbehind: true,
17961
- inside: typeInside,
17962
- alias: 'class-name'
17963
- },
17964
- /*'explicit-implementation': {
17965
- // int IFoo<Foo>.Bar => 0; void IFoo<Foo<Foo>>.Foo<T>();
17966
- pattern: replace(/\b<<0>>(?=\.<<1>>)/, className, methodOrPropertyDeclaration),
17967
- inside: classNameInside,
17968
- alias: 'class-name'
17969
- },*/
17970
- 'generic-method': {
17971
- // foo<Bar>()
17972
- pattern: re(/<<0>>\s*<<1>>(?=\s*\()/.source, [name, generic]),
17973
- inside: {
17974
- function: re(/^<<0>>/.source, [name]),
17975
- generic: {
17976
- pattern: RegExp(generic),
17977
- alias: 'class-name',
17978
- inside: typeInside
17979
- }
17980
- }
17981
- },
17982
- 'type-list': {
17983
- // The list of types inherited or of generic constraints
17984
- // class Foo<F> : Bar, IList<FooBar>
17985
- // where F : Bar, IList<int>
17986
- pattern: re(
17987
- /\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/
17988
- .source,
17989
- [
17990
- typeDeclarationKeywords,
17991
- genericName,
17992
- name,
17993
- typeExpression,
17994
- keywords.source,
17995
- nestedRound,
17996
- /\bnew\s*\(\s*\)/.source
17997
- ]
17998
- ),
17999
- lookbehind: true,
18000
- inside: {
18001
- 'record-arguments': {
18002
- pattern: re(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source, [
18003
- genericName,
18004
- nestedRound
18005
- ]),
18006
- lookbehind: true,
18007
- greedy: true,
18008
- inside: Prism.languages.csharp
18009
- },
18010
- keyword: keywords,
18011
- 'class-name': {
18012
- pattern: RegExp(typeExpression),
18013
- greedy: true,
18014
- inside: typeInside
18015
- },
18016
- punctuation: /[,()]/
18017
- }
18018
- },
18019
- preprocessor: {
18020
- pattern: /(^[\t ]*)#.*/m,
18021
- lookbehind: true,
18022
- alias: 'property',
18023
- inside: {
18024
- // highlight preprocessor directives as keywords
18025
- directive: {
18026
- pattern:
18027
- /(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,
18028
- lookbehind: true,
18029
- alias: 'keyword'
18030
- }
18031
- }
18032
- }
18033
- }); // attributes
18034
- var regularStringOrCharacter = regularString + '|' + character;
18035
- var regularStringCharacterOrComment = replace(
18036
- /\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,
18037
- [regularStringOrCharacter]
18038
- );
18039
- var roundExpression = nested(
18040
- replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
18041
- regularStringCharacterOrComment
18042
- ]),
18043
- 2
18044
- ); // https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/attributes/#attribute-targets
18045
- var attrTarget =
18046
- /\b(?:assembly|event|field|method|module|param|property|return|type)\b/
18047
- .source;
18048
- var attr = replace(/<<0>>(?:\s*\(<<1>>*\))?/.source, [
18049
- identifier,
18050
- roundExpression
18051
- ]);
18052
- Prism.languages.insertBefore('csharp', 'class-name', {
18053
- attribute: {
18054
- // Attributes
18055
- // [Foo], [Foo(1), Bar(2, Prop = "foo")], [return: Foo(1), Bar(2)], [assembly: Foo(Bar)]
18056
- pattern: re(
18057
- /((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/
18058
- .source,
18059
- [attrTarget, attr]
18060
- ),
18061
- lookbehind: true,
18062
- greedy: true,
18063
- inside: {
18064
- target: {
18065
- pattern: re(/^<<0>>(?=\s*:)/.source, [attrTarget]),
18066
- alias: 'keyword'
18067
- },
18068
- 'attribute-arguments': {
18069
- pattern: re(/\(<<0>>*\)/.source, [roundExpression]),
18070
- inside: Prism.languages.csharp
18071
- },
18072
- 'class-name': {
18073
- pattern: RegExp(identifier),
18074
- inside: {
18075
- punctuation: /\./
18076
- }
18077
- },
18078
- punctuation: /[:,]/
18079
- }
18080
- }
18081
- }); // string interpolation
18082
- var formatString = /:[^}\r\n]+/.source; // multi line
18083
- var mInterpolationRound = nested(
18084
- replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
18085
- regularStringCharacterOrComment
18086
- ]),
18087
- 2
18088
- );
18089
- var mInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
18090
- mInterpolationRound,
18091
- formatString
18092
- ]); // single line
18093
- var sInterpolationRound = nested(
18094
- replace(
18095
- /[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/
18096
- .source,
18097
- [regularStringOrCharacter]
18098
- ),
18099
- 2
18100
- );
18101
- var sInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
18102
- sInterpolationRound,
18103
- formatString
18104
- ]);
18105
- function createInterpolationInside(interpolation, interpolationRound) {
18106
- return {
18107
- interpolation: {
18108
- pattern: re(/((?:^|[^{])(?:\{\{)*)<<0>>/.source, [interpolation]),
18109
- lookbehind: true,
18110
- inside: {
18111
- 'format-string': {
18112
- pattern: re(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source, [
18113
- interpolationRound,
18114
- formatString
18115
- ]),
18116
- lookbehind: true,
18117
- inside: {
18118
- punctuation: /^:/
18119
- }
18120
- },
18121
- punctuation: /^\{|\}$/,
18122
- expression: {
18123
- pattern: /[\s\S]+/,
18124
- alias: 'language-csharp',
18125
- inside: Prism.languages.csharp
18126
- }
18127
- }
18128
- },
18129
- string: /[\s\S]+/
18130
- }
18131
- }
18132
- Prism.languages.insertBefore('csharp', 'string', {
18133
- 'interpolation-string': [
18134
- {
18135
- pattern: re(
18136
- /(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,
18137
- [mInterpolation]
18138
- ),
18139
- lookbehind: true,
18140
- greedy: true,
18141
- inside: createInterpolationInside(mInterpolation, mInterpolationRound)
18142
- },
18143
- {
18144
- pattern: re(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source, [
18145
- sInterpolation
18146
- ]),
18147
- lookbehind: true,
18148
- greedy: true,
18149
- inside: createInterpolationInside(sInterpolation, sInterpolationRound)
18150
- }
18151
- ],
18152
- char: {
18153
- pattern: RegExp(character),
18154
- greedy: true
18155
- }
18156
- });
18157
- Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp;
18158
- })(Prism);
17724
+ /**
17725
+ * Replaces all placeholders "<<n>>" of given pattern with the n-th replacement (zero based).
17726
+ *
17727
+ * Note: This is a simple text based replacement. Be careful when using backreferences!
17728
+ *
17729
+ * @param {string} pattern the given pattern.
17730
+ * @param {string[]} replacements a list of replacement which can be inserted into the given pattern.
17731
+ * @returns {string} the pattern with all placeholders replaced with their corresponding replacements.
17732
+ * @example replace(/a<<0>>a/.source, [/b+/.source]) === /a(?:b+)a/.source
17733
+ */
17734
+ function replace(pattern, replacements) {
17735
+ return pattern.replace(/<<(\d+)>>/g, function (m, index) {
17736
+ return '(?:' + replacements[+index] + ')'
17737
+ })
17738
+ }
17739
+ /**
17740
+ * @param {string} pattern
17741
+ * @param {string[]} replacements
17742
+ * @param {string} [flags]
17743
+ * @returns {RegExp}
17744
+ */
17745
+ function re(pattern, replacements, flags) {
17746
+ return RegExp(replace(pattern, replacements), flags || '')
17747
+ }
17748
+ /**
17749
+ * Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.
17750
+ *
17751
+ * @param {string} pattern
17752
+ * @param {number} depthLog2
17753
+ * @returns {string}
17754
+ */
17755
+ function nested(pattern, depthLog2) {
17756
+ for (var i = 0; i < depthLog2; i++) {
17757
+ pattern = pattern.replace(/<<self>>/g, function () {
17758
+ return '(?:' + pattern + ')'
17759
+ });
17760
+ }
17761
+ return pattern.replace(/<<self>>/g, '[^\\s\\S]')
17762
+ } // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/
17763
+ var keywordKinds = {
17764
+ // keywords which represent a return or variable type
17765
+ type: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void',
17766
+ // keywords which are used to declare a type
17767
+ typeDeclaration: 'class enum interface record struct',
17768
+ // contextual keywords
17769
+ // ("var" and "dynamic" are missing because they are used like types)
17770
+ contextual:
17771
+ 'add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)',
17772
+ // all other keywords
17773
+ other:
17774
+ 'abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield'
17775
+ }; // keywords
17776
+ function keywordsToPattern(words) {
17777
+ return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'
17778
+ }
17779
+ var typeDeclarationKeywords = keywordsToPattern(
17780
+ keywordKinds.typeDeclaration
17781
+ );
17782
+ var keywords = RegExp(
17783
+ keywordsToPattern(
17784
+ keywordKinds.type +
17785
+ ' ' +
17786
+ keywordKinds.typeDeclaration +
17787
+ ' ' +
17788
+ keywordKinds.contextual +
17789
+ ' ' +
17790
+ keywordKinds.other
17791
+ )
17792
+ );
17793
+ var nonTypeKeywords = keywordsToPattern(
17794
+ keywordKinds.typeDeclaration +
17795
+ ' ' +
17796
+ keywordKinds.contextual +
17797
+ ' ' +
17798
+ keywordKinds.other
17799
+ );
17800
+ var nonContextualKeywords = keywordsToPattern(
17801
+ keywordKinds.type +
17802
+ ' ' +
17803
+ keywordKinds.typeDeclaration +
17804
+ ' ' +
17805
+ keywordKinds.other
17806
+ ); // types
17807
+ var generic = nested(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source, 2); // the idea behind the other forbidden characters is to prevent false positives. Same for tupleElement.
17808
+ var nestedRound = nested(/\((?:[^()]|<<self>>)*\)/.source, 2);
17809
+ var name = /@?\b[A-Za-z_]\w*\b/.source;
17810
+ var genericName = replace(/<<0>>(?:\s*<<1>>)?/.source, [name, generic]);
17811
+ var identifier = replace(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [
17812
+ nonTypeKeywords,
17813
+ genericName
17814
+ ]);
17815
+ var array = /\[\s*(?:,\s*)*\]/.source;
17816
+ var typeExpressionWithoutTuple = replace(
17817
+ /<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,
17818
+ [identifier, array]
17819
+ );
17820
+ var tupleElement = replace(
17821
+ /[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,
17822
+ [generic, nestedRound, array]
17823
+ );
17824
+ var tuple = replace(/\(<<0>>+(?:,<<0>>+)+\)/.source, [tupleElement]);
17825
+ var typeExpression = replace(
17826
+ /(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,
17827
+ [tuple, identifier, array]
17828
+ );
17829
+ var typeInside = {
17830
+ keyword: keywords,
17831
+ punctuation: /[<>()?,.:[\]]/
17832
+ }; // strings & characters
17833
+ // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#character-literals
17834
+ // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#string-literals
17835
+ var character = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source; // simplified pattern
17836
+ var regularString = /"(?:\\.|[^\\"\r\n])*"/.source;
17837
+ var verbatimString = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;
17838
+ Prism.languages.csharp = Prism.languages.extend('clike', {
17839
+ string: [
17840
+ {
17841
+ pattern: re(/(^|[^$\\])<<0>>/.source, [verbatimString]),
17842
+ lookbehind: true,
17843
+ greedy: true
17844
+ },
17845
+ {
17846
+ pattern: re(/(^|[^@$\\])<<0>>/.source, [regularString]),
17847
+ lookbehind: true,
17848
+ greedy: true
17849
+ }
17850
+ ],
17851
+ 'class-name': [
17852
+ {
17853
+ // Using static
17854
+ // using static System.Math;
17855
+ pattern: re(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source, [
17856
+ identifier
17857
+ ]),
17858
+ lookbehind: true,
17859
+ inside: typeInside
17860
+ },
17861
+ {
17862
+ // Using alias (type)
17863
+ // using Project = PC.MyCompany.Project;
17864
+ pattern: re(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source, [
17865
+ name,
17866
+ typeExpression
17867
+ ]),
17868
+ lookbehind: true,
17869
+ inside: typeInside
17870
+ },
17871
+ {
17872
+ // Using alias (alias)
17873
+ // using Project = PC.MyCompany.Project;
17874
+ pattern: re(/(\busing\s+)<<0>>(?=\s*=)/.source, [name]),
17875
+ lookbehind: true
17876
+ },
17877
+ {
17878
+ // Type declarations
17879
+ // class Foo<A, B>
17880
+ // interface Foo<out A, B>
17881
+ pattern: re(/(\b<<0>>\s+)<<1>>/.source, [
17882
+ typeDeclarationKeywords,
17883
+ genericName
17884
+ ]),
17885
+ lookbehind: true,
17886
+ inside: typeInside
17887
+ },
17888
+ {
17889
+ // Single catch exception declaration
17890
+ // catch(Foo)
17891
+ // (things like catch(Foo e) is covered by variable declaration)
17892
+ pattern: re(/(\bcatch\s*\(\s*)<<0>>/.source, [identifier]),
17893
+ lookbehind: true,
17894
+ inside: typeInside
17895
+ },
17896
+ {
17897
+ // Name of the type parameter of generic constraints
17898
+ // where Foo : class
17899
+ pattern: re(/(\bwhere\s+)<<0>>/.source, [name]),
17900
+ lookbehind: true
17901
+ },
17902
+ {
17903
+ // Casts and checks via as and is.
17904
+ // as Foo<A>, is Bar<B>
17905
+ // (things like if(a is Foo b) is covered by variable declaration)
17906
+ pattern: re(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [
17907
+ typeExpressionWithoutTuple
17908
+ ]),
17909
+ lookbehind: true,
17910
+ inside: typeInside
17911
+ },
17912
+ {
17913
+ // Variable, field and parameter declaration
17914
+ // (Foo bar, Bar baz, Foo[,,] bay, Foo<Bar, FooBar<Bar>> bax)
17915
+ pattern: re(
17916
+ /\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/
17917
+ .source,
17918
+ [typeExpression, nonContextualKeywords, name]
17919
+ ),
17920
+ inside: typeInside
17921
+ }
17922
+ ],
17923
+ keyword: keywords,
17924
+ // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#literals
17925
+ number:
17926
+ /(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,
17927
+ operator: />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,
17928
+ punctuation: /\?\.?|::|[{}[\];(),.:]/
17929
+ });
17930
+ Prism.languages.insertBefore('csharp', 'number', {
17931
+ range: {
17932
+ pattern: /\.\./,
17933
+ alias: 'operator'
17934
+ }
17935
+ });
17936
+ Prism.languages.insertBefore('csharp', 'punctuation', {
17937
+ 'named-parameter': {
17938
+ pattern: re(/([(,]\s*)<<0>>(?=\s*:)/.source, [name]),
17939
+ lookbehind: true,
17940
+ alias: 'punctuation'
17941
+ }
17942
+ });
17943
+ Prism.languages.insertBefore('csharp', 'class-name', {
17944
+ namespace: {
17945
+ // namespace Foo.Bar {}
17946
+ // using Foo.Bar;
17947
+ pattern: re(
17948
+ /(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,
17949
+ [name]
17950
+ ),
17951
+ lookbehind: true,
17952
+ inside: {
17953
+ punctuation: /\./
17954
+ }
17955
+ },
17956
+ 'type-expression': {
17957
+ // default(Foo), typeof(Foo<Bar>), sizeof(int)
17958
+ pattern: re(
17959
+ /(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/
17960
+ .source,
17961
+ [nestedRound]
17962
+ ),
17963
+ lookbehind: true,
17964
+ alias: 'class-name',
17965
+ inside: typeInside
17966
+ },
17967
+ 'return-type': {
17968
+ // Foo<Bar> ForBar(); Foo IFoo.Bar() => 0
17969
+ // int this[int index] => 0; T IReadOnlyList<T>.this[int index] => this[index];
17970
+ // int Foo => 0; int Foo { get; set } = 0;
17971
+ pattern: re(
17972
+ /<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,
17973
+ [typeExpression, identifier]
17974
+ ),
17975
+ inside: typeInside,
17976
+ alias: 'class-name'
17977
+ },
17978
+ 'constructor-invocation': {
17979
+ // new List<Foo<Bar[]>> { }
17980
+ pattern: re(/(\bnew\s+)<<0>>(?=\s*[[({])/.source, [typeExpression]),
17981
+ lookbehind: true,
17982
+ inside: typeInside,
17983
+ alias: 'class-name'
17984
+ },
17985
+ /*'explicit-implementation': {
17986
+ // int IFoo<Foo>.Bar => 0; void IFoo<Foo<Foo>>.Foo<T>();
17987
+ pattern: replace(/\b<<0>>(?=\.<<1>>)/, className, methodOrPropertyDeclaration),
17988
+ inside: classNameInside,
17989
+ alias: 'class-name'
17990
+ },*/
17991
+ 'generic-method': {
17992
+ // foo<Bar>()
17993
+ pattern: re(/<<0>>\s*<<1>>(?=\s*\()/.source, [name, generic]),
17994
+ inside: {
17995
+ function: re(/^<<0>>/.source, [name]),
17996
+ generic: {
17997
+ pattern: RegExp(generic),
17998
+ alias: 'class-name',
17999
+ inside: typeInside
18000
+ }
18001
+ }
18002
+ },
18003
+ 'type-list': {
18004
+ // The list of types inherited or of generic constraints
18005
+ // class Foo<F> : Bar, IList<FooBar>
18006
+ // where F : Bar, IList<int>
18007
+ pattern: re(
18008
+ /\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/
18009
+ .source,
18010
+ [
18011
+ typeDeclarationKeywords,
18012
+ genericName,
18013
+ name,
18014
+ typeExpression,
18015
+ keywords.source,
18016
+ nestedRound,
18017
+ /\bnew\s*\(\s*\)/.source
18018
+ ]
18019
+ ),
18020
+ lookbehind: true,
18021
+ inside: {
18022
+ 'record-arguments': {
18023
+ pattern: re(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source, [
18024
+ genericName,
18025
+ nestedRound
18026
+ ]),
18027
+ lookbehind: true,
18028
+ greedy: true,
18029
+ inside: Prism.languages.csharp
18030
+ },
18031
+ keyword: keywords,
18032
+ 'class-name': {
18033
+ pattern: RegExp(typeExpression),
18034
+ greedy: true,
18035
+ inside: typeInside
18036
+ },
18037
+ punctuation: /[,()]/
18038
+ }
18039
+ },
18040
+ preprocessor: {
18041
+ pattern: /(^[\t ]*)#.*/m,
18042
+ lookbehind: true,
18043
+ alias: 'property',
18044
+ inside: {
18045
+ // highlight preprocessor directives as keywords
18046
+ directive: {
18047
+ pattern:
18048
+ /(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,
18049
+ lookbehind: true,
18050
+ alias: 'keyword'
18051
+ }
18052
+ }
18053
+ }
18054
+ }); // attributes
18055
+ var regularStringOrCharacter = regularString + '|' + character;
18056
+ var regularStringCharacterOrComment = replace(
18057
+ /\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,
18058
+ [regularStringOrCharacter]
18059
+ );
18060
+ var roundExpression = nested(
18061
+ replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
18062
+ regularStringCharacterOrComment
18063
+ ]),
18064
+ 2
18065
+ ); // https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/attributes/#attribute-targets
18066
+ var attrTarget =
18067
+ /\b(?:assembly|event|field|method|module|param|property|return|type)\b/
18068
+ .source;
18069
+ var attr = replace(/<<0>>(?:\s*\(<<1>>*\))?/.source, [
18070
+ identifier,
18071
+ roundExpression
18072
+ ]);
18073
+ Prism.languages.insertBefore('csharp', 'class-name', {
18074
+ attribute: {
18075
+ // Attributes
18076
+ // [Foo], [Foo(1), Bar(2, Prop = "foo")], [return: Foo(1), Bar(2)], [assembly: Foo(Bar)]
18077
+ pattern: re(
18078
+ /((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/
18079
+ .source,
18080
+ [attrTarget, attr]
18081
+ ),
18082
+ lookbehind: true,
18083
+ greedy: true,
18084
+ inside: {
18085
+ target: {
18086
+ pattern: re(/^<<0>>(?=\s*:)/.source, [attrTarget]),
18087
+ alias: 'keyword'
18088
+ },
18089
+ 'attribute-arguments': {
18090
+ pattern: re(/\(<<0>>*\)/.source, [roundExpression]),
18091
+ inside: Prism.languages.csharp
18092
+ },
18093
+ 'class-name': {
18094
+ pattern: RegExp(identifier),
18095
+ inside: {
18096
+ punctuation: /\./
18097
+ }
18098
+ },
18099
+ punctuation: /[:,]/
18100
+ }
18101
+ }
18102
+ }); // string interpolation
18103
+ var formatString = /:[^}\r\n]+/.source; // multi line
18104
+ var mInterpolationRound = nested(
18105
+ replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
18106
+ regularStringCharacterOrComment
18107
+ ]),
18108
+ 2
18109
+ );
18110
+ var mInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
18111
+ mInterpolationRound,
18112
+ formatString
18113
+ ]); // single line
18114
+ var sInterpolationRound = nested(
18115
+ replace(
18116
+ /[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/
18117
+ .source,
18118
+ [regularStringOrCharacter]
18119
+ ),
18120
+ 2
18121
+ );
18122
+ var sInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
18123
+ sInterpolationRound,
18124
+ formatString
18125
+ ]);
18126
+ function createInterpolationInside(interpolation, interpolationRound) {
18127
+ return {
18128
+ interpolation: {
18129
+ pattern: re(/((?:^|[^{])(?:\{\{)*)<<0>>/.source, [interpolation]),
18130
+ lookbehind: true,
18131
+ inside: {
18132
+ 'format-string': {
18133
+ pattern: re(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source, [
18134
+ interpolationRound,
18135
+ formatString
18136
+ ]),
18137
+ lookbehind: true,
18138
+ inside: {
18139
+ punctuation: /^:/
18140
+ }
18141
+ },
18142
+ punctuation: /^\{|\}$/,
18143
+ expression: {
18144
+ pattern: /[\s\S]+/,
18145
+ alias: 'language-csharp',
18146
+ inside: Prism.languages.csharp
18147
+ }
18148
+ }
18149
+ },
18150
+ string: /[\s\S]+/
18151
+ }
18152
+ }
18153
+ Prism.languages.insertBefore('csharp', 'string', {
18154
+ 'interpolation-string': [
18155
+ {
18156
+ pattern: re(
18157
+ /(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,
18158
+ [mInterpolation]
18159
+ ),
18160
+ lookbehind: true,
18161
+ greedy: true,
18162
+ inside: createInterpolationInside(mInterpolation, mInterpolationRound)
18163
+ },
18164
+ {
18165
+ pattern: re(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source, [
18166
+ sInterpolation
18167
+ ]),
18168
+ lookbehind: true,
18169
+ greedy: true,
18170
+ inside: createInterpolationInside(sInterpolation, sInterpolationRound)
18171
+ }
18172
+ ],
18173
+ char: {
18174
+ pattern: RegExp(character),
18175
+ greedy: true
18176
+ }
18177
+ });
18178
+ Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp;
18179
+ })(Prism);
18180
+ }
18181
+ return csharp_1;
18159
18182
  }
18160
18183
 
18161
- var refractorCsharp = csharp_1;
18184
+ var refractorCsharp = requireCsharp();
18162
18185
  var aspnet_1 = aspnet;
18163
18186
  aspnet.displayName = 'aspnet';
18164
18187
  aspnet.aliases = [];
@@ -19352,7 +19375,7 @@ function cfscript(Prism) {
19352
19375
  Prism.languages.cfc = Prism.languages['cfscript'];
19353
19376
  }
19354
19377
 
19355
- var refractorCpp = cpp_1;
19378
+ var refractorCpp = requireCpp();
19356
19379
  var chaiscript_1 = chaiscript;
19357
19380
  chaiscript.displayName = 'chaiscript';
19358
19381
  chaiscript.aliases = [];
@@ -19419,40 +19442,31 @@ function chaiscript(Prism) {
19419
19442
  });
19420
19443
  }
19421
19444
 
19422
- var cil_1;
19423
- var hasRequiredCil;
19424
-
19425
- function requireCil () {
19426
- if (hasRequiredCil) return cil_1;
19427
- hasRequiredCil = 1;
19428
-
19429
- cil_1 = cil;
19430
- cil.displayName = 'cil';
19431
- cil.aliases = [];
19432
- function cil(Prism) {
19433
- Prism.languages.cil = {
19434
- comment: /\/\/.*/,
19435
- string: {
19436
- pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
19437
- greedy: true
19438
- },
19439
- directive: {
19440
- pattern: /(^|\W)\.[a-z]+(?=\s)/,
19441
- lookbehind: true,
19442
- alias: 'class-name'
19443
- },
19444
- // Actually an assembly reference
19445
- variable: /\[[\w\.]+\]/,
19446
- keyword:
19447
- /\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,
19448
- function:
19449
- /\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,
19450
- boolean: /\b(?:false|true)\b/,
19451
- number: /\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,
19452
- punctuation: /[{}[\];(),:=]|IL_[0-9A-Za-z]+/
19453
- };
19454
- }
19455
- return cil_1;
19445
+ var cil_1 = cil;
19446
+ cil.displayName = 'cil';
19447
+ cil.aliases = [];
19448
+ function cil(Prism) {
19449
+ Prism.languages.cil = {
19450
+ comment: /\/\/.*/,
19451
+ string: {
19452
+ pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
19453
+ greedy: true
19454
+ },
19455
+ directive: {
19456
+ pattern: /(^|\W)\.[a-z]+(?=\s)/,
19457
+ lookbehind: true,
19458
+ alias: 'class-name'
19459
+ },
19460
+ // Actually an assembly reference
19461
+ variable: /\[[\w\.]+\]/,
19462
+ keyword:
19463
+ /\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,
19464
+ function:
19465
+ /\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,
19466
+ boolean: /\b(?:false|true)\b/,
19467
+ number: /\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,
19468
+ punctuation: /[{}[\];(),:=]|IL_[0-9A-Za-z]+/
19469
+ };
19456
19470
  }
19457
19471
 
19458
19472
  var clojure_1 = clojure;
@@ -19534,541 +19548,594 @@ function cmake(Prism) {
19534
19548
  };
19535
19549
  }
19536
19550
 
19537
- var cobol_1 = cobol;
19538
- cobol.displayName = 'cobol';
19539
- cobol.aliases = [];
19540
- function cobol(Prism) {
19541
- Prism.languages.cobol = {
19542
- comment: {
19543
- pattern: /\*>.*|(^[ \t]*)\*.*/m,
19544
- lookbehind: true,
19545
- greedy: true
19546
- },
19547
- string: {
19548
- pattern: /[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,
19549
- greedy: true
19550
- },
19551
- level: {
19552
- pattern: /(^[ \t]*)\d+\b/m,
19553
- lookbehind: true,
19554
- greedy: true,
19555
- alias: 'number'
19556
- },
19557
- 'class-name': {
19558
- // https://github.com/antlr/grammars-v4/blob/42edd5b687d183b5fa679e858a82297bd27141e7/cobol85/Cobol85.g4#L1015
19559
- pattern:
19560
- /(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,
19561
- lookbehind: true,
19562
- inside: {
19563
- number: {
19564
- pattern: /(\()\d+/,
19565
- lookbehind: true
19566
- },
19567
- punctuation: /[()]/
19568
- }
19569
- },
19570
- keyword: {
19571
- pattern:
19572
- /(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,
19573
- lookbehind: true
19574
- },
19575
- boolean: {
19576
- pattern: /(^|[^\w-])(?:false|true)(?![\w-])/i,
19577
- lookbehind: true
19578
- },
19579
- number: {
19580
- pattern:
19581
- /(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,
19582
- lookbehind: true
19583
- },
19584
- operator: [
19585
- /<>|[<>]=?|[=+*/&]/,
19586
- {
19587
- pattern: /(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,
19588
- lookbehind: true
19589
- }
19590
- ],
19591
- punctuation: /[.:,()]/
19592
- };
19551
+ var cobol_1;
19552
+ var hasRequiredCobol;
19553
+
19554
+ function requireCobol () {
19555
+ if (hasRequiredCobol) return cobol_1;
19556
+ hasRequiredCobol = 1;
19557
+
19558
+ cobol_1 = cobol;
19559
+ cobol.displayName = 'cobol';
19560
+ cobol.aliases = [];
19561
+ function cobol(Prism) {
19562
+ Prism.languages.cobol = {
19563
+ comment: {
19564
+ pattern: /\*>.*|(^[ \t]*)\*.*/m,
19565
+ lookbehind: true,
19566
+ greedy: true
19567
+ },
19568
+ string: {
19569
+ pattern: /[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,
19570
+ greedy: true
19571
+ },
19572
+ level: {
19573
+ pattern: /(^[ \t]*)\d+\b/m,
19574
+ lookbehind: true,
19575
+ greedy: true,
19576
+ alias: 'number'
19577
+ },
19578
+ 'class-name': {
19579
+ // https://github.com/antlr/grammars-v4/blob/42edd5b687d183b5fa679e858a82297bd27141e7/cobol85/Cobol85.g4#L1015
19580
+ pattern:
19581
+ /(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,
19582
+ lookbehind: true,
19583
+ inside: {
19584
+ number: {
19585
+ pattern: /(\()\d+/,
19586
+ lookbehind: true
19587
+ },
19588
+ punctuation: /[()]/
19589
+ }
19590
+ },
19591
+ keyword: {
19592
+ pattern:
19593
+ /(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,
19594
+ lookbehind: true
19595
+ },
19596
+ boolean: {
19597
+ pattern: /(^|[^\w-])(?:false|true)(?![\w-])/i,
19598
+ lookbehind: true
19599
+ },
19600
+ number: {
19601
+ pattern:
19602
+ /(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,
19603
+ lookbehind: true
19604
+ },
19605
+ operator: [
19606
+ /<>|[<>]=?|[=+*/&]/,
19607
+ {
19608
+ pattern: /(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,
19609
+ lookbehind: true
19610
+ }
19611
+ ],
19612
+ punctuation: /[.:,()]/
19613
+ };
19614
+ }
19615
+ return cobol_1;
19593
19616
  }
19594
19617
 
19595
- var coffeescript_1 = coffeescript;
19596
- coffeescript.displayName = 'coffeescript';
19597
- coffeescript.aliases = ['coffee'];
19598
- function coffeescript(Prism) {
19618
+ var coffeescript_1;
19619
+ var hasRequiredCoffeescript;
19620
+
19621
+ function requireCoffeescript () {
19622
+ if (hasRequiredCoffeescript) return coffeescript_1;
19623
+ hasRequiredCoffeescript = 1;
19624
+
19625
+ coffeescript_1 = coffeescript;
19626
+ coffeescript.displayName = 'coffeescript';
19627
+ coffeescript.aliases = ['coffee'];
19628
+ function coffeescript(Prism) {
19599
19629
  (function (Prism) {
19600
- // Ignore comments starting with { to privilege string interpolation highlighting
19601
- var comment = /#(?!\{).+/;
19602
- var interpolation = {
19603
- pattern: /#\{[^}]+\}/,
19604
- alias: 'variable'
19605
- };
19606
- Prism.languages.coffeescript = Prism.languages.extend('javascript', {
19607
- comment: comment,
19608
- string: [
19609
- // Strings are multiline
19610
- {
19611
- pattern: /'(?:\\[\s\S]|[^\\'])*'/,
19612
- greedy: true
19613
- },
19614
- {
19615
- // Strings are multiline
19616
- pattern: /"(?:\\[\s\S]|[^\\"])*"/,
19617
- greedy: true,
19618
- inside: {
19619
- interpolation: interpolation
19620
- }
19621
- }
19622
- ],
19623
- keyword:
19624
- /\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,
19625
- 'class-member': {
19626
- pattern: /@(?!\d)\w+/,
19627
- alias: 'variable'
19628
- }
19629
- });
19630
- Prism.languages.insertBefore('coffeescript', 'comment', {
19631
- 'multiline-comment': {
19632
- pattern: /###[\s\S]+?###/,
19633
- alias: 'comment'
19634
- },
19635
- // Block regexp can contain comments and interpolation
19636
- 'block-regex': {
19637
- pattern: /\/{3}[\s\S]*?\/{3}/,
19638
- alias: 'regex',
19639
- inside: {
19640
- comment: comment,
19641
- interpolation: interpolation
19642
- }
19643
- }
19644
- });
19645
- Prism.languages.insertBefore('coffeescript', 'string', {
19646
- 'inline-javascript': {
19647
- pattern: /`(?:\\[\s\S]|[^\\`])*`/,
19648
- inside: {
19649
- delimiter: {
19650
- pattern: /^`|`$/,
19651
- alias: 'punctuation'
19652
- },
19653
- script: {
19654
- pattern: /[\s\S]+/,
19655
- alias: 'language-javascript',
19656
- inside: Prism.languages.javascript
19657
- }
19658
- }
19659
- },
19660
- // Block strings
19661
- 'multiline-string': [
19662
- {
19663
- pattern: /'''[\s\S]*?'''/,
19664
- greedy: true,
19665
- alias: 'string'
19666
- },
19667
- {
19668
- pattern: /"""[\s\S]*?"""/,
19669
- greedy: true,
19670
- alias: 'string',
19671
- inside: {
19672
- interpolation: interpolation
19673
- }
19674
- }
19675
- ]
19676
- });
19677
- Prism.languages.insertBefore('coffeescript', 'keyword', {
19678
- // Object property
19679
- property: /(?!\d)\w+(?=\s*:(?!:))/
19680
- });
19681
- delete Prism.languages.coffeescript['template-string'];
19682
- Prism.languages.coffee = Prism.languages.coffeescript;
19683
- })(Prism);
19630
+ // Ignore comments starting with { to privilege string interpolation highlighting
19631
+ var comment = /#(?!\{).+/;
19632
+ var interpolation = {
19633
+ pattern: /#\{[^}]+\}/,
19634
+ alias: 'variable'
19635
+ };
19636
+ Prism.languages.coffeescript = Prism.languages.extend('javascript', {
19637
+ comment: comment,
19638
+ string: [
19639
+ // Strings are multiline
19640
+ {
19641
+ pattern: /'(?:\\[\s\S]|[^\\'])*'/,
19642
+ greedy: true
19643
+ },
19644
+ {
19645
+ // Strings are multiline
19646
+ pattern: /"(?:\\[\s\S]|[^\\"])*"/,
19647
+ greedy: true,
19648
+ inside: {
19649
+ interpolation: interpolation
19650
+ }
19651
+ }
19652
+ ],
19653
+ keyword:
19654
+ /\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,
19655
+ 'class-member': {
19656
+ pattern: /@(?!\d)\w+/,
19657
+ alias: 'variable'
19658
+ }
19659
+ });
19660
+ Prism.languages.insertBefore('coffeescript', 'comment', {
19661
+ 'multiline-comment': {
19662
+ pattern: /###[\s\S]+?###/,
19663
+ alias: 'comment'
19664
+ },
19665
+ // Block regexp can contain comments and interpolation
19666
+ 'block-regex': {
19667
+ pattern: /\/{3}[\s\S]*?\/{3}/,
19668
+ alias: 'regex',
19669
+ inside: {
19670
+ comment: comment,
19671
+ interpolation: interpolation
19672
+ }
19673
+ }
19674
+ });
19675
+ Prism.languages.insertBefore('coffeescript', 'string', {
19676
+ 'inline-javascript': {
19677
+ pattern: /`(?:\\[\s\S]|[^\\`])*`/,
19678
+ inside: {
19679
+ delimiter: {
19680
+ pattern: /^`|`$/,
19681
+ alias: 'punctuation'
19682
+ },
19683
+ script: {
19684
+ pattern: /[\s\S]+/,
19685
+ alias: 'language-javascript',
19686
+ inside: Prism.languages.javascript
19687
+ }
19688
+ }
19689
+ },
19690
+ // Block strings
19691
+ 'multiline-string': [
19692
+ {
19693
+ pattern: /'''[\s\S]*?'''/,
19694
+ greedy: true,
19695
+ alias: 'string'
19696
+ },
19697
+ {
19698
+ pattern: /"""[\s\S]*?"""/,
19699
+ greedy: true,
19700
+ alias: 'string',
19701
+ inside: {
19702
+ interpolation: interpolation
19703
+ }
19704
+ }
19705
+ ]
19706
+ });
19707
+ Prism.languages.insertBefore('coffeescript', 'keyword', {
19708
+ // Object property
19709
+ property: /(?!\d)\w+(?=\s*:(?!:))/
19710
+ });
19711
+ delete Prism.languages.coffeescript['template-string'];
19712
+ Prism.languages.coffee = Prism.languages.coffeescript;
19713
+ })(Prism);
19714
+ }
19715
+ return coffeescript_1;
19684
19716
  }
19685
19717
 
19686
- var concurnas_1 = concurnas;
19687
- concurnas.displayName = 'concurnas';
19688
- concurnas.aliases = ['conc'];
19689
- function concurnas(Prism) {
19690
- Prism.languages.concurnas = {
19691
- comment: {
19692
- pattern: /(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,
19693
- lookbehind: true,
19694
- greedy: true
19695
- },
19696
- langext: {
19697
- pattern: /\b\w+\s*\|\|[\s\S]+?\|\|/,
19698
- greedy: true,
19699
- inside: {
19700
- 'class-name': /^\w+/,
19701
- string: {
19702
- pattern: /(^\s*\|\|)[\s\S]+(?=\|\|$)/,
19703
- lookbehind: true
19704
- },
19705
- punctuation: /\|\|/
19706
- }
19707
- },
19708
- function: {
19709
- pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,
19710
- lookbehind: true
19711
- },
19712
- keyword:
19713
- /\b(?:abstract|actor|also|annotation|assert|async|await|bool|boolean|break|byte|case|catch|changed|char|class|closed|constant|continue|def|default|del|double|elif|else|enum|every|extends|false|finally|float|for|from|global|gpudef|gpukernel|if|import|in|init|inject|int|lambda|local|long|loop|match|new|nodefault|null|of|onchange|open|out|override|package|parfor|parforsync|post|pre|private|protected|provide|provider|public|return|shared|short|single|size_t|sizeof|super|sync|this|throw|trait|trans|transient|true|try|typedef|unchecked|using|val|var|void|while|with)\b/,
19714
- boolean: /\b(?:false|true)\b/,
19715
- number:
19716
- /\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,
19717
- punctuation: /[{}[\];(),.:]/,
19718
- operator:
19719
- /<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,
19720
- annotation: {
19721
- pattern: /@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,
19722
- alias: 'builtin'
19723
- }
19724
- };
19725
- Prism.languages.insertBefore('concurnas', 'langext', {
19726
- 'regex-literal': {
19727
- pattern: /\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
19728
- greedy: true,
19729
- inside: {
19730
- interpolation: {
19731
- pattern:
19732
- /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
19733
- lookbehind: true,
19734
- inside: Prism.languages.concurnas
19735
- },
19736
- regex: /[\s\S]+/
19737
- }
19738
- },
19739
- 'string-literal': {
19740
- pattern: /(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
19741
- greedy: true,
19742
- inside: {
19743
- interpolation: {
19744
- pattern:
19745
- /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
19746
- lookbehind: true,
19747
- inside: Prism.languages.concurnas
19748
- },
19749
- string: /[\s\S]+/
19750
- }
19751
- }
19752
- });
19753
- Prism.languages.conc = Prism.languages.concurnas;
19718
+ var concurnas_1;
19719
+ var hasRequiredConcurnas;
19720
+
19721
+ function requireConcurnas () {
19722
+ if (hasRequiredConcurnas) return concurnas_1;
19723
+ hasRequiredConcurnas = 1;
19724
+
19725
+ concurnas_1 = concurnas;
19726
+ concurnas.displayName = 'concurnas';
19727
+ concurnas.aliases = ['conc'];
19728
+ function concurnas(Prism) {
19729
+ Prism.languages.concurnas = {
19730
+ comment: {
19731
+ pattern: /(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,
19732
+ lookbehind: true,
19733
+ greedy: true
19734
+ },
19735
+ langext: {
19736
+ pattern: /\b\w+\s*\|\|[\s\S]+?\|\|/,
19737
+ greedy: true,
19738
+ inside: {
19739
+ 'class-name': /^\w+/,
19740
+ string: {
19741
+ pattern: /(^\s*\|\|)[\s\S]+(?=\|\|$)/,
19742
+ lookbehind: true
19743
+ },
19744
+ punctuation: /\|\|/
19745
+ }
19746
+ },
19747
+ function: {
19748
+ pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,
19749
+ lookbehind: true
19750
+ },
19751
+ keyword:
19752
+ /\b(?:abstract|actor|also|annotation|assert|async|await|bool|boolean|break|byte|case|catch|changed|char|class|closed|constant|continue|def|default|del|double|elif|else|enum|every|extends|false|finally|float|for|from|global|gpudef|gpukernel|if|import|in|init|inject|int|lambda|local|long|loop|match|new|nodefault|null|of|onchange|open|out|override|package|parfor|parforsync|post|pre|private|protected|provide|provider|public|return|shared|short|single|size_t|sizeof|super|sync|this|throw|trait|trans|transient|true|try|typedef|unchecked|using|val|var|void|while|with)\b/,
19753
+ boolean: /\b(?:false|true)\b/,
19754
+ number:
19755
+ /\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,
19756
+ punctuation: /[{}[\];(),.:]/,
19757
+ operator:
19758
+ /<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,
19759
+ annotation: {
19760
+ pattern: /@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,
19761
+ alias: 'builtin'
19762
+ }
19763
+ };
19764
+ Prism.languages.insertBefore('concurnas', 'langext', {
19765
+ 'regex-literal': {
19766
+ pattern: /\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
19767
+ greedy: true,
19768
+ inside: {
19769
+ interpolation: {
19770
+ pattern:
19771
+ /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
19772
+ lookbehind: true,
19773
+ inside: Prism.languages.concurnas
19774
+ },
19775
+ regex: /[\s\S]+/
19776
+ }
19777
+ },
19778
+ 'string-literal': {
19779
+ pattern: /(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
19780
+ greedy: true,
19781
+ inside: {
19782
+ interpolation: {
19783
+ pattern:
19784
+ /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
19785
+ lookbehind: true,
19786
+ inside: Prism.languages.concurnas
19787
+ },
19788
+ string: /[\s\S]+/
19789
+ }
19790
+ }
19791
+ });
19792
+ Prism.languages.conc = Prism.languages.concurnas;
19793
+ }
19794
+ return concurnas_1;
19754
19795
  }
19755
19796
 
19756
- var coq_1 = coq;
19757
- coq.displayName = 'coq';
19758
- coq.aliases = [];
19759
- function coq(Prism) {
19797
+ var coq_1;
19798
+ var hasRequiredCoq;
19799
+
19800
+ function requireCoq () {
19801
+ if (hasRequiredCoq) return coq_1;
19802
+ hasRequiredCoq = 1;
19803
+
19804
+ coq_1 = coq;
19805
+ coq.displayName = 'coq';
19806
+ coq.aliases = [];
19807
+ function coq(Prism) {
19760
19808
  (function (Prism) {
19761
- // https://github.com/coq/coq
19762
- var commentSource = /\(\*(?:[^(*]|\((?!\*)|\*(?!\))|<self>)*\*\)/.source;
19763
- for (var i = 0; i < 2; i++) {
19764
- commentSource = commentSource.replace(/<self>/g, function () {
19765
- return commentSource
19766
- });
19767
- }
19768
- commentSource = commentSource.replace(/<self>/g, '[]');
19769
- Prism.languages.coq = {
19770
- comment: RegExp(commentSource),
19771
- string: {
19772
- pattern: /"(?:[^"]|"")*"(?!")/,
19773
- greedy: true
19774
- },
19775
- attribute: [
19776
- {
19777
- pattern: RegExp(
19778
- /#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|<comment>)*\]/.source.replace(
19779
- /<comment>/g,
19780
- function () {
19781
- return commentSource
19782
- }
19783
- )
19784
- ),
19785
- greedy: true,
19786
- alias: 'attr-name',
19787
- inside: {
19788
- comment: RegExp(commentSource),
19789
- string: {
19790
- pattern: /"(?:[^"]|"")*"(?!")/,
19791
- greedy: true
19792
- },
19793
- operator: /=/,
19794
- punctuation: /^#\[|\]$|[,()]/
19795
- }
19796
- },
19797
- {
19798
- pattern:
19799
- /\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,
19800
- alias: 'attr-name'
19801
- }
19802
- ],
19803
- keyword:
19804
- /\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,
19805
- number:
19806
- /\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,
19807
- punct: {
19808
- pattern: /@\{|\{\||\[=|:>/,
19809
- alias: 'punctuation'
19810
- },
19811
- operator:
19812
- /\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,
19813
- punctuation: /\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/
19814
- };
19815
- })(Prism);
19809
+ // https://github.com/coq/coq
19810
+ var commentSource = /\(\*(?:[^(*]|\((?!\*)|\*(?!\))|<self>)*\*\)/.source;
19811
+ for (var i = 0; i < 2; i++) {
19812
+ commentSource = commentSource.replace(/<self>/g, function () {
19813
+ return commentSource
19814
+ });
19815
+ }
19816
+ commentSource = commentSource.replace(/<self>/g, '[]');
19817
+ Prism.languages.coq = {
19818
+ comment: RegExp(commentSource),
19819
+ string: {
19820
+ pattern: /"(?:[^"]|"")*"(?!")/,
19821
+ greedy: true
19822
+ },
19823
+ attribute: [
19824
+ {
19825
+ pattern: RegExp(
19826
+ /#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|<comment>)*\]/.source.replace(
19827
+ /<comment>/g,
19828
+ function () {
19829
+ return commentSource
19830
+ }
19831
+ )
19832
+ ),
19833
+ greedy: true,
19834
+ alias: 'attr-name',
19835
+ inside: {
19836
+ comment: RegExp(commentSource),
19837
+ string: {
19838
+ pattern: /"(?:[^"]|"")*"(?!")/,
19839
+ greedy: true
19840
+ },
19841
+ operator: /=/,
19842
+ punctuation: /^#\[|\]$|[,()]/
19843
+ }
19844
+ },
19845
+ {
19846
+ pattern:
19847
+ /\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,
19848
+ alias: 'attr-name'
19849
+ }
19850
+ ],
19851
+ keyword:
19852
+ /\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,
19853
+ number:
19854
+ /\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,
19855
+ punct: {
19856
+ pattern: /@\{|\{\||\[=|:>/,
19857
+ alias: 'punctuation'
19858
+ },
19859
+ operator:
19860
+ /\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,
19861
+ punctuation: /\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/
19862
+ };
19863
+ })(Prism);
19864
+ }
19865
+ return coq_1;
19816
19866
  }
19817
19867
 
19818
- var ruby_1 = ruby;
19819
- ruby.displayName = 'ruby';
19820
- ruby.aliases = ['rb'];
19821
- function ruby(Prism) {
19868
+ var ruby_1;
19869
+ var hasRequiredRuby;
19870
+
19871
+ function requireRuby () {
19872
+ if (hasRequiredRuby) return ruby_1;
19873
+ hasRequiredRuby = 1;
19874
+
19875
+ ruby_1 = ruby;
19876
+ ruby.displayName = 'ruby';
19877
+ ruby.aliases = ['rb'];
19878
+ function ruby(Prism) {
19822
19879
  (function (Prism) {
19823
- Prism.languages.ruby = Prism.languages.extend('clike', {
19824
- comment: {
19825
- pattern: /#.*|^=begin\s[\s\S]*?^=end/m,
19826
- greedy: true
19827
- },
19828
- 'class-name': {
19829
- pattern:
19830
- /(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,
19831
- lookbehind: true,
19832
- inside: {
19833
- punctuation: /[.\\]/
19834
- }
19835
- },
19836
- keyword:
19837
- /\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,
19838
- operator:
19839
- /\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,
19840
- punctuation: /[(){}[\].,;]/
19841
- });
19842
- Prism.languages.insertBefore('ruby', 'operator', {
19843
- 'double-colon': {
19844
- pattern: /::/,
19845
- alias: 'punctuation'
19846
- }
19847
- });
19848
- var interpolation = {
19849
- pattern: /((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,
19850
- lookbehind: true,
19851
- inside: {
19852
- content: {
19853
- pattern: /^(#\{)[\s\S]+(?=\}$)/,
19854
- lookbehind: true,
19855
- inside: Prism.languages.ruby
19856
- },
19857
- delimiter: {
19858
- pattern: /^#\{|\}$/,
19859
- alias: 'punctuation'
19860
- }
19861
- }
19862
- };
19863
- delete Prism.languages.ruby.function;
19864
- var percentExpression =
19865
- '(?:' +
19866
- [
19867
- /([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,
19868
- /\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,
19869
- /\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,
19870
- /\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,
19871
- /<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source
19872
- ].join('|') +
19873
- ')';
19874
- var symbolName =
19875
- /(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/
19876
- .source;
19877
- Prism.languages.insertBefore('ruby', 'keyword', {
19878
- 'regex-literal': [
19879
- {
19880
- pattern: RegExp(
19881
- /%r/.source + percentExpression + /[egimnosux]{0,6}/.source
19882
- ),
19883
- greedy: true,
19884
- inside: {
19885
- interpolation: interpolation,
19886
- regex: /[\s\S]+/
19887
- }
19888
- },
19889
- {
19890
- pattern:
19891
- /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,
19892
- lookbehind: true,
19893
- greedy: true,
19894
- inside: {
19895
- interpolation: interpolation,
19896
- regex: /[\s\S]+/
19897
- }
19898
- }
19899
- ],
19900
- variable: /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,
19901
- symbol: [
19902
- {
19903
- pattern: RegExp(/(^|[^:]):/.source + symbolName),
19904
- lookbehind: true,
19905
- greedy: true
19906
- },
19907
- {
19908
- pattern: RegExp(
19909
- /([\r\n{(,][ \t]*)/.source + symbolName + /(?=:(?!:))/.source
19910
- ),
19911
- lookbehind: true,
19912
- greedy: true
19913
- }
19914
- ],
19915
- 'method-definition': {
19916
- pattern: /(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,
19917
- lookbehind: true,
19918
- inside: {
19919
- function: /\b\w+$/,
19920
- keyword: /^self\b/,
19921
- 'class-name': /^\w+/,
19922
- punctuation: /\./
19923
- }
19924
- }
19925
- });
19926
- Prism.languages.insertBefore('ruby', 'string', {
19927
- 'string-literal': [
19928
- {
19929
- pattern: RegExp(/%[qQiIwWs]?/.source + percentExpression),
19930
- greedy: true,
19931
- inside: {
19932
- interpolation: interpolation,
19933
- string: /[\s\S]+/
19934
- }
19935
- },
19936
- {
19937
- pattern:
19938
- /("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,
19939
- greedy: true,
19940
- inside: {
19941
- interpolation: interpolation,
19942
- string: /[\s\S]+/
19943
- }
19944
- },
19945
- {
19946
- pattern: /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
19947
- alias: 'heredoc-string',
19948
- greedy: true,
19949
- inside: {
19950
- delimiter: {
19951
- pattern: /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,
19952
- inside: {
19953
- symbol: /\b\w+/,
19954
- punctuation: /^<<[-~]?/
19955
- }
19956
- },
19957
- interpolation: interpolation,
19958
- string: /[\s\S]+/
19959
- }
19960
- },
19961
- {
19962
- pattern: /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
19963
- alias: 'heredoc-string',
19964
- greedy: true,
19965
- inside: {
19966
- delimiter: {
19967
- pattern: /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,
19968
- inside: {
19969
- symbol: /\b\w+/,
19970
- punctuation: /^<<[-~]?'|'$/
19971
- }
19972
- },
19973
- string: /[\s\S]+/
19974
- }
19975
- }
19976
- ],
19977
- 'command-literal': [
19978
- {
19979
- pattern: RegExp(/%x/.source + percentExpression),
19980
- greedy: true,
19981
- inside: {
19982
- interpolation: interpolation,
19983
- command: {
19984
- pattern: /[\s\S]+/,
19985
- alias: 'string'
19986
- }
19987
- }
19988
- },
19989
- {
19990
- pattern: /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,
19991
- greedy: true,
19992
- inside: {
19993
- interpolation: interpolation,
19994
- command: {
19995
- pattern: /[\s\S]+/,
19996
- alias: 'string'
19997
- }
19998
- }
19999
- }
20000
- ]
20001
- });
20002
- delete Prism.languages.ruby.string;
20003
- Prism.languages.insertBefore('ruby', 'number', {
20004
- builtin:
20005
- /\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,
20006
- constant: /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/
20007
- });
20008
- Prism.languages.rb = Prism.languages.ruby;
20009
- })(Prism);
19880
+ Prism.languages.ruby = Prism.languages.extend('clike', {
19881
+ comment: {
19882
+ pattern: /#.*|^=begin\s[\s\S]*?^=end/m,
19883
+ greedy: true
19884
+ },
19885
+ 'class-name': {
19886
+ pattern:
19887
+ /(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,
19888
+ lookbehind: true,
19889
+ inside: {
19890
+ punctuation: /[.\\]/
19891
+ }
19892
+ },
19893
+ keyword:
19894
+ /\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,
19895
+ operator:
19896
+ /\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,
19897
+ punctuation: /[(){}[\].,;]/
19898
+ });
19899
+ Prism.languages.insertBefore('ruby', 'operator', {
19900
+ 'double-colon': {
19901
+ pattern: /::/,
19902
+ alias: 'punctuation'
19903
+ }
19904
+ });
19905
+ var interpolation = {
19906
+ pattern: /((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,
19907
+ lookbehind: true,
19908
+ inside: {
19909
+ content: {
19910
+ pattern: /^(#\{)[\s\S]+(?=\}$)/,
19911
+ lookbehind: true,
19912
+ inside: Prism.languages.ruby
19913
+ },
19914
+ delimiter: {
19915
+ pattern: /^#\{|\}$/,
19916
+ alias: 'punctuation'
19917
+ }
19918
+ }
19919
+ };
19920
+ delete Prism.languages.ruby.function;
19921
+ var percentExpression =
19922
+ '(?:' +
19923
+ [
19924
+ /([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,
19925
+ /\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,
19926
+ /\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,
19927
+ /\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,
19928
+ /<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source
19929
+ ].join('|') +
19930
+ ')';
19931
+ var symbolName =
19932
+ /(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/
19933
+ .source;
19934
+ Prism.languages.insertBefore('ruby', 'keyword', {
19935
+ 'regex-literal': [
19936
+ {
19937
+ pattern: RegExp(
19938
+ /%r/.source + percentExpression + /[egimnosux]{0,6}/.source
19939
+ ),
19940
+ greedy: true,
19941
+ inside: {
19942
+ interpolation: interpolation,
19943
+ regex: /[\s\S]+/
19944
+ }
19945
+ },
19946
+ {
19947
+ pattern:
19948
+ /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,
19949
+ lookbehind: true,
19950
+ greedy: true,
19951
+ inside: {
19952
+ interpolation: interpolation,
19953
+ regex: /[\s\S]+/
19954
+ }
19955
+ }
19956
+ ],
19957
+ variable: /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,
19958
+ symbol: [
19959
+ {
19960
+ pattern: RegExp(/(^|[^:]):/.source + symbolName),
19961
+ lookbehind: true,
19962
+ greedy: true
19963
+ },
19964
+ {
19965
+ pattern: RegExp(
19966
+ /([\r\n{(,][ \t]*)/.source + symbolName + /(?=:(?!:))/.source
19967
+ ),
19968
+ lookbehind: true,
19969
+ greedy: true
19970
+ }
19971
+ ],
19972
+ 'method-definition': {
19973
+ pattern: /(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,
19974
+ lookbehind: true,
19975
+ inside: {
19976
+ function: /\b\w+$/,
19977
+ keyword: /^self\b/,
19978
+ 'class-name': /^\w+/,
19979
+ punctuation: /\./
19980
+ }
19981
+ }
19982
+ });
19983
+ Prism.languages.insertBefore('ruby', 'string', {
19984
+ 'string-literal': [
19985
+ {
19986
+ pattern: RegExp(/%[qQiIwWs]?/.source + percentExpression),
19987
+ greedy: true,
19988
+ inside: {
19989
+ interpolation: interpolation,
19990
+ string: /[\s\S]+/
19991
+ }
19992
+ },
19993
+ {
19994
+ pattern:
19995
+ /("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,
19996
+ greedy: true,
19997
+ inside: {
19998
+ interpolation: interpolation,
19999
+ string: /[\s\S]+/
20000
+ }
20001
+ },
20002
+ {
20003
+ pattern: /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
20004
+ alias: 'heredoc-string',
20005
+ greedy: true,
20006
+ inside: {
20007
+ delimiter: {
20008
+ pattern: /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,
20009
+ inside: {
20010
+ symbol: /\b\w+/,
20011
+ punctuation: /^<<[-~]?/
20012
+ }
20013
+ },
20014
+ interpolation: interpolation,
20015
+ string: /[\s\S]+/
20016
+ }
20017
+ },
20018
+ {
20019
+ pattern: /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
20020
+ alias: 'heredoc-string',
20021
+ greedy: true,
20022
+ inside: {
20023
+ delimiter: {
20024
+ pattern: /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,
20025
+ inside: {
20026
+ symbol: /\b\w+/,
20027
+ punctuation: /^<<[-~]?'|'$/
20028
+ }
20029
+ },
20030
+ string: /[\s\S]+/
20031
+ }
20032
+ }
20033
+ ],
20034
+ 'command-literal': [
20035
+ {
20036
+ pattern: RegExp(/%x/.source + percentExpression),
20037
+ greedy: true,
20038
+ inside: {
20039
+ interpolation: interpolation,
20040
+ command: {
20041
+ pattern: /[\s\S]+/,
20042
+ alias: 'string'
20043
+ }
20044
+ }
20045
+ },
20046
+ {
20047
+ pattern: /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,
20048
+ greedy: true,
20049
+ inside: {
20050
+ interpolation: interpolation,
20051
+ command: {
20052
+ pattern: /[\s\S]+/,
20053
+ alias: 'string'
20054
+ }
20055
+ }
20056
+ }
20057
+ ]
20058
+ });
20059
+ delete Prism.languages.ruby.string;
20060
+ Prism.languages.insertBefore('ruby', 'number', {
20061
+ builtin:
20062
+ /\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,
20063
+ constant: /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/
20064
+ });
20065
+ Prism.languages.rb = Prism.languages.ruby;
20066
+ })(Prism);
20067
+ }
20068
+ return ruby_1;
20010
20069
  }
20011
20070
 
20012
- var refractorRuby = ruby_1;
20013
- var crystal_1 = crystal;
20014
- crystal.displayName = 'crystal';
20015
- crystal.aliases = [];
20016
- function crystal(Prism) {
20017
- Prism.register(refractorRuby)
20018
- ;(function (Prism) {
20019
- Prism.languages.crystal = Prism.languages.extend('ruby', {
20020
- keyword: [
20021
- /\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|annotation|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|ptr|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|undef|uninitialized|union|unless|until|when|while|with|yield)\b/,
20022
- {
20023
- pattern: /(\.\s*)(?:is_a|responds_to)\?/,
20024
- lookbehind: true
20025
- }
20026
- ],
20027
- number:
20028
- /\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,
20029
- operator: [/->/, Prism.languages.ruby.operator],
20030
- punctuation: /[(){}[\].,;\\]/
20031
- });
20032
- Prism.languages.insertBefore('crystal', 'string-literal', {
20033
- attribute: {
20034
- pattern: /@\[.*?\]/,
20035
- inside: {
20036
- delimiter: {
20037
- pattern: /^@\[|\]$/,
20038
- alias: 'punctuation'
20039
- },
20040
- attribute: {
20041
- pattern: /^(\s*)\w+/,
20042
- lookbehind: true,
20043
- alias: 'class-name'
20044
- },
20045
- args: {
20046
- pattern: /\S(?:[\s\S]*\S)?/,
20047
- inside: Prism.languages.crystal
20048
- }
20049
- }
20050
- },
20051
- expansion: {
20052
- pattern: /\{(?:\{.*?\}|%.*?%)\}/,
20053
- inside: {
20054
- content: {
20055
- pattern: /^(\{.)[\s\S]+(?=.\}$)/,
20056
- lookbehind: true,
20057
- inside: Prism.languages.crystal
20058
- },
20059
- delimiter: {
20060
- pattern: /^\{[\{%]|[\}%]\}$/,
20061
- alias: 'operator'
20062
- }
20063
- }
20064
- },
20065
- char: {
20066
- pattern:
20067
- /'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,
20068
- greedy: true
20069
- }
20070
- });
20071
- })(Prism);
20071
+ var crystal_1;
20072
+ var hasRequiredCrystal;
20073
+
20074
+ function requireCrystal () {
20075
+ if (hasRequiredCrystal) return crystal_1;
20076
+ hasRequiredCrystal = 1;
20077
+ var refractorRuby = requireRuby();
20078
+ crystal_1 = crystal;
20079
+ crystal.displayName = 'crystal';
20080
+ crystal.aliases = [];
20081
+ function crystal(Prism) {
20082
+ Prism.register(refractorRuby)
20083
+ ;(function (Prism) {
20084
+ Prism.languages.crystal = Prism.languages.extend('ruby', {
20085
+ keyword: [
20086
+ /\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|annotation|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|ptr|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|undef|uninitialized|union|unless|until|when|while|with|yield)\b/,
20087
+ {
20088
+ pattern: /(\.\s*)(?:is_a|responds_to)\?/,
20089
+ lookbehind: true
20090
+ }
20091
+ ],
20092
+ number:
20093
+ /\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,
20094
+ operator: [/->/, Prism.languages.ruby.operator],
20095
+ punctuation: /[(){}[\].,;\\]/
20096
+ });
20097
+ Prism.languages.insertBefore('crystal', 'string-literal', {
20098
+ attribute: {
20099
+ pattern: /@\[.*?\]/,
20100
+ inside: {
20101
+ delimiter: {
20102
+ pattern: /^@\[|\]$/,
20103
+ alias: 'punctuation'
20104
+ },
20105
+ attribute: {
20106
+ pattern: /^(\s*)\w+/,
20107
+ lookbehind: true,
20108
+ alias: 'class-name'
20109
+ },
20110
+ args: {
20111
+ pattern: /\S(?:[\s\S]*\S)?/,
20112
+ inside: Prism.languages.crystal
20113
+ }
20114
+ }
20115
+ },
20116
+ expansion: {
20117
+ pattern: /\{(?:\{.*?\}|%.*?%)\}/,
20118
+ inside: {
20119
+ content: {
20120
+ pattern: /^(\{.)[\s\S]+(?=.\}$)/,
20121
+ lookbehind: true,
20122
+ inside: Prism.languages.crystal
20123
+ },
20124
+ delimiter: {
20125
+ pattern: /^\{[\{%]|[\}%]\}$/,
20126
+ alias: 'operator'
20127
+ }
20128
+ }
20129
+ },
20130
+ char: {
20131
+ pattern:
20132
+ /'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,
20133
+ greedy: true
20134
+ }
20135
+ });
20136
+ })(Prism);
20137
+ }
20138
+ return crystal_1;
20072
20139
  }
20073
20140
 
20074
20141
  var cshtml_1;
@@ -20077,7 +20144,7 @@ var hasRequiredCshtml;
20077
20144
  function requireCshtml () {
20078
20145
  if (hasRequiredCshtml) return cshtml_1;
20079
20146
  hasRequiredCshtml = 1;
20080
- var refractorCsharp = csharp_1;
20147
+ var refractorCsharp = requireCsharp();
20081
20148
  cshtml_1 = cshtml;
20082
20149
  cshtml.displayName = 'cshtml';
20083
20150
  cshtml.aliases = ['razor'];
@@ -21841,7 +21908,7 @@ var hasRequiredErb;
21841
21908
  function requireErb () {
21842
21909
  if (hasRequiredErb) return erb_1;
21843
21910
  hasRequiredErb = 1;
21844
- var refractorRuby = ruby_1;
21911
+ var refractorRuby = requireRuby();
21845
21912
  var refractorMarkupTemplating = requireMarkupTemplating();
21846
21913
  erb_1 = erb;
21847
21914
  erb.displayName = 'erb';
@@ -24323,7 +24390,7 @@ var hasRequiredHaml;
24323
24390
  function requireHaml () {
24324
24391
  if (hasRequiredHaml) return haml_1;
24325
24392
  hasRequiredHaml = 1;
24326
- var refractorRuby = ruby_1;
24393
+ var refractorRuby = requireRuby();
24327
24394
  haml_1 = haml;
24328
24395
  haml.displayName = 'haml';
24329
24396
  haml.aliases = [];
@@ -36759,7 +36826,7 @@ function requireT4Cs () {
36759
36826
  if (hasRequiredT4Cs) return t4Cs_1;
36760
36827
  hasRequiredT4Cs = 1;
36761
36828
  var refractorT4Templating = requireT4Templating();
36762
- var refractorCsharp = csharp_1;
36829
+ var refractorCsharp = requireCsharp();
36763
36830
  t4Cs_1 = t4Cs;
36764
36831
  t4Cs.displayName = 't4Cs';
36765
36832
  t4Cs.aliases = [];
@@ -39533,16 +39600,16 @@ refractor.register(bsl_1);
39533
39600
  refractor.register(c_1);
39534
39601
  refractor.register(cfscript_1);
39535
39602
  refractor.register(chaiscript_1);
39536
- refractor.register(requireCil());
39603
+ refractor.register(cil_1);
39537
39604
  refractor.register(clojure_1);
39538
39605
  refractor.register(cmake_1);
39539
- refractor.register(cobol_1);
39540
- refractor.register(coffeescript_1);
39541
- refractor.register(concurnas_1);
39542
- refractor.register(coq_1);
39543
- refractor.register(cpp_1);
39544
- refractor.register(crystal_1);
39545
- refractor.register(csharp_1);
39606
+ refractor.register(requireCobol());
39607
+ refractor.register(requireCoffeescript());
39608
+ refractor.register(requireConcurnas());
39609
+ refractor.register(requireCoq());
39610
+ refractor.register(requireCpp());
39611
+ refractor.register(requireCrystal());
39612
+ refractor.register(requireCsharp());
39546
39613
  refractor.register(requireCshtml());
39547
39614
  refractor.register(requireCsp());
39548
39615
  refractor.register(requireCssExtras());
@@ -39707,7 +39774,7 @@ refractor.register(requireRest());
39707
39774
  refractor.register(requireRip());
39708
39775
  refractor.register(requireRoboconf());
39709
39776
  refractor.register(requireRobotframework());
39710
- refractor.register(ruby_1);
39777
+ refractor.register(requireRuby());
39711
39778
  refractor.register(requireRust());
39712
39779
  refractor.register(requireSas());
39713
39780
  refractor.register(requireSass());
@@ -41791,8 +41858,8 @@ var css$G = ".Body_module_root__85b1b679 {\n padding: 0.5rem 0.5rem;\n display
41791
41858
  var modules_e6b80d99 = {"root":"Body_module_root__85b1b679"};
41792
41859
  n(css$G,{});
41793
41860
 
41794
- var css$F = ".Dates_module_dates__e3e1fc43 {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n align-items: center;\n flex-wrap: wrap;\n}\n.Dates_module_dates__e3e1fc43 div {\n flex-basis: 14.28%;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n margin-bottom: 0.25rem;\n cursor: pointer;\n align-self: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.Dates_module_dates__e3e1fc43 div .Dates_module_date__e3e1fc43 {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n text-align: center;\n vertical-align: middle;\n border-radius: 1.5rem;\n height: 2.5rem;\n width: 2.5rem;\n font-weight: 400;\n font-size: 0.875rem;\n color: var(--black);\n}\n.Dates_module_dates__e3e1fc43 div .Dates_module_selected__e3e1fc43 {\n background-color: var(--highlight);\n color: var(--white);\n}\n.Dates_module_dates__e3e1fc43 div .Dates_module_unSelected__e3e1fc43 {\n background-color: var(--white);\n border-color: var(--highlight);\n border-width: 0.125rem;\n border-style: solid;\n color: var(--black);\n}\n.Dates_module_dates__e3e1fc43 div .Dates_module_disabled__e3e1fc43 {\n border-radius: 1.5rem;\n color: var(--grey2);\n}\n.Dates_module_dates__e3e1fc43 div .Dates_module_diffMonth__e3e1fc43 {\n opacity: 0.6;\n}\n.Dates_module_dates__e3e1fc43 div:hover .Dates_module_date__e3e1fc43 {\n background: var(--background);\n color: var(--highlight);\n box-shadow: -2px -2px 4px rgba(166, 166, 166, 0.25), 2px 2px 4px rgba(166, 166, 166, 0.24);\n}\n.Dates_module_dates__e3e1fc43 div:hover .Dates_module_selected__e3e1fc43 {\n background-color: var(--highlight);\n color: var(--white);\n}\n.Dates_module_dates__e3e1fc43 div:hover .Dates_module_disabled__e3e1fc43 {\n background: transparent;\n box-shadow: none;\n border-radius: 1.5rem;\n color: var(--grey2);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_minInRange__e3e1fc43 {\n background-color: var(--highlight);\n border-radius: 1.5rem 0rem 0rem 1.5rem;\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_minInRange__e3e1fc43 .Dates_module_date__e3e1fc43 {\n color: var(--white);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_minInRange__e3e1fc43:hover .Dates_module_date__e3e1fc43 {\n background: var(--highlight);\n color: var(--white);\n box-shadow: -2px -2px 4px rgba(166, 166, 166, 0.25), 2px 2px 4px rgba(166, 166, 166, 0.24);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_maxInRange__e3e1fc43 {\n background-color: var(--highlight);\n border-radius: 0rem 1.5rem 1.5rem 0rem;\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_maxInRange__e3e1fc43 .Dates_module_date__e3e1fc43 {\n color: var(--white);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_maxInRange__e3e1fc43:hover .Dates_module_date__e3e1fc43 {\n background: var(--highlight);\n color: var(--white);\n box-shadow: -2px -2px 4px rgba(166, 166, 166, 0.25), 2px 2px 4px rgba(166, 166, 166, 0.24);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_midInRange__e3e1fc43 {\n background: var(--background);\n border-radius: 0rem;\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_midInRange__e3e1fc43 .Dates_module_date__e3e1fc43 {\n color: var(--highlight);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_firstHovered__e3e1fc43 {\n background: var(--background);\n border-radius: 0rem 1.5rem 1.5rem 0rem;\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_firstHovered__e3e1fc43 .Dates_module_date__e3e1fc43 {\n color: var(--highlight);\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_lastHovered__e3e1fc43 {\n background: var(--background);\n border-radius: 1.5rem 0rem 0rem 1.5rem;\n}\n.Dates_module_dates__e3e1fc43 .Dates_module_lastHovered__e3e1fc43 .Dates_module_date__e3e1fc43 {\n color: var(--highlight);\n}";
41795
- var modules_b02dadcc = {"dates":"Dates_module_dates__e3e1fc43","date":"Dates_module_date__e3e1fc43","selected":"Dates_module_selected__e3e1fc43","unSelected":"Dates_module_unSelected__e3e1fc43","disabled":"Dates_module_disabled__e3e1fc43","diffMonth":"Dates_module_diffMonth__e3e1fc43","minInRange":"Dates_module_minInRange__e3e1fc43","maxInRange":"Dates_module_maxInRange__e3e1fc43","midInRange":"Dates_module_midInRange__e3e1fc43","first-hovered":"Dates_module_firstHovered__e3e1fc43","last-hovered":"Dates_module_lastHovered__e3e1fc43"};
41861
+ var css$F = ".Dates_module_dates__e964f6bf {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n align-items: center;\n flex-wrap: wrap;\n}\n.Dates_module_dates__e964f6bf div {\n flex-basis: 14.28%;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n margin-bottom: 0.25rem;\n cursor: pointer;\n align-self: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.Dates_module_dates__e964f6bf div .Dates_module_date__e964f6bf {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n text-align: center;\n vertical-align: middle;\n border-radius: 1.5rem;\n height: 2.5rem;\n width: 2.5rem;\n font-weight: 400;\n font-size: 0.875rem;\n color: var(--black);\n}\n.Dates_module_dates__e964f6bf div .Dates_module_selected__e964f6bf {\n background-color: var(--highlight);\n color: var(--white);\n}\n.Dates_module_dates__e964f6bf div .Dates_module_unSelected__e964f6bf {\n background-color: var(--white);\n border-color: var(--highlight);\n border-width: 0.125rem;\n border-style: solid;\n color: var(--black);\n}\n.Dates_module_dates__e964f6bf div .Dates_module_disabled__e964f6bf {\n border-radius: 1.5rem;\n color: var(--grey2);\n}\n.Dates_module_dates__e964f6bf div .Dates_module_diffMonth__e964f6bf {\n opacity: 0.6;\n}\n.Dates_module_dates__e964f6bf div:hover .Dates_module_date__e964f6bf {\n background: var(--background);\n color: var(--highlight);\n box-shadow: -2px -2px 4px rgba(166, 166, 166, 0.25), 2px 2px 4px rgba(166, 166, 166, 0.24);\n}\n.Dates_module_dates__e964f6bf div:hover .Dates_module_selected__e964f6bf {\n background-color: var(--highlight);\n color: var(--white);\n}\n.Dates_module_dates__e964f6bf div:hover .Dates_module_disabled__e964f6bf {\n background: transparent;\n box-shadow: none;\n border-radius: 1.5rem;\n color: var(--grey2);\n}\n.Dates_module_dates__e964f6bf .Dates_module_minInRange__e964f6bf {\n background-color: var(--highlight);\n border-radius: 1.5rem 0rem 0rem 1.5rem;\n}\n.Dates_module_dates__e964f6bf .Dates_module_minInRange__e964f6bf .Dates_module_date__e964f6bf {\n color: var(--white);\n}\n.Dates_module_dates__e964f6bf .Dates_module_minInRange__e964f6bf:hover .Dates_module_date__e964f6bf {\n background: var(--highlight);\n color: var(--white);\n box-shadow: -2px -2px 4px rgba(166, 166, 166, 0.25), 2px 2px 4px rgba(166, 166, 166, 0.24);\n}\n.Dates_module_dates__e964f6bf .Dates_module_maxInRange__e964f6bf {\n background-color: var(--highlight);\n border-radius: 0rem 1.5rem 1.5rem 0rem;\n}\n.Dates_module_dates__e964f6bf .Dates_module_maxInRange__e964f6bf .Dates_module_date__e964f6bf {\n color: var(--white);\n}\n.Dates_module_dates__e964f6bf .Dates_module_maxInRange__e964f6bf:hover .Dates_module_date__e964f6bf {\n background: var(--highlight);\n color: var(--white);\n box-shadow: -2px -2px 4px rgba(166, 166, 166, 0.25), 2px 2px 4px rgba(166, 166, 166, 0.24);\n}\n.Dates_module_dates__e964f6bf .Dates_module_midInRange__e964f6bf {\n background: var(--background);\n border-radius: 0rem;\n}\n.Dates_module_dates__e964f6bf .Dates_module_midInRange__e964f6bf .Dates_module_date__e964f6bf {\n color: var(--highlight);\n}\n.Dates_module_dates__e964f6bf .Dates_module_midInRangeSelected__e964f6bf {\n background: var(--background);\n border-radius: 0rem;\n}\n.Dates_module_dates__e964f6bf .Dates_module_midInRangeSelected__e964f6bf .Dates_module_date__e964f6bf {\n color: var(--white);\n}\n.Dates_module_dates__e964f6bf .Dates_module_firstHovered__e964f6bf {\n background: var(--background);\n border-radius: 0rem 1.5rem 1.5rem 0rem;\n}\n.Dates_module_dates__e964f6bf .Dates_module_firstHovered__e964f6bf .Dates_module_date__e964f6bf {\n color: var(--highlight);\n}\n.Dates_module_dates__e964f6bf .Dates_module_lastHovered__e964f6bf {\n background: var(--background);\n border-radius: 1.5rem 0rem 0rem 1.5rem;\n}\n.Dates_module_dates__e964f6bf .Dates_module_lastHovered__e964f6bf .Dates_module_date__e964f6bf {\n color: var(--highlight);\n}";
41862
+ var modules_b02dadcc = {"dates":"Dates_module_dates__e964f6bf","date":"Dates_module_date__e964f6bf","selected":"Dates_module_selected__e964f6bf","unSelected":"Dates_module_unSelected__e964f6bf","disabled":"Dates_module_disabled__e964f6bf","diffMonth":"Dates_module_diffMonth__e964f6bf","minInRange":"Dates_module_minInRange__e964f6bf","maxInRange":"Dates_module_maxInRange__e964f6bf","midInRange":"Dates_module_midInRange__e964f6bf","midInRangeSelected":"Dates_module_midInRangeSelected__e964f6bf","first-hovered":"Dates_module_firstHovered__e964f6bf","last-hovered":"Dates_module_lastHovered__e964f6bf"};
41796
41863
  n(css$F,{});
41797
41864
 
41798
41865
  var getDatesOfLastWeekOfLastMonth = function getDatesOfLastWeekOfLastMonth(_ref) {
@@ -42019,9 +42086,9 @@ var Dates = function Dates(props) {
42019
42086
  if (hoveredEndingDate) {
42020
42087
  isMidItem = isBefore(date, fromUnixTime(hoveredEndingDate)) && isAfter(date, fromUnixTime(firstItem)) || isAfter(date, fromUnixTime(hoveredEndingDate)) && isBefore(date, fromUnixTime(firstItem));
42021
42088
  } else {
42022
- isMidItem = isBefore(date, fromUnixTime(lastItem)) && isAfter(date, fromUnixTime(firstItem).setHours(23, 59, 59, 59));
42089
+ isMidItem = isBefore(date, fromUnixTime(lastItem).setHours(0, 0, 0, 0)) && isAfter(date, fromUnixTime(firstItem).setHours(23, 59, 59, 59));
42023
42090
  }
42024
- var parentClassNames = classes(isMidItem ? modules_b02dadcc.midInRange : '', isFirstItem ? isHoveringBeforeSelectedDate ? modules_b02dadcc.maxInRange : modules_b02dadcc.minInRange : '', isLastItem ? modules_b02dadcc.maxInRange : '', isLastItemHovered ? modules_b02dadcc['first-hovered'] : '', isFirstItemHovered ? modules_b02dadcc['last-hovered'] : '');
42091
+ var parentClassNames = classes(isMidItem ? selectedSingleDate ? modules_b02dadcc.midInRangeSelected : modules_b02dadcc.midInRange : '', isFirstItem ? isHoveringBeforeSelectedDate ? modules_b02dadcc.maxInRange : modules_b02dadcc.minInRange : '', isLastItem ? modules_b02dadcc.maxInRange : '', isLastItemHovered ? modules_b02dadcc['first-hovered'] : '', isFirstItemHovered ? modules_b02dadcc['last-hovered'] : '');
42025
42092
  var childClassNames = classes(date ? modules_b02dadcc.date : '', selectedSingleDate ? modules_b02dadcc.selected : '', isUnSelected ? modules_b02dadcc.unSelected : '', notSameMonth ? modules_b02dadcc.diffMonth : '', isDisabled ? modules_b02dadcc.disabled : '');
42026
42093
  return /*#__PURE__*/jsx("div", {
42027
42094
  className: parentClassNames,
@@ -43016,29 +43083,48 @@ var getDateAndUnixRange = function getDateAndUnixRange(duration) {
43016
43083
  startingDate.setHours(0, 0, 0, 0);
43017
43084
  var endingDate = new Date();
43018
43085
  endingDate.setHours(0, 0, 0, 0);
43019
- var dates = ["".concat(startingDate.getDate(), " ").concat(MONTHS[startingDate.getMonth()].substring(0, 3), " ").concat(startingDate.getFullYear()), "".concat(endingDate.getDate(), " ").concat(MONTHS[endingDate.getMonth()].substring(0, 3), " ").concat(endingDate.getFullYear())];
43086
+ var dates = getDatesInStringFormat({
43087
+ startingDate: startingDate,
43088
+ endingDate: endingDate
43089
+ });
43020
43090
  var unix = [getUnixTime(startingDate), getUnixTime(endingDate)];
43021
43091
  return {
43022
43092
  dates: dates,
43023
43093
  unix: unix
43024
43094
  };
43025
43095
  };
43026
- var dateRanges = [{
43027
- title: '7 Days',
43028
- dateRange: getDateAndUnixRange({
43029
- days: 7
43030
- })
43031
- }, {
43032
- title: '15 Days',
43033
- dateRange: getDateAndUnixRange({
43034
- days: 15
43035
- })
43036
- }, {
43037
- title: '1 Month',
43038
- dateRange: getDateAndUnixRange({
43039
- months: 1
43040
- })
43041
- }];
43096
+ var dateRanges = function dateRanges() {
43097
+ var customRanges = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
43098
+ if ((customRanges === null || customRanges === void 0 ? void 0 : customRanges.length) > 0) {
43099
+ return customRanges.map(function (range) {
43100
+ return {
43101
+ title: range.title,
43102
+ dateRange: getDateAndUnixRange(_defineProperty$1({}, range.type, [range.value]))
43103
+ };
43104
+ });
43105
+ }
43106
+ return [{
43107
+ title: 'Last 24 Hours',
43108
+ dateRange: getDateAndUnixRange({
43109
+ hours: 24
43110
+ })
43111
+ }, {
43112
+ title: 'Last 7 Days',
43113
+ dateRange: getDateAndUnixRange({
43114
+ days: 7
43115
+ })
43116
+ }, {
43117
+ title: 'Last 15 Days',
43118
+ dateRange: getDateAndUnixRange({
43119
+ days: 15
43120
+ })
43121
+ }, {
43122
+ title: 'Last 1 Month',
43123
+ dateRange: getDateAndUnixRange({
43124
+ months: 1
43125
+ })
43126
+ }];
43127
+ };
43042
43128
 
43043
43129
  var SelectedDateView = function SelectedDateView(props) {
43044
43130
  var value = props.value,
@@ -43069,7 +43155,9 @@ var Footer = function Footer(props) {
43069
43155
  setSelectedRange = props.setSelectedRange,
43070
43156
  range = props.range,
43071
43157
  goToDate = props.goToDate,
43072
- onApply = props.onApply;
43158
+ onApply = props.onApply,
43159
+ setFixedRange = props.setFixedRange,
43160
+ customRanges = props.customRanges;
43073
43161
  var date = selectedDate.date,
43074
43162
  month = selectedDate.month,
43075
43163
  year = selectedDate.year;
@@ -43077,8 +43165,9 @@ var Footer = function Footer(props) {
43077
43165
  dates = _selectedRange$dates === void 0 ? [] : _selectedRange$dates;
43078
43166
  var monthInShort = month === null || month === void 0 ? void 0 : month.substr(0, 3);
43079
43167
  var datesSelected = date || dates.length === 2;
43080
- var selectFixedDateRange = function selectFixedDateRange(dateRange) {
43168
+ var selectFixedDateRange = function selectFixedDateRange(dateRange, title) {
43081
43169
  setSelectedRange(dateRange);
43170
+ setFixedRange(title);
43082
43171
  };
43083
43172
  var resetDate = function resetDate() {
43084
43173
  goToDate(getUnixTime(new Date()));
@@ -43132,7 +43221,7 @@ var Footer = function Footer(props) {
43132
43221
  var timeValue = "".concat(getTimePickerValue().hours, ":").concat(getTimePickerValue().minutes, " ").concat(getTimePickerValue().meridian);
43133
43222
  return /*#__PURE__*/jsxs("div", {
43134
43223
  className: modules_b490bd5d.root,
43135
- children: [/*#__PURE__*/jsx(TimePicker, {
43224
+ children: [!range && /*#__PURE__*/jsx(TimePicker, {
43136
43225
  value: getTimePickerValue(),
43137
43226
  onChange: onTimeChange,
43138
43227
  className: modules_b490bd5d['time-picker']
@@ -43153,7 +43242,7 @@ var Footer = function Footer(props) {
43153
43242
  action: resetDate
43154
43243
  }), range && /*#__PURE__*/jsx("div", {
43155
43244
  className: modules_b490bd5d['date-ranges'],
43156
- children: dateRanges.map(function (_ref) {
43245
+ children: dateRanges(customRanges).map(function (_ref) {
43157
43246
  var _selectedRange$unix;
43158
43247
  var dateRange = _ref.dateRange,
43159
43248
  title = _ref.title;
@@ -43161,7 +43250,7 @@ var Footer = function Footer(props) {
43161
43250
  return /*#__PURE__*/jsxs("div", {
43162
43251
  className: classes(modules_b490bd5d['date-range'], selectedFixedDateRange ? modules_b490bd5d.selected : ''),
43163
43252
  onClick: function onClick() {
43164
- selectFixedDateRange(dateRange);
43253
+ selectFixedDateRange(dateRange, title);
43165
43254
  },
43166
43255
  children: [/*#__PURE__*/jsx(HalfShade, {}), /*#__PURE__*/jsx("span", {
43167
43256
  children: title
@@ -43185,7 +43274,9 @@ var Calender = function Calender(props) {
43185
43274
  onApply = props.onApply,
43186
43275
  disabledDates = props.disabledDates,
43187
43276
  disableDatesBefore = props.disableDatesBefore,
43188
- value = props.value;
43277
+ value = props.value,
43278
+ setFixedRange = props.setFixedRange,
43279
+ customRanges = props.customRanges;
43189
43280
  var _getDayInfo = getDayInfo(new Date()),
43190
43281
  month = _getDayInfo.month,
43191
43282
  year = _getDayInfo.year,
@@ -43201,10 +43292,16 @@ var Calender = function Calender(props) {
43201
43292
  selectedMonth = _useState2[0],
43202
43293
  setSelectedMonth = _useState2[1];
43203
43294
  useEffect(function () {
43204
- if (value) {
43205
- var _date = fromUnixTime(value);
43206
- var dateAsNumber = _date.getDate();
43207
- var selectedDayInfo = getDayInfo(_date);
43295
+ if (range && value) {
43296
+ setSelectedRange({
43297
+ dates: getDatesInStringFormat({
43298
+ startingDate: fromUnixTime(value[0]),
43299
+ endingDate: fromUnixTime(value[1])
43300
+ }),
43301
+ unix: [value[0], value[1]]
43302
+ });
43303
+ var dateAsNumber = fromUnixTime(value[0]).getDate();
43304
+ var selectedDayInfo = getDayInfo(fromUnixTime(value[0]));
43208
43305
  var selectedDateMonth = {
43209
43306
  month: selectedDayInfo.month,
43210
43307
  monthAsNumber: selectedDayInfo.monthAsNumber,
@@ -43220,19 +43317,40 @@ var Calender = function Calender(props) {
43220
43317
  month: selectedDateMonth.month,
43221
43318
  year: selectedDateMonth.year,
43222
43319
  date: dateAsNumber,
43223
- unix: getUnixTime(_date)
43320
+ unix: getUnixTime(fromUnixTime(value[0]))
43224
43321
  }));
43225
- return;
43226
- }
43227
- var date = new Date();
43228
- if (!range && !isBefore(date, disableDatesBefore)) {
43322
+ } else if (value) {
43323
+ var date = fromUnixTime(value);
43229
43324
  var _dateAsNumber = date.getDate();
43325
+ var _selectedDayInfo = getDayInfo(date);
43326
+ var _selectedDateMonth = {
43327
+ month: _selectedDayInfo.month,
43328
+ monthAsNumber: _selectedDayInfo.monthAsNumber,
43329
+ year: _selectedDayInfo.year,
43330
+ dayAsNumber: _selectedDayInfo.dayAsNumber
43331
+ };
43332
+ setSelectedMonth({
43333
+ month: _selectedDayInfo.month,
43334
+ monthAsNumber: _selectedDayInfo.monthAsNumber,
43335
+ year: _selectedDayInfo.year
43336
+ });
43230
43337
  setSelectedDate(_objectSpread2(_objectSpread2({}, selectedDate), {}, {
43231
- month: selectedMonth.month,
43232
- year: selectedMonth.year,
43338
+ month: _selectedDateMonth.month,
43339
+ year: _selectedDateMonth.year,
43233
43340
  date: _dateAsNumber,
43234
43341
  unix: getUnixTime(date)
43235
43342
  }));
43343
+ } else {
43344
+ var _date = new Date();
43345
+ if (!range && !isBefore(_date, disableDatesBefore)) {
43346
+ var _dateAsNumber2 = _date.getDate();
43347
+ setSelectedDate(_objectSpread2(_objectSpread2({}, selectedDate), {}, {
43348
+ month: selectedMonth.month,
43349
+ year: selectedMonth.year,
43350
+ date: _dateAsNumber2,
43351
+ unix: getUnixTime(_date)
43352
+ }));
43353
+ }
43236
43354
  }
43237
43355
  }, []);
43238
43356
  var goToDate = function goToDate(unix) {
@@ -43309,7 +43427,9 @@ var Calender = function Calender(props) {
43309
43427
  selectedRange: selectedRange,
43310
43428
  setSelectedRange: setSelectedRange,
43311
43429
  onApply: onApply,
43312
- goToDate: goToDate
43430
+ goToDate: goToDate,
43431
+ customRanges: customRanges,
43432
+ setFixedRange: setFixedRange
43313
43433
  })]
43314
43434
  });
43315
43435
  };
@@ -43353,7 +43473,9 @@ var DatePicker = function DatePicker(props) {
43353
43473
  className = props.className,
43354
43474
  disableDatesBefore = props.disableDatesBefore,
43355
43475
  theme = props.theme,
43356
- onClear = props.onClear;
43476
+ onClear = props.onClear,
43477
+ displayDateSelectionValue = props.displayValue,
43478
+ customRanges = props.customRanges;
43357
43479
  var _useState = useState(false),
43358
43480
  _useState2 = _slicedToArray(_useState, 2),
43359
43481
  open = _useState2[0],
@@ -43367,25 +43489,38 @@ var DatePicker = function DatePicker(props) {
43367
43489
  _useState4 = _slicedToArray(_useState3, 2),
43368
43490
  selectedRange = _useState4[0],
43369
43491
  setSelectedRange = _useState4[1];
43370
- var _useState5 = useState(function () {
43371
- return '';
43372
- }),
43492
+ var _useState5 = useState(null),
43373
43493
  _useState6 = _slicedToArray(_useState5, 2),
43374
- selectedDate = _useState6[0],
43375
- setSelectedDate = _useState6[1];
43494
+ fixedRange = _useState6[0],
43495
+ setFixedRange = _useState6[1];
43376
43496
  var _useState7 = useState(function () {
43377
43497
  return '';
43378
43498
  }),
43379
43499
  _useState8 = _slicedToArray(_useState7, 2),
43380
- error = _useState8[0],
43381
- setError = _useState8[1];
43500
+ selectedDate = _useState8[0],
43501
+ setSelectedDate = _useState8[1];
43502
+ var _useState9 = useState(function () {
43503
+ return '';
43504
+ }),
43505
+ _useState10 = _slicedToArray(_useState9, 2),
43506
+ error = _useState10[0],
43507
+ setError = _useState10[1];
43382
43508
  var datePickerRef = useRef();
43383
- var sDate = fromUnixTime(value);
43384
- var displayValue = '';
43509
+ var displayValue = displayDateSelectionValue;
43510
+ if (range) {
43511
+ var _sDate$getMonth$toStr, _eDate$getMonth$toStr;
43512
+ var sDate = fromUnixTime(value[0]);
43513
+ var eDate = fromUnixTime(value[1]);
43514
+ displayValue = " ".concat(sDate.getDate(), " ").concat(MONTHS[(_sDate$getMonth$toStr = sDate.getMonth().toString()) === null || _sDate$getMonth$toStr === void 0 ? void 0 : _sDate$getMonth$toStr.substring(0, 3)], " - ").concat(eDate.getDate(), " ").concat(MONTHS[(_eDate$getMonth$toStr = eDate.getMonth().toString()) === null || _eDate$getMonth$toStr === void 0 ? void 0 : _eDate$getMonth$toStr.substring(0, 3)], " ").concat(eDate.getFullYear());
43515
+ }
43385
43516
  if (!range && value) {
43386
- var _sDate$getMonth$toStr;
43387
- var timeValue = "".concat((sDate.getHours() + 11) % 12 + 1, ":").concat(sDate.getMinutes(), " ").concat(sDate.getHours() >= 12 ? 'PM' : 'AM');
43388
- displayValue = " ".concat(sDate.getDate(), " ").concat(MONTHS[(_sDate$getMonth$toStr = sDate.getMonth().toString()) === null || _sDate$getMonth$toStr === void 0 ? void 0 : _sDate$getMonth$toStr.substring(0, 3)], " ").concat(sDate.getFullYear(), " ").concat(timeValue);
43517
+ var _sDate$getMonth$toStr2;
43518
+ var _sDate = fromUnixTime(value);
43519
+ var timeValue = "".concat((_sDate.getHours() + 11) % 12 + 1, ":").concat(_sDate.getMinutes(), " ").concat(_sDate.getHours() >= 12 ? 'PM' : 'AM');
43520
+ displayValue = " ".concat(_sDate.getDate(), " ").concat(MONTHS[(_sDate$getMonth$toStr2 = _sDate.getMonth().toString()) === null || _sDate$getMonth$toStr2 === void 0 ? void 0 : _sDate$getMonth$toStr2.substring(0, 3)], " ").concat(_sDate.getFullYear(), " ").concat(timeValue);
43521
+ }
43522
+ if (fixedRange) {
43523
+ displayValue = fixedRange;
43389
43524
  }
43390
43525
  var _useFloating = useFloating({
43391
43526
  open: open,
@@ -43425,7 +43560,7 @@ var DatePicker = function DatePicker(props) {
43425
43560
  getFloatingProps = _useInteractions.getFloatingProps;
43426
43561
  var apply = function apply() {
43427
43562
  if (selectedRange.dates.length === 2) {
43428
- if (!isMaxRangeExceeded({
43563
+ if (maxRange !== null && !isMaxRangeExceeded({
43429
43564
  maxRange: maxRange,
43430
43565
  selectedRange: selectedRange
43431
43566
  })) {
@@ -43434,7 +43569,7 @@ var DatePicker = function DatePicker(props) {
43434
43569
  return;
43435
43570
  }
43436
43571
  setError('');
43437
- onApply(selectedRange.unix);
43572
+ onApply(selectedRange.unix, fixedRange);
43438
43573
  setOpen(false);
43439
43574
  } else {
43440
43575
  onApply(selectedDate.unix);
@@ -43452,7 +43587,9 @@ var DatePicker = function DatePicker(props) {
43452
43587
  },
43453
43588
  disabledDates: disabledDates,
43454
43589
  disableDatesBefore: disableDatesBefore,
43455
- value: value
43590
+ value: value,
43591
+ setFixedRange: setFixedRange,
43592
+ customRanges: customRanges
43456
43593
  };
43457
43594
  return /*#__PURE__*/jsxs("div", {
43458
43595
  className: classes(modules_5b831cd1.root, className),
@@ -43533,7 +43670,13 @@ DatePicker.propTypes = {
43533
43670
  }),
43534
43671
  className: propTypes$1.exports.string,
43535
43672
  disableDatesBefore: propTypes$1.exports.arrayOf(propTypes$1.exports.string),
43536
- theme: propTypes$1.exports.string
43673
+ theme: propTypes$1.exports.string,
43674
+ displayValue: propTypes$1.exports.string,
43675
+ customRanges: propTypes$1.exports.arrayOf(propTypes$1.exports.shape({
43676
+ title: propTypes$1.exports.string,
43677
+ type: propTypes$1.exports.string,
43678
+ value: propTypes$1.exports.string
43679
+ }))
43537
43680
  };
43538
43681
  DatePicker.defaultProps = {
43539
43682
  placeholder: '',
@@ -43547,6 +43690,8 @@ DatePicker.defaultProps = {
43547
43690
  className: '',
43548
43691
  disableDatesBefore: [],
43549
43692
  theme: 'dark',
43693
+ customRanges: null,
43694
+ displayValue: '',
43550
43695
  onClear: function onClear() {}
43551
43696
  };
43552
43697
 
@@ -45758,8 +45903,8 @@ Tabs.defaultProps = {
45758
45903
 
45759
45904
  function o(f){return r=>{f.forEach(n=>{typeof n=="function"?n(r):n!=null&&(n.current=r);});}}
45760
45905
 
45761
- var css$8 = ".Tooltip_module_tooltip__1cb07177 {\n text-align: center;\n position: fixed;\n border-radius: 0.25rem;\n min-width: auto;\n max-width: 12rem;\n padding: 0.375rem;\n font-size: 0.875rem;\n font-family: sans-serif;\n line-height: 1;\n}\n.Tooltip_module_tooltip__1cb07177.Tooltip_module_light__1cb07177 {\n color: var(--black);\n background: var(--grey7);\n border-color: var(--black);\n}\n.Tooltip_module_tooltip__1cb07177.Tooltip_module_light__1cb07177 .Tooltip_module_arrow__1cb07177 {\n background: var(--grey7);\n}\n.Tooltip_module_tooltip__1cb07177.Tooltip_module_dark__1cb07177 {\n color: var(--white);\n background: var(--black);\n border-color: var(--white);\n}\n.Tooltip_module_tooltip__1cb07177.Tooltip_module_dark__1cb07177 .Tooltip_module_arrow__1cb07177 {\n background: var(--black);\n}\n.Tooltip_module_tooltip__1cb07177 .Tooltip_module_arrow__1cb07177 {\n position: absolute;\n width: 1rem;\n height: 1rem;\n z-index: -1;\n pointer-events: none;\n transform: rotate(45deg);\n}";
45762
- var modules_e4619b04 = {"tooltip":"Tooltip_module_tooltip__1cb07177","light":"Tooltip_module_light__1cb07177","arrow":"Tooltip_module_arrow__1cb07177","dark":"Tooltip_module_dark__1cb07177"};
45906
+ var css$8 = ".Tooltip_module_tooltip__04fbc763 {\n text-align: center;\n border-radius: 0.25rem;\n min-width: auto;\n max-width: 12rem;\n padding: 0.375rem;\n font-size: 0.875rem;\n font-family: sans-serif;\n line-height: 1;\n}\n.Tooltip_module_tooltip__04fbc763.Tooltip_module_light__04fbc763 {\n color: var(--black);\n background: var(--grey7);\n border-color: var(--black);\n}\n.Tooltip_module_tooltip__04fbc763.Tooltip_module_light__04fbc763 .Tooltip_module_arrow__04fbc763 {\n background: var(--grey7);\n}\n.Tooltip_module_tooltip__04fbc763.Tooltip_module_dark__04fbc763 {\n color: var(--white);\n background: var(--black);\n border-color: var(--white);\n}\n.Tooltip_module_tooltip__04fbc763.Tooltip_module_dark__04fbc763 .Tooltip_module_arrow__04fbc763 {\n background: var(--black);\n}\n.Tooltip_module_tooltip__04fbc763 .Tooltip_module_arrow__04fbc763 {\n position: absolute;\n width: 1rem;\n height: 1rem;\n z-index: -1;\n pointer-events: none;\n transform: rotate(45deg);\n}";
45907
+ var modules_e4619b04 = {"tooltip":"Tooltip_module_tooltip__04fbc763","light":"Tooltip_module_light__04fbc763","arrow":"Tooltip_module_arrow__04fbc763","dark":"Tooltip_module_dark__04fbc763"};
45763
45908
  n(css$8,{});
45764
45909
 
45765
45910
  var Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, propRef) {
@@ -45779,7 +45924,7 @@ var Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, propRef) {
45779
45924
  var _useFloating = useFloating({
45780
45925
  open: open,
45781
45926
  onOpenChange: setOpen,
45782
- strategy: 'fixed',
45927
+ // strategy: 'fixed',
45783
45928
  placement: position,
45784
45929
  // Make sure the tooltip stays on the screen
45785
45930
  whileElementsMounted: autoUpdate,
@@ -45827,7 +45972,7 @@ var Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, propRef) {
45827
45972
  }[side];
45828
45973
  return /*#__PURE__*/jsxs(Fragment, {
45829
45974
  children: [clonedChildren, /*#__PURE__*/jsx(Popper, {
45830
- open: open,
45975
+ open: open && content != null,
45831
45976
  backdrop: false,
45832
45977
  wrapperId: "tooltip",
45833
45978
  children: /*#__PURE__*/jsxs("div", _objectSpread2(_objectSpread2({}, getFloatingProps({
@@ -45840,7 +45985,7 @@ var Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, propRef) {
45840
45985
  zIndex: 100
45841
45986
  }
45842
45987
  })), {}, {
45843
- children: [content, /*#__PURE__*/jsx("div", {
45988
+ children: [/*#__PURE__*/jsx("div", {
45844
45989
  className: modules_e4619b04.arrow,
45845
45990
  ref: arrowEl,
45846
45991
  style: _defineProperty$1({
@@ -45849,7 +45994,7 @@ var Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, propRef) {
45849
45994
  right: '',
45850
45995
  bottom: ''
45851
45996
  }, staticSide, '-0.5rem')
45852
- })]
45997
+ }), content]
45853
45998
  }))
45854
45999
  })]
45855
46000
  });
@@ -45862,7 +46007,7 @@ Tooltip.propTypes = {
45862
46007
  };
45863
46008
  Tooltip.defaultProps = {
45864
46009
  variant: 'light',
45865
- content: 'Tooltip Info',
46010
+ content: null,
45866
46011
  position: 'top',
45867
46012
  className: ''
45868
46013
  };
@@ -105591,7 +105736,7 @@ function useDeepCompareMemoize(value) {
105591
105736
  return ref.current;
105592
105737
  }
105593
105738
 
105594
- var _excluded = ["onClick", "onIdle", "children", "style", "mapId", "clustered", "fitBounds"];
105739
+ var _excluded$1 = ["onClick", "onIdle", "children", "style", "mapId", "clustered", "fitBounds"];
105595
105740
  var BaseMap = function BaseMap(props) {
105596
105741
  // eslint-disable-next-line object-curly-newline
105597
105742
  var onClick = props.onClick,
@@ -105601,7 +105746,7 @@ var BaseMap = function BaseMap(props) {
105601
105746
  mapId = props.mapId,
105602
105747
  clustered = props.clustered,
105603
105748
  fitBounds = props.fitBounds,
105604
- options = _objectWithoutProperties$1(props, _excluded);
105749
+ options = _objectWithoutProperties$1(props, _excluded$1);
105605
105750
  var ref = useRef(null);
105606
105751
  var _useState = useState(),
105607
105752
  _useState2 = _slicedToArray(_useState, 2),
@@ -105718,11 +105863,15 @@ Map$1.defaultProps = {
105718
105863
  libraries: undefined
105719
105864
  };
105720
105865
 
105721
- var Marker = function Marker(options) {
105866
+ var _excluded = ["children"];
105867
+ var Marker = function Marker(_ref) {
105868
+ var children = _ref.children,
105869
+ options = _objectWithoutProperties$1(_ref, _excluded);
105722
105870
  var _useState = useState(),
105723
105871
  _useState2 = _slicedToArray(_useState, 2),
105724
105872
  marker = _useState2[0],
105725
105873
  setMarker = _useState2[1];
105874
+ var infoWindowRef = useRef(null);
105726
105875
  useEffect(function () {
105727
105876
  if (!marker) {
105728
105877
  setMarker(new google.maps.Marker());
@@ -105735,12 +105884,55 @@ var Marker = function Marker(options) {
105735
105884
  }
105736
105885
  };
105737
105886
  }, [marker]);
105887
+ useEffect(function () {
105888
+ if (marker && Children.count(children) === 1 && infoWindowRef !== null && infoWindowRef !== void 0 && infoWindowRef.current) {
105889
+ var infoWindow = infoWindowRef === null || infoWindowRef === void 0 ? void 0 : infoWindowRef.current;
105890
+ console.log(marker, infoWindow);
105891
+ marker.addListener('click', function () {
105892
+ infoWindow.open({
105893
+ anchor: marker,
105894
+ map: options.map
105895
+ });
105896
+ });
105897
+ }
105898
+ }, [marker, children]);
105738
105899
  useEffect(function () {
105739
105900
  if (marker) {
105740
105901
  marker.setOptions(options);
105741
105902
  }
105742
105903
  }, [marker, options]);
105904
+ if (Children.count(children) === 1) {
105905
+ var _Children$toArray;
105906
+ var child = (_Children$toArray = Children.toArray(children)) === null || _Children$toArray === void 0 ? void 0 : _Children$toArray[0];
105907
+ if ( /*#__PURE__*/isValidElement(child)) {
105908
+ // set the map prop on the child component
105909
+ return /*#__PURE__*/cloneElement(child, {
105910
+ ref: infoWindowRef
105911
+ });
105912
+ }
105913
+ }
105743
105914
  return null;
105744
105915
  };
105745
105916
 
105746
- export { Accordion, Alert, AlertIcon, AngleDouble as AngleDoubleIcon, Arrow$1 as ArrowIcon, BASE_URLS, BaseButton, BaseCell, BaseHorizontalBarChart, BaseMap, BaseModal, BasePieChart, BaseRegionChart, BaseSidePanel, BaseTable, BaseVerticalBarChart, BaseWidget, BreadCrumbs, BreadcrumbSeperator as BreadcrumbSeperatorIcon, Button, COLORS, Calender$1 as CalenderIcon, Caret as CaretIcon, Checkbox, CheckboxIcon, Chevron as ChevronIcon, Chip, Close as CloseIcon, Clouds as CloudIcons, CodeSnippet, Columns$1 as ColumnsIcon, Copy as CopyIcon, Cross$1 as CrossIcon, DAYS, Databases as DatabaseIcons, DatePicker, Delete as DeleteIcon, DialogBox, DisplayPicture, Download as DownloadIcon, Dropdown, DropdownItem, Edit as EditIcon, ExpandArrowAlt as ExpandArrowAltIcon, FULL_MONTHS, Filter as FilterIcon, HalfShade as HalfShadeIcon, HierarchyBrowser, HierarchyItem, Link, MONTHS, MagnifyingGlass as MagnifyingGlassIcon, Map$1 as Map, Marker, Nut as NutIcon, PageHeader, Pagination, PaginationList, Plus as PlusIcon, Popover, Popper, Radio, RadioIcon, Refresh as RefreshIcon, Reset as ResetIcon, SearchIcon, Server as ServerIcon, Settings as SettingsIcon, Sort as SortIcon, Stepper, Table, TableCell, TableChip, TableChips, TableColumn, TableFilters, Tabs, Text, TextField, Tick as TickIcon, TimePicker, Toggle, Tooltip, Trash as TrashIcon, View$2 as ViewIcon, classes, cloneDeep, defaultProps, doubleDigitted, get$1 as get, getCSSVariableValue, getCurrentSearchParams, getDateFromEpoch, getDatesInAMonth, getDayInfo, getInitialsOfName, getJSDateFromEpoch, getPagination, getSpacedDisplayName, getTimeFromEpoch, inputHelper, propTypes, stringToPath, sumArrayOfObjects, uniqueArray, uniqueArrayOfObjects, useOutsideClickListener, usePagination, useResize, useRowFilter };
105917
+ // eslint-disable-next-line prefer-arrow-callback
105918
+ var InfoWindow = /*#__PURE__*/forwardRef(function InfoWindow(options, ref) {
105919
+ var _useState = useState(),
105920
+ _useState2 = _slicedToArray(_useState, 2),
105921
+ infoWindow = _useState2[0],
105922
+ setInfoWindow = _useState2[1];
105923
+ useEffect(function () {
105924
+ if (!infoWindow) {
105925
+ var newInfoWindow = new google.maps.InfoWindow();
105926
+ setInfoWindow(newInfoWindow);
105927
+ ref.current = newInfoWindow;
105928
+ }
105929
+ }, [infoWindow]);
105930
+ useEffect(function () {
105931
+ if (infoWindow) {
105932
+ infoWindow.setOptions(options);
105933
+ }
105934
+ }, [infoWindow, options]);
105935
+ return null;
105936
+ });
105937
+
105938
+ export { Accordion, Alert, AlertIcon, AngleDouble as AngleDoubleIcon, Arrow$1 as ArrowIcon, BASE_URLS, BaseButton, BaseCell, BaseHorizontalBarChart, BaseMap, BaseModal, BasePieChart, BaseRegionChart, BaseSidePanel, BaseTable, BaseVerticalBarChart, BaseWidget, BreadCrumbs, BreadcrumbSeperator as BreadcrumbSeperatorIcon, Button, COLORS, Calender$1 as CalenderIcon, Caret as CaretIcon, Checkbox, CheckboxIcon, Chevron as ChevronIcon, Chip, Close as CloseIcon, Clouds as CloudIcons, CodeSnippet, Columns$1 as ColumnsIcon, Copy as CopyIcon, Cross$1 as CrossIcon, DAYS, Databases as DatabaseIcons, DatePicker, Delete as DeleteIcon, DialogBox, DisplayPicture, Download as DownloadIcon, Dropdown, DropdownItem, Edit as EditIcon, ExpandArrowAlt as ExpandArrowAltIcon, FULL_MONTHS, Filter as FilterIcon, HalfShade as HalfShadeIcon, HierarchyBrowser, HierarchyItem, InfoWindow, Link, MONTHS, MagnifyingGlass as MagnifyingGlassIcon, Map$1 as Map, Marker, Nut as NutIcon, PageHeader, Pagination, PaginationList, Plus as PlusIcon, Popover, Popper, Radio, RadioIcon, Refresh as RefreshIcon, Reset as ResetIcon, SearchIcon, Server as ServerIcon, Settings as SettingsIcon, Sort as SortIcon, Stepper, Table, TableCell, TableChip, TableChips, TableColumn, TableFilters, Tabs, Text, TextField, Tick as TickIcon, TimePicker, Toggle, Tooltip, Trash as TrashIcon, View$2 as ViewIcon, classes, cloneDeep, defaultProps, doubleDigitted, get$1 as get, getCSSVariableValue, getCurrentSearchParams, getDateFromEpoch, getDatesInAMonth, getDatesInStringFormat, getDayInfo, getInitialsOfName, getJSDateFromEpoch, getPagination, getSpacedDisplayName, getTimeFromEpoch, inputHelper, propTypes, safeJSONParse, stringToPath, sumArrayOfObjects, uniqueArray, uniqueArrayOfObjects, useOutsideClickListener, usePagination, useResize, useRowFilter };