"use strict";var f=Object.defineProperty;var g=o=>{throw TypeError(o)};var m=(o,t,e)=>t in o?f(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var p=(o,t,e)=>m(o,typeof t!="symbol"?t+"":t,e),d=(o,t,e)=>t.has(o)||g("Cannot "+e);var s=(o,t,e)=>(d(o,t,"read from private field"),e?e.call(o):t.get(o)),c=(o,t,e)=>t.has(o)?g("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(o):t.set(o,e),n=(o,t,e,i)=>(d(o,t,"write to private field"),i?i.call(o,e):t.set(o,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function h(o){return"waitFor"in o}var r,a,l;class R{constructor(t,e=null){c(this,r);c(this,a);c(this,l);p(this,"_page");n(this,r,t),n(this,a,e),this._page=h(t)?t.page():t}get locatorRoot(){let t=s(this,l);if(!t){const e=this.getComponentSelector();let i=s(this,r);if(e){i=i.locator(e);const u=s(this,a);u!==null&&(i=i.nth(u))}t=h(i)?i:i.locator("html"),n(this,l,t)}return t}getComponentSelector(){return""}async waitLoaded(){h(this.locatorRoot)&&await this.locatorRoot.waitFor()}}r=new WeakMap,a=new WeakMap,l=new WeakMap;exports.BasePO=R;