{"version":3,"file":"arcgis-html-sanitizer.min.js","sources":["../../node_modules/lodash.isplainobject/index.js","../../node_modules/cssfilter/lib/default.js","../../node_modules/cssfilter/lib/util.js","../../node_modules/cssfilter/lib/parser.js","../../node_modules/cssfilter/lib/css.js","../../node_modules/cssfilter/lib/index.js","../../node_modules/xss/lib/util.js","../../node_modules/xss/lib/default.js","../../node_modules/xss/lib/parser.js","../../node_modules/xss/lib/xss.js","../../node_modules/xss/lib/index.js","../../src/index.ts"],"sourcesContent":["/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) ||\n objectToString.call(value) != objectTag || isHostObject(value)) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return (typeof Ctor == 'function' &&\n Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);\n}\n\nmodule.exports = isPlainObject;\n","/**\n * cssfilter\n *\n * @author 老雷\n */\n\nfunction getDefaultWhiteList () {\n // 白名单值说明:\n // true: 允许该属性\n // Function: function (val) { } 返回true表示允许该属性,其他值均表示不允许\n // RegExp: regexp.test(val) 返回true表示允许该属性,其他值均表示不允许\n // 除上面列出的值外均表示不允许\n var whiteList = {};\n\n whiteList['align-content'] = false; // default: auto\n whiteList['align-items'] = false; // default: auto\n whiteList['align-self'] = false; // default: auto\n whiteList['alignment-adjust'] = false; // default: auto\n whiteList['alignment-baseline'] = false; // default: baseline\n whiteList['all'] = false; // default: depending on individual properties\n whiteList['anchor-point'] = false; // default: none\n whiteList['animation'] = false; // default: depending on individual properties\n whiteList['animation-delay'] = false; // default: 0\n whiteList['animation-direction'] = false; // default: normal\n whiteList['animation-duration'] = false; // default: 0\n whiteList['animation-fill-mode'] = false; // default: none\n whiteList['animation-iteration-count'] = false; // default: 1\n whiteList['animation-name'] = false; // default: none\n whiteList['animation-play-state'] = false; // default: running\n whiteList['animation-timing-function'] = false; // default: ease\n whiteList['azimuth'] = false; // default: center\n whiteList['backface-visibility'] = false; // default: visible\n whiteList['background'] = true; // default: depending on individual properties\n whiteList['background-attachment'] = true; // default: scroll\n whiteList['background-clip'] = true; // default: border-box\n whiteList['background-color'] = true; // default: transparent\n whiteList['background-image'] = true; // default: none\n whiteList['background-origin'] = true; // default: padding-box\n whiteList['background-position'] = true; // default: 0% 0%\n whiteList['background-repeat'] = true; // default: repeat\n whiteList['background-size'] = true; // default: auto\n whiteList['baseline-shift'] = false; // default: baseline\n whiteList['binding'] = false; // default: none\n whiteList['bleed'] = false; // default: 6pt\n whiteList['bookmark-label'] = false; // default: content()\n whiteList['bookmark-level'] = false; // default: none\n whiteList['bookmark-state'] = false; // default: open\n whiteList['border'] = true; // default: depending on individual properties\n whiteList['border-bottom'] = true; // default: depending on individual properties\n whiteList['border-bottom-color'] = true; // default: current color\n whiteList['border-bottom-left-radius'] = true; // default: 0\n whiteList['border-bottom-right-radius'] = true; // default: 0\n whiteList['border-bottom-style'] = true; // default: none\n whiteList['border-bottom-width'] = true; // default: medium\n whiteList['border-collapse'] = true; // default: separate\n whiteList['border-color'] = true; // default: depending on individual properties\n whiteList['border-image'] = true; // default: none\n whiteList['border-image-outset'] = true; // default: 0\n whiteList['border-image-repeat'] = true; // default: stretch\n whiteList['border-image-slice'] = true; // default: 100%\n whiteList['border-image-source'] = true; // default: none\n whiteList['border-image-width'] = true; // default: 1\n whiteList['border-left'] = true; // default: depending on individual properties\n whiteList['border-left-color'] = true; // default: current color\n whiteList['border-left-style'] = true; // default: none\n whiteList['border-left-width'] = true; // default: medium\n whiteList['border-radius'] = true; // default: 0\n whiteList['border-right'] = true; // default: depending on individual properties\n whiteList['border-right-color'] = true; // default: current color\n whiteList['border-right-style'] = true; // default: none\n whiteList['border-right-width'] = true; // default: medium\n whiteList['border-spacing'] = true; // default: 0\n whiteList['border-style'] = true; // default: depending on individual properties\n whiteList['border-top'] = true; // default: depending on individual properties\n whiteList['border-top-color'] = true; // default: current color\n whiteList['border-top-left-radius'] = true; // default: 0\n whiteList['border-top-right-radius'] = true; // default: 0\n whiteList['border-top-style'] = true; // default: none\n whiteList['border-top-width'] = true; // default: medium\n whiteList['border-width'] = true; // default: depending on individual properties\n whiteList['bottom'] = false; // default: auto\n whiteList['box-decoration-break'] = true; // default: slice\n whiteList['box-shadow'] = true; // default: none\n whiteList['box-sizing'] = true; // default: content-box\n whiteList['box-snap'] = true; // default: none\n whiteList['box-suppress'] = true; // default: show\n whiteList['break-after'] = true; // default: auto\n whiteList['break-before'] = true; // default: auto\n whiteList['break-inside'] = true; // default: auto\n whiteList['caption-side'] = false; // default: top\n whiteList['chains'] = false; // default: none\n whiteList['clear'] = true; // default: none\n whiteList['clip'] = false; // default: auto\n whiteList['clip-path'] = false; // default: none\n whiteList['clip-rule'] = false; // default: nonzero\n whiteList['color'] = true; // default: implementation dependent\n whiteList['color-interpolation-filters'] = true; // default: auto\n whiteList['column-count'] = false; // default: auto\n whiteList['column-fill'] = false; // default: balance\n whiteList['column-gap'] = false; // default: normal\n whiteList['column-rule'] = false; // default: depending on individual properties\n whiteList['column-rule-color'] = false; // default: current color\n whiteList['column-rule-style'] = false; // default: medium\n whiteList['column-rule-width'] = false; // default: medium\n whiteList['column-span'] = false; // default: none\n whiteList['column-width'] = false; // default: auto\n whiteList['columns'] = false; // default: depending on individual properties\n whiteList['contain'] = false; // default: none\n whiteList['content'] = false; // default: normal\n whiteList['counter-increment'] = false; // default: none\n whiteList['counter-reset'] = false; // default: none\n whiteList['counter-set'] = false; // default: none\n whiteList['crop'] = false; // default: auto\n whiteList['cue'] = false; // default: depending on individual properties\n whiteList['cue-after'] = false; // default: none\n whiteList['cue-before'] = false; // default: none\n whiteList['cursor'] = false; // default: auto\n whiteList['direction'] = false; // default: ltr\n whiteList['display'] = true; // default: depending on individual properties\n whiteList['display-inside'] = true; // default: auto\n whiteList['display-list'] = true; // default: none\n whiteList['display-outside'] = true; // default: inline-level\n whiteList['dominant-baseline'] = false; // default: auto\n whiteList['elevation'] = false; // default: level\n whiteList['empty-cells'] = false; // default: show\n whiteList['filter'] = false; // default: none\n whiteList['flex'] = false; // default: depending on individual properties\n whiteList['flex-basis'] = false; // default: auto\n whiteList['flex-direction'] = false; // default: row\n whiteList['flex-flow'] = false; // default: depending on individual properties\n whiteList['flex-grow'] = false; // default: 0\n whiteList['flex-shrink'] = false; // default: 1\n whiteList['flex-wrap'] = false; // default: nowrap\n whiteList['float'] = false; // default: none\n whiteList['float-offset'] = false; // default: 0 0\n whiteList['flood-color'] = false; // default: black\n whiteList['flood-opacity'] = false; // default: 1\n whiteList['flow-from'] = false; // default: none\n whiteList['flow-into'] = false; // default: none\n whiteList['font'] = true; // default: depending on individual properties\n whiteList['font-family'] = true; // default: implementation dependent\n whiteList['font-feature-settings'] = true; // default: normal\n whiteList['font-kerning'] = true; // default: auto\n whiteList['font-language-override'] = true; // default: normal\n whiteList['font-size'] = true; // default: medium\n whiteList['font-size-adjust'] = true; // default: none\n whiteList['font-stretch'] = true; // default: normal\n whiteList['font-style'] = true; // default: normal\n whiteList['font-synthesis'] = true; // default: weight style\n whiteList['font-variant'] = true; // default: normal\n whiteList['font-variant-alternates'] = true; // default: normal\n whiteList['font-variant-caps'] = true; // default: normal\n whiteList['font-variant-east-asian'] = true; // default: normal\n whiteList['font-variant-ligatures'] = true; // default: normal\n whiteList['font-variant-numeric'] = true; // default: normal\n whiteList['font-variant-position'] = true; // default: normal\n whiteList['font-weight'] = true; // default: normal\n whiteList['grid'] = false; // default: depending on individual properties\n whiteList['grid-area'] = false; // default: depending on individual properties\n whiteList['grid-auto-columns'] = false; // default: auto\n whiteList['grid-auto-flow'] = false; // default: none\n whiteList['grid-auto-rows'] = false; // default: auto\n whiteList['grid-column'] = false; // default: depending on individual properties\n whiteList['grid-column-end'] = false; // default: auto\n whiteList['grid-column-start'] = false; // default: auto\n whiteList['grid-row'] = false; // default: depending on individual properties\n whiteList['grid-row-end'] = false; // default: auto\n whiteList['grid-row-start'] = false; // default: auto\n whiteList['grid-template'] = false; // default: depending on individual properties\n whiteList['grid-template-areas'] = false; // default: none\n whiteList['grid-template-columns'] = false; // default: none\n whiteList['grid-template-rows'] = false; // default: none\n whiteList['hanging-punctuation'] = false; // default: none\n whiteList['height'] = true; // default: auto\n whiteList['hyphens'] = false; // default: manual\n whiteList['icon'] = false; // default: auto\n whiteList['image-orientation'] = false; // default: auto\n whiteList['image-resolution'] = false; // default: normal\n whiteList['ime-mode'] = false; // default: auto\n whiteList['initial-letters'] = false; // default: normal\n whiteList['inline-box-align'] = false; // default: last\n whiteList['justify-content'] = false; // default: auto\n whiteList['justify-items'] = false; // default: auto\n whiteList['justify-self'] = false; // default: auto\n whiteList['left'] = false; // default: auto\n whiteList['letter-spacing'] = true; // default: normal\n whiteList['lighting-color'] = true; // default: white\n whiteList['line-box-contain'] = false; // default: block inline replaced\n whiteList['line-break'] = false; // default: auto\n whiteList['line-grid'] = false; // default: match-parent\n whiteList['line-height'] = false; // default: normal\n whiteList['line-snap'] = false; // default: none\n whiteList['line-stacking'] = false; // default: depending on individual properties\n whiteList['line-stacking-ruby'] = false; // default: exclude-ruby\n whiteList['line-stacking-shift'] = false; // default: consider-shifts\n whiteList['line-stacking-strategy'] = false; // default: inline-line-height\n whiteList['list-style'] = true; // default: depending on individual properties\n whiteList['list-style-image'] = true; // default: none\n whiteList['list-style-position'] = true; // default: outside\n whiteList['list-style-type'] = true; // default: disc\n whiteList['margin'] = true; // default: depending on individual properties\n whiteList['margin-bottom'] = true; // default: 0\n whiteList['margin-left'] = true; // default: 0\n whiteList['margin-right'] = true; // default: 0\n whiteList['margin-top'] = true; // default: 0\n whiteList['marker-offset'] = false; // default: auto\n whiteList['marker-side'] = false; // default: list-item\n whiteList['marks'] = false; // default: none\n whiteList['mask'] = false; // default: border-box\n whiteList['mask-box'] = false; // default: see individual properties\n whiteList['mask-box-outset'] = false; // default: 0\n whiteList['mask-box-repeat'] = false; // default: stretch\n whiteList['mask-box-slice'] = false; // default: 0 fill\n whiteList['mask-box-source'] = false; // default: none\n whiteList['mask-box-width'] = false; // default: auto\n whiteList['mask-clip'] = false; // default: border-box\n whiteList['mask-image'] = false; // default: none\n whiteList['mask-origin'] = false; // default: border-box\n whiteList['mask-position'] = false; // default: center\n whiteList['mask-repeat'] = false; // default: no-repeat\n whiteList['mask-size'] = false; // default: border-box\n whiteList['mask-source-type'] = false; // default: auto\n whiteList['mask-type'] = false; // default: luminance\n whiteList['max-height'] = true; // default: none\n whiteList['max-lines'] = false; // default: none\n whiteList['max-width'] = true; // default: none\n whiteList['min-height'] = true; // default: 0\n whiteList['min-width'] = true; // default: 0\n whiteList['move-to'] = false; // default: normal\n whiteList['nav-down'] = false; // default: auto\n whiteList['nav-index'] = false; // default: auto\n whiteList['nav-left'] = false; // default: auto\n whiteList['nav-right'] = false; // default: auto\n whiteList['nav-up'] = false; // default: auto\n whiteList['object-fit'] = false; // default: fill\n whiteList['object-position'] = false; // default: 50% 50%\n whiteList['opacity'] = false; // default: 1\n whiteList['order'] = false; // default: 0\n whiteList['orphans'] = false; // default: 2\n whiteList['outline'] = false; // default: depending on individual properties\n whiteList['outline-color'] = false; // default: invert\n whiteList['outline-offset'] = false; // default: 0\n whiteList['outline-style'] = false; // default: none\n whiteList['outline-width'] = false; // default: medium\n whiteList['overflow'] = false; // default: depending on individual properties\n whiteList['overflow-wrap'] = false; // default: normal\n whiteList['overflow-x'] = false; // default: visible\n whiteList['overflow-y'] = false; // default: visible\n whiteList['padding'] = true; // default: depending on individual properties\n whiteList['padding-bottom'] = true; // default: 0\n whiteList['padding-left'] = true; // default: 0\n whiteList['padding-right'] = true; // default: 0\n whiteList['padding-top'] = true; // default: 0\n whiteList['page'] = false; // default: auto\n whiteList['page-break-after'] = false; // default: auto\n whiteList['page-break-before'] = false; // default: auto\n whiteList['page-break-inside'] = false; // default: auto\n whiteList['page-policy'] = false; // default: start\n whiteList['pause'] = false; // default: implementation dependent\n whiteList['pause-after'] = false; // default: implementation dependent\n whiteList['pause-before'] = false; // default: implementation dependent\n whiteList['perspective'] = false; // default: none\n whiteList['perspective-origin'] = false; // default: 50% 50%\n whiteList['pitch'] = false; // default: medium\n whiteList['pitch-range'] = false; // default: 50\n whiteList['play-during'] = false; // default: auto\n whiteList['position'] = false; // default: static\n whiteList['presentation-level'] = false; // default: 0\n whiteList['quotes'] = false; // default: text\n whiteList['region-fragment'] = false; // default: auto\n whiteList['resize'] = false; // default: none\n whiteList['rest'] = false; // default: depending on individual properties\n whiteList['rest-after'] = false; // default: none\n whiteList['rest-before'] = false; // default: none\n whiteList['richness'] = false; // default: 50\n whiteList['right'] = false; // default: auto\n whiteList['rotation'] = false; // default: 0\n whiteList['rotation-point'] = false; // default: 50% 50%\n whiteList['ruby-align'] = false; // default: auto\n whiteList['ruby-merge'] = false; // default: separate\n whiteList['ruby-position'] = false; // default: before\n whiteList['shape-image-threshold'] = false; // default: 0.0\n whiteList['shape-outside'] = false; // default: none\n whiteList['shape-margin'] = false; // default: 0\n whiteList['size'] = false; // default: auto\n whiteList['speak'] = false; // default: auto\n whiteList['speak-as'] = false; // default: normal\n whiteList['speak-header'] = false; // default: once\n whiteList['speak-numeral'] = false; // default: continuous\n whiteList['speak-punctuation'] = false; // default: none\n whiteList['speech-rate'] = false; // default: medium\n whiteList['stress'] = false; // default: 50\n whiteList['string-set'] = false; // default: none\n whiteList['tab-size'] = false; // default: 8\n whiteList['table-layout'] = false; // default: auto\n whiteList['text-align'] = true; // default: start\n whiteList['text-align-last'] = true; // default: auto\n whiteList['text-combine-upright'] = true; // default: none\n whiteList['text-decoration'] = true; // default: none\n whiteList['text-decoration-color'] = true; // default: currentColor\n whiteList['text-decoration-line'] = true; // default: none\n whiteList['text-decoration-skip'] = true; // default: objects\n whiteList['text-decoration-style'] = true; // default: solid\n whiteList['text-emphasis'] = true; // default: depending on individual properties\n whiteList['text-emphasis-color'] = true; // default: currentColor\n whiteList['text-emphasis-position'] = true; // default: over right\n whiteList['text-emphasis-style'] = true; // default: none\n whiteList['text-height'] = true; // default: auto\n whiteList['text-indent'] = true; // default: 0\n whiteList['text-justify'] = true; // default: auto\n whiteList['text-orientation'] = true; // default: mixed\n whiteList['text-overflow'] = true; // default: clip\n whiteList['text-shadow'] = true; // default: none\n whiteList['text-space-collapse'] = true; // default: collapse\n whiteList['text-transform'] = true; // default: none\n whiteList['text-underline-position'] = true; // default: auto\n whiteList['text-wrap'] = true; // default: normal\n whiteList['top'] = false; // default: auto\n whiteList['transform'] = false; // default: none\n whiteList['transform-origin'] = false; // default: 50% 50% 0\n whiteList['transform-style'] = false; // default: flat\n whiteList['transition'] = false; // default: depending on individual properties\n whiteList['transition-delay'] = false; // default: 0s\n whiteList['transition-duration'] = false; // default: 0s\n whiteList['transition-property'] = false; // default: all\n whiteList['transition-timing-function'] = false; // default: ease\n whiteList['unicode-bidi'] = false; // default: normal\n whiteList['vertical-align'] = false; // default: baseline\n whiteList['visibility'] = false; // default: visible\n whiteList['voice-balance'] = false; // default: center\n whiteList['voice-duration'] = false; // default: auto\n whiteList['voice-family'] = false; // default: implementation dependent\n whiteList['voice-pitch'] = false; // default: medium\n whiteList['voice-range'] = false; // default: medium\n whiteList['voice-rate'] = false; // default: normal\n whiteList['voice-stress'] = false; // default: normal\n whiteList['voice-volume'] = false; // default: medium\n whiteList['volume'] = false; // default: medium\n whiteList['white-space'] = false; // default: normal\n whiteList['widows'] = false; // default: 2\n whiteList['width'] = true; // default: auto\n whiteList['will-change'] = false; // default: auto\n whiteList['word-break'] = true; // default: normal\n whiteList['word-spacing'] = true; // default: normal\n whiteList['word-wrap'] = true; // default: normal\n whiteList['wrap-flow'] = false; // default: auto\n whiteList['wrap-through'] = false; // default: wrap\n whiteList['writing-mode'] = false; // default: horizontal-tb\n whiteList['z-index'] = false; // default: auto\n\n return whiteList;\n}\n\n\n/**\n * 匹配到白名单上的一个属性时\n *\n * @param {String} name\n * @param {String} value\n * @param {Object} options\n * @return {String}\n */\nfunction onAttr (name, value, options) {\n // do nothing\n}\n\n/**\n * 匹配到不在白名单上的一个属性时\n *\n * @param {String} name\n * @param {String} value\n * @param {Object} options\n * @return {String}\n */\nfunction onIgnoreAttr (name, value, options) {\n // do nothing\n}\n\nvar REGEXP_URL_JAVASCRIPT = /javascript\\s*\\:/img;\n\n/**\n * 过滤属性值\n *\n * @param {String} name\n * @param {String} value\n * @return {String}\n */\nfunction safeAttrValue(name, value) {\n if (REGEXP_URL_JAVASCRIPT.test(value)) return '';\n return value;\n}\n\n\nexports.whiteList = getDefaultWhiteList();\nexports.getDefaultWhiteList = getDefaultWhiteList;\nexports.onAttr = onAttr;\nexports.onIgnoreAttr = onIgnoreAttr;\nexports.safeAttrValue = safeAttrValue;\n","module.exports = {\n indexOf: function (arr, item) {\n var i, j;\n if (Array.prototype.indexOf) {\n return arr.indexOf(item);\n }\n for (i = 0, j = arr.length; i < j; i++) {\n if (arr[i] === item) {\n return i;\n }\n }\n return -1;\n },\n forEach: function (arr, fn, scope) {\n var i, j;\n if (Array.prototype.forEach) {\n return arr.forEach(fn, scope);\n }\n for (i = 0, j = arr.length; i < j; i++) {\n fn.call(scope, arr[i], i, arr);\n }\n },\n trim: function (str) {\n if (String.prototype.trim) {\n return str.trim();\n }\n return str.replace(/(^\\s*)|(\\s*$)/g, '');\n },\n trimRight: function (str) {\n if (String.prototype.trimRight) {\n return str.trimRight();\n }\n return str.replace(/(\\s*$)/g, '');\n }\n};\n","/**\n * cssfilter\n *\n * @author 老雷\n */\n\nvar _ = require('./util');\n\n\n/**\n * 解析style\n *\n * @param {String} css\n * @param {Function} onAttr 处理属性的函数\n * 参数格式: function (sourcePosition, position, name, value, source)\n * @return {String}\n */\nfunction parseStyle (css, onAttr) {\n css = _.trimRight(css);\n if (css[css.length - 1] !== ';') css += ';';\n var cssLength = css.length;\n var isParenthesisOpen = false;\n var lastPos = 0;\n var i = 0;\n var retCSS = '';\n\n function addNewAttr () {\n // 如果没有正常的闭合圆括号,则直接忽略当前属性\n if (!isParenthesisOpen) {\n var source = _.trim(css.slice(lastPos, i));\n var j = source.indexOf(':');\n if (j !== -1) {\n var name = _.trim(source.slice(0, j));\n var value = _.trim(source.slice(j + 1));\n // 必须有属性名称\n if (name) {\n var ret = onAttr(lastPos, retCSS.length, name, value, source);\n if (ret) retCSS += ret + '; ';\n }\n }\n }\n lastPos = i + 1;\n }\n\n for (; i < cssLength; i++) {\n var c = css[i];\n if (c === '/' && css[i + 1] === '*') {\n // 备注开始\n var j = css.indexOf('*/', i + 2);\n // 如果没有正常的备注结束,则后面的部分全部跳过\n if (j === -1) break;\n // 直接将当前位置调到备注结尾,并且初始化状态\n i = j + 1;\n lastPos = i + 1;\n isParenthesisOpen = false;\n } else if (c === '(') {\n isParenthesisOpen = true;\n } else if (c === ')') {\n isParenthesisOpen = false;\n } else if (c === ';') {\n if (isParenthesisOpen) {\n // 在圆括号里面,忽略\n } else {\n addNewAttr();\n }\n } else if (c === '\\n') {\n addNewAttr();\n }\n }\n\n return _.trim(retCSS);\n}\n\nmodule.exports = parseStyle;\n","/**\n * cssfilter\n *\n * @author 老雷\n */\n\nvar DEFAULT = require('./default');\nvar parseStyle = require('./parser');\nvar _ = require('./util');\n\n\n/**\n * 返回值是否为空\n *\n * @param {Object} obj\n * @return {Boolean}\n */\nfunction isNull (obj) {\n return (obj === undefined || obj === null);\n}\n\n/**\n * 浅拷贝对象\n *\n * @param {Object} obj\n * @return {Object}\n */\nfunction shallowCopyObject (obj) {\n var ret = {};\n for (var i in obj) {\n ret[i] = obj[i];\n }\n return ret;\n}\n\n/**\n * 创建CSS过滤器\n *\n * @param {Object} options\n * - {Object} whiteList\n * - {Function} onAttr\n * - {Function} onIgnoreAttr\n * - {Function} safeAttrValue\n */\nfunction FilterCSS (options) {\n options = shallowCopyObject(options || {});\n options.whiteList = options.whiteList || DEFAULT.whiteList;\n options.onAttr = options.onAttr || DEFAULT.onAttr;\n options.onIgnoreAttr = options.onIgnoreAttr || DEFAULT.onIgnoreAttr;\n options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;\n this.options = options;\n}\n\nFilterCSS.prototype.process = function (css) {\n // 兼容各种奇葩输入\n css = css || '';\n css = css.toString();\n if (!css) return '';\n\n var me = this;\n var options = me.options;\n var whiteList = options.whiteList;\n var onAttr = options.onAttr;\n var onIgnoreAttr = options.onIgnoreAttr;\n var safeAttrValue = options.safeAttrValue;\n\n var retCSS = parseStyle(css, function (sourcePosition, position, name, value, source) {\n\n var check = whiteList[name];\n var isWhite = false;\n if (check === true) isWhite = check;\n else if (typeof check === 'function') isWhite = check(value);\n else if (check instanceof RegExp) isWhite = check.test(value);\n if (isWhite !== true) isWhite = false;\n\n // 如果过滤后 value 为空则直接忽略\n value = safeAttrValue(name, value);\n if (!value) return;\n\n var opts = {\n position: position,\n sourcePosition: sourcePosition,\n source: source,\n isWhite: isWhite\n };\n\n if (isWhite) {\n\n var ret = onAttr(name, value, opts);\n if (isNull(ret)) {\n return name + ':' + value;\n } else {\n return ret;\n }\n\n } else {\n\n var ret = onIgnoreAttr(name, value, opts);\n if (!isNull(ret)) {\n return ret;\n }\n\n }\n });\n\n return retCSS;\n};\n\n\nmodule.exports = FilterCSS;\n","/**\n * cssfilter\n *\n * @author 老雷\n */\n\nvar DEFAULT = require('./default');\nvar FilterCSS = require('./css');\n\n\n/**\n * XSS过滤\n *\n * @param {String} css 要过滤的CSS代码\n * @param {Object} options 选项:whiteList, onAttr, onIgnoreAttr\n * @return {String}\n */\nfunction filterCSS (html, options) {\n var xss = new FilterCSS(options);\n return xss.process(html);\n}\n\n\n// 输出\nexports = module.exports = filterCSS;\nexports.FilterCSS = FilterCSS;\nfor (var i in DEFAULT) exports[i] = DEFAULT[i];\n\n// 在浏览器端使用\nif (typeof window !== 'undefined') {\n window.filterCSS = module.exports;\n}\n","module.exports = {\n indexOf: function(arr, item) {\n var i, j;\n if (Array.prototype.indexOf) {\n return arr.indexOf(item);\n }\n for (i = 0, j = arr.length; i < j; i++) {\n if (arr[i] === item) {\n return i;\n }\n }\n return -1;\n },\n forEach: function(arr, fn, scope) {\n var i, j;\n if (Array.prototype.forEach) {\n return arr.forEach(fn, scope);\n }\n for (i = 0, j = arr.length; i < j; i++) {\n fn.call(scope, arr[i], i, arr);\n }\n },\n trim: function(str) {\n if (String.prototype.trim) {\n return str.trim();\n }\n return str.replace(/(^\\s*)|(\\s*$)/g, \"\");\n },\n spaceIndex: function(str) {\n var reg = /\\s|\\n|\\t/;\n var match = reg.exec(str);\n return match ? match.index : -1;\n }\n};\n","/**\n * default settings\n *\n * @author Zongmin Lei\n */\n\nvar FilterCSS = require(\"cssfilter\").FilterCSS;\nvar getDefaultCSSWhiteList = require(\"cssfilter\").getDefaultWhiteList;\nvar _ = require(\"./util\");\n\nfunction getDefaultWhiteList() {\n return {\n a: [\"target\", \"href\", \"title\"],\n abbr: [\"title\"],\n address: [],\n area: [\"shape\", \"coords\", \"href\", \"alt\"],\n article: [],\n aside: [],\n audio: [\"autoplay\", \"controls\", \"loop\", \"preload\", \"src\"],\n b: [],\n bdi: [\"dir\"],\n bdo: [\"dir\"],\n big: [],\n blockquote: [\"cite\"],\n br: [],\n caption: [],\n center: [],\n cite: [],\n code: [],\n col: [\"align\", \"valign\", \"span\", \"width\"],\n colgroup: [\"align\", \"valign\", \"span\", \"width\"],\n dd: [],\n del: [\"datetime\"],\n details: [\"open\"],\n div: [],\n dl: [],\n dt: [],\n em: [],\n font: [\"color\", \"size\", \"face\"],\n footer: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n header: [],\n hr: [],\n i: [],\n img: [\"src\", \"alt\", \"title\", \"width\", \"height\"],\n ins: [\"datetime\"],\n li: [],\n mark: [],\n nav: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n section: [],\n small: [],\n span: [],\n sub: [],\n sup: [],\n strong: [],\n table: [\"width\", \"border\", \"align\", \"valign\"],\n tbody: [\"align\", \"valign\"],\n td: [\"width\", \"rowspan\", \"colspan\", \"align\", \"valign\"],\n tfoot: [\"align\", \"valign\"],\n th: [\"width\", \"rowspan\", \"colspan\", \"align\", \"valign\"],\n thead: [\"align\", \"valign\"],\n tr: [\"rowspan\", \"align\", \"valign\"],\n tt: [],\n u: [],\n ul: [],\n video: [\"autoplay\", \"controls\", \"loop\", \"preload\", \"src\", \"height\", \"width\"]\n };\n}\n\nvar defaultCSSFilter = new FilterCSS();\n\n/**\n * default onTag function\n *\n * @param {String} tag\n * @param {String} html\n * @param {Object} options\n * @return {String}\n */\nfunction onTag(tag, html, options) {\n // do nothing\n}\n\n/**\n * default onIgnoreTag function\n *\n * @param {String} tag\n * @param {String} html\n * @param {Object} options\n * @return {String}\n */\nfunction onIgnoreTag(tag, html, options) {\n // do nothing\n}\n\n/**\n * default onTagAttr function\n *\n * @param {String} tag\n * @param {String} name\n * @param {String} value\n * @return {String}\n */\nfunction onTagAttr(tag, name, value) {\n // do nothing\n}\n\n/**\n * default onIgnoreTagAttr function\n *\n * @param {String} tag\n * @param {String} name\n * @param {String} value\n * @return {String}\n */\nfunction onIgnoreTagAttr(tag, name, value) {\n // do nothing\n}\n\n/**\n * default escapeHtml function\n *\n * @param {String} html\n */\nfunction escapeHtml(html) {\n return html.replace(REGEXP_LT, \"<\").replace(REGEXP_GT, \">\");\n}\n\n/**\n * default safeAttrValue function\n *\n * @param {String} tag\n * @param {String} name\n * @param {String} value\n * @param {Object} cssFilter\n * @return {String}\n */\nfunction safeAttrValue(tag, name, value, cssFilter) {\n // unescape attribute value firstly\n value = friendlyAttrValue(value);\n\n if (name === \"href\" || name === \"src\") {\n // filter `href` and `src` attribute\n // only allow the value that starts with `http://` | `https://` | `mailto:` | `/` | `#`\n value = _.trim(value);\n if (value === \"#\") return \"#\";\n if (\n !(\n value.substr(0, 7) === \"http://\" ||\n value.substr(0, 8) === \"https://\" ||\n value.substr(0, 7) === \"mailto:\" ||\n value.substr(0, 4) === \"tel:\" ||\n value.substr(0, 11) === \"data:image/\" ||\n value.substr(0, 6) === \"ftp://\" ||\n value.substr(0, 2) === \"./\" ||\n value.substr(0, 3) === \"../\" ||\n value[0] === \"#\" ||\n value[0] === \"/\"\n )\n ) {\n return \"\";\n }\n } else if (name === \"background\") {\n // filter `background` attribute (maybe no use)\n // `javascript:`\n REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;\n if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {\n return \"\";\n }\n } else if (name === \"style\") {\n // `expression()`\n REGEXP_DEFAULT_ON_TAG_ATTR_7.lastIndex = 0;\n if (REGEXP_DEFAULT_ON_TAG_ATTR_7.test(value)) {\n return \"\";\n }\n // `url()`\n REGEXP_DEFAULT_ON_TAG_ATTR_8.lastIndex = 0;\n if (REGEXP_DEFAULT_ON_TAG_ATTR_8.test(value)) {\n REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;\n if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {\n return \"\";\n }\n }\n if (cssFilter !== false) {\n cssFilter = cssFilter || defaultCSSFilter;\n value = cssFilter.process(value);\n }\n }\n\n // escape `<>\"` before returns\n value = escapeAttrValue(value);\n return value;\n}\n\n// RegExp list\nvar REGEXP_LT = //g;\nvar REGEXP_QUOTE = /\"/g;\nvar REGEXP_QUOTE_2 = /"/g;\nvar REGEXP_ATTR_VALUE_1 = /([a-zA-Z0-9]*);?/gim;\nvar REGEXP_ATTR_VALUE_COLON = /:?/gim;\nvar REGEXP_ATTR_VALUE_NEWLINE = /&newline;?/gim;\nvar REGEXP_DEFAULT_ON_TAG_ATTR_3 = /\\/\\*|\\*\\//gm;\nvar REGEXP_DEFAULT_ON_TAG_ATTR_4 = /((j\\s*a\\s*v\\s*a|v\\s*b|l\\s*i\\s*v\\s*e)\\s*s\\s*c\\s*r\\s*i\\s*p\\s*t\\s*|m\\s*o\\s*c\\s*h\\s*a)\\:/gi;\nvar REGEXP_DEFAULT_ON_TAG_ATTR_5 = /^[\\s\"'`]*(d\\s*a\\s*t\\s*a\\s*)\\:/gi;\nvar REGEXP_DEFAULT_ON_TAG_ATTR_6 = /^[\\s\"'`]*(d\\s*a\\s*t\\s*a\\s*)\\:\\s*image\\//gi;\nvar REGEXP_DEFAULT_ON_TAG_ATTR_7 = /e\\s*x\\s*p\\s*r\\s*e\\s*s\\s*s\\s*i\\s*o\\s*n\\s*\\(.*/gi;\nvar REGEXP_DEFAULT_ON_TAG_ATTR_8 = /u\\s*r\\s*l\\s*\\(.*/gi;\n\n/**\n * escape doube quote\n *\n * @param {String} str\n * @return {String} str\n */\nfunction escapeQuote(str) {\n return str.replace(REGEXP_QUOTE, \""\");\n}\n\n/**\n * unescape double quote\n *\n * @param {String} str\n * @return {String} str\n */\nfunction unescapeQuote(str) {\n return str.replace(REGEXP_QUOTE_2, '\"');\n}\n\n/**\n * escape html entities\n *\n * @param {String} str\n * @return {String}\n */\nfunction escapeHtmlEntities(str) {\n return str.replace(REGEXP_ATTR_VALUE_1, function replaceUnicode(str, code) {\n return code[0] === \"x\" || code[0] === \"X\"\n ? String.fromCharCode(parseInt(code.substr(1), 16))\n : String.fromCharCode(parseInt(code, 10));\n });\n}\n\n/**\n * escape html5 new danger entities\n *\n * @param {String} str\n * @return {String}\n */\nfunction escapeDangerHtml5Entities(str) {\n return str\n .replace(REGEXP_ATTR_VALUE_COLON, \":\")\n .replace(REGEXP_ATTR_VALUE_NEWLINE, \" \");\n}\n\n/**\n * clear nonprintable characters\n *\n * @param {String} str\n * @return {String}\n */\nfunction clearNonPrintableCharacter(str) {\n var str2 = \"\";\n for (var i = 0, len = str.length; i < len; i++) {\n str2 += str.charCodeAt(i) < 32 ? \" \" : str.charAt(i);\n }\n return _.trim(str2);\n}\n\n/**\n * get friendly attribute value\n *\n * @param {String} str\n * @return {String}\n */\nfunction friendlyAttrValue(str) {\n str = unescapeQuote(str);\n str = escapeHtmlEntities(str);\n str = escapeDangerHtml5Entities(str);\n str = clearNonPrintableCharacter(str);\n return str;\n}\n\n/**\n * unescape attribute value\n *\n * @param {String} str\n * @return {String}\n */\nfunction escapeAttrValue(str) {\n str = escapeQuote(str);\n str = escapeHtml(str);\n return str;\n}\n\n/**\n * `onIgnoreTag` function for removing all the tags that are not in whitelist\n */\nfunction onIgnoreTagStripAll() {\n return \"\";\n}\n\n/**\n * remove tag body\n * specify a `tags` list, if the tag is not in the `tags` list then process by the specify function (optional)\n *\n * @param {array} tags\n * @param {function} next\n */\nfunction StripTagBody(tags, next) {\n if (typeof next !== \"function\") {\n next = function() {};\n }\n\n var isRemoveAllTag = !Array.isArray(tags);\n function isRemoveTag(tag) {\n if (isRemoveAllTag) return true;\n return _.indexOf(tags, tag) !== -1;\n }\n\n var removeList = [];\n var posStart = false;\n\n return {\n onIgnoreTag: function(tag, html, options) {\n if (isRemoveTag(tag)) {\n if (options.isClosing) {\n var ret = \"[/removed]\";\n var end = options.position + ret.length;\n removeList.push([\n posStart !== false ? posStart : options.position,\n end\n ]);\n posStart = false;\n return ret;\n } else {\n if (!posStart) {\n posStart = options.position;\n }\n return \"[removed]\";\n }\n } else {\n return next(tag, html, options);\n }\n },\n remove: function(html) {\n var rethtml = \"\";\n var lastPos = 0;\n _.forEach(removeList, function(pos) {\n rethtml += html.slice(lastPos, pos[0]);\n lastPos = pos[1];\n });\n rethtml += html.slice(lastPos);\n return rethtml;\n }\n };\n}\n\n/**\n * remove html comments\n *\n * @param {String} html\n * @return {String}\n */\nfunction stripCommentTag(html) {\n return html.replace(STRIP_COMMENT_TAG_REGEXP, \"\");\n}\nvar STRIP_COMMENT_TAG_REGEXP = //g;\n\n/**\n * remove invisible characters\n *\n * @param {String} html\n * @return {String}\n */\nfunction stripBlankChar(html) {\n var chars = html.split(\"\");\n chars = chars.filter(function(char) {\n var c = char.charCodeAt(0);\n if (c === 127) return false;\n if (c <= 31) {\n if (c === 10 || c === 13) return true;\n return false;\n }\n return true;\n });\n return chars.join(\"\");\n}\n\nexports.whiteList = getDefaultWhiteList();\nexports.getDefaultWhiteList = getDefaultWhiteList;\nexports.onTag = onTag;\nexports.onIgnoreTag = onIgnoreTag;\nexports.onTagAttr = onTagAttr;\nexports.onIgnoreTagAttr = onIgnoreTagAttr;\nexports.safeAttrValue = safeAttrValue;\nexports.escapeHtml = escapeHtml;\nexports.escapeQuote = escapeQuote;\nexports.unescapeQuote = unescapeQuote;\nexports.escapeHtmlEntities = escapeHtmlEntities;\nexports.escapeDangerHtml5Entities = escapeDangerHtml5Entities;\nexports.clearNonPrintableCharacter = clearNonPrintableCharacter;\nexports.friendlyAttrValue = friendlyAttrValue;\nexports.escapeAttrValue = escapeAttrValue;\nexports.onIgnoreTagStripAll = onIgnoreTagStripAll;\nexports.StripTagBody = StripTagBody;\nexports.stripCommentTag = stripCommentTag;\nexports.stripBlankChar = stripBlankChar;\nexports.cssFilter = defaultCSSFilter;\nexports.getDefaultCSSWhiteList = getDefaultCSSWhiteList;\n","/**\n * Simple HTML Parser\n *\n * @author Zongmin Lei\n */\n\nvar _ = require(\"./util\");\n\n/**\n * get tag name\n *\n * @param {String} html e.g. ''\n * @return {String}\n */\nfunction getTagName(html) {\n var i = _.spaceIndex(html);\n if (i === -1) {\n var tagName = html.slice(1, -1);\n } else {\n var tagName = html.slice(1, i + 1);\n }\n tagName = _.trim(tagName).toLowerCase();\n if (tagName.slice(0, 1) === \"/\") tagName = tagName.slice(1);\n if (tagName.slice(-1) === \"/\") tagName = tagName.slice(0, -1);\n return tagName;\n}\n\n/**\n * is close tag?\n *\n * @param {String} html 如:''\n * @return {Boolean}\n */\nfunction isClosing(html) {\n return html.slice(0, 2) === \"\";\n}\n\n/**\n * parse input html and returns processed html\n *\n * @param {String} html\n * @param {Function} onTag e.g. function (sourcePosition, position, tag, html, isClosing)\n * @param {Function} escapeHtml\n * @return {String}\n */\nfunction parseTag(html, onTag, escapeHtml) {\n \"use strict\";\n\n var rethtml = \"\";\n var lastPos = 0;\n var tagStart = false;\n var quoteStart = false;\n var currentPos = 0;\n var len = html.length;\n var currentTagName = \"\";\n var currentHtml = \"\";\n\n chariterator: for (currentPos = 0; currentPos < len; currentPos++) {\n var c = html.charAt(currentPos);\n if (tagStart === false) {\n if (c === \"<\") {\n tagStart = currentPos;\n continue;\n }\n } else {\n if (quoteStart === false) {\n if (c === \"<\") {\n rethtml += escapeHtml(html.slice(lastPos, currentPos));\n tagStart = currentPos;\n lastPos = currentPos;\n continue;\n }\n if (c === \">\") {\n rethtml += escapeHtml(html.slice(lastPos, tagStart));\n currentHtml = html.slice(tagStart, currentPos + 1);\n currentTagName = getTagName(currentHtml);\n rethtml += onTag(\n tagStart,\n rethtml.length,\n currentTagName,\n currentHtml,\n isClosing(currentHtml)\n );\n lastPos = currentPos + 1;\n tagStart = false;\n continue;\n }\n if ((c === '\"' || c === \"'\")) {\n var i = 1;\n var ic = html.charAt(currentPos - i);\n\n while ((ic === \" \") || (ic === \"=\")) {\n if (ic === \"=\") {\n quoteStart = c;\n continue chariterator;\n }\n ic = html.charAt(currentPos - ++i);\n }\n }\n } else {\n if (c === quoteStart) {\n quoteStart = false;\n continue;\n }\n }\n }\n }\n if (lastPos < html.length) {\n rethtml += escapeHtml(html.substr(lastPos));\n }\n\n return rethtml;\n}\n\nvar REGEXP_ILLEGAL_ATTR_NAME = /[^a-zA-Z0-9_:\\.\\-]/gim;\n\n/**\n * parse input attributes and returns processed attributes\n *\n * @param {String} html e.g. `href=\"#\" target=\"_blank\"`\n * @param {Function} onAttr e.g. `function (name, value)`\n * @return {String}\n */\nfunction parseAttr(html, onAttr) {\n \"use strict\";\n\n var lastPos = 0;\n var retAttrs = [];\n var tmpName = false;\n var len = html.length;\n\n function addAttr(name, value) {\n name = _.trim(name);\n name = name.replace(REGEXP_ILLEGAL_ATTR_NAME, \"\").toLowerCase();\n if (name.length < 1) return;\n var ret = onAttr(name, value || \"\");\n if (ret) retAttrs.push(ret);\n }\n\n // 逐个分析字符\n for (var i = 0; i < len; i++) {\n var c = html.charAt(i);\n var v, j;\n if (tmpName === false && c === \"=\") {\n tmpName = html.slice(lastPos, i);\n lastPos = i + 1;\n continue;\n }\n if (tmpName !== false) {\n if (\n i === lastPos &&\n (c === '\"' || c === \"'\") &&\n html.charAt(i - 1) === \"=\"\n ) {\n j = html.indexOf(c, i + 1);\n if (j === -1) {\n break;\n } else {\n v = _.trim(html.slice(lastPos + 1, j));\n addAttr(tmpName, v);\n tmpName = false;\n i = j;\n lastPos = i + 1;\n continue;\n }\n }\n }\n if (/\\s|\\n|\\t/.test(c)) {\n html = html.replace(/\\s|\\n|\\t/g, \" \");\n if (tmpName === false) {\n j = findNextEqual(html, i);\n if (j === -1) {\n v = _.trim(html.slice(lastPos, i));\n addAttr(v);\n tmpName = false;\n lastPos = i + 1;\n continue;\n } else {\n i = j - 1;\n continue;\n }\n } else {\n j = findBeforeEqual(html, i - 1);\n if (j === -1) {\n v = _.trim(html.slice(lastPos, i));\n v = stripQuoteWrap(v);\n addAttr(tmpName, v);\n tmpName = false;\n lastPos = i + 1;\n continue;\n } else {\n continue;\n }\n }\n }\n }\n\n if (lastPos < html.length) {\n if (tmpName === false) {\n addAttr(html.slice(lastPos));\n } else {\n addAttr(tmpName, stripQuoteWrap(_.trim(html.slice(lastPos))));\n }\n }\n\n return _.trim(retAttrs.join(\" \"));\n}\n\nfunction findNextEqual(str, i) {\n for (; i < str.length; i++) {\n var c = str[i];\n if (c === \" \") continue;\n if (c === \"=\") return i;\n return -1;\n }\n}\n\nfunction findBeforeEqual(str, i) {\n for (; i > 0; i--) {\n var c = str[i];\n if (c === \" \") continue;\n if (c === \"=\") return i;\n return -1;\n }\n}\n\nfunction isQuoteWrapString(text) {\n if (\n (text[0] === '\"' && text[text.length - 1] === '\"') ||\n (text[0] === \"'\" && text[text.length - 1] === \"'\")\n ) {\n return true;\n } else {\n return false;\n }\n}\n\nfunction stripQuoteWrap(text) {\n if (isQuoteWrapString(text)) {\n return text.substr(1, text.length - 2);\n } else {\n return text;\n }\n}\n\nexports.parseTag = parseTag;\nexports.parseAttr = parseAttr;\n","/**\n * filter xss\n *\n * @author Zongmin Lei\n */\n\nvar FilterCSS = require(\"cssfilter\").FilterCSS;\nvar DEFAULT = require(\"./default\");\nvar parser = require(\"./parser\");\nvar parseTag = parser.parseTag;\nvar parseAttr = parser.parseAttr;\nvar _ = require(\"./util\");\n\n/**\n * returns `true` if the input value is `undefined` or `null`\n *\n * @param {Object} obj\n * @return {Boolean}\n */\nfunction isNull(obj) {\n return obj === undefined || obj === null;\n}\n\n/**\n * get attributes for a tag\n *\n * @param {String} html\n * @return {Object}\n * - {String} html\n * - {Boolean} closing\n */\nfunction getAttrs(html) {\n var i = _.spaceIndex(html);\n if (i === -1) {\n return {\n html: \"\",\n closing: html[html.length - 2] === \"/\"\n };\n }\n html = _.trim(html.slice(i + 1, -1));\n var isClosing = html[html.length - 1] === \"/\";\n if (isClosing) html = _.trim(html.slice(0, -1));\n return {\n html: html,\n closing: isClosing\n };\n}\n\n/**\n * shallow copy\n *\n * @param {Object} obj\n * @return {Object}\n */\nfunction shallowCopyObject(obj) {\n var ret = {};\n for (var i in obj) {\n ret[i] = obj[i];\n }\n return ret;\n}\n\n/**\n * FilterXSS class\n *\n * @param {Object} options\n * whiteList, onTag, onTagAttr, onIgnoreTag,\n * onIgnoreTagAttr, safeAttrValue, escapeHtml\n * stripIgnoreTagBody, allowCommentTag, stripBlankChar\n * css{whiteList, onAttr, onIgnoreAttr} `css=false` means don't use `cssfilter`\n */\nfunction FilterXSS(options) {\n options = shallowCopyObject(options || {});\n\n if (options.stripIgnoreTag) {\n if (options.onIgnoreTag) {\n console.error(\n 'Notes: cannot use these two options \"stripIgnoreTag\" and \"onIgnoreTag\" at the same time'\n );\n }\n options.onIgnoreTag = DEFAULT.onIgnoreTagStripAll;\n }\n\n options.whiteList = options.whiteList || DEFAULT.whiteList;\n options.onTag = options.onTag || DEFAULT.onTag;\n options.onTagAttr = options.onTagAttr || DEFAULT.onTagAttr;\n options.onIgnoreTag = options.onIgnoreTag || DEFAULT.onIgnoreTag;\n options.onIgnoreTagAttr = options.onIgnoreTagAttr || DEFAULT.onIgnoreTagAttr;\n options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;\n options.escapeHtml = options.escapeHtml || DEFAULT.escapeHtml;\n this.options = options;\n\n if (options.css === false) {\n this.cssFilter = false;\n } else {\n options.css = options.css || {};\n this.cssFilter = new FilterCSS(options.css);\n }\n}\n\n/**\n * start process and returns result\n *\n * @param {String} html\n * @return {String}\n */\nFilterXSS.prototype.process = function(html) {\n // compatible with the input\n html = html || \"\";\n html = html.toString();\n if (!html) return \"\";\n\n var me = this;\n var options = me.options;\n var whiteList = options.whiteList;\n var onTag = options.onTag;\n var onIgnoreTag = options.onIgnoreTag;\n var onTagAttr = options.onTagAttr;\n var onIgnoreTagAttr = options.onIgnoreTagAttr;\n var safeAttrValue = options.safeAttrValue;\n var escapeHtml = options.escapeHtml;\n var cssFilter = me.cssFilter;\n\n // remove invisible characters\n if (options.stripBlankChar) {\n html = DEFAULT.stripBlankChar(html);\n }\n\n // remove html comments\n if (!options.allowCommentTag) {\n html = DEFAULT.stripCommentTag(html);\n }\n\n // if enable stripIgnoreTagBody\n var stripIgnoreTagBody = false;\n if (options.stripIgnoreTagBody) {\n var stripIgnoreTagBody = DEFAULT.StripTagBody(\n options.stripIgnoreTagBody,\n onIgnoreTag\n );\n onIgnoreTag = stripIgnoreTagBody.onIgnoreTag;\n }\n\n var retHtml = parseTag(\n html,\n function(sourcePosition, position, tag, html, isClosing) {\n var info = {\n sourcePosition: sourcePosition,\n position: position,\n isClosing: isClosing,\n isWhite: whiteList.hasOwnProperty(tag)\n };\n\n // call `onTag()`\n var ret = onTag(tag, html, info);\n if (!isNull(ret)) return ret;\n\n if (info.isWhite) {\n if (info.isClosing) {\n return \"\" + tag + \">\";\n }\n\n var attrs = getAttrs(html);\n var whiteAttrList = whiteList[tag];\n var attrsHtml = parseAttr(attrs.html, function(name, value) {\n // call `onTagAttr()`\n var isWhiteAttr = _.indexOf(whiteAttrList, name) !== -1;\n var ret = onTagAttr(tag, name, value, isWhiteAttr);\n if (!isNull(ret)) return ret;\n\n if (isWhiteAttr) {\n // call `safeAttrValue()`\n value = safeAttrValue(tag, name, value, cssFilter);\n if (value) {\n return name + '=\"' + value + '\"';\n } else {\n return name;\n }\n } else {\n // call `onIgnoreTagAttr()`\n var ret = onIgnoreTagAttr(tag, name, value, isWhiteAttr);\n if (!isNull(ret)) return ret;\n return;\n }\n });\n\n // build new tag html\n var html = \"<\" + tag;\n if (attrsHtml) html += \" \" + attrsHtml;\n if (attrs.closing) html += \" /\";\n html += \">\";\n return html;\n } else {\n // call `onIgnoreTag()`\n var ret = onIgnoreTag(tag, html, info);\n if (!isNull(ret)) return ret;\n return escapeHtml(html);\n }\n },\n escapeHtml\n );\n\n // if enable stripIgnoreTagBody\n if (stripIgnoreTagBody) {\n retHtml = stripIgnoreTagBody.remove(retHtml);\n }\n\n return retHtml;\n};\n\nmodule.exports = FilterXSS;\n","/**\n * xss\n *\n * @author Zongmin Lei\n */\n\nvar DEFAULT = require(\"./default\");\nvar parser = require(\"./parser\");\nvar FilterXSS = require(\"./xss\");\n\n/**\n * filter xss function\n *\n * @param {String} html\n * @param {Object} options { whiteList, onTag, onTagAttr, onIgnoreTag, onIgnoreTagAttr, safeAttrValue, escapeHtml }\n * @return {String}\n */\nfunction filterXSS(html, options) {\n var xss = new FilterXSS(options);\n return xss.process(html);\n}\n\nexports = module.exports = filterXSS;\nexports.filterXSS = filterXSS;\nexports.FilterXSS = FilterXSS;\nfor (var i in DEFAULT) exports[i] = DEFAULT[i];\nfor (var i in parser) exports[i] = parser[i];\n\n// using `xss` on the browser, output `filterXSS` to the globals\nif (typeof window !== \"undefined\") {\n window.filterXSS = module.exports;\n}\n\n// using `xss` on the WebWorker, output `filterXSS` to the globals\nfunction isWorkerEnv() {\n return typeof self !== 'undefined' && typeof DedicatedWorkerGlobalScope !== 'undefined' && self instanceof DedicatedWorkerGlobalScope;\n}\nif (isWorkerEnv()) {\n self.filterXSS = module.exports;\n}\n",null],"names":["func","transform","funcProto","Function","prototype","objectProto","Object","funcToString","toString","hasOwnProperty","objectCtorString","call","objectToString","getPrototype","getPrototypeOf","arg","value","isObjectLike","result","e","isHostObject","proto","Ctor","constructor","getDefaultWhiteList","whiteList","align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","box-snap","box-suppress","break-after","break-before","break-inside","caption-side","chains","clear","clip","clip-path","clip-rule","color","color-interpolation-filters","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","counter-set","crop","cue","cue-after","cue-before","cursor","direction","display","display-inside","display-list","display-outside","dominant-baseline","elevation","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flood-color","flood-opacity","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-resolution","ime-mode","initial-letters","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","lighting-color","line-box-contain","line-break","line-grid","line-height","line-snap","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marker-side","marks","mask","mask-box","mask-box-outset","mask-box-repeat","mask-box-slice","mask-box-source","mask-box-width","mask-clip","mask-image","mask-origin","mask-position","mask-repeat","mask-size","mask-source-type","mask-type","max-height","max-lines","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","quotes","region-fragment","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-merge","ruby-position","shape-image-threshold","shape-outside","shape-margin","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-overflow","text-shadow","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","wrap-flow","wrap-through","writing-mode","z-index","REGEXP_URL_JAVASCRIPT","name","options","test","str","String","trim","replace","trimRight","css","onAttr","_","length","cssLength","isParenthesisOpen","lastPos","i","retCSS","addNewAttr","source","slice","j","indexOf","ret","c","isNull","obj","FilterCSS","shallowCopyObject","DEFAULT","onIgnoreAttr","safeAttrValue","this","process","parseStyle","sourcePosition","check","isWhite","RegExp","opts","exports","module","html","arr","item","Array","fn","scope","forEach","match","exec","index","require$$0","getDefaultCSSWhiteList","a","abbr","address","area","article","aside","audio","b","bdi","bdo","big","blockquote","br","caption","center","cite","code","col","colgroup","dd","del","details","div","dl","dt","em","footer","h1","h2","h3","h4","h5","h6","header","hr","img","ins","li","mark","nav","ol","p","pre","s","section","small","span","sub","sup","strong","table","tbody","td","tfoot","th","thead","tr","tt","u","ul","video","defaultCSSFilter","escapeHtml","REGEXP_LT","REGEXP_GT","REGEXP_QUOTE","REGEXP_QUOTE_2","REGEXP_ATTR_VALUE_1","REGEXP_ATTR_VALUE_COLON","REGEXP_ATTR_VALUE_NEWLINE","REGEXP_DEFAULT_ON_TAG_ATTR_4","REGEXP_DEFAULT_ON_TAG_ATTR_7","REGEXP_DEFAULT_ON_TAG_ATTR_8","escapeQuote","unescapeQuote","escapeHtmlEntities","fromCharCode","parseInt","substr","escapeDangerHtml5Entities","clearNonPrintableCharacter","str2","len","charCodeAt","charAt","friendlyAttrValue","escapeAttrValue","STRIP_COMMENT_TAG_REGEXP","tag","cssFilter","lastIndex","tags","next","isRemoveAllTag","isArray","removeList","posStart","onIgnoreTag","isRemoveTag","isClosing","end","push","remove","rethtml","pos","chars","split","char","join","getTagName","tagName","toLowerCase","REGEXP_ILLEGAL_ATTR_NAME","findNextEqual","findBeforeEqual","stripQuoteWrap","text","isQuoteWrapString","onTag","tagStart","quoteStart","currentPos","currentTagName","currentHtml","chariterator","ic","retAttrs","tmpName","addAttr","parseTag","parser","parseAttr","FilterXSS","stripIgnoreTag","console","error","onIgnoreTagStripAll","onTagAttr","onIgnoreTagAttr","stripBlankChar","allowCommentTag","stripCommentTag","stripIgnoreTagBody","StripTagBody","retHtml","info","attrs","closing","getAttrs","whiteAttrList","attrsHtml","isWhiteAttr","filterXSS","self","DedicatedWorkerGlobalScope","filterOptions","extendDefaults","xssFilterOptions","_this","sanitizeUrl","xss.safeAttrValue","create","arcgisFilterOptions","keys","key","_extendObjectOfArrays","arcgisWhiteList","_xssFilter","xss.FilterXSS","Sanitizer","isNaN","isFinite","_iterateOverObject","allowUndefined","protocol","_trim","substring","allowedProtocols","xss.escapeAttrValue","attribute","sanitized","sanitize","isValid","objects","finalObj","concat","hasChanged_1","changedObj","reduce","prev","validation","validate","isPlainObject","err","val"],"mappings":";;;;;;;;;;;;;;0OA8CA,IAPiBA,EAAMC,EAOnBC,EAAYC,SAASC,UACrBC,EAAcC,OAAOF,UAGrBG,EAAeL,EAAUM,SAGzBC,EAAiBJ,EAAYI,eAG7BC,EAAmBH,EAAaI,KAAKL,QAOrCM,EAAiBP,EAAYG,SAG7BK,GA3Bab,EA2BUM,OAAOQ,eA3BXb,EA2B2BK,OA1BzC,SAASS,GACd,OAAOf,EAAKC,EAAUc,MAiG1B,MAdA,SAAuBC,GACrB,IAjCF,SAAsBA,GACpB,QAASA,GAAyB,iBAATA,EAgCpBC,CAAaD,IAnHJ,mBAoHVJ,EAAeD,KAAKK,IA3G1B,SAAsBA,GAGpB,IAAIE,GAAS,EACb,GAAa,MAATF,GAA0C,mBAAlBA,EAAMR,SAChC,IACEU,KAAYF,EAAQ,IACpB,MAAOG,IAEX,OAAOD,EAkGwCE,CAAaJ,GAC1D,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