wonder-image 2.1.2-alpha.2 → 2.1.2-alpha.21

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 (629) hide show
  1. package/README.md +2 -0
  2. package/dist/backend/body-end.js +1 -2
  3. package/dist/backend/body-end.js.map +1 -1
  4. package/dist/backend/head.css +1 -1
  5. package/dist/backend/head.css.map +1 -1
  6. package/dist/backend/head.js +1 -1
  7. package/dist/backend/head.js.LICENSE.txt +0 -1015
  8. package/dist/backend/head.js.map +1 -1
  9. package/dist/backend/lib.js +0 -1
  10. package/dist/frontend/body-end.js +0 -1
  11. package/dist/frontend/body-end.js.map +1 -1
  12. package/dist/frontend/head.css +1 -1
  13. package/dist/frontend/head.css.map +1 -1
  14. package/dist/frontend/head.js +1 -2
  15. package/dist/frontend/head.js.map +1 -1
  16. package/dist/frontend/lib.js +0 -1
  17. package/dist/frontend/lib.js.map +1 -1
  18. package/dist/images/flags/1x1/cn.svg +11 -0
  19. package/dist/images/flags/1x1/cu.svg +13 -0
  20. package/dist/images/flags/1x1/cv.svg +13 -0
  21. package/dist/images/flags/1x1/cw.svg +14 -0
  22. package/dist/images/flags/1x1/de.svg +5 -0
  23. package/dist/images/flags/1x1/dk.svg +5 -0
  24. package/dist/images/flags/1x1/do.svg +122 -0
  25. package/dist/images/flags/1x1/ee.svg +5 -0
  26. package/dist/images/flags/1x1/eh.svg +11 -0
  27. package/dist/images/flags/1x1/er.svg +13 -0
  28. package/dist/images/flags/1x1/eu.svg +28 -0
  29. package/dist/images/flags/1x1/fi.svg +5 -0
  30. package/dist/images/flags/1x1/fj.svg +123 -0
  31. package/dist/images/flags/1x1/fr.svg +5 -0
  32. package/dist/images/flags/1x1/gb.svg +7 -0
  33. package/dist/images/flags/1x1/gf.svg +5 -0
  34. package/dist/images/flags/1x1/gh.svg +6 -0
  35. package/dist/images/flags/1x1/gn.svg +7 -0
  36. package/dist/images/flags/1x1/gp.svg +5 -0
  37. package/dist/images/flags/1x1/gq.svg +23 -0
  38. package/dist/images/flags/1x1/gr.svg +16 -0
  39. package/dist/images/flags/1x1/gs.svg +132 -0
  40. package/dist/images/flags/1x1/gt.svg +204 -0
  41. package/dist/images/flags/1x1/gu.svg +19 -0
  42. package/dist/images/flags/1x1/gw.svg +15 -0
  43. package/dist/images/flags/1x1/gy.svg +9 -0
  44. package/dist/images/flags/1x1/hm.svg +8 -0
  45. package/dist/images/flags/1x1/hn.svg +18 -0
  46. package/dist/images/flags/1x1/ht.svg +116 -0
  47. package/dist/images/flags/1x1/hu.svg +7 -0
  48. package/dist/images/flags/1x1/id.svg +4 -0
  49. package/dist/images/flags/1x1/im.svg +36 -0
  50. package/dist/images/flags/1x1/in.svg +25 -0
  51. package/dist/images/flags/1x1/iq.svg +10 -0
  52. package/dist/images/flags/1x1/ir.svg +219 -0
  53. package/dist/images/flags/1x1/is.svg +12 -0
  54. package/dist/images/flags/1x1/it.svg +7 -0
  55. package/dist/images/flags/1x1/jm.svg +8 -0
  56. package/dist/images/flags/1x1/kh.svg +61 -0
  57. package/dist/images/flags/1x1/km.svg +16 -0
  58. package/dist/images/flags/1x1/kw.svg +13 -0
  59. package/dist/images/flags/1x1/lb.svg +15 -0
  60. package/dist/images/flags/1x1/ls.svg +8 -0
  61. package/dist/images/flags/1x1/ma.svg +4 -0
  62. package/dist/images/flags/1x1/mc.svg +6 -0
  63. package/dist/images/flags/1x1/mg.svg +7 -0
  64. package/dist/images/flags/1x1/mm.svg +10 -0
  65. package/dist/images/flags/1x1/mo.svg +9 -0
  66. package/dist/images/flags/1x1/mp.svg +86 -0
  67. package/dist/images/flags/1x1/ms.svg +25 -0
  68. package/dist/images/flags/1x1/mw.svg +15 -0
  69. package/dist/images/flags/1x1/mx.svg +377 -0
  70. package/dist/images/flags/1x1/ni.svg +129 -0
  71. package/dist/images/flags/1x1/nu.svg +10 -0
  72. package/dist/images/flags/1x1/om.svg +115 -0
  73. package/dist/images/flags/1x1/pa.svg +13 -0
  74. package/dist/images/flags/1x1/pc.svg +33 -0
  75. package/dist/images/flags/1x1/pf.svg +18 -0
  76. package/dist/images/flags/1x1/pk.svg +15 -0
  77. package/dist/images/flags/1x1/pl.svg +6 -0
  78. package/dist/images/flags/1x1/pr.svg +13 -0
  79. package/dist/images/flags/1x1/pt.svg +57 -0
  80. package/dist/images/flags/1x1/pw.svg +11 -0
  81. package/dist/images/flags/1x1/ru.svg +5 -0
  82. package/dist/images/flags/1x1/sb.svg +13 -0
  83. package/dist/images/flags/1x1/sh.svg +7 -0
  84. package/dist/images/flags/1x1/sj.svg +7 -0
  85. package/dist/images/flags/1x1/sk.svg +9 -0
  86. package/dist/images/flags/1x1/sn.svg +8 -0
  87. package/dist/images/flags/1x1/ss.svg +8 -0
  88. package/dist/images/flags/1x1/sx.svg +56 -0
  89. package/dist/images/flags/1x1/sz.svg +34 -0
  90. package/dist/images/flags/1x1/tc.svg +50 -0
  91. package/dist/images/flags/1x1/tf.svg +15 -0
  92. package/dist/images/flags/1x1/tj.svg +26 -0
  93. package/dist/images/flags/1x1/tk.svg +5 -0
  94. package/dist/images/flags/1x1/tl.svg +13 -0
  95. package/dist/images/flags/1x1/tm.svg +205 -0
  96. package/dist/images/flags/1x1/to.svg +10 -0
  97. package/dist/images/flags/1x1/tt.svg +7 -0
  98. package/dist/images/flags/1x1/tw.svg +32 -0
  99. package/dist/images/flags/1x1/ug.svg +30 -0
  100. package/dist/images/flags/1x1/us.svg +9 -0
  101. package/dist/images/flags/1x1/uy.svg +28 -0
  102. package/dist/images/flags/1x1/uz.svg +30 -0
  103. package/dist/images/flags/1x1/vi.svg +28 -0
  104. package/dist/images/flags/1x1/vn.svg +11 -0
  105. package/dist/images/flags/1x1/vu.svg +21 -0
  106. package/dist/images/flags/1x1/xk.svg +5 -0
  107. package/dist/images/flags/1x1/zw.svg +21 -0
  108. package/dist/images/flags/4x3/ad.svg +150 -0
  109. package/dist/images/flags/4x3/ae.svg +6 -0
  110. package/dist/images/flags/4x3/af.svg +81 -0
  111. package/dist/images/flags/4x3/ag.svg +14 -0
  112. package/dist/images/flags/4x3/ai.svg +29 -0
  113. package/dist/images/flags/4x3/al.svg +5 -0
  114. package/dist/images/flags/4x3/am.svg +5 -0
  115. package/dist/images/flags/4x3/ao.svg +13 -0
  116. package/dist/images/flags/4x3/aq.svg +5 -0
  117. package/dist/images/flags/4x3/ar.svg +32 -0
  118. package/dist/images/flags/4x3/arab.svg +109 -0
  119. package/dist/images/flags/4x3/as.svg +72 -0
  120. package/dist/images/flags/4x3/asean.svg +13 -0
  121. package/dist/images/flags/4x3/at.svg +4 -0
  122. package/dist/images/flags/4x3/au.svg +8 -0
  123. package/dist/images/flags/4x3/aw.svg +186 -0
  124. package/dist/images/flags/4x3/ax.svg +18 -0
  125. package/dist/images/flags/4x3/az.svg +8 -0
  126. package/dist/images/flags/4x3/ba.svg +12 -0
  127. package/dist/images/flags/4x3/bb.svg +6 -0
  128. package/dist/images/flags/4x3/bd.svg +4 -0
  129. package/dist/images/flags/4x3/be.svg +7 -0
  130. package/dist/images/flags/4x3/bf.svg +7 -0
  131. package/dist/images/flags/4x3/bg.svg +5 -0
  132. package/dist/images/flags/4x3/bh.svg +4 -0
  133. package/dist/images/flags/4x3/bi.svg +15 -0
  134. package/dist/images/flags/4x3/bj.svg +14 -0
  135. package/dist/images/flags/4x3/bl.svg +5 -0
  136. package/dist/images/flags/4x3/bm.svg +97 -0
  137. package/dist/images/flags/4x3/bn.svg +36 -0
  138. package/dist/images/flags/4x3/bo.svg +673 -0
  139. package/dist/images/flags/4x3/bq.svg +5 -0
  140. package/dist/images/flags/4x3/br.svg +45 -0
  141. package/dist/images/flags/4x3/bs.svg +13 -0
  142. package/dist/images/flags/4x3/bt.svg +89 -0
  143. package/dist/images/flags/4x3/bv.svg +13 -0
  144. package/dist/images/flags/4x3/bw.svg +7 -0
  145. package/dist/images/flags/4x3/by.svg +18 -0
  146. package/dist/images/flags/4x3/bz.svg +145 -0
  147. package/dist/images/flags/4x3/ca.svg +4 -0
  148. package/dist/images/flags/4x3/cc.svg +19 -0
  149. package/dist/images/flags/4x3/cd.svg +5 -0
  150. package/dist/images/flags/4x3/cefta.svg +13 -0
  151. package/dist/images/flags/4x3/cf.svg +15 -0
  152. package/dist/images/flags/4x3/cg.svg +12 -0
  153. package/dist/images/flags/4x3/ch.svg +9 -0
  154. package/dist/images/flags/4x3/ci.svg +7 -0
  155. package/dist/images/flags/4x3/ck.svg +9 -0
  156. package/dist/images/flags/4x3/cl.svg +13 -0
  157. package/dist/images/flags/4x3/cm.svg +15 -0
  158. package/dist/images/flags/4x3/co.svg +7 -0
  159. package/dist/images/flags/4x3/cp.svg +7 -0
  160. package/dist/images/flags/4x3/cr.svg +7 -0
  161. package/dist/images/flags/4x3/cx.svg +15 -0
  162. package/dist/images/flags/4x3/cy.svg +6 -0
  163. package/dist/images/flags/4x3/cz.svg +5 -0
  164. package/dist/images/flags/4x3/dg.svg +130 -0
  165. package/dist/images/flags/4x3/dj.svg +13 -0
  166. package/dist/images/flags/4x3/dm.svg +152 -0
  167. package/dist/images/flags/4x3/dz.svg +5 -0
  168. package/dist/images/flags/4x3/eac.svg +48 -0
  169. package/dist/images/flags/4x3/ec.svg +138 -0
  170. package/dist/images/flags/4x3/eg.svg +38 -0
  171. package/dist/images/flags/4x3/es-ct.svg +4 -0
  172. package/dist/images/flags/4x3/es-ga.svg +187 -0
  173. package/dist/images/flags/4x3/es-pv.svg +5 -0
  174. package/dist/images/flags/4x3/es.svg +544 -0
  175. package/dist/images/flags/4x3/et.svg +14 -0
  176. package/dist/images/flags/4x3/fk.svg +90 -0
  177. package/dist/images/flags/4x3/fm.svg +11 -0
  178. package/dist/images/flags/4x3/fo.svg +12 -0
  179. package/dist/images/flags/4x3/ga.svg +7 -0
  180. package/dist/images/flags/4x3/gb-eng.svg +5 -0
  181. package/dist/images/flags/4x3/gb-nir.svg +132 -0
  182. package/dist/images/flags/4x3/gb-sct.svg +4 -0
  183. package/dist/images/flags/4x3/gb-wls.svg +9 -0
  184. package/dist/images/flags/4x3/gd.svg +27 -0
  185. package/dist/images/flags/4x3/ge.svg +6 -0
  186. package/dist/images/flags/4x3/gg.svg +9 -0
  187. package/dist/images/flags/4x3/gi.svg +32 -0
  188. package/dist/images/flags/4x3/gl.svg +4 -0
  189. package/dist/images/flags/4x3/gm.svg +14 -0
  190. package/dist/images/flags/4x3/hk.svg +8 -0
  191. package/dist/images/flags/4x3/hr.svg +58 -0
  192. package/dist/images/flags/4x3/ic.svg +7 -0
  193. package/dist/images/flags/4x3/ie.svg +7 -0
  194. package/dist/images/flags/4x3/il.svg +14 -0
  195. package/dist/images/flags/4x3/io.svg +130 -0
  196. package/dist/images/flags/4x3/je.svg +62 -0
  197. package/dist/images/flags/4x3/jo.svg +16 -0
  198. package/dist/images/flags/4x3/jp.svg +11 -0
  199. package/dist/images/flags/4x3/ke.svg +23 -0
  200. package/dist/images/flags/4x3/kg.svg +4 -0
  201. package/dist/images/flags/4x3/ki.svg +36 -0
  202. package/dist/images/flags/4x3/kn.svg +14 -0
  203. package/dist/images/flags/4x3/kp.svg +15 -0
  204. package/dist/images/flags/4x3/kr.svg +24 -0
  205. package/dist/images/flags/4x3/ky.svg +103 -0
  206. package/dist/images/flags/4x3/kz.svg +36 -0
  207. package/dist/images/flags/4x3/la.svg +12 -0
  208. package/dist/images/flags/4x3/lc.svg +8 -0
  209. package/dist/images/flags/4x3/li.svg +43 -0
  210. package/dist/images/flags/4x3/lk.svg +22 -0
  211. package/dist/images/flags/4x3/lr.svg +14 -0
  212. package/dist/images/flags/4x3/lt.svg +7 -0
  213. package/dist/images/flags/4x3/lu.svg +5 -0
  214. package/dist/images/flags/4x3/lv.svg +6 -0
  215. package/dist/images/flags/4x3/ly.svg +13 -0
  216. package/dist/images/flags/4x3/md.svg +70 -0
  217. package/dist/images/flags/4x3/me.svg +116 -0
  218. package/dist/images/flags/4x3/mf.svg +5 -0
  219. package/dist/images/flags/4x3/mh.svg +7 -0
  220. package/dist/images/flags/4x3/mk.svg +5 -0
  221. package/dist/images/flags/4x3/ml.svg +7 -0
  222. package/dist/images/flags/4x3/mn.svg +14 -0
  223. package/dist/images/flags/4x3/mq.svg +5 -0
  224. package/dist/images/flags/4x3/mr.svg +6 -0
  225. package/dist/images/flags/4x3/mt.svg +58 -0
  226. package/dist/images/flags/4x3/mu.svg +8 -0
  227. package/dist/images/flags/4x3/mv.svg +6 -0
  228. package/dist/images/flags/4x3/my.svg +26 -0
  229. package/dist/images/flags/4x3/mz.svg +21 -0
  230. package/dist/images/flags/4x3/na.svg +16 -0
  231. package/dist/images/flags/4x3/nc.svg +13 -0
  232. package/dist/images/flags/4x3/ne.svg +6 -0
  233. package/dist/images/flags/4x3/nf.svg +9 -0
  234. package/dist/images/flags/4x3/ng.svg +6 -0
  235. package/dist/images/flags/4x3/nl.svg +5 -0
  236. package/dist/images/flags/4x3/no.svg +7 -0
  237. package/dist/images/flags/4x3/np.svg +13 -0
  238. package/dist/images/flags/4x3/nr.svg +12 -0
  239. package/dist/images/flags/4x3/nz.svg +36 -0
  240. package/dist/images/flags/4x3/pe.svg +4 -0
  241. package/dist/images/flags/4x3/pg.svg +9 -0
  242. package/dist/images/flags/4x3/ph.svg +6 -0
  243. package/dist/images/flags/4x3/pm.svg +5 -0
  244. package/dist/images/flags/4x3/pn.svg +53 -0
  245. package/dist/images/flags/4x3/ps.svg +6 -0
  246. package/dist/images/flags/4x3/py.svg +157 -0
  247. package/dist/images/flags/4x3/qa.svg +4 -0
  248. package/dist/images/flags/4x3/re.svg +5 -0
  249. package/dist/images/flags/4x3/ro.svg +7 -0
  250. package/dist/images/flags/4x3/rs.svg +292 -0
  251. package/dist/images/flags/4x3/rw.svg +13 -0
  252. package/dist/images/flags/4x3/sa.svg +25 -0
  253. package/dist/images/flags/4x3/sc.svg +7 -0
  254. package/dist/images/flags/4x3/sd.svg +13 -0
  255. package/dist/images/flags/4x3/se.svg +4 -0
  256. package/dist/images/flags/4x3/sg.svg +13 -0
  257. package/dist/images/flags/4x3/sh-ac.svg +689 -0
  258. package/dist/images/flags/4x3/sh-hl.svg +164 -0
  259. package/dist/images/flags/4x3/sh-ta.svg +76 -0
  260. package/dist/images/flags/4x3/si.svg +18 -0
  261. package/dist/images/flags/4x3/sl.svg +7 -0
  262. package/dist/images/flags/4x3/sm.svg +75 -0
  263. package/dist/images/flags/4x3/so.svg +11 -0
  264. package/dist/images/flags/4x3/sr.svg +6 -0
  265. package/dist/images/flags/4x3/st.svg +16 -0
  266. package/dist/images/flags/4x3/sv.svg +593 -0
  267. package/dist/images/flags/4x3/sy.svg +6 -0
  268. package/dist/images/flags/4x3/td.svg +7 -0
  269. package/dist/images/flags/4x3/tg.svg +14 -0
  270. package/dist/images/flags/4x3/th.svg +7 -0
  271. package/dist/images/flags/4x3/tn.svg +4 -0
  272. package/dist/images/flags/4x3/tr.svg +8 -0
  273. package/dist/images/flags/4x3/tv.svg +9 -0
  274. package/dist/images/flags/4x3/tz.svg +13 -0
  275. package/dist/images/flags/4x3/ua.svg +6 -0
  276. package/dist/images/flags/4x3/um.svg +9 -0
  277. package/dist/images/flags/4x3/un.svg +16 -0
  278. package/dist/images/flags/4x3/va.svg +190 -0
  279. package/dist/images/flags/4x3/vc.svg +8 -0
  280. package/dist/images/flags/4x3/ve.svg +26 -0
  281. package/dist/images/flags/4x3/vg.svg +59 -0
  282. package/dist/images/flags/4x3/wf.svg +5 -0
  283. package/dist/images/flags/4x3/ws.svg +7 -0
  284. package/dist/images/flags/4x3/xx.svg +4 -0
  285. package/dist/images/flags/4x3/ye.svg +7 -0
  286. package/dist/images/flags/4x3/yt.svg +5 -0
  287. package/dist/images/flags/4x3/za.svg +17 -0
  288. package/dist/images/flags/4x3/zm.svg +27 -0
  289. package/dist/lib/autonumeric/autonumeric.js +0 -1
  290. package/dist/lib/autonumeric/autonumeric.js.map +1 -1
  291. package/dist/lib/bootstrap/bootstrap-datepicker.js +0 -1
  292. package/dist/lib/bootstrap/bootstrap-datepicker.js.map +1 -1
  293. package/dist/lib/bootstrap/bootstrap-icons.css +1 -1
  294. package/dist/lib/bootstrap/bootstrap-icons.css.map +1 -1
  295. package/dist/lib/bootstrap/bootstrap-icons.js +0 -1
  296. package/dist/lib/bootstrap/bootstrap.js +0 -1
  297. package/dist/lib/bootstrap/bootstrap.js.map +1 -1
  298. package/dist/lib/chartjs/chart.js.LICENSE.txt +1 -1281
  299. package/dist/lib/colorjs/color.js +0 -1
  300. package/dist/lib/colorjs/color.js.map +1 -1
  301. package/dist/lib/datatables/datatables.js.LICENSE.txt +0 -9853
  302. package/dist/lib/dompurify/dompurify.js.LICENSE.txt +0 -908
  303. package/dist/lib/editorjs/editor.js.LICENSE.txt +41 -5629
  304. package/dist/lib/fancyapps/fancyapps.js +0 -1
  305. package/dist/lib/fancyapps/fancyapps.js.map +1 -1
  306. package/dist/lib/filepond/filepond.js.LICENSE.txt +0 -2728
  307. package/dist/lib/fullcalendar/fullcalendar.js +1 -1
  308. package/dist/lib/fullcalendar/fullcalendar.js.LICENSE.txt +0 -3686
  309. package/dist/lib/fullcalendar/fullcalendar.js.map +1 -1
  310. package/dist/lib/image-compare-viewer.js +0 -1
  311. package/dist/lib/jquery/jquery-plugin.js +1 -2
  312. package/dist/lib/jquery/jquery-plugin.js.map +1 -1
  313. package/dist/lib/jquery/jquery.js.LICENSE.txt +0 -3232
  314. package/dist/lib/jstree/jstree.js +0 -1
  315. package/dist/lib/jstree/jstree.js.map +1 -1
  316. package/dist/lib/jszip/jszip.js.LICENSE.txt +0 -42
  317. package/dist/lib/lipis/flag-icons.css +1 -1
  318. package/dist/lib/lipis/flag-icons.css.map +1 -1
  319. package/dist/lib/lipis/flag-icons.js +0 -1
  320. package/dist/lib/moment/moment.js.LICENSE.txt +0 -619
  321. package/dist/lib/quilljs/quill.js +0 -1
  322. package/dist/lib/quilljs/quill.js.map +1 -1
  323. package/dist/lib/rellax/rellax.js +0 -1
  324. package/dist/lib/rellax/rellax.js.map +1 -1
  325. package/dist/lib/select2/select2.js +1 -2
  326. package/dist/lib/select2/select2.js.map +1 -1
  327. package/dist/lib/swiperjs/swiper-plugin.js +0 -1
  328. package/dist/lib/swiperjs/swiper-plugin.js.map +1 -1
  329. package/dist/lib/swiperjs/swiper.js +0 -1
  330. package/dist/lib/swiperjs/swiper.js.map +1 -1
  331. package/dist/lib/videojs/video.js.LICENSE.txt +6 -27809
  332. package/dist/lib/vivus/vivus.js.LICENSE.txt +0 -518
  333. package/index.js +2 -1
  334. package/package.json +23 -21
  335. package/src/class/DeferredContent.js +110 -0
  336. package/dist/backend/body-end.js.LICENSE.txt +0 -44
  337. package/dist/backend/lib.js.LICENSE.txt +0 -1
  338. package/dist/frontend/body-end.js.LICENSE.txt +0 -44
  339. package/dist/frontend/head.js.LICENSE.txt +0 -98
  340. package/dist/frontend/lib.js.LICENSE.txt +0 -239
  341. package/dist/lib/autonumeric/autonumeric.js.LICENSE.txt +0 -49
  342. package/dist/lib/bootstrap/bootstrap-datepicker.js.LICENSE.txt +0 -44
  343. package/dist/lib/bootstrap/bootstrap-icons.js.LICENSE.txt +0 -1
  344. package/dist/lib/bootstrap/bootstrap.js.LICENSE.txt +0 -44
  345. package/dist/lib/colorjs/color.js.LICENSE.txt +0 -7
  346. package/dist/lib/fancyapps/fancyapps.js.LICENSE.txt +0 -9
  347. package/dist/lib/image-compare-viewer.js.LICENSE.txt +0 -3
  348. package/dist/lib/jquery/jquery-plugin.js.LICENSE.txt +0 -1200
  349. package/dist/lib/jstree/jstree.js.LICENSE.txt +0 -44
  350. package/dist/lib/lipis/flag-icons.js.LICENSE.txt +0 -1
  351. package/dist/lib/pdfmake/pdfmake.js +0 -3
  352. package/dist/lib/pdfmake/pdfmake.js.LICENSE.txt +0 -13375
  353. package/dist/lib/pdfmake/pdfmake.js.map +0 -1
  354. package/dist/lib/quilljs/quill.js.LICENSE.txt +0 -3068
  355. package/dist/lib/rellax/rellax.js.LICENSE.txt +0 -143
  356. package/dist/lib/select2/select2.js.LICENSE.txt +0 -3761
  357. package/dist/lib/swiperjs/swiper-plugin.js.LICENSE.txt +0 -1174
  358. package/dist/lib/swiperjs/swiper.js.LICENSE.txt +0 -673
  359. /package/dist/images/{ad.svg → flags/1x1/ad.svg} +0 -0
  360. /package/dist/images/{ae.svg → flags/1x1/ae.svg} +0 -0
  361. /package/dist/images/{af.svg → flags/1x1/af.svg} +0 -0
  362. /package/dist/images/{ag.svg → flags/1x1/ag.svg} +0 -0
  363. /package/dist/images/{ai.svg → flags/1x1/ai.svg} +0 -0
  364. /package/dist/images/{al.svg → flags/1x1/al.svg} +0 -0
  365. /package/dist/images/{am.svg → flags/1x1/am.svg} +0 -0
  366. /package/dist/images/{ao.svg → flags/1x1/ao.svg} +0 -0
  367. /package/dist/images/{aq.svg → flags/1x1/aq.svg} +0 -0
  368. /package/dist/images/{ar.svg → flags/1x1/ar.svg} +0 -0
  369. /package/dist/images/{arab.svg → flags/1x1/arab.svg} +0 -0
  370. /package/dist/images/{as.svg → flags/1x1/as.svg} +0 -0
  371. /package/dist/images/{asean.svg → flags/1x1/asean.svg} +0 -0
  372. /package/dist/images/{at.svg → flags/1x1/at.svg} +0 -0
  373. /package/dist/images/{au.svg → flags/1x1/au.svg} +0 -0
  374. /package/dist/images/{aw.svg → flags/1x1/aw.svg} +0 -0
  375. /package/dist/images/{ax.svg → flags/1x1/ax.svg} +0 -0
  376. /package/dist/images/{az.svg → flags/1x1/az.svg} +0 -0
  377. /package/dist/images/{ba.svg → flags/1x1/ba.svg} +0 -0
  378. /package/dist/images/{bb.svg → flags/1x1/bb.svg} +0 -0
  379. /package/dist/images/{bd.svg → flags/1x1/bd.svg} +0 -0
  380. /package/dist/images/{be.svg → flags/1x1/be.svg} +0 -0
  381. /package/dist/images/{bf.svg → flags/1x1/bf.svg} +0 -0
  382. /package/dist/images/{bg.svg → flags/1x1/bg.svg} +0 -0
  383. /package/dist/images/{bh.svg → flags/1x1/bh.svg} +0 -0
  384. /package/dist/images/{bi.svg → flags/1x1/bi.svg} +0 -0
  385. /package/dist/images/{bj.svg → flags/1x1/bj.svg} +0 -0
  386. /package/dist/images/{bl.svg → flags/1x1/bl.svg} +0 -0
  387. /package/dist/images/{bm.svg → flags/1x1/bm.svg} +0 -0
  388. /package/dist/images/{bn.svg → flags/1x1/bn.svg} +0 -0
  389. /package/dist/images/{bo.svg → flags/1x1/bo.svg} +0 -0
  390. /package/dist/images/{bq.svg → flags/1x1/bq.svg} +0 -0
  391. /package/dist/images/{br.svg → flags/1x1/br.svg} +0 -0
  392. /package/dist/images/{bs.svg → flags/1x1/bs.svg} +0 -0
  393. /package/dist/images/{bt.svg → flags/1x1/bt.svg} +0 -0
  394. /package/dist/images/{bv.svg → flags/1x1/bv.svg} +0 -0
  395. /package/dist/images/{bw.svg → flags/1x1/bw.svg} +0 -0
  396. /package/dist/images/{by.svg → flags/1x1/by.svg} +0 -0
  397. /package/dist/images/{bz.svg → flags/1x1/bz.svg} +0 -0
  398. /package/dist/images/{ca.svg → flags/1x1/ca.svg} +0 -0
  399. /package/dist/images/{cc.svg → flags/1x1/cc.svg} +0 -0
  400. /package/dist/images/{cd.svg → flags/1x1/cd.svg} +0 -0
  401. /package/dist/images/{cefta.svg → flags/1x1/cefta.svg} +0 -0
  402. /package/dist/images/{cf.svg → flags/1x1/cf.svg} +0 -0
  403. /package/dist/images/{cg.svg → flags/1x1/cg.svg} +0 -0
  404. /package/dist/images/{ch.svg → flags/1x1/ch.svg} +0 -0
  405. /package/dist/images/{ci.svg → flags/1x1/ci.svg} +0 -0
  406. /package/dist/images/{ck.svg → flags/1x1/ck.svg} +0 -0
  407. /package/dist/images/{cl.svg → flags/1x1/cl.svg} +0 -0
  408. /package/dist/images/{cm.svg → flags/1x1/cm.svg} +0 -0
  409. /package/dist/images/{co.svg → flags/1x1/co.svg} +0 -0
  410. /package/dist/images/{cp.svg → flags/1x1/cp.svg} +0 -0
  411. /package/dist/images/{cr.svg → flags/1x1/cr.svg} +0 -0
  412. /package/dist/images/{cx.svg → flags/1x1/cx.svg} +0 -0
  413. /package/dist/images/{cy.svg → flags/1x1/cy.svg} +0 -0
  414. /package/dist/images/{cz.svg → flags/1x1/cz.svg} +0 -0
  415. /package/dist/images/{dg.svg → flags/1x1/dg.svg} +0 -0
  416. /package/dist/images/{dj.svg → flags/1x1/dj.svg} +0 -0
  417. /package/dist/images/{dm.svg → flags/1x1/dm.svg} +0 -0
  418. /package/dist/images/{dz.svg → flags/1x1/dz.svg} +0 -0
  419. /package/dist/images/{eac.svg → flags/1x1/eac.svg} +0 -0
  420. /package/dist/images/{ec.svg → flags/1x1/ec.svg} +0 -0
  421. /package/dist/images/{eg.svg → flags/1x1/eg.svg} +0 -0
  422. /package/dist/images/{es-ct.svg → flags/1x1/es-ct.svg} +0 -0
  423. /package/dist/images/{es-ga.svg → flags/1x1/es-ga.svg} +0 -0
  424. /package/dist/images/{es-pv.svg → flags/1x1/es-pv.svg} +0 -0
  425. /package/dist/images/{es.svg → flags/1x1/es.svg} +0 -0
  426. /package/dist/images/{et.svg → flags/1x1/et.svg} +0 -0
  427. /package/dist/images/{fk.svg → flags/1x1/fk.svg} +0 -0
  428. /package/dist/images/{fm.svg → flags/1x1/fm.svg} +0 -0
  429. /package/dist/images/{fo.svg → flags/1x1/fo.svg} +0 -0
  430. /package/dist/images/{ga.svg → flags/1x1/ga.svg} +0 -0
  431. /package/dist/images/{gb-eng.svg → flags/1x1/gb-eng.svg} +0 -0
  432. /package/dist/images/{gb-nir.svg → flags/1x1/gb-nir.svg} +0 -0
  433. /package/dist/images/{gb-sct.svg → flags/1x1/gb-sct.svg} +0 -0
  434. /package/dist/images/{gb-wls.svg → flags/1x1/gb-wls.svg} +0 -0
  435. /package/dist/images/{gd.svg → flags/1x1/gd.svg} +0 -0
  436. /package/dist/images/{ge.svg → flags/1x1/ge.svg} +0 -0
  437. /package/dist/images/{gg.svg → flags/1x1/gg.svg} +0 -0
  438. /package/dist/images/{gi.svg → flags/1x1/gi.svg} +0 -0
  439. /package/dist/images/{gl.svg → flags/1x1/gl.svg} +0 -0
  440. /package/dist/images/{gm.svg → flags/1x1/gm.svg} +0 -0
  441. /package/dist/images/{hk.svg → flags/1x1/hk.svg} +0 -0
  442. /package/dist/images/{hr.svg → flags/1x1/hr.svg} +0 -0
  443. /package/dist/images/{ic.svg → flags/1x1/ic.svg} +0 -0
  444. /package/dist/images/{ie.svg → flags/1x1/ie.svg} +0 -0
  445. /package/dist/images/{il.svg → flags/1x1/il.svg} +0 -0
  446. /package/dist/images/{io.svg → flags/1x1/io.svg} +0 -0
  447. /package/dist/images/{je.svg → flags/1x1/je.svg} +0 -0
  448. /package/dist/images/{jo.svg → flags/1x1/jo.svg} +0 -0
  449. /package/dist/images/{jp.svg → flags/1x1/jp.svg} +0 -0
  450. /package/dist/images/{ke.svg → flags/1x1/ke.svg} +0 -0
  451. /package/dist/images/{kg.svg → flags/1x1/kg.svg} +0 -0
  452. /package/dist/images/{ki.svg → flags/1x1/ki.svg} +0 -0
  453. /package/dist/images/{kn.svg → flags/1x1/kn.svg} +0 -0
  454. /package/dist/images/{kp.svg → flags/1x1/kp.svg} +0 -0
  455. /package/dist/images/{kr.svg → flags/1x1/kr.svg} +0 -0
  456. /package/dist/images/{ky.svg → flags/1x1/ky.svg} +0 -0
  457. /package/dist/images/{kz.svg → flags/1x1/kz.svg} +0 -0
  458. /package/dist/images/{la.svg → flags/1x1/la.svg} +0 -0
  459. /package/dist/images/{lc.svg → flags/1x1/lc.svg} +0 -0
  460. /package/dist/images/{li.svg → flags/1x1/li.svg} +0 -0
  461. /package/dist/images/{lk.svg → flags/1x1/lk.svg} +0 -0
  462. /package/dist/images/{lr.svg → flags/1x1/lr.svg} +0 -0
  463. /package/dist/images/{lt.svg → flags/1x1/lt.svg} +0 -0
  464. /package/dist/images/{lu.svg → flags/1x1/lu.svg} +0 -0
  465. /package/dist/images/{lv.svg → flags/1x1/lv.svg} +0 -0
  466. /package/dist/images/{ly.svg → flags/1x1/ly.svg} +0 -0
  467. /package/dist/images/{md.svg → flags/1x1/md.svg} +0 -0
  468. /package/dist/images/{me.svg → flags/1x1/me.svg} +0 -0
  469. /package/dist/images/{mf.svg → flags/1x1/mf.svg} +0 -0
  470. /package/dist/images/{mh.svg → flags/1x1/mh.svg} +0 -0
  471. /package/dist/images/{mk.svg → flags/1x1/mk.svg} +0 -0
  472. /package/dist/images/{ml.svg → flags/1x1/ml.svg} +0 -0
  473. /package/dist/images/{mn.svg → flags/1x1/mn.svg} +0 -0
  474. /package/dist/images/{mq.svg → flags/1x1/mq.svg} +0 -0
  475. /package/dist/images/{mr.svg → flags/1x1/mr.svg} +0 -0
  476. /package/dist/images/{mt.svg → flags/1x1/mt.svg} +0 -0
  477. /package/dist/images/{mu.svg → flags/1x1/mu.svg} +0 -0
  478. /package/dist/images/{mv.svg → flags/1x1/mv.svg} +0 -0
  479. /package/dist/images/{my.svg → flags/1x1/my.svg} +0 -0
  480. /package/dist/images/{mz.svg → flags/1x1/mz.svg} +0 -0
  481. /package/dist/images/{na.svg → flags/1x1/na.svg} +0 -0
  482. /package/dist/images/{nc.svg → flags/1x1/nc.svg} +0 -0
  483. /package/dist/images/{ne.svg → flags/1x1/ne.svg} +0 -0
  484. /package/dist/images/{nf.svg → flags/1x1/nf.svg} +0 -0
  485. /package/dist/images/{ng.svg → flags/1x1/ng.svg} +0 -0
  486. /package/dist/images/{nl.svg → flags/1x1/nl.svg} +0 -0
  487. /package/dist/images/{no.svg → flags/1x1/no.svg} +0 -0
  488. /package/dist/images/{np.svg → flags/1x1/np.svg} +0 -0
  489. /package/dist/images/{nr.svg → flags/1x1/nr.svg} +0 -0
  490. /package/dist/images/{nz.svg → flags/1x1/nz.svg} +0 -0
  491. /package/dist/images/{pe.svg → flags/1x1/pe.svg} +0 -0
  492. /package/dist/images/{pg.svg → flags/1x1/pg.svg} +0 -0
  493. /package/dist/images/{ph.svg → flags/1x1/ph.svg} +0 -0
  494. /package/dist/images/{pm.svg → flags/1x1/pm.svg} +0 -0
  495. /package/dist/images/{pn.svg → flags/1x1/pn.svg} +0 -0
  496. /package/dist/images/{ps.svg → flags/1x1/ps.svg} +0 -0
  497. /package/dist/images/{py.svg → flags/1x1/py.svg} +0 -0
  498. /package/dist/images/{qa.svg → flags/1x1/qa.svg} +0 -0
  499. /package/dist/images/{re.svg → flags/1x1/re.svg} +0 -0
  500. /package/dist/images/{ro.svg → flags/1x1/ro.svg} +0 -0
  501. /package/dist/images/{rs.svg → flags/1x1/rs.svg} +0 -0
  502. /package/dist/images/{rw.svg → flags/1x1/rw.svg} +0 -0
  503. /package/dist/images/{sa.svg → flags/1x1/sa.svg} +0 -0
  504. /package/dist/images/{sc.svg → flags/1x1/sc.svg} +0 -0
  505. /package/dist/images/{sd.svg → flags/1x1/sd.svg} +0 -0
  506. /package/dist/images/{se.svg → flags/1x1/se.svg} +0 -0
  507. /package/dist/images/{sg.svg → flags/1x1/sg.svg} +0 -0
  508. /package/dist/images/{sh-ac.svg → flags/1x1/sh-ac.svg} +0 -0
  509. /package/dist/images/{sh-hl.svg → flags/1x1/sh-hl.svg} +0 -0
  510. /package/dist/images/{sh-ta.svg → flags/1x1/sh-ta.svg} +0 -0
  511. /package/dist/images/{si.svg → flags/1x1/si.svg} +0 -0
  512. /package/dist/images/{sl.svg → flags/1x1/sl.svg} +0 -0
  513. /package/dist/images/{sm.svg → flags/1x1/sm.svg} +0 -0
  514. /package/dist/images/{so.svg → flags/1x1/so.svg} +0 -0
  515. /package/dist/images/{sr.svg → flags/1x1/sr.svg} +0 -0
  516. /package/dist/images/{st.svg → flags/1x1/st.svg} +0 -0
  517. /package/dist/images/{sv.svg → flags/1x1/sv.svg} +0 -0
  518. /package/dist/images/{sy.svg → flags/1x1/sy.svg} +0 -0
  519. /package/dist/images/{td.svg → flags/1x1/td.svg} +0 -0
  520. /package/dist/images/{tg.svg → flags/1x1/tg.svg} +0 -0
  521. /package/dist/images/{th.svg → flags/1x1/th.svg} +0 -0
  522. /package/dist/images/{tn.svg → flags/1x1/tn.svg} +0 -0
  523. /package/dist/images/{tr.svg → flags/1x1/tr.svg} +0 -0
  524. /package/dist/images/{tv.svg → flags/1x1/tv.svg} +0 -0
  525. /package/dist/images/{tz.svg → flags/1x1/tz.svg} +0 -0
  526. /package/dist/images/{ua.svg → flags/1x1/ua.svg} +0 -0
  527. /package/dist/images/{um.svg → flags/1x1/um.svg} +0 -0
  528. /package/dist/images/{un.svg → flags/1x1/un.svg} +0 -0
  529. /package/dist/images/{va.svg → flags/1x1/va.svg} +0 -0
  530. /package/dist/images/{vc.svg → flags/1x1/vc.svg} +0 -0
  531. /package/dist/images/{ve.svg → flags/1x1/ve.svg} +0 -0
  532. /package/dist/images/{vg.svg → flags/1x1/vg.svg} +0 -0
  533. /package/dist/images/{wf.svg → flags/1x1/wf.svg} +0 -0
  534. /package/dist/images/{ws.svg → flags/1x1/ws.svg} +0 -0
  535. /package/dist/images/{xx.svg → flags/1x1/xx.svg} +0 -0
  536. /package/dist/images/{ye.svg → flags/1x1/ye.svg} +0 -0
  537. /package/dist/images/{yt.svg → flags/1x1/yt.svg} +0 -0
  538. /package/dist/images/{za.svg → flags/1x1/za.svg} +0 -0
  539. /package/dist/images/{zm.svg → flags/1x1/zm.svg} +0 -0
  540. /package/dist/images/{cn.svg → flags/4x3/cn.svg} +0 -0
  541. /package/dist/images/{cu.svg → flags/4x3/cu.svg} +0 -0
  542. /package/dist/images/{cv.svg → flags/4x3/cv.svg} +0 -0
  543. /package/dist/images/{cw.svg → flags/4x3/cw.svg} +0 -0
  544. /package/dist/images/{de.svg → flags/4x3/de.svg} +0 -0
  545. /package/dist/images/{dk.svg → flags/4x3/dk.svg} +0 -0
  546. /package/dist/images/{do.svg → flags/4x3/do.svg} +0 -0
  547. /package/dist/images/{ee.svg → flags/4x3/ee.svg} +0 -0
  548. /package/dist/images/{eh.svg → flags/4x3/eh.svg} +0 -0
  549. /package/dist/images/{er.svg → flags/4x3/er.svg} +0 -0
  550. /package/dist/images/{eu.svg → flags/4x3/eu.svg} +0 -0
  551. /package/dist/images/{fi.svg → flags/4x3/fi.svg} +0 -0
  552. /package/dist/images/{fj.svg → flags/4x3/fj.svg} +0 -0
  553. /package/dist/images/{fr.svg → flags/4x3/fr.svg} +0 -0
  554. /package/dist/images/{gb.svg → flags/4x3/gb.svg} +0 -0
  555. /package/dist/images/{gf.svg → flags/4x3/gf.svg} +0 -0
  556. /package/dist/images/{gh.svg → flags/4x3/gh.svg} +0 -0
  557. /package/dist/images/{gn.svg → flags/4x3/gn.svg} +0 -0
  558. /package/dist/images/{gp.svg → flags/4x3/gp.svg} +0 -0
  559. /package/dist/images/{gq.svg → flags/4x3/gq.svg} +0 -0
  560. /package/dist/images/{gr.svg → flags/4x3/gr.svg} +0 -0
  561. /package/dist/images/{gs.svg → flags/4x3/gs.svg} +0 -0
  562. /package/dist/images/{gt.svg → flags/4x3/gt.svg} +0 -0
  563. /package/dist/images/{gu.svg → flags/4x3/gu.svg} +0 -0
  564. /package/dist/images/{gw.svg → flags/4x3/gw.svg} +0 -0
  565. /package/dist/images/{gy.svg → flags/4x3/gy.svg} +0 -0
  566. /package/dist/images/{hm.svg → flags/4x3/hm.svg} +0 -0
  567. /package/dist/images/{hn.svg → flags/4x3/hn.svg} +0 -0
  568. /package/dist/images/{ht.svg → flags/4x3/ht.svg} +0 -0
  569. /package/dist/images/{hu.svg → flags/4x3/hu.svg} +0 -0
  570. /package/dist/images/{id.svg → flags/4x3/id.svg} +0 -0
  571. /package/dist/images/{im.svg → flags/4x3/im.svg} +0 -0
  572. /package/dist/images/{in.svg → flags/4x3/in.svg} +0 -0
  573. /package/dist/images/{iq.svg → flags/4x3/iq.svg} +0 -0
  574. /package/dist/images/{ir.svg → flags/4x3/ir.svg} +0 -0
  575. /package/dist/images/{is.svg → flags/4x3/is.svg} +0 -0
  576. /package/dist/images/{it.svg → flags/4x3/it.svg} +0 -0
  577. /package/dist/images/{jm.svg → flags/4x3/jm.svg} +0 -0
  578. /package/dist/images/{kh.svg → flags/4x3/kh.svg} +0 -0
  579. /package/dist/images/{km.svg → flags/4x3/km.svg} +0 -0
  580. /package/dist/images/{kw.svg → flags/4x3/kw.svg} +0 -0
  581. /package/dist/images/{lb.svg → flags/4x3/lb.svg} +0 -0
  582. /package/dist/images/{ls.svg → flags/4x3/ls.svg} +0 -0
  583. /package/dist/images/{ma.svg → flags/4x3/ma.svg} +0 -0
  584. /package/dist/images/{mc.svg → flags/4x3/mc.svg} +0 -0
  585. /package/dist/images/{mg.svg → flags/4x3/mg.svg} +0 -0
  586. /package/dist/images/{mm.svg → flags/4x3/mm.svg} +0 -0
  587. /package/dist/images/{mo.svg → flags/4x3/mo.svg} +0 -0
  588. /package/dist/images/{mp.svg → flags/4x3/mp.svg} +0 -0
  589. /package/dist/images/{ms.svg → flags/4x3/ms.svg} +0 -0
  590. /package/dist/images/{mw.svg → flags/4x3/mw.svg} +0 -0
  591. /package/dist/images/{mx.svg → flags/4x3/mx.svg} +0 -0
  592. /package/dist/images/{ni.svg → flags/4x3/ni.svg} +0 -0
  593. /package/dist/images/{nu.svg → flags/4x3/nu.svg} +0 -0
  594. /package/dist/images/{om.svg → flags/4x3/om.svg} +0 -0
  595. /package/dist/images/{pa.svg → flags/4x3/pa.svg} +0 -0
  596. /package/dist/images/{pc.svg → flags/4x3/pc.svg} +0 -0
  597. /package/dist/images/{pf.svg → flags/4x3/pf.svg} +0 -0
  598. /package/dist/images/{pk.svg → flags/4x3/pk.svg} +0 -0
  599. /package/dist/images/{pl.svg → flags/4x3/pl.svg} +0 -0
  600. /package/dist/images/{pr.svg → flags/4x3/pr.svg} +0 -0
  601. /package/dist/images/{pt.svg → flags/4x3/pt.svg} +0 -0
  602. /package/dist/images/{pw.svg → flags/4x3/pw.svg} +0 -0
  603. /package/dist/images/{ru.svg → flags/4x3/ru.svg} +0 -0
  604. /package/dist/images/{sb.svg → flags/4x3/sb.svg} +0 -0
  605. /package/dist/images/{sh.svg → flags/4x3/sh.svg} +0 -0
  606. /package/dist/images/{sj.svg → flags/4x3/sj.svg} +0 -0
  607. /package/dist/images/{sk.svg → flags/4x3/sk.svg} +0 -0
  608. /package/dist/images/{sn.svg → flags/4x3/sn.svg} +0 -0
  609. /package/dist/images/{ss.svg → flags/4x3/ss.svg} +0 -0
  610. /package/dist/images/{sx.svg → flags/4x3/sx.svg} +0 -0
  611. /package/dist/images/{sz.svg → flags/4x3/sz.svg} +0 -0
  612. /package/dist/images/{tc.svg → flags/4x3/tc.svg} +0 -0
  613. /package/dist/images/{tf.svg → flags/4x3/tf.svg} +0 -0
  614. /package/dist/images/{tj.svg → flags/4x3/tj.svg} +0 -0
  615. /package/dist/images/{tk.svg → flags/4x3/tk.svg} +0 -0
  616. /package/dist/images/{tl.svg → flags/4x3/tl.svg} +0 -0
  617. /package/dist/images/{tm.svg → flags/4x3/tm.svg} +0 -0
  618. /package/dist/images/{to.svg → flags/4x3/to.svg} +0 -0
  619. /package/dist/images/{tt.svg → flags/4x3/tt.svg} +0 -0
  620. /package/dist/images/{tw.svg → flags/4x3/tw.svg} +0 -0
  621. /package/dist/images/{ug.svg → flags/4x3/ug.svg} +0 -0
  622. /package/dist/images/{us.svg → flags/4x3/us.svg} +0 -0
  623. /package/dist/images/{uy.svg → flags/4x3/uy.svg} +0 -0
  624. /package/dist/images/{uz.svg → flags/4x3/uz.svg} +0 -0
  625. /package/dist/images/{vi.svg → flags/4x3/vi.svg} +0 -0
  626. /package/dist/images/{vn.svg → flags/4x3/vn.svg} +0 -0
  627. /package/dist/images/{vu.svg → flags/4x3/vu.svg} +0 -0
  628. /package/dist/images/{xk.svg → flags/4x3/xk.svg} +0 -0
  629. /package/dist/images/{zw.svg → flags/4x3/zw.svg} +0 -0
@@ -1,909 +1 @@
1
- /*
2
- AdoptNode() is not used because internal state is not reset
3
- (e.g. the past names map of a HTMLFormElement), this is safe
4
- in theory but we would rather not risk another attack vector.
5
- The state that is cloned by importNode() is explicitly defined
6
- by the specs.
7
- */
8
-
9
- /*
10
- * Use the DOMParser API by default, fallback later if needs be
11
- * DOMParser not work for svg when has multiple root element.
12
- */
13
-
14
- /*
15
- * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.
16
- * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
17
- * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
18
- * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
19
- */
20
-
21
- /* (pushed before children → processed after them, matching the old
22
- "template content last" order) When the node is a <template>,
23
- descend into its content. */
24
-
25
- /* A false return means the node is a custom element kept via
26
- CUSTOM_ELEMENT_HANDLING - the only keep path through
27
- _sanitizeDisallowedNode. Run afterSanitizeElements on it so the
28
- element-hook lifecycle matches normal allowlisted elements: a
29
- security policy applied in this hook (e.g. stripping an attribute
30
- from every surviving element) must not silently skip kept custom
31
- elements (GHSA-c2j3-45gr-mqc4). This mirrors the normal-element
32
- tail below - the hook runs, then the walker's subsequent
33
- _sanitizeAttributes pass sanitizes the element's attributes. The
34
- deliberately skipped namespace and fallback-tag removal checks stay
35
- skipped; they are removal decisions, not the hook contract. */
36
-
37
- /* A hook may have detached the node - treat it as removed (see
38
- _handleHookDetachedNode for the full rationale). */
39
-
40
- /* A name outside the allowlist is acceptable on custom-element terms
41
- only. The value checks below are intentionally skipped in that case:
42
- if the user supplied a tagNameCheck we also allow derived custom
43
- elements using the same test, and attributes passing the configured
44
- attributeNameCheck are allowed as custom elements define these at
45
- their own discretion. */
46
-
47
- /* Add #text in case KEEP_CONTENT is set to true */
48
-
49
- /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
50
-
51
- /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
52
-
53
- /* Allow unknown protocols: This provides support for links that
54
- are handled by protocol handlers which may be unknown ahead of
55
- time, e.g. fb:, spotify: */
56
-
57
- /* Allow valid aria-* attributes, the value is always URI safe */
58
-
59
- /* Allow valid data-* attributes: At least one character after "-"
60
- (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
61
- XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
62
- We don't need to check the value; it's always URI safe. */
63
-
64
- /* Allowed attribute names */
65
-
66
- /* Always reset function-based ADD_TAGS / ADD_ATTR checks to prevent
67
- * leaking across calls when switching from function to array config */
68
-
69
- /* An element iterated here may itself host an attached
70
- shadow root. The default NodeIterator does not enter shadow
71
- trees, so a shadow root nested inside template.content was
72
- previously reached by no walk at all (the pre-pass at
73
- _sanitizeAttachedShadowRoots descends via childNodes, which
74
- doesn't enter template.content; the template-content recursion
75
- above iterates the content but never inspected shadowRoot).
76
- Walk it explicitly. The nodeType guard avoids reading
77
- shadowRoot off text / comment / CDATA / PI nodes that the
78
- iterator also surfaces. */
79
-
80
- /* Assign config vars */
81
-
82
- /* Attributes safe for values like "javascript:" */
83
-
84
- /* Best-effort */
85
-
86
- /* Best-effort teardown; a still-attached child is handled below */
87
-
88
- /* Check attributes next */
89
-
90
- /* Check if element is clobbered or can clobber */
91
-
92
- /* Check if we have a custom element to handle */
93
-
94
- /* Check if we have attributes; if not we might have a text node */
95
-
96
- /* Check no script, data or unknown possibly unsafe URI
97
- unless we know URI values are safe for that attribute */
98
-
99
- /* Check value is safe. First, is attr inert? If so, is safe */
100
-
101
- /* Check we have a DOM node from the data */
102
-
103
- /* Check whether element has a valid namespace.
104
- Realm-safe check (GHSA-hpcv-96wg-7vj8): use the cached Node.prototype
105
- nodeType getter rather than `instanceof Element`, which is realm-
106
- bound and short-circuits to false for any node minted in a different
107
- realm — letting a foreign-realm element with a forbidden namespace
108
- slip past the namespace check entirely. */
109
-
110
- /* Clean up removed elements */
111
-
112
- /* Clobber-safe ownerDocument read, same reasoning as _createNodeIterator:
113
- under SAFE_FOR_TEMPLATES this runs on the live IN_PLACE root, which may
114
- carry a form-named-getter override of ownerDocument. */
115
-
116
- /* Clobbered or already-detached node - best-effort fall back to a
117
- name-based removal so the "is" handling below still runs. Note this
118
- fallback ASCII-lowercases its lookup key in an HTML document and so
119
- cannot reach a case-preserved attribute name; the cached
120
- removeAttributeNode() above is what removes those, and a clobbered
121
- form is already removed wholesale by _isClobbered() before reaching
122
- here. */
123
-
124
- /* Clobbered removeAttribute/hasAttribute on a doomed node — ignore */
125
-
126
- /* Clonable shadow roots are deep-cloned by importNode(); sanitize
127
- them before the main iterator runs, since the iterator does not
128
- descend into shadow trees. The walk routes every read through a
129
- cached prototype getter so clobbering descendants on a form root
130
- cannot hide a shadow host from this pass.
131
- Traverse from `body`, not `importedNode`: when importedNode is a
132
- DocumentFragment, the appendChild() above moves its children into
133
- `body` and leaves the fragment empty, so walking importedNode would
134
- scan nothing and miss every attached shadow host now under `body`
135
- (SO-003). In the BODY/HTML branches `body === importedNode`, so this
136
- is equivalent there; in the element branch `body` contains the
137
- appended element and its descendants. `body` covers all three. */
138
-
139
- /* Clone the hook-mutable allowlists before the walk whenever an
140
- * uponSanitize* hook is registered. The hook event exposes ALLOWED_TAGS
141
- * and ALLOWED_ATTR by reference (as allowedTags / allowedAttributes), so
142
- * a hook that widens them would otherwise mutate the shared set
143
- * permanently: across later calls and across every element. Cloning per
144
- * walk keeps documented in-call widening working while scoping it to the
145
- * call. A single guard for both config paths - the per-call path rebinds
146
- * the sets in _parseConfig each call, the persistent path restores them
147
- * from the captured bindings just above - so the two cannot diverge. */
148
-
149
- /* Close the pre-walk clone-guard's timing gap: an uponSanitizeElement
150
- hook may have been installed after that guard sampled the hook arrays
151
- (e.g. lazily from beforeSanitizeElements), leaving ALLOWED_TAGS still
152
- aliasing a shared binding that a widening hook would mutate by
153
- reference. Fork it before exposing it to the hook. */
154
-
155
- /* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */
156
-
157
- /* Create a HTML document */
158
-
159
- /* Decide if ARIA attributes are okay */
160
-
161
- /* Decide if custom data attributes are okay */
162
-
163
- /* Declarative-partial-updates / streaming pre-pass: sever every patch
164
- linkage across the live tree BEFORE the walk, so no patch can fire
165
- mid-walk and inject into an already-processed region. Runs first, so
166
- it also covers the forbidden/clobbered roots that throw below. */
167
-
168
- /* Deep shadow DOM detected.
169
- Realm-safe check (GHSA-hpcv-96wg-7vj8): use nodeType against the
170
- DOCUMENT_FRAGMENT_NODE constant rather than instanceof, so we
171
- recurse into <template>.content from foreign realms too. */
172
-
173
- /* Deferred shadow-DOM sanitisation: runs after its subtree was walked. */
174
-
175
- /* Detect mXSS attempts abusing namespace confusion */
176
-
177
- /* Did the hooks approve of the attribute? */
178
-
179
- /* Did the hooks force-keep the attribute? */
180
-
181
- /* Do some early pre-sanitization to avoid unsafe root nodes.
182
- Read nodeName through the cached prototype getter — a clobbering
183
- child named "nodeName" on the form root would otherwise shadow
184
- the property and let this check skip the root-allowlist
185
- validation entirely. */
186
-
187
- /* Document namespace */
188
-
189
- /* Execute a hook if present */
190
-
191
- /* Exit directly if we have nothing to do */
192
-
193
- /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
194
-
195
- /* FORBID_ATTR must always win, even if ADD_ATTR predicate would allow it */
196
-
197
- /* Fail closed on a live clobbered root before throwing.
198
- _neutralizeRoot's reads are clobber-safe (cached getters); the
199
- form's non-clobbered descendants, e.g. an armed <img>, are scrubbed. */
200
-
201
- /* Fail closed on a live root: neutralize handlers/children before
202
- throwing, exactly as the mid-walk abort path does. */
203
-
204
- /* Fail-closed completion of the audit-5 F1 fix: every node removed from
205
- the caller's live tree is detached but may still hold a queued
206
- resource-event handler that fires in page scope after we return. The
207
- move-hoist covers only disallowed-tag KEEP_CONTENT removals; strip the
208
- non-allow-listed attributes off every other removed subtree (clobber,
209
- mXSS, namespace, comments, KEEP_CONTENT:false, …) so those handlers are
210
- cancelled before any event can fire. Runs synchronously, pre-return. */
211
-
212
- /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
213
-
214
- /* Full DOM Clobbering protection via namespace isolation,
215
- * Prefix id and name attributes with `user-content-`
216
- */
217
-
218
- /* Further prevent gadget XSS for dynamically built script tags */
219
-
220
- /* Get node iterator */
221
-
222
- /* Get the element's text content */
223
-
224
- /* Go backwards over all attributes; safely remove bad ones */
225
-
226
- /* Handle attributes that require Trusted Types */
227
-
228
- /* Handle invalid data-* attribute set by try-catching it */
229
-
230
- /* Hoist by moving each child up one level rather than deep-cloning
231
- it. Moving transfers every descendant exactly once, so a chain of
232
- nested disallowed elements costs O(n) instead of the O(n^2) that
233
- re-cloning the shrinking subtree at each level produced; it also
234
- empties the removed original, so `DOMPurify.removed` no longer
235
- pins whole subtrees. Moving preserves the in-place guarantee too:
236
- an original carrying already-queued resource events (`<img
237
- onerror>`, `<video>`/`<audio>` error, lazy/`onload`, …) is
238
- relocated and sanitised rather than left detached but still armed.
239
- The sole case that must clone is removing the walk root itself.
240
- The result is serialised from the root's subtree, so a restrictive
241
- ALLOWED_TAGS that strips the root (`body` on the string path) must
242
- leave the content inside it, which only cloning does. In IN_PLACE
243
- the root is pre-validated as an allowed tag and so is never removed
244
- here, so that path always takes the move branch.
245
- `childNodes` is live; a tail-to-head walk keeps `childNodes[i]`
246
- valid whether we move (drops the trailing entry) or clone (leaves
247
- the list intact). */
248
-
249
- /* Ideally, do not touch anything below this line */
250
-
251
- /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
252
-
253
- /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
254
- * of importing it into a new Document and returning a sanitized copy */
255
-
256
- /* If dirty is a DOM element, append to an empty document to avoid
257
- elements being stripped by the parser */
258
-
259
- /* If we sanitized `dirty` in-place, return it. */
260
-
261
- /* Initialize shared config vars if necessary. */
262
-
263
- /* Initialize the document to work on */
264
-
265
- /* Is `value` valid for this attribute? */
266
-
267
- /* Iterative (explicit stack) rather than per-child recursion. DOM APIs
268
- impose no depth cap, so an attacker-shaped tree (JSON/CRDT/editor data
269
- built straight into the DOM — the IN_PLACE surface) deeper than the JS
270
- call-stack budget would otherwise overflow native recursion here and
271
- throw at the IN_PLACE entry pre-pass, before a single node is
272
- sanitized, leaving the caller's live tree untouched (fail-open). See
273
- campaign-3 F4. A heap stack keeps depth off the call stack.
274
- Each work item is either a node to descend into, or a deferred
275
- `_sanitizeShadowDOM` for an already-walked shadow root. The deferred
276
- form preserves the original post-order discipline: a shadow root's
277
- nested shadow roots are discovered before the outer shadow is
278
- sanitized (which may remove hosts). Pushes are in reverse of the
279
- desired processing order (LIFO): template content, then children, then
280
- the shadow-sanitize, then the shadow walk — so the order matches the
281
- previous recursion exactly. */
282
-
283
- /* Keep a reference to config to pass to hooks */
284
-
285
- /* Keep content except for bad-listed elements.
286
- Use the cached prototype getters exclusively — the previous code
287
- had `|| currentNode.parentNode` / `|| currentNode.childNodes`
288
- fallbacks, but the cached getters always return the canonical
289
- value (or null for a real parent-less node), so the fallback
290
- path was dead in safe cases and a clobbering surface in unsafe
291
- ones. Falsy cached results stay falsy; the `if (childNodes &&
292
- parentNode)` check already gates correctly. */
293
-
294
- /* Keep element content when removing element? */
295
-
296
- /* Keep image data URIs alive if src/xlink:href is allowed */
297
-
298
- /* Make sure attribute cannot clobber */
299
-
300
- /* Make sure that older browsers don't get fallback-tag mXSS */
301
-
302
- /* Make sure we cannot easily use animated hrefs, even if animations are allowed */
303
-
304
- /* Make sure we have a string to sanitize.
305
- DO NOT return early, as this will return the wrong type if
306
- the user has requested a DOM object rather than a string */
307
-
308
- /* Merge configuration parameters */
309
-
310
- /* Node is already a body, use as is */
311
-
312
- /* Nodes _forceRemove'd earlier in the aborted walk are already
313
- detached from the root, so _neutralizeRoot's subtree pass does not
314
- reach them. Defuse them too, mirroring the success-path loop below. */
315
-
316
- /* Now let's check the element's type and name */
317
-
318
- /* Now start iterating over the created document.
319
- The walk runs inside an exception barrier (campaign-3 F2): a re-entrant
320
- engine/custom-element mutation can detach a node mid-walk so
321
- `_forceRemove`'s parentless guard throws, aborting the loop. Without the
322
- barrier the caller's in-place tree would be left half-sanitized with the
323
- unvisited tail still armed. _createNodeIterator itself is inside the
324
- barrier too: constructing the iterator dereferences the root's document,
325
- and any failure there (e.g. an exotic/clobbered root) must still fail
326
- closed rather than skip the neutralize. On any throw we fail closed -
327
- strip the in-place root bare - then rethrow so the existing throw
328
- contract is preserved. (String/DOM-copy paths never return the partial
329
- body, so the propagating throw is already fail-closed there.) */
330
-
331
- /* Only an empty (binary) value remains safe at this point;
332
- anything else is presumed unsafe, do not add it back */
333
-
334
- /* Only the named-prop remove-and-recreate owns a DOMPurify.removed
335
- record to pop; a plain trim/template/Trusted-Types writeback owns
336
- none, so popping here would drop an unrelated subtree's cleanup
337
- record (SO-001). */
338
-
339
- /* Parse profile info */
340
-
341
- /* Parsing of strict XHTML documents */
342
-
343
- /* Persistent setConfig() path: _parseConfig is skipped, so the sets are
344
- * not re-derived per call. Restore them from the pristine bindings
345
- * captured at setConfig() time so a previous call's hook clone (mutated
346
- * below) does not carry over. */
347
-
348
- /* Pre-flight the root through _isClobbered. The iterator-driven
349
- removal path can not detach a parent-less root: _forceRemove
350
- falls through to Element.prototype.remove(), which per spec
351
- is a no-op on a node with no parent. A clobbered root would
352
- then survive the main loop with its attributes uninspected,
353
- because _sanitizeAttributes early-returns on _isClobbered. The
354
- result would be an attacker-controlled form, complete with any
355
- event-handler attributes the caller passed in, handed back to
356
- the application unsanitized. Refuse to sanitize such a root
357
- the same way we refuse a forbidden tag. GHSA-r47g-fvhr-h676. */
358
-
359
- /* Push the deferred sanitise first so it pops after the shadow
360
- walk we push next, i.e. nested shadow roots are discovered
361
- before this one is sanitised. */
362
-
363
- /* Read ownerDocument through the cached Node.prototype getter, never the
364
- direct property. HTMLFormElement has [LegacyOverrideBuiltIns], so a
365
- clobbering child (<input name="ownerDocument"> or a form-associated
366
- external input) shadows the prototype getter and makes a direct read
367
- return that <input>. createNodeIterator.call(<input>, ...) then throws
368
- "Illegal invocation", and on the IN_PLACE path that throw lands before
369
- the walk's fail-closed barrier - leaving the caller's live tree, with
370
- any already-armed handler in it, un-neutralized. The cached getter
371
- returns the real Document regardless of the clobber. */
372
-
373
- /* Reject declarative-partial-updates patch-linkage attributes
374
- (https://github.com/WICG/declarative-partial-updates).
375
- Empirical note (Chrome 150, verified — see
376
- test/declarative-patch-probe-v3.html): expansion is NOT applied after
377
- sanitization. For the string path it fires during sanitize()'s own
378
- parse, so the walk sees and sanitizes the fully materialized expanded
379
- tree — teleports into MathML/SVG integration points included; a
380
- weaponized `<template for>`->`<img onerror>` comes back with the handler
381
- stripped. For the IN_PLACE path it fires on connection, before the walk.
382
- Either way DOMPurify is NOT blind to the patch.
383
- This removal is therefore defense-in-depth rather than the sole barrier:
384
- it prevents live linkage from surviving into the OUTPUT and re-expanding
385
- in the caller's context, and keeps behaviour deterministic if a future
386
- engine defers expansion. `for` is legitimate only on <label>/<output>;
387
- anywhere else (notably <template for>) it links the element to a patch
388
- target and teleports or removes an arbitrary DOM range by id/marker name.
389
- `patchsrc` fetches remote markup and is treated as a script-loading
390
- mechanism (CSP). Gated on SAFE_FOR_XML so the removal groups with the
391
- other structural-threat checks and stays overridable, consistent with
392
- the rest of the codebase. PI range markers are already removed by
393
- _isUnsafeNode. */
394
-
395
- /* Reject unknown entry points. Without this, a non-hook key (e.g.
396
- * '__proto__') indexes off the prototype chain rather than a real
397
- * hook array, and arrayPush then writes to Object.prototype. Guard
398
- * with an own-property check against the known hook names. */
399
-
400
- /* Remove element if anything forbids its presence */
401
-
402
- /* Remove first element node (ours) if FORCE_BODY is set */
403
-
404
- /* Remove mXSS vectors, processing instructions and risky comments */
405
-
406
- /* Remove range markers (the target side of a patch linkage): every
407
- processing instruction, and any markup-bearing comment. */
408
-
409
- /* Remove rawtext/literal-text elements whose literal serialization
410
- re-opens markup on an HTML reparse - shapes (a) and (b) documented at
411
- LITERAL_TEXT_ELEMENTS. Both are invisible to rule 1 above (which
412
- self-disables once there is an element child, and whose second probe
413
- reads the innerHTML an XML/XHTML document serializes escaped), which
414
- is why both probes here read textContent instead. Previously only
415
- `style`-with-element-child was covered; every element in
416
- LITERAL_TEXT_ELEMENTS shares this literal serialization and is
417
- equally affected. */
418
-
419
- /* Resolve IN_PLACE for this call without mutating persistent config.
420
- Writing the IN_PLACE closure variable here leaks under setConfig(),
421
- where _parseConfig is skipped on later calls: a single string call would
422
- disable in-place mode for every subsequent node call, returning a
423
- sanitized copy while leaving the caller's node — which in-place callers
424
- keep using and whose return value they ignore — unsanitized. REPORT-2. */
425
-
426
- /* Return dirty HTML if DOMPurify cannot run */
427
-
428
- /* Return sanitized string or DOM */
429
-
430
- /* Same lazy-install guard as uponSanitizeElement (see there): fork the
431
- attribute allowlist off its shared binding before a hook can see it. */
432
-
433
- /* Sanitize attached shadow roots before the main iterator runs.
434
- The iterator does not descend into shadow trees. Same fail-closed
435
- barrier as the main walk (campaign-3 F2): a custom-element reaction
436
- inside a shadow root could abort this pre-pass before the walk runs,
437
- which would otherwise leave the entire live tree unsanitized. */
438
-
439
- /* Sanitize attribute content to be template-safe */
440
-
441
- /* Sanitize element content to be template-safe */
442
-
443
- /* Sanitize final string template-safe */
444
-
445
- /* Sanitize tags and elements */
446
-
447
- /* Serialize doctype if allowed */
448
-
449
- /* Set configuration parameters */
450
-
451
- /* Shadow DOM detected, sanitize it.
452
- Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection
453
- instead of instanceof, so foreign-realm <template>.content is
454
- walked correctly. */
455
-
456
- /* Shadow root (processed first): walk its subtree, then sanitise it.
457
- Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection
458
- rather than `instanceof DocumentFragment`, which is realm-bound and
459
- silently skipped foreign-realm shadow roots (e.g.
460
- iframe.contentDocument attachShadow). */
461
-
462
- /* Shield configuration object from prototype pollution */
463
-
464
- /* Shield configuration object from tampering */
465
-
466
- /* Stringify, in case dirty is an object */
467
-
468
- /* Strip every disallowed attribute (on* handlers included) off the whole
469
- subtree BEFORE detaching anything. Detaching first would hand back
470
- handler-bearing originals (e.g. an already-loading `<img onerror>`)
471
- whose queued resource event still fires in page scope after we throw.
472
- Clobber-safe reads; a doomed clobbered node's own attributes are
473
- irrelevant while its non-clobbered descendants are reached and scrubbed. */
474
-
475
- /* Strip patch-source attributes (the source side) off elements. */
476
-
477
- /* Tags that are safe for data: URIs */
478
-
479
- /* The normal detach failed — this is reached for a parentless node
480
- (getParentNode() is null, so .removeChild throws). Element.prototype
481
- .remove() is itself a spec no-op on a parentless node, so a recorded
482
- "removal" would otherwise hand the caller back an intact,
483
- payload-bearing node (e.g. a detached IN_PLACE root the mXSS canary or
484
- the style-with-element-child rule decided to kill). Fail closed by
485
- throwing — exactly as a clobbered root does at the IN_PLACE entry —
486
- rather than trying to "neutralize" the node via its own methods.
487
- Neutralizing would mean calling getAttributeNames()/removeAttribute()
488
- on the node, both of which a <form> root can clobber via a named child
489
- (and _isClobbered does not even probe getAttributeNames), so the
490
- neutralize step could itself be silently defeated, leaving the payload
491
- intact. A throw touches only the cached, clobber-safe remove() and
492
- getParentNode(). Generalizes GHSA-r47g-fvhr-h676 (clobbered-form root)
493
- to every root-kill reason. REPORT-3.
494
- This lives inside the catch, so it never fires for a normally-removed
495
- in-tree node: those have a parent, removeChild() succeeds, and the
496
- catch is not entered. Only a kept (parentless) root reaches here. */
497
-
498
- /* The uponSanitizeElement hook may have detached the node, exactly as
499
- above (see _handleHookDetachedNode for the full rationale). */
500
-
501
- /* Tracks whether this specific attribute pushed a DOMPurify.removed
502
- record that a later _setAttributeValue() writeback is expected to pop
503
- back off (the SANITIZE_NAMED_PROPS remove-and-recreate below is the
504
- only path that does). A value that merely changed via trim, template
505
- scrubbing, or Trusted Types pushes no such record, so its writeback
506
- must NOT pop — otherwise it consumes an unrelated _forceRemove subtree
507
- record and that detached subtree escapes the IN_PLACE handler-
508
- neutralization pass (SO-001). */
509
-
510
- /* Use createHTMLDocument in case DOMParser is not available */
511
-
512
- /* Work around a security issue in jQuery 3.0 */
513
-
514
- /* Work around a security issue with comments inside attributes */
515
-
516
- /* Work on whole document or just its body */
517
-
518
- /* ______________________________________________ */
519
-
520
- /* allowed element names */
521
-
522
1
  /*! @license DOMPurify 3.4.15 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.15/LICENSE */
523
-
524
- /**
525
- * Evaluate a CUSTOM_ELEMENT_HANDLING check (a RegExp or a predicate
526
- * function, per the validation in _parseConfig) against a name.
527
- * Additional arguments are forwarded to predicate functions - the
528
- * attributeNameCheck predicate receives the tag name as its second
529
- * argument. A null/absent check never matches.
530
- *
531
- * @param check the configured tagNameCheck / attributeNameCheck value
532
- * @param name the name to test
533
- * @param args extra arguments forwarded to a predicate function
534
- * @return true if the check matches the name
535
- */
536
-
537
- /**
538
- * Expose whether this browser supports running the full DOMPurify.
539
- */
540
-
541
- /**
542
- * Structural-threat checks that condemn a node regardless of the
543
- * allowlists: mXSS via namespace confusion, risky CSS construction,
544
- * processing instructions, markup-bearing comments. Pure predicate;
545
- * the caller removes. Check order is load-bearing.
546
- *
547
- * @param currentNode the node to inspect
548
- * @param tagName the node's transformCaseFunc'd tag name
549
- * @return true if the node must be removed
550
- */
551
-
552
- /**
553
- * We consider the elements and attributes below to be safe. Ideally
554
- * don't add any new ones but feel free to remove unwanted ones.
555
- */
556
-
557
- /**
558
- * Add properties to a lookup table
559
- *
560
- * @param set - The set to which elements will be added.
561
- * @param array - The array containing elements to be added to the set.
562
- * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
563
- * @returns The modified set with added elements.
564
- */
565
-
566
- /**
567
- * Clean up an array to harden against CSPP
568
- *
569
- * @param array - The array to be cleaned.
570
- * @returns The cleaned version of the array
571
- */
572
-
573
- /**
574
- * Convert non-node values into strings without depending on direct property access.
575
- *
576
- * @param value - The value to stringify.
577
- * @returns A string representation of the provided value.
578
- */
579
-
580
- /**
581
- * Creates a new function that calls the given function with a specified thisArg and arguments.
582
- *
583
- * @param func - The function to be wrapped and called.
584
- * @returns A new function that calls the given function with a specified thisArg and arguments.
585
- */
586
-
587
- /**
588
- * Creates a new function that constructs an instance of the given constructor function with the provided arguments.
589
- *
590
- * @param func - The constructor function to be wrapped and called.
591
- * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
592
- */
593
-
594
- /**
595
- * Shallow clone an object
596
- *
597
- * @param object - The object to be cloned.
598
- * @returns A new object that copies the original.
599
- */
600
-
601
- /**
602
- * This method automatically checks if the prop is function or getter and behaves accordingly.
603
- *
604
- * @param object - The object to look up the getter function in its prototype chain.
605
- * @param prop - The property name for which to find the getter function.
606
- * @returns The getter function found in the prototype chain or a fallback function.
607
- */
608
-
609
- /******/
610
-
611
- // "childNodes" shadows the prototype getter. Direct reads of
612
-
613
- // (Trusted Types unsupported, creation failed, or an explicit opt-out)
614
-
615
- // (e.g. HTMLSelectElement.length is a defined unsigned-long).
616
-
617
- // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
618
-
619
- // (rather than hoisting) breaks that cascade; the content is a duplicate
620
-
621
- // (same-realm OR foreign-realm) has both reads pointing at the same
622
-
623
- // (the caller's other defences still apply).
624
-
625
- // ./node_modules/dompurify/dist/purify.es.mjs
626
-
627
- // ./src/export/lib/dompurify/dompurify.js
628
-
629
- // <math> and HTML integration points
630
-
631
- // <selectedcontent> mirrors the selected <option>'s subtree, cloned by
632
-
633
- // A caller-supplied policy applies to this configuration only.
634
-
635
- // A form descendant named "removeAttributeNode" or "getAttributeNode"
636
-
637
- // ASCII-lowercases its lookup key in an HTML document, silently missing
638
-
639
- // Allow the callers to control the unique policy name
640
-
641
- // Allows developers to see this is a property they can set
642
-
643
- // As per issue #47, the web-components registry is inherited by a
644
-
645
- // Certain elements are allowed in both SVG and HTML
646
-
647
- // Condition a) covers a basically valid custom element tag name whose
648
-
649
- // Condition b) covers an `is` attribute whose value passes the
650
-
651
- // Config presets (e.g. tags.js, attrs.js) are immutable.
652
-
653
- // DOMParser document. Hoisting its children on removal re-inserts a fresh
654
-
655
- // Default HTML namespace
656
-
657
- // Default false
658
-
659
- // Default regexp
660
-
661
- // Default true
662
-
663
- // Drop any caller-supplied Trusted Types policy so it cannot poison later
664
-
665
- // Else: already prefixed, leave the attribute alone — the prefix is
666
-
667
- // Explicit opt-out for this call: perform no Trusted Types signing and
668
-
669
- // HTML integration points, and from MathML to HTML
670
-
671
- // HTML namespace.
672
-
673
- // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
674
-
675
- // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
676
-
677
- // In JSDOM, if we're inside shadow DOM, then parentNode
678
-
679
- // Make 'in' and truthy checks like Boolean(set.constructor)
680
-
681
- // No policy supplied: keep the currently active policy if one is set — a
682
-
683
- // NodeIterator does not descend into <template>.content per the DOM spec,
684
-
685
- // NodeType clobbering probe. Cached Node.prototype.nodeType getter
686
-
687
- // Not available in IE8, Safari 5, etc.
688
-
689
- // Not running in a browser, provide a factory function
690
-
691
- // Policy creation failed (most likely another DOMPurify script has
692
-
693
- // Policy creation with duplicate names throws in Trusted Types.
694
-
695
- // Prefix the value and later re-create the attribute with the sanitized value
696
-
697
- // Prevent further manipulation of configuration.
698
-
699
- // Prevent prototype setters from intercepting set as a this value.
700
-
701
- // Re-derive the active Trusted Types policy from this configuration on
702
-
703
- // Realm-independent tag-name probe. If we can't determine the tag
704
-
705
- // Realm-safe NamedNodeMap detection: equality against the cached
706
-
707
- // Remove the attribute with this value
708
-
709
- // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
710
-
711
- // See GHSA-vxr8-fq34-vvx9.
712
-
713
- // Sign internal variables only when a policy is active. A falsy policy
714
-
715
- // Sign local variables required by `sanitize`. If the supplied policy's
716
-
717
- // Syntax error if dirtyPayload is invalid xml
718
-
719
- // The only way to switch from HTML namespace to MathML
720
-
721
- // The only way to switch from HTML namespace to SVG
722
-
723
- // The only way to switch from MathML to SVG is via <svg>
724
-
725
- // The only way to switch from SVG to HTML is via
726
-
727
- // The only way to switch from SVG to MathML is via
728
-
729
- // This attribute owns the record just pushed; its recreate writeback
730
-
731
- // We void attribute values for unremovable "is" attributes
732
-
733
- // _removeAttribute() / _stripAttributeNode() reach for
734
-
735
- // `RETURN_TRUSTED_TYPE` output. The internal default policy (cached, and
736
-
737
- // `RETURN_TRUSTED_TYPE` result with a foreign, possibly unsafe policy.
738
-
739
- // `TRUSTED_TYPES_POLICY: null` — could sign a subsequent "default"
740
-
741
- // `createHTML` is circular (i.e. it calls `DOMPurify.sanitize`), this
742
-
743
- // `dompurify` policy can still call `sanitize` from inside its own
744
-
745
- // `null` also drops any previously retained caller policy, so it cannot
746
-
747
- // a case-preserved event-handler attribute (e.g. an ONANIMATIONSTART
748
-
749
- // a new empty registry is used when creating a template contents owner
750
-
751
- // a non-policy and throw. See #1422.
752
-
753
- // after `clearConfig()` — or after a later call that supplied none, or
754
-
755
- // allowed.
756
-
757
- // already run). Skip creating the policy, as this will only cause errors
758
-
759
- // an internal slot, no serialization cost — and removes a residual
760
-
761
- // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
762
-
763
- // cached Node.prototype getter — when the form's named-property
764
-
765
- // call to restore the internal default policy. See GHSA-vxr8-fq34-vvx9.
766
-
767
- // calls — otherwise fall back to the instance's own internal policy,
768
-
769
- // can be null. We just simulate parent in this case.
770
-
771
- // canonical NamedNodeMap.
772
-
773
- // carry a numeric .length, which a typeof-based probe would miss
774
-
775
- // clobbering surface used by several mXSS / PI / comment branches
776
-
777
- // configured tagNameCheck while customized built-in elements are
778
-
779
- // create nothing (so a strict `trusted-types` CSP that disallows a
780
-
781
- // created at most once. (A policy supplied for a *single* call still
782
-
783
- // document, so we use that as our parent document to ensure nothing
784
-
785
- // element.removeAttributeNode(attr) first; when it is shadowed the call
786
-
787
- // engine re-mirrors synchronously whenever a removal changes which
788
-
789
- // eslint-disable-line import/no-mutable-exports
790
-
791
- // eslint-disable-next-line complexity
792
-
793
- // eslint-disable-next-line no-bitwise
794
-
795
- // eslint-disable-next-line unicorn/prefer-dom-node-append
796
-
797
- // eslint-disable-next-line unicorn/prefer-dom-node-remove
798
-
799
- // eslint-disable-next-line unicorn/prefer-includes
800
-
801
- // every parse. The active policy must never be sticky closure state that
802
-
803
- // forever (DoS) and amplifying output. Dropping its content on removal
804
-
805
- // form.childNodes from a clobbered form return the named child
806
-
807
- // getter intercepts the read, the two values differ and we flag
808
-
809
- // has been torn down via `clearConfig()`, which restores the default.)
810
-
811
- // if TT are enforced.
812
-
813
- // if the parent is either <annotation-xml> or a MathML
814
-
815
- // in _sanitizeElements that compare currentNode.nodeType directly.
816
-
817
- // independent of any properties defined on Object.prototype.
818
-
819
- // instead of the real NodeList, so any walk that reads it directly
820
-
821
- // is inherited.
822
-
823
- // is the one allowed to pop it back off.
824
-
825
- // is via <math>. If it happens via any other tag, then
826
-
827
- // is via <svg>. If it happens via any other tag, then
828
-
829
- // is via MathML text integration points
830
-
831
- // it should be killed.
832
-
833
- // itself the clobbering protection, and re-applying it is incorrect.
834
-
835
- // leaves `emptyHTML` as a plain string, so we never call `.createHTML` on
836
-
837
- // lingers by design; what must not linger is a policy whose configuration
838
-
839
- // makes the direct read diverge from the cached read; a clean form
840
-
841
- // mirror target ahead of the walk, which the engine refills, looping
842
-
843
- // mirroring the approach used by _sanitizeShadowDOM.
844
-
845
- // name at all, we can't reason about clobbering — return false
846
-
847
- // namespace. We need to specify them explicitly
848
-
849
- // never recreated — Trusted Types throws on duplicate names) is restored by
850
-
851
- // new document created via createHTMLDocument. As per the spec
852
-
853
- // of the option, which is sanitized on its own. See campaign-3 F1/F6.
854
-
855
- // option/selectedcontent is current, even inside DOMPurify's inert
856
-
857
- // outlives the config that set it: a caller-supplied policy left in place
858
-
859
- // passes the configured attributeNameCheck ...
860
-
861
- // policy — see #1422). Resetting to `undefined` rather than a sticky
862
-
863
- // previously supplied policy is intentionally sticky across config-less
864
-
865
- // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
866
-
867
- // read on a clobbered form (e.g. <input name="nodeType">) returns
868
-
869
- // resurface on a later call, while still allowing the next config-less
870
-
871
- // returns the integer 1 for any Element regardless of realm; direct
872
-
873
- // select, etc.) regardless of whether the named child happens to
874
-
875
- // shadows these Attr-node methods via [LegacyOverrideBuiltIns].
876
-
877
- // skips the form's real children. Compare the direct read to the
878
-
879
- // so it is removed wholesale, exactly as for the other shadowed methods.
880
-
881
- // so that they don't get erroneously deleted from
882
-
883
- // so that you can pass your own Window
884
-
885
- // so we must explicitly recurse into each template's content fragment,
886
-
887
- // tag passes the configured tagNameCheck and whose attribute name
888
-
889
- // text integration point.
890
-
891
- // that reached the sanitizer through an XML/XHTML parse). Flag the form
892
-
893
- // the UA (customizable <select>) — including any on* handlers — and the
894
-
895
- // the form. This catches every clobbering child type (input,
896
-
897
- // the instance is not left in a poisoned state. See #1422.
898
-
899
- // the named child element. Cheap addition — nodeType is read from
900
-
901
- // the next `_parseConfig`. See GHSA-vxr8-fq34-vvx9.
902
-
903
- // throws and the name-based fallback element.removeAttribute(name)
904
-
905
- // throws via the re-entrancy guard. Restore the previous policy first so
906
-
907
- // webpackBootstrap
908
-
909
- //# sourceMappingURL=purify.es.mjs.map