securemark 0.243.2 → 0.244.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.244.2
4
+
5
+ - Refactoring.
6
+
7
+ ## 0.244.1
8
+
9
+ - Refactoring.
10
+
11
+ ## 0.244.0
12
+
13
+ - Change mathblock syntax to increase the maximum number of contained lines to 300.
14
+ - Fix fence parser.
15
+
3
16
  ## 0.243.2
4
17
 
5
18
  - Refactoring.
package/design.md CHANGED
@@ -297,3 +297,4 @@ MarkdownはGFMのように最初から高機能で完成度の高い拡張不要
297
297
  ### Data URI
298
298
 
299
299
  Data URIは保存および転送容量削減ならびに集約的管理のためサポートしない。
300
+ 特に規制および公開レベルの媒体別の設定のためテキストとメディアの分離が必須となる。
@@ -1,4 +1,4 @@
1
- /*! securemark v0.243.2 https://github.com/falsandtru/securemark | (c) 2017, falsandtru | UNLICENSED */
1
+ /*! securemark v0.244.2 https://github.com/falsandtru/securemark | (c) 2017, falsandtru | UNLICENSED */
2
2
  require = function () {
3
3
  function r(e, n, t) {
4
4
  function o(i, f) {
@@ -670,7 +670,7 @@ require = function () {
670
670
  ];
671
671
  for (let i = 0; i < count; ++i) {
672
672
  try {
673
- jobs[i]();
673
+ (void 0, jobs[i])();
674
674
  jobs[i] = void 0;
675
675
  } catch (reason) {
676
676
  (0, exception_1.causeAsyncException)(reason);
@@ -796,12 +796,13 @@ require = function () {
796
796
  'use strict';
797
797
  Object.defineProperty(exports, '__esModule', { value: true });
798
798
  exports.causeAsyncException = void 0;
799
+ const global_1 = _dereq_('./global');
799
800
  function causeAsyncException(reason) {
800
- void Promise.reject(reason);
801
+ global_1.Promise.reject(reason);
801
802
  }
802
803
  exports.causeAsyncException = causeAsyncException;
803
804
  },
804
- {}
805
+ { './global': 13 }
805
806
  ],
806
807
  13: [
807
808
  function (_dereq_, module, exports) {
@@ -1225,6 +1226,7 @@ require = function () {
1225
1226
  'use strict';
1226
1227
  Object.defineProperty(exports, '__esModule', { value: true });
1227
1228
  exports.isPrimitive = exports.isType = exports.type = void 0;
1229
+ const global_1 = _dereq_('./global');
1228
1230
  const alias_1 = _dereq_('./alias');
1229
1231
  const toString = Object.prototype.toString.call.bind(Object.prototype.toString);
1230
1232
  const ObjectPrototype = Object.prototype;
@@ -1236,8 +1238,10 @@ require = function () {
1236
1238
  return 'null';
1237
1239
  const type = typeof value;
1238
1240
  if (type === 'object') {
1241
+ if (value[global_1.Symbol.toStringTag])
1242
+ return value[global_1.Symbol.toStringTag];
1239
1243
  const proto = (0, alias_1.ObjectGetPrototypeOf)(value);
1240
- if (proto === ObjectPrototype || proto === null)
1244
+ if (proto === ObjectPrototype)
1241
1245
  return 'Object';
1242
1246
  if (proto === ArrayPrototype)
1243
1247
  return 'Array';
@@ -1262,7 +1266,10 @@ require = function () {
1262
1266
  }
1263
1267
  exports.isPrimitive = isPrimitive;
1264
1268
  },
1265
- { './alias': 5 }
1269
+ {
1270
+ './alias': 5,
1271
+ './global': 13
1272
+ }
1266
1273
  ],
1267
1274
  21: [
1268
1275
  function (_dereq_, module, exports) {
@@ -1589,6 +1596,7 @@ require = function () {
1589
1596
  }
1590
1597
  exports.define = define;
1591
1598
  function defineAttrs(el, attrs) {
1599
+ var _a, _b;
1592
1600
  for (const name in attrs) {
1593
1601
  if (!(0, alias_1.hasOwnProperty)(attrs, name))
1594
1602
  continue;
@@ -1602,9 +1610,10 @@ require = function () {
1602
1610
  throw new Error(`TypedDOM: Attribute names for event listeners must have an event name but got "${ name }".`);
1603
1611
  const names = name.split(/\s+/);
1604
1612
  for (const name of names) {
1605
- if (name.slice(0, 2) !== 'on')
1613
+ if (!name.startsWith('on'))
1606
1614
  throw new Error(`TypedDOM: Attribute names for event listeners must start with "on" but got "${ name }".`);
1607
- el.addEventListener(name.slice(2), value, {
1615
+ const eventname = name.slice(2).toLowerCase();
1616
+ el.addEventListener(eventname, value, {
1608
1617
  passive: [
1609
1618
  'wheel',
1610
1619
  'mousewheel',
@@ -1612,8 +1621,15 @@ require = function () {
1612
1621
  'touchmove',
1613
1622
  'touchend',
1614
1623
  'touchcancel'
1615
- ].includes(name.slice(2))
1624
+ ].includes(eventname)
1616
1625
  });
1626
+ switch (eventname) {
1627
+ case 'mutate':
1628
+ case 'connect':
1629
+ case 'disconnect':
1630
+ const prop = `on${ eventname }`;
1631
+ prop in el ? (_a = el[prop]) !== null && _a !== void 0 ? _a : el[prop] = ev => ev.returnValue : (_b = el[prop]) !== null && _b !== void 0 ? _b : el[prop] = '';
1632
+ }
1617
1633
  }
1618
1634
  continue;
1619
1635
  case 'object':
@@ -2067,24 +2083,37 @@ require = function () {
2067
2083
  return;
2068
2084
  let block = '';
2069
2085
  let closer = '';
2070
- for (let count = 1, next = (0, line_1.firstline)(rest);; ++count) {
2086
+ let overflow = '';
2087
+ for (let count = 1;; ++count) {
2071
2088
  if (rest === '')
2072
2089
  break;
2073
- const line = next;
2074
- next = (0, line_1.firstline)(rest.slice(line.length));
2075
- if (count > limit + 1 && (0, line_1.isEmpty)(line))
2076
- break;
2077
- if (count <= limit + 1 && line.slice(0, delim.length) === delim && line.trimEnd() === delim && (!separation || (0, line_1.isEmpty)(next))) {
2078
- closer = delim;
2079
- rest = rest.slice(line.length);
2090
+ const line = (0, line_1.firstline)(rest);
2091
+ if ((closer || count > limit + 1) && (0, line_1.isEmpty)(line))
2080
2092
  break;
2093
+ if (closer) {
2094
+ overflow += line;
2095
+ }
2096
+ if (!closer && count <= limit + 1 && line.slice(0, delim.length) === delim && line.trimEnd() === delim) {
2097
+ closer = line;
2098
+ if ((0, line_1.isEmpty)((0, line_1.firstline)(rest.slice(line.length)))) {
2099
+ rest = rest.slice(line.length);
2100
+ break;
2101
+ }
2102
+ if (!separation) {
2103
+ rest = rest.slice(line.length);
2104
+ break;
2105
+ }
2106
+ overflow = line;
2107
+ }
2108
+ if (!overflow) {
2109
+ block += line;
2081
2110
  }
2082
- block += line;
2083
2111
  rest = rest.slice(line.length);
2084
2112
  }
2085
2113
  return [
2086
2114
  (0, array_1.unshift)([
2087
2115
  block,
2116
+ overflow,
2088
2117
  closer
2089
2118
  ], matches),
2090
2119
  rest
@@ -2457,6 +2486,7 @@ require = function () {
2457
2486
  'use strict';
2458
2487
  Object.defineProperty(exports, '__esModule', { value: true });
2459
2488
  exports.check = exports.exec = exports.eval = exports.Delimiters = void 0;
2489
+ const global_1 = _dereq_('spica/global');
2460
2490
  class Delimiters {
2461
2491
  constructor() {
2462
2492
  this.matchers = [];
@@ -2465,7 +2495,7 @@ require = function () {
2465
2495
  push(delimiter) {
2466
2496
  const {signature, matcher, escape} = delimiter;
2467
2497
  if (this.record[signature] === !escape) {
2468
- this.matchers.unshift(() => undefined);
2498
+ this.matchers.unshift(() => global_1.undefined);
2469
2499
  } else {
2470
2500
  this.matchers.unshift(matcher);
2471
2501
  this.record[signature] = !escape;
@@ -2501,7 +2531,7 @@ require = function () {
2501
2531
  }
2502
2532
  exports.check = check;
2503
2533
  },
2504
- {}
2534
+ { 'spica/global': 13 }
2505
2535
  ],
2506
2536
  46: [
2507
2537
  function (_dereq_, module, exports) {
@@ -3403,7 +3433,7 @@ require = function () {
3403
3433
  const language = /^[0-9a-z]+(?:-[a-z][0-9a-z]*)*$/i;
3404
3434
  exports.segment = (0, combinator_1.block)((0, combinator_1.validate)('```', (0, combinator_1.clear)((0, combinator_1.fence)(opener, 300))));
3405
3435
  exports.segment_ = (0, combinator_1.block)((0, combinator_1.validate)('```', (0, combinator_1.clear)((0, combinator_1.fence)(opener, 300, false))), false);
3406
- exports.codeblock = (0, combinator_1.block)((0, combinator_1.validate)('```', (0, combinator_1.fmap)((0, combinator_1.fence)(opener, 300), ([body, closer, opener, delim, param], _, context) => {
3436
+ exports.codeblock = (0, combinator_1.block)((0, combinator_1.validate)('```', (0, combinator_1.fmap)((0, combinator_1.fence)(opener, 300), ([body, overflow, closer, opener, delim, param], _, context) => {
3407
3437
  var _a, _b, _c, _d, _e, _f;
3408
3438
  const params = (_b = (_a = param.match(/(?:\\.?|\S)+/g)) === null || _a === void 0 ? void 0 : _a.reduce((params, value, i) => {
3409
3439
  var _a, _b, _c;
@@ -3423,17 +3453,17 @@ require = function () {
3423
3453
  params.lang = file && file.includes('.', 1) ? (_c = (_b = file.split('.').pop()) === null || _b === void 0 ? void 0 : _b.match(language)) === null || _c === void 0 ? void 0 : _c[0].toLowerCase() : params.lang;
3424
3454
  }
3425
3455
  }
3426
- name in params ? params.invalid = `Duplicate ${ name } value` : params[name] = value;
3456
+ name in params ? params.invalid = `Duplicate ${ name } attribute` : params[name] = value;
3427
3457
  return params;
3428
3458
  }, {})) !== null && _b !== void 0 ? _b : {};
3429
- if (!closer || params.invalid)
3459
+ if (!closer || overflow || params.invalid)
3430
3460
  return [(0, dom_1.html)('pre', {
3431
3461
  class: 'invalid',
3432
3462
  translate: 'no',
3433
3463
  'data-invalid-syntax': 'codeblock',
3434
- 'data-invalid-type': !closer ? 'fence' : 'argument',
3435
- 'data-invalid-message': !closer ? `Missing the closing delimiter "${ delim }"` : params.invalid
3436
- }, `${ opener }${ body }${ closer }`)];
3464
+ 'data-invalid-type': !closer || overflow ? 'fence' : 'argument',
3465
+ 'data-invalid-message': !closer ? `Missing the closing delimiter "${ delim }"` : overflow ? `Invalid trailing line after the closing delimiter "${ delim }"` : params.invalid
3466
+ }, `${ opener }${ body }${ overflow || closer }`)];
3437
3467
  const el = (0, dom_1.html)('pre', {
3438
3468
  class: params.lang ? `code language-${ params.lang }` : 'text',
3439
3469
  translate: params.lang ? 'no' : global_1.undefined,
@@ -3554,16 +3584,16 @@ require = function () {
3554
3584
  const indexee_1 = _dereq_('../../inline/extension/indexee');
3555
3585
  const parse_1 = _dereq_('../../api/parse');
3556
3586
  const dom_1 = _dereq_('typed-dom/dom');
3557
- exports.aside = (0, combinator_1.creator)(100, (0, combinator_1.block)((0, combinator_1.validate)('~~~', (0, combinator_1.fmap)((0, combinator_1.fence)(/^(~{3,})aside(?!\S)([^\n]*)(?:$|\n)/, 300), ([body, closer, opener, delim, param], _, context) => {
3587
+ exports.aside = (0, combinator_1.creator)(100, (0, combinator_1.block)((0, combinator_1.validate)('~~~', (0, combinator_1.fmap)((0, combinator_1.fence)(/^(~{3,})aside(?!\S)([^\n]*)(?:$|\n)/, 300), ([body, overflow, closer, opener, delim, param], _, context) => {
3558
3588
  var _a;
3559
- if (!closer || param.trimStart())
3589
+ if (!closer || overflow || param.trimStart())
3560
3590
  return [(0, dom_1.html)('pre', {
3561
3591
  class: 'invalid',
3562
3592
  translate: 'no',
3563
3593
  'data-invalid-syntax': 'aside',
3564
- 'data-invalid-type': !closer ? 'fence' : 'argument',
3565
- 'data-invalid-message': !closer ? `Missing the closing delimiter "${ delim }"` : 'Invalid argument'
3566
- }, `${ opener }${ body }${ closer }`)];
3594
+ 'data-invalid-type': !closer || overflow ? 'fence' : 'argument',
3595
+ 'data-invalid-message': !closer ? `Missing the closing delimiter "${ delim }"` : overflow ? `Invalid trailing line after the closing delimiter "${ delim }"` : 'Invalid argument'
3596
+ }, `${ opener }${ body }${ overflow || closer }`)];
3567
3597
  const annotations = (0, dom_1.html)('ol', { class: 'annotations' });
3568
3598
  const references = (0, dom_1.html)('ol', { class: 'references' });
3569
3599
  const document = (0, parse_1.parse)(body.slice(0, -1), {
@@ -3610,15 +3640,15 @@ require = function () {
3610
3640
  const mathblock_1 = _dereq_('../mathblock');
3611
3641
  const dom_1 = _dereq_('typed-dom/dom');
3612
3642
  const opener = /^(~{3,})(?:example\/(\S+))?(?!\S)([^\n]*)(?:$|\n)/;
3613
- exports.example = (0, combinator_1.creator)(100, (0, combinator_1.block)((0, combinator_1.validate)('~~~', (0, combinator_1.fmap)((0, combinator_1.fence)(opener, 300), ([body, closer, opener, delim, type = 'markdown', param], _, context) => {
3614
- if (!closer || param.trimStart())
3643
+ exports.example = (0, combinator_1.creator)(100, (0, combinator_1.block)((0, combinator_1.validate)('~~~', (0, combinator_1.fmap)((0, combinator_1.fence)(opener, 300), ([body, overflow, closer, opener, delim, type = 'markdown', param], _, context) => {
3644
+ if (!closer || overflow || param.trimStart())
3615
3645
  return [(0, dom_1.html)('pre', {
3616
3646
  class: 'invalid',
3617
3647
  translate: 'no',
3618
3648
  'data-invalid-syntax': 'example',
3619
- 'data-invalid-type': !closer ? 'fence' : 'argument',
3620
- 'data-invalid-message': !closer ? `Missing the closing delimiter "${ delim }"` : 'Invalid argument'
3621
- }, `${ opener }${ body }${ closer }`)];
3649
+ 'data-invalid-type': !closer || overflow ? 'fence' : 'argument',
3650
+ 'data-invalid-message': !closer ? `Missing the closing delimiter "${ delim }"` : overflow ? `Invalid trailing line after the closing delimiter "${ delim }"` : 'Invalid argument'
3651
+ }, `${ opener }${ body }${ overflow || closer }`)];
3622
3652
  switch (type) {
3623
3653
  case 'markdown': {
3624
3654
  const annotations = (0, dom_1.html)('ol', { class: 'annotations' });
@@ -3657,6 +3687,7 @@ require = function () {
3657
3687
  class: 'invalid',
3658
3688
  translate: 'no',
3659
3689
  'data-invalid-syntax': 'example',
3690
+ 'data-invalid-type': 'type',
3660
3691
  'data-invalid-message': 'Invalid example type'
3661
3692
  }, `${ opener }${ body }${ closer }`)];
3662
3693
  }
@@ -3808,7 +3839,7 @@ require = function () {
3808
3839
  ])), ([label, param, content, ...caption]) => [(0, dom_1.html)('figure', attributes(label.getAttribute('data-label'), param, content, caption), [
3809
3840
  (0, dom_1.html)('figcaption', (0, array_1.unshift)([(0, dom_1.html)('span', { class: 'figindex' })], (0, dom_1.defrag)(caption))),
3810
3841
  (0, dom_1.html)('div', [content])
3811
- ])])), (0, combinator_1.fmap)((0, combinator_1.fence)(/^(~{3,})(?:figure|\[?\$\S*)(?!\S)[^\n]*(?:$|\n)/, 300), ([body, closer, opener, delim], _, context) => {
3842
+ ])])), (0, combinator_1.fmap)((0, combinator_1.fence)(/^(~{3,})(?:figure|\[?\$\S*)(?!\S)[^\n]*(?:$|\n)/, 300), ([body, overflow, closer, opener, delim], _, context) => {
3812
3843
  var _a, _b;
3813
3844
  return [(0, dom_1.html)('pre', {
3814
3845
  class: 'invalid',
@@ -3817,6 +3848,9 @@ require = function () {
3817
3848
  ...!closer && {
3818
3849
  'data-invalid-type': 'fence',
3819
3850
  'data-invalid-message': `Missing the closing delimiter "${ delim }"`
3851
+ } || overflow && {
3852
+ 'data-invalid-type': 'fence',
3853
+ 'data-invalid-message': `Invalid trailing line after the closing delimiter "${ delim }"`
3820
3854
  } || !(0, label_1.segment)((_b = (_a = opener.match(/^~+(?:figure[^\S\n]+)?(\[?\$\S+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : '', context) && {
3821
3855
  'data-invalid-type': 'label',
3822
3856
  'data-invalid-message': 'Invalid label'
@@ -3827,7 +3861,7 @@ require = function () {
3827
3861
  'data-invalid-type': 'content',
3828
3862
  'data-invalid-message': 'Invalid content'
3829
3863
  }
3830
- }, `${ opener }${ body }${ closer }`)];
3864
+ }, `${ opener }${ body }${ overflow || closer }`)];
3831
3865
  })));
3832
3866
  function attributes(label, param, content, caption) {
3833
3867
  const group = label.split('-', 1)[0];
@@ -3945,15 +3979,15 @@ require = function () {
3945
3979
  const paragraph_1 = _dereq_('../paragraph');
3946
3980
  const dom_1 = _dereq_('typed-dom/dom');
3947
3981
  const array_1 = _dereq_('spica/array');
3948
- exports.message = (0, combinator_1.block)((0, combinator_1.validate)('~~~', (0, combinator_1.fmap)((0, combinator_1.fence)(/^(~{3,})message\/(\S+)([^\n]*)(?:$|\n)/, 300), ([body, closer, opener, delim, type, param], _, context) => {
3949
- if (!closer || param.trimStart())
3982
+ exports.message = (0, combinator_1.block)((0, combinator_1.validate)('~~~', (0, combinator_1.fmap)((0, combinator_1.fence)(/^(~{3,})message\/(\S+)([^\n]*)(?:$|\n)/, 300), ([body, overflow, closer, opener, delim, type, param], _, context) => {
3983
+ if (!closer || overflow || param.trimStart())
3950
3984
  return [(0, dom_1.html)('pre', {
3951
3985
  class: 'invalid',
3952
3986
  translate: 'no',
3953
3987
  'data-invalid-syntax': 'message',
3954
- 'data-invalid-type': !closer ? 'fence' : 'argument',
3955
- 'data-invalid-message': !closer ? `Missing the closing delimiter "${ delim }"` : 'Invalid argument'
3956
- }, `${ opener }${ body }${ closer }`)];
3988
+ 'data-invalid-type': !closer || overflow ? 'fence' : 'argument',
3989
+ 'data-invalid-message': !closer ? `Missing the closing delimiter "${ delim }"` : overflow ? `Invalid trailing line after the closing delimiter "${ delim }"` : 'Invalid argument'
3990
+ }, `${ opener }${ body }${ overflow || closer }`)];
3957
3991
  switch (type) {
3958
3992
  case 'note':
3959
3993
  case 'caution':
@@ -3964,6 +3998,7 @@ require = function () {
3964
3998
  class: 'invalid',
3965
3999
  translate: 'no',
3966
4000
  'data-invalid-syntax': 'message',
4001
+ 'data-invalid-type': 'type',
3967
4002
  'data-invalid-message': 'Invalid message type'
3968
4003
  }, `${ opener }${ body }${ closer }`)];
3969
4004
  }
@@ -4025,13 +4060,11 @@ require = function () {
4025
4060
  const opener = /^(~{3,})(?!~)[^\n]*(?:$|\n)/;
4026
4061
  exports.segment = (0, combinator_1.block)((0, combinator_1.validate)('~~~', (0, combinator_1.clear)((0, combinator_1.fence)(opener, 300))));
4027
4062
  exports.segment_ = (0, combinator_1.block)((0, combinator_1.validate)('~~~', (0, combinator_1.clear)((0, combinator_1.fence)(opener, 300, false))), false);
4028
- exports.placeholder = (0, combinator_1.block)((0, combinator_1.validate)('~~~', (0, combinator_1.fmap)((0, combinator_1.fence)(opener, Infinity), ([body, closer, opener, delim]) => [(0, dom_1.html)('pre', {
4063
+ exports.placeholder = (0, combinator_1.block)((0, combinator_1.validate)('~~~', (0, combinator_1.fmap)((0, combinator_1.fence)(opener, Infinity), ([body, overflow, closer, opener, delim]) => [(0, dom_1.html)('pre', {
4029
4064
  class: 'invalid',
4030
4065
  translate: 'no',
4031
- 'data-invalid-syntax': 'extension',
4032
- 'data-invalid-type': !closer ? 'fence' : 'syntax',
4033
- 'data-invalid-message': !closer ? `Missing the closing delimiter "${ delim }"` : 'Invalid extension name'
4034
- }, `${ opener }${ body }${ closer }`)])));
4066
+ 'data-invalid-message': !closer ? `Missing the closing delimiter "${ delim }"` : overflow ? `Invalid trailing line after the closing delimiter "${ delim }"` : 'Invalid argument'
4067
+ }, `${ opener }${ body }${ overflow || closer }`)])));
4035
4068
  },
4036
4069
  {
4037
4070
  '../../../combinator': 25,
@@ -4056,16 +4089,16 @@ require = function () {
4056
4089
  const opener = /^(~{3,})table(?!\S)([^\n]*)(?:$|\n)/;
4057
4090
  exports.segment = (0, combinator_1.block)((0, combinator_1.validate)('~~~', (0, combinator_1.clear)((0, combinator_1.fence)(opener, 10000))));
4058
4091
  exports.segment_ = (0, combinator_1.block)((0, combinator_1.validate)('~~~', (0, combinator_1.clear)((0, combinator_1.fence)(opener, 10000, false))), false);
4059
- exports.table = (0, combinator_1.block)((0, combinator_1.validate)('~~~', (0, combinator_1.recover)((0, combinator_1.fmap)((0, combinator_1.fence)(opener, 10000), ([body, closer, opener, delim, param], _, context) => {
4092
+ exports.table = (0, combinator_1.block)((0, combinator_1.validate)('~~~', (0, combinator_1.recover)((0, combinator_1.fmap)((0, combinator_1.fence)(opener, 10000), ([body, overflow, closer, opener, delim, param], _, context) => {
4060
4093
  var _a;
4061
- if (!closer || param.trimStart())
4094
+ if (!closer || overflow || param.trimStart())
4062
4095
  return [(0, dom_1.html)('pre', {
4063
4096
  class: 'invalid',
4064
4097
  translate: 'no',
4065
4098
  'data-invalid-syntax': 'table',
4066
- 'data-invalid-type': !closer ? 'fence' : 'argument',
4067
- 'data-invalid-message': !closer ? `Missing the closing delimiter "${ delim }"` : 'Invalid argument'
4068
- }, `${ opener }${ body }${ closer }`)];
4099
+ 'data-invalid-type': !closer || overflow ? 'fence' : 'argument',
4100
+ 'data-invalid-message': !closer ? `Missing the closing delimiter "${ delim }"` : overflow ? `Invalid trailing line after the closing delimiter "${ delim }"` : 'Invalid argument'
4101
+ }, `${ opener }${ body }${ overflow || closer }`)];
4069
4102
  return (_a = (0, parser_1.eval)(parser(body, context))) !== null && _a !== void 0 ? _a : [(0, dom_1.html)('table')];
4070
4103
  }), (source, _, reason) => reason instanceof Error && reason.message === 'Number of columns must be 32 or less' ? [
4071
4104
  [(0, dom_1.html)('pre', {
@@ -4437,24 +4470,24 @@ require = function () {
4437
4470
  const combinator_1 = _dereq_('../../combinator');
4438
4471
  const dom_1 = _dereq_('typed-dom/dom');
4439
4472
  const opener = /^(\${2,})(?!\$)([^\n]*)(?:$|\n)/;
4440
- exports.segment = (0, combinator_1.block)((0, combinator_1.validate)('$$', (0, combinator_1.clear)((0, combinator_1.fence)(opener, 100))));
4441
- exports.segment_ = (0, combinator_1.block)((0, combinator_1.validate)('$$', (0, combinator_1.clear)((0, combinator_1.fence)(opener, 100, false))), false);
4442
- exports.mathblock = (0, combinator_1.block)((0, combinator_1.validate)('$$', (0, combinator_1.fmap)((0, combinator_1.fence)(opener, 100), ([body, closer, opener, delim, param], _, {
4473
+ exports.segment = (0, combinator_1.block)((0, combinator_1.validate)('$$', (0, combinator_1.clear)((0, combinator_1.fence)(opener, 300))));
4474
+ exports.segment_ = (0, combinator_1.block)((0, combinator_1.validate)('$$', (0, combinator_1.clear)((0, combinator_1.fence)(opener, 300, false))), false);
4475
+ exports.mathblock = (0, combinator_1.block)((0, combinator_1.validate)('$$', (0, combinator_1.fmap)((0, combinator_1.fence)(opener, 300), ([body, overflow, closer, opener, delim, param], _, {
4443
4476
  caches: {
4444
4477
  math: cache = global_1.undefined
4445
4478
  } = {}
4446
4479
  }) => {
4447
4480
  var _a;
4448
- return [delim.length === 2 && closer && param.trimStart() === '' ? ((_a = cache === null || cache === void 0 ? void 0 : cache.get(`${ delim }\n${ body }${ delim }`)) === null || _a === void 0 ? void 0 : _a.cloneNode(true)) || (0, dom_1.html)('div', {
4481
+ return [delim.length === 2 && closer && !overflow && param.trimStart() === '' ? ((_a = cache === null || cache === void 0 ? void 0 : cache.get(`${ delim }\n${ body }${ delim }`)) === null || _a === void 0 ? void 0 : _a.cloneNode(true)) || (0, dom_1.html)('div', {
4449
4482
  class: 'math',
4450
4483
  translate: 'no'
4451
4484
  }, `${ delim }\n${ body }${ delim }`) : (0, dom_1.html)('pre', {
4452
4485
  class: 'invalid',
4453
4486
  translate: 'no',
4454
4487
  'data-invalid-syntax': 'mathblock',
4455
- 'data-invalid-type': delim.length > 2 ? 'syntax' : !closer ? 'fence' : 'argument',
4456
- 'data-invalid-message': delim.length > 2 ? 'Invalid syntax' : !closer ? `Missing the closing delimiter "${ delim }"` : 'Invalid argument'
4457
- }, `${ opener }${ body }${ closer }`)];
4488
+ 'data-invalid-type': delim.length > 2 ? 'syntax' : !closer || overflow ? 'fence' : 'argument',
4489
+ 'data-invalid-message': delim.length > 2 ? 'Invalid syntax' : !closer ? `Missing the closing delimiter "${ delim }"` : overflow ? `Invalid trailing line after the closing delimiter "${ delim }"` : 'Invalid argument'
4490
+ }, `${ opener }${ body }${ overflow || closer }`)];
4458
4491
  })));
4459
4492
  },
4460
4493
  {
@@ -5409,7 +5442,7 @@ require = function () {
5409
5442
  const source_1 = _dereq_('../source');
5410
5443
  const dom_1 = _dereq_('typed-dom/dom');
5411
5444
  const array_1 = _dereq_('spica/array');
5412
- const index = /^(?:[0-9]+(?:(?:[.-]|, )[0-9]+)*|[A-Za-z])/;
5445
+ const index = /^[0-9A-Za-z]+(?:(?:[.-]|, )[0-9A-Za-z]+)*/;
5413
5446
  exports.bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.union)([
5414
5447
  (0, combinator_1.surround)((0, source_1.str)('('), (0, source_1.str)(index), (0, source_1.str)(')')),
5415
5448
  (0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)(inline_1.inline, ')'), (0, source_1.str)(')'), true, ([as, bs = [], cs], rest) => [
@@ -5419,7 +5452,7 @@ require = function () {
5419
5452
  (0, array_1.unshift)(as, bs),
5420
5453
  rest
5421
5454
  ]),
5422
- (0, combinator_1.surround)((0, source_1.str)('\uFF08'), (0, source_1.str)(new RegExp(index.source.replace(/[09AZaz., ]|\-(?!\w)/g, c => c.trimStart() && String.fromCharCode(c.charCodeAt(0) + 65248)))), (0, source_1.str)('\uFF09')),
5455
+ (0, combinator_1.surround)((0, source_1.str)('\uFF08'), (0, source_1.str)(new RegExp(index.source.replace(', ', '[\uFF0C\u3001]').replace(/[09AZaz.]|\-(?!\w)/g, c => c.trimStart() && String.fromCharCode(c.charCodeAt(0) + 65248)))), (0, source_1.str)('\uFF09')),
5423
5456
  (0, combinator_1.surround)((0, source_1.str)('\uFF08'), (0, combinator_1.some)(inline_1.inline, '\uFF09'), (0, source_1.str)('\uFF09'), true, ([as, bs = [], cs], rest) => [
5424
5457
  [(0, dom_1.html)('span', { class: 'paren' }, (0, dom_1.defrag)((0, array_1.push)((0, array_1.unshift)(as, bs), cs)))],
5425
5458
  rest
@@ -6284,7 +6317,7 @@ require = function () {
6284
6317
  }
6285
6318
  return (0, dom_1.html)('a', {
6286
6319
  href: uri.source,
6287
- target: undefined || uri.origin !== origin || typeof content[0] === 'object' && content[0].classList.contains('media') ? '_blank' : undefined
6320
+ target: global_1.undefined || uri.origin !== origin || typeof content[0] === 'object' && content[0].classList.contains('media') ? '_blank' : global_1.undefined
6288
6321
  }, content.length === 0 ? decode(INSECURE_URI) : content);
6289
6322
  case 'tel:':
6290
6323
  if (content.length === 0) {
@@ -8036,8 +8069,8 @@ require = function () {
8036
8069
  'use strict';
8037
8070
  Object.defineProperty(exports, '__esModule', { value: true });
8038
8071
  exports.image = void 0;
8039
- const dom_1 = _dereq_('typed-dom/dom');
8040
8072
  const alias_1 = _dereq_('spica/alias');
8073
+ const dom_1 = _dereq_('typed-dom/dom');
8041
8074
  function image(source, url, cache) {
8042
8075
  if (cache === null || cache === void 0 ? void 0 : cache.has(url.href))
8043
8076
  return (0, dom_1.define)(cache.get(url.href).cloneNode(true), (0, alias_1.ObjectFromEntries)([...source.attributes].map(attr => [
@@ -8157,8 +8190,8 @@ require = function () {
8157
8190
  'use strict';
8158
8191
  Object.defineProperty(exports, '__esModule', { value: true });
8159
8192
  exports.video = void 0;
8160
- const dom_1 = _dereq_('typed-dom/dom');
8161
8193
  const alias_1 = _dereq_('spica/alias');
8194
+ const dom_1 = _dereq_('typed-dom/dom');
8162
8195
  const extensions = [
8163
8196
  '.webm',
8164
8197
  '.ogv'
@@ -8189,6 +8222,7 @@ require = function () {
8189
8222
  'use strict';
8190
8223
  Object.defineProperty(exports, '__esModule', { value: true });
8191
8224
  exports.youtube = void 0;
8225
+ const global_1 = _dereq_('spica/global');
8192
8226
  const dom_1 = _dereq_('typed-dom/dom');
8193
8227
  function youtube(source, url) {
8194
8228
  const id = resolve(url);
@@ -8208,15 +8242,18 @@ require = function () {
8208
8242
  var _a;
8209
8243
  switch (url.origin) {
8210
8244
  case 'https://www.youtube.com':
8211
- return url.pathname.match(/^\/watch\/?$/) ? (_a = url.searchParams.get('v')) === null || _a === void 0 ? void 0 : _a.concat(url.search.replace(/([?&])v=[^&#]*&?/g, '$1'), url.hash) : undefined;
8245
+ return url.pathname.match(/^\/watch\/?$/) ? (_a = url.searchParams.get('v')) === null || _a === void 0 ? void 0 : _a.concat(url.search.replace(/([?&])v=[^&#]*&?/g, '$1'), url.hash) : global_1.undefined;
8212
8246
  case 'https://youtu.be':
8213
- return url.pathname.match(/^\/[\w-]+\/?$/) ? url.href.slice(url.origin.length) : undefined;
8247
+ return url.pathname.match(/^\/[\w-]+\/?$/) ? url.href.slice(url.origin.length) : global_1.undefined;
8214
8248
  default:
8215
8249
  return;
8216
8250
  }
8217
8251
  }
8218
8252
  },
8219
- { 'typed-dom/dom': 23 }
8253
+ {
8254
+ 'spica/global': 13,
8255
+ 'typed-dom/dom': 23
8256
+ }
8220
8257
  ],
8221
8258
  146: [
8222
8259
  function (_dereq_, module, exports) {