From 3a7bb77473907de95ca62fb6c010051a50b6ace9 Mon Sep 17 00:00:00 2001 From: tdeekens Date: Sun, 14 May 2017 23:31:04 +0200 Subject: [PATCH] Add build output --- dist/purify.js | 348 +++++++++++++++++++++++++++------------------ dist/purify.js.map | 2 +- dist/purify.min.js | 2 +- 3 files changed, 209 insertions(+), 143 deletions(-) diff --git a/dist/purify.js b/dist/purify.js index eef72521..b1d992ed 100644 --- a/dist/purify.js +++ b/dist/purify.js @@ -73,7 +73,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 3); +/******/ return __webpack_require__(__webpack_require__.s = 4); /******/ }) /************************************************************************/ /******/ ([ @@ -101,6 +101,31 @@ var xml = exports.xml = ['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xm "use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +function getGlobal() { + /* eslint-disable no-use-before-define */ + var global = (typeof self === 'undefined' ? 'undefined' : _typeof(self)) === 'object' && self.self === self && self || (typeof global === 'undefined' ? 'undefined' : _typeof(global)) === 'object' && global.global === global && global || this || {}; + /* eslint-enable no-use-before-define */ + // `window` at least needs to be object to not break script execution + global.window = global.window || {}; + + return global; +} + +exports.default = getGlobal; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + Object.defineProperty(exports, "__esModule", { value: true }); @@ -116,7 +141,7 @@ var mathMl = exports.mathMl = ['math', 'menclose', 'merror', 'mfenced', 'mfrac', var text = exports.text = ['#text']; /***/ }), -/* 2 */ +/* 3 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -152,19 +177,19 @@ function clone(object) { } /***/ }), -/* 3 */ +/* 4 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; -var _tags = __webpack_require__(1); +var _environment = __webpack_require__(1); + +var _environment2 = _interopRequireDefault(_environment); + +var _tags = __webpack_require__(2); var TAGS = _interopRequireWildcard(_tags); @@ -172,158 +197,203 @@ var _attrs = __webpack_require__(0); var ATTRS = _interopRequireWildcard(_attrs); -var _utils = __webpack_require__(2); +var _utils = __webpack_require__(3); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // eslint-disable-next-line no-unused-vars -var DOMPurify = function DOMPurify(window) { - return DOMPurify; -}; +var DOMPurify = getInstanceFor; /** - * Version label, exposed for easier checks - * if DOMPurify is up to date or not - */ +* Version label, exposed for easier checks +* if DOMPurify is up to date or not +*/ DOMPurify.version = '0.8.5'; -/** - * Array of elements that DOMPurify removed during sanitation. - * Empty if nothing was removed. - */ -DOMPurify.removed = []; +var hooks = void 0; +var ALLOWED_TAGS = void 0; +var DEFAULT_ALLOWED_TAGS = void 0; +var ALLOWED_ATTR = void 0; +var DEFAULT_ALLOWED_ATTR = void 0; +var FORBID_TAGS = void 0; +var FORBID_ATTR = void 0; +var ALLOW_ARIA_ATTR = void 0; +var ALLOW_DATA_ATTR = void 0; +var ALLOW_UNKNOWN_PROTOCOLS = void 0; +var SAFE_FOR_JQUERY = void 0; +var SAFE_FOR_TEMPLATES = void 0; +var MUSTACHE_EXPR = void 0; +var ERB_EXPR = void 0; +var WHOLE_DOCUMENT = void 0; +var FORCE_BODY = void 0; +var RETURN_DOM = void 0; +var RETURN_DOM_FRAGMENT = void 0; +var RETURN_DOM_IMPORT = void 0; +var SANITIZE_DOM = void 0; +var KEEP_CONTENT = void 0; +var FORBID_CONTENTS = void 0; +var DATA_URI_TAGS = void 0; +var URI_SAFE_ATTRIBUTES = void 0; +var CONFIG = void 0; +var formElement = void 0; + +var document = void 0; +var DocumentFragment = void 0; +var HTMLTemplateElement = void 0; +var Node = void 0; +var NodeFilter = void 0; +var Text = void 0; +var Comment = void 0; +var DOMParser = void 0; +var NamedNodeMap = void 0; +var originalDocument = void 0; + +var implementation = void 0; +var createNodeIterator = void 0; +var getElementsByTagName = void 0; +var createDocumentFragment = void 0; +var importNode = void 0; + +function getInstanceFor(window) { + function isSupported() { + return Boolean(implementation && typeof implementation.createHTMLDocument !== 'undefined' && document.documentMode !== 9); + } + + DOMPurify.isSupported = isSupported(); + + /** + * Array of elements that DOMPurify removed during sanitation. + * Empty if nothing was removed. + */ + DOMPurify.removed = []; -if (!window || !window.document || window.document.nodeType !== 9) { - // Not running in a browser, provide a factory function - // so that you can pass your own Window - DOMPurify.isSupported = false; -} + if (!window || !window.document || window.document.nodeType !== 9) { + // Not running in a browser, provide a factory function + // so that you can pass your own Window + DOMPurify.isSupported = false; -var _window = window, - document = _window.document, - DocumentFragment = _window.DocumentFragment, - HTMLTemplateElement = _window.HTMLTemplateElement, - Node = _window.Node, - NodeFilter = _window.NodeFilter, - Text = _window.Text, - Comment = _window.Comment, - DOMParser = _window.DOMParser, - _window$NamedNodeMap = _window.NamedNodeMap, - NamedNodeMap = _window$NamedNodeMap === undefined ? window.MozNamedAttrMap : _window$NamedNodeMap; - -var originalDocument = document; - -// As per issue #47, the web-components registry is inherited by a -// new document created via createHTMLDocument. As per the spec -// (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries) -// a new empty registry is used when creating a template contents owner -// document, so we use that as our parent document to ensure nothing -// is inherited. -if (typeof HTMLTemplateElement === 'function') { - var template = document.createElement('template'); - if (template.content && template.content.ownerDocument) { - document = template.content.ownerDocument; + return getInstanceFor; } -} -var _document = document, - implementation = _document.implementation, - createNodeIterator = _document.createNodeIterator, - getElementsByTagName = _document.getElementsByTagName, - createDocumentFragment = _document.createDocumentFragment; -var importNode = originalDocument.importNode; + // eslint-disable-next-line no-sequences, no-unused-expressions + document = window.document, DocumentFragment = window.DocumentFragment, HTMLTemplateElement = window.HTMLTemplateElement, Node = window.Node, NodeFilter = window.NodeFilter, Text = window.Text, Comment = window.Comment, DOMParser = window.DOMParser, NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap; + originalDocument = document; + // As per issue #47, the web-components registry is inherited by a + // new document created via createHTMLDocument. As per the spec + // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries) + // a new empty registry is used when creating a template contents owner + // document, so we use that as our parent document to ensure nothing + // is inherited. + if (typeof HTMLTemplateElement === 'function') { + var template = document.createElement('template'); + if (template.content && template.content.ownerDocument) { + document = template.content.ownerDocument; + } + } -var hooks = {}; + implementation = document.implementation; + createNodeIterator = document.createNodeIterator; + getElementsByTagName = document.getElementsByTagName; + createDocumentFragment = document.createDocumentFragment; -/** - * Expose whether this browser supports running the full DOMPurify. - */ -DOMPurify.isSupported = typeof implementation.createHTMLDocument !== 'undefined' && document.documentMode !== 9; + importNode = originalDocument.importNode; -/** - * We consider the elements and attributes below to be safe. Ideally - * don't add any new ones but feel free to remove unwanted ones. - */ + hooks = {}; -/* allowed element names */ -var ALLOWED_TAGS = null; -var DEFAULT_ALLOWED_TAGS = (0, _utils.addToSet)({}, [TAGS.html, TAGS.svg, TAGS.svgFilters, TAGS.mathMl, TAGS.text]); + /** + * Expose whether this browser supports running the full DOMPurify. + */ + DOMPurify.isSupported = isSupported(); -/* Allowed attribute names */ -var ALLOWED_ATTR = null; -var DEFAULT_ALLOWED_ATTR = (0, _utils.addToSet)({}, [ATTRS.html, ATTRS.svg, ATTRS.mathMl, ATTRS.xml]); + /** + * We consider the elements and attributes below to be safe. Ideally + * don't add any new ones but feel free to remove unwanted ones. + */ -/* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */ -var FORBID_TAGS = null; + /* allowed element names */ + ALLOWED_TAGS = null; + DEFAULT_ALLOWED_TAGS = (0, _utils.addToSet)({}, [TAGS.html, TAGS.svg, TAGS.svgFilters, TAGS.mathMl, TAGS.text]); -/* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */ -var FORBID_ATTR = null; + /* Allowed attribute names */ + ALLOWED_ATTR = null; + DEFAULT_ALLOWED_ATTR = (0, _utils.addToSet)({}, [ATTRS.html, ATTRS.svg, ATTRS.mathMl, ATTRS.xml]); -/* Decide if ARIA attributes are okay */ -var ALLOW_ARIA_ATTR = true; + /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */ + FORBID_TAGS = null; -/* Decide if custom data attributes are okay */ -var ALLOW_DATA_ATTR = true; + /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */ + FORBID_ATTR = null; -/* Decide if unknown protocols are okay */ -var ALLOW_UNKNOWN_PROTOCOLS = false; + /* Decide if ARIA attributes are okay */ + ALLOW_ARIA_ATTR = true; -/* Output should be safe for jQuery's $() factory? */ -var SAFE_FOR_JQUERY = false; + /* Decide if custom data attributes are okay */ + ALLOW_DATA_ATTR = true; -/* Output should be safe for common template engines. -* This means, DOMPurify removes data attributes, mustaches and ERB -*/ -var SAFE_FOR_TEMPLATES = false; + /* Decide if unknown protocols are okay */ + ALLOW_UNKNOWN_PROTOCOLS = false; -/* Specify template detection regex for SAFE_FOR_TEMPLATES mode */ -var MUSTACHE_EXPR = /\{\{[\s\S]*|[\s\S]*\}\}/gm; -var ERB_EXPR = /<%[\s\S]*|[\s\S]*%>/gm; + /* Output should be safe for jQuery's $() factory? */ + SAFE_FOR_JQUERY = false; -/* Decide if document with ... should be returned */ -var WHOLE_DOCUMENT = false; + /* Output should be safe for common template engines. + * This means, DOMPurify removes data attributes, mustaches and ERB + */ + SAFE_FOR_TEMPLATES = false; -/* Decide if all elements (e.g. style, script) must be children of -* document.body. By default, browsers might move them to document.head */ -var FORCE_BODY = false; + /* Specify template detection regex for SAFE_FOR_TEMPLATES mode */ + MUSTACHE_EXPR = /\{\{[\s\S]*|[\s\S]*\}\}/gm; + ERB_EXPR = /<%[\s\S]*|[\s\S]*%>/gm; -/* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html string. -* If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead -*/ -var RETURN_DOM = false; + /* Decide if document with ... should be returned */ + WHOLE_DOCUMENT = false; + + /* Decide if all elements (e.g. style, script) must be children of + * document.body. By default, browsers might move them to document.head */ + FORCE_BODY = false; -/* Decide if a DOM `DocumentFragment` should be returned, instead of a html string */ -var RETURN_DOM_FRAGMENT = false; + /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html string. + * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead + */ + RETURN_DOM = false; -/* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM -* `Node` is imported into the current `Document`. If this flag is not enabled the -* `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by -* DOMPurify. */ -var RETURN_DOM_IMPORT = false; + /* Decide if a DOM `DocumentFragment` should be returned, instead of a html string */ + RETURN_DOM_FRAGMENT = false; -/* Output should be free from DOM clobbering attacks? */ -var SANITIZE_DOM = true; + /* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM + * `Node` is imported into the current `Document`. If this flag is not enabled the + * `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by + * DOMPurify. */ + RETURN_DOM_IMPORT = false; -/* Keep element content when removing element? */ -var KEEP_CONTENT = true; + /* Output should be free from DOM clobbering attacks? */ + SANITIZE_DOM = true; -/* Tags to ignore content of when KEEP_CONTENT is true */ -var FORBID_CONTENTS = (0, _utils.addToSet)({}, ['audio', 'head', 'math', 'script', 'style', 'svg', 'video']); + /* Keep element content when removing element? */ + KEEP_CONTENT = true; -/* Tags that are safe for data: URIs */ -var DATA_URI_TAGS = (0, _utils.addToSet)({}, ['audio', 'video', 'img', 'source', 'image']); + /* Tags to ignore content of when KEEP_CONTENT is true */ + FORBID_CONTENTS = (0, _utils.addToSet)({}, ['audio', 'head', 'math', 'script', 'style', 'svg', 'video']); -/* Attributes safe for values like "javascript:" */ -var URI_SAFE_ATTRIBUTES = (0, _utils.addToSet)({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'summary', 'title', 'value', 'style', 'xmlns']); + /* Tags that are safe for data: URIs */ + DATA_URI_TAGS = (0, _utils.addToSet)({}, ['audio', 'video', 'img', 'source', 'image']); -/* Keep a reference to config to pass to hooks */ -var CONFIG = null; + /* Attributes safe for values like "javascript:" */ + URI_SAFE_ATTRIBUTES = (0, _utils.addToSet)({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'summary', 'title', 'value', 'style', 'xmlns']); -/* Ideally, do not touch anything below this line */ -/* ______________________________________________ */ + /* Keep a reference to config to pass to hooks */ + CONFIG = null; -var formElement = document.createElement('form'); + /* Ideally, do not touch anything below this line */ + /* ______________________________________________ */ + + formElement = document.createElement('form'); + + return DOMPurify; +} /** * _parseConfig @@ -442,8 +512,8 @@ var _initDocument = function _initDocument(dirty) { } catch (err) {} /* Some browsers throw, some browsers return null for the code above - DOMParser with text/html support is only in very recent browsers. - See #159 why the check here is extra-thorough */ + DOMParser with text/html support is only in very recent browsers. + See #159 why the check here is extra-thorough */ if (!doc || !doc.documentElement) { doc = implementation.createHTMLDocument(''); body = doc.body; @@ -678,9 +748,9 @@ var _sanitizeAttributes = function _sanitizeAttributes(currentNode) { } /* Allow valid data-* attributes: At least one character after "-" - (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes) - XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804) - We don't need to check the value; it's always URI safe. */ + (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes) + XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804) + We don't need to check the value; it's always URI safe. */ if (ALLOW_DATA_ATTR && DATA_ATTR.test(lcName)) { // This attribute is safe } else if (ALLOW_ARIA_ATTR && ARIA_ATTR.test(lcName)) { @@ -692,26 +762,22 @@ var _sanitizeAttributes = function _sanitizeAttributes(currentNode) { /* Check value is safe. First, is attr inert? If so, is safe */ } else if (URI_SAFE_ATTRIBUTES[lcName]) { // This attribute is safe - /* Check no script, data or unknown possibly unsafe URI unless we know URI values are safe for that attribute */ } else if (IS_ALLOWED_URI.test(value.replace(ATTR_WHITESPACE, ''))) { // This attribute is safe - /* Keep image data URIs alive if src/xlink:href is allowed */ } else if ((lcName === 'src' || lcName === 'xlink:href') && value.indexOf('data:') === 0 && DATA_URI_TAGS[currentNode.nodeName.toLowerCase()]) { // This attribute is safe - /* Allow unknown protocols: This provides support for links that are handled by protocol handlers which may be unknown ahead of time, e.g. fb:, spotify: */ } else if (ALLOW_UNKNOWN_PROTOCOLS && !IS_SCRIPT_OR_DATA.test(value.replace(ATTR_WHITESPACE, ''))) { // This attribute is safe - /* Check for binary attributes */ - } else if (!value) {// eslint-disable-line no-negated-condition + // eslint-disable-next-line no-negated-condition + } else if (!value) { // Binary attributes are safe at this point - /* Anything else, presume unsafe, do not add it back */ } else { continue; @@ -778,16 +844,16 @@ DOMPurify.sanitize = function (dirty, cfg) { var oldNode = void 0; var returnNode = void 0; /* Make sure we have a string to sanitize. - DO NOT return early, as this will return the wrong type if - the user has requested a DOM object rather than a string */ + DO NOT return early, as this will return the wrong type if + the user has requested a DOM object rather than a string */ if (!dirty) { dirty = ''; } /* Stringify, in case dirty is an object */ if (typeof dirty !== 'string' && !_isNode(dirty)) { + // eslint-disable-next-line no-negated-condition if (typeof dirty.toString !== 'function') { - // eslint-disable-line no-negated-condition throw new TypeError('toString is not a function'); } else { dirty = dirty.toString(); @@ -814,7 +880,7 @@ DOMPurify.sanitize = function (dirty, cfg) { if (dirty instanceof Node) { /* If dirty is a DOM element, append to an empty document to avoid - elements being stripped by the parser */ + elements being stripped by the parser */ body = _initDocument(''); importedNode = body.ownerDocument.importNode(dirty, true); if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') { @@ -883,10 +949,10 @@ DOMPurify.sanitize = function (dirty, cfg) { if (RETURN_DOM_IMPORT) { /* AdoptNode() is not used because internal state is not reset - (e.g. the past names map of a HTMLFormElement), this is safe - in theory but we would rather not risk another attack vector. - The state that is cloned by importNode() is explicitly defined - by the specs. */ + (e.g. the past names map of a HTMLFormElement), this is safe + in theory but we would rather not risk another attack vector. + The state that is cloned by importNode() is explicitly defined + by the specs. */ returnNode = importNode.call(originalDocument, returnNode, true); } @@ -948,7 +1014,7 @@ DOMPurify.removeAllHooks = function () { hooks = {}; }; -exports.default = DOMPurify; +module.exports = getInstanceFor((0, _environment2.default)()); /***/ }) /******/ ]); diff --git a/dist/purify.js.map b/dist/purify.js.map index 6fd65e16..b32af79a 100644 --- a/dist/purify.js.map +++ b/dist/purify.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 0ae8fb3463141b55b49b","webpack:///./src/attrs.js","webpack:///./src/tags.js","webpack:///./src/utils.js","webpack:///./src/purify.js"],"names":["html","svg","mathMl","xml","svgFilters","text","addToSet","clone","set","array","l","length","toLowerCase","object","newObject","property","Object","prototype","hasOwnProperty","call","TAGS","ATTRS","DOMPurify","window","version","removed","document","nodeType","isSupported","DocumentFragment","HTMLTemplateElement","Node","NodeFilter","Text","Comment","DOMParser","NamedNodeMap","MozNamedAttrMap","originalDocument","template","createElement","content","ownerDocument","implementation","createNodeIterator","getElementsByTagName","createDocumentFragment","importNode","hooks","createHTMLDocument","documentMode","ALLOWED_TAGS","DEFAULT_ALLOWED_TAGS","ALLOWED_ATTR","DEFAULT_ALLOWED_ATTR","FORBID_TAGS","FORBID_ATTR","ALLOW_ARIA_ATTR","ALLOW_DATA_ATTR","ALLOW_UNKNOWN_PROTOCOLS","SAFE_FOR_JQUERY","SAFE_FOR_TEMPLATES","MUSTACHE_EXPR","ERB_EXPR","WHOLE_DOCUMENT","FORCE_BODY","RETURN_DOM","RETURN_DOM_FRAGMENT","RETURN_DOM_IMPORT","SANITIZE_DOM","KEEP_CONTENT","FORBID_CONTENTS","DATA_URI_TAGS","URI_SAFE_ATTRIBUTES","CONFIG","formElement","_parseConfig","cfg","ADD_TAGS","ADD_ATTR","ADD_URI_SAFE_ATTR","freeze","_forceRemove","node","push","element","parentNode","removeChild","err","outerHTML","_removeAttribute","name","attribute","getAttributeNode","from","removeAttribute","_initDocument","dirty","doc","body","parseFromString","documentElement","firstElementChild","_createIterator","root","SHOW_ELEMENT","SHOW_COMMENT","SHOW_TEXT","FILTER_ACCEPT","_isClobbered","elm","nodeName","textContent","attributes","setAttribute","_isNode","obj","_executeHook","entryPoint","currentNode","data","forEach","hook","_sanitizeElements","tagName","allowedTags","insertAdjacentHTML","innerHTML","test","cloneNode","replace","DATA_ATTR","ARIA_ATTR","IS_ALLOWED_URI","IS_SCRIPT_OR_DATA","ATTR_WHITESPACE","_sanitizeAttributes","attr","value","lcName","idAttr","hookEvent","attrName","attrValue","keepAttr","allowedAttributes","trim","id","Array","slice","apply","indexOf","pop","_sanitizeShadowDOM","fragment","shadowNode","shadowIterator","nextNode","sanitize","importedNode","oldNode","returnNode","toString","TypeError","toStaticHTML","appendChild","firstChild","nodeIterator","addHook","hookFunction","removeHook","removeHooks","removeAllHooks"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;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AK4B,SAA9C;AACD,CA3HD;;AA6HA;;;;;;;AAOAzG,UAAUkJ,OAAV,GAAoB,UAAUlD,UAAV,EAAsBmD,YAAtB,EAAoC;AACtD,MAAI,OAAOA,YAAP,KAAwB,UAA5B,EAAwC;AACtC;AACD;AACDzH,QAAMsE,UAAN,IAAoBtE,MAAMsE,UAAN,KAAqB,EAAzC;AACAtE,QAAMsE,UAAN,EAAkBlC,IAAlB,CAAuBqF,YAAvB;AACD,CAND;;AAQA;;;;;;;;AAQAnJ,UAAUoJ,UAAV,GAAuB,UAAUpD,UAAV,EAAsB;AAC3C,MAAItE,MAAMsE,UAAN,CAAJ,EAAuB;AACrBtE,UAAMsE,UAAN,EAAkBkC,GAAlB;AACD;AACF,CAJD;;AAMA;;;;;;;AAOAlI,UAAUqJ,WAAV,GAAwB,UAAUrD,UAAV,EAAsB;AAC5C,MAAItE,MAAMsE,UAAN,CAAJ,EAAuB;AACrBtE,UAAMsE,UAAN,IAAoB,EAApB;AACD;AACF,CAJD;;AAMA;;;;;;AAMAhG,UAAUsJ,cAAV,GAA2B,YAAY;AACrC5H,UAAQ,EAAR;AACD,CAFD;;kBAIe1B,S","file":"purify.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"DOMPurify\"] = factory();\n\telse\n\t\troot[\"DOMPurify\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0ae8fb3463141b55b49b","export const html = [\n 'accept', 'action', 'align', 'alt', 'autocomplete', 'background', 'bgcolor',\n 'border', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color',\n 'cols', 'colspan', 'coords', 'datetime', 'default', 'dir', 'disabled',\n 'download', 'enctype', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href',\n 'hreflang', 'id', 'ismap', 'label', 'lang', 'list', 'loop', 'low', 'max',\n 'maxlength', 'media', 'method', 'min', 'multiple', 'name', 'noshade', 'novalidate',\n 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'poster', 'preload', 'pubdate',\n 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows',\n 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'span',\n 'srclang', 'start', 'src', 'step', 'style', 'summary', 'tabindex', 'title',\n 'type', 'usemap', 'valign', 'value', 'width', 'xmlns'\n];\n\nexport const svg = [\n 'accent-height', 'accumulate', 'additivive', 'alignment-baseline',\n 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency',\n 'baseline-shift', 'begin', 'bias', 'by', 'clip', 'clip-path', 'clip-rule',\n 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile',\n 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction',\n 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity',\n 'fill-rule', 'filter', 'flood-color', 'flood-opacity', 'font-family', 'font-size',\n 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight',\n 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform',\n 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints',\n 'keysplines', 'keytimes', 'lengthadjust', 'letter-spacing', 'kernelmatrix',\n 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid',\n 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits',\n 'maskunits', 'max', 'mask', 'mode', 'min', 'numoctaves', 'offset', 'operator',\n 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order',\n 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits',\n 'points', 'preservealpha', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount',\n 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering',\n 'specularconstant', 'specularexponent', 'spreadmethod', 'stddeviation', 'stitchtiles',\n 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap',\n 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width',\n 'surfacescale', 'targetx', 'targety', 'transform', 'text-anchor', 'text-decoration',\n 'text-rendering', 'textlength', 'u1', 'u2', 'unicode', 'values', 'viewbox',\n 'visibility', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing',\n 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2',\n 'y', 'y1', 'y2', 'z', 'zoomandpan'\n];\n\nexport const mathMl = [\n 'accent', 'accentunder', 'bevelled', 'close', 'columnsalign', 'columnlines',\n 'columnspan', 'denomalign', 'depth', 'display', 'displaystyle', 'fence',\n 'frame', 'largeop', 'length', 'linethickness', 'lspace', 'lquote',\n 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize',\n 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign',\n 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel',\n 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator',\n 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric',\n 'voffset'\n];\n\nexport const xml = [\n 'xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink'\n];\n\n\n\n// WEBPACK FOOTER //\n// ./src/attrs.js","export const html = [\n 'a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b',\n 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas',\n 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data',\n 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dir', 'div', 'dl', 'dt',\n 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form',\n 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i',\n 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark',\n 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup',\n 'option', 'output', 'p', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp',\n 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike',\n 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template',\n 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var',\n 'video', 'wbr'\n];\n\n// SVG\nexport const svg = [\n 'svg', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor',\n 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc',\n 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line',\n 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern',\n 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'switch', 'symbol',\n 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern'\n];\n\nexport const svgFilters = [\n 'feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite',\n 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap',\n 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur',\n 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset',\n 'feSpecularLighting', 'feTile', 'feTurbulence'\n];\n\nexport const mathMl = [\n 'math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr',\n 'mmuliscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow',\n 'ms', 'mpspace', 'msqrt', 'mystyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd',\n 'mtext', 'mtr', 'munder', 'munderover'\n];\n\nexport const text = ['#text'];\n\n\n\n// WEBPACK FOOTER //\n// ./src/tags.js","/* Add properties to a lookup table */\nexport function addToSet(set, array) {\n let l = array.length;\n while (l--) {\n if (typeof array[l] === 'string') {\n array[l] = array[l].toLowerCase();\n }\n set[array[l]] = true;\n }\n return set;\n}\n\n/* Shallow clone an object */\nexport function clone(object) {\n const newObject = {};\n let property;\n for (property in object) {\n if (Object.prototype.hasOwnProperty.call(object, property)) {\n newObject[property] = object[property];\n }\n }\n return newObject;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils.js","import * as TAGS from './tags';\nimport * as ATTRS from './attrs';\nimport { addToSet, clone } from './utils';\n\n// eslint-disable-next-line no-unused-vars\nconst DOMPurify = function (window) {\n return DOMPurify;\n};\n\n/**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\nDOMPurify.version = '0.8.5';\n\n/**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\nDOMPurify.removed = [];\n\nif (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n}\n\nlet {\n document,\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n NodeFilter,\n Text,\n Comment,\n DOMParser,\n NamedNodeMap = window.MozNamedAttrMap\n} = window;\nconst originalDocument = document;\n\n// As per issue #47, the web-components registry is inherited by a\n// new document created via createHTMLDocument. As per the spec\n// (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n// a new empty registry is used when creating a template contents owner\n// document, so we use that as our parent document to ensure nothing\n// is inherited.\nif (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n}\n\nconst {\n implementation,\n createNodeIterator,\n getElementsByTagName,\n createDocumentFragment\n} = document;\nconst { importNode } = originalDocument;\n\nlet hooks = {};\n\n/**\n * Expose whether this browser supports running the full DOMPurify.\n */\nDOMPurify.isSupported =\n typeof implementation.createHTMLDocument !== 'undefined' &&\n document.documentMode !== 9;\n\n/**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n/* allowed element names */\nlet ALLOWED_TAGS = null;\nconst DEFAULT_ALLOWED_TAGS = addToSet({}, [\n TAGS.html,\n TAGS.svg,\n TAGS.svgFilters,\n TAGS.mathMl,\n TAGS.text\n]);\n\n/* Allowed attribute names */\nlet ALLOWED_ATTR = null;\nconst DEFAULT_ALLOWED_ATTR = addToSet({}, [\n ATTRS.html,\n ATTRS.svg,\n ATTRS.mathMl,\n ATTRS.xml\n]);\n\n/* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\nlet FORBID_TAGS = null;\n\n/* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\nlet FORBID_ATTR = null;\n\n/* Decide if ARIA attributes are okay */\nlet ALLOW_ARIA_ATTR = true;\n\n/* Decide if custom data attributes are okay */\nlet ALLOW_DATA_ATTR = true;\n\n/* Decide if unknown protocols are okay */\nlet ALLOW_UNKNOWN_PROTOCOLS = false;\n\n/* Output should be safe for jQuery's $() factory? */\nlet SAFE_FOR_JQUERY = false;\n\n/* Output should be safe for common template engines.\n* This means, DOMPurify removes data attributes, mustaches and ERB\n*/\nlet SAFE_FOR_TEMPLATES = false;\n\n/* Specify template detection regex for SAFE_FOR_TEMPLATES mode */\nconst MUSTACHE_EXPR = /\\{\\{[\\s\\S]*|[\\s\\S]*\\}\\}/gm;\nconst ERB_EXPR = /<%[\\s\\S]*|[\\s\\S]*%>/gm;\n\n/* Decide if document with ... should be returned */\nlet WHOLE_DOCUMENT = false;\n\n/* Decide if all elements (e.g. style, script) must be children of\n* document.body. By default, browsers might move them to document.head */\nlet FORCE_BODY = false;\n\n/* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html string.\n* If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n*/\nlet RETURN_DOM = false;\n\n/* Decide if a DOM `DocumentFragment` should be returned, instead of a html string */\nlet RETURN_DOM_FRAGMENT = false;\n\n/* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM\n* `Node` is imported into the current `Document`. If this flag is not enabled the\n* `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by\n* DOMPurify. */\nlet RETURN_DOM_IMPORT = false;\n\n/* Output should be free from DOM clobbering attacks? */\nlet SANITIZE_DOM = true;\n\n/* Keep element content when removing element? */\nlet KEEP_CONTENT = true;\n\n/* Tags to ignore content of when KEEP_CONTENT is true */\nconst FORBID_CONTENTS = addToSet({}, [\n 'audio', 'head', 'math', 'script', 'style', 'svg', 'video'\n]);\n\n/* Tags that are safe for data: URIs */\nconst DATA_URI_TAGS = addToSet({}, [\n 'audio', 'video', 'img', 'source', 'image'\n]);\n\n/* Attributes safe for values like \"javascript:\" */\nconst URI_SAFE_ATTRIBUTES = addToSet({}, [\n 'alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder',\n 'summary', 'title', 'value', 'style', 'xmlns'\n]);\n\n/* Keep a reference to config to pass to hooks */\nlet CONFIG = null;\n\n/* Ideally, do not touch anything below this line */\n/* ______________________________________________ */\n\nconst formElement = document.createElement('form');\n\n/**\n * _parseConfig\n *\n * @param optional config literal\n */\n// eslint-disable-next-line complexity\nconst _parseConfig = function (cfg) {\n /* Shield configuration object from tampering */\n if (typeof cfg !== 'object') {\n cfg = {};\n }\n\n /* Set configuration parameters */\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ?\n addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ?\n addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ?\n addToSet({}, cfg.FORBID_TAGS) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ?\n addToSet({}, cfg.FORBID_ATTR) : {};\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n SAFE_FOR_JQUERY = cfg.SAFE_FOR_JQUERY || false; // Default false\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_DOM_IMPORT = cfg.RETURN_DOM_IMPORT || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);\n }\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR);\n }\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (Object && 'freeze' in Object) {\n Object.freeze(cfg);\n }\n\n CONFIG = cfg;\n};\n\n/**\n * _forceRemove\n *\n * @param a DOM node\n */\nconst _forceRemove = function (node) {\n DOMPurify.removed.push({ element: node });\n try {\n node.parentNode.removeChild(node);\n } catch (err) {\n node.outerHTML = '';\n }\n};\n\n/**\n * _removeAttribute\n *\n * @param an Attribute name\n * @param a DOM node\n */\nconst _removeAttribute = function (name, node) {\n DOMPurify.removed.push({\n attribute: node.getAttributeNode(name),\n from: node\n });\n node.removeAttribute(name);\n};\n\n/**\n * _initDocument\n *\n * @param a string of dirty markup\n * @return a DOM, filled with the dirty markup\n */\nconst _initDocument = function (dirty) {\n /* Create a HTML document using DOMParser */\n let doc;\n let body;\n\n if (FORCE_BODY) {\n dirty = '' + dirty;\n }\n\n try {\n doc = new DOMParser().parseFromString(dirty, 'text/html');\n } catch (err) {}\n\n /* Some browsers throw, some browsers return null for the code above\n DOMParser with text/html support is only in very recent browsers.\n See #159 why the check here is extra-thorough */\n if (!doc || !doc.documentElement) {\n doc = implementation.createHTMLDocument('');\n body = doc.body;\n body.parentNode.removeChild(body.parentNode.firstElementChild);\n body.outerHTML = dirty;\n }\n\n /* Work on whole document or just its body */\n if (typeof doc.getElementsByTagName === 'function') {\n return doc.getElementsByTagName(\n WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n return getElementsByTagName.call(doc,\n WHOLE_DOCUMENT ? 'html' : 'body')[0];\n};\n\n/**\n * _createIterator\n *\n * @param document/fragment to create iterator for\n * @return iterator instance\n */\nconst _createIterator = function (root) {\n return createNodeIterator.call(root.ownerDocument || root,\n root,\n NodeFilter.SHOW_ELEMENT |\n NodeFilter.SHOW_COMMENT |\n NodeFilter.SHOW_TEXT,\n () => {\n return NodeFilter.FILTER_ACCEPT;\n },\n false\n );\n};\n\n/**\n * _isClobbered\n *\n * @param element to check for clobbering attacks\n * @return true if clobbered, false if safe\n */\nconst _isClobbered = function (elm) {\n if (elm instanceof Text || elm instanceof Comment) {\n return false;\n }\n if (typeof elm.nodeName !== 'string' ||\n typeof elm.textContent !== 'string' ||\n typeof elm.removeChild !== 'function' ||\n !(elm.attributes instanceof NamedNodeMap) ||\n typeof elm.removeAttribute !== 'function' ||\n typeof elm.setAttribute !== 'function'\n ) {\n return true;\n }\n return false;\n};\n\n/**\n * _isNode\n *\n * @param object to check whether it's a DOM node\n * @return true is object is a DOM node\n */\nconst _isNode = function (obj) {\n return (\n typeof Node === 'object' ? obj instanceof Node : obj &&\n typeof obj === 'object' && typeof obj.nodeType === 'number' &&\n typeof obj.nodeName === 'string'\n );\n};\n\n/**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode\n */\nconst _executeHook = function (entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n\n hooks[entryPoint].forEach((hook) => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n};\n\n/**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param node to check for permission to exist\n * @return true if node was killed, false if left alive\n */\nconst _sanitizeElements = function (currentNode) {\n let content;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n const tagName = currentNode.nodeName.toLowerCase();\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS\n });\n\n /* Remove element if anything forbids its presence */\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Keep content except for black-listed elements */\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName] &&\n typeof currentNode.insertAdjacentHTML === 'function') {\n try {\n currentNode.insertAdjacentHTML('AfterEnd', currentNode.innerHTML);\n } catch (err) {}\n }\n _forceRemove(currentNode);\n return true;\n }\n\n /* Convert markup to cover jQuery behavior */\n if (SAFE_FOR_JQUERY && !currentNode.firstElementChild &&\n (!currentNode.content || !currentNode.content.firstElementChild) &&\n / tag that has an \"id\"\n // attribute at the time.\n if (lcName === 'name' &&\n currentNode.nodeName === 'IMG' && attributes.id) {\n idAttr = attributes.id;\n attributes = Array.prototype.slice.apply(attributes);\n _removeAttribute('id', currentNode);\n _removeAttribute(name, currentNode);\n if (attributes.indexOf(idAttr) > l) {\n currentNode.setAttribute('id', idAttr.value);\n }\n } else {\n // This avoids a crash in Safari v9.0 with double-ids.\n // The trick is to first set the id to be empty and then to\n // remove the attriubute\n if (name === 'id') {\n currentNode.setAttribute(name, '');\n }\n _removeAttribute(name, currentNode);\n }\n\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n continue;\n }\n\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM &&\n (lcName === 'id' || lcName === 'name') &&\n (value in window || value in document || value in formElement)) {\n continue;\n }\n\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n value = value.replace(MUSTACHE_EXPR, ' ');\n value = value.replace(ERB_EXPR, ' ');\n }\n\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n if (ALLOW_DATA_ATTR && DATA_ATTR.test(lcName)) {\n // This attribute is safe\n } else if (ALLOW_ARIA_ATTR && ARIA_ATTR.test(lcName)) {\n // This attribute is safe\n /* Otherwise, check the name is permitted */\n } else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n continue;\n\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) {\n // This attribute is safe\n\n /* Check no script, data or unknown possibly unsafe URI\n unless we know URI values are safe for that attribute */\n } else if (IS_ALLOWED_URI.test(value.replace(ATTR_WHITESPACE, ''))) {\n // This attribute is safe\n\n /* Keep image data URIs alive if src/xlink:href is allowed */\n } else if (\n (lcName === 'src' || lcName === 'xlink:href') &&\n value.indexOf('data:') === 0 &&\n DATA_URI_TAGS[currentNode.nodeName.toLowerCase()]) {\n // This attribute is safe\n\n /* Allow unknown protocols: This provides support for links that\n are handled by protocol handlers which may be unknown ahead of\n time, e.g. fb:, spotify: */\n } else if (\n ALLOW_UNKNOWN_PROTOCOLS &&\n !IS_SCRIPT_OR_DATA.test(value.replace(ATTR_WHITESPACE, ''))) {\n // This attribute is safe\n\n /* Check for binary attributes */\n } else if (!value) { // eslint-disable-line no-negated-condition\n // Binary attributes are safe at this point\n\n /* Anything else, presume unsafe, do not add it back */\n } else {\n continue;\n }\n\n /* Handle invalid data-* attribute set by try-catching it */\n try {\n currentNode.setAttribute(name, value);\n DOMPurify.removed.pop();\n } catch (err) {}\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeAttributes', currentNode, null);\n};\n\n/**\n * _sanitizeShadowDOM\n *\n * @param fragment to iterate over recursively\n * @return void\n */\nconst _sanitizeShadowDOM = function (fragment) {\n let shadowNode;\n const shadowIterator = _createIterator(fragment);\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n while ((shadowNode = shadowIterator.nextNode())) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(shadowNode);\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n};\n\n/**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} configuration object\n */\n// eslint-disable-next-line complexity\nDOMPurify.sanitize = function (dirty, cfg) {\n let body;\n let importedNode;\n let currentNode;\n let oldNode;\n let returnNode;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n if (!dirty) {\n dirty = '';\n }\n\n /* Stringify, in case dirty is an object */\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n if (typeof dirty.toString !== 'function') { // eslint-disable-line no-negated-condition\n throw new TypeError('toString is not a function');\n } else {\n dirty = dirty.toString();\n }\n }\n\n /* Check we can run. Otherwise fall back or ignore */\n if (!DOMPurify.isSupported) {\n if (typeof window.toStaticHTML === 'object' ||\n typeof window.toStaticHTML === 'function') {\n if (typeof dirty === 'string') {\n return window.toStaticHTML(dirty);\n } else if (_isNode(dirty)) {\n return window.toStaticHTML(dirty.outerHTML);\n }\n }\n return dirty;\n }\n\n /* Assign config vars */\n _parseConfig(cfg);\n\n /* Clean up removed elements */\n DOMPurify.removed = [];\n\n if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else {\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !WHOLE_DOCUMENT && dirty.indexOf('<') === -1) {\n return dirty;\n }\n\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : '';\n }\n }\n\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n\n /* Get node iterator */\n const nodeIterator = _createIterator(body);\n\n /* Now start iterating over the created document */\n while ((currentNode = nodeIterator.nextNode())) {\n /* Fix IE's strange behavior with manipulated textNodes #89 */\n if (currentNode.nodeType === 3 && currentNode === oldNode) {\n continue;\n }\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(currentNode);\n\n oldNode = currentNode;\n }\n\n /* Return sanitized string or DOM */\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n\n while (body.firstChild) {\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n\n if (RETURN_DOM_IMPORT) {\n /* AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs. */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n\n return returnNode;\n }\n\n return WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n};\n\n/**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint\n * @param {Function} hookFunction\n */\nDOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n hooks[entryPoint] = hooks[entryPoint] || [];\n hooks[entryPoint].push(hookFunction);\n};\n\n/**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint\n * @return void\n */\nDOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint].pop();\n }\n};\n\n/**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint\n * @return void\n */\nDOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n};\n\n/**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n *\n * @return void\n */\nDOMPurify.removeAllHooks = function () {\n hooks = {};\n};\n\nexport default DOMPurify;\n\n\n\n// WEBPACK FOOTER //\n// ./src/purify.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 7b84f3b47ba47f1f0b12","webpack:///./src/attrs.js","webpack:///./src/environment.js","webpack:///./src/tags.js","webpack:///./src/utils.js","webpack:///./src/purify.js"],"names":["html","svg","mathMl","xml","getGlobal","global","self","window","svgFilters","text","addToSet","clone","set","array","l","length","toLowerCase","object","newObject","property","Object","prototype","hasOwnProperty","call","TAGS","ATTRS","DOMPurify","getInstanceFor","version","hooks","ALLOWED_TAGS","DEFAULT_ALLOWED_TAGS","ALLOWED_ATTR","DEFAULT_ALLOWED_ATTR","FORBID_TAGS","FORBID_ATTR","ALLOW_ARIA_ATTR","ALLOW_DATA_ATTR","ALLOW_UNKNOWN_PROTOCOLS","SAFE_FOR_JQUERY","SAFE_FOR_TEMPLATES","MUSTACHE_EXPR","ERB_EXPR","WHOLE_DOCUMENT","FORCE_BODY","RETURN_DOM","RETURN_DOM_FRAGMENT","RETURN_DOM_IMPORT","SANITIZE_DOM","KEEP_CONTENT","FORBID_CONTENTS","DATA_URI_TAGS","URI_SAFE_ATTRIBUTES","CONFIG","formElement","document","DocumentFragment","HTMLTemplateElement","Node","NodeFilter","Text","Comment","DOMParser","NamedNodeMap","originalDocument","implementation","createNodeIterator","getElementsByTagName","createDocumentFragment","importNode","isSupported","Boolean","createHTMLDocument","documentMode","removed","nodeType","MozNamedAttrMap","template","createElement","content","ownerDocument","_parseConfig","cfg","ADD_TAGS","ADD_ATTR","ADD_URI_SAFE_ATTR","freeze","_forceRemove","node","push","element","parentNode","removeChild","err","outerHTML","_removeAttribute","name","attribute","getAttributeNode","from","removeAttribute","_initDocument","dirty","doc","body","parseFromString","documentElement","firstElementChild","_createIterator","root","SHOW_ELEMENT","SHOW_COMMENT","SHOW_TEXT","FILTER_ACCEPT","_isClobbered","elm","nodeName","textContent","attributes","setAttribute","_isNode","obj","_executeHook","entryPoint","currentNode","data","forEach","hook","_sanitizeElements","tagName","allowedTags","insertAdjacentHTML","innerHTML","test","cloneNode","replace","DATA_ATTR","ARIA_ATTR","IS_ALLOWED_URI","IS_SCRIPT_OR_DATA","ATTR_WHITESPACE","_sanitizeAttributes","attr","value","lcName","idAttr","hookEvent","attrName","attrValue","keepAttr","allowedAttributes","trim","id","Array","slice","apply","indexOf","pop","_sanitizeShadowDOM","fragment","shadowNode","shadowIterator","nextNode","sanitize","importedNode","oldNode","returnNode","toString","TypeError","toStaticHTML","appendChild","firstChild","nodeIterator","addHook","hookFunction","removeHook","removeHooks","removeAllHooks","module","exports"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;;;AChEO,IAAMA,sBAAO,CAClB,QADkB,EAElB,QAFkB,EAGlB,OAHkB,EAIlB,KAJkB,EAKlB,cALkB,EAMlB,YANkB,EAOlB,SAPkB,EAQlB,QARkB,EASlB,aATkB,EAUlB,aAVkB,EAWlB,SAXkB,EAYlB,MAZkB,EAalB,OAbkB,EAclB,OAdkB,EAelB,OAfkB,EAgBlB,MAhBkB,EAiBlB,SAjBkB,EAkBlB,QAlBkB,EAmBlB,UAnBkB,EAoBlB,SApBkB,EAqBlB,KArBkB,EAsBlB,UAtBkB,EAuBlB,UAvBkB,EAwBlB,SAxBk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,CAJD;;AAMA;;;;;;;AAOAnI,UAAUsJ,WAAV,GAAwB,UAASrD,UAAT,EAAqB;AAC3C,MAAI9F,MAAM8F,UAAN,CAAJ,EAAuB;AACrB9F,UAAM8F,UAAN,IAAoB,EAApB;AACD;AACF,CAJD;;AAMA;;;;;;AAMAjG,UAAUuJ,cAAV,GAA2B,YAAW;AACpCpJ,UAAQ,EAAR;AACD,CAFD;;AAIAqJ,OAAOC,OAAP,GAAiBxJ,eAAe,4BAAf,CAAjB,C","file":"purify.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"DOMPurify\"] = factory();\n\telse\n\t\troot[\"DOMPurify\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 7b84f3b47ba47f1f0b12","export const html = [\n 'accept',\n 'action',\n 'align',\n 'alt',\n 'autocomplete',\n 'background',\n 'bgcolor',\n 'border',\n 'cellpadding',\n 'cellspacing',\n 'checked',\n 'cite',\n 'class',\n 'clear',\n 'color',\n 'cols',\n 'colspan',\n 'coords',\n 'datetime',\n 'default',\n 'dir',\n 'disabled',\n 'download',\n 'enctype',\n 'face',\n 'for',\n 'headers',\n 'height',\n 'hidden',\n 'high',\n 'href',\n 'hreflang',\n 'id',\n 'ismap',\n 'label',\n 'lang',\n 'list',\n 'loop',\n 'low',\n 'max',\n 'maxlength',\n 'media',\n 'method',\n 'min',\n 'multiple',\n 'name',\n 'noshade',\n 'novalidate',\n 'nowrap',\n 'open',\n 'optimum',\n 'pattern',\n 'placeholder',\n 'poster',\n 'preload',\n 'pubdate',\n 'radiogroup',\n 'readonly',\n 'rel',\n 'required',\n 'rev',\n 'reversed',\n 'role',\n 'rows',\n 'rowspan',\n 'spellcheck',\n 'scope',\n 'selected',\n 'shape',\n 'size',\n 'span',\n 'srclang',\n 'start',\n 'src',\n 'step',\n 'style',\n 'summary',\n 'tabindex',\n 'title',\n 'type',\n 'usemap',\n 'valign',\n 'value',\n 'width',\n 'xmlns',\n];\n\nexport const svg = [\n 'accent-height',\n 'accumulate',\n 'additivive',\n 'alignment-baseline',\n 'ascent',\n 'attributename',\n 'attributetype',\n 'azimuth',\n 'basefrequency',\n 'baseline-shift',\n 'begin',\n 'bias',\n 'by',\n 'clip',\n 'clip-path',\n 'clip-rule',\n 'color',\n 'color-interpolation',\n 'color-interpolation-filters',\n 'color-profile',\n 'color-rendering',\n 'cx',\n 'cy',\n 'd',\n 'dx',\n 'dy',\n 'diffuseconstant',\n 'direction',\n 'display',\n 'divisor',\n 'dur',\n 'edgemode',\n 'elevation',\n 'end',\n 'fill',\n 'fill-opacity',\n 'fill-rule',\n 'filter',\n 'flood-color',\n 'flood-opacity',\n 'font-family',\n 'font-size',\n 'font-size-adjust',\n 'font-stretch',\n 'font-style',\n 'font-variant',\n 'font-weight',\n 'fx',\n 'fy',\n 'g1',\n 'g2',\n 'glyph-name',\n 'glyphref',\n 'gradientunits',\n 'gradienttransform',\n 'image-rendering',\n 'in',\n 'in2',\n 'k',\n 'k1',\n 'k2',\n 'k3',\n 'k4',\n 'kerning',\n 'keypoints',\n 'keysplines',\n 'keytimes',\n 'lengthadjust',\n 'letter-spacing',\n 'kernelmatrix',\n 'kernelunitlength',\n 'lighting-color',\n 'local',\n 'marker-end',\n 'marker-mid',\n 'marker-start',\n 'markerheight',\n 'markerunits',\n 'markerwidth',\n 'maskcontentunits',\n 'maskunits',\n 'max',\n 'mask',\n 'mode',\n 'min',\n 'numoctaves',\n 'offset',\n 'operator',\n 'opacity',\n 'order',\n 'orient',\n 'orientation',\n 'origin',\n 'overflow',\n 'paint-order',\n 'path',\n 'pathlength',\n 'patterncontentunits',\n 'patterntransform',\n 'patternunits',\n 'points',\n 'preservealpha',\n 'r',\n 'rx',\n 'ry',\n 'radius',\n 'refx',\n 'refy',\n 'repeatcount',\n 'repeatdur',\n 'restart',\n 'result',\n 'rotate',\n 'scale',\n 'seed',\n 'shape-rendering',\n 'specularconstant',\n 'specularexponent',\n 'spreadmethod',\n 'stddeviation',\n 'stitchtiles',\n 'stop-color',\n 'stop-opacity',\n 'stroke-dasharray',\n 'stroke-dashoffset',\n 'stroke-linecap',\n 'stroke-linejoin',\n 'stroke-miterlimit',\n 'stroke-opacity',\n 'stroke',\n 'stroke-width',\n 'surfacescale',\n 'targetx',\n 'targety',\n 'transform',\n 'text-anchor',\n 'text-decoration',\n 'text-rendering',\n 'textlength',\n 'u1',\n 'u2',\n 'unicode',\n 'values',\n 'viewbox',\n 'visibility',\n 'vert-adv-y',\n 'vert-origin-x',\n 'vert-origin-y',\n 'word-spacing',\n 'wrap',\n 'writing-mode',\n 'xchannelselector',\n 'ychannelselector',\n 'x',\n 'x1',\n 'x2',\n 'y',\n 'y1',\n 'y2',\n 'z',\n 'zoomandpan',\n];\n\nexport const mathMl = [\n 'accent',\n 'accentunder',\n 'bevelled',\n 'close',\n 'columnsalign',\n 'columnlines',\n 'columnspan',\n 'denomalign',\n 'depth',\n 'display',\n 'displaystyle',\n 'fence',\n 'frame',\n 'largeop',\n 'length',\n 'linethickness',\n 'lspace',\n 'lquote',\n 'mathbackground',\n 'mathcolor',\n 'mathsize',\n 'mathvariant',\n 'maxsize',\n 'minsize',\n 'movablelimits',\n 'notation',\n 'numalign',\n 'open',\n 'rowalign',\n 'rowlines',\n 'rowspacing',\n 'rowspan',\n 'rspace',\n 'rquote',\n 'scriptlevel',\n 'scriptminsize',\n 'scriptsizemultiplier',\n 'selection',\n 'separator',\n 'separators',\n 'stretchy',\n 'subscriptshift',\n 'supscriptshift',\n 'symmetric',\n 'voffset',\n];\n\nexport const xml = [\n 'xlink:href',\n 'xml:id',\n 'xlink:title',\n 'xml:space',\n 'xmlns:xlink',\n];\n\n\n\n// WEBPACK FOOTER //\n// ./src/attrs.js","function getGlobal() {\n /* eslint-disable no-use-before-define */\n const global = (typeof self === 'object' && self.self === self && self) ||\n (typeof global === 'object' && global.global === global && global) ||\n this || {};\n /* eslint-enable no-use-before-define */\n // `window` at least needs to be object to not break script execution\n global.window = global.window || {};\n\n return global;\n}\n\nexport default getGlobal;\n\n\n\n// WEBPACK FOOTER //\n// ./src/environment.js","export const html = [\n 'a',\n 'abbr',\n 'acronym',\n 'address',\n 'area',\n 'article',\n 'aside',\n 'audio',\n 'b',\n 'bdi',\n 'bdo',\n 'big',\n 'blink',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'center',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'content',\n 'data',\n 'datalist',\n 'dd',\n 'decorator',\n 'del',\n 'details',\n 'dfn',\n 'dir',\n 'div',\n 'dl',\n 'dt',\n 'element',\n 'em',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'font',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'head',\n 'header',\n 'hgroup',\n 'hr',\n 'html',\n 'i',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'label',\n 'legend',\n 'li',\n 'main',\n 'map',\n 'mark',\n 'marquee',\n 'menu',\n 'menuitem',\n 'meter',\n 'nav',\n 'nobr',\n 'ol',\n 'optgroup',\n 'option',\n 'output',\n 'p',\n 'pre',\n 'progress',\n 'q',\n 'rp',\n 'rt',\n 'ruby',\n 's',\n 'samp',\n 'section',\n 'select',\n 'shadow',\n 'small',\n 'source',\n 'spacer',\n 'span',\n 'strike',\n 'strong',\n 'style',\n 'sub',\n 'summary',\n 'sup',\n 'table',\n 'tbody',\n 'td',\n 'template',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n 'tr',\n 'track',\n 'tt',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr',\n];\n\n// SVG\nexport const svg = [\n 'svg',\n 'altglyph',\n 'altglyphdef',\n 'altglyphitem',\n 'animatecolor',\n 'animatemotion',\n 'animatetransform',\n 'circle',\n 'clippath',\n 'defs',\n 'desc',\n 'ellipse',\n 'filter',\n 'font',\n 'g',\n 'glyph',\n 'glyphref',\n 'hkern',\n 'image',\n 'line',\n 'lineargradient',\n 'marker',\n 'mask',\n 'metadata',\n 'mpath',\n 'path',\n 'pattern',\n 'polygon',\n 'polyline',\n 'radialgradient',\n 'rect',\n 'stop',\n 'switch',\n 'symbol',\n 'text',\n 'textpath',\n 'title',\n 'tref',\n 'tspan',\n 'view',\n 'vkern',\n];\n\nexport const svgFilters = [\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'feSpecularLighting',\n 'feTile',\n 'feTurbulence',\n];\n\nexport const mathMl = [\n 'math',\n 'menclose',\n 'merror',\n 'mfenced',\n 'mfrac',\n 'mglyph',\n 'mi',\n 'mlabeledtr',\n 'mmuliscripts',\n 'mn',\n 'mo',\n 'mover',\n 'mpadded',\n 'mphantom',\n 'mroot',\n 'mrow',\n 'ms',\n 'mpspace',\n 'msqrt',\n 'mystyle',\n 'msub',\n 'msup',\n 'msubsup',\n 'mtable',\n 'mtd',\n 'mtext',\n 'mtr',\n 'munder',\n 'munderover',\n];\n\nexport const text = ['#text'];\n\n\n\n// WEBPACK FOOTER //\n// ./src/tags.js","/* Add properties to a lookup table */\nexport function addToSet(set, array) {\n let l = array.length;\n while (l--) {\n if (typeof array[l] === 'string') {\n array[l] = array[l].toLowerCase();\n }\n set[array[l]] = true;\n }\n return set;\n}\n\n/* Shallow clone an object */\nexport function clone(object) {\n const newObject = {};\n let property;\n for (property in object) {\n if (Object.prototype.hasOwnProperty.call(object, property)) {\n newObject[property] = object[property];\n }\n }\n return newObject;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils.js","import getGlobal from './environment';\nimport * as TAGS from './tags';\nimport * as ATTRS from './attrs';\nimport { addToSet, clone } from './utils';\n\n// eslint-disable-next-line no-unused-vars\nconst DOMPurify = getInstanceFor;\n\n/**\n* Version label, exposed for easier checks\n* if DOMPurify is up to date or not\n*/\nDOMPurify.version = '0.8.5';\n\nlet hooks;\nlet ALLOWED_TAGS;\nlet DEFAULT_ALLOWED_TAGS;\nlet ALLOWED_ATTR;\nlet DEFAULT_ALLOWED_ATTR;\nlet FORBID_TAGS;\nlet FORBID_ATTR;\nlet ALLOW_ARIA_ATTR;\nlet ALLOW_DATA_ATTR;\nlet ALLOW_UNKNOWN_PROTOCOLS;\nlet SAFE_FOR_JQUERY;\nlet SAFE_FOR_TEMPLATES;\nlet MUSTACHE_EXPR;\nlet ERB_EXPR;\nlet WHOLE_DOCUMENT;\nlet FORCE_BODY;\nlet RETURN_DOM;\nlet RETURN_DOM_FRAGMENT;\nlet RETURN_DOM_IMPORT;\nlet SANITIZE_DOM;\nlet KEEP_CONTENT;\nlet FORBID_CONTENTS;\nlet DATA_URI_TAGS;\nlet URI_SAFE_ATTRIBUTES;\nlet CONFIG;\nlet formElement;\n\nlet document;\nlet DocumentFragment;\nlet HTMLTemplateElement;\nlet Node;\nlet NodeFilter;\nlet Text;\nlet Comment;\nlet DOMParser;\nlet NamedNodeMap;\nlet originalDocument;\n\nlet implementation;\nlet createNodeIterator;\nlet getElementsByTagName;\nlet createDocumentFragment;\nlet importNode;\n\nfunction getInstanceFor(window) {\n function isSupported() {\n return Boolean(\n implementation &&\n typeof implementation.createHTMLDocument !== 'undefined' &&\n document.documentMode !== 9\n );\n }\n\n DOMPurify.isSupported = isSupported();\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n\n return getInstanceFor;\n }\n\n // eslint-disable-next-line no-sequences, no-unused-expressions\n (document = window.document), (DocumentFragment =\n window.DocumentFragment), (HTMLTemplateElement =\n window.HTMLTemplateElement), (Node = window.Node), (NodeFilter =\n window.NodeFilter), (Text = window.Text), (Comment =\n window.Comment), (DOMParser = window.DOMParser), (NamedNodeMap =\n window.NamedNodeMap || window.MozNamedAttrMap);\n originalDocument = document;\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n implementation = document.implementation;\n createNodeIterator = document.createNodeIterator;\n getElementsByTagName = document.getElementsByTagName;\n createDocumentFragment = document.createDocumentFragment;\n\n importNode = originalDocument.importNode;\n\n hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = isSupported();\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n ALLOWED_TAGS = null;\n DEFAULT_ALLOWED_TAGS = addToSet({}, [\n TAGS.html,\n TAGS.svg,\n TAGS.svgFilters,\n TAGS.mathMl,\n TAGS.text,\n ]);\n\n /* Allowed attribute names */\n ALLOWED_ATTR = null;\n DEFAULT_ALLOWED_ATTR = addToSet({}, [\n ATTRS.html,\n ATTRS.svg,\n ATTRS.mathMl,\n ATTRS.xml,\n ]);\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Output should be safe for jQuery's $() factory? */\n SAFE_FOR_JQUERY = false;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n SAFE_FOR_TEMPLATES = false;\n\n /* Specify template detection regex for SAFE_FOR_TEMPLATES mode */\n MUSTACHE_EXPR = /\\{\\{[\\s\\S]*|[\\s\\S]*\\}\\}/gm;\n ERB_EXPR = /<%[\\s\\S]*|[\\s\\S]*%>/gm;\n\n /* Decide if document with ... should be returned */\n WHOLE_DOCUMENT = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html string.\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html string */\n RETURN_DOM_FRAGMENT = false;\n\n /* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM\n * `Node` is imported into the current `Document`. If this flag is not enabled the\n * `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by\n * DOMPurify. */\n RETURN_DOM_IMPORT = false;\n\n /* Output should be free from DOM clobbering attacks? */\n SANITIZE_DOM = true;\n\n /* Keep element content when removing element? */\n KEEP_CONTENT = true;\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n FORBID_CONTENTS = addToSet({}, [\n 'audio',\n 'head',\n 'math',\n 'script',\n 'style',\n 'svg',\n 'video',\n ]);\n\n /* Tags that are safe for data: URIs */\n DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image']);\n\n /* Attributes safe for values like \"javascript:\" */\n URI_SAFE_ATTRIBUTES = addToSet({}, [\n 'alt',\n 'class',\n 'for',\n 'id',\n 'label',\n 'name',\n 'pattern',\n 'placeholder',\n 'summary',\n 'title',\n 'value',\n 'style',\n 'xmlns',\n ]);\n\n /* Keep a reference to config to pass to hooks */\n CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n formElement = document.createElement('form');\n\n return DOMPurify;\n}\n\n/**\n * _parseConfig\n *\n * @param optional config literal\n */\n// eslint-disable-next-line complexity\nconst _parseConfig = function(cfg) {\n /* Shield configuration object from tampering */\n if (typeof cfg !== 'object') {\n cfg = {};\n }\n\n /* Set configuration parameters */\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg\n ? addToSet({}, cfg.ALLOWED_TAGS)\n : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg\n ? addToSet({}, cfg.ALLOWED_ATTR)\n : DEFAULT_ALLOWED_ATTR;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {};\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n SAFE_FOR_JQUERY = cfg.SAFE_FOR_JQUERY || false; // Default false\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_DOM_IMPORT = cfg.RETURN_DOM_IMPORT || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);\n }\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR);\n }\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (Object && 'freeze' in Object) {\n Object.freeze(cfg);\n }\n\n CONFIG = cfg;\n};\n\n/**\n * _forceRemove\n *\n * @param a DOM node\n */\nconst _forceRemove = function(node) {\n DOMPurify.removed.push({ element: node });\n try {\n node.parentNode.removeChild(node);\n } catch (err) {\n node.outerHTML = '';\n }\n};\n\n/**\n * _removeAttribute\n *\n * @param an Attribute name\n * @param a DOM node\n */\nconst _removeAttribute = function(name, node) {\n DOMPurify.removed.push({\n attribute: node.getAttributeNode(name),\n from: node,\n });\n node.removeAttribute(name);\n};\n\n/**\n * _initDocument\n *\n * @param a string of dirty markup\n * @return a DOM, filled with the dirty markup\n */\nconst _initDocument = function(dirty) {\n /* Create a HTML document using DOMParser */\n let doc;\n let body;\n\n if (FORCE_BODY) {\n dirty = '' + dirty;\n }\n\n try {\n doc = new DOMParser().parseFromString(dirty, 'text/html');\n } catch (err) {}\n\n /* Some browsers throw, some browsers return null for the code above\n DOMParser with text/html support is only in very recent browsers.\n See #159 why the check here is extra-thorough */\n if (!doc || !doc.documentElement) {\n doc = implementation.createHTMLDocument('');\n body = doc.body;\n body.parentNode.removeChild(body.parentNode.firstElementChild);\n body.outerHTML = dirty;\n }\n\n /* Work on whole document or just its body */\n if (typeof doc.getElementsByTagName === 'function') {\n return doc.getElementsByTagName(WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n};\n\n/**\n * _createIterator\n *\n * @param document/fragment to create iterator for\n * @return iterator instance\n */\nconst _createIterator = function(root) {\n return createNodeIterator.call(\n root.ownerDocument || root,\n root,\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT,\n () => {\n return NodeFilter.FILTER_ACCEPT;\n },\n false\n );\n};\n\n/**\n * _isClobbered\n *\n * @param element to check for clobbering attacks\n * @return true if clobbered, false if safe\n */\nconst _isClobbered = function(elm) {\n if (elm instanceof Text || elm instanceof Comment) {\n return false;\n }\n if (\n typeof elm.nodeName !== 'string' ||\n typeof elm.textContent !== 'string' ||\n typeof elm.removeChild !== 'function' ||\n !(elm.attributes instanceof NamedNodeMap) ||\n typeof elm.removeAttribute !== 'function' ||\n typeof elm.setAttribute !== 'function'\n ) {\n return true;\n }\n return false;\n};\n\n/**\n * _isNode\n *\n * @param object to check whether it's a DOM node\n * @return true is object is a DOM node\n */\nconst _isNode = function(obj) {\n return typeof Node === 'object'\n ? obj instanceof Node\n : obj &&\n typeof obj === 'object' &&\n typeof obj.nodeType === 'number' &&\n typeof obj.nodeName === 'string';\n};\n\n/**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode\n */\nconst _executeHook = function(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n\n hooks[entryPoint].forEach(hook => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n};\n\n/**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param node to check for permission to exist\n * @return true if node was killed, false if left alive\n */\nconst _sanitizeElements = function(currentNode) {\n let content;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n const tagName = currentNode.nodeName.toLowerCase();\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS,\n });\n\n /* Remove element if anything forbids its presence */\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Keep content except for black-listed elements */\n if (\n KEEP_CONTENT &&\n !FORBID_CONTENTS[tagName] &&\n typeof currentNode.insertAdjacentHTML === 'function'\n ) {\n try {\n currentNode.insertAdjacentHTML('AfterEnd', currentNode.innerHTML);\n } catch (err) {}\n }\n _forceRemove(currentNode);\n return true;\n }\n\n /* Convert markup to cover jQuery behavior */\n if (\n SAFE_FOR_JQUERY &&\n !currentNode.firstElementChild &&\n (!currentNode.content || !currentNode.content.firstElementChild) &&\n / tag that has an \"id\"\n // attribute at the time.\n if (lcName === 'name' && currentNode.nodeName === 'IMG' && attributes.id) {\n idAttr = attributes.id;\n attributes = Array.prototype.slice.apply(attributes);\n _removeAttribute('id', currentNode);\n _removeAttribute(name, currentNode);\n if (attributes.indexOf(idAttr) > l) {\n currentNode.setAttribute('id', idAttr.value);\n }\n } else {\n // This avoids a crash in Safari v9.0 with double-ids.\n // The trick is to first set the id to be empty and then to\n // remove the attriubute\n if (name === 'id') {\n currentNode.setAttribute(name, '');\n }\n _removeAttribute(name, currentNode);\n }\n\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n continue;\n }\n\n /* Make sure attribute cannot clobber */\n if (\n SANITIZE_DOM &&\n (lcName === 'id' || lcName === 'name') &&\n (value in window || value in document || value in formElement)\n ) {\n continue;\n }\n\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n value = value.replace(MUSTACHE_EXPR, ' ');\n value = value.replace(ERB_EXPR, ' ');\n }\n\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n if (ALLOW_DATA_ATTR && DATA_ATTR.test(lcName)) {\n // This attribute is safe\n } else if (ALLOW_ARIA_ATTR && ARIA_ATTR.test(lcName)) {\n // This attribute is safe\n /* Otherwise, check the name is permitted */\n } else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n continue;\n\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) {\n // This attribute is safe\n /* Check no script, data or unknown possibly unsafe URI\n unless we know URI values are safe for that attribute */\n } else if (IS_ALLOWED_URI.test(value.replace(ATTR_WHITESPACE, ''))) {\n // This attribute is safe\n /* Keep image data URIs alive if src/xlink:href is allowed */\n } else if (\n (lcName === 'src' || lcName === 'xlink:href') &&\n value.indexOf('data:') === 0 &&\n DATA_URI_TAGS[currentNode.nodeName.toLowerCase()]\n ) {\n // This attribute is safe\n /* Allow unknown protocols: This provides support for links that\n are handled by protocol handlers which may be unknown ahead of\n time, e.g. fb:, spotify: */\n } else if (\n ALLOW_UNKNOWN_PROTOCOLS &&\n !IS_SCRIPT_OR_DATA.test(value.replace(ATTR_WHITESPACE, ''))\n ) {\n // This attribute is safe\n /* Check for binary attributes */\n // eslint-disable-next-line no-negated-condition\n } else if (!value) {\n // Binary attributes are safe at this point\n /* Anything else, presume unsafe, do not add it back */\n } else {\n continue;\n }\n\n /* Handle invalid data-* attribute set by try-catching it */\n try {\n currentNode.setAttribute(name, value);\n DOMPurify.removed.pop();\n } catch (err) {}\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeAttributes', currentNode, null);\n};\n\n/**\n * _sanitizeShadowDOM\n *\n * @param fragment to iterate over recursively\n * @return void\n */\nconst _sanitizeShadowDOM = function(fragment) {\n let shadowNode;\n const shadowIterator = _createIterator(fragment);\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n while ((shadowNode = shadowIterator.nextNode())) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(shadowNode);\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n};\n\n/**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} configuration object\n */\n// eslint-disable-next-line complexity\nDOMPurify.sanitize = function(dirty, cfg) {\n let body;\n let importedNode;\n let currentNode;\n let oldNode;\n let returnNode;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n if (!dirty) {\n dirty = '';\n }\n\n /* Stringify, in case dirty is an object */\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n // eslint-disable-next-line no-negated-condition\n if (typeof dirty.toString !== 'function') {\n throw new TypeError('toString is not a function');\n } else {\n dirty = dirty.toString();\n }\n }\n\n /* Check we can run. Otherwise fall back or ignore */\n if (!DOMPurify.isSupported) {\n if (\n typeof window.toStaticHTML === 'object' ||\n typeof window.toStaticHTML === 'function'\n ) {\n if (typeof dirty === 'string') {\n return window.toStaticHTML(dirty);\n } else if (_isNode(dirty)) {\n return window.toStaticHTML(dirty.outerHTML);\n }\n }\n return dirty;\n }\n\n /* Assign config vars */\n _parseConfig(cfg);\n\n /* Clean up removed elements */\n DOMPurify.removed = [];\n\n if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else {\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !WHOLE_DOCUMENT && dirty.indexOf('<') === -1) {\n return dirty;\n }\n\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : '';\n }\n }\n\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n\n /* Get node iterator */\n const nodeIterator = _createIterator(body);\n\n /* Now start iterating over the created document */\n while ((currentNode = nodeIterator.nextNode())) {\n /* Fix IE's strange behavior with manipulated textNodes #89 */\n if (currentNode.nodeType === 3 && currentNode === oldNode) {\n continue;\n }\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(currentNode);\n\n oldNode = currentNode;\n }\n\n /* Return sanitized string or DOM */\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n\n while (body.firstChild) {\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n\n if (RETURN_DOM_IMPORT) {\n /* AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs. */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n\n return returnNode;\n }\n\n return WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n};\n\n/**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint\n * @param {Function} hookFunction\n */\nDOMPurify.addHook = function(entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n hooks[entryPoint] = hooks[entryPoint] || [];\n hooks[entryPoint].push(hookFunction);\n};\n\n/**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint\n * @return void\n */\nDOMPurify.removeHook = function(entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint].pop();\n }\n};\n\n/**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint\n * @return void\n */\nDOMPurify.removeHooks = function(entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n};\n\n/**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n *\n * @return void\n */\nDOMPurify.removeAllHooks = function() {\n hooks = {};\n};\n\nmodule.exports = getInstanceFor(getGlobal());\n\n\n\n// WEBPACK FOOTER //\n// ./src/purify.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/purify.min.js b/dist/purify.min.js index f4c13db0..0683ea8a 100644 --- a/dist/purify.min.js +++ b/dist/purify.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.DOMPurify=t():e.DOMPurify=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.html=["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","coords","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","span","srclang","start","src","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"],t.svg=["accent-height","accumulate","additivive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","clip","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","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","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mode","min","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","surfacescale","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","u1","u2","unicode","values","viewbox","visibility","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","y","y1","y2","z","zoomandpan"],t.mathMl=["accent","accentunder","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","display","displaystyle","fence","frame","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"],t.xml=["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.html=["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","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","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"],t.svg=["svg","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","switch","symbol","text","textpath","title","tref","tspan","view","vkern"],t.svgFilters=["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence"],t.mathMl=["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmuliscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mpspace","msqrt","mystyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"],t.text=["#text"]},function(e,t,n){"use strict";function o(e,t){for(var n=t.length;n--;)"string"==typeof t[n]&&(t[n]=t[n].toLowerCase()),e[t[n]]=!0;return e}function r(e){var t={},n=void 0;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.addToSet=o,t.clone=r},function(e,t,n){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=n(1),a=o(i),l=n(0),s=o(l),d=n(2),c=function e(t){return e};c.version="0.8.5",c.removed=[],window&&window.document&&9===window.document.nodeType||(c.isSupported=!1);var u=window,f=u.document,p=u.DocumentFragment,m=u.HTMLTemplateElement,h=u.Node,y=u.NodeFilter,g=u.Text,v=u.Comment,b=u.DOMParser,T=u.NamedNodeMap,w=void 0===T?window.MozNamedAttrMap:T,x=f;if("function"==typeof m){var A=f.createElement("template");A.content&&A.content.ownerDocument&&(f=A.content.ownerDocument)}var S=f,O=S.implementation,k=S.createNodeIterator,M=S.getElementsByTagName,_=S.createDocumentFragment,E=x.importNode,D={};c.isSupported="undefined"!=typeof O.createHTMLDocument&&9!==f.documentMode;var N=null,L=(0,d.addToSet)({},[a.html,a.svg,a.svgFilters,a.mathMl,a.text]),C=null,R=(0,d.addToSet)({},[s.html,s.svg,s.mathMl,s.xml]),F=null,z=null,H=!0,j=!0,P=!1,B=!1,I=!1,W=/\{\{[\s\S]*|[\s\S]*\}\}/gm,G=/<%[\s\S]*|[\s\S]*%>/gm,q=!1,U=!1,V=!1,Y=!1,K=!1,$=!0,J=!0,Q=(0,d.addToSet)({},["audio","head","math","script","style","svg","video"]),X=(0,d.addToSet)({},["audio","video","img","source","image"]),Z=(0,d.addToSet)({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ee=null,te=f.createElement("form"),ne=function(e){"object"!==("undefined"==typeof e?"undefined":r(e))&&(e={}),N="ALLOWED_TAGS"in e?(0,d.addToSet)({},e.ALLOWED_TAGS):L,C="ALLOWED_ATTR"in e?(0,d.addToSet)({},e.ALLOWED_ATTR):R,F="FORBID_TAGS"in e?(0,d.addToSet)({},e.FORBID_TAGS):{},z="FORBID_ATTR"in e?(0,d.addToSet)({},e.FORBID_ATTR):{},H=e.ALLOW_ARIA_ATTR!==!1,j=e.ALLOW_DATA_ATTR!==!1,P=e.ALLOW_UNKNOWN_PROTOCOLS||!1,B=e.SAFE_FOR_JQUERY||!1,I=e.SAFE_FOR_TEMPLATES||!1,q=e.WHOLE_DOCUMENT||!1,V=e.RETURN_DOM||!1,Y=e.RETURN_DOM_FRAGMENT||!1,K=e.RETURN_DOM_IMPORT||!1,U=e.FORCE_BODY||!1,$=e.SANITIZE_DOM!==!1,J=e.KEEP_CONTENT!==!1,I&&(j=!1),Y&&(V=!0),e.ADD_TAGS&&(N===L&&(N=(0,d.clone)(N)),(0,d.addToSet)(N,e.ADD_TAGS)),e.ADD_ATTR&&(C===R&&(C=(0,d.clone)(C)),(0,d.addToSet)(C,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&(0,d.addToSet)(Z,e.ADD_URI_SAFE_ATTR),J&&(N["#text"]=!0),Object&&"freeze"in Object&&Object.freeze(e),ee=e},oe=function(e){c.removed.push({element:e});try{e.parentNode.removeChild(e)}catch(t){e.outerHTML=""}},re=function(e,t){c.removed.push({attribute:t.getAttributeNode(e),from:t}),t.removeAttribute(e)},ie=function(e){var t=void 0,n=void 0;U&&(e=""+e);try{t=(new b).parseFromString(e,"text/html")}catch(e){}return t&&t.documentElement||(t=O.createHTMLDocument(""),n=t.body,n.parentNode.removeChild(n.parentNode.firstElementChild),n.outerHTML=e),"function"==typeof t.getElementsByTagName?t.getElementsByTagName(q?"html":"body")[0]:M.call(t,q?"html":"body")[0]},ae=function(e){return k.call(e.ownerDocument||e,e,y.SHOW_ELEMENT|y.SHOW_COMMENT|y.SHOW_TEXT,function(){return y.FILTER_ACCEPT},!1)},le=function(e){return!(e instanceof g||e instanceof v)&&!("string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof w&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute)},se=function(e){return"object"===("undefined"==typeof h?"undefined":r(h))?e instanceof h:e&&"object"===("undefined"==typeof e?"undefined":r(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},de=function(e,t,n){D[e]&&D[e].forEach(function(e){e.call(c,t,n,ee)})},ce=function(e){var t=void 0;if(de("beforeSanitizeElements",e,null),le(e))return oe(e),!0;var n=e.nodeName.toLowerCase();if(de("uponSanitizeElement",e,{tagName:n,allowedTags:N}),!N[n]||F[n]){if(J&&!Q[n]&&"function"==typeof e.insertAdjacentHTML)try{e.insertAdjacentHTML("AfterEnd",e.innerHTML)}catch(e){}return oe(e),!0}return!B||e.firstElementChild||e.content&&e.content.firstElementChild||!/l&&e.setAttribute("id",i.value)):("id"===n&&e.setAttribute(n,""),re(n,e)),s.keepAttr&&(!$||"id"!==r&&"name"!==r||!(o in window||o in f||o in te))){if(I&&(o=o.replace(W," "),o=o.replace(G," ")),j&&ue.test(r));else if(H&&fe.test(r));else{if(!C[r]||z[r])continue;if(Z[r]);else if(pe.test(o.replace(he,"")));else if("src"!==r&&"xlink:href"!==r||0!==o.indexOf("data:")||!X[e.nodeName.toLowerCase()]){if(P&&!me.test(o.replace(he,"")));else if(o)continue}else;}try{e.setAttribute(n,o),c.removed.pop()}catch(e){}}de("afterSanitizeAttributes",e,null)}},ge=function e(t){var n=void 0,o=ae(t);for(de("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)de("uponSanitizeShadowNode",n,null),ce(n)||(n.content instanceof p&&e(n.content),ye(n));de("afterSanitizeShadowDOM",t,null)};c.sanitize=function(e,t){var n=void 0,o=void 0,i=void 0,a=void 0,l=void 0;if(e||(e=""),"string"!=typeof e&&!se(e)){if("function"!=typeof e.toString)throw new TypeError("toString is not a function");e=e.toString()}if(!c.isSupported){if("object"===r(window.toStaticHTML)||"function"==typeof window.toStaticHTML){if("string"==typeof e)return window.toStaticHTML(e);if(se(e))return window.toStaticHTML(e.outerHTML)}return e}if(ne(t),c.removed=[],e instanceof h)n=ie(""),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName?n=o:n.appendChild(o);else{if(!V&&!q&&e.indexOf("<")===-1)return e;if(n=ie(e),!n)return V?null:""}U&&oe(n.firstChild);for(var s=ae(n);i=s.nextNode();)3===i.nodeType&&i===a||ce(i)||(i.content instanceof p&&ge(i.content),ye(i),a=i);if(V){if(Y)for(l=_.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return K&&(l=E.call(x,l,!0)),l}return q?n.outerHTML:n.innerHTML},c.addHook=function(e,t){"function"==typeof t&&(D[e]=D[e]||[],D[e].push(t))},c.removeHook=function(e){D[e]&&D[e].pop()},c.removeHooks=function(e){D[e]&&(D[e]=[])},c.removeAllHooks=function(){D={}},t.default=c}])}); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.DOMPurify=t():e.DOMPurify=t()}(this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var o={};return t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.html=["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","coords","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","span","srclang","start","src","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"],t.svg=["accent-height","accumulate","additivive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","clip","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","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","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mode","min","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","surfacescale","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","u1","u2","unicode","values","viewbox","visibility","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","y","y1","y2","z","zoomandpan"],t.mathMl=["accent","accentunder","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","display","displaystyle","fence","frame","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"],t.xml=["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]},function(e,t,o){"use strict";function n(){var e="object"===("undefined"==typeof self?"undefined":r(self))&&self.self===self&&self||"object"===("undefined"==typeof e?"undefined":r(e))&&e.global===e&&e||this||{};return e.window=e.window||{},e}Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.html=["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","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","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"],t.svg=["svg","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","switch","symbol","text","textpath","title","tref","tspan","view","vkern"],t.svgFilters=["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence"],t.mathMl=["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmuliscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mpspace","msqrt","mystyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"],t.text=["#text"]},function(e,t,o){"use strict";function n(e,t){for(var o=t.length;o--;)"string"==typeof t[o]&&(t[o]=t[o].toLowerCase()),e[t[o]]=!0;return e}function r(e){var t={},o=void 0;for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.addToSet=n,t.clone=r},function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}function i(e){function t(){return Boolean(Q&&"undefined"!=typeof Q.createHTMLDocument&&9!==I.documentMode)}if(m.isSupported=t(),m.removed=[],!e||!e.document||9!==e.document.nodeType)return m.isSupported=!1,i;if(I=e.document,W=e.DocumentFragment,G=e.HTMLTemplateElement,q=e.Node,U=e.NodeFilter,V=e.Text,Y=e.Comment,K=e.DOMParser,$=e.NamedNodeMap||e.MozNamedAttrMap,J=I,"function"==typeof G){var o=I.createElement("template");o.content&&o.content.ownerDocument&&(I=o.content.ownerDocument)}return Q=I.implementation,X=I.createNodeIterator,Z=I.getElementsByTagName,ee=I.createDocumentFragment,te=J.importNode,v={},m.isSupported=t(),y=null,h=(0,p.addToSet)({},[c.html,c.svg,c.svgFilters,c.mathMl,c.text]),g=null,b=(0,p.addToSet)({},[f.html,f.svg,f.mathMl,f.xml]),T=null,S=null,x=!0,A=!0,w=!1,O=!1,_=!1,k=/\{\{[\s\S]*|[\s\S]*\}\}/gm,M=/<%[\s\S]*|[\s\S]*%>/gm,E=!1,D=!1,N=!1,L=!1,C=!1,R=!0,F=!0,z=(0,p.addToSet)({},["audio","head","math","script","style","svg","video"]),j=(0,p.addToSet)({},["audio","video","img","source","image"]),H=(0,p.addToSet)({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),P=null,B=I.createElement("form"),m}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=o(1),d=r(l),s=o(2),c=n(s),u=o(0),f=n(u),p=o(3),m=i;m.version="0.8.5";var v=void 0,y=void 0,h=void 0,g=void 0,b=void 0,T=void 0,S=void 0,x=void 0,A=void 0,w=void 0,O=void 0,_=void 0,k=void 0,M=void 0,E=void 0,D=void 0,N=void 0,L=void 0,C=void 0,R=void 0,F=void 0,z=void 0,j=void 0,H=void 0,P=void 0,B=void 0,I=void 0,W=void 0,G=void 0,q=void 0,U=void 0,V=void 0,Y=void 0,K=void 0,$=void 0,J=void 0,Q=void 0,X=void 0,Z=void 0,ee=void 0,te=void 0,oe=function(e){"object"!==("undefined"==typeof e?"undefined":a(e))&&(e={}),y="ALLOWED_TAGS"in e?(0,p.addToSet)({},e.ALLOWED_TAGS):h,g="ALLOWED_ATTR"in e?(0,p.addToSet)({},e.ALLOWED_ATTR):b,T="FORBID_TAGS"in e?(0,p.addToSet)({},e.FORBID_TAGS):{},S="FORBID_ATTR"in e?(0,p.addToSet)({},e.FORBID_ATTR):{},x=e.ALLOW_ARIA_ATTR!==!1,A=e.ALLOW_DATA_ATTR!==!1,w=e.ALLOW_UNKNOWN_PROTOCOLS||!1,O=e.SAFE_FOR_JQUERY||!1,_=e.SAFE_FOR_TEMPLATES||!1,E=e.WHOLE_DOCUMENT||!1,N=e.RETURN_DOM||!1,L=e.RETURN_DOM_FRAGMENT||!1,C=e.RETURN_DOM_IMPORT||!1,D=e.FORCE_BODY||!1,R=e.SANITIZE_DOM!==!1,F=e.KEEP_CONTENT!==!1,_&&(A=!1),L&&(N=!0),e.ADD_TAGS&&(y===h&&(y=(0,p.clone)(y)),(0,p.addToSet)(y,e.ADD_TAGS)),e.ADD_ATTR&&(g===b&&(g=(0,p.clone)(g)),(0,p.addToSet)(g,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&(0,p.addToSet)(H,e.ADD_URI_SAFE_ATTR),F&&(y["#text"]=!0),Object&&"freeze"in Object&&Object.freeze(e),P=e},ne=function(e){m.removed.push({element:e});try{e.parentNode.removeChild(e)}catch(t){e.outerHTML=""}},re=function(e,t){m.removed.push({attribute:t.getAttributeNode(e),from:t}),t.removeAttribute(e)},ie=function(e){var t=void 0,o=void 0;D&&(e=""+e);try{t=(new K).parseFromString(e,"text/html")}catch(e){}return t&&t.documentElement||(t=Q.createHTMLDocument(""),o=t.body,o.parentNode.removeChild(o.parentNode.firstElementChild),o.outerHTML=e),"function"==typeof t.getElementsByTagName?t.getElementsByTagName(E?"html":"body")[0]:Z.call(t,E?"html":"body")[0]},ae=function(e){return X.call(e.ownerDocument||e,e,U.SHOW_ELEMENT|U.SHOW_COMMENT|U.SHOW_TEXT,function(){return U.FILTER_ACCEPT},!1)},le=function(e){return!(e instanceof V||e instanceof Y)&&!("string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof $&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute)},de=function(e){return"object"===("undefined"==typeof q?"undefined":a(q))?e instanceof q:e&&"object"===("undefined"==typeof e?"undefined":a(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},se=function(e,t,o){v[e]&&v[e].forEach(function(e){e.call(m,t,o,P)})},ce=function(e){var t=void 0;if(se("beforeSanitizeElements",e,null),le(e))return ne(e),!0;var o=e.nodeName.toLowerCase();if(se("uponSanitizeElement",e,{tagName:o,allowedTags:y}),!y[o]||T[o]){if(F&&!z[o]&&"function"==typeof e.insertAdjacentHTML)try{e.insertAdjacentHTML("AfterEnd",e.innerHTML)}catch(e){}return ne(e),!0}return!O||e.firstElementChild||e.content&&e.content.firstElementChild||!/l&&e.setAttribute("id",i.value)):("id"===o&&e.setAttribute(o,""),re(o,e)),d.keepAttr&&(!R||"id"!==r&&"name"!==r||!(n in window||n in I||n in B))){if(_&&(n=n.replace(k," "),n=n.replace(M," ")),A&&ue.test(r));else if(x&&fe.test(r));else{if(!g[r]||S[r])continue;if(H[r]);else if(pe.test(n.replace(ve,"")));else if("src"!==r&&"xlink:href"!==r||0!==n.indexOf("data:")||!j[e.nodeName.toLowerCase()]){if(w&&!me.test(n.replace(ve,"")));else if(n)continue}else;}try{e.setAttribute(o,n),m.removed.pop()}catch(e){}}se("afterSanitizeAttributes",e,null)}},he=function e(t){var o=void 0,n=ae(t);for(se("beforeSanitizeShadowDOM",t,null);o=n.nextNode();)se("uponSanitizeShadowNode",o,null),ce(o)||(o.content instanceof W&&e(o.content),ye(o));se("afterSanitizeShadowDOM",t,null)};m.sanitize=function(e,t){var o=void 0,n=void 0,r=void 0,i=void 0,l=void 0;if(e||(e=""),"string"!=typeof e&&!de(e)){if("function"!=typeof e.toString)throw new TypeError("toString is not a function");e=e.toString()}if(!m.isSupported){if("object"===a(window.toStaticHTML)||"function"==typeof window.toStaticHTML){if("string"==typeof e)return window.toStaticHTML(e);if(de(e))return window.toStaticHTML(e.outerHTML)}return e}if(oe(t),m.removed=[],e instanceof q)o=ie(""),n=o.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName?o=n:o.appendChild(n);else{if(!N&&!E&&e.indexOf("<")===-1)return e;if(o=ie(e),!o)return N?null:""}D&&ne(o.firstChild);for(var d=ae(o);r=d.nextNode();)3===r.nodeType&&r===i||ce(r)||(r.content instanceof W&&he(r.content),ye(r),i=r);if(N){if(L)for(l=ee.call(o.ownerDocument);o.firstChild;)l.appendChild(o.firstChild);else l=o;return C&&(l=te.call(J,l,!0)),l}return E?o.outerHTML:o.innerHTML},m.addHook=function(e,t){"function"==typeof t&&(v[e]=v[e]||[],v[e].push(t))},m.removeHook=function(e){v[e]&&v[e].pop()},m.removeHooks=function(e){v[e]&&(v[e]=[])},m.removeAllHooks=function(){v={}},e.exports=i((0,d.default)())}])}); \ No newline at end of file