umap-project 2.4.1__py3-none-any.whl → 2.5.0__py3-none-any.whl

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 (199) hide show
  1. umap/__init__.py +1 -1
  2. umap/locale/el/LC_MESSAGES/django.mo +0 -0
  3. umap/locale/el/LC_MESSAGES/django.po +145 -90
  4. umap/locale/en/LC_MESSAGES/django.po +13 -13
  5. umap/locale/eu/LC_MESSAGES/django.mo +0 -0
  6. umap/locale/eu/LC_MESSAGES/django.po +145 -89
  7. umap/locale/hu/LC_MESSAGES/django.mo +0 -0
  8. umap/locale/hu/LC_MESSAGES/django.po +100 -50
  9. umap/static/umap/base.css +5 -2
  10. umap/static/umap/content.css +2 -2
  11. umap/static/umap/css/contextmenu.css +11 -0
  12. umap/static/umap/css/dialog.css +25 -4
  13. umap/static/umap/css/importers.css +2 -0
  14. umap/static/umap/css/panel.css +6 -4
  15. umap/static/umap/css/slideshow.css +69 -0
  16. umap/static/umap/css/tableeditor.css +69 -0
  17. umap/static/umap/css/tooltip.css +3 -3
  18. umap/static/umap/img/16-white.svg +4 -0
  19. umap/static/umap/img/source/16-white.svg +5 -1
  20. umap/static/umap/js/components/alerts/alert.css +11 -11
  21. umap/static/umap/js/components/alerts/alert.js +1 -1
  22. umap/static/umap/js/modules/autocomplete.js +27 -5
  23. umap/static/umap/js/modules/browser.js +20 -14
  24. umap/static/umap/js/modules/caption.js +4 -4
  25. umap/static/umap/js/modules/dompurify.js +2 -3
  26. umap/static/umap/js/modules/facets.js +53 -17
  27. umap/static/umap/js/modules/formatter.js +153 -0
  28. umap/static/umap/js/modules/global.js +25 -16
  29. umap/static/umap/js/modules/help.js +26 -26
  30. umap/static/umap/js/modules/importer.js +10 -10
  31. umap/static/umap/js/modules/importers/communesfr.js +3 -1
  32. umap/static/umap/js/modules/importers/datasets.js +8 -6
  33. umap/static/umap/js/modules/importers/geodatamine.js +14 -14
  34. umap/static/umap/js/modules/importers/overpass.js +19 -15
  35. umap/static/umap/js/modules/orderable.js +2 -2
  36. umap/static/umap/js/modules/request.js +1 -1
  37. umap/static/umap/js/modules/rules.js +26 -11
  38. umap/static/umap/js/modules/schema.js +16 -12
  39. umap/static/umap/js/{umap.share.js → modules/share.js} +58 -103
  40. umap/static/umap/js/modules/slideshow.js +141 -0
  41. umap/static/umap/js/modules/sync/engine.js +3 -3
  42. umap/static/umap/js/modules/sync/updaters.js +10 -11
  43. umap/static/umap/js/modules/sync/websocket.js +1 -1
  44. umap/static/umap/js/modules/tableeditor.js +329 -0
  45. umap/static/umap/js/modules/ui/base.js +93 -0
  46. umap/static/umap/js/modules/ui/contextmenu.js +50 -0
  47. umap/static/umap/js/modules/ui/dialog.js +169 -31
  48. umap/static/umap/js/modules/ui/panel.js +7 -5
  49. umap/static/umap/js/modules/ui/tooltip.js +7 -77
  50. umap/static/umap/js/modules/urls.js +1 -2
  51. umap/static/umap/js/modules/utils.js +36 -16
  52. umap/static/umap/js/umap.controls.js +27 -29
  53. umap/static/umap/js/umap.core.js +19 -15
  54. umap/static/umap/js/umap.datalayer.permissions.js +15 -18
  55. umap/static/umap/js/umap.features.js +113 -131
  56. umap/static/umap/js/umap.forms.js +203 -228
  57. umap/static/umap/js/umap.icon.js +17 -22
  58. umap/static/umap/js/umap.js +117 -107
  59. umap/static/umap/js/umap.layer.js +374 -324
  60. umap/static/umap/js/umap.permissions.js +7 -10
  61. umap/static/umap/js/umap.popup.js +20 -20
  62. umap/static/umap/locale/am_ET.js +22 -5
  63. umap/static/umap/locale/am_ET.json +22 -5
  64. umap/static/umap/locale/ar.js +22 -5
  65. umap/static/umap/locale/ar.json +22 -5
  66. umap/static/umap/locale/ast.js +22 -5
  67. umap/static/umap/locale/ast.json +22 -5
  68. umap/static/umap/locale/bg.js +22 -5
  69. umap/static/umap/locale/bg.json +22 -5
  70. umap/static/umap/locale/br.js +22 -5
  71. umap/static/umap/locale/br.json +22 -5
  72. umap/static/umap/locale/ca.js +56 -39
  73. umap/static/umap/locale/ca.json +56 -39
  74. umap/static/umap/locale/cs_CZ.js +22 -5
  75. umap/static/umap/locale/cs_CZ.json +22 -5
  76. umap/static/umap/locale/da.js +22 -5
  77. umap/static/umap/locale/da.json +22 -5
  78. umap/static/umap/locale/de.js +22 -5
  79. umap/static/umap/locale/de.json +22 -5
  80. umap/static/umap/locale/el.js +27 -10
  81. umap/static/umap/locale/el.json +27 -10
  82. umap/static/umap/locale/en.js +22 -6
  83. umap/static/umap/locale/en.json +22 -6
  84. umap/static/umap/locale/en_US.json +22 -5
  85. umap/static/umap/locale/es.js +22 -6
  86. umap/static/umap/locale/es.json +22 -6
  87. umap/static/umap/locale/et.js +22 -5
  88. umap/static/umap/locale/et.json +22 -5
  89. umap/static/umap/locale/eu.js +167 -150
  90. umap/static/umap/locale/eu.json +167 -150
  91. umap/static/umap/locale/fa_IR.js +22 -5
  92. umap/static/umap/locale/fa_IR.json +22 -5
  93. umap/static/umap/locale/fi.js +22 -5
  94. umap/static/umap/locale/fi.json +22 -5
  95. umap/static/umap/locale/fr.js +22 -6
  96. umap/static/umap/locale/fr.json +22 -6
  97. umap/static/umap/locale/gl.js +22 -5
  98. umap/static/umap/locale/gl.json +22 -5
  99. umap/static/umap/locale/he.js +22 -5
  100. umap/static/umap/locale/he.json +22 -5
  101. umap/static/umap/locale/hr.js +22 -5
  102. umap/static/umap/locale/hr.json +22 -5
  103. umap/static/umap/locale/hu.js +89 -72
  104. umap/static/umap/locale/hu.json +89 -72
  105. umap/static/umap/locale/id.js +22 -5
  106. umap/static/umap/locale/id.json +22 -5
  107. umap/static/umap/locale/is.js +22 -5
  108. umap/static/umap/locale/is.json +22 -5
  109. umap/static/umap/locale/it.js +22 -5
  110. umap/static/umap/locale/it.json +22 -5
  111. umap/static/umap/locale/ja.js +22 -5
  112. umap/static/umap/locale/ja.json +22 -5
  113. umap/static/umap/locale/ko.js +22 -5
  114. umap/static/umap/locale/ko.json +22 -5
  115. umap/static/umap/locale/lt.js +22 -5
  116. umap/static/umap/locale/lt.json +22 -5
  117. umap/static/umap/locale/ms.js +22 -5
  118. umap/static/umap/locale/ms.json +22 -5
  119. umap/static/umap/locale/nl.js +22 -5
  120. umap/static/umap/locale/nl.json +22 -5
  121. umap/static/umap/locale/no.js +22 -5
  122. umap/static/umap/locale/no.json +22 -5
  123. umap/static/umap/locale/pl.js +22 -5
  124. umap/static/umap/locale/pl.json +22 -5
  125. umap/static/umap/locale/pl_PL.json +22 -5
  126. umap/static/umap/locale/pt.js +22 -6
  127. umap/static/umap/locale/pt.json +22 -6
  128. umap/static/umap/locale/pt_BR.js +22 -5
  129. umap/static/umap/locale/pt_BR.json +22 -5
  130. umap/static/umap/locale/pt_PT.js +22 -5
  131. umap/static/umap/locale/pt_PT.json +22 -5
  132. umap/static/umap/locale/ro.js +22 -5
  133. umap/static/umap/locale/ro.json +22 -5
  134. umap/static/umap/locale/ru.js +22 -5
  135. umap/static/umap/locale/ru.json +22 -5
  136. umap/static/umap/locale/sk_SK.js +22 -5
  137. umap/static/umap/locale/sk_SK.json +22 -5
  138. umap/static/umap/locale/sl.js +22 -5
  139. umap/static/umap/locale/sl.json +22 -5
  140. umap/static/umap/locale/sr.js +22 -5
  141. umap/static/umap/locale/sr.json +22 -5
  142. umap/static/umap/locale/sv.js +22 -5
  143. umap/static/umap/locale/sv.json +22 -5
  144. umap/static/umap/locale/th_TH.js +22 -5
  145. umap/static/umap/locale/th_TH.json +22 -5
  146. umap/static/umap/locale/tr.js +22 -5
  147. umap/static/umap/locale/tr.json +22 -5
  148. umap/static/umap/locale/uk_UA.js +22 -5
  149. umap/static/umap/locale/uk_UA.json +22 -5
  150. umap/static/umap/locale/vi.js +22 -5
  151. umap/static/umap/locale/vi.json +22 -5
  152. umap/static/umap/locale/vi_VN.json +22 -5
  153. umap/static/umap/locale/zh.js +22 -5
  154. umap/static/umap/locale/zh.json +22 -5
  155. umap/static/umap/locale/zh_CN.json +22 -5
  156. umap/static/umap/locale/zh_TW.Big5.json +22 -5
  157. umap/static/umap/locale/zh_TW.js +22 -5
  158. umap/static/umap/locale/zh_TW.json +22 -5
  159. umap/static/umap/map.css +9 -153
  160. umap/static/umap/vars.css +15 -0
  161. umap/static/umap/vendors/dompurify/purify.es.js +5 -59
  162. umap/static/umap/vendors/dompurify/purify.es.mjs.map +1 -1
  163. umap/static/umap/vendors/formbuilder/Leaflet.FormBuilder.js +410 -428
  164. umap/static/umap/vendors/geojson-to-gpx/index.js +155 -0
  165. umap/static/umap/vendors/osmtogeojson/osmtogeojson.js +1 -2
  166. umap/static/umap/vendors/togeojson/togeojson.es.js +1109 -0
  167. umap/static/umap/vendors/togeojson/{togeojson.umd.js.map → togeojson.es.mjs.map} +1 -1
  168. umap/static/umap/vendors/tokml/tokml.es.js +895 -0
  169. umap/static/umap/vendors/tokml/tokml.es.mjs.map +1 -0
  170. umap/storage.py +6 -2
  171. umap/templates/umap/components/alerts/alert.html +3 -3
  172. umap/templates/umap/css.html +3 -0
  173. umap/templates/umap/js.html +0 -6
  174. umap/tests/fixtures/categorized_highway.geojson +1 -0
  175. umap/tests/fixtures/test_import_osm_relation.json +130 -0
  176. umap/tests/integration/conftest.py +8 -1
  177. umap/tests/integration/test_browser.py +3 -2
  178. umap/tests/integration/test_categorized_layer.py +141 -0
  179. umap/tests/integration/test_conditional_rules.py +21 -0
  180. umap/tests/integration/test_datalayer.py +9 -4
  181. umap/tests/integration/test_edit_datalayer.py +1 -0
  182. umap/tests/integration/test_edit_polygon.py +1 -1
  183. umap/tests/integration/test_export_map.py +2 -3
  184. umap/tests/integration/test_import.py +22 -0
  185. umap/tests/integration/test_map_preview.py +36 -2
  186. umap/tests/integration/test_tableeditor.py +158 -4
  187. umap/tests/integration/test_websocket_sync.py +2 -2
  188. umap/tests/test_views.py +2 -2
  189. umap/views.py +3 -2
  190. {umap_project-2.4.1.dist-info → umap_project-2.5.0.dist-info}/METADATA +8 -8
  191. {umap_project-2.4.1.dist-info → umap_project-2.5.0.dist-info}/RECORD +194 -184
  192. umap/static/umap/js/umap.slideshow.js +0 -165
  193. umap/static/umap/js/umap.tableeditor.js +0 -118
  194. umap/static/umap/vendors/togeojson/togeojson.umd.js +0 -2
  195. umap/static/umap/vendors/togpx/togpx.js +0 -547
  196. umap/static/umap/vendors/tokml/tokml.js +0 -343
  197. {umap_project-2.4.1.dist-info → umap_project-2.5.0.dist-info}/WHEEL +0 -0
  198. {umap_project-2.4.1.dist-info → umap_project-2.5.0.dist-info}/entry_points.txt +0 -0
  199. {umap_project-2.4.1.dist-info → umap_project-2.5.0.dist-info}/licenses/LICENSE +0 -0
umap/static/umap/map.css CHANGED
@@ -228,7 +228,7 @@
228
228
  ul.photon-autocomplete {
229
229
  position: absolute;
230
230
  background-color: white;
231
- z-index: 1000;
231
+ z-index: var(--zindex-autocomplete);
232
232
  display: none;
233
233
  }
234
234
  .photon-autocomplete li {
@@ -579,7 +579,7 @@ ul.photon-autocomplete {
579
579
  line-height: var(--control-size);
580
580
  cursor: auto;
581
581
  border-bottom: 1px solid #222;
582
- z-index: 1000;
582
+ z-index: var(--zindex-panels);
583
583
  opacity: 0.98;
584
584
  color: #fff;
585
585
  display: flex;
@@ -672,96 +672,12 @@ ul.photon-autocomplete {
672
672
  cursor: auto;
673
673
  border-top: 1px solid var(--color-lightGray);
674
674
  opacity: 0.93;
675
- z-index: 1000;
675
+ z-index: var(--zindex-panels);
676
676
  }
677
677
  .umap-help {
678
678
  font-style: italic;
679
679
  }
680
- .umap-slideshow-toolbox {
681
- position: absolute;
682
- right: 0;
683
- top: 0;
684
- display: none;
685
- }
686
- .umap-slideshow-enabled .umap-slideshow-toolbox {
687
- display: inline-block;
688
- }
689
- .umap-slideshow-toolbox li {
690
- display: inline-block;
691
- cursor: pointer;
692
- font-size: 1.5em;
693
- background-color: #464646;
694
- color: #fff;
695
- width: calc(var(--footer-height) * 2);
696
- height: var(--footer-height);
697
- line-height: var(--footer-height);
698
- vertical-align: middle;
699
- text-align: center;
700
- }
701
- .umap-slideshow-toolbox li + li {
702
- border-left: 1px solid #aaa;
703
- }
704
- .umap-slideshow-toolbox li:hover {
705
- background-color: #666;
706
- }
707
- .umap-slideshow-active .umap-slideshow-toolbox .play,
708
- .umap-slideshow-toolbox .play {
709
- width: calc(var(--footer-height) * 3);
710
- text-align: left;
711
- padding-left: 20px;
712
- }
713
- .umap-slideshow-toolbox .play:after {
714
- content: '⏯︎';
715
- }
716
- .umap-slideshow-active .umap-slideshow-toolbox .play:after {
717
- content: '⏸︎';
718
- }
719
- .umap-slideshow-toolbox .stop:before {
720
- content: '⏹';
721
- }
722
- .umap-slideshow-toolbox .next:before {
723
- content: '⏵︎';
724
- }
725
- .umap-slideshow-toolbox .prev:before {
726
- content: '⏴︎';
727
- }
728
- .umap-slideshow-toolbox .play div {
729
- height: 20px;
730
- width: 20px;
731
- margin: 0px auto;
732
- position: relative;
733
- top: 5px;
734
- -webkit-animation: rotation 5s infinite linear;
735
- -moz-animation: rotation 5s infinite linear;
736
- -o-animation: rotation 5s infinite linear;
737
- animation: rotation 5s infinite linear;
738
- border-left: 3px solid rgba(255,255,239,.15);
739
- border-right: 3px solid rgba(255,255,255,.15);
740
- border-bottom: 3px solid rgba(255,255,255,.15);
741
- border-top: 3px solid rgba(255,255,255,.8);
742
- border-radius:100%;
743
- display: inline-block;
744
- visibility: hidden;
745
- }
746
- @-webkit-keyframes rotation {
747
- from {-webkit-transform: rotate(0deg);}
748
- to {-webkit-transform: rotate(359deg);}
749
- }
750
- @-moz-keyframes rotation {
751
- from {-moz-transform: rotate(0deg);}
752
- to {-moz-transform: rotate(359deg);}
753
- }
754
- @-o-keyframes rotation {
755
- from {-o-transform: rotate(0deg);}
756
- to {-o-transform: rotate(359deg);}
757
- }
758
- @keyframes rotation {
759
- from {transform: rotate(0deg);}
760
- to {transform: rotate(359deg);}
761
- }
762
- .umap-slideshow-active .umap-slideshow-toolbox .play .spinner {
763
- visibility: visible;
764
- }
680
+
765
681
  .umap-datalayer-version {
766
682
  padding: 5px 0;
767
683
  border-bottom: 1px solid #202425;
@@ -776,7 +692,6 @@ ul.photon-autocomplete {
776
692
  margin-right: 10px;
777
693
  }
778
694
 
779
-
780
695
  .leaflet-toolbar-tip {
781
696
  background-color: var(--color-darkGray);
782
697
  }
@@ -993,64 +908,6 @@ a.umap-control-caption,
993
908
  padding-left: 31px;
994
909
  }
995
910
 
996
- /* ********************************* */
997
- /* Table Editor */
998
- /* ********************************* */
999
-
1000
- .umap-table-editor .table {
1001
- display: table;
1002
- width: 100%;
1003
- white-space: nowrap;
1004
- table-layout: fixed;
1005
- }
1006
- .umap-table-editor .tbody {
1007
- display: table-row-group;
1008
- }
1009
- .umap-table-editor .thead,
1010
- .umap-table-editor .trow {
1011
- display: table-row;
1012
- }
1013
- .umap-table-editor .tcell {
1014
- display: table-cell;
1015
- width: 200px;
1016
- }
1017
- .umap-table-editor .thead {
1018
- text-align: center;
1019
- height: 48px;
1020
- line-height: 48px;
1021
- background-color: #2c3133;
1022
- }
1023
- .umap-table-editor .thead .tcell {
1024
- border-left: 1px solid #0b0c0c;
1025
- }
1026
- .umap-table-editor .tbody .trow input {
1027
- margin: 0;
1028
- border-right: none;
1029
- display: inline;
1030
- }
1031
- .umap-table-editor .tbody .trow + .trow input {
1032
- border-top: none;
1033
- }
1034
- .umap-table-editor .thead i {
1035
- display: none;
1036
- width: 50%;
1037
- cursor: pointer;
1038
- padding: 10px 0;
1039
- height: 24px;
1040
- line-height: 24px;
1041
- }
1042
- .umap-table-editor .thead i:before {
1043
- width: 40px;
1044
- }
1045
- .umap-table-editor .thead .tcell:hover i {
1046
- display: inline-block;
1047
- }
1048
- .umap-table-editor .thead .tcell i:hover {
1049
- background-color: #33393b;
1050
- }
1051
- .umap-table-editor .thead .tcell:hover span {
1052
- display: none;
1053
- }
1054
911
 
1055
912
  /* ********************************* */
1056
913
  /* Tilelayer switcher */
@@ -1328,7 +1185,7 @@ span.popup-icon {
1328
1185
  width: 2px;
1329
1186
  }
1330
1187
  .umap-icon-active {
1331
- z-index: 9500!important;
1188
+ z-index: var(--zindex-icon-active)!important;
1332
1189
  opacity: 1.0!important;
1333
1190
  }
1334
1191
  .umap-edit-enabled .readonly {
@@ -1352,15 +1209,14 @@ span.popup-icon {
1352
1209
  -o-animation-delay: .2s;
1353
1210
  animation-delay: .2s;
1354
1211
  }
1355
- .umap-loader
1356
- {
1212
+ .umap-loader {
1357
1213
  position: absolute;
1358
1214
  display: none;
1359
1215
  top: 0;
1360
1216
  left: 0;
1361
1217
  right: 0;
1362
1218
  height: 4px;
1363
- z-index: 10100;
1219
+ z-index: var(--zindex-loader);
1364
1220
  background-color: #79c1c0 !important;
1365
1221
  -webkit-transform: translateX(100%);
1366
1222
  -moz-transform: translateX(100%);
@@ -1522,7 +1378,7 @@ span.popup-icon {
1522
1378
  margin-left: 10px;
1523
1379
  }
1524
1380
  .leaflet-top {
1525
- z-index: 1001;
1381
+ z-index: calc(var(--zindex-panels) - 1);
1526
1382
  }
1527
1383
  .leaflet-popup-content {
1528
1384
  min-width: 200px;
@@ -1594,7 +1450,7 @@ span.popup-icon {
1594
1450
  text-align: center;
1595
1451
  }
1596
1452
  .leaflet-inplace-toolbar {
1597
- z-index: 10000!important;
1453
+ z-index: var(--zindex-toolbar)!important;
1598
1454
  }
1599
1455
  .leaflet-inplace-toolbar a {
1600
1456
  background-image: url('./img/16-white.svg');
umap/static/umap/vars.css CHANGED
@@ -3,6 +3,7 @@
3
3
  --color-waterMint: #B9F5D2;
4
4
  --color-darkBlue: #263B58;
5
5
  --color-lightGray: #ddd;
6
+ --color-mediumGray: #3e4444;
6
7
  --color-darkGray: #323737;
7
8
  --color-light: white;
8
9
  --color-limeGreen: #b9f5d2;
@@ -36,6 +37,20 @@
36
37
  --box-padding: 20px;
37
38
  --box-margin: 14px;
38
39
  --text-margin: 7px;
40
+
41
+ /* z-indexes (leaflet CSS sets the map at 400 by default) */
42
+ --zindex-alert: 500;
43
+ --zindex-loader: 490;
44
+ --zindex-toolbar: 480;
45
+ --zindex-autocomplete: 470;
46
+ --zindex-dialog: 460;
47
+ --zindex-contextmenu: 455;
48
+ --zindex-icon-active: 450;
49
+ --zindex-tooltip: 445;
50
+ --zindex-panels: 440;
51
+ --zindex-dragover: 410;
52
+
53
+ --block-shadow: 0 1px 7px var(--color-mediumGray);
39
54
  }
40
55
  .dark {
41
56
  --background-color: var(--color-darkGray);
@@ -1,4 +1,4 @@
1
- /*! @license DOMPurify 3.1.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.3/LICENSE */
1
+ /*! @license DOMPurify 3.1.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.5/LICENSE */
2
2
 
3
3
  const {
4
4
  entries,
@@ -48,7 +48,6 @@ const stringTrim = unapply(String.prototype.trim);
48
48
  const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
49
49
  const regExpTest = unapply(RegExp.prototype.test);
50
50
  const typeErrorCreate = unconstruct(TypeError);
51
- const numberIsNaN = unapply(Number.isNaN);
52
51
 
53
52
  /**
54
53
  * Creates a new function that calls the given function with a specified thisArg and arguments.
@@ -197,7 +196,7 @@ const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mgly
197
196
  const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
198
197
  const text = freeze(['#text']);
199
198
 
200
- const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
199
+ const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
201
200
  const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
202
201
  const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
203
202
  const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
@@ -301,7 +300,7 @@ function createDOMPurify() {
301
300
  * Version label, exposed for easier checks
302
301
  * if DOMPurify is up to date or not
303
302
  */
304
- DOMPurify.version = '3.1.3';
303
+ DOMPurify.version = '3.1.5';
305
304
 
306
305
  /**
307
306
  * Array of elements that DOMPurify removed during sanitation.
@@ -534,9 +533,6 @@ function createDOMPurify() {
534
533
  /* Keep a reference to config to pass to hooks */
535
534
  let CONFIG = null;
536
535
 
537
- /* Specify the maximum element nesting depth to prevent mXSS */
538
- const MAX_NESTING_DEPTH = 255;
539
-
540
536
  /* Ideally, do not touch anything below this line */
541
537
  /* ______________________________________________ */
542
538
 
@@ -947,11 +943,7 @@ function createDOMPurify() {
947
943
  * @return {Boolean} true if clobbered, false if safe
948
944
  */
949
945
  const _isClobbered = function _isClobbered(elm) {
950
- return elm instanceof HTMLFormElement && (
951
- // eslint-disable-next-line unicorn/no-typeof-undefined
952
- typeof elm.__depth !== 'undefined' && typeof elm.__depth !== 'number' ||
953
- // eslint-disable-next-line unicorn/no-typeof-undefined
954
- typeof elm.__removalCount !== 'undefined' && typeof elm.__removalCount !== 'number' || typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');
946
+ return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');
955
947
  };
956
948
 
957
949
  /**
@@ -1102,7 +1094,7 @@ function createDOMPurify() {
1102
1094
  // eslint-disable-next-line complexity
1103
1095
  const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
1104
1096
  /* Make sure attribute cannot clobber */
1105
- if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement || value === '__depth' || value === '__removalCount')) {
1097
+ if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
1106
1098
  return false;
1107
1099
  }
1108
1100
 
@@ -1293,32 +1285,9 @@ function createDOMPurify() {
1293
1285
  if (_sanitizeElements(shadowNode)) {
1294
1286
  continue;
1295
1287
  }
1296
- const parentNode = getParentNode(shadowNode);
1297
-
1298
- /* Set the nesting depth of an element */
1299
- if (shadowNode.nodeType === NODE_TYPE.element) {
1300
- if (parentNode && parentNode.__depth) {
1301
- /*
1302
- We want the depth of the node in the original tree, which can
1303
- change when it's removed from its parent.
1304
- */
1305
- shadowNode.__depth = (shadowNode.__removalCount || 0) + parentNode.__depth + 1;
1306
- } else {
1307
- shadowNode.__depth = 1;
1308
- }
1309
- }
1310
-
1311
- /*
1312
- * Remove an element if nested too deeply to avoid mXSS
1313
- * or if the __depth might have been tampered with
1314
- */
1315
- if (shadowNode.__depth >= MAX_NESTING_DEPTH || shadowNode.__depth < 0 || numberIsNaN(shadowNode.__depth)) {
1316
- _forceRemove(shadowNode);
1317
- }
1318
1288
 
1319
1289
  /* Deep shadow DOM detected */
1320
1290
  if (shadowNode.content instanceof DocumentFragment) {
1321
- shadowNode.content.__depth = shadowNode.__depth;
1322
1291
  _sanitizeShadowDOM(shadowNode.content);
1323
1292
  }
1324
1293
 
@@ -1434,32 +1403,9 @@ function createDOMPurify() {
1434
1403
  if (_sanitizeElements(currentNode)) {
1435
1404
  continue;
1436
1405
  }
1437
- const parentNode = getParentNode(currentNode);
1438
-
1439
- /* Set the nesting depth of an element */
1440
- if (currentNode.nodeType === NODE_TYPE.element) {
1441
- if (parentNode && parentNode.__depth) {
1442
- /*
1443
- We want the depth of the node in the original tree, which can
1444
- change when it's removed from its parent.
1445
- */
1446
- currentNode.__depth = (currentNode.__removalCount || 0) + parentNode.__depth + 1;
1447
- } else {
1448
- currentNode.__depth = 1;
1449
- }
1450
- }
1451
-
1452
- /*
1453
- * Remove an element if nested too deeply to avoid mXSS
1454
- * or if the __depth might have been tampered with
1455
- */
1456
- if (currentNode.__depth >= MAX_NESTING_DEPTH || currentNode.__depth < 0 || numberIsNaN(currentNode.__depth)) {
1457
- _forceRemove(currentNode);
1458
- }
1459
1406
 
1460
1407
  /* Shadow DOM detected, sanitize it */
1461
1408
  if (currentNode.content instanceof DocumentFragment) {
1462
- currentNode.content.__depth = currentNode.__depth;
1463
1409
  _sanitizeShadowDOM(currentNode.content);
1464
1410
  }
1465
1411