next
Version:
The React Framework
1 lines • 204 kB
JavaScript
(function(){var e={2947:function(e){e.exports={trueFunc:function trueFunc(){return true},falseFunc:function falseFunc(){return false}}},3387:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.attributeRules=void 0;var a=t(2947);var n=/[-[\]{}()*+?.,\\^$|#\s]/g;function escapeRegex(e){return e.replace(n,"\\$&")}var i=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function shouldIgnoreCase(e,r){return typeof e.ignoreCase==="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!r.quirksMode:!r.xmlMode&&i.has(e.name)}r.attributeRules={equals:function(e,r,t){var a=t.adapter;var n=r.name;var i=r.value;if(shouldIgnoreCase(r,t)){i=i.toLowerCase();return function(r){var t=a.getAttributeValue(r,n);return t!=null&&t.length===i.length&&t.toLowerCase()===i&&e(r)}}return function(r){return a.getAttributeValue(r,n)===i&&e(r)}},hyphen:function(e,r,t){var a=t.adapter;var n=r.name;var i=r.value;var o=i.length;if(shouldIgnoreCase(r,t)){i=i.toLowerCase();return function hyphenIC(r){var t=a.getAttributeValue(r,n);return t!=null&&(t.length===o||t.charAt(o)==="-")&&t.substr(0,o).toLowerCase()===i&&e(r)}}return function hyphen(r){var t=a.getAttributeValue(r,n);return t!=null&&(t.length===o||t.charAt(o)==="-")&&t.substr(0,o)===i&&e(r)}},element:function(e,r,t){var n=t.adapter;var i=r.name,o=r.value;if(/\s/.test(o)){return a.falseFunc}var s=new RegExp("(?:^|\\s)".concat(escapeRegex(o),"(?:$|\\s)"),shouldIgnoreCase(r,t)?"i":"");return function element(r){var t=n.getAttributeValue(r,i);return t!=null&&t.length>=o.length&&s.test(t)&&e(r)}},exists:function(e,r,t){var a=r.name;var n=t.adapter;return function(r){return n.hasAttrib(r,a)&&e(r)}},start:function(e,r,t){var n=t.adapter;var i=r.name;var o=r.value;var s=o.length;if(s===0){return a.falseFunc}if(shouldIgnoreCase(r,t)){o=o.toLowerCase();return function(r){var t=n.getAttributeValue(r,i);return t!=null&&t.length>=s&&t.substr(0,s).toLowerCase()===o&&e(r)}}return function(r){var t;return!!((t=n.getAttributeValue(r,i))===null||t===void 0?void 0:t.startsWith(o))&&e(r)}},end:function(e,r,t){var n=t.adapter;var i=r.name;var o=r.value;var s=-o.length;if(s===0){return a.falseFunc}if(shouldIgnoreCase(r,t)){o=o.toLowerCase();return function(r){var t;return((t=n.getAttributeValue(r,i))===null||t===void 0?void 0:t.substr(s).toLowerCase())===o&&e(r)}}return function(r){var t;return!!((t=n.getAttributeValue(r,i))===null||t===void 0?void 0:t.endsWith(o))&&e(r)}},any:function(e,r,t){var n=t.adapter;var i=r.name,o=r.value;if(o===""){return a.falseFunc}if(shouldIgnoreCase(r,t)){var s=new RegExp(escapeRegex(o),"i");return function anyIC(r){var t=n.getAttributeValue(r,i);return t!=null&&t.length>=o.length&&s.test(t)&&e(r)}}return function(r){var t;return!!((t=n.getAttributeValue(r,i))===null||t===void 0?void 0:t.includes(o))&&e(r)}},not:function(e,r,t){var a=t.adapter;var n=r.name;var i=r.value;if(i===""){return function(r){return!!a.getAttributeValue(r,n)&&e(r)}}else if(shouldIgnoreCase(r,t)){i=i.toLowerCase();return function(r){var t=a.getAttributeValue(r,n);return(t==null||t.length!==i.length||t.toLowerCase()!==i)&&e(r)}}return function(r){return a.getAttributeValue(r,n)!==i&&e(r)}}}},8689:function(e,r,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});r.compileToken=r.compileUnsafe=r.compile=void 0;var n=t(8065);var i=t(2947);var o=a(t(4901));var s=t(538);var u=t(7088);var l=t(4428);function compile(e,r,t){var a=compileUnsafe(e,r,t);return(0,l.ensureIsTag)(a,r.adapter)}r.compile=compile;function compileUnsafe(e,r,t){var a=typeof e==="string"?(0,n.parse)(e):e;return compileToken(a,r,t)}r.compileUnsafe=compileUnsafe;function includesScopePseudo(e){return e.type==="pseudo"&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some((function(e){return e.some(includesScopePseudo)})))}var c={type:n.SelectorType.Descendant};var p={type:"_flexibleDescendant"};var d={type:n.SelectorType.Pseudo,name:"scope",data:null};function absolutize(e,r,t){var a=r.adapter;var n=!!(t===null||t===void 0?void 0:t.every((function(e){var r=a.isTag(e)&&a.getParent(e);return e===l.PLACEHOLDER_ELEMENT||r&&a.isTag(r)})));for(var i=0,o=e;i<o.length;i++){var u=o[i];if(u.length>0&&(0,s.isTraversal)(u[0])&&u[0].type!=="descendant"){}else if(n&&!u.some(includesScopePseudo)){u.unshift(c)}else{continue}u.unshift(d)}}function compileToken(e,r,t){var a;e=e.filter((function(e){return e.length>0}));e.forEach(o.default);t=(a=r.context)!==null&&a!==void 0?a:t;var n=Array.isArray(t);var s=t&&(Array.isArray(t)?t:[t]);absolutize(e,r,s);var u=false;var l=e.map((function(e){if(e.length>=2){var t=e[0],a=e[1];if(t.type!=="pseudo"||t.name!=="scope"){}else if(n&&a.type==="descendant"){e[1]=p}else if(a.type==="adjacent"||a.type==="sibling"){u=true}}return compileRules(e,r,s)})).reduce(reduceRules,i.falseFunc);l.shouldTestNextSiblings=u;return l}r.compileToken=compileToken;function compileRules(e,r,t){var a;return e.reduce((function(e,a){return e===i.falseFunc?i.falseFunc:(0,u.compileGeneralSelector)(e,a,r,t,compileToken)}),(a=r.rootFunc)!==null&&a!==void 0?a:i.trueFunc)}function reduceRules(e,r){if(r===i.falseFunc||e===i.trueFunc){return e}if(e===i.falseFunc||r===i.trueFunc){return r}return function combine(t){return e(t)||r(t)}}},7088:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.compileGeneralSelector=void 0;var a=t(3387);var n=t(6463);var i=t(8065);function compileGeneralSelector(e,r,t,o,s){var u=t.adapter,l=t.equals;switch(r.type){case i.SelectorType.PseudoElement:{throw new Error("Pseudo-elements are not supported by css-select")}case i.SelectorType.ColumnCombinator:{throw new Error("Column combinators are not yet supported by css-select")}case i.SelectorType.Attribute:{if(r.namespace!=null){throw new Error("Namespaced attributes are not yet supported by css-select")}if(!t.xmlMode||t.lowerCaseAttributeNames){r.name=r.name.toLowerCase()}return a.attributeRules[r.action](e,r,t)}case i.SelectorType.Pseudo:{return(0,n.compilePseudoSelector)(e,r,t,o,s)}case i.SelectorType.Tag:{if(r.namespace!=null){throw new Error("Namespaced tag names are not yet supported by css-select")}var c=r.name;if(!t.xmlMode||t.lowerCaseTags){c=c.toLowerCase()}return function tag(r){return u.getName(r)===c&&e(r)}}case i.SelectorType.Descendant:{if(t.cacheResults===false||typeof WeakSet==="undefined"){return function descendant(r){var t=r;while(t=u.getParent(t)){if(u.isTag(t)&&e(t)){return true}}return false}}var p=new WeakSet;return function cachedDescendant(r){var t=r;while(t=u.getParent(t)){if(!p.has(t)){if(u.isTag(t)&&e(t)){return true}p.add(t)}}return false}}case"_flexibleDescendant":{return function flexibleDescendant(r){var t=r;do{if(u.isTag(t)&&e(t))return true}while(t=u.getParent(t));return false}}case i.SelectorType.Parent:{return function parent(r){return u.getChildren(r).some((function(r){return u.isTag(r)&&e(r)}))}}case i.SelectorType.Child:{return function child(r){var t=u.getParent(r);return t!=null&&u.isTag(t)&&e(t)}}case i.SelectorType.Sibling:{return function sibling(r){var t=u.getSiblings(r);for(var a=0;a<t.length;a++){var n=t[a];if(l(r,n))break;if(u.isTag(n)&&e(n)){return true}}return false}}case i.SelectorType.Adjacent:{if(u.prevElementSibling){return function adjacent(r){var t=u.prevElementSibling(r);return t!=null&&e(t)}}return function adjacent(r){var t=u.getSiblings(r);var a;for(var n=0;n<t.length;n++){var i=t[n];if(l(r,i))break;if(u.isTag(i)){a=i}}return!!a&&e(a)}}case i.SelectorType.Universal:{if(r.namespace!=null&&r.namespace!=="*"){throw new Error("Namespaced universal selectors are not yet supported by css-select")}return e}}}r.compileGeneralSelector=compileGeneralSelector},1112:function(e,r,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,r,t,a){if(a===undefined)a=t;var n=Object.getOwnPropertyDescriptor(r,t);if(!n||("get"in n?!r.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return r[t]}}}Object.defineProperty(e,a,n)}:function(e,r,t,a){if(a===undefined)a=t;e[a]=r[t]});var n=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:true,value:r})}:function(e,r){e["default"]=r});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(t!=="default"&&Object.prototype.hasOwnProperty.call(e,t))a(r,e,t);n(r,e);return r};Object.defineProperty(r,"__esModule",{value:true});r.aliases=r.pseudos=r.filters=r.is=r.selectOne=r.selectAll=r.prepareContext=r._compileToken=r._compileUnsafe=r.compile=void 0;var o=i(t(5861));var s=t(2947);var u=t(8689);var l=t(4428);var defaultEquals=function(e,r){return e===r};var c={adapter:o,equals:defaultEquals};function convertOptionFormats(e){var r,t,a,n;var i=e!==null&&e!==void 0?e:c;(r=i.adapter)!==null&&r!==void 0?r:i.adapter=o;(t=i.equals)!==null&&t!==void 0?t:i.equals=(n=(a=i.adapter)===null||a===void 0?void 0:a.equals)!==null&&n!==void 0?n:defaultEquals;return i}function wrapCompile(e){return function addAdapter(r,t,a){var n=convertOptionFormats(t);return e(r,n,a)}}r.compile=wrapCompile(u.compile);r._compileUnsafe=wrapCompile(u.compileUnsafe);r._compileToken=wrapCompile(u.compileToken);function getSelectorFunc(e){return function select(r,t,a){var n=convertOptionFormats(a);if(typeof r!=="function"){r=(0,u.compileUnsafe)(r,n,t)}var i=prepareContext(t,n.adapter,r.shouldTestNextSiblings);return e(r,i,n)}}function prepareContext(e,r,t){if(t===void 0){t=false}if(t){e=appendNextSiblings(e,r)}return Array.isArray(e)?r.removeSubsets(e):r.getChildren(e)}r.prepareContext=prepareContext;function appendNextSiblings(e,r){var t=Array.isArray(e)?e.slice(0):[e];var a=t.length;for(var n=0;n<a;n++){var i=(0,l.getNextSiblings)(t[n],r);t.push.apply(t,i)}return t}r.selectAll=getSelectorFunc((function(e,r,t){return e===s.falseFunc||!r||r.length===0?[]:t.adapter.findAll(e,r)}));r.selectOne=getSelectorFunc((function(e,r,t){return e===s.falseFunc||!r||r.length===0?null:t.adapter.findOne(e,r)}));function is(e,r,t){var a=convertOptionFormats(t);return(typeof r==="function"?r:(0,u.compile)(r,a))(e)}r.is=is;r["default"]=r.selectAll;var p=t(6463);Object.defineProperty(r,"filters",{enumerable:true,get:function(){return p.filters}});Object.defineProperty(r,"pseudos",{enumerable:true,get:function(){return p.pseudos}});Object.defineProperty(r,"aliases",{enumerable:true,get:function(){return p.aliases}})},538:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.isTraversal=r.procedure=void 0;r.procedure={universal:50,tag:30,attribute:1,pseudo:0,"pseudo-element":0,"column-combinator":-1,descendant:-1,child:-1,parent:-1,sibling:-1,adjacent:-1,_flexibleDescendant:-1};function isTraversal(e){return r.procedure[e.type]<0}r.isTraversal=isTraversal},8680:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.aliases=void 0;r.aliases={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"}},6804:function(e,r,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});r.filters=void 0;var n=a(t(7118));var i=t(2947);function getChildFunc(e,r){return function(t){var a=r.getParent(t);return a!=null&&r.isTag(a)&&e(t)}}r.filters={contains:function(e,r,t){var a=t.adapter;return function contains(t){return e(t)&&a.getText(t).includes(r)}},icontains:function(e,r,t){var a=t.adapter;var n=r.toLowerCase();return function icontains(r){return e(r)&&a.getText(r).toLowerCase().includes(n)}},"nth-child":function(e,r,t){var a=t.adapter,o=t.equals;var s=(0,n.default)(r);if(s===i.falseFunc)return i.falseFunc;if(s===i.trueFunc)return getChildFunc(e,a);return function nthChild(r){var t=a.getSiblings(r);var n=0;for(var i=0;i<t.length;i++){if(o(r,t[i]))break;if(a.isTag(t[i])){n++}}return s(n)&&e(r)}},"nth-last-child":function(e,r,t){var a=t.adapter,o=t.equals;var s=(0,n.default)(r);if(s===i.falseFunc)return i.falseFunc;if(s===i.trueFunc)return getChildFunc(e,a);return function nthLastChild(r){var t=a.getSiblings(r);var n=0;for(var i=t.length-1;i>=0;i--){if(o(r,t[i]))break;if(a.isTag(t[i])){n++}}return s(n)&&e(r)}},"nth-of-type":function(e,r,t){var a=t.adapter,o=t.equals;var s=(0,n.default)(r);if(s===i.falseFunc)return i.falseFunc;if(s===i.trueFunc)return getChildFunc(e,a);return function nthOfType(r){var t=a.getSiblings(r);var n=0;for(var i=0;i<t.length;i++){var u=t[i];if(o(r,u))break;if(a.isTag(u)&&a.getName(u)===a.getName(r)){n++}}return s(n)&&e(r)}},"nth-last-of-type":function(e,r,t){var a=t.adapter,o=t.equals;var s=(0,n.default)(r);if(s===i.falseFunc)return i.falseFunc;if(s===i.trueFunc)return getChildFunc(e,a);return function nthLastOfType(r){var t=a.getSiblings(r);var n=0;for(var i=t.length-1;i>=0;i--){var u=t[i];if(o(r,u))break;if(a.isTag(u)&&a.getName(u)===a.getName(r)){n++}}return s(n)&&e(r)}},root:function(e,r,t){var a=t.adapter;return function(r){var t=a.getParent(r);return(t==null||!a.isTag(t))&&e(r)}},scope:function(e,t,a,n){var i=a.equals;if(!n||n.length===0){return r.filters.root(e,t,a)}if(n.length===1){return function(r){return i(n[0],r)&&e(r)}}return function(r){return n.includes(r)&&e(r)}},hover:dynamicStatePseudo("isHovered"),visited:dynamicStatePseudo("isVisited"),active:dynamicStatePseudo("isActive")};function dynamicStatePseudo(e){return function dynamicPseudo(r,t,a){var n=a.adapter;var o=n[e];if(typeof o!=="function"){return i.falseFunc}return function active(e){return o(e)&&r(e)}}}},6463:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.compilePseudoSelector=r.aliases=r.pseudos=r.filters=void 0;var a=t(2947);var n=t(8065);var i=t(6804);Object.defineProperty(r,"filters",{enumerable:true,get:function(){return i.filters}});var o=t(6973);Object.defineProperty(r,"pseudos",{enumerable:true,get:function(){return o.pseudos}});var s=t(8680);Object.defineProperty(r,"aliases",{enumerable:true,get:function(){return s.aliases}});var u=t(4428);function compilePseudoSelector(e,r,t,l,c){var p=r.name,d=r.data;if(Array.isArray(d)){return u.subselects[p](e,d,t,l,c)}if(p in s.aliases){if(d!=null){throw new Error("Pseudo ".concat(p," doesn't have any arguments"))}var f=(0,n.parse)(s.aliases[p]);return u.subselects.is(e,f,t,l,c)}if(p in i.filters){return i.filters[p](e,d,t,l)}if(p in o.pseudos){var g=o.pseudos[p];(0,o.verifyPseudoArgs)(g,p,d);return g===a.falseFunc?a.falseFunc:e===a.trueFunc?function(e){return g(e,t,d)}:function(r){return g(r,t,d)&&e(r)}}throw new Error("unmatched pseudo-class :".concat(p))}r.compilePseudoSelector=compilePseudoSelector},6973:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.verifyPseudoArgs=r.pseudos=void 0;r.pseudos={empty:function(e,r){var t=r.adapter;return!t.getChildren(e).some((function(e){return t.isTag(e)||t.getText(e)!==""}))},"first-child":function(e,r){var t=r.adapter,a=r.equals;var n=t.getSiblings(e).find((function(e){return t.isTag(e)}));return n!=null&&a(e,n)},"last-child":function(e,r){var t=r.adapter,a=r.equals;var n=t.getSiblings(e);for(var i=n.length-1;i>=0;i--){if(a(e,n[i]))return true;if(t.isTag(n[i]))break}return false},"first-of-type":function(e,r){var t=r.adapter,a=r.equals;var n=t.getSiblings(e);var i=t.getName(e);for(var o=0;o<n.length;o++){var s=n[o];if(a(e,s))return true;if(t.isTag(s)&&t.getName(s)===i){break}}return false},"last-of-type":function(e,r){var t=r.adapter,a=r.equals;var n=t.getSiblings(e);var i=t.getName(e);for(var o=n.length-1;o>=0;o--){var s=n[o];if(a(e,s))return true;if(t.isTag(s)&&t.getName(s)===i){break}}return false},"only-of-type":function(e,r){var t=r.adapter,a=r.equals;var n=t.getName(e);return t.getSiblings(e).every((function(r){return a(e,r)||!t.isTag(r)||t.getName(r)!==n}))},"only-child":function(e,r){var t=r.adapter,a=r.equals;return t.getSiblings(e).every((function(r){return a(e,r)||!t.isTag(r)}))}};function verifyPseudoArgs(e,r,t){if(t===null){if(e.length>2){throw new Error("pseudo-selector :".concat(r," requires an argument"))}}else if(e.length===2){throw new Error("pseudo-selector :".concat(r," doesn't have any arguments"))}}r.verifyPseudoArgs=verifyPseudoArgs},4428:function(e,r,t){"use strict";var a=this&&this.__spreadArray||function(e,r,t){if(t||arguments.length===2)for(var a=0,n=r.length,i;a<n;a++){if(i||!(a in r)){if(!i)i=Array.prototype.slice.call(r,0,a);i[a]=r[a]}}return e.concat(i||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:true});r.subselects=r.getNextSiblings=r.ensureIsTag=r.PLACEHOLDER_ELEMENT=void 0;var n=t(2947);var i=t(538);r.PLACEHOLDER_ELEMENT={};function ensureIsTag(e,r){if(e===n.falseFunc)return n.falseFunc;return function(t){return r.isTag(t)&&e(t)}}r.ensureIsTag=ensureIsTag;function getNextSiblings(e,r){var t=r.getSiblings(e);if(t.length<=1)return[];var a=t.indexOf(e);if(a<0||a===t.length-1)return[];return t.slice(a+1).filter(r.isTag)}r.getNextSiblings=getNextSiblings;var is=function(e,r,t,a,n){var i={xmlMode:!!t.xmlMode,adapter:t.adapter,equals:t.equals};var o=n(r,i,a);return function(r){return o(r)&&e(r)}};r.subselects={is:is,matches:is,where:is,not:function(e,r,t,a,i){var o={xmlMode:!!t.xmlMode,adapter:t.adapter,equals:t.equals};var s=i(r,o,a);if(s===n.falseFunc)return e;if(s===n.trueFunc)return n.falseFunc;return function not(r){return!s(r)&&e(r)}},has:function(e,t,o,s,u){var l=o.adapter;var c={xmlMode:!!o.xmlMode,adapter:l,equals:o.equals};var p=t.some((function(e){return e.some(i.isTraversal)}))?[r.PLACEHOLDER_ELEMENT]:undefined;var d=u(t,c,p);if(d===n.falseFunc)return n.falseFunc;if(d===n.trueFunc){return function(r){return l.getChildren(r).some(l.isTag)&&e(r)}}var f=ensureIsTag(d,l);var g=d.shouldTestNextSiblings,h=g===void 0?false:g;if(p){return function(r){p[0]=r;var t=l.getChildren(r);var n=h?a(a([],t,true),getNextSiblings(r,l),true):t;return e(r)&&l.existsOne(f,n)}}return function(r){return e(r)&&l.existsOne(f,l.getChildren(r))}}}},4901:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});var a=t(8065);var n=t(538);var i={exists:10,equals:8,not:7,start:6,end:6,any:5,hyphen:4,element:4};function sortByProcedure(e){var r=e.map(getProcedure);for(var t=1;t<e.length;t++){var a=r[t];if(a<0)continue;for(var n=t-1;n>=0&&a<r[n];n--){var i=e[n+1];e[n+1]=e[n];e[n]=i;r[n+1]=r[n];r[n]=a}}}r["default"]=sortByProcedure;function getProcedure(e){var r=n.procedure[e.type];if(e.type===a.SelectorType.Attribute){r=i[e.action];if(r===i.equals&&e.name==="id"){r=9}if(e.ignoreCase){r>>=1}}else if(e.type===a.SelectorType.Pseudo){if(!e.data){r=3}else if(e.name==="has"||e.name==="contains"){r=0}else if(Array.isArray(e.data)){r=0;for(var t=0;t<e.data.length;t++){if(e.data[t].length!==1)continue;var o=getProcedure(e.data[t][0]);if(o===0){r=0;break}if(o>r)r=o}if(e.data.length>1&&r>0)r-=1}else{r=1}}return r}},8065:function(e,r,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,r,t,a){if(a===undefined)a=t;var n=Object.getOwnPropertyDescriptor(r,t);if(!n||("get"in n?!r.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return r[t]}}}Object.defineProperty(e,a,n)}:function(e,r,t,a){if(a===undefined)a=t;e[a]=r[t]});var n=this&&this.__exportStar||function(e,r){for(var t in e)if(t!=="default"&&!Object.prototype.hasOwnProperty.call(r,t))a(r,e,t)};Object.defineProperty(r,"__esModule",{value:true});r.stringify=r.parse=r.isTraversal=void 0;n(t(5615),r);var i=t(2422);Object.defineProperty(r,"isTraversal",{enumerable:true,get:function(){return i.isTraversal}});Object.defineProperty(r,"parse",{enumerable:true,get:function(){return i.parse}});var o=t(8279);Object.defineProperty(r,"stringify",{enumerable:true,get:function(){return o.stringify}})},2422:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parse=r.isTraversal=void 0;var a=t(5615);var n=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/;var i=/\\([\da-f]{1,6}\s?|(\s)|.)/gi;var o=new Map([[126,a.AttributeAction.Element],[94,a.AttributeAction.Start],[36,a.AttributeAction.End],[42,a.AttributeAction.Any],[33,a.AttributeAction.Not],[124,a.AttributeAction.Hyphen]]);var s=new Set(["has","not","matches","is","where","host","host-context"]);function isTraversal(e){switch(e.type){case a.SelectorType.Adjacent:case a.SelectorType.Child:case a.SelectorType.Descendant:case a.SelectorType.Parent:case a.SelectorType.Sibling:case a.SelectorType.ColumnCombinator:return true;default:return false}}r.isTraversal=isTraversal;var u=new Set(["contains","icontains"]);function funescape(e,r,t){var a=parseInt(r,16)-65536;return a!==a||t?r:a<0?String.fromCharCode(a+65536):String.fromCharCode(a>>10|55296,a&1023|56320)}function unescapeCSS(e){return e.replace(i,funescape)}function isQuote(e){return e===39||e===34}function isWhitespace(e){return e===32||e===9||e===10||e===12||e===13}function parse(e){var r=[];var t=parseSelector(r,"".concat(e),0);if(t<e.length){throw new Error("Unmatched selector: ".concat(e.slice(t)))}return r}r.parse=parse;function parseSelector(e,r,t){var i=[];function getName(e){var a=r.slice(t+e).match(n);if(!a){throw new Error("Expected name, found ".concat(r.slice(t)))}var i=a[0];t+=e+i.length;return unescapeCSS(i)}function stripWhitespace(e){t+=e;while(t<r.length&&isWhitespace(r.charCodeAt(t))){t++}}function readValueWithParenthesis(){t+=1;var e=t;var a=1;for(;a>0&&t<r.length;t++){if(r.charCodeAt(t)===40&&!isEscaped(t)){a++}else if(r.charCodeAt(t)===41&&!isEscaped(t)){a--}}if(a){throw new Error("Parenthesis not matched")}return unescapeCSS(r.slice(e,t-1))}function isEscaped(e){var t=0;while(r.charCodeAt(--e)===92)t++;return(t&1)===1}function ensureNotTraversal(){if(i.length>0&&isTraversal(i[i.length-1])){throw new Error("Did not expect successive traversals.")}}function addTraversal(e){if(i.length>0&&i[i.length-1].type===a.SelectorType.Descendant){i[i.length-1].type=e;return}ensureNotTraversal();i.push({type:e})}function addSpecialAttribute(e,r){i.push({type:a.SelectorType.Attribute,name:e,action:r,value:getName(1),namespace:null,ignoreCase:"quirks"})}function finalizeSubselector(){if(i.length&&i[i.length-1].type===a.SelectorType.Descendant){i.pop()}if(i.length===0){throw new Error("Empty sub-selector")}e.push(i)}stripWhitespace(0);if(r.length===t){return t}e:while(t<r.length){var l=r.charCodeAt(t);switch(l){case 32:case 9:case 10:case 12:case 13:{if(i.length===0||i[0].type!==a.SelectorType.Descendant){ensureNotTraversal();i.push({type:a.SelectorType.Descendant})}stripWhitespace(1);break}case 62:{addTraversal(a.SelectorType.Child);stripWhitespace(1);break}case 60:{addTraversal(a.SelectorType.Parent);stripWhitespace(1);break}case 126:{addTraversal(a.SelectorType.Sibling);stripWhitespace(1);break}case 43:{addTraversal(a.SelectorType.Adjacent);stripWhitespace(1);break}case 46:{addSpecialAttribute("class",a.AttributeAction.Element);break}case 35:{addSpecialAttribute("id",a.AttributeAction.Equals);break}case 91:{stripWhitespace(1);var c=void 0;var p=null;if(r.charCodeAt(t)===124){c=getName(1)}else if(r.startsWith("*|",t)){p="*";c=getName(2)}else{c=getName(0);if(r.charCodeAt(t)===124&&r.charCodeAt(t+1)!==61){p=c;c=getName(1)}}stripWhitespace(0);var d=a.AttributeAction.Exists;var f=o.get(r.charCodeAt(t));if(f){d=f;if(r.charCodeAt(t+1)!==61){throw new Error("Expected `=`")}stripWhitespace(2)}else if(r.charCodeAt(t)===61){d=a.AttributeAction.Equals;stripWhitespace(1)}var g="";var h=null;if(d!=="exists"){if(isQuote(r.charCodeAt(t))){var m=r.charCodeAt(t);var v=t+1;while(v<r.length&&(r.charCodeAt(v)!==m||isEscaped(v))){v+=1}if(r.charCodeAt(v)!==m){throw new Error("Attribute value didn't end")}g=unescapeCSS(r.slice(t+1,v));t=v+1}else{var b=t;while(t<r.length&&(!isWhitespace(r.charCodeAt(t))&&r.charCodeAt(t)!==93||isEscaped(t))){t+=1}g=unescapeCSS(r.slice(b,t))}stripWhitespace(0);var y=r.charCodeAt(t)|32;if(y===115){h=false;stripWhitespace(1)}else if(y===105){h=true;stripWhitespace(1)}}if(r.charCodeAt(t)!==93){throw new Error("Attribute selector didn't terminate")}t+=1;var w={type:a.SelectorType.Attribute,name:c,action:d,value:g,namespace:p,ignoreCase:h};i.push(w);break}case 58:{if(r.charCodeAt(t+1)===58){i.push({type:a.SelectorType.PseudoElement,name:getName(2).toLowerCase(),data:r.charCodeAt(t)===40?readValueWithParenthesis():null});continue}var T=getName(1).toLowerCase();var E=null;if(r.charCodeAt(t)===40){if(s.has(T)){if(isQuote(r.charCodeAt(t+1))){throw new Error("Pseudo-selector ".concat(T," cannot be quoted"))}E=[];t=parseSelector(E,r,t+1);if(r.charCodeAt(t)!==41){throw new Error("Missing closing parenthesis in :".concat(T," (").concat(r,")"))}t+=1}else{E=readValueWithParenthesis();if(u.has(T)){var A=E.charCodeAt(0);if(A===E.charCodeAt(E.length-1)&&isQuote(A)){E=E.slice(1,-1)}}E=unescapeCSS(E)}}i.push({type:a.SelectorType.Pseudo,name:T,data:E});break}case 44:{finalizeSubselector();i=[];stripWhitespace(1);break}default:{if(r.startsWith("/*",t)){var q=r.indexOf("*/",t+2);if(q<0){throw new Error("Comment was not terminated")}t=q+2;if(i.length===0){stripWhitespace(0)}break}var p=null;var x=void 0;if(l===42){t+=1;x="*"}else if(l===124){x="";if(r.charCodeAt(t+1)===124){addTraversal(a.SelectorType.ColumnCombinator);stripWhitespace(2);break}}else if(n.test(r.slice(t))){x=getName(0)}else{break e}if(r.charCodeAt(t)===124&&r.charCodeAt(t+1)!==124){p=x;if(r.charCodeAt(t+1)===42){x="*";t+=2}else{x=getName(1)}}i.push(x==="*"?{type:a.SelectorType.Universal,namespace:p}:{type:a.SelectorType.Tag,name:x,namespace:p})}}}finalizeSubselector();return t}},8279:function(e,r,t){"use strict";var a=this&&this.__spreadArray||function(e,r,t){if(t||arguments.length===2)for(var a=0,n=r.length,i;a<n;a++){if(i||!(a in r)){if(!i)i=Array.prototype.slice.call(r,0,a);i[a]=r[a]}}return e.concat(i||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:true});r.stringify=void 0;var n=t(5615);var i=["\\",'"'];var o=a(a([],i,true),["(",")"],false);var s=new Set(i.map((function(e){return e.charCodeAt(0)})));var u=new Set(o.map((function(e){return e.charCodeAt(0)})));var l=new Set(a(a([],o,true),["~","^","$","*","+","!","|",":","[","]"," ","."],false).map((function(e){return e.charCodeAt(0)})));function stringify(e){return e.map((function(e){return e.map(stringifyToken).join("")})).join(", ")}r.stringify=stringify;function stringifyToken(e,r,t){switch(e.type){case n.SelectorType.Child:return r===0?"> ":" > ";case n.SelectorType.Parent:return r===0?"< ":" < ";case n.SelectorType.Sibling:return r===0?"~ ":" ~ ";case n.SelectorType.Adjacent:return r===0?"+ ":" + ";case n.SelectorType.Descendant:return" ";case n.SelectorType.ColumnCombinator:return r===0?"|| ":" || ";case n.SelectorType.Universal:return e.namespace==="*"&&r+1<t.length&&"name"in t[r+1]?"":"".concat(getNamespace(e.namespace),"*");case n.SelectorType.Tag:return getNamespacedName(e);case n.SelectorType.PseudoElement:return"::".concat(escapeName(e.name,l)).concat(e.data===null?"":"(".concat(escapeName(e.data,u),")"));case n.SelectorType.Pseudo:return":".concat(escapeName(e.name,l)).concat(e.data===null?"":"(".concat(typeof e.data==="string"?escapeName(e.data,u):stringify(e.data),")"));case n.SelectorType.Attribute:{if(e.name==="id"&&e.action===n.AttributeAction.Equals&&e.ignoreCase==="quirks"&&!e.namespace){return"#".concat(escapeName(e.value,l))}if(e.name==="class"&&e.action===n.AttributeAction.Element&&e.ignoreCase==="quirks"&&!e.namespace){return".".concat(escapeName(e.value,l))}var a=getNamespacedName(e);if(e.action===n.AttributeAction.Exists){return"[".concat(a,"]")}return"[".concat(a).concat(getActionValue(e.action),'="').concat(escapeName(e.value,s),'"').concat(e.ignoreCase===null?"":e.ignoreCase?" i":" s","]")}}}function getActionValue(e){switch(e){case n.AttributeAction.Equals:return"";case n.AttributeAction.Element:return"~";case n.AttributeAction.Start:return"^";case n.AttributeAction.End:return"$";case n.AttributeAction.Any:return"*";case n.AttributeAction.Not:return"!";case n.AttributeAction.Hyphen:return"|";case n.AttributeAction.Exists:throw new Error("Shouldn't be here")}}function getNamespacedName(e){return"".concat(getNamespace(e.namespace)).concat(escapeName(e.name,l))}function getNamespace(e){return e!==null?"".concat(e==="*"?"*":escapeName(e,l),"|"):""}function escapeName(e,r){var t=0;var a="";for(var n=0;n<e.length;n++){if(r.has(e.charCodeAt(n))){a+="".concat(e.slice(t,n),"\\").concat(e.charAt(n));t=n+1}}return a.length>0?a+e.slice(t):e}},5615:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.AttributeAction=r.IgnoreCaseMode=r.SelectorType=void 0;var t;(function(e){e["Attribute"]="attribute";e["Pseudo"]="pseudo";e["PseudoElement"]="pseudo-element";e["Tag"]="tag";e["Universal"]="universal";e["Adjacent"]="adjacent";e["Child"]="child";e["Descendant"]="descendant";e["Parent"]="parent";e["Sibling"]="sibling";e["ColumnCombinator"]="column-combinator"})(t=r.SelectorType||(r.SelectorType={}));r.IgnoreCaseMode={Unknown:null,QuirksMode:"quirks",IgnoreCase:true,CaseSensitive:false};var a;(function(e){e["Any"]="any";e["Element"]="element";e["End"]="end";e["Equals"]="equals";e["Exists"]="exists";e["Hyphen"]="hyphen";e["Not"]="not";e["Start"]="start"})(a=r.AttributeAction||(r.AttributeAction={}))},7537:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.attributeNames=r.elementNames=void 0;r.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]);r.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]])},4614:function(e,r,t){"use strict";var a=this&&this.__assign||function(){a=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++){r=arguments[t];for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n))e[n]=r[n]}return e};return a.apply(this,arguments)};var n=this&&this.__createBinding||(Object.create?function(e,r,t,a){if(a===undefined)a=t;Object.defineProperty(e,a,{enumerable:true,get:function(){return r[t]}})}:function(e,r,t,a){if(a===undefined)a=t;e[a]=r[t]});var i=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:true,value:r})}:function(e,r){e["default"]=r});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(t!=="default"&&Object.prototype.hasOwnProperty.call(e,t))n(r,e,t);i(r,e);return r};Object.defineProperty(r,"__esModule",{value:true});var s=o(t(9391));var u=t(9280);var l=t(7537);var c=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function formatAttributes(e,r){if(!e)return;return Object.keys(e).map((function(t){var a,n;var i=(a=e[t])!==null&&a!==void 0?a:"";if(r.xmlMode==="foreign"){t=(n=l.attributeNames.get(t))!==null&&n!==void 0?n:t}if(!r.emptyAttrs&&!r.xmlMode&&i===""){return t}return t+'="'+(r.decodeEntities!==false?u.encodeXML(i):i.replace(/"/g,"""))+'"'})).join(" ")}var p=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function render(e,r){if(r===void 0){r={}}var t=Array.isArray(e)||e.cheerio?e:[e];var a="";for(var n=0;n<t.length;n++){a+=renderNode(t[n],r)}return a}r["default"]=render;function renderNode(e,r){switch(e.type){case s.Root:return render(e.children,r);case s.Directive:case s.Doctype:return renderDirective(e);case s.Comment:return renderComment(e);case s.CDATA:return renderCdata(e);case s.Script:case s.Style:case s.Tag:return renderTag(e,r);case s.Text:return renderText(e,r)}}var d=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]);var f=new Set(["svg","math"]);function renderTag(e,r){var t;if(r.xmlMode==="foreign"){e.name=(t=l.elementNames.get(e.name))!==null&&t!==void 0?t:e.name;if(e.parent&&d.has(e.parent.name)){r=a(a({},r),{xmlMode:false})}}if(!r.xmlMode&&f.has(e.name)){r=a(a({},r),{xmlMode:"foreign"})}var n="<"+e.name;var i=formatAttributes(e.attribs,r);if(i){n+=" "+i}if(e.children.length===0&&(r.xmlMode?r.selfClosingTags!==false:r.selfClosingTags&&p.has(e.name))){if(!r.xmlMode)n+=" ";n+="/>"}else{n+=">";if(e.children.length>0){n+=render(e.children,r)}if(r.xmlMode||!p.has(e.name)){n+="</"+e.name+">"}}return n}function renderDirective(e){return"<"+e.data+">"}function renderText(e,r){var t=e.data||"";if(r.decodeEntities!==false&&!(!r.xmlMode&&e.parent&&c.has(e.parent.name))){t=u.encodeXML(t)}return t}function renderCdata(e){return"<![CDATA["+e.children[0].data+"]]>"}function renderComment(e){return"\x3c!--"+e.data+"--\x3e"}},9391:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.Doctype=r.CDATA=r.Tag=r.Style=r.Script=r.Comment=r.Directive=r.Text=r.Root=r.isTag=r.ElementType=void 0;var t;(function(e){e["Root"]="root";e["Text"]="text";e["Directive"]="directive";e["Comment"]="comment";e["Script"]="script";e["Style"]="style";e["Tag"]="tag";e["CDATA"]="cdata";e["Doctype"]="doctype"})(t=r.ElementType||(r.ElementType={}));function isTag(e){return e.type===t.Tag||e.type===t.Script||e.type===t.Style}r.isTag=isTag;r.Root=t.Root;r.Text=t.Text;r.Directive=t.Directive;r.Comment=t.Comment;r.Script=t.Script;r.Style=t.Style;r.Tag=t.Tag;r.CDATA=t.CDATA;r.Doctype=t.Doctype},2472:function(e,r,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,r,t,a){if(a===undefined)a=t;var n=Object.getOwnPropertyDescriptor(r,t);if(!n||("get"in n?!r.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return r[t]}}}Object.defineProperty(e,a,n)}:function(e,r,t,a){if(a===undefined)a=t;e[a]=r[t]});var n=this&&this.__exportStar||function(e,r){for(var t in e)if(t!=="default"&&!Object.prototype.hasOwnProperty.call(r,t))a(r,e,t)};Object.defineProperty(r,"__esModule",{value:true});r.DomHandler=void 0;var i=t(9391);var o=t(1508);n(t(1508),r);var s=/\s+/g;var u={normalizeWhitespace:false,withStartIndices:false,withEndIndices:false,xmlMode:false};var l=function(){function DomHandler(e,r,t){this.dom=[];this.root=new o.Document(this.dom);this.done=false;this.tagStack=[this.root];this.lastNode=null;this.parser=null;if(typeof r==="function"){t=r;r=u}if(typeof e==="object"){r=e;e=undefined}this.callback=e!==null&&e!==void 0?e:null;this.options=r!==null&&r!==void 0?r:u;this.elementCB=t!==null&&t!==void 0?t:null}DomHandler.prototype.onparserinit=function(e){this.parser=e};DomHandler.prototype.onreset=function(){this.dom=[];this.root=new o.Document(this.dom);this.done=false;this.tagStack=[this.root];this.lastNode=null;this.parser=null};DomHandler.prototype.onend=function(){if(this.done)return;this.done=true;this.parser=null;this.handleCallback(null)};DomHandler.prototype.onerror=function(e){this.handleCallback(e)};DomHandler.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();if(this.options.withEndIndices){e.endIndex=this.parser.endIndex}if(this.elementCB)this.elementCB(e)};DomHandler.prototype.onopentag=function(e,r){var t=this.options.xmlMode?i.ElementType.Tag:undefined;var a=new o.Element(e,r,undefined,t);this.addNode(a);this.tagStack.push(a)};DomHandler.prototype.ontext=function(e){var r=this.options.normalizeWhitespace;var t=this.lastNode;if(t&&t.type===i.ElementType.Text){if(r){t.data=(t.data+e).replace(s," ")}else{t.data+=e}if(this.options.withEndIndices){t.endIndex=this.parser.endIndex}}else{if(r){e=e.replace(s," ")}var a=new o.Text(e);this.addNode(a);this.lastNode=a}};DomHandler.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment){this.lastNode.data+=e;return}var r=new o.Comment(e);this.addNode(r);this.lastNode=r};DomHandler.prototype.oncommentend=function(){this.lastNode=null};DomHandler.prototype.oncdatastart=function(){var e=new o.Text("");var r=new o.NodeWithChildren(i.ElementType.CDATA,[e]);this.addNode(r);e.parent=r;this.lastNode=e};DomHandler.prototype.oncdataend=function(){this.lastNode=null};DomHandler.prototype.onprocessinginstruction=function(e,r){var t=new o.ProcessingInstruction(e,r);this.addNode(t)};DomHandler.prototype.handleCallback=function(e){if(typeof this.callback==="function"){this.callback(e,this.dom)}else if(e){throw e}};DomHandler.prototype.addNode=function(e){var r=this.tagStack[this.tagStack.length-1];var t=r.children[r.children.length-1];if(this.options.withStartIndices){e.startIndex=this.parser.startIndex}if(this.options.withEndIndices){e.endIndex=this.parser.endIndex}r.children.push(e);if(t){e.prev=t;t.next=e}e.parent=r;this.lastNode=null};return DomHandler}();r.DomHandler=l;r["default"]=l},1508:function(e,r,t){"use strict";var a=this&&this.__extends||function(){var extendStatics=function(e,r){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return extendStatics(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");extendStatics(e,r);function __(){this.constructor=e}e.prototype=r===null?Object.create(r):(__.prototype=r.prototype,new __)}}();var n=this&&this.__assign||function(){n=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++){r=arguments[t];for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n))e[n]=r[n]}return e};return n.apply(this,arguments)};Object.defineProperty(r,"__esModule",{value:true});r.cloneNode=r.hasChildren=r.isDocument=r.isDirective=r.isComment=r.isText=r.isCDATA=r.isTag=r.Element=r.Document=r.NodeWithChildren=r.ProcessingInstruction=r.Comment=r.Text=r.DataNode=r.Node=void 0;var i=t(9391);var o=new Map([[i.ElementType.Tag,1],[i.ElementType.Script,1],[i.ElementType.Style,1],[i.ElementType.Directive,1],[i.ElementType.Text,3],[i.ElementType.CDATA,4],[i.ElementType.Comment,8],[i.ElementType.Root,9]]);var s=function(){function Node(e){this.type=e;this.parent=null;this.prev=null;this.next=null;this.startIndex=null;this.endIndex=null}Object.defineProperty(Node.prototype,"nodeType",{get:function(){var e;return(e=o.get(this.type))!==null&&e!==void 0?e:1},enumerable:false,configurable:true});Object.defineProperty(Node.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:false,configurable:true});Object.defineProperty(Node.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:false,configurable:true});Object.defineProperty(Node.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:false,configurable:true});Node.prototype.cloneNode=function(e){if(e===void 0){e=false}return cloneNode(this,e)};return Node}();r.Node=s;var u=function(e){a(DataNode,e);function DataNode(r,t){var a=e.call(this,r)||this;a.data=t;return a}Object.defineProperty(DataNode.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:false,configurable:true});return DataNode}(s);r.DataNode=u;var l=function(e){a(Text,e);function Text(r){return e.call(this,i.ElementType.Text,r)||this}return Text}(u);r.Text=l;var c=function(e){a(Comment,e);function Comment(r){return e.call(this,i.ElementType.Comment,r)||this}return Comment}(u);r.Comment=c;var p=function(e){a(ProcessingInstruction,e);function ProcessingInstruction(r,t){var a=e.call(this,i.ElementType.Directive,t)||this;a.name=r;return a}return ProcessingInstruction}(u);r.ProcessingInstruction=p;var d=function(e){a(NodeWithChildren,e);function NodeWithChildren(r,t){var a=e.call(this,r)||this;a.children=t;return a}Object.defineProperty(NodeWithChildren.prototype,"firstChild",{get:function(){var e;return(e=this.children[0])!==null&&e!==void 0?e:null},enumerable:false,configurable:true});Object.defineProperty(NodeWithChildren.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:false,configurable:true});Object.defineProperty(NodeWithChildren.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:false,configurable:true});return NodeWithChildren}(s);r.NodeWithChildren=d;var f=function(e){a(Document,e);function Document(r){return e.call(this,i.ElementType.Root,r)||this}return Document}(d);r.Document=f;var g=function(e){a(Element,e);function Element(r,t,a,n){if(a===void 0){a=[]}if(n===void 0){n=r==="script"?i.ElementType.Script:r==="style"?i.ElementType.Style:i.ElementType.Tag}var o=e.call(this,n,a)||this;o.name=r;o.attribs=t;return o}Object.defineProperty(Element.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:false,configurable:true});Object.defineProperty(Element.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(r){var t,a;return{name:r,value:e.attribs[r],namespace:(t=e["x-attribsNamespace"])===null||t===void 0?void 0:t[r],prefix:(a=e["x-attribsPrefix"])===null||a===void 0?void 0:a[r]}}))},enumerable:false,configurable:true});return Element}(d);r.Element=g;function isTag(e){return(0,i.isTag)(e)}r.isTag=isTag;function isCDATA(e){return e.type===i.ElementType.CDATA}r.isCDATA=isCDATA;function isText(e){return e.type===i.ElementType.Text}r.isText=isText;function isComment(e){return e.type===i.ElementType.Comment}r.isComment=isComment;function isDirective(e){return e.type===i.ElementType.Directive}r.isDirective=isDirective;function isDocument(e){return e.type===i.ElementType.Root}r.isDocument=isDocument;function hasChildren(e){return Object.prototype.hasOwnProperty.call(e,"children")}r.hasChildren=hasChildren;function cloneNode(e,r){if(r===void 0){r=false}var t;if(isText(e)){t=new l(e.data)}else if(isComment(e)){t=new c(e.data)}else if(isTag(e)){var a=r?cloneChildren(e.children):[];var o=new g(e.name,n({},e.attribs),a);a.forEach((function(e){return e.parent=o}));if(e.namespace!=null){o.namespace=e.namespace}if(e["x-attribsNamespace"]){o["x-attribsNamespace"]=n({},e["x-attribsNamespace"])}if(e["x-attribsPrefix"]){o["x-attribsPrefix"]=n({},e["x-attribsPrefix"])}t=o}else if(isCDATA(e)){var a=r?cloneChildren(e.children):[];var s=new d(i.ElementType.CDATA,a);a.forEach((function(e){return e.parent=s}));t=s}else if(isDocument(e)){var a=r?cloneChildren(e.children):[];var u=new f(a);a.forEach((function(e){return e.parent=u}));if(e["x-mode"]){u["x-mode"]=e["x-mode"]}t=u}else if(isDirective(e)){var h=new p(e.name,e.data);if(e["x-name"]!=null){h["x-name"]=e["x-name"];h["x-publicId"]=e["x-publicId"];h["x-systemId"]=e["x-systemId"]}t=h}else{throw new Error("Not implemented yet: ".concat(e.type))}t.startIndex=e.startIndex;t.endIndex=e.endIndex;if(e.sourceCodeLocation!=null){t.sourceCodeLocation=e.sourceCodeLocation}return t}r.cloneNode=cloneNode;function cloneChildren(e){var r=e.map((function(e){return cloneNode(e,true)}));for(var t=1;t<r.length;t++){r[t].prev=r[t-1];r[t-1].next=r[t]}return r}},3442:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.getFeed=void 0;var a=t(3930);var n=t(7102);function getFeed(e){var r=getOneElement(isValidFeed,e);return!r?null:r.name==="feed"?getAtomFeed(r):getRssFeed(r)}r.getFeed=getFeed;function getAtomFeed(e){var r;var t=e.children;var a={type:"atom",items:(0,n.getElementsByTagName)("entry",t).map((function(e){var r;var t=e.children;var a={media:getMediaElements(t)};addConditionally(a,"id","id",t);addConditionally(a,"title","title",t);var n=(r=getOneElement("link",t))===null||r===void 0?void 0:r.attribs.href;if(n){a.link=n}var i=fetch("summary",t)||fetch("content",t);if(i){a.description=i}var o=fetch("updated",t);if(o){a.pubDate=new Date(o)}return a}))};addConditionally(a,"id","id",t);addConditionally(a,"title","title",t);var i=(r=getOneElement("link",t))===null||r===void 0?void 0:r.attribs.href;if(i){a.link=i}addConditionally(a,"description","subtitle",t);var o=fetch("updated",t);if(o){a.updated=new Date(o)}addConditionally(a,"author","email",t,true);return a}function getRssFeed(e){var r,t;var a=(t=(r=getOneElement("channel",e.children))===null||r===void 0?void 0:r.children)!==null&&t!==void 0?t:[];var i={type:e.name.substr(0,3),id:"",items:(0,n.getElementsByTagName)("item",e.children).map((function(e){var r=e.children;var t={media:getMediaElements(r)};addConditionally(t,"id","guid",r);addConditionally(t,"title","title",r);addConditionally(t,"link","link",r);addConditionally(t,"description","description",r);var a=fetch("pubDate",r);if(a)t.pubDate=new Date(a);return t}))};addConditionally(i,"title","title",a);addConditionally(i,"link","link",a);addConditionally(i,"description","description",a);var o=fetch("lastBuildDate",a);if(o){i.updated=new Date(o)}addConditionally(i,"author","managingEditor",a,true);return i}var i=["url","type","lang"];var o=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function getMediaElements(e){return(0,n.getElementsByTagName)("media:content",e).map((function(e){var r=e.attribs;var t={medium:r.medium,isDefault:!!r.isDefault};for(var a=0,n=i;a<n.length;a++){var s=n[a];if(r[s]){t[s]=r[s]}}for(var u=0,l=o;u<l.length;u++){var s=l[u];if(r[s]){t[s]=parseInt(r[s],10)}}if(r.expression){t.expression=r.expression}return t}))}function getOneElement(e,r){return(0,n.getElementsByTagName)(e,r,true,1)[0]}function fetch(e,r,t){if(t===void 0){t=false}return(0,a.textContent)((0,n.getElementsByTagName)(e,r,t,1)).trim()}function addConditionally(e,r,t,a,n){if(n===void 0){n=false}var i=fetch(t,a,n);if(i)e[r]=i}function isValidFeed(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}},5509:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.uniqueSort=r.compareDocumentPosition=r.removeSubsets=void 0;var a=t(2472);function removeSubsets(e){var r=e.length;while(--r>=0){var t=e[r];if(r>0&&e.lastIndexOf(t,r-1)>=0){e.splice(r,1);continue}for(var a=t.parent;a;a=a.parent