8 lines
59 KiB
JavaScript
8 lines
59 KiB
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.source = void 0;
|
|
const source = "var pwExport=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\"a\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\"\",n(n.s=9)}([function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.parseSelector=function(e){const t=function(e){let t,n=0,r=0;const o={parts:[]},i=()=>{const t=e.substring(r,n).trim(),i=t.indexOf(\"=\");let s,c;-1!==i&&t.substring(0,i).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(s=t.substring(0,i).trim(),c=t.substring(i+1)):t.length>1&&'\"'===t[0]&&'\"'===t[t.length-1]||t.length>1&&\"'\"===t[0]&&\"'\"===t[t.length-1]?(s=\"text\",c=t):/^\\(*\\/\\//.test(t)||t.startsWith(\"..\")?(s=\"xpath\",c=t):(s=\"css\",c=t);let a=!1;if(\"*\"===s[0]&&(a=!0,s=s.substring(1)),o.parts.push({name:s,body:c}),a){if(void 0!==o.capture)throw new Error(\"Only one of the selectors can capture using * modifier\");o.capture=o.parts.length-1}};if(!e.includes(\">>\"))return n=e.length,i(),o;for(;n<e.length;){const o=e[n];\"\\\\\"===o&&n+1<e.length?n+=2:o===t?(t=void 0,n++):t||'\"'!==o&&\"'\"!==o&&\"`\"!==o?t||\">\"!==o||\">\"!==e[n+1]?n++:(i(),n+=2,r=n):(t=o,n++)}return i(),o}(e),n=t.parts.map(e=>{if(\"css\"===e.name||\"css:light\"===e.name){\"css:light\"===e.name&&(e.body=\":light(\"+e.body+\")\");return{name:\"css\",body:(0,r.parseCSS)(e.body,o).selector}}return e});return{selector:e,capture:t.capture,parts:n}},t.customCSSNames=void 0;var r=n(2);const o=new Set([\"not\",\"is\",\"where\",\"has\",\"scope\",\"light\",\"visible\",\"text\",\"text-matches\",\"text-is\",\"has-text\",\"above\",\"below\",\"right-of\",\"left-of\",\"near\",\"nth-match\"]);t.customCSSNames=o},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.createLaxTextMatcher=d,t.createStrictTextMatcher=m,t.createRegexTextMatcher=g,t.elementText=w,t.elementMatchesText=v,t.parentElementOrShadowHost=C,t.isVisible=O,t.SelectorEvaluatorImpl=void 0;var r=n(0);t.SelectorEvaluatorImpl=class{constructor(e){this._engines=new Map,this._cacheQueryCSS=new Map,this._cacheMatches=new Map,this._cacheQuery=new Map,this._cacheMatchesSimple=new Map,this._cacheMatchesParents=new Map,this._cacheCallMatches=new Map,this._cacheCallQuery=new Map,this._cacheQuerySimple=new Map,this._cacheText=new Map,this._scoreMap=void 0,this._retainCacheCounter=0;for(const[t,n]of e)this._engines.set(t,n);this._engines.set(\"not\",c),this._engines.set(\"is\",o),this._engines.set(\"where\",o),this._engines.set(\"has\",i),this._engines.set(\"scope\",s),this._engines.set(\"light\",a),this._engines.set(\"visible\",u),this._engines.set(\"text\",l),this._engines.set(\"text-is\",p),this._engines.set(\"text-matches\",h),this._engines.set(\"has-text\",f),this._engines.set(\"right-of\",k(\"right-of\",b)),this._engines.set(\"left-of\",k(\"left-of\",E)),this._engines.set(\"above\",k(\"above\",_)),this._engines.set(\"below\",k(\"below\",S)),this._engines.set(\"near\",k(\"near\",T)),this._engines.set(\"nth-match\",N);const t=[...this._engines.keys()];t.sort();const n=[...r.customCSSNames];if(n.sort(),t.join(\"|\")!==n.join(\"|\"))throw new Error(`Please keep customCSSNames in sync with evaluator engines: ${t.join(\"|\")} vs ${n.join(\"|\")}`)}begin(){++this._retainCacheCounter}end(){--this._retainCacheCounter,this._retainCacheCounter||(this._cacheQueryCSS.clear(),this._cacheMatches.clear(),this._cacheQuery.clear(),this._cacheMatchesSimple.clear(),this._cacheMatchesParents.clear(),this._cacheCallMatches.clear(),this._cacheCallQuery.clear(),this._cacheQuerySimple.clear(),this._cacheText.clear())}_cached(e,t,n,r){e.has(t)||e.set(t,[]);const o=e.get(t),i=o.find(e=>n.every((t,n)=>e.rest[n]===t));if(i)return i.result;const s=r();return o.push({rest:n,result:s}),s}_checkSelector(e){if(!(\"object\"==typeof e&&e&&(Array.isArray(e)||\"simples\"in e&&e.simples.length)))throw new Error(`Malformed selector \"${e}\"`);return e}matches(e,t,n){const r=this._checkSelector(t);this.begin();try{return this._cached(this._cacheMatches,e,[r,n.scope,n.pierceShadow],()=>Array.isArray(r)?this._matchesEngine(o,e,r,n):!!this._matchesSimple(e,r.simples[r.simples.length-1].selector,n)&&this._matchesParents(e,r,r.simples.length-2,n))}finally{this.end()}}query(e,t){const n=this._checkSelector(t);this.begin();try{return this._cached(this._cacheQuery,n,[e.scope,e.pierceShadow],()=>{if(Array.isArray(n))return this._queryEngine(o,e,n);const t=this._scoreMap;this._scoreMap=new Map;let r=this._querySimple(e,n.simples[n.simples.length-1].selector);return r=r.filter(t=>this._matchesParents(t,n,n.simples.length-2,e)),this._scoreMap.size&&r.sort((e,t)=>{const n=this._scoreMap.get(e),r=this._scoreMap.get(t);return n===r?0:void 0===n?1:void 0===r?-1:n-r}),this._scoreMap=t,r})}finally{this.end()}}_markScore(e,t){this._scoreMap&&this._scoreMap.set(e,t)}_matchesSimple(e,t,n){return this._cached(this._cacheMatchesSimple,e,[t,n.scope,n.pierceShadow],()=>{if(!t.functions.some(e=>\"scope\"===e.name||\"is\"===e.name)&&e===n.scope)return!1;if(t.css&&!this._matchesCSS(e,t.css))return!1;for(const r of t.functions)if(!this._matchesEngine(this._getEngine(r.name),e,r.args,n))return!1;return!0})}_querySimple(e,t){return t.functions.length?this._cached(this._cacheQuerySimple,t,[e.scope,e.pierceShadow],()=>{let n=t.css;const r=t.functions;let o;\"*\"===n&&r.length&&(n=void 0);let i=-1;void 0!==n?o=this._queryCSS(e,n):(i=r.findIndex(e=>void 0!==this._getEngine(e.name).query),-1===i&&(i=0),o=this._queryEngine(this._getEngine(r[i].name),e,r[i].args));for(let t=0;t<r.length;t++){if(t===i)continue;const n=this._getEngine(r[t].name);void 0!==n.matches&&(o=o.filter(o=>this._matchesEngine(n,o,r[t].args,e)))}for(let t=0;t<r.length;t++){if(t===i)continue;const n=this._getEngine(r[t].name);void 0===n.matches&&(o=o.filter(o=>this._matchesEngine(n,o,r[t].args,e)))}return o}):this._queryCSS(e,t.css||\"*\")}_matchesParents(e,t,n,r){return n<0||this._cached(this._cacheMatchesParents,e,[t,n,r.scope,r.pierceShadow],()=>{const{selector:o,combinator:i}=t.simples[n];if(\">\"===i){const i=x(e,r);return!(!i||!this._matchesSimple(i,o,r))&&this._matchesParents(i,t,n-1,r)}if(\"+\"===i){const i=A(e,r);return!(!i||!this._matchesSimple(i,o,r))&&this._matchesParents(i,t,n-1,r)}if(\"\"===i){let i=x(e,r);for(;i;){if(this._matchesSimple(i,o,r)){if(this._matchesParents(i,t,n-1,r))return!0;if(\"\"===t.simples[n-1].combinator)break}i=x(i,r)}return!1}if(\"~\"===i){let i=A(e,r);for(;i;){if(this._matchesSimple(i,o,r)){if(this._matchesParents(i,t,n-1,r))return!0;if(\"~\"===t.simples[n-1].combinator)break}i=A(i,r)}return!1}if(\">=\"===i){let i=e;for(;i;){if(this._matchesSimple(i,o,r)){if(this._matchesParents(i,t,n-1,r))return!0;if(\"\"===t.simples[n-1].combinator)break}i=x(i,r)}return!1}throw new Error(`Unsupported combinator \"${i}\"`)})}_matchesEngine(e,t,n,r){if(e.matches)return this._callMatches(e,t,n,r);if(e.query)return this._callQuery(e,n,r).includes(t);throw new Error('Selector engine should implement \"matches\" or \"query\"')}_queryEngine(e,t,n){if(e.query)return this._callQuery(e,n,t);if(e.matches)return this._queryCSS(t,\"*\").filter(r=>this._callMatches(e,r,n,t));throw new Error('Selector engine should implement \"matches\" or \"query\"')}_callMatches(e,t,n,r){return this._cached(this._cacheCallMatches,t,[e,r.scope,r.pierceShadow,...n],()=>e.matches(t,n,r,this))}_callQuery(e,t,n){return this._cached(this._cacheCallQuery,e,[n.scope,n.pierceShadow,...t],()=>e.query(n,t,this))}_matchesCSS(e,t){return e.matches(t)}_queryCSS(e,t){return this._cached(this._cacheQueryCSS,t,[e.scope,e.pierceShadow],()=>{let n=[];return function r(o){if(n=n.concat([...o.querySelectorAll(t)]),e.pierceShadow){o.shadowRoot&&r(o.shadowRoot);for(const e of o.querySelectorAll(\"*\"))e.shadowRoot&&r(e.shadowRoot)}}(e.scope),n})}_getEngine(e){const t=this._engines.get(e);if(!t)throw new Error(`Unknown selector engine \"${e}\"`);return t}};const o={matches(e,t,n,r){if(0===t.length)throw new Error('\"is\" engine expects non-empty selector list');return t.some(t=>r.matches(e,t,n))},query(e,t,n){if(0===t.length)throw new Error('\"is\" engine expects non-empty selector list');let r=[];for(const o of t)r=r.concat(n.query(e,o));return 1===t.length?r:function(e){const t=new Map,n=[],r=[];return e.forEach(e=>(function e(r){let o=t.get(r);if(o)return o;const i=C(r);if(i){e(i).children.push(r)}else n.push(r);return o={children:[],taken:!1},t.set(r,o),o}(e)).taken=!0),n.forEach((function e(n){const o=t.get(n);o.taken&&r.push(n);if(o.children.length>1){const e=new Set(o.children);o.children=[];let t=n.firstElementChild;for(;t&&o.children.length<e.size;)e.has(t)&&o.children.push(t),t=t.nextElementSibling;for(t=n.shadowRoot?n.shadowRoot.firstElementChild:null;t&&o.children.length<e.size;)e.has(t)&&o.children.push(t),t=t.nextElementSibling}o.children.forEach(e)})),r}(r)}},i={matches(e,t,n,r){if(0===t.length)throw new Error('\"has\" engine expects non-empty selector list');return r.query({...n,scope:e},t).length>0}},s={matches(e,t,n,r){if(0!==t.length)throw new Error('\"scope\" engine expects no arguments');return 9===n.scope.nodeType?e===n.scope.documentElement:e===n.scope},query(e,t,n){if(0!==t.length)throw new Error('\"scope\" engine expects no arguments');if(9===e.scope.nodeType){const t=e.scope.documentElement;return t?[t]:[]}return 1===e.scope.nodeType?[e.scope]:[]}},c={matches(e,t,n,r){if(0===t.length)throw new Error('\"not\" engine expects non-empty selector list');return!r.matches(e,t,n)}},a={query:(e,t,n)=>n.query({...e,pierceShadow:!1},t),matches:(e,t,n,r)=>r.matches(e,t,{...n,pierceShadow:!1})},u={matches(e,t,n,r){if(t.length)throw new Error('\"visible\" engine expects no arguments');return O(e)}},l={matches(e,t,n,r){if(1!==t.length||\"string\"!=typeof t[0])throw new Error('\"text\" engine expects a single string');return\"self\"===v(r,e,d(t[0]))}},p={matches(e,t,n,r){if(1!==t.length||\"string\"!=typeof t[0])throw new Error('\"text-is\" engine expects a single string');return\"none\"!==v(r,e,m(t[0]))}},h={matches(e,t,n,r){if(0===t.length||\"string\"!=typeof t[0]||t.length>2||2===t.length&&\"string\"!=typeof t[1])throw new Error('\"text-matches\" engine expects a regexp body and optional regexp flags');return\"self\"===v(r,e,g(t[0],2===t.length?t[1]:void 0))}},f={matches(e,t,n,r){if(1!==t.length||\"string\"!=typeof t[0])throw new Error('\"has-text\" engine expects a single string');if(y(e))return!1;return d(t[0])(w(r,e))}};function d(e){return e=e.trim().replace(/\\s+/g,\" \").toLowerCase(),t=>t.full.trim().replace(/\\s+/g,\" \").toLowerCase().includes(e)}function m(e){return e=e.trim().replace(/\\s+/g,\" \"),t=>t.immediate.some(t=>t.trim().replace(/\\s+/g,\" \")===e)}function g(e,t){const n=new RegExp(e,t);return e=>n.test(e.full)}function y(e){return\"SCRIPT\"===e.nodeName||\"STYLE\"===e.nodeName||document.head&&document.head.contains(e)}function w(e,t){let n=e._cacheText.get(t);if(void 0===n){if(n={full:\"\",immediate:[]},!y(t)){let r=\"\";if(t instanceof HTMLInputElement&&(\"submit\"===t.type||\"button\"===t.type))n={full:t.value,immediate:[t.value]};else{for(let o=t.firstChild;o;o=o.nextSibling)o.nodeType===Node.TEXT_NODE?(n.full+=o.nodeValue||\"\",r+=o.nodeValue||\"\"):(r&&n.immediate.push(r),r=\"\",o.nodeType===Node.ELEMENT_NODE&&(n.full+=w(e,o).full));r&&n.immediate.push(r),t.shadowRoot&&(n.full+=w(e,t.shadowRoot).full)}}e._cacheText.set(t,n)}return n}function v(e,t,n){if(y(t))return\"none\";if(!n(w(e,t)))return\"none\";for(let r=t.firstChild;r;r=r.nextSibling)if(r.nodeType===Node.ELEMENT_NODE&&n(w(e,r)))return\"selfAndChildren\";return t.shadowRoot&&n(w(e,t.shadowRoot))?\"selfAndChildren\":\"self\"}function b(e,t,n){const r=e.left-t.right;if(!(r<0||void 0!==n&&r>n))return r+Math.max(t.bottom-e.bottom,0)+Math.max(e.top-t.top,0)}function E(e,t,n){const r=t.left-e.right;if(!(r<0||void 0!==n&&r>n))return r+Math.max(t.bottom-e.bottom,0)+Math.max(e.top-t.top,0)}function _(e,t,n){const r=t.top-e.bottom;if(!(r<0||void 0!==n&&r>n))return r+Math.max(e.left-t.left,0)+Math.max(t.right-e.right,0)}function S(e,t,n){const r=e.top-t.bottom;if(!(r<0||void 0!==n&&r>n))return r+Math.max(e.left-t.left,0)+Math.max(t.right-e.right,0)}function T(e,t,n){const r=void 0===n?50:n;let o=0;return e.left-t.right>=0&&(o+=e.left-t.right),t.left-e.right>=0&&(o+=t.left-e.right),t.top-e.bottom>=0&&(o+=t.top-e.bottom),e.top-t.bottom>=0&&(o+=e.top-t.bottom),o>r?void 0:o}function k(e,t){return{matches(n,r,o,i){const s=r.length&&\"number\"==typeof r[r.length-1]?r[r.length-1]:void 0,c=void 0===s?r:r.slice(0,r.length-1);if(r.length<1+(void 0===s?0:1))throw new Error(`\"${e}\" engine expects a selector list and optional maximum distance in pixels`);const a=n.getBoundingClientRect();let u;for(const e of i.query(o,c)){if(e===n)continue;const r=t(a,e.getBoundingClientRect(),s);void 0!==r&&((void 0===u||r<u)&&(u=r))}return void 0!==u&&(i._markScore(n,u),!0)}}}const N={query(e,t,n){let r=t[t.length-1];if(t.length<2)throw new Error('\"nth-match\" engine expects non-empty selector list and an index argument');if(\"number\"!=typeof r||r<1)throw new Error('\"nth-match\" engine expects a one-based index as the last argument');const i=o.query(e,t.slice(0,t.length-1),n);return r--,r<i.length?[i[r]]:[]}};function C(e){return e.parentElement?e.parentElement:e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.parentNode.host?e.parentNode.host:void 0}function x(e,t){if(e!==t.scope)return t.pierceShadow?C(e):e.parentElement||void 0}function A(e,t){if(e!==t.scope)return e.previousElementSibling||void 0}function O(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return!0;const t=e.ownerDocument.defaultView.getComputedStyle(e);if(!t||\"hidden\"===t.visibility)return!1;const n=e.getBoundingClientRect();return n.width>0&&n.height>0}},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.parseCSS=function(e,t){let n;try{n=r.tokenize(e),n[n.length-1]instanceof r.EOFToken||n.push(new r.EOFToken)}catch(t){const n=t.message+` while parsing selector \"${e}\"`,r=(t.stack||\"\").indexOf(t.message);throw-1!==r&&(t.stack=t.stack.substring(0,r)+n+t.stack.substring(r+t.message.length)),t.message=n,t}const o=n.find(e=>e instanceof r.AtKeywordToken||e instanceof r.BadStringToken||e instanceof r.BadURLToken||e instanceof r.ColumnToken||e instanceof r.CDOToken||e instanceof r.CDCToken||e instanceof r.SemicolonToken||e instanceof r.OpenCurlyToken||e instanceof r.CloseCurlyToken||e instanceof r.URLToken||e instanceof r.PercentageToken);if(o)throw new Error(`Unsupported token \"${o.toSource()}\" while parsing selector \"${e}\"`);let i=0;const s=new Set;function c(){return new Error(`Unexpected token \"${n[i].toSource()}\" while parsing selector \"${e}\"`)}function a(){for(;n[i]instanceof r.WhitespaceToken;)i++}function u(e=i){return n[e]instanceof r.IdentToken}function l(e=i){return n[e]instanceof r.CommaToken}function p(e=i){return n[e]instanceof r.CloseParenToken}function h(e=i){return n[e]instanceof r.DelimToken&&\"*\"===n[e].value}function f(e=i){return n[e]instanceof r.EOFToken}function d(e=i){return n[e]instanceof r.DelimToken&&[\">\",\"+\",\"~\"].includes(n[e].value)}function m(e=i){return l(e)||p(e)||f(e)||d(e)||n[e]instanceof r.WhitespaceToken}function g(){const e=[y()];for(;a(),l();)i++,e.push(y());return e}function y(){return a(),function(e=i){return n[e]instanceof r.NumberToken}()||function(e=i){return n[e]instanceof r.StringToken}()?n[i++].value:function(){a();const e={simples:[{selector:w(),combinator:\"\"}]};for(;;){if(a(),d())e.simples[e.simples.length-1].combinator=n[i++].value,a();else if(m())break;e.simples.push({combinator:\"\",selector:w()})}return e}()}function w(){let e=\"\";const o=[];for(;!m();)if(u()||h())e+=n[i++].toSource();else if(n[i]instanceof r.HashToken)e+=n[i++].toSource();else if(n[i]instanceof r.DelimToken&&\".\"===n[i].value){if(i++,!u())throw c();e+=\".\"+n[i++].toSource()}else if(n[i]instanceof r.ColonToken)if(i++,u())if(t.has(n[i].value.toLowerCase())){const e=n[i++].value.toLowerCase();o.push({name:e,args:[]}),s.add(e)}else e+=\":\"+n[i++].toSource();else{if(!(n[i]instanceof r.FunctionToken))throw c();{const r=n[i++].value.toLowerCase();if(t.has(r)?(o.push({name:r,args:g()}),s.add(r)):e+=`:${r}(${v()})`,a(),!p())throw c();i++}}else{if(!(n[i]instanceof r.OpenSquareToken))throw c();for(e+=\"[\",i++;!(n[i]instanceof r.CloseSquareToken||f());)e+=n[i++].toSource();if(!(n[i]instanceof r.CloseSquareToken))throw c();e+=\"]\",i++}if(!e&&!o.length)throw c();return{css:e||void 0,functions:o}}function v(){let e=\"\";for(;!p()&&!f();)e+=n[i++].toSource();return e}const b=g();if(!f())throw new Error(`Error while parsing selector \"${e}\"`);if(b.some(e=>\"object\"!=typeof e||!(\"simples\"in e)))throw new Error(`Error while parsing selector \"${e}\"`);return{selector:b,names:Array.from(s)}},t.serializeSelector=function e(t){return t.map(t=>\"string\"==typeof t?`\"${t}\"`:\"number\"==typeof t?String(t):t.simples.map(({selector:t,combinator:n})=>{let r=t.css||\"\";return r+=t.functions.map(t=>`:${t.name}(${e(t.args)})`).join(\"\"),n&&(r+=\" \"+n),r}).join(\" \")).join(\", \")};var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!=typeof e&&\"function\"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(\"default\"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var c=i?Object.getOwnPropertyDescriptor(e,s):null;c&&(c.get||c.set)?Object.defineProperty(r,s,c):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(3));function o(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}},function(e,t,n){\"use strict\";var r,o,i;o=[t],void 0===(i=\"function\"==typeof(r=function(e){var t=function(e,t,n){return e>=t&&e<=n};function n(e){return t(e,48,57)}function r(e){return n(e)||t(e,65,70)||t(e,97,102)}function o(e){return function(e){return t(e,65,90)}(e)||function(e){return t(e,97,122)}(e)}function i(e){return o(e)||function(e){return e>=128}(e)||95==e}function s(e){return i(e)||n(e)||45==e}function c(e){return t(e,0,8)||11==e||t(e,14,31)||127==e}function a(e){return 10==e}function u(e){return a(e)||9==e||32==e}var l=function(e){this.message=e};function p(e){if(e<=65535)return String.fromCharCode(e);e-=Math.pow(2,16);var t=Math.floor(e/Math.pow(2,10))+55296,n=e%Math.pow(2,10)+56320;return String.fromCharCode(t)+String.fromCharCode(n)}function h(){throw\"Abstract Base Class\"}function f(){return this}function d(){return this}function m(){return this}function g(){return this}function y(){return this}function w(){return this}function v(){return this}function b(){return this}function E(){throw\"Abstract Base Class\"}function _(){return this.value=\"{\",this.mirror=\"}\",this}function S(){return this.value=\"}\",this.mirror=\"{\",this}function T(){return this.value=\"[\",this.mirror=\"]\",this}function k(){return this.value=\"]\",this.mirror=\"[\",this}function N(){return this.value=\"(\",this.mirror=\")\",this}function C(){return this.value=\")\",this.mirror=\"(\",this}function x(){return this}function A(){return this}function O(){return this}function M(){return this}function $(){return this}function R(){return this}function j(){return this}function P(e){return this.value=p(e),this}function L(){throw\"Abstract Base Class\"}function q(e){this.value=e}function D(e){this.value=e,this.mirror=\")\"}function I(e){this.value=e}function U(e){this.value=e,this.type=\"unrestricted\"}function W(e){this.value=e}function F(e){this.value=e}function B(){this.value=null,this.type=\"integer\",this.repr=\"\"}function V(){this.value=null,this.repr=\"\"}function H(){this.value=null,this.type=\"integer\",this.repr=\"\",this.unit=\"\"}function J(e){for(var n=\"\",r=(e=\"\"+e).charCodeAt(0),o=0;o<e.length;o++){var i=e.charCodeAt(o);if(0==i)throw new l(\"Invalid character: the input contains U+0000.\");t(i,1,31)||127==i||0==o&&t(i,48,57)||1==o&&t(i,48,57)&&45==r?n+=\"\\\\\"+i.toString(16)+\" \":i>=128||45==i||95==i||t(i,48,57)||t(i,65,90)||t(i,97,122)?n+=e[o]:n+=\"\\\\\"+e[o]}return n}function Q(e){e=\"\"+e;for(var n=\"\",r=0;r<e.length;r++){var o=e.charCodeAt(r);if(0==o)throw new l(\"Invalid character: the input contains U+0000.\");t(o,1,31)||127==o?n+=\"\\\\\"+o.toString(16)+\" \":n+=34==o||92==o?\"\\\\\"+e[r]:e[r]}return n}(l.prototype=new Error).name=\"InvalidCharacterError\",h.prototype.toJSON=function(){return{token:this.tokenType}},h.prototype.toString=function(){return this.tokenType},h.prototype.toSource=function(){return\"\"+this},f.prototype=Object.create(h.prototype),f.prototype.tokenType=\"BADSTRING\",d.prototype=Object.create(h.prototype),d.prototype.tokenType=\"BADURL\",m.prototype=Object.create(h.prototype),m.prototype.tokenType=\"WHITESPACE\",m.prototype.toString=function(){return\"WS\"},m.prototype.toSource=function(){return\" \"},g.prototype=Object.create(h.prototype),g.prototype.tokenType=\"CDO\",g.prototype.toSource=function(){return\"\\x3c!--\"},y.prototype=Object.create(h.prototype),y.prototype.tokenType=\"CDC\",y.prototype.toSource=function(){return\"--\\x3e\"},w.prototype=Object.create(h.prototype),w.prototype.tokenType=\":\",v.prototype=Object.create(h.prototype),v.prototype.tokenType=\";\",b.prototype=Object.create(h.prototype),b.prototype.tokenType=\",\",E.prototype=Object.create(h.prototype),_.prototype=Object.create(E.prototype),_.prototype.tokenType=\"{\",S.prototype=Object.create(E.prototype),S.prototype.tokenType=\"}\",T.prototype=Object.create(E.prototype),T.prototype.tokenType=\"[\",k.prototype=Object.create(E.prototype),k.prototype.tokenType=\"]\",N.prototype=Object.create(E.prototype),N.prototype.tokenType=\"(\",C.prototype=Object.create(E.prototype),C.prototype.tokenType=\")\",x.prototype=Object.create(h.prototype),x.prototype.tokenType=\"~=\",A.prototype=Object.create(h.prototype),A.prototype.tokenType=\"|=\",O.prototype=Object.create(h.prototype),O.prototype.tokenType=\"^=\",M.prototype=Object.create(h.prototype),M.prototype.tokenType=\"$=\",$.prototype=Object.create(h.prototype),$.prototype.tokenType=\"*=\",R.prototype=Object.create(h.prototype),R.prototype.tokenType=\"||\",j.prototype=Object.create(h.prototype),j.prototype.tokenType=\"EOF\",j.prototype.toSource=function(){return\"\"},P.prototype=Object.create(h.prototype),P.prototype.tokenType=\"DELIM\",P.prototype.toString=function(){return\"DELIM(\"+this.value+\")\"},P.prototype.toJSON=function(){var e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e},P.prototype.toSource=function(){return\"\\\\\"==this.value?\"\\\\\\n\":this.value},L.prototype=Object.create(h.prototype),L.prototype.ASCIIMatch=function(e){return this.value.toLowerCase()==e.toLowerCase()},L.prototype.toJSON=function(){var e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e},q.prototype=Object.create(L.prototype),q.prototype.tokenType=\"IDENT\",q.prototype.toString=function(){return\"IDENT(\"+this.value+\")\"},q.prototype.toSource=function(){return J(this.value)},D.prototype=Object.create(L.prototype),D.prototype.tokenType=\"FUNCTION\",D.prototype.toString=function(){return\"FUNCTION(\"+this.value+\")\"},D.prototype.toSource=function(){return J(this.value)+\"(\"},I.prototype=Object.create(L.prototype),I.prototype.tokenType=\"AT-KEYWORD\",I.prototype.toString=function(){return\"AT(\"+this.value+\")\"},I.prototype.toSource=function(){return\"@\"+J(this.value)},U.prototype=Object.create(L.prototype),U.prototype.tokenType=\"HASH\",U.prototype.toString=function(){return\"HASH(\"+this.value+\")\"},U.prototype.toJSON=function(){var e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e},U.prototype.toSource=function(){return\"id\"==this.type?\"#\"+J(this.value):\"#\"+function(e){for(var n=\"\",r=((e=\"\"+e).charCodeAt(0),0);r<e.length;r++){var o=e.charCodeAt(r);if(0==o)throw new l(\"Invalid character: the input contains U+0000.\");o>=128||45==o||95==o||t(o,48,57)||t(o,65,90)||t(o,97,122)?n+=e[r]:n+=\"\\\\\"+o.toString(16)+\" \"}return n}(this.value)},W.prototype=Object.create(L.prototype),W.prototype.tokenType=\"STRING\",W.prototype.toString=function(){return'\"'+Q(this.value)+'\"'},F.prototype=Object.create(L.prototype),F.prototype.tokenType=\"URL\",F.prototype.toString=function(){return\"URL(\"+this.value+\")\"},F.prototype.toSource=function(){return'url(\"'+Q(this.value)+'\")'},B.prototype=Object.create(h.prototype),B.prototype.tokenType=\"NUMBER\",B.prototype.toString=function(){return\"integer\"==this.type?\"INT(\"+this.value+\")\":\"NUMBER(\"+this.value+\")\"},B.prototype.toJSON=function(){var e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e.repr=this.repr,e},B.prototype.toSource=function(){return this.repr},V.prototype=Object.create(h.prototype),V.prototype.tokenType=\"PERCENTAGE\",V.prototype.toString=function(){return\"PERCENTAGE(\"+this.value+\")\"},V.prototype.toJSON=function(){var e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.repr=this.repr,e},V.prototype.toSource=function(){return this.repr+\"%\"},H.prototype=Object.create(h.prototype),H.prototype.tokenType=\"DIMENSION\",H.prototype.toString=function(){return\"DIM(\"+this.value+\",\"+this.unit+\")\"},H.prototype.toJSON=function(){var e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e.repr=this.repr,e.unit=this.unit,e},H.prototype.toSource=function(){var e=this.repr,n=J(this.unit);return\"e\"!=n[0].toLowerCase()||\"-\"!=n[1]&&!t(n.charCodeAt(1),48,57)||(n=\"\\\\65 \"+n.slice(1,n.length)),e+n},e.tokenize=function(e){e=function(e){for(var n=[],r=0;r<e.length;r++){var o=e.charCodeAt(r);if(13==o&&10==e.charCodeAt(r+1)&&(o=10,r++),13!=o&&12!=o||(o=10),0==o&&(o=65533),t(o,55296,56319)&&t(e.charCodeAt(r+1),56320,57343)){var i=o-55296,s=e.charCodeAt(r+1)-56320;o=Math.pow(2,16)+i*Math.pow(2,10)+s,r++}n.push(o)}return n}(e);for(var o,l=-1,h=[],E=0,L=0,J=0,Q={line:E,column:L},z=function(t){return t>=e.length?-1:e[t]},X=function(e){if(void 0===e&&(e=1),e>3)throw\"Spec Error: no more than three codepoints of lookahead.\";return z(l+e)},G=function(e){return void 0===e&&(e=1),a(o=z(l+=e))?(E+=1,J=L,L=0):L+=e,!0},K=function(){return l-=1,a(o)?(E-=1,L=J):L-=1,Q.line=E,Q.column=L,!0},Z=function(e){return void 0===e&&(e=o),-1==e},Y=function(){return console.log(\"Parse error at index \"+l+\", processing codepoint 0x\"+o.toString(16)+\".\"),!0},ee=function(){if(te(),G(),u(o)){for(;u(X());)G();return new m}if(34==o)return oe();if(35==o){if(s(X())||ce(X(1),X(2))){var e=new U;return ue(X(1),X(2),X(3))&&(e.type=\"id\"),e.value=he(),e}return new P(o)}return 36==o?61==X()?(G(),new M):new P(o):39==o?oe():40==o?new N:41==o?new C:42==o?61==X()?(G(),new $):new P(o):43==o?pe()?(K(),ne()):new P(o):44==o?new b:45==o?pe()?(K(),ne()):45==X(1)&&62==X(2)?(G(2),new y):le()?(K(),re()):new P(o):46==o?pe()?(K(),ne()):new P(o):58==o?new w:59==o?new v:60==o?33==X(1)&&45==X(2)&&45==X(3)?(G(3),new g):new P(o):64==o?ue(X(1),X(2),X(3))?new I(he()):new P(o):91==o?new T:92==o?ae()?(K(),re()):(Y(),new P(o)):93==o?new k:94==o?61==X()?(G(),new O):new P(o):123==o?new _:124==o?61==X()?(G(),new A):124==X()?(G(),new R):new P(o):125==o?new S:126==o?61==X()?(G(),new x):new P(o):n(o)?(K(),ne()):i(o)?(K(),re()):Z()?new j:new P(o)},te=function(){for(;47==X(1)&&42==X(2);)for(G(2);;){if(G(),42==o&&47==X()){G();break}if(Z())return void Y()}},ne=function(){var e,t=fe();return ue(X(1),X(2),X(3))?((e=new H).value=t.value,e.repr=t.repr,e.type=t.type,e.unit=he(),e):37==X()?(G(),(e=new V).value=t.value,e.repr=t.repr,e):((e=new B).value=t.value,e.repr=t.repr,e.type=t.type,e)},re=function(){var e=he();if(\"url\"==e.toLowerCase()&&40==X()){for(G();u(X(1))&&u(X(2));)G();return 34==X()||39==X()?new D(e):!u(X())||34!=X(2)&&39!=X(2)?ie():new D(e)}return 40==X()?(G(),new D(e)):new q(e)},oe=function(e){void 0===e&&(e=o);for(var t=\"\";G();){if(o==e||Z())return new W(t);if(a(o))return Y(),K(),new f;92==o?Z(X())||(a(X())?G():t+=p(se())):t+=p(o)}},ie=function(){for(var e=new F(\"\");u(X());)G();if(Z(X()))return e;for(;G();){if(41==o||Z())return e;if(u(o)){for(;u(X());)G();return 41==X()||Z(X())?(G(),e):(me(),new d)}if(34==o||39==o||40==o||c(o))return Y(),me(),new d;if(92==o){if(!ae())return Y(),me(),new d;e.value+=p(se())}else e.value+=p(o)}},se=function(){if(G(),r(o)){for(var e=[o],t=0;t<5&&r(X());t++)G(),e.push(o);u(X())&&G();var n=parseInt(e.map((function(e){return String.fromCharCode(e)})).join(\"\"),16);return n>1114111&&(n=65533),n}return Z()?65533:o},ce=function(e,t){return 92==e&&!a(t)},ae=function(){return ce(o,X())},ue=function(e,t,n){return 45==e?i(t)||45==t||ce(t,n):!!i(e)||92==e&&ce(e,t)},le=function(){return ue(o,X(1),X(2))},pe=function(){return e=o,t=X(1),r=X(2),43==e||45==e?!!n(t)||!(46!=t||!n(r)):46==e?!!n(t):!!n(e);var e,t,r},he=function(){for(var e=\"\";G();)if(s(o))e+=p(o);else{if(!ae())return K(),e;e+=p(se())}},fe=function(){var e=[],t=\"integer\";for(43!=X()&&45!=X()||(G(),e+=p(o));n(X());)G(),e+=p(o);if(46==X(1)&&n(X(2)))for(G(),e+=p(o),G(),e+=p(o),t=\"number\";n(X());)G(),e+=p(o);var r=X(1),i=X(2),s=X(3);if(69!=r&&101!=r||!n(i)){if((69==r||101==r)&&(43==i||45==i)&&n(s))for(G(),e+=p(o),G(),e+=p(o),G(),e+=p(o),t=\"number\";n(X());)G(),e+=p(o)}else for(G(),e+=p(o),G(),e+=p(o),t=\"number\";n(X());)G(),e+=p(o);return{type:t,value:de(e),repr:e}},de=function(e){return+e},me=function(){for(;G();){if(41==o||Z())return;ae()&&se()}},ge=0;!Z(X());)if(h.push(ee()),++ge>2*e.length)return\"I'm infinite-looping!\";return h},e.IdentToken=q,e.FunctionToken=D,e.AtKeywordToken=I,e.HashToken=U,e.StringToken=W,e.BadStringToken=f,e.URLToken=F,e.BadURLToken=d,e.DelimToken=P,e.NumberToken=B,e.PercentageToken=V,e.DimensionToken=H,e.IncludeMatchToken=x,e.DashMatchToken=A,e.PrefixMatchToken=O,e.SuffixMatchToken=M,e.SubstringMatchToken=$,e.ColumnToken=R,e.WhitespaceToken=m,e.CDOToken=g,e.CDCToken=y,e.ColonToken=w,e.SemicolonToken=v,e.CommaToken=b,e.OpenParenToken=N,e.CloseParenToken=C,e.OpenSquareToken=T,e.CloseSquareToken=k,e.OpenCurlyToken=_,e.CloseCurlyToken=S,e.EOFToken=j,e.CSSParserToken=h,e.GroupingToken=E})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.querySelector=function(e,t,n){try{const r=e.parseSelector(t);return{selector:t,elements:e.querySelectorAll(r,n)}}catch(e){return{selector:t,elements:[]}}},t.generateSelector=function(e,t){e._evaluator.begin();try{t=t.closest(\"button,select,input,[role=button],[role=checkbox],[role=radio]\")||t;const n=function(e,t){if(t.ownerDocument.documentElement===t)return[{engine:\"css\",selector:\"html\",score:1}];const n=(n,o)=>{const i=n===t;let p=o?function(e,t,n){if(\"SELECT\"===t.nodeName)return[];const o=(0,r.elementText)(e._evaluator,t).full.trim().replace(/\\s+/g,\" \").substring(0,80);if(!o)return[];const i=[];let s=o;(o.includes('\"')||o.includes(\">>\")||\"/\"===o[0])&&(s=`/.*${function(e){return e.replace(/[.*+?^>${}()|[\\]\\\\]/g,\"\\\\$&\")}(o)}.*/`);if(i.push({engine:\"text\",selector:s,score:10}),n&&s===o){let e=t.nodeName.toLocaleLowerCase();t.hasAttribute(\"role\")&&(e+=`[role=${l(t.getAttribute(\"role\"))}]`),i.push({engine:\"css\",selector:`${e}:has-text(\"${o}\")`,score:30})}return i}(e,n,n===t).map(e=>[e]):[];n!==t&&(p=s(p));const d=function(e,t){const n=[];for(const e of[\"data-testid\",\"data-test-id\",\"data-test\"])t.hasAttribute(e)&&n.push({engine:\"css\",selector:`[${e}=${l(t.getAttribute(e))}]`,score:1});if(\"INPUT\"===t.nodeName){const e=t;e.placeholder&&n.push({engine:\"css\",selector:`[placeholder=${l(e.placeholder)}]`,score:10})}t.hasAttribute(\"aria-label\")&&n.push({engine:\"css\",selector:`[aria-label=${l(t.getAttribute(\"aria-label\"))}]`,score:10});t.getAttribute(\"alt\")&&[\"APPLET\",\"AREA\",\"IMG\",\"INPUT\"].includes(t.nodeName)&&n.push({engine:\"css\",selector:`${t.nodeName.toLowerCase()}[alt=${l(t.getAttribute(\"alt\"))}]`,score:10});t.hasAttribute(\"role\")&&n.push({engine:\"css\",selector:`${t.nodeName.toLocaleLowerCase()}[role=${l(t.getAttribute(\"role\"))}]`,score:50});t.getAttribute(\"name\")&&[\"BUTTON\",\"FORM\",\"FIELDSET\",\"IFRAME\",\"INPUT\",\"KEYGEN\",\"OBJECT\",\"OUTPUT\",\"SELECT\",\"TEXTAREA\",\"MAP\",\"META\",\"PARAM\"].includes(t.nodeName)&&n.push({engine:\"css\",selector:`${t.nodeName.toLowerCase()}[name=${l(t.getAttribute(\"name\"))}]`,score:50});[\"INPUT\",\"TEXTAREA\"].includes(t.nodeName)&&\"hidden\"!==t.getAttribute(\"type\")&&t.getAttribute(\"type\")&&n.push({engine:\"css\",selector:`${t.nodeName.toLowerCase()}[type=${l(t.getAttribute(\"type\"))}]`,score:50});[\"INPUT\",\"TEXTAREA\",\"SELECT\"].includes(t.nodeName)&&n.push({engine:\"css\",selector:t.nodeName.toLowerCase(),score:50});const r=t.getAttribute(\"id\");r&&!function(e){let t,n=0;for(let r=0;r<e.length;++r){const o=e[r];let i;\"-\"!==o&&\"_\"!==o&&(i=o>=\"a\"&&o<=\"z\"?\"lower\":o>=\"A\"&&o<=\"Z\"?\"upper\":o>=\"0\"&&o<=\"9\"?\"digit\":\"other\",\"lower\"!==i||\"upper\"!==t?(t&&t!==i&&++n,t=i):t=i)}return n>=e.length/4}(r)&&n.push({engine:\"css\",selector:a(r),score:100});return n.push({engine:\"css\",selector:t.nodeName.toLocaleLowerCase(),score:200}),n}(0,n).map(e=>[e]);let m=f(e,t.ownerDocument,n,[...p,...d],i);p=s(p);const g=t=>{const r=o&&!t.length,s=[...t,...d].filter(e=>!m||h(e)<h(m));let a=s[0];if(a)for(let t=c(n);t;t=c(t)){const o=u(t,r);if(!o)continue;if(m&&h([...o,...a])>=h(m))continue;if(a=f(e,t,n,s,i),!a)return;const c=[...o,...a];(!m||h(c)<h(m))&&(m=c)}};return g(p),n===t&&p.length&&g([]),m},u=(e,t)=>{const r=t?o:i;let s=r.get(e);return void 0===s&&(s=n(e,t),r.set(e,s)),s};return u(t,!0)}(e,t),d=p(n||[u(e,t)]),m=e.parseSelector(d);return{selector:d,elements:e.querySelectorAll(m,t.ownerDocument)}}finally{o.clear(),i.clear(),e._evaluator.end()}};var r=n(1);const o=new Map,i=new Map;function s(e){return e.filter(e=>\"/\"!==e[0].selector[0])}function c(e){return e.parentElement?e.parentElement:e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.parentNode.host?e.parentNode.host:null}function a(e){return/^[a-zA-Z][a-zA-Z0-9\\-\\_]+$/.test(e)?\"#\"+e:`[id=\"${e}\"]`}function u(e,t){const n=t.ownerDocument,r=[];function o(n){const o=r.slice();n&&o.unshift(n);const i=o.join(\" \"),s=e.parseSelector(i);return e.querySelector(s,t.ownerDocument,!1)===t?i:void 0}for(let e=t;e&&e!==n;e=c(e)){const t=e.nodeName.toLowerCase();let n=\"\";if(e.id){const t=a(e.id),r=o(t);if(r)return{engine:\"css\",selector:r,score:1e7};n=t}const i=e.parentNode,s=[...e.classList];for(let e=0;e<s.length;++e){const t=\".\"+s.slice(0,e+1).join(\".\"),r=o(t);if(r)return{engine:\"css\",selector:r,score:1e7};if(!n&&i){1===i.querySelectorAll(t).length&&(n=t)}}if(i){const r=[...i.children],s=0===r.filter(e=>e.nodeName.toLowerCase()===t).indexOf(e)?t:`${t}:nth-child(${1+r.indexOf(e)})`,c=o(s);if(c)return{engine:\"css\",selector:c,score:1e7};n||(n=s)}else n||(n=t);r.unshift(n)}return{engine:\"css\",selector:o(),score:1e7}}function l(e){return`\"${e.replace(/\"/g,'\\\\\"').replace(/\\n/g,\"\\\\n\")}\"`}function p(e){const t=[];let n=\"\";for(const{engine:r,selector:o}of e)t.length&&(\"css\"!==n||\"css\"!==r||o.startsWith(\":nth-match(\"))&&t.push(\">>\"),n=r,\"css\"===r?t.push(o):t.push(`${r}=${o}`);return t.join(\" \")}function h(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n].score*(e.length-n);return t}function f(e,t,n,r,o){const i=r.map(e=>({tokens:e,score:h(e)}));i.sort((e,t)=>e.score-t.score);let s=null;for(const{tokens:r}of i){const i=e.parseSelector(p(r)),c=e.querySelectorAll(i,t),a=c.indexOf(n);if(0===a)return r;if(!o||s||-1===a||c.length>5)continue;const u=r.map(e=>\"text\"!==e.engine?e:e.selector.startsWith(\"/\")&&e.selector.endsWith(\"/\")?{engine:\"css\",selector:`:text-matches(\"${e.selector.substring(1,e.selector.length-1)}\")`,score:e.score}:{engine:\"css\",selector:`:text(\"${e.selector}\")`,score:e.score});s=[{engine:\"css\",selector:`:nth-match(${p(u)}, ${a+1})`,score:h(u)+1e3}]}return s}},function(e,t){var n;n=function(){return this}();try{n=n||new Function(\"return this\")()}catch(e){\"object\"==typeof window&&(n=window)}e.exports=n},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.checkComponentAttribute=function(e,t){for(const n of t.jsonPath)null!=e&&(e=e[n]);const n=\"string\"!=typeof e||t.caseSensetive?e:e.toUpperCase(),r=\"string\"!=typeof t.value||t.caseSensetive?t.value:t.value.toUpperCase();return\"<truthy>\"===t.op?!!n:\"=\"===t.op?n===r:\"string\"==typeof n&&\"string\"==typeof r&&(\"*=\"===t.op?n.includes(r):\"^=\"===t.op?n.startsWith(r):\"$=\"===t.op?n.endsWith(r):\"|=\"===t.op?n===r||n.startsWith(r+\"-\"):\"~=\"===t.op&&n.split(\" \").includes(r))},t.parseComponentSelector=function(e){let t=0,n=0===e.length;const r=()=>e[t]||\"\",o=()=>{const o=r();return++t,n=t>=e.length,o},i=o=>{if(n)throw new Error(`Unexpected end of selector while parsing selector \\`${e}\\``);throw new Error(`Error while parsing selector \\`${e}\\` - unexpected symbol \"${r()}\" at position ${t}`+(o?\" during \"+o:\"\"))};function s(){for(;!n&&/\\s/.test(r());)o()}function c(){let e=\"\";for(s();!n&&/[-$0-9A-Z_]/i.test(r());)e+=o();return e}function a(e){let t=o();for(t!==e&&i(\"parsing quoted string\");!n&&r()!==e;)\"\\\\\"===r()&&o(),t+=o();return r()!==e&&i(\"parsing quoted string\"),t+=o(),t}function u(){let e=\"\";return s(),e=\"'\"===r()||'\"'===r()?a(r()).slice(1,-1):c(),e||i(\"parsing property path\"),e}function l(){o();const t=[];for(t.push(u()),s();\".\"===r();)o(),t.push(u()),s();if(\"]\"===r())return o(),{jsonPath:t,op:\"<truthy>\",value:null,caseSensetive:!1};const c=function(){s();let e=\"\";return n||(e+=o()),n||\"=\"===e||(e+=o()),[\"=\",\"*=\",\"^=\",\"$=\",\"|=\",\"~=\"].includes(e)||i(\"parsing operator\"),e}();let l=void 0,p=!0;if(s(),\"'\"===r()||'\"'===r())l=a(r()).slice(1,-1),s(),\"i\"===r()||\"I\"===r()?(p=!1,o()):\"s\"!==r()&&\"S\"!==r()||(p=!0,o());else{for(l=\"\";!n&&!/\\s/.test(r())&&\"]\"!==r();)l+=o();\"true\"===l?l=!0:\"false\"===l?l=!1:(l=+l,isNaN(l)&&i(\"parsing attribute value\"))}if(s(),\"]\"!==r()&&i(\"parsing attribute value\"),o(),\"=\"!==c&&\"string\"!=typeof l)throw new Error(`Error while parsing selector \\`${e}\\` - cannot use ${c} in attribute with non-string matching value - ${l}`);return{jsonPath:t,op:c,value:l,caseSensetive:p}}const p={name:\"\",attributes:[]};p.name=c(),s();for(;\"[\"===r();)p.attributes.push(l()),s();n||i(void 0);if(!p.name&&!p.attributes.length)throw new Error(`Error while parsing selector \\`${e}\\` - selector cannot be empty`);return p}},,,function(e,t,n){\"use strict\";(function(e){Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=t.InjectedScript=void 0;var r=n(10),o=n(11),i=n(12),s=n(0),c=n(1),a=n(4);class u{constructor(e,t,n){this._engines=void 0,this._evaluator=void 0,this._stableRafCount=void 0,this._replaceRafWithTimeout=void 0,this._evaluator=new c.SelectorEvaluatorImpl(new Map),this._engines=new Map,this._engines.set(\"xpath\",r.XPathEngine),this._engines.set(\"xpath:light\",r.XPathEngine),this._engines.set(\"_react\",o.ReactEngine),this._engines.set(\"_vue\",i.VueEngine),this._engines.set(\"text\",this._createTextEngine(!0)),this._engines.set(\"text:light\",this._createTextEngine(!1)),this._engines.set(\"id\",this._createAttributeEngine(\"id\",!0)),this._engines.set(\"id:light\",this._createAttributeEngine(\"id\",!1)),this._engines.set(\"data-testid\",this._createAttributeEngine(\"data-testid\",!0)),this._engines.set(\"data-testid:light\",this._createAttributeEngine(\"data-testid\",!1)),this._engines.set(\"data-test-id\",this._createAttributeEngine(\"data-test-id\",!0)),this._engines.set(\"data-test-id:light\",this._createAttributeEngine(\"data-test-id\",!1)),this._engines.set(\"data-test\",this._createAttributeEngine(\"data-test\",!0)),this._engines.set(\"data-test:light\",this._createAttributeEngine(\"data-test\",!1)),this._engines.set(\"css\",this._createCSSEngine()),this._engines.set(\"nth\",{queryAll:()=>[]}),this._engines.set(\"visible\",{queryAll:()=>[]});for(const{name:e,engine:t}of n)this._engines.set(e,t);this._stableRafCount=e,this._replaceRafWithTimeout=t}parseSelector(e){const t=(0,s.parseSelector)(e);for(const n of t.parts)if(!this._engines.has(n.name))throw this.createStacklessError(`Unknown engine \"${n.name}\" while parsing selector ${e}`);return t}querySelector(e,t,n){if(!t.querySelector)throw this.createStacklessError(\"Node is not queryable.\");this._evaluator.begin();try{var r,o;const i=this._querySelectorRecursively([{element:t,capture:void 0}],e,0,new Map);if(n&&i.length>1)throw this.strictModeViolationError(e,i.map(e=>e.element));return(null===(r=i[0])||void 0===r?void 0:r.capture)||(null===(o=i[0])||void 0===o?void 0:o.element)}finally{this._evaluator.end()}}_querySelectorRecursively(e,t,n,r){if(n===t.parts.length)return e;const o=t.parts[n];if(\"nth\"===o.name){let i=[];if(\"0\"===o.body)i=e.slice(0,1);else if(\"-1\"===o.body)e.length&&(i=e.slice(e.length-1));else{if(\"number\"==typeof t.capture)throw this.createStacklessError(\"Can't query n-th element in a request with the capture.\");const n=+o.body,r=new Set;for(const t of e)r.add(t.element),n+1===r.size&&(i=[t])}return this._querySelectorRecursively(i,t,n+1,r)}if(\"visible\"===o.name){const t=Boolean(o.body);return e.filter(e=>t===(0,c.isVisible)(e.element))}const i=[];for(const o of e){const e=n-1===t.capture?o.element:o.capture;let s=r.get(o.element);s||(s=[],r.set(o.element,s));let c=s[n];c||(c=this._queryEngineAll(t.parts[n],o.element),s[n]=c);for(const t of c){if(!(\"nodeName\"in t))throw this.createStacklessError(\"Expected a Node but got \"+Object.prototype.toString.call(t));i.push({element:t,capture:e})}}return this._querySelectorRecursively(i,t,n+1,r)}querySelectorAll(e,t){if(!t.querySelectorAll)throw this.createStacklessError(\"Node is not queryable.\");this._evaluator.begin();try{const n=this._querySelectorRecursively([{element:t,capture:void 0}],e,0,new Map),r=new Set;for(const e of n)r.add(e.capture||e.element);return[...r]}finally{this._evaluator.end()}}_queryEngineAll(e,t){return this._engines.get(e.name).queryAll(t,e.body)}_createAttributeEngine(e,t){return{queryAll:(n,r)=>this._evaluator.query({scope:n,pierceShadow:t},(t=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(t)}]`,functions:[]},combinator:\"\"}]}])(r))}}_createCSSEngine(){const e=this._evaluator;return{queryAll:(t,n)=>e.query({scope:t,pierceShadow:!0},n)}}_createTextEngine(e){const t=(t,n)=>{const{matcher:r,kind:o}=function(e){if(\"/\"===e[0]&&e.lastIndexOf(\"/\")>0){const t=e.lastIndexOf(\"/\");return{matcher:(0,c.createRegexTextMatcher)(e.substring(1,t),e.substring(t+1)),kind:\"regex\"}}let t=!1;e.length>1&&'\"'===e[0]&&'\"'===e[e.length-1]&&(e=d(e.substring(1,e.length-1)),t=!0);e.length>1&&\"'\"===e[0]&&\"'\"===e[e.length-1]&&(e=d(e.substring(1,e.length-1)),t=!0);return{matcher:t?(0,c.createStrictTextMatcher)(e):(0,c.createLaxTextMatcher)(e),kind:t?\"strict\":\"lax\"}}(n),i=[];let s=null;const a=e=>{if(\"lax\"===o&&s&&s.contains(e))return!1;const t=(0,c.elementMatchesText)(this._evaluator,e,r);\"none\"===t&&(s=e),(\"self\"===t||\"selfAndChildren\"===t&&\"strict\"===o)&&i.push(e)};t.nodeType===Node.ELEMENT_NODE&&a(t);const u=this._evaluator._queryCSS({scope:t,pierceShadow:e},\"*\");for(const e of u)a(e);return i};return{queryAll:(e,n)=>t(e,n)}}extend(t,n){return new(e.eval(`\\n (() => {\\n ${t}\\n return pwExport;\\n })()`))(this,n)}isVisible(e){return(0,c.isVisible)(e)}pollRaf(e){return this._runAbortableTask(t=>{let n,r;const o=new Promise((e,t)=>{n=e,r=t}),i=()=>{if(!t.aborted)try{const r=Symbol(\"continuePolling\"),o=e(t,r);o!==r?n(o):requestAnimationFrame(i)}catch(e){t.log(\" \"+e.message),r(e)}};return i(),o})}pollInterval(e,t){return this._runAbortableTask(n=>{let r,o;const i=new Promise((e,t)=>{r=e,o=t}),s=()=>{if(!n.aborted)try{const o=Symbol(\"continuePolling\"),i=t(n,o);i!==o?r(i):setTimeout(s,e)}catch(e){o(e)}};return s(),i})}_runAbortableTask(e){let t,n=[],r=!1;const o=()=>{t&&(t(n),n=[],t=void 0)};let i=\"\";const s={aborted:!1,log:e=>{i=e,n.push(e),o()},logRepeating:e=>{e!==i&&s.log(e)}};return{takeNextLogs:()=>new Promise(e=>{t=e,(n.length||r)&&o()}),run:()=>{const t=e(s);return t.finally(()=>{r=!0,o()}),t},cancel:()=>{s.aborted=!0},takeLastLogs:()=>n}}getElementBorderWidth(e){if(e.nodeType!==Node.ELEMENT_NODE||!e.ownerDocument||!e.ownerDocument.defaultView)return{left:0,top:0};const t=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(t.borderLeftWidth||\"\",10),top:parseInt(t.borderTopWidth||\"\",10)}}retarget(e,t){let n=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;return n?(n.matches(\"input, textarea, select\")||(n=n.closest(\"button, [role=button], [role=checkbox], [role=radio]\")||n),\"follow-label\"===t&&(n.matches(\"input, textarea, button, select, [role=button], [role=checkbox], [role=radio]\")||n.isContentEditable||(n=n.closest(\"label\")||n),\"LABEL\"===n.nodeName&&(n=n.control||n)),n):null}waitForElementStatesAndPerformAction(e,t,n,r){let o,i=0,s=0,c=0;const a=(a,u)=>{if(n)return a.log(\" forcing action\"),r(e,a,u);for(const n of t){if(\"stable\"!==n){const t=this.checkElementState(e,n);if(\"boolean\"!=typeof t)return t;if(!t)return a.logRepeating(` element is not ${n} - waiting...`),u;continue}const t=this.retarget(e,\"no-follow-label\");if(!t)return\"error:notconnected\";if(1==++i)return u;const r=performance.now();if(this._stableRafCount>1&&r-c<15)return u;c=r;const l=t.getBoundingClientRect(),p={x:l.top,y:l.left,width:l.width,height:l.height};o&&p.x===o.x&&p.y===o.y&&p.width===o.width&&p.height===o.height?++s:s=0;const h=s>=this._stableRafCount,f=h||!o;if(o=p,f||a.logRepeating(\" element is not stable - waiting...\"),!h)return u}return r(e,a,u)};return this._replaceRafWithTimeout?this.pollInterval(16,a):this.pollRaf(a)}checkElementState(e,t){const n=this.retarget(e,[\"stable\",\"visible\",\"hidden\"].includes(t)?\"no-follow-label\":\"follow-label\");if(!n||!n.isConnected)return\"hidden\"===t||\"error:notconnected\";if(\"visible\"===t)return this.isVisible(n);if(\"hidden\"===t)return!this.isVisible(n);const r=[\"BUTTON\",\"INPUT\",\"SELECT\",\"TEXTAREA\"].includes(n.nodeName)&&n.hasAttribute(\"disabled\");if(\"disabled\"===t)return r;if(\"enabled\"===t)return!r;const o=!([\"INPUT\",\"TEXTAREA\",\"SELECT\"].includes(n.nodeName)&&n.hasAttribute(\"readonly\"));if(\"editable\"===t)return!r&&o;if(\"checked\"===t)return[\"checkbox\",\"radio\"].includes(n.getAttribute(\"role\")||\"\")?\"true\"===n.getAttribute(\"aria-checked\"):\"INPUT\"!==n.nodeName?\"error:notcheckbox\":[\"radio\",\"checkbox\"].includes(n.type.toLowerCase())?n.checked:\"error:notcheckbox\";throw this.createStacklessError(`Unexpected element state \"${t}\"`)}selectOptions(e,t,n,r){const o=this.retarget(t,\"follow-label\");if(!o)return\"error:notconnected\";if(\"select\"!==o.nodeName.toLowerCase())return\"error:notselect\";const i=o,s=[...i.options],c=[];let a=e.slice();for(let e=0;e<s.length;e++){const t=s[e],n=n=>{if(n instanceof Node)return t===n;let r=!0;return void 0!==n.value&&(r=r&&n.value===t.value),void 0!==n.label&&(r=r&&n.label===t.label),void 0!==n.index&&(r=r&&n.index===e),r};if(a.some(n)){if(c.push(t),!i.multiple){a=[];break}a=a.filter(e=>!n(e))}}return a.length?(n.logRepeating(\" did not find some options - waiting... \"),r):(i.value=void 0,c.forEach(e=>e.selected=!0),n.log(\" selected specified option(s)\"),i.dispatchEvent(new Event(\"input\",{bubbles:!0})),i.dispatchEvent(new Event(\"change\",{bubbles:!0})),c.map(e=>e.value))}fill(e,t,n){const r=this.retarget(t,\"follow-label\");if(!r)return\"error:notconnected\";if(\"input\"===r.nodeName.toLowerCase()){const t=r,o=t.type.toLowerCase(),i=new Set([\"date\",\"time\",\"datetime\",\"datetime-local\",\"month\",\"week\"]);if(!new Set([\"\",\"email\",\"number\",\"password\",\"search\",\"tel\",\"text\",\"url\"]).has(o)&&!i.has(o))return n.log(` input of type \"${o}\" cannot be filled`),\"error:notfillableinputtype\";if(\"number\"===o&&(e=e.trim(),isNaN(Number(e))))return\"error:notfillablenumberinput\";if(i.has(o))return e=e.trim(),t.focus(),t.value=e,t.value!==e?\"error:notvaliddate\":(r.dispatchEvent(new Event(\"input\",{bubbles:!0})),r.dispatchEvent(new Event(\"change\",{bubbles:!0})),\"done\")}else if(\"textarea\"===r.nodeName.toLowerCase());else if(!r.isContentEditable)return\"error:notfillableelement\";return this.selectText(r),\"needsinput\"}selectText(e){const t=this.retarget(e,\"follow-label\");if(!t)return\"error:notconnected\";if(\"input\"===t.nodeName.toLowerCase()){const e=t;return e.select(),e.focus(),\"done\"}if(\"textarea\"===t.nodeName.toLowerCase()){const e=t;return e.selectionStart=0,e.selectionEnd=e.value.length,e.focus(),\"done\"}const n=t.ownerDocument.createRange();n.selectNodeContents(t);const r=t.ownerDocument.defaultView.getSelection();return r&&(r.removeAllRanges(),r.addRange(n)),t.focus(),\"done\"}focusNode(e,t){if(!e.isConnected)return\"error:notconnected\";if(e.nodeType!==Node.ELEMENT_NODE)return\"error:notelement\";const n=e.getRootNode().activeElement===e&&e.ownerDocument&&e.ownerDocument.hasFocus();if(e.focus(),t&&!n&&\"input\"===e.nodeName.toLowerCase())try{e.setSelectionRange(0,0)}catch(e){}return\"done\"}setInputFiles(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return\"Node is not of type HTMLElement\";const n=e;if(\"INPUT\"!==n.nodeName)return\"Not an <input> element\";const r=n;if(\"file\"!==(r.getAttribute(\"type\")||\"\").toLowerCase())return\"Not an input[type=file] element\";const o=t.map(e=>{const t=Uint8Array.from(atob(e.buffer),e=>e.charCodeAt(0));return new File([t],e.name,{type:e.mimeType})}),i=new DataTransfer;for(const e of o)i.items.add(e);r.files=i.files,r.dispatchEvent(new Event(\"input\",{bubbles:!0})),r.dispatchEvent(new Event(\"change\",{bubbles:!0}))}checkHitTargetAt(e,t){let n=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!n||!n.isConnected)return\"error:notconnected\";n=n.closest(\"button, [role=button]\")||n;let r=this.deepElementFromPoint(document,t.x,t.y);const o=[];for(;r&&r!==n;)o.push(r),r=(0,c.parentElementOrShadowHost)(r);if(r===n)return\"done\";const i=this.previewNode(o[0]);let s;for(;n;){const e=o.indexOf(n);if(-1!==e){e>1&&(s=this.previewNode(o[e-1]));break}n=(0,c.parentElementOrShadowHost)(n)}return s?{hitTargetDescription:`${i} from ${s} subtree`}:{hitTargetDescription:i}}dispatchEvent(e,t,n){let r;switch(n={bubbles:!0,cancelable:!0,composed:!0,...n},f.get(t)){case\"mouse\":r=new MouseEvent(t,n);break;case\"keyboard\":r=new KeyboardEvent(t,n);break;case\"touch\":r=new TouchEvent(t,n);break;case\"pointer\":r=new PointerEvent(t,n);break;case\"focus\":r=new FocusEvent(t,n);break;case\"drag\":r=new DragEvent(t,n);break;default:r=new Event(t,n)}e.dispatchEvent(r)}deepElementFromPoint(e,t,n){let r,o=e;for(;o;){const e=o.elementsFromPoint(t,n)[0];if(!e||r===e)break;r=e,o=r.shadowRoot}return r}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return h(\"#text=\"+(e.nodeValue||\"\"));if(e.nodeType!==Node.ELEMENT_NODE)return h(`<${e.nodeName.toLowerCase()} />`);const t=e,n=[];for(let e=0;e<t.attributes.length;e++){const{name:r,value:o}=t.attributes[e];\"style\"!==r&&(!o&&p.has(r)?n.push(\" \"+r):n.push(` ${r}=\"${o}\"`))}n.sort((e,t)=>e.length-t.length);let r=n.join(\"\");if(r.length>50&&(r=r.substring(0,49)+\"…\"),l.has(t.nodeName))return h(`<${t.nodeName.toLowerCase()}${r}/>`);const o=t.childNodes;let i=!1;if(o.length<=5){i=!0;for(let e=0;e<o.length;e++)i=i&&o[e].nodeType===Node.TEXT_NODE}let s=i?t.textContent||\"\":o.length?\"…\":\"\";return s.length>50&&(s=s.substring(0,49)+\"…\"),h(`<${t.nodeName.toLowerCase()}${r}>${s}</${t.nodeName.toLowerCase()}>`)}strictModeViolationError(e,t){const n=t.slice(0,10).map(e=>({preview:this.previewNode(e),selector:(0,a.generateSelector)(this,e).selector})),r=n.map((e,t)=>`\\n ${t+1}) ${e.preview} aka playwright.$(\"${e.selector}\")`);return n.length<t.length&&r.push(\"\\n ...\"),this.createStacklessError(`strict mode violation: \"${e.selector}\" resolved to ${t.length} elements:${r.join(\"\")}\\n`)}createStacklessError(e){const t=new Error(e);return delete t.stack,t}}t.InjectedScript=u;const l=new Set([\"AREA\",\"BASE\",\"BR\",\"COL\",\"COMMAND\",\"EMBED\",\"HR\",\"IMG\",\"INPUT\",\"KEYGEN\",\"LINK\",\"MENUITEM\",\"META\",\"PARAM\",\"SOURCE\",\"TRACK\",\"WBR\"]),p=new Set([\"checked\",\"selected\",\"disabled\",\"readonly\",\"multiple\"]);function h(e){return e.replace(/\\n/g,\"↵\").replace(/\\t/g,\"⇆\")}const f=new Map([[\"auxclick\",\"mouse\"],[\"click\",\"mouse\"],[\"dblclick\",\"mouse\"],[\"mousedown\",\"mouse\"],[\"mouseeenter\",\"mouse\"],[\"mouseleave\",\"mouse\"],[\"mousemove\",\"mouse\"],[\"mouseout\",\"mouse\"],[\"mouseover\",\"mouse\"],[\"mouseup\",\"mouse\"],[\"mouseleave\",\"mouse\"],[\"mousewheel\",\"mouse\"],[\"keydown\",\"keyboard\"],[\"keyup\",\"keyboard\"],[\"keypress\",\"keyboard\"],[\"textInput\",\"keyboard\"],[\"touchstart\",\"touch\"],[\"touchmove\",\"touch\"],[\"touchend\",\"touch\"],[\"touchcancel\",\"touch\"],[\"pointerover\",\"pointer\"],[\"pointerout\",\"pointer\"],[\"pointerenter\",\"pointer\"],[\"pointerleave\",\"pointer\"],[\"pointerdown\",\"pointer\"],[\"pointerup\",\"pointer\"],[\"pointermove\",\"pointer\"],[\"pointercancel\",\"pointer\"],[\"gotpointercapture\",\"pointer\"],[\"lostpointercapture\",\"pointer\"],[\"focus\",\"focus\"],[\"blur\",\"focus\"],[\"drag\",\"drag\"],[\"dragstart\",\"drag\"],[\"dragend\",\"drag\"],[\"dragover\",\"drag\"],[\"dragenter\",\"drag\"],[\"dragleave\",\"drag\"],[\"dragexit\",\"drag\"],[\"drop\",\"drag\"]]);function d(e){if(!e.includes(\"\\\\\"))return e;const t=[];let n=0;for(;n<e.length;)\"\\\\\"===e[n]&&n+1<e.length&&n++,t.push(e[n++]);return t.join(\"\")}var m=u;t.default=m}).call(this,n(5))},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.XPathEngine=void 0;const r={queryAll(e,t){t.startsWith(\"/\")&&(t=\".\"+t);const n=[],r=e instanceof Document?e:e.ownerDocument;if(!r)return n;const o=r.evaluate(t,e,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let e=o.iterateNext();e;e=o.iterateNext())e.nodeType===Node.ELEMENT_NODE&&n.push(e);return n}};t.XPathEngine=r},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.ReactEngine=void 0;var r=n(6);function o(e){if(\"function\"==typeof e.type)return e.type.displayName||e.type.name||\"Anonymous\";if(\"string\"==typeof e.type)return e.type;if(e._currentElement){const t=e._currentElement.type;if(\"string\"==typeof t)return t;if(\"function\"==typeof t)return t.displayName||t.name||\"Anonymous\"}return\"\"}function i(e){if(e.child){const t=[];for(let n=e.child;n;n=n.sibling)t.push(n);return t}if(!e._currentElement)return[];const t=e=>{var t;const n=null===(t=e._currentElement)||void 0===t?void 0:t.type;return\"function\"==typeof n||\"string\"==typeof n};if(e._renderedComponent){const n=e._renderedComponent;return t(n)?[n]:[]}return e._renderedChildren?[...Object.values(e._renderedChildren)].filter(t):[]}function s(e){var t;const n=e.memoizedProps||(null===(t=e._currentElement)||void 0===t?void 0:t.props);if(!n||\"string\"==typeof n)return n;const r={...n};return delete r.children,r}function c(e){var t;const n={name:o(e),children:i(e).map(c),rootElements:[],props:s(e)},r=e.stateNode||e._hostNode||(null===(t=e._renderedComponent)||void 0===t?void 0:t._hostNode);if(r instanceof Element)n.rootElements.push(r);else for(const e of n.children)n.rootElements.push(...e.rootElements);return n}const a={queryAll(e,t){const{name:n,attributes:o}=(0,r.parseComponentSelector)(t),i=function(){const e=[],t=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT);for(;t.nextNode();){const n=t.currentNode;n.hasOwnProperty(\"_reactRootContainer\")&&e.push(n._reactRootContainer._internalRoot.current)}for(const t of document.querySelectorAll(\"[data-reactroot]\"))for(const n of Object.keys(t))(n.startsWith(\"__reactInternalInstance\")||n.startsWith(\"__reactFiber\"))&&e.push(t[n]);return e}().map(e=>c(e)).map(t=>function e(t,n,r=[]){n(t)&&r.push(t);for(const o of t.children)e(o,n,r);return r}(t,t=>{if(n&&t.name!==n)return!1;if(t.rootElements.some(t=>!e.contains(t)))return!1;for(const e of o)if(!(0,r.checkComponentAttribute)(t.props,e))return!1;return!0})).flat(),s=new Set;for(const e of i)for(const t of e.rootElements)s.add(t);return[...s]}};t.ReactEngine=a},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.VueEngine=void 0;var r=n(6);function o(e,t){const n=e.replace(/^[a-zA-Z]:/,\"\").replace(/\\\\/g,\"/\");let r=n.substring(n.lastIndexOf(\"/\")+1);return t&&r.endsWith(t)&&(r=r.substring(0,r.length-t.length)),r}function i(e,t){return t?t.toUpperCase():\"\"}const s=/(?:^|[-_/])(\\w)/g,c=e=>e&&e.replace(s,i);function a(e){function t(e,t){return e.type.__playwright_guessedName=t,t}function n(e){const n=function(e){const t=e.name||e._componentTag||e.__playwright_guessedName;if(t)return t;const n=e.__file;return n?c(o(n,\".vue\")):void 0}(e.type||{});if(n)return n;if(e.root===e)return\"Root\";for(const n in null===(r=e.parent)||void 0===r||null===(i=r.type)||void 0===i?void 0:i.components){var r,i,s;if((null===(s=e.parent)||void 0===s?void 0:s.type.components[n])===e.type)return t(e,n)}for(const n in null===(a=e.appContext)||void 0===a?void 0:a.components){var a;if(e.appContext.components[n]===e.type)return t(e,n)}return\"Anonymous Component\"}function r(e){const t=[];return e.component&&t.push(e.component),e.suspense&&t.push(...r(e.suspense.activeBranch)),Array.isArray(e.children)&&e.children.forEach(e=>{e.component?t.push(e.component):t.push(...r(e))}),t.filter(e=>{var t;return!(function(e){return e._isBeingDestroyed||e.isUnmounted}(e)||null!==(t=e.type.devtools)&&void 0!==t&&t.hide)})}function i(e){return function(e){return\"Symbol(Fragment)\"===e.subTree.type.toString()}(e)?function(e){if(!e.children)return[];const t=[];for(let n=0,r=e.children.length;n<r;n++){const r=e.children[n];r.component?t.push(...i(r.component)):r.el&&t.push(r.el)}return t}(e.subTree):[e.subTree.el]}return function e(t){return{name:n(t),children:r(t.subTree).map(e),rootElements:i(t),props:t.props}}(e)}function u(e){function t(e){const t=function(e){const t=e.displayName||e.name||e._componentTag;if(t)return t;const n=e.__file;return n?c(o(n,\".vue\")):void 0}(e.$options||e.fnOptions||{});return t||(e.$root===e?\"Root\":\"Anonymous Component\")}function n(e){return e.$children?e.$children:Array.isArray(e.subTree.children)?e.subTree.children.filter(e=>!!e.component).map(e=>e.component):[]}return function e(r){return{name:t(r),children:n(r).map(e),rootElements:[r.$el],props:r._props}}(e)}const l={queryAll(e,t){const{name:n,attributes:o}=(0,r.parseComponentSelector)(t),i=function(){const e=[];for(const t of document.querySelectorAll(\"[data-v-app]\"))t._vnode&&t._vnode.component&&e.push({root:t._vnode.component,version:3});const t=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT),n=new Set;for(;t.nextNode();){const e=t.currentNode;e&&e.__vue__&&n.add(e.__vue__.$root)}for(const t of n)e.push({version:2,root:t});return e}().map(e=>3===e.version?a(e.root):u(e.root)).map(t=>function e(t,n,r=[]){n(t)&&r.push(t);for(const o of t.children)e(o,n,r);return r}(t,t=>{if(n&&t.name!==n)return!1;if(t.rootElements.some(t=>!e.contains(t)))return!1;for(const e of o)if(!(0,r.checkComponentAttribute)(t.props,e))return!1;return!0})).flat(),s=new Set;for(const e of i)for(const t of e.rootElements)s.add(t);return[...s]}};t.VueEngine=l}]).default;";
|
|
exports.source = source; |