securemark 0.220.0 → 0.224.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 (41) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/securemark.js +739 -600
  3. package/package-lock.json +412 -895
  4. package/package.json +12 -12
  5. package/src/combinator/control/manipulation/fallback.ts +8 -0
  6. package/src/combinator/control/manipulation/fence.ts +1 -1
  7. package/src/combinator/control/manipulation/indent.test.ts +0 -1
  8. package/src/combinator/control/manipulation/indent.ts +1 -1
  9. package/src/combinator/control/manipulation/recovery.ts +2 -2
  10. package/src/combinator.ts +1 -0
  11. package/src/parser/api/parse.test.ts +0 -8
  12. package/src/parser/block/ilist.ts +4 -2
  13. package/src/parser/block/olist.test.ts +9 -8
  14. package/src/parser/block/olist.ts +21 -4
  15. package/src/parser/block/paragraph/mention/cite.ts +3 -3
  16. package/src/parser/block/table.test.ts +1 -1
  17. package/src/parser/block/table.ts +19 -9
  18. package/src/parser/block/ulist.test.ts +6 -5
  19. package/src/parser/block/ulist.ts +13 -2
  20. package/src/parser/block.ts +5 -7
  21. package/src/parser/inline/annotation.test.ts +2 -2
  22. package/src/parser/inline/annotation.ts +4 -4
  23. package/src/parser/inline/emphasis.ts +2 -2
  24. package/src/parser/inline/emstrong.ts +4 -4
  25. package/src/parser/inline/extension/index.ts +2 -2
  26. package/src/parser/inline/html.test.ts +13 -13
  27. package/src/parser/inline/html.ts +6 -6
  28. package/src/parser/inline/link.test.ts +27 -8
  29. package/src/parser/inline/link.ts +23 -25
  30. package/src/parser/inline/mark.ts +2 -2
  31. package/src/parser/inline/math.ts +2 -2
  32. package/src/parser/inline/media.test.ts +5 -3
  33. package/src/parser/inline/media.ts +33 -22
  34. package/src/parser/inline/reference.test.ts +2 -2
  35. package/src/parser/inline/reference.ts +6 -6
  36. package/src/parser/inline/ruby.ts +2 -2
  37. package/src/parser/inline/strong.ts +2 -2
  38. package/src/parser/util.ts +49 -10
  39. package/src/renderer/render/math.ts +1 -1
  40. package/src/renderer/render.ts +1 -2
  41. package/tsconfig.json +6 -0
@@ -1,4 +1,4 @@
1
- /*! securemark v0.220.0 https://github.com/falsandtru/securemark | (c) 2017, falsandtru | UNLICENSED */
1
+ /*! securemark v0.224.0 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) {
@@ -869,10 +869,11 @@ require = function () {
869
869
  function (_dereq_, module, exports) {
870
870
  'use strict';
871
871
  Object.defineProperty(exports, '__esModule', { value: true });
872
- exports.run = exports.clear = exports.mapReturn = exports.mapParameters = exports.once = void 0;
872
+ exports.run = exports.clear = exports.mapReturn = exports.mapParameters = exports.singleton = void 0;
873
873
  const global_1 = _dereq_('./global');
874
+ const exception_1 = _dereq_('./exception');
874
875
  const noop_1 = _dereq_('./noop');
875
- function once(f) {
876
+ function singleton(f) {
876
877
  let result;
877
878
  return function (...as) {
878
879
  if (f === noop_1.noop)
@@ -882,7 +883,7 @@ require = function () {
882
883
  return result;
883
884
  };
884
885
  }
885
- exports.once = once;
886
+ exports.singleton = singleton;
886
887
  function mapParameters(f, g) {
887
888
  return (...as) => f(...g(...as));
888
889
  }
@@ -903,19 +904,32 @@ require = function () {
903
904
  }
904
905
  } catch (reason) {
905
906
  for (let i = 0; gs[i]; ++i) {
906
- gs[i]();
907
+ try {
908
+ gs[i]();
909
+ } catch (reason) {
910
+ (0, exception_1.causeAsyncException)(reason);
911
+ }
907
912
  }
908
913
  throw reason;
909
914
  }
910
- return once(() => {
915
+ return singleton(() => {
916
+ const rs = [];
911
917
  for (let i = 0; gs[i]; ++i) {
912
- gs[i]();
918
+ try {
919
+ gs[i]();
920
+ } catch (reason) {
921
+ rs.push(reason);
922
+ }
923
+ }
924
+ if (rs.length > 0) {
925
+ throw new AggregateError(rs);
913
926
  }
914
927
  });
915
928
  }
916
929
  exports.run = run;
917
930
  },
918
931
  {
932
+ './exception': 14,
919
933
  './global': 17,
920
934
  './noop': 22
921
935
  }
@@ -2151,7 +2165,7 @@ require = function () {
2151
2165
  }
2152
2166
  exports.join = join;
2153
2167
  },
2154
- { './global': 8 }
2168
+ { './global': 9 }
2155
2169
  ],
2156
2170
  6: [
2157
2171
  function (_dereq_, module, exports) {
@@ -2169,10 +2183,23 @@ require = function () {
2169
2183
  function (_dereq_, module, exports) {
2170
2184
  'use strict';
2171
2185
  Object.defineProperty(exports, '__esModule', { value: true });
2172
- exports.run = exports.clear = exports.mapReturn = exports.mapParameters = exports.once = void 0;
2186
+ exports.causeAsyncException = void 0;
2187
+ function causeAsyncException(reason) {
2188
+ void Promise.reject(reason);
2189
+ }
2190
+ exports.causeAsyncException = causeAsyncException;
2191
+ },
2192
+ {}
2193
+ ],
2194
+ 8: [
2195
+ function (_dereq_, module, exports) {
2196
+ 'use strict';
2197
+ Object.defineProperty(exports, '__esModule', { value: true });
2198
+ exports.run = exports.clear = exports.mapReturn = exports.mapParameters = exports.singleton = void 0;
2173
2199
  const global_1 = _dereq_('./global');
2200
+ const exception_1 = _dereq_('./exception');
2174
2201
  const noop_1 = _dereq_('./noop');
2175
- function once(f) {
2202
+ function singleton(f) {
2176
2203
  let result;
2177
2204
  return function (...as) {
2178
2205
  if (f === noop_1.noop)
@@ -2182,7 +2209,7 @@ require = function () {
2182
2209
  return result;
2183
2210
  };
2184
2211
  }
2185
- exports.once = once;
2212
+ exports.singleton = singleton;
2186
2213
  function mapParameters(f, g) {
2187
2214
  return (...as) => f(...g(...as));
2188
2215
  }
@@ -2203,24 +2230,37 @@ require = function () {
2203
2230
  }
2204
2231
  } catch (reason) {
2205
2232
  for (let i = 0; gs[i]; ++i) {
2206
- gs[i]();
2233
+ try {
2234
+ gs[i]();
2235
+ } catch (reason) {
2236
+ (0, exception_1.causeAsyncException)(reason);
2237
+ }
2207
2238
  }
2208
2239
  throw reason;
2209
2240
  }
2210
- return once(() => {
2241
+ return singleton(() => {
2242
+ const rs = [];
2211
2243
  for (let i = 0; gs[i]; ++i) {
2212
- gs[i]();
2244
+ try {
2245
+ gs[i]();
2246
+ } catch (reason) {
2247
+ rs.push(reason);
2248
+ }
2249
+ }
2250
+ if (rs.length > 0) {
2251
+ throw new AggregateError(rs);
2213
2252
  }
2214
2253
  });
2215
2254
  }
2216
2255
  exports.run = run;
2217
2256
  },
2218
2257
  {
2219
- './global': 8,
2220
- './noop': 10
2258
+ './exception': 7,
2259
+ './global': 9,
2260
+ './noop': 11
2221
2261
  }
2222
2262
  ],
2223
- 8: [
2263
+ 9: [
2224
2264
  function (_dereq_, module, exports) {
2225
2265
  'use strict';
2226
2266
  const global = void 0 || typeof globalThis !== 'undefined' && globalThis || typeof self !== 'undefined' && self || Function('return this')();
@@ -2229,7 +2269,7 @@ require = function () {
2229
2269
  },
2230
2270
  {}
2231
2271
  ],
2232
- 9: [
2272
+ 10: [
2233
2273
  function (_dereq_, module, exports) {
2234
2274
  'use strict';
2235
2275
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -2270,10 +2310,10 @@ require = function () {
2270
2310
  },
2271
2311
  {
2272
2312
  './compare': 6,
2273
- './global': 8
2313
+ './global': 9
2274
2314
  }
2275
2315
  ],
2276
- 10: [
2316
+ 11: [
2277
2317
  function (_dereq_, module, exports) {
2278
2318
  'use strict';
2279
2319
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -2284,7 +2324,7 @@ require = function () {
2284
2324
  },
2285
2325
  {}
2286
2326
  ],
2287
- 11: [
2327
+ 12: [
2288
2328
  function (_dereq_, module, exports) {
2289
2329
  'use strict';
2290
2330
  var _a, _b;
@@ -2631,11 +2671,11 @@ require = function () {
2631
2671
  },
2632
2672
  {
2633
2673
  './alias': 4,
2634
- './global': 8,
2635
- './noop': 10
2674
+ './global': 9,
2675
+ './noop': 11
2636
2676
  }
2637
2677
  ],
2638
- 12: [
2678
+ 13: [
2639
2679
  function (_dereq_, module, exports) {
2640
2680
  'use strict';
2641
2681
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -2717,9 +2757,9 @@ require = function () {
2717
2757
  }
2718
2758
  }
2719
2759
  },
2720
- { './global': 8 }
2760
+ { './global': 9 }
2721
2761
  ],
2722
- 13: [
2762
+ 14: [
2723
2763
  function (_dereq_, module, exports) {
2724
2764
  'use strict';
2725
2765
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -2763,7 +2803,7 @@ require = function () {
2763
2803
  return true;
2764
2804
  }
2765
2805
  function elem(factory, attrs, children) {
2766
- const el = factory ? (0, dom_1.define)(factory(baseFactory, tag, attrs || {}, children), attrs) : baseFactory(tag, attrs);
2806
+ const el = factory ? (0, dom_1.define)(factory(baseFactory, tag, attrs !== null && attrs !== void 0 ? attrs : {}, children), attrs) : baseFactory(tag, attrs);
2767
2807
  if (tag !== el.tagName.toLowerCase())
2768
2808
  throw new Error(`TypedDOM: Expected tag name is "${ tag }" but actually "${ el.tagName.toLowerCase() }".`);
2769
2809
  return el;
@@ -2772,12 +2812,12 @@ require = function () {
2772
2812
  }
2773
2813
  },
2774
2814
  {
2775
- './proxy': 14,
2776
- './util/dom': 15,
2815
+ './proxy': 15,
2816
+ './util/dom': 16,
2777
2817
  'spica/alias': 4
2778
2818
  }
2779
2819
  ],
2780
- 14: [
2820
+ 15: [
2781
2821
  function (_dereq_, module, exports) {
2782
2822
  'use strict';
2783
2823
  var _a, _b, _c, _d;
@@ -3081,14 +3121,14 @@ require = function () {
3081
3121
  }
3082
3122
  },
3083
3123
  {
3084
- './util/dom': 15,
3085
- './util/identity': 16,
3124
+ './util/dom': 16,
3125
+ './util/identity': 17,
3086
3126
  'spica/alias': 4,
3087
3127
  'spica/array': 5,
3088
- 'spica/global': 8
3128
+ 'spica/global': 9
3089
3129
  }
3090
3130
  ],
3091
- 15: [
3131
+ 16: [
3092
3132
  function (_dereq_, module, exports) {
3093
3133
  'use strict';
3094
3134
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -3096,19 +3136,19 @@ require = function () {
3096
3136
  const global_1 = _dereq_('spica/global');
3097
3137
  const alias_1 = _dereq_('spica/alias');
3098
3138
  const memoize_1 = _dereq_('spica/memoize');
3099
- const array_1 = _dereq_('spica/array');
3100
3139
  var caches;
3101
3140
  (function (caches) {
3102
3141
  caches.shadows = new WeakMap();
3103
3142
  caches.fragment = global_1.document.createDocumentFragment();
3104
3143
  }(caches || (caches = {})));
3105
3144
  function shadow(el, children, opts) {
3145
+ var _a, _b;
3106
3146
  if (typeof el === 'string')
3107
3147
  return shadow((0, exports.html)(el), children, opts);
3108
3148
  if (children && !isChildren(children))
3109
3149
  return shadow(el, void 0, children);
3110
- const root = opts === void 0 ? el.shadowRoot || caches.shadows.get(el) : opts.mode === 'open' ? el.shadowRoot || void 0 : caches.shadows.get(el);
3111
- return defineChildren(!opts || opts.mode === 'open' ? root || el.attachShadow(opts || { mode: 'open' }) : root || caches.shadows.set(el, el.attachShadow(opts)).get(el), !root && children == void 0 ? el.childNodes : children);
3150
+ const root = opts === void 0 ? (_a = el.shadowRoot) !== null && _a !== void 0 ? _a : caches.shadows.get(el) : opts.mode === 'open' ? (_b = el.shadowRoot) !== null && _b !== void 0 ? _b : void 0 : caches.shadows.get(el);
3151
+ return defineChildren(!opts || opts.mode === 'open' ? root !== null && root !== void 0 ? root : el.attachShadow(opts !== null && opts !== void 0 ? opts : { mode: 'open' }) : root !== null && root !== void 0 ? root : caches.shadows.set(el, el.attachShadow(opts)).get(el), !root && children === void 0 ? el.childNodes : children);
3112
3152
  }
3113
3153
  exports.shadow = shadow;
3114
3154
  function frag(children) {
@@ -3179,7 +3219,9 @@ require = function () {
3179
3219
  return el;
3180
3220
  }
3181
3221
  function defineChildren(node, children) {
3182
- children && node.replaceChildren(...typeof children === 'string' ? [children] : children);
3222
+ if (children === void 0)
3223
+ return node;
3224
+ node.replaceChildren(...typeof children === 'string' ? [children] : children);
3183
3225
  return node;
3184
3226
  }
3185
3227
  function isChildren(o) {
@@ -3200,12 +3242,11 @@ require = function () {
3200
3242
  },
3201
3243
  {
3202
3244
  'spica/alias': 4,
3203
- 'spica/array': 5,
3204
- 'spica/global': 8,
3205
- 'spica/memoize': 9
3245
+ 'spica/global': 9,
3246
+ 'spica/memoize': 10
3206
3247
  }
3207
3248
  ],
3208
- 16: [
3249
+ 17: [
3209
3250
  function (_dereq_, module, exports) {
3210
3251
  'use strict';
3211
3252
  var _a;
@@ -3217,11 +3258,11 @@ require = function () {
3217
3258
  exports.identity = (0, random_1.unique)(random_1.rnd0Z, 2, (_a = global_1.global[ids]) !== null && _a !== void 0 ? _a : global_1.global[ids] = new global_1.Set());
3218
3259
  },
3219
3260
  {
3220
- 'spica/global': 8,
3221
- 'spica/random': 12
3261
+ 'spica/global': 9,
3262
+ 'spica/random': 13
3222
3263
  }
3223
3264
  ],
3224
- 17: [
3265
+ 18: [
3225
3266
  function (_dereq_, module, exports) {
3226
3267
  'use strict';
3227
3268
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -3254,7 +3295,7 @@ require = function () {
3254
3295
  var _a, _b;
3255
3296
  unbind();
3256
3297
  const cx = ev.target.shadowRoot ? (_a = ev.composedPath()[0]) === null || _a === void 0 ? void 0 : _a.closest(selector) : (_b = ev.target) === null || _b === void 0 ? void 0 : _b.closest(selector);
3257
- return cx ? unbind = once(cx, type, listener, option) : void 0, ev.returnValue;
3298
+ return cx ? unbind = once(cx, type, listener, option) : void 0;
3258
3299
  }, {
3259
3300
  ...option,
3260
3301
  capture: true
@@ -3263,20 +3304,21 @@ require = function () {
3263
3304
  exports.delegate = delegate;
3264
3305
  function bind(target, type, listener, option = false) {
3265
3306
  target.addEventListener(type, handler, option);
3266
- return (0, function_1.once)(() => void target.removeEventListener(type, handler, option));
3307
+ return (0, function_1.singleton)(() => void target.removeEventListener(type, handler, option));
3267
3308
  function handler(ev) {
3268
- return exports.currentTarget in ev && !ev[exports.currentTarget] ? void 0 : ev[exports.currentTarget] = ev.currentTarget, listener(ev);
3309
+ ev[exports.currentTarget] = ev.currentTarget;
3310
+ return listener(ev);
3269
3311
  }
3270
3312
  }
3271
3313
  exports.bind = bind;
3272
3314
  },
3273
3315
  {
3274
- 'spica/function': 7,
3275
- 'spica/noop': 10,
3276
- 'spica/promise': 11
3316
+ 'spica/function': 8,
3317
+ 'spica/noop': 11,
3318
+ 'spica/promise': 12
3277
3319
  }
3278
3320
  ],
3279
- 18: [
3321
+ 19: [
3280
3322
  function (_dereq_, module, exports) {
3281
3323
  'use strict';
3282
3324
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -3291,7 +3333,7 @@ require = function () {
3291
3333
  }
3292
3334
  exports.apply = apply;
3293
3335
  },
3294
- { './dom': 15 }
3336
+ { './dom': 16 }
3295
3337
  ],
3296
3338
  'typed-dom': [
3297
3339
  function (_dereq_, module, exports) {
@@ -3433,13 +3475,13 @@ require = function () {
3433
3475
  });
3434
3476
  },
3435
3477
  {
3436
- './src/builder': 13,
3437
- './src/proxy': 14,
3438
- './src/util/dom': 15,
3439
- './src/util/identity': 16,
3440
- './src/util/listener': 17,
3441
- './src/util/query': 18,
3442
- 'spica/global': 8
3478
+ './src/builder': 14,
3479
+ './src/proxy': 15,
3480
+ './src/util/dom': 16,
3481
+ './src/util/identity': 17,
3482
+ './src/util/listener': 18,
3483
+ './src/util/query': 19,
3484
+ 'spica/global': 9
3443
3485
  }
3444
3486
  ]
3445
3487
  }, {}, [
@@ -3505,6 +3547,7 @@ require = function () {
3505
3547
  __exportStar(_dereq_('./combinator/control/manipulation/trim'), exports);
3506
3548
  __exportStar(_dereq_('./combinator/control/manipulation/duplicate'), exports);
3507
3549
  __exportStar(_dereq_('./combinator/control/manipulation/reverse'), exports);
3550
+ __exportStar(_dereq_('./combinator/control/manipulation/fallback'), exports);
3508
3551
  __exportStar(_dereq_('./combinator/control/manipulation/recovery'), exports);
3509
3552
  __exportStar(_dereq_('./combinator/control/manipulation/lazy'), exports);
3510
3553
  __exportStar(_dereq_('./combinator/control/monad/fmap'), exports);
@@ -3517,24 +3560,25 @@ require = function () {
3517
3560
  './combinator/control/manipulation/context': 34,
3518
3561
  './combinator/control/manipulation/convert': 35,
3519
3562
  './combinator/control/manipulation/duplicate': 36,
3520
- './combinator/control/manipulation/fence': 37,
3521
- './combinator/control/manipulation/indent': 38,
3522
- './combinator/control/manipulation/lazy': 39,
3523
- './combinator/control/manipulation/match': 40,
3524
- './combinator/control/manipulation/recovery': 41,
3525
- './combinator/control/manipulation/resource': 42,
3526
- './combinator/control/manipulation/reverse': 43,
3527
- './combinator/control/manipulation/scope': 44,
3528
- './combinator/control/manipulation/surround': 45,
3529
- './combinator/control/manipulation/trim': 46,
3530
- './combinator/control/monad/bind': 47,
3531
- './combinator/control/monad/fmap': 48,
3532
- './combinator/data/parser/inits': 50,
3533
- './combinator/data/parser/sequence': 51,
3534
- './combinator/data/parser/some': 52,
3535
- './combinator/data/parser/subsequence': 53,
3536
- './combinator/data/parser/tails': 54,
3537
- './combinator/data/parser/union': 55
3563
+ './combinator/control/manipulation/fallback': 37,
3564
+ './combinator/control/manipulation/fence': 38,
3565
+ './combinator/control/manipulation/indent': 39,
3566
+ './combinator/control/manipulation/lazy': 40,
3567
+ './combinator/control/manipulation/match': 41,
3568
+ './combinator/control/manipulation/recovery': 42,
3569
+ './combinator/control/manipulation/resource': 43,
3570
+ './combinator/control/manipulation/reverse': 44,
3571
+ './combinator/control/manipulation/scope': 45,
3572
+ './combinator/control/manipulation/surround': 46,
3573
+ './combinator/control/manipulation/trim': 47,
3574
+ './combinator/control/monad/bind': 48,
3575
+ './combinator/control/monad/fmap': 49,
3576
+ './combinator/data/parser/inits': 51,
3577
+ './combinator/data/parser/sequence': 52,
3578
+ './combinator/data/parser/some': 53,
3579
+ './combinator/data/parser/subsequence': 54,
3580
+ './combinator/data/parser/tails': 55,
3581
+ './combinator/data/parser/union': 56
3538
3582
  }
3539
3583
  ],
3540
3584
  31: [
@@ -3561,7 +3605,7 @@ require = function () {
3561
3605
  exports.block = block;
3562
3606
  },
3563
3607
  {
3564
- '../../data/parser': 49,
3608
+ '../../data/parser': 50,
3565
3609
  './line': 33,
3566
3610
  'spica/global': 17
3567
3611
  }
@@ -3622,7 +3666,7 @@ require = function () {
3622
3666
  exports.verify = verify;
3623
3667
  },
3624
3668
  {
3625
- '../../data/parser': 49,
3669
+ '../../data/parser': 50,
3626
3670
  'spica/alias': 5,
3627
3671
  'spica/global': 17
3628
3672
  }
@@ -3667,7 +3711,7 @@ require = function () {
3667
3711
  exports.isEmpty = isEmpty;
3668
3712
  },
3669
3713
  {
3670
- '../../data/parser': 49,
3714
+ '../../data/parser': 50,
3671
3715
  'spica/global': 17
3672
3716
  }
3673
3717
  ],
@@ -3755,9 +3799,25 @@ require = function () {
3755
3799
  }
3756
3800
  exports.dup = dup;
3757
3801
  },
3758
- { '../monad/fmap': 48 }
3802
+ { '../monad/fmap': 49 }
3759
3803
  ],
3760
3804
  37: [
3805
+ function (_dereq_, module, exports) {
3806
+ 'use strict';
3807
+ Object.defineProperty(exports, '__esModule', { value: true });
3808
+ exports.fallback = void 0;
3809
+ const union_1 = _dereq_('../../data/parser/union');
3810
+ function fallback(parser, otherwise) {
3811
+ return (0, union_1.union)([
3812
+ parser,
3813
+ otherwise
3814
+ ]);
3815
+ }
3816
+ exports.fallback = fallback;
3817
+ },
3818
+ { '../../data/parser/union': 56 }
3819
+ ],
3820
+ 38: [
3761
3821
  function (_dereq_, module, exports) {
3762
3822
  'use strict';
3763
3823
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -3810,7 +3870,7 @@ require = function () {
3810
3870
  'spica/array': 6
3811
3871
  }
3812
3872
  ],
3813
- 38: [
3873
+ 39: [
3814
3874
  function (_dereq_, module, exports) {
3815
3875
  'use strict';
3816
3876
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -3825,7 +3885,7 @@ require = function () {
3825
3885
  const memoize_1 = _dereq_('spica/memoize');
3826
3886
  const array_1 = _dereq_('spica/array');
3827
3887
  function indent(parser) {
3828
- return (0, bind_1.bind)((0, match_1.match)(/^(?=(([ \t ])\2*))/, (0, memoize_1.reduce)(([, indent]) => (0, some_1.some)((0, line_1.line)((0, surround_1.open)(indent, source => [
3888
+ return (0, bind_1.bind)((0, match_1.match)(/^(?=(([ \t])\2*))/, (0, memoize_1.reduce)(([, indent]) => (0, some_1.some)((0, line_1.line)((0, surround_1.open)(indent, source => [
3829
3889
  [unline(source)],
3830
3890
  ''
3831
3891
  ]))), ([, indent]) => indent)), (nodes, rest, context) => {
@@ -3842,18 +3902,18 @@ require = function () {
3842
3902
  }
3843
3903
  },
3844
3904
  {
3845
- '../../data/parser': 49,
3846
- '../../data/parser/some': 52,
3905
+ '../../data/parser': 50,
3906
+ '../../data/parser/some': 53,
3847
3907
  '../constraint/line': 33,
3848
- '../monad/bind': 47,
3849
- './match': 40,
3850
- './surround': 45,
3908
+ '../monad/bind': 48,
3909
+ './match': 41,
3910
+ './surround': 46,
3851
3911
  'spica/array': 6,
3852
3912
  'spica/global': 17,
3853
3913
  'spica/memoize': 20
3854
3914
  }
3855
3915
  ],
3856
- 39: [
3916
+ 40: [
3857
3917
  function (_dereq_, module, exports) {
3858
3918
  'use strict';
3859
3919
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -3866,7 +3926,7 @@ require = function () {
3866
3926
  },
3867
3927
  {}
3868
3928
  ],
3869
- 40: [
3929
+ 41: [
3870
3930
  function (_dereq_, module, exports) {
3871
3931
  'use strict';
3872
3932
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -3890,11 +3950,11 @@ require = function () {
3890
3950
  exports.match = match;
3891
3951
  },
3892
3952
  {
3893
- '../../data/parser': 49,
3953
+ '../../data/parser': 50,
3894
3954
  'spica/global': 17
3895
3955
  }
3896
3956
  ],
3897
- 41: [
3957
+ 42: [
3898
3958
  function (_dereq_, module, exports) {
3899
3959
  'use strict';
3900
3960
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -3912,7 +3972,7 @@ require = function () {
3912
3972
  },
3913
3973
  {}
3914
3974
  ],
3915
- 42: [
3975
+ 43: [
3916
3976
  function (_dereq_, module, exports) {
3917
3977
  'use strict';
3918
3978
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -3937,7 +3997,7 @@ require = function () {
3937
3997
  },
3938
3998
  {}
3939
3999
  ],
3940
- 43: [
4000
+ 44: [
3941
4001
  function (_dereq_, module, exports) {
3942
4002
  'use strict';
3943
4003
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -3948,9 +4008,9 @@ require = function () {
3948
4008
  }
3949
4009
  exports.reverse = reverse;
3950
4010
  },
3951
- { '../monad/fmap': 48 }
4011
+ { '../monad/fmap': 49 }
3952
4012
  ],
3953
- 44: [
4013
+ 45: [
3954
4014
  function (_dereq_, module, exports) {
3955
4015
  'use strict';
3956
4016
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -3998,11 +4058,11 @@ require = function () {
3998
4058
  exports.rewrite = rewrite;
3999
4059
  },
4000
4060
  {
4001
- '../../data/parser': 49,
4061
+ '../../data/parser': 50,
4002
4062
  'spica/global': 17
4003
4063
  }
4004
4064
  ],
4005
- 45: [
4065
+ 46: [
4006
4066
  function (_dereq_, module, exports) {
4007
4067
  'use strict';
4008
4068
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4085,13 +4145,13 @@ require = function () {
4085
4145
  exports.clear = clear;
4086
4146
  },
4087
4147
  {
4088
- '../../data/parser': 49,
4089
- '../monad/fmap': 48,
4148
+ '../../data/parser': 50,
4149
+ '../monad/fmap': 49,
4090
4150
  'spica/array': 6,
4091
4151
  'spica/global': 17
4092
4152
  }
4093
4153
  ],
4094
- 46: [
4154
+ 47: [
4095
4155
  function (_dereq_, module, exports) {
4096
4156
  'use strict';
4097
4157
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4112,7 +4172,7 @@ require = function () {
4112
4172
  },
4113
4173
  { './convert': 35 }
4114
4174
  ],
4115
- 47: [
4175
+ 48: [
4116
4176
  function (_dereq_, module, exports) {
4117
4177
  'use strict';
4118
4178
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4135,11 +4195,11 @@ require = function () {
4135
4195
  exports.bind = bind;
4136
4196
  },
4137
4197
  {
4138
- '../../data/parser': 49,
4198
+ '../../data/parser': 50,
4139
4199
  'spica/global': 17
4140
4200
  }
4141
4201
  ],
4142
- 48: [
4202
+ 49: [
4143
4203
  function (_dereq_, module, exports) {
4144
4204
  'use strict';
4145
4205
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4153,9 +4213,9 @@ require = function () {
4153
4213
  }
4154
4214
  exports.fmap = fmap;
4155
4215
  },
4156
- { './bind': 47 }
4216
+ { './bind': 48 }
4157
4217
  ],
4158
- 49: [
4218
+ 50: [
4159
4219
  function (_dereq_, module, exports) {
4160
4220
  'use strict';
4161
4221
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4175,7 +4235,7 @@ require = function () {
4175
4235
  },
4176
4236
  {}
4177
4237
  ],
4178
- 50: [
4238
+ 51: [
4179
4239
  function (_dereq_, module, exports) {
4180
4240
  'use strict';
4181
4241
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4208,12 +4268,12 @@ require = function () {
4208
4268
  exports.inits = inits;
4209
4269
  },
4210
4270
  {
4211
- '../parser': 49,
4271
+ '../parser': 50,
4212
4272
  'spica/array': 6,
4213
4273
  'spica/global': 17
4214
4274
  }
4215
4275
  ],
4216
- 51: [
4276
+ 52: [
4217
4277
  function (_dereq_, module, exports) {
4218
4278
  'use strict';
4219
4279
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4246,12 +4306,12 @@ require = function () {
4246
4306
  exports.sequence = sequence;
4247
4307
  },
4248
4308
  {
4249
- '../parser': 49,
4309
+ '../parser': 50,
4250
4310
  'spica/array': 6,
4251
4311
  'spica/global': 17
4252
4312
  }
4253
4313
  ],
4254
- 52: [
4314
+ 53: [
4255
4315
  function (_dereq_, module, exports) {
4256
4316
  'use strict';
4257
4317
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4302,12 +4362,12 @@ require = function () {
4302
4362
  exports.some = some;
4303
4363
  },
4304
4364
  {
4305
- '../parser': 49,
4365
+ '../parser': 50,
4306
4366
  'spica/array': 6,
4307
4367
  'spica/global': 17
4308
4368
  }
4309
4369
  ],
4310
- 53: [
4370
+ 54: [
4311
4371
  function (_dereq_, module, exports) {
4312
4372
  'use strict';
4313
4373
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4334,11 +4394,11 @@ require = function () {
4334
4394
  exports.subsequence = subsequence;
4335
4395
  },
4336
4396
  {
4337
- './inits': 50,
4338
- './union': 55
4397
+ './inits': 51,
4398
+ './union': 56
4339
4399
  }
4340
4400
  ],
4341
- 54: [
4401
+ 55: [
4342
4402
  function (_dereq_, module, exports) {
4343
4403
  'use strict';
4344
4404
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4351,11 +4411,11 @@ require = function () {
4351
4411
  exports.tails = tails;
4352
4412
  },
4353
4413
  {
4354
- './sequence': 51,
4355
- './union': 55
4414
+ './sequence': 52,
4415
+ './union': 56
4356
4416
  }
4357
4417
  ],
4358
- 55: [
4418
+ 56: [
4359
4419
  function (_dereq_, module, exports) {
4360
4420
  'use strict';
4361
4421
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4380,7 +4440,7 @@ require = function () {
4380
4440
  },
4381
4441
  { 'spica/global': 17 }
4382
4442
  ],
4383
- 56: [
4443
+ 57: [
4384
4444
  function (_dereq_, module, exports) {
4385
4445
  'use strict';
4386
4446
  var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
@@ -4405,9 +4465,9 @@ require = function () {
4405
4465
  Object.defineProperty(exports, '__esModule', { value: true });
4406
4466
  __exportStar(_dereq_('./parser/api'), exports);
4407
4467
  },
4408
- { './parser/api': 57 }
4468
+ { './parser/api': 58 }
4409
4469
  ],
4410
- 57: [
4470
+ 58: [
4411
4471
  function (_dereq_, module, exports) {
4412
4472
  'use strict';
4413
4473
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4462,15 +4522,15 @@ require = function () {
4462
4522
  });
4463
4523
  },
4464
4524
  {
4465
- './api/bind': 58,
4466
- './api/body': 59,
4467
- './api/cache': 60,
4468
- './api/header': 61,
4469
- './api/normalize': 62,
4470
- './api/parse': 63
4525
+ './api/bind': 59,
4526
+ './api/body': 60,
4527
+ './api/cache': 61,
4528
+ './api/header': 62,
4529
+ './api/normalize': 63,
4530
+ './api/parse': 64
4471
4531
  }
4472
4532
  ],
4473
- 58: [
4533
+ 59: [
4474
4534
  function (_dereq_, module, exports) {
4475
4535
  'use strict';
4476
4536
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4644,21 +4704,21 @@ require = function () {
4644
4704
  exports.bind = bind;
4645
4705
  },
4646
4706
  {
4647
- '../../combinator/data/parser': 49,
4648
- '../block': 65,
4649
- '../header': 89,
4650
- '../processor/figure': 127,
4651
- '../processor/footnote': 128,
4652
- '../segment': 129,
4653
- './header': 61,
4654
- './normalize': 62,
4707
+ '../../combinator/data/parser': 50,
4708
+ '../block': 66,
4709
+ '../header': 90,
4710
+ '../processor/figure': 128,
4711
+ '../processor/footnote': 129,
4712
+ '../segment': 130,
4713
+ './header': 62,
4714
+ './normalize': 63,
4655
4715
  'spica/alias': 5,
4656
4716
  'spica/array': 6,
4657
4717
  'spica/global': 17,
4658
4718
  'spica/url': 27
4659
4719
  }
4660
4720
  ],
4661
- 59: [
4721
+ 60: [
4662
4722
  function (_dereq_, module, exports) {
4663
4723
  'use strict';
4664
4724
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4669,9 +4729,9 @@ require = function () {
4669
4729
  }
4670
4730
  exports.body = body;
4671
4731
  },
4672
- { './header': 61 }
4732
+ { './header': 62 }
4673
4733
  ],
4674
- 60: [
4734
+ 61: [
4675
4735
  function (_dereq_, module, exports) {
4676
4736
  'use strict';
4677
4737
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4685,7 +4745,7 @@ require = function () {
4685
4745
  },
4686
4746
  { 'spica/cache': 9 }
4687
4747
  ],
4688
- 61: [
4748
+ 62: [
4689
4749
  function (_dereq_, module, exports) {
4690
4750
  'use strict';
4691
4751
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4713,11 +4773,11 @@ require = function () {
4713
4773
  }
4714
4774
  },
4715
4775
  {
4716
- '../../combinator/data/parser': 49,
4717
- '../header': 89
4776
+ '../../combinator/data/parser': 50,
4777
+ '../header': 90
4718
4778
  }
4719
4779
  ],
4720
- 62: [
4780
+ 63: [
4721
4781
  function (_dereq_, module, exports) {
4722
4782
  'use strict';
4723
4783
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4791,11 +4851,11 @@ require = function () {
4791
4851
  exports.escape = escape;
4792
4852
  },
4793
4853
  {
4794
- '../../combinator/data/parser': 49,
4795
- '../inline/htmlentity': 114
4854
+ '../../combinator/data/parser': 50,
4855
+ '../inline/htmlentity': 115
4796
4856
  }
4797
4857
  ],
4798
- 63: [
4858
+ 64: [
4799
4859
  function (_dereq_, module, exports) {
4800
4860
  'use strict';
4801
4861
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4844,14 +4904,14 @@ require = function () {
4844
4904
  exports.parse = parse;
4845
4905
  },
4846
4906
  {
4847
- '../../combinator/data/parser': 49,
4848
- '../block': 65,
4849
- '../header': 89,
4850
- '../processor/figure': 127,
4851
- '../processor/footnote': 128,
4852
- '../segment': 129,
4853
- './header': 61,
4854
- './normalize': 62,
4907
+ '../../combinator/data/parser': 50,
4908
+ '../block': 66,
4909
+ '../header': 90,
4910
+ '../processor/figure': 128,
4911
+ '../processor/footnote': 129,
4912
+ '../segment': 130,
4913
+ './header': 62,
4914
+ './normalize': 63,
4855
4915
  'spica/alias': 5,
4856
4916
  'spica/global': 17,
4857
4917
  'spica/memoize': 20,
@@ -4859,7 +4919,7 @@ require = function () {
4859
4919
  'typed-dom': 29
4860
4920
  }
4861
4921
  ],
4862
- 64: [
4922
+ 65: [
4863
4923
  function (_dereq_, module, exports) {
4864
4924
  'use strict';
4865
4925
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4875,11 +4935,11 @@ require = function () {
4875
4935
  },
4876
4936
  {
4877
4937
  '../combinator': 30,
4878
- './inline/autolink': 92,
4879
- './source': 130
4938
+ './inline/autolink': 93,
4939
+ './source': 131
4880
4940
  }
4881
4941
  ],
4882
- 65: [
4942
+ 66: [
4883
4943
  function (_dereq_, module, exports) {
4884
4944
  'use strict';
4885
4945
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4917,12 +4977,9 @@ require = function () {
4917
4977
  paragraph_1.paragraph
4918
4978
  ]))));
4919
4979
  function error(parser) {
4920
- return (0, combinator_1.recover)((0, combinator_1.union)([
4921
- (0, combinator_1.open)('\0', source => {
4922
- throw new Error(source.split('\n', 1)[0]);
4923
- }),
4924
- parser
4925
- ]), (source, {id}, reason) => [
4980
+ return (0, combinator_1.recover)((0, combinator_1.fallback)((0, combinator_1.open)('\0', source => {
4981
+ throw new Error(source.split('\n', 1)[0]);
4982
+ }), parser), (source, {id}, reason) => [
4926
4983
  [
4927
4984
  (0, typed_dom_1.html)('h1', {
4928
4985
  id: id !== '' ? `error:${ (0, random_1.rnd0Z)(8) }` : global_1.undefined,
@@ -4940,25 +4997,25 @@ require = function () {
4940
4997
  },
4941
4998
  {
4942
4999
  '../combinator': 30,
4943
- './block/blockquote': 66,
4944
- './block/codeblock': 67,
4945
- './block/dlist': 68,
4946
- './block/extension': 69,
4947
- './block/heading': 78,
4948
- './block/horizontalrule': 79,
4949
- './block/ilist': 80,
4950
- './block/mathblock': 81,
4951
- './block/olist': 82,
4952
- './block/paragraph': 83,
4953
- './block/table': 87,
4954
- './block/ulist': 88,
4955
- './source': 130,
5000
+ './block/blockquote': 67,
5001
+ './block/codeblock': 68,
5002
+ './block/dlist': 69,
5003
+ './block/extension': 70,
5004
+ './block/heading': 79,
5005
+ './block/horizontalrule': 80,
5006
+ './block/ilist': 81,
5007
+ './block/mathblock': 82,
5008
+ './block/olist': 83,
5009
+ './block/paragraph': 84,
5010
+ './block/table': 88,
5011
+ './block/ulist': 89,
5012
+ './source': 131,
4956
5013
  'spica/global': 17,
4957
5014
  'spica/random': 24,
4958
5015
  'typed-dom': 29
4959
5016
  }
4960
5017
  ],
4961
- 66: [
5018
+ 67: [
4962
5019
  function (_dereq_, module, exports) {
4963
5020
  'use strict';
4964
5021
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5010,13 +5067,13 @@ require = function () {
5010
5067
  },
5011
5068
  {
5012
5069
  '../../combinator': 30,
5013
- '../api/parse': 63,
5014
- '../autolink': 64,
5015
- '../source': 130,
5070
+ '../api/parse': 64,
5071
+ '../autolink': 65,
5072
+ '../source': 131,
5016
5073
  'typed-dom': 29
5017
5074
  }
5018
5075
  ],
5019
- 67: [
5076
+ 68: [
5020
5077
  function (_dereq_, module, exports) {
5021
5078
  'use strict';
5022
5079
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5065,15 +5122,15 @@ require = function () {
5065
5122
  },
5066
5123
  {
5067
5124
  '../../combinator': 30,
5068
- '../../combinator/data/parser': 49,
5069
- '../autolink': 64,
5070
- '../source': 130,
5125
+ '../../combinator/data/parser': 50,
5126
+ '../autolink': 65,
5127
+ '../source': 131,
5071
5128
  'spica/array': 6,
5072
5129
  'spica/global': 17,
5073
5130
  'typed-dom': 29
5074
5131
  }
5075
5132
  ],
5076
- 68: [
5133
+ 69: [
5077
5134
  function (_dereq_, module, exports) {
5078
5135
  'use strict';
5079
5136
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5113,17 +5170,17 @@ require = function () {
5113
5170
  },
5114
5171
  {
5115
5172
  '../../combinator': 30,
5116
- '../inline': 90,
5117
- '../inline/extension/indexee': 109,
5118
- '../inline/extension/indexer': 110,
5119
- '../locale': 125,
5120
- '../source': 130,
5121
- '../util': 136,
5173
+ '../inline': 91,
5174
+ '../inline/extension/indexee': 110,
5175
+ '../inline/extension/indexer': 111,
5176
+ '../locale': 126,
5177
+ '../source': 131,
5178
+ '../util': 137,
5122
5179
  'spica/array': 6,
5123
5180
  'typed-dom': 29
5124
5181
  }
5125
5182
  ],
5126
- 69: [
5183
+ 70: [
5127
5184
  function (_dereq_, module, exports) {
5128
5185
  'use strict';
5129
5186
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5160,17 +5217,17 @@ require = function () {
5160
5217
  },
5161
5218
  {
5162
5219
  '../../combinator': 30,
5163
- './extension/aside': 70,
5164
- './extension/example': 71,
5165
- './extension/fig': 72,
5166
- './extension/figbase': 73,
5167
- './extension/figure': 74,
5168
- './extension/message': 75,
5169
- './extension/placeholder': 76,
5170
- './extension/table': 77
5220
+ './extension/aside': 71,
5221
+ './extension/example': 72,
5222
+ './extension/fig': 73,
5223
+ './extension/figbase': 74,
5224
+ './extension/figure': 75,
5225
+ './extension/message': 76,
5226
+ './extension/placeholder': 77,
5227
+ './extension/table': 78
5171
5228
  }
5172
5229
  ],
5173
- 70: [
5230
+ 71: [
5174
5231
  function (_dereq_, module, exports) {
5175
5232
  'use strict';
5176
5233
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5219,12 +5276,12 @@ require = function () {
5219
5276
  },
5220
5277
  {
5221
5278
  '../../../combinator': 30,
5222
- '../../api/parse': 63,
5223
- '../../inline/extension/indexee': 109,
5279
+ '../../api/parse': 64,
5280
+ '../../inline/extension/indexee': 110,
5224
5281
  'typed-dom': 29
5225
5282
  }
5226
5283
  ],
5227
- 71: [
5284
+ 72: [
5228
5285
  function (_dereq_, module, exports) {
5229
5286
  'use strict';
5230
5287
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5289,13 +5346,13 @@ require = function () {
5289
5346
  },
5290
5347
  {
5291
5348
  '../../../combinator': 30,
5292
- '../../../combinator/data/parser': 49,
5293
- '../../api/parse': 63,
5294
- '../mathblock': 81,
5349
+ '../../../combinator/data/parser': 50,
5350
+ '../../api/parse': 64,
5351
+ '../mathblock': 82,
5295
5352
  'typed-dom': 29
5296
5353
  }
5297
5354
  ],
5298
- 72: [
5355
+ 73: [
5299
5356
  function (_dereq_, module, exports) {
5300
5357
  'use strict';
5301
5358
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5330,17 +5387,17 @@ require = function () {
5330
5387
  },
5331
5388
  {
5332
5389
  '../../../combinator': 30,
5333
- '../../inline/extension/label': 111,
5334
- '../../source': 130,
5335
- '../blockquote': 66,
5336
- '../codeblock': 67,
5337
- '../mathblock': 81,
5338
- './figure': 74,
5339
- './placeholder': 76,
5340
- './table': 77
5390
+ '../../inline/extension/label': 112,
5391
+ '../../source': 131,
5392
+ '../blockquote': 67,
5393
+ '../codeblock': 68,
5394
+ '../mathblock': 82,
5395
+ './figure': 75,
5396
+ './placeholder': 77,
5397
+ './table': 78
5341
5398
  }
5342
5399
  ],
5343
- 73: [
5400
+ 74: [
5344
5401
  function (_dereq_, module, exports) {
5345
5402
  'use strict';
5346
5403
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5360,11 +5417,11 @@ require = function () {
5360
5417
  },
5361
5418
  {
5362
5419
  '../../../combinator': 30,
5363
- '../../inline/extension/label': 111,
5420
+ '../../inline/extension/label': 112,
5364
5421
  'typed-dom': 29
5365
5422
  }
5366
5423
  ],
5367
- 74: [
5424
+ 75: [
5368
5425
  function (_dereq_, module, exports) {
5369
5426
  'use strict';
5370
5427
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5456,24 +5513,24 @@ require = function () {
5456
5513
  },
5457
5514
  {
5458
5515
  '../../../combinator': 30,
5459
- '../../inline': 90,
5460
- '../../inline/extension/label': 111,
5461
- '../../locale': 125,
5462
- '../../source': 130,
5463
- '../../util': 136,
5464
- '../blockquote': 66,
5465
- '../codeblock': 67,
5466
- '../mathblock': 81,
5467
- '../table': 87,
5468
- './example': 71,
5469
- './placeholder': 76,
5470
- './table': 77,
5516
+ '../../inline': 91,
5517
+ '../../inline/extension/label': 112,
5518
+ '../../locale': 126,
5519
+ '../../source': 131,
5520
+ '../../util': 137,
5521
+ '../blockquote': 67,
5522
+ '../codeblock': 68,
5523
+ '../mathblock': 82,
5524
+ '../table': 88,
5525
+ './example': 72,
5526
+ './placeholder': 77,
5527
+ './table': 78,
5471
5528
  'spica/global': 17,
5472
5529
  'spica/memoize': 20,
5473
5530
  'typed-dom': 29
5474
5531
  }
5475
5532
  ],
5476
- 75: [
5533
+ 76: [
5477
5534
  function (_dereq_, module, exports) {
5478
5535
  'use strict';
5479
5536
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5540,22 +5597,22 @@ require = function () {
5540
5597
  },
5541
5598
  {
5542
5599
  '../../../combinator': 30,
5543
- '../../../combinator/data/parser': 49,
5544
- '../../segment': 129,
5545
- '../../source': 130,
5546
- '../blockquote': 66,
5547
- '../codeblock': 67,
5548
- '../ilist': 80,
5549
- '../mathblock': 81,
5550
- '../olist': 82,
5551
- '../paragraph': 83,
5552
- '../table': 87,
5553
- '../ulist': 88,
5600
+ '../../../combinator/data/parser': 50,
5601
+ '../../segment': 130,
5602
+ '../../source': 131,
5603
+ '../blockquote': 67,
5604
+ '../codeblock': 68,
5605
+ '../ilist': 81,
5606
+ '../mathblock': 82,
5607
+ '../olist': 83,
5608
+ '../paragraph': 84,
5609
+ '../table': 88,
5610
+ '../ulist': 89,
5554
5611
  'spica/array': 6,
5555
5612
  'typed-dom': 29
5556
5613
  }
5557
5614
  ],
5558
- 76: [
5615
+ 77: [
5559
5616
  function (_dereq_, module, exports) {
5560
5617
  'use strict';
5561
5618
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5578,7 +5635,7 @@ require = function () {
5578
5635
  'typed-dom': 29
5579
5636
  }
5580
5637
  ],
5581
- 77: [
5638
+ 78: [
5582
5639
  function (_dereq_, module, exports) {
5583
5640
  'use strict';
5584
5641
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5844,17 +5901,17 @@ require = function () {
5844
5901
  },
5845
5902
  {
5846
5903
  '../../../combinator': 30,
5847
- '../../inline': 90,
5848
- '../../locale': 125,
5849
- '../../source': 130,
5850
- '../../util': 136,
5904
+ '../../inline': 91,
5905
+ '../../locale': 126,
5906
+ '../../source': 131,
5907
+ '../../util': 137,
5851
5908
  'spica/alias': 5,
5852
5909
  'spica/array': 6,
5853
5910
  'spica/global': 17,
5854
5911
  'typed-dom': 29
5855
5912
  }
5856
5913
  ],
5857
- 78: [
5914
+ 79: [
5858
5915
  function (_dereq_, module, exports) {
5859
5916
  'use strict';
5860
5917
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5895,16 +5952,16 @@ require = function () {
5895
5952
  },
5896
5953
  {
5897
5954
  '../../combinator': 30,
5898
- '../inline': 90,
5899
- '../inline/extension/indexee': 109,
5900
- '../inline/extension/indexer': 110,
5901
- '../source': 130,
5902
- '../util': 136,
5955
+ '../inline': 91,
5956
+ '../inline/extension/indexee': 110,
5957
+ '../inline/extension/indexer': 111,
5958
+ '../source': 131,
5959
+ '../util': 137,
5903
5960
  'spica/array': 6,
5904
5961
  'typed-dom': 29
5905
5962
  }
5906
5963
  ],
5907
- 79: [
5964
+ 80: [
5908
5965
  function (_dereq_, module, exports) {
5909
5966
  'use strict';
5910
5967
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5921,7 +5978,7 @@ require = function () {
5921
5978
  'typed-dom': 29
5922
5979
  }
5923
5980
  ],
5924
- 80: [
5981
+ 81: [
5925
5982
  function (_dereq_, module, exports) {
5926
5983
  'use strict';
5927
5984
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5930,15 +5987,19 @@ require = function () {
5930
5987
  const ulist_1 = _dereq_('./ulist');
5931
5988
  const olist_1 = _dereq_('./olist');
5932
5989
  const inline_1 = _dereq_('../inline');
5990
+ const source_1 = _dereq_('../source');
5933
5991
  const typed_dom_1 = _dereq_('typed-dom');
5934
- exports.ilist = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)(/^[-+*](?=[^\S\n]|\n[^\S\n]*\S)/, (0, combinator_1.context)({ syntax: { inline: { media: false } } }, (0, combinator_1.some)((0, combinator_1.creator)((0, combinator_1.union)([(0, combinator_1.fmap)((0, combinator_1.inits)([
5992
+ exports.ilist = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)(/^[-+*](?=[^\S\n]|\n[^\S\n]*\S)/, (0, combinator_1.context)({ syntax: { inline: { media: false } } }, (0, combinator_1.some)((0, combinator_1.creator)((0, combinator_1.union)([(0, combinator_1.fmap)((0, combinator_1.fallback)((0, combinator_1.inits)([
5935
5993
  (0, combinator_1.line)((0, combinator_1.open)(/^[-+*](?:$|\s)/, (0, combinator_1.trim)((0, combinator_1.some)(inline_1.inline)), true)),
5936
5994
  (0, combinator_1.indent)((0, combinator_1.union)([
5937
5995
  ulist_1.ulist_,
5938
5996
  olist_1.olist_,
5939
5997
  exports.ilist_
5940
5998
  ]))
5941
- ]), ns => [(0, typed_dom_1.html)('li', (0, typed_dom_1.defrag)((0, ulist_1.fillFirstLine)(ns)))])]))))), es => [(0, typed_dom_1.html)('ul', {
5999
+ ]), (0, combinator_1.rewrite)(source_1.contentline, source => [
6000
+ [(0, typed_dom_1.html)('span', source.replace('\n', ''))],
6001
+ ''
6002
+ ])), ns => [(0, typed_dom_1.html)('li', (0, typed_dom_1.defrag)((0, ulist_1.fillFirstLine)(ns)))])]))))), es => [(0, typed_dom_1.html)('ul', {
5942
6003
  class: 'invalid',
5943
6004
  'data-invalid-syntax': 'list',
5944
6005
  'data-invalid-type': 'syntax',
@@ -5948,13 +6009,14 @@ require = function () {
5948
6009
  },
5949
6010
  {
5950
6011
  '../../combinator': 30,
5951
- '../inline': 90,
5952
- './olist': 82,
5953
- './ulist': 88,
6012
+ '../inline': 91,
6013
+ '../source': 131,
6014
+ './olist': 83,
6015
+ './ulist': 89,
5954
6016
  'typed-dom': 29
5955
6017
  }
5956
6018
  ],
5957
- 81: [
6019
+ 82: [
5958
6020
  function (_dereq_, module, exports) {
5959
6021
  'use strict';
5960
6022
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5989,7 +6051,7 @@ require = function () {
5989
6051
  'typed-dom': 29
5990
6052
  }
5991
6053
  ],
5992
- 82: [
6054
+ 83: [
5993
6055
  function (_dereq_, module, exports) {
5994
6056
  'use strict';
5995
6057
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5999,11 +6061,12 @@ require = function () {
5999
6061
  const ulist_1 = _dereq_('./ulist');
6000
6062
  const ilist_1 = _dereq_('./ilist');
6001
6063
  const inline_1 = _dereq_('../inline');
6064
+ const source_1 = _dereq_('../source');
6002
6065
  const typed_dom_1 = _dereq_('typed-dom');
6003
6066
  const memoize_1 = _dereq_('spica/memoize');
6004
6067
  const array_1 = _dereq_('spica/array');
6005
6068
  exports.olist = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.match)(/^(?=(?:([0-9]+|[a-z]+|[A-Z]+)(?:-[0-9]+)*(\.)|\(([0-9]+|[a-z]+)(\))(?:-[0-9]+)*)(?=[^\S\n]|\n[^\S\n]*\S))/, (0, memoize_1.memoize)(ms => list(type(ms[1] || ms[3]), ms[2] || ms[4]), ms => type(ms[1] || ms[3]) + (ms[2] || ms[4])))));
6006
- const list = (type, delim) => (0, combinator_1.fmap)((0, combinator_1.context)({ syntax: { inline: { media: false } } }, (0, combinator_1.some)((0, combinator_1.creator)((0, combinator_1.union)([(0, combinator_1.fmap)((0, combinator_1.inits)([
6069
+ const list = (type, delim) => (0, combinator_1.fmap)((0, combinator_1.context)({ syntax: { inline: { media: false } } }, (0, combinator_1.some)((0, combinator_1.creator)((0, combinator_1.union)([(0, combinator_1.fmap)((0, combinator_1.fallback)((0, combinator_1.inits)([
6007
6070
  (0, combinator_1.line)((0, combinator_1.open)(items[delim], (0, combinator_1.trim)((0, combinator_1.subsequence)([
6008
6071
  ulist_1.checkbox,
6009
6072
  (0, combinator_1.trimStart)((0, combinator_1.some)(inline_1.inline))
@@ -6013,7 +6076,7 @@ require = function () {
6013
6076
  exports.olist_,
6014
6077
  ilist_1.ilist_
6015
6078
  ]))
6016
- ]), ns => [(0, typed_dom_1.html)('li', { 'data-marker': ns[0] }, (0, typed_dom_1.defrag)((0, ulist_1.fillFirstLine)((0, array_1.shift)(ns)[1])))])])))), es => [format((0, typed_dom_1.html)('ol', es), type, delim)]);
6079
+ ]), iitem), ns => [(0, typed_dom_1.html)('li', { 'data-marker': ns[0] }, (0, typed_dom_1.defrag)((0, ulist_1.fillFirstLine)((0, array_1.shift)(ns)[1])))])])))), es => [format((0, typed_dom_1.html)('ol', es), type, delim)]);
6017
6080
  const items = {
6018
6081
  '.': (0, combinator_1.focus)(/^(?:[0-9]+|[a-z]+|[A-Z]+)(?:-(?!-)[0-9]*)*(?![^\S\n])\.?(?=$|\s)/, source => [
6019
6082
  [`${ source.split('.', 1)[0] }.`],
@@ -6025,6 +6088,18 @@ require = function () {
6025
6088
  ])
6026
6089
  };
6027
6090
  exports.olist_ = (0, combinator_1.convert)(source => source[0] !== '(' ? source.replace(/^((?:[0-9]+|[a-z]+|[A-Z]+)(?:-(?!-)[0-9]*)*)\.?(?=$|\n)/, `$1. `) : source.replace(/^\((?=$|\n)/, `(1) `).replace(/^\(((?:[0-9]+|[a-z]+))\)?((?:-(?!-)[0-9]*)*(?=$|\n))/, `($1)$2 `), exports.olist);
6091
+ const iitem = (0, combinator_1.rewrite)(source_1.contentline, source => [
6092
+ [
6093
+ '',
6094
+ (0, typed_dom_1.html)('span', {
6095
+ class: 'invalid',
6096
+ 'data-invalid-syntax': 'listitem',
6097
+ 'data-invalid-type': 'syntax',
6098
+ 'data-invalid-description': 'Fix the indent or the head of list items.'
6099
+ }, source.replace('\n', ''))
6100
+ ],
6101
+ ''
6102
+ ]);
6028
6103
  function type(index) {
6029
6104
  switch (index) {
6030
6105
  case 'i':
@@ -6080,25 +6155,30 @@ require = function () {
6080
6155
  const marker = (_e = (_d = (_c = el.firstElementChild) === null || _c === void 0 ? void 0 : _c.getAttribute('data-marker').match(initial(type))) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : '';
6081
6156
  for (let es = el.children, len = es.length, i = 0; i < len; ++i) {
6082
6157
  const el = es[i];
6083
- if (el.getAttribute('data-marker') !== marker)
6084
- break;
6085
- el.removeAttribute('data-marker');
6158
+ switch (el.getAttribute('data-marker')) {
6159
+ case '':
6160
+ case marker:
6161
+ el.removeAttribute('data-marker');
6162
+ continue;
6163
+ }
6164
+ break;
6086
6165
  }
6087
6166
  return el;
6088
6167
  }
6089
6168
  },
6090
6169
  {
6091
6170
  '../../combinator': 30,
6092
- '../inline': 90,
6093
- './ilist': 80,
6094
- './ulist': 88,
6171
+ '../inline': 91,
6172
+ '../source': 131,
6173
+ './ilist': 81,
6174
+ './ulist': 89,
6095
6175
  'spica/array': 6,
6096
6176
  'spica/global': 17,
6097
6177
  'spica/memoize': 20,
6098
6178
  'typed-dom': 29
6099
6179
  }
6100
6180
  ],
6101
- 83: [
6181
+ 84: [
6102
6182
  function (_dereq_, module, exports) {
6103
6183
  'use strict';
6104
6184
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6122,17 +6202,17 @@ require = function () {
6122
6202
  },
6123
6203
  {
6124
6204
  '../../combinator': 30,
6125
- '../inline': 90,
6126
- '../locale': 125,
6127
- '../source': 130,
6128
- '../util': 136,
6129
- './paragraph/mention': 84,
6130
- './paragraph/mention/quote': 86,
6205
+ '../inline': 91,
6206
+ '../locale': 126,
6207
+ '../source': 131,
6208
+ '../util': 137,
6209
+ './paragraph/mention': 85,
6210
+ './paragraph/mention/quote': 87,
6131
6211
  'spica/array': 6,
6132
6212
  'typed-dom': 29
6133
6213
  }
6134
6214
  ],
6135
- 84: [
6215
+ 85: [
6136
6216
  function (_dereq_, module, exports) {
6137
6217
  'use strict';
6138
6218
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6147,11 +6227,11 @@ require = function () {
6147
6227
  },
6148
6228
  {
6149
6229
  '../../../combinator': 30,
6150
- './mention/cite': 85,
6151
- './mention/quote': 86
6230
+ './mention/cite': 86,
6231
+ './mention/quote': 87
6152
6232
  }
6153
6233
  ],
6154
- 85: [
6234
+ 86: [
6155
6235
  function (_dereq_, module, exports) {
6156
6236
  'use strict';
6157
6237
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6163,22 +6243,22 @@ require = function () {
6163
6243
  exports.cite = (0, combinator_1.creator)((0, combinator_1.line)((0, combinator_1.fmap)((0, combinator_1.validate)('>>', (0, combinator_1.reverse)((0, combinator_1.tails)([
6164
6244
  (0, source_1.str)(/^>*(?=>>)/),
6165
6245
  anchor_1.anchor
6166
- ]))), ([el, str = '']) => [
6246
+ ]))), ([el, quotes = '']) => [
6167
6247
  (0, typed_dom_1.html)('span', { class: 'cite' }, (0, typed_dom_1.defrag)([
6168
- str + '>',
6169
- (0, typed_dom_1.define)(el, { 'data-depth': `${ str.length + 1 }` }, el.innerText.slice(1))
6248
+ quotes + '>',
6249
+ (0, typed_dom_1.define)(el, { 'data-depth': `${ quotes.length + 1 }` }, el.innerText.slice(1))
6170
6250
  ])),
6171
6251
  (0, typed_dom_1.html)('br')
6172
6252
  ])));
6173
6253
  },
6174
6254
  {
6175
6255
  '../../../../combinator': 30,
6176
- '../../../inline/autolink/anchor': 94,
6177
- '../../../source': 130,
6256
+ '../../../inline/autolink/anchor': 95,
6257
+ '../../../source': 131,
6178
6258
  'typed-dom': 29
6179
6259
  }
6180
6260
  ],
6181
- 86: [
6261
+ 87: [
6182
6262
  function (_dereq_, module, exports) {
6183
6263
  'use strict';
6184
6264
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6241,31 +6321,40 @@ require = function () {
6241
6321
  },
6242
6322
  {
6243
6323
  '../../../../combinator': 30,
6244
- '../../../../combinator/data/parser': 49,
6245
- '../../../autolink': 64,
6246
- '../../../inline/math': 118,
6247
- '../../../source': 130,
6324
+ '../../../../combinator/data/parser': 50,
6325
+ '../../../autolink': 65,
6326
+ '../../../inline/math': 119,
6327
+ '../../../source': 131,
6248
6328
  'typed-dom': 29
6249
6329
  }
6250
6330
  ],
6251
- 87: [
6331
+ 88: [
6252
6332
  function (_dereq_, module, exports) {
6253
6333
  'use strict';
6254
6334
  Object.defineProperty(exports, '__esModule', { value: true });
6255
6335
  exports.table = void 0;
6256
6336
  const combinator_1 = _dereq_('../../combinator');
6257
6337
  const inline_1 = _dereq_('../inline');
6338
+ const source_1 = _dereq_('../source');
6258
6339
  const typed_dom_1 = _dereq_('typed-dom');
6259
6340
  const array_1 = _dereq_('spica/array');
6260
- exports.table = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)(/^\|[^\n]*(?:\n\|[^\n]*){2,}/, (0, combinator_1.sequence)([
6341
+ exports.table = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)(/^\|[^\n]*(?:\n\|[^\n]*){2}/, (0, combinator_1.sequence)([
6261
6342
  row((0, combinator_1.some)(head), true),
6262
6343
  row((0, combinator_1.some)(align), false),
6263
6344
  (0, combinator_1.some)(row((0, combinator_1.some)(data), true))
6264
6345
  ])), rows => [(0, typed_dom_1.html)('table', [
6265
6346
  (0, typed_dom_1.html)('thead', [rows.shift()]),
6266
- (0, typed_dom_1.html)('tbody', format(rows, (0, array_1.push)([], rows.shift().children).map(el => el.textContent)))
6347
+ (0, typed_dom_1.html)('tbody', format(rows))
6267
6348
  ])])));
6268
- const row = (parser, optional) => (0, combinator_1.creator)((0, combinator_1.fmap)((0, combinator_1.line)((0, combinator_1.surround)(/^(?=\|)/, (0, combinator_1.some)((0, combinator_1.union)([parser])), /^\|?\s*$/, optional)), es => [(0, typed_dom_1.html)('tr', es)]));
6349
+ const row = (parser, optional) => (0, combinator_1.creator)((0, combinator_1.fallback)((0, combinator_1.fmap)((0, combinator_1.line)((0, combinator_1.surround)(/^(?=\|)/, (0, combinator_1.some)((0, combinator_1.union)([parser])), /^\|?\s*$/, optional)), es => [(0, typed_dom_1.html)('tr', es)]), (0, combinator_1.rewrite)(source_1.contentline, source => [
6350
+ [(0, typed_dom_1.html)('tr', {
6351
+ class: 'invalid',
6352
+ 'data-invalid-syntax': 'tablerow',
6353
+ 'data-invalid-type': 'syntax',
6354
+ 'data-invalid-description': 'Invalid table row.'
6355
+ }, [(0, typed_dom_1.html)('td', source.replace('\n', ''))])],
6356
+ ''
6357
+ ])));
6269
6358
  const align = (0, combinator_1.creator)((0, combinator_1.fmap)((0, combinator_1.open)('|', (0, combinator_1.union)([
6270
6359
  (0, combinator_1.focus)(/^:-+:/, () => [
6271
6360
  ['center'],
@@ -6287,10 +6376,10 @@ require = function () {
6287
6376
  const cell = (0, combinator_1.surround)(/^\|(?:\\?\s)*(?=\S)/, (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), /^(?:\\?\s)*(?=\||\\?$)/), /^[^|]*/, true);
6288
6377
  const head = (0, combinator_1.creator)((0, combinator_1.fmap)(cell, ns => [(0, typed_dom_1.html)('th', (0, typed_dom_1.defrag)(ns))]));
6289
6378
  const data = (0, combinator_1.creator)((0, combinator_1.fmap)(cell, ns => [(0, typed_dom_1.html)('td', (0, typed_dom_1.defrag)(ns))]));
6290
- function format(rows, aligns) {
6379
+ function format(rows) {
6380
+ const aligns = rows[0].classList.contains('invalid') ? [] : (0, array_1.push)([], rows.shift().children).map(el => el.textContent);
6291
6381
  for (let i = 0, len = rows.length; i < len; ++i) {
6292
- const row = rows[i];
6293
- const cols = row.children;
6382
+ const cols = rows[i].children;
6294
6383
  for (let i = 0, len = cols.length; i < len; ++i) {
6295
6384
  if (i > 0 && !aligns[i]) {
6296
6385
  aligns[i] = aligns[i - 1];
@@ -6305,12 +6394,13 @@ require = function () {
6305
6394
  },
6306
6395
  {
6307
6396
  '../../combinator': 30,
6308
- '../inline': 90,
6397
+ '../inline': 91,
6398
+ '../source': 131,
6309
6399
  'spica/array': 6,
6310
6400
  'typed-dom': 29
6311
6401
  }
6312
6402
  ],
6313
- 88: [
6403
+ 89: [
6314
6404
  function (_dereq_, module, exports) {
6315
6405
  'use strict';
6316
6406
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6321,7 +6411,8 @@ require = function () {
6321
6411
  const inline_1 = _dereq_('../inline');
6322
6412
  const typed_dom_1 = _dereq_('typed-dom');
6323
6413
  const array_1 = _dereq_('spica/array');
6324
- exports.ulist = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)(/^-(?=[^\S\n]|\n[^\S\n]*\S)/, (0, combinator_1.context)({ syntax: { inline: { media: false } } }, (0, combinator_1.some)((0, combinator_1.creator)((0, combinator_1.union)([(0, combinator_1.fmap)((0, combinator_1.inits)([
6414
+ const source_1 = _dereq_('../source');
6415
+ exports.ulist = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)(/^-(?=[^\S\n]|\n[^\S\n]*\S)/, (0, combinator_1.context)({ syntax: { inline: { media: false } } }, (0, combinator_1.some)((0, combinator_1.creator)((0, combinator_1.union)([(0, combinator_1.fmap)((0, combinator_1.fallback)((0, combinator_1.inits)([
6325
6416
  (0, combinator_1.line)((0, combinator_1.open)(/^-(?:$|\s)/, (0, combinator_1.trim)((0, combinator_1.subsequence)([
6326
6417
  exports.checkbox,
6327
6418
  (0, combinator_1.trimStart)((0, combinator_1.some)(inline_1.inline))
@@ -6331,12 +6422,21 @@ require = function () {
6331
6422
  olist_1.olist_,
6332
6423
  ilist_1.ilist_
6333
6424
  ]))
6334
- ]), ns => [(0, typed_dom_1.html)('li', (0, typed_dom_1.defrag)(fillFirstLine(ns)))])]))))), es => [format((0, typed_dom_1.html)('ul', es))])));
6425
+ ]), iitem), ns => [(0, typed_dom_1.html)('li', (0, typed_dom_1.defrag)(fillFirstLine(ns)))])]))))), es => [format((0, typed_dom_1.html)('ul', es))])));
6335
6426
  exports.checkbox = (0, combinator_1.focus)(/^\[[xX ]\](?=$|\s)/, source => [
6336
6427
  [(0, typed_dom_1.html)('span', { class: 'checkbox' }, source[1].trimStart() ? '\u2611' : '\u2610')],
6337
6428
  ''
6338
6429
  ]);
6339
6430
  exports.ulist_ = (0, combinator_1.convert)(source => source.replace(/^-(?=$|\n)/, `$& `), exports.ulist);
6431
+ const iitem = (0, combinator_1.rewrite)(source_1.contentline, source => [
6432
+ [(0, typed_dom_1.html)('span', {
6433
+ class: 'invalid',
6434
+ 'data-invalid-syntax': 'listitem',
6435
+ 'data-invalid-type': 'syntax',
6436
+ 'data-invalid-description': 'Fix the indent or the head of list items.'
6437
+ }, source.replace('\n', ''))],
6438
+ ''
6439
+ ]);
6340
6440
  function fillFirstLine(ns) {
6341
6441
  return ns.length === 1 && typeof ns[0] === 'object' && [
6342
6442
  'UL',
@@ -6354,14 +6454,15 @@ require = function () {
6354
6454
  },
6355
6455
  {
6356
6456
  '../../combinator': 30,
6357
- '../inline': 90,
6358
- './ilist': 80,
6359
- './olist': 82,
6457
+ '../inline': 91,
6458
+ '../source': 131,
6459
+ './ilist': 81,
6460
+ './olist': 83,
6360
6461
  'spica/array': 6,
6361
6462
  'typed-dom': 29
6362
6463
  }
6363
6464
  ],
6364
- 89: [
6465
+ 90: [
6365
6466
  function (_dereq_, module, exports) {
6366
6467
  'use strict';
6367
6468
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6409,13 +6510,13 @@ require = function () {
6409
6510
  },
6410
6511
  {
6411
6512
  '../combinator': 30,
6412
- './api/normalize': 62,
6413
- './segment': 129,
6414
- './source': 130,
6513
+ './api/normalize': 63,
6514
+ './segment': 130,
6515
+ './source': 131,
6415
6516
  'typed-dom': 29
6416
6517
  }
6417
6518
  ],
6418
- 90: [
6519
+ 91: [
6419
6520
  function (_dereq_, module, exports) {
6420
6521
  'use strict';
6421
6522
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6486,32 +6587,32 @@ require = function () {
6486
6587
  },
6487
6588
  {
6488
6589
  '../combinator': 30,
6489
- './inline/annotation': 91,
6490
- './inline/autolink': 92,
6491
- './inline/bracket': 100,
6492
- './inline/code': 101,
6493
- './inline/comment': 102,
6494
- './inline/deletion': 103,
6495
- './inline/emphasis': 104,
6496
- './inline/emstrong': 105,
6497
- './inline/escape': 106,
6498
- './inline/extension': 107,
6499
- './inline/html': 113,
6500
- './inline/htmlentity': 114,
6501
- './inline/insertion': 115,
6502
- './inline/link': 116,
6503
- './inline/mark': 117,
6504
- './inline/math': 118,
6505
- './inline/media': 119,
6506
- './inline/reference': 120,
6507
- './inline/ruby': 121,
6508
- './inline/shortmedia': 122,
6509
- './inline/strong': 123,
6510
- './inline/template': 124,
6511
- './source': 130
6590
+ './inline/annotation': 92,
6591
+ './inline/autolink': 93,
6592
+ './inline/bracket': 101,
6593
+ './inline/code': 102,
6594
+ './inline/comment': 103,
6595
+ './inline/deletion': 104,
6596
+ './inline/emphasis': 105,
6597
+ './inline/emstrong': 106,
6598
+ './inline/escape': 107,
6599
+ './inline/extension': 108,
6600
+ './inline/html': 114,
6601
+ './inline/htmlentity': 115,
6602
+ './inline/insertion': 116,
6603
+ './inline/link': 117,
6604
+ './inline/mark': 118,
6605
+ './inline/math': 119,
6606
+ './inline/media': 120,
6607
+ './inline/reference': 121,
6608
+ './inline/ruby': 122,
6609
+ './inline/shortmedia': 123,
6610
+ './inline/strong': 124,
6611
+ './inline/template': 125,
6612
+ './source': 131
6512
6613
  }
6513
6614
  ],
6514
- 91: [
6615
+ 92: [
6515
6616
  function (_dereq_, module, exports) {
6516
6617
  'use strict';
6517
6618
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6524,7 +6625,7 @@ require = function () {
6524
6625
  exports.annotation = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.validate)('((', '))', '\n', (0, combinator_1.fmap)((0, combinator_1.surround)('((', (0, combinator_1.guard)(context => {
6525
6626
  var _a, _b, _c;
6526
6627
  return (_c = (_b = (_a = context.syntax) === null || _a === void 0 ? void 0 : _a.inline) === null || _b === void 0 ? void 0 : _b.annotation) !== null && _c !== void 0 ? _c : true;
6527
- }, (0, util_1.startTight)((0, combinator_1.context)({
6628
+ }, (0, util_1.startLoose)((0, combinator_1.context)({
6528
6629
  syntax: {
6529
6630
  inline: {
6530
6631
  annotation: false,
@@ -6532,17 +6633,17 @@ require = function () {
6532
6633
  }
6533
6634
  },
6534
6635
  state: global_1.undefined
6535
- }, (0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, ')', /^\\?\n/)])))), '))'), ns => [(0, typed_dom_1.html)('sup', { class: 'annotation' }, (0, util_1.trimEnd)((0, typed_dom_1.defrag)(ns)))]))));
6636
+ }, (0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, ')', /^\\?\n/)])), '))')), '))'), ns => [(0, typed_dom_1.html)('sup', { class: 'annotation' }, (0, util_1.trimNode)((0, typed_dom_1.defrag)(ns)))]))));
6536
6637
  },
6537
6638
  {
6538
6639
  '../../combinator': 30,
6539
- '../inline': 90,
6540
- '../util': 136,
6640
+ '../inline': 91,
6641
+ '../util': 137,
6541
6642
  'spica/global': 17,
6542
6643
  'typed-dom': 29
6543
6644
  }
6544
6645
  ],
6545
- 92: [
6646
+ 93: [
6546
6647
  function (_dereq_, module, exports) {
6547
6648
  'use strict';
6548
6649
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6578,18 +6679,18 @@ require = function () {
6578
6679
  },
6579
6680
  {
6580
6681
  '../../combinator': 30,
6581
- '../source': 130,
6582
- '../util': 136,
6583
- './autolink/account': 93,
6584
- './autolink/anchor': 94,
6585
- './autolink/channel': 95,
6586
- './autolink/email': 96,
6587
- './autolink/hashref': 97,
6588
- './autolink/hashtag': 98,
6589
- './autolink/url': 99
6682
+ '../source': 131,
6683
+ '../util': 137,
6684
+ './autolink/account': 94,
6685
+ './autolink/anchor': 95,
6686
+ './autolink/channel': 96,
6687
+ './autolink/email': 97,
6688
+ './autolink/hashref': 98,
6689
+ './autolink/hashtag': 99,
6690
+ './autolink/url': 100
6590
6691
  }
6591
6692
  ],
6592
- 93: [
6693
+ 94: [
6593
6694
  function (_dereq_, module, exports) {
6594
6695
  'use strict';
6595
6696
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6612,12 +6713,12 @@ require = function () {
6612
6713
  },
6613
6714
  {
6614
6715
  '../../../combinator': 30,
6615
- '../../source': 130,
6616
- '../link': 116,
6716
+ '../../source': 131,
6717
+ '../link': 117,
6617
6718
  'typed-dom': 29
6618
6719
  }
6619
6720
  ],
6620
- 94: [
6721
+ 95: [
6621
6722
  function (_dereq_, module, exports) {
6622
6723
  'use strict';
6623
6724
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6637,12 +6738,12 @@ require = function () {
6637
6738
  },
6638
6739
  {
6639
6740
  '../../../combinator': 30,
6640
- '../../source': 130,
6641
- '../link': 116,
6741
+ '../../source': 131,
6742
+ '../link': 117,
6642
6743
  'typed-dom': 29
6643
6744
  }
6644
6745
  ],
6645
- 95: [
6746
+ 96: [
6646
6747
  function (_dereq_, module, exports) {
6647
6748
  'use strict';
6648
6749
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6672,13 +6773,13 @@ require = function () {
6672
6773
  },
6673
6774
  {
6674
6775
  '../../../combinator': 30,
6675
- '../../util': 136,
6676
- './account': 93,
6677
- './hashtag': 98,
6776
+ '../../util': 137,
6777
+ './account': 94,
6778
+ './hashtag': 99,
6678
6779
  'typed-dom': 29
6679
6780
  }
6680
6781
  ],
6681
- 96: [
6782
+ 97: [
6682
6783
  function (_dereq_, module, exports) {
6683
6784
  'use strict';
6684
6785
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6696,11 +6797,11 @@ require = function () {
6696
6797
  },
6697
6798
  {
6698
6799
  '../../../combinator': 30,
6699
- '../../source': 130,
6800
+ '../../source': 131,
6700
6801
  'typed-dom': 29
6701
6802
  }
6702
6803
  ],
6703
- 97: [
6804
+ 98: [
6704
6805
  function (_dereq_, module, exports) {
6705
6806
  'use strict';
6706
6807
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6723,12 +6824,12 @@ require = function () {
6723
6824
  },
6724
6825
  {
6725
6826
  '../../../combinator': 30,
6726
- '../../source': 130,
6727
- '../link': 116,
6827
+ '../../source': 131,
6828
+ '../link': 117,
6728
6829
  'typed-dom': 29
6729
6830
  }
6730
6831
  ],
6731
- 98: [
6832
+ 99: [
6732
6833
  function (_dereq_, module, exports) {
6733
6834
  'use strict';
6734
6835
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6751,12 +6852,12 @@ require = function () {
6751
6852
  },
6752
6853
  {
6753
6854
  '../../../combinator': 30,
6754
- '../../source': 130,
6755
- '../link': 116,
6855
+ '../../source': 131,
6856
+ '../link': 117,
6756
6857
  'typed-dom': 29
6757
6858
  }
6758
6859
  ],
6759
- 99: [
6860
+ 100: [
6760
6861
  function (_dereq_, module, exports) {
6761
6862
  'use strict';
6762
6863
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6790,11 +6891,11 @@ require = function () {
6790
6891
  },
6791
6892
  {
6792
6893
  '../../../combinator': 30,
6793
- '../../source': 130,
6794
- '../link': 116
6894
+ '../../source': 131,
6895
+ '../link': 117
6795
6896
  }
6796
6897
  ],
6797
- 100: [
6898
+ 101: [
6798
6899
  function (_dereq_, module, exports) {
6799
6900
  'use strict';
6800
6901
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6855,14 +6956,14 @@ require = function () {
6855
6956
  },
6856
6957
  {
6857
6958
  '../../combinator': 30,
6858
- '../inline': 90,
6859
- '../source': 130,
6959
+ '../inline': 91,
6960
+ '../source': 131,
6860
6961
  'spica/array': 6,
6861
6962
  'spica/global': 17,
6862
6963
  'typed-dom': 29
6863
6964
  }
6864
6965
  ],
6865
- 101: [
6966
+ 102: [
6866
6967
  function (_dereq_, module, exports) {
6867
6968
  'use strict';
6868
6969
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6882,7 +6983,7 @@ require = function () {
6882
6983
  'typed-dom': 29
6883
6984
  }
6884
6985
  ],
6885
- 102: [
6986
+ 103: [
6886
6987
  function (_dereq_, module, exports) {
6887
6988
  'use strict';
6888
6989
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6920,7 +7021,7 @@ require = function () {
6920
7021
  'typed-dom': 29
6921
7022
  }
6922
7023
  ],
6923
- 103: [
7024
+ 104: [
6924
7025
  function (_dereq_, module, exports) {
6925
7026
  'use strict';
6926
7027
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6941,14 +7042,14 @@ require = function () {
6941
7042
  },
6942
7043
  {
6943
7044
  '../../combinator': 30,
6944
- '../inline': 90,
6945
- '../source': 130,
6946
- '../util': 136,
7045
+ '../inline': 91,
7046
+ '../source': 131,
7047
+ '../util': 137,
6947
7048
  'spica/array': 6,
6948
7049
  'typed-dom': 29
6949
7050
  }
6950
7051
  ],
6951
- 104: [
7052
+ 105: [
6952
7053
  function (_dereq_, module, exports) {
6953
7054
  'use strict';
6954
7055
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6963,7 +7064,7 @@ require = function () {
6963
7064
  exports.emphasis = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.surround)((0, combinator_1.close)((0, source_1.str)('*'), /^(?!\*)/), (0, util_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([
6964
7065
  strong_1.strong,
6965
7066
  (0, combinator_1.some)(inline_1.inline, '*')
6966
- ]))), (0, source_1.str)('*'), false, ([as, bs, cs], rest) => (0, util_1.verifyEndTight)(bs) ? [
7067
+ ]))), (0, source_1.str)('*'), false, ([as, bs, cs], rest) => (0, util_1.isEndTightNodes)(bs) ? [
6967
7068
  [(0, typed_dom_1.html)('em', (0, typed_dom_1.defrag)((0, util_1.trimEndBR)(bs)))],
6968
7069
  rest
6969
7070
  ] : [
@@ -6976,15 +7077,15 @@ require = function () {
6976
7077
  },
6977
7078
  {
6978
7079
  '../../combinator': 30,
6979
- '../inline': 90,
6980
- '../source': 130,
6981
- '../util': 136,
6982
- './strong': 123,
7080
+ '../inline': 91,
7081
+ '../source': 131,
7082
+ '../util': 137,
7083
+ './strong': 124,
6983
7084
  'spica/array': 6,
6984
7085
  'typed-dom': 29
6985
7086
  }
6986
7087
  ],
6987
- 105: [
7088
+ 106: [
6988
7089
  function (_dereq_, module, exports) {
6989
7090
  'use strict';
6990
7091
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6997,14 +7098,14 @@ require = function () {
6997
7098
  const array_1 = _dereq_('spica/array');
6998
7099
  exports.emstrong = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.surround)((0, source_1.str)('***'), (0, util_1.startTight)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, '*')])), (0, source_1.str)(/^\*{1,3}/), false, ([as, bs, cs], rest, context) => {
6999
7100
  var _a, _b;
7000
- if (!(0, util_1.verifyEndTight)(bs))
7101
+ if (!(0, util_1.isEndTightNodes)(bs))
7001
7102
  return [
7002
7103
  (0, array_1.unshift)(as, bs),
7003
7104
  cs[0] + rest
7004
7105
  ];
7005
7106
  switch (cs[0]) {
7006
7107
  case '*':
7007
- return (_a = (0, combinator_1.bind)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, '**')]), (ds, rest) => rest.slice(0, 2) === '**' && (0, util_1.verifyEndTight)(ds) ? [
7108
+ return (_a = (0, combinator_1.bind)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, '**')]), (ds, rest) => rest.slice(0, 2) === '**' && (0, util_1.isEndTightNodes)(ds) ? [
7008
7109
  [(0, typed_dom_1.html)('strong', (0, array_1.unshift)([(0, typed_dom_1.html)('em', (0, typed_dom_1.defrag)((0, util_1.trimEndBR)(bs)))], (0, typed_dom_1.defrag)((0, util_1.trimEndBR)(ds))))],
7009
7110
  rest.slice(2)
7010
7111
  ] : [
@@ -7021,7 +7122,7 @@ require = function () {
7021
7122
  rest
7022
7123
  ];
7023
7124
  case '**':
7024
- return (_b = (0, combinator_1.bind)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, '*')]), (ds, rest) => rest.slice(0, 1) === '*' && (0, util_1.verifyEndTight)(ds) ? [
7125
+ return (_b = (0, combinator_1.bind)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, '*')]), (ds, rest) => rest.slice(0, 1) === '*' && (0, util_1.isEndTightNodes)(ds) ? [
7025
7126
  [(0, typed_dom_1.html)('em', (0, array_1.unshift)([(0, typed_dom_1.html)('strong', (0, typed_dom_1.defrag)((0, util_1.trimEndBR)(bs)))], (0, typed_dom_1.defrag)((0, util_1.trimEndBR)(ds))))],
7026
7127
  rest.slice(1)
7027
7128
  ] : [
@@ -7050,14 +7151,14 @@ require = function () {
7050
7151
  },
7051
7152
  {
7052
7153
  '../../combinator': 30,
7053
- '../inline': 90,
7054
- '../source': 130,
7055
- '../util': 136,
7154
+ '../inline': 91,
7155
+ '../source': 131,
7156
+ '../util': 137,
7056
7157
  'spica/array': 6,
7057
7158
  'typed-dom': 29
7058
7159
  }
7059
7160
  ],
7060
- 106: [
7161
+ 107: [
7061
7162
  function (_dereq_, module, exports) {
7062
7163
  'use strict';
7063
7164
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7085,11 +7186,11 @@ require = function () {
7085
7186
  },
7086
7187
  {
7087
7188
  '../../combinator': 30,
7088
- '../source': 130,
7189
+ '../source': 131,
7089
7190
  'spica/global': 17
7090
7191
  }
7091
7192
  ],
7092
- 107: [
7193
+ 108: [
7093
7194
  function (_dereq_, module, exports) {
7094
7195
  'use strict';
7095
7196
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7109,12 +7210,12 @@ require = function () {
7109
7210
  },
7110
7211
  {
7111
7212
  '../../combinator': 30,
7112
- './extension/index': 108,
7113
- './extension/label': 111,
7114
- './extension/placeholder': 112
7213
+ './extension/index': 109,
7214
+ './extension/label': 112,
7215
+ './extension/placeholder': 113
7115
7216
  }
7116
7217
  ],
7117
- 108: [
7218
+ 109: [
7118
7219
  function (_dereq_, module, exports) {
7119
7220
  'use strict';
7120
7221
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7145,7 +7246,7 @@ require = function () {
7145
7246
  }, (0, combinator_1.open)((0, source_1.str)(/^\|?/, false), (0, combinator_1.some)((0, combinator_1.union)([
7146
7247
  signature,
7147
7248
  inline_1.inline
7148
- ]), ']', /^\\?\n/), true)))), ']'), ns => [(0, typed_dom_1.html)('a', (0, util_1.trimEnd)((0, typed_dom_1.defrag)(ns)))])), ([el]) => [(0, typed_dom_1.define)(el, {
7249
+ ]), ']', /^\\?\n/), true)))), ']'), ns => [(0, typed_dom_1.html)('a', (0, util_1.trimNodeEnd)((0, typed_dom_1.defrag)(ns)))])), ([el]) => [(0, typed_dom_1.define)(el, {
7149
7250
  id: el.id ? null : global_1.undefined,
7150
7251
  class: 'index',
7151
7252
  href: el.id ? `#${ el.id }` : global_1.undefined
@@ -7175,16 +7276,16 @@ require = function () {
7175
7276
  },
7176
7277
  {
7177
7278
  '../../../combinator': 30,
7178
- '../../inline': 90,
7179
- '../../source': 130,
7180
- '../../util': 136,
7181
- './indexee': 109,
7279
+ '../../inline': 91,
7280
+ '../../source': 131,
7281
+ '../../util': 137,
7282
+ './indexee': 110,
7182
7283
  'spica/array': 6,
7183
7284
  'spica/global': 17,
7184
7285
  'typed-dom': 29
7185
7286
  }
7186
7287
  ],
7187
- 109: [
7288
+ 110: [
7188
7289
  function (_dereq_, module, exports) {
7189
7290
  'use strict';
7190
7291
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7234,7 +7335,7 @@ require = function () {
7234
7335
  'typed-dom': 29
7235
7336
  }
7236
7337
  ],
7237
- 110: [
7338
+ 111: [
7238
7339
  function (_dereq_, module, exports) {
7239
7340
  'use strict';
7240
7341
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7249,11 +7350,11 @@ require = function () {
7249
7350
  },
7250
7351
  {
7251
7352
  '../../../combinator': 30,
7252
- './index': 108,
7353
+ './index': 109,
7253
7354
  'typed-dom': 29
7254
7355
  }
7255
7356
  ],
7256
- 111: [
7357
+ 112: [
7257
7358
  function (_dereq_, module, exports) {
7258
7359
  'use strict';
7259
7360
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7305,13 +7406,13 @@ require = function () {
7305
7406
  },
7306
7407
  {
7307
7408
  '../../../combinator': 30,
7308
- '../../source': 130,
7409
+ '../../source': 131,
7309
7410
  'spica/array': 6,
7310
7411
  'spica/global': 17,
7311
7412
  'typed-dom': 29
7312
7413
  }
7313
7414
  ],
7314
- 112: [
7415
+ 113: [
7315
7416
  function (_dereq_, module, exports) {
7316
7417
  'use strict';
7317
7418
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7340,14 +7441,14 @@ require = function () {
7340
7441
  },
7341
7442
  {
7342
7443
  '../../../combinator': 30,
7343
- '../../inline': 90,
7344
- '../../source': 130,
7345
- '../../util': 136,
7444
+ '../../inline': 91,
7445
+ '../../source': 131,
7446
+ '../../util': 137,
7346
7447
  'spica/array': 6,
7347
7448
  'typed-dom': 29
7348
7449
  }
7349
7450
  ],
7350
- 113: [
7451
+ 114: [
7351
7452
  function (_dereq_, module, exports) {
7352
7453
  'use strict';
7353
7454
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7384,7 +7485,7 @@ require = function () {
7384
7485
  [(0, typed_dom_1.html)(tag, attributes('html', [], attrspec[tag], as))],
7385
7486
  rest
7386
7487
  ]), ([, tag]) => tag)),
7387
- (0, combinator_1.match)(/^(?=<(sup|sub|small|bdo|bdi)(?=[^\S\n]|>))/, (0, memoize_1.memoize)(([, tag]) => (0, combinator_1.validate)(`<${ tag }`, `</${ tag }>`, (0, combinator_1.surround)((0, combinator_1.surround)((0, source_1.str)(`<${ tag }`), (0, combinator_1.some)(exports.attribute), (0, source_1.str)('>'), true), (0, util_1.startTight)((0, combinator_1.context)((() => {
7488
+ (0, combinator_1.match)(/^(?=<(sup|sub|small|bdo|bdi)(?=[^\S\n]|>))/, (0, memoize_1.memoize)(([, tag]) => (0, combinator_1.validate)(`<${ tag }`, `</${ tag }>`, (0, combinator_1.surround)((0, combinator_1.surround)((0, source_1.str)(`<${ tag }`), (0, combinator_1.some)(exports.attribute), (0, source_1.str)('>'), true), (0, util_1.startLoose)((0, combinator_1.context)((() => {
7388
7489
  switch (tag) {
7389
7490
  case 'sup':
7390
7491
  case 'sub':
@@ -7406,11 +7507,11 @@ require = function () {
7406
7507
  default:
7407
7508
  return {};
7408
7509
  }
7409
- })(), (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), `</${ tag }>`))), (0, source_1.str)(`</${ tag }>`), false, ([as, bs, cs], rest, context) => [
7510
+ })(), (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), `</${ tag }>`)), `</${ tag }>`), (0, source_1.str)(`</${ tag }>`), false, ([as, bs, cs], rest, context) => [
7410
7511
  [elem(tag, as, (0, util_1.trimEndBR)((0, typed_dom_1.defrag)(bs)), cs, context)],
7411
7512
  rest
7412
7513
  ])), ([, tag]) => tag)),
7413
- (0, combinator_1.match)(/^(?=<([a-z]+)(?=[^\S\n]|>))/, (0, memoize_1.memoize)(([, tag]) => (0, combinator_1.validate)(`<${ tag }`, `</${ tag }>`, (0, combinator_1.surround)((0, combinator_1.surround)((0, source_1.str)(`<${ tag }`), (0, combinator_1.some)(exports.attribute), (0, source_1.str)('>'), true), (0, util_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), `</${ tag }>`)), (0, source_1.str)(`</${ tag }>`), false, ([as, bs, cs], rest) => [
7514
+ (0, combinator_1.match)(/^(?=<([a-z]+)(?=[^\S\n]|>))/, (0, memoize_1.memoize)(([, tag]) => (0, combinator_1.validate)(`<${ tag }`, `</${ tag }>`, (0, combinator_1.surround)((0, combinator_1.surround)((0, source_1.str)(`<${ tag }`), (0, combinator_1.some)(exports.attribute), (0, source_1.str)('>'), true), (0, util_1.startLoose)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), `</${ tag }>`), `</${ tag }>`), (0, source_1.str)(`</${ tag }>`), false, ([as, bs, cs], rest) => [
7414
7515
  [elem(tag, as, (0, util_1.trimEndBR)((0, typed_dom_1.defrag)(bs)), cs, {})],
7415
7516
  rest
7416
7517
  ], ([as, bs], rest) => as.length === 1 ? [
@@ -7428,14 +7529,14 @@ require = function () {
7428
7529
  case 'sub':
7429
7530
  switch (true) {
7430
7531
  case (_b = (_a = context.state) === null || _a === void 0 ? void 0 : _a.in) === null || _b === void 0 ? void 0 : _b.supsub:
7431
- return invalid('nest', `<${ tag }> HTML tag cannot be used in <sup>/<sub> HTML tags.`, as, bs, cs);
7532
+ return invalid('nest', `<${ tag }> HTML tag cannot be used in <sup> or <sub> HTML tag.`, as, bs, cs);
7432
7533
  }
7433
7534
  break;
7434
7535
  case 'small':
7435
7536
  switch (true) {
7436
7537
  case (_d = (_c = context.state) === null || _c === void 0 ? void 0 : _c.in) === null || _d === void 0 ? void 0 : _d.supsub:
7437
7538
  case (_f = (_e = context.state) === null || _e === void 0 ? void 0 : _e.in) === null || _f === void 0 ? void 0 : _f.small:
7438
- return invalid('nest', `<${ tag }> HTML tag cannot be used in <sup>/<sub>/<small> HTML tags.`, as, bs, cs);
7539
+ return invalid('nest', `<${ tag }> HTML tag cannot be used in <sup>, <sub>, or <small> HTML tag.`, as, bs, cs);
7439
7540
  }
7440
7541
  break;
7441
7542
  }
@@ -7486,9 +7587,9 @@ require = function () {
7486
7587
  },
7487
7588
  {
7488
7589
  '../../combinator': 30,
7489
- '../inline': 90,
7490
- '../source': 130,
7491
- '../util': 136,
7590
+ '../inline': 91,
7591
+ '../source': 131,
7592
+ '../util': 137,
7492
7593
  'spica/alias': 5,
7493
7594
  'spica/array': 6,
7494
7595
  'spica/cache': 9,
@@ -7497,7 +7598,7 @@ require = function () {
7497
7598
  'typed-dom': 29
7498
7599
  }
7499
7600
  ],
7500
- 114: [
7601
+ 115: [
7501
7602
  function (_dereq_, module, exports) {
7502
7603
  'use strict';
7503
7604
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7515,7 +7616,7 @@ require = function () {
7515
7616
  'typed-dom': 29
7516
7617
  }
7517
7618
  ],
7518
- 115: [
7619
+ 116: [
7519
7620
  function (_dereq_, module, exports) {
7520
7621
  'use strict';
7521
7622
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7536,14 +7637,14 @@ require = function () {
7536
7637
  },
7537
7638
  {
7538
7639
  '../../combinator': 30,
7539
- '../inline': 90,
7540
- '../source': 130,
7541
- '../util': 136,
7640
+ '../inline': 91,
7641
+ '../source': 131,
7642
+ '../util': 137,
7542
7643
  'spica/array': 6,
7543
7644
  'typed-dom': 29
7544
7645
  }
7545
7646
  ],
7546
- 116: [
7647
+ 117: [
7547
7648
  function (_dereq_, module, exports) {
7548
7649
  'use strict';
7549
7650
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7571,7 +7672,7 @@ require = function () {
7571
7672
  (0, combinator_1.context)({ syntax: { inline: { link: false } } }, (0, combinator_1.dup)((0, combinator_1.union)([
7572
7673
  (0, combinator_1.surround)('[', inline_1.media, ']'),
7573
7674
  (0, combinator_1.surround)('[', inline_1.shortmedia, ']'),
7574
- (0, combinator_1.surround)('[', (0, util_1.startTight)((0, combinator_1.context)({
7675
+ (0, combinator_1.surround)('[', (0, util_1.startLoose)((0, combinator_1.context)({
7575
7676
  syntax: {
7576
7677
  inline: {
7577
7678
  annotation: false,
@@ -7582,18 +7683,18 @@ require = function () {
7582
7683
  autolink: false
7583
7684
  }
7584
7685
  }
7585
- }, (0, combinator_1.some)(inline_1.inline, ']', /^\\?\n/))), ']', true)
7686
+ }, (0, combinator_1.some)(inline_1.inline, ']', /^\\?\n/)), ']'), ']', true)
7586
7687
  ]))),
7587
7688
  (0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([
7588
7689
  exports.uri,
7589
7690
  (0, combinator_1.some)(exports.option)
7590
7691
  ]), /^[^\S\n]?}/))
7591
7692
  ])))), ([params, content = []], rest, context) => {
7592
- var _a, _b;
7693
+ var _a, _b, _c, _d, _e;
7593
7694
  if ((0, parser_1.eval)((0, combinator_1.some)(autolink_1.autolink)((0, util_1.stringify)(content), context), []).some(node => typeof node === 'object'))
7594
7695
  return;
7595
7696
  const INSECURE_URI = params.shift();
7596
- const el = create(INSECURE_URI, (0, typed_dom_1.defrag)(content), new url_1.ReadonlyURL(resolve(INSECURE_URI, context.host || global_1.location, context.url || global_1.location), ((_a = context.host) === null || _a === void 0 ? void 0 : _a.href) || global_1.location.href), ((_b = context.host) === null || _b === void 0 ? void 0 : _b.origin) || global_1.location.origin);
7697
+ const el = create(INSECURE_URI, (0, util_1.trimNode)((0, typed_dom_1.defrag)(content)), new url_1.ReadonlyURL(resolve(INSECURE_URI, (_a = context.host) !== null && _a !== void 0 ? _a : global_1.location, (_c = (_b = context.url) !== null && _b !== void 0 ? _b : context.host) !== null && _c !== void 0 ? _c : global_1.location), ((_d = context.host) === null || _d === void 0 ? void 0 : _d.href) || global_1.location.href), ((_e = context.host) === null || _e === void 0 ? void 0 : _e.origin) || global_1.location.origin);
7597
7698
  if (el.classList.contains('invalid'))
7598
7699
  return [
7599
7700
  [el],
@@ -7615,40 +7716,41 @@ require = function () {
7615
7716
  (0, combinator_1.fmap)((0, source_1.str)(/^[^\S\n]+[^\n{}]+/), opt => [` \\${ opt.slice(1) }`])
7616
7717
  ]);
7617
7718
  function resolve(uri, host, source) {
7618
- var _a;
7619
7719
  switch (true) {
7620
7720
  case uri.slice(0, 2) === '^/':
7621
- const file = host.pathname.slice(host.pathname.lastIndexOf('/') + 1);
7622
- return file.includes('.') ? `${ host.pathname.slice(0, -file.length) }${ uri.slice(2) }` : `${ fillTrailingSlash(host.pathname) }${ uri.slice(2) }`;
7721
+ const last = host.pathname.slice(host.pathname.lastIndexOf('/') + 1);
7722
+ return last.includes('.') && /^[0-9]*[a-z][0-9a-z]*$/i.test(last.slice(last.lastIndexOf('.') + 1)) ? `${ host.pathname.slice(0, -last.length) }${ uri.slice(2) }` : `${ host.pathname.replace(/\/?$/, '/') }${ uri.slice(2) }`;
7623
7723
  case host.origin === source.origin && host.pathname === source.pathname:
7624
7724
  case uri.slice(0, 2) === '//':
7625
7725
  return uri;
7626
7726
  default:
7627
7727
  const target = new url_1.ReadonlyURL(uri, source.href);
7628
- return target.origin === ((_a = uri.match(/^[A-Za-z][0-9A-Za-z.+-]*:\/\/[^/?#]*/)) === null || _a === void 0 ? void 0 : _a[0]) ? uri : target.origin === host.origin ? target.href.slice(target.origin.length) : target.href;
7728
+ return target.origin === host.origin ? target.href.slice(target.origin.length) : target.href;
7629
7729
  }
7630
7730
  }
7631
7731
  exports.resolve = resolve;
7632
- function fillTrailingSlash(pathname) {
7633
- return pathname[pathname.length - 1] === '/' ? pathname : pathname + '/';
7634
- }
7635
- function create(address, content, uri, origin) {
7732
+ function create(INSECURE_URI, content, uri, origin) {
7636
7733
  let type;
7637
7734
  let description;
7638
7735
  switch (uri.protocol) {
7639
7736
  case 'http:':
7640
7737
  case 'https:':
7738
+ if (INSECURE_URI.slice(0, 2) === '^/' && /(?:\/\.\.?)(?:\/|$)/.test(INSECURE_URI.slice(0, INSECURE_URI.search(/[?#]|$/)))) {
7739
+ type = 'argument';
7740
+ description = 'Subresource paths cannot contain dot-segments.';
7741
+ break;
7742
+ }
7641
7743
  return (0, typed_dom_1.html)('a', {
7642
7744
  href: uri.source,
7643
7745
  target: undefined || uri.origin !== origin || typeof content[0] === 'object' && content[0].classList.contains('media') ? '_blank' : undefined
7644
- }, content.length === 0 ? decode(address) : content);
7746
+ }, content.length === 0 ? decode(INSECURE_URI) : content);
7645
7747
  case 'tel:':
7646
7748
  if (content.length === 0) {
7647
- content = [address];
7749
+ content = [INSECURE_URI];
7648
7750
  }
7649
7751
  const pattern = /^(?:tel:)?(?:\+(?!0))?\d+(?:-\d+)*$/i;
7650
7752
  switch (true) {
7651
- case content.length === 1 && typeof content[0] === 'string' && pattern.test(address) && pattern.test(content[0]) && address.replace(/[^+\d]/g, '') === content[0].replace(/[^+\d]/g, ''):
7753
+ case content.length === 1 && typeof content[0] === 'string' && pattern.test(INSECURE_URI) && pattern.test(content[0]) && INSECURE_URI.replace(/[^+\d]/g, '') === content[0].replace(/[^+\d]/g, ''):
7652
7754
  return (0, typed_dom_1.html)('a', { href: uri.source }, content);
7653
7755
  }
7654
7756
  type = 'content';
@@ -7660,7 +7762,7 @@ require = function () {
7660
7762
  'data-invalid-syntax': 'link',
7661
7763
  'data-invalid-type': type !== null && type !== void 0 ? type : type = 'argument',
7662
7764
  'data-invalid-description': description !== null && description !== void 0 ? description : description = 'Invalid protocol.'
7663
- }, content.length === 0 ? address : content);
7765
+ }, content.length === 0 ? INSECURE_URI : content);
7664
7766
  }
7665
7767
  function decode(uri) {
7666
7768
  if (uri.indexOf('%') === -1)
@@ -7674,19 +7776,19 @@ require = function () {
7674
7776
  },
7675
7777
  {
7676
7778
  '../../combinator': 30,
7677
- '../../combinator/data/parser': 49,
7678
- '../autolink': 64,
7679
- '../inline': 90,
7680
- '../source': 130,
7681
- '../util': 136,
7682
- './html': 113,
7779
+ '../../combinator/data/parser': 50,
7780
+ '../autolink': 65,
7781
+ '../inline': 91,
7782
+ '../source': 131,
7783
+ '../util': 137,
7784
+ './html': 114,
7683
7785
  'spica/alias': 5,
7684
7786
  'spica/global': 17,
7685
7787
  'spica/url': 27,
7686
7788
  'typed-dom': 29
7687
7789
  }
7688
7790
  ],
7689
- 117: [
7791
+ 118: [
7690
7792
  function (_dereq_, module, exports) {
7691
7793
  'use strict';
7692
7794
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7697,7 +7799,7 @@ require = function () {
7697
7799
  const util_1 = _dereq_('../util');
7698
7800
  const typed_dom_1 = _dereq_('typed-dom');
7699
7801
  const array_1 = _dereq_('spica/array');
7700
- exports.mark = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.surround)((0, source_1.str)('=='), (0, util_1.startTight)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, '==')])), (0, source_1.str)('=='), false, ([as, bs, cs], rest) => (0, util_1.verifyEndTight)(bs) ? [
7802
+ exports.mark = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.surround)((0, source_1.str)('=='), (0, util_1.startTight)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, '==')])), (0, source_1.str)('=='), false, ([as, bs, cs], rest) => (0, util_1.isEndTightNodes)(bs) ? [
7701
7803
  [(0, typed_dom_1.html)('mark', (0, typed_dom_1.defrag)((0, util_1.trimEndBR)(bs)))],
7702
7804
  rest
7703
7805
  ] : [
@@ -7710,14 +7812,14 @@ require = function () {
7710
7812
  },
7711
7813
  {
7712
7814
  '../../combinator': 30,
7713
- '../inline': 90,
7714
- '../source': 130,
7715
- '../util': 136,
7815
+ '../inline': 91,
7816
+ '../source': 131,
7817
+ '../util': 137,
7716
7818
  'spica/array': 6,
7717
7819
  'typed-dom': 29
7718
7820
  }
7719
7821
  ],
7720
- 118: [
7822
+ 119: [
7721
7823
  function (_dereq_, module, exports) {
7722
7824
  'use strict';
7723
7825
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7729,7 +7831,7 @@ require = function () {
7729
7831
  const disallowedCommand = /\\(?:begin|tiny|huge|large)(?![0-9a-z])/i;
7730
7832
  exports.math = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.validate)('$', '$', '\n', (0, combinator_1.rewrite)((0, combinator_1.union)([
7731
7833
  (0, combinator_1.surround)('$', bracket, '$'),
7732
- (0, combinator_1.surround)('$', (0, combinator_1.verify)((0, source_1.str)(/^(?=[\\^_[(|]|[A-Za-z][0-9A-Za-z]*'*[ ~]?(?:\$|([\\^_(|:=<>])(?!\1)))(?:\\\$|[\x20-\x23\x25-\x7E])*/), util_1.verifyEndTight), /^\$(?![0-9A-Za-z])/)
7834
+ (0, combinator_1.surround)('$', (0, combinator_1.verify)((0, source_1.str)(/^(?=[\\^_[(|]|[A-Za-z][0-9A-Za-z]*'*[ ~]?(?:\$|([\\^_(|:=<>])(?!\1)))(?:\\\$|[\x20-\x23\x25-\x7E])*/), util_1.isEndTightNodes), /^\$(?![0-9A-Za-z])/)
7733
7835
  ]), (source, {
7734
7836
  caches: {math: cache} = {}
7735
7837
  }) => {
@@ -7756,12 +7858,12 @@ require = function () {
7756
7858
  },
7757
7859
  {
7758
7860
  '../../combinator': 30,
7759
- '../source': 130,
7760
- '../util': 136,
7861
+ '../source': 131,
7862
+ '../util': 137,
7761
7863
  'typed-dom': 29
7762
7864
  }
7763
7865
  ],
7764
- 119: [
7866
+ 120: [
7765
7867
  function (_dereq_, module, exports) {
7766
7868
  'use strict';
7767
7869
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7773,7 +7875,6 @@ require = function () {
7773
7875
  const html_1 = _dereq_('./html');
7774
7876
  const htmlentity_1 = _dereq_('./htmlentity');
7775
7877
  const source_1 = _dereq_('../source');
7776
- const util_1 = _dereq_('../util');
7777
7878
  const typed_dom_1 = _dereq_('typed-dom');
7778
7879
  const url_1 = _dereq_('spica/url');
7779
7880
  const array_1 = _dereq_('spica/array');
@@ -7791,7 +7892,7 @@ require = function () {
7791
7892
  var _a, _b, _c;
7792
7893
  return (_c = (_b = (_a = context.syntax) === null || _a === void 0 ? void 0 : _a.inline) === null || _b === void 0 ? void 0 : _b.media) !== null && _c !== void 0 ? _c : true;
7793
7894
  }, (0, combinator_1.tails)([
7794
- (0, combinator_1.dup)((0, combinator_1.surround)(/^\[(?!\\?\s)/, (0, combinator_1.some)((0, combinator_1.union)([
7895
+ (0, combinator_1.dup)((0, combinator_1.surround)(/^\[(?!\s*\\\s)/, (0, combinator_1.some)((0, combinator_1.union)([
7795
7896
  htmlentity_1.htmlentity,
7796
7897
  bracket,
7797
7898
  source_1.txt
@@ -7801,30 +7902,29 @@ require = function () {
7801
7902
  (0, combinator_1.some)(option)
7802
7903
  ]), /^[^\S\n]?}/))
7803
7904
  ])))), ([as, bs]) => bs ? [
7804
- [(0, array_1.join)(as)],
7905
+ [(0, array_1.join)(as).trim() || (0, array_1.join)(as)],
7805
7906
  bs
7806
7907
  ] : [
7807
7908
  [''],
7808
7909
  as
7809
- ]), ([[text]]) => (0, util_1.verifyStartTight)([text || '-'])), ([[text], params], rest, context) => {
7810
- var _a, _b, _c, _d;
7910
+ ]), ([[text]]) => text === '' || text.trim() !== ''), ([[text], params], rest, context) => {
7911
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
7811
7912
  const INSECURE_URI = params.shift();
7812
- const url = new url_1.ReadonlyURL((0, link_1.resolve)(INSECURE_URI, context.host || global_1.location, context.url || global_1.location), ((_a = context.host) === null || _a === void 0 ? void 0 : _a.href) || global_1.location.href);
7813
- const cache = (_b = context.caches) === null || _b === void 0 ? void 0 : _b.media;
7814
- const cached = cache === null || cache === void 0 ? void 0 : cache.has(url.href);
7815
- const el = cache && cached ? cache.get(url.href).cloneNode(true) : (0, typed_dom_1.html)('img', {
7913
+ const url = new url_1.ReadonlyURL((0, link_1.resolve)(INSECURE_URI, (_a = context.host) !== null && _a !== void 0 ? _a : global_1.location, (_c = (_b = context.url) !== null && _b !== void 0 ? _b : context.host) !== null && _c !== void 0 ? _c : global_1.location), ((_d = context.host) === null || _d === void 0 ? void 0 : _d.href) || global_1.location.href);
7914
+ let cache;
7915
+ const el = global_1.undefined || (cache = (_g = (_f = (_e = context.caches) === null || _e === void 0 ? void 0 : _e.media) === null || _f === void 0 ? void 0 : _f.get(url.href)) === null || _g === void 0 ? void 0 : _g.cloneNode(true)) || (0, typed_dom_1.html)('img', {
7816
7916
  class: 'media',
7817
7917
  'data-src': url.source,
7818
- alt: text.trimEnd()
7918
+ alt: text
7819
7919
  });
7820
- if (!cached && !sanitize(url, el))
7920
+ if (!cache && !sanitize(url, el))
7821
7921
  return [
7822
7922
  [el],
7823
7923
  rest
7824
7924
  ];
7825
- cached && el.hasAttribute('alt') && el.setAttribute('alt', text.trimEnd());
7925
+ (cache === null || cache === void 0 ? void 0 : cache.hasAttribute('alt')) && (cache === null || cache === void 0 ? void 0 : cache.setAttribute('alt', text));
7826
7926
  (0, typed_dom_1.define)(el, (0, html_1.attributes)('media', (0, array_1.push)([], el.classList), optspec, params));
7827
- if (((_d = (_c = context.syntax) === null || _c === void 0 ? void 0 : _c.inline) === null || _d === void 0 ? void 0 : _d.link) === false || cached && el.tagName !== 'IMG')
7927
+ if (((_j = (_h = context.syntax) === null || _h === void 0 ? void 0 : _h.inline) === null || _j === void 0 ? void 0 : _j.link) === false || cache && cache.tagName !== 'IMG')
7828
7928
  return [
7829
7929
  [el],
7830
7930
  rest
@@ -7870,27 +7970,37 @@ require = function () {
7870
7970
  link_1.option
7871
7971
  ]);
7872
7972
  function sanitize(uri, target) {
7973
+ if (/^\.\.?\//.test(uri.source)) {
7974
+ (0, typed_dom_1.define)(target, {
7975
+ class: void target.classList.add('invalid'),
7976
+ 'data-invalid-syntax': 'media',
7977
+ 'data-invalid-type': 'argument',
7978
+ 'data-invalid-description': 'Relative paths cannot be used with media syntax; Use subresource paths instead.'
7979
+ });
7980
+ return false;
7981
+ }
7873
7982
  switch (uri.protocol) {
7874
7983
  case 'http:':
7875
7984
  case 'https:':
7876
- return true;
7985
+ break;
7986
+ default:
7987
+ (0, typed_dom_1.define)(target, {
7988
+ class: void target.classList.add('invalid'),
7989
+ 'data-invalid-syntax': 'media',
7990
+ 'data-invalid-type': 'argument',
7991
+ 'data-invalid-description': 'Invalid protocol.'
7992
+ });
7993
+ return false;
7877
7994
  }
7878
- (0, typed_dom_1.define)(target, {
7879
- class: void target.classList.add('invalid'),
7880
- 'data-invalid-syntax': 'media',
7881
- 'data-invalid-type': 'argument',
7882
- 'data-invalid-description': 'Invalid protocol.'
7883
- });
7884
- return false;
7995
+ return true;
7885
7996
  }
7886
7997
  },
7887
7998
  {
7888
7999
  '../../combinator': 30,
7889
- '../source': 130,
7890
- '../util': 136,
7891
- './html': 113,
7892
- './htmlentity': 114,
7893
- './link': 116,
8000
+ '../source': 131,
8001
+ './html': 114,
8002
+ './htmlentity': 115,
8003
+ './link': 117,
7894
8004
  'spica/alias': 5,
7895
8005
  'spica/array': 6,
7896
8006
  'spica/global': 17,
@@ -7898,7 +8008,7 @@ require = function () {
7898
8008
  'typed-dom': 29
7899
8009
  }
7900
8010
  ],
7901
- 120: [
8011
+ 121: [
7902
8012
  function (_dereq_, module, exports) {
7903
8013
  'use strict';
7904
8014
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7912,7 +8022,7 @@ require = function () {
7912
8022
  exports.reference = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.validate)('[[', ']]', '\n', (0, combinator_1.fmap)((0, combinator_1.surround)('[[', (0, combinator_1.guard)(context => {
7913
8023
  var _a, _b, _c;
7914
8024
  return (_c = (_b = (_a = context.syntax) === null || _a === void 0 ? void 0 : _a.inline) === null || _b === void 0 ? void 0 : _b.reference) !== null && _c !== void 0 ? _c : true;
7915
- }, (0, util_1.startTight)((0, combinator_1.context)({
8025
+ }, (0, util_1.startLoose)((0, combinator_1.context)({
7916
8026
  syntax: {
7917
8027
  inline: {
7918
8028
  annotation: false,
@@ -7931,8 +8041,8 @@ require = function () {
7931
8041
  ''
7932
8042
  ]),
7933
8043
  (0, combinator_1.some)(inline_1.inline, ']', /^\\?\n/)
7934
- ])))), ']]'), ns => [(0, typed_dom_1.html)('sup', attributes(ns), (0, util_1.trimEnd)((0, typed_dom_1.defrag)(ns)))]))));
7935
- const abbr = (0, combinator_1.creator)((0, combinator_1.fmap)((0, combinator_1.verify)((0, combinator_1.surround)('^', (0, combinator_1.union)([(0, source_1.str)(/^(?![0-9]+\s?[|\]])[0-9A-Za-z]+(?:(?:-|(?=\W)(?!'\d)'?(?!\.\d)\.?(?!,\S),? ?)[0-9A-Za-z]+)*(?:-|'?\.?,? ?)?/)]), /^\|?(?=]])|^\|[^\S\n]+/), (_, rest, context) => (0, util_1.isStartTight)(rest, context)), ([source]) => [(0, typed_dom_1.html)('abbr', source)]));
8044
+ ])), ']]')), ']]'), ns => [(0, typed_dom_1.html)('sup', attributes(ns), (0, util_1.trimNode)((0, typed_dom_1.defrag)(ns)))]))));
8045
+ const abbr = (0, combinator_1.creator)((0, combinator_1.fmap)((0, combinator_1.verify)((0, combinator_1.surround)('^', (0, combinator_1.union)([(0, source_1.str)(/^(?![0-9]+\s?[|\]])[0-9A-Za-z]+(?:(?:-|(?=\W)(?!'\d)'?(?!\.\d)\.?(?!,\S),? ?)[0-9A-Za-z]+)*(?:-|'?\.?,? ?)?/)]), /^\|?(?=]])|^\|[^\S\n]/), (_, rest, context) => (0, util_1.isStartLoose)(rest, context)), ([source]) => [(0, typed_dom_1.html)('abbr', source)]));
7936
8046
  function attributes(ns) {
7937
8047
  return typeof ns[0] === 'object' && ns[0].tagName === 'ABBR' ? {
7938
8048
  class: 'reference',
@@ -7947,14 +8057,14 @@ require = function () {
7947
8057
  },
7948
8058
  {
7949
8059
  '../../combinator': 30,
7950
- '../inline': 90,
7951
- '../source': 130,
7952
- '../util': 136,
8060
+ '../inline': 91,
8061
+ '../source': 131,
8062
+ '../util': 137,
7953
8063
  'spica/global': 17,
7954
8064
  'typed-dom': 29
7955
8065
  }
7956
8066
  ],
7957
- 121: [
8067
+ 122: [
7958
8068
  function (_dereq_, module, exports) {
7959
8069
  'use strict';
7960
8070
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7970,7 +8080,7 @@ require = function () {
7970
8080
  exports.ruby = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.bind)((0, combinator_1.verify)((0, combinator_1.validate)('[', ')', '\n', (0, combinator_1.sequence)([
7971
8081
  (0, combinator_1.surround)('[', (0, combinator_1.focus)(/^(?:\\[^\n]|[^\[\]\n])+(?=]\()/, text), ']'),
7972
8082
  (0, combinator_1.surround)('(', (0, combinator_1.focus)(/^(?:\\[^\n]|[^\(\)\n])+(?=\))/, text), ')')
7973
- ])), ([texts]) => (0, util_1.verifyStartTight)(texts)), ([texts, rubies], rest) => {
8083
+ ])), ([texts]) => (0, util_1.isStartTightNodes)(texts)), ([texts, rubies], rest) => {
7974
8084
  const tail = typeof texts[texts.length - 1] === 'object' ? [texts.pop()] : [];
7975
8085
  tail.length === 0 && texts[texts.length - 1] === '' && texts.pop();
7976
8086
  switch (true) {
@@ -8035,16 +8145,16 @@ require = function () {
8035
8145
  },
8036
8146
  {
8037
8147
  '../../combinator': 30,
8038
- '../../combinator/data/parser': 49,
8039
- '../source': 130,
8040
- '../util': 136,
8041
- './htmlentity': 114,
8148
+ '../../combinator/data/parser': 50,
8149
+ '../source': 131,
8150
+ '../util': 137,
8151
+ './htmlentity': 115,
8042
8152
  'spica/array': 6,
8043
8153
  'spica/global': 17,
8044
8154
  'typed-dom': 29
8045
8155
  }
8046
8156
  ],
8047
- 122: [
8157
+ 123: [
8048
8158
  function (_dereq_, module, exports) {
8049
8159
  'use strict';
8050
8160
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -8059,11 +8169,11 @@ require = function () {
8059
8169
  },
8060
8170
  {
8061
8171
  '../../combinator': 30,
8062
- './autolink/url': 99,
8063
- './media': 119
8172
+ './autolink/url': 100,
8173
+ './media': 120
8064
8174
  }
8065
8175
  ],
8066
- 123: [
8176
+ 124: [
8067
8177
  function (_dereq_, module, exports) {
8068
8178
  'use strict';
8069
8179
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -8079,7 +8189,7 @@ require = function () {
8079
8189
  emphasis_1.emphasis,
8080
8190
  (0, combinator_1.some)(inline_1.inline, '*'),
8081
8191
  (0, source_1.str)('*')
8082
- ]), '**')), (0, source_1.str)('**'), false, ([as, bs, cs], rest) => (0, util_1.verifyEndTight)(bs) ? [
8192
+ ]), '**')), (0, source_1.str)('**'), false, ([as, bs, cs], rest) => (0, util_1.isEndTightNodes)(bs) ? [
8083
8193
  [(0, typed_dom_1.html)('strong', (0, typed_dom_1.defrag)((0, util_1.trimEndBR)(bs)))],
8084
8194
  rest
8085
8195
  ] : [
@@ -8092,15 +8202,15 @@ require = function () {
8092
8202
  },
8093
8203
  {
8094
8204
  '../../combinator': 30,
8095
- '../inline': 90,
8096
- '../source': 130,
8097
- '../util': 136,
8098
- './emphasis': 104,
8205
+ '../inline': 91,
8206
+ '../source': 131,
8207
+ '../util': 137,
8208
+ './emphasis': 105,
8099
8209
  'spica/array': 6,
8100
8210
  'typed-dom': 29
8101
8211
  }
8102
8212
  ],
8103
- 124: [
8213
+ 125: [
8104
8214
  function (_dereq_, module, exports) {
8105
8215
  'use strict';
8106
8216
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -8144,13 +8254,13 @@ require = function () {
8144
8254
  },
8145
8255
  {
8146
8256
  '../../combinator': 30,
8147
- '../source': 130,
8257
+ '../source': 131,
8148
8258
  'spica/array': 6,
8149
8259
  'spica/global': 17,
8150
8260
  'typed-dom': 29
8151
8261
  }
8152
8262
  ],
8153
- 125: [
8263
+ 126: [
8154
8264
  function (_dereq_, module, exports) {
8155
8265
  'use strict';
8156
8266
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -8218,11 +8328,11 @@ require = function () {
8218
8328
  },
8219
8329
  {
8220
8330
  '../combinator': 30,
8221
- './locale/ja': 126,
8331
+ './locale/ja': 127,
8222
8332
  'typed-dom': 29
8223
8333
  }
8224
8334
  ],
8225
- 126: [
8335
+ 127: [
8226
8336
  function (_dereq_, module, exports) {
8227
8337
  'use strict';
8228
8338
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -8242,7 +8352,7 @@ require = function () {
8242
8352
  },
8243
8353
  {}
8244
8354
  ],
8245
- 127: [
8355
+ 128: [
8246
8356
  function (_dereq_, module, exports) {
8247
8357
  'use strict';
8248
8358
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -8340,14 +8450,14 @@ require = function () {
8340
8450
  }
8341
8451
  },
8342
8452
  {
8343
- '../inline/extension/label': 111,
8453
+ '../inline/extension/label': 112,
8344
8454
  'spica/array': 6,
8345
8455
  'spica/global': 17,
8346
8456
  'spica/multimap': 21,
8347
8457
  'typed-dom': 29
8348
8458
  }
8349
8459
  ],
8350
- 128: [
8460
+ 129: [
8351
8461
  function (_dereq_, module, exports) {
8352
8462
  'use strict';
8353
8463
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -8459,14 +8569,14 @@ require = function () {
8459
8569
  }
8460
8570
  },
8461
8571
  {
8462
- '../inline/extension/indexee': 109,
8572
+ '../inline/extension/indexee': 110,
8463
8573
  'spica/global': 17,
8464
8574
  'spica/memoize': 20,
8465
8575
  'spica/multimap': 21,
8466
8576
  'typed-dom': 29
8467
8577
  }
8468
8578
  ],
8469
- 129: [
8579
+ 130: [
8470
8580
  function (_dereq_, module, exports) {
8471
8581
  'use strict';
8472
8582
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -8511,16 +8621,16 @@ require = function () {
8511
8621
  },
8512
8622
  {
8513
8623
  '../combinator': 30,
8514
- '../combinator/data/parser': 49,
8515
- './block/codeblock': 67,
8516
- './block/extension': 69,
8517
- './block/heading': 78,
8518
- './block/mathblock': 81,
8519
- './source': 130,
8624
+ '../combinator/data/parser': 50,
8625
+ './block/codeblock': 68,
8626
+ './block/extension': 70,
8627
+ './block/heading': 79,
8628
+ './block/mathblock': 82,
8629
+ './source': 131,
8520
8630
  'spica/global': 17
8521
8631
  }
8522
8632
  ],
8523
- 130: [
8633
+ 131: [
8524
8634
  function (_dereq_, module, exports) {
8525
8635
  'use strict';
8526
8636
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -8586,14 +8696,14 @@ require = function () {
8586
8696
  });
8587
8697
  },
8588
8698
  {
8589
- './source/escapable': 131,
8590
- './source/line': 132,
8591
- './source/str': 133,
8592
- './source/text': 134,
8593
- './source/unescapable': 135
8699
+ './source/escapable': 132,
8700
+ './source/line': 133,
8701
+ './source/str': 134,
8702
+ './source/text': 135,
8703
+ './source/unescapable': 136
8594
8704
  }
8595
8705
  ],
8596
- 131: [
8706
+ 132: [
8597
8707
  function (_dereq_, module, exports) {
8598
8708
  'use strict';
8599
8709
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -8633,7 +8743,7 @@ require = function () {
8633
8743
  },
8634
8744
  { '../../combinator': 30 }
8635
8745
  ],
8636
- 132: [
8746
+ 133: [
8637
8747
  function (_dereq_, module, exports) {
8638
8748
  'use strict';
8639
8749
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -8658,7 +8768,7 @@ require = function () {
8658
8768
  'spica/global': 17
8659
8769
  }
8660
8770
  ],
8661
- 133: [
8771
+ 134: [
8662
8772
  function (_dereq_, module, exports) {
8663
8773
  'use strict';
8664
8774
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -8691,7 +8801,7 @@ require = function () {
8691
8801
  'spica/global': 17
8692
8802
  }
8693
8803
  ],
8694
- 134: [
8804
+ 135: [
8695
8805
  function (_dereq_, module, exports) {
8696
8806
  'use strict';
8697
8807
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -8796,12 +8906,12 @@ require = function () {
8796
8906
  },
8797
8907
  {
8798
8908
  '../../combinator': 30,
8799
- './str': 133,
8909
+ './str': 134,
8800
8910
  'spica/global': 17,
8801
8911
  'typed-dom': 29
8802
8912
  }
8803
8913
  ],
8804
- 135: [
8914
+ 136: [
8805
8915
  function (_dereq_, module, exports) {
8806
8916
  'use strict';
8807
8917
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -8836,14 +8946,14 @@ require = function () {
8836
8946
  },
8837
8947
  {
8838
8948
  '../../combinator': 30,
8839
- './text': 134
8949
+ './text': 135
8840
8950
  }
8841
8951
  ],
8842
- 136: [
8952
+ 137: [
8843
8953
  function (_dereq_, module, exports) {
8844
8954
  'use strict';
8845
8955
  Object.defineProperty(exports, '__esModule', { value: true });
8846
- exports.stringify = exports.trimEndBR = exports.trimEnd = exports.verifyEndTight = exports.verifyStartTight = exports.isStartTight = exports.startTight = exports.visualize = void 0;
8956
+ exports.stringify = exports.trimEndBR = exports.trimNodeEnd = exports.trimNode = exports.isEndTightNodes = exports.isStartTightNodes = exports.startTight = exports.isStartLoose = exports.startLoose = exports.visualize = void 0;
8847
8957
  const global_1 = _dereq_('spica/global');
8848
8958
  const parser_1 = _dereq_('../combinator/data/parser');
8849
8959
  const combinator_1 = _dereq_('../combinator');
@@ -8918,6 +9028,18 @@ require = function () {
8918
9028
  }
8919
9029
  return false;
8920
9030
  }
9031
+ function startLoose(parser, except) {
9032
+ return (source, context) => isStartLoose(source, context, except) ? parser(source, context) : global_1.undefined;
9033
+ }
9034
+ exports.startLoose = startLoose;
9035
+ function isStartLoose(source, context, except) {
9036
+ var _a;
9037
+ source && (source = source.replace(/^[^\S\n]+/, ''));
9038
+ if (source === '')
9039
+ return true;
9040
+ return source.slice(0, (_a = except === null || except === void 0 ? void 0 : except.length) !== null && _a !== void 0 ? _a : 0) !== except && isStartTight(source, context);
9041
+ }
9042
+ exports.isStartLoose = isStartLoose;
8921
9043
  function startTight(parser) {
8922
9044
  return (source, context) => isStartTight(source, context) ? parser(source, context) : global_1.undefined;
8923
9045
  }
@@ -8956,26 +9078,25 @@ require = function () {
8956
9078
  return source[0].trimStart() !== '';
8957
9079
  }
8958
9080
  }
8959
- exports.isStartTight = isStartTight;
8960
- function verifyStartTight(nodes) {
9081
+ function isStartTightNodes(nodes) {
8961
9082
  if (nodes.length === 0)
8962
9083
  return true;
8963
- return isVisible(nodes[0]);
9084
+ return isVisible(nodes[0], 0);
8964
9085
  }
8965
- exports.verifyStartTight = verifyStartTight;
8966
- function verifyEndTight(nodes) {
9086
+ exports.isStartTightNodes = isStartTightNodes;
9087
+ function isEndTightNodes(nodes) {
8967
9088
  if (nodes.length === 0)
8968
9089
  return true;
8969
9090
  const last = nodes.length - 1;
8970
9091
  return typeof nodes[last] === 'string' && nodes[last].length > 1 ? isVisible(nodes[last], -1) || isVisible(nodes[last], -2) : isVisible(nodes[last], -1) || last === 0 || isVisible(nodes[last - 1], -1);
8971
9092
  }
8972
- exports.verifyEndTight = verifyEndTight;
8973
- function isVisible(node, position = 0) {
9093
+ exports.isEndTightNodes = isEndTightNodes;
9094
+ function isVisible(node, position) {
8974
9095
  if (!node)
8975
9096
  return false;
8976
9097
  switch (typeof node) {
8977
9098
  case 'string':
8978
- const char = node[position >= 0 ? position : node.length + position];
9099
+ const char = position === global_1.undefined ? node : node[position >= 0 ? position : node.length + position];
8979
9100
  switch (char) {
8980
9101
  case ' ':
8981
9102
  case '\t':
@@ -8998,7 +9119,25 @@ require = function () {
8998
9119
  }
8999
9120
  }
9000
9121
  }
9001
- function trimEnd(nodes) {
9122
+ function trimNode(nodes) {
9123
+ return trimNodeStart(trimNodeEnd(nodes));
9124
+ }
9125
+ exports.trimNode = trimNode;
9126
+ function trimNodeStart(nodes) {
9127
+ const skip = nodes.length > 0 && typeof nodes[nodes.length - 1] === 'object' && nodes[nodes.length - 1]['className'] === 'indexer' ? [nodes.pop()] : [];
9128
+ for (let first = nodes[0]; nodes.length > 0 && !isVisible(first, 0) && !(typeof first === 'object' && first.className === 'comment');) {
9129
+ if (typeof first === 'string') {
9130
+ const pos = first.length - first.trimStart().length;
9131
+ if (pos > 0) {
9132
+ nodes[0] = first.slice(pos);
9133
+ break;
9134
+ }
9135
+ }
9136
+ nodes.pop();
9137
+ }
9138
+ return (0, array_1.push)(nodes, skip);
9139
+ }
9140
+ function trimNodeEnd(nodes) {
9002
9141
  const skip = nodes.length > 0 && typeof nodes[nodes.length - 1] === 'object' && nodes[nodes.length - 1]['className'] === 'indexer' ? [nodes.pop()] : [];
9003
9142
  for (let last = nodes[0]; nodes.length > 0 && !isVisible(last = nodes[nodes.length - 1], -1) && !(typeof last === 'object' && last.className === 'comment');) {
9004
9143
  if (typeof last === 'string') {
@@ -9012,7 +9151,7 @@ require = function () {
9012
9151
  }
9013
9152
  return (0, array_1.push)(nodes, skip);
9014
9153
  }
9015
- exports.trimEnd = trimEnd;
9154
+ exports.trimNodeEnd = trimNodeEnd;
9016
9155
  function trimEndBR(nodes) {
9017
9156
  if (nodes.length === 0)
9018
9157
  return nodes;
@@ -9036,15 +9175,15 @@ require = function () {
9036
9175
  },
9037
9176
  {
9038
9177
  '../combinator': 30,
9039
- '../combinator/data/parser': 49,
9040
- './inline/comment': 102,
9041
- './inline/htmlentity': 114,
9042
- './source': 130,
9178
+ '../combinator/data/parser': 50,
9179
+ './inline/comment': 103,
9180
+ './inline/htmlentity': 115,
9181
+ './source': 131,
9043
9182
  'spica/array': 6,
9044
9183
  'spica/global': 17
9045
9184
  }
9046
9185
  ],
9047
- 137: [
9186
+ 138: [
9048
9187
  function (_dereq_, module, exports) {
9049
9188
  'use strict';
9050
9189
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -9057,9 +9196,9 @@ require = function () {
9057
9196
  }
9058
9197
  });
9059
9198
  },
9060
- { './renderer/render': 138 }
9199
+ { './renderer/render': 139 }
9061
9200
  ],
9062
- 138: [
9201
+ 139: [
9063
9202
  function (_dereq_, module, exports) {
9064
9203
  'use strict';
9065
9204
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -9078,8 +9217,6 @@ require = function () {
9078
9217
  }));
9079
9218
  function render(source, opts = {}) {
9080
9219
  opts = extend(opts);
9081
- if (source.classList.contains('invalid'))
9082
- return;
9083
9220
  const base = global_1.location.href;
9084
9221
  if (source.matches(selector))
9085
9222
  return void render_(base, source, opts);
@@ -9090,6 +9227,8 @@ require = function () {
9090
9227
  exports.render = render;
9091
9228
  function render_(base, source, opts) {
9092
9229
  var _a, _b, _c;
9230
+ if (source.classList.contains('invalid'))
9231
+ return;
9093
9232
  try {
9094
9233
  switch (true) {
9095
9234
  case !!opts.code && !source.firstElementChild && source.matches('pre.code'):
@@ -9115,14 +9254,14 @@ require = function () {
9115
9254
  }
9116
9255
  },
9117
9256
  {
9118
- './render/code': 139,
9119
- './render/math': 140,
9120
- './render/media': 141,
9257
+ './render/code': 140,
9258
+ './render/math': 141,
9259
+ './render/media': 142,
9121
9260
  'spica/global': 17,
9122
9261
  'spica/memoize': 20
9123
9262
  }
9124
9263
  ],
9125
- 139: [
9264
+ 140: [
9126
9265
  function (_dereq_, module, exports) {
9127
9266
  (function (global) {
9128
9267
  (function () {
@@ -9176,7 +9315,7 @@ require = function () {
9176
9315
  },
9177
9316
  {}
9178
9317
  ],
9179
- 140: [
9318
+ 141: [
9180
9319
  function (_dereq_, module, exports) {
9181
9320
  'use strict';
9182
9321
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -9193,7 +9332,7 @@ require = function () {
9193
9332
  }
9194
9333
  exports.math = math;
9195
9334
  async function queue(target, callback = () => global_1.undefined) {
9196
- MathJax.typesetPromise || await MathJax.startup.promise;
9335
+ !MathJax.typesetPromise && await MathJax.startup.promise;
9197
9336
  MathJax.typesetPromise([target]).then(callback);
9198
9337
  }
9199
9338
  },
@@ -9202,7 +9341,7 @@ require = function () {
9202
9341
  'typed-dom': 29
9203
9342
  }
9204
9343
  ],
9205
- 141: [
9344
+ 142: [
9206
9345
  function (_dereq_, module, exports) {
9207
9346
  'use strict';
9208
9347
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -9233,17 +9372,17 @@ require = function () {
9233
9372
  exports.media = media;
9234
9373
  },
9235
9374
  {
9236
- './media/audio': 142,
9237
- './media/image': 143,
9238
- './media/pdf': 144,
9239
- './media/twitter': 145,
9240
- './media/video': 146,
9241
- './media/youtube': 147,
9375
+ './media/audio': 143,
9376
+ './media/image': 144,
9377
+ './media/pdf': 145,
9378
+ './media/twitter': 146,
9379
+ './media/video': 147,
9380
+ './media/youtube': 148,
9242
9381
  'spica/memoize': 20,
9243
9382
  'spica/url': 27
9244
9383
  }
9245
9384
  ],
9246
- 142: [
9385
+ 143: [
9247
9386
  function (_dereq_, module, exports) {
9248
9387
  'use strict';
9249
9388
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -9268,7 +9407,7 @@ require = function () {
9268
9407
  },
9269
9408
  { 'typed-dom': 29 }
9270
9409
  ],
9271
- 143: [
9410
+ 144: [
9272
9411
  function (_dereq_, module, exports) {
9273
9412
  'use strict';
9274
9413
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -9305,7 +9444,7 @@ require = function () {
9305
9444
  'typed-dom': 29
9306
9445
  }
9307
9446
  ],
9308
- 144: [
9447
+ 145: [
9309
9448
  function (_dereq_, module, exports) {
9310
9449
  'use strict';
9311
9450
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -9330,11 +9469,11 @@ require = function () {
9330
9469
  exports.pdf = pdf;
9331
9470
  },
9332
9471
  {
9333
- '../../../parser': 56,
9472
+ '../../../parser': 57,
9334
9473
  'typed-dom': 29
9335
9474
  }
9336
9475
  ],
9337
- 145: [
9476
+ 146: [
9338
9477
  function (_dereq_, module, exports) {
9339
9478
  (function (global) {
9340
9479
  (function () {
@@ -9386,12 +9525,12 @@ require = function () {
9386
9525
  }.call(this, typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : {}));
9387
9526
  },
9388
9527
  {
9389
- '../../../parser': 56,
9528
+ '../../../parser': 57,
9390
9529
  'spica/global': 17,
9391
9530
  'typed-dom': 29
9392
9531
  }
9393
9532
  ],
9394
- 146: [
9533
+ 147: [
9395
9534
  function (_dereq_, module, exports) {
9396
9535
  'use strict';
9397
9536
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -9423,7 +9562,7 @@ require = function () {
9423
9562
  'typed-dom': 29
9424
9563
  }
9425
9564
  ],
9426
- 147: [
9565
+ 148: [
9427
9566
  function (_dereq_, module, exports) {
9428
9567
  'use strict';
9429
9568
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -9456,7 +9595,7 @@ require = function () {
9456
9595
  },
9457
9596
  { 'typed-dom': 29 }
9458
9597
  ],
9459
- 148: [
9598
+ 149: [
9460
9599
  function (_dereq_, module, exports) {
9461
9600
  'use strict';
9462
9601
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -9498,14 +9637,14 @@ require = function () {
9498
9637
  });
9499
9638
  },
9500
9639
  {
9501
- './util/info': 149,
9502
- './util/quote': 150,
9503
- './util/scope': 151,
9504
- './util/sync': 152,
9505
- './util/toc': 153
9640
+ './util/info': 150,
9641
+ './util/quote': 151,
9642
+ './util/scope': 152,
9643
+ './util/sync': 153,
9644
+ './util/toc': 154
9506
9645
  }
9507
9646
  ],
9508
- 149: [
9647
+ 150: [
9509
9648
  function (_dereq_, module, exports) {
9510
9649
  'use strict';
9511
9650
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -9541,9 +9680,9 @@ require = function () {
9541
9680
  }
9542
9681
  exports.info = info;
9543
9682
  },
9544
- { './scope': 151 }
9683
+ { './scope': 152 }
9545
9684
  ],
9546
- 150: [
9685
+ 151: [
9547
9686
  function (_dereq_, module, exports) {
9548
9687
  'use strict';
9549
9688
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -9627,12 +9766,12 @@ require = function () {
9627
9766
  }
9628
9767
  },
9629
9768
  {
9630
- '../combinator/data/parser': 49,
9631
- '../parser/block/paragraph/mention/cite': 85,
9769
+ '../combinator/data/parser': 50,
9770
+ '../parser/block/paragraph/mention/cite': 86,
9632
9771
  'typed-dom': 29
9633
9772
  }
9634
9773
  ],
9635
- 151: [
9774
+ 152: [
9636
9775
  function (_dereq_, module, exports) {
9637
9776
  'use strict';
9638
9777
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -9657,7 +9796,7 @@ require = function () {
9657
9796
  },
9658
9797
  { 'spica/global': 17 }
9659
9798
  ],
9660
- 152: [
9799
+ 153: [
9661
9800
  function (_dereq_, module, exports) {
9662
9801
  'use strict';
9663
9802
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -9710,7 +9849,7 @@ require = function () {
9710
9849
  'typed-dom': 29
9711
9850
  }
9712
9851
  ],
9713
- 153: [
9852
+ 154: [
9714
9853
  function (_dereq_, module, exports) {
9715
9854
  'use strict';
9716
9855
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -9810,9 +9949,9 @@ require = function () {
9810
9949
  __exportStar(_dereq_('./src/renderer'), exports);
9811
9950
  },
9812
9951
  {
9813
- './src/parser': 56,
9814
- './src/renderer': 137,
9815
- './src/util': 148,
9952
+ './src/parser': 57,
9953
+ './src/renderer': 138,
9954
+ './src/util': 149,
9816
9955
  'spica/global': 17
9817
9956
  }
9818
9957
  ]