@bigbinary/neeto-team-members-frontend 2.5.14 → 2.5.15

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.
package/dist/index.cjs.js CHANGED
@@ -48,6 +48,1763 @@ var i__default = /*#__PURE__*/_interopDefaultLegacy(i$1);
48
48
  var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
49
49
  var z__default = /*#__PURE__*/_interopDefaultLegacy(z);
50
50
 
51
+ /*! @license DOMPurify 3.0.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.0.0/LICENSE */
52
+
53
+ function _typeof$1(obj) {
54
+ "@babel/helpers - typeof";
55
+
56
+ return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
57
+ return typeof obj;
58
+ } : function (obj) {
59
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
60
+ }, _typeof$1(obj);
61
+ }
62
+
63
+ function _setPrototypeOf$1(o, p) {
64
+ _setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
65
+ o.__proto__ = p;
66
+ return o;
67
+ };
68
+
69
+ return _setPrototypeOf$1(o, p);
70
+ }
71
+
72
+ function _isNativeReflectConstruct$4() {
73
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
74
+ if (Reflect.construct.sham) return false;
75
+ if (typeof Proxy === "function") return true;
76
+
77
+ try {
78
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
79
+ return true;
80
+ } catch (e) {
81
+ return false;
82
+ }
83
+ }
84
+
85
+ function _construct(Parent, args, Class) {
86
+ if (_isNativeReflectConstruct$4()) {
87
+ _construct = Reflect.construct;
88
+ } else {
89
+ _construct = function _construct(Parent, args, Class) {
90
+ var a = [null];
91
+ a.push.apply(a, args);
92
+ var Constructor = Function.bind.apply(Parent, a);
93
+ var instance = new Constructor();
94
+ if (Class) _setPrototypeOf$1(instance, Class.prototype);
95
+ return instance;
96
+ };
97
+ }
98
+
99
+ return _construct.apply(null, arguments);
100
+ }
101
+
102
+ function _slicedToArray$1(arr, i) {
103
+ return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1();
104
+ }
105
+
106
+ function _toConsumableArray(arr) {
107
+ return _arrayWithoutHoles(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread();
108
+ }
109
+
110
+ function _arrayWithoutHoles(arr) {
111
+ if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
112
+ }
113
+
114
+ function _arrayWithHoles$1(arr) {
115
+ if (Array.isArray(arr)) return arr;
116
+ }
117
+
118
+ function _iterableToArray$1(iter) {
119
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
120
+ }
121
+
122
+ function _iterableToArrayLimit$1(arr, i) {
123
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
124
+
125
+ if (_i == null) return;
126
+ var _arr = [];
127
+ var _n = true;
128
+ var _d = false;
129
+
130
+ var _s, _e;
131
+
132
+ try {
133
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
134
+ _arr.push(_s.value);
135
+
136
+ if (i && _arr.length === i) break;
137
+ }
138
+ } catch (err) {
139
+ _d = true;
140
+ _e = err;
141
+ } finally {
142
+ try {
143
+ if (!_n && _i["return"] != null) _i["return"]();
144
+ } finally {
145
+ if (_d) throw _e;
146
+ }
147
+ }
148
+
149
+ return _arr;
150
+ }
151
+
152
+ function _unsupportedIterableToArray$1(o, minLen) {
153
+ if (!o) return;
154
+ if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
155
+ var n = Object.prototype.toString.call(o).slice(8, -1);
156
+ if (n === "Object" && o.constructor) n = o.constructor.name;
157
+ if (n === "Map" || n === "Set") return Array.from(o);
158
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
159
+ }
160
+
161
+ function _arrayLikeToArray$1(arr, len) {
162
+ if (len == null || len > arr.length) len = arr.length;
163
+
164
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
165
+
166
+ return arr2;
167
+ }
168
+
169
+ function _nonIterableSpread() {
170
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
171
+ }
172
+
173
+ function _nonIterableRest$1() {
174
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
175
+ }
176
+
177
+ function _createForOfIteratorHelper(o, allowArrayLike) {
178
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
179
+
180
+ if (!it) {
181
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") {
182
+ if (it) o = it;
183
+ var i = 0;
184
+
185
+ var F = function () {};
186
+
187
+ return {
188
+ s: F,
189
+ n: function () {
190
+ if (i >= o.length) return {
191
+ done: true
192
+ };
193
+ return {
194
+ done: false,
195
+ value: o[i++]
196
+ };
197
+ },
198
+ e: function (e) {
199
+ throw e;
200
+ },
201
+ f: F
202
+ };
203
+ }
204
+
205
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
206
+ }
207
+
208
+ var normalCompletion = true,
209
+ didErr = false,
210
+ err;
211
+ return {
212
+ s: function () {
213
+ it = it.call(o);
214
+ },
215
+ n: function () {
216
+ var step = it.next();
217
+ normalCompletion = step.done;
218
+ return step;
219
+ },
220
+ e: function (e) {
221
+ didErr = true;
222
+ err = e;
223
+ },
224
+ f: function () {
225
+ try {
226
+ if (!normalCompletion && it.return != null) it.return();
227
+ } finally {
228
+ if (didErr) throw err;
229
+ }
230
+ }
231
+ };
232
+ }
233
+
234
+ var entries = Object.entries,
235
+ setPrototypeOf = Object.setPrototypeOf,
236
+ isFrozen = Object.isFrozen,
237
+ getPrototypeOf = Object.getPrototypeOf,
238
+ getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
239
+ var freeze = Object.freeze,
240
+ seal = Object.seal,
241
+ create$2 = Object.create; // eslint-disable-line import/no-mutable-exports
242
+
243
+ var _ref = typeof Reflect !== 'undefined' && Reflect,
244
+ apply = _ref.apply,
245
+ construct = _ref.construct;
246
+
247
+ if (!apply) {
248
+ apply = function apply(fun, thisValue, args) {
249
+ return fun.apply(thisValue, args);
250
+ };
251
+ }
252
+
253
+ if (!freeze) {
254
+ freeze = function freeze(x) {
255
+ return x;
256
+ };
257
+ }
258
+
259
+ if (!seal) {
260
+ seal = function seal(x) {
261
+ return x;
262
+ };
263
+ }
264
+
265
+ if (!construct) {
266
+ construct = function construct(Func, args) {
267
+ return _construct(Func, _toConsumableArray(args));
268
+ };
269
+ }
270
+
271
+ var arrayForEach = unapply(Array.prototype.forEach);
272
+ var arrayPop = unapply(Array.prototype.pop);
273
+ var arrayPush = unapply(Array.prototype.push);
274
+ var stringToLowerCase = unapply(String.prototype.toLowerCase);
275
+ var stringToString = unapply(String.prototype.toString);
276
+ var stringMatch = unapply(String.prototype.match);
277
+ var stringReplace = unapply(String.prototype.replace);
278
+ var stringIndexOf = unapply(String.prototype.indexOf);
279
+ var stringTrim = unapply(String.prototype.trim);
280
+ var regExpTest = unapply(RegExp.prototype.test);
281
+ var typeErrorCreate = unconstruct(TypeError);
282
+ function unapply(func) {
283
+ return function (thisArg) {
284
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
285
+ args[_key - 1] = arguments[_key];
286
+ }
287
+
288
+ return apply(func, thisArg, args);
289
+ };
290
+ }
291
+ function unconstruct(func) {
292
+ return function () {
293
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
294
+ args[_key2] = arguments[_key2];
295
+ }
296
+
297
+ return construct(func, args);
298
+ };
299
+ }
300
+ /* Add properties to a lookup table */
301
+
302
+ function addToSet(set, array, transformCaseFunc) {
303
+ transformCaseFunc = transformCaseFunc ? transformCaseFunc : stringToLowerCase;
304
+
305
+ if (setPrototypeOf) {
306
+ // Make 'in' and truthy checks like Boolean(set.constructor)
307
+ // independent of any properties defined on Object.prototype.
308
+ // Prevent prototype setters from intercepting set as a this value.
309
+ setPrototypeOf(set, null);
310
+ }
311
+
312
+ var l = array.length;
313
+
314
+ while (l--) {
315
+ var element = array[l];
316
+
317
+ if (typeof element === 'string') {
318
+ var lcElement = transformCaseFunc(element);
319
+
320
+ if (lcElement !== element) {
321
+ // Config presets (e.g. tags.js, attrs.js) are immutable.
322
+ if (!isFrozen(array)) {
323
+ array[l] = lcElement;
324
+ }
325
+
326
+ element = lcElement;
327
+ }
328
+ }
329
+
330
+ set[element] = true;
331
+ }
332
+
333
+ return set;
334
+ }
335
+ /* Shallow clone an object */
336
+
337
+ function clone(object) {
338
+ var newObject = create$2(null);
339
+
340
+ var _iterator = _createForOfIteratorHelper(entries(object)),
341
+ _step;
342
+
343
+ try {
344
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
345
+ var _step$value = _slicedToArray$1(_step.value, 2),
346
+ property = _step$value[0],
347
+ value = _step$value[1];
348
+
349
+ newObject[property] = value;
350
+ }
351
+ } catch (err) {
352
+ _iterator.e(err);
353
+ } finally {
354
+ _iterator.f();
355
+ }
356
+
357
+ return newObject;
358
+ }
359
+ /* This method automatically checks if the prop is function
360
+ * or getter and behaves accordingly. */
361
+
362
+ function lookupGetter(object, prop) {
363
+ while (object !== null) {
364
+ var desc = getOwnPropertyDescriptor(object, prop);
365
+
366
+ if (desc) {
367
+ if (desc.get) {
368
+ return unapply(desc.get);
369
+ }
370
+
371
+ if (typeof desc.value === 'function') {
372
+ return unapply(desc.value);
373
+ }
374
+ }
375
+
376
+ object = getPrototypeOf(object);
377
+ }
378
+
379
+ function fallbackValue(element) {
380
+ console.warn('fallback value for', element);
381
+ return null;
382
+ }
383
+
384
+ return fallbackValue;
385
+ }
386
+
387
+ var 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', 'section', 'select', 'shadow', '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']); // SVG
388
+
389
+ var svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
390
+ var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default.
391
+ // We still need to know them so that we can do namespace
392
+ // checks properly in case one wants to add them to
393
+ // allow-list.
394
+
395
+ var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
396
+ var mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']); // Similarly to SVG, we want to know all MathML elements,
397
+ // even those that we disallow by default.
398
+
399
+ var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
400
+ var text = freeze(['#text']);
401
+
402
+ var html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);
403
+ var svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
404
+ var 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']);
405
+ var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
406
+
407
+ var MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
408
+
409
+ var ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
410
+ var TMPLIT_EXPR = seal(/\${[\w\W]*}/gm);
411
+ var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape
412
+
413
+ var ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
414
+
415
+ var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
416
+ );
417
+ var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
418
+ var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
419
+ );
420
+ var DOCTYPE_NAME = seal(/^html$/i);
421
+
422
+ var getGlobal = function getGlobal() {
423
+ return typeof window === 'undefined' ? null : window;
424
+ };
425
+ /**
426
+ * Creates a no-op policy for internal use only.
427
+ * Don't export this function outside this module!
428
+ * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.
429
+ * @param {Document} document The document object (to determine policy name suffix)
430
+ * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types
431
+ * are not supported).
432
+ */
433
+
434
+
435
+ var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {
436
+ if (_typeof$1(trustedTypes) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
437
+ return null;
438
+ } // Allow the callers to control the unique policy name
439
+ // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
440
+ // Policy creation with duplicate names throws in Trusted Types.
441
+
442
+
443
+ var suffix = null;
444
+ var ATTR_NAME = 'data-tt-policy-suffix';
445
+
446
+ if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {
447
+ suffix = document.currentScript.getAttribute(ATTR_NAME);
448
+ }
449
+
450
+ var policyName = 'dompurify' + (suffix ? '#' + suffix : '');
451
+
452
+ try {
453
+ return trustedTypes.createPolicy(policyName, {
454
+ createHTML: function createHTML(html) {
455
+ return html;
456
+ },
457
+ createScriptURL: function createScriptURL(scriptUrl) {
458
+ return scriptUrl;
459
+ }
460
+ });
461
+ } catch (_) {
462
+ // Policy creation failed (most likely another DOMPurify script has
463
+ // already run). Skip creating the policy, as this will only cause errors
464
+ // if TT are enforced.
465
+ console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
466
+ return null;
467
+ }
468
+ };
469
+
470
+ function createDOMPurify() {
471
+ var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
472
+
473
+ var DOMPurify = function DOMPurify(root) {
474
+ return createDOMPurify(root);
475
+ };
476
+ /**
477
+ * Version label, exposed for easier checks
478
+ * if DOMPurify is up to date or not
479
+ */
480
+
481
+
482
+ DOMPurify.version = '3.0.0';
483
+ /**
484
+ * Array of elements that DOMPurify removed during sanitation.
485
+ * Empty if nothing was removed.
486
+ */
487
+
488
+ DOMPurify.removed = [];
489
+
490
+ if (!window || !window.document || window.document.nodeType !== 9) {
491
+ // Not running in a browser, provide a factory function
492
+ // so that you can pass your own Window
493
+ DOMPurify.isSupported = false;
494
+ return DOMPurify;
495
+ }
496
+
497
+ var originalDocument = window.document;
498
+ var document = window.document;
499
+ var DocumentFragment = window.DocumentFragment,
500
+ HTMLTemplateElement = window.HTMLTemplateElement,
501
+ Node = window.Node,
502
+ Element = window.Element,
503
+ NodeFilter = window.NodeFilter,
504
+ _window$NamedNodeMap = window.NamedNodeMap,
505
+ NamedNodeMap = _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,
506
+ HTMLFormElement = window.HTMLFormElement,
507
+ DOMParser = window.DOMParser,
508
+ trustedTypes = window.trustedTypes;
509
+ var ElementPrototype = Element.prototype;
510
+ var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
511
+ var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
512
+ var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
513
+ var getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a
514
+ // new document created via createHTMLDocument. As per the spec
515
+ // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
516
+ // a new empty registry is used when creating a template contents owner
517
+ // document, so we use that as our parent document to ensure nothing
518
+ // is inherited.
519
+
520
+ if (typeof HTMLTemplateElement === 'function') {
521
+ var template = document.createElement('template');
522
+
523
+ if (template.content && template.content.ownerDocument) {
524
+ document = template.content.ownerDocument;
525
+ }
526
+ }
527
+
528
+ var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);
529
+
530
+ var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : '';
531
+ var _document = document,
532
+ implementation = _document.implementation,
533
+ createNodeIterator = _document.createNodeIterator,
534
+ createDocumentFragment = _document.createDocumentFragment,
535
+ getElementsByTagName = _document.getElementsByTagName;
536
+ var importNode = originalDocument.importNode;
537
+ var hooks = {};
538
+ /**
539
+ * Expose whether this browser supports running the full DOMPurify.
540
+ */
541
+
542
+ DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined';
543
+ var MUSTACHE_EXPR$1 = MUSTACHE_EXPR,
544
+ ERB_EXPR$1 = ERB_EXPR,
545
+ TMPLIT_EXPR$1 = TMPLIT_EXPR,
546
+ DATA_ATTR$1 = DATA_ATTR,
547
+ ARIA_ATTR$1 = ARIA_ATTR,
548
+ IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,
549
+ ATTR_WHITESPACE$1 = ATTR_WHITESPACE;
550
+ var IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
551
+ /**
552
+ * We consider the elements and attributes below to be safe. Ideally
553
+ * don't add any new ones but feel free to remove unwanted ones.
554
+ */
555
+
556
+ /* allowed element names */
557
+
558
+ var ALLOWED_TAGS = null;
559
+ var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(svgFilters), _toConsumableArray(mathMl$1), _toConsumableArray(text)));
560
+ /* Allowed attribute names */
561
+
562
+ var ALLOWED_ATTR = null;
563
+ var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg), _toConsumableArray(mathMl), _toConsumableArray(xml)));
564
+ /*
565
+ * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.
566
+ * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
567
+ * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
568
+ * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
569
+ */
570
+
571
+ var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, {
572
+ tagNameCheck: {
573
+ writable: true,
574
+ configurable: false,
575
+ enumerable: true,
576
+ value: null
577
+ },
578
+ attributeNameCheck: {
579
+ writable: true,
580
+ configurable: false,
581
+ enumerable: true,
582
+ value: null
583
+ },
584
+ allowCustomizedBuiltInElements: {
585
+ writable: true,
586
+ configurable: false,
587
+ enumerable: true,
588
+ value: false
589
+ }
590
+ }));
591
+ /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
592
+
593
+ var FORBID_TAGS = null;
594
+ /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
595
+
596
+ var FORBID_ATTR = null;
597
+ /* Decide if ARIA attributes are okay */
598
+
599
+ var ALLOW_ARIA_ATTR = true;
600
+ /* Decide if custom data attributes are okay */
601
+
602
+ var ALLOW_DATA_ATTR = true;
603
+ /* Decide if unknown protocols are okay */
604
+
605
+ var ALLOW_UNKNOWN_PROTOCOLS = false;
606
+ /* Decide if self-closing tags in attributes are allowed.
607
+ * Usually removed due to a mXSS issue in jQuery 3.0 */
608
+
609
+ var ALLOW_SELF_CLOSE_IN_ATTR = true;
610
+ /* Output should be safe for common template engines.
611
+ * This means, DOMPurify removes data attributes, mustaches and ERB
612
+ */
613
+
614
+ var SAFE_FOR_TEMPLATES = false;
615
+ /* Decide if document with <html>... should be returned */
616
+
617
+ var WHOLE_DOCUMENT = false;
618
+ /* Track whether config is already set on this instance of DOMPurify. */
619
+
620
+ var SET_CONFIG = false;
621
+ /* Decide if all elements (e.g. style, script) must be children of
622
+ * document.body. By default, browsers might move them to document.head */
623
+
624
+ var FORCE_BODY = false;
625
+ /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
626
+ * string (or a TrustedHTML object if Trusted Types are supported).
627
+ * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
628
+ */
629
+
630
+ var RETURN_DOM = false;
631
+ /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
632
+ * string (or a TrustedHTML object if Trusted Types are supported) */
633
+
634
+ var RETURN_DOM_FRAGMENT = false;
635
+ /* Try to return a Trusted Type object instead of a string, return a string in
636
+ * case Trusted Types are not supported */
637
+
638
+ var RETURN_TRUSTED_TYPE = false;
639
+ /* Output should be free from DOM clobbering attacks?
640
+ * This sanitizes markups named with colliding, clobberable built-in DOM APIs.
641
+ */
642
+
643
+ var SANITIZE_DOM = true;
644
+ /* Achieve full DOM Clobbering protection by isolating the namespace of named
645
+ * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
646
+ *
647
+ * HTML/DOM spec rules that enable DOM Clobbering:
648
+ * - Named Access on Window (§7.3.3)
649
+ * - DOM Tree Accessors (§3.1.5)
650
+ * - Form Element Parent-Child Relations (§4.10.3)
651
+ * - Iframe srcdoc / Nested WindowProxies (§4.8.5)
652
+ * - HTMLCollection (§4.2.10.2)
653
+ *
654
+ * Namespace isolation is implemented by prefixing `id` and `name` attributes
655
+ * with a constant string, i.e., `user-content-`
656
+ */
657
+
658
+ var SANITIZE_NAMED_PROPS = false;
659
+ var SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
660
+ /* Keep element content when removing element? */
661
+
662
+ var KEEP_CONTENT = true;
663
+ /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
664
+ * of importing it into a new Document and returning a sanitized copy */
665
+
666
+ var IN_PLACE = false;
667
+ /* Allow usage of profiles like html, svg and mathMl */
668
+
669
+ var USE_PROFILES = {};
670
+ /* Tags to ignore content of when KEEP_CONTENT is true */
671
+
672
+ var FORBID_CONTENTS = null;
673
+ var DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
674
+ /* Tags that are safe for data: URIs */
675
+
676
+ var DATA_URI_TAGS = null;
677
+ var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
678
+ /* Attributes safe for values like "javascript:" */
679
+
680
+ var URI_SAFE_ATTRIBUTES = null;
681
+ var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
682
+ var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
683
+ var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
684
+ var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
685
+ /* Document namespace */
686
+
687
+ var NAMESPACE = HTML_NAMESPACE;
688
+ var IS_EMPTY_INPUT = false;
689
+ /* Allowed XHTML+XML namespaces */
690
+
691
+ var ALLOWED_NAMESPACES = null;
692
+ var DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
693
+ /* Parsing of strict XHTML documents */
694
+
695
+ var PARSER_MEDIA_TYPE;
696
+ var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
697
+ var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
698
+ var transformCaseFunc;
699
+ /* Keep a reference to config to pass to hooks */
700
+
701
+ var CONFIG = null;
702
+ /* Ideally, do not touch anything below this line */
703
+
704
+ /* ______________________________________________ */
705
+
706
+ var formElement = document.createElement('form');
707
+
708
+ var isRegexOrFunction = function isRegexOrFunction(testValue) {
709
+ return testValue instanceof RegExp || testValue instanceof Function;
710
+ };
711
+ /**
712
+ * _parseConfig
713
+ *
714
+ * @param {Object} cfg optional config literal
715
+ */
716
+ // eslint-disable-next-line complexity
717
+
718
+
719
+ var _parseConfig = function _parseConfig(cfg) {
720
+ if (CONFIG && CONFIG === cfg) {
721
+ return;
722
+ }
723
+ /* Shield configuration object from tampering */
724
+
725
+
726
+ if (!cfg || _typeof$1(cfg) !== 'object') {
727
+ cfg = {};
728
+ }
729
+ /* Shield configuration object from prototype pollution */
730
+
731
+
732
+ cfg = clone(cfg);
733
+ PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
734
+ SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
735
+
736
+ transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
737
+ /* Set configuration parameters */
738
+
739
+ ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
740
+ ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
741
+ ALLOWED_NAMESPACES = 'ALLOWED_NAMESPACES' in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
742
+ URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent
743
+ cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent
744
+ transformCaseFunc // eslint-disable-line indent
745
+ ) // eslint-disable-line indent
746
+ : DEFAULT_URI_SAFE_ATTRIBUTES;
747
+ DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent
748
+ cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent
749
+ transformCaseFunc // eslint-disable-line indent
750
+ ) // eslint-disable-line indent
751
+ : DEFAULT_DATA_URI_TAGS;
752
+ FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
753
+ FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};
754
+ FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};
755
+ USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;
756
+ ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
757
+
758
+ ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
759
+
760
+ ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
761
+
762
+ ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true
763
+
764
+ SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
765
+
766
+ WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
767
+
768
+ RETURN_DOM = cfg.RETURN_DOM || false; // Default false
769
+
770
+ RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
771
+
772
+ RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
773
+
774
+ FORCE_BODY = cfg.FORCE_BODY || false; // Default false
775
+
776
+ SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
777
+
778
+ SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
779
+
780
+ KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
781
+
782
+ IN_PLACE = cfg.IN_PLACE || false; // Default false
783
+
784
+ IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$1;
785
+ NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
786
+
787
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
788
+ CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
789
+ }
790
+
791
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
792
+ CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
793
+ }
794
+
795
+ if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
796
+ CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
797
+ }
798
+
799
+ if (SAFE_FOR_TEMPLATES) {
800
+ ALLOW_DATA_ATTR = false;
801
+ }
802
+
803
+ if (RETURN_DOM_FRAGMENT) {
804
+ RETURN_DOM = true;
805
+ }
806
+ /* Parse profile info */
807
+
808
+
809
+ if (USE_PROFILES) {
810
+ ALLOWED_TAGS = addToSet({}, _toConsumableArray(text));
811
+ ALLOWED_ATTR = [];
812
+
813
+ if (USE_PROFILES.html === true) {
814
+ addToSet(ALLOWED_TAGS, html$1);
815
+ addToSet(ALLOWED_ATTR, html);
816
+ }
817
+
818
+ if (USE_PROFILES.svg === true) {
819
+ addToSet(ALLOWED_TAGS, svg$1);
820
+ addToSet(ALLOWED_ATTR, svg);
821
+ addToSet(ALLOWED_ATTR, xml);
822
+ }
823
+
824
+ if (USE_PROFILES.svgFilters === true) {
825
+ addToSet(ALLOWED_TAGS, svgFilters);
826
+ addToSet(ALLOWED_ATTR, svg);
827
+ addToSet(ALLOWED_ATTR, xml);
828
+ }
829
+
830
+ if (USE_PROFILES.mathMl === true) {
831
+ addToSet(ALLOWED_TAGS, mathMl$1);
832
+ addToSet(ALLOWED_ATTR, mathMl);
833
+ addToSet(ALLOWED_ATTR, xml);
834
+ }
835
+ }
836
+ /* Merge configuration parameters */
837
+
838
+
839
+ if (cfg.ADD_TAGS) {
840
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
841
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
842
+ }
843
+
844
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
845
+ }
846
+
847
+ if (cfg.ADD_ATTR) {
848
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
849
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
850
+ }
851
+
852
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
853
+ }
854
+
855
+ if (cfg.ADD_URI_SAFE_ATTR) {
856
+ addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
857
+ }
858
+
859
+ if (cfg.FORBID_CONTENTS) {
860
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
861
+ FORBID_CONTENTS = clone(FORBID_CONTENTS);
862
+ }
863
+
864
+ addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
865
+ }
866
+ /* Add #text in case KEEP_CONTENT is set to true */
867
+
868
+
869
+ if (KEEP_CONTENT) {
870
+ ALLOWED_TAGS['#text'] = true;
871
+ }
872
+ /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
873
+
874
+
875
+ if (WHOLE_DOCUMENT) {
876
+ addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
877
+ }
878
+ /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
879
+
880
+
881
+ if (ALLOWED_TAGS.table) {
882
+ addToSet(ALLOWED_TAGS, ['tbody']);
883
+ delete FORBID_TAGS.tbody;
884
+ } // Prevent further manipulation of configuration.
885
+ // Not available in IE8, Safari 5, etc.
886
+
887
+
888
+ if (freeze) {
889
+ freeze(cfg);
890
+ }
891
+
892
+ CONFIG = cfg;
893
+ };
894
+
895
+ var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
896
+ var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML
897
+ // namespace. We need to specify them explicitly
898
+ // so that they don't get erroneously deleted from
899
+ // HTML namespace.
900
+
901
+ var COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
902
+ /* Keep track of all possible SVG and MathML tags
903
+ * so that we can perform the namespace checks
904
+ * correctly. */
905
+
906
+ var ALL_SVG_TAGS = addToSet({}, svg$1);
907
+ addToSet(ALL_SVG_TAGS, svgFilters);
908
+ addToSet(ALL_SVG_TAGS, svgDisallowed);
909
+ var ALL_MATHML_TAGS = addToSet({}, mathMl$1);
910
+ addToSet(ALL_MATHML_TAGS, mathMlDisallowed);
911
+ /**
912
+ *
913
+ *
914
+ * @param {Element} element a DOM element whose namespace is being checked
915
+ * @returns {boolean} Return false if the element has a
916
+ * namespace that a spec-compliant parser would never
917
+ * return. Return true otherwise.
918
+ */
919
+
920
+ var _checkValidNamespace = function _checkValidNamespace(element) {
921
+ var parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode
922
+ // can be null. We just simulate parent in this case.
923
+
924
+ if (!parent || !parent.tagName) {
925
+ parent = {
926
+ namespaceURI: NAMESPACE,
927
+ tagName: 'template'
928
+ };
929
+ }
930
+
931
+ var tagName = stringToLowerCase(element.tagName);
932
+ var parentTagName = stringToLowerCase(parent.tagName);
933
+
934
+ if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
935
+ return false;
936
+ }
937
+
938
+ if (element.namespaceURI === SVG_NAMESPACE) {
939
+ // The only way to switch from HTML namespace to SVG
940
+ // is via <svg>. If it happens via any other tag, then
941
+ // it should be killed.
942
+ if (parent.namespaceURI === HTML_NAMESPACE) {
943
+ return tagName === 'svg';
944
+ } // The only way to switch from MathML to SVG is via`
945
+ // svg if parent is either <annotation-xml> or MathML
946
+ // text integration points.
947
+
948
+
949
+ if (parent.namespaceURI === MATHML_NAMESPACE) {
950
+ return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
951
+ } // We only allow elements that are defined in SVG
952
+ // spec. All others are disallowed in SVG namespace.
953
+
954
+
955
+ return Boolean(ALL_SVG_TAGS[tagName]);
956
+ }
957
+
958
+ if (element.namespaceURI === MATHML_NAMESPACE) {
959
+ // The only way to switch from HTML namespace to MathML
960
+ // is via <math>. If it happens via any other tag, then
961
+ // it should be killed.
962
+ if (parent.namespaceURI === HTML_NAMESPACE) {
963
+ return tagName === 'math';
964
+ } // The only way to switch from SVG to MathML is via
965
+ // <math> and HTML integration points
966
+
967
+
968
+ if (parent.namespaceURI === SVG_NAMESPACE) {
969
+ return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
970
+ } // We only allow elements that are defined in MathML
971
+ // spec. All others are disallowed in MathML namespace.
972
+
973
+
974
+ return Boolean(ALL_MATHML_TAGS[tagName]);
975
+ }
976
+
977
+ if (element.namespaceURI === HTML_NAMESPACE) {
978
+ // The only way to switch from SVG to HTML is via
979
+ // HTML integration points, and from MathML to HTML
980
+ // is via MathML text integration points
981
+ if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
982
+ return false;
983
+ }
984
+
985
+ if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
986
+ return false;
987
+ } // We disallow tags that are specific for MathML
988
+ // or SVG and should never appear in HTML namespace
989
+
990
+
991
+ return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
992
+ } // For XHTML and XML documents that support custom namespaces
993
+
994
+
995
+ if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
996
+ return true;
997
+ } // The code should never reach this place (this means
998
+ // that the element somehow got namespace that is not
999
+ // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
1000
+ // Return false just in case.
1001
+
1002
+
1003
+ return false;
1004
+ };
1005
+ /**
1006
+ * _forceRemove
1007
+ *
1008
+ * @param {Node} node a DOM node
1009
+ */
1010
+
1011
+
1012
+ var _forceRemove = function _forceRemove(node) {
1013
+ arrayPush(DOMPurify.removed, {
1014
+ element: node
1015
+ });
1016
+
1017
+ try {
1018
+ // eslint-disable-next-line unicorn/prefer-dom-node-remove
1019
+ node.parentNode.removeChild(node);
1020
+ } catch (_) {
1021
+ node.remove();
1022
+ }
1023
+ };
1024
+ /**
1025
+ * _removeAttribute
1026
+ *
1027
+ * @param {String} name an Attribute name
1028
+ * @param {Node} node a DOM node
1029
+ */
1030
+
1031
+
1032
+ var _removeAttribute = function _removeAttribute(name, node) {
1033
+ try {
1034
+ arrayPush(DOMPurify.removed, {
1035
+ attribute: node.getAttributeNode(name),
1036
+ from: node
1037
+ });
1038
+ } catch (_) {
1039
+ arrayPush(DOMPurify.removed, {
1040
+ attribute: null,
1041
+ from: node
1042
+ });
1043
+ }
1044
+
1045
+ node.removeAttribute(name); // We void attribute values for unremovable "is"" attributes
1046
+
1047
+ if (name === 'is' && !ALLOWED_ATTR[name]) {
1048
+ if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
1049
+ try {
1050
+ _forceRemove(node);
1051
+ } catch (_) {}
1052
+ } else {
1053
+ try {
1054
+ node.setAttribute(name, '');
1055
+ } catch (_) {}
1056
+ }
1057
+ }
1058
+ };
1059
+ /**
1060
+ * _initDocument
1061
+ *
1062
+ * @param {String} dirty a string of dirty markup
1063
+ * @return {Document} a DOM, filled with the dirty markup
1064
+ */
1065
+
1066
+
1067
+ var _initDocument = function _initDocument(dirty) {
1068
+ /* Create a HTML document */
1069
+ var doc;
1070
+ var leadingWhitespace;
1071
+
1072
+ if (FORCE_BODY) {
1073
+ dirty = '<remove></remove>' + dirty;
1074
+ } else {
1075
+ /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
1076
+ var matches = stringMatch(dirty, /^[\r\n\t ]+/);
1077
+ leadingWhitespace = matches && matches[0];
1078
+ }
1079
+
1080
+ if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {
1081
+ // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
1082
+ dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
1083
+ }
1084
+
1085
+ var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
1086
+ /*
1087
+ * Use the DOMParser API by default, fallback later if needs be
1088
+ * DOMParser not work for svg when has multiple root element.
1089
+ */
1090
+
1091
+ if (NAMESPACE === HTML_NAMESPACE) {
1092
+ try {
1093
+ doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
1094
+ } catch (_) {}
1095
+ }
1096
+ /* Use createHTMLDocument in case DOMParser is not available */
1097
+
1098
+
1099
+ if (!doc || !doc.documentElement) {
1100
+ doc = implementation.createDocument(NAMESPACE, 'template', null);
1101
+
1102
+ try {
1103
+ doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
1104
+ } catch (_) {// Syntax error if dirtyPayload is invalid xml
1105
+ }
1106
+ }
1107
+
1108
+ var body = doc.body || doc.documentElement;
1109
+
1110
+ if (dirty && leadingWhitespace) {
1111
+ body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
1112
+ }
1113
+ /* Work on whole document or just its body */
1114
+
1115
+
1116
+ if (NAMESPACE === HTML_NAMESPACE) {
1117
+ return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
1118
+ }
1119
+
1120
+ return WHOLE_DOCUMENT ? doc.documentElement : body;
1121
+ };
1122
+ /**
1123
+ * _createIterator
1124
+ *
1125
+ * @param {Document} root document/fragment to create iterator for
1126
+ * @return {Iterator} iterator instance
1127
+ */
1128
+
1129
+
1130
+ var _createIterator = function _createIterator(root) {
1131
+ return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise
1132
+ NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);
1133
+ };
1134
+ /**
1135
+ * _isClobbered
1136
+ *
1137
+ * @param {Node} elm element to check for clobbering attacks
1138
+ * @return {Boolean} true if clobbered, false if safe
1139
+ */
1140
+
1141
+
1142
+ var _isClobbered = function _isClobbered(elm) {
1143
+ return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');
1144
+ };
1145
+ /**
1146
+ * _isNode
1147
+ *
1148
+ * @param {Node} obj object to check whether it's a DOM node
1149
+ * @return {Boolean} true is object is a DOM node
1150
+ */
1151
+
1152
+
1153
+ var _isNode = function _isNode(object) {
1154
+ return _typeof$1(Node) === 'object' ? object instanceof Node : object && _typeof$1(object) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';
1155
+ };
1156
+ /**
1157
+ * _executeHook
1158
+ * Execute user configurable hooks
1159
+ *
1160
+ * @param {String} entryPoint Name of the hook's entry point
1161
+ * @param {Node} currentNode node to work on with the hook
1162
+ * @param {Object} data additional hook parameters
1163
+ */
1164
+
1165
+
1166
+ var _executeHook = function _executeHook(entryPoint, currentNode, data) {
1167
+ if (!hooks[entryPoint]) {
1168
+ return;
1169
+ }
1170
+
1171
+ arrayForEach(hooks[entryPoint], function (hook) {
1172
+ hook.call(DOMPurify, currentNode, data, CONFIG);
1173
+ });
1174
+ };
1175
+ /**
1176
+ * _sanitizeElements
1177
+ *
1178
+ * @protect nodeName
1179
+ * @protect textContent
1180
+ * @protect removeChild
1181
+ *
1182
+ * @param {Node} currentNode to check for permission to exist
1183
+ * @return {Boolean} true if node was killed, false if left alive
1184
+ */
1185
+
1186
+
1187
+ var _sanitizeElements = function _sanitizeElements(currentNode) {
1188
+ var content;
1189
+ /* Execute a hook if present */
1190
+
1191
+ _executeHook('beforeSanitizeElements', currentNode, null);
1192
+ /* Check if element is clobbered or can clobber */
1193
+
1194
+
1195
+ if (_isClobbered(currentNode)) {
1196
+ _forceRemove(currentNode);
1197
+
1198
+ return true;
1199
+ }
1200
+ /* Now let's check the element's type and name */
1201
+
1202
+
1203
+ var tagName = transformCaseFunc(currentNode.nodeName);
1204
+ /* Execute a hook if present */
1205
+
1206
+ _executeHook('uponSanitizeElement', currentNode, {
1207
+ tagName: tagName,
1208
+ allowedTags: ALLOWED_TAGS
1209
+ });
1210
+ /* Detect mXSS attempts abusing namespace confusion */
1211
+
1212
+
1213
+ if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
1214
+ _forceRemove(currentNode);
1215
+
1216
+ return true;
1217
+ }
1218
+ /* Remove element if anything forbids its presence */
1219
+
1220
+
1221
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
1222
+ /* Check if we have a custom element to handle */
1223
+ if (!FORBID_TAGS[tagName] && _basicCustomElementTest(tagName)) {
1224
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;
1225
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) return false;
1226
+ }
1227
+ /* Keep content except for bad-listed elements */
1228
+
1229
+
1230
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
1231
+ var parentNode = getParentNode(currentNode) || currentNode.parentNode;
1232
+ var childNodes = getChildNodes(currentNode) || currentNode.childNodes;
1233
+
1234
+ if (childNodes && parentNode) {
1235
+ var childCount = childNodes.length;
1236
+
1237
+ for (var i = childCount - 1; i >= 0; --i) {
1238
+ parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));
1239
+ }
1240
+ }
1241
+ }
1242
+
1243
+ _forceRemove(currentNode);
1244
+
1245
+ return true;
1246
+ }
1247
+ /* Check whether element has a valid namespace */
1248
+
1249
+
1250
+ if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
1251
+ _forceRemove(currentNode);
1252
+
1253
+ return true;
1254
+ }
1255
+ /* Make sure that older browsers don't get noscript mXSS */
1256
+
1257
+
1258
+ if ((tagName === 'noscript' || tagName === 'noembed') && regExpTest(/<\/no(script|embed)/i, currentNode.innerHTML)) {
1259
+ _forceRemove(currentNode);
1260
+
1261
+ return true;
1262
+ }
1263
+ /* Sanitize element content to be template-safe */
1264
+
1265
+
1266
+ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {
1267
+ /* Get the element's text content */
1268
+ content = currentNode.textContent;
1269
+ content = stringReplace(content, MUSTACHE_EXPR$1, ' ');
1270
+ content = stringReplace(content, ERB_EXPR$1, ' ');
1271
+ content = stringReplace(content, TMPLIT_EXPR$1, ' ');
1272
+
1273
+ if (currentNode.textContent !== content) {
1274
+ arrayPush(DOMPurify.removed, {
1275
+ element: currentNode.cloneNode()
1276
+ });
1277
+ currentNode.textContent = content;
1278
+ }
1279
+ }
1280
+ /* Execute a hook if present */
1281
+
1282
+
1283
+ _executeHook('afterSanitizeElements', currentNode, null);
1284
+
1285
+ return false;
1286
+ };
1287
+ /**
1288
+ * _isValidAttribute
1289
+ *
1290
+ * @param {string} lcTag Lowercase tag name of containing element.
1291
+ * @param {string} lcName Lowercase attribute name.
1292
+ * @param {string} value Attribute value.
1293
+ * @return {Boolean} Returns true if `value` is valid, otherwise false.
1294
+ */
1295
+ // eslint-disable-next-line complexity
1296
+
1297
+
1298
+ var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
1299
+ /* Make sure attribute cannot clobber */
1300
+ if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
1301
+ return false;
1302
+ }
1303
+ /* Allow valid data-* attributes: At least one character after "-"
1304
+ (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
1305
+ XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
1306
+ We don't need to check the value; it's always URI safe. */
1307
+
1308
+
1309
+ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
1310
+ if ( // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1311
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1312
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1313
+ _basicCustomElementTest(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1314
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1315
+ lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {
1316
+ return false;
1317
+ }
1318
+ /* Check value is safe. First, is attr inert? If so, is safe */
1319
+
1320
+ } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if (!value) ; else {
1321
+ return false;
1322
+ }
1323
+
1324
+ return true;
1325
+ };
1326
+ /**
1327
+ * _basicCustomElementCheck
1328
+ * checks if at least one dash is included in tagName, and it's not the first char
1329
+ * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
1330
+ * @param {string} tagName name of the tag of the node to sanitize
1331
+ */
1332
+
1333
+
1334
+ var _basicCustomElementTest = function _basicCustomElementTest(tagName) {
1335
+ return tagName.indexOf('-') > 0;
1336
+ };
1337
+ /**
1338
+ * _sanitizeAttributes
1339
+ *
1340
+ * @protect attributes
1341
+ * @protect nodeName
1342
+ * @protect removeAttribute
1343
+ * @protect setAttribute
1344
+ *
1345
+ * @param {Node} currentNode to sanitize
1346
+ */
1347
+
1348
+
1349
+ var _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
1350
+ var attr;
1351
+ var value;
1352
+ var lcName;
1353
+ var l;
1354
+ /* Execute a hook if present */
1355
+
1356
+ _executeHook('beforeSanitizeAttributes', currentNode, null);
1357
+
1358
+ var attributes = currentNode.attributes;
1359
+ /* Check if we have attributes; if not we might have a text node */
1360
+
1361
+ if (!attributes) {
1362
+ return;
1363
+ }
1364
+
1365
+ var hookEvent = {
1366
+ attrName: '',
1367
+ attrValue: '',
1368
+ keepAttr: true,
1369
+ allowedAttributes: ALLOWED_ATTR
1370
+ };
1371
+ l = attributes.length;
1372
+ /* Go backwards over all attributes; safely remove bad ones */
1373
+
1374
+ while (l--) {
1375
+ attr = attributes[l];
1376
+ var _attr = attr,
1377
+ name = _attr.name,
1378
+ namespaceURI = _attr.namespaceURI;
1379
+ value = name === 'value' ? attr.value : stringTrim(attr.value);
1380
+ lcName = transformCaseFunc(name);
1381
+ /* Execute a hook if present */
1382
+
1383
+ hookEvent.attrName = lcName;
1384
+ hookEvent.attrValue = value;
1385
+ hookEvent.keepAttr = true;
1386
+ hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
1387
+
1388
+ _executeHook('uponSanitizeAttribute', currentNode, hookEvent);
1389
+
1390
+ value = hookEvent.attrValue;
1391
+ /* Did the hooks approve of the attribute? */
1392
+
1393
+ if (hookEvent.forceKeepAttr) {
1394
+ continue;
1395
+ }
1396
+ /* Remove attribute */
1397
+
1398
+
1399
+ _removeAttribute(name, currentNode);
1400
+ /* Did the hooks approve of the attribute? */
1401
+
1402
+
1403
+ if (!hookEvent.keepAttr) {
1404
+ continue;
1405
+ }
1406
+ /* Work around a security issue in jQuery 3.0 */
1407
+
1408
+
1409
+ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
1410
+ _removeAttribute(name, currentNode);
1411
+
1412
+ continue;
1413
+ }
1414
+ /* Sanitize attribute content to be template-safe */
1415
+
1416
+
1417
+ if (SAFE_FOR_TEMPLATES) {
1418
+ value = stringReplace(value, MUSTACHE_EXPR$1, ' ');
1419
+ value = stringReplace(value, ERB_EXPR$1, ' ');
1420
+ value = stringReplace(value, TMPLIT_EXPR$1, ' ');
1421
+ }
1422
+ /* Is `value` valid for this attribute? */
1423
+
1424
+
1425
+ var lcTag = transformCaseFunc(currentNode.nodeName);
1426
+
1427
+ if (!_isValidAttribute(lcTag, lcName, value)) {
1428
+ continue;
1429
+ }
1430
+ /* Full DOM Clobbering protection via namespace isolation,
1431
+ * Prefix id and name attributes with `user-content-`
1432
+ */
1433
+
1434
+
1435
+ if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {
1436
+ // Remove the attribute with this value
1437
+ _removeAttribute(name, currentNode); // Prefix the value and later re-create the attribute with the sanitized value
1438
+
1439
+
1440
+ value = SANITIZE_NAMED_PROPS_PREFIX + value;
1441
+ }
1442
+ /* Handle attributes that require Trusted Types */
1443
+
1444
+
1445
+ if (trustedTypesPolicy && _typeof$1(trustedTypes) === 'object' && typeof trustedTypes.getAttributeType === 'function') {
1446
+ if (namespaceURI) ; else {
1447
+ switch (trustedTypes.getAttributeType(lcTag, lcName)) {
1448
+ case 'TrustedHTML':
1449
+ value = trustedTypesPolicy.createHTML(value);
1450
+ break;
1451
+
1452
+ case 'TrustedScriptURL':
1453
+ value = trustedTypesPolicy.createScriptURL(value);
1454
+ break;
1455
+ }
1456
+ }
1457
+ }
1458
+ /* Handle invalid data-* attribute set by try-catching it */
1459
+
1460
+
1461
+ try {
1462
+ if (namespaceURI) {
1463
+ currentNode.setAttributeNS(namespaceURI, name, value);
1464
+ } else {
1465
+ /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
1466
+ currentNode.setAttribute(name, value);
1467
+ }
1468
+
1469
+ arrayPop(DOMPurify.removed);
1470
+ } catch (_) {}
1471
+ }
1472
+ /* Execute a hook if present */
1473
+
1474
+
1475
+ _executeHook('afterSanitizeAttributes', currentNode, null);
1476
+ };
1477
+ /**
1478
+ * _sanitizeShadowDOM
1479
+ *
1480
+ * @param {DocumentFragment} fragment to iterate over recursively
1481
+ */
1482
+
1483
+
1484
+ var _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
1485
+ var shadowNode;
1486
+
1487
+ var shadowIterator = _createIterator(fragment);
1488
+ /* Execute a hook if present */
1489
+
1490
+
1491
+ _executeHook('beforeSanitizeShadowDOM', fragment, null);
1492
+
1493
+ while (shadowNode = shadowIterator.nextNode()) {
1494
+ /* Execute a hook if present */
1495
+ _executeHook('uponSanitizeShadowNode', shadowNode, null);
1496
+ /* Sanitize tags and elements */
1497
+
1498
+
1499
+ if (_sanitizeElements(shadowNode)) {
1500
+ continue;
1501
+ }
1502
+ /* Deep shadow DOM detected */
1503
+
1504
+
1505
+ if (shadowNode.content instanceof DocumentFragment) {
1506
+ _sanitizeShadowDOM(shadowNode.content);
1507
+ }
1508
+ /* Check attributes, sanitize if necessary */
1509
+
1510
+
1511
+ _sanitizeAttributes(shadowNode);
1512
+ }
1513
+ /* Execute a hook if present */
1514
+
1515
+
1516
+ _executeHook('afterSanitizeShadowDOM', fragment, null);
1517
+ };
1518
+ /**
1519
+ * Sanitize
1520
+ * Public method providing core sanitation functionality
1521
+ *
1522
+ * @param {String|Node} dirty string or DOM node
1523
+ * @param {Object} configuration object
1524
+ */
1525
+ // eslint-disable-next-line complexity
1526
+
1527
+
1528
+ DOMPurify.sanitize = function (dirty) {
1529
+ var cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1530
+ var body;
1531
+ var importedNode;
1532
+ var currentNode;
1533
+ var returnNode;
1534
+ /* Make sure we have a string to sanitize.
1535
+ DO NOT return early, as this will return the wrong type if
1536
+ the user has requested a DOM object rather than a string */
1537
+
1538
+ IS_EMPTY_INPUT = !dirty;
1539
+
1540
+ if (IS_EMPTY_INPUT) {
1541
+ dirty = '<!-->';
1542
+ }
1543
+ /* Stringify, in case dirty is an object */
1544
+
1545
+
1546
+ if (typeof dirty !== 'string' && !_isNode(dirty)) {
1547
+ // eslint-disable-next-line no-negated-condition
1548
+ if (typeof dirty.toString !== 'function') {
1549
+ throw typeErrorCreate('toString is not a function');
1550
+ } else {
1551
+ dirty = dirty.toString();
1552
+
1553
+ if (typeof dirty !== 'string') {
1554
+ throw typeErrorCreate('dirty is not a string, aborting');
1555
+ }
1556
+ }
1557
+ }
1558
+ /* Return dirty HTML if DOMPurify cannot run */
1559
+
1560
+
1561
+ if (!DOMPurify.isSupported) {
1562
+ return dirty;
1563
+ }
1564
+ /* Assign config vars */
1565
+
1566
+
1567
+ if (!SET_CONFIG) {
1568
+ _parseConfig(cfg);
1569
+ }
1570
+ /* Clean up removed elements */
1571
+
1572
+
1573
+ DOMPurify.removed = [];
1574
+ /* Check if dirty is correctly typed for IN_PLACE */
1575
+
1576
+ if (typeof dirty === 'string') {
1577
+ IN_PLACE = false;
1578
+ }
1579
+
1580
+ if (IN_PLACE) {
1581
+ /* Do some early pre-sanitization to avoid unsafe root nodes */
1582
+ if (dirty.nodeName) {
1583
+ var tagName = transformCaseFunc(dirty.nodeName);
1584
+
1585
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
1586
+ throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
1587
+ }
1588
+ }
1589
+ } else if (dirty instanceof Node) {
1590
+ /* If dirty is a DOM element, append to an empty document to avoid
1591
+ elements being stripped by the parser */
1592
+ body = _initDocument('<!---->');
1593
+ importedNode = body.ownerDocument.importNode(dirty, true);
1594
+
1595
+ if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {
1596
+ /* Node is already a body, use as is */
1597
+ body = importedNode;
1598
+ } else if (importedNode.nodeName === 'HTML') {
1599
+ body = importedNode;
1600
+ } else {
1601
+ // eslint-disable-next-line unicorn/prefer-dom-node-append
1602
+ body.appendChild(importedNode);
1603
+ }
1604
+ } else {
1605
+ /* Exit directly if we have nothing to do */
1606
+ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
1607
+ dirty.indexOf('<') === -1) {
1608
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
1609
+ }
1610
+ /* Initialize the document to work on */
1611
+
1612
+
1613
+ body = _initDocument(dirty);
1614
+ /* Check we have a DOM node from the data */
1615
+
1616
+ if (!body) {
1617
+ return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
1618
+ }
1619
+ }
1620
+ /* Remove first element node (ours) if FORCE_BODY is set */
1621
+
1622
+
1623
+ if (body && FORCE_BODY) {
1624
+ _forceRemove(body.firstChild);
1625
+ }
1626
+ /* Get node iterator */
1627
+
1628
+
1629
+ var nodeIterator = _createIterator(IN_PLACE ? dirty : body);
1630
+ /* Now start iterating over the created document */
1631
+
1632
+
1633
+ while (currentNode = nodeIterator.nextNode()) {
1634
+ /* Sanitize tags and elements */
1635
+ if (_sanitizeElements(currentNode)) {
1636
+ continue;
1637
+ }
1638
+ /* Shadow DOM detected, sanitize it */
1639
+
1640
+
1641
+ if (currentNode.content instanceof DocumentFragment) {
1642
+ _sanitizeShadowDOM(currentNode.content);
1643
+ }
1644
+ /* Check attributes, sanitize if necessary */
1645
+
1646
+
1647
+ _sanitizeAttributes(currentNode);
1648
+ }
1649
+ /* If we sanitized `dirty` in-place, return it. */
1650
+
1651
+
1652
+ if (IN_PLACE) {
1653
+ return dirty;
1654
+ }
1655
+ /* Return sanitized string or DOM */
1656
+
1657
+
1658
+ if (RETURN_DOM) {
1659
+ if (RETURN_DOM_FRAGMENT) {
1660
+ returnNode = createDocumentFragment.call(body.ownerDocument);
1661
+
1662
+ while (body.firstChild) {
1663
+ // eslint-disable-next-line unicorn/prefer-dom-node-append
1664
+ returnNode.appendChild(body.firstChild);
1665
+ }
1666
+ } else {
1667
+ returnNode = body;
1668
+ }
1669
+
1670
+ if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmod) {
1671
+ /*
1672
+ AdoptNode() is not used because internal state is not reset
1673
+ (e.g. the past names map of a HTMLFormElement), this is safe
1674
+ in theory but we would rather not risk another attack vector.
1675
+ The state that is cloned by importNode() is explicitly defined
1676
+ by the specs.
1677
+ */
1678
+ returnNode = importNode.call(originalDocument, returnNode, true);
1679
+ }
1680
+
1681
+ return returnNode;
1682
+ }
1683
+
1684
+ var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
1685
+ /* Serialize doctype if allowed */
1686
+
1687
+ if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
1688
+ serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
1689
+ }
1690
+ /* Sanitize final string template-safe */
1691
+
1692
+
1693
+ if (SAFE_FOR_TEMPLATES) {
1694
+ serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$1, ' ');
1695
+ serializedHTML = stringReplace(serializedHTML, ERB_EXPR$1, ' ');
1696
+ serializedHTML = stringReplace(serializedHTML, TMPLIT_EXPR$1, ' ');
1697
+ }
1698
+
1699
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
1700
+ };
1701
+ /**
1702
+ * Public method to set the configuration once
1703
+ * setConfig
1704
+ *
1705
+ * @param {Object} cfg configuration object
1706
+ */
1707
+
1708
+
1709
+ DOMPurify.setConfig = function (cfg) {
1710
+ _parseConfig(cfg);
1711
+
1712
+ SET_CONFIG = true;
1713
+ };
1714
+ /**
1715
+ * Public method to remove the configuration
1716
+ * clearConfig
1717
+ *
1718
+ */
1719
+
1720
+
1721
+ DOMPurify.clearConfig = function () {
1722
+ CONFIG = null;
1723
+ SET_CONFIG = false;
1724
+ };
1725
+ /**
1726
+ * Public method to check if an attribute value is valid.
1727
+ * Uses last set config, if any. Otherwise, uses config defaults.
1728
+ * isValidAttribute
1729
+ *
1730
+ * @param {string} tag Tag name of containing element.
1731
+ * @param {string} attr Attribute name.
1732
+ * @param {string} value Attribute value.
1733
+ * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.
1734
+ */
1735
+
1736
+
1737
+ DOMPurify.isValidAttribute = function (tag, attr, value) {
1738
+ /* Initialize shared config vars if necessary. */
1739
+ if (!CONFIG) {
1740
+ _parseConfig({});
1741
+ }
1742
+
1743
+ var lcTag = transformCaseFunc(tag);
1744
+ var lcName = transformCaseFunc(attr);
1745
+ return _isValidAttribute(lcTag, lcName, value);
1746
+ };
1747
+ /**
1748
+ * AddHook
1749
+ * Public method to add DOMPurify hooks
1750
+ *
1751
+ * @param {String} entryPoint entry point for the hook to add
1752
+ * @param {Function} hookFunction function to execute
1753
+ */
1754
+
1755
+
1756
+ DOMPurify.addHook = function (entryPoint, hookFunction) {
1757
+ if (typeof hookFunction !== 'function') {
1758
+ return;
1759
+ }
1760
+
1761
+ hooks[entryPoint] = hooks[entryPoint] || [];
1762
+ arrayPush(hooks[entryPoint], hookFunction);
1763
+ };
1764
+ /**
1765
+ * RemoveHook
1766
+ * Public method to remove a DOMPurify hook at a given entryPoint
1767
+ * (pops it from the stack of hooks if more are present)
1768
+ *
1769
+ * @param {String} entryPoint entry point for the hook to remove
1770
+ * @return {Function} removed(popped) hook
1771
+ */
1772
+
1773
+
1774
+ DOMPurify.removeHook = function (entryPoint) {
1775
+ if (hooks[entryPoint]) {
1776
+ return arrayPop(hooks[entryPoint]);
1777
+ }
1778
+ };
1779
+ /**
1780
+ * RemoveHooks
1781
+ * Public method to remove all DOMPurify hooks at a given entryPoint
1782
+ *
1783
+ * @param {String} entryPoint entry point for the hooks to remove
1784
+ */
1785
+
1786
+
1787
+ DOMPurify.removeHooks = function (entryPoint) {
1788
+ if (hooks[entryPoint]) {
1789
+ hooks[entryPoint] = [];
1790
+ }
1791
+ };
1792
+ /**
1793
+ * RemoveAllHooks
1794
+ * Public method to remove all DOMPurify hooks
1795
+ *
1796
+ */
1797
+
1798
+
1799
+ DOMPurify.removeAllHooks = function () {
1800
+ hooks = {};
1801
+ };
1802
+
1803
+ return DOMPurify;
1804
+ }
1805
+
1806
+ var purify = createDOMPurify();
1807
+
51
1808
  function _typeof(obj) {
52
1809
  "@babel/helpers - typeof";
53
1810
 
@@ -3758,15 +5515,15 @@ var common$1 = {
3758
5515
  takeAction: "Take action"
3759
5516
  };
3760
5517
  var helpers$1 = {
3761
- addMembersToNeetoProducts: "Add <strong>{{emails, list}}</strong> to the following neeto products.",
5518
+ addMembersToNeetoProducts: "Add {{- emails, boldList}} to the following neeto products.",
3762
5519
  configPermissions: "Configure permissions for the modules.",
3763
5520
  enterMultipleEmails: "Please press space, tab or enter key after entering an email address.",
3764
5521
  moreInfoAboutPermissions: "More information about permissions",
3765
- multipleProductInvitation: "<strong>{{emails, list}}</strong> will be invited to the following neeto products with the role given next to it.",
5522
+ multipleProductInvitation: "{{- emails, boldList}} will be invited to the following neeto products with the role given next to it.",
3766
5523
  noRolesFound: "No roles found.",
3767
5524
  searchRoles: "Search roles",
3768
5525
  selectedMembersCount: "{{count}} {{metaName}} selected of",
3769
- singleProductInvitation: "<strong>{{emails, list}}</strong> will be invited to <strong>{{product}}</strong> with a role of <strong>{{role}}</strong>.",
5526
+ singleProductInvitation: "{{- emails, boldList}} will be invited to <strong>{{product}}</strong> with a role of <strong>{{role}}</strong>.",
3770
5527
  themeSelector: "Theme selector",
3771
5528
  visitToKnowMoreAboutPermissions: "Visit to know more about permissions"
3772
5529
  };
@@ -3871,16 +5628,18 @@ var common = {
3871
5628
  takeAction: "Passer à l'action"
3872
5629
  };
3873
5630
  var helpers = {
3874
- addMembersToNeetoProducts: "Ajoutez <strong>{{emails, list}}</strong> aux produits neeto suivants.",
5631
+ addMembersToNeetoProducts: "Ajoutez {{- emails, boldList}} aux produits neeto suivants.",
3875
5632
  configPermissions: "Configurez les autorisations pour les modules.",
3876
5633
  enterMultipleEmails: "Veuillez appuyer sur espace, tabulation ou entrée après avoir saisi une adresse e-mail.",
3877
5634
  moreInfoAboutPermissions: "Plus d'informations sur les autorisations",
3878
- multipleProductInvitation_one: "<strong>{{emails, list}}</strong> sera invité aux produits neeto suivants avec le rôle attribué à côté.",
3879
- multipleProductInvitation_other: "<strong>{{emails, list}}</strong> seront invités aux produits neeto suivants avec le rôle attribué à côté.",
5635
+ multipleProductInvitation_one: "{{- emails, boldList}} sera invité aux produits neeto suivants avec le rôle attribué à côté.",
5636
+ multipleProductInvitation_other: "{{- emails, boldList}} seront invités aux produits neeto suivants avec le rôle attribué à côté.",
3880
5637
  noRolesFound: "Aucun rôle trouvé.",
3881
5638
  searchRoles: "Rechercher des rôles",
3882
5639
  selectedMembersCount_one: "{{count}} {{metaName}} sélectionné sur",
3883
5640
  selectedMembersCount_other: "{{count}} {{metaName}} sélectionnés sur",
5641
+ singleProductInvitation_one: "{{- emails, boldList}} sera invité à <strong>{{product}}</strong> avec un rôle de <strong>{{role}}</strong>.",
5642
+ singleProductInvitation_other: "{{- emails, boldList}} seront invités à <strong>{{product}}</strong> avec un rôle de <strong>{{role}}</strong>.",
3884
5643
  themeSelector: "Sélecteur de thème",
3885
5644
  visitToKnowMoreAboutPermissions: "Visitez pour en savoir plus sur les autorisations"
3886
5645
  };
@@ -3942,6 +5701,19 @@ instance.use(Browser).use(initReactI18next).init({
3942
5701
  order: ["navigator"]
3943
5702
  }
3944
5703
  });
5704
+ instance.services.formatter.addCached("boldList", (lng, options) => {
5705
+ const formatter = new Intl.ListFormat(lng, options);
5706
+ const sanitizer = value => purify.sanitize(value, {
5707
+ USE_PROFILES: {
5708
+ html: true
5709
+ }
5710
+ });
5711
+ return value => {
5712
+ const boldEmails = value.map(email => `<strong>${email}</strong>`);
5713
+ const sanitizedEmails = sanitizer(boldEmails).split(",");
5714
+ return formatter.format(sanitizedEmails);
5715
+ };
5716
+ });
3945
5717
 
3946
5718
  const hasPermission = function () {
3947
5719
  var _globalProps$permissi;
@@ -9648,13 +11420,15 @@ const AppList = _ref => {
9648
11420
  }, [isAppListEnabled]);
9649
11421
  const buildRoleOptions = roles => roles.map(role => pure.toLabelAndValue(role.name));
9650
11422
  return /*#__PURE__*/React__default["default"].createElement("div", {
9651
- className: "neeto-ui-w-full"
11423
+ className: "neeto-ui-flex neeto-ui-flex-col neeto-ui-gap-6"
9652
11424
  }, /*#__PURE__*/React__default["default"].createElement("div", {
9653
- className: "neeto-ui-mb-3"
11425
+ className: "neeto-ui-w-full"
9654
11426
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Checkbox, {
9655
11427
  checked: isAppListEnabled,
11428
+ className: "ntm-manage-members__checkbox-align-start",
9656
11429
  label: /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
9657
11430
  component: "span",
11431
+ lineHeight: "relaxed",
9658
11432
  style: "body2"
9659
11433
  }, /*#__PURE__*/React__default["default"].createElement(Trans, {
9660
11434
  i18nKey: "helpers.addMembersToNeetoProducts",
@@ -9663,7 +11437,9 @@ const AppList = _ref => {
9663
11437
  }
9664
11438
  })),
9665
11439
  onChange: () => setIsAppListEnabled(ramda.not)
9666
- })), appRoles.map((_ref2, index) => {
11440
+ })), /*#__PURE__*/React__default["default"].createElement("div", {
11441
+ className: "neeto-ui-w-full"
11442
+ }, appRoles.map((_ref2, index) => {
9667
11443
  var _globalProps$appName;
9668
11444
  let appName = _ref2.appName,
9669
11445
  isEnabled = _ref2.isEnabled;
@@ -9704,7 +11480,7 @@ const AppList = _ref => {
9704
11480
  setFieldValue(`appRoles[${index}].activeRole`, value);
9705
11481
  }
9706
11482
  }))));
9707
- }));
11483
+ })));
9708
11484
  };
9709
11485
 
9710
11486
  const _excluded = ["className", "children"],
@@ -9843,6 +11619,7 @@ const getSingleInvitationTranslationProps = _ref2 => {
9843
11619
  role = _ref2.role,
9844
11620
  selectedEmail = _ref2.selectedEmail;
9845
11621
  return {
11622
+ count: selectedEmail.length,
9846
11623
  emails: selectedEmail,
9847
11624
  product: getProductName(activeAppRoles),
9848
11625
  role: getActiveRole(activeAppRoles, role)
@@ -9862,10 +11639,13 @@ const Confirmation = () => {
9862
11639
  const activeAppRoles = pure.filterBy({
9863
11640
  isEnabled: true
9864
11641
  }, appRoles);
9865
- return activeAppRoles.length > 1 ? /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("div", {
9866
- className: "neeto-ui-mb-4"
11642
+ return activeAppRoles.length > 1 ? /*#__PURE__*/React__default["default"].createElement("div", {
11643
+ className: "neeto-ui-flex neeto-ui-flex-col neeto-ui-gap-6"
11644
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
11645
+ className: "neeto-ui-w-full"
9867
11646
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
9868
11647
  component: "span",
11648
+ lineHeight: "relaxed",
9869
11649
  style: "body2"
9870
11650
  }, /*#__PURE__*/React__default["default"].createElement(Trans, {
9871
11651
  i18nKey: "helpers.multipleProductInvitation",
@@ -9874,26 +11654,27 @@ const Confirmation = () => {
9874
11654
  emails: selectedEmail,
9875
11655
  orgName: (_globalProps$organiza = initializers.globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.name
9876
11656
  }
9877
- }))), activeAppRoles.map(_ref => {
11657
+ }))), /*#__PURE__*/React__default["default"].createElement("table", {
11658
+ className: "neeto-ui-w-full ntm-product-roles-table"
11659
+ }, /*#__PURE__*/React__default["default"].createElement("thead", null, /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("th", null, "Product name"), /*#__PURE__*/React__default["default"].createElement("th", null, "Role"))), /*#__PURE__*/React__default["default"].createElement("tbody", null, activeAppRoles.map(_ref => {
9878
11660
  let appName = _ref.appName,
9879
11661
  activeRole = _ref.activeRole;
9880
- return /*#__PURE__*/React__default["default"].createElement("div", {
9881
- className: "ntm-manage-members-effective-app-roles",
11662
+ return /*#__PURE__*/React__default["default"].createElement("tr", {
9882
11663
  key: appName
9883
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
11664
+ }, /*#__PURE__*/React__default["default"].createElement("td", null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
9884
11665
  component: "span",
9885
- style: "body2",
9886
- weight: "semibold"
11666
+ lineHeight: "relaxed",
11667
+ style: "body2"
9887
11668
  }, t("labels.neeto_", {
9888
11669
  product: appName
9889
- })), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
9890
- className: "ntm-manage-members-effective-app-roles__role-name",
11670
+ }))), /*#__PURE__*/React__default["default"].createElement("td", null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
9891
11671
  component: "span",
9892
- style: "body2",
9893
- weight: "semibold"
9894
- }, activeRole));
9895
- })) : /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
11672
+ lineHeight: "relaxed",
11673
+ style: "body2"
11674
+ }, activeRole)));
11675
+ })))) : /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
9896
11676
  component: "span",
11677
+ lineHeight: "relaxed",
9897
11678
  style: "body2"
9898
11679
  }, /*#__PURE__*/React__default["default"].createElement(Trans, {
9899
11680
  i18nKey: "helpers.singleProductInvitation",
@@ -10597,7 +12378,7 @@ var index = reactUtils.withTitle(withReactQuery(TeamMembers), instance.t("metaNa
10597
12378
 
10598
12379
  var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
10599
12380
 
10600
- var css = ":root {\n --ntm-roles-table-default-scroll: 15px;\n --ntm-roles-table-cell-height: 68px;\n --ntm-roles-sidebar-width: 396px;\n --ntm-roles-table-header-height: 72px;\n}\n\n.ntm-scrollbar__inner {\n width: 100%;\n height: 200px;\n}\n.ntm-scrollbar__outer {\n position: \"absolute\";\n top: 0px;\n left: 0px;\n width: 200px;\n height: 150px;\n overflow: \"hidden\";\n visibility: \"hidden\";\n}\n\ntd.ant-table-column-sort {\n background: transparent;\n}\n\n.ntm-empty-state {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.ntm-members {\n overflow: auto;\n width: 100%;\n}\n.ntm-members-wrapper {\n display: flex;\n}\n.ntm-members-page-loader {\n width: 100%;\n height: 100vh;\n}\n.ntm-members__table-wrapper {\n height: calc(100vh - 205px);\n width: 100%;\n}\n.ntm-members-table__column {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n.ntm-members-form__header {\n margin-bottom: 0.5rem;\n}\n.ntm-members-form__body {\n width: 100%;\n padding-bottom: 1rem;\n}\n.ntm-members-form__body > * + * {\n margin-top: 1rem;\n}\n.ntm-members-form__footer {\n display: flex;\n gap: 0.5rem;\n}\n\n.ntm-manage-members__header {\n display: flex;\n align-items: start;\n}\n.ntm-manage-members__header > * + * {\n margin-left: 0.5rem;\n}\n\n.ntm-manage-members__app-roles {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 0.5rem 0;\n}\n\n.ntm-manage-members-app-roles__select-wrapper {\n width: 50%;\n max-width: 250px;\n}\n\n.ntm-manage-members-effective-app-roles {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.25rem 0;\n}\n\n.ntm-manage-members-effective-app-roles__role-name {\n width: 67%;\n max-width: 300px;\n}\n\n.ntm-members-radio-group {\n width: 100%;\n}\n.ntm-members-radio-group .neeto-ui-radio__container--stacked {\n width: 100%;\n}\n.ntm-members-radio-group__label {\n padding-right: 4px;\n}\n.ntm-members-radio-group__icon {\n cursor: pointer;\n}\n\n.ntm-members-form-radio-item__wrapper {\n width: 100%;\n cursor: pointer;\n padding: 8px 0px !important;\n}\n.ntm-members-form-radio-item__wrapper:first-child {\n padding-top: 0px !important;\n}\n.ntm-members-form-radio-item__label {\n margin-bottom: 0 !important;\n}\n.ntm-members-form-radio-item__description {\n color: rgb(var(--neeto-ui-gray-700));\n}\n\n.ntm-roles-table__wrapper {\n width: 100%;\n height: calc(100vh - var(--neeto-ui-main-header-with-breadcrumbs-height));\n display: flex;\n padding: 0 1.5rem;\n}\n\n.ntm-roles-table__sidebar {\n width: var(--ntm-roles-sidebar-width);\n min-width: var(--ntm-roles-sidebar-width);\n border-right: thin solid rgb(var(--neeto-ui-gray-300));\n border-left: thin solid rgb(var(--neeto-ui-gray-300));\n border-top: thin solid rgb(var(--neeto-ui-gray-300));\n}\n\n.ntm-roles-table-sidebar__search {\n padding: 20px 24px;\n height: var(--ntm-roles-table-header-height);\n}\n\n.ntm-roles-table-sidebar__list {\n height: calc(\n 100vh - var(--neeto-ui-main-header-with-breadcrumbs-height) - var(\n --ntm-roles-table-header-height\n ) - var(--ntm-roles-table-default-scroll)\n );\n overflow-y: auto;\n}\n\n.ntm-roles-table-sidebar__list-item {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 24px;\n min-height: var(--ntm-roles-table-cell-height);\n}\n.ntm-roles-table-sidebar__list-item.ntm-roles-table-sidebar__list-item--highlighted {\n background-color: rgb(var(--neeto-ui-primary-100));\n padding: 12px 24px;\n}\n.ntm-roles-table-sidebar__list-item:not(.ntm-roles-table-sidebar__list-item--highlighted) {\n border-bottom: thin solid rgb(var(--neeto-ui-gray-300));\n}\n\n.ntm-roles-table__columns {\n width: calc(\n 100vw - var(--neeto-ui-sidebar-width) - var(--ntm-roles-sidebar-width) - 24px\n );\n overflow: hidden;\n border-top: thin solid rgb(var(--neeto-ui-gray-300));\n border-bottom: thin solid rgb(var(--neeto-ui-gray-300));\n}\n\n.ntm-roles-table__cell {\n width: 100%;\n min-width: 200px;\n height: var(--ntm-roles-table-cell-height);\n padding: 12px 8px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-right: thin solid rgb(var(--neeto-ui-gray-300));\n}\n\n.ntm-roles-table-cell__checkbox-wrapper {\n position: absolute;\n height: 1rem;\n width: 1rem;\n margin: auto;\n z-index: 10;\n}\n\n.ntm-roles-table-cell__checkbox {\n z-index: 10;\n}\n\n.ntm-roles-table__header {\n display: flex;\n align-items: center;\n overflow-x: auto;\n}\n.ntm-roles-table__header .ntm-roles-table__cell {\n height: var(--ntm-roles-table-header-height);\n padding-left: 24px;\n}\n\n.ntm-roles-table-header-cell__container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n gap: 1rem;\n overflow: hidden;\n}\n\n.ntm-roles-table-header__dropdown {\n margin: 3px;\n flex-shrink: 0;\n}\n\n.ntm-roles-table-header__role-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.ntm-roles-table__rows {\n width: 100%;\n height: calc(\n 100vh - var(--neeto-ui-main-header-with-breadcrumbs-height) - var(\n --ntm-roles-table-header-height\n ) - var(--ntm-roles-table-default-scroll)\n );\n overflow-y: auto;\n scrollbar-width: none;\n}\n.ntm-roles-table__rows::-webkit-scrollbar {\n width: 0px;\n height: 0px;\n}\n.ntm-roles-table__rows::-webkit-scrollbar-thumb {\n background: rgb(var(--neeto-ui-gray-300));\n border-radius: 50px;\n}\n.ntm-roles-table__rows::-webkit-scrollbar-thumb:hover {\n border-radius: 50px;\n}\n.ntm-roles-table__rows::-webkit-scrollbar-track {\n background: rgb(var(--neeto-ui-gray-300));\n}\n\n.ntm-roles-table__row {\n display: flex;\n align-items: center;\n}\n.ntm-roles-table__row .ntm-roles-table__cell {\n overflow: hidden;\n position: relative;\n}\n.ntm-roles-table__row .ntm-roles-table__cell p {\n opacity: 0;\n width: 340px;\n min-width: 340px;\n}\n.ntm-roles-table__row.ntm-roles-table__row--highlighted .ntm-roles-table__cell {\n background-color: rgb(var(--neeto-ui-primary-100));\n}\n.ntm-roles-table__row:not(.ntm-roles-table__row--highlighted) .ntm-roles-table__cell {\n border-bottom: thin solid rgb(var(--neeto-ui-gray-300));\n}\n\n.ntm-roles-table-sidebar__drop-down-button {\n color: rgb(var(--neeto-ui-gray-600));\n cursor: pointer;\n}\n\n.ntm-roles-modal__body > * + * {\n margin-top: 1rem;\n}\n.ntm-roles-modal__footer {\n display: flex;\n gap: 0.5rem;\n}\n\n.ntm-roles-pane__body {\n width: 100%;\n margin-bottom: 1.5rem;\n}\n.ntm-roles-pane__body-wrapper > * + * {\n margin-top: 1rem;\n}\n.ntm-roles-pane__body > * + * {\n margin-top: 1.5rem;\n}\n.ntm-roles-pane__footer {\n display: flex;\n gap: 0.5rem;\n}\n\n.ntm-roles-permission > * + * {\n margin: 0.5rem 0;\n}\n.ntm-roles-permission__heading {\n color: rgb(var(--neeto-ui-gray-500));\n text-transform: uppercase;\n}\n.ntm-roles-permission__card {\n background-color: rgb(var(--neeto-ui-white));\n align-items: center;\n border-radius: var(--neeto-ui-rounded);\n border-width: 1px;\n border-color: rgb(var(--neeto-ui-gray-300));\n cursor: pointer;\n display: flex;\n gap: 0.75rem;\n padding: 1rem 0.75rem;\n}\n.ntm-roles-permission__card--description {\n flex-grow: 1;\n}\n.ntm-roles-permission__card--checkbox {\n padding: 0 0.5rem;\n}\n\n.ntm-roles-help-url-wrapper {\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n padding: 1rem 0;\n}";
12381
+ var css = ":root {\n --ntm-roles-table-default-scroll: 15px;\n --ntm-roles-table-cell-height: 68px;\n --ntm-roles-sidebar-width: 396px;\n --ntm-roles-table-header-height: 72px;\n}\n\n.ntm-scrollbar__inner {\n width: 100%;\n height: 200px;\n}\n.ntm-scrollbar__outer {\n position: \"absolute\";\n top: 0px;\n left: 0px;\n width: 200px;\n height: 150px;\n overflow: \"hidden\";\n visibility: \"hidden\";\n}\n\ntd.ant-table-column-sort {\n background: transparent;\n}\n\n.ntm-empty-state {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.ntm-members {\n overflow: auto;\n width: 100%;\n}\n.ntm-members-wrapper {\n display: flex;\n}\n.ntm-members-page-loader {\n width: 100%;\n height: 100vh;\n}\n.ntm-members__table-wrapper {\n height: calc(100vh - 205px);\n width: 100%;\n}\n.ntm-members-table__column {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n.ntm-members-form__header {\n margin-bottom: 0.5rem;\n}\n.ntm-members-form__body {\n width: 100%;\n padding-bottom: 1rem;\n}\n.ntm-members-form__body > * + * {\n margin-top: 1.5rem;\n}\n.ntm-members-form__footer {\n display: flex;\n gap: 0.5rem;\n}\n\n.ntm-manage-members__header {\n display: flex;\n align-items: start;\n}\n.ntm-manage-members__header > * + * {\n margin-left: 0.5rem;\n}\n\n.ntm-manage-members__app-roles {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 0.5rem 0;\n}\n\n.ntm-manage-members-app-roles__select-wrapper {\n width: 50%;\n max-width: 250px;\n}\n\n.ntm-manage-members-effective-app-roles {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.25rem 0;\n}\n\n.ntm-manage-members-effective-app-roles__role-name {\n width: 67%;\n max-width: 300px;\n}\n\n.ntm-members-radio-group {\n width: 100%;\n}\n.ntm-members-radio-group .neeto-ui-radio__container--stacked {\n width: 100%;\n}\n.ntm-members-radio-group__label {\n padding-right: 4px;\n}\n.ntm-members-radio-group__icon {\n cursor: pointer;\n}\n\n.ntm-members-form-radio-item__wrapper {\n width: 100%;\n cursor: pointer;\n padding: 8px 0px !important;\n}\n.ntm-members-form-radio-item__wrapper:first-child {\n padding-top: 0px !important;\n}\n.ntm-members-form-radio-item__label {\n margin-bottom: 0 !important;\n}\n.ntm-members-form-radio-item__description {\n color: rgb(var(--neeto-ui-gray-700));\n}\n\n.ntm-product-roles-table th {\n color: rgb(var(--neeto-ui-gray-700));\n font-size: var(--neeto-ui-text-xs);\n vertical-align: middle;\n font-weight: var(--neeto-ui-font-bold);\n text-transform: uppercase;\n}\n.ntm-product-roles-table td,\n.ntm-product-roles-table th {\n border: 1px solid rgb(var(--neeto-ui-gray-300));\n text-align: left;\n padding: 8px;\n}\n\n.ntm-manage-members__checkbox-align-start.neeto-ui-checkbox__wrapper .neeto-ui-checkbox__container {\n align-items: flex-start;\n}\n.ntm-manage-members__checkbox-align-start.neeto-ui-checkbox__wrapper .neeto-ui-checkbox[type=checkbox] {\n margin-top: 4px;\n}\n\n.ntm-roles-table__wrapper {\n width: 100%;\n height: calc(100vh - var(--neeto-ui-main-header-with-breadcrumbs-height));\n display: flex;\n padding: 0 1.5rem;\n}\n\n.ntm-roles-table__sidebar {\n width: var(--ntm-roles-sidebar-width);\n min-width: var(--ntm-roles-sidebar-width);\n border-right: thin solid rgb(var(--neeto-ui-gray-300));\n border-left: thin solid rgb(var(--neeto-ui-gray-300));\n border-top: thin solid rgb(var(--neeto-ui-gray-300));\n}\n\n.ntm-roles-table-sidebar__search {\n padding: 20px 24px;\n height: var(--ntm-roles-table-header-height);\n}\n\n.ntm-roles-table-sidebar__list {\n height: calc(\n 100vh - var(--neeto-ui-main-header-with-breadcrumbs-height) - var(\n --ntm-roles-table-header-height\n ) - var(--ntm-roles-table-default-scroll)\n );\n overflow-y: auto;\n}\n\n.ntm-roles-table-sidebar__list-item {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 24px;\n min-height: var(--ntm-roles-table-cell-height);\n}\n.ntm-roles-table-sidebar__list-item.ntm-roles-table-sidebar__list-item--highlighted {\n background-color: rgb(var(--neeto-ui-primary-100));\n padding: 12px 24px;\n}\n.ntm-roles-table-sidebar__list-item:not(.ntm-roles-table-sidebar__list-item--highlighted) {\n border-bottom: thin solid rgb(var(--neeto-ui-gray-300));\n}\n\n.ntm-roles-table__columns {\n width: calc(\n 100vw - var(--neeto-ui-sidebar-width) - var(--ntm-roles-sidebar-width) - 24px\n );\n overflow: hidden;\n border-top: thin solid rgb(var(--neeto-ui-gray-300));\n border-bottom: thin solid rgb(var(--neeto-ui-gray-300));\n}\n\n.ntm-roles-table__cell {\n width: 100%;\n min-width: 200px;\n height: var(--ntm-roles-table-cell-height);\n padding: 12px 8px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-right: thin solid rgb(var(--neeto-ui-gray-300));\n}\n\n.ntm-roles-table-cell__checkbox-wrapper {\n position: absolute;\n height: 1rem;\n width: 1rem;\n margin: auto;\n z-index: 10;\n}\n\n.ntm-roles-table-cell__checkbox {\n z-index: 10;\n}\n\n.ntm-roles-table__header {\n display: flex;\n align-items: center;\n overflow-x: auto;\n}\n.ntm-roles-table__header .ntm-roles-table__cell {\n height: var(--ntm-roles-table-header-height);\n padding-left: 24px;\n}\n\n.ntm-roles-table-header-cell__container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n gap: 1rem;\n overflow: hidden;\n}\n\n.ntm-roles-table-header__dropdown {\n margin: 3px;\n flex-shrink: 0;\n}\n\n.ntm-roles-table-header__role-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.ntm-roles-table__rows {\n width: 100%;\n height: calc(\n 100vh - var(--neeto-ui-main-header-with-breadcrumbs-height) - var(\n --ntm-roles-table-header-height\n ) - var(--ntm-roles-table-default-scroll)\n );\n overflow-y: auto;\n scrollbar-width: none;\n}\n.ntm-roles-table__rows::-webkit-scrollbar {\n width: 0px;\n height: 0px;\n}\n.ntm-roles-table__rows::-webkit-scrollbar-thumb {\n background: rgb(var(--neeto-ui-gray-300));\n border-radius: 50px;\n}\n.ntm-roles-table__rows::-webkit-scrollbar-thumb:hover {\n border-radius: 50px;\n}\n.ntm-roles-table__rows::-webkit-scrollbar-track {\n background: rgb(var(--neeto-ui-gray-300));\n}\n\n.ntm-roles-table__row {\n display: flex;\n align-items: center;\n}\n.ntm-roles-table__row .ntm-roles-table__cell {\n overflow: hidden;\n position: relative;\n}\n.ntm-roles-table__row .ntm-roles-table__cell p {\n opacity: 0;\n width: 340px;\n min-width: 340px;\n}\n.ntm-roles-table__row.ntm-roles-table__row--highlighted .ntm-roles-table__cell {\n background-color: rgb(var(--neeto-ui-primary-100));\n}\n.ntm-roles-table__row:not(.ntm-roles-table__row--highlighted) .ntm-roles-table__cell {\n border-bottom: thin solid rgb(var(--neeto-ui-gray-300));\n}\n\n.ntm-roles-table-sidebar__drop-down-button {\n color: rgb(var(--neeto-ui-gray-600));\n cursor: pointer;\n}\n\n.ntm-roles-modal__body > * + * {\n margin-top: 1rem;\n}\n.ntm-roles-modal__footer {\n display: flex;\n gap: 0.5rem;\n}\n\n.ntm-roles-pane__body {\n width: 100%;\n margin-bottom: 1.5rem;\n}\n.ntm-roles-pane__body-wrapper > * + * {\n margin-top: 1rem;\n}\n.ntm-roles-pane__body > * + * {\n margin-top: 1.5rem;\n}\n.ntm-roles-pane__footer {\n display: flex;\n gap: 0.5rem;\n}\n\n.ntm-roles-permission > * + * {\n margin: 0.5rem 0;\n}\n.ntm-roles-permission__heading {\n color: rgb(var(--neeto-ui-gray-500));\n text-transform: uppercase;\n}\n.ntm-roles-permission__card {\n background-color: rgb(var(--neeto-ui-white));\n align-items: center;\n border-radius: var(--neeto-ui-rounded);\n border-width: 1px;\n border-color: rgb(var(--neeto-ui-gray-300));\n cursor: pointer;\n display: flex;\n gap: 0.75rem;\n padding: 1rem 0.75rem;\n}\n.ntm-roles-permission__card--description {\n flex-grow: 1;\n}\n.ntm-roles-permission__card--checkbox {\n padding: 0 0.5rem;\n}\n\n.ntm-roles-help-url-wrapper {\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n padding: 1rem 0;\n}";
10601
12382
  n(css,{});
10602
12383
 
10603
12384
  exports.ManageMember = ManageMember;