@uiw/react-md-editor 3.17.0 → 3.18.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 (40) hide show
  1. package/README.md +19 -1
  2. package/dist/mdeditor.css +22 -6
  3. package/dist/mdeditor.js +944 -698
  4. package/dist/mdeditor.min.css +1 -1
  5. package/dist/mdeditor.min.js +1 -1
  6. package/esm/Context.d.ts +1 -0
  7. package/esm/Editor.d.ts +5 -0
  8. package/esm/Editor.js +21 -13
  9. package/esm/Editor.js.map +4 -4
  10. package/esm/components/DragBar/index.css +1 -0
  11. package/esm/components/DragBar/index.less +1 -0
  12. package/esm/components/Toolbar/Child.js +0 -1
  13. package/esm/components/Toolbar/Child.js.map +2 -2
  14. package/esm/components/Toolbar/index.css +6 -1
  15. package/esm/components/Toolbar/index.d.ts +0 -2
  16. package/esm/components/Toolbar/index.js +0 -4
  17. package/esm/components/Toolbar/index.js.map +2 -3
  18. package/esm/components/Toolbar/index.less +6 -1
  19. package/esm/index.css +10 -3
  20. package/esm/index.less +9 -3
  21. package/lib/Context.d.ts +1 -0
  22. package/lib/Editor.d.ts +5 -0
  23. package/lib/Editor.js +24 -15
  24. package/lib/Editor.js.map +5 -5
  25. package/lib/components/DragBar/index.less +1 -0
  26. package/lib/components/Toolbar/Child.js +0 -1
  27. package/lib/components/Toolbar/Child.js.map +2 -2
  28. package/lib/components/Toolbar/index.d.ts +0 -2
  29. package/lib/components/Toolbar/index.js +0 -5
  30. package/lib/components/Toolbar/index.js.map +2 -3
  31. package/lib/components/Toolbar/index.less +6 -1
  32. package/lib/index.less +9 -3
  33. package/markdown-editor.css +17 -4
  34. package/package.json +2 -2
  35. package/src/Editor.tsx +30 -21
  36. package/src/components/DragBar/index.less +1 -0
  37. package/src/components/Toolbar/Child.tsx +1 -1
  38. package/src/components/Toolbar/index.less +6 -1
  39. package/src/components/Toolbar/index.tsx +2 -3
  40. package/src/index.less +9 -3
package/dist/mdeditor.js CHANGED
@@ -9671,7 +9671,7 @@ __webpack_require__.d(__webpack_exports__, {
9671
9671
  "unorderedListCommand": () => (/* reexport */ unorderedListCommand)
9672
9672
  });
9673
9673
 
9674
- // NAMESPACE OBJECT: ../node_modules/react-markdown/node_modules/micromark/lib/constructs.js
9674
+ // NAMESPACE OBJECT: ../node_modules/micromark/lib/constructs.js
9675
9675
  var constructs_namespaceObject = {};
9676
9676
  __webpack_require__.r(constructs_namespaceObject);
9677
9677
  __webpack_require__.d(constructs_namespaceObject, {
@@ -9911,7 +9911,7 @@ function _extends() {
9911
9911
  }
9912
9912
  // EXTERNAL MODULE: ../node_modules/is-buffer/index.js
9913
9913
  var is_buffer = __webpack_require__(372);
9914
- ;// CONCATENATED MODULE: ../node_modules/vfile-message/node_modules/unist-util-stringify-position/index.js
9914
+ ;// CONCATENATED MODULE: ../node_modules/unist-util-stringify-position/index.js
9915
9915
  /**
9916
9916
  * @typedef {import('unist').Point} Point
9917
9917
  * @typedef {import('unist').Node} Node
@@ -11855,7 +11855,7 @@ function looksLikeAVFileValue(value) {
11855
11855
  return typeof value === 'string' || is_buffer(value)
11856
11856
  }
11857
11857
 
11858
- ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/mdast-util-to-string/index.js
11858
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-string/index.js
11859
11859
  /**
11860
11860
  * @typedef Options
11861
11861
  * @property {boolean} [includeImageAlt=true]
@@ -12356,7 +12356,7 @@ function factorySpace(effects, ok, type, max) {
12356
12356
  }
12357
12357
  }
12358
12358
 
12359
- ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/initialize/content.js
12359
+ ;// CONCATENATED MODULE: ../node_modules/micromark/lib/initialize/content.js
12360
12360
  /**
12361
12361
  * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
12362
12362
  * @typedef {import('micromark-util-types').Initializer} Initializer
@@ -12437,7 +12437,7 @@ function initializeContent(effects) {
12437
12437
  }
12438
12438
  }
12439
12439
 
12440
- ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/initialize/document.js
12440
+ ;// CONCATENATED MODULE: ../node_modules/micromark/lib/initialize/document.js
12441
12441
  /**
12442
12442
  * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
12443
12443
  * @typedef {import('micromark-util-types').Initializer} Initializer
@@ -13212,7 +13212,7 @@ function tokenizeContinuation(effects, ok, nok) {
13212
13212
  }
13213
13213
  }
13214
13214
 
13215
- ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/initialize/flow.js
13215
+ ;// CONCATENATED MODULE: ../node_modules/micromark/lib/initialize/flow.js
13216
13216
  /**
13217
13217
  * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
13218
13218
  * @typedef {import('micromark-util-types').Initializer} Initializer
@@ -13279,7 +13279,7 @@ function initializeFlow(effects) {
13279
13279
  }
13280
13280
  }
13281
13281
 
13282
- ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/initialize/text.js
13282
+ ;// CONCATENATED MODULE: ../node_modules/micromark/lib/initialize/text.js
13283
13283
  /**
13284
13284
  * @typedef {import('micromark-util-types').Resolver} Resolver
13285
13285
  * @typedef {import('micromark-util-types').Initializer} Initializer
@@ -13531,7 +13531,7 @@ function resolveAll(constructs, events, context) {
13531
13531
  return events
13532
13532
  }
13533
13533
 
13534
- ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/create-tokenizer.js
13534
+ ;// CONCATENATED MODULE: ../node_modules/micromark/lib/create-tokenizer.js
13535
13535
  /**
13536
13536
  * @typedef {import('micromark-util-types').Code} Code
13537
13537
  * @typedef {import('micromark-util-types').Chunk} Chunk
@@ -18136,7 +18136,7 @@ function tokenizeCodeText(effects, ok, nok) {
18136
18136
  }
18137
18137
  }
18138
18138
 
18139
- ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/constructs.js
18139
+ ;// CONCATENATED MODULE: ../node_modules/micromark/lib/constructs.js
18140
18140
  /**
18141
18141
  * @typedef {import('micromark-util-types').Extension} Extension
18142
18142
  */
@@ -18222,7 +18222,7 @@ const disable = {
18222
18222
  null: []
18223
18223
  }
18224
18224
 
18225
- ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/parse.js
18225
+ ;// CONCATENATED MODULE: ../node_modules/micromark/lib/parse.js
18226
18226
  /**
18227
18227
  * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
18228
18228
  * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension
@@ -18276,7 +18276,7 @@ function parse_parse(options = {}) {
18276
18276
  }
18277
18277
  }
18278
18278
 
18279
- ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/preprocess.js
18279
+ ;// CONCATENATED MODULE: ../node_modules/micromark/lib/preprocess.js
18280
18280
  /**
18281
18281
  * @typedef {import('micromark-util-types').Encoding} Encoding
18282
18282
  * @typedef {import('micromark-util-types').Value} Value
@@ -18407,7 +18407,7 @@ function preprocess() {
18407
18407
  }
18408
18408
  }
18409
18409
 
18410
- ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/postprocess.js
18410
+ ;// CONCATENATED MODULE: ../node_modules/micromark/lib/postprocess.js
18411
18411
  /**
18412
18412
  * @typedef {import('micromark-util-types').Event} Event
18413
18413
  */
@@ -18499,71 +18499,7 @@ function decode($0, $1, $2) {
18499
18499
  return decodeNamedCharacterReference($2) || $0
18500
18500
  }
18501
18501
 
18502
- ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/unist-util-stringify-position/index.js
18503
- /**
18504
- * @typedef {import('unist').Point} Point
18505
- * @typedef {import('unist').Node} Node
18506
- * @typedef {import('unist').Position} Position
18507
- * @typedef {object & {type: string, position?: Position|undefined}} NodeLike
18508
- */
18509
-
18510
- /**
18511
- * Stringify one point, a position (start and end points), or a node’s
18512
- * positional information.
18513
- *
18514
- * @param {Node|NodeLike|Position|Point|null} [value]
18515
- * @returns {string}
18516
- */
18517
- function unist_util_stringify_position_stringifyPosition(value) {
18518
- // Nothing.
18519
- if (!value || typeof value !== 'object') {
18520
- return ''
18521
- }
18522
-
18523
- // Node.
18524
- if ('position' in value || 'type' in value) {
18525
- return unist_util_stringify_position_position(value.position)
18526
- }
18527
-
18528
- // Position.
18529
- if ('start' in value || 'end' in value) {
18530
- return unist_util_stringify_position_position(value)
18531
- }
18532
-
18533
- // Point.
18534
- if ('line' in value || 'column' in value) {
18535
- return unist_util_stringify_position_point(value)
18536
- }
18537
-
18538
- // ?
18539
- return ''
18540
- }
18541
-
18542
- /**
18543
- * @param {Point|undefined} point
18544
- * @returns {string}
18545
- */
18546
- function unist_util_stringify_position_point(point) {
18547
- return unist_util_stringify_position_index(point && point.line) + ':' + unist_util_stringify_position_index(point && point.column)
18548
- }
18549
-
18550
- /**
18551
- * @param {Position|undefined} pos
18552
- * @returns {string}
18553
- */
18554
- function unist_util_stringify_position_position(pos) {
18555
- return unist_util_stringify_position_point(pos && pos.start) + '-' + unist_util_stringify_position_point(pos && pos.end)
18556
- }
18557
-
18558
- /**
18559
- * @param {number|undefined} value
18560
- * @returns {number}
18561
- */
18562
- function unist_util_stringify_position_index(value) {
18563
- return value && typeof value === 'number' ? value : 1
18564
- }
18565
-
18566
- ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/mdast-util-from-markdown/lib/index.js
18502
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-from-markdown/lib/index.js
18567
18503
  /**
18568
18504
  * @typedef {import('micromark-util-types').Encoding} Encoding
18569
18505
  * @typedef {import('micromark-util-types').Event} Event
@@ -19168,7 +19104,7 @@ function compiler(options = {}) {
19168
19104
  'Cannot close `' +
19169
19105
  token.type +
19170
19106
  '` (' +
19171
- unist_util_stringify_position_stringifyPosition({
19107
+ stringifyPosition({
19172
19108
  start: token.start,
19173
19109
  end: token.end
19174
19110
  }) +
@@ -19781,14 +19717,14 @@ function defaultOnError(left, right) {
19781
19717
  'Cannot close `' +
19782
19718
  left.type +
19783
19719
  '` (' +
19784
- unist_util_stringify_position_stringifyPosition({
19720
+ stringifyPosition({
19785
19721
  start: left.start,
19786
19722
  end: left.end
19787
19723
  }) +
19788
19724
  '): a different token (`' +
19789
19725
  right.type +
19790
19726
  '`, ' +
19791
- unist_util_stringify_position_stringifyPosition({
19727
+ stringifyPosition({
19792
19728
  start: right.start,
19793
19729
  end: right.end
19794
19730
  }) +
@@ -19799,7 +19735,7 @@ function defaultOnError(left, right) {
19799
19735
  'Cannot close document, a token (`' +
19800
19736
  right.type +
19801
19737
  '`, ' +
19802
- unist_util_stringify_position_stringifyPosition({
19738
+ stringifyPosition({
19803
19739
  start: right.start,
19804
19740
  end: right.end
19805
19741
  }) +
@@ -19808,7 +19744,7 @@ function defaultOnError(left, right) {
19808
19744
  }
19809
19745
  }
19810
19746
 
19811
- ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/remark-parse/lib/index.js
19747
+ ;// CONCATENATED MODULE: ../node_modules/remark-parse/lib/index.js
19812
19748
  /**
19813
19749
  * @typedef {import('mdast').Root} Root
19814
19750
  * @typedef {import('mdast-util-from-markdown').Options} Options
@@ -19838,7 +19774,7 @@ function remarkParse(options) {
19838
19774
  Object.assign(this, {Parser: parser})
19839
19775
  }
19840
19776
 
19841
- ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/remark-parse/index.js
19777
+ ;// CONCATENATED MODULE: ../node_modules/remark-parse/index.js
19842
19778
 
19843
19779
 
19844
19780
  /* harmony default export */ const remark_parse = (remarkParse);
@@ -20158,11 +20094,11 @@ function color(d) {
20158
20094
  * @typedef {import('unist').Node} Node
20159
20095
  * @typedef {import('unist').Parent} Parent
20160
20096
  * @typedef {import('unist-util-is').Test} Test
20161
- * @typedef {import('./complex-types').Action} Action
20162
- * @typedef {import('./complex-types').Index} Index
20163
- * @typedef {import('./complex-types').ActionTuple} ActionTuple
20164
- * @typedef {import('./complex-types').VisitorResult} VisitorResult
20165
- * @typedef {import('./complex-types').Visitor} Visitor
20097
+ * @typedef {import('./complex-types.js').Action} Action
20098
+ * @typedef {import('./complex-types.js').Index} Index
20099
+ * @typedef {import('./complex-types.js').ActionTuple} ActionTuple
20100
+ * @typedef {import('./complex-types.js').VisitorResult} VisitorResult
20101
+ * @typedef {import('./complex-types.js').Visitor} Visitor
20166
20102
  */
20167
20103
 
20168
20104
 
@@ -20182,26 +20118,30 @@ const SKIP = 'skip'
20182
20118
  const EXIT = false
20183
20119
 
20184
20120
  /**
20185
- * Visit children of tree which pass a test
20121
+ * Visit children of tree which pass test.
20186
20122
  *
20187
- * @param tree Abstract syntax tree to walk
20188
- * @param test Test node, optional
20189
- * @param visitor Function to run for each node
20190
- * @param reverse Visit the tree in reverse order, defaults to false
20123
+ * @param tree
20124
+ * Tree to walk
20125
+ * @param [test]
20126
+ * `unist-util-is`-compatible test
20127
+ * @param visitor
20128
+ * Function called for nodes that pass `test`.
20129
+ * @param [reverse=false]
20130
+ * Traverse in reverse preorder (NRL) instead of preorder (NLR) (default).
20191
20131
  */
20192
20132
  const visitParents =
20193
20133
  /**
20194
20134
  * @type {(
20195
- * (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: import('./complex-types').BuildVisitor<Tree, Check>, reverse?: boolean) => void) &
20196
- * (<Tree extends Node>(tree: Tree, visitor: import('./complex-types').BuildVisitor<Tree>, reverse?: boolean) => void)
20135
+ * (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: import('./complex-types.js').BuildVisitor<Tree, Check>, reverse?: boolean) => void) &
20136
+ * (<Tree extends Node>(tree: Tree, visitor: import('./complex-types.js').BuildVisitor<Tree>, reverse?: boolean) => void)
20197
20137
  * )}
20198
20138
  */
20199
20139
  (
20200
20140
  /**
20201
20141
  * @param {Node} tree
20202
20142
  * @param {Test} test
20203
- * @param {import('./complex-types').Visitor<Node>} visitor
20204
- * @param {boolean} [reverse]
20143
+ * @param {import('./complex-types.js').Visitor<Node>} visitor
20144
+ * @param {boolean} [reverse=false]
20205
20145
  */
20206
20146
  function (tree, test, visitor, reverse) {
20207
20147
  if (typeof test === 'function' && typeof visitor !== 'function') {
@@ -20219,10 +20159,10 @@ const visitParents =
20219
20159
  /**
20220
20160
  * @param {Node} node
20221
20161
  * @param {number?} index
20222
- * @param {Array.<Parent>} parents
20162
+ * @param {Array<Parent>} parents
20223
20163
  */
20224
20164
  function factory(node, index, parents) {
20225
- /** @type {Object.<string, unknown>} */
20165
+ /** @type {Record<string, unknown>} */
20226
20166
  // @ts-expect-error: hush
20227
20167
  const value = typeof node === 'object' && node !== null ? node : {}
20228
20168
  /** @type {string|undefined} */
@@ -20253,7 +20193,7 @@ const visitParents =
20253
20193
  let subresult
20254
20194
  /** @type {number} */
20255
20195
  let offset
20256
- /** @type {Array.<Parent>} */
20196
+ /** @type {Array<Parent>} */
20257
20197
  let grandparents
20258
20198
 
20259
20199
  if (!test || is(node, index, parents[parents.length - 1] || null)) {
@@ -20313,33 +20253,35 @@ function toResult(value) {
20313
20253
  * @typedef {import('unist').Parent} Parent
20314
20254
  * @typedef {import('unist-util-is').Test} Test
20315
20255
  * @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult
20316
- * @typedef {import('./complex-types').Visitor} Visitor
20256
+ * @typedef {import('./complex-types.js').Visitor} Visitor
20317
20257
  */
20318
20258
 
20319
20259
 
20320
20260
 
20321
-
20322
-
20323
20261
  /**
20324
- * Visit children of tree which pass a test
20262
+ * Visit children of tree which pass test.
20325
20263
  *
20326
- * @param tree Abstract syntax tree to walk
20327
- * @param test Test, optional
20328
- * @param visitor Function to run for each node
20329
- * @param reverse Fisit the tree in reverse, defaults to false
20264
+ * @param tree
20265
+ * Tree to walk
20266
+ * @param [test]
20267
+ * `unist-util-is`-compatible test
20268
+ * @param visitor
20269
+ * Function called for nodes that pass `test`.
20270
+ * @param reverse
20271
+ * Traverse in reverse preorder (NRL) instead of preorder (NLR) (default).
20330
20272
  */
20331
20273
  const visit =
20332
20274
  /**
20333
20275
  * @type {(
20334
- * (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: import('./complex-types').BuildVisitor<Tree, Check>, reverse?: boolean) => void) &
20335
- * (<Tree extends Node>(tree: Tree, visitor: import('./complex-types').BuildVisitor<Tree>, reverse?: boolean) => void)
20276
+ * (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: import('./complex-types.js').BuildVisitor<Tree, Check>, reverse?: boolean) => void) &
20277
+ * (<Tree extends Node>(tree: Tree, visitor: import('./complex-types.js').BuildVisitor<Tree>, reverse?: boolean) => void)
20336
20278
  * )}
20337
20279
  */
20338
20280
  (
20339
20281
  /**
20340
20282
  * @param {Node} tree
20341
20283
  * @param {Test} test
20342
- * @param {import('./complex-types').Visitor} visitor
20284
+ * @param {import('./complex-types.js').Visitor} visitor
20343
20285
  * @param {boolean} [reverse]
20344
20286
  */
20345
20287
  function (tree, test, visitor, reverse) {
@@ -20353,7 +20295,7 @@ const visit =
20353
20295
 
20354
20296
  /**
20355
20297
  * @param {Node} node
20356
- * @param {Array.<Parent>} parents
20298
+ * @param {Array<Parent>} parents
20357
20299
  */
20358
20300
  function overload(node, parents) {
20359
20301
  const parent = parents[parents.length - 1]
@@ -20366,6 +20308,8 @@ const visit =
20366
20308
  }
20367
20309
  )
20368
20310
 
20311
+
20312
+
20369
20313
  ;// CONCATENATED MODULE: ../node_modules/unist-util-position/index.js
20370
20314
  /**
20371
20315
  * @typedef {import('unist').Position} Position
@@ -20807,6 +20751,7 @@ function wrap_wrap(nodes, loose) {
20807
20751
 
20808
20752
  /**
20809
20753
  * @param {H} h
20754
+ * @returns {Element|null}
20810
20755
  */
20811
20756
  function footer(h) {
20812
20757
  let index = -1
@@ -20902,8 +20847,8 @@ function footer(h) {
20902
20847
  children: [
20903
20848
  {
20904
20849
  type: 'element',
20905
- tagName: 'h2',
20906
- properties: {id: 'footnote-label', className: ['sr-only']},
20850
+ tagName: h.footnoteLabelTagName,
20851
+ properties: JSON.parse(JSON.stringify(h.footnoteLabelProperties)),
20907
20852
  children: [u('text', h.footnoteLabel)]
20908
20853
  },
20909
20854
  {type: 'text', value: '\n'},
@@ -21815,6 +21760,8 @@ function ignore() {
21815
21760
  * @property {boolean} dangerous Whether HTML is allowed
21816
21761
  * @property {string} clobberPrefix Prefix to use to prevent DOM clobbering
21817
21762
  * @property {string} footnoteLabel Label to use to introduce the footnote section
21763
+ * @property {string} footnoteLabelTagName HTML used for the footnote label
21764
+ * @property {Properties} footnoteLabelProperties properties on the HTML tag used for the footnote label
21818
21765
  * @property {string} footnoteBackLabel Label to use to go back to a footnote call from the footnote section
21819
21766
  * @property {(identifier: string) => Definition|null} definition Definition cache
21820
21767
  * @property {Record<string, FootnoteDefinition>} footnoteById Footnote cache
@@ -21844,6 +21791,13 @@ function ignore() {
21844
21791
  * Label to use for the footnotes section.
21845
21792
  * Affects screen reader users.
21846
21793
  * Change it if you’re authoring in a different language.
21794
+ * @property {string} [footnoteLabelTagName='h2']
21795
+ * HTML tag to use for the footnote label.
21796
+ * Can be changed to match your document structure and play well with your choice of css.
21797
+ * @property {Properties} [footnoteLabelProperties={id: 'footnote-label', className: ['sr-only']}]
21798
+ * Properties to use on the footnote label.
21799
+ * A 'sr-only' class is added by default to hide this from sighted users.
21800
+ * Change it to make the label visible, or add classes for other purposes.
21847
21801
  * @property {string} [footnoteBackLabel='Back to content']
21848
21802
  * Label to use from backreferences back to their footnote call.
21849
21803
  * Affects screen reader users.
@@ -21890,6 +21844,11 @@ function factory(tree, options) {
21890
21844
  ? 'user-content-'
21891
21845
  : settings.clobberPrefix
21892
21846
  h.footnoteLabel = settings.footnoteLabel || 'Footnotes'
21847
+ h.footnoteLabelTagName = settings.footnoteLabelTagName || 'h2'
21848
+ h.footnoteLabelProperties = settings.footnoteLabelProperties || {
21849
+ id: 'footnote-label',
21850
+ className: ['sr-only']
21851
+ }
21893
21852
  h.footnoteBackLabel = settings.footnoteBackLabel || 'Back to content'
21894
21853
  h.definition = definitions(tree)
21895
21854
  h.footnoteById = footnoteById
@@ -26788,7 +26747,7 @@ function mdast_util_gfm_autolink_literal_previous(match, email) {
26788
26747
  )
26789
26748
  }
26790
26749
 
26791
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-footnote/node_modules/mdast-util-to-markdown/lib/util/association.js
26750
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/association.js
26792
26751
  /**
26793
26752
  * @typedef {import('mdast').Association} Association
26794
26753
  */
@@ -26818,7 +26777,7 @@ function association(node) {
26818
26777
  return decodeString(node.identifier)
26819
26778
  }
26820
26779
 
26821
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-footnote/node_modules/mdast-util-to-markdown/lib/util/track.js
26780
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/track.js
26822
26781
  /**
26823
26782
  * @typedef {import('unist').Point} Point
26824
26783
  * @typedef {import('../types.js').TrackFields} TrackFields
@@ -26877,7 +26836,7 @@ function track(options_) {
26877
26836
  }
26878
26837
  }
26879
26838
 
26880
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-footnote/node_modules/mdast-util-to-markdown/lib/util/container-flow.js
26839
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/container-flow.js
26881
26840
  /**
26882
26841
  * @typedef {import('../types.js').Node} Node
26883
26842
  * @typedef {import('../types.js').Parent} Parent
@@ -26960,7 +26919,7 @@ function containerFlow(parent, context, safeOptions) {
26960
26919
  }
26961
26920
  }
26962
26921
 
26963
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-footnote/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js
26922
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/indent-lines.js
26964
26923
  /**
26965
26924
  * @callback Map
26966
26925
  * @param {string} value
@@ -27003,7 +26962,7 @@ function indentLines(value, map) {
27003
26962
  }
27004
26963
  }
27005
26964
 
27006
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-footnote/node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js
26965
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js
27007
26966
  /**
27008
26967
  * @typedef {import('../types.js').Unsafe} Unsafe
27009
26968
  */
@@ -27030,7 +26989,7 @@ function patternCompile(pattern) {
27030
26989
  return pattern._compiled
27031
26990
  }
27032
26991
 
27033
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-footnote/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js
26992
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js
27034
26993
  /**
27035
26994
  * @typedef {import('../types.js').Unsafe} Unsafe
27036
26995
  */
@@ -27073,7 +27032,7 @@ function listInScope(stack, list, none) {
27073
27032
  return false
27074
27033
  }
27075
27034
 
27076
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-footnote/node_modules/mdast-util-to-markdown/lib/util/safe.js
27035
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/safe.js
27077
27036
  /**
27078
27037
  * @typedef {import('../types.js').Context} Context
27079
27038
  * @typedef {import('../types.js').SafeOptions} SafeOptions
@@ -27406,66 +27365,7 @@ function gfmFootnoteToMarkdown() {
27406
27365
  }
27407
27366
  }
27408
27367
 
27409
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-strikethrough/node_modules/mdast-util-to-markdown/lib/util/track.js
27410
- /**
27411
- * @typedef {import('unist').Point} Point
27412
- * @typedef {import('../types.js').TrackFields} TrackFields
27413
- */
27414
-
27415
- /**
27416
- * Functions to track output positions.
27417
- * This info isn’t used yet but suchs functionality allows line wrapping,
27418
- * and theoretically source maps (though, is there practical use in that?).
27419
- *
27420
- * @param {TrackFields} options_
27421
- */
27422
- function track_track(options_) {
27423
- // Defaults are used to prevent crashes when older utilities somehow activate
27424
- // this code.
27425
- /* c8 ignore next 5 */
27426
- const options = options_ || {}
27427
- const now = options.now || {}
27428
- let lineShift = options.lineShift || 0
27429
- let line = now.line || 1
27430
- let column = now.column || 1
27431
-
27432
- return {move, current, shift}
27433
-
27434
- /**
27435
- * Get the current tracked info.
27436
- *
27437
- * @returns {{now: Point, lineShift: number}}
27438
- */
27439
- function current() {
27440
- return {now: {line, column}, lineShift}
27441
- }
27442
-
27443
- /**
27444
- * Define an increased line shift (the typical indent for lines).
27445
- *
27446
- * @param {number} value
27447
- */
27448
- function shift(value) {
27449
- lineShift += value
27450
- }
27451
-
27452
- /**
27453
- * Move past a string.
27454
- *
27455
- * @param {string} value
27456
- * @returns {string}
27457
- */
27458
- function move(value = '') {
27459
- const chunks = value.split(/\r?\n|\r/g)
27460
- const tail = chunks[chunks.length - 1]
27461
- line += chunks.length - 1
27462
- column =
27463
- chunks.length === 1 ? column + tail.length : 1 + tail.length + lineShift
27464
- return value
27465
- }
27466
- }
27467
-
27468
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-strikethrough/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js
27368
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js
27469
27369
  /**
27470
27370
  * @typedef {import('../types.js').Node} Node
27471
27371
  * @typedef {import('../types.js').Parent} Parent
@@ -27490,7 +27390,7 @@ function containerPhrasing(parent, context, safeOptions) {
27490
27390
  let before = safeOptions.before
27491
27391
 
27492
27392
  indexStack.push(-1)
27493
- let tracker = track_track(safeOptions)
27393
+ let tracker = track(safeOptions)
27494
27394
 
27495
27395
  while (++index < children.length) {
27496
27396
  const child = children[index]
@@ -27532,7 +27432,7 @@ function containerPhrasing(parent, context, safeOptions) {
27532
27432
  before = ' '
27533
27433
 
27534
27434
  // To do: does this work to reset tracker?
27535
- tracker = track_track(safeOptions)
27435
+ tracker = track(safeOptions)
27536
27436
  tracker.move(results.join(''))
27537
27437
  }
27538
27438
 
@@ -27596,7 +27496,7 @@ function exitStrikethrough(token) {
27596
27496
  * @param {Delete} node
27597
27497
  */
27598
27498
  function handleDelete(node, _, context, safeOptions) {
27599
- const tracker = track_track(safeOptions)
27499
+ const tracker = track(safeOptions)
27600
27500
  const exit = context.enter('emphasis')
27601
27501
  let value = tracker.move('~~')
27602
27502
  value += containerPhrasing(node, context, {
@@ -27614,182 +27514,7 @@ function peekDelete() {
27614
27514
  return '~'
27615
27515
  }
27616
27516
 
27617
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-table/node_modules/mdast-util-to-markdown/lib/util/track.js
27618
- /**
27619
- * @typedef {import('unist').Point} Point
27620
- * @typedef {import('../types.js').TrackFields} TrackFields
27621
- */
27622
-
27623
- /**
27624
- * Functions to track output positions.
27625
- * This info isn’t used yet but suchs functionality allows line wrapping,
27626
- * and theoretically source maps (though, is there practical use in that?).
27627
- *
27628
- * @param {TrackFields} options_
27629
- */
27630
- function util_track_track(options_) {
27631
- // Defaults are used to prevent crashes when older utilities somehow activate
27632
- // this code.
27633
- /* c8 ignore next 5 */
27634
- const options = options_ || {}
27635
- const now = options.now || {}
27636
- let lineShift = options.lineShift || 0
27637
- let line = now.line || 1
27638
- let column = now.column || 1
27639
-
27640
- return {move, current, shift}
27641
-
27642
- /**
27643
- * Get the current tracked info.
27644
- *
27645
- * @returns {{now: Point, lineShift: number}}
27646
- */
27647
- function current() {
27648
- return {now: {line, column}, lineShift}
27649
- }
27650
-
27651
- /**
27652
- * Define an increased line shift (the typical indent for lines).
27653
- *
27654
- * @param {number} value
27655
- */
27656
- function shift(value) {
27657
- lineShift += value
27658
- }
27659
-
27660
- /**
27661
- * Move past a string.
27662
- *
27663
- * @param {string} value
27664
- * @returns {string}
27665
- */
27666
- function move(value = '') {
27667
- const chunks = value.split(/\r?\n|\r/g)
27668
- const tail = chunks[chunks.length - 1]
27669
- line += chunks.length - 1
27670
- column =
27671
- chunks.length === 1 ? column + tail.length : 1 + tail.length + lineShift
27672
- return value
27673
- }
27674
- }
27675
-
27676
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-table/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js
27677
- /**
27678
- * @typedef {import('../types.js').Node} Node
27679
- * @typedef {import('../types.js').Parent} Parent
27680
- * @typedef {import('../types.js').SafeOptions} SafeOptions
27681
- * @typedef {import('../types.js').Context} Context
27682
- */
27683
-
27684
-
27685
-
27686
- /**
27687
- * @param {Parent} parent
27688
- * @param {Context} context
27689
- * @param {SafeOptions} safeOptions
27690
- * @returns {string}
27691
- */
27692
- function container_phrasing_containerPhrasing(parent, context, safeOptions) {
27693
- const indexStack = context.indexStack
27694
- const children = parent.children || []
27695
- /** @type {Array<string>} */
27696
- const results = []
27697
- let index = -1
27698
- let before = safeOptions.before
27699
-
27700
- indexStack.push(-1)
27701
- let tracker = util_track_track(safeOptions)
27702
-
27703
- while (++index < children.length) {
27704
- const child = children[index]
27705
- /** @type {string} */
27706
- let after
27707
-
27708
- indexStack[indexStack.length - 1] = index
27709
-
27710
- if (index + 1 < children.length) {
27711
- // @ts-expect-error: hush, it’s actually a `zwitch`.
27712
- let handle = context.handle.handlers[children[index + 1].type]
27713
- if (handle && handle.peek) handle = handle.peek
27714
- after = handle
27715
- ? handle(children[index + 1], parent, context, {
27716
- before: '',
27717
- after: '',
27718
- ...tracker.current()
27719
- }).charAt(0)
27720
- : ''
27721
- } else {
27722
- after = safeOptions.after
27723
- }
27724
-
27725
- // In some cases, html (text) can be found in phrasing right after an eol.
27726
- // When we’d serialize that, in most cases that would be seen as html
27727
- // (flow).
27728
- // As we can’t escape or so to prevent it from happening, we take a somewhat
27729
- // reasonable approach: replace that eol with a space.
27730
- // See: <https://github.com/syntax-tree/mdast-util-to-markdown/issues/15>
27731
- if (
27732
- results.length > 0 &&
27733
- (before === '\r' || before === '\n') &&
27734
- child.type === 'html'
27735
- ) {
27736
- results[results.length - 1] = results[results.length - 1].replace(
27737
- /(\r?\n|\r)$/,
27738
- ' '
27739
- )
27740
- before = ' '
27741
-
27742
- // To do: does this work to reset tracker?
27743
- tracker = util_track_track(safeOptions)
27744
- tracker.move(results.join(''))
27745
- }
27746
-
27747
- results.push(
27748
- tracker.move(
27749
- context.handle(child, parent, context, {
27750
- ...tracker.current(),
27751
- before,
27752
- after
27753
- })
27754
- )
27755
- )
27756
-
27757
- before = results[results.length - 1].slice(-1)
27758
- }
27759
-
27760
- indexStack.pop()
27761
-
27762
- return results.join('')
27763
- }
27764
-
27765
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-table/node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js
27766
- /**
27767
- * @typedef {import('../types.js').Unsafe} Unsafe
27768
- */
27769
-
27770
- /**
27771
- * @param {Unsafe} pattern
27772
- * @returns {RegExp}
27773
- */
27774
- function pattern_compile_patternCompile(pattern) {
27775
- if (!pattern._compiled) {
27776
- const before =
27777
- (pattern.atBreak ? '[\\r\\n][\\t ]*' : '') +
27778
- (pattern.before ? '(?:' + pattern.before + ')' : '')
27779
-
27780
- pattern._compiled = new RegExp(
27781
- (before ? '(' + before + ')' : '') +
27782
- (/[|\\{}()[\]^$+*?.-]/.test(pattern.character) ? '\\' : '') +
27783
- pattern.character +
27784
- (pattern.after ? '(?:' + pattern.after + ')' : ''),
27785
- 'g'
27786
- )
27787
- }
27788
-
27789
- return pattern._compiled
27790
- }
27791
-
27792
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-table/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js
27517
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/handle/inline-code.js
27793
27518
  /**
27794
27519
  * @typedef {import('mdast').InlineCode} InlineCode
27795
27520
  * @typedef {import('../types.js').Handle} Handle
@@ -27833,7 +27558,7 @@ function inline_code_inlineCode(node, _, context) {
27833
27558
  // them out.
27834
27559
  while (++index < context.unsafe.length) {
27835
27560
  const pattern = context.unsafe[index]
27836
- const expression = pattern_compile_patternCompile(pattern)
27561
+ const expression = patternCompile(pattern)
27837
27562
  /** @type {RegExpExecArray|null} */
27838
27563
  let match
27839
27564
 
@@ -28425,7 +28150,7 @@ function gfmTableToMarkdown(options) {
28425
28150
  function handleTableCell(node, _, context, safeOptions) {
28426
28151
  const exit = context.enter('tableCell')
28427
28152
  const subexit = context.enter('phrasing')
28428
- const value = container_phrasing_containerPhrasing(node, context, {
28153
+ const value = containerPhrasing(node, context, {
28429
28154
  ...safeOptions,
28430
28155
  before: around,
28431
28156
  after: around
@@ -28517,7 +28242,7 @@ function gfmTableToMarkdown(options) {
28517
28242
  }
28518
28243
  }
28519
28244
 
28520
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-task-list-item/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js
28245
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/check-bullet.js
28521
28246
  /**
28522
28247
  * @typedef {import('../types.js').Context} Context
28523
28248
  * @typedef {import('../types.js').Options} Options
@@ -28541,7 +28266,7 @@ function checkBullet(context) {
28541
28266
  return marker
28542
28267
  }
28543
28268
 
28544
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-task-list-item/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js
28269
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js
28545
28270
  /**
28546
28271
  * @typedef {import('../types.js').Context} Context
28547
28272
  * @typedef {import('../types.js').Options} Options
@@ -28571,192 +28296,7 @@ function checkListItemIndent(context) {
28571
28296
  return style
28572
28297
  }
28573
28298
 
28574
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-task-list-item/node_modules/mdast-util-to-markdown/lib/util/track.js
28575
- /**
28576
- * @typedef {import('unist').Point} Point
28577
- * @typedef {import('../types.js').TrackFields} TrackFields
28578
- */
28579
-
28580
- /**
28581
- * Functions to track output positions.
28582
- * This info isn’t used yet but suchs functionality allows line wrapping,
28583
- * and theoretically source maps (though, is there practical use in that?).
28584
- *
28585
- * @param {TrackFields} options_
28586
- */
28587
- function lib_util_track_track(options_) {
28588
- // Defaults are used to prevent crashes when older utilities somehow activate
28589
- // this code.
28590
- /* c8 ignore next 5 */
28591
- const options = options_ || {}
28592
- const now = options.now || {}
28593
- let lineShift = options.lineShift || 0
28594
- let line = now.line || 1
28595
- let column = now.column || 1
28596
-
28597
- return {move, current, shift}
28598
-
28599
- /**
28600
- * Get the current tracked info.
28601
- *
28602
- * @returns {{now: Point, lineShift: number}}
28603
- */
28604
- function current() {
28605
- return {now: {line, column}, lineShift}
28606
- }
28607
-
28608
- /**
28609
- * Define an increased line shift (the typical indent for lines).
28610
- *
28611
- * @param {number} value
28612
- */
28613
- function shift(value) {
28614
- lineShift += value
28615
- }
28616
-
28617
- /**
28618
- * Move past a string.
28619
- *
28620
- * @param {string} value
28621
- * @returns {string}
28622
- */
28623
- function move(value = '') {
28624
- const chunks = value.split(/\r?\n|\r/g)
28625
- const tail = chunks[chunks.length - 1]
28626
- line += chunks.length - 1
28627
- column =
28628
- chunks.length === 1 ? column + tail.length : 1 + tail.length + lineShift
28629
- return value
28630
- }
28631
- }
28632
-
28633
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-task-list-item/node_modules/mdast-util-to-markdown/lib/util/container-flow.js
28634
- /**
28635
- * @typedef {import('../types.js').Node} Node
28636
- * @typedef {import('../types.js').Parent} Parent
28637
- * @typedef {import('../types.js').Join} Join
28638
- * @typedef {import('../types.js').Context} Context
28639
- * @typedef {import('../types.js').TrackFields} TrackFields
28640
- */
28641
-
28642
-
28643
-
28644
- /**
28645
- * @param {Parent} parent
28646
- * @param {Context} context
28647
- * @param {TrackFields} safeOptions
28648
- * @returns {string}
28649
- */
28650
- function container_flow_containerFlow(parent, context, safeOptions) {
28651
- const indexStack = context.indexStack
28652
- const children = parent.children || []
28653
- const tracker = lib_util_track_track(safeOptions)
28654
- /** @type {Array<string>} */
28655
- const results = []
28656
- let index = -1
28657
-
28658
- indexStack.push(-1)
28659
-
28660
- while (++index < children.length) {
28661
- const child = children[index]
28662
-
28663
- indexStack[indexStack.length - 1] = index
28664
-
28665
- results.push(
28666
- tracker.move(
28667
- context.handle(child, parent, context, {
28668
- before: '\n',
28669
- after: '\n',
28670
- ...tracker.current()
28671
- })
28672
- )
28673
- )
28674
-
28675
- if (child.type !== 'list') {
28676
- context.bulletLastUsed = undefined
28677
- }
28678
-
28679
- if (index < children.length - 1) {
28680
- results.push(tracker.move(between(child, children[index + 1])))
28681
- }
28682
- }
28683
-
28684
- indexStack.pop()
28685
-
28686
- return results.join('')
28687
-
28688
- /**
28689
- * @param {Node} left
28690
- * @param {Node} right
28691
- * @returns {string}
28692
- */
28693
- function between(left, right) {
28694
- let index = context.join.length
28695
-
28696
- while (index--) {
28697
- const result = context.join[index](left, right, parent, context)
28698
-
28699
- if (result === true || result === 1) {
28700
- break
28701
- }
28702
-
28703
- if (typeof result === 'number') {
28704
- return '\n'.repeat(1 + result)
28705
- }
28706
-
28707
- if (result === false) {
28708
- return '\n\n<!---->\n\n'
28709
- }
28710
- }
28711
-
28712
- return '\n\n'
28713
- }
28714
- }
28715
-
28716
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-task-list-item/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js
28717
- /**
28718
- * @callback Map
28719
- * @param {string} value
28720
- * @param {number} line
28721
- * @param {boolean} blank
28722
- * @returns {string}
28723
- */
28724
-
28725
- const indent_lines_eol = /\r?\n|\r/g
28726
-
28727
- /**
28728
- * @param {string} value
28729
- * @param {Map} map
28730
- * @returns {string}
28731
- */
28732
- function indent_lines_indentLines(value, map) {
28733
- /** @type {Array<string>} */
28734
- const result = []
28735
- let start = 0
28736
- let line = 0
28737
- /** @type {RegExpExecArray|null} */
28738
- let match
28739
-
28740
- while ((match = indent_lines_eol.exec(value))) {
28741
- one(value.slice(start, match.index))
28742
- result.push(match[0])
28743
- start = match.index + match[0].length
28744
- line++
28745
- }
28746
-
28747
- one(value.slice(start))
28748
-
28749
- return result.join('')
28750
-
28751
- /**
28752
- * @param {string} value
28753
- */
28754
- function one(value) {
28755
- result.push(map(value, line, !value))
28756
- }
28757
- }
28758
-
28759
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-task-list-item/node_modules/mdast-util-to-markdown/lib/handle/list-item.js
28299
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/handle/list-item.js
28760
28300
  /**
28761
28301
  * @typedef {import('mdast').ListItem} ListItem
28762
28302
  * @typedef {import('mdast').List} List
@@ -28801,12 +28341,12 @@ function list_item_listItem(node, parent, context, safeOptions) {
28801
28341
  size = Math.ceil(size / 4) * 4
28802
28342
  }
28803
28343
 
28804
- const tracker = lib_util_track_track(safeOptions)
28344
+ const tracker = track(safeOptions)
28805
28345
  tracker.move(bullet + ' '.repeat(size - bullet.length))
28806
28346
  tracker.shift(size)
28807
28347
  const exit = context.enter('listItem')
28808
- const value = indent_lines_indentLines(
28809
- container_flow_containerFlow(node, context, tracker.current()),
28348
+ const value = indentLines(
28349
+ containerFlow(node, context, tracker.current()),
28810
28350
  map
28811
28351
  )
28812
28352
  exit()
@@ -28915,7 +28455,7 @@ function listItemWithTaskListItem(node, parent, context, safeOptions) {
28915
28455
  const checkable =
28916
28456
  typeof node.checked === 'boolean' && head && head.type === 'paragraph'
28917
28457
  const checkbox = '[' + (node.checked ? 'x' : ' ') + '] '
28918
- const tracker = lib_util_track_track(safeOptions)
28458
+ const tracker = track(safeOptions)
28919
28459
 
28920
28460
  if (checkable) {
28921
28461
  tracker.move(checkbox)
@@ -32273,7 +31813,7 @@ function arduino(Prism) {
32273
31813
  ;// CONCATENATED MODULE: ../node_modules/refractor/lang/bash.js
32274
31814
  // @ts-nocheck
32275
31815
  bash.displayName = 'bash'
32276
- bash.aliases = ['shell']
31816
+ bash.aliases = ['sh', 'shell']
32277
31817
 
32278
31818
  /** @type {import('../core.js').Syntax} */
32279
31819
  function bash(Prism) {
@@ -32381,7 +31921,7 @@ function bash(Prism) {
32381
31921
  // Highlight variable names as variables in the left-hand part
32382
31922
  // of assignments (“=” and “+=”).
32383
31923
  'assign-left': {
32384
- pattern: /(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,
31924
+ pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,
32385
31925
  inside: {
32386
31926
  environment: {
32387
31927
  pattern: RegExp('(^|[\\s;|&]|[<>]\\()' + envVars),
@@ -32392,6 +31932,12 @@ function bash(Prism) {
32392
31932
  alias: 'variable',
32393
31933
  lookbehind: true
32394
31934
  },
31935
+ // Highlight parameter names as variables
31936
+ parameter: {
31937
+ pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,
31938
+ alias: 'variable',
31939
+ lookbehind: true
31940
+ },
32395
31941
  string: [
32396
31942
  // Support for Here-documents https://en.wikipedia.org/wiki/Here_document
32397
31943
  {
@@ -32439,7 +31985,7 @@ function bash(Prism) {
32439
31985
  variable: insideString.variable,
32440
31986
  function: {
32441
31987
  pattern:
32442
- /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
31988
+ /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
32443
31989
  lookbehind: true
32444
31990
  },
32445
31991
  keyword: {
@@ -32482,11 +32028,13 @@ function bash(Prism) {
32482
32028
  }
32483
32029
  commandAfterHeredoc.inside = Prism.languages.bash
32484
32030
  /* Patterns in command substitution. */
32031
+
32485
32032
  var toBeCopied = [
32486
32033
  'comment',
32487
32034
  'function-name',
32488
32035
  'for-or-select',
32489
32036
  'assign-left',
32037
+ 'parameter',
32490
32038
  'string',
32491
32039
  'environment',
32492
32040
  'function',
@@ -32499,9 +32047,12 @@ function bash(Prism) {
32499
32047
  'number'
32500
32048
  ]
32501
32049
  var inside = insideString.variable[1].inside
32050
+
32502
32051
  for (var i = 0; i < toBeCopied.length; i++) {
32503
32052
  inside[toBeCopied[i]] = Prism.languages.bash[toBeCopied[i]]
32504
32053
  }
32054
+
32055
+ Prism.languages.sh = Prism.languages.bash
32505
32056
  Prism.languages.shell = Prism.languages.bash
32506
32057
  })(Prism)
32507
32058
  }
@@ -32537,6 +32088,7 @@ function csharp(Prism) {
32537
32088
  * @param {string} [flags]
32538
32089
  * @returns {RegExp}
32539
32090
  */
32091
+
32540
32092
  function re(pattern, replacements, flags) {
32541
32093
  return RegExp(replace(pattern, replacements), flags || '')
32542
32094
  }
@@ -32547,14 +32099,17 @@ function csharp(Prism) {
32547
32099
  * @param {number} depthLog2
32548
32100
  * @returns {string}
32549
32101
  */
32102
+
32550
32103
  function nested(pattern, depthLog2) {
32551
32104
  for (var i = 0; i < depthLog2; i++) {
32552
32105
  pattern = pattern.replace(/<<self>>/g, function () {
32553
32106
  return '(?:' + pattern + ')'
32554
32107
  })
32555
32108
  }
32109
+
32556
32110
  return pattern.replace(/<<self>>/g, '[^\\s\\S]')
32557
32111
  } // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/
32112
+
32558
32113
  var keywordKinds = {
32559
32114
  // keywords which represent a return or variable type
32560
32115
  type: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void',
@@ -32568,9 +32123,11 @@ function csharp(Prism) {
32568
32123
  other:
32569
32124
  'abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield'
32570
32125
  } // keywords
32126
+
32571
32127
  function keywordsToPattern(words) {
32572
32128
  return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'
32573
32129
  }
32130
+
32574
32131
  var typeDeclarationKeywords = keywordsToPattern(
32575
32132
  keywordKinds.typeDeclaration
32576
32133
  )
@@ -32599,7 +32156,9 @@ function csharp(Prism) {
32599
32156
  ' ' +
32600
32157
  keywordKinds.other
32601
32158
  ) // types
32159
+
32602
32160
  var generic = nested(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source, 2) // the idea behind the other forbidden characters is to prevent false positives. Same for tupleElement.
32161
+
32603
32162
  var nestedRound = nested(/\((?:[^()]|<<self>>)*\)/.source, 2)
32604
32163
  var name = /@?\b[A-Za-z_]\w*\b/.source
32605
32164
  var genericName = replace(/<<0>>(?:\s*<<1>>)?/.source, [name, generic])
@@ -32627,7 +32186,9 @@ function csharp(Prism) {
32627
32186
  } // strings & characters
32628
32187
  // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#character-literals
32629
32188
  // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#string-literals
32189
+
32630
32190
  var character = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source // simplified pattern
32191
+
32631
32192
  var regularString = /"(?:\\.|[^\\"\r\n])*"/.source
32632
32193
  var verbatimString = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source
32633
32194
  Prism.languages.csharp = Prism.languages.extend('clike', {
@@ -32777,6 +32338,7 @@ function csharp(Prism) {
32777
32338
  inside: typeInside,
32778
32339
  alias: 'class-name'
32779
32340
  },
32341
+
32780
32342
  /*'explicit-implementation': {
32781
32343
  // int IFoo<Foo>.Bar => 0; void IFoo<Foo<Foo>>.Foo<T>();
32782
32344
  pattern: replace(/\b<<0>>(?=\.<<1>>)/, className, methodOrPropertyDeclaration),
@@ -32847,6 +32409,7 @@ alias: 'class-name'
32847
32409
  }
32848
32410
  }
32849
32411
  }) // attributes
32412
+
32850
32413
  var regularStringOrCharacter = regularString + '|' + character
32851
32414
  var regularStringCharacterOrComment = replace(
32852
32415
  /\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,
@@ -32858,6 +32421,7 @@ alias: 'class-name'
32858
32421
  ]),
32859
32422
  2
32860
32423
  ) // https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/attributes/#attribute-targets
32424
+
32861
32425
  var attrTarget =
32862
32426
  /\b(?:assembly|event|field|method|module|param|property|return|type)\b/
32863
32427
  .source
@@ -32895,7 +32459,9 @@ alias: 'class-name'
32895
32459
  }
32896
32460
  }
32897
32461
  }) // string interpolation
32462
+
32898
32463
  var formatString = /:[^}\r\n]+/.source // multi line
32464
+
32899
32465
  var mInterpolationRound = nested(
32900
32466
  replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
32901
32467
  regularStringCharacterOrComment
@@ -32906,6 +32472,7 @@ alias: 'class-name'
32906
32472
  mInterpolationRound,
32907
32473
  formatString
32908
32474
  ]) // single line
32475
+
32909
32476
  var sInterpolationRound = nested(
32910
32477
  replace(
32911
32478
  /[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/
@@ -32918,6 +32485,7 @@ alias: 'class-name'
32918
32485
  sInterpolationRound,
32919
32486
  formatString
32920
32487
  ])
32488
+
32921
32489
  function createInterpolationInside(interpolation, interpolationRound) {
32922
32490
  return {
32923
32491
  interpolation: {
@@ -32945,6 +32513,7 @@ alias: 'class-name'
32945
32513
  string: /[\s\S]+/
32946
32514
  }
32947
32515
  }
32516
+
32948
32517
  Prism.languages.insertBefore('csharp', 'string', {
32949
32518
  'interpolation-string': [
32950
32519
  {
@@ -33036,7 +32605,10 @@ function markup(Prism) {
33036
32605
  pattern: /^=/,
33037
32606
  alias: 'attr-equals'
33038
32607
  },
33039
- /"|'/
32608
+ {
32609
+ pattern: /^(\s*)["']|["']$/,
32610
+ lookbehind: true
32611
+ }
33040
32612
  ]
33041
32613
  }
33042
32614
  },
@@ -33061,6 +32633,7 @@ function markup(Prism) {
33061
32633
  Prism.languages.markup['entity']
33062
32634
  Prism.languages.markup['doctype'].inside['internal-subset'].inside =
33063
32635
  Prism.languages.markup // Plugin to make entity title show the real entity, idea by Roman Komarov
32636
+
33064
32637
  Prism.hooks.add('wrap', function (env) {
33065
32638
  if (env.type === 'entity') {
33066
32639
  env.attributes['title'] = env.content.value.replace(/&amp;/, '&')
@@ -33183,7 +32756,14 @@ function css(Prism) {
33183
32756
  Prism.languages.css = {
33184
32757
  comment: /\/\*[\s\S]*?\*\//,
33185
32758
  atrule: {
33186
- pattern: /@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,
32759
+ pattern: RegExp(
32760
+ '@[\\w-](?:' +
32761
+ /[^;{\s"']|\s+(?!\s)/.source +
32762
+ '|' +
32763
+ string.source +
32764
+ ')*?' +
32765
+ /(?:;|(?=\s*\{))/.source
32766
+ ),
33187
32767
  inside: {
33188
32768
  rule: /^@[\w-]+/,
33189
32769
  'selector-function-argument': {
@@ -33244,6 +32824,7 @@ function css(Prism) {
33244
32824
  }
33245
32825
  Prism.languages.css['atrule'].inside.rest = Prism.languages.css
33246
32826
  var markup = Prism.languages.markup
32827
+
33247
32828
  if (markup) {
33248
32829
  markup.tag.addInlined('style', 'css')
33249
32830
  markup.tag.addAttribute('style', 'css')
@@ -33272,6 +32853,7 @@ function diff(Prism) {
33272
32853
  *
33273
32854
  * @type {Object<string, string>}
33274
32855
  */
32856
+
33275
32857
  var PREFIXES = {
33276
32858
  'deleted-sign': '-',
33277
32859
  'deleted-arrow': '<',
@@ -33280,16 +32862,20 @@ function diff(Prism) {
33280
32862
  unchanged: ' ',
33281
32863
  diff: '!'
33282
32864
  } // add a token for each prefix
32865
+
33283
32866
  Object.keys(PREFIXES).forEach(function (name) {
33284
32867
  var prefix = PREFIXES[name]
33285
32868
  var alias = []
32869
+
33286
32870
  if (!/^\w+$/.test(name)) {
33287
32871
  // "deleted-sign" -> "deleted"
33288
32872
  alias.push(/\w+/.exec(name)[0])
33289
32873
  }
32874
+
33290
32875
  if (name === 'diff') {
33291
32876
  alias.push('bold')
33292
32877
  }
32878
+
33293
32879
  Prism.languages.diff[name] = {
33294
32880
  pattern: RegExp(
33295
32881
  '^(?:[' + prefix + '].*(?:\r\n?|\n|(?![\\s\\S])))+',
@@ -33308,6 +32894,7 @@ function diff(Prism) {
33308
32894
  }
33309
32895
  }
33310
32896
  }) // make prefixes available to Diff plugin
32897
+
33311
32898
  Object.defineProperty(Prism.languages.diff, 'PREFIXES', {
33312
32899
  value: PREFIXES
33313
32900
  })
@@ -33414,7 +33001,9 @@ function java(Prism) {
33414
33001
  ;(function (Prism) {
33415
33002
  var keywords =
33416
33003
  /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/ // full package (optional) + parent classes (optional)
33004
+
33417
33005
  var classNamePrefix = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source // based on the java naming conventions
33006
+
33418
33007
  var className = {
33419
33008
  pattern: RegExp(
33420
33009
  /(^|[^\w.])/.source +
@@ -33479,7 +33068,8 @@ function java(Prism) {
33479
33068
  pattern:
33480
33069
  /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,
33481
33070
  lookbehind: true
33482
- }
33071
+ },
33072
+ constant: /\b[A-Z][A-Z_\d]+\b/
33483
33073
  })
33484
33074
  Prism.languages.insertBefore('java', 'string', {
33485
33075
  'triple-quoted-string': {
@@ -33583,6 +33173,7 @@ function regex(Prism) {
33583
33173
  }
33584
33174
  var rangeChar = '(?:[^\\\\-]|' + escape.source + ')'
33585
33175
  var range = RegExp(rangeChar + '-' + rangeChar) // the name of a capturing group
33176
+
33586
33177
  var groupName = {
33587
33178
  pattern: /(<|')[^<>']+(?=[>']$)/,
33588
33179
  lookbehind: true,
@@ -33838,15 +33429,18 @@ function javascript(Prism) {
33838
33429
  alias: 'property'
33839
33430
  }
33840
33431
  })
33432
+
33841
33433
  if (Prism.languages.markup) {
33842
33434
  Prism.languages.markup.tag.addInlined('script', 'javascript') // add attribute support for all DOM events.
33843
33435
  // https://developer.mozilla.org/en-US/docs/Web/Events#Standard_events
33436
+
33844
33437
  Prism.languages.markup.tag.addAttribute(
33845
33438
  /on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/
33846
33439
  .source,
33847
33440
  'javascript'
33848
33441
  )
33849
33442
  }
33443
+
33850
33444
  Prism.languages.js = Prism.languages.javascript
33851
33445
  }
33852
33446
 
@@ -34126,8 +33720,10 @@ function yaml(Prism) {
34126
33720
  // https://yaml.org/spec/1.2/spec.html#c-ns-anchor-property
34127
33721
  // https://yaml.org/spec/1.2/spec.html#c-ns-alias-node
34128
33722
  var anchorOrAlias = /[*&][^\s[\]{},]+/ // https://yaml.org/spec/1.2/spec.html#c-ns-tag-property
33723
+
34129
33724
  var tag =
34130
33725
  /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/ // https://yaml.org/spec/1.2/spec.html#c-ns-properties(n,c)
33726
+
34131
33727
  var properties =
34132
33728
  '(?:' +
34133
33729
  tag.source +
@@ -34140,6 +33736,7 @@ function yaml(Prism) {
34140
33736
  ')?)' // https://yaml.org/spec/1.2/spec.html#ns-plain(n,c)
34141
33737
  // This is a simplified version that doesn't support "#" and multiline keys
34142
33738
  // All these long scarry character classes are simplified versions of YAML's characters
33739
+
34143
33740
  var plainKey =
34144
33741
  /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(
34145
33742
  /<PLAIN>/g,
@@ -34155,8 +33752,10 @@ function yaml(Prism) {
34155
33752
  * @param {string} [flags]
34156
33753
  * @returns {RegExp}
34157
33754
  */
33755
+
34158
33756
  function createValuePattern(value, flags) {
34159
33757
  flags = (flags || '').replace(/m/g, '') + 'm' // add m flag
33758
+
34160
33759
  var pattern =
34161
33760
  /([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source
34162
33761
  .replace(/<<prop>>/g, function () {
@@ -34167,6 +33766,7 @@ function yaml(Prism) {
34167
33766
  })
34168
33767
  return RegExp(pattern, flags)
34169
33768
  }
33769
+
34170
33770
  Prism.languages.yaml = {
34171
33771
  scalar: {
34172
33772
  pattern: RegExp(
@@ -34261,12 +33861,14 @@ function markdown(Prism) {
34261
33861
  * @param {string} pattern
34262
33862
  * @returns {RegExp}
34263
33863
  */
33864
+
34264
33865
  function createInline(pattern) {
34265
33866
  pattern = pattern.replace(/<inner>/g, function () {
34266
33867
  return inner
34267
33868
  })
34268
33869
  return RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + '(?:' + pattern + ')')
34269
33870
  }
33871
+
34270
33872
  var tableCell = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/
34271
33873
  .source
34272
33874
  var tableRow =
@@ -34533,12 +34135,15 @@ function markdown(Prism) {
34533
34135
  if (env.language !== 'markdown' && env.language !== 'md') {
34534
34136
  return
34535
34137
  }
34138
+
34536
34139
  function walkTokens(tokens) {
34537
34140
  if (!tokens || typeof tokens === 'string') {
34538
34141
  return
34539
34142
  }
34143
+
34540
34144
  for (var i = 0, l = tokens.length; i < l; i++) {
34541
34145
  var token = tokens[i]
34146
+
34542
34147
  if (token.type !== 'code') {
34543
34148
  walkTokens(token.content)
34544
34149
  continue
@@ -34556,8 +34161,10 @@ function markdown(Prism) {
34556
34161
  * <span class="punctuation">```</span>
34557
34162
  * ];
34558
34163
  */
34164
+
34559
34165
  var codeLang = token.content[1]
34560
34166
  var codeBlock = token.content[3]
34167
+
34561
34168
  if (
34562
34169
  codeLang &&
34563
34170
  codeBlock &&
@@ -34570,8 +34177,10 @@ function markdown(Prism) {
34570
34177
  var lang = codeLang.content
34571
34178
  .replace(/\b#/g, 'sharp')
34572
34179
  .replace(/\b\+\+/g, 'pp') // only use the first word
34180
+
34573
34181
  lang = (/[a-z][\w-]*/i.exec(lang) || [''])[0].toLowerCase()
34574
34182
  var alias = 'language-' + lang // add alias
34183
+
34575
34184
  if (!codeBlock.alias) {
34576
34185
  codeBlock.alias = [alias]
34577
34186
  } else if (typeof codeBlock.alias === 'string') {
@@ -34582,22 +34191,28 @@ function markdown(Prism) {
34582
34191
  }
34583
34192
  }
34584
34193
  }
34194
+
34585
34195
  walkTokens(env.tokens)
34586
34196
  })
34587
34197
  Prism.hooks.add('wrap', function (env) {
34588
34198
  if (env.type !== 'code-block') {
34589
34199
  return
34590
34200
  }
34201
+
34591
34202
  var codeLang = ''
34203
+
34592
34204
  for (var i = 0, l = env.classes.length; i < l; i++) {
34593
34205
  var cls = env.classes[i]
34594
34206
  var match = /language-(.+)/.exec(cls)
34207
+
34595
34208
  if (match) {
34596
34209
  codeLang = match[1]
34597
34210
  break
34598
34211
  }
34599
34212
  }
34213
+
34600
34214
  var grammar = Prism.languages[codeLang]
34215
+
34601
34216
  if (!grammar) {
34602
34217
  if (codeLang && codeLang !== 'none' && Prism.plugins.autoloader) {
34603
34218
  var id =
@@ -34608,6 +34223,7 @@ function markdown(Prism) {
34608
34223
  env.attributes['id'] = id
34609
34224
  Prism.plugins.autoloader.loadLanguages(codeLang, function () {
34610
34225
  var ele = document.getElementById(id)
34226
+
34611
34227
  if (ele) {
34612
34228
  ele.innerHTML = Prism.highlight(
34613
34229
  ele.textContent,
@@ -34633,12 +34249,14 @@ function markdown(Prism) {
34633
34249
  *
34634
34250
  * @see {@link https://github.com/lodash/lodash/blob/2da024c3b4f9947a48517639de7560457cd4ec6c/unescape.js#L2}
34635
34251
  */
34252
+
34636
34253
  var KNOWN_ENTITY_NAMES = {
34637
34254
  amp: '&',
34638
34255
  lt: '<',
34639
34256
  gt: '>',
34640
34257
  quot: '"'
34641
34258
  } // IE 11 doesn't support `String.fromCodePoint`
34259
+
34642
34260
  var fromCodePoint = String.fromCodePoint || String.fromCharCode
34643
34261
  /**
34644
34262
  * Returns the text content of a given HTML source code string.
@@ -34646,29 +34264,37 @@ function markdown(Prism) {
34646
34264
  * @param {string} html
34647
34265
  * @returns {string}
34648
34266
  */
34267
+
34649
34268
  function textContent(html) {
34650
34269
  // remove all tags
34651
34270
  var text = html.replace(tagPattern, '') // decode known entities
34271
+
34652
34272
  text = text.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function (m, code) {
34653
34273
  code = code.toLowerCase()
34274
+
34654
34275
  if (code[0] === '#') {
34655
34276
  var value
34277
+
34656
34278
  if (code[1] === 'x') {
34657
34279
  value = parseInt(code.slice(2), 16)
34658
34280
  } else {
34659
34281
  value = Number(code.slice(1))
34660
34282
  }
34283
+
34661
34284
  return fromCodePoint(value)
34662
34285
  } else {
34663
34286
  var known = KNOWN_ENTITY_NAMES[code]
34287
+
34664
34288
  if (known) {
34665
34289
  return known
34666
34290
  } // unable to decode
34291
+
34667
34292
  return m
34668
34293
  }
34669
34294
  })
34670
34295
  return text
34671
34296
  }
34297
+
34672
34298
  Prism.languages.md = Prism.languages.markdown
34673
34299
  })(Prism)
34674
34300
  }
@@ -34859,6 +34485,7 @@ function markupTemplating(Prism) {
34859
34485
  function getPlaceholder(language, index) {
34860
34486
  return '___' + language.toUpperCase() + index + '___'
34861
34487
  }
34488
+
34862
34489
  Object.defineProperties((Prism.languages['markup-templating'] = {}), {
34863
34490
  buildPlaceholders: {
34864
34491
  /**
@@ -34876,22 +34503,27 @@ function markupTemplating(Prism) {
34876
34503
  if (env.language !== language) {
34877
34504
  return
34878
34505
  }
34506
+
34879
34507
  var tokenStack = (env.tokenStack = [])
34880
34508
  env.code = env.code.replace(placeholderPattern, function (match) {
34881
34509
  if (typeof replaceFilter === 'function' && !replaceFilter(match)) {
34882
34510
  return match
34883
34511
  }
34512
+
34884
34513
  var i = tokenStack.length
34885
34514
  var placeholder // Check for existing strings
34515
+
34886
34516
  while (
34887
34517
  env.code.indexOf((placeholder = getPlaceholder(language, i))) !==
34888
34518
  -1
34889
34519
  ) {
34890
34520
  ++i
34891
34521
  } // Create a sparse array
34522
+
34892
34523
  tokenStack[i] = match
34893
34524
  return placeholder
34894
34525
  }) // Switch the grammar to markup
34526
+
34895
34527
  env.grammar = Prism.languages.markup
34896
34528
  }
34897
34529
  },
@@ -34906,16 +34538,20 @@ function markupTemplating(Prism) {
34906
34538
  if (env.language !== language || !env.tokenStack) {
34907
34539
  return
34908
34540
  } // Switch the grammar back
34541
+
34909
34542
  env.grammar = Prism.languages[language]
34910
34543
  var j = 0
34911
34544
  var keys = Object.keys(env.tokenStack)
34545
+
34912
34546
  function walkTokens(tokens) {
34913
34547
  for (var i = 0; i < tokens.length; i++) {
34914
34548
  // all placeholders are replaced already
34915
34549
  if (j >= keys.length) {
34916
34550
  break
34917
34551
  }
34552
+
34918
34553
  var token = tokens[i]
34554
+
34919
34555
  if (
34920
34556
  typeof token === 'string' ||
34921
34557
  (token.content && typeof token.content === 'string')
@@ -34925,6 +34561,7 @@ function markupTemplating(Prism) {
34925
34561
  var s = typeof token === 'string' ? token : token.content
34926
34562
  var placeholder = getPlaceholder(language, k)
34927
34563
  var index = s.indexOf(placeholder)
34564
+
34928
34565
  if (index > -1) {
34929
34566
  ++j
34930
34567
  var before = s.substring(0, index)
@@ -34936,13 +34573,17 @@ function markupTemplating(Prism) {
34936
34573
  )
34937
34574
  var after = s.substring(index + placeholder.length)
34938
34575
  var replacement = []
34576
+
34939
34577
  if (before) {
34940
34578
  replacement.push.apply(replacement, walkTokens([before]))
34941
34579
  }
34580
+
34942
34581
  replacement.push(middle)
34582
+
34943
34583
  if (after) {
34944
34584
  replacement.push.apply(replacement, walkTokens([after]))
34945
34585
  }
34586
+
34946
34587
  if (typeof token === 'string') {
34947
34588
  tokens.splice.apply(tokens, [i, 1].concat(replacement))
34948
34589
  } else {
@@ -34956,8 +34597,10 @@ function markupTemplating(Prism) {
34956
34597
  walkTokens(token.content)
34957
34598
  }
34958
34599
  }
34600
+
34959
34601
  return tokens
34960
34602
  }
34603
+
34961
34604
  walkTokens(env.tokens)
34962
34605
  }
34963
34606
  }
@@ -35310,6 +34953,7 @@ function php(Prism) {
35310
34953
  if (!/<\?/.test(env.code)) {
35311
34954
  return
35312
34955
  }
34956
+
35313
34957
  var phpPattern =
35314
34958
  /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g
35315
34959
  Prism.languages['markup-templating'].buildPlaceholders(
@@ -35649,12 +35293,14 @@ rust.aliases = []
35649
35293
  function rust(Prism) {
35650
35294
  ;(function (Prism) {
35651
35295
  var multilineComment = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source
35296
+
35652
35297
  for (var i = 0; i < 2; i++) {
35653
35298
  // support 4 levels of nested comments
35654
35299
  multilineComment = multilineComment.replace(/<self>/g, function () {
35655
35300
  return multilineComment
35656
35301
  })
35657
35302
  }
35303
+
35658
35304
  multilineComment = multilineComment.replace(/<self>/g, function () {
35659
35305
  return /[^\s\S]/.source
35660
35306
  })
@@ -35843,6 +35489,7 @@ function sass(Prism) {
35843
35489
  delete Prism.languages.sass.property
35844
35490
  delete Prism.languages.sass.important // Now that whole lines for other patterns are consumed,
35845
35491
  // what's left should be selectors
35492
+
35846
35493
  Prism.languages.insertBefore('sass', 'punctuation', {
35847
35494
  selector: {
35848
35495
  pattern:
@@ -36159,13 +35806,16 @@ function typescript(Prism) {
36159
35806
  builtin:
36160
35807
  /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/
36161
35808
  }) // The keywords TypeScript adds to JavaScript
35809
+
36162
35810
  Prism.languages.typescript.keyword.push(
36163
35811
  /\b(?:abstract|declare|is|keyof|readonly|require)\b/, // keywords that have to be followed by an identifier
36164
35812
  /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, // This is for `import type *, {}`
36165
35813
  /\btype\b(?=\s*(?:[\{*]|$))/
36166
35814
  ) // doesn't work with TS because TS is too complex
35815
+
36167
35816
  delete Prism.languages.typescript['parameter']
36168
35817
  delete Prism.languages.typescript['literal-property'] // a version of typescript specifically for highlighting types
35818
+
36169
35819
  var typeInside = Prism.languages.extend('typescript', {})
36170
35820
  delete typeInside['class-name']
36171
35821
  Prism.languages.typescript['class-name'].inside = typeInside
@@ -36262,7 +35912,7 @@ function vbnet(Prism) {
36262
35912
  })
36263
35913
  }
36264
35914
 
36265
- ;// CONCATENATED MODULE: ../node_modules/refractor/node_modules/character-entities-legacy/index.js
35915
+ ;// CONCATENATED MODULE: ../node_modules/character-entities-legacy/index.js
36266
35916
  /**
36267
35917
  * List of legacy HTML named character references that don’t need a trailing semicolon.
36268
35918
  *
@@ -36377,7 +36027,7 @@ const characterEntitiesLegacy = [
36377
36027
  'yuml'
36378
36028
  ]
36379
36029
 
36380
- ;// CONCATENATED MODULE: ../node_modules/refractor/node_modules/character-reference-invalid/index.js
36030
+ ;// CONCATENATED MODULE: ../node_modules/character-reference-invalid/index.js
36381
36031
  /**
36382
36032
  * Map of invalid numeric character references to their replacements, according to HTML.
36383
36033
  *
@@ -36414,7 +36064,7 @@ const characterReferenceInvalid = {
36414
36064
  159: 'Ÿ'
36415
36065
  }
36416
36066
 
36417
- ;// CONCATENATED MODULE: ../node_modules/refractor/node_modules/is-decimal/index.js
36067
+ ;// CONCATENATED MODULE: ../node_modules/is-decimal/index.js
36418
36068
  /**
36419
36069
  * Check if the given character code, or the character code at the first
36420
36070
  * character, is decimal.
@@ -36429,7 +36079,7 @@ function isDecimal(character) {
36429
36079
  return code >= 48 && code <= 57 /* 0-9 */
36430
36080
  }
36431
36081
 
36432
- ;// CONCATENATED MODULE: ../node_modules/refractor/node_modules/is-hexadecimal/index.js
36082
+ ;// CONCATENATED MODULE: ../node_modules/is-hexadecimal/index.js
36433
36083
  /**
36434
36084
  * Check if the given character code, or the character code at the first
36435
36085
  * character, is hexadecimal.
@@ -36448,7 +36098,7 @@ function isHexadecimal(character) {
36448
36098
  )
36449
36099
  }
36450
36100
 
36451
- ;// CONCATENATED MODULE: ../node_modules/refractor/node_modules/is-alphabetical/index.js
36101
+ ;// CONCATENATED MODULE: ../node_modules/is-alphabetical/index.js
36452
36102
  /**
36453
36103
  * Check if the given character code, or the character code at the first
36454
36104
  * character, is alphabetical.
@@ -36466,7 +36116,7 @@ function isAlphabetical(character) {
36466
36116
  )
36467
36117
  }
36468
36118
 
36469
- ;// CONCATENATED MODULE: ../node_modules/refractor/node_modules/is-alphanumerical/index.js
36119
+ ;// CONCATENATED MODULE: ../node_modules/is-alphanumerical/index.js
36470
36120
 
36471
36121
 
36472
36122
 
@@ -36481,7 +36131,7 @@ function isAlphanumerical(character) {
36481
36131
  return isAlphabetical(character) || isDecimal(character)
36482
36132
  }
36483
36133
 
36484
- ;// CONCATENATED MODULE: ../node_modules/refractor/node_modules/parse-entities/lib/index.js
36134
+ ;// CONCATENATED MODULE: ../node_modules/parse-entities/lib/index.js
36485
36135
  /**
36486
36136
  * @typedef {import('unist').Point} Point
36487
36137
  * @typedef {import('unist').Position} Position
@@ -37728,7 +37378,7 @@ const Prism = _
37728
37378
  *
37729
37379
  * @typedef {import('prismjs').Languages} Languages
37730
37380
  * @typedef {import('prismjs').Grammar} Grammar Whatever this is, Prism handles it.
37731
- * @typedef {((prism: unknown) => void) & {displayName: string, aliases?: string[]}} Syntax A refractor syntax function
37381
+ * @typedef {((prism: unknown) => void) & {displayName: string, aliases?: Array<string>}} Syntax A refractor syntax function
37732
37382
  *
37733
37383
  * @typedef Refractor Virtual syntax highlighting
37734
37384
  * @property {highlight} highlight
@@ -38091,6 +37741,7 @@ function abap(Prism) {
38091
37741
  lookbehind: true,
38092
37742
  alias: 'string'
38093
37743
  },
37744
+
38094
37745
  /* End Of Line comments should not interfere with strings when the
38095
37746
  quote character occurs within them. We assume a string being highlighted
38096
37747
  inside an EOL comment is more acceptable than the opposite.
@@ -38105,8 +37756,10 @@ inside an EOL comment is more acceptable than the opposite.
38105
37756
  /(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,
38106
37757
  lookbehind: true
38107
37758
  },
37759
+
38108
37760
  /* Numbers can be only integers. Decimal or Hex appear only as strings */
38109
37761
  number: /\b\d+\b/,
37762
+
38110
37763
  /* Operators must always be surrounded by whitespace, they cannot be put
38111
37764
  adjacent to operands.
38112
37765
  */
@@ -38117,6 +37770,7 @@ adjacent to operands.
38117
37770
  'string-operator': {
38118
37771
  pattern: /(\s)&&?(?=\s)/,
38119
37772
  lookbehind: true,
37773
+
38120
37774
  /* The official editor highlights */
38121
37775
  alias: 'keyword'
38122
37776
  },
@@ -38217,8 +37871,10 @@ function actionscript(Prism) {
38217
37871
  operator: /\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/
38218
37872
  })
38219
37873
  Prism.languages.actionscript['class-name'].alias = 'function' // doesn't work with AS because AS is too complex
37874
+
38220
37875
  delete Prism.languages.actionscript['parameter']
38221
37876
  delete Prism.languages.actionscript['literal-property']
37877
+
38222
37878
  if (Prism.languages.markup) {
38223
37879
  Prism.languages.insertBefore('actionscript', 'string', {
38224
37880
  xml: {
@@ -38488,6 +38144,7 @@ function apex(Prism) {
38488
38144
  }
38489
38145
  )
38490
38146
  /** @param {string} pattern */
38147
+
38491
38148
  function insertClassName(pattern) {
38492
38149
  return RegExp(
38493
38150
  pattern.replace(/<CLASS-NAME>/g, function () {
@@ -38496,6 +38153,7 @@ function apex(Prism) {
38496
38153
  'i'
38497
38154
  )
38498
38155
  }
38156
+
38499
38157
  var classNameInside = {
38500
38158
  keyword: keywords,
38501
38159
  punctuation: /[()\[\]{};,:.<>]/
@@ -38786,6 +38444,7 @@ function arturo(Prism) {
38786
38444
  }
38787
38445
  }
38788
38446
  }
38447
+
38789
38448
  Prism.languages.arturo = {
38790
38449
  comment: {
38791
38450
  pattern: /;.*/,
@@ -38892,7 +38551,7 @@ function asciidoc(Prism) {
38892
38551
  }
38893
38552
  var asciidoc = (Prism.languages.asciidoc = {
38894
38553
  'comment-block': {
38895
- pattern: /^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,
38554
+ pattern: /^(\/{4,})$[\s\S]*?^\1/m,
38896
38555
  alias: 'comment'
38897
38556
  },
38898
38557
  table: {
@@ -38910,22 +38569,21 @@ function asciidoc(Prism) {
38910
38569
  }
38911
38570
  },
38912
38571
  'passthrough-block': {
38913
- pattern: /^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,
38572
+ pattern: /^(\+{4,})$[\s\S]*?^\1$/m,
38914
38573
  inside: {
38915
38574
  punctuation: /^\++|\++$/ // See rest below
38916
38575
  }
38917
38576
  },
38918
38577
  // Literal blocks and listing blocks
38919
38578
  'literal-block': {
38920
- pattern: /^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,
38579
+ pattern: /^(-{4,}|\.{4,})$[\s\S]*?^\1$/m,
38921
38580
  inside: {
38922
38581
  punctuation: /^(?:-+|\.+)|(?:-+|\.+)$/ // See rest below
38923
38582
  }
38924
38583
  },
38925
38584
  // Sidebar blocks, quote blocks, example blocks and open blocks
38926
38585
  'other-block': {
38927
- pattern:
38928
- /^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,
38586
+ pattern: /^(--|\*{4,}|_{4,}|={4,})$[\s\S]*?^\1$/m,
38929
38587
  inside: {
38930
38588
  punctuation: /^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/ // See rest below
38931
38589
  }
@@ -39056,14 +38714,18 @@ They are, in order: __emphasis__, **strong**, ++monospace++, +++passthrough+++,
39056
38714
  alias: 'punctuation'
39057
38715
  }
39058
38716
  }) // Allow some nesting. There is no recursion though, so cloning should not be needed.
38717
+
39059
38718
  function copyFromAsciiDoc(keys) {
39060
38719
  keys = keys.split(' ')
39061
38720
  var o = {}
38721
+
39062
38722
  for (var i = 0, l = keys.length; i < l; i++) {
39063
38723
  o[keys[i]] = asciidoc[keys[i]]
39064
38724
  }
38725
+
39065
38726
  return o
39066
38727
  }
38728
+
39067
38729
  attributes.inside['interpreted'].inside.rest = copyFromAsciiDoc(
39068
38730
  'macro inline replacement entity'
39069
38731
  )
@@ -39078,6 +38740,7 @@ They are, in order: __emphasis__, **strong**, ++monospace++, +++passthrough+++,
39078
38740
  asciidoc['title'].inside.rest = copyFromAsciiDoc(
39079
38741
  'macro inline replacement entity'
39080
38742
  ) // Plugin to make entity title show the real entity, idea by Roman Komarov
38743
+
39081
38744
  Prism.hooks.add('wrap', function (env) {
39082
38745
  if (env.type === 'entity') {
39083
38746
  env.attributes['title'] = env.content.value.replace(/&amp;/, '&')
@@ -39123,8 +38786,10 @@ function aspnet(Prism) {
39123
38786
  }
39124
38787
  }
39125
38788
  }) // Regexp copied from prism-markup, with a negative look-ahead added
38789
+
39126
38790
  Prism.languages.aspnet.tag.pattern =
39127
38791
  /<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/ // match directives of attribute value foo="<% Bar %>"
38792
+
39128
38793
  Prism.languages.insertBefore(
39129
38794
  'inside',
39130
38795
  'punctuation',
@@ -39139,6 +38804,7 @@ function aspnet(Prism) {
39139
38804
  alias: ['asp', 'comment']
39140
38805
  }
39141
38806
  }) // script runat="server" contains csharp, not javascript
38807
+
39142
38808
  Prism.languages.insertBefore(
39143
38809
  'aspnet',
39144
38810
  Prism.languages.javascript ? 'script' : 'tag',
@@ -39357,9 +39023,11 @@ function avisynth(Prism) {
39357
39023
  return replacements[+index]
39358
39024
  })
39359
39025
  }
39026
+
39360
39027
  function re(pattern, replacements, flags) {
39361
39028
  return RegExp(replace(pattern, replacements), flags || '')
39362
39029
  }
39030
+
39363
39031
  var types = /bool|clip|float|int|string|val/.source
39364
39032
  var internals = [
39365
39033
  // bools
@@ -39755,6 +39423,35 @@ function bbcode(Prism) {
39755
39423
  Prism.languages.shortcode = Prism.languages.bbcode
39756
39424
  }
39757
39425
 
39426
+ ;// CONCATENATED MODULE: ../node_modules/refractor/lang/bbj.js
39427
+ // @ts-nocheck
39428
+ bbj.displayName = 'bbj'
39429
+ bbj.aliases = []
39430
+
39431
+ /** @type {import('../core.js').Syntax} */
39432
+ function bbj(Prism) {
39433
+ ;(function (Prism) {
39434
+ Prism.languages.bbj = {
39435
+ comment: {
39436
+ pattern: /(^|[^\\:])rem\s+.*/i,
39437
+ lookbehind: true,
39438
+ greedy: true
39439
+ },
39440
+ string: {
39441
+ pattern: /(['"])(?:(?!\1|\\).|\\.)*\1/,
39442
+ greedy: true
39443
+ },
39444
+ number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,
39445
+ keyword:
39446
+ /\b(?:abstract|all|argc|begin|bye|callback|case|chn|class|classend|ctl|day|declare|delete|dim|dom|dread|dsz|else|end|endif|err|exitto|extends|fi|field|for|from|gosub|goto|if|implements|interface|interfaceend|iol|iolist|let|list|load|method|methodend|methodret|on|opts|pfx|print|private|process_events|protected|psz|public|read|read_resource|release|remove_callback|repeat|restore|return|rev|seterr|setesc|sqlchn|sqlunt|ssn|start|static|swend|switch|sys|then|tim|unt|until|use|void|wend|where|while)\b/i,
39447
+ function: /\b\w+(?=\()/,
39448
+ boolean: /\b(?:BBjAPI\.TRUE|BBjAPI\.FALSE)\b/i,
39449
+ operator: /<[=>]?|>=?|[+\-*\/^=&]|\b(?:and|not|or|xor)\b/i,
39450
+ punctuation: /[.,;:()]/
39451
+ }
39452
+ })(Prism)
39453
+ }
39454
+
39758
39455
  ;// CONCATENATED MODULE: ../node_modules/refractor/lang/bicep.js
39759
39456
  // @ts-nocheck
39760
39457
  bicep.displayName = 'bicep'
@@ -39949,6 +39646,79 @@ function bnf(Prism) {
39949
39646
  Prism.languages.rbnf = Prism.languages.bnf
39950
39647
  }
39951
39648
 
39649
+ ;// CONCATENATED MODULE: ../node_modules/refractor/lang/bqn.js
39650
+ // @ts-nocheck
39651
+ bqn.displayName = 'bqn'
39652
+ bqn.aliases = []
39653
+
39654
+ /** @type {import('../core.js').Syntax} */
39655
+ function bqn(Prism) {
39656
+ Prism.languages.bqn = {
39657
+ shebang: {
39658
+ pattern: /^#![ \t]*\/.*/,
39659
+ alias: 'important',
39660
+ greedy: true
39661
+ },
39662
+ comment: {
39663
+ pattern: /#.*/,
39664
+ greedy: true
39665
+ },
39666
+ 'string-literal': {
39667
+ pattern: /"(?:[^"]|"")*"/,
39668
+ greedy: true,
39669
+ alias: 'string'
39670
+ },
39671
+ 'character-literal': {
39672
+ pattern: /'(?:[\s\S]|[\uD800-\uDBFF][\uDC00-\uDFFF])'/,
39673
+ greedy: true,
39674
+ alias: 'char'
39675
+ },
39676
+ function: /•[\w¯.∞π]+[\w¯.∞π]*/,
39677
+ 'dot-notation-on-brackets': {
39678
+ pattern: /\{(?=.*\}\.)|\}\./,
39679
+ alias: 'namespace'
39680
+ },
39681
+ 'special-name': {
39682
+ pattern: /(?:𝕨|𝕩|𝕗|𝕘|𝕤|𝕣|𝕎|𝕏|𝔽|𝔾|𝕊|_𝕣_|_𝕣)/,
39683
+ alias: 'keyword'
39684
+ },
39685
+ 'dot-notation-on-name': {
39686
+ pattern: /[A-Za-z_][\w¯∞π]*\./,
39687
+ alias: 'namespace'
39688
+ },
39689
+ 'word-number-scientific': {
39690
+ pattern: /\d+(?:\.\d+)?[eE]¯?\d+/,
39691
+ alias: 'number'
39692
+ },
39693
+ 'word-name': {
39694
+ pattern: /[A-Za-z_][\w¯∞π]*/,
39695
+ alias: 'symbol'
39696
+ },
39697
+ 'word-number': {
39698
+ pattern:
39699
+ /[¯∞π]?(?:\d*\.?\b\d+(?:e[+¯]?\d+|E[+¯]?\d+)?|¯|∞|π)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+|E[+¯]?\d+)?|¯|∞|π))?/,
39700
+ alias: 'number'
39701
+ },
39702
+ 'null-literal': {
39703
+ pattern: /@/,
39704
+ alias: 'char'
39705
+ },
39706
+ 'primitive-functions': {
39707
+ pattern: /[-+×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍⋈↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!]/,
39708
+ alias: 'operator'
39709
+ },
39710
+ 'primitive-1-operators': {
39711
+ pattern: /[`˜˘¨⁼⌜´˝˙]/,
39712
+ alias: 'operator'
39713
+ },
39714
+ 'primitive-2-operators': {
39715
+ pattern: /[∘⊸⟜○⌾⎉⚇⍟⊘◶⎊]/,
39716
+ alias: 'operator'
39717
+ },
39718
+ punctuation: /[←⇐↩(){}⟨⟩[\]‿·⋄,.;:?]/
39719
+ }
39720
+ }
39721
+
39952
39722
  ;// CONCATENATED MODULE: ../node_modules/refractor/lang/brainfuck.js
39953
39723
  // @ts-nocheck
39954
39724
  brainfuck.displayName = 'brainfuck'
@@ -40313,6 +40083,43 @@ function cil(Prism) {
40313
40083
  }
40314
40084
  }
40315
40085
 
40086
+ ;// CONCATENATED MODULE: ../node_modules/refractor/lang/cilkc.js
40087
+ // @ts-nocheck
40088
+
40089
+ cilkc.displayName = 'cilkc'
40090
+ cilkc.aliases = ['cilk-c']
40091
+
40092
+ /** @type {import('../core.js').Syntax} */
40093
+ function cilkc(Prism) {
40094
+ Prism.register(c)
40095
+ Prism.languages.cilkc = Prism.languages.insertBefore('c', 'function', {
40096
+ 'parallel-keyword': {
40097
+ pattern: /\bcilk_(?:for|reducer|s(?:cope|pawn|ync))\b/,
40098
+ alias: 'keyword'
40099
+ }
40100
+ })
40101
+ Prism.languages['cilk-c'] = Prism.languages['cilkc']
40102
+ }
40103
+
40104
+ ;// CONCATENATED MODULE: ../node_modules/refractor/lang/cilkcpp.js
40105
+ // @ts-nocheck
40106
+
40107
+ cilkcpp.displayName = 'cilkcpp'
40108
+ cilkcpp.aliases = ['cilk', 'cilk-cpp']
40109
+
40110
+ /** @type {import('../core.js').Syntax} */
40111
+ function cilkcpp(Prism) {
40112
+ Prism.register(cpp)
40113
+ Prism.languages.cilkcpp = Prism.languages.insertBefore('cpp', 'function', {
40114
+ 'parallel-keyword': {
40115
+ pattern: /\bcilk_(?:for|reducer|s(?:cope|pawn|ync))\b/,
40116
+ alias: 'keyword'
40117
+ }
40118
+ })
40119
+ Prism.languages['cilk-cpp'] = Prism.languages['cilkcpp']
40120
+ Prism.languages['cilk'] = Prism.languages['cilkcpp']
40121
+ }
40122
+
40316
40123
  ;// CONCATENATED MODULE: ../node_modules/refractor/lang/clojure.js
40317
40124
  // @ts-nocheck
40318
40125
  clojure.displayName = 'clojure'
@@ -40656,6 +40463,7 @@ function csp(Prism) {
40656
40463
  'i'
40657
40464
  )
40658
40465
  }
40466
+
40659
40467
  Prism.languages.csp = {
40660
40468
  directive: {
40661
40469
  pattern:
@@ -40869,11 +40677,13 @@ function coq(Prism) {
40869
40677
  ;(function (Prism) {
40870
40678
  // https://github.com/coq/coq
40871
40679
  var commentSource = /\(\*(?:[^(*]|\((?!\*)|\*(?!\))|<self>)*\*\)/.source
40680
+
40872
40681
  for (var i = 0; i < 2; i++) {
40873
40682
  commentSource = commentSource.replace(/<self>/g, function () {
40874
40683
  return commentSource
40875
40684
  })
40876
40685
  }
40686
+
40877
40687
  commentSource = commentSource.replace(/<self>/g, '[]')
40878
40688
  Prism.languages.coq = {
40879
40689
  comment: RegExp(commentSource),
@@ -41075,6 +40885,7 @@ function cssExtras(Prism) {
41075
40885
  pattern: /(\b\d+)(?:%|[a-z]+(?![\w-]))/,
41076
40886
  lookbehind: true
41077
40887
  } // 123 -123 .123 -.123 12.3 -12.3
40888
+
41078
40889
  var number = {
41079
40890
  pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,
41080
40891
  lookbehind: true
@@ -41093,7 +40904,7 @@ function cssExtras(Prism) {
41093
40904
  color: [
41094
40905
  {
41095
40906
  pattern:
41096
- /(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,
40907
+ /(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,
41097
40908
  lookbehind: true
41098
40909
  },
41099
40910
  {
@@ -41140,6 +40951,7 @@ function cue(Prism) {
41140
40951
  // https://cuelang.org/docs/references/spec/
41141
40952
  // eslint-disable-next-line regexp/strict
41142
40953
  var stringEscape = /\\(?:(?!\2)|\2(?:[^()\r\n]|\([^()]*\)))/.source // eslint-disable-next-line regexp/strict
40954
+
41143
40955
  var stringTypes =
41144
40956
  /"""(?:[^\\"]|"(?!""\2)|<esc>)*"""/.source + // eslint-disable-next-line regexp/strict
41145
40957
  '|' +
@@ -41369,8 +41181,10 @@ function dart(Prism) {
41369
41181
  /\b(?:async|sync|yield)\*/,
41370
41182
  /\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/
41371
41183
  ] // Handles named imports, such as http.Client
41184
+
41372
41185
  var packagePrefix = /(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/
41373
41186
  .source // based on the dart naming conventions
41187
+
41374
41188
  var className = {
41375
41189
  pattern: RegExp(packagePrefix + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
41376
41190
  lookbehind: true,
@@ -41667,6 +41481,7 @@ function django(Prism) {
41667
41481
  Prism.hooks.add('after-tokenize', function (env) {
41668
41482
  markupTemplating.tokenizePlaceholders(env, 'django')
41669
41483
  }) // Add an Jinja2 alias
41484
+
41670
41485
  Prism.languages.jinja2 = Prism.languages.django
41671
41486
  Prism.hooks.add('before-tokenize', function (env) {
41672
41487
  markupTemplating.buildPlaceholders(env, 'jinja2', pattern)
@@ -41731,6 +41546,7 @@ function docker(Prism) {
41731
41546
  // that quantifiers behave *atomically*. Atomic quantifiers are necessary to prevent exponential backtracking.
41732
41547
  var spaceAfterBackSlash =
41733
41548
  /\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source // At least one space, comment, or line break
41549
+
41734
41550
  var space = /(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(
41735
41551
  /<SP_BS>/g,
41736
41552
  function () {
@@ -41760,6 +41576,7 @@ function docker(Prism) {
41760
41576
  * @param {string} flags
41761
41577
  * @returns {RegExp}
41762
41578
  */
41579
+
41763
41580
  function re(source, flags) {
41764
41581
  source = source
41765
41582
  .replace(/<OPT>/g, function () {
@@ -41770,6 +41587,7 @@ function docker(Prism) {
41770
41587
  })
41771
41588
  return RegExp(source, flags)
41772
41589
  }
41590
+
41773
41591
  Prism.languages.docker = {
41774
41592
  instruction: {
41775
41593
  pattern:
@@ -41877,6 +41695,7 @@ function dot(Prism) {
41877
41695
  * @param {string} flags
41878
41696
  * @returns {RegExp}
41879
41697
  */
41698
+
41880
41699
  function withID(source, flags) {
41881
41700
  return RegExp(
41882
41701
  source.replace(/<ID>/g, function () {
@@ -41885,6 +41704,7 @@ function dot(Prism) {
41885
41704
  flags
41886
41705
  )
41887
41706
  }
41707
+
41888
41708
  Prism.languages.dot = {
41889
41709
  comment: {
41890
41710
  pattern: /\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,
@@ -42700,6 +42520,7 @@ The values of MMMMMMMMMMMMM and EEEE map directly to the mantissa and exponent f
42700
42520
  }
42701
42521
  }
42702
42522
  },
42523
+
42703
42524
  /* this description of stack effect literal syntax is not complete and not as specific as theoretically possible
42704
42525
  trying to do better is more work and regex-computation-time than it's worth though.
42705
42526
  - we'd like to have the "delimiter" parts of the stack effect [ (, --, and ) ] be a different (less-important or comment-like) colour to the stack effect contents
@@ -42765,6 +42586,7 @@ the old pattern, which may be later useful, was: (^|\s)(?:call|execute|eval)?\((
42765
42586
  lookbehind: true,
42766
42587
  alias: 'operator'
42767
42588
  },
42589
+
42768
42590
  /*
42769
42591
  full list of supported word naming conventions: (the convention appears outside of the [brackets])
42770
42592
  set-[x]
@@ -42840,6 +42662,7 @@ see <https://docs.factorcode.org/content/article-conventions.html>
42840
42662
  pattern: /(^|\s)[^"\s]\S*(?=\s|$)/,
42841
42663
  lookbehind: true
42842
42664
  },
42665
+
42843
42666
  /*
42844
42667
  basic first-class string "a"
42845
42668
  with escaped double-quote "a\""
@@ -42861,12 +42684,15 @@ this is fine for a regex-only implementation.
42861
42684
  inside: string_inside
42862
42685
  }
42863
42686
  }
42687
+
42864
42688
  var escape = function (str) {
42865
42689
  return (str + '').replace(/([.?*+\^$\[\]\\(){}|\-])/g, '\\$1')
42866
42690
  }
42691
+
42867
42692
  var arrToWordsRegExp = function (arr) {
42868
42693
  return new RegExp('(^|\\s)(?:' + arr.map(escape).join('|') + ')(?=\\s|$)')
42869
42694
  }
42695
+
42870
42696
  var builtins = {
42871
42697
  'kernel-builtin': [
42872
42698
  'or',
@@ -43581,9 +43407,11 @@ function flow_flow(Prism) {
43581
43407
  alias: 'punctuation'
43582
43408
  }
43583
43409
  })
43410
+
43584
43411
  if (!Array.isArray(Prism.languages.flow.keyword)) {
43585
43412
  Prism.languages.flow.keyword = [Prism.languages.flow.keyword]
43586
43413
  }
43414
+
43587
43415
  Prism.languages.flow.keyword.unshift(
43588
43416
  {
43589
43417
  pattern: /(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,
@@ -43660,11 +43488,13 @@ function ftl(Prism) {
43660
43488
  var FTL_EXPR =
43661
43489
  /[^<()"']|\((?:<expr>)*\)|<(?!#--)|<#--(?:[^-]|-(?!->))*-->|"(?:[^\\"]|\\.)*"|'(?:[^\\']|\\.)*'/
43662
43490
  .source
43491
+
43663
43492
  for (var i = 0; i < 2; i++) {
43664
43493
  FTL_EXPR = FTL_EXPR.replace(/<expr>/g, function () {
43665
43494
  return FTL_EXPR
43666
43495
  })
43667
43496
  }
43497
+
43668
43498
  FTL_EXPR = FTL_EXPR.replace(/<expr>/g, /[^\s\S]/.source)
43669
43499
  var ftl = {
43670
43500
  comment: /<#--[\s\S]*?-->/,
@@ -44126,15 +43956,18 @@ function git(Prism) {
44126
43956
  * nothing to commit (working directory clean)
44127
43957
  */
44128
43958
  comment: /^#.*/m,
43959
+
44129
43960
  /*
44130
43961
  * Regexp to match the changed lines in a git diff output. Check the example below.
44131
43962
  */
44132
43963
  deleted: /^[-–].*/m,
44133
43964
  inserted: /^\+.*/m,
43965
+
44134
43966
  /*
44135
43967
  * a string (double and simple quote)
44136
43968
  */
44137
43969
  string: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
43970
+
44138
43971
  /*
44139
43972
  * a git command. It starts with a random prompt finishing by a $, then "git" then some other parameters
44140
43973
  * For instance:
@@ -44152,6 +43985,7 @@ function git(Prism) {
44152
43985
  parameter: /\s--?\w+/
44153
43986
  }
44154
43987
  },
43988
+
44155
43989
  /*
44156
43990
  * Coordinates displayed in a git diff command
44157
43991
  * For instance:
@@ -44166,6 +44000,7 @@ function git(Prism) {
44166
44000
  * +And this is the second line
44167
44001
  */
44168
44002
  coord: /^@@.*@@$/m,
44003
+
44169
44004
  /*
44170
44005
  * Match a "commit [SHA1]" line in a git log output.
44171
44006
  * For instance:
@@ -44320,6 +44155,76 @@ function goModule(Prism) {
44320
44155
  }
44321
44156
  }
44322
44157
 
44158
+ ;// CONCATENATED MODULE: ../node_modules/refractor/lang/gradle.js
44159
+ // @ts-nocheck
44160
+
44161
+ gradle.displayName = 'gradle'
44162
+ gradle.aliases = []
44163
+
44164
+ /** @type {import('../core.js').Syntax} */
44165
+ function gradle(Prism) {
44166
+ Prism.register(clike)
44167
+ ;(function (Prism) {
44168
+ var interpolation = {
44169
+ pattern: /((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,
44170
+ lookbehind: true,
44171
+ inside: {
44172
+ 'interpolation-punctuation': {
44173
+ pattern: /^\$\{?|\}$/,
44174
+ alias: 'punctuation'
44175
+ },
44176
+ expression: {
44177
+ pattern: /[\s\S]+/,
44178
+ inside: null
44179
+ }
44180
+ }
44181
+ }
44182
+ Prism.languages.gradle = Prism.languages.extend('clike', {
44183
+ string: {
44184
+ pattern: /'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,
44185
+ greedy: true
44186
+ },
44187
+ keyword:
44188
+ /\b(?:apply|def|dependencies|else|if|implementation|import|plugin|plugins|project|repositories|repository|sourceSets|tasks|val)\b/,
44189
+ number:
44190
+ /\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,
44191
+ operator: {
44192
+ pattern:
44193
+ /(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,
44194
+ lookbehind: true
44195
+ },
44196
+ punctuation: /\.+|[{}[\];(),:$]/
44197
+ })
44198
+ Prism.languages.insertBefore('gradle', 'string', {
44199
+ shebang: {
44200
+ pattern: /#!.+/,
44201
+ alias: 'comment',
44202
+ greedy: true
44203
+ },
44204
+ 'interpolation-string': {
44205
+ pattern:
44206
+ /"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,
44207
+ greedy: true,
44208
+ inside: {
44209
+ interpolation: interpolation,
44210
+ string: /[\s\S]+/
44211
+ }
44212
+ }
44213
+ })
44214
+ Prism.languages.insertBefore('gradle', 'punctuation', {
44215
+ 'spock-block': /\b(?:and|cleanup|expect|given|setup|then|when|where):/
44216
+ })
44217
+ Prism.languages.insertBefore('gradle', 'function', {
44218
+ annotation: {
44219
+ pattern: /(^|[^.])@\w+/,
44220
+ lookbehind: true,
44221
+ alias: 'punctuation'
44222
+ }
44223
+ })
44224
+ interpolation.inside.expression.inside = Prism.languages.gradle
44225
+ })(Prism)
44226
+ }
44227
+
44323
44228
  ;// CONCATENATED MODULE: ../node_modules/refractor/lang/graphql.js
44324
44229
  // @ts-nocheck
44325
44230
  graphql.displayName = 'graphql'
@@ -44401,6 +44306,7 @@ function graphql(Prism) {
44401
44306
  * @typedef {InstanceType<import("./prism-core")["Token"]>} Token
44402
44307
  * @type {Token[]}
44403
44308
  */
44309
+
44404
44310
  var validTokens = env.tokens.filter(function (token) {
44405
44311
  return (
44406
44312
  typeof token !== 'string' &&
@@ -44415,6 +44321,7 @@ function graphql(Prism) {
44415
44321
  * @param {number} offset
44416
44322
  * @returns {Token | undefined}
44417
44323
  */
44324
+
44418
44325
  function getToken(offset) {
44419
44326
  return validTokens[currentIndex + offset]
44420
44327
  }
@@ -44425,14 +44332,18 @@ function graphql(Prism) {
44425
44332
  * @param {number} [offset=0]
44426
44333
  * @returns {boolean}
44427
44334
  */
44335
+
44428
44336
  function isTokenType(types, offset) {
44429
44337
  offset = offset || 0
44338
+
44430
44339
  for (var i = 0; i < types.length; i++) {
44431
44340
  var token = getToken(i + offset)
44341
+
44432
44342
  if (!token || token.type !== types[i]) {
44433
44343
  return false
44434
44344
  }
44435
44345
  }
44346
+
44436
44347
  return true
44437
44348
  }
44438
44349
  /**
@@ -44446,22 +44357,27 @@ function graphql(Prism) {
44446
44357
  * @param {RegExp} close
44447
44358
  * @returns {number}
44448
44359
  */
44360
+
44449
44361
  function findClosingBracket(open, close) {
44450
44362
  var stackHeight = 1
44363
+
44451
44364
  for (var i = currentIndex; i < validTokens.length; i++) {
44452
44365
  var token = validTokens[i]
44453
44366
  var content = token.content
44367
+
44454
44368
  if (token.type === 'punctuation' && typeof content === 'string') {
44455
44369
  if (open.test(content)) {
44456
44370
  stackHeight++
44457
44371
  } else if (close.test(content)) {
44458
44372
  stackHeight--
44373
+
44459
44374
  if (stackHeight === 0) {
44460
44375
  return i
44461
44376
  }
44462
44377
  }
44463
44378
  }
44464
44379
  }
44380
+
44465
44381
  return -1
44466
44382
  }
44467
44383
  /**
@@ -44471,52 +44387,69 @@ function graphql(Prism) {
44471
44387
  * @param {string} alias
44472
44388
  * @returns {void}
44473
44389
  */
44390
+
44474
44391
  function addAlias(token, alias) {
44475
44392
  var aliases = token.alias
44393
+
44476
44394
  if (!aliases) {
44477
44395
  token.alias = aliases = []
44478
44396
  } else if (!Array.isArray(aliases)) {
44479
44397
  token.alias = aliases = [aliases]
44480
44398
  }
44399
+
44481
44400
  aliases.push(alias)
44482
44401
  }
44402
+
44483
44403
  for (; currentIndex < validTokens.length; ) {
44484
44404
  var startToken = validTokens[currentIndex++] // add special aliases for mutation tokens
44405
+
44485
44406
  if (startToken.type === 'keyword' && startToken.content === 'mutation') {
44486
44407
  // any array of the names of all input variables (if any)
44487
44408
  var inputVariables = []
44409
+
44488
44410
  if (
44489
44411
  isTokenType(['definition-mutation', 'punctuation']) &&
44490
44412
  getToken(1).content === '('
44491
44413
  ) {
44492
44414
  // definition
44493
44415
  currentIndex += 2 // skip 'definition-mutation' and 'punctuation'
44416
+
44494
44417
  var definitionEnd = findClosingBracket(/^\($/, /^\)$/)
44418
+
44495
44419
  if (definitionEnd === -1) {
44496
44420
  continue
44497
44421
  } // find all input variables
44422
+
44498
44423
  for (; currentIndex < definitionEnd; currentIndex++) {
44499
44424
  var t = getToken(0)
44425
+
44500
44426
  if (t.type === 'variable') {
44501
44427
  addAlias(t, 'variable-input')
44502
44428
  inputVariables.push(t.content)
44503
44429
  }
44504
44430
  }
44431
+
44505
44432
  currentIndex = definitionEnd + 1
44506
44433
  }
44434
+
44507
44435
  if (
44508
44436
  isTokenType(['punctuation', 'property-query']) &&
44509
44437
  getToken(0).content === '{'
44510
44438
  ) {
44511
44439
  currentIndex++ // skip opening bracket
44440
+
44512
44441
  addAlias(getToken(0), 'property-mutation')
44442
+
44513
44443
  if (inputVariables.length > 0) {
44514
44444
  var mutationEnd = findClosingBracket(/^\{$/, /^\}$/)
44445
+
44515
44446
  if (mutationEnd === -1) {
44516
44447
  continue
44517
44448
  } // give references to input variables a special alias
44449
+
44518
44450
  for (var i = currentIndex; i < mutationEnd; i++) {
44519
44451
  var varToken = validTokens[i]
44452
+
44520
44453
  if (
44521
44454
  varToken.type === 'variable' &&
44522
44455
  inputVariables.indexOf(varToken.content) >= 0
@@ -44618,11 +44551,13 @@ function textile(Prism) {
44618
44551
  // to not break table pattern |(. foo |). bar |
44619
44552
  var modifierRegex = /\([^|()\n]+\)|\[[^\]\n]+\]|\{[^}\n]+\}/.source // Opening and closing parentheses which are not a modifier
44620
44553
  // This pattern is necessary to prevent exponential backtracking
44554
+
44621
44555
  var parenthesesRegex = /\)|\((?![^|()\n]+\))/.source
44622
44556
  /**
44623
44557
  * @param {string} source
44624
44558
  * @param {string} [flags]
44625
44559
  */
44560
+
44626
44561
  function withModifier(source, flags) {
44627
44562
  return RegExp(
44628
44563
  source
@@ -44635,6 +44570,7 @@ function textile(Prism) {
44635
44570
  flags || ''
44636
44571
  )
44637
44572
  }
44573
+
44638
44574
  var modifierTokens = {
44639
44575
  css: {
44640
44576
  pattern: /\{[^{}]+\}/,
@@ -44881,14 +44817,17 @@ function textile(Prism) {
44881
44817
  acronym: phraseInside['acronym'],
44882
44818
  mark: phraseInside['mark']
44883
44819
  } // Only allow alpha-numeric HTML tags, not XML tags
44820
+
44884
44821
  textile.tag.pattern =
44885
44822
  /<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i // Allow some nesting
44823
+
44886
44824
  var phraseInlineInside = phraseInside['inline'].inside
44887
44825
  phraseInlineInside['bold'].inside = nestedPatterns
44888
44826
  phraseInlineInside['italic'].inside = nestedPatterns
44889
44827
  phraseInlineInside['inserted'].inside = nestedPatterns
44890
44828
  phraseInlineInside['deleted'].inside = nestedPatterns
44891
44829
  phraseInlineInside['span'].inside = nestedPatterns // Allow some styles inside table cells
44830
+
44892
44831
  var phraseTableInside = phraseInside['table'].inside
44893
44832
  phraseTableInside['inline'] = nestedPatterns['inline']
44894
44833
  phraseTableInside['link'] = nestedPatterns['link']
@@ -45017,6 +44956,7 @@ code |
45017
44956
  }
45018
44957
  var filter_pattern =
45019
44958
  '((?:^|\\r?\\n|\\r)([\\t ]*)):{{filter_name}}(?:(?:\\r?\\n|\\r)(?:\\2[\\t ].+|\\s*?(?=\\r?\\n|\\r)))+' // Non exhaustive list of available filters and associated languages
44959
+
45020
44960
  var filters = [
45021
44961
  'css',
45022
44962
  {
@@ -45032,6 +44972,7 @@ code |
45032
44972
  'textile'
45033
44973
  ]
45034
44974
  var all_filters = {}
44975
+
45035
44976
  for (var i = 0, l = filters.length; i < l; i++) {
45036
44977
  var filter = filters[i]
45037
44978
  filter =
@@ -45041,6 +44982,7 @@ code |
45041
44982
  language: filter
45042
44983
  }
45043
44984
  : filter
44985
+
45044
44986
  if (Prism.languages[filter.language]) {
45045
44987
  all_filters['filter-' + filter.filter] = {
45046
44988
  pattern: RegExp(
@@ -45063,6 +45005,7 @@ code |
45063
45005
  }
45064
45006
  }
45065
45007
  }
45008
+
45066
45009
  Prism.languages.insertBefore('haml', 'filter', all_filters)
45067
45010
  })(Prism)
45068
45011
  }
@@ -45402,7 +45345,7 @@ function hoon(Prism) {
45402
45345
  greedy: true
45403
45346
  },
45404
45347
  string: {
45405
- pattern: /"[^"]*"|'[^']*'/,
45348
+ pattern: /"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/,
45406
45349
  greedy: true
45407
45350
  },
45408
45351
  constant: /%(?:\.[ny]|[\w-]+)/,
@@ -45571,6 +45514,7 @@ function http(Prism) {
45571
45514
  function headerValueOf(name) {
45572
45515
  return RegExp('(^(?:' + name + '):[ \t]*(?![ \t]))[^]+', 'i')
45573
45516
  }
45517
+
45574
45518
  Prism.languages.http = {
45575
45519
  'request-line': {
45576
45520
  pattern:
@@ -45653,6 +45597,7 @@ function http(Prism) {
45653
45597
  }
45654
45598
  }
45655
45599
  } // Create a mapping of Content-Type headers to language definitions
45600
+
45656
45601
  var langs = Prism.languages
45657
45602
  var httpLanguages = {
45658
45603
  'application/javascript': langs.javascript,
@@ -45663,6 +45608,7 @@ function http(Prism) {
45663
45608
  'text/css': langs.css,
45664
45609
  'text/plain': langs.plain
45665
45610
  } // Declare which types can also be suffixes
45611
+
45666
45612
  var suffixTypes = {
45667
45613
  'application/json': true,
45668
45614
  'application/xml': true
@@ -45673,13 +45619,16 @@ function http(Prism) {
45673
45619
  * @param {string} contentType
45674
45620
  * @returns {string}
45675
45621
  */
45622
+
45676
45623
  function getSuffixPattern(contentType) {
45677
45624
  var suffix = contentType.replace(/^[a-z]+\//, '')
45678
45625
  var suffixPattern = '\\w+/(?:[\\w.-]+\\+)+' + suffix + '(?![+\\w.-])'
45679
45626
  return '(?:' + contentType + '|' + suffixPattern + ')'
45680
45627
  } // Insert each content type parser that has its associated language
45681
45628
  // currently loaded.
45629
+
45682
45630
  var options
45631
+
45683
45632
  for (var contentType in httpLanguages) {
45684
45633
  if (httpLanguages[contentType]) {
45685
45634
  options = options || {}
@@ -45705,6 +45654,7 @@ function http(Prism) {
45705
45654
  }
45706
45655
  }
45707
45656
  }
45657
+
45708
45658
  if (options) {
45709
45659
  Prism.languages.insertBefore('http', 'header', options)
45710
45660
  }
@@ -45793,6 +45743,7 @@ function icuMessageFormat(Prism) {
45793
45743
  })
45794
45744
  }
45795
45745
  }
45746
+
45796
45747
  var stringPattern = /'[{}:=,](?:[^']|'')*'(?!')/
45797
45748
  var escape = {
45798
45749
  pattern: /''/,
@@ -46058,6 +46009,7 @@ function inform7(Prism) {
46058
46009
  }
46059
46010
  Prism.languages.inform7['string'].inside['substitution'].inside.rest =
46060
46011
  Prism.languages.inform7 // We don't want the remaining text in the substitution to be highlighted as the string.
46012
+
46061
46013
  Prism.languages.inform7['string'].inside['substitution'].inside.rest.text = {
46062
46014
  pattern: /\S(?:\s*\S)*/,
46063
46015
  alias: 'comment'
@@ -46166,13 +46118,17 @@ function javadoclike(Prism) {
46166
46118
  * @param {string} lang the language add doc comment support to.
46167
46119
  * @param {(pattern: {inside: {rest: undefined}}) => void} callback the function called with each doc comment pattern as argument.
46168
46120
  */
46121
+
46169
46122
  function docCommentSupport(lang, callback) {
46170
46123
  var tokenName = 'doc-comment'
46171
46124
  var grammar = Prism.languages[lang]
46125
+
46172
46126
  if (!grammar) {
46173
46127
  return
46174
46128
  }
46129
+
46175
46130
  var token = grammar[tokenName]
46131
+
46176
46132
  if (!token) {
46177
46133
  // add doc comment: /** */
46178
46134
  var definition = {}
@@ -46184,12 +46140,14 @@ function javadoclike(Prism) {
46184
46140
  grammar = Prism.languages.insertBefore(lang, 'comment', definition)
46185
46141
  token = grammar[tokenName]
46186
46142
  }
46143
+
46187
46144
  if (token instanceof RegExp) {
46188
46145
  // convert regex to object
46189
46146
  token = grammar[tokenName] = {
46190
46147
  pattern: token
46191
46148
  }
46192
46149
  }
46150
+
46193
46151
  if (Array.isArray(token)) {
46194
46152
  for (var i = 0, l = token.length; i < l; i++) {
46195
46153
  if (token[i] instanceof RegExp) {
@@ -46197,6 +46155,7 @@ function javadoclike(Prism) {
46197
46155
  pattern: token[i]
46198
46156
  }
46199
46157
  }
46158
+
46200
46159
  callback(token[i])
46201
46160
  }
46202
46161
  } else {
@@ -46209,19 +46168,23 @@ function javadoclike(Prism) {
46209
46168
  * @param {string[]|string} languages
46210
46169
  * @param {Object} docLanguage
46211
46170
  */
46171
+
46212
46172
  function addSupport(languages, docLanguage) {
46213
46173
  if (typeof languages === 'string') {
46214
46174
  languages = [languages]
46215
46175
  }
46176
+
46216
46177
  languages.forEach(function (lang) {
46217
46178
  docCommentSupport(lang, function (pattern) {
46218
46179
  if (!pattern.inside) {
46219
46180
  pattern.inside = {}
46220
46181
  }
46182
+
46221
46183
  pattern.inside.rest = docLanguage
46222
46184
  })
46223
46185
  })
46224
46186
  }
46187
+
46225
46188
  Object.defineProperty(javaDocLike, 'addSupport', {
46226
46189
  value: addSupport
46227
46190
  })
@@ -46249,7 +46212,7 @@ function scala(Prism) {
46249
46212
  greedy: true
46250
46213
  },
46251
46214
  keyword:
46252
- /<-|=>|\b(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|null|object|override|package|private|protected|return|sealed|self|super|this|throw|trait|try|type|val|var|while|with|yield)\b/,
46215
+ /<-|=>|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,
46253
46216
  number:
46254
46217
  /\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,
46255
46218
  builtin:
@@ -46289,6 +46252,7 @@ function scala(Prism) {
46289
46252
  })
46290
46253
  delete Prism.languages.scala['class-name']
46291
46254
  delete Prism.languages.scala['function']
46255
+ delete Prism.languages.scala['constant']
46292
46256
  }
46293
46257
 
46294
46258
  ;// CONCATENATED MODULE: ../node_modules/refractor/lang/javadoc.js
@@ -46716,6 +46680,7 @@ function jsTemplates(Prism) {
46716
46680
  Prism.register(javascript)
46717
46681
  ;(function (Prism) {
46718
46682
  var templateString = Prism.languages.javascript['template-string'] // see the pattern in prism-javascript.js
46683
+
46719
46684
  var templateLiteralPattern = templateString.pattern.source
46720
46685
  var interpolationObject = templateString.inside['interpolation']
46721
46686
  var interpolationPunctuationObject =
@@ -46732,10 +46697,12 @@ function jsTemplates(Prism) {
46732
46697
  * @example
46733
46698
  * createTemplate('css', /\bcss/.source);
46734
46699
  */
46700
+
46735
46701
  function createTemplate(language, tag) {
46736
46702
  if (!Prism.languages[language]) {
46737
46703
  return undefined
46738
46704
  }
46705
+
46739
46706
  return {
46740
46707
  pattern: RegExp('((?:' + tag + ')\\s*)' + templateLiteralPattern),
46741
46708
  lookbehind: true,
@@ -46752,6 +46719,7 @@ function jsTemplates(Prism) {
46752
46719
  }
46753
46720
  }
46754
46721
  }
46722
+
46755
46723
  Prism.languages.javascript['template-string'] = [
46756
46724
  // styled-jsx:
46757
46725
  // css`a { color: #25F; }`
@@ -46780,6 +46748,7 @@ function jsTemplates(Prism) {
46780
46748
  * @param {string} language
46781
46749
  * @returns {string}
46782
46750
  */
46751
+
46783
46752
  function getPlaceholder(counter, language) {
46784
46753
  return '___' + language.toUpperCase() + '_' + counter + '___'
46785
46754
  }
@@ -46791,6 +46760,7 @@ function jsTemplates(Prism) {
46791
46760
  * @param {string} language
46792
46761
  * @returns {(string|Token)[]}
46793
46762
  */
46763
+
46794
46764
  function tokenizeWithHooks(code, grammar, language) {
46795
46765
  var env = {
46796
46766
  code: code,
@@ -46808,11 +46778,14 @@ function jsTemplates(Prism) {
46808
46778
  * @param {string} expression The code of the expression. E.g. `"${42}"`
46809
46779
  * @returns {Token}
46810
46780
  */
46781
+
46811
46782
  function tokenizeInterpolationExpression(expression) {
46812
46783
  var tempGrammar = {}
46813
46784
  tempGrammar['interpolation-punctuation'] = interpolationPunctuationObject
46814
46785
  /** @type {Array} */
46786
+
46815
46787
  var tokens = Prism.tokenize(expression, tempGrammar)
46788
+
46816
46789
  if (tokens.length === 3) {
46817
46790
  /**
46818
46791
  * The token array will look like this
@@ -46829,6 +46802,7 @@ function jsTemplates(Prism) {
46829
46802
  )
46830
46803
  tokens.splice.apply(tokens, args)
46831
46804
  }
46805
+
46832
46806
  return new Prism.Token(
46833
46807
  'interpolation',
46834
46808
  tokens,
@@ -46853,9 +46827,11 @@ function jsTemplates(Prism) {
46853
46827
  * @param {string} language
46854
46828
  * @returns {Token}
46855
46829
  */
46830
+
46856
46831
  function tokenizeEmbedded(code, grammar, language) {
46857
46832
  // 1. First filter out all interpolations
46858
46833
  // because they might be escaped, we need a lookbehind, so we use Prism
46834
+
46859
46835
  /** @type {(Token|string)[]} */
46860
46836
  var _tokens = Prism.tokenize(code, {
46861
46837
  interpolation: {
@@ -46863,9 +46839,12 @@ function jsTemplates(Prism) {
46863
46839
  lookbehind: true
46864
46840
  }
46865
46841
  }) // replace all interpolations with a placeholder which is not in the code already
46842
+
46866
46843
  var placeholderCounter = 0
46867
46844
  /** @type {Object<string, string>} */
46845
+
46868
46846
  var placeholderMap = {}
46847
+
46869
46848
  var embeddedCode = _tokens
46870
46849
  .map(function (token) {
46871
46850
  if (typeof token === 'string') {
@@ -46873,6 +46852,7 @@ function jsTemplates(Prism) {
46873
46852
  } else {
46874
46853
  var interpolationExpression = token.content
46875
46854
  var placeholder
46855
+
46876
46856
  while (
46877
46857
  code.indexOf(
46878
46858
  (placeholder = getPlaceholder(placeholderCounter++, language))
@@ -46880,12 +46860,15 @@ function jsTemplates(Prism) {
46880
46860
  ) {
46881
46861
  /* noop */
46882
46862
  }
46863
+
46883
46864
  placeholderMap[placeholder] = interpolationExpression
46884
46865
  return placeholder
46885
46866
  }
46886
46867
  })
46887
46868
  .join('') // 2. Tokenize the embedded code
46869
+
46888
46870
  var embeddedTokens = tokenizeWithHooks(embeddedCode, grammar, language) // 3. Re-insert the interpolation
46871
+
46889
46872
  var placeholders = Object.keys(placeholderMap)
46890
46873
  placeholderCounter = 0
46891
46874
  /**
@@ -46893,12 +46876,15 @@ function jsTemplates(Prism) {
46893
46876
  * @param {(Token|string)[]} tokens
46894
46877
  * @returns {void}
46895
46878
  */
46879
+
46896
46880
  function walkTokens(tokens) {
46897
46881
  for (var i = 0; i < tokens.length; i++) {
46898
46882
  if (placeholderCounter >= placeholders.length) {
46899
46883
  return
46900
46884
  }
46885
+
46901
46886
  var token = tokens[i]
46887
+
46902
46888
  if (typeof token === 'string' || typeof token.content === 'string') {
46903
46889
  var placeholder = placeholders[placeholderCounter]
46904
46890
  var s =
@@ -46907,6 +46893,7 @@ function jsTemplates(Prism) {
46907
46893
  : /** @type {string} */
46908
46894
  token.content
46909
46895
  var index = s.indexOf(placeholder)
46896
+
46910
46897
  if (index !== -1) {
46911
46898
  ++placeholderCounter
46912
46899
  var before = s.substring(0, index)
@@ -46915,15 +46902,19 @@ function jsTemplates(Prism) {
46915
46902
  )
46916
46903
  var after = s.substring(index + placeholder.length)
46917
46904
  var replacement = []
46905
+
46918
46906
  if (before) {
46919
46907
  replacement.push(before)
46920
46908
  }
46909
+
46921
46910
  replacement.push(middle)
46911
+
46922
46912
  if (after) {
46923
46913
  var afterTokens = [after]
46924
46914
  walkTokens(afterTokens)
46925
46915
  replacement.push.apply(replacement, afterTokens)
46926
46916
  }
46917
+
46927
46918
  if (typeof token === 'string') {
46928
46919
  tokens.splice.apply(tokens, [i, 1].concat(replacement))
46929
46920
  i += replacement.length - 1
@@ -46933,6 +46924,7 @@ function jsTemplates(Prism) {
46933
46924
  }
46934
46925
  } else {
46935
46926
  var content = token.content
46927
+
46936
46928
  if (Array.isArray(content)) {
46937
46929
  walkTokens(content)
46938
46930
  } else {
@@ -46941,6 +46933,7 @@ function jsTemplates(Prism) {
46941
46933
  }
46942
46934
  }
46943
46935
  }
46936
+
46944
46937
  walkTokens(embeddedTokens)
46945
46938
  return new Prism.Token(
46946
46939
  language,
@@ -46954,6 +46947,7 @@ function jsTemplates(Prism) {
46954
46947
  *
46955
46948
  * JS templating isn't active for only JavaScript but also related languages like TypeScript, JSX, and TSX.
46956
46949
  */
46950
+
46957
46951
  var supportedLanguages = {
46958
46952
  javascript: true,
46959
46953
  js: true,
@@ -46972,19 +46966,25 @@ function jsTemplates(Prism) {
46972
46966
  * @param {(Token | string)[]} tokens
46973
46967
  * @returns {void}
46974
46968
  */
46969
+
46975
46970
  function findTemplateStrings(tokens) {
46976
46971
  for (var i = 0, l = tokens.length; i < l; i++) {
46977
46972
  var token = tokens[i]
46973
+
46978
46974
  if (typeof token === 'string') {
46979
46975
  continue
46980
46976
  }
46977
+
46981
46978
  var content = token.content
46979
+
46982
46980
  if (!Array.isArray(content)) {
46983
46981
  if (typeof content !== 'string') {
46984
46982
  findTemplateStrings([content])
46985
46983
  }
46984
+
46986
46985
  continue
46987
46986
  }
46987
+
46988
46988
  if (token.type === 'template-string') {
46989
46989
  /**
46990
46990
  * A JavaScript template-string token will look like this:
@@ -47001,6 +47001,7 @@ function jsTemplates(Prism) {
47001
47001
  * ]]
47002
47002
  */
47003
47003
  var embedded = content[1]
47004
+
47004
47005
  if (
47005
47006
  content.length === 3 &&
47006
47007
  typeof embedded !== 'string' &&
@@ -47011,10 +47012,12 @@ function jsTemplates(Prism) {
47011
47012
  var alias = embedded.alias
47012
47013
  var language = Array.isArray(alias) ? alias[0] : alias
47013
47014
  var grammar = Prism.languages[language]
47015
+
47014
47016
  if (!grammar) {
47015
47017
  // the embedded language isn't registered.
47016
47018
  continue
47017
47019
  }
47020
+
47018
47021
  content[1] = tokenizeEmbedded(code, grammar, language)
47019
47022
  }
47020
47023
  } else {
@@ -47022,6 +47025,7 @@ function jsTemplates(Prism) {
47022
47025
  }
47023
47026
  }
47024
47027
  }
47028
+
47025
47029
  findTemplateStrings(env.tokens)
47026
47030
  })
47027
47031
  /**
@@ -47030,6 +47034,7 @@ function jsTemplates(Prism) {
47030
47034
  * @param {string | Token | (string | Token)[]} value
47031
47035
  * @returns {string}
47032
47036
  */
47037
+
47033
47038
  function stringContent(value) {
47034
47039
  if (typeof value === 'string') {
47035
47040
  return value
@@ -47219,6 +47224,7 @@ function jsExtras(Prism) {
47219
47224
  * @param {string} [flags]
47220
47225
  * @returns {RegExp}
47221
47226
  */
47227
+
47222
47228
  function withId(source, flags) {
47223
47229
  return RegExp(
47224
47230
  source.replace(/<ID>/g, function () {
@@ -47227,6 +47233,7 @@ function jsExtras(Prism) {
47227
47233
  flags
47228
47234
  )
47229
47235
  }
47236
+
47230
47237
  Prism.languages.insertBefore('javascript', 'keyword', {
47231
47238
  imports: {
47232
47239
  // https://tc39.es/ecma262/#sec-imports
@@ -47296,6 +47303,7 @@ function jsExtras(Prism) {
47296
47303
  alias: 'class-name'
47297
47304
  }
47298
47305
  }) // add 'maybe-class-name' to tokens which might be a class name
47306
+
47299
47307
  var maybeClassNameTokens = [
47300
47308
  'function',
47301
47309
  'function-variable',
@@ -47303,14 +47311,17 @@ function jsExtras(Prism) {
47303
47311
  'method-variable',
47304
47312
  'property-access'
47305
47313
  ]
47314
+
47306
47315
  for (var i = 0; i < maybeClassNameTokens.length; i++) {
47307
47316
  var token = maybeClassNameTokens[i]
47308
47317
  var value = Prism.languages.javascript[token] // convert regex to object
47318
+
47309
47319
  if (Prism.util.type(value) === 'RegExp') {
47310
47320
  value = Prism.languages.javascript[token] = {
47311
47321
  pattern: value
47312
47322
  }
47313
47323
  } // keep in mind that we don't support arrays
47324
+
47314
47325
  var inside = value.inside || {}
47315
47326
  value.inside = inside
47316
47327
  inside['maybe-class-name'] = /^[A-Z][\s\S]*/
@@ -47606,9 +47617,11 @@ function kumir(Prism) {
47606
47617
  * @param {string} [flags] The regular expression flags.
47607
47618
  * @returns {RegExp} A wrapped regular expression for identifiers.
47608
47619
  */
47620
+
47609
47621
  function wrapId(pattern, flags) {
47610
47622
  return RegExp(pattern.replace(/<nonId>/g, nonId), flags)
47611
47623
  }
47624
+
47612
47625
  Prism.languages.kumir = {
47613
47626
  comment: {
47614
47627
  pattern: /\|.*/
@@ -47652,6 +47665,7 @@ function kumir(Prism) {
47652
47665
  alias: 'important'
47653
47666
  }
47654
47667
  ],
47668
+
47655
47669
  /**
47656
47670
  * Should be performed after searching for type names because of "таб".
47657
47671
  * "таб" is a reserved word, but never used without a preceding type name.
@@ -47664,6 +47678,7 @@ function kumir(Prism) {
47664
47678
  ),
47665
47679
  lookbehind: true
47666
47680
  },
47681
+
47667
47682
  /** Should be performed after searching for reserved words. */
47668
47683
  name: {
47669
47684
  // eslint-disable-next-line regexp/no-super-linear-backtracking
@@ -47673,6 +47688,7 @@ function kumir(Prism) {
47673
47688
  ),
47674
47689
  lookbehind: true
47675
47690
  },
47691
+
47676
47692
  /** Should be performed after searching for names. */
47677
47693
  number: {
47678
47694
  pattern: wrapId(
@@ -47682,8 +47698,10 @@ function kumir(Prism) {
47682
47698
  ),
47683
47699
  lookbehind: true
47684
47700
  },
47701
+
47685
47702
  /** Should be performed after searching for words. */
47686
47703
  punctuation: /:=|[(),:;\[\]]/,
47704
+
47687
47705
  /**
47688
47706
  * Should be performed after searching for
47689
47707
  * - numeric constants (because of "+" and "-");
@@ -47774,6 +47792,7 @@ function latex(Prism) {
47774
47792
  /(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,
47775
47793
  lookbehind: true
47776
47794
  },
47795
+
47777
47796
  /*
47778
47797
  * equations can be between $$ $$ or $ $ or \( \) or \[ \]
47779
47798
  * (all are multiline)
@@ -47793,6 +47812,7 @@ function latex(Prism) {
47793
47812
  alias: 'string'
47794
47813
  }
47795
47814
  ],
47815
+
47796
47816
  /*
47797
47817
  * arguments which are keywords or references are highlighted
47798
47818
  * as keywords
@@ -47806,6 +47826,7 @@ function latex(Prism) {
47806
47826
  pattern: /(\\url\{)[^}]+(?=\})/,
47807
47827
  lookbehind: true
47808
47828
  },
47829
+
47809
47830
  /*
47810
47831
  * section or chapter headlines are highlighted as bold so that
47811
47832
  * they stand out more
@@ -47896,6 +47917,7 @@ function latte(Prism) {
47896
47917
  if (env.language !== 'latte') {
47897
47918
  return
47898
47919
  }
47920
+
47899
47921
  var lattePattern =
47900
47922
  /\{\*[\s\S]*?\*\}|\{[^'"\s{}*](?:[^"'/{}]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|\/\*(?:[^*]|\*(?!\/))*\*\/)*\}/g
47901
47923
  Prism.languages['markup-templating'].buildPlaceholders(
@@ -48040,12 +48062,14 @@ function scheme(Prism) {
48040
48062
  * @param {Record<string, string>} grammar
48041
48063
  * @returns {string}
48042
48064
  */
48065
+
48043
48066
  function SortedBNF(grammar) {
48044
48067
  for (var key in grammar) {
48045
48068
  grammar[key] = grammar[key].replace(/<[\w\s]+>/g, function (key) {
48046
48069
  return '(?:' + grammar[key].trim() + ')'
48047
48070
  })
48048
48071
  } // return the last item
48072
+
48049
48073
  return grammar[key]
48050
48074
  }
48051
48075
  })(Prism)
@@ -48065,12 +48089,15 @@ function lilypond(Prism) {
48065
48089
  /\((?:[^();"#\\]|\\[\s\S]|;.*(?!.)|"(?:[^"\\]|\\.)*"|#(?:\{(?:(?!#\})[\s\S])*#\}|[^{])|<expr>)*\)/
48066
48090
  .source // allow for up to pow(2, recursivenessLog2) many levels of recursive brace expressions
48067
48091
  // For some reason, this can't be 4
48092
+
48068
48093
  var recursivenessLog2 = 5
48094
+
48069
48095
  for (var i = 0; i < recursivenessLog2; i++) {
48070
48096
  schemeExpression = schemeExpression.replace(/<expr>/g, function () {
48071
48097
  return schemeExpression
48072
48098
  })
48073
48099
  }
48100
+
48074
48101
  schemeExpression = schemeExpression.replace(/<expr>/g, /[^\s\S]/.source)
48075
48102
  var lilypond = (Prism.languages.lilypond = {
48076
48103
  comment: /%(?:(?!\{).*|\{[\s\S]*?%\})/,
@@ -48201,8 +48228,10 @@ function liquid(Prism) {
48201
48228
  liquidPattern,
48202
48229
  function (match) {
48203
48230
  var tagMatch = /^\{%-?\s*(\w+)/.exec(match)
48231
+
48204
48232
  if (tagMatch) {
48205
48233
  var tag = tagMatch[1]
48234
+
48206
48235
  if (tag === 'raw' && !insideRaw) {
48207
48236
  insideRaw = true
48208
48237
  return true
@@ -48211,6 +48240,7 @@ function liquid(Prism) {
48211
48240
  return true
48212
48241
  }
48213
48242
  }
48243
+
48214
48244
  return !insideRaw
48215
48245
  }
48216
48246
  )
@@ -48244,6 +48274,7 @@ function lisp(Prism) {
48244
48274
  * @param {string} pattern
48245
48275
  * @returns {RegExp}
48246
48276
  */
48277
+
48247
48278
  function primitive(pattern) {
48248
48279
  return RegExp(
48249
48280
  /([\s([])/.source + '(?:' + pattern + ')' + /(?=[\s)])/.source
@@ -48251,10 +48282,14 @@ function lisp(Prism) {
48251
48282
  } // Patterns in regular expressions
48252
48283
  // Symbol name. See https://www.gnu.org/software/emacs/manual/html_node/elisp/Symbol-Type.html
48253
48284
  // & and : are excluded as they are usually used for special purposes
48285
+
48254
48286
  var symbol = /(?!\d)[-+*/~!@$%^=<>{}\w]+/.source // symbol starting with & used in function arguments
48287
+
48255
48288
  var marker = '&' + symbol // Open parenthesis for look-behind
48289
+
48256
48290
  var par = '(\\()'
48257
48291
  var endpar = '(?=\\))' // End the pattern with look-ahead space
48292
+
48258
48293
  var space = '(?=\\s)'
48259
48294
  var nestedPar =
48260
48295
  /(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/
@@ -49169,6 +49204,107 @@ function mermaid(Prism) {
49169
49204
  }
49170
49205
  }
49171
49206
 
49207
+ ;// CONCATENATED MODULE: ../node_modules/refractor/lang/metafont.js
49208
+ // @ts-nocheck
49209
+ metafont.displayName = 'metafont'
49210
+ metafont.aliases = []
49211
+
49212
+ /** @type {import('../core.js').Syntax} */
49213
+ function metafont(Prism) {
49214
+ Prism.languages.metafont = {
49215
+ // Syntax of METAFONT with the added (public) elements of PlainMETAFONT. Except for internal quantities they are expected to be rarely redefined. Freely inspired by the syntax of Christophe Grandsire for the Crimson Editor.
49216
+ comment: {
49217
+ pattern: /%.*/,
49218
+ greedy: true
49219
+ },
49220
+ string: {
49221
+ pattern: /"[^\r\n"]*"/,
49222
+ greedy: true
49223
+ },
49224
+ number: /\d*\.?\d+/,
49225
+ boolean: /\b(?:false|true)\b/,
49226
+ punctuation: [
49227
+ /[,;()]/,
49228
+ {
49229
+ pattern: /(^|[^{}])(?:\{|\})(?![{}])/,
49230
+ lookbehind: true
49231
+ },
49232
+ {
49233
+ pattern: /(^|[^[])\[(?!\[)/,
49234
+ lookbehind: true
49235
+ },
49236
+ {
49237
+ pattern: /(^|[^\]])\](?!\])/,
49238
+ lookbehind: true
49239
+ }
49240
+ ],
49241
+ constant: [
49242
+ {
49243
+ pattern: /(^|[^!?])\?\?\?(?![!?])/,
49244
+ lookbehind: true
49245
+ },
49246
+ {
49247
+ pattern: /(^|[^/*\\])(?:\\|\\\\)(?![/*\\])/,
49248
+ lookbehind: true
49249
+ },
49250
+ /\b(?:_|blankpicture|bp|cc|cm|dd|ditto|down|eps|epsilon|fullcircle|halfcircle|identity|in|infinity|left|mm|nullpen|nullpicture|origin|pc|penrazor|penspeck|pensquare|penstroke|proof|pt|quartercircle|relax|right|smoke|unitpixel|unitsquare|up)\b/
49251
+ ],
49252
+ quantity: {
49253
+ pattern:
49254
+ /\b(?:autorounding|blacker|boundarychar|charcode|chardp|chardx|chardy|charext|charht|charic|charwd|currentwindow|day|designsize|displaying|fillin|fontmaking|granularity|hppp|join_radius|month|o_correction|pausing|pen_(?:bot|lft|rt|top)|pixels_per_inch|proofing|showstopping|smoothing|time|tolerance|tracingcapsules|tracingchoices|tracingcommands|tracingedges|tracingequations|tracingmacros|tracingonline|tracingoutput|tracingpens|tracingrestores|tracingspecs|tracingstats|tracingtitles|turningcheck|vppp|warningcheck|xoffset|year|yoffset)\b/,
49255
+ alias: 'keyword'
49256
+ },
49257
+ command: {
49258
+ pattern:
49259
+ /\b(?:addto|batchmode|charlist|cull|display|errhelp|errmessage|errorstopmode|everyjob|extensible|fontdimen|headerbyte|inner|interim|let|ligtable|message|newinternal|nonstopmode|numspecial|openwindow|outer|randomseed|save|scrollmode|shipout|show|showdependencies|showstats|showtoken|showvariable|special)\b/,
49260
+ alias: 'builtin'
49261
+ },
49262
+ operator: [
49263
+ {
49264
+ pattern:
49265
+ /(^|[^>=<:|])(?:<|<=|=|=:|\|=:|\|=:>|=:\|>|=:\||\|=:\||\|=:\|>|\|=:\|>>|>|>=|:|:=|<>|::|\|\|:)(?![>=<:|])/,
49266
+ lookbehind: true
49267
+ },
49268
+ {
49269
+ pattern: /(^|[^+-])(?:\+|\+\+|-{1,3}|\+-\+)(?![+-])/,
49270
+ lookbehind: true
49271
+ },
49272
+ {
49273
+ pattern: /(^|[^/*\\])(?:\*|\*\*|\/)(?![/*\\])/,
49274
+ lookbehind: true
49275
+ },
49276
+ {
49277
+ pattern: /(^|[^.])(?:\.{2,3})(?!\.)/,
49278
+ lookbehind: true
49279
+ },
49280
+ {
49281
+ pattern: /(^|[^@#&$])&(?![@#&$])/,
49282
+ lookbehind: true
49283
+ },
49284
+ /\b(?:and|not|or)\b/
49285
+ ],
49286
+ macro: {
49287
+ pattern:
49288
+ /\b(?:abs|beginchar|bot|byte|capsule_def|ceiling|change_width|clear_pen_memory|clearit|clearpen|clearxy|counterclockwise|cullit|cutdraw|cutoff|decr|define_blacker_pixels|define_corrected_pixels|define_good_x_pixels|define_good_y_pixels|define_horizontal_corrected_pixels|define_pixels|define_whole_blacker_pixels|define_whole_pixels|define_whole_vertical_blacker_pixels|define_whole_vertical_pixels|dir|direction|directionpoint|div|dotprod|downto|draw|drawdot|endchar|erase|fill|filldraw|fix_units|flex|font_coding_scheme|font_extra_space|font_identifier|font_normal_shrink|font_normal_space|font_normal_stretch|font_quad|font_size|font_slant|font_x_height|gfcorners|gobble|gobbled|good\.(?:bot|lft|rt|top|x|y)|grayfont|hide|hround|imagerules|incr|interact|interpath|intersectionpoint|inverse|italcorr|killtext|labelfont|labels|lft|loggingall|lowres_fix|makegrid|makelabel(?:\.(?:bot|lft|rt|top)(?:\.nodot)?)?|max|min|mod|mode_def|mode_setup|nodisplays|notransforms|numtok|openit|penlabels|penpos|pickup|proofoffset|proofrule|proofrulethickness|range|reflectedabout|rotatedabout|rotatedaround|round|rt|savepen|screenchars|screenrule|screenstrokes|shipit|showit|slantfont|softjoin|solve|stop|superellipse|tensepath|thru|titlefont|top|tracingall|tracingnone|undraw|undrawdot|unfill|unfilldraw|upto|vround)\b/,
49289
+ alias: 'function'
49290
+ },
49291
+ builtin:
49292
+ /\b(?:ASCII|angle|char|cosd|decimal|directiontime|floor|hex|intersectiontimes|jobname|known|length|makepath|makepen|mexp|mlog|normaldeviate|oct|odd|pencircle|penoffset|point|postcontrol|precontrol|reverse|rotated|sind|sqrt|str|subpath|substring|totalweight|turningnumber|uniformdeviate|unknown|xpart|xxpart|xypart|ypart|yxpart|yypart)\b/,
49293
+ keyword:
49294
+ /\b(?:also|at|atleast|begingroup|charexists|contour|controls|curl|cycle|def|delimiters|doublepath|dropping|dump|else|elseif|end|enddef|endfor|endgroup|endinput|exitif|exitunless|expandafter|fi|for|forever|forsuffixes|from|if|input|inwindow|keeping|kern|of|primarydef|quote|readstring|scaled|scantokens|secondarydef|shifted|skipto|slanted|step|tension|tertiarydef|to|transformed|until|vardef|withpen|withweight|xscaled|yscaled|zscaled)\b/,
49295
+ type: {
49296
+ pattern:
49297
+ /\b(?:boolean|expr|numeric|pair|path|pen|picture|primary|secondary|string|suffix|tertiary|text|transform)\b/,
49298
+ alias: 'property'
49299
+ },
49300
+ variable: {
49301
+ pattern:
49302
+ /(^|[^@#&$])(?:@#|#@|#|@)(?![@#&$])|\b(?:aspect_ratio|currentpen|currentpicture|currenttransform|d|extra_beginchar|extra_endchar|extra_setup|h|localfont|mag|mode|screen_cols|screen_rows|w|whatever|x|y|z)\b/,
49303
+ lookbehind: true
49304
+ }
49305
+ }
49306
+ }
49307
+
49172
49308
  ;// CONCATENATED MODULE: ../node_modules/refractor/lang/mizar.js
49173
49309
  // @ts-nocheck
49174
49310
  mizar.displayName = 'mizar'
@@ -49771,16 +49907,19 @@ function naniscript(Prism) {
49771
49907
  }
49772
49908
  Prism.languages.nani = Prism.languages['naniscript']
49773
49909
  /** @typedef {InstanceType<import("./prism-core")["Token"]>} Token */
49910
+
49774
49911
  /**
49775
49912
  * This hook is used to validate generic-text tokens for balanced brackets.
49776
49913
  * Mark token as bad-line when contains not balanced brackets: {},[]
49777
49914
  */
49915
+
49778
49916
  Prism.hooks.add('after-tokenize', function (env) {
49779
49917
  /** @type {(Token | string)[]} */
49780
49918
  var tokens = env.tokens
49781
49919
  tokens.forEach(function (token) {
49782
49920
  if (typeof token !== 'string' && token.type === 'generic-text') {
49783
49921
  var content = getTextContent(token)
49922
+
49784
49923
  if (!isBracketsBalanced(content)) {
49785
49924
  token.type = 'bad-line'
49786
49925
  token.content = content
@@ -49792,12 +49931,15 @@ function naniscript(Prism) {
49792
49931
  * @param {string} input
49793
49932
  * @returns {boolean}
49794
49933
  */
49934
+
49795
49935
  function isBracketsBalanced(input) {
49796
49936
  var brackets = '[]{}'
49797
49937
  var stack = []
49938
+
49798
49939
  for (var i = 0; i < input.length; i++) {
49799
49940
  var bracket = input[i]
49800
49941
  var bracketsIndex = brackets.indexOf(bracket)
49942
+
49801
49943
  if (bracketsIndex !== -1) {
49802
49944
  if (bracketsIndex % 2 === 0) {
49803
49945
  stack.push(bracketsIndex + 1)
@@ -49806,12 +49948,14 @@ function naniscript(Prism) {
49806
49948
  }
49807
49949
  }
49808
49950
  }
49951
+
49809
49952
  return stack.length === 0
49810
49953
  }
49811
49954
  /**
49812
49955
  * @param {string | Token | (string | Token)[]} token
49813
49956
  * @returns {string}
49814
49957
  */
49958
+
49815
49959
  function getTextContent(token) {
49816
49960
  if (typeof token === 'string') {
49817
49961
  return token
@@ -50238,7 +50382,7 @@ function nsis(Prism) {
50238
50382
  },
50239
50383
  keyword: {
50240
50384
  pattern:
50241
- /(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|BG(?:Font|Gradient|Image)|Banner|BrandingText|BringToFront|CRCCheck|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|Seek|Write|WriteByte|WriteUTF16LE|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DLLVersion(?:Local)?|DlgItem|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|LabelAddress|TempFileName)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|Silent)|InitPluginsDir|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|NSISdl|Name|Nop|OutFile|PE(?:DllCharacteristics|SubsysVer)|Page(?:Callbacks)?|Pop|Push|Quit|RMDir|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|UnRegDLL|Unicode|UninstPage|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UserInfo|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|Var|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle|ns(?:Dialogs|Exec))\b/m,
50385
+ /(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|BG(?:Font|Gradient|Image)|Banner|BrandingText|BringToFront|CRCCheck|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|Seek|Write|WriteByte|WriteUTF16LE|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DLLVersion(?:Local)?|DlgItem|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|KnownFolderPath|LabelAddress|TempFileName|WinVer)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|RtlLanguage|ShellVarContextAll|Silent)|InitPluginsDir|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|NSISdl|Name|Nop|OutFile|PE(?:DllCharacteristics|SubsysVer)|Page(?:Callbacks)?|Pop|Push|Quit|RMDir|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|Target|UnRegDLL|Unicode|UninstPage|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UserInfo|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|Var|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle|ns(?:Dialogs|Exec))\b/m,
50242
50386
  lookbehind: true
50243
50387
  },
50244
50388
  property:
@@ -50353,6 +50497,7 @@ function odin(Prism) {
50353
50497
  greedy: true
50354
50498
  }
50355
50499
  ],
50500
+
50356
50501
  /**
50357
50502
  * Should be found before strings because of '"'"- and '`'`-like sequences.
50358
50503
  */
@@ -50392,6 +50537,7 @@ function odin(Prism) {
50392
50537
  },
50393
50538
  keyword:
50394
50539
  /\b(?:asm|auto_cast|bit_set|break|case|cast|context|continue|defer|distinct|do|dynamic|else|enum|fallthrough|for|foreign|if|import|in|map|matrix|not_in|or_else|or_return|package|proc|return|struct|switch|transmute|typeid|union|using|when|where)\b/,
50540
+
50395
50541
  /**
50396
50542
  * false, nil, true can be used as procedure names. "_" and keywords can't.
50397
50543
  */
@@ -50479,7 +50625,9 @@ function opencl(Prism) {
50479
50625
  }
50480
50626
  }
50481
50627
  /* OpenCL host API */
50628
+
50482
50629
  Prism.languages.insertBefore('c', 'keyword', attributes) // C++ includes everything from the OpenCL C host API plus the classes defined in cl2.h
50630
+
50483
50631
  if (Prism.languages.cpp) {
50484
50632
  // Extracted from doxygen class list http://github.khronos.org/OpenCL-CLHPP/annotated.html
50485
50633
  attributes['type-opencl-host-cpp'] = {
@@ -50720,6 +50868,7 @@ pascal.aliases = ['objectpascal']
50720
50868
  /** @type {import('../core.js').Syntax} */
50721
50869
  function pascal(Prism) {
50722
50870
  // Based on Free Pascal
50871
+
50723
50872
  /* TODO
50724
50873
  Support inline asm ?
50725
50874
  */
@@ -51382,6 +51531,7 @@ function powershell(Prism) {
51382
51531
  },
51383
51532
  punctuation: /[|{}[\];(),.]/
51384
51533
  }) // Variable interpolation inside strings, and nested expressions
51534
+
51385
51535
  powershell.string[0].inside = {
51386
51536
  function: {
51387
51537
  // Allow for one level of nesting
@@ -51476,6 +51626,7 @@ function promql(Prism) {
51476
51626
  'quantile'
51477
51627
  ] // PromQL vector matching + the by and without clauses
51478
51628
  // (https://prometheus.io/docs/prometheus/latest/querying/operators/#vector-matching)
51629
+
51479
51630
  var vectorMatching = [
51480
51631
  'on',
51481
51632
  'ignoring',
@@ -51485,6 +51636,7 @@ function promql(Prism) {
51485
51636
  'without'
51486
51637
  ] // PromQL offset modifier
51487
51638
  // (https://prometheus.io/docs/prometheus/latest/querying/basics/#offset-modifier)
51639
+
51488
51640
  var offsetModifier = ['offset']
51489
51641
  var keywords = aggregations.concat(vectorMatching, offsetModifier)
51490
51642
  Prism.languages.promql = {
@@ -51644,6 +51796,7 @@ function stylus(Prism) {
51644
51796
  pattern: /(\b\d+)(?:%|[a-z]+)/,
51645
51797
  lookbehind: true
51646
51798
  } // 123 -123 .123 -.123 12.3 -12.3
51799
+
51647
51800
  var number = {
51648
51801
  pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,
51649
51802
  lookbehind: true
@@ -51823,6 +51976,7 @@ function twig(Prism) {
51823
51976
  if (env.language !== 'twig') {
51824
51977
  return
51825
51978
  }
51979
+
51826
51980
  var pattern = /\{(?:#[\s\S]*?#|%[\s\S]*?%|\{[\s\S]*?\})\}/g
51827
51981
  Prism.languages['markup-templating'].buildPlaceholders(env, 'twig', pattern)
51828
51982
  })
@@ -51988,6 +52142,7 @@ function pug(Prism) {
51988
52142
  var filter_pattern =
51989
52143
  /(^([\t ]*)):<filter_name>(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/
51990
52144
  .source // Non exhaustive list of available filters and associated languages
52145
+
51991
52146
  var filters = [
51992
52147
  {
51993
52148
  filter: 'atpl',
@@ -52009,6 +52164,7 @@ function pug(Prism) {
52009
52164
  'stylus'
52010
52165
  ]
52011
52166
  var all_filters = {}
52167
+
52012
52168
  for (var i = 0, l = filters.length; i < l; i++) {
52013
52169
  var filter = filters[i]
52014
52170
  filter =
@@ -52018,6 +52174,7 @@ function pug(Prism) {
52018
52174
  language: filter
52019
52175
  }
52020
52176
  : filter
52177
+
52021
52178
  if (Prism.languages[filter.language]) {
52022
52179
  all_filters['filter-' + filter.filter] = {
52023
52180
  pattern: RegExp(
@@ -52041,6 +52198,7 @@ function pug(Prism) {
52041
52198
  }
52042
52199
  }
52043
52200
  }
52201
+
52044
52202
  Prism.languages.insertBefore('pug', 'filter', all_filters)
52045
52203
  })(Prism)
52046
52204
  }
@@ -52268,10 +52426,12 @@ function pure(Prism) {
52268
52426
  var inlineLanguageRe = /%< *-\*- *<lang>\d* *-\*-[\s\S]+?%>/.source
52269
52427
  inlineLanguages.forEach(function (lang) {
52270
52428
  var alias = lang
52429
+
52271
52430
  if (typeof lang !== 'string') {
52272
52431
  alias = lang.alias
52273
52432
  lang = lang.lang
52274
52433
  }
52434
+
52275
52435
  if (Prism.languages[alias]) {
52276
52436
  var o = {}
52277
52437
  o['inline-lang-' + alias] = {
@@ -52290,6 +52450,7 @@ function pure(Prism) {
52290
52450
  Prism.languages.insertBefore('pure', 'inline-lang', o)
52291
52451
  }
52292
52452
  }) // C is the default inline language
52453
+
52293
52454
  if (Prism.languages.c) {
52294
52455
  Prism.languages.pure['inline-lang'].inside.rest = Prism.util.clone(
52295
52456
  Prism.languages.c
@@ -52448,6 +52609,7 @@ function qsharp(Prism) {
52448
52609
  * @param {string} [flags]
52449
52610
  * @returns {RegExp}
52450
52611
  */
52612
+
52451
52613
  function re(pattern, replacements, flags) {
52452
52614
  return RegExp(replace(pattern, replacements), flags || '')
52453
52615
  }
@@ -52458,15 +52620,18 @@ function qsharp(Prism) {
52458
52620
  * @param {number} depthLog2
52459
52621
  * @returns {string}
52460
52622
  */
52623
+
52461
52624
  function nested(pattern, depthLog2) {
52462
52625
  for (var i = 0; i < depthLog2; i++) {
52463
52626
  pattern = pattern.replace(/<<self>>/g, function () {
52464
52627
  return '(?:' + pattern + ')'
52465
52628
  })
52466
52629
  }
52630
+
52467
52631
  return pattern.replace(/<<self>>/g, '[^\\s\\S]')
52468
52632
  } // https://docs.microsoft.com/en-us/azure/quantum/user-guide/language/typesystem/
52469
52633
  // https://github.com/microsoft/qsharp-language/tree/main/Specifications/Language/5_Grammar
52634
+
52470
52635
  var keywordKinds = {
52471
52636
  // keywords which represent a return or variable type
52472
52637
  type: 'Adj BigInt Bool Ctl Double false Int One Pauli PauliI PauliX PauliY PauliZ Qubit Range Result String true Unit Zero',
@@ -52474,18 +52639,22 @@ function qsharp(Prism) {
52474
52639
  other:
52475
52640
  'Adjoint adjoint apply as auto body borrow borrowing Controlled controlled distribute elif else fail fixup for function if in internal intrinsic invert is let mutable namespace new newtype open operation repeat return self set until use using while within'
52476
52641
  } // keywords
52642
+
52477
52643
  function keywordsToPattern(words) {
52478
52644
  return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'
52479
52645
  }
52646
+
52480
52647
  var keywords = RegExp(
52481
52648
  keywordsToPattern(keywordKinds.type + ' ' + keywordKinds.other)
52482
52649
  ) // types
52650
+
52483
52651
  var identifier = /\b[A-Za-z_]\w*\b/.source
52484
52652
  var qualifiedName = replace(/<<0>>(?:\s*\.\s*<<0>>)*/.source, [identifier])
52485
52653
  var typeInside = {
52486
52654
  keyword: keywords,
52487
52655
  punctuation: /[<>()?,.:[\]]/
52488
52656
  } // strings
52657
+
52489
52658
  var regularString = /"(?:\\.|[^\\"])*"/.source
52490
52659
  Prism.languages.qsharp = Prism.languages.extend('clike', {
52491
52660
  comment: /\/\/.*/,
@@ -52526,6 +52695,7 @@ function qsharp(Prism) {
52526
52695
  alias: 'operator'
52527
52696
  }
52528
52697
  }) // single line
52698
+
52529
52699
  var interpolationExpr = nested(
52530
52700
  replace(/\{(?:[^"{}]|<<0>>|<<self>>)*\}/.source, [regularString]),
52531
52701
  2
@@ -52554,6 +52724,7 @@ function qsharp(Prism) {
52554
52724
  }
52555
52725
  })
52556
52726
  })(Prism)
52727
+
52557
52728
  Prism.languages.qs = Prism.languages.qsharp
52558
52729
  }
52559
52730
 
@@ -52638,11 +52809,13 @@ function qml(Prism) {
52638
52809
  .replace(/<comment>/g, function () {
52639
52810
  return jsComment
52640
52811
  }) // the pattern will blow up, so only a few iterations
52812
+
52641
52813
  for (var i = 0; i < 2; i++) {
52642
52814
  jsExpr = jsExpr.replace(/<expr>/g, function () {
52643
52815
  return jsExpr
52644
52816
  })
52645
52817
  }
52818
+
52646
52819
  jsExpr = jsExpr.replace(/<expr>/g, '[^\\s\\S]')
52647
52820
  Prism.languages.qml = {
52648
52821
  comment: {
@@ -52797,17 +52970,20 @@ function cshtml(Prism) {
52797
52970
  * @param {number} depthLog2
52798
52971
  * @returns {string}
52799
52972
  */
52973
+
52800
52974
  function nested(pattern, depthLog2) {
52801
52975
  for (var i = 0; i < depthLog2; i++) {
52802
52976
  pattern = pattern.replace(/<self>/g, function () {
52803
52977
  return '(?:' + pattern + ')'
52804
52978
  })
52805
52979
  }
52980
+
52806
52981
  return pattern
52807
52982
  .replace(/<self>/g, '[^\\s\\S]')
52808
52983
  .replace(/<str>/g, '(?:' + stringLike + ')')
52809
52984
  .replace(/<comment>/g, '(?:' + commentLike + ')')
52810
52985
  }
52986
+
52811
52987
  var round = nested(/\((?:[^()'"@/]|<str>|<comment>|<self>)*\)/.source, 2)
52812
52988
  var square = nested(/\[(?:[^\[\]'"@/]|<str>|<comment>|<self>)*\]/.source, 1)
52813
52989
  var curly = nested(/\{(?:[^{}'"@/]|<str>|<comment>|<self>)*\}/.source, 2)
@@ -52841,6 +53017,7 @@ function cshtml(Prism) {
52841
53017
  //
52842
53018
  // To somewhat alleviate the problem a bit, the patterns for characters (e.g. 'a') is very permissive, it also
52843
53019
  // allows invalid characters to support HTML expressions like this: <p>That's it!</p>.
53020
+
52844
53021
  var tagAttrInlineCs = /@(?![\w()])/.source + '|' + inlineCs
52845
53022
  var tagAttrValue =
52846
53023
  '(?:' +
@@ -52899,6 +53076,7 @@ function cshtml(Prism) {
52899
53076
  //
52900
53077
  // In the below code, both CSHTML and C#+HTML will be create as separate language definitions that reference each
52901
53078
  // other. However, only CSHTML will be exported via `Prism.languages`.
53079
+
52902
53080
  Prism.languages.cshtml = Prism.languages.extend('markup', {})
52903
53081
  var csharpWithHtml = Prism.languages.insertBefore(
52904
53082
  'csharp',
@@ -53037,6 +53215,7 @@ function jsx(Prism) {
53037
53215
  * @param {string} source
53038
53216
  * @param {string} [flags]
53039
53217
  */
53218
+
53040
53219
  function re(source, flags) {
53041
53220
  source = source
53042
53221
  .replace(/<S>/g, function () {
@@ -53050,6 +53229,7 @@ function jsx(Prism) {
53050
53229
  })
53051
53230
  return RegExp(source, flags)
53052
53231
  }
53232
+
53053
53233
  spread = re(spread).source
53054
53234
  Prism.languages.jsx = Prism.languages.extend('markup', javascript)
53055
53235
  Prism.languages.jsx.tag.pattern = re(
@@ -53092,23 +53272,30 @@ function jsx(Prism) {
53092
53272
  },
53093
53273
  Prism.languages.jsx.tag
53094
53274
  ) // The following will handle plain text inside tags
53275
+
53095
53276
  var stringifyToken = function (token) {
53096
53277
  if (!token) {
53097
53278
  return ''
53098
53279
  }
53280
+
53099
53281
  if (typeof token === 'string') {
53100
53282
  return token
53101
53283
  }
53284
+
53102
53285
  if (typeof token.content === 'string') {
53103
53286
  return token.content
53104
53287
  }
53288
+
53105
53289
  return token.content.map(stringifyToken).join('')
53106
53290
  }
53291
+
53107
53292
  var walkTokens = function (tokens) {
53108
53293
  var openedTags = []
53294
+
53109
53295
  for (var i = 0; i < tokens.length; i++) {
53110
53296
  var token = tokens[i]
53111
53297
  var notTagNorBrace = false
53298
+
53112
53299
  if (typeof token !== 'string') {
53113
53300
  if (
53114
53301
  token.type === 'tag' &&
@@ -53156,6 +53343,7 @@ function jsx(Prism) {
53156
53343
  notTagNorBrace = true
53157
53344
  }
53158
53345
  }
53346
+
53159
53347
  if (notTagNorBrace || typeof token === 'string') {
53160
53348
  if (
53161
53349
  openedTags.length > 0 &&
@@ -53164,6 +53352,7 @@ function jsx(Prism) {
53164
53352
  // Here we are inside a tag, and not inside a JSX context.
53165
53353
  // That's plain text: drop any tokens matched.
53166
53354
  var plainText = stringifyToken(token) // And merge text with adjacent text
53355
+
53167
53356
  if (
53168
53357
  i < tokens.length - 1 &&
53169
53358
  (typeof tokens[i + 1] === 'string' ||
@@ -53172,6 +53361,7 @@ function jsx(Prism) {
53172
53361
  plainText += stringifyToken(tokens[i + 1])
53173
53362
  tokens.splice(i + 1, 1)
53174
53363
  }
53364
+
53175
53365
  if (
53176
53366
  i > 0 &&
53177
53367
  (typeof tokens[i - 1] === 'string' ||
@@ -53181,6 +53371,7 @@ function jsx(Prism) {
53181
53371
  tokens.splice(i - 1, 1)
53182
53372
  i--
53183
53373
  }
53374
+
53184
53375
  tokens[i] = new Prism.Token(
53185
53376
  'plain-text',
53186
53377
  plainText,
@@ -53189,15 +53380,18 @@ function jsx(Prism) {
53189
53380
  )
53190
53381
  }
53191
53382
  }
53383
+
53192
53384
  if (token.content && typeof token.content !== 'string') {
53193
53385
  walkTokens(token.content)
53194
53386
  }
53195
53387
  }
53196
53388
  }
53389
+
53197
53390
  Prism.hooks.add('after-tokenize', function (env) {
53198
53391
  if (env.language !== 'jsx' && env.language !== 'tsx') {
53199
53392
  return
53200
53393
  }
53394
+
53201
53395
  walkTokens(env.tokens)
53202
53396
  })
53203
53397
  })(Prism)
@@ -53217,10 +53411,12 @@ function tsx(Prism) {
53217
53411
  ;(function (Prism) {
53218
53412
  var typescript = Prism.util.clone(Prism.languages.typescript)
53219
53413
  Prism.languages.tsx = Prism.languages.extend('jsx', typescript) // doesn't work with TS because TS is too complex
53414
+
53220
53415
  delete Prism.languages.tsx['parameter']
53221
53416
  delete Prism.languages.tsx['literal-property'] // This will prevent collisions between TSX tags and TS generic types.
53222
53417
  // Idea by https://github.com/karlhorky
53223
53418
  // Discussion: https://github.com/PrismJS/prism/issues/2594#issuecomment-710666928
53419
+
53224
53420
  var tag = Prism.languages.tsx.tag
53225
53421
  tag.pattern = RegExp(
53226
53422
  /(^|[^\w$]|(?=<\/))/.source + '(?:' + tag.pattern.source + ')',
@@ -53263,6 +53459,7 @@ function reason(Prism) {
53263
53459
  alias: 'symbol'
53264
53460
  }
53265
53461
  }) // We can't match functions property, so let's not even try.
53462
+
53266
53463
  delete Prism.languages.reason.function
53267
53464
  }
53268
53465
 
@@ -53726,15 +53923,18 @@ function robotframework(Prism) {
53726
53923
  punctuation: /^[$@&%]\{|\}$/
53727
53924
  }
53728
53925
  }
53926
+
53729
53927
  function createSection(name, inside) {
53730
53928
  var extendecInside = {}
53731
53929
  extendecInside['section-header'] = {
53732
53930
  pattern: /^ ?\*{3}.+?\*{3}/,
53733
53931
  alias: 'keyword'
53734
53932
  } // copy inside tokens
53933
+
53735
53934
  for (var token in inside) {
53736
53935
  extendecInside[token] = inside[token]
53737
53936
  }
53937
+
53738
53938
  extendecInside['tag'] = {
53739
53939
  pattern: /([\r\n](?: {2}|\t)[ \t]*)\[[-\w]+\]/,
53740
53940
  lookbehind: true,
@@ -53758,6 +53958,7 @@ function robotframework(Prism) {
53758
53958
  inside: extendecInside
53759
53959
  }
53760
53960
  }
53961
+
53761
53962
  var docTag = {
53762
53963
  pattern:
53763
53964
  /(\[Documentation\](?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,
@@ -54100,6 +54301,7 @@ function sas(Prism) {
54100
54301
  lookbehind: true,
54101
54302
  inside: args
54102
54303
  },
54304
+
54103
54305
  /*Special keywords within macros*/
54104
54306
  'macro-keyword': macroKeyword,
54105
54307
  'macro-variable': macroVariable,
@@ -54132,6 +54334,7 @@ function sas(Prism) {
54132
54334
  keyword: /%mend/i
54133
54335
  }
54134
54336
  },
54337
+
54135
54338
  /*%_zscore(headcir, _lhc, _mhc, _shc, headcz, headcpct, _Fheadcz); */
54136
54339
  macro: {
54137
54340
  pattern: /%_\w+(?=\()/,
@@ -54507,6 +54710,7 @@ function smarty(Prism) {
54507
54710
  ),
54508
54711
  'g'
54509
54712
  ) // Tokenize all inline Smarty expressions
54713
+
54510
54714
  Prism.hooks.add('before-tokenize', function (env) {
54511
54715
  var smartyLiteralStart = '{literal}'
54512
54716
  var smartyLiteralEnd = '{/literal}'
@@ -54520,16 +54724,20 @@ function smarty(Prism) {
54520
54724
  if (match === smartyLiteralEnd) {
54521
54725
  smartyLiteralMode = false
54522
54726
  }
54727
+
54523
54728
  if (!smartyLiteralMode) {
54524
54729
  if (match === smartyLiteralStart) {
54525
54730
  smartyLiteralMode = true
54526
54731
  }
54732
+
54527
54733
  return true
54528
54734
  }
54735
+
54529
54736
  return false
54530
54737
  }
54531
54738
  )
54532
54739
  }) // Re-insert the tokens after tokenizing
54740
+
54533
54741
  Prism.hooks.add('after-tokenize', function (env) {
54534
54742
  Prism.languages['markup-templating'].tokenizePlaceholders(env, 'smarty')
54535
54743
  })
@@ -54779,6 +54987,7 @@ function soy(Prism) {
54779
54987
  operator: /\?:?|<=?|>=?|==?|!=|[+*/%-]|\b(?:and|not|or)\b/,
54780
54988
  punctuation: /[{}()\[\]|.,:]/
54781
54989
  } // Tokenize all inline Soy expressions
54990
+
54782
54991
  Prism.hooks.add('before-tokenize', function (env) {
54783
54992
  var soyPattern = /\{\{.+?\}\}|\{.+?\}|\s\/\/.*|\/\*[\s\S]*?\*\//g
54784
54993
  var soyLitteralStart = '{literal}'
@@ -54793,16 +55002,20 @@ function soy(Prism) {
54793
55002
  if (match === soyLitteralEnd) {
54794
55003
  soyLitteralMode = false
54795
55004
  }
55005
+
54796
55006
  if (!soyLitteralMode) {
54797
55007
  if (match === soyLitteralStart) {
54798
55008
  soyLitteralMode = true
54799
55009
  }
55010
+
54800
55011
  return true
54801
55012
  }
55013
+
54802
55014
  return false
54803
55015
  }
54804
55016
  )
54805
55017
  }) // Re-insert the tokens after tokenizing
55018
+
54806
55019
  Prism.hooks.add('after-tokenize', function (env) {
54807
55020
  Prism.languages['markup-templating'].tokenizePlaceholders(env, 'soy')
54808
55021
  })
@@ -55379,6 +55592,7 @@ function t4Templating(Prism) {
55379
55592
  }
55380
55593
  }
55381
55594
  }
55595
+
55382
55596
  function createT4(insideLang) {
55383
55597
  var grammar = Prism.languages[insideLang]
55384
55598
  var className = 'language-' + insideLang
@@ -55403,6 +55617,7 @@ function t4Templating(Prism) {
55403
55617
  }
55404
55618
  }
55405
55619
  }
55620
+
55406
55621
  Prism.languages['t4-templating'] = Object.defineProperty({}, 'createT4', {
55407
55622
  value: createT4
55408
55623
  })
@@ -55575,6 +55790,7 @@ function tt2(Prism) {
55575
55790
  }
55576
55791
  }
55577
55792
  }) // The different types of TT2 strings "replace" the C-like standard string
55793
+
55578
55794
  delete Prism.languages.tt2.string
55579
55795
  Prism.hooks.add('before-tokenize', function (env) {
55580
55796
  var tt2Pattern = /\[%[\s\S]+?%\]/g
@@ -55602,11 +55818,13 @@ function toml(Prism) {
55602
55818
  /**
55603
55819
  * @param {string} pattern
55604
55820
  */
55821
+
55605
55822
  function insertKey(pattern) {
55606
55823
  return pattern.replace(/__/g, function () {
55607
55824
  return key
55608
55825
  })
55609
55826
  }
55827
+
55610
55828
  Prism.languages.toml = {
55611
55829
  comment: {
55612
55830
  pattern: /#.*/,
@@ -56541,15 +56759,128 @@ function webIdl(Prism) {
56541
56759
  operator: /\.{3}|[=:?<>-]/,
56542
56760
  punctuation: /[(){}[\].,;]/
56543
56761
  }
56762
+
56544
56763
  for (var key in Prism.languages['web-idl']) {
56545
56764
  if (key !== 'class-name') {
56546
56765
  typeInside[key] = Prism.languages['web-idl'][key]
56547
56766
  }
56548
56767
  }
56768
+
56549
56769
  Prism.languages['webidl'] = Prism.languages['web-idl']
56550
56770
  })(Prism)
56551
56771
  }
56552
56772
 
56773
+ ;// CONCATENATED MODULE: ../node_modules/refractor/lang/wgsl.js
56774
+ // @ts-nocheck
56775
+ wgsl.displayName = 'wgsl'
56776
+ wgsl.aliases = []
56777
+
56778
+ /** @type {import('../core.js').Syntax} */
56779
+ function wgsl(Prism) {
56780
+ Prism.languages.wgsl = {
56781
+ comment: {
56782
+ pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
56783
+ greedy: true
56784
+ },
56785
+ 'builtin-attribute': {
56786
+ pattern: /(@)builtin\(.*?\)/,
56787
+ lookbehind: true,
56788
+ inside: {
56789
+ attribute: {
56790
+ pattern: /^builtin/,
56791
+ alias: 'attr-name'
56792
+ },
56793
+ punctuation: /[(),]/,
56794
+ 'built-in-values': {
56795
+ pattern:
56796
+ /\b(?:frag_depth|front_facing|global_invocation_id|instance_index|local_invocation_id|local_invocation_index|num_workgroups|position|sample_index|sample_mask|vertex_index|workgroup_id)\b/,
56797
+ alias: 'attr-value'
56798
+ }
56799
+ }
56800
+ },
56801
+ attributes: {
56802
+ pattern:
56803
+ /(@)(?:align|binding|compute|const|fragment|group|id|interpolate|invariant|location|size|vertex|workgroup_size)/i,
56804
+ lookbehind: true,
56805
+ alias: 'attr-name'
56806
+ },
56807
+ functions: {
56808
+ pattern: /\b(fn\s+)[_a-zA-Z]\w*(?=[(<])/,
56809
+ lookbehind: true,
56810
+ alias: 'function'
56811
+ },
56812
+ keyword:
56813
+ /\b(?:bitcast|break|case|const|continue|continuing|default|discard|else|enable|fallthrough|fn|for|function|if|let|loop|private|return|storage|struct|switch|type|uniform|var|while|workgroup)\b/,
56814
+ builtin:
56815
+ /\b(?:abs|acos|acosh|all|any|array|asin|asinh|atan|atan2|atanh|atomic|atomicAdd|atomicAnd|atomicCompareExchangeWeak|atomicExchange|atomicLoad|atomicMax|atomicMin|atomicOr|atomicStore|atomicSub|atomicXor|bool|ceil|clamp|cos|cosh|countLeadingZeros|countOneBits|countTrailingZeros|cross|degrees|determinant|distance|dot|dpdx|dpdxCoarse|dpdxFine|dpdy|dpdyCoarse|dpdyFine|exp|exp2|extractBits|f32|f64|faceForward|firstLeadingBit|floor|fma|fract|frexp|fwidth|fwidthCoarse|fwidthFine|i32|i64|insertBits|inverseSqrt|ldexp|length|log|log2|mat[2-4]x[2-4]|max|min|mix|modf|normalize|override|pack2x16float|pack2x16snorm|pack2x16unorm|pack4x8snorm|pack4x8unorm|pow|ptr|quantizeToF16|radians|reflect|refract|reverseBits|round|sampler|sampler_comparison|select|shiftLeft|shiftRight|sign|sin|sinh|smoothstep|sqrt|staticAssert|step|storageBarrier|tan|tanh|textureDimensions|textureGather|textureGatherCompare|textureLoad|textureNumLayers|textureNumLevels|textureNumSamples|textureSample|textureSampleBias|textureSampleCompare|textureSampleCompareLevel|textureSampleGrad|textureSampleLevel|textureStore|texture_1d|texture_2d|texture_2d_array|texture_3d|texture_cube|texture_cube_array|texture_depth_2d|texture_depth_2d_array|texture_depth_cube|texture_depth_cube_array|texture_depth_multisampled_2d|texture_multisampled_2d|texture_storage_1d|texture_storage_2d|texture_storage_2d_array|texture_storage_3d|transpose|trunc|u32|u64|unpack2x16float|unpack2x16snorm|unpack2x16unorm|unpack4x8snorm|unpack4x8unorm|vec[2-4]|workgroupBarrier)\b/,
56816
+ 'function-calls': {
56817
+ pattern: /\b[_a-z]\w*(?=\()/i,
56818
+ alias: 'function'
56819
+ },
56820
+ 'class-name': /\b(?:[A-Z][A-Za-z0-9]*)\b/,
56821
+ 'bool-literal': {
56822
+ pattern: /\b(?:false|true)\b/,
56823
+ alias: 'boolean'
56824
+ },
56825
+ 'hex-int-literal': {
56826
+ pattern: /\b0[xX][0-9a-fA-F]+[iu]?\b(?![.pP])/,
56827
+ alias: 'number'
56828
+ },
56829
+ 'hex-float-literal': {
56830
+ pattern: /\b0[xX][0-9a-fA-F]*(?:\.[0-9a-fA-F]*)?(?:[pP][+-]?\d+[fh]?)?/,
56831
+ alias: 'number'
56832
+ },
56833
+ 'decimal-float-literal': [
56834
+ {
56835
+ pattern: /\d*\.\d+(?:[eE](?:\+|-)?\d+)?[fh]?/,
56836
+ alias: 'number'
56837
+ },
56838
+ {
56839
+ pattern: /\d+\.\d*(?:[eE](?:\+|-)?\d+)?[fh]?/,
56840
+ alias: 'number'
56841
+ },
56842
+ {
56843
+ pattern: /\d+[eE](?:\+|-)?\d+[fh]?/,
56844
+ alias: 'number'
56845
+ },
56846
+ {
56847
+ pattern: /\b\d+[fh]\b/,
56848
+ alias: 'number'
56849
+ }
56850
+ ],
56851
+ 'int-literal': {
56852
+ pattern: /\b\d+[iu]?\b/,
56853
+ alias: 'number'
56854
+ },
56855
+ operator: [
56856
+ {
56857
+ pattern: /(?:\^|~|\|(?!\|)|\|\||&&|<<|>>|!)(?!=)/
56858
+ },
56859
+ {
56860
+ pattern: /&(?![&=])/
56861
+ },
56862
+ {
56863
+ pattern: /(?:\+=|-=|\*=|\/=|%=|\^=|&=|\|=|<<=|>>=)/
56864
+ },
56865
+ {
56866
+ pattern: /(^|[^<>=!])=(?![=>])/,
56867
+ lookbehind: true
56868
+ },
56869
+ {
56870
+ pattern: /(?:==|!=|<=|\+\+|--|(^|[^=])>=)/,
56871
+ lookbehind: true
56872
+ },
56873
+ {
56874
+ pattern: /(?:(?:[+%]|(?:\*(?!\w)))(?!=))|(?:-(?!>))|(?:\/(?!\/))/
56875
+ },
56876
+ {
56877
+ pattern: /->/
56878
+ }
56879
+ ],
56880
+ punctuation: /[@(){}[\],;<>:.]/
56881
+ }
56882
+ }
56883
+
56553
56884
  ;// CONCATENATED MODULE: ../node_modules/refractor/lang/wiki.js
56554
56885
  // @ts-nocheck
56555
56886
 
@@ -56933,6 +57264,7 @@ function xmlDoc(Prism) {
56933
57264
  })
56934
57265
  }
56935
57266
  }
57267
+
56936
57268
  var tag = Prism.languages.markup.tag
56937
57269
  var slashDocComment = {
56938
57270
  pattern: /\/\/\/.*/,
@@ -57065,20 +57397,26 @@ function xquery(Prism) {
57065
57397
  inside: Prism.languages.xquery,
57066
57398
  alias: 'language-xquery'
57067
57399
  } // The following will handle plain text inside tags
57400
+
57068
57401
  var stringifyToken = function (token) {
57069
57402
  if (typeof token === 'string') {
57070
57403
  return token
57071
57404
  }
57405
+
57072
57406
  if (typeof token.content === 'string') {
57073
57407
  return token.content
57074
57408
  }
57409
+
57075
57410
  return token.content.map(stringifyToken).join('')
57076
57411
  }
57412
+
57077
57413
  var walkTokens = function (tokens) {
57078
57414
  var openedTags = []
57415
+
57079
57416
  for (var i = 0; i < tokens.length; i++) {
57080
57417
  var token = tokens[i]
57081
57418
  var notTagNorBrace = false
57419
+
57082
57420
  if (typeof token !== 'string') {
57083
57421
  if (
57084
57422
  token.type === 'tag' &&
@@ -57132,6 +57470,7 @@ function xquery(Prism) {
57132
57470
  notTagNorBrace = true
57133
57471
  }
57134
57472
  }
57473
+
57135
57474
  if (notTagNorBrace || typeof token === 'string') {
57136
57475
  if (
57137
57476
  openedTags.length > 0 &&
@@ -57140,6 +57479,7 @@ function xquery(Prism) {
57140
57479
  // Here we are inside a tag, and not inside an XQuery expression.
57141
57480
  // That's plain text: drop any tokens matched.
57142
57481
  var plainText = stringifyToken(token) // And merge text with adjacent text
57482
+
57143
57483
  if (
57144
57484
  i < tokens.length - 1 &&
57145
57485
  (typeof tokens[i + 1] === 'string' ||
@@ -57148,6 +57488,7 @@ function xquery(Prism) {
57148
57488
  plainText += stringifyToken(tokens[i + 1])
57149
57489
  tokens.splice(i + 1, 1)
57150
57490
  }
57491
+
57151
57492
  if (
57152
57493
  i > 0 &&
57153
57494
  (typeof tokens[i - 1] === 'string' ||
@@ -57157,6 +57498,7 @@ function xquery(Prism) {
57157
57498
  tokens.splice(i - 1, 1)
57158
57499
  i--
57159
57500
  }
57501
+
57160
57502
  if (/^\s+$/.test(plainText)) {
57161
57503
  tokens[i] = plainText
57162
57504
  } else {
@@ -57169,15 +57511,18 @@ function xquery(Prism) {
57169
57511
  }
57170
57512
  }
57171
57513
  }
57514
+
57172
57515
  if (token.content && typeof token.content !== 'string') {
57173
57516
  walkTokens(token.content)
57174
57517
  }
57175
57518
  }
57176
57519
  }
57520
+
57177
57521
  Prism.hooks.add('after-tokenize', function (env) {
57178
57522
  if (env.language !== 'xquery') {
57179
57523
  return
57180
57524
  }
57525
+
57181
57526
  walkTokens(env.tokens)
57182
57527
  })
57183
57528
  })(Prism)
@@ -57225,6 +57570,7 @@ function zig(Prism) {
57225
57570
  return str
57226
57571
  }
57227
57572
  }
57573
+
57228
57574
  var keyword =
57229
57575
  /\b(?:align|allowzero|and|anyframe|anytype|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|nosuspend|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/
57230
57576
  var IDENTIFIER = '\\b(?!' + keyword.source + ')(?!\\d)\\w+\\b'
@@ -57257,6 +57603,7 @@ function zig(Prism) {
57257
57603
  * IDENTIFIER = \b (?! KEYWORD ) [a-zA-Z_] \w* \b
57258
57604
  *
57259
57605
  */
57606
+
57260
57607
  Prism.languages.zig = {
57261
57608
  comment: [
57262
57609
  {
@@ -57632,6 +57979,13 @@ function zig(Prism) {
57632
57979
 
57633
57980
 
57634
57981
 
57982
+
57983
+
57984
+
57985
+
57986
+
57987
+
57988
+
57635
57989
 
57636
57990
 
57637
57991
 
@@ -57680,10 +58034,12 @@ refractor.register(awk)
57680
58034
  refractor.register(basic)
57681
58035
  refractor.register(batch)
57682
58036
  refractor.register(bbcode)
58037
+ refractor.register(bbj)
57683
58038
  refractor.register(bicep)
57684
58039
  refractor.register(birb)
57685
58040
  refractor.register(bison)
57686
58041
  refractor.register(bnf)
58042
+ refractor.register(bqn)
57687
58043
  refractor.register(brainfuck)
57688
58044
  refractor.register(brightscript)
57689
58045
  refractor.register(bro)
@@ -57691,6 +58047,8 @@ refractor.register(bsl)
57691
58047
  refractor.register(cfscript)
57692
58048
  refractor.register(chaiscript)
57693
58049
  refractor.register(cil)
58050
+ refractor.register(cilkc)
58051
+ refractor.register(cilkcpp)
57694
58052
  refractor.register(clojure)
57695
58053
  refractor.register(cmake)
57696
58054
  refractor.register(cobol)
@@ -57747,6 +58105,7 @@ refractor.register(gn)
57747
58105
  refractor.register(linkerScript)
57748
58106
  refractor.register(go)
57749
58107
  refractor.register(goModule)
58108
+ refractor.register(gradle)
57750
58109
  refractor.register(graphql)
57751
58110
  refractor.register(groovy)
57752
58111
  refractor.register(less)
@@ -57813,6 +58172,7 @@ refractor.register(matlab)
57813
58172
  refractor.register(maxscript)
57814
58173
  refractor.register(mel)
57815
58174
  refractor.register(mermaid)
58175
+ refractor.register(metafont)
57816
58176
  refractor.register(mizar)
57817
58177
  refractor.register(mongodb)
57818
58178
  refractor.register(monkey)
@@ -57921,6 +58281,7 @@ refractor.register(visualBasic)
57921
58281
  refractor.register(warpscript)
57922
58282
  refractor.register(wasm)
57923
58283
  refractor.register(webIdl)
58284
+ refractor.register(wgsl)
57924
58285
  refractor.register(wiki)
57925
58286
  refractor.register(wolfram)
57926
58287
  refractor.register(wren)
@@ -57934,7 +58295,7 @@ refractor.register(zig)
57934
58295
 
57935
58296
 
57936
58297
  ;// CONCATENATED MODULE: ../node_modules/rehype-prism-plus/dist/rehype-prism-plus.es.js
57937
- function a(){a=function(e,r){return new t(e,void 0,r)};var e=RegExp.prototype,r=new WeakMap;function t(e,n,i){var o=new RegExp(e,n);return r.set(o,i||r.get(e)),l(o,t.prototype)}function n(e,t){var n=r.get(t);return Object.keys(n).reduce(function(r,t){return r[t]=e[n[t]],r},Object.create(null))}return rehype_prism_plus_es_s(t,RegExp),t.prototype.exec=function(r){var t=e.exec.call(this,r);return t&&(t.groups=n(t,this)),t},t.prototype[Symbol.replace]=function(t,i){if("string"==typeof i){var o=r.get(this);return e[Symbol.replace].call(this,t,i.replace(/\$<([^>]+)>/g,function(e,r){return"$"+o[r]}))}if("function"==typeof i){var a=this;return e[Symbol.replace].call(this,t,function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(n(e,a)),i.apply(this,e)})}return e[Symbol.replace].call(this,t,i)},a.apply(this,arguments)}function rehype_prism_plus_es_s(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&l(e,r)}function l(e,r){return l=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},l(e,r)}function rehype_prism_plus_es_u(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function rehype_prism_plus_es_c(e,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,r){if(e){if("string"==typeof e)return rehype_prism_plus_es_u(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?rehype_prism_plus_es_u(e,r):void 0}}(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var p=function(i){return function(o){return void 0===o&&(o={}),function(r){visit(r,"element",s)};function s(e,s,l){if(l&&"pre"===l.tagName&&"code"===e.tagName){var u=e.data&&e.data.meta?e.data.meta:"";e.properties.className?"boolean"==typeof e.properties.className?e.properties.className=[]:Array.isArray(e.properties.className)||(e.properties.className=[e.properties.className]):e.properties.className=[],e.properties.className.push("code-highlight");var p,f,m=function(e){for(var r,t=rehype_prism_plus_es_c(e.properties.className);!(r=t()).done;){var n=r.value;if("language-"===n.slice(0,9))return n.slice(9).toLowerCase()}return null}(e);if(m)try{p=i.highlight(hast_util_to_string_toString(e),m),l.properties.className=(l.properties.className||[]).concat("language-"+m)}catch(r){if(!o.ignoreMissing||!/Unknown language/.test(r.message))throw r;p=e}else p=e;p.children=(f=1,function e(r){return r.reduce(function(r,t){if("text"===t.type){var n=t.value,i=(n.match(/\n/g)||"").length;if(0===i)t.position={start:{line:f,column:0},end:{line:f,column:0}},r.push(t);else for(var o,a=n.split("\n"),s=rehype_prism_plus_es_c(a.entries());!(o=s()).done;){var l=o.value,u=l[0],p=l[1];r.push({type:"text",value:u===a.length-1?p:p+"\n",position:{start:{line:f+u},end:{line:f+u}}})}return f+=i,r}if(Object.prototype.hasOwnProperty.call(t,"children")){var m=f;return t.children=e(t.children),r.push(t),t.position={start:{line:m,column:0},end:{line:f,column:0}},r}return r.push(t),r},[])})(p.children),p.position=p.children.length>0?{start:{line:p.children[0].position.start.line,column:0},end:{line:p.children[p.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var h,d=function(e){var r=/{([\d,-]+)}/,t=e.split(",").map(function(e){return e.trim()}).join();if(r.test(t)){var i=r.exec(t)[1],o=parse_numeric_range(i);return function(e){return o.includes(e+1)}}return function(){return!1}}(u),g=function(e){var r=/*#__PURE__*/a(/showLineNumbers=([0-9]+)/i,{lines:1});if(r.test(e)){var t=r.exec(e);return Number(t.groups.lines)}return 1}(u),y=function(e){for(var r=new Array(e),t=0;t<e;t++)r[t]={type:"element",tagName:"span",properties:{className:[]},children:[]};return r}(p.position.end.line),v=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],b=function(){var e=h.value,n=e[0],i=e[1];i.properties.className=["code-line"];var a=filter(p,function(e){return e.position.start.line<=n+1&&e.position.end.line>=n+1});i.children=a.children,!u.toLowerCase().includes("showLineNumbers".toLowerCase())&&!o.showLineNumbers||v.some(function(e){return u.toLowerCase().includes(e)})||(i.properties.line=[(n+g).toString()],i.properties.className.push("line-number")),d(n)&&i.properties.className.push("highlight-line"),"diff"===m&&"-"===hast_util_to_string_toString(i).substring(0,1)?i.properties.className.push("deleted"):"diff"===m&&"+"===hast_util_to_string_toString(i).substring(0,1)&&i.properties.className.push("inserted")},w=rehype_prism_plus_es_c(y.entries());!(h=w()).done;)b();y.length>0&&""===hast_util_to_string_toString(y[y.length-1]).trim()&&y.pop(),e.children=y}}}},f=p(refractor),m=p(refractor);
58298
+ function l(){l=function(e,r){return new t(e,void 0,r)};var e=RegExp.prototype,r=new WeakMap;function t(e,n,i){var o=new RegExp(e,n);return r.set(o,i||r.get(e)),a(o,t.prototype)}function n(e,t){var n=r.get(t);return Object.keys(n).reduce(function(r,t){return r[t]=e[n[t]],r},Object.create(null))}return rehype_prism_plus_es_s(t,RegExp),t.prototype.exec=function(r){var t=e.exec.call(this,r);return t&&(t.groups=n(t,this)),t},t.prototype[Symbol.replace]=function(t,i){if("string"==typeof i){var o=r.get(this);return e[Symbol.replace].call(this,t,i.replace(/\$<([^>]+)>/g,function(e,r){return"$"+o[r]}))}if("function"==typeof i){var l=this;return e[Symbol.replace].call(this,t,function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(n(e,l)),i.apply(this,e)})}return e[Symbol.replace].call(this,t,i)},l.apply(this,arguments)}function rehype_prism_plus_es_s(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&a(e,r)}function a(e,r){return a=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},a(e,r)}function rehype_prism_plus_es_u(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function rehype_prism_plus_es_c(e,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,r){if(e){if("string"==typeof e)return rehype_prism_plus_es_u(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?rehype_prism_plus_es_u(e,r):void 0}}(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var p=function(i){return function(o){return void 0===o&&(o={}),function(r){visit(r,"element",s)};function s(e,s,a){if(a&&"pre"===a.tagName&&"code"===e.tagName){var u=e.data&&e.data.meta?e.data.meta:"";e.properties.className?"boolean"==typeof e.properties.className?e.properties.className=[]:Array.isArray(e.properties.className)||(e.properties.className=[e.properties.className]):e.properties.className=[],e.properties.className.push("code-highlight");var p,f,m=function(e){for(var r,t=rehype_prism_plus_es_c(e.properties.className);!(r=t()).done;){var n=r.value;if("language-"===n.slice(0,9))return n.slice(9).toLowerCase()}return null}(e);if(m)try{var h;h=null!=m&&m.includes("diff-")?m.split("-")[1]:m,p=i.highlight(hast_util_to_string_toString(e),h),a.properties.className=(a.properties.className||[]).concat("language-"+h)}catch(r){if(!o.ignoreMissing||!/Unknown language/.test(r.message))throw r;p=e}else p=e;p.children=(f=1,function e(r){return r.reduce(function(r,t){if("text"===t.type){var n=t.value,i=(n.match(/\n/g)||"").length;if(0===i)t.position={start:{line:f,column:1},end:{line:f,column:1}},r.push(t);else for(var o,l=n.split("\n"),s=rehype_prism_plus_es_c(l.entries());!(o=s()).done;){var a=o.value,u=a[0],p=a[1];r.push({type:"text",value:u===l.length-1?p:p+"\n",position:{start:{line:f+u,column:1},end:{line:f+u,column:1}}})}return f+=i,r}if(Object.prototype.hasOwnProperty.call(t,"children")){var m=f;return t.children=e(t.children),r.push(t),t.position={start:{line:m,column:1},end:{line:f,column:1}},r}return r.push(t),r},[])})(p.children),p.position=p.children.length>0?{start:{line:p.children[0].position.start.line,column:0},end:{line:p.children[p.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var d,g=function(e){var r=/{([\d,-]+)}/,t=e.split(",").map(function(e){return e.trim()}).join();if(r.test(t)){var i=r.exec(t)[1],o=parse_numeric_range(i);return function(e){return o.includes(e+1)}}return function(){return!1}}(u),y=function(e){var r=/*#__PURE__*/l(/showLineNumbers=([0-9]+)/i,{lines:1});if(r.test(e)){var t=r.exec(e);return Number(t.groups.lines)}return 1}(u),v=function(e){for(var r=new Array(e),t=0;t<e;t++)r[t]={type:"element",tagName:"span",properties:{className:[]},children:[]};return r}(p.position.end.line),b=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],w=function(){var e=d.value,n=e[0],i=e[1];i.properties.className=["code-line"];var l=filter(p,function(e){return e.position.start.line<=n+1&&e.position.end.line>=n+1});i.children=l.children,!u.toLowerCase().includes("showLineNumbers".toLowerCase())&&!o.showLineNumbers||b.some(function(e){return u.toLowerCase().includes(e)})||(i.properties.line=[(n+y).toString()],i.properties.className.push("line-number")),g(n)&&i.properties.className.push("highlight-line"),("diff"===m||null!=m&&m.includes("diff-"))&&"-"===hast_util_to_string_toString(i).substring(0,1)?i.properties.className.push("deleted"):("diff"===m||null!=m&&m.includes("diff-"))&&"+"===hast_util_to_string_toString(i).substring(0,1)&&i.properties.className.push("inserted")},N=rehype_prism_plus_es_c(v.entries());!(d=N()).done;)w();v.length>0&&""===hast_util_to_string_toString(v[v.length-1]).trim()&&v.pop(),e.children=v}}}},f=p(refractor),m=p(refractor);
57938
58299
  //# sourceMappingURL=rehype-prism-plus.es.js.map
57939
58300
 
57940
58301
  ;// CONCATENATED MODULE: ../node_modules/direction/index.js
@@ -61308,121 +61669,6 @@ function toDecimal(code, next, omit) {
61308
61669
  : value + ';'
61309
61670
  }
61310
61671
 
61311
- ;// CONCATENATED MODULE: ../node_modules/stringify-entities/node_modules/character-entities-legacy/index.js
61312
- /**
61313
- * List of legacy HTML named character references that don’t need a trailing semicolon.
61314
- *
61315
- * @type {Array<string>}
61316
- */
61317
- const character_entities_legacy_characterEntitiesLegacy = [
61318
- 'AElig',
61319
- 'AMP',
61320
- 'Aacute',
61321
- 'Acirc',
61322
- 'Agrave',
61323
- 'Aring',
61324
- 'Atilde',
61325
- 'Auml',
61326
- 'COPY',
61327
- 'Ccedil',
61328
- 'ETH',
61329
- 'Eacute',
61330
- 'Ecirc',
61331
- 'Egrave',
61332
- 'Euml',
61333
- 'GT',
61334
- 'Iacute',
61335
- 'Icirc',
61336
- 'Igrave',
61337
- 'Iuml',
61338
- 'LT',
61339
- 'Ntilde',
61340
- 'Oacute',
61341
- 'Ocirc',
61342
- 'Ograve',
61343
- 'Oslash',
61344
- 'Otilde',
61345
- 'Ouml',
61346
- 'QUOT',
61347
- 'REG',
61348
- 'THORN',
61349
- 'Uacute',
61350
- 'Ucirc',
61351
- 'Ugrave',
61352
- 'Uuml',
61353
- 'Yacute',
61354
- 'aacute',
61355
- 'acirc',
61356
- 'acute',
61357
- 'aelig',
61358
- 'agrave',
61359
- 'amp',
61360
- 'aring',
61361
- 'atilde',
61362
- 'auml',
61363
- 'brvbar',
61364
- 'ccedil',
61365
- 'cedil',
61366
- 'cent',
61367
- 'copy',
61368
- 'curren',
61369
- 'deg',
61370
- 'divide',
61371
- 'eacute',
61372
- 'ecirc',
61373
- 'egrave',
61374
- 'eth',
61375
- 'euml',
61376
- 'frac12',
61377
- 'frac14',
61378
- 'frac34',
61379
- 'gt',
61380
- 'iacute',
61381
- 'icirc',
61382
- 'iexcl',
61383
- 'igrave',
61384
- 'iquest',
61385
- 'iuml',
61386
- 'laquo',
61387
- 'lt',
61388
- 'macr',
61389
- 'micro',
61390
- 'middot',
61391
- 'nbsp',
61392
- 'not',
61393
- 'ntilde',
61394
- 'oacute',
61395
- 'ocirc',
61396
- 'ograve',
61397
- 'ordf',
61398
- 'ordm',
61399
- 'oslash',
61400
- 'otilde',
61401
- 'ouml',
61402
- 'para',
61403
- 'plusmn',
61404
- 'pound',
61405
- 'quot',
61406
- 'raquo',
61407
- 'reg',
61408
- 'sect',
61409
- 'shy',
61410
- 'sup1',
61411
- 'sup2',
61412
- 'sup3',
61413
- 'szlig',
61414
- 'thorn',
61415
- 'times',
61416
- 'uacute',
61417
- 'ucirc',
61418
- 'ugrave',
61419
- 'uml',
61420
- 'uuml',
61421
- 'yacute',
61422
- 'yen',
61423
- 'yuml'
61424
- ]
61425
-
61426
61672
  ;// CONCATENATED MODULE: ../node_modules/character-entities-html4/index.js
61427
61673
  /**
61428
61674
  * Map of named character references from HTML 4.
@@ -61743,7 +61989,7 @@ function toNamed(code, next, omit, attribute) {
61743
61989
 
61744
61990
  if (
61745
61991
  omit &&
61746
- character_entities_legacy_characterEntitiesLegacy.includes(name) &&
61992
+ characterEntitiesLegacy.includes(name) &&
61747
61993
  !dangerous.includes(name) &&
61748
61994
  (!attribute ||
61749
61995
  (next &&
@@ -62573,7 +62819,7 @@ var TextArea_excluded=["prefixCls","className","onScroll","renderTextarea"];func
62573
62819
  // extracted by mini-css-extract-plugin
62574
62820
  /* harmony default export */ const Child = ({});
62575
62821
  ;// CONCATENATED MODULE: ./src/components/Toolbar/Child.tsx
62576
- function Child_Child(props){var _ref=props||{},prefixCls=_ref.prefixCls,groupName=_ref.groupName,commands=_ref.commands,children=_ref.children;var _useContext=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(EditorContext),_useContext$barPopup=_useContext.barPopup,barPopup=_useContext$barPopup===void 0?{}:_useContext$barPopup;return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return/*#__PURE__*/(0,jsx_runtime.jsx)("div",{className:"".concat(prefixCls,"-toolbar-child ").concat(groupName&&barPopup[groupName]?'active':''),onClick:function onClick(e){return e.stopPropagation();},children:Array.isArray(commands)?/*#__PURE__*/(0,jsx_runtime.jsx)(Toolbar_Toolbar,_objectSpread2(_objectSpread2({commands:commands},props),{},{height:"",isChild:true})):children});},// eslint-disable-next-line react-hooks/exhaustive-deps
62822
+ function Child_Child(props){var _ref=props||{},prefixCls=_ref.prefixCls,groupName=_ref.groupName,commands=_ref.commands,children=_ref.children;var _useContext=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(EditorContext),_useContext$barPopup=_useContext.barPopup,barPopup=_useContext$barPopup===void 0?{}:_useContext$barPopup;return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return/*#__PURE__*/(0,jsx_runtime.jsx)("div",{className:"".concat(prefixCls,"-toolbar-child ").concat(groupName&&barPopup[groupName]?'active':''),onClick:function onClick(e){return e.stopPropagation();},children:Array.isArray(commands)?/*#__PURE__*/(0,jsx_runtime.jsx)(Toolbar_Toolbar,_objectSpread2(_objectSpread2({commands:commands},props),{},{isChild:true})):children});},// eslint-disable-next-line react-hooks/exhaustive-deps
62577
62823
  [commands,barPopup,groupName,prefixCls]);}
62578
62824
  ;// CONCATENATED MODULE: ./src/components/Toolbar/index.less
62579
62825
  // extracted by mini-css-extract-plugin
@@ -62582,7 +62828,7 @@ function Child_Child(props){var _ref=props||{},prefixCls=_ref.prefixCls,groupNam
62582
62828
  function ToolbarItems(props){var prefixCls=props.prefixCls,overflow=props.overflow;var _useContext=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(EditorContext),fullscreen=_useContext.fullscreen,preview=_useContext.preview,_useContext$barPopup=_useContext.barPopup,barPopup=_useContext$barPopup===void 0?{}:_useContext$barPopup,components=_useContext.components,commandOrchestrator=_useContext.commandOrchestrator,dispatch=_useContext.dispatch;var originalOverflow=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)('');function handleClick(command,name){if(!dispatch)return;var state={barPopup:_objectSpread2({},barPopup)};if(command.keyCommand==='preview'){state.preview=command.value;}if(command.keyCommand==='fullscreen'){state.fullscreen=!fullscreen;}if(props.commands&&command.keyCommand==='group'){props.commands.forEach(function(item){if(name===item.groupName){state.barPopup[name]=true;}else if(item.keyCommand){state.barPopup[item.groupName]=false;}});}else if(name||command.parent){Object.keys(state.barPopup||{}).forEach(function(keyName){state.barPopup[keyName]=false;});}if(Object.keys(state).length){dispatch(_objectSpread2({},state));}commandOrchestrator&&commandOrchestrator.executeCommand(command);}(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function(){if(document&&overflow){if(fullscreen){// prevent scroll on fullscreen
62583
62829
  document.body.style.overflow='hidden';}else{// get the original overflow only the first time
62584
62830
  if(!originalOverflow.current){originalOverflow.current=window.getComputedStyle(document.body,null).overflow;}// reset to the original overflow
62585
- document.body.style.overflow=originalOverflow.current;}}},[fullscreen,originalOverflow,overflow]);return/*#__PURE__*/(0,jsx_runtime.jsx)("ul",{children:(props.commands||[]).map(function(item,idx){if(item.keyCommand==='divider'){return/*#__PURE__*/(0,jsx_runtime.jsx)("li",_objectSpread2(_objectSpread2({},item.liProps),{},{className:"".concat(prefixCls,"-toolbar-divider")}),idx);}if(!item.keyCommand)return/*#__PURE__*/(0,jsx_runtime.jsx)(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment,{},idx);var activeBtn=fullscreen&&item.keyCommand==='fullscreen'||item.keyCommand==='preview'&&preview===item.value;var childNode=item.children&&typeof item.children==='function'?item.children({getState:function getState(){return commandOrchestrator.getState();},textApi:commandOrchestrator?commandOrchestrator.textApi:undefined,close:function close(){return handleClick({},item.groupName);},execute:function execute(){return handleClick({execute:item.execute});}}):undefined;var disabled=barPopup&&preview&&preview==='preview'&&!/(preview|fullscreen)/.test(item.keyCommand);var render=(components===null||components===void 0?void 0:components.toolbar)||item.render;var com=render&&typeof render==='function'?render(item,!!disabled,handleClick,idx):null;return/*#__PURE__*/(0,jsx_runtime.jsxs)("li",_objectSpread2(_objectSpread2({},item.liProps),{},{className:activeBtn?"active":'',children:[com&&/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(com)&&com,!com&&!item.buttonProps&&item.icon,!com&&item.buttonProps&&/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement('button',_objectSpread2(_objectSpread2({type:'button',key:idx,disabled:disabled,'data-name':item.name},item.buttonProps),{},{onClick:function onClick(evn){evn.stopPropagation();handleClick(item,item.groupName);}}),item.icon),item.children&&/*#__PURE__*/(0,jsx_runtime.jsx)(Child_Child,{overflow:overflow,groupName:item.groupName,prefixCls:prefixCls,children:childNode,commands:Array.isArray(item.children)?item.children:undefined})]}),idx);})});}function Toolbar_Toolbar(){var props=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var prefixCls=props.prefixCls,_props$height=props.height,height=_props$height===void 0?29:_props$height,toolbarBottom=props.toolbarBottom,isChild=props.isChild;var _useContext2=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(EditorContext),commands=_useContext2.commands,extraCommands=_useContext2.extraCommands;var bottomClassName=toolbarBottom?'bottom':'';return/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{className:"".concat(prefixCls,"-toolbar ").concat(bottomClassName),style:{height:height},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(ToolbarItems,_objectSpread2(_objectSpread2({},props),{},{commands:props.commands||commands||[]})),!isChild&&/*#__PURE__*/(0,jsx_runtime.jsx)(ToolbarItems,_objectSpread2(_objectSpread2({},props),{},{commands:extraCommands||[]}))]});}
62831
+ document.body.style.overflow=originalOverflow.current;}}},[fullscreen,originalOverflow,overflow]);return/*#__PURE__*/(0,jsx_runtime.jsx)("ul",{children:(props.commands||[]).map(function(item,idx){if(item.keyCommand==='divider'){return/*#__PURE__*/(0,jsx_runtime.jsx)("li",_objectSpread2(_objectSpread2({},item.liProps),{},{className:"".concat(prefixCls,"-toolbar-divider")}),idx);}if(!item.keyCommand)return/*#__PURE__*/(0,jsx_runtime.jsx)(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment,{},idx);var activeBtn=fullscreen&&item.keyCommand==='fullscreen'||item.keyCommand==='preview'&&preview===item.value;var childNode=item.children&&typeof item.children==='function'?item.children({getState:function getState(){return commandOrchestrator.getState();},textApi:commandOrchestrator?commandOrchestrator.textApi:undefined,close:function close(){return handleClick({},item.groupName);},execute:function execute(){return handleClick({execute:item.execute});}}):undefined;var disabled=barPopup&&preview&&preview==='preview'&&!/(preview|fullscreen)/.test(item.keyCommand);var render=(components===null||components===void 0?void 0:components.toolbar)||item.render;var com=render&&typeof render==='function'?render(item,!!disabled,handleClick,idx):null;return/*#__PURE__*/(0,jsx_runtime.jsxs)("li",_objectSpread2(_objectSpread2({},item.liProps),{},{className:activeBtn?"active":'',children:[com&&/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(com)&&com,!com&&!item.buttonProps&&item.icon,!com&&item.buttonProps&&/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement('button',_objectSpread2(_objectSpread2({type:'button',key:idx,disabled:disabled,'data-name':item.name},item.buttonProps),{},{onClick:function onClick(evn){evn.stopPropagation();handleClick(item,item.groupName);}}),item.icon),item.children&&/*#__PURE__*/(0,jsx_runtime.jsx)(Child_Child,{overflow:overflow,groupName:item.groupName,prefixCls:prefixCls,children:childNode,commands:Array.isArray(item.children)?item.children:undefined})]}),idx);})});}function Toolbar_Toolbar(){var props=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var prefixCls=props.prefixCls,toolbarBottom=props.toolbarBottom,isChild=props.isChild;var _useContext2=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(EditorContext),commands=_useContext2.commands,extraCommands=_useContext2.extraCommands;var bottomClassName=toolbarBottom?'bottom':'';return/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{className:"".concat(prefixCls,"-toolbar ").concat(bottomClassName),children:[/*#__PURE__*/(0,jsx_runtime.jsx)(ToolbarItems,_objectSpread2(_objectSpread2({},props),{},{commands:props.commands||commands||[]})),!isChild&&/*#__PURE__*/(0,jsx_runtime.jsx)(ToolbarItems,_objectSpread2(_objectSpread2({},props),{},{commands:extraCommands||[]}))]});}
62586
62832
  ;// CONCATENATED MODULE: ./src/components/DragBar/index.less
62587
62833
  // extracted by mini-css-extract-plugin
62588
62834
  /* harmony default export */ const DragBar = ({});
@@ -62593,14 +62839,14 @@ var DragBar_DragBar=function DragBar(props){var _ref=props||{},prefixCls=_ref.pr
62593
62839
  // extracted by mini-css-extract-plugin
62594
62840
  /* harmony default export */ const src = ({});
62595
62841
  ;// CONCATENATED MODULE: ./src/Editor.tsx
62596
- var Editor_excluded=["prefixCls","className","value","commands","commandsFilter","extraCommands","height","toolbarHeight","enableScroll","visibleDragbar","highlightEnable","preview","fullscreen","overflow","previewOptions","textareaProps","maxHeight","minHeight","autoFocus","tabSize","defaultTabEnable","onChange","onHeightChange","hideToolbar","toolbarBottom","components","renderTextarea"];function setGroupPopFalse(){var data=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};Object.keys(data).forEach(function(keyname){data[keyname]=false;});return data;}var InternalMDEditor=function InternalMDEditor(props,ref){var _ref=props||{},_ref$prefixCls=_ref.prefixCls,prefixCls=_ref$prefixCls===void 0?'w-md-editor':_ref$prefixCls,className=_ref.className,propsValue=_ref.value,_ref$commands=_ref.commands,commands=_ref$commands===void 0?commands_getCommands():_ref$commands,commandsFilter=_ref.commandsFilter,_ref$extraCommands=_ref.extraCommands,extraCommands=_ref$extraCommands===void 0?getExtraCommands():_ref$extraCommands,_ref$height=_ref.height,height=_ref$height===void 0?200:_ref$height,_ref$toolbarHeight=_ref.toolbarHeight,toolbarHeight=_ref$toolbarHeight===void 0?29:_ref$toolbarHeight,_ref$enableScroll=_ref.enableScroll,enableScroll=_ref$enableScroll===void 0?true:_ref$enableScroll,_ref$visibleDragbar=_ref.visibleDragbar,visibleDragbar=_ref$visibleDragbar===void 0?typeof props.visiableDragbar==='boolean'?props.visiableDragbar:true:_ref$visibleDragbar,_ref$highlightEnable=_ref.highlightEnable,highlightEnable=_ref$highlightEnable===void 0?true:_ref$highlightEnable,_ref$preview=_ref.preview,previewType=_ref$preview===void 0?'live':_ref$preview,_ref$fullscreen=_ref.fullscreen,fullscreen=_ref$fullscreen===void 0?false:_ref$fullscreen,_ref$overflow=_ref.overflow,overflow=_ref$overflow===void 0?true:_ref$overflow,_ref$previewOptions=_ref.previewOptions,previewOptions=_ref$previewOptions===void 0?{}:_ref$previewOptions,textareaProps=_ref.textareaProps,_ref$maxHeight=_ref.maxHeight,maxHeight=_ref$maxHeight===void 0?1200:_ref$maxHeight,_ref$minHeight=_ref.minHeight,minHeight=_ref$minHeight===void 0?100:_ref$minHeight,autoFocus=_ref.autoFocus,_ref$tabSize=_ref.tabSize,tabSize=_ref$tabSize===void 0?2:_ref$tabSize,_ref$defaultTabEnable=_ref.defaultTabEnable,defaultTabEnable=_ref$defaultTabEnable===void 0?false:_ref$defaultTabEnable,_onChange=_ref.onChange,onHeightChange=_ref.onHeightChange,hideToolbar=_ref.hideToolbar,_ref$toolbarBottom=_ref.toolbarBottom,toolbarBottom=_ref$toolbarBottom===void 0?false:_ref$toolbarBottom,components=_ref.components,renderTextarea=_ref.renderTextarea,other=_objectWithoutProperties(_ref,Editor_excluded);var cmds=commands.map(function(item){return commandsFilter?commandsFilter(item,false):item;}).filter(Boolean);var extraCmds=extraCommands.map(function(item){return commandsFilter?commandsFilter(item,true):item;}).filter(Boolean);var _useReducer=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useReducer)(reducer,{markdown:propsValue,preview:previewType,components:components,height:height,highlightEnable:highlightEnable,tabSize:tabSize,defaultTabEnable:defaultTabEnable,scrollTop:0,scrollTopPreview:0,commands:cmds,extraCommands:extraCmds,fullscreen:fullscreen,barPopup:{}}),_useReducer2=_slicedToArray(_useReducer,2),state=_useReducer2[0],dispatch=_useReducer2[1];var container=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);var previewRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);var enableScrollRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(enableScroll);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref,function(){return _objectSpread2({},state);});(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return enableScrollRef.current=enableScroll;},[enableScroll]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function(){var stateInit={};if(container.current){stateInit.container=container.current||undefined;}stateInit.markdown=propsValue||'';stateInit.barPopup={};if(dispatch){dispatch(_objectSpread2(_objectSpread2({},state),stateInit));}// eslint-disable-next-line react-hooks/exhaustive-deps
62842
+ var Editor_excluded=["prefixCls","className","value","commands","commandsFilter","extraCommands","height","enableScroll","visibleDragbar","highlightEnable","preview","fullscreen","overflow","previewOptions","textareaProps","maxHeight","minHeight","autoFocus","tabSize","defaultTabEnable","onChange","onHeightChange","hideToolbar","toolbarBottom","components","renderTextarea"];function setGroupPopFalse(){var data=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};Object.keys(data).forEach(function(keyname){data[keyname]=false;});return data;}var InternalMDEditor=function InternalMDEditor(props,ref){var _ref=props||{},_ref$prefixCls=_ref.prefixCls,prefixCls=_ref$prefixCls===void 0?'w-md-editor':_ref$prefixCls,className=_ref.className,propsValue=_ref.value,_ref$commands=_ref.commands,commands=_ref$commands===void 0?commands_getCommands():_ref$commands,commandsFilter=_ref.commandsFilter,_ref$extraCommands=_ref.extraCommands,extraCommands=_ref$extraCommands===void 0?getExtraCommands():_ref$extraCommands,_ref$height=_ref.height,height=_ref$height===void 0?200:_ref$height,_ref$enableScroll=_ref.enableScroll,enableScroll=_ref$enableScroll===void 0?true:_ref$enableScroll,_ref$visibleDragbar=_ref.visibleDragbar,visibleDragbar=_ref$visibleDragbar===void 0?typeof props.visiableDragbar==='boolean'?props.visiableDragbar:true:_ref$visibleDragbar,_ref$highlightEnable=_ref.highlightEnable,highlightEnable=_ref$highlightEnable===void 0?true:_ref$highlightEnable,_ref$preview=_ref.preview,previewType=_ref$preview===void 0?'live':_ref$preview,_ref$fullscreen=_ref.fullscreen,fullscreen=_ref$fullscreen===void 0?false:_ref$fullscreen,_ref$overflow=_ref.overflow,overflow=_ref$overflow===void 0?true:_ref$overflow,_ref$previewOptions=_ref.previewOptions,previewOptions=_ref$previewOptions===void 0?{}:_ref$previewOptions,textareaProps=_ref.textareaProps,_ref$maxHeight=_ref.maxHeight,maxHeight=_ref$maxHeight===void 0?1200:_ref$maxHeight,_ref$minHeight=_ref.minHeight,minHeight=_ref$minHeight===void 0?100:_ref$minHeight,autoFocus=_ref.autoFocus,_ref$tabSize=_ref.tabSize,tabSize=_ref$tabSize===void 0?2:_ref$tabSize,_ref$defaultTabEnable=_ref.defaultTabEnable,defaultTabEnable=_ref$defaultTabEnable===void 0?false:_ref$defaultTabEnable,_onChange=_ref.onChange,onHeightChange=_ref.onHeightChange,hideToolbar=_ref.hideToolbar,_ref$toolbarBottom=_ref.toolbarBottom,toolbarBottom=_ref$toolbarBottom===void 0?false:_ref$toolbarBottom,components=_ref.components,renderTextarea=_ref.renderTextarea,other=_objectWithoutProperties(_ref,Editor_excluded);var cmds=commands.map(function(item){return commandsFilter?commandsFilter(item,false):item;}).filter(Boolean);var extraCmds=extraCommands.map(function(item){return commandsFilter?commandsFilter(item,true):item;}).filter(Boolean);var _useReducer=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useReducer)(reducer,{markdown:propsValue,preview:previewType,components:components,height:height,highlightEnable:highlightEnable,tabSize:tabSize,defaultTabEnable:defaultTabEnable,scrollTop:0,scrollTopPreview:0,commands:cmds,extraCommands:extraCmds,fullscreen:fullscreen,barPopup:{}}),_useReducer2=_slicedToArray(_useReducer,2),state=_useReducer2[0],dispatch=_useReducer2[1];var container=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);var previewRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);var enableScrollRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(enableScroll);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref,function(){return _objectSpread2({},state);});(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return enableScrollRef.current=enableScroll;},[enableScroll]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function(){var stateInit={};if(container.current){stateInit.container=container.current||undefined;}stateInit.markdown=propsValue||'';stateInit.barPopup={};if(dispatch){dispatch(_objectSpread2(_objectSpread2({},state),stateInit));}// eslint-disable-next-line react-hooks/exhaustive-deps
62597
62843
  },[]);var cls=[className,'wmde-markdown-var',prefixCls,state.preview?"".concat(prefixCls,"-show-").concat(state.preview):null,state.fullscreen?"".concat(prefixCls,"-fullscreen"):null].filter(Boolean).join(' ').trim();(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return propsValue!==state.markdown&&dispatch({markdown:propsValue||''});},[propsValue,state.markdown]);// eslint-disable-next-line react-hooks/exhaustive-deps
62598
62844
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return previewType!==state.preview&&dispatch({preview:previewType});},[previewType]);// eslint-disable-next-line react-hooks/exhaustive-deps
62599
62845
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return tabSize!==state.tabSize&&dispatch({tabSize:tabSize});},[tabSize]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return highlightEnable!==state.highlightEnable&&dispatch({highlightEnable:highlightEnable});},// eslint-disable-next-line react-hooks/exhaustive-deps
62600
62846
  [highlightEnable]);// eslint-disable-next-line react-hooks/exhaustive-deps
62601
62847
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return autoFocus!==state.autoFocus&&dispatch({autoFocus:autoFocus});},[autoFocus]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return fullscreen!==state.fullscreen&&dispatch({fullscreen:fullscreen});},// eslint-disable-next-line react-hooks/exhaustive-deps
62602
62848
  [fullscreen]);// eslint-disable-next-line react-hooks/exhaustive-deps
62603
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return height!==state.height&&dispatch({height:height});},[height]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return height!==state.height&&onHeightChange&&onHeightChange(state.height,height,state);},[height,onHeightChange,state]);var textareaDomRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();var active=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)('preview');var initScroll=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){textareaDomRef.current=state.textareaWarp;if(state.textareaWarp){state.textareaWarp.addEventListener('mouseover',function(){active.current='text';});state.textareaWarp.addEventListener('mouseleave',function(){active.current='preview';});}},[state.textareaWarp]);var handleScroll=function handleScroll(e,type){if(!enableScrollRef.current)return;var textareaDom=textareaDomRef.current;var previewDom=previewRef.current?previewRef.current.mdp.current:undefined;if(!initScroll.current){active.current=type;initScroll.current=true;}if(textareaDom&&previewDom){var scale=(textareaDom.scrollHeight-textareaDom.offsetHeight)/(previewDom.scrollHeight-previewDom.offsetHeight);if(e.target===textareaDom&&active.current==='text'){previewDom.scrollTop=textareaDom.scrollTop/scale;}if(e.target===previewDom&&active.current==='preview'){textareaDom.scrollTop=previewDom.scrollTop*scale;}var scrollTop=0;if(active.current==='text'){scrollTop=textareaDom.scrollTop||0;}else if(active.current==='preview'){scrollTop=previewDom.scrollTop||0;}dispatch({scrollTop:scrollTop});}};var mdPreview=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return/*#__PURE__*/(0,jsx_runtime.jsx)(esm,_objectSpread2(_objectSpread2({},previewOptions),{},{onScroll:function onScroll(e){return handleScroll(e,'preview');},ref:previewRef,source:state.markdown||'',className:"".concat(prefixCls,"-preview ").concat(previewOptions.className||'')}));},[prefixCls,previewOptions,state.markdown]);return/*#__PURE__*/(0,jsx_runtime.jsx)(EditorContext.Provider,{value:_objectSpread2(_objectSpread2({},state),{},{dispatch:dispatch}),children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",_objectSpread2(_objectSpread2({ref:container,className:cls},other),{},{onClick:function onClick(){dispatch({barPopup:_objectSpread2({},setGroupPopFalse(state.barPopup))});},style:_objectSpread2(_objectSpread2({},other.style),{},{height:state.height||'100%'}),children:[!hideToolbar&&!toolbarBottom&&/*#__PURE__*/(0,jsx_runtime.jsx)(Toolbar_Toolbar,{prefixCls:prefixCls,height:toolbarHeight,overflow:overflow,toolbarBottom:toolbarBottom}),/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{className:"".concat(prefixCls,"-content"),style:{height:"calc(100% - ".concat(toolbarHeight,"px)")},children:[/(edit|live)/.test(state.preview||'')&&/*#__PURE__*/(0,jsx_runtime.jsx)(TextArea_TextArea,_objectSpread2(_objectSpread2({className:"".concat(prefixCls,"-input"),prefixCls:prefixCls,autoFocus:autoFocus},textareaProps),{},{onChange:function onChange(evn){_onChange&&_onChange(evn.target.value,evn,state);if(textareaProps&&textareaProps.onChange){textareaProps.onChange(evn);}},renderTextarea:(components===null||components===void 0?void 0:components.textarea)||renderTextarea,onScroll:function onScroll(e){return handleScroll(e,'text');}})),/(live|preview)/.test(state.preview||'')&&mdPreview]}),visibleDragbar&&!state.fullscreen&&/*#__PURE__*/(0,jsx_runtime.jsx)(components_DragBar,{prefixCls:prefixCls,height:state.height,maxHeight:maxHeight,minHeight:minHeight,onChange:function onChange(newHeight){dispatch({height:newHeight});}}),!hideToolbar&&toolbarBottom&&/*#__PURE__*/(0,jsx_runtime.jsx)(Toolbar_Toolbar,{prefixCls:prefixCls,height:toolbarHeight,overflow:overflow,toolbarBottom:toolbarBottom})]}))});};var mdEditor=/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(InternalMDEditor);mdEditor.Markdown=esm;/* harmony default export */ const Editor = (mdEditor);
62849
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return height!==state.height&&dispatch({height:height});},[height]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return height!==state.height&&onHeightChange&&onHeightChange(state.height,height,state);},[height,onHeightChange,state]);var textareaDomRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();var active=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)('preview');var initScroll=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){textareaDomRef.current=state.textareaWarp;if(state.textareaWarp){state.textareaWarp.addEventListener('mouseover',function(){active.current='text';});state.textareaWarp.addEventListener('mouseleave',function(){active.current='preview';});}},[state.textareaWarp]);var handleScroll=function handleScroll(e,type){if(!enableScrollRef.current)return;var textareaDom=textareaDomRef.current;var previewDom=previewRef.current?previewRef.current:undefined;if(!initScroll.current){active.current=type;initScroll.current=true;}if(textareaDom&&previewDom){var scale=(textareaDom.scrollHeight-textareaDom.offsetHeight)/(previewDom.scrollHeight-previewDom.offsetHeight);if(e.target===textareaDom&&active.current==='text'){previewDom.scrollTop=textareaDom.scrollTop/scale;}if(e.target===previewDom&&active.current==='preview'){textareaDom.scrollTop=previewDom.scrollTop*scale;}var scrollTop=0;if(active.current==='text'){scrollTop=textareaDom.scrollTop||0;}else if(active.current==='preview'){scrollTop=previewDom.scrollTop||0;}dispatch({scrollTop:scrollTop});}};var previewClassName="".concat(prefixCls,"-preview ").concat(previewOptions.className||'');var mdPreview=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return/*#__PURE__*/(0,jsx_runtime.jsx)("div",{ref:previewRef,className:previewClassName,children:/*#__PURE__*/(0,jsx_runtime.jsx)(esm,_objectSpread2(_objectSpread2({},previewOptions),{},{onScroll:function onScroll(e){return handleScroll(e,'preview');},source:state.markdown||''}))});},[previewClassName,previewOptions,state.markdown]);var preview=(components===null||components===void 0?void 0:components.preview)&&(components===null||components===void 0?void 0:components.preview(state.markdown||'',state,dispatch));if(preview&&/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(preview)){mdPreview=/*#__PURE__*/(0,jsx_runtime.jsx)("div",{className:previewClassName,ref:previewRef,onScroll:function onScroll(e){return handleScroll(e,'preview');},children:preview});}return/*#__PURE__*/(0,jsx_runtime.jsx)(EditorContext.Provider,{value:_objectSpread2(_objectSpread2({},state),{},{dispatch:dispatch}),children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",_objectSpread2(_objectSpread2({ref:container,className:cls},other),{},{onClick:function onClick(){dispatch({barPopup:_objectSpread2({},setGroupPopFalse(state.barPopup))});},style:_objectSpread2(_objectSpread2({},other.style),{},{height:state.height||'100%'}),children:[!hideToolbar&&!toolbarBottom&&/*#__PURE__*/(0,jsx_runtime.jsx)(Toolbar_Toolbar,{prefixCls:prefixCls,overflow:overflow,toolbarBottom:toolbarBottom}),/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{className:"".concat(prefixCls,"-content"),children:[/(edit|live)/.test(state.preview||'')&&/*#__PURE__*/(0,jsx_runtime.jsx)(TextArea_TextArea,_objectSpread2(_objectSpread2({className:"".concat(prefixCls,"-input"),prefixCls:prefixCls,autoFocus:autoFocus},textareaProps),{},{onChange:function onChange(evn){_onChange&&_onChange(evn.target.value,evn,state);if(textareaProps&&textareaProps.onChange){textareaProps.onChange(evn);}},renderTextarea:(components===null||components===void 0?void 0:components.textarea)||renderTextarea,onScroll:function onScroll(e){return handleScroll(e,'text');}})),/(live|preview)/.test(state.preview||'')&&mdPreview]}),visibleDragbar&&!state.fullscreen&&/*#__PURE__*/(0,jsx_runtime.jsx)(components_DragBar,{prefixCls:prefixCls,height:state.height,maxHeight:maxHeight,minHeight:minHeight,onChange:function onChange(newHeight){dispatch({height:newHeight});}}),!hideToolbar&&toolbarBottom&&/*#__PURE__*/(0,jsx_runtime.jsx)(Toolbar_Toolbar,{prefixCls:prefixCls,overflow:overflow,toolbarBottom:toolbarBottom})]}))});};var mdEditor=/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(InternalMDEditor);mdEditor.Markdown=esm;/* harmony default export */ const Editor = (mdEditor);
62604
62850
  ;// CONCATENATED MODULE: ./src/index.tsx
62605
62851
  /* harmony default export */ const src_0 = (Editor);
62606
62852
  })();