!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fxp=e():t.fxp=e()}(this,()=>(()=>{"use strict";var t={d:(e,i)=>{for(var r in i)t.o(i,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:i[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{XMLBuilder:()=>$e,XMLParser:()=>ne,XMLValidator:()=>je});var i=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r=new RegExp("^["+i+"]["+i+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),n=function(t){return!(null==r.exec(t))},s=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],a=["__proto__","constructor","prototype"],o={allowBooleanAttributes:!1,unpairedTags:[]};function l(t,e){e=Object.assign({},o,e);var i=[],r=!1,n=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(var s=0;s"!==t[s]&&" "!==t[s]&&"\t"!==t[s]&&"\n"!==t[s]&&"\r"!==t[s];s++)d+=t[s];if("/"===(d=d.trim())[d.length-1]&&(d=d.substring(0,d.length-1),s--),!v(d))return x("InvalidTag",0===d.trim().length?"Invalid space after '<'.":"Tag '"+d+"' is an invalid name.",y(t,s));var u=f(t,s);if(!1===u)return x("InvalidAttr","Attributes for '"+d+"' have open quote.",y(t,s));var b=u.value;if(s=u.index,"/"===b[b.length-1]){var N=s-b.length,E=g(b=b.substring(0,b.length-1),e);if(!0!==E)return x(E.err.code,E.err.msg,y(t,N+E.err.line));r=!0}else if(l){if(!u.tagClosed)return x("InvalidTag","Closing tag '"+d+"' doesn't have proper closing.",y(t,s));if(b.trim().length>0)return x("InvalidTag","Closing tag '"+d+"' can't have attributes or invalid starting.",y(t,a));if(0===i.length)return x("InvalidTag","Closing tag '"+d+"' has not been opened.",y(t,a));var w=i.pop();if(d!==w.tagName){var S=y(t,w.tagStartPos);return x("InvalidTag","Expected closing tag '"+w.tagName+"' (opened in line "+S.line+", col "+S.col+") instead of closing tag '"+d+"'.",y(t,a))}0==i.length&&(n=!0)}else{var A=g(b,e);if(!0!==A)return x(A.err.code,A.err.msg,y(t,s-b.length+A.err.line));if(!0===n)return x("InvalidXml","Multiple possible root nodes found.",y(t,s));-1!==e.unpairedTags.indexOf(d)||i.push({tagName:d,tagStartPos:a}),r=!0}for(s++;s0)||x("InvalidXml","Invalid '"+JSON.stringify(i.map(function(t){return t.tagName}),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):x("InvalidXml","Start tag expected.",1)}function p(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function c(t,e){for(var i=e;e5&&"xml"===r)return x("InvalidXml","XML declaration allowed only at the start of the document.",y(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function h(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){var i=1;for(e+=8;e"===t[e]&&0===--i)break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e"===t[e+2]){e+=2;break}return e}var d='"',u="'";function f(t,e){for(var i="",r="",n=!1;e"===t[e]&&""===r){n=!0;break}i+=t[e]}return""===r&&{value:i,index:e,tagClosed:n}}function g(t,e){for(var i=function(t){for(var e=[],i=t.length,r=0;r=i)break;if("="!==t[r]){for(var s=t.slice(n,r),a=r;r0?this.child.push(((i={})[t.tagname]=t.child,i[":@"]=t[":@"],i)):this.child.push(((r={})[t.tagname]=t.child,r)),this.addStartIndex(e)},e.addStartIndex=function(t){void 0!==t&&(this.child[this.child.length-1][T]={startIndex:t})},e.addEndIndex=function(t){var e=this.child[this.child.length-1];void 0!==e&&void 0!==e[T]&&void 0===e[T].endIndex&&(e[T].endIndex=t)},t.getMetaDataSymbol=function(){return T},t}();const O=":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�",P=":A-Za-z_À-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",$=P+"\\-\\.\\d·̀-ͯ҇‿-⁀",j=(t,e,i="")=>{const r=`[${t.replace(":","")}][${e.replace(":","")}]*`;return{name:new RegExp(`^[${t}][${e}]*$`,i),ncName:new RegExp(`^${r}$`,i),qName:new RegExp(`^${r}(?::${r})?$`,i),nmToken:new RegExp(`^[${e}]+$`,i),nmTokens:new RegExp(`^[${e}]+(?:\\s+[${e}]+)*$`,i)}},I=j(O,O+"\\-\\.\\d·̀-ͯ‿-⁀"),k=j(P,$,"u"),L=":A-Za-z_",D=j(L,L+"\\-\\.\\d"),M=(t,{xmlVersion:e="1.0",asciiOnly:i=!1}={})=>((t="1.0",e=!1)=>e?D:"1.1"===t?k:I)(e,i).qName.test(t);var R=function(){function t(t,e){this.suppressValidationErr=!t,this.options=t,this.xmlVersion=e||1}var e=t.prototype;return e.setXmlVersion=function(t){void 0===t&&(t=1),this.xmlVersion=t},e.readDocType=function(t,e){var i=Object.create(null),r=0;if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");e+=9;for(var n=1,s=!1,a=!1,o=null;e"===t[e]){if(a?"-"===t[e-1]&&"-"===t[e-2]&&(a=!1,n--):n--,0===n)break}else"["===t[e]?s=!0:t[e];else{if(s&&q(t,"!ENTITY",e)){e+=7;var l,p=void 0,c=this.readEntityExp(t,e+1,this.suppressValidationErr);if(l=c[0],p=c[1],e=c[2],-1===p.indexOf("&")){if(!1!==this.options.enabled&&null!=this.options.maxEntityCount&&r>=this.options.maxEntityCount)throw new Error("Entity count ("+(r+1)+") exceeds maximum allowed ("+this.options.maxEntityCount+")");i[l]=p,r++}}else if(s&&q(t,"!ELEMENT",e))e+=8,e=this.readElementExp(t,e+1).index;else if(s&&q(t,"!ATTLIST",e))e+=8;else if(s&&q(t,"!NOTATION",e))e+=9,e=this.readNotationExp(t,e+1,this.suppressValidationErr).index;else{if(!q(t,"!--",e))throw new Error("Invalid DOCTYPE");a=!0}n++}else o=t[e],t[e];else t[e]===o&&(o=null),t[e];if(null!==o||0!==n)throw new Error("Unclosed DOCTYPE");return{entities:i,i:e}},e.readEntityExp=function(t,e){for(var i=e=V(t,e);ethis.options.maxEntitySize)throw new Error('Entity "'+r+'" size ('+n.length+") exceeds maximum allowed size ("+this.options.maxEntitySize+")");return[r,n,--e]},e.readNotationExp=function(t,e){for(var i=e=V(t,e);e=48&&n<=57||45===n))if(n=55296&&n<=56319){if(r+1=56320&&e<=57343){const t=65536+(n-55296<<10)+(e-56320);if(F.has(t)){i=r;break}}}}else if(255!==X[n-G]||W.has(n)){i=r;break}}if(-1===i)return t;const r=[];i>0&&r.push(t.slice(0,i));for(let n=i;n=48&&i<=57||45===i){r.push(t[n]);continue}if(i=55296&&i<=56319){if(n+1=56320&&e<=57343){const t=65536+(i-55296<<10)+(e-56320),s=F.get(t);if(void 0!==s){r.push(String.fromCharCode(s+48)),n++;continue}}}r.push(t[n]);continue}if(W.has(i)){r.push("-");continue}const s=X[i-G];r.push(255!==s?String.fromCharCode(s+48):t[n])}return r.join("")}(i),"0"===i))return 0;if(e.hex&&z.test(i))return tt(i,16);if(e.binary&&Y.test(i))return tt(i,2);if(e.octal&&H.test(i))return tt(i,8);if(isFinite(i)){if(i.includes("e")||i.includes("E"))return function(t,e,i){if(!i.eNotation)return t;const r=e.match(K);if(r){let n=r[1]||"";const s=-1===r[3].indexOf("e")?"E":"e",a=r[2],o=n?t[a.length+1]===s:t[a.length]===s;return a.length>1&&o?t:(1!==a.length||!r[3].startsWith(`.${s}`)&&r[3][0]!==s)&&a.length>0?i.leadingZeros&&!o?(e=(r[1]||"")+r[3],Number(e)):t:Number(e)}return t}(t,i,e);{const r=Q.exec(i);if(r){const n=r[1]||"",s=r[2];let a=function(t){if(t&&-1!==t.indexOf(".")){let e=t.length;for(;e>0&&48===t.charCodeAt(e-1);)e--;return"."===(t=t.slice(0,e))?t="0":"."===t[0]?t="0"+t:"."===t[t.length-1]&&(t=t.substring(0,t.length-1)),t}return t}(r[3]);const o=n?"."===t[s.length+1]:"."===t[s.length];if(!e.leadingZeros&&(s.length>1||1===s.length&&!o))return t;{const r=Number(i),o=String(r);if(0===r)return r;if(-1!==o.search(/[eE]/))return e.eNotation?r:t;if(-1!==i.indexOf("."))return"0"===o||o===a||o===`${n}${a}`?r:t;let l=s?a:i;return s?l===o||n+l===o?r:t:l===o||l===n+o?r:t}}return t}}return function(t,e,i){const r=e===1/0;switch(i.infinity.toLowerCase()){case"null":return null;case"infinity":return e;case"string":return r?"Infinity":"-Infinity";default:return t}}(t,Number(i),e)}const K=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function tt(t,e){const i=t.trim();if(2!==e&&8!==e||(t=i.substring(2)),parseInt)return parseInt(t,e);if(Number.parseInt)return Number.parseInt(t,e);if(window&&window.parseInt)return window.parseInt(t,e);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function et(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=Array(e);i0?t[t.length-1].tag:void 0}getCurrentNamespace(){const t=this._matcher.path;return t.length>0?t[t.length-1].namespace:void 0}getAttrValue(t){const e=this._matcher.path;if(0!==e.length)return e[e.length-1].values?.[t]}hasAttr(t){const e=this._matcher.path;if(0===e.length)return!1;const i=e[e.length-1];return void 0!==i.values&&t in i.values}getAnyParentAttr(t){return this._matcher.getAnyParentAttr(t)}hasAnyParentAttr(t){return this._matcher.hasAnyParentAttr(t)}getPosition(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].position??0}getCounter(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(t,e=!0){return this._matcher.toString(t,e)}toArray(){return this._matcher.path.map(t=>t.tag)}matches(t){return this._matcher.matches(t)}matchesAny(t){return t.matchesAny(this._matcher)}}class rt{constructor(t={}){this.separator=t.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new it(this),this._keptAttrs=[]}push(t,e=null,i=null,r=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);const n=this.path.length;let s=this.siblingStacks[n];s||(s={counts:new Map,total:0},this.siblingStacks[n]=s);const a=i?`${i}:${t}`:t,o=s.counts.get(a)||0,l=s.total;s.counts.set(a,o+1),s.total++;const p={tag:t,position:l,counter:o};null!=i&&(p.namespace=i),null!=e&&(p.values=e),this.path.push(p);const c=this.path.length,h=null!==r?r.keep:null;if(null!=h&&h.length>0&&e)for(let t=0;tthis.path.length+1&&(this.siblingStacks.length=this.path.length+1);const e=this.path.length+1;for(;this._keptAttrs.length>0&&this._keptAttrs[this._keptAttrs.length-1].depth>=e;)this._keptAttrs.pop();return t}updateCurrent(t){if(this.path.length>0){const e=this.path[this.path.length-1];null!=t&&(e.values=t)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(t){if(0!==this.path.length)return this.path[this.path.length-1].values?.[t]}hasAttr(t){if(0===this.path.length)return!1;const e=this.path[this.path.length-1];return void 0!==e.values&&t in e.values}getAnyParentAttr(t){const e=this._keptAttrs;for(let i=e.length-1;i>=0;i--)if(e[i].name===t)return e[i].value}hasAnyParentAttr(t){const e=this._keptAttrs;for(let i=e.length-1;i>=0;i--)if(e[i].name===t)return!0;return!1}getPosition(){return 0===this.path.length?-1:this.path[this.path.length-1].position??0}getCounter(){return 0===this.path.length?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(t,e=!0){const i=t||this.separator;if(i===this.separator&&!0===e){if(null!==this._pathStringCache)return this._pathStringCache;const t=this.path.map(t=>t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(i);return this._pathStringCache=t,t}return this.path.map(t=>e&&t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(i)}toArray(){return this.path.map(t=>t.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[],this._keptAttrs=[]}matches(t){const e=t.segments;return 0!==e.length&&(t.hasDeepWildcard()?this._matchWithDeepWildcard(e):this._matchSimple(e))}_matchSimple(t){if(this.path.length!==t.length)return!1;for(let e=0;e=0&&e>=0;){const r=t[i];if("deep-wildcard"===r.type){if(i--,i<0)return!0;const r=t[i];let n=!1;for(let t=e;t>=0;t--)if(this._matchSegment(r,this.path[t],t===this.path.length-1)){e=t-1,i--,n=!0;break}if(!n)return!1}else{if(!this._matchSegment(r,this.path[e],e===this.path.length-1))return!1;e--,i--}}return i<0}_matchSegment(t,e,i){if("*"!==t.tag&&t.tag!==e.tag)return!1;if(void 0!==t.namespace&&"*"!==t.namespace&&t.namespace!==e.namespace)return!1;if(void 0!==t.attrName){if(!i)return!1;if(!e.values||!(t.attrName in e.values))return!1;if(void 0!==t.attrValue&&String(e.values[t.attrName])!==String(t.attrValue))return!1}if(void 0!==t.position){if(!i)return!1;const r=e.counter??0;if("first"===t.position&&0!==r)return!1;if("odd"===t.position&&r%2!=1)return!1;if("even"===t.position&&r%2!=0)return!1;if("nth"===t.position&&r!==t.positionValue)return!1}return!0}matchesAny(t){return t.matchesAny(this)}snapshot(){return{path:this.path.map(t=>({...t})),siblingStacks:this.siblingStacks.map(t=>t?{counts:new Map(t.counts),total:t.total}:t),keptAttrs:this._keptAttrs.map(t=>({...t}))}}restore(t){this._pathStringCache=null,this.path=t.path.map(t=>({...t})),this.siblingStacks=t.siblingStacks.map(t=>t?{counts:new Map(t.counts),total:t.total}:t),this._keptAttrs=(t.keptAttrs||[]).map(t=>({...t}))}readOnly(){return this._view}}class nt{constructor(t,e={},i){this.pattern=t,this.separator=e.separator||".",this.segments=this._parse(t),this.data=i,this._hasDeepWildcard=this.segments.some(t=>"deep-wildcard"===t.type),this._hasAttributeCondition=this.segments.some(t=>void 0!==t.attrName),this._hasPositionSelector=this.segments.some(t=>void 0!==t.position)}_parse(t){const e=[];let i=0,r="";for(;i",lt:"<",quot:'"'},lt={nbsp:" ",copy:"©",reg:"®",trade:"™",mdash:"—",ndash:"–",hellip:"…",laquo:"«",raquo:"»",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",bull:"•",para:"¶",sect:"§",deg:"°",frac12:"½",frac14:"¼",frac34:"¾"},pt=Object.freeze({ALLOW:"allow",BLOCK:"block",THROW:"throw"}),ct=new Set("!?\\\\/[]$%{}^&*()<>|+");function ht(t){if("#"===t[0])throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${t}"`);for(const e of t)if(ct.has(e))throw new Error(`[EntityReplacer] Invalid character '${e}' in entity name: "${t}"`);return t}function dt(...t){const e=Object.create(null);for(const i of t)if(i)for(const t of Object.keys(i)){const r=i[t];if("string"==typeof r)e[t]=r;else if(r&&"object"==typeof r&&void 0!==r.val){const i=r.val;"string"==typeof i&&(e[t]=i)}}return e}const ut="external",ft="base",gt="all",mt=Object.freeze({allow:0,leave:1,remove:2,throw:3}),xt=new Set([9,10,13]);class bt{constructor(t={}){var e;this._limit=t.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck="function"==typeof t.postCheck?t.postCheck:t=>t,this._limitTiers=(e=this._limit.applyLimitsTo??ut)&&e!==ut?e===gt?new Set([gt]):e===ft?new Set([ft]):Array.isArray(e)?new Set(e):new Set([ut]):new Set([ut]),this._numericAllowed=t.numericAllowed??!0,this._baseMap=dt(ot,t.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(t.remove&&Array.isArray(t.remove)?t.remove:[]),this._leaveSet=new Set(t.leave&&Array.isArray(t.leave)?t.leave:[]);const i=function(t){if(!t)return{xmlVersion:1,onLevel:mt.allow,nullLevel:mt.remove};const e=1.1===t.xmlVersion?1.1:1,i=mt[t.onNCR]??mt.allow,r=mt[t.nullNCR]??mt.remove;return{xmlVersion:e,onLevel:i,nullLevel:Math.max(r,mt.remove)}}(t.ncr);this._ncrXmlVersion=i.xmlVersion,this._ncrOnLevel=i.onLevel,this._ncrNullLevel=i.nullLevel,this._onExternalEntity="function"==typeof t.onExternalEntity?t.onExternalEntity:null,this._onInputEntity="function"==typeof t.onInputEntity?t.onInputEntity:null}_applyRegistrationHook(t,e,i,r){if(!t)return!0;const n=t(e,i);if(n===pt.BLOCK)return!1;if(n===pt.THROW)throw new Error(`[EntityDecoder] Registration of ${r} entity "&${e};" was rejected by hook`);return!0}setExternalEntities(t){if(t)for(const e of Object.keys(t))ht(e);if(!this._onExternalEntity)return void(this._externalMap=dt(t));const e=dt(t),i=Object.create(null);for(const[t,r]of Object.entries(e))this._applyRegistrationHook(this._onExternalEntity,t,r,"external")&&(i[t]=r);this._externalMap=i}addExternalEntity(t,e){ht(t),"string"==typeof e&&-1===e.indexOf("&")&&this._applyRegistrationHook(this._onExternalEntity,t,e,"external")&&(this._externalMap[t]=e)}addInputEntities(t){if(this._totalExpansions=0,this._expandedLength=0,!this._onInputEntity)return void(this._inputMap=dt(t));const e=dt(t),i=Object.create(null);for(const[t,r]of Object.entries(e))this._applyRegistrationHook(this._onInputEntity,t,r,"input")&&(i[t]=r);this._inputMap=i}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(t){this._ncrXmlVersion=1.1===t?1.1:1}decode(t){if("string"!=typeof t||0===t.length)return t;if(-1===t.indexOf("&"))return t;const e=t,i=[],r=t.length;let n=0,s=0;const a=this._maxTotalExpansions>0,o=this._maxExpandedLength>0,l=a||o;for(;s=r||59!==t.charCodeAt(e)){s++;continue}const p=t.slice(s+1,e);if(0===p.length){s++;continue}let c,h;if(this._removeSet.has(p))c="",void 0===h&&(h=ut);else{if(this._leaveSet.has(p)){s++;continue}if(35===p.charCodeAt(0)){const t=this._resolveNCR(p);if(void 0===t){s++;continue}c=t,h=ft}else{const t=this._resolveName(p);c=t?.value,h=t?.tier}}if(void 0!==c){if(s>n&&i.push(t.slice(n,s)),i.push(c),n=e+1,s=n,l&&this._tierCounts(h)){if(a&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw new Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(o){const t=c.length-(p.length+2);if(t>0&&(this._expandedLength+=t,this._expandedLength>this._maxExpandedLength))throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}else s++}n=55296&&t<=57343||1===this._ncrXmlVersion&&t>=1&&t<=31&&!xt.has(t)?mt.remove:-1}_applyNCRAction(t,e,i){switch(t){case mt.allow:return String.fromCodePoint(i);case mt.remove:return"";case mt.leave:return;case mt.throw:throw new Error(`[EntityDecoder] Prohibited numeric character reference &${e}; (U+${i.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(i)}}_resolveNCR(t){const e=t.charCodeAt(1);let i;if(i=120===e||88===e?parseInt(t.slice(2),16):parseInt(t.slice(1),10),Number.isNaN(i)||i<0||i>1114111)return;const r=this._classifyNCR(i);if(!this._numericAllowed&&r/]/i},{id:"html-script-close",description:"<\/script closing tag",pattern:/<\/script[\s>]/i},{id:"html-javascript-protocol",description:"javascript: URI scheme (with optional whitespace/encoding)",pattern:/j[\t\n\r ]*a[\t\n\r ]*v[\t\n\r ]*a[\t\n\r ]*s[\t\n\r ]*c[\t\n\r ]*r[\t\n\r ]*i[\t\n\r ]*p[\t\n\r ]*t[\t\n\r ]*:/i},{id:"html-vbscript-protocol",description:"vbscript: URI scheme",pattern:/vbscript[\t\n\r ]*:/i},{id:"html-data-html",description:"data:text/html URI — can execute scripts in browsers",pattern:/data[\t\n\r ]*:[\t\n\r ]*text\/html/i},{id:"html-data-xhtml",description:"data:application/xhtml+xml URI",pattern:/data[\t\n\r ]*:[\t\n\r ]*application\/xhtml/i},{id:"html-data-svg",description:"data:image/svg+xml URI — can execute scripts",pattern:/data[\t\n\r ]*:[\t\n\r ]*image\/svg\+xml/i},{id:"html-inline-event-handler",description:"Inline event handler attributes: onclick=, onerror=, onload=, etc.",pattern:/\bon\w{1,30}\s*=/i},{id:"html-entity-obfuscated-script",description:"HTML-entity-encoded