pinomad 0.10.0 → 0.12.0

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.
Files changed (98) hide show
  1. package/README.md +11 -9
  2. package/dist/chunk-41q0saz0.js +73 -0
  3. package/dist/chunk-42nqtx5r.js +22 -0
  4. package/dist/{chunk-wb10efyq.js → chunk-445cevpm.js} +1 -1
  5. package/dist/{chunk-jgd38rna.js → chunk-47ff1d1t.js} +206 -178
  6. package/dist/chunk-5qf1grkk.js +220 -0
  7. package/dist/{chunk-4h7pkkzr.js → chunk-7mn38n4f.js} +3 -3
  8. package/dist/{chunk-zehwx009.js → chunk-7wj0jh3t.js} +1 -1
  9. package/dist/{chunk-5791mb0b.js → chunk-agq4tn9r.js} +47 -23
  10. package/dist/{chunk-c5p9xkd8.js → chunk-aqj9wfmb.js} +3 -3
  11. package/dist/{chunk-cx8k63by.js → chunk-g3ahp7b9.js} +12 -1
  12. package/dist/chunk-gg2dcqbg.js +458 -0
  13. package/dist/{chunk-73efzaf1.js → chunk-jeqsdcj1.js} +30 -13
  14. package/dist/{chunk-czj9nfrz.js → chunk-ksfxqd8s.js} +500 -41
  15. package/dist/{chunk-p978qj9m.js → chunk-mnmqyq7d.js} +565 -39
  16. package/dist/{chunk-4sepcfpy.js → chunk-np4jd070.js} +155 -3
  17. package/dist/{chunk-v414b5pp.js → chunk-nppgxh6c.js} +2 -2
  18. package/dist/chunk-nq57fdnq.js +106 -0
  19. package/dist/{chunk-sygeb9qb.js → chunk-pqe7q1s7.js} +1 -1
  20. package/dist/{chunk-w2m9xkks.js → chunk-t5abqsva.js} +199 -72
  21. package/dist/{chunk-8gywfw5n.js → chunk-t91zt5f0.js} +2 -51
  22. package/dist/{chunk-vax4zspw.js → chunk-vqkb70d7.js} +3 -3
  23. package/dist/chunk-vx7dy07y.js +26 -0
  24. package/dist/pinomad.js +19 -12
  25. package/package.json +2 -1
  26. package/web/assets/astro-DOly5024.js +1 -0
  27. package/web/assets/c-BIGW1oBm.js +1 -0
  28. package/web/assets/core-DnpzcQzs.js +4 -0
  29. package/web/assets/cpp-DddhVWhK.js +1 -0
  30. package/web/assets/csharp-B_TYUkTI.js +1 -0
  31. package/web/assets/css-Z72CF80r.js +1 -0
  32. package/web/assets/dart-CtKP3W-j.js +1 -0
  33. package/web/assets/diff-D97Zzqfu.js +1 -0
  34. package/web/assets/dockerfile-BcOcwvcX.js +1 -0
  35. package/web/assets/elixir-DkJLSxtU.js +1 -0
  36. package/web/assets/engine-javascript-BHPwbUfN.js +141 -0
  37. package/web/assets/engine-oniguruma-CQjQPVHy.js +1 -0
  38. package/web/assets/fish-BvzEVeQv.js +1 -0
  39. package/web/assets/go-C27-OAKa.js +1 -0
  40. package/web/assets/graphql-ChdNCCLP.js +1 -0
  41. package/web/assets/haskell-Df6bDoY_.js +1 -0
  42. package/web/assets/hcl-BWvSN4gD.js +1 -0
  43. package/web/assets/highlighted-diff-Dn5ifsvK.js +175 -0
  44. package/web/assets/highlights-DnHv6NBM.js +4 -0
  45. package/web/assets/highlights-themes-CUdrlZk3.js +1 -0
  46. package/web/assets/html-BlS82ilI.js +1 -0
  47. package/web/assets/{index-DoyHMPwf.css → index-BV0ecolo.css} +1 -1
  48. package/web/assets/index-DNsTTgPE.js +396 -0
  49. package/web/assets/ini-BEwlwnbL.js +1 -0
  50. package/web/assets/java-CylS5w8V.js +1 -0
  51. package/web/assets/javascript-wDzz0qaB.js +1 -0
  52. package/web/assets/json-Cp-IABpG.js +1 -0
  53. package/web/assets/jsonc-Des-eS-w.js +1 -0
  54. package/web/assets/jsx-g9-lgVsj.js +1 -0
  55. package/web/assets/kotlin-BdnUsdx6.js +1 -0
  56. package/web/assets/less-B1dDrJ26.js +1 -0
  57. package/web/assets/lua-BaeVxFsk.js +1 -0
  58. package/web/assets/make-CHLpvVh8.js +1 -0
  59. package/web/assets/markdown-Cvjx9yec.js +1 -0
  60. package/web/assets/nix-CwoSXNpI.js +1 -0
  61. package/web/assets/objective-c-DXmwc3jG.js +1 -0
  62. package/web/assets/php-DoruYMF0.js +1 -0
  63. package/web/assets/pierre-dark-CyvmCCZW.js +1 -0
  64. package/web/assets/pierre-dark-VKo95ZgA.js +1 -0
  65. package/web/assets/pierre-light-480U9XYS.js +1 -0
  66. package/web/assets/pierre-light-BVSW-Xev.js +1 -0
  67. package/web/assets/postcss-DnzrXTVv.js +1 -0
  68. package/web/assets/powershell-Dd0kTxKP.js +1 -0
  69. package/web/assets/prisma-Vru482bI.js +1 -0
  70. package/web/assets/proto-C7zT0LnQ.js +1 -0
  71. package/web/assets/python-B6aJPvgy.js +1 -0
  72. package/web/assets/ruby-B43yHlf9.js +1 -0
  73. package/web/assets/rust-DPvrY3IQ.js +1 -0
  74. package/web/assets/scala-CqE71os6.js +1 -0
  75. package/web/assets/scss-Cw6XMfVs.js +1 -0
  76. package/web/assets/shellscript-Yzrsuije.js +1 -0
  77. package/web/assets/shiki-BuPP5HCg.js +2 -0
  78. package/web/assets/shiki-langs-FJk0v0Ga.js +2 -0
  79. package/web/assets/shiki-wasm-CgFRq91U.js +1 -0
  80. package/web/assets/sql-DkvoVjww.js +1 -0
  81. package/web/assets/stream-tokenizer-Bl6bisIa.js +4 -0
  82. package/web/assets/svelte-DoIXUgJc.js +1 -0
  83. package/web/assets/swift-C2oV4EkX.js +1 -0
  84. package/web/assets/terraform-BETggiCN.js +1 -0
  85. package/web/assets/theming-themes-BL_CC-Mm.js +1 -0
  86. package/web/assets/toml-vGWfd6FD.js +1 -0
  87. package/web/assets/tsx-COt5Ahok.js +1 -0
  88. package/web/assets/typescript-BPQ3VLAy.js +1 -0
  89. package/web/assets/vue-CwSeJimo.js +1 -0
  90. package/web/assets/xml-sdJ4AIDG.js +1 -0
  91. package/web/assets/xterm-view-6GBZ9nXN.css +32 -0
  92. package/web/assets/xterm-view-ZsuzJb2C.js +38 -0
  93. package/web/assets/yaml-Buea-lGh.js +1 -0
  94. package/web/assets/zig-VOosw3JB.js +1 -0
  95. package/web/index.html +2 -2
  96. package/dist/chunk-bhtx2c8a.js +0 -16
  97. package/dist/chunk-c05g401k.js +0 -170
  98. package/web/assets/index-BdBjP1qJ.js +0 -395
@@ -0,0 +1 @@
1
+ const e=Object.freeze(JSON.parse(`{"displayName":"C","name":"c","patterns":[{"include":"#preprocessor-rule-enabled"},{"include":"#preprocessor-rule-disabled"},{"include":"#preprocessor-rule-conditional"},{"include":"#predefined_macros"},{"include":"#comments"},{"include":"#switch_statement"},{"include":"#anon_pattern_1"},{"include":"#storage_types"},{"include":"#anon_pattern_2"},{"include":"#anon_pattern_3"},{"include":"#anon_pattern_4"},{"include":"#anon_pattern_5"},{"include":"#anon_pattern_6"},{"include":"#anon_pattern_7"},{"include":"#operators"},{"include":"#numbers"},{"include":"#strings"},{"include":"#anon_pattern_range_1"},{"include":"#anon_pattern_range_2"},{"include":"#anon_pattern_range_3"},{"include":"#pragma-mark"},{"include":"#anon_pattern_range_4"},{"include":"#anon_pattern_range_5"},{"include":"#anon_pattern_range_6"},{"include":"#anon_pattern_8"},{"include":"#anon_pattern_9"},{"include":"#anon_pattern_10"},{"include":"#anon_pattern_11"},{"include":"#anon_pattern_12"},{"include":"#anon_pattern_13"},{"include":"#block"},{"include":"#parens"},{"include":"#anon_pattern_range_7"},{"include":"#line_continuation_character"},{"include":"#anon_pattern_range_8"},{"include":"#anon_pattern_range_9"},{"include":"#anon_pattern_14"},{"include":"#anon_pattern_15"}],"repository":{"access-method":{"begin":"([A-Z_a-z][0-9A-Z_a-z]*|(?<=[])]))\\\\s*(?:(\\\\.)|(->))((?:[A-Z_a-z][0-9A-Z_a-z]*\\\\s*(?:\\\\.|->))*)\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)(\\\\()","beginCaptures":{"1":{"name":"variable.object.c"},"2":{"name":"punctuation.separator.dot-access.c"},"3":{"name":"punctuation.separator.pointer-access.c"},"4":{"patterns":[{"match":"\\\\.","name":"punctuation.separator.dot-access.c"},{"match":"->","name":"punctuation.separator.pointer-access.c"},{"match":"[A-Z_a-z][0-9A-Z_a-z]*","name":"variable.object.c"},{"match":".+","name":"everything.else.c"}]},"5":{"name":"entity.name.function.member.c"},"6":{"name":"punctuation.section.arguments.begin.bracket.round.function.member.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.arguments.end.bracket.round.function.member.c"}},"name":"meta.function-call.member.c","patterns":[{"include":"#function-call-innards"}]},"anon_pattern_1":{"match":"\\\\b(break|continue|do|else|for|goto|if|_Pragma|return|while)\\\\b","name":"keyword.control.c"},"anon_pattern_10":{"match":"\\\\b((?:int8|int16|int32|int64|uint8|uint16|uint32|uint64|int_least8|int_least16|int_least32|int_least64|uint_least8|uint_least16|uint_least32|uint_least64|int_fast8|int_fast16|int_fast32|int_fast64|uint_fast8|uint_fast16|uint_fast32|uint_fast64|intptr|uintptr|intmax|uintmax)_t)\\\\b","name":"support.type.stdint.c"},"anon_pattern_11":{"match":"\\\\b(noErr|kNilOptions|kInvalidID|kVariableLengthArray)\\\\b","name":"support.constant.mac-classic.c"},"anon_pattern_12":{"match":"\\\\b(AbsoluteTime|Boolean|Byte|ByteCount|ByteOffset|BytePtr|CompTimeValue|ConstLogicalAddress|ConstStrFileNameParam|ConstStringPtr|Duration|Fixed|FixedPtr|Float32|Float32Point|Float64|Float80|Float96|FourCharCode|Fract|FractPtr|Handle|ItemCount|LogicalAddress|OptionBits|OSErr|OSStatus|OSType|OSTypePtr|PhysicalAddress|ProcessSerialNumber|ProcessSerialNumberPtr|ProcHandle|Ptr|ResType|ResTypePtr|ShortFixed|ShortFixedPtr|SignedByte|SInt16|SInt32|SInt64|SInt8|Size|StrFileName|StringHandle|StringPtr|TimeBase|TimeRecord|TimeScale|TimeValue|TimeValue64|UInt16|UInt32|UInt64|UInt8|UniChar|UniCharCount|UniCharCountPtr|UniCharPtr|UnicodeScalarValue|UniversalProcHandle|UniversalProcPtr|UnsignedFixed|UnsignedFixedPtr|UnsignedWide|UTF16Char|UTF32Char|UTF8Char)\\\\b","name":"support.type.mac-classic.c"},"anon_pattern_13":{"match":"\\\\b([0-9A-Z_a-z]+_t)\\\\b","name":"support.type.posix-reserved.c"},"anon_pattern_14":{"match":";","name":"punctuation.terminator.statement.c"},"anon_pattern_15":{"match":",","name":"punctuation.separator.delimiter.c"},"anon_pattern_2":{"match":"typedef","name":"keyword.other.typedef.c"},"anon_pattern_3":{"match":"\\\\b(const|extern|register|restrict|static|volatile|inline)\\\\b","name":"storage.modifier.c"},"anon_pattern_4":{"match":"\\\\bk[A-Z]\\\\w*\\\\b","name":"constant.other.variable.mac-classic.c"},"anon_pattern_5":{"match":"\\\\bg[A-Z]\\\\w*\\\\b","name":"variable.other.readwrite.global.mac-classic.c"},"anon_pattern_6":{"match":"\\\\bs[A-Z]\\\\w*\\\\b","name":"variable.other.readwrite.static.mac-classic.c"},"anon_pattern_7":{"match":"\\\\b(NULL|true|false|TRUE|FALSE)\\\\b","name":"constant.language.c"},"anon_pattern_8":{"match":"\\\\b(u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\\\\b","name":"support.type.sys-types.c"},"anon_pattern_9":{"match":"\\\\b(pthread_(?:attr_|cond_|condattr_|mutex_|mutexattr_|once_|rwlock_|rwlockattr_||key_)t)\\\\b","name":"support.type.pthread.c"},"anon_pattern_range_1":{"begin":"((?:(?>\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+?|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z))((#)\\\\s*define)\\\\b\\\\s+((?<!\\\\w)[A-Z_a-z]\\\\w*(?!\\\\w))(?:(\\\\()([^()\\\\\\\\]+)(\\\\)))?","beginCaptures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"keyword.control.directive.define.c"},"6":{"name":"punctuation.definition.directive.c"},"7":{"name":"entity.name.function.preprocessor.c"},"8":{"name":"punctuation.definition.parameters.begin.c"},"9":{"patterns":[{"captures":{"1":{"name":"variable.parameter.preprocessor.c"}},"match":"(?<=[(,])\\\\s*((?<!\\\\w)[A-Z_a-z]\\\\w*(?!\\\\w))\\\\s*"},{"match":",","name":"punctuation.separator.parameters.c"},{"match":"\\\\.\\\\.\\\\.","name":"ellipses.c punctuation.vararg-ellipses.variable.parameter.preprocessor.c"}]},"10":{"name":"punctuation.definition.parameters.end.c"}},"end":"(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.macro.c","patterns":[{"include":"#preprocessor-rule-define-line-contents"}]},"anon_pattern_range_2":{"begin":"^\\\\s*((#)\\\\s*(error|warning))\\\\b\\\\s*","beginCaptures":{"1":{"name":"keyword.control.directive.diagnostic.$3.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.diagnostic.c","patterns":[{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"\\"|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.double.c","patterns":[{"include":"#line_continuation_character"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"'|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.single.c","patterns":[{"include":"#line_continuation_character"}]},{"begin":"[^\\"']","end":"(?<!\\\\\\\\)(?=\\\\s*\\\\n)","name":"string.unquoted.single.c","patterns":[{"include":"#line_continuation_character"},{"include":"#comments"}]}]},"anon_pattern_range_3":{"begin":"^\\\\s*((#)\\\\s*(i(?:nclude(?:_next)?|mport)))\\\\b\\\\s*","beginCaptures":{"1":{"name":"keyword.control.directive.$3.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=/[*/])|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.include.c","patterns":[{"include":"#line_continuation_character"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.double.include.c"},{"begin":"<","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.other.lt-gt.include.c"}]},"anon_pattern_range_4":{"begin":"^\\\\s*((#)\\\\s*line)\\\\b","beginCaptures":{"1":{"name":"keyword.control.directive.line.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=/[*/])|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#strings"},{"include":"#numbers"},{"include":"#line_continuation_character"}]},"anon_pattern_range_5":{"begin":"^\\\\s*((#)\\\\s*undef)\\\\b","beginCaptures":{"1":{"name":"keyword.control.directive.undef.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=/[*/])|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"match":"[$A-Z_a-z][$\\\\w]*","name":"entity.name.function.preprocessor.c"},{"include":"#line_continuation_character"}]},"anon_pattern_range_6":{"begin":"^\\\\s*((#)\\\\s*pragma)\\\\b","beginCaptures":{"1":{"name":"keyword.control.directive.pragma.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=/[*/])|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.pragma.c","patterns":[{"include":"#strings"},{"match":"[$A-Z_a-z][-$\\\\w]*","name":"entity.other.attribute-name.pragma.preprocessor.c"},{"include":"#numbers"},{"include":"#line_continuation_character"}]},"anon_pattern_range_7":{"begin":"(?<!\\\\w)(?!\\\\s*(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_int_least64_t|atomic_int_least32_t|pthread_rwlockattr_t|atomic_uint_fast16_t|pthread_mutexattr_t|atomic_int_fast16_t|atomic_uint_fast8_t|atomic_int_fast64_t|atomic_int_least8_t|atomic_int_fast32_t|atomic_int_fast8_t|pthread_condattr_t|pthread_rwlock_t|atomic_uintptr_t|atomic_ptrdiff_t|atomic_uintmax_t|atomic_intmax_t|atomic_char32_t|atomic_intptr_t|atomic_char16_t|pthread_mutex_t|pthread_cond_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_once_t|pthread_attr_t|uint_least8_t|int_least32_t|int_least16_t|pthread_key_t|uint_fast32_t|uint_fast64_t|uint_fast16_t|atomic_size_t|atomic_ushort|atomic_ullong|int_least64_t|atomic_ulong|int_least8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|memory_order|atomic_schar|atomic_uchar|atomic_short|atomic_llong|thread_local|atomic_bool|atomic_uint|atomic_long|int_fast8_t|suseconds_t|atomic_char|atomic_int|useconds_t|_Imaginary|uintmax_t|in_addr_t|in_port_t|_Noreturn|blksize_t|pthread_t|uintptr_t|volatile|u_quad_t|blkcnt_t|intmax_t|intptr_t|_Complex|uint16_t|uint32_t|uint64_t|_Alignof|_Alignas|continue|unsigned|restrict|intmax_t|register|int64_t|qaddr_t|segsz_t|_Atomic|alignas|default|caddr_t|nlink_t|typedef|u_short|fixpt_t|clock_t|swblk_t|ssize_t|alignof|daddr_t|int16_t|int32_t|uint8_t|struct|mode_t|size_t|time_t|ushort|u_long|u_char|int8_t|double|signed|static|extern|inline|return|switch|xor_eq|and_eq|bitand|not_eq|sizeof|quad_t|uid_t|bitor|union|off_t|key_t|ino_t|compl|u_int|short|const|false|while|float|pid_t|break|_Bool|or_eq|div_t|dev_t|gid_t|id_t|long|case|goto|else|bool|auto|id_t|enum|uint|true|NULL|void|char|for|not|int|and|xor|do|or|if)\\\\s*\\\\()(?=[A-Z_a-z]\\\\w*\\\\s*\\\\()","end":"(?!\\\\G)(?<=\\\\))","name":"meta.function.c","patterns":[{"include":"#function-innards"}]},"anon_pattern_range_8":{"begin":"([A-Z_a-z][0-9A-Z_a-z]*|(?<=[])]))?(\\\\[)(?!])","beginCaptures":{"1":{"name":"variable.object.c"},"2":{"name":"punctuation.definition.begin.bracket.square.c"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.square.c"}},"name":"meta.bracket.square.access.c","patterns":[{"include":"#function-call-innards"}]},"anon_pattern_range_9":{"match":"\\\\[\\\\s*]","name":"storage.modifier.array.bracket.square.c"},"backslash_escapes":{"match":"\\\\\\\\([\\"'?\\\\\\\\abefnprtv]|[0-3][0-7]{0,2}|[4-7]\\\\d?|x\\\\h{0,2}|u\\\\h{0,4}|U\\\\h{0,8})","name":"constant.character.escape.c"},"block":{"patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.c"}},"end":"}|(?=\\\\s*#\\\\s*e(?:lif|lse|ndif)\\\\b)","endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.c"}},"name":"meta.block.c","patterns":[{"include":"#block_innards"}]}]},"block_comment":{"patterns":[{"begin":"\\\\s*+(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.c"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.c"}},"name":"comment.block.c"},{"begin":"\\\\s*+(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.c"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.c"}},"name":"comment.block.c"}]},"block_innards":{"patterns":[{"include":"#preprocessor-rule-enabled-block"},{"include":"#preprocessor-rule-disabled-block"},{"include":"#preprocessor-rule-conditional-block"},{"include":"#method_access"},{"include":"#member_access"},{"include":"#c_function_call"},{"begin":"(?=\\\\s)(?<!else|new|return)(?<=\\\\w)\\\\s+(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[]))\\\\s*(\\\\()","beginCaptures":{"1":{"name":"variable.other.c"},"2":{"name":"punctuation.section.parens.begin.bracket.round.initialization.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.initialization.c"}},"name":"meta.initialization.c","patterns":[{"include":"#function-call-innards"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.c"}},"end":"}|(?=\\\\s*#\\\\s*e(?:lif|lse|ndif)\\\\b)","endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.c"}},"patterns":[{"include":"#block_innards"}]},{"include":"#parens-block"},{"include":"$self"}]},"c_conditional_context":{"patterns":[{"include":"$self"},{"include":"#block_innards"}]},"c_function_call":{"begin":"(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\\\s*\\\\()(?=(?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++\\\\s*\\\\(|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[])\\\\s*\\\\()","end":"(?<=\\\\))(?!\\\\w)","name":"meta.function-call.c","patterns":[{"include":"#function-call-innards"}]},"case_statement":{"begin":"((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))((?<!\\\\w)case(?!\\\\w))","beginCaptures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"keyword.control.case.c"}},"end":"(:)","endCaptures":{"1":{"name":"punctuation.separator.colon.case.c"}},"name":"meta.conditional.case.c","patterns":[{"include":"#evaluation_context"},{"include":"#c_conditional_context"}]},"comments":{"patterns":[{"patterns":[{"patterns":[{"begin":"^(?>\\\\s*)(//[!/]+)","beginCaptures":{"1":{"name":"punctuation.definition.comment.documentation.c"}},"end":"(?<=\\\\n)(?<!\\\\\\\\\\\\n)","name":"comment.line.double-slash.documentation.c","patterns":[{"include":"#line_continuation_character"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:callergraph|callgraph|else|endif|f\\\\$|f\\\\[|f]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|[\\"-%.<=>]|::|\\\\||---??)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.italic.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\](?:a|em?))\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.bold.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]b)\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.inline.raw.string.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\][cp])\\\\s+(\\\\S+)"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|em??|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"patterns":[{"match":"in|out","name":"keyword.other.parameter.direction.$0.c"}]},"3":{"name":"variable.parameter.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]param)(?:\\\\s*\\\\[((?:,?\\\\s*(?:in|out)\\\\s*)+)])?\\\\s+\\\\b(\\\\w+)\\\\b"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"\\\\b[A-Z]+:|@[_a-z]+:","name":"storage.type.class.gtkdoc"}]},{"captures":{"1":{"name":"punctuation.definition.comment.begin.documentation.c"},"2":{"patterns":[{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:callergraph|callgraph|else|endif|f\\\\$|f\\\\[|f]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|[\\"-%.<=>]|::|\\\\||---??)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.italic.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\](?:a|em?))\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.bold.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]b)\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.inline.raw.string.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\][cp])\\\\s+(\\\\S+)"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|em??|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"patterns":[{"match":"in|out","name":"keyword.other.parameter.direction.$0.c"}]},"3":{"name":"variable.parameter.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]param)(?:\\\\s*\\\\[((?:,?\\\\s*(?:in|out)\\\\s*)+)])?\\\\s+\\\\b(\\\\w+)\\\\b"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"\\\\b[A-Z]+:|@[_a-z]+:","name":"storage.type.class.gtkdoc"}]},"3":{"name":"punctuation.definition.comment.end.documentation.c"}},"match":"(/\\\\*[!*]+(?=\\\\s))(.+)([!*]*\\\\*/)","name":"comment.block.documentation.c"},{"begin":"((?>\\\\s*)/\\\\*[!*]+(?:(?:\\\\n|$)|(?=\\\\s)))","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.documentation.c"}},"end":"([!*]*\\\\*/)","endCaptures":{"1":{"name":"punctuation.definition.comment.end.documentation.c"}},"name":"comment.block.documentation.c","patterns":[{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:callergraph|callgraph|else|endif|f\\\\$|f\\\\[|f]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|[\\"-%.<=>]|::|\\\\||---??)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.italic.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\](?:a|em?))\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.bold.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]b)\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.inline.raw.string.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\][cp])\\\\s+(\\\\S+)"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|em??|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"patterns":[{"match":"in|out","name":"keyword.other.parameter.direction.$0.c"}]},"3":{"name":"variable.parameter.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]param)(?:\\\\s*\\\\[((?:,?\\\\s*(?:in|out)\\\\s*)+)])?\\\\s+\\\\b(\\\\w+)\\\\b"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"\\\\b[A-Z]+:|@[_a-z]+:","name":"storage.type.class.gtkdoc"}]},{"captures":{"1":{"name":"meta.toc-list.banner.block.c"}},"match":"^/\\\\* =(\\\\s*.*?)\\\\s*= \\\\*/$\\\\n?","name":"comment.block.banner.c"},{"begin":"(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.c"}},"end":"(\\\\*/)","endCaptures":{"1":{"name":"punctuation.definition.comment.end.c"}},"name":"comment.block.c"},{"captures":{"1":{"name":"meta.toc-list.banner.line.c"}},"match":"^// =(\\\\s*.*?)\\\\s*=$\\\\n?","name":"comment.line.banner.c"},{"begin":"((?:^[\\\\t ]+)?)(?=//)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.c"}},"end":"(?!\\\\G)","patterns":[{"begin":"(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.c"}},"end":"(?=\\\\n)","name":"comment.line.double-slash.c","patterns":[{"include":"#line_continuation_character"}]}]}]},{"include":"#block_comment"},{"include":"#line_comment"}]},{"include":"#block_comment"},{"include":"#line_comment"}]},"default_statement":{"begin":"((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))((?<!\\\\w)default(?!\\\\w))","beginCaptures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"keyword.control.default.c"}},"end":"(:)","endCaptures":{"1":{"name":"punctuation.separator.colon.case.default.c"}},"name":"meta.conditional.case.c","patterns":[{"include":"#evaluation_context"},{"include":"#c_conditional_context"}]},"disabled":{"begin":"^\\\\s*#\\\\s*if(n?def)?\\\\b.*$","end":"^\\\\s*#\\\\s*endif\\\\b","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},"evaluation_context":{"patterns":[{"include":"#function-call-innards"},{"include":"$self"}]},"function-call-innards":{"patterns":[{"include":"#comments"},{"include":"#storage_types"},{"include":"#method_access"},{"include":"#member_access"},{"include":"#operators"},{"begin":"(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\\\s*\\\\()((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[]))\\\\s*(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.c"},"2":{"name":"punctuation.section.arguments.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.arguments.end.bracket.round.c"}},"patterns":[{"include":"#function-call-innards"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.c"}},"patterns":[{"include":"#function-call-innards"}]},{"include":"#block_innards"}]},"function-innards":{"patterns":[{"include":"#comments"},{"include":"#storage_types"},{"include":"#operators"},{"include":"#vararg_ellipses"},{"begin":"(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\\\s*\\\\()((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[]))\\\\s*(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.c"},"2":{"name":"punctuation.section.parameters.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parameters.end.bracket.round.c"}},"name":"meta.function.definition.parameters.c","patterns":[{"include":"#probably_a_parameter"},{"include":"#function-innards"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.c"}},"patterns":[{"include":"#function-innards"}]},{"include":"$self"}]},"inline_comment":{"patterns":[{"patterns":[{"captures":{"1":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"2":{"name":"comment.block.c"},"3":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"match":"(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/))"},{"captures":{"1":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"2":{"name":"comment.block.c"},"3":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"match":"(/\\\\*)((?:[^*]|\\\\*++[^/])*+(\\\\*++/))"}]},{"captures":{"1":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"2":{"name":"comment.block.c"},"3":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"match":"(/\\\\*)((?:[^*]|\\\\*++[^/])*+(\\\\*++/))"}]},"line_comment":{"patterns":[{"begin":"\\\\s*+(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.c"}},"end":"(?<=\\\\n)(?<!\\\\\\\\\\\\n)","endCaptures":{},"name":"comment.line.double-slash.c","patterns":[{"include":"#line_continuation_character"}]},{"begin":"\\\\s*+(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.c"}},"end":"(?<=\\\\n)(?<!\\\\\\\\\\\\n)","endCaptures":{},"name":"comment.line.double-slash.c","patterns":[{"include":"#line_continuation_character"}]}]},"line_continuation_character":{"patterns":[{"captures":{"1":{"name":"constant.character.escape.line-continuation.c"}},"match":"(\\\\\\\\)\\\\n"}]},"member_access":{"captures":{"1":{"name":"variable.other.object.access.c"},"2":{"name":"punctuation.separator.dot-access.c"},"3":{"name":"punctuation.separator.pointer-access.c"},"4":{"patterns":[{"include":"#member_access"},{"include":"#method_access"},{"captures":{"1":{"name":"variable.other.object.access.c"},"2":{"name":"punctuation.separator.dot-access.c"},"3":{"name":"punctuation.separator.pointer-access.c"}},"match":"((?:[A-Z_a-z]\\\\w*|(?<=[])]))\\\\s*)(?:(\\\\.\\\\*?)|(->\\\\*?))"}]},"5":{"name":"variable.other.member.c"}},"match":"((?:[A-Z_a-z]\\\\w*|(?<=[])]))\\\\s*)(?:(\\\\.\\\\*?)|(->\\\\*?))((?:[A-Z_a-z]\\\\w*\\\\s*(?:\\\\.\\\\*?|->\\\\*?)\\\\s*)*)\\\\s*\\\\b((?!(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_int_least64_t|atomic_int_least32_t|pthread_rwlockattr_t|atomic_uint_fast16_t|pthread_mutexattr_t|atomic_int_fast16_t|atomic_uint_fast8_t|atomic_int_fast64_t|atomic_int_least8_t|atomic_int_fast32_t|atomic_int_fast8_t|pthread_condattr_t|atomic_uintptr_t|atomic_ptrdiff_t|pthread_rwlock_t|atomic_uintmax_t|pthread_mutex_t|atomic_intmax_t|atomic_intptr_t|atomic_char32_t|atomic_char16_t|pthread_attr_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_cond_t|pthread_once_t|uint_fast64_t|uint_fast16_t|atomic_size_t|uint_least8_t|int_least64_t|int_least32_t|int_least16_t|pthread_key_t|atomic_ullong|atomic_ushort|uint_fast32_t|atomic_schar|atomic_short|uint_fast8_t|int_fast64_t|int_fast32_t|int_fast16_t|atomic_ulong|atomic_llong|int_least8_t|atomic_uchar|memory_order|suseconds_t|int_fast8_t|atomic_bool|atomic_char|atomic_uint|atomic_long|atomic_int|useconds_t|_Imaginary|blksize_t|pthread_t|in_addr_t|uintptr_t|in_port_t|uintmax_t|blkcnt_t|uint16_t|unsigned|_Complex|uint32_t|intptr_t|intmax_t|uint64_t|u_quad_t|int64_t|int32_t|ssize_t|caddr_t|clock_t|uint8_t|u_short|swblk_t|segsz_t|int16_t|fixpt_t|daddr_t|nlink_t|qaddr_t|size_t|time_t|mode_t|signed|quad_t|ushort|u_long|u_char|double|int8_t|ino_t|uid_t|pid_t|_Bool|float|dev_t|div_t|short|gid_t|off_t|u_int|key_t|id_t|uint|long|void|char|bool|id_t|int)\\\\b)[A-Z_a-z]\\\\w*\\\\b(?!\\\\())"},"method_access":{"begin":"((?:[A-Z_a-z]\\\\w*|(?<=[])]))\\\\s*)(?:(\\\\.\\\\*?)|(->\\\\*?))((?:[A-Z_a-z]\\\\w*\\\\s*(?:\\\\.\\\\*?|->\\\\*?)\\\\s*)*)\\\\s*([A-Z_a-z]\\\\w*)(\\\\()","beginCaptures":{"1":{"name":"variable.other.object.access.c"},"2":{"name":"punctuation.separator.dot-access.c"},"3":{"name":"punctuation.separator.pointer-access.c"},"4":{"patterns":[{"include":"#member_access"},{"include":"#method_access"},{"captures":{"1":{"name":"variable.other.object.access.c"},"2":{"name":"punctuation.separator.dot-access.c"},"3":{"name":"punctuation.separator.pointer-access.c"}},"match":"((?:[A-Z_a-z]\\\\w*|(?<=[])]))\\\\s*)(?:(\\\\.\\\\*?)|(->\\\\*?))"}]},"5":{"name":"entity.name.function.member.c"},"6":{"name":"punctuation.section.arguments.begin.bracket.round.function.member.c"}},"contentName":"meta.function-call.member.c","end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.section.arguments.end.bracket.round.function.member.c"}},"patterns":[{"include":"#function-call-innards"}]},"numbers":{"captures":{"0":{"patterns":[{"begin":"(?=.)","end":"$","patterns":[{"captures":{"1":{"name":"keyword.other.unit.hexadecimal.c"},"2":{"name":"constant.numeric.hexadecimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"4":{"name":"constant.numeric.hexadecimal.c"},"5":{"name":"constant.numeric.hexadecimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"6":{"name":"punctuation.separator.constant.numeric"},"8":{"name":"keyword.other.unit.exponent.hexadecimal.c"},"9":{"name":"keyword.operator.plus.exponent.hexadecimal.c"},"10":{"name":"keyword.operator.minus.exponent.hexadecimal.c"},"11":{"name":"constant.numeric.exponent.hexadecimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"12":{"name":"keyword.other.unit.suffix.floating-point.c"}},"match":"\\\\G(0[Xx])(\\\\h(?:\\\\h|((?<=\\\\h)'(?=\\\\h)))*)?((?<=\\\\h)\\\\.|\\\\.(?=\\\\h))(\\\\h(?:\\\\h|((?<=\\\\h)'(?=\\\\h)))*)?((?<!')([Pp])(\\\\+?)(-?)([0-9](?:[0-9]|(?<=\\\\h)'(?=\\\\h))*))?([FLfl](?!\\\\w))?$"},{"captures":{"2":{"name":"constant.numeric.decimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"4":{"name":"constant.numeric.decimal.point.c"},"5":{"name":"constant.numeric.decimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"6":{"name":"punctuation.separator.constant.numeric"},"8":{"name":"keyword.other.unit.exponent.decimal.c"},"9":{"name":"keyword.operator.plus.exponent.decimal.c"},"10":{"name":"keyword.operator.minus.exponent.decimal.c"},"11":{"name":"constant.numeric.exponent.decimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"12":{"name":"keyword.other.unit.suffix.floating-point.c"}},"match":"\\\\G((?=[.0-9])(?!0[BXbx]))([0-9](?:[0-9]|((?<=\\\\h)'(?=\\\\h)))*)?((?<=[0-9])\\\\.|\\\\.(?=[0-9]))([0-9](?:[0-9]|((?<=\\\\h)'(?=\\\\h)))*)?((?<!')([Ee])(\\\\+?)(-?)([0-9](?:[0-9]|(?<=\\\\h)'(?=\\\\h))*))?([FLfl](?!\\\\w))?$"},{"captures":{"1":{"name":"keyword.other.unit.binary.c"},"2":{"name":"constant.numeric.binary.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"4":{"name":"keyword.other.unit.suffix.integer.c"}},"match":"\\\\G(0[Bb])([01](?:[01]|((?<=\\\\h)'(?=\\\\h)))*)((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\\\w))?$"},{"captures":{"1":{"name":"keyword.other.unit.octal.c"},"2":{"name":"constant.numeric.octal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"4":{"name":"keyword.other.unit.suffix.integer.c"}},"match":"\\\\G(0)((?:[0-7]|((?<=\\\\h)'(?=\\\\h)))+)((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\\\w))?$"},{"captures":{"1":{"name":"keyword.other.unit.hexadecimal.c"},"2":{"name":"constant.numeric.hexadecimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"5":{"name":"keyword.other.unit.exponent.hexadecimal.c"},"6":{"name":"keyword.operator.plus.exponent.hexadecimal.c"},"7":{"name":"keyword.operator.minus.exponent.hexadecimal.c"},"8":{"name":"constant.numeric.exponent.hexadecimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"9":{"name":"keyword.other.unit.suffix.integer.c"}},"match":"\\\\G(0[Xx])(\\\\h(?:\\\\h|((?<=\\\\h)'(?=\\\\h)))*)((?<!')([Pp])(\\\\+?)(-?)([0-9](?:[0-9]|(?<=\\\\h)'(?=\\\\h))*))?((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\\\w))?$"},{"captures":{"2":{"name":"constant.numeric.decimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"5":{"name":"keyword.other.unit.exponent.decimal.c"},"6":{"name":"keyword.operator.plus.exponent.decimal.c"},"7":{"name":"keyword.operator.minus.exponent.decimal.c"},"8":{"name":"constant.numeric.exponent.decimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"9":{"name":"keyword.other.unit.suffix.integer.c"}},"match":"\\\\G((?=[.0-9])(?!0[BXbx]))([0-9](?:[0-9]|((?<=\\\\h)'(?=\\\\h)))*)((?<!')([Ee])(\\\\+?)(-?)([0-9](?:[0-9]|(?<=\\\\h)'(?=\\\\h))*))?((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\\\w))?$"},{"match":"(?:['.0-9A-Z_a-z]|(?<=[EPep])[-+])+","name":"invalid.illegal.constant.numeric"}]}]}},"match":"(?<!\\\\w)\\\\.?\\\\d(?:['.0-9A-Z_a-z]|(?<=[EPep])[-+])*"},"operators":{"patterns":[{"match":"(?<![$\\\\w])(sizeof)(?![$\\\\w])","name":"keyword.operator.sizeof.c"},{"match":"--","name":"keyword.operator.decrement.c"},{"match":"\\\\+\\\\+","name":"keyword.operator.increment.c"},{"match":"(?:[-%*+]|(?<!\\\\()/)=","name":"keyword.operator.assignment.compound.c"},{"match":"(?:[\\\\&^]|<<|>>|\\\\|)=","name":"keyword.operator.assignment.compound.bitwise.c"},{"match":"<<|>>","name":"keyword.operator.bitwise.shift.c"},{"match":"!=|<=|>=|==|[<>]","name":"keyword.operator.comparison.c"},{"match":"&&|!|\\\\|\\\\|","name":"keyword.operator.logical.c"},{"match":"[\\\\&^|~]","name":"keyword.operator.c"},{"match":"=","name":"keyword.operator.assignment.c"},{"match":"[-%*+/]","name":"keyword.operator.c"},{"begin":"(\\\\?)","beginCaptures":{"1":{"name":"keyword.operator.ternary.c"}},"end":"(:)","endCaptures":{"1":{"name":"keyword.operator.ternary.c"}},"patterns":[{"include":"#function-call-innards"},{"include":"$self"}]}]},"parens":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.c"}},"name":"meta.parens.c","patterns":[{"include":"$self"}]},"parens-block":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.c"}},"name":"meta.parens.block.c","patterns":[{"include":"#block_innards"},{"match":"(?-im:(?<!:):(?!:))","name":"punctuation.range-based.c"}]},"pragma-mark":{"captures":{"1":{"name":"meta.preprocessor.pragma.c"},"2":{"name":"keyword.control.directive.pragma.pragma-mark.c"},"3":{"name":"punctuation.definition.directive.c"},"4":{"name":"entity.name.tag.pragma-mark.c"}},"match":"^\\\\s*(((#)\\\\s*pragma\\\\s+mark)\\\\s+(.*))","name":"meta.section.c"},"predefined_macros":{"patterns":[{"captures":{"1":{"name":"entity.name.other.preprocessor.macro.predefined.$1.c"}},"match":"\\\\b(__cplusplus|__DATE__|__FILE__|__LINE__|__STDC__|__STDC_HOSTED__|__STDC_NO_COMPLEX__|__STDC_VERSION__|__STDCPP_THREADS__|__TIME__|NDEBUG|__OBJC__|__ASSEMBLER__|__ATOM__|__AVX__|__AVX2__|_CHAR_UNSIGNED|__CLR_VER|_CONTROL_FLOW_GUARD|__COUNTER__|__cplusplus_cli|__cplusplus_winrt|_CPPRTTI|_CPPUNWIND|_DEBUG|_DLL|__FUNCDNAME__|__FUNCSIG__|__FUNCTION__|_INTEGRAL_MAX_BITS|__INTELLISENSE__|_ISO_VOLATILE|_KERNEL_MODE|_M_AMD64|_M_ARM|_M_ARM_ARMV7VE|_M_ARM_FP|_M_ARM64|_M_CEE|_M_CEE_PURE|_M_CEE_SAFE|_M_FP_EXCEPT|_M_FP_FAST|_M_FP_PRECISE|_M_FP_STRICT|_M_IX86|_M_IX86_FP|_M_X64|_MANAGED|_MSC_BUILD|_MSC_EXTENSIONS|_MSC_FULL_VER|_MSC_VER|_MSVC_LANG|__MSVC_RUNTIME_CHECKS|_MT|_NATIVE_WCHAR_T_DEFINED|_OPENMP|_PREFAST|__TIMESTAMP__|_VC_NO_DEFAULTLIB|_WCHAR_T_DEFINED|_WIN32|_WIN64|_WINRT_DLL|_ATL_VER|_MFC_VER|__GFORTRAN__|__GNUC__|__GNUC_MINOR__|__GNUC_PATCHLEVEL__|__GNUG__|__STRICT_ANSI__|__BASE_FILE__|__INCLUDE_LEVEL__|__ELF__|__VERSION__|__OPTIMIZE__|__OPTIMIZE_SIZE__|__NO_INLINE__|__GNUC_STDC_INLINE__|__CHAR_UNSIGNED__|__WCHAR_UNSIGNED__|__REGISTER_PREFIX__|__SIZE_TYPE__|__PTRDIFF_TYPE__|__WCHAR_TYPE__|__WINT_TYPE__|__INTMAX_TYPE__|__UINTMAX_TYPE__|__SIG_ATOMIC_TYPE__|__INT8_TYPE__|__INT16_TYPE__|__INT32_TYPE__|__INT64_TYPE__|__UINT8_TYPE__|__UINT16_TYPE__|__UINT32_TYPE__|__UINT64_TYPE__|__INT_LEAST8_TYPE__|__INT_LEAST16_TYPE__|__INT_LEAST32_TYPE__|__INT_LEAST64_TYPE__|__UINT_LEAST8_TYPE__|__UINT_LEAST16_TYPE__|__UINT_LEAST32_TYPE__|__UINT_LEAST64_TYPE__|__INT_FAST8_TYPE__|__INT_FAST16_TYPE__|__INT_FAST32_TYPE__|__INT_FAST64_TYPE__|__UINT_FAST8_TYPE__|__UINT_FAST16_TYPE__|__UINT_FAST32_TYPE__|__UINT_FAST64_TYPE__|__INTPTR_TYPE__|__UINTPTR_TYPE__|__CHAR_BIT__|__SCHAR_MAX__|__WCHAR_MAX__|__SHRT_MAX__|__INT_MAX__|__LONG_MAX__|__LONG_LONG_MAX__|__WINT_MAX__|__SIZE_MAX__|__PTRDIFF_MAX__|__INTMAX_MAX__|__UINTMAX_MAX__|__SIG_ATOMIC_MAX__|__INT8_MAX__|__INT16_MAX__|__INT32_MAX__|__INT64_MAX__|__UINT8_MAX__|__UINT16_MAX__|__UINT32_MAX__|__UINT64_MAX__|__INT_LEAST8_MAX__|__INT_LEAST16_MAX__|__INT_LEAST32_MAX__|__INT_LEAST64_MAX__|__UINT_LEAST8_MAX__|__UINT_LEAST16_MAX__|__UINT_LEAST32_MAX__|__UINT_LEAST64_MAX__|__INT_FAST8_MAX__|__INT_FAST16_MAX__|__INT_FAST32_MAX__|__INT_FAST64_MAX__|__UINT_FAST8_MAX__|__UINT_FAST16_MAX__|__UINT_FAST32_MAX__|__UINT_FAST64_MAX__|__INTPTR_MAX__|__UINTPTR_MAX__|__WCHAR_MIN__|__WINT_MIN__|__SIG_ATOMIC_MIN__|__SCHAR_WIDTH__|__SHRT_WIDTH__|__INT_WIDTH__|__LONG_WIDTH__|__LONG_LONG_WIDTH__|__PTRDIFF_WIDTH__|__SIG_ATOMIC_WIDTH__|__SIZE_WIDTH__|__WCHAR_WIDTH__|__WINT_WIDTH__|__INT_LEAST8_WIDTH__|__INT_LEAST16_WIDTH__|__INT_LEAST32_WIDTH__|__INT_LEAST64_WIDTH__|__INT_FAST8_WIDTH__|__INT_FAST16_WIDTH__|__INT_FAST32_WIDTH__|__INT_FAST64_WIDTH__|__INTPTR_WIDTH__|__INTMAX_WIDTH__|__SIZEOF_INT__|__SIZEOF_LONG__|__SIZEOF_LONG_LONG__|__SIZEOF_SHORT__|__SIZEOF_POINTER__|__SIZEOF_FLOAT__|__SIZEOF_DOUBLE__|__SIZEOF_LONG_DOUBLE__|__SIZEOF_SIZE_T__|__SIZEOF_WCHAR_T__|__SIZEOF_WINT_T__|__SIZEOF_PTRDIFF_T__|__BYTE_ORDER__|__ORDER_LITTLE_ENDIAN__|__ORDER_BIG_ENDIAN__|__ORDER_PDP_ENDIAN__|__FLOAT_WORD_ORDER__|__DEPRECATED|__EXCEPTIONS|__GXX_RTTI|__USING_SJLJ_EXCEPTIONS__|__GXX_EXPERIMENTAL_CXX0X__|__GXX_WEAK__|__NEXT_RUNTIME__|__LP64__|_LP64|__SSP__|__SSP_ALL__|__SSP_STRONG__|__SSP_EXPLICIT__|__SANITIZE_ADDRESS__|__SANITIZE_THREAD__|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16|__HAVE_SPECULATION_SAFE_VALUE|__GCC_HAVE_DWARF2_CFI_ASM|__FP_FAST_FMAF??|__FP_FAST_FMAL|__FP_FAST_FMAF16|__FP_FAST_FMAF32|__FP_FAST_FMAF64|__FP_FAST_FMAF128|__FP_FAST_FMAF32X|__FP_FAST_FMAF64X|__FP_FAST_FMAF128X|__GCC_IEC_559|__GCC_IEC_559_COMPLEX|__NO_MATH_ERRNO__|__has_builtin|__has_feature|__has_extension|__has_cpp_attribute|__has_c_attribute|__has_attribute|__has_declspec_attribute|__is_identifier|__has_include|__has_include_next|__has_warning|__BASE_FILE__|__FILE_NAME__|__clang__|__clang_major__|__clang_minor__|__clang_patchlevel__|__clang_version__|__fp16|_Float16)\\\\b"},{"match":"\\\\b__([A-Z_]+)__\\\\b","name":"entity.name.other.preprocessor.macro.predefined.probably.$1.c"}]},"preprocessor-rule-conditional":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if(?:n?def)?)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#preprocessor-rule-enabled-elif"},{"include":"#preprocessor-rule-enabled-else"},{"include":"#preprocessor-rule-disabled-elif"},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"$self"}]},{"captures":{"0":{"name":"invalid.illegal.stray-$1.c"}},"match":"^\\\\s*#\\\\s*(e(?:lse|lif|ndif))\\\\b"}]},"preprocessor-rule-conditional-block":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if(?:n?def)?)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#preprocessor-rule-enabled-elif-block"},{"include":"#preprocessor-rule-enabled-else-block"},{"include":"#preprocessor-rule-disabled-elif"},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#block_innards"}]},{"captures":{"0":{"name":"invalid.illegal.stray-$1.c"}},"match":"^\\\\s*#\\\\s*(e(?:lse|lif|ndif))\\\\b"}]},"preprocessor-rule-conditional-line":{"patterns":[{"match":"\\\\bdefined\\\\b(?:\\\\s*$|(?=\\\\s*\\\\(*\\\\s*(?!defined\\\\b)[$A-Z_a-z][$\\\\w]*\\\\b\\\\s*\\\\)*\\\\s*(?:\\\\n|//|/\\\\*|[:?]|&&|\\\\|\\\\||\\\\\\\\\\\\s*\\\\n)))","name":"keyword.control.directive.conditional.c"},{"match":"\\\\bdefined\\\\b","name":"invalid.illegal.macro-name.c"},{"include":"#comments"},{"include":"#strings"},{"include":"#numbers"},{"begin":"\\\\?","beginCaptures":{"0":{"name":"keyword.operator.ternary.c"}},"end":":","endCaptures":{"0":{"name":"keyword.operator.ternary.c"}},"patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#operators"},{"match":"\\\\b(NULL|true|false|TRUE|FALSE)\\\\b","name":"constant.language.c"},{"match":"[$A-Z_a-z][$\\\\w]*","name":"entity.name.function.preprocessor.c"},{"include":"#line_continuation_character"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"\\\\)|(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.c"}},"patterns":[{"include":"#preprocessor-rule-conditional-line"}]}]},"preprocessor-rule-define-line-blocks":{"patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.c"}},"end":"}|(?=\\\\s*#\\\\s*e(?:lif|lse|ndif)\\\\b)|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.c"}},"patterns":[{"include":"#preprocessor-rule-define-line-blocks"},{"include":"#preprocessor-rule-define-line-contents"}]},{"include":"#preprocessor-rule-define-line-contents"}]},"preprocessor-rule-define-line-contents":{"patterns":[{"include":"#vararg_ellipses"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.c"}},"end":"}|(?=\\\\s*#\\\\s*e(?:lif|lse|ndif)\\\\b)|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.c"}},"name":"meta.block.c","patterns":[{"include":"#preprocessor-rule-define-line-blocks"}]},{"match":"\\\\(","name":"punctuation.section.parens.begin.bracket.round.c"},{"match":"\\\\)","name":"punctuation.section.parens.end.bracket.round.c"},{"begin":"(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas|asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\\\s*\\\\()(?=(?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++\\\\s*\\\\(|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[])\\\\s*\\\\()","end":"(?<=\\\\))(?!\\\\w)|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","name":"meta.function.c","patterns":[{"include":"#preprocessor-rule-define-line-functions"}]},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"\\"|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.double.c","patterns":[{"include":"#string_escaped_char"},{"include":"#string_placeholder"},{"include":"#line_continuation_character"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"'|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.single.c","patterns":[{"include":"#string_escaped_char"},{"include":"#line_continuation_character"}]},{"include":"#method_access"},{"include":"#member_access"},{"include":"$self"}]},"preprocessor-rule-define-line-functions":{"patterns":[{"include":"#comments"},{"include":"#storage_types"},{"include":"#vararg_ellipses"},{"include":"#method_access"},{"include":"#member_access"},{"include":"#operators"},{"begin":"(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\\\s*\\\\()((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[]))\\\\s*(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.c"},"2":{"name":"punctuation.section.arguments.begin.bracket.round.c"}},"end":"(\\\\))|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"1":{"name":"punctuation.section.arguments.end.bracket.round.c"}},"patterns":[{"include":"#preprocessor-rule-define-line-functions"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"(\\\\))|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"1":{"name":"punctuation.section.parens.end.bracket.round.c"}},"patterns":[{"include":"#preprocessor-rule-define-line-functions"}]},{"include":"#preprocessor-rule-define-line-contents"}]},"preprocessor-rule-disabled":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if)\\\\b(?=\\\\s*\\\\(*\\\\b0+\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"include":"#preprocessor-rule-enabled-elif"},{"include":"#preprocessor-rule-enabled-else"},{"include":"#preprocessor-rule-disabled-elif"},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*e(?:lif|lse|ndif))\\\\b)","patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"$self"}]},{"begin":"\\\\n","contentName":"comment.block.preprocessor.if-branch.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]}]}]},"preprocessor-rule-disabled-block":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if)\\\\b(?=\\\\s*\\\\(*\\\\b0+\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"include":"#preprocessor-rule-enabled-elif-block"},{"include":"#preprocessor-rule-enabled-else-block"},{"include":"#preprocessor-rule-disabled-elif"},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*e(?:lif|lse|ndif))\\\\b)","patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#block_innards"}]},{"begin":"\\\\n","contentName":"comment.block.preprocessor.if-branch.in-block.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]}]}]},"preprocessor-rule-disabled-elif":{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b(?=\\\\s*\\\\(*\\\\b0+\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*e(?:lif|lse|ndif))\\\\b)","patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"begin":"\\\\n","contentName":"comment.block.preprocessor.elif-branch.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]}]},"preprocessor-rule-enabled":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if)\\\\b(?=\\\\s*\\\\(*\\\\b0*1\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"},"3":{"name":"constant.numeric.preprocessor.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"begin":"^\\\\s*((#)\\\\s*else)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.else-branch.c","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.if-branch.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"\\\\n","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"$self"}]}]}]},"preprocessor-rule-enabled-block":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if)\\\\b(?=\\\\s*\\\\(*\\\\b0*1\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"begin":"^\\\\s*((#)\\\\s*else)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.else-branch.in-block.c","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.if-branch.in-block.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"\\\\n","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#block_innards"}]}]}]},"preprocessor-rule-enabled-elif":{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b(?=\\\\s*\\\\(*\\\\b0*1\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"begin":"\\\\n","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"begin":"^\\\\s*((#)\\\\s*(else))\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.elif-branch.c","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"^\\\\s*((#)\\\\s*(elif))\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.elif-branch.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"include":"$self"}]}]},"preprocessor-rule-enabled-elif-block":{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b(?=\\\\s*\\\\(*\\\\b0*1\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"begin":"\\\\n","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"begin":"^\\\\s*((#)\\\\s*(else))\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.elif-branch.in-block.c","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"^\\\\s*((#)\\\\s*(elif))\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.elif-branch.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"include":"#block_innards"}]}]},"preprocessor-rule-enabled-else":{"begin":"^\\\\s*((#)\\\\s*else)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"$self"}]},"preprocessor-rule-enabled-else-block":{"begin":"^\\\\s*((#)\\\\s*else)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"#block_innards"}]},"probably_a_parameter":{"captures":{"1":{"name":"variable.parameter.probably.c"}},"match":"(?<=[0-9A-Z_a-z] |[]\\\\&)*>])\\\\s*([A-Z_a-z]\\\\w*)\\\\s*(?=(?:\\\\[]\\\\s*)?[),])"},"static_assert":{"begin":"((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))((?<!\\\\w)static_assert|_Static_assert(?!\\\\w))((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))(\\\\()","beginCaptures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"keyword.other.static_assert.c"},"6":{"patterns":[{"include":"#inline_comment"}]},"7":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"8":{"name":"comment.block.c"},"9":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"10":{"name":"punctuation.section.arguments.begin.bracket.round.static_assert.c"}},"end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.section.arguments.end.bracket.round.static_assert.c"}},"patterns":[{"begin":"(,)\\\\s*(?=(?:L|u8?|U\\\\s*\\")?)","beginCaptures":{"1":{"name":"punctuation.separator.delimiter.comma.c"}},"end":"(?=\\\\))","name":"meta.static_assert.message.c","patterns":[{"include":"#string_context"}]},{"include":"#evaluation_context"}]},"storage_types":{"patterns":[{"match":"(?-im:(?<!\\\\w)(?:unsigned|signed|double|_Bool|short|float|long|void|char|bool|int)(?!\\\\w))","name":"storage.type.built-in.primitive.c"},{"match":"(?-im:(?<!\\\\w)(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|pthread_rwlockattr_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_uint_fast16_t|atomic_int_least64_t|atomic_int_least32_t|atomic_int_least16_t|atomic_uint_least8_t|atomic_uint_fast8_t|atomic_int_least8_t|atomic_int_fast16_t|pthread_mutexattr_t|atomic_int_fast32_t|atomic_int_fast64_t|atomic_int_fast8_t|pthread_condattr_t|atomic_ptrdiff_t|pthread_rwlock_t|atomic_uintptr_t|atomic_uintmax_t|atomic_intmax_t|atomic_intptr_t|atomic_char32_t|atomic_char16_t|pthread_mutex_t|pthread_cond_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_once_t|pthread_attr_t|int_least32_t|pthread_key_t|int_least16_t|int_least64_t|uint_least8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|atomic_ushort|atomic_ullong|atomic_size_t|int_fast16_t|int_fast64_t|uint_fast8_t|atomic_short|atomic_uchar|atomic_schar|int_least8_t|memory_order|atomic_llong|atomic_ulong|int_fast32_t|atomic_long|atomic_uint|atomic_char|int_fast8_t|suseconds_t|atomic_bool|atomic_int|_Imaginary|useconds_t|in_port_t|uintmax_t|pthread_t|blksize_t|in_addr_t|uintptr_t|blkcnt_t|uint16_t|uint32_t|uint64_t|u_quad_t|_Complex|intptr_t|intmax_t|segsz_t|u_short|nlink_t|uint8_t|int64_t|int32_t|int16_t|fixpt_t|daddr_t|caddr_t|qaddr_t|ssize_t|clock_t|swblk_t|u_long|mode_t|int8_t|time_t|ushort|u_char|quad_t|size_t|pid_t|gid_t|uid_t|dev_t|div_t|off_t|u_int|key_t|ino_t|uint|id_t)(?!\\\\w))","name":"storage.type.built-in.c"},{"match":"(?-im:\\\\b(enum|struct|union)\\\\b)","name":"storage.type.$1.c"},{"begin":"\\\\b(__asm__|asm)\\\\b\\\\s*((?:volatile)?)","beginCaptures":{"1":{"name":"storage.type.asm.c"},"2":{"name":"storage.modifier.c"}},"end":"(?!\\\\G)","name":"meta.asm.c","patterns":[{"captures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"match":"^((?:(?>\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+?|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z))(?:\\\\n|$)"},{"include":"#comments"},{"begin":"(((?:(?>\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+?|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z))\\\\()","beginCaptures":{"1":{"name":"punctuation.section.parens.begin.bracket.round.assembly.c"},"2":{"patterns":[{"include":"#inline_comment"}]},"3":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"4":{"name":"comment.block.c"},"5":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.section.parens.end.bracket.round.assembly.c"}},"patterns":[{"begin":"(R?)(\\")","beginCaptures":{"1":{"name":"meta.encoding.c"},"2":{"name":"punctuation.definition.string.begin.assembly.c"}},"contentName":"meta.embedded.assembly.c","end":"(\\")","endCaptures":{"1":{"name":"punctuation.definition.string.end.assembly.c"}},"name":"string.quoted.double.c","patterns":[{"include":"source.asm"},{"include":"source.x86"},{"include":"source.x86_64"},{"include":"source.arm"},{"include":"#backslash_escapes"},{"include":"#string_escaped_char"}]},{"begin":"(\\\\()","beginCaptures":{"1":{"name":"punctuation.section.parens.begin.bracket.round.assembly.inner.c"}},"end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.section.parens.end.bracket.round.assembly.inner.c"}},"patterns":[{"include":"#evaluation_context"}]},{"captures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"variable.other.asm.label.c"},"6":{"patterns":[{"include":"#inline_comment"}]},"7":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"8":{"name":"comment.block.c"},"9":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"match":"\\\\[((?:(?>\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+?|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z))([A-Z_a-z]\\\\w*)((?:(?>\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+?|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z))]"},{"match":":","name":"punctuation.separator.delimiter.colon.assembly.c"},{"include":"#comments"}]}]}]},"string_escaped_char":{"patterns":[{"match":"\\\\\\\\([\\"'?\\\\\\\\abefnprtv]|[0-3]\\\\d{0,2}|[4-7]\\\\d?|x\\\\h{0,2}|u\\\\h{0,4}|U\\\\h{0,8})","name":"constant.character.escape.c"},{"match":"\\\\\\\\.","name":"invalid.illegal.unknown-escape.c"}]},"string_placeholder":{"patterns":[{"match":"%(\\\\d+\\\\$)?[- #'+0]*[,:;_]?((-?\\\\d+)|\\\\*(-?\\\\d+\\\\$)?)?(\\\\.((-?\\\\d+)|\\\\*(-?\\\\d+\\\\$)?)?)?(hh?|ll|[Ljlqtz]|vh|vl?|hv|hl)?[%AC-GOSUXac-ginopsux]","name":"constant.other.placeholder.c"},{"captures":{"1":{"name":"invalid.illegal.placeholder.c"}},"match":"(%)(?!\\"\\\\s*(PRI|SCN))"}]},"strings":{"patterns":[{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.double.c","patterns":[{"include":"#string_escaped_char"},{"include":"#string_placeholder"},{"include":"#line_continuation_character"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.single.c","patterns":[{"include":"#string_escaped_char"},{"include":"#line_continuation_character"}]}]},"switch_conditional_parentheses":{"begin":"((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))(\\\\()","beginCaptures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"punctuation.section.parens.begin.bracket.round.conditional.switch.c"}},"end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.section.parens.end.bracket.round.conditional.switch.c"}},"name":"meta.conditional.switch.c","patterns":[{"include":"#evaluation_context"},{"include":"#c_conditional_context"}]},"switch_statement":{"begin":"(((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))((?<!\\\\w)switch(?!\\\\w)))","beginCaptures":{"1":{"name":"meta.head.switch.c"},"2":{"patterns":[{"include":"#inline_comment"}]},"3":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"4":{"name":"comment.block.c"},"5":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"6":{"name":"keyword.control.switch.c"}},"end":"(?<=}|%>|\\\\?\\\\?>)|(?=[];=>\\\\[])","name":"meta.block.switch.c","patterns":[{"begin":"\\\\G ?","end":"(\\\\{|<%|\\\\?\\\\?<|(?=;))","endCaptures":{"1":{"name":"punctuation.section.block.begin.bracket.curly.switch.c"}},"name":"meta.head.switch.c","patterns":[{"include":"#switch_conditional_parentheses"},{"include":"$self"}]},{"begin":"(?<=\\\\{|<%|\\\\?\\\\?<)","end":"(}|%>|\\\\?\\\\?>)","endCaptures":{"1":{"name":"punctuation.section.block.end.bracket.curly.switch.c"}},"name":"meta.body.switch.c","patterns":[{"include":"#default_statement"},{"include":"#case_statement"},{"include":"$self"},{"include":"#block_innards"}]},{"begin":"(?<=}|%>|\\\\?\\\\?>)[\\\\n\\\\s]*","end":"[\\\\n\\\\s]*(?=;)","name":"meta.tail.switch.c","patterns":[{"include":"$self"}]}]},"vararg_ellipses":{"match":"(?<!\\\\.)\\\\.\\\\.\\\\.(?!\\\\.)","name":"punctuation.vararg-ellipses.c"}},"scopeName":"source.c"}`)),n=[e];export{n as default};
@@ -0,0 +1,4 @@
1
+ var Ot=Object.defineProperty;var jt=(n,e,t)=>e in n?Ot(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var h=(n,e,t)=>jt(n,typeof e!="symbol"?e+"":e,t);import{t as Wt}from"./highlighted-diff-Dn5ifsvK.js";var R=class extends Error{constructor(n){super(n),this.name="ShikiError"}};function Ft(n){return Le(n)}function Le(n){return Array.isArray(n)?Dt(n):n instanceof RegExp?n:typeof n=="object"?Ht(n):n}function Dt(n){let e=[];for(let t=0,r=n.length;t<r;t++)e[t]=Le(n[t]);return e}function Ht(n){let e={};for(let t in n)e[t]=Le(n[t]);return e}function st(n,...e){return e.forEach(t=>{for(let r in t)n[r]=t[r]}),n}function rt(n){const e=~n.lastIndexOf("/")||~n.lastIndexOf("\\");return e===0?n:~e===n.length-1?rt(n.substring(0,n.length-1)):n.substr(~e+1)}var be=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,re=class{static hasCaptures(n){return n===null?!1:(be.lastIndex=0,be.test(n))}static replaceCaptures(n,e,t){return n.replace(be,(r,s,i,o)=>{let c=t[parseInt(s||i,10)];if(c){let a=e.substring(c.start,c.end);for(;a[0]===".";)a=a.substring(1);switch(o){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return r})}};function it(n,e){return n<e?-1:n>e?1:0}function ot(n,e){if(n===null&&e===null)return 0;if(!n)return-1;if(!e)return 1;let t=n.length,r=e.length;if(t===r){for(let s=0;s<t;s++){let i=it(n[s],e[s]);if(i!==0)return i}return 0}return t-r}function De(n){return!!(/^#[0-9a-f]{6}$/i.test(n)||/^#[0-9a-f]{8}$/i.test(n)||/^#[0-9a-f]{3}$/i.test(n)||/^#[0-9a-f]{4}$/i.test(n))}function at(n){return n.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var ct=class{constructor(n){h(this,"fn");h(this,"cache",new Map);this.fn=n}get(n){if(this.cache.has(n))return this.cache.get(n);const e=this.fn(n);return this.cache.set(n,e),e}},ae=class{constructor(n,e,t){h(this,"_colorMap");h(this,"_defaults");h(this,"_root");h(this,"_cachedMatchRoot",new ct(n=>this._root.match(n)));this._colorMap=n,this._defaults=e,this._root=t}static createFromRawTheme(n,e){return this.createFromParsedTheme(Ut(n),e)}static createFromParsedTheme(n,e){return Vt(n,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(n){if(n===null)return this._defaults;const e=n.scopeName,r=this._cachedMatchRoot.get(e).find(s=>zt(n.parent,s.parentScopes));return r?new lt(r.fontStyle,r.foreground,r.background):null}},we=class ie{constructor(e,t){h(this,"parent");h(this,"scopeName");this.parent=e,this.scopeName=t}static push(e,t){for(const r of t)e=new ie(e,r);return e}static from(...e){let t=null;for(let r=0;r<e.length;r++)t=new ie(t,e[r]);return t}push(e){return new ie(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let r=this;for(;r&&r!==e;)t.push(r.scopeName),r=r.parent;return r===e?t.reverse():void 0}};function zt(n,e){if(e.length===0)return!0;for(let t=0;t<e.length;t++){let r=e[t],s=!1;if(r===">"){if(t===e.length-1)return!1;r=e[++t],s=!0}for(;n&&!qt(n.scopeName,r);){if(s)return!1;n=n.parent}if(!n)return!1;n=n.parent}return!0}function qt(n,e){return e===n||n.startsWith(e)&&n[e.length]==="."}var lt=class{constructor(n,e,t){h(this,"fontStyle");h(this,"foregroundId");h(this,"backgroundId");this.fontStyle=n,this.foregroundId=e,this.backgroundId=t}};function Ut(n){if(!n)return[];if(!n.settings||!Array.isArray(n.settings))return[];let e=n.settings,t=[],r=0;for(let s=0,i=e.length;s<i;s++){let o=e[s];if(!o.settings)continue;let c;if(typeof o.scope=="string"){let u=o.scope;u=u.replace(/^[,]+/,""),u=u.replace(/[,]+$/,""),c=u.split(",")}else Array.isArray(o.scope)?c=o.scope:c=[""];let a=-1;if(typeof o.settings.fontStyle=="string"){a=0;let u=o.settings.fontStyle.split(" ");for(let f=0,g=u.length;f<g;f++)switch(u[f]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let l=null;typeof o.settings.foreground=="string"&&De(o.settings.foreground)&&(l=o.settings.foreground);let d=null;typeof o.settings.background=="string"&&De(o.settings.background)&&(d=o.settings.background);for(let u=0,f=c.length;u<f;u++){let p=c[u].trim().split(" "),b=p[p.length-1],S=null;p.length>1&&(S=p.slice(0,p.length-1),S.reverse()),t[r++]=new Kt(b,S,s,a,l,d)}}return t}var Kt=class{constructor(n,e,t,r,s,i){h(this,"scope");h(this,"parentScopes");h(this,"index");h(this,"fontStyle");h(this,"foreground");h(this,"background");this.scope=n,this.parentScopes=e,this.index=t,this.fontStyle=r,this.foreground=s,this.background=i}},I=(n=>(n[n.NotSet=-1]="NotSet",n[n.None=0]="None",n[n.Italic=1]="Italic",n[n.Bold=2]="Bold",n[n.Underline=4]="Underline",n[n.Strikethrough=8]="Strikethrough",n))(I||{});function Vt(n,e){n.sort((a,l)=>{let d=it(a.scope,l.scope);return d!==0||(d=ot(a.parentScopes,l.parentScopes),d!==0)?d:a.index-l.index});let t=0,r="#000000",s="#ffffff";for(;n.length>=1&&n[0].scope==="";){let a=n.shift();a.fontStyle!==-1&&(t=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(s=a.background)}let i=new Yt(e),o=new lt(t,i.getId(r),i.getId(s)),c=new Qt(new Re(0,null,-1,0,0),[]);for(let a=0,l=n.length;a<l;a++){let d=n[a];c.insert(0,d.scope,d.parentScopes,d.fontStyle,i.getId(d.foreground),i.getId(d.background))}return new ae(i,o,c)}var Yt=class{constructor(n){h(this,"_isFrozen");h(this,"_lastColorId");h(this,"_id2color");h(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(n)){this._isFrozen=!0;for(let e=0,t=n.length;e<t;e++)this._color2id[n[e]]=e,this._id2color[e]=n[e]}else this._isFrozen=!1}getId(n){if(n===null)return 0;n=n.toUpperCase();let e=this._color2id[n];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${n}`);return e=++this._lastColorId,this._color2id[n]=e,this._id2color[e]=n,e}getColorMap(){return this._id2color.slice(0)}},Jt=Object.freeze([]),Re=class ht{constructor(e,t,r,s,i){h(this,"scopeDepth");h(this,"parentScopes");h(this,"fontStyle");h(this,"foreground");h(this,"background");this.scopeDepth=e,this.parentScopes=t||Jt,this.fontStyle=r,this.foreground=s,this.background=i}clone(){return new ht(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let r=0,s=e.length;r<s;r++)t[r]=e[r].clone();return t}acceptOverwrite(e,t,r,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},Qt=class Te{constructor(e,t=[],r={}){h(this,"_mainRule");h(this,"_children");h(this,"_rulesWithParentScopes");this._mainRule=e,this._children=r,this._rulesWithParentScopes=t}static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let r=0,s=0;for(;e.parentScopes[r]===">"&&r++,t.parentScopes[s]===">"&&s++,!(r>=e.parentScopes.length||s>=t.parentScopes.length);){const i=t.parentScopes[s].length-e.parentScopes[r].length;if(i!==0)return i;r++,s++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,i;if(r===-1?(s=e,i=""):(s=e.substring(0,r),i=e.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(i)}const t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(Te._cmpBySpecificity),t}insert(e,t,r,s,i,o){if(t===""){this._doInsertHere(e,r,s,i,o);return}let c=t.indexOf("."),a,l;c===-1?(a=t,l=""):(a=t.substring(0,c),l=t.substring(c+1));let d;this._children.hasOwnProperty(a)?d=this._children[a]:(d=new Te(this._mainRule.clone(),Re.cloneArr(this._rulesWithParentScopes)),this._children[a]=d),d.insert(e+1,l,r,s,i,o)}_doInsertHere(e,t,r,s,i){if(t===null){this._mainRule.acceptOverwrite(e,r,s,i);return}for(let o=0,c=this._rulesWithParentScopes.length;o<c;o++){let a=this._rulesWithParentScopes[o];if(ot(a.parentScopes,t)===0){a.acceptOverwrite(e,r,s,i);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Re(e,t,r,s,i))}},O=class N{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=N.getLanguageId(e),r=N.getTokenType(e),s=N.getFontStyle(e),i=N.getForeground(e),o=N.getBackground(e);console.log({languageId:t,tokenType:r,fontStyle:s,foreground:i,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,t,r,s,i,o,c){let a=N.getLanguageId(e),l=N.getTokenType(e),d=N.containsBalancedBrackets(e)?1:0,u=N.getFontStyle(e),f=N.getForeground(e),g=N.getBackground(e);return t!==0&&(a=t),r!==8&&(l=r),s!==null&&(d=s?1:0),i!==-1&&(u=i),o!==0&&(f=o),c!==0&&(g=c),(a<<0|l<<8|d<<10|u<<11|f<<15|g<<24)>>>0}};function ce(n,e){const t=[],r=Xt(n);let s=r.next();for(;s!==null;){let a=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let l=o();if(t.push({matcher:l,priority:a}),s!==",")break;s=r.next()}return t;function i(){if(s==="-"){s=r.next();const a=i();return l=>!!a&&!a(l)}if(s==="("){s=r.next();const a=c();return s===")"&&(s=r.next()),a}if(He(s)){const a=[];do a.push(s),s=r.next();while(He(s));return l=>e(a,l)}return null}function o(){const a=[];let l=i();for(;l;)a.push(l),l=i();return d=>a.every(u=>u(d))}function c(){const a=[];let l=o();for(;l&&(a.push(l),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");l=o()}return d=>a.some(u=>u(d))}}function He(n){return!!n&&!!n.match(/[\w\.:]+/)}function Xt(n){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(n);return{next:()=>{if(!t)return null;const r=t[0];return t=e.exec(n),r}}}function ut(n){typeof n.dispose=="function"&&n.dispose()}var U=class{constructor(n){h(this,"scopeName");this.scopeName=n}toKey(){return this.scopeName}},Zt=class{constructor(n,e){h(this,"scopeName");h(this,"ruleName");this.scopeName=n,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},en=class{constructor(){h(this,"_references",[]);h(this,"_seenReferenceKeys",new Set);h(this,"visitedRule",new Set)}get references(){return this._references}add(n){const e=n.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(n))}},tn=class{constructor(n,e){h(this,"repo");h(this,"initialScopeName");h(this,"seenFullScopeRequests",new Set);h(this,"seenPartialScopeRequests",new Set);h(this,"Q");this.repo=n,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new U(this.initialScopeName)]}processQueue(){const n=this.Q;this.Q=[];const e=new en;for(const t of n)nn(t,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof U){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName)||this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function nn(n,e,t,r){const s=t.lookup(n.scopeName);if(!s){if(n.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=t.lookup(e);n instanceof U?oe({baseGrammar:i,selfGrammar:s},r):Ie(n.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},r);const o=t.injections(n.scopeName);if(o)for(const c of o)r.add(new U(c))}function Ie(n,e,t){if(e.repository&&e.repository[n]){const r=e.repository[n];le([r],e,t)}}function oe(n,e){n.selfGrammar.patterns&&Array.isArray(n.selfGrammar.patterns)&&le(n.selfGrammar.patterns,{...n,repository:n.selfGrammar.repository},e),n.selfGrammar.injections&&le(Object.values(n.selfGrammar.injections),{...n,repository:n.selfGrammar.repository},e)}function le(n,e,t){for(const r of n){if(t.visitedRule.has(r))continue;t.visitedRule.add(r);const s=r.repository?st({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&le(r.patterns,{...e,repository:s},t);const i=r.include;if(!i)continue;const o=ft(i);switch(o.kind){case 0:oe({...e,selfGrammar:e.baseGrammar},t);break;case 1:oe(e,t);break;case 2:Ie(o.ruleName,{...e,repository:s},t);break;case 3:case 4:const c=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(c){const a={baseGrammar:e.baseGrammar,selfGrammar:c,repository:s};o.kind===4?Ie(o.ruleName,a,t):oe(a,t)}else o.kind===4?t.add(new Zt(o.scopeName,o.ruleName)):t.add(new U(o.scopeName));break}}}var sn=class{constructor(){h(this,"kind",0)}},rn=class{constructor(){h(this,"kind",1)}},on=class{constructor(n){h(this,"ruleName");h(this,"kind",2);this.ruleName=n}},an=class{constructor(n){h(this,"scopeName");h(this,"kind",3);this.scopeName=n}},cn=class{constructor(n,e){h(this,"scopeName");h(this,"ruleName");h(this,"kind",4);this.scopeName=n,this.ruleName=e}};function ft(n){if(n==="$base")return new sn;if(n==="$self")return new rn;const e=n.indexOf("#");if(e===-1)return new an(n);if(e===0)return new on(n.substring(1));{const t=n.substring(0,e),r=n.substring(e+1);return new cn(t,r)}}var ln=/\\(\d+)/,ze=/\\(\d+)/g,hn=-1,dt=-2;var Z=class{constructor(n,e,t,r){h(this,"$location");h(this,"id");h(this,"_nameIsCapturing");h(this,"_name");h(this,"_contentNameIsCapturing");h(this,"_contentName");this.$location=n,this.id=e,this._name=t||null,this._nameIsCapturing=re.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=re.hasCaptures(this._contentName)}get debugName(){const n=this.$location?`${rt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${n}`}getName(n,e){return!this._nameIsCapturing||this._name===null||n===null||e===null?this._name:re.replaceCaptures(this._name,n,e)}getContentName(n,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:re.replaceCaptures(this._contentName,n,e)}},un=class extends Z{constructor(e,t,r,s,i){super(e,t,r,s);h(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,r,s){throw new Error("Not supported!")}},fn=class extends Z{constructor(e,t,r,s,i){super(e,t,r,null);h(this,"_match");h(this,"captures");h(this,"_cachedCompiledPatterns");this._match=new K(s,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,s){return this._getCachedCompiledPatterns(e).compileAG(e,r,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new V,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},qe=class extends Z{constructor(e,t,r,s,i){super(e,t,r,s);h(this,"hasMissingPatterns");h(this,"patterns");h(this,"_cachedCompiledPatterns");this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const r of this.patterns)e.getRule(r).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,s){return this._getCachedCompiledPatterns(e).compileAG(e,r,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new V,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ve=class extends Z{constructor(e,t,r,s,i,o,c,a,l,d){super(e,t,r,s);h(this,"_begin");h(this,"beginCaptures");h(this,"_end");h(this,"endHasBackReferences");h(this,"endCaptures");h(this,"applyEndPatternLast");h(this,"hasMissingPatterns");h(this,"patterns");h(this,"_cachedCompiledPatterns");this._begin=new K(i,this.id),this.beginCaptures=o,this._end=new K(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=d.patterns,this.hasMissingPatterns=d.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,r,s){return this._getCachedCompiledPatterns(e,t).compileAG(e,r,s)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new V;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},he=class extends Z{constructor(e,t,r,s,i,o,c,a,l){super(e,t,r,s);h(this,"_begin");h(this,"beginCaptures");h(this,"whileCaptures");h(this,"_while");h(this,"whileHasBackReferences");h(this,"hasMissingPatterns");h(this,"patterns");h(this,"_cachedCompiledPatterns");h(this,"_cachedCompiledWhilePatterns");this._begin=new K(i,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new K(c,dt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,s){return this._getCachedCompiledPatterns(e).compileAG(e,r,s)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new V;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,r,s){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,r,s)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new V,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},gt=class T{static createCaptureRule(e,t,r,s,i){return e.registerRule(o=>new un(t,o,r,s,i))}static getCompiledRuleId(e,t,r){return e.id||t.registerRule(s=>{if(e.id=s,e.match)return new fn(e.$vscodeTextmateLocation,e.id,e.name,e.match,T._compileCaptures(e.captures,t,r));if(typeof e.begin>"u"){e.repository&&(r=st({},r,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new qe(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,T._compilePatterns(i,t,r))}return e.while?new he(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,T._compileCaptures(e.beginCaptures||e.captures,t,r),e.while,T._compileCaptures(e.whileCaptures||e.captures,t,r),T._compilePatterns(e.patterns,t,r)):new ve(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,T._compileCaptures(e.beginCaptures||e.captures,t,r),e.end,T._compileCaptures(e.endCaptures||e.captures,t,r),e.applyEndPatternLast,T._compilePatterns(e.patterns,t,r))}),e.id}static _compileCaptures(e,t,r){let s=[];if(e){let i=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const c=parseInt(o,10);c>i&&(i=c)}for(let o=0;o<=i;o++)s[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const c=parseInt(o,10);let a=0;e[o].patterns&&(a=T.getCompiledRuleId(e[o],t,r)),s[c]=T.createCaptureRule(t,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,a)}}return s}static _compilePatterns(e,t,r){let s=[];if(e)for(let i=0,o=e.length;i<o;i++){const c=e[i];let a=-1;if(c.include){const l=ft(c.include);switch(l.kind){case 0:case 1:a=T.getCompiledRuleId(r[c.include],t,r);break;case 2:let d=r[l.ruleName];d&&(a=T.getCompiledRuleId(d,t,r));break;case 3:case 4:const u=l.scopeName,f=l.kind===4?l.ruleName:null,g=t.getExternalGrammar(u,r);if(g)if(f){let p=g.repository[f];p&&(a=T.getCompiledRuleId(p,t,g.repository))}else a=T.getCompiledRuleId(g.repository.$self,t,g.repository);break}}else a=T.getCompiledRuleId(c,t,r);if(a!==-1){const l=t.getRule(a);let d=!1;if((l instanceof qe||l instanceof ve||l instanceof he)&&l.hasMissingPatterns&&l.patterns.length===0&&(d=!0),d)continue;s.push(a)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},K=class pt{constructor(e,t){h(this,"source");h(this,"ruleId");h(this,"hasAnchor");h(this,"hasBackReferences");h(this,"_anchorCache");if(e&&typeof e=="string"){const r=e.length;let s=0,i=[],o=!1;for(let c=0;c<r;c++)if(e.charAt(c)==="\\"&&c+1<r){const l=e.charAt(c+1);l==="z"?(i.push(e.substring(s,c)),i.push("$(?!\\n)(?<!\\n)"),s=c+2):(l==="A"||l==="G")&&(o=!0),c++}this.hasAnchor=o,s===0?this.source=e:(i.push(e.substring(s,r)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source=="string"?this.hasBackReferences=ln.test(this.source):this.hasBackReferences=!1}clone(){return new pt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=t.map(s=>e.substring(s.start,s.end));return ze.lastIndex=0,this.source.replace(ze,(s,i)=>at(r[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],t=[],r=[],s=[],i,o,c,a;for(i=0,o=this.source.length;i<o;i++)c=this.source.charAt(i),e[i]=c,t[i]=c,r[i]=c,s[i]=c,c==="\\"&&i+1<o&&(a=this.source.charAt(i+1),a==="A"?(e[i+1]="￿",t[i+1]="￿",r[i+1]="A",s[i+1]="A"):a==="G"?(e[i+1]="￿",t[i+1]="G",r[i+1]="￿",s[i+1]="G"):(e[i+1]=a,t[i+1]=a,r[i+1]=a,s[i+1]=a),i++);return{A0_G0:e.join(""),A0_G1:t.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},V=class{constructor(){h(this,"_items");h(this,"_hasAnchors");h(this,"_cached");h(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(n){this._items.push(n),this._hasAnchors=this._hasAnchors||n.hasAnchor}unshift(n){this._items.unshift(n),this._hasAnchors=this._hasAnchors||n.hasAnchor}length(){return this._items.length}setSource(n,e){this._items[n].source!==e&&(this._disposeCaches(),this._items[n].setSource(e))}compile(n){if(!this._cached){let e=this._items.map(t=>t.source);this._cached=new Ue(n,e,this._items.map(t=>t.ruleId))}return this._cached}compileAG(n,e,t){return this._hasAnchors?e?t?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(n,e,t)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(n,e,t)),this._anchorCache.A1_G0):t?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(n,e,t)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(n,e,t)),this._anchorCache.A0_G0):this.compile(n)}_resolveAnchors(n,e,t){let r=this._items.map(s=>s.resolveAnchors(e,t));return new Ue(n,r,this._items.map(s=>s.ruleId))}},Ue=class{constructor(n,e,t){h(this,"regExps");h(this,"rules");h(this,"scanner");this.regExps=e,this.rules=t,this.scanner=n.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const n=[];for(let e=0,t=this.rules.length;e<t;e++)n.push(" - "+this.rules[e]+": "+this.regExps[e]);return n.join(`
2
+ `)}findNextMatchSync(n,e,t){const r=this.scanner.findNextMatchSync(n,e,t);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Ce=class{constructor(n,e){h(this,"languageId");h(this,"tokenType");this.languageId=n,this.tokenType=e}},x,dn=(x=class{constructor(e,t){h(this,"_defaultAttributes");h(this,"_embeddedLanguagesMatcher");h(this,"_getBasicScopeAttributes",new ct(e=>{const t=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Ce(t,r)}));this._defaultAttributes=new Ce(e,8),this._embeddedLanguagesMatcher=new gn(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?x._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(x.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},h(x,"_NULL_SCOPE_METADATA",new Ce(0,0)),h(x,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),x),gn=class{constructor(n){h(this,"values");h(this,"scopesRegExp");if(n.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(n);const e=n.map(([t,r])=>at(t));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(n){if(!this.scopesRegExp)return;const e=n.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},Ke=class{constructor(n,e){h(this,"stack");h(this,"stoppedEarly");this.stack=n,this.stoppedEarly=e}};function mt(n,e,t,r,s,i,o,c){const a=e.content.length;let l=!1,d=-1;if(o){const g=pn(n,e,t,r,s,i);s=g.stack,r=g.linePos,t=g.isFirstLine,d=g.anchorPosition}const u=Date.now();for(;!l;){if(c!==0&&Date.now()-u>c)return new Ke(s,!0);f()}return new Ke(s,!1);function f(){const g=mn(n,e,t,r,s,d);if(!g){i.produce(s,a),l=!0;return}const p=g.captureIndices,b=g.matchedRuleId,S=p&&p.length>0?p[0].end>r:!1;if(b===hn){const _=s.getRule(n);i.produce(s,p[0].start),s=s.withContentNameScopesList(s.nameScopesList),z(n,e,t,s,i,_.endCaptures,p),i.produce(s,p[0].end);const m=s;if(s=s.parent,d=m.getAnchorPos(),!S&&m.getEnterPos()===r){s=m,i.produce(s,a),l=!0;return}}else{const _=n.getRule(b);i.produce(s,p[0].start);const m=s,y=_.getName(e.content,p),w=s.contentNameScopesList.pushAttributed(y,n);if(s=s.push(b,r,d,p[0].end===a,null,w,w),_ instanceof ve){const C=_;z(n,e,t,s,i,C.beginCaptures,p),i.produce(s,p[0].end),d=p[0].end;const k=C.getContentName(e.content,p),v=w.pushAttributed(k,n);if(s=s.withContentNameScopesList(v),C.endHasBackReferences&&(s=s.withEndRule(C.getEndWithResolvedBackReferences(e.content,p))),!S&&m.hasSameRuleAs(s)){s=s.pop(),i.produce(s,a),l=!0;return}}else if(_ instanceof he){const C=_;z(n,e,t,s,i,C.beginCaptures,p),i.produce(s,p[0].end),d=p[0].end;const k=C.getContentName(e.content,p),v=w.pushAttributed(k,n);if(s=s.withContentNameScopesList(v),C.whileHasBackReferences&&(s=s.withEndRule(C.getWhileWithResolvedBackReferences(e.content,p))),!S&&m.hasSameRuleAs(s)){s=s.pop(),i.produce(s,a),l=!0;return}}else if(z(n,e,t,s,i,_.captures,p),i.produce(s,p[0].end),s=s.pop(),!S){s=s.safePop(),i.produce(s,a),l=!0;return}}p[0].end>r&&(r=p[0].end,t=!1)}}function pn(n,e,t,r,s,i){let o=s.beginRuleCapturedEOL?0:-1;const c=[];for(let a=s;a;a=a.pop()){const l=a.getRule(n);l instanceof he&&c.push({rule:l,stack:a})}for(let a=c.pop();a;a=c.pop()){const{ruleScanner:l,findOptions:d}=Sn(a.rule,n,a.stack.endRule,t,r===o),u=l.findNextMatchSync(e,r,d);if(u){if(u.ruleId!==dt){s=a.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(i.produce(a.stack,u.captureIndices[0].start),z(n,e,t,a.stack,i,a.rule.whileCaptures,u.captureIndices),i.produce(a.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,t=!1))}else{s=a.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:o,isFirstLine:t}}function mn(n,e,t,r,s,i){const o=_n(n,e,t,r,s,i),c=n.getInjections();if(c.length===0)return o;const a=yn(c,n,e,t,r,s,i);if(!a)return o;if(!o)return a;const l=o.captureIndices[0].start,d=a.captureIndices[0].start;return d<l||a.priorityMatch&&d===l?a:o}function _n(n,e,t,r,s,i){const o=s.getRule(n),{ruleScanner:c,findOptions:a}=_t(o,n,s.endRule,t,r===i),l=c.findNextMatchSync(e,r,a);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function yn(n,e,t,r,s,i,o){let c=Number.MAX_VALUE,a=null,l,d=0;const u=i.contentNameScopesList.getScopeNames();for(let f=0,g=n.length;f<g;f++){const p=n[f];if(!p.matcher(u))continue;const b=e.getRule(p.ruleId),{ruleScanner:S,findOptions:_}=_t(b,e,null,r,s===o),m=S.findNextMatchSync(t,s,_);if(!m)continue;const y=m.captureIndices[0].start;if(!(y>=c)&&(c=y,a=m.captureIndices,l=m.ruleId,d=p.priority,c===s))break}return a?{priorityMatch:d===-1,captureIndices:a,matchedRuleId:l}:null}function _t(n,e,t,r,s){return{ruleScanner:n.compileAG(e,t,r,s),findOptions:0}}function Sn(n,e,t,r,s){return{ruleScanner:n.compileWhileAG(e,t,r,s),findOptions:0}}function z(n,e,t,r,s,i,o){if(i.length===0)return;const c=e.content,a=Math.min(i.length,o.length),l=[],d=o[0].end;for(let u=0;u<a;u++){const f=i[u];if(f===null)continue;const g=o[u];if(g.length===0)continue;if(g.start>d)break;for(;l.length>0&&l[l.length-1].endPos<=g.start;)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?s.produceFromScopes(l[l.length-1].scopes,g.start):s.produce(r,g.start),f.retokenizeCapturedWithRuleId){const b=f.getName(c,o),S=r.contentNameScopesList.pushAttributed(b,n),_=f.getContentName(c,o),m=S.pushAttributed(_,n),y=r.push(f.retokenizeCapturedWithRuleId,g.start,-1,!1,null,S,m),w=n.createOnigString(c.substring(0,g.end));mt(n,w,t&&g.start===0,g.start,y,s,!1,0),ut(w);continue}const p=f.getName(c,o);if(p!==null){const S=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(p,n);l.push(new bn(S,g.end))}}for(;l.length>0;)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var bn=class{constructor(n,e){h(this,"scopes");h(this,"endPos");this.scopes=n,this.endPos=e}};function wn(n,e,t,r,s,i,o,c){return new kn(n,e,t,r,s,i,o,c)}function Ve(n,e,t,r,s){const i=ce(e,ue),o=gt.getCompiledRuleId(t,r,s.repository);for(const c of i)n.push({debugSelector:e,matcher:c.matcher,ruleId:o,grammar:s,priority:c.priority})}function ue(n,e){if(e.length<n.length)return!1;let t=0;return n.every(r=>{for(let s=t;s<e.length;s++)if(Cn(e[s],r))return t=s+1,!0;return!1})}function Cn(n,e){if(!n)return!1;if(n===e)return!0;const t=e.length;return n.length>t&&n.substr(0,t)===e&&n[t]==="."}var kn=class{constructor(n,e,t,r,s,i,o,c){h(this,"_rootScopeName");h(this,"balancedBracketSelectors");h(this,"_onigLib");h(this,"_rootId");h(this,"_lastRuleId");h(this,"_ruleId2desc");h(this,"_includedGrammars");h(this,"_grammarRepository");h(this,"_grammar");h(this,"_injections");h(this,"_basicScopeAttributesProvider");h(this,"_tokenTypeMatchers");if(this._rootScopeName=n,this.balancedBracketSelectors=i,this._onigLib=c,this._basicScopeAttributesProvider=new dn(t,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Ye(e,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const a of Object.keys(s)){const l=ce(a,ue);for(const d of l)this._tokenTypeMatchers.push({matcher:d.matcher,type:s[a]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const n of this._ruleId2desc)n&&n.dispose()}createOnigScanner(n){return this._onigLib.createOnigScanner(n)}createOnigString(n){return this._onigLib.createOnigString(n)}getMetadataForScope(n){return this._basicScopeAttributesProvider.getBasicScopeAttributes(n)}_collectInjections(){const n={lookup:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},e=[],t=this._rootScopeName,r=n.lookup(t);if(r){const s=r.injections;if(s)for(let o in s)Ve(e,o,s[o],this,r);const i=this._grammarRepository.injections(t);i&&i.forEach(o=>{const c=this.getExternalGrammar(o);if(c){const a=c.injectionSelector;a&&Ve(e,a,c,this,c)}})}return e.sort((s,i)=>s.priority-i.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(n){const e=++this._lastRuleId,t=n(e);return this._ruleId2desc[e]=t,t}getRule(n){return this._ruleId2desc[n]}getExternalGrammar(n,e){if(this._includedGrammars[n])return this._includedGrammars[n];if(this._grammarRepository){const t=this._grammarRepository.lookup(n);if(t)return this._includedGrammars[n]=Ye(t,e&&e.$base),this._includedGrammars[n]}}tokenizeLine(n,e,t=0){const r=this._tokenize(n,e,!1,t);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(n,e,t=0){const r=this._tokenize(n,e,!0,t);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(n,e,t,r){this._rootId===-1&&(this._rootId=gt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!e||e===Ae.NULL){s=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),d=this.themeProvider.getDefaults(),u=O.set(0,l.languageId,l.tokenType,null,d.fontStyle,d.foregroundId,d.backgroundId),f=this.getRule(this._rootId).getName(null,null);let g;f?g=q.createRootAndLookUpScopeName(f,u,this):g=q.createRoot("unknown",u),e=new Ae(null,this._rootId,-1,-1,!1,null,g,g)}else s=!1,e.reset();n=n+`
3
+ `;const i=this.createOnigString(n),o=i.content.length,c=new Tn(t,n,this._tokenTypeMatchers,this.balancedBracketSelectors),a=mt(this,i,s,0,e,c,!0,r);return ut(i),{lineLength:o,lineTokens:c,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function Ye(n,e){return n=Ft(n),n.repository=n.repository||{},n.repository.$self={$vscodeTextmateLocation:n.$vscodeTextmateLocation,patterns:n.patterns,name:n.scopeName},n.repository.$base=e||n.repository.$self,n}var q=class E{constructor(e,t,r){h(this,"parent");h(this,"scopePath");h(this,"tokenAttributes");this.parent=e,this.scopePath=t,this.tokenAttributes=r}static fromExtension(e,t){let r=e,s=(e==null?void 0:e.scopePath)??null;for(const i of t)s=we.push(s,i.scopeNames),r=new E(r,s,i.encodedTokenAttributes);return r}static createRoot(e,t){return new E(null,new we(null,e),t)}static createRootAndLookUpScopeName(e,t,r){const s=r.getMetadataForScope(e),i=new we(null,e),o=r.themeProvider.themeMatch(i),c=E.mergeAttributes(t,s,o);return new E(null,i,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return E.equals(this,e)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,r){let s=-1,i=0,o=0;return r!==null&&(s=r.fontStyle,i=r.foregroundId,o=r.backgroundId),O.set(e,t.languageId,t.tokenType,null,s,i,o)}pushAttributed(e,t){if(e===null)return this;if(e.indexOf(" ")===-1)return E._pushAttributed(this,e,t);const r=e.split(/ /g);let s=this;for(const i of r)s=E._pushAttributed(s,i,t);return s}static _pushAttributed(e,t,r){const s=r.getMetadataForScope(t),i=e.scopePath.push(t),o=r.themeProvider.themeMatch(i),c=E.mergeAttributes(e.tokenAttributes,s,o);return new E(e,i,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var s;const t=[];let r=this;for(;r&&r!==e;)t.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((s=r.parent)==null?void 0:s.scopePath)??null)}),r=r.parent;return r===e?t.reverse():void 0}},L,Ae=(L=class{constructor(e,t,r,s,i,o,c,a){h(this,"parent");h(this,"ruleId");h(this,"beginRuleCapturedEOL");h(this,"endRule");h(this,"nameScopesList");h(this,"contentNameScopesList");h(this,"_stackElementBrand");h(this,"_enterPos");h(this,"_anchorPos");h(this,"depth");this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=o,this.nameScopesList=c,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}equals(e){return e===null?!1:L._equals(this,e)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?q.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){L._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,r,s,i,o,c){return new L(this,e,t,r,s,i,o,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){var r,s;return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(s=this.contentNameScopesList)==null?void 0:s.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new L(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){var e,t,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((t=this.nameScopesList)==null?void 0:t.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,t){const r=q.fromExtension((e==null?void 0:e.nameScopesList)??null,t.nameScopesList);return new L(e,t.ruleId,t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,r,q.fromExtension(r,t.contentNameScopesList))}},h(L,"NULL",new L(null,0,0,0,!1,null,null,null)),L),Rn=class{constructor(n,e){h(this,"balancedBracketScopes");h(this,"unbalancedBracketScopes");h(this,"allowAny",!1);this.balancedBracketScopes=n.flatMap(t=>t==="*"?(this.allowAny=!0,[]):ce(t,ue).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(t=>ce(t,ue).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(n){for(const e of this.unbalancedBracketScopes)if(e(n))return!1;for(const e of this.balancedBracketScopes)if(e(n))return!0;return this.allowAny}},Tn=class{constructor(n,e,t,r){h(this,"balancedBracketSelectors");h(this,"_emitBinaryTokens");h(this,"_lineText");h(this,"_tokens");h(this,"_binaryTokens");h(this,"_lastTokenEndIndex");h(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=n,this._tokenTypeOverrides=t,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(n,e){this.produceFromScopes(n.contentNameScopesList,e)}produceFromScopes(n,e){var r;if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let s=(n==null?void 0:n.tokenAttributes)??0,i=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=(n==null?void 0:n.getScopeNames())??[];for(const c of this._tokenTypeOverrides)c.matcher(o)&&(s=O.set(s,0,c.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(o))}if(i&&(s=O.set(s,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===s){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(s),this._lastTokenEndIndex=e;return}const t=(n==null?void 0:n.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:t}),this._lastTokenEndIndex=e}getResult(n,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(n,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(n,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(n,e),this._binaryTokens[this._binaryTokens.length-2]=0);const t=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)t[r]=this._binaryTokens[r];return t}},In=class{constructor(n,e){h(this,"_onigLib");h(this,"_grammars",new Map);h(this,"_rawGrammars",new Map);h(this,"_injectionGrammars",new Map);h(this,"_theme");this._onigLib=e,this._theme=n}dispose(){for(const n of this._grammars.values())n.dispose()}setTheme(n){this._theme=n}getColorMap(){return this._theme.getColorMap()}addGrammar(n,e){this._rawGrammars.set(n.scopeName,n),e&&this._injectionGrammars.set(n.scopeName,e)}lookup(n){return this._rawGrammars.get(n)}injections(n){return this._injectionGrammars.get(n)}getDefaults(){return this._theme.getDefaults()}themeMatch(n){return this._theme.match(n)}grammarForScopeName(n,e,t,r,s){if(!this._grammars.has(n)){let i=this._rawGrammars.get(n);if(!i)return null;this._grammars.set(n,wn(n,i,e,t,r,s,this,this._onigLib))}return this._grammars.get(n)}},vn=class{constructor(e){h(this,"_options");h(this,"_syncRegistry");h(this,"_ensureGrammarCache");this._options=e,this._syncRegistry=new In(ae.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(ae.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,r){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,t,r){return this._loadGrammar(e,t,r.embeddedLanguages,r.tokenTypes,new Rn(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,r,s,i){const o=new tn(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(c=>this._loadSingleGrammar(c.scopeName)),o.processQueue();return this._grammarForScopeName(e,t,r,s,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const t=this._options.loadGrammar(e);if(t){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,r)}}addGrammar(e,t=[],r=0,s=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,r,s)}_grammarForScopeName(e,t=0,r=null,s=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,r,s,i)}},Ne=Ae.NULL;function Y(n,e){const t=typeof n=="string"?{}:{...n.colorReplacements},r=typeof n=="string"?n:n.name;for(const[s,i]of Object.entries((e==null?void 0:e.colorReplacements)||{}))typeof i=="string"?t[s]=i:s===r&&Object.assign(t,i);return t}function G(n,e){return n&&((e==null?void 0:e[n==null?void 0:n.toLowerCase()])||n)}function yt(n){return Array.isArray(n)?n:[n]}async function Ee(n){return Promise.resolve(typeof n=="function"?n():n).then(e=>e.default||e)}function ee(n){return!n||["plaintext","txt","text","plain"].includes(n)}function Pe(n){return n==="ansi"||ee(n)}function te(n){return n==="none"}function xe(n){return te(n)}const An=/(\r?\n)/g;function ne(n,e=!1){var i;if(n.length===0)return[["",0]];const t=n.split(An);let r=0;const s=[];for(let o=0;o<t.length;o+=2){const c=e?t[o]+(t[o+1]||""):t[o];s.push([c,r]),r+=t[o].length,r+=((i=t[o+1])==null?void 0:i.length)||0}return s}const Je={light:"#333333",dark:"#bbbbbb"},Qe={light:"#fffffe",dark:"#1e1e1e"},Xe="__shiki_resolved";function ge(n){var c,a,l,d,u;if(n!=null&&n[Xe])return n;const e={...n};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||(e.type="dark"),e.colorReplacements={...e.colorReplacements},e.settings||(e.settings=[]);let{bg:t,fg:r}=e;if(!t||!r){const f=e.settings?e.settings.find(g=>!g.name&&!g.scope):void 0;(c=f==null?void 0:f.settings)!=null&&c.foreground&&(r=f.settings.foreground),(a=f==null?void 0:f.settings)!=null&&a.background&&(t=f.settings.background),!r&&((l=e==null?void 0:e.colors)!=null&&l["editor.foreground"])&&(r=e.colors["editor.foreground"]),!t&&((d=e==null?void 0:e.colors)!=null&&d["editor.background"])&&(t=e.colors["editor.background"]),r||(r=e.type==="light"?Je.light:Je.dark),t||(t=e.type==="light"?Qe.light:Qe.dark),e.fg=r,e.bg=t}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let s=0;const i=new Map;function o(f){var p;if(i.has(f))return i.get(f);s+=1;const g=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return(p=e.colorReplacements)!=null&&p[`#${g}`]?o(f):(i.set(f,g),g)}e.settings=e.settings.map(f=>{var S,_;const g=((S=f.settings)==null?void 0:S.foreground)&&!f.settings.foreground.startsWith("#"),p=((_=f.settings)==null?void 0:_.background)&&!f.settings.background.startsWith("#");if(!g&&!p)return f;const b={...f,settings:{...f.settings}};if(g){const m=o(f.settings.foreground);e.colorReplacements[m]=f.settings.foreground,b.settings.foreground=m}if(p){const m=o(f.settings.background);e.colorReplacements[m]=f.settings.background,b.settings.background=m}return b});for(const f of Object.keys(e.colors||{}))if((f==="editor.foreground"||f==="editor.background"||f.startsWith("terminal.ansi"))&&!((u=e.colors[f])!=null&&u.startsWith("#"))){const g=o(e.colors[f]);e.colorReplacements[g]=e.colors[f],e.colors[f]=g}return Object.defineProperty(e,Xe,{enumerable:!1,writable:!1,value:!0}),e}async function St(n){return[...new Set((await Promise.all(n.filter(e=>!Pe(e)).map(async e=>await Ee(e).then(t=>Array.isArray(t)?t:[t])))).flat())]}async function bt(n){return(await Promise.all(n.map(async e=>xe(e)?null:ge(await Ee(e))))).filter(e=>!!e)}function wt(n,e){if(!e)return n;if(e[n]){const t=new Set([n]);for(;e[n];){if(n=e[n],t.has(n))throw new R(`Circular alias \`${[...t].join(" -> ")} -> ${n}\``);t.add(n)}}return n}var Nn=class extends vn{constructor(e,t,r,s={}){super(e);h(this,"_resolver");h(this,"_themes");h(this,"_langs");h(this,"_alias");h(this,"_resolvedThemes",new Map);h(this,"_resolvedGrammars",new Map);h(this,"_langMap",new Map);h(this,"_langGraph",new Map);h(this,"_textmateThemeCache",new WeakMap);h(this,"_loadedThemesCache",null);h(this,"_loadedLanguagesCache",null);this._resolver=e,this._themes=t,this._langs=r,this._alias=s,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=ge(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=ae.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=wt(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){var i,o,c,a,l,d,u;if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(f=>{var g;return(g=f.embeddedLangsLazy)==null?void 0:g.includes(e.name)}));this._resolver.addLanguage(e);const r={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const s=this.loadGrammarWithConfiguration(e.scopeName,1,r);if(s.name=e.name,this._resolvedGrammars.set(e.name,s),e.aliases&&e.aliases.forEach(f=>{this._alias[f]=e.name}),this._loadedLanguagesCache=null,t.size)for(const f of t)(c=(o=(i=this._syncRegistry)==null?void 0:i._grammars)==null?void 0:o.get(f.scopeName))==null||c.dispose(),this._resolvedGrammars.delete(f.name),this._loadedLanguagesCache=null,(l=(a=this._syncRegistry)==null?void 0:a._injectionGrammars)==null||l.delete(f.scopeName),(u=(d=this._syncRegistry)==null?void 0:d._grammars)==null||u.delete(f.scopeName),this.loadLanguage(this._langMap.get(f.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const s of e)this.resolveEmbeddedLanguages(s);const t=[...this._langGraph.entries()],r=t.filter(([s,i])=>!i);if(r.length){const s=t.filter(([i,o])=>{var c;return o?(c=o.embeddedLanguages||o.embeddedLangs)==null?void 0:c.some(a=>r.map(([l])=>l).includes(a)):!1}).filter(i=>!r.includes(i));throw new R(`Missing languages ${r.map(([i])=>`\`${i}\``).join(", ")}, required by ${s.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[s,i]of t)this._resolver.addLanguage(i);for(const[s,i]of t)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const r of t)this._langGraph.set(r,this._langMap.get(r))}},Ln=class{constructor(n,e){h(this,"_langs",new Map);h(this,"_scopeToLang",new Map);h(this,"_injections",new Map);h(this,"_onigLib");this._onigLib={createOnigScanner:t=>n.createScanner(t),createOnigString:t=>n.createString(t)},e.forEach(t=>this.addLanguage(t))}get onigLib(){return this._onigLib}getLangRegistration(n){return this._langs.get(n)}loadGrammar(n){return this._scopeToLang.get(n)}addLanguage(n){this._langs.set(n.name,n),n.aliases&&n.aliases.forEach(e=>{this._langs.set(e,n)}),this._scopeToLang.set(n.scopeName,n),n.injectTo&&n.injectTo.forEach(e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).includes(n.scopeName)||this._injections.get(e).push(n.scopeName)})}getInjections(n){const e=n.split(".");let t=[];for(let r=1;r<=e.length;r++){const s=e.slice(0,r).join(".");t=[...t,...this._injections.get(s)||[]]}return t}};let H=0;function pe(n){H+=1,n.warnings!==!1&&H>=10&&H%10===0&&console.warn(`[Shiki] ${H} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!n.engine)throw new R("`engine` option is required for synchronous mode");const t=(n.langs||[]).flat(1),r=(n.themes||[]).flat(1).map(ge),s=new Nn(new Ln(n.engine,t),r,t,n.langAlias);let i;function o(m){return wt(m,n.langAlias)}function c(m){S();const y=s.getGrammar(typeof m=="string"?m:m.name);if(!y)throw new R(`Language \`${m}\` not found, you may need to load it first`);return y}function a(m){if(m==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};S();const y=s.getTheme(m);if(!y)throw new R(`Theme \`${m}\` not found, you may need to load it first`);return y}function l(m){S();const y=a(m);return i!==m&&(s.setTheme(y),i=m),{theme:y,colorMap:s.getColorMap()}}function d(){return S(),s.getLoadedThemes()}function u(){return S(),s.getLoadedLanguages()}function f(...m){S(),s.loadLanguages(m.flat(1))}async function g(...m){return f(await St(m))}function p(...m){S();for(const y of m.flat(1))s.loadTheme(y)}async function b(...m){return S(),p(await bt(m))}function S(){if(e)throw new R("Shiki instance has been disposed")}function _(){e||(e=!0,s.dispose(),H-=1)}return{setTheme:l,getTheme:a,getLanguage:c,getLoadedThemes:d,getLoadedLanguages:u,resolveLangAlias:o,loadLanguage:g,loadLanguageSync:f,loadTheme:b,loadThemeSync:p,dispose:_,[Symbol.dispose]:_}}const En=pe;async function Ge(n){n.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,t,r]=await Promise.all([bt(n.themes||[]),St(n.langs||[]),n.engine]);return pe({...n,themes:e,langs:t,engine:r})}const Pn=Ge,Ct=new WeakMap;function me(n,e){Ct.set(n,e)}function J(n){return Ct.get(n)}var _e=class kt{constructor(...e){h(this,"_stacks",{});h(this,"lang");if(e.length===2){const[t,r]=e;this.lang=r,this._stacks=t}else{const[t,r,s]=e;this.lang=r,this._stacks={[s]:t}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new kt(Object.fromEntries(yt(t).map(r=>[r,Ne])),e)}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return xn(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function xn(n){const e=[],t=new Set;function r(s){var o;if(t.has(s))return;t.add(s);const i=(o=s==null?void 0:s.nameScopesList)==null?void 0:o.scopeName;i&&e.push(i),s.parent&&r(s.parent)}return r(n),e}function Gn(n,e){if(!(n instanceof _e))throw new R("Invalid grammar state");return n.getInternalStack(e)}const Bn=/,/,$n=/ /;function Rt(n,e,t={}){const{theme:r=n.getLoadedThemes()[0]}=t;if(ee(n.resolveLangAlias(t.lang||"text"))||te(r))return ne(e).map(c=>[{content:c[0],offset:c[1]}]);const{theme:s,colorMap:i}=n.setTheme(r),o=n.getLanguage(t.lang||"text");if(t.grammarState){if(t.grammarState.lang!==o.name)throw new R(`Grammar state language "${t.grammarState.lang}" does not match highlight language "${o.name}"`);if(!t.grammarState.themes.includes(s.name))throw new R(`Grammar state themes "${t.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return Tt(e,o,s,i,t)}function Be(...n){if(n.length===2)return J(n[1]);const[e,t,r={}]=n,{lang:s="text",theme:i=e.getLoadedThemes()[0]}=r;if(ee(s)||te(i))throw new R("Plain language does not have grammar state");if(s==="ansi")throw new R("ANSI language does not have grammar state");const{theme:o,colorMap:c}=e.setTheme(i),a=e.getLanguage(s);return new _e($e(t,a,o,c,r).stateStack,a.name,o.name)}function Tt(n,e,t,r,s){const i=$e(n,e,t,r,s),o=new _e(i.stateStack,e.name,t.name);return me(i.tokens,o),i.tokens}function $e(n,e,t,r,s){const i=Y(t,s),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:c=500,includeExplanation:a=!1}=s,l=ne(n);let d=s.grammarState?Gn(s.grammarState,t.name)??Ne:s.grammarContextCode!=null?$e(s.grammarContextCode,e,t,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ne,u=[];const f=[];for(let g=0,p=l.length;g<p;g++){const[b,S]=l[g];if(b===""){u=[],f.push([]);continue}if(o>0&&b.length>=o){u=[],f.push([{content:b,offset:S,color:"",fontStyle:0}]);continue}let _,m,y;a&&a!=="tokenType"&&(_=e.tokenizeLine(b,d,c),m=_.tokens,y=0);const w=e.tokenizeLine2(b,d,c),C=w.tokens.length/2;for(let k=0;k<C;k++){const v=w.tokens[2*k],j=k+1<C?w.tokens[2*k+2]:b.length;if(v===j)continue;const A=w.tokens[2*k+1],B=G(r[O.getForeground(A)],i),se=O.getFontStyle(A),$={content:b.substring(v,j),offset:S+v,color:B,fontStyle:se};if(a==="tokenType")$.type=O.getTokenType(A);else if(a){const We=[];if(a!=="scopeName")for(const P of t.settings){let W;switch(typeof P.scope){case"string":W=P.scope.split(Bn).map(Se=>Se.trim());break;case"object":W=P.scope;break;default:continue}We.push({settings:P,selectors:W.map(Se=>Se.split($n))})}$.explanation=[];let Fe=0;for(;v+Fe<j;){const P=m[y],W=b.substring(P.startIndex,P.endIndex);Fe+=W.length,$.explanation.push({content:W,scopes:a==="scopeName"?Mn(P.scopes):On(We,P.scopes)}),y+=1}}u.push($)}f.push(u),u=[],d=w.ruleStack}return{tokens:f,stateStack:d}}function Mn(n){return n.map(e=>({scopeName:e}))}function On(n,e){const t=[];for(let r=0,s=e.length;r<s;r++){const i=e[r];t[r]={scopeName:i,themeMatches:Wn(n,i,e.slice(0,r))}}return t}function Ze(n,e){return n===e||e.substring(0,n.length)===n&&e[n.length]==="."}function jn(n,e,t){if(!Ze(n.at(-1),e))return!1;let r=n.length-2,s=t.length-1;for(;r>=0&&s>=0;)Ze(n[r],t[s])&&(r-=1),s-=1;return r===-1}function Wn(n,e,t){const r=[];for(const{selectors:s,settings:i}of n)for(const o of s)if(jn(o,e,t)){r.push(i);break}return r}function ye(n,e,t,r=Rt){const s=Object.entries(t.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),i=s.map(l=>{const d=r(n,e,{...t,theme:l.theme});return{tokens:d,state:J(d),theme:typeof l.theme=="string"?l.theme:l.theme.name}}),o=Fn(...i.map(l=>l.tokens)),c=o[0].map((l,d)=>l.map((u,f)=>{const g={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in t&&t.includeExplanation&&(g.explanation=u.explanation),o.forEach((p,b)=>{const{content:S,explanation:_,offset:m,...y}=p[d][f];g.variants[s[b].color]=y}),g})),a=i[0].state?new _e(Object.fromEntries(i.map(l=>{var d;return[l.theme,(d=l.state)==null?void 0:d.getInternalStack(l.theme)]})),i[0].state.lang):void 0;return a&&me(c,a),c}function Fn(...n){const e=n.map(()=>[]),t=n.length;for(let r=0;r<n[0].length;r++){const s=n.map(a=>a[r]),i=e.map(()=>[]);e.forEach((a,l)=>a.push(i[l]));const o=s.map(()=>0),c=s.map(a=>a[0]);for(;c.every(a=>a);){const a=Math.min(...c.map(l=>l.content.length));for(let l=0;l<t;l++){const d=c[l];d.content.length===a?(i[l].push(d),o[l]+=1,c[l]=s[l][o[l]]):(i[l].push({...d,content:d.content.slice(0,a)}),c[l]={...d,content:d.content.slice(a),offset:d.offset+a})}}}return e}const et=/\s+/g;function Me(n,e){var r;if(!e)return n;n.properties||(n.properties={}),(r=n.properties).class||(r.class=[]),typeof n.properties.class=="string"&&(n.properties.class=n.properties.class.split(et)),Array.isArray(n.properties.class)||(n.properties.class=[]);const t=Array.isArray(e)?e:e.split(et);for(const s of t)s&&!n.properties.class.includes(s)&&n.properties.class.push(s);return n}const Dn=/:?lang=["']([^"']+)["']/g,Hn=/(?:```|~~~)([\w-]+)/g,zn=/\\begin\{([\w-]+)\}/g,qn=/<script\s+(?:type|lang)=["']([^"']+)["']/gi,Un=/^\s*---\r?\n[\s\S]*?\r?\n---(?:\r?\n|\s*$)/;function It(n){const e=ne(n,!0).map(([s])=>s);function t(s){if(s===n.length)return{line:e.length-1,character:e.at(-1).length};let i=s,o=0;for(const c of e){if(i<c.length)break;i-=c.length,o++}return{line:o,character:i}}function r(s,i){let o=0;for(let c=0;c<s;c++)o+=e[c].length;return o+=i,o}return{lines:e,indexToPos:t,posToIndex:r}}function Kn(n,e,t){const r=new Set;for(const i of n.matchAll(Dn)){const o=i[1].toLowerCase().trim();o&&r.add(o)}for(const i of n.matchAll(Hn)){const o=i[1].toLowerCase().trim();o&&r.add(o)}for(const i of n.matchAll(zn)){const o=i[1].toLowerCase().trim();o&&r.add(o)}for(const i of n.matchAll(qn)){const o=i[1].toLowerCase().trim(),c=o.includes("/")?o.split("/").pop():o;c&&r.add(c)}if(Un.test(n)&&r.add("yaml"),!t)return[...r];const s=t.getBundledLanguages();return[...r].filter(i=>i&&s[i])}const Vn=["color","background-color"];function vt(n,e){let t=0;const r=[];for(const s of e)s>t&&r.push({...n,content:n.content.slice(t,s),offset:n.offset+t}),t=s;return t<n.content.length&&r.push({...n,content:n.content.slice(t),offset:n.offset+t}),r}function Yn(n,e){let t=0,r=n.length;for(;t<r;){const s=t+(r-t>>1);n[s]<=e?t=s+1:r=s}return t}function At(n,e){const t=[...e instanceof Set?e:new Set(e)].sort((r,s)=>r-s);return t.length?n.map(r=>r.flatMap(s=>{const i=s.offset+s.content.length,o=Yn(t,s.offset);let c=o;for(;c<t.length&&t[c]<i;)c++;if(o===c)return s;const a=t.slice(o,c);for(let l=0;l<a.length;l++)a[l]-=s.offset;return vt(s,a)})):n}function Nt(n,e,t,r,s="css-vars"){const i={content:n.content,explanation:n.explanation,offset:n.offset},o=e.map(d=>Q(n.variants[d])),c=new Set(o.flatMap(d=>Object.keys(d))),a={},l=(d,u)=>{const f=u==="color"?"":u==="background-color"?"-bg":`-${u}`;return t+e[d]+(u==="color"?"":f)};return o.forEach((d,u)=>{for(const f of c){const g=d[f]||"inherit";if(u===0&&r&&Vn.includes(f))if(r==="light-dark()"&&o.length>1){const p=e.findIndex(m=>m==="light"),b=e.findIndex(m=>m==="dark");if(p===-1||b===-1)throw new R('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const S=o[p][f]||"inherit",_=o[b][f]||"inherit";a[f]=`light-dark(${S}, ${_})`,s==="css-vars"&&(a[l(u,f)]=g)}else a[f]=g;else s==="css-vars"&&(a[l(u,f)]=g)}}),i.htmlStyle=a,i}function Q(n){const e={};if(n.color&&(e.color=n.color),n.bgColor&&(e["background-color"]=n.bgColor),n.fontStyle){n.fontStyle&I.Italic&&(e["font-style"]="italic"),n.fontStyle&I.Bold&&(e["font-weight"]="bold");const t=[];n.fontStyle&I.Underline&&t.push("underline"),n.fontStyle&I.Strikethrough&&t.push("line-through"),t.length&&(e["text-decoration"]=t.join(" "))}return e}function fe(n){return typeof n=="string"?n:Object.entries(n).map(([e,t])=>`${e}:${t}`).join(";")}function Lt(){const n=new WeakMap;function e(t){if(!n.has(t.meta)){let s=function(o){if(typeof o=="number"){if(o<0||o>t.source.length)throw new R(`Invalid decoration offset: ${o}. Code length: ${t.source.length}`);return{...r.indexToPos(o),offset:o}}else{const c=r.lines[o.line];if(c===void 0)throw new R(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${r.lines.length}`);let a=o.character;if(a<0&&(a=c.length+a),a<0||a>c.length)throw new R(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${c.length}`);return{...o,character:a,offset:r.posToIndex(o.line,a)}}};const r=It(t.source),i=(t.options.decorations||[]).map(o=>({...o,start:s(o.start),end:s(o.end)}));Jn(i),n.set(t.meta,{decorations:i,converter:r,source:t.source})}return n.get(t.meta)}return{name:"shiki:decorations",tokens(t){var r;if((r=this.options.decorations)!=null&&r.length)return At(t,e(this).decorations.flatMap(s=>[s.start.offset,s.end.offset]))},code(t){var d;if(!((d=this.options.decorations)!=null&&d.length))return;const r=e(this),s=[...t.children].filter(u=>u.type==="element"&&u.tagName==="span");if(s.length!==r.converter.lines.length)throw new R(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function i(u,f,g,p){const b=s[u];let S="",_=-1,m=-1;if(f===0&&(_=0),g===0&&(m=0),g===Number.POSITIVE_INFINITY&&(m=b.children.length),_===-1||m===-1)for(let w=0;w<b.children.length;w++)S+=Et(b.children[w]),_===-1&&S.length===f&&(_=w+1),m===-1&&S.length===g&&(m=w+1);if(_===-1)throw new R(`Failed to find start index for decoration ${JSON.stringify(p.start)}`);if(m===-1)throw new R(`Failed to find end index for decoration ${JSON.stringify(p.end)}`);const y=b.children.slice(_,m);if(!p.alwaysWrap&&y.length===b.children.length)c(b,p,"line");else if(!p.alwaysWrap&&y.length===1&&y[0].type==="element")c(y[0],p,"token");else{const w={type:"element",tagName:"span",properties:{},children:y};c(w,p,"wrapper"),b.children.splice(_,y.length,w)}}function o(u,f){s[u]=c(s[u],f,"line")}function c(u,f,g){var S;const p=f.properties||{},b=f.transform||(_=>_);return u.tagName=f.tagName||"span",u.properties={...u.properties,...p,class:u.properties.class},(S=f.properties)!=null&&S.class&&Me(u,f.properties.class),u=b(u,g)||u,u}const a=[],l=r.decorations.sort((u,f)=>f.start.offset-u.start.offset||u.end.offset-f.end.offset);for(const u of l){const{start:f,end:g}=u;if(f.line===g.line)i(f.line,f.character,g.character,u);else if(f.line<g.line){i(f.line,f.character,Number.POSITIVE_INFINITY,u);for(let p=f.line+1;p<g.line;p++)a.unshift(()=>o(p,u));i(g.line,0,g.character,u)}}a.forEach(u=>u())}}}function Jn(n){for(let e=0;e<n.length;e++){const t=n[e];if(t.start.offset>t.end.offset)throw new R(`Invalid decoration range: ${JSON.stringify(t.start)} - ${JSON.stringify(t.end)}`);for(let r=e+1;r<n.length;r++){const s=n[r],i=t.start.offset<=s.start.offset&&s.start.offset<t.end.offset,o=t.start.offset<s.end.offset&&s.end.offset<=t.end.offset,c=s.start.offset<=t.start.offset&&t.start.offset<s.end.offset,a=s.start.offset<t.end.offset&&t.end.offset<=s.end.offset;if(i||o||c||a){if(i&&o||c&&a||c&&t.start.offset===t.end.offset||o&&s.start.offset===s.end.offset)continue;throw new R(`Decorations ${JSON.stringify(t.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function Et(n){return n.type==="text"?n.value:n.type==="element"?n.children.map(Et).join(""):""}const Qn=[Lt()];function de(n){const e=Xn(n.transformers||[]);return[...e.pre,...e.normal,...e.post,...Qn]}function Xn(n){const e=[],t=[],r=[];for(const s of n)switch(s.enforce){case"pre":e.push(s);break;case"post":t.push(s);break;default:r.push(s)}return{pre:e,post:t,normal:r}}var M=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],ke={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Zn(n,e){const t=n.indexOf("\x1B",e);if(t!==-1&&n[t+1]==="["){const r=n.indexOf("m",t);if(r!==-1)return{sequence:n.substring(t+2,r).split(";"),startPosition:t,position:r+1}}return{position:n.length}}function tt(n){const e=n.shift();if(e==="2"){const t=n.splice(0,3).map(r=>Number.parseInt(r));return t.length!==3||t.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:t}}else if(e==="5"){const t=n.shift();if(t)return{type:"table",index:Number(t)}}}function es(n){const e=[];for(;n.length>0;){const t=n.shift();if(!t)continue;const r=Number.parseInt(t);if(!Number.isNaN(r))if(r===0)e.push({type:"resetAll"});else if(r<=9)ke[r]&&e.push({type:"setDecoration",value:ke[r]});else if(r<=29){const s=ke[r-20];s&&(e.push({type:"resetDecoration",value:s}),s==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:M[r-30]}});else if(r===38){const s=tt(n);s&&e.push({type:"setForegroundColor",value:s})}else if(r===39)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:M[r-40]}});else if(r===48){const s=tt(n);s&&e.push({type:"setBackgroundColor",value:s})}else r===49?e.push({type:"resetBackgroundColor"}):r===53?e.push({type:"setDecoration",value:"overline"}):r===55?e.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:M[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:M[r-100+8]}})}return e}function ts(){let n=null,e=null,t=new Set;return{parse(r){const s=[];let i=0;do{const o=Zn(r,i),c=o.sequence?r.substring(i,o.startPosition):r.substring(i);if(c.length>0&&s.push({value:c,foreground:n,background:e,decorations:new Set(t)}),o.sequence){const a=es(o.sequence);for(const l of a)l.type==="resetAll"?(n=null,e=null,t.clear()):l.type==="resetForegroundColor"?n=null:l.type==="resetBackgroundColor"?e=null:l.type==="resetDecoration"&&t.delete(l.value);for(const l of a)l.type==="setForegroundColor"?n=l.value:l.type==="setBackgroundColor"?e=l.value:l.type==="setDecoration"&&t.add(l.value)}i=o.position}while(i<r.length);return s}}}var ns={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function ss(n=ns){function e(c){return n[c]}function t(c){return`#${c.map(a=>Math.max(0,Math.min(a,255)).toString(16).padStart(2,"0")).join("")}`}let r;function s(){if(r)return r;r=[];for(let l=0;l<M.length;l++)r.push(e(M[l]));let c=[0,95,135,175,215,255];for(let l=0;l<6;l++)for(let d=0;d<6;d++)for(let u=0;u<6;u++)r.push(t([c[l],c[d],c[u]]));let a=8;for(let l=0;l<24;l++,a+=10)r.push(t([a,a,a]));return r}function i(c){return s()[c]}function o(c){switch(c.type){case"named":return e(c.name);case"rgb":return t(c.rgb);case"table":return i(c.index)}}return{value:o}}const rs=/#([0-9a-f]{3,8})/i,is=/var\((--[\w-]+-ansi-[\w-]+)\)/,os={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function Pt(n,e,t){const r=Y(n,t),s=ne(e),i=ss(Object.fromEntries(M.map(c=>{var l;const a=`terminal.ansi${c[0].toUpperCase()}${c.substring(1)}`;return[c,((l=n.colors)==null?void 0:l[a])||os[c]]}))),o=ts();return s.map(c=>o.parse(c[0]).map(a=>{let l,d;a.decorations.has("reverse")?(l=a.background?i.value(a.background):n.bg,d=a.foreground?i.value(a.foreground):n.fg):(l=a.foreground?i.value(a.foreground):n.fg,d=a.background?i.value(a.background):void 0),l=G(l,r),d=G(d,r),a.decorations.has("dim")&&(l=as(l));let u=I.None;return a.decorations.has("bold")&&(u|=I.Bold),a.decorations.has("italic")&&(u|=I.Italic),a.decorations.has("underline")&&(u|=I.Underline),a.decorations.has("strikethrough")&&(u|=I.Strikethrough),{content:a.value,offset:c[1],color:l,bgColor:d,fontStyle:u}}))}function as(n){const e=n.match(rs);if(e){const r=e[1];if(r.length===8){const s=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${s}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const s=r[0],i=r[1],o=r[2],c=r[3];return`#${s}${s}${i}${i}${o}${o}${Math.round(Number.parseInt(`${c}${c}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){const s=r[0],i=r[1],o=r[2];return`#${s}${s}${i}${i}${o}${o}80`}}}const t=n.match(is);return t?`var(${t[1]}-dim)`:n}function X(n,e,t={}){const r=n.resolveLangAlias(t.lang||"text"),{theme:s=n.getLoadedThemes()[0]}=t;if(!ee(r)&&!te(s)&&r==="ansi"){const{theme:i}=n.setTheme(s);return Pt(i,e,t)}return Rt(n,e,t)}function F(n,e,t){let r,s,i,o,c,a;if("themes"in t){const{defaultColor:l="light",cssVariablePrefix:d="--shiki-",colorsRendering:u="css-vars"}=t,f=Object.entries(t.themes).filter(_=>_[1]).map(_=>({color:_[0],theme:_[1]})).sort((_,m)=>_.color===l?-1:m.color===l?1:0);if(f.length===0)throw new R("`themes` option must not be empty");const g=ye(n,e,t,X);if(a=J(g),l&&l!=="light-dark()"&&!f.some(_=>_.color===l))throw new R(`\`themes\` option must contain the defaultColor key \`${l}\``);const p=f.map(_=>n.getTheme(_.theme)),b=f.map(_=>_.color);i=g.map(_=>_.map(m=>Nt(m,b,d,l,u))),a&&me(i,a);const S=f.map(_=>Y(_.theme,t));s=nt(f,p,S,d,l,"fg",u),r=nt(f,p,S,d,l,"bg",u),o=`shiki-themes ${p.map(_=>_.name).join(" ")}`,c=l?void 0:[s,r].join(";")}else if("theme"in t){const l=Y(t.theme,t);i=X(n,e,t);const d=n.getTheme(t.theme);r=G(d.bg,l),s=G(d.fg,l),o=d.name,a=J(i)}else throw new R("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:s,bg:r,themeName:o,rootStyle:c,grammarState:a}}function nt(n,e,t,r,s,i,o){return n.map((c,a)=>{const l=G(e[a][i],t[a])||"inherit",d=`${r+c.color}${i==="bg"?"-bg":""}:${l}`;if(a===0&&s){if(s==="light-dark()"&&n.length>1){const u=n.findIndex(g=>g.color==="light"),f=n.findIndex(g=>g.color==="dark");if(u===-1||f===-1)throw new R('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${G(e[u][i],t[u])||"inherit"}, ${G(e[f][i],t[f])||"inherit"});${d}`}return l}return o==="css-vars"?d:null}).filter(c=>!!c).join(";")}const xt=/^\s+$/,cs=/^(\s*)(.*?)(\s*)$/;function D(n,e,t,r={meta:{},options:t,codeToHast:(s,i)=>D(n,s,i),codeToTokens:(s,i)=>F(n,s,i)}){var p,b;let s=e;for(const S of de(t))s=((p=S.preprocess)==null?void 0:p.call(r,s,t))||s;let{tokens:i,fg:o,bg:c,themeName:a,rootStyle:l,grammarState:d}=F(n,s,t);const{mergeWhitespaces:u=!0,mergeSameStyleTokens:f=!1}=t;u===!0?i=ls(i):u==="never"&&(i=hs(i)),f&&(i=us(i));const g={...r,get source(){return s}};for(const S of de(t))i=((b=S.tokens)==null?void 0:b.call(g,i))||i;return Gt(i,{...t,fg:o,bg:c,themeName:a,rootStyle:t.rootStyle===!1?!1:t.rootStyle??l},g,d)}function Gt(n,e,t,r=J(n)){var b,S,_,m;const s=de(e),i=[],o={type:"root",children:[]},{structure:c="classic",tabindex:a="0"}=e,l={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?l.style=e.rootStyle:l.style=`background-color:${e.bg};color:${e.fg}`),a!==!1&&a!=null&&(l.tabindex=a.toString());for(const[y,w]of Object.entries(e.meta||{}))y.startsWith("_")||(l[y]=w);let d={type:"element",tagName:"pre",properties:l,children:[],data:e.data},u={type:"element",tagName:"code",properties:{},children:i};const f=[],g={...t,structure:c,addClassToHast:Me,get source(){return t.source},get tokens(){return n},get options(){return e},get root(){return o},get pre(){return d},get code(){return u},get lines(){return f}};if(n.forEach((y,w)=>{var v,j;w&&(c==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):c==="classic"&&i.push({type:"text",value:`
4
+ `}));let C={type:"element",tagName:"span",properties:{class:"line"},children:[]},k=0;for(const A of y){let B={type:"element",tagName:"span",properties:{...A.htmlAttrs},children:[{type:"text",value:A.content}]};const se=fe(A.htmlStyle||Q(A));se&&(B.properties.style=se);for(const $ of s)B=((v=$==null?void 0:$.span)==null?void 0:v.call(g,B,w+1,k,C,A))||B;c==="inline"?o.children.push(B):c==="classic"&&C.children.push(B),k+=A.content.length}if(c==="classic"){for(const A of s)C=((j=A==null?void 0:A.line)==null?void 0:j.call(g,C,w+1))||C;f.push(C),i.push(C)}else c==="inline"&&f.push(C)}),c==="classic"){for(const y of s)u=((b=y==null?void 0:y.code)==null?void 0:b.call(g,u))||u;d.children.push(u);for(const y of s)d=((S=y==null?void 0:y.pre)==null?void 0:S.call(g,d))||d;o.children.push(d)}else if(c==="inline"){const y=[];let w={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const k of o.children)k.type==="element"&&k.tagName==="br"?(y.push(w),w={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(k.type==="element"||k.type==="text")&&w.children.push(k);y.push(w);let C={type:"element",tagName:"code",properties:{},children:y};for(const k of s)C=((_=k==null?void 0:k.code)==null?void 0:_.call(g,C))||C;o.children=[];for(let k=0;k<C.children.length;k++){k>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});const v=C.children[k];v.type==="element"&&o.children.push(...v.children)}}let p=o;for(const y of s)p=((m=y==null?void 0:y.root)==null?void 0:m.call(g,p))||p;return r&&me(p,r),p}function ls(n){return n.map(e=>{const t=[];let r="",s;return e.forEach((i,o)=>{const c=!(i.fontStyle&&(i.fontStyle&I.Underline||i.fontStyle&I.Strikethrough));c&&xt.test(i.content)&&e[o+1]?(s===void 0&&(s=i.offset),r+=i.content):r?(c?t.push({...i,offset:s,content:r+i.content}):t.push({content:r,offset:s},i),s=void 0,r=""):t.push(i)}),t})}function hs(n){return n.map(e=>e.flatMap(t=>{if(xt.test(t.content))return t;const r=t.content.match(cs);if(!r)return t;const[,s,i,o]=r;if(!s&&!o)return t;const c=[{...t,offset:t.offset+s.length,content:i}];return s&&c.unshift({content:s,offset:t.offset}),o&&c.push({content:o,offset:t.offset+s.length+i.length}),c}))}function us(n){return n.map(e=>{const t=[];for(const r of e){if(t.length===0){t.push({...r});continue}const s=t.at(-1),i=fe(s.htmlStyle||Q(s)),o=fe(r.htmlStyle||Q(r)),c=s.fontStyle&&(s.fontStyle&I.Underline||s.fontStyle&I.Strikethrough),a=r.fontStyle&&(r.fontStyle&I.Underline||r.fontStyle&I.Strikethrough);!c&&!a&&i===o?s.content+=r.content:t.push({...r})}return t})}const Bt=Wt;function Oe(n,e,t){var i;const r={meta:{},options:t,codeToHast:(o,c)=>D(n,o,c),codeToTokens:(o,c)=>F(n,o,c)};let s=Bt(D(n,e,t,r));for(const o of de(t))s=((i=o.postprocess)==null?void 0:i.call(r,s,t))||s;return s}async function je(n){const e=await Ge(n);return{getLastGrammarState:(...t)=>Be(e,...t),codeToTokensBase:(t,r)=>X(e,t,r),codeToTokensWithThemes:(t,r)=>ye(e,t,r),codeToTokens:(t,r)=>F(e,t,r),codeToHast:(t,r)=>D(e,t,r),codeToHtml:(t,r)=>Oe(e,t,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function fs(n){const e=pe(n);return{getLastGrammarState:(...t)=>Be(e,...t),codeToTokensBase:(t,r)=>X(e,t,r),codeToTokensWithThemes:(t,r)=>ye(e,t,r),codeToTokens:(t,r)=>F(e,t,r),codeToHast:(t,r)=>D(e,t,r),codeToHtml:(t,r)=>Oe(e,t,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function $t(n){let e;async function t(r){if(e){const s=await e;return await Promise.all([s.loadTheme(...r.themes||[]),s.loadLanguage(...r.langs||[])]),s}else return e=n({...r,themes:r.themes||[],langs:r.langs||[]}),e}return t}const ds=$t(je);function gs(n){const e=n.langs,t=n.themes,r=n.engine;async function s(i){function o(u){var f;if(typeof u=="string"){if(u=((f=i.langAlias)==null?void 0:f[u])||u,Pe(u))return[];const g=e[u];if(!g)throw new R(`Language \`${u}\` is not included in this bundle. You may want to load it from external source.`);return g}return u}function c(u){if(xe(u))return"none";if(typeof u=="string"){const f=t[u];if(!f)throw new R(`Theme \`${u}\` is not included in this bundle. You may want to load it from external source.`);return f}return u}const a=(i.themes??[]).map(u=>c(u)),l=(i.langs??[]).map(u=>o(u)),d=await je({engine:i.engine??r(),...i,themes:a,langs:l});return{...d,loadLanguage(...u){return d.loadLanguage(...u.map(o))},loadTheme(...u){return d.loadTheme(...u.map(c))},getBundledLanguages(){return e},getBundledThemes(){return t}}}return s}function Mt(n){let e;async function t(r={}){if(e){const s=await e;return await Promise.all([s.loadTheme(...r.themes||[]),s.loadLanguage(...r.langs||[])]),s}else{e=n({...r,themes:[],langs:[]});const s=await e;return await Promise.all([s.loadTheme(...r.themes||[]),s.loadLanguage(...r.langs||[])]),s}}return t}function ps(n,e){const t=Mt(n);async function r(s,i){var a;const o=await t({langs:[i.lang],themes:"theme"in i?[i.theme]:Object.values(i.themes)}),c=await((a=e==null?void 0:e.guessEmbeddedLanguages)==null?void 0:a.call(e,s,i.lang,o));return c&&await o.loadLanguage(...c),o}return{getSingletonHighlighter(s){return t(s)},async codeToHtml(s,i){return(await r(s,i)).codeToHtml(s,i)},async codeToHast(s,i){return(await r(s,i)).codeToHast(s,i)},async codeToTokens(s,i){return(await r(s,i)).codeToTokens(s,i)},async codeToTokensBase(s,i){return(await r(s,i)).codeToTokensBase(s,i)},async codeToTokensWithThemes(s,i){return(await r(s,i)).codeToTokensWithThemes(s,i)},async getLastGrammarState(s,i){return(await t({langs:[i.lang],themes:[i.theme]})).getLastGrammarState(s,i)}}}function ms(n={}){var o;const{name:e="css-variables",variablePrefix:t="--shiki-",fontStyle:r=!0}=n,s=c=>{var a;return(a=n.variableDefaults)!=null&&a[c]?`var(${t}${c}, ${n.variableDefaults[c]})`:`var(${t}${c})`},i={name:e,type:"dark",colors:{"editor.foreground":s("foreground"),"editor.background":s("background"),"terminal.ansiBlack":s("ansi-black"),"terminal.ansiRed":s("ansi-red"),"terminal.ansiGreen":s("ansi-green"),"terminal.ansiYellow":s("ansi-yellow"),"terminal.ansiBlue":s("ansi-blue"),"terminal.ansiMagenta":s("ansi-magenta"),"terminal.ansiCyan":s("ansi-cyan"),"terminal.ansiWhite":s("ansi-white"),"terminal.ansiBrightBlack":s("ansi-bright-black"),"terminal.ansiBrightRed":s("ansi-bright-red"),"terminal.ansiBrightGreen":s("ansi-bright-green"),"terminal.ansiBrightYellow":s("ansi-bright-yellow"),"terminal.ansiBrightBlue":s("ansi-bright-blue"),"terminal.ansiBrightMagenta":s("ansi-bright-magenta"),"terminal.ansiBrightCyan":s("ansi-bright-cyan"),"terminal.ansiBrightWhite":s("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:s("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:s("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:s("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:s("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:s("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:s("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:s("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:s("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:s("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:s("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:s("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:s("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:s("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:s("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:s("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:s("token-changed")}}]};return r||(i.tokenColors=(o=i.tokenColors)==null?void 0:o.map(c=>{var a;return(a=c.settings)!=null&&a.fontStyle&&delete c.settings.fontStyle,c})),i}const bs=Object.freeze(Object.defineProperty({__proto__:null,ShikiError:R,addClassToHast:Me,applyColorReplacements:G,codeToHast:D,codeToHtml:Oe,codeToTokens:F,codeToTokensBase:X,codeToTokensWithThemes:ye,createBundledHighlighter:gs,createCssVariablesTheme:ms,createHighlighterCore:je,createHighlighterCoreSync:fs,createPositionConverter:It,createShikiInternal:Pn,createShikiInternalSync:En,createShikiPrimitive:pe,createShikiPrimitiveAsync:Ge,createSingletonShorthands:ps,flatTokenVariants:Nt,getLastGrammarState:Be,getSingletonHighlighterCore:ds,getTokenStyleObject:Q,guessEmbeddedLanguages:Kn,hastToHtml:Bt,isNoneTheme:te,isPlainLang:ee,isSpecialLang:Pe,isSpecialTheme:xe,makeSingletonHighlighter:Mt,makeSingletonHighlighterCore:$t,normalizeGetter:Ee,normalizeTheme:ge,resolveColorReplacements:Y,splitLines:ne,splitToken:vt,splitTokens:At,stringifyTokenStyle:fe,toArray:yt,tokenizeAnsiWithTheme:Pt,tokenizeWithTheme:Tt,tokensToHast:Gt,transformerDecorations:Lt},Symbol.toStringTag,{value:"Module"}));export{O as E,Ne as I,ms as a,bs as b,je as c};