swh.web 0.16.2__py3-none-any.whl → 0.16.3__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 (55) hide show
  1. swh/web/browse/templates/browse-iframe.html +1 -0
  2. swh/web/inbound_email/handle_message.py +1 -1
  3. swh/web/inbound_email/tests/test_utils.py +2 -2
  4. swh/web/save_code_now/assets/origin-save-admin.js +5 -2
  5. swh/web/save_code_now/assets/origin-save.js +9 -4
  6. swh/web/static/js/add_forge_now.e25d1ad2ab6c45e60b67.js.map +1 -1
  7. swh/web/static/js/auth.bd2f475f49caa9f84e99.js.map +1 -1
  8. swh/web/static/js/browse.fc5d5fafca71e03d2add.js.map +1 -1
  9. swh/web/static/js/deposit.d47e18177b16ccdbdb84.js.map +1 -1
  10. swh/web/static/js/{highlightjs.dc9b8354c69d942fad33.js → highlightjs.14fc09414685bf90c554.js} +3 -3
  11. swh/web/static/js/highlightjs.14fc09414685bf90c554.js.map +1 -0
  12. swh/web/static/js/mailmap.631c53127ba5511ebda7.js.map +1 -1
  13. swh/web/static/js/mathjax.98ef576f318f1a0b0c4a.js.map +1 -1
  14. swh/web/static/js/{revision.ac9293e1b984b4d4d909.js → revision.61c9277f4a4c63df0f45.js} +3 -3
  15. swh/web/static/js/{revision.ac9293e1b984b4d4d909.js.map → revision.61c9277f4a4c63df0f45.js.map} +1 -1
  16. swh/web/static/js/save_code_now.4211098f5dd740dc49b4.js +3 -0
  17. swh/web/static/js/save_code_now.4211098f5dd740dc49b4.js.map +1 -0
  18. swh/web/static/js/vault.4eaa8dbf376ebe9cdc7f.js +3 -0
  19. swh/web/static/js/vault.4eaa8dbf376ebe9cdc7f.js.map +1 -0
  20. swh/web/static/js/{vendors.2eeadf2e0831a7a82b6d.js → vendors.9fc5b97b8e4691b7272e.js} +3 -3
  21. swh/web/static/js/vendors.9fc5b97b8e4691b7272e.js.map +1 -0
  22. swh/web/static/js/{webapp.26efc059a8f5fe204240.js → webapp.c5e37f8f7bfc8bb87ad8.js} +3 -3
  23. swh/web/static/js/{webapp.26efc059a8f5fe204240.js.LICENSE.txt → webapp.c5e37f8f7bfc8bb87ad8.js.LICENSE.txt} +1 -1
  24. swh/web/static/js/webapp.c5e37f8f7bfc8bb87ad8.js.map +1 -0
  25. swh/web/static/jssources/@myriaddreamin/highlighter-typst/dist/esm/contrib/hljs/typst-lite.bundle.js +180 -111
  26. swh/web/static/jssources/assets/src/utils/functions.js +1 -1
  27. swh/web/static/jssources/core-js/LICENSE.txt +1 -1
  28. swh/web/static/jssources/core-js/internals/shared-store.js +3 -3
  29. swh/web/static/jssources/core-js/modules/es.object.group-by.js +2 -1
  30. swh/web/static/jssources/dompurify/dist/purify.es.mjs +35 -12
  31. swh/web/static/jssources/highlightjs-line-numbers.js/src/highlightjs-line-numbers.js +1 -1
  32. swh/web/static/jssources/jslicenses.json +1 -1
  33. swh/web/static/jssources/swh/web/save_code_now/assets/origin-save-admin.js +5 -2
  34. swh/web/static/jssources/swh/web/save_code_now/assets/origin-save.js +9 -4
  35. swh/web/static/webpack-stats.json +85 -85
  36. swh/web/tests/views.py +9 -8
  37. swh/web/utils/archive.py +1 -1
  38. {swh_web-0.16.2.dist-info → swh_web-0.16.3.dist-info}/METADATA +1 -1
  39. {swh_web-0.16.2.dist-info → swh_web-0.16.3.dist-info}/RECORD +48 -48
  40. swh/web/static/js/highlightjs.dc9b8354c69d942fad33.js.map +0 -1
  41. swh/web/static/js/save_code_now.369ff7f28aaf74e7728e.js +0 -3
  42. swh/web/static/js/save_code_now.369ff7f28aaf74e7728e.js.map +0 -1
  43. swh/web/static/js/vault.1229427aed95c78d4ee2.js +0 -3
  44. swh/web/static/js/vault.1229427aed95c78d4ee2.js.map +0 -1
  45. swh/web/static/js/vendors.2eeadf2e0831a7a82b6d.js.map +0 -1
  46. swh/web/static/js/webapp.26efc059a8f5fe204240.js.map +0 -1
  47. /swh/web/static/js/{highlightjs.dc9b8354c69d942fad33.js.LICENSE.txt → highlightjs.14fc09414685bf90c554.js.LICENSE.txt} +0 -0
  48. /swh/web/static/js/{revision.ac9293e1b984b4d4d909.js.LICENSE.txt → revision.61c9277f4a4c63df0f45.js.LICENSE.txt} +0 -0
  49. /swh/web/static/js/{save_code_now.369ff7f28aaf74e7728e.js.LICENSE.txt → save_code_now.4211098f5dd740dc49b4.js.LICENSE.txt} +0 -0
  50. /swh/web/static/js/{vault.1229427aed95c78d4ee2.js.LICENSE.txt → vault.4eaa8dbf376ebe9cdc7f.js.LICENSE.txt} +0 -0
  51. /swh/web/static/js/{vendors.2eeadf2e0831a7a82b6d.js.LICENSE.txt → vendors.9fc5b97b8e4691b7272e.js.LICENSE.txt} +0 -0
  52. {swh_web-0.16.2.dist-info → swh_web-0.16.3.dist-info}/WHEEL +0 -0
  53. {swh_web-0.16.2.dist-info → swh_web-0.16.3.dist-info}/licenses/AUTHORS +0 -0
  54. {swh_web-0.16.2.dist-info → swh_web-0.16.3.dist-info}/licenses/LICENSE +0 -0
  55. {swh_web-0.16.2.dist-info → swh_web-0.16.3.dist-info}/top_level.txt +0 -0
@@ -26,12 +26,6 @@ function handleError(f, args) {
26
26
  wasm.__wbindgen_export_0(addHeapObject(e));
27
27
  }
28
28
  }
29
- var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }) : { decode: () => {
30
- throw Error("TextDecoder not available");
31
- } };
32
- if (typeof TextDecoder !== "undefined") {
33
- cachedTextDecoder.decode();
34
- }
35
29
  var cachedUint8ArrayMemory0 = null;
36
30
  function getUint8ArrayMemory0() {
37
31
  if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
@@ -39,9 +33,37 @@ function getUint8ArrayMemory0() {
39
33
  }
40
34
  return cachedUint8ArrayMemory0;
41
35
  }
36
+ var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
37
+ cachedTextDecoder.decode();
38
+ var MAX_SAFARI_DECODE_BYTES = 2146435072;
39
+ var numBytesDecoded = 0;
40
+ function decodeText(ptr, len) {
41
+ numBytesDecoded += len;
42
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
43
+ cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
44
+ cachedTextDecoder.decode();
45
+ numBytesDecoded = len;
46
+ }
47
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
48
+ }
42
49
  function getStringFromWasm0(ptr, len) {
43
50
  ptr = ptr >>> 0;
44
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
51
+ return decodeText(ptr, len);
52
+ }
53
+ function getArrayU8FromWasm0(ptr, len) {
54
+ ptr = ptr >>> 0;
55
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
56
+ }
57
+ var cachedUint32ArrayMemory0 = null;
58
+ function getUint32ArrayMemory0() {
59
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
60
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
61
+ }
62
+ return cachedUint32ArrayMemory0;
63
+ }
64
+ function getArrayU32FromWasm0(ptr, len) {
65
+ ptr = ptr >>> 0;
66
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
45
67
  }
46
68
  function dropObject(idx) {
47
69
  if (idx < 132) return;
@@ -54,19 +76,17 @@ function takeObject(idx) {
54
76
  return ret;
55
77
  }
56
78
  var WASM_VECTOR_LEN = 0;
57
- var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : { encode: () => {
58
- throw Error("TextEncoder not available");
59
- } };
60
- var encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function(arg, view) {
61
- return cachedTextEncoder.encodeInto(arg, view);
62
- } : function(arg, view) {
63
- const buf = cachedTextEncoder.encode(arg);
64
- view.set(buf);
65
- return {
66
- read: arg.length,
67
- written: buf.length
79
+ var cachedTextEncoder = new TextEncoder();
80
+ if (!("encodeInto" in cachedTextEncoder)) {
81
+ cachedTextEncoder.encodeInto = function(arg, view) {
82
+ const buf = cachedTextEncoder.encode(arg);
83
+ view.set(buf);
84
+ return {
85
+ read: arg.length,
86
+ written: buf.length
87
+ };
68
88
  };
69
- };
89
+ }
70
90
  function passStringToWasm0(arg, malloc, realloc) {
71
91
  if (realloc === void 0) {
72
92
  const buf = cachedTextEncoder.encode(arg);
@@ -90,7 +110,7 @@ function passStringToWasm0(arg, malloc, realloc) {
90
110
  }
91
111
  ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
92
112
  const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
93
- const ret = encodeString(arg, view);
113
+ const ret = cachedTextEncoder.encodeInto(arg, view);
94
114
  offset += ret.written;
95
115
  ptr = realloc(ptr, len, offset, 1) >>> 0;
96
116
  }
@@ -107,32 +127,6 @@ function getDataViewMemory0() {
107
127
  function isLikeNone(x) {
108
128
  return x === void 0 || x === null;
109
129
  }
110
- var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: () => {
111
- }, unregister: () => {
112
- } } : new FinalizationRegistry((state) => {
113
- wasm.__wbindgen_export_4.get(state.dtor)(state.a, state.b);
114
- });
115
- function makeMutClosure(arg0, arg1, dtor, f) {
116
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
117
- const real = (...args) => {
118
- state.cnt++;
119
- const a = state.a;
120
- state.a = 0;
121
- try {
122
- return f(a, state.b, ...args);
123
- } finally {
124
- if (--state.cnt === 0) {
125
- wasm.__wbindgen_export_4.get(state.dtor)(a, state.b);
126
- CLOSURE_DTORS.unregister(state);
127
- } else {
128
- state.a = a;
129
- }
130
- }
131
- };
132
- real.original = state;
133
- CLOSURE_DTORS.register(real, state, state);
134
- return real;
135
- }
136
130
  function debugString(val) {
137
131
  const type = typeof val;
138
132
  if (type == "number" || type == "boolean" || val == null) {
@@ -189,15 +183,101 @@ ${val.stack}`;
189
183
  }
190
184
  return className;
191
185
  }
192
- function __wbg_adapter_22(arg0, arg1, arg2) {
186
+ var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: () => {
187
+ }, unregister: () => {
188
+ } } : new FinalizationRegistry(
189
+ (state) => {
190
+ wasm.__wbindgen_export_4.get(state.dtor)(state.a, state.b);
191
+ }
192
+ );
193
+ function makeMutClosure(arg0, arg1, dtor, f) {
194
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
195
+ const real = (...args) => {
196
+ state.cnt++;
197
+ const a = state.a;
198
+ state.a = 0;
199
+ try {
200
+ return f(a, state.b, ...args);
201
+ } finally {
202
+ if (--state.cnt === 0) {
203
+ wasm.__wbindgen_export_4.get(state.dtor)(a, state.b);
204
+ CLOSURE_DTORS.unregister(state);
205
+ } else {
206
+ state.a = a;
207
+ }
208
+ }
209
+ };
210
+ real.original = state;
211
+ CLOSURE_DTORS.register(real, state, state);
212
+ return real;
213
+ }
214
+ function passArray8ToWasm0(arg, malloc) {
215
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
216
+ getUint8ArrayMemory0().set(arg, ptr / 1);
217
+ WASM_VECTOR_LEN = arg.length;
218
+ return ptr;
219
+ }
220
+ function __wbg_adapter_6(arg0, arg1, arg2) {
193
221
  wasm.__wbindgen_export_5(arg0, arg1, addHeapObject(arg2));
194
222
  }
195
- function __wbg_adapter_60(arg0, arg1, arg2, arg3) {
223
+ function __wbg_adapter_48(arg0, arg1, arg2, arg3) {
196
224
  wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
197
225
  }
198
226
  var ProxyContextFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
199
227
  }, unregister: () => {
200
228
  } } : new FinalizationRegistry((ptr) => wasm.__wbg_proxycontext_free(ptr >>> 0, 1));
229
+ var ProxyContext = class {
230
+ __destroy_into_raw() {
231
+ const ptr = this.__wbg_ptr;
232
+ this.__wbg_ptr = 0;
233
+ ProxyContextFinalization.unregister(this);
234
+ return ptr;
235
+ }
236
+ free() {
237
+ const ptr = this.__destroy_into_raw();
238
+ wasm.__wbg_proxycontext_free(ptr, 0);
239
+ }
240
+ /**
241
+ * Creates a new `ProxyContext` instance.
242
+ * @param {any} context
243
+ */
244
+ constructor(context) {
245
+ const ret = wasm.proxycontext_new(addHeapObject(context));
246
+ this.__wbg_ptr = ret >>> 0;
247
+ ProxyContextFinalization.register(this, this.__wbg_ptr, this);
248
+ return this;
249
+ }
250
+ /**
251
+ * Returns the JavaScript this.
252
+ * @returns {any}
253
+ */
254
+ get context() {
255
+ const ret = wasm.proxycontext_context(this.__wbg_ptr);
256
+ return takeObject(ret);
257
+ }
258
+ /**
259
+ * A convenience function to untar a tarball and call a callback for each
260
+ * entry.
261
+ * @param {Uint8Array} data
262
+ * @param {Function} cb
263
+ */
264
+ untar(data, cb) {
265
+ try {
266
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
267
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export_2);
268
+ const len0 = WASM_VECTOR_LEN;
269
+ wasm.proxycontext_untar(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(cb));
270
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
271
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
272
+ if (r1) {
273
+ throw takeObject(r0);
274
+ }
275
+ } finally {
276
+ wasm.__wbindgen_add_to_stack_pointer(16);
277
+ }
278
+ }
279
+ };
280
+ if (Symbol.dispose) ProxyContext.prototype[Symbol.dispose] = ProxyContext.prototype.free;
201
281
  var TypstParserFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
202
282
  }, unregister: () => {
203
283
  } } : new FinalizationRegistry((ptr) => wasm.__wbg_typstparser_free(ptr >>> 0, 1));
@@ -262,6 +342,7 @@ var TypstParser = class _TypstParser {
262
342
  }
263
343
  }
264
344
  };
345
+ if (Symbol.dispose) TypstParser.prototype[Symbol.dispose] = TypstParser.prototype.free;
265
346
  var TypstParserBuilderFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
266
347
  }, unregister: () => {
267
348
  } } : new FinalizationRegistry((ptr) => wasm.__wbg_typstparserbuilder_free(ptr >>> 0, 1));
@@ -302,13 +383,16 @@ var TypstParserBuilder = class {
302
383
  return takeObject(ret);
303
384
  }
304
385
  };
386
+ if (Symbol.dispose) TypstParserBuilder.prototype[Symbol.dispose] = TypstParserBuilder.prototype.free;
387
+ var EXPECTED_RESPONSE_TYPES = /* @__PURE__ */ new Set(["basic", "cors", "default"]);
305
388
  async function __wbg_load(module, imports) {
306
389
  if (typeof Response === "function" && module instanceof Response) {
307
390
  if (typeof WebAssembly.instantiateStreaming === "function") {
308
391
  try {
309
392
  return await WebAssembly.instantiateStreaming(module, imports);
310
393
  } catch (e) {
311
- if (module.headers.get("Content-Type") != "application/wasm") {
394
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
395
+ if (validResponse && module.headers.get("Content-Type") !== "application/wasm") {
312
396
  console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
313
397
  } else {
314
398
  throw e;
@@ -329,23 +413,19 @@ async function __wbg_load(module, imports) {
329
413
  function __wbg_get_imports() {
330
414
  const imports = {};
331
415
  imports.wbg = {};
332
- imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
333
- const ret = getObject(arg0).buffer;
334
- return addHeapObject(ret);
335
- };
336
- imports.wbg.__wbg_call_672a4d21634d4a24 = function() {
416
+ imports.wbg.__wbg_call_13410aac570ffff7 = function() {
337
417
  return handleError(function(arg0, arg1) {
338
418
  const ret = getObject(arg0).call(getObject(arg1));
339
419
  return addHeapObject(ret);
340
420
  }, arguments);
341
421
  };
342
- imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() {
422
+ imports.wbg.__wbg_call_a5400b25a865cfd8 = function() {
343
423
  return handleError(function(arg0, arg1, arg2) {
344
424
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
345
425
  return addHeapObject(ret);
346
426
  }, arguments);
347
427
  };
348
- imports.wbg.__wbg_call_b8adc8b1d0a0d8eb = function() {
428
+ imports.wbg.__wbg_call_f1fd202ba222e0ec = function() {
349
429
  return handleError(function(arg0, arg1, arg2, arg3, arg4) {
350
430
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
351
431
  return addHeapObject(ret);
@@ -362,14 +442,22 @@ function __wbg_get_imports() {
362
442
  wasm.__wbindgen_export_1(deferred0_0, deferred0_1, 1);
363
443
  }
364
444
  };
365
- imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
445
+ imports.wbg.__wbg_new_19c25a3f2fa63a02 = function() {
446
+ const ret = new Object();
447
+ return addHeapObject(ret);
448
+ };
449
+ imports.wbg.__wbg_new_1f3a344cf3123716 = function() {
450
+ const ret = new Array();
451
+ return addHeapObject(ret);
452
+ };
453
+ imports.wbg.__wbg_new_2e3c58a15f39f5f9 = function(arg0, arg1) {
366
454
  try {
367
455
  var state0 = { a: arg0, b: arg1 };
368
456
  var cb0 = (arg02, arg12) => {
369
457
  const a = state0.a;
370
458
  state0.a = 0;
371
459
  try {
372
- return __wbg_adapter_60(a, state0.b, arg02, arg12);
460
+ return __wbg_adapter_48(a, state0.b, arg02, arg12);
373
461
  } finally {
374
462
  state0.a = a;
375
463
  }
@@ -380,59 +468,43 @@ function __wbg_get_imports() {
380
468
  state0.a = state0.b = 0;
381
469
  }
382
470
  };
383
- imports.wbg.__wbg_new_405e22f390576ce2 = function() {
384
- const ret = new Object();
385
- return addHeapObject(ret);
386
- };
387
- imports.wbg.__wbg_new_78feb108b6472713 = function() {
388
- const ret = new Array();
389
- return addHeapObject(ret);
390
- };
391
471
  imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
392
472
  const ret = new Error();
393
473
  return addHeapObject(ret);
394
474
  };
395
- imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
396
- const ret = new Uint8Array(getObject(arg0));
397
- return addHeapObject(ret);
398
- };
399
- imports.wbg.__wbg_new_c68d7209be747379 = function(arg0, arg1) {
475
+ imports.wbg.__wbg_new_da9dc54c5db29dfa = function(arg0, arg1) {
400
476
  const ret = new Error(getStringFromWasm0(arg0, arg1));
401
477
  return addHeapObject(ret);
402
478
  };
403
- imports.wbg.__wbg_new_e3b321dcfef89fc7 = function(arg0) {
404
- const ret = new Uint32Array(getObject(arg0));
479
+ imports.wbg.__wbg_newfromslice_074c56947bd43469 = function(arg0, arg1) {
480
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
405
481
  return addHeapObject(ret);
406
482
  };
407
- imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
408
- const ret = new Function(getStringFromWasm0(arg0, arg1));
409
- return addHeapObject(ret);
410
- };
411
- imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
412
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
483
+ imports.wbg.__wbg_newfromslice_bd5b07f10e7e3c36 = function(arg0, arg1) {
484
+ const ret = new Uint32Array(getArrayU32FromWasm0(arg0, arg1));
413
485
  return addHeapObject(ret);
414
486
  };
415
- imports.wbg.__wbg_newwithbyteoffsetandlength_f1dead44d1fc7212 = function(arg0, arg1, arg2) {
416
- const ret = new Uint32Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
487
+ imports.wbg.__wbg_newnoargs_254190557c45b4ec = function(arg0, arg1) {
488
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
417
489
  return addHeapObject(ret);
418
490
  };
419
- imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
491
+ imports.wbg.__wbg_queueMicrotask_25d0739ac89e8c88 = function(arg0) {
420
492
  queueMicrotask(getObject(arg0));
421
493
  };
422
- imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
494
+ imports.wbg.__wbg_queueMicrotask_4488407636f5bf24 = function(arg0) {
423
495
  const ret = getObject(arg0).queueMicrotask;
424
496
  return addHeapObject(ret);
425
497
  };
426
- imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
498
+ imports.wbg.__wbg_resolve_4055c623acdd6a1b = function(arg0) {
427
499
  const ret = Promise.resolve(getObject(arg0));
428
500
  return addHeapObject(ret);
429
501
  };
430
- imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
431
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
432
- };
433
502
  imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
434
503
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
435
504
  };
505
+ imports.wbg.__wbg_set_90f6c0f7bd8c0415 = function(arg0, arg1, arg2) {
506
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
507
+ };
436
508
  imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
437
509
  const ret = getObject(arg1).stack;
438
510
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_2, wasm.__wbindgen_export_3);
@@ -440,23 +512,23 @@ function __wbg_get_imports() {
440
512
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
441
513
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
442
514
  };
443
- imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
515
+ imports.wbg.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12 = function() {
444
516
  const ret = typeof global === "undefined" ? null : global;
445
517
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
446
518
  };
447
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
519
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184 = function() {
448
520
  const ret = typeof globalThis === "undefined" ? null : globalThis;
449
521
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
450
522
  };
451
- imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
523
+ imports.wbg.__wbg_static_accessor_SELF_995b214ae681ff99 = function() {
452
524
  const ret = typeof self === "undefined" ? null : self;
453
525
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
454
526
  };
455
- imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
527
+ imports.wbg.__wbg_static_accessor_WINDOW_cde3890479c675ea = function() {
456
528
  const ret = typeof window === "undefined" ? null : window;
457
529
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
458
530
  };
459
- imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
531
+ imports.wbg.__wbg_then_e22500defe16819f = function(arg0, arg1) {
460
532
  const ret = getObject(arg0).then(getObject(arg1));
461
533
  return addHeapObject(ret);
462
534
  };
@@ -464,8 +536,8 @@ function __wbg_get_imports() {
464
536
  const ret = TypstParser.__wrap(arg0);
465
537
  return addHeapObject(ret);
466
538
  };
467
- imports.wbg.__wbindgen_cb_drop = function(arg0) {
468
- const obj = takeObject(arg0).original;
539
+ imports.wbg.__wbg_wbindgencbdrop_eb10308566512b88 = function(arg0) {
540
+ const obj = getObject(arg0).original;
469
541
  if (obj.cnt-- == 1) {
470
542
  obj.a = 0;
471
543
  return true;
@@ -473,30 +545,33 @@ function __wbg_get_imports() {
473
545
  const ret = false;
474
546
  return ret;
475
547
  };
476
- imports.wbg.__wbindgen_closure_wrapper74 = function(arg0, arg1, arg2) {
477
- const ret = makeMutClosure(arg0, arg1, 12, __wbg_adapter_22);
478
- return addHeapObject(ret);
479
- };
480
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
548
+ imports.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d = function(arg0, arg1) {
481
549
  const ret = debugString(getObject(arg1));
482
550
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_2, wasm.__wbindgen_export_3);
483
551
  const len1 = WASM_VECTOR_LEN;
484
552
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
485
553
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
486
554
  };
487
- imports.wbg.__wbindgen_is_function = function(arg0) {
555
+ imports.wbg.__wbg_wbindgenisfunction_8cee7dce3725ae74 = function(arg0) {
488
556
  const ret = typeof getObject(arg0) === "function";
489
557
  return ret;
490
558
  };
491
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
559
+ imports.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function(arg0) {
492
560
  const ret = getObject(arg0) === void 0;
493
561
  return ret;
494
562
  };
495
- imports.wbg.__wbindgen_memory = function() {
496
- const ret = wasm.memory;
563
+ imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
564
+ throw new Error(getStringFromWasm0(arg0, arg1));
565
+ };
566
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
567
+ const ret = getStringFromWasm0(arg0, arg1);
568
+ return addHeapObject(ret);
569
+ };
570
+ imports.wbg.__wbindgen_cast_3b1a32895b770b74 = function(arg0, arg1) {
571
+ const ret = makeMutClosure(arg0, arg1, 10, __wbg_adapter_6);
497
572
  return addHeapObject(ret);
498
573
  };
499
- imports.wbg.__wbindgen_number_new = function(arg0) {
574
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
500
575
  const ret = arg0;
501
576
  return addHeapObject(ret);
502
577
  };
@@ -507,13 +582,6 @@ function __wbg_get_imports() {
507
582
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
508
583
  takeObject(arg0);
509
584
  };
510
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
511
- const ret = getStringFromWasm0(arg0, arg1);
512
- return addHeapObject(ret);
513
- };
514
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
515
- throw new Error(getStringFromWasm0(arg0, arg1));
516
- };
517
585
  return imports;
518
586
  }
519
587
  function __wbg_init_memory(imports, memory) {
@@ -522,6 +590,7 @@ function __wbg_finalize_init(instance, module) {
522
590
  wasm = instance.exports;
523
591
  __wbg_init.__wbindgen_wasm_module = module;
524
592
  cachedDataViewMemory0 = null;
593
+ cachedUint32ArrayMemory0 = null;
525
594
  cachedUint8ArrayMemory0 = null;
526
595
  return wasm;
527
596
  }
@@ -67,7 +67,7 @@ export function isGitRepoUrl(url, pathPrefix = '/') {
67
67
  return false;
68
68
  }
69
69
  const re = new RegExp('[\\w\\.-]+\\/?(?!=.git)(?:\\.git\\/?)?$');
70
- return re.test(url.pathname.slice(pathPrefix.length));
70
+ return re.test(url.pathname.slice(pathPrefix.length)) || url.pathname === '/';
71
71
  };
72
72
 
73
73
  export function removeUrlFragment() {
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014-2025 Denis Pushkarev
1
+ Copyright (c) 2014-2025 Denis Pushkarev, 2025 CoreJS Company
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
@@ -7,9 +7,9 @@ var SHARED = '__core-js_shared__';
7
7
  var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
8
8
 
9
9
  (store.versions || (store.versions = [])).push({
10
- version: '3.45.1',
10
+ version: '3.46.0',
11
11
  mode: IS_PURE ? 'pure' : 'global',
12
- copyright: '© 2014-2025 Denis Pushkarev (zloirock.ru)',
13
- license: 'https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE',
12
+ copyright: '© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)',
13
+ license: 'https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE',
14
14
  source: 'https://github.com/zloirock/core-js'
15
15
  });
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
  var $ = require('../internals/export');
3
+ var createProperty = require('../internals/create-property');
3
4
  var getBuiltIn = require('../internals/get-built-in');
4
5
  var uncurryThis = require('../internals/function-uncurry-this');
5
6
  var aCallable = require('../internals/a-callable');
@@ -33,7 +34,7 @@ $({ target: 'Object', stat: true, forced: DOES_NOT_WORK_WITH_PRIMITIVES }, {
33
34
  // in some IE versions, `hasOwnProperty` returns incorrect result on integer keys
34
35
  // but since it's a `null` prototype object, we can safely use `in`
35
36
  if (key in obj) push(obj[key], value);
36
- else obj[key] = [value];
37
+ else createProperty(obj, key, [value]);
37
38
  });
38
39
  return obj;
39
40
  }
@@ -1,4 +1,4 @@
1
- /*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */
1
+ /*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */
2
2
 
3
3
  const {
4
4
  entries,
@@ -184,7 +184,7 @@ function lookupGetter(object, prop) {
184
184
  }
185
185
 
186
186
  const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'search', 'section', 'select', 'shadow', 'slot', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
187
- const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'slot', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
187
+ const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
188
188
  const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
189
189
  // List of SVG elements that are disallowed by default.
190
190
  // We still need to know them so that we can do namespace
@@ -198,7 +198,7 @@ const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongd
198
198
  const text = freeze(['#text']);
199
199
 
200
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', 'exportparts', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inert', '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', 'part', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
201
- const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', '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', 'exponent', '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', 'intercept', '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', 'slope', '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', 'tablevalues', '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']);
201
+ const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', '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', 'exponent', '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', 'intercept', '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', 'mask-type', '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', 'slope', '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', 'tablevalues', '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
202
  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
203
  const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
204
204
 
@@ -305,7 +305,7 @@ const _createHooksMap = function _createHooksMap() {
305
305
  function createDOMPurify() {
306
306
  let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
307
307
  const DOMPurify = root => createDOMPurify(root);
308
- DOMPurify.version = '3.2.7';
308
+ DOMPurify.version = '3.3.0';
309
309
  DOMPurify.removed = [];
310
310
  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
311
311
  // Not running in a browser, provide a factory function
@@ -416,6 +416,21 @@ function createDOMPurify() {
416
416
  let FORBID_TAGS = null;
417
417
  /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
418
418
  let FORBID_ATTR = null;
419
+ /* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */
420
+ const EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {
421
+ tagCheck: {
422
+ writable: true,
423
+ configurable: false,
424
+ enumerable: true,
425
+ value: null
426
+ },
427
+ attributeCheck: {
428
+ writable: true,
429
+ configurable: false,
430
+ enumerable: true,
431
+ value: null
432
+ }
433
+ }));
419
434
  /* Decide if ARIA attributes are okay */
420
435
  let ALLOW_ARIA_ATTR = true;
421
436
  /* Decide if custom data attributes are okay */
@@ -608,16 +623,24 @@ function createDOMPurify() {
608
623
  }
609
624
  /* Merge configuration parameters */
610
625
  if (cfg.ADD_TAGS) {
611
- if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
612
- ALLOWED_TAGS = clone(ALLOWED_TAGS);
626
+ if (typeof cfg.ADD_TAGS === 'function') {
627
+ EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
628
+ } else {
629
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
630
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
631
+ }
632
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
613
633
  }
614
- addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
615
634
  }
616
635
  if (cfg.ADD_ATTR) {
617
- if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
618
- ALLOWED_ATTR = clone(ALLOWED_ATTR);
636
+ if (typeof cfg.ADD_ATTR === 'function') {
637
+ EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
638
+ } else {
639
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
640
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
641
+ }
642
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
619
643
  }
620
- addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
621
644
  }
622
645
  if (cfg.ADD_URI_SAFE_ATTR) {
623
646
  addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
@@ -925,7 +948,7 @@ function createDOMPurify() {
925
948
  return true;
926
949
  }
927
950
  /* Remove element if anything forbids its presence */
928
- if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
951
+ if (!(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName])) {
929
952
  /* Check if we have a custom element to handle */
930
953
  if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
931
954
  if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
@@ -997,7 +1020,7 @@ function createDOMPurify() {
997
1020
  (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
998
1021
  XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
999
1022
  We don't need to check the value; it's always URI safe. */
1000
- if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
1023
+ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
1001
1024
  if (
1002
1025
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1003
1026
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck