html-react-parser 1.2.9 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react')) :
3
3
  typeof define === 'function' && define.amd ? define(['react'], factory) :
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.HTMLReactParser = factory(global.React));
5
- }(this, (function (require$$0) { 'use strict';
5
+ })(this, (function (require$$0) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -12,607 +12,819 @@
12
12
 
13
13
  var htmlReactParser$1 = {exports: {}};
14
14
 
15
- var HTMLDOMPropertyConfig$1 = {
16
- Properties: {
17
- autoFocus: 4,
18
- accept: 0,
19
- acceptCharset: 0,
20
- accessKey: 0,
21
- action: 0,
22
- allowFullScreen: 4,
23
- allowTransparency: 0,
24
- alt: 0,
25
- as: 0,
26
- async: 4,
27
- autoComplete: 0,
28
- autoPlay: 4,
29
- capture: 4,
30
- cellPadding: 0,
31
- cellSpacing: 0,
32
- charSet: 0,
33
- challenge: 0,
34
- checked: 5,
35
- cite: 0,
36
- classID: 0,
37
- className: 0,
38
- cols: 24,
39
- colSpan: 0,
40
- content: 0,
41
- contentEditable: 0,
42
- contextMenu: 0,
43
- controls: 4,
44
- controlsList: 0,
45
- coords: 0,
46
- crossOrigin: 0,
47
- data: 0,
48
- dateTime: 0,
49
- default: 4,
50
- defer: 4,
51
- dir: 0,
52
- disabled: 4,
53
- download: 32,
54
- draggable: 0,
55
- encType: 0,
56
- form: 0,
57
- formAction: 0,
58
- formEncType: 0,
59
- formMethod: 0,
60
- formNoValidate: 4,
61
- formTarget: 0,
62
- frameBorder: 0,
63
- headers: 0,
64
- height: 0,
65
- hidden: 4,
66
- high: 0,
67
- href: 0,
68
- hrefLang: 0,
69
- htmlFor: 0,
70
- httpEquiv: 0,
71
- icon: 0,
72
- id: 0,
73
- inputMode: 0,
74
- integrity: 0,
75
- is: 0,
76
- keyParams: 0,
77
- keyType: 0,
78
- kind: 0,
79
- label: 0,
80
- lang: 0,
81
- list: 0,
82
- loop: 4,
83
- low: 0,
84
- manifest: 0,
85
- marginHeight: 0,
86
- marginWidth: 0,
87
- max: 0,
88
- maxLength: 0,
89
- media: 0,
90
- mediaGroup: 0,
91
- method: 0,
92
- min: 0,
93
- minLength: 0,
94
- multiple: 5,
95
- muted: 5,
96
- name: 0,
97
- nonce: 0,
98
- noValidate: 4,
99
- open: 4,
100
- optimum: 0,
101
- pattern: 0,
102
- placeholder: 0,
103
- playsInline: 4,
104
- poster: 0,
105
- preload: 0,
106
- profile: 0,
107
- radioGroup: 0,
108
- readOnly: 4,
109
- referrerPolicy: 0,
110
- rel: 0,
111
- required: 4,
112
- reversed: 4,
113
- role: 0,
114
- rows: 24,
115
- rowSpan: 8,
116
- sandbox: 0,
117
- scope: 0,
118
- scoped: 4,
119
- scrolling: 0,
120
- seamless: 4,
121
- selected: 5,
122
- shape: 0,
123
- size: 24,
124
- sizes: 0,
125
- span: 24,
126
- spellCheck: 0,
127
- src: 0,
128
- srcDoc: 0,
129
- srcLang: 0,
130
- srcSet: 0,
131
- start: 8,
132
- step: 0,
133
- style: 0,
134
- summary: 0,
135
- tabIndex: 0,
136
- target: 0,
137
- title: 0,
138
- type: 0,
139
- useMap: 0,
140
- value: 0,
141
- width: 0,
142
- wmode: 0,
143
- wrap: 0,
144
- about: 0,
145
- datatype: 0,
146
- inlist: 0,
147
- prefix: 0,
148
- property: 0,
149
- resource: 0,
150
- typeof: 0,
151
- vocab: 0,
152
- autoCapitalize: 0,
153
- autoCorrect: 0,
154
- autoSave: 0,
155
- color: 0,
156
- itemProp: 0,
157
- itemScope: 4,
158
- itemType: 0,
159
- itemID: 0,
160
- itemRef: 0,
161
- results: 0,
162
- security: 0,
163
- unselectable: 0,
164
- },
165
- DOMAttributeNames: {
166
- acceptCharset: 'accept-charset',
167
- className: 'class',
168
- htmlFor: 'for',
169
- httpEquiv: 'http-equiv',
170
- },
15
+ var lib$1 = {};
16
+
17
+ var possibleStandardNamesOptimized$1 = {};
18
+
19
+ // An attribute in which the DOM/SVG standard name is the same as the React prop name (e.g., 'accept').
20
+ var SAME$1 = 0;
21
+ possibleStandardNamesOptimized$1.SAME = SAME$1;
22
+
23
+ // An attribute in which the React prop name is the camelcased version of the DOM/SVG standard name (e.g., 'acceptCharset').
24
+ var CAMELCASE$1 = 1;
25
+ possibleStandardNamesOptimized$1.CAMELCASE = CAMELCASE$1;
26
+
27
+ possibleStandardNamesOptimized$1.possibleStandardNames = {
28
+ accept: 0,
29
+ acceptCharset: 1,
30
+ 'accept-charset': 'acceptCharset',
31
+ accessKey: 1,
32
+ action: 0,
33
+ allowFullScreen: 1,
34
+ alt: 0,
35
+ as: 0,
36
+ async: 0,
37
+ autoCapitalize: 1,
38
+ autoComplete: 1,
39
+ autoCorrect: 1,
40
+ autoFocus: 1,
41
+ autoPlay: 1,
42
+ autoSave: 1,
43
+ capture: 0,
44
+ cellPadding: 1,
45
+ cellSpacing: 1,
46
+ challenge: 0,
47
+ charSet: 1,
48
+ checked: 0,
49
+ children: 0,
50
+ cite: 0,
51
+ class: 'className',
52
+ classID: 1,
53
+ className: 1,
54
+ cols: 0,
55
+ colSpan: 1,
56
+ content: 0,
57
+ contentEditable: 1,
58
+ contextMenu: 1,
59
+ controls: 0,
60
+ controlsList: 1,
61
+ coords: 0,
62
+ crossOrigin: 1,
63
+ dangerouslySetInnerHTML: 1,
64
+ data: 0,
65
+ dateTime: 1,
66
+ default: 0,
67
+ defaultChecked: 1,
68
+ defaultValue: 1,
69
+ defer: 0,
70
+ dir: 0,
71
+ disabled: 0,
72
+ disablePictureInPicture: 1,
73
+ disableRemotePlayback: 1,
74
+ download: 0,
75
+ draggable: 0,
76
+ encType: 1,
77
+ enterKeyHint: 1,
78
+ for: 'htmlFor',
79
+ form: 0,
80
+ formMethod: 1,
81
+ formAction: 1,
82
+ formEncType: 1,
83
+ formNoValidate: 1,
84
+ formTarget: 1,
85
+ frameBorder: 1,
86
+ headers: 0,
87
+ height: 0,
88
+ hidden: 0,
89
+ high: 0,
90
+ href: 0,
91
+ hrefLang: 1,
92
+ htmlFor: 1,
93
+ httpEquiv: 1,
94
+ 'http-equiv': 'httpEquiv',
95
+ icon: 0,
96
+ id: 0,
97
+ innerHTML: 1,
98
+ inputMode: 1,
99
+ integrity: 0,
100
+ is: 0,
101
+ itemID: 1,
102
+ itemProp: 1,
103
+ itemRef: 1,
104
+ itemScope: 1,
105
+ itemType: 1,
106
+ keyParams: 1,
107
+ keyType: 1,
108
+ kind: 0,
109
+ label: 0,
110
+ lang: 0,
111
+ list: 0,
112
+ loop: 0,
113
+ low: 0,
114
+ manifest: 0,
115
+ marginWidth: 1,
116
+ marginHeight: 1,
117
+ max: 0,
118
+ maxLength: 1,
119
+ media: 0,
120
+ mediaGroup: 1,
121
+ method: 0,
122
+ min: 0,
123
+ minLength: 1,
124
+ multiple: 0,
125
+ muted: 0,
126
+ name: 0,
127
+ noModule: 1,
128
+ nonce: 0,
129
+ noValidate: 1,
130
+ open: 0,
131
+ optimum: 0,
132
+ pattern: 0,
133
+ placeholder: 0,
134
+ playsInline: 1,
135
+ poster: 0,
136
+ preload: 0,
137
+ profile: 0,
138
+ radioGroup: 1,
139
+ readOnly: 1,
140
+ referrerPolicy: 1,
141
+ rel: 0,
142
+ required: 0,
143
+ reversed: 0,
144
+ role: 0,
145
+ rows: 0,
146
+ rowSpan: 1,
147
+ sandbox: 0,
148
+ scope: 0,
149
+ scoped: 0,
150
+ scrolling: 0,
151
+ seamless: 0,
152
+ selected: 0,
153
+ shape: 0,
154
+ size: 0,
155
+ sizes: 0,
156
+ span: 0,
157
+ spellCheck: 1,
158
+ src: 0,
159
+ srcDoc: 1,
160
+ srcLang: 1,
161
+ srcSet: 1,
162
+ start: 0,
163
+ step: 0,
164
+ style: 0,
165
+ summary: 0,
166
+ tabIndex: 1,
167
+ target: 0,
168
+ title: 0,
169
+ type: 0,
170
+ useMap: 1,
171
+ value: 0,
172
+ width: 0,
173
+ wmode: 0,
174
+ wrap: 0,
175
+ about: 0,
176
+ accentHeight: 1,
177
+ 'accent-height': 'accentHeight',
178
+ accumulate: 0,
179
+ additive: 0,
180
+ alignmentBaseline: 1,
181
+ 'alignment-baseline': 'alignmentBaseline',
182
+ allowReorder: 1,
183
+ alphabetic: 0,
184
+ amplitude: 0,
185
+ arabicForm: 1,
186
+ 'arabic-form': 'arabicForm',
187
+ ascent: 0,
188
+ attributeName: 1,
189
+ attributeType: 1,
190
+ autoReverse: 1,
191
+ azimuth: 0,
192
+ baseFrequency: 1,
193
+ baselineShift: 1,
194
+ 'baseline-shift': 'baselineShift',
195
+ baseProfile: 1,
196
+ bbox: 0,
197
+ begin: 0,
198
+ bias: 0,
199
+ by: 0,
200
+ calcMode: 1,
201
+ capHeight: 1,
202
+ 'cap-height': 'capHeight',
203
+ clip: 0,
204
+ clipPath: 1,
205
+ 'clip-path': 'clipPath',
206
+ clipPathUnits: 1,
207
+ clipRule: 1,
208
+ 'clip-rule': 'clipRule',
209
+ color: 0,
210
+ colorInterpolation: 1,
211
+ 'color-interpolation': 'colorInterpolation',
212
+ colorInterpolationFilters: 1,
213
+ 'color-interpolation-filters': 'colorInterpolationFilters',
214
+ colorProfile: 1,
215
+ 'color-profile': 'colorProfile',
216
+ colorRendering: 1,
217
+ 'color-rendering': 'colorRendering',
218
+ contentScriptType: 1,
219
+ contentStyleType: 1,
220
+ cursor: 0,
221
+ cx: 0,
222
+ cy: 0,
223
+ d: 0,
224
+ datatype: 0,
225
+ decelerate: 0,
226
+ descent: 0,
227
+ diffuseConstant: 1,
228
+ direction: 0,
229
+ display: 0,
230
+ divisor: 0,
231
+ dominantBaseline: 1,
232
+ 'dominant-baseline': 'dominantBaseline',
233
+ dur: 0,
234
+ dx: 0,
235
+ dy: 0,
236
+ edgeMode: 1,
237
+ elevation: 0,
238
+ enableBackground: 1,
239
+ 'enable-background': 'enableBackground',
240
+ end: 0,
241
+ exponent: 0,
242
+ externalResourcesRequired: 1,
243
+ fill: 0,
244
+ fillOpacity: 1,
245
+ 'fill-opacity': 'fillOpacity',
246
+ fillRule: 1,
247
+ 'fill-rule': 'fillRule',
248
+ filter: 0,
249
+ filterRes: 1,
250
+ filterUnits: 1,
251
+ floodOpacity: 1,
252
+ 'flood-opacity': 'floodOpacity',
253
+ floodColor: 1,
254
+ 'flood-color': 'floodColor',
255
+ focusable: 0,
256
+ fontFamily: 1,
257
+ 'font-family': 'fontFamily',
258
+ fontSize: 1,
259
+ 'font-size': 'fontSize',
260
+ fontSizeAdjust: 1,
261
+ 'font-size-adjust': 'fontSizeAdjust',
262
+ fontStretch: 1,
263
+ 'font-stretch': 'fontStretch',
264
+ fontStyle: 1,
265
+ 'font-style': 'fontStyle',
266
+ fontVariant: 1,
267
+ 'font-variant': 'fontVariant',
268
+ fontWeight: 1,
269
+ 'font-weight': 'fontWeight',
270
+ format: 0,
271
+ from: 0,
272
+ fx: 0,
273
+ fy: 0,
274
+ g1: 0,
275
+ g2: 0,
276
+ glyphName: 1,
277
+ 'glyph-name': 'glyphName',
278
+ glyphOrientationHorizontal: 1,
279
+ 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
280
+ glyphOrientationVertical: 1,
281
+ 'glyph-orientation-vertical': 'glyphOrientationVertical',
282
+ glyphRef: 1,
283
+ gradientTransform: 1,
284
+ gradientUnits: 1,
285
+ hanging: 0,
286
+ horizAdvX: 1,
287
+ 'horiz-adv-x': 'horizAdvX',
288
+ horizOriginX: 1,
289
+ 'horiz-origin-x': 'horizOriginX',
290
+ ideographic: 0,
291
+ imageRendering: 1,
292
+ 'image-rendering': 'imageRendering',
293
+ in2: 0,
294
+ in: 0,
295
+ inlist: 0,
296
+ intercept: 0,
297
+ k1: 0,
298
+ k2: 0,
299
+ k3: 0,
300
+ k4: 0,
301
+ k: 0,
302
+ kernelMatrix: 1,
303
+ kernelUnitLength: 1,
304
+ kerning: 0,
305
+ keyPoints: 1,
306
+ keySplines: 1,
307
+ keyTimes: 1,
308
+ lengthAdjust: 1,
309
+ letterSpacing: 1,
310
+ 'letter-spacing': 'letterSpacing',
311
+ lightingColor: 1,
312
+ 'lighting-color': 'lightingColor',
313
+ limitingConeAngle: 1,
314
+ local: 0,
315
+ markerEnd: 1,
316
+ 'marker-end': 'markerEnd',
317
+ markerHeight: 1,
318
+ markerMid: 1,
319
+ 'marker-mid': 'markerMid',
320
+ markerStart: 1,
321
+ 'marker-start': 'markerStart',
322
+ markerUnits: 1,
323
+ markerWidth: 1,
324
+ mask: 0,
325
+ maskContentUnits: 1,
326
+ maskUnits: 1,
327
+ mathematical: 0,
328
+ mode: 0,
329
+ numOctaves: 1,
330
+ offset: 0,
331
+ opacity: 0,
332
+ operator: 0,
333
+ order: 0,
334
+ orient: 0,
335
+ orientation: 0,
336
+ origin: 0,
337
+ overflow: 0,
338
+ overlinePosition: 1,
339
+ 'overline-position': 'overlinePosition',
340
+ overlineThickness: 1,
341
+ 'overline-thickness': 'overlineThickness',
342
+ paintOrder: 1,
343
+ 'paint-order': 'paintOrder',
344
+ panose1: 0,
345
+ 'panose-1': 'panose1',
346
+ pathLength: 1,
347
+ patternContentUnits: 1,
348
+ patternTransform: 1,
349
+ patternUnits: 1,
350
+ pointerEvents: 1,
351
+ 'pointer-events': 'pointerEvents',
352
+ points: 0,
353
+ pointsAtX: 1,
354
+ pointsAtY: 1,
355
+ pointsAtZ: 1,
356
+ prefix: 0,
357
+ preserveAlpha: 1,
358
+ preserveAspectRatio: 1,
359
+ primitiveUnits: 1,
360
+ property: 0,
361
+ r: 0,
362
+ radius: 0,
363
+ refX: 1,
364
+ refY: 1,
365
+ renderingIntent: 1,
366
+ 'rendering-intent': 'renderingIntent',
367
+ repeatCount: 1,
368
+ repeatDur: 1,
369
+ requiredExtensions: 1,
370
+ requiredFeatures: 1,
371
+ resource: 0,
372
+ restart: 0,
373
+ result: 0,
374
+ results: 0,
375
+ rotate: 0,
376
+ rx: 0,
377
+ ry: 0,
378
+ scale: 0,
379
+ security: 0,
380
+ seed: 0,
381
+ shapeRendering: 1,
382
+ 'shape-rendering': 'shapeRendering',
383
+ slope: 0,
384
+ spacing: 0,
385
+ specularConstant: 1,
386
+ specularExponent: 1,
387
+ speed: 0,
388
+ spreadMethod: 1,
389
+ startOffset: 1,
390
+ stdDeviation: 1,
391
+ stemh: 0,
392
+ stemv: 0,
393
+ stitchTiles: 1,
394
+ stopColor: 1,
395
+ 'stop-color': 'stopColor',
396
+ stopOpacity: 1,
397
+ 'stop-opacity': 'stopOpacity',
398
+ strikethroughPosition: 1,
399
+ 'strikethrough-position': 'strikethroughPosition',
400
+ strikethroughThickness: 1,
401
+ 'strikethrough-thickness': 'strikethroughThickness',
402
+ string: 0,
403
+ stroke: 0,
404
+ strokeDasharray: 1,
405
+ 'stroke-dasharray': 'strokeDasharray',
406
+ strokeDashoffset: 1,
407
+ 'stroke-dashoffset': 'strokeDashoffset',
408
+ strokeLinecap: 1,
409
+ 'stroke-linecap': 'strokeLinecap',
410
+ strokeLinejoin: 1,
411
+ 'stroke-linejoin': 'strokeLinejoin',
412
+ strokeMiterlimit: 1,
413
+ 'stroke-miterlimit': 'strokeMiterlimit',
414
+ strokeWidth: 1,
415
+ 'stroke-width': 'strokeWidth',
416
+ strokeOpacity: 1,
417
+ 'stroke-opacity': 'strokeOpacity',
418
+ suppressContentEditableWarning: 1,
419
+ suppressHydrationWarning: 1,
420
+ surfaceScale: 1,
421
+ systemLanguage: 1,
422
+ tableValues: 1,
423
+ targetX: 1,
424
+ targetY: 1,
425
+ textAnchor: 1,
426
+ 'text-anchor': 'textAnchor',
427
+ textDecoration: 1,
428
+ 'text-decoration': 'textDecoration',
429
+ textLength: 1,
430
+ textRendering: 1,
431
+ 'text-rendering': 'textRendering',
432
+ to: 0,
433
+ transform: 0,
434
+ typeof: 0,
435
+ u1: 0,
436
+ u2: 0,
437
+ underlinePosition: 1,
438
+ 'underline-position': 'underlinePosition',
439
+ underlineThickness: 1,
440
+ 'underline-thickness': 'underlineThickness',
441
+ unicode: 0,
442
+ unicodeBidi: 1,
443
+ 'unicode-bidi': 'unicodeBidi',
444
+ unicodeRange: 1,
445
+ 'unicode-range': 'unicodeRange',
446
+ unitsPerEm: 1,
447
+ 'units-per-em': 'unitsPerEm',
448
+ unselectable: 0,
449
+ vAlphabetic: 1,
450
+ 'v-alphabetic': 'vAlphabetic',
451
+ values: 0,
452
+ vectorEffect: 1,
453
+ 'vector-effect': 'vectorEffect',
454
+ version: 0,
455
+ vertAdvY: 1,
456
+ 'vert-adv-y': 'vertAdvY',
457
+ vertOriginX: 1,
458
+ 'vert-origin-x': 'vertOriginX',
459
+ vertOriginY: 1,
460
+ 'vert-origin-y': 'vertOriginY',
461
+ vHanging: 1,
462
+ 'v-hanging': 'vHanging',
463
+ vIdeographic: 1,
464
+ 'v-ideographic': 'vIdeographic',
465
+ viewBox: 1,
466
+ viewTarget: 1,
467
+ visibility: 0,
468
+ vMathematical: 1,
469
+ 'v-mathematical': 'vMathematical',
470
+ vocab: 0,
471
+ widths: 0,
472
+ wordSpacing: 1,
473
+ 'word-spacing': 'wordSpacing',
474
+ writingMode: 1,
475
+ 'writing-mode': 'writingMode',
476
+ x1: 0,
477
+ x2: 0,
478
+ x: 0,
479
+ xChannelSelector: 1,
480
+ xHeight: 1,
481
+ 'x-height': 'xHeight',
482
+ xlinkActuate: 1,
483
+ 'xlink:actuate': 'xlinkActuate',
484
+ xlinkArcrole: 1,
485
+ 'xlink:arcrole': 'xlinkArcrole',
486
+ xlinkHref: 1,
487
+ 'xlink:href': 'xlinkHref',
488
+ xlinkRole: 1,
489
+ 'xlink:role': 'xlinkRole',
490
+ xlinkShow: 1,
491
+ 'xlink:show': 'xlinkShow',
492
+ xlinkTitle: 1,
493
+ 'xlink:title': 'xlinkTitle',
494
+ xlinkType: 1,
495
+ 'xlink:type': 'xlinkType',
496
+ xmlBase: 1,
497
+ 'xml:base': 'xmlBase',
498
+ xmlLang: 1,
499
+ 'xml:lang': 'xmlLang',
500
+ xmlns: 0,
501
+ 'xml:space': 'xmlSpace',
502
+ xmlnsXlink: 1,
503
+ 'xmlns:xlink': 'xmlnsXlink',
504
+ xmlSpace: 1,
505
+ y1: 0,
506
+ y2: 0,
507
+ y: 0,
508
+ yChannelSelector: 1,
509
+ z: 0,
510
+ zoomAndPan: 1
171
511
  };
172
512
 
173
- var SVGDOMPropertyConfig$1 = {
174
- Properties: {
175
- accentHeight: 0,
176
- accumulate: 0,
177
- additive: 0,
178
- alignmentBaseline: 0,
179
- allowReorder: 0,
180
- alphabetic: 0,
181
- amplitude: 0,
182
- arabicForm: 0,
183
- ascent: 0,
184
- attributeName: 0,
185
- attributeType: 0,
186
- autoReverse: 0,
187
- azimuth: 0,
188
- baseFrequency: 0,
189
- baseProfile: 0,
190
- baselineShift: 0,
191
- bbox: 0,
192
- begin: 0,
193
- bias: 0,
194
- by: 0,
195
- calcMode: 0,
196
- capHeight: 0,
197
- clip: 0,
198
- clipPath: 0,
199
- clipRule: 0,
200
- clipPathUnits: 0,
201
- colorInterpolation: 0,
202
- colorInterpolationFilters: 0,
203
- colorProfile: 0,
204
- colorRendering: 0,
205
- contentScriptType: 0,
206
- contentStyleType: 0,
207
- cursor: 0,
208
- cx: 0,
209
- cy: 0,
210
- d: 0,
211
- decelerate: 0,
212
- descent: 0,
213
- diffuseConstant: 0,
214
- direction: 0,
215
- display: 0,
216
- divisor: 0,
217
- dominantBaseline: 0,
218
- dur: 0,
219
- dx: 0,
220
- dy: 0,
221
- edgeMode: 0,
222
- elevation: 0,
223
- enableBackground: 0,
224
- end: 0,
225
- exponent: 0,
226
- externalResourcesRequired: 0,
227
- fill: 0,
228
- fillOpacity: 0,
229
- fillRule: 0,
230
- filter: 0,
231
- filterRes: 0,
232
- filterUnits: 0,
233
- floodColor: 0,
234
- floodOpacity: 0,
235
- focusable: 0,
236
- fontFamily: 0,
237
- fontSize: 0,
238
- fontSizeAdjust: 0,
239
- fontStretch: 0,
240
- fontStyle: 0,
241
- fontVariant: 0,
242
- fontWeight: 0,
243
- format: 0,
244
- from: 0,
245
- fx: 0,
246
- fy: 0,
247
- g1: 0,
248
- g2: 0,
249
- glyphName: 0,
250
- glyphOrientationHorizontal: 0,
251
- glyphOrientationVertical: 0,
252
- glyphRef: 0,
253
- gradientTransform: 0,
254
- gradientUnits: 0,
255
- hanging: 0,
256
- horizAdvX: 0,
257
- horizOriginX: 0,
258
- ideographic: 0,
259
- imageRendering: 0,
260
- in: 0,
261
- in2: 0,
262
- intercept: 0,
263
- k: 0,
264
- k1: 0,
265
- k2: 0,
266
- k3: 0,
267
- k4: 0,
268
- kernelMatrix: 0,
269
- kernelUnitLength: 0,
270
- kerning: 0,
271
- keyPoints: 0,
272
- keySplines: 0,
273
- keyTimes: 0,
274
- lengthAdjust: 0,
275
- letterSpacing: 0,
276
- lightingColor: 0,
277
- limitingConeAngle: 0,
278
- local: 0,
279
- markerEnd: 0,
280
- markerMid: 0,
281
- markerStart: 0,
282
- markerHeight: 0,
283
- markerUnits: 0,
284
- markerWidth: 0,
285
- mask: 0,
286
- maskContentUnits: 0,
287
- maskUnits: 0,
288
- mathematical: 0,
289
- mode: 0,
290
- numOctaves: 0,
291
- offset: 0,
292
- opacity: 0,
293
- operator: 0,
294
- order: 0,
295
- orient: 0,
296
- orientation: 0,
297
- origin: 0,
298
- overflow: 0,
299
- overlinePosition: 0,
300
- overlineThickness: 0,
301
- paintOrder: 0,
302
- panose1: 0,
303
- pathLength: 0,
304
- patternContentUnits: 0,
305
- patternTransform: 0,
306
- patternUnits: 0,
307
- pointerEvents: 0,
308
- points: 0,
309
- pointsAtX: 0,
310
- pointsAtY: 0,
311
- pointsAtZ: 0,
312
- preserveAlpha: 0,
313
- preserveAspectRatio: 0,
314
- primitiveUnits: 0,
315
- r: 0,
316
- radius: 0,
317
- refX: 0,
318
- refY: 0,
319
- renderingIntent: 0,
320
- repeatCount: 0,
321
- repeatDur: 0,
322
- requiredExtensions: 0,
323
- requiredFeatures: 0,
324
- restart: 0,
325
- result: 0,
326
- rotate: 0,
327
- rx: 0,
328
- ry: 0,
329
- scale: 0,
330
- seed: 0,
331
- shapeRendering: 0,
332
- slope: 0,
333
- spacing: 0,
334
- specularConstant: 0,
335
- specularExponent: 0,
336
- speed: 0,
337
- spreadMethod: 0,
338
- startOffset: 0,
339
- stdDeviation: 0,
340
- stemh: 0,
341
- stemv: 0,
342
- stitchTiles: 0,
343
- stopColor: 0,
344
- stopOpacity: 0,
345
- strikethroughPosition: 0,
346
- strikethroughThickness: 0,
347
- string: 0,
348
- stroke: 0,
349
- strokeDasharray: 0,
350
- strokeDashoffset: 0,
351
- strokeLinecap: 0,
352
- strokeLinejoin: 0,
353
- strokeMiterlimit: 0,
354
- strokeOpacity: 0,
355
- strokeWidth: 0,
356
- surfaceScale: 0,
357
- systemLanguage: 0,
358
- tableValues: 0,
359
- targetX: 0,
360
- targetY: 0,
361
- textAnchor: 0,
362
- textDecoration: 0,
363
- textRendering: 0,
364
- textLength: 0,
365
- to: 0,
366
- transform: 0,
367
- u1: 0,
368
- u2: 0,
369
- underlinePosition: 0,
370
- underlineThickness: 0,
371
- unicode: 0,
372
- unicodeBidi: 0,
373
- unicodeRange: 0,
374
- unitsPerEm: 0,
375
- vAlphabetic: 0,
376
- vHanging: 0,
377
- vIdeographic: 0,
378
- vMathematical: 0,
379
- values: 0,
380
- vectorEffect: 0,
381
- version: 0,
382
- vertAdvY: 0,
383
- vertOriginX: 0,
384
- vertOriginY: 0,
385
- viewBox: 0,
386
- viewTarget: 0,
387
- visibility: 0,
388
- widths: 0,
389
- wordSpacing: 0,
390
- writingMode: 0,
391
- x: 0,
392
- xHeight: 0,
393
- x1: 0,
394
- x2: 0,
395
- xChannelSelector: 0,
396
- xlinkActuate: 0,
397
- xlinkArcrole: 0,
398
- xlinkHref: 0,
399
- xlinkRole: 0,
400
- xlinkShow: 0,
401
- xlinkTitle: 0,
402
- xlinkType: 0,
403
- xmlBase: 0,
404
- xmlns: 0,
405
- xmlnsXlink: 0,
406
- xmlLang: 0,
407
- xmlSpace: 0,
408
- y: 0,
409
- y1: 0,
410
- y2: 0,
411
- yChannelSelector: 0,
412
- z: 0,
413
- zoomAndPan: 0,
414
- },
415
- DOMAttributeNames: {
416
- accentHeight: 'accent-height',
417
- alignmentBaseline: 'alignment-baseline',
418
- arabicForm: 'arabic-form',
419
- baselineShift: 'baseline-shift',
420
- capHeight: 'cap-height',
421
- clipPath: 'clip-path',
422
- clipRule: 'clip-rule',
423
- colorInterpolation: 'color-interpolation',
424
- colorInterpolationFilters: 'color-interpolation-filters',
425
- colorProfile: 'color-profile',
426
- colorRendering: 'color-rendering',
427
- dominantBaseline: 'dominant-baseline',
428
- enableBackground: 'enable-background',
429
- fillOpacity: 'fill-opacity',
430
- fillRule: 'fill-rule',
431
- floodColor: 'flood-color',
432
- floodOpacity: 'flood-opacity',
433
- fontFamily: 'font-family',
434
- fontSize: 'font-size',
435
- fontSizeAdjust: 'font-size-adjust',
436
- fontStretch: 'font-stretch',
437
- fontStyle: 'font-style',
438
- fontVariant: 'font-variant',
439
- fontWeight: 'font-weight',
440
- glyphName: 'glyph-name',
441
- glyphOrientationHorizontal: 'glyph-orientation-horizontal',
442
- glyphOrientationVertical: 'glyph-orientation-vertical',
443
- horizAdvX: 'horiz-adv-x',
444
- horizOriginX: 'horiz-origin-x',
445
- imageRendering: 'image-rendering',
446
- letterSpacing: 'letter-spacing',
447
- lightingColor: 'lighting-color',
448
- markerEnd: 'marker-end',
449
- markerMid: 'marker-mid',
450
- markerStart: 'marker-start',
451
- overlinePosition: 'overline-position',
452
- overlineThickness: 'overline-thickness',
453
- paintOrder: 'paint-order',
454
- panose1: 'panose-1',
455
- pointerEvents: 'pointer-events',
456
- renderingIntent: 'rendering-intent',
457
- shapeRendering: 'shape-rendering',
458
- stopColor: 'stop-color',
459
- stopOpacity: 'stop-opacity',
460
- strikethroughPosition: 'strikethrough-position',
461
- strikethroughThickness: 'strikethrough-thickness',
462
- strokeDasharray: 'stroke-dasharray',
463
- strokeDashoffset: 'stroke-dashoffset',
464
- strokeLinecap: 'stroke-linecap',
465
- strokeLinejoin: 'stroke-linejoin',
466
- strokeMiterlimit: 'stroke-miterlimit',
467
- strokeOpacity: 'stroke-opacity',
468
- strokeWidth: 'stroke-width',
469
- textAnchor: 'text-anchor',
470
- textDecoration: 'text-decoration',
471
- textRendering: 'text-rendering',
472
- underlinePosition: 'underline-position',
473
- underlineThickness: 'underline-thickness',
474
- unicodeBidi: 'unicode-bidi',
475
- unicodeRange: 'unicode-range',
476
- unitsPerEm: 'units-per-em',
477
- vAlphabetic: 'v-alphabetic',
478
- vHanging: 'v-hanging',
479
- vIdeographic: 'v-ideographic',
480
- vMathematical: 'v-mathematical',
481
- vectorEffect: 'vector-effect',
482
- vertAdvY: 'vert-adv-y',
483
- vertOriginX: 'vert-origin-x',
484
- vertOriginY: 'vert-origin-y',
485
- wordSpacing: 'word-spacing',
486
- writingMode: 'writing-mode',
487
- xHeight: 'x-height',
488
- xlinkActuate: 'xlink:actuate',
489
- xlinkArcrole: 'xlink:arcrole',
490
- xlinkHref: 'xlink:href',
491
- xlinkRole: 'xlink:role',
492
- xlinkShow: 'xlink:show',
493
- xlinkTitle: 'xlink:title',
494
- xlinkType: 'xlink:type',
495
- xmlBase: 'xml:base',
496
- xmlnsXlink: 'xmlns:xlink',
497
- xmlLang: 'xml:lang',
498
- xmlSpace: 'xml:space',
499
- },
500
- };
513
+ Object.defineProperty(lib$1, '__esModule', { value: true });
501
514
 
502
- var injection$1 = {
503
- MUST_USE_PROPERTY: 1,
504
- HAS_BOOLEAN_VALUE: 4,
505
- HAS_NUMERIC_VALUE: 8,
506
- HAS_POSITIVE_NUMERIC_VALUE: 24,
507
- HAS_OVERLOADED_BOOLEAN_VALUE: 32,
508
- };
515
+ function _slicedToArray(arr, i) {
516
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
517
+ }
509
518
 
510
- var HTMLDOMPropertyConfig = HTMLDOMPropertyConfig$1;
511
- var SVGDOMPropertyConfig = SVGDOMPropertyConfig$1;
512
- var injection = injection$1;
519
+ function _arrayWithHoles(arr) {
520
+ if (Array.isArray(arr)) return arr;
521
+ }
513
522
 
514
- var MUST_USE_PROPERTY = injection.MUST_USE_PROPERTY;
515
- var HAS_BOOLEAN_VALUE = injection.HAS_BOOLEAN_VALUE;
516
- var HAS_NUMERIC_VALUE = injection.HAS_NUMERIC_VALUE;
517
- var HAS_POSITIVE_NUMERIC_VALUE = injection.HAS_POSITIVE_NUMERIC_VALUE;
518
- var HAS_OVERLOADED_BOOLEAN_VALUE = injection.HAS_OVERLOADED_BOOLEAN_VALUE;
523
+ function _iterableToArrayLimit(arr, i) {
524
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
519
525
 
520
- /**
521
- * @see https://github.com/facebook/react/blob/15-stable/src/renderers/dom/shared/DOMProperty.js#L14-L16
522
- *
523
- * @param {Number} value
524
- * @param {Number} bitmask
525
- * @return {Boolean}
526
- */
527
- function checkMask(value, bitmask) {
528
- return (value & bitmask) === bitmask;
529
- }
526
+ if (_i == null) return;
527
+ var _arr = [];
528
+ var _n = true;
529
+ var _d = false;
530
530
 
531
- /**
532
- * @see https://github.com/facebook/react/blob/15-stable/src/renderers/dom/shared/DOMProperty.js#L57
533
- *
534
- * @param {Object} domPropertyConfig - HTMLDOMPropertyConfig or SVGDOMPropertyConfig
535
- * @param {Object} config - The object to be mutated
536
- * @param {Boolean} isSVG - Whether the injected config is HTML or SVG (it assumes the default is HTML)
537
- */
538
- function injectDOMPropertyConfig(domPropertyConfig, config, isSVG) {
539
- var Properties = domPropertyConfig.Properties;
540
- var DOMAttributeNames = domPropertyConfig.DOMAttributeNames;
541
- var attributeName;
542
- var propertyName;
543
- var propConfig;
544
-
545
- for (propertyName in Properties) {
546
- attributeName =
547
- DOMAttributeNames[propertyName] ||
548
- (isSVG ? propertyName : propertyName.toLowerCase());
549
- propConfig = Properties[propertyName];
550
-
551
- config[attributeName] = {
552
- attributeName: attributeName,
553
- propertyName: propertyName,
554
- mustUseProperty: checkMask(propConfig, MUST_USE_PROPERTY),
555
- hasBooleanValue: checkMask(propConfig, HAS_BOOLEAN_VALUE),
556
- hasNumericValue: checkMask(propConfig, HAS_NUMERIC_VALUE),
557
- hasPositiveNumericValue: checkMask(
558
- propConfig,
559
- HAS_POSITIVE_NUMERIC_VALUE
560
- ),
561
- hasOverloadedBooleanValue: checkMask(
562
- propConfig,
563
- HAS_OVERLOADED_BOOLEAN_VALUE
564
- )
565
- };
531
+ var _s, _e;
532
+
533
+ try {
534
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
535
+ _arr.push(_s.value);
536
+
537
+ if (i && _arr.length === i) break;
538
+ }
539
+ } catch (err) {
540
+ _d = true;
541
+ _e = err;
542
+ } finally {
543
+ try {
544
+ if (!_n && _i["return"] != null) _i["return"]();
545
+ } finally {
546
+ if (_d) throw _e;
547
+ }
566
548
  }
549
+
550
+ return _arr;
567
551
  }
568
552
 
569
- /**
570
- * HTML properties config.
571
- *
572
- * @type {Object}
573
- */
574
- var html = {};
575
- injectDOMPropertyConfig(HTMLDOMPropertyConfig, html);
553
+ function _unsupportedIterableToArray(o, minLen) {
554
+ if (!o) return;
555
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
556
+ var n = Object.prototype.toString.call(o).slice(8, -1);
557
+ if (n === "Object" && o.constructor) n = o.constructor.name;
558
+ if (n === "Map" || n === "Set") return Array.from(o);
559
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
560
+ }
576
561
 
577
- /**
578
- * SVG properties config.
579
- *
580
- * @type {Object}
581
- */
582
- var svg = {};
583
- injectDOMPropertyConfig(SVGDOMPropertyConfig, svg, true);
562
+ function _arrayLikeToArray(arr, len) {
563
+ if (len == null || len > arr.length) len = arr.length;
564
+
565
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
584
566
 
567
+ return arr2;
568
+ }
569
+
570
+ function _nonIterableRest() {
571
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
572
+ }
573
+
574
+ // A reserved attribute.
575
+ // It is handled by React separately and shouldn't be written to the DOM.
576
+ var RESERVED = 0; // A simple string attribute.
577
+ // Attributes that aren't in the filter are presumed to have this type.
578
+
579
+ var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
580
+ // "enumerated" attributes with "true" and "false" as possible values.
581
+ // When true, it should be set to a "true" string.
582
+ // When false, it should be set to a "false" string.
583
+
584
+ var BOOLEANISH_STRING = 2; // A real boolean attribute.
585
+ // When true, it should be present (set either to an empty string or its name).
586
+ // When false, it should be omitted.
587
+
588
+ var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
589
+ // When true, it should be present (set either to an empty string or its name).
590
+ // When false, it should be omitted.
591
+ // For any other value, should be present with that value.
592
+
593
+ var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
594
+ // When falsy, it should be removed.
595
+
596
+ var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
597
+ // When falsy, it should be removed.
598
+
599
+ var POSITIVE_NUMERIC = 6;
600
+ function getPropertyInfo(name) {
601
+ return properties.hasOwnProperty(name) ? properties[name] : null;
602
+ }
603
+
604
+ function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
605
+ this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
606
+ this.attributeName = attributeName;
607
+ this.attributeNamespace = attributeNamespace;
608
+ this.mustUseProperty = mustUseProperty;
609
+ this.propertyName = name;
610
+ this.type = type;
611
+ this.sanitizeURL = sanitizeURL;
612
+ this.removeEmptyString = removeEmptyString;
613
+ } // When adding attributes to this list, be sure to also add them to
614
+ // the `possibleStandardNames` module to ensure casing and incorrect
615
+ // name warnings.
616
+
617
+
618
+ var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.
619
+
620
+ var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
621
+ // elements (not just inputs). Now that ReactDOMInput assigns to the
622
+ // defaultValue property -- do we need this?
623
+ 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
624
+ reservedProps.forEach(function (name) {
625
+ properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
626
+ name, // attributeName
627
+ null, // attributeNamespace
628
+ false, // sanitizeURL
629
+ false);
630
+ }); // A few React string attributes have a different name.
631
+ // This is a mapping from React prop names to the attribute names.
632
+
633
+ [['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
634
+ var _ref2 = _slicedToArray(_ref, 2),
635
+ name = _ref2[0],
636
+ attributeName = _ref2[1];
637
+
638
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
639
+ attributeName, // attributeName
640
+ null, // attributeNamespace
641
+ false, // sanitizeURL
642
+ false);
643
+ }); // These are "enumerated" HTML attributes that accept "true" and "false".
644
+ // In React, we let users pass `true` and `false` even though technically
645
+ // these aren't boolean attributes (they are coerced to strings).
646
+
647
+ ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
648
+ properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
649
+ name.toLowerCase(), // attributeName
650
+ null, // attributeNamespace
651
+ false, // sanitizeURL
652
+ false);
653
+ }); // These are "enumerated" SVG attributes that accept "true" and "false".
654
+ // In React, we let users pass `true` and `false` even though technically
655
+ // these aren't boolean attributes (they are coerced to strings).
656
+ // Since these are SVG attributes, their attribute names are case-sensitive.
657
+
658
+ ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
659
+ properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
660
+ name, // attributeName
661
+ null, // attributeNamespace
662
+ false, // sanitizeURL
663
+ false);
664
+ }); // These are HTML boolean attributes.
665
+
666
+ ['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
667
+ // on the client side because the browsers are inconsistent. Instead we call focus().
668
+ 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
669
+ 'itemScope'].forEach(function (name) {
670
+ properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
671
+ name.toLowerCase(), // attributeName
672
+ null, // attributeNamespace
673
+ false, // sanitizeURL
674
+ false);
675
+ }); // These are the few React props that we set as DOM properties
676
+ // rather than attributes. These are all booleans.
677
+
678
+ ['checked', // Note: `option.selected` is not updated if `select.multiple` is
679
+ // disabled with `removeAttribute`. We have special logic for handling this.
680
+ 'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
681
+ // you'll need to set attributeName to name.toLowerCase()
682
+ // instead in the assignment below.
683
+ ].forEach(function (name) {
684
+ properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
685
+ name, // attributeName
686
+ null, // attributeNamespace
687
+ false, // sanitizeURL
688
+ false);
689
+ }); // These are HTML attributes that are "overloaded booleans": they behave like
690
+ // booleans, but can also accept a string value.
691
+
692
+ ['capture', 'download' // NOTE: if you add a camelCased prop to this list,
693
+ // you'll need to set attributeName to name.toLowerCase()
694
+ // instead in the assignment below.
695
+ ].forEach(function (name) {
696
+ properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
697
+ name, // attributeName
698
+ null, // attributeNamespace
699
+ false, // sanitizeURL
700
+ false);
701
+ }); // These are HTML attributes that must be positive numbers.
702
+
703
+ ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
704
+ // you'll need to set attributeName to name.toLowerCase()
705
+ // instead in the assignment below.
706
+ ].forEach(function (name) {
707
+ properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
708
+ name, // attributeName
709
+ null, // attributeNamespace
710
+ false, // sanitizeURL
711
+ false);
712
+ }); // These are HTML attributes that must be numbers.
713
+
714
+ ['rowSpan', 'start'].forEach(function (name) {
715
+ properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
716
+ name.toLowerCase(), // attributeName
717
+ null, // attributeNamespace
718
+ false, // sanitizeURL
719
+ false);
720
+ });
721
+ var CAMELIZE = /[\-\:]([a-z])/g;
722
+
723
+ var capitalize$1 = function capitalize(token) {
724
+ return token[1].toUpperCase();
725
+ }; // This is a list of all SVG attributes that need special casing, namespacing,
726
+ // or boolean value assignment. Regular attributes that just accept strings
727
+ // and have the same names are omitted, just like in the HTML attribute filter.
728
+ // Some of these attributes can be hard to find. This list was created by
729
+ // scraping the MDN documentation.
730
+
731
+
732
+ ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,
733
+ // you'll need to set attributeName to name.toLowerCase()
734
+ // instead in the assignment below.
735
+ ].forEach(function (attributeName) {
736
+ var name = attributeName.replace(CAMELIZE, capitalize$1);
737
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
738
+ attributeName, null, // attributeNamespace
739
+ false, // sanitizeURL
740
+ false);
741
+ }); // String SVG attributes with the xlink namespace.
742
+
743
+ ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
744
+ // you'll need to set attributeName to name.toLowerCase()
745
+ // instead in the assignment below.
746
+ ].forEach(function (attributeName) {
747
+ var name = attributeName.replace(CAMELIZE, capitalize$1);
748
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
749
+ attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
750
+ false);
751
+ }); // String SVG attributes with the xml namespace.
752
+
753
+ ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
754
+ // you'll need to set attributeName to name.toLowerCase()
755
+ // instead in the assignment below.
756
+ ].forEach(function (attributeName) {
757
+ var name = attributeName.replace(CAMELIZE, capitalize$1);
758
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
759
+ attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
760
+ false);
761
+ }); // These attribute exists both in HTML and SVG.
762
+ // The attribute name is case-sensitive in SVG so we can't just use
763
+ // the React name like we do for attributes that exist only in HTML.
764
+
765
+ ['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
766
+ properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
767
+ attributeName.toLowerCase(), // attributeName
768
+ null, // attributeNamespace
769
+ false, // sanitizeURL
770
+ false);
771
+ }); // These attributes accept URLs. These must not allow javascript: URLS.
772
+ // These will also need to accept Trusted Types object in the future.
773
+
774
+ var xlinkHref = 'xlinkHref';
775
+ properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
776
+ 'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
777
+ false);
778
+ ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
779
+ properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
780
+ attributeName.toLowerCase(), // attributeName
781
+ null, // attributeNamespace
782
+ true, // sanitizeURL
783
+ true);
784
+ });
785
+
786
+ var _require = possibleStandardNamesOptimized$1,
787
+ CAMELCASE = _require.CAMELCASE,
788
+ SAME = _require.SAME,
789
+ possibleStandardNamesOptimized = _require.possibleStandardNames;
790
+
791
+ var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
792
+ var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
585
793
  /**
586
- * HTML and SVG properties config.
794
+ * Checks whether a property name is a custom attribute.
795
+ *
796
+ * @see {@link https://github.com/facebook/react/blob/15-stable/src/renderers/dom/shared/HTMLDOMPropertyConfig.js#L23-L25}
587
797
  *
588
- * @type {Object}
798
+ * @param {string}
799
+ * @return {boolean}
589
800
  */
590
- var properties = {};
591
- injectDOMPropertyConfig(HTMLDOMPropertyConfig, properties);
592
- injectDOMPropertyConfig(SVGDOMPropertyConfig, properties, true);
593
801
 
594
- var ATTRIBUTE_NAME_START_CHAR =
595
- ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
596
- var ATTRIBUTE_NAME_CHAR =
597
- ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040';
802
+ var isCustomAttribute = RegExp.prototype.test.bind( // eslint-disable-next-line no-misleading-character-class
803
+ new RegExp('^(data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'));
804
+ var possibleStandardNames = Object.keys(possibleStandardNamesOptimized).reduce(function (accumulator, standardName) {
805
+ var propName = possibleStandardNamesOptimized[standardName];
806
+
807
+ if (propName === SAME) {
808
+ accumulator[standardName] = standardName;
809
+ } else if (propName === CAMELCASE) {
810
+ accumulator[standardName.toLowerCase()] = standardName;
811
+ } else {
812
+ accumulator[standardName] = propName;
813
+ }
598
814
 
599
- var reactProperty$1 = {
600
- html: html,
601
- svg: svg,
602
- properties: properties,
815
+ return accumulator;
816
+ }, {});
603
817
 
604
- /**
605
- * Checks whether a property name is a custom attribute.
606
- *
607
- * @see https://github.com/facebook/react/blob/15-stable/src/renderers/dom/shared/HTMLDOMPropertyConfig.js#L23-L25
608
- *
609
- * @param {String}
610
- * @return {Boolean}
611
- */
612
- isCustomAttribute: RegExp.prototype.test.bind(
613
- new RegExp('^(data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$')
614
- )
615
- };
818
+ lib$1.BOOLEAN = BOOLEAN;
819
+ lib$1.BOOLEANISH_STRING = BOOLEANISH_STRING;
820
+ lib$1.NUMERIC = NUMERIC;
821
+ lib$1.OVERLOADED_BOOLEAN = OVERLOADED_BOOLEAN;
822
+ lib$1.POSITIVE_NUMERIC = POSITIVE_NUMERIC;
823
+ lib$1.RESERVED = RESERVED;
824
+ lib$1.STRING = STRING;
825
+ lib$1.getPropertyInfo = getPropertyInfo;
826
+ lib$1.isCustomAttribute = isCustomAttribute;
827
+ lib$1.possibleStandardNames = possibleStandardNames;
616
828
 
617
829
  var cjs = {};
618
830
 
@@ -969,7 +1181,7 @@
969
1181
  exports["default"] = StyleToJS;
970
1182
  }(cjs));
971
1183
 
972
- var React$1 = require$$0__default['default'];
1184
+ var React$1 = require$$0__default["default"];
973
1185
  var styleToJS = cjs.default;
974
1186
 
975
1187
  /**
@@ -1050,7 +1262,7 @@
1050
1262
  * @param {null|undefined|string} style
1051
1263
  * @param {object} props
1052
1264
  */
1053
- function setStyleProp$2(style, props) {
1265
+ function setStyleProp$1(style, props) {
1054
1266
  if (style === null || style === undefined) {
1055
1267
  return;
1056
1268
  }
@@ -1071,60 +1283,54 @@
1071
1283
  PRESERVE_CUSTOM_ATTRIBUTES: PRESERVE_CUSTOM_ATTRIBUTES,
1072
1284
  invertObject: invertObject,
1073
1285
  isCustomComponent: isCustomComponent,
1074
- setStyleProp: setStyleProp$2
1286
+ setStyleProp: setStyleProp$1
1075
1287
  };
1076
1288
 
1077
- var reactProperty = reactProperty$1;
1289
+ var reactProperty = lib$1;
1078
1290
  var utilities$2 = utilities$3;
1079
1291
 
1080
- var setStyleProp$1 = utilities$2.setStyleProp;
1081
-
1082
- var htmlProperties = reactProperty.html;
1083
- var svgProperties = reactProperty.svg;
1084
- var isCustomAttribute = reactProperty.isCustomAttribute;
1085
-
1086
- var hasOwnProperty = Object.prototype.hasOwnProperty;
1087
-
1088
1292
  /**
1089
1293
  * Converts HTML/SVG DOM attributes to React props.
1090
1294
  *
1091
1295
  * @param {object} [attributes={}] - HTML/SVG DOM attributes.
1092
1296
  * @return {object} - React props.
1093
1297
  */
1094
- function attributesToProps$2(attributes) {
1298
+ var attributesToProps$2 = function attributesToProps(attributes) {
1095
1299
  attributes = attributes || {};
1096
1300
 
1097
1301
  var attributeName;
1098
1302
  var attributeNameLowerCased;
1099
1303
  var attributeValue;
1100
- var property;
1304
+ var propName;
1305
+ var propertyInfo;
1101
1306
  var props = {};
1102
1307
 
1103
1308
  for (attributeName in attributes) {
1104
1309
  attributeValue = attributes[attributeName];
1105
1310
 
1106
1311
  // ARIA (aria-*) or custom data (data-*) attribute
1107
- if (isCustomAttribute(attributeName)) {
1312
+ if (reactProperty.isCustomAttribute(attributeName)) {
1108
1313
  props[attributeName] = attributeValue;
1109
1314
  continue;
1110
1315
  }
1111
1316
 
1112
- // convert HTML attribute to React prop
1317
+ // convert HTML/SVG attribute to React prop
1113
1318
  attributeNameLowerCased = attributeName.toLowerCase();
1114
- if (hasOwnProperty.call(htmlProperties, attributeNameLowerCased)) {
1115
- property = htmlProperties[attributeNameLowerCased];
1116
- props[property.propertyName] =
1117
- property.hasBooleanValue ||
1118
- (property.hasOverloadedBooleanValue && !attributeValue)
1119
- ? true
1120
- : attributeValue;
1121
- continue;
1122
- }
1123
-
1124
- // convert SVG attribute to React prop
1125
- if (hasOwnProperty.call(svgProperties, attributeName)) {
1126
- property = svgProperties[attributeName];
1127
- props[property.propertyName] = attributeValue;
1319
+ propName = reactProperty.possibleStandardNames[attributeNameLowerCased];
1320
+
1321
+ if (propName) {
1322
+ props[propName] = attributeValue;
1323
+ propertyInfo = reactProperty.getPropertyInfo(propName);
1324
+ switch (propertyInfo && propertyInfo.type) {
1325
+ case reactProperty.BOOLEAN:
1326
+ props[propName] = true;
1327
+ break;
1328
+ case reactProperty.OVERLOADED_BOOLEAN:
1329
+ if (attributeValue === '') {
1330
+ props[propName] = true;
1331
+ }
1332
+ break;
1333
+ }
1128
1334
  continue;
1129
1335
  }
1130
1336
 
@@ -1135,15 +1341,13 @@
1135
1341
  }
1136
1342
 
1137
1343
  // transform inline style to object
1138
- setStyleProp$1(attributes.style, props);
1344
+ utilities$2.setStyleProp(attributes.style, props);
1139
1345
 
1140
1346
  return props;
1141
- }
1142
-
1143
- var attributesToProps_1 = attributesToProps$2;
1347
+ };
1144
1348
 
1145
- var React = require$$0__default['default'];
1146
- var attributesToProps$1 = attributesToProps_1;
1349
+ var React = require$$0__default["default"];
1350
+ var attributesToProps$1 = attributesToProps$2;
1147
1351
  var utilities$1 = utilities$3;
1148
1352
 
1149
1353
  var setStyleProp = utilities$1.setStyleProp;
@@ -1441,6 +1645,10 @@
1441
1645
  }
1442
1646
  Object.defineProperty(Node.prototype, "nodeType", {
1443
1647
  // Read-only aliases
1648
+ /**
1649
+ * [DOM spec](https://dom.spec.whatwg.org/#dom-node-nodetype)-compatible
1650
+ * node {@link type}.
1651
+ */
1444
1652
  get: function () {
1445
1653
  var _a;
1446
1654
  return (_a = nodeTypes.get(this.type)) !== null && _a !== void 0 ? _a : 1;
@@ -1450,6 +1658,10 @@
1450
1658
  });
1451
1659
  Object.defineProperty(Node.prototype, "parentNode", {
1452
1660
  // Read-write aliases for properties
1661
+ /**
1662
+ * Same as {@link parent}.
1663
+ * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
1664
+ */
1453
1665
  get: function () {
1454
1666
  return this.parent;
1455
1667
  },
@@ -1460,6 +1672,10 @@
1460
1672
  configurable: true
1461
1673
  });
1462
1674
  Object.defineProperty(Node.prototype, "previousSibling", {
1675
+ /**
1676
+ * Same as {@link prev}.
1677
+ * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
1678
+ */
1463
1679
  get: function () {
1464
1680
  return this.prev;
1465
1681
  },
@@ -1470,6 +1686,10 @@
1470
1686
  configurable: true
1471
1687
  });
1472
1688
  Object.defineProperty(Node.prototype, "nextSibling", {
1689
+ /**
1690
+ * Same as {@link next}.
1691
+ * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
1692
+ */
1473
1693
  get: function () {
1474
1694
  return this.next;
1475
1695
  },
@@ -1507,6 +1727,10 @@
1507
1727
  return _this;
1508
1728
  }
1509
1729
  Object.defineProperty(DataNode.prototype, "nodeValue", {
1730
+ /**
1731
+ * Same as {@link data}.
1732
+ * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
1733
+ */
1510
1734
  get: function () {
1511
1735
  return this.data;
1512
1736
  },
@@ -1570,6 +1794,7 @@
1570
1794
  }
1571
1795
  Object.defineProperty(NodeWithChildren.prototype, "firstChild", {
1572
1796
  // Aliases
1797
+ /** First child of the node. */
1573
1798
  get: function () {
1574
1799
  var _a;
1575
1800
  return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;
@@ -1578,6 +1803,7 @@
1578
1803
  configurable: true
1579
1804
  });
1580
1805
  Object.defineProperty(NodeWithChildren.prototype, "lastChild", {
1806
+ /** Last child of the node. */
1581
1807
  get: function () {
1582
1808
  return this.children.length > 0
1583
1809
  ? this.children[this.children.length - 1]
@@ -1587,6 +1813,10 @@
1587
1813
  configurable: true
1588
1814
  });
1589
1815
  Object.defineProperty(NodeWithChildren.prototype, "childNodes", {
1816
+ /**
1817
+ * Same as {@link children}.
1818
+ * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
1819
+ */
1590
1820
  get: function () {
1591
1821
  return this.children;
1592
1822
  },
@@ -1634,6 +1864,10 @@
1634
1864
  }
1635
1865
  Object.defineProperty(Element.prototype, "tagName", {
1636
1866
  // DOM Level 1 aliases
1867
+ /**
1868
+ * Same as {@link name}.
1869
+ * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
1870
+ */
1637
1871
  get: function () {
1638
1872
  return this.name;
1639
1873
  },
@@ -1737,6 +1971,9 @@
1737
1971
  var children = recursive ? cloneChildren(node.children) : [];
1738
1972
  var clone_1 = new Element$1(node.name, __assign({}, node.attribs), children);
1739
1973
  children.forEach(function (child) { return (child.parent = clone_1); });
1974
+ if (node.namespace != null) {
1975
+ clone_1.namespace = node.namespace;
1976
+ }
1740
1977
  if (node["x-attribsNamespace"]) {
1741
1978
  clone_1["x-attribsNamespace"] = __assign({}, node["x-attribsNamespace"]);
1742
1979
  }
@@ -1770,10 +2007,13 @@
1770
2007
  result = instruction;
1771
2008
  }
1772
2009
  else {
1773
- throw new Error("Not implemented yet: " + node.type);
2010
+ throw new Error("Not implemented yet: ".concat(node.type));
1774
2011
  }
1775
2012
  result.startIndex = node.startIndex;
1776
2013
  result.endIndex = node.endIndex;
2014
+ if (node.sourceCodeLocation != null) {
2015
+ result.sourceCodeLocation = node.sourceCodeLocation;
2016
+ }
1777
2017
  return result;
1778
2018
  }
1779
2019
  node.cloneNode = cloneNode;
@@ -2130,7 +2370,7 @@
2130
2370
  var htmlToDom = HTMLDOMParser;
2131
2371
 
2132
2372
  var domToReact = domToReact_1;
2133
- var attributesToProps = attributesToProps_1;
2373
+ var attributesToProps = attributesToProps$2;
2134
2374
  var htmlToDOM = htmlToDom;
2135
2375
 
2136
2376
  var domParserOptions = { lowerCaseAttributeNames: false };
@@ -2162,6 +2402,7 @@
2162
2402
  HTMLReactParser.domToReact = domToReact;
2163
2403
  HTMLReactParser.htmlToDOM = htmlToDOM;
2164
2404
  HTMLReactParser.attributesToProps = attributesToProps;
2405
+ HTMLReactParser.Element = node.Element;
2165
2406
 
2166
2407
  // support CommonJS and ES Modules
2167
2408
  htmlReactParser$1.exports = HTMLReactParser;
@@ -2171,5 +2412,5 @@
2171
2412
 
2172
2413
  return htmlReactParser;
2173
2414
 
2174
- })));
2415
+ }));
2175
2416
  //# sourceMappingURL=html-react-parser.js.map