@react-native/debugger-frontend
Version:
Debugger frontend for React Native based on Chrome DevTools
70 lines • 260 kB
JavaScript
var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};function t(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}function r(e,t,r,i){return new(r||(r=Promise))((function(n,s){function a(e){try{c(i.next(e))}catch(e){s(e)}}function o(e){try{c(i.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,o)}c((i=i.apply(e,t||[])).next())}))}function i(e,t){var r,i,n,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=o(0),a.throw=o(1),a.return=o(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(c){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(r=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(n=s.trys,(n=n.length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){s.label=o[1];break}if(6===o[0]&&s.label<n[1]){s.label=n[1],n=o;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(o);break}n[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{r=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}}function n(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,s=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=s.next()).done;)a.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return a}function a(e,t,r){if(r||2===arguments.length)for(var i,n=0,s=t.length;n<s;n++)!i&&n in t||(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function o(e){return this instanceof o?(this.v=e,this):new o(e)}function c(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,n=r.apply(e,t||[]),s=[];return i=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",(function(e){return function(t){return Promise.resolve(t).then(e,d)}})),i[Symbol.asyncIterator]=function(){return this},i;function a(e,t){n[e]&&(i[e]=function(t){return new Promise((function(r,i){s.push([e,t,r,i])>1||c(e,t)}))},t&&(i[e]=t(i[e])))}function c(e,t){try{(r=n[e](t)).value instanceof o?Promise.resolve(r.value.v).then(l,d):u(s[0][2],r)}catch(e){u(s[0][3],e)}var r}function l(e){c("next",e)}function d(e){c("throw",e)}function u(e,t){e(t),s.shift(),s.length&&c(s[0][0],s[0][1])}}function l(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=n(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(r){t[r]=e[r]&&function(t){return new Promise((function(i,n){(function(e,t,r,i){Promise.resolve(i).then((function(t){e({value:t,done:r})}),t)})(i,n,(t=e[r](t)).done,t.value)}))}}}function d(e){return"function"==typeof e}function u(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var h=u((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function p(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var f=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,r,i,o;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var l=n(c),u=l.next();!u.done;u=l.next()){u.value.remove(this)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}else c.remove(this);var p=this.initialTeardown;if(d(p))try{p()}catch(e){o=e instanceof h?e.errors:[e]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var m=n(f),y=m.next();!y.done;y=m.next()){var w=y.value;try{g(w)}catch(e){o=null!=o?o:[],e instanceof h?o=a(a([],s(o)),s(e.errors)):o.push(e)}}}catch(e){r={error:e}}finally{try{y&&!y.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}}if(o)throw new h(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)g(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&p(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&p(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),m=f.EMPTY;function y(e){return e instanceof f||e&&"closed"in e&&d(e.remove)&&d(e.add)&&d(e.unsubscribe)}function g(e){d(e)?e():e.unsubscribe()}var w=null,v=null,b=void 0,k=!1,S=!1,C={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var n=C.delegate;return(null==n?void 0:n.setTimeout)?n.setTimeout.apply(n,a([e,t],s(r))):setTimeout.apply(void 0,a([e,t],s(r)))},clearTimeout:function(e){var t=C.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function E(e){C.setTimeout((function(){if(!w)throw e;w(e)}))}function T(){}var I=x("C",void 0,void 0);function x(e,t,r){return{kind:e,value:t,error:r}}var F=null;function P(e){if(k){var t=!F;if(t&&(F={errorThrown:!1,error:null}),e(),t){var r=F,i=r.errorThrown,n=r.error;if(F=null,i)throw n}}else e()}var R=function(e){function r(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,y(t)&&t.add(r)):r.destination=N,r}return t(r,e),r.create=function(e,t,r){return new O(e,t,r)},r.prototype.next=function(e){this.isStopped?A(function(e){return x("N",e,void 0)}(e),this):this._next(e)},r.prototype.error=function(e){this.isStopped?A(x("E",void 0,e),this):(this.isStopped=!0,this._error(e))},r.prototype.complete=function(){this.isStopped?A(I,this):(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(e){this.destination.next(e)},r.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(f),_=Function.prototype.bind;function D(e,t){return _.call(e,t)}var M=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){q(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){q(e)}else q(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){q(e)}},e}(),O=function(e){function r(t,r,i){var n,s,a=e.call(this)||this;d(t)||!t?n={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=i?i:void 0}:a&&S?((s=Object.create(t)).unsubscribe=function(){return a.unsubscribe()},n={next:t.next&&D(t.next,s),error:t.error&&D(t.error,s),complete:t.complete&&D(t.complete,s)}):n=t;return a.destination=new M(n),a}return t(r,e),r}(R);function q(e){var t;k?(t=e,k&&F&&(F.errorThrown=!0,F.error=t)):E(e)}function A(e,t){var r=v;r&&C.setTimeout((function(){return r(e,t)}))}var N={closed:!0,next:T,error:function(e){throw e},complete:T},j="function"==typeof Symbol&&Symbol.observable||"@@observable";function L(e){return e}function B(e){return 0===e.length?L:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var $=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var i,n=this,s=(i=e)&&i instanceof R||function(e){return e&&d(e.next)&&d(e.error)&&d(e.complete)}(i)&&y(i)?e:new O(e,t,r);return P((function(){var e=n,t=e.operator,r=e.source;s.add(t?t.call(s,r):r?n._subscribe(s):n._trySubscribe(s))})),s},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=H(t))((function(t,i){var n=new O({next:function(t){try{e(t)}catch(e){i(e),n.unsubscribe()}},error:i,complete:t});r.subscribe(n)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[j]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return B(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=H(e))((function(e,r){var i;t.subscribe((function(e){return i=e}),(function(e){return r(e)}),(function(){return e(i)}))}))},e.create=function(t){return new e(t)},e}();function H(e){var t;return null!==(t=null!=e?e:b)&&void 0!==t?t:Promise}function K(e){return function(t){if(function(e){return d(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}function V(e,t,r,i,n){return new W(e,t,r,i,n)}var W=function(e){function r(t,r,i,n,s,a){var o=e.call(this,t)||this;return o.onFinalize=s,o.shouldUnsubscribe=a,o._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,o._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,o._complete=i?function(){try{i()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,o}return t(r,e),r.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},r}(R),U=u((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),z=function(e){function r(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t(r,e),r.prototype.lift=function(e){var t=new G(this,this);return t.operator=e,t},r.prototype._throwIfClosed=function(){if(this.closed)throw new U},r.prototype.next=function(e){var t=this;P((function(){var r,i;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var s=n(t.currentObservers),a=s.next();!a.done;a=s.next()){a.value.next(e)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}}}))},r.prototype.error=function(e){var t=this;P((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},r.prototype.complete=function(){var e=this;P((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},r.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(r.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),r.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},r.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},r.prototype._innerSubscribe=function(e){var t=this,r=this,i=r.hasError,n=r.isStopped,s=r.observers;return i||n?m:(this.currentObservers=null,s.push(e),new f((function(){t.currentObservers=null,p(s,e)})))},r.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,i=t.thrownError,n=t.isStopped;r?e.error(i):n&&e.complete()},r.prototype.asObservable=function(){var e=new $;return e.source=this,e},r.create=function(e,t){return new G(e,t)},r}($),G=function(e){function r(t,r){var i=e.call(this)||this;return i.destination=t,i.source=r,i}return t(r,e),r.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},r.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},r.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},r.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:m},r}(z),Q={now:function(){return(Q.delegate||Date).now()},delegate:void 0},J=function(e){function r(t,r,i){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===i&&(i=Q);var n=e.call(this)||this;return n._bufferSize=t,n._windowTime=r,n._timestampProvider=i,n._buffer=[],n._infiniteTimeWindow=!0,n._infiniteTimeWindow=r===1/0,n._bufferSize=Math.max(1,t),n._windowTime=Math.max(1,r),n}return t(r,e),r.prototype.next=function(t){var r=this,i=r.isStopped,n=r._buffer,s=r._infiniteTimeWindow,a=r._timestampProvider,o=r._windowTime;i||(n.push(t),!s&&n.push(a.now()+o)),this._trimBuffer(),e.prototype.next.call(this,t)},r.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,i=this._buffer.slice(),n=0;n<i.length&&!e.closed;n+=r?1:2)e.next(i[n]);return this._checkFinalizedStatuses(e),t},r.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,i=e._buffer,n=e._infiniteTimeWindow,s=(n?1:2)*t;if(t<1/0&&s<i.length&&i.splice(0,i.length-s),!n){for(var a=r.now(),o=0,c=1;c<i.length&&i[c]<=a;c+=2)o=c;o&&i.splice(0,o+1)}},r}(z),X=function(e){function r(t,r){return e.call(this)||this}return t(r,e),r.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},r}(f),Y={setInterval:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var n=Y.delegate;return(null==n?void 0:n.setInterval)?n.setInterval.apply(n,a([e,t],s(r))):setInterval.apply(void 0,a([e,t],s(r)))},clearInterval:function(e){var t=Y.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},Z=function(e){function r(t,r){var i=e.call(this,t,r)||this;return i.scheduler=t,i.work=r,i.pending=!1,i}return t(r,e),r.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var i=this.id,n=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(n,i,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(n,this.id,t),this},r.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),Y.setInterval(e.flush.bind(e,this),r)},r.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&Y.clearInterval(t)},r.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},r.prototype._execute=function(e,t){var r,i=!1;try{this.work(e)}catch(e){i=!0,r=e||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r},r.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,i=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,p(i,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},r}(X),ee=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=Q.now,e}(),te=new(function(e){function r(t,r){void 0===r&&(r=ee.now);var i=e.call(this,t,r)||this;return i.actions=[],i._active=!1,i}return t(r,e),r.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},r}(ee))(Z),re=te,ie=new $((function(e){return e.complete()}));function ne(e){return e&&d(e.schedule)}function se(e){return e[e.length-1]}function ae(e){return ne(se(e))?e.pop():void 0}var oe=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function ce(e){return d(null==e?void 0:e.then)}function le(e){return d(e[j])}function de(e){return Symbol.asyncIterator&&d(null==e?void 0:e[Symbol.asyncIterator])}function ue(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var he="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function pe(e){return d(null==e?void 0:e[he])}function fe(e){return c(this,arguments,(function(){var t,r,n;return i(this,(function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,o(t.read())];case 3:return r=i.sent(),n=r.value,r.done?[4,o(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,o(n)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function me(e){return d(null==e?void 0:e.getReader)}function ye(e){if(e instanceof $)return e;if(null!=e){if(le(e))return s=e,new $((function(e){var t=s[j]();if(d(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(oe(e))return i=e,new $((function(e){for(var t=0;t<i.length&&!e.closed;t++)e.next(i[t]);e.complete()}));if(ce(e))return r=e,new $((function(e){r.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,E)}));if(de(e))return ge(e);if(pe(e))return t=e,new $((function(e){var r,i;try{for(var s=n(t),a=s.next();!a.done;a=s.next()){var o=a.value;if(e.next(o),e.closed)return}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}e.complete()}));if(me(e))return ge(fe(e))}var t,r,i,s;throw ue(e)}function ge(e){return new $((function(t){(function(e,t){var n,s,a,o;return r(this,void 0,void 0,(function(){var r,c;return i(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,11]),n=l(e),i.label=1;case 1:return[4,n.next()];case 2:if((s=i.sent()).done)return[3,4];if(r=s.value,t.next(r),t.closed)return[2];i.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=i.sent(),a={error:c},[3,11];case 6:return i.trys.push([6,,9,10]),s&&!s.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:i.sent(),i.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function we(e,t,r,i,n){void 0===i&&(i=0),void 0===n&&(n=!1);var s=t.schedule((function(){r(),n?e.add(this.schedule(null,i)):this.unsubscribe()}),i);if(e.add(s),!n)return s}function ve(e,t){return void 0===t&&(t=0),K((function(r,i){r.subscribe(V(i,(function(r){return we(i,e,(function(){return i.next(r)}),t)}),(function(){return we(i,e,(function(){return i.complete()}),t)}),(function(r){return we(i,e,(function(){return i.error(r)}),t)})))}))}function be(e,t){return void 0===t&&(t=0),K((function(r,i){i.add(e.schedule((function(){return r.subscribe(i)}),t))}))}function ke(e,t){if(!e)throw new Error("Iterable cannot be null");return new $((function(r){we(r,t,(function(){var i=e[Symbol.asyncIterator]();we(r,t,(function(){i.next().then((function(e){e.done?r.complete():r.next(e.value)}))}),0,!0)}))}))}function Se(e,t){if(null!=e){if(le(e))return function(e,t){return ye(e).pipe(be(t),ve(t))}(e,t);if(oe(e))return function(e,t){return new $((function(r){var i=0;return t.schedule((function(){i===e.length?r.complete():(r.next(e[i++]),r.closed||this.schedule())}))}))}(e,t);if(ce(e))return function(e,t){return ye(e).pipe(be(t),ve(t))}(e,t);if(de(e))return ke(e,t);if(pe(e))return function(e,t){return new $((function(r){var i;return we(r,t,(function(){i=e[he](),we(r,t,(function(){var e,t,n;try{t=(e=i.next()).value,n=e.done}catch(e){return void r.error(e)}n?r.complete():r.next(t)}),0,!0)})),function(){return d(null==i?void 0:i.return)&&i.return()}}))}(e,t);if(me(e))return function(e,t){return ke(fe(e),t)}(e,t)}throw ue(e)}function Ce(e,t){return t?Se(e,t):ye(e)}function Ee(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ce(e,ae(e))}var Te=u((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));function Ie(e,t){var r="object"==typeof t;return new Promise((function(i,n){var s=new O({next:function(e){i(e),s.unsubscribe()},error:n,complete:function(){r?i(t.defaultValue):n(new Te)}});e.subscribe(s)}))}function xe(e,t){return K((function(r,i){var n=0;r.subscribe(V(i,(function(r){i.next(e.call(t,r,n++))})))}))}var Fe=Array.isArray;function Pe(e){return xe((function(t){return function(e,t){return Fe(t)?e.apply(void 0,a([],s(t))):e(t)}(e,t)}))}Array.isArray,Object.getPrototypeOf,Object.prototype,Object.keys;function Re(e,t,r,i,n,s,a,o){var c=[],l=0,d=0,u=!1,h=function(){!u||c.length||l||t.complete()},p=function(e){return l<i?f(e):c.push(e)},f=function(e){s&&t.next(e),l++;var o=!1;ye(r(e,d++)).subscribe(V(t,(function(e){null==n||n(e),s?p(e):t.next(e)}),(function(){o=!0}),void 0,(function(){if(o)try{l--;for(var e=function(){var e=c.shift();a?we(t,a,(function(){return f(e)})):f(e)};c.length&&l<i;)e();h()}catch(e){t.error(e)}})))};return e.subscribe(V(t,p,(function(){u=!0,h()}))),function(){null==o||o()}}function _e(e,t,r){return void 0===r&&(r=1/0),d(t)?_e((function(r,i){return xe((function(e,n){return t(r,e,i,n)}))(ye(e(r,i)))}),r):("number"==typeof t&&(r=t),K((function(t,i){return Re(t,i,e,r)})))}function De(e){return void 0===e&&(e=1/0),_e(L,e)}function Me(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return De(1)(Ce(e,ae(e)))}function Oe(e){return new $((function(t){ye(e()).subscribe(t)}))}var qe=["addListener","removeListener"],Ae=["addEventListener","removeEventListener"],Ne=["on","off"];function je(e,t,r,i){if(d(r)&&(i=r,r=void 0),i)return je(e,t,r).pipe(Pe(i));var n=s(function(e){return d(e.addEventListener)&&d(e.removeEventListener)}(e)?Ae.map((function(i){return function(n){return e[i](t,n,r)}})):function(e){return d(e.addListener)&&d(e.removeListener)}(e)?qe.map(Le(e,t)):function(e){return d(e.on)&&d(e.off)}(e)?Ne.map(Le(e,t)):[],2),a=n[0],o=n[1];if(!a&&oe(e))return _e((function(e){return je(e,t,r)}))(ye(e));if(!a)throw new TypeError("Invalid event target");return new $((function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return a(t),function(){return o(t)}}))}function Le(e,t){return function(r){return function(i){return e[r](t,i)}}}function Be(e,t,r){void 0===e&&(e=0),void 0===r&&(r=re);var i=-1;return null!=t&&(ne(t)?r=t:i=t),new $((function(t){var n,s=(n=e)instanceof Date&&!isNaN(n)?+e-r.now():e;s<0&&(s=0);var a=0;return r.schedule((function(){t.closed||(t.next(a++),0<=i?this.schedule(void 0,i):t.complete())}),s)}))}function $e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ae(e),i=function(e,t){return"number"==typeof se(e)?e.pop():t}(e,1/0),n=e;return n.length?1===n.length?ye(n[0]):De(i)(Ce(n,r)):ie}var He=new $(T),Ke=Array.isArray;function Ve(e){return 1===e.length&&Ke(e[0])?e[0]:e}function We(e,t){return K((function(r,i){var n=0;r.subscribe(V(i,(function(r){return e.call(t,r,n++)&&i.next(r)})))}))}function Ue(e){return function(t){for(var r=[],i=function(i){r.push(ye(e[i]).subscribe(V(t,(function(e){if(r){for(var n=0;n<r.length;n++)n!==i&&r[n].unsubscribe();r=null}t.next(e)}))))},n=0;r&&!t.closed&&n<e.length;n++)i(n)}}function ze(e){return K((function(t,r){var i,n=null,s=!1;n=t.subscribe(V(r,void 0,void 0,(function(a){i=ye(e(a,ze(e)(t))),n?(n.unsubscribe(),n=null,i.subscribe(r)):s=!0}))),s&&(n.unsubscribe(),n=null,i.subscribe(r))}))}function Ge(e){return K((function(t,r){var i=!1;t.subscribe(V(r,(function(e){i=!0,r.next(e)}),(function(){i||r.next(e),r.complete()})))}))}function Qe(e){return e<=0?function(){return ie}:K((function(t,r){var i=0;t.subscribe(V(r,(function(t){++i<=e&&(r.next(t),e<=i&&r.complete())})))}))}function Je(){return K((function(e,t){e.subscribe(V(t,T))}))}function Xe(e){return void 0===e&&(e=Ye),K((function(t,r){var i=!1;t.subscribe(V(r,(function(e){i=!0,r.next(e)}),(function(){return i?r.complete():r.error(e())})))}))}function Ye(){return new Te}function Ze(e,t){var r=arguments.length>=2;return function(i){return i.pipe(e?We((function(t,r){return e(t,r,i)})):L,Qe(1),r?Ge(t):Xe((function(){return new Te})))}}function et(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?K((function(t,r){Ue(a([t],s(e)))(r)})):L}function tt(e){var t;void 0===e&&(e=1/0);var r=(t=e&&"object"==typeof e?e:{count:e}).count,i=void 0===r?1/0:r,n=t.delay,s=t.resetOnSuccess,a=void 0!==s&&s;return i<=0?L:K((function(e,t){var r,s=0,o=function(){var c=!1;r=e.subscribe(V(t,(function(e){a&&(s=0),t.next(e)}),void 0,(function(e){if(s++<i){var a=function(){r?(r.unsubscribe(),r=null,o()):c=!0};if(null!=n){var l="number"==typeof n?Be(n):ye(n(e,s)),d=V(t,(function(){d.unsubscribe(),a()}),(function(){t.complete()}));l.subscribe(d)}else a()}else t.error(e)}))),c&&(r.unsubscribe(),r=null,o())};o()}))}function rt(e,t,r){var i=d(e)||t||r?{next:e,error:t,complete:r}:e;return i?K((function(e,t){var r;null===(r=i.subscribe)||void 0===r||r.call(i);var n=!0;e.subscribe(V(t,(function(e){var r;null===(r=i.next)||void 0===r||r.call(i,e),t.next(e)}),(function(){var e;n=!1,null===(e=i.complete)||void 0===e||e.call(i),t.complete()}),(function(e){var r;n=!1,null===(r=i.error)||void 0===r||r.call(i,e),t.error(e)}),(function(){var e,t;n&&(null===(e=i.unsubscribe)||void 0===e||e.call(i)),null===(t=i.finalize)||void 0===t||t.call(i)})))})):L}
/**
* @license
* Copyright 2023 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
Symbol.dispose??=Symbol("dispose"),Symbol.asyncDispose??=Symbol("asyncDispose");const it=Symbol.dispose,nt=Symbol.asyncDispose;class st{#e=!1;#t=[];get disposed(){return this.#e}dispose(){if(!this.#e){this.#e=!0;for(const e of this.#t.reverse())e[it]()}}use(e){return e&&this.#t.push(e),e}adopt(e,t){return this.#t.push({[it](){t(e)}}),e}defer(e){this.#t.push({[it](){e()}})}move(){if(this.#e)throw new ReferenceError("a disposed stack can not use anything new");const e=new st;return e.#t=this.#t,this.#e=!0,e}[it]=this.dispose;[Symbol.toStringTag]="DisposableStack"}class at{#e=!1;#t=[];get disposed(){return this.#e}async dispose(){if(!this.#e){this.#e=!0;for(const e of this.#t.reverse())await e[nt]()}}use(e){return e&&this.#t.push(e),e}adopt(e,t){return this.#t.push({[nt]:()=>t(e)}),e}defer(e){this.#t.push({[nt]:()=>e()})}move(){if(this.#e)throw new ReferenceError("a disposed stack can not use anything new");const e=new at;return e.#t=this.#t,this.#e=!0,e}[nt]=this.dispose;[Symbol.toStringTag]="AsyncDisposableStack"}
/**
* @license
* Copyright 2022 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/class ot{#r;#i=new Map;constructor(e=function(e){return{all:e=e||new Map,on:function(t,r){var i=e.get(t);i?i.push(r):e.set(t,[r])},off:function(t,r){var i=e.get(t);i&&(r?i.splice(i.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var i=e.get(t);i&&i.slice().map((function(e){e(r)})),(i=e.get("*"))&&i.slice().map((function(e){e(t,r)}))}}}(new Map)){this.#r=e}on(e,t){const r=this.#i.get(e);return void 0===r?this.#i.set(e,[t]):r.push(t),this.#r.on(e,t),this}off(e,t){const r=this.#i.get(e)??[];if(void 0===t){for(const t of r)this.#r.off(e,t);return this.#i.delete(e),this}const i=r.lastIndexOf(t);return i>-1&&this.#r.off(e,...r.splice(i,1)),this}emit(e,t){return this.#r.emit(e,t),this.listenerCount(e)>0}once(e,t){const r=i=>{t(i),this.off(e,r)};return this.on(e,r)}listenerCount(e){return this.#i.get(e)?.length||0}removeAllListeners(e){return void 0!==e?this.off(e):(this[it](),this)}[it](){for(const[e,t]of this.#i)for(const r of t)this.#r.off(e,r);this.#i.clear()}}
/**
* @license
* Copyright 2020 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/const ct=!("undefined"==typeof process||!process.version),lt={value:{get fs(){throw new Error("fs is not available in this environment")},get ScreenRecorder(){throw new Error("ScreenRecorder is not available in this environment")}}},dt=(e,t)=>{if(!e)throw new Error(t)};
/**
* @license
* Copyright 2024 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
function ut(e,t=!1){if(t){const t=atob(e);return Uint8Array.from(t,(e=>e.codePointAt(0)))}return(new TextEncoder).encode(e)}function ht(e){const t=[];for(let r=0;r<e.length;r+=65534){const i=e.subarray(r,r+65534);t.push(String.fromCodePoint.apply(null,i))}const r=t.join("");return btoa(r)}
/**
* @license
* Copyright 2020 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
let pt=null;const ft=e=>ct?async(...t)=>{yt&&mt.push(e+t),(await async function(){return pt||(pt=(await import("debug")).default),pt}())(e)(t)}:(...t)=>{const r=globalThis.__PUPPETEER_DEBUG;if(!r)return;("*"===r||(r.endsWith("*")?e.startsWith(r):e===r))&&console.log(`${e}:`,...t)};let mt=[],yt=!1;
/**
* @license
* Copyright 2018 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
class gt extends Error{constructor(e,t){super(e,t),this.name=this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}class wt extends gt{}class vt extends gt{}class bt extends gt{#n;#s="";set code(e){this.#n=e}get code(){return this.#n}set originalMessage(e){this.#s=e}get originalMessage(){return this.#s}}class kt extends gt{}class St extends bt{}
/**
* @license
* Copyright 2020 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/const Ct={letter:{cm:{width:21.59,height:27.94},in:{width:8.5,height:11}},legal:{cm:{width:21.59,height:35.56},in:{width:8.5,height:14}},tabloid:{cm:{width:27.94,height:43.18},in:{width:11,height:17}},ledger:{cm:{width:43.18,height:27.94},in:{width:17,height:11}},a0:{cm:{width:84.1,height:118.9},in:{width:33.1102,height:46.811}},a1:{cm:{width:59.4,height:84.1},in:{width:23.3858,height:33.1102}},a2:{cm:{width:42,height:59.4},in:{width:16.5354,height:23.3858}},a3:{cm:{width:29.7,height:42},in:{width:11.6929,height:16.5354}},a4:{cm:{width:21,height:29.7},in:{width:8.2677,height:11.6929}},a5:{cm:{width:14.8,height:21},in:{width:5.8268,height:8.2677}},a6:{cm:{width:10.5,height:14.8},in:{width:4.1339,height:5.8268}}},Et=ft("puppeteer:error"),Tt=(Object.freeze({width:800,height:600}),Symbol("Source URL for Puppeteer evaluation scripts"));
/**
* @license
* Copyright 2017 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/class It{static INTERNAL_URL="pptr:internal";static fromCallSite(e,t){const r=new It;return r.#a=e,r.#o=t.toString(),r}static parse=e=>{e=e.slice(5);const[t="",r=""]=e.split(";"),i=new It;return i.#a=t,i.#o=decodeURIComponent(r),i};static isPuppeteerURL=e=>e.startsWith("pptr:");#a;#o;get functionName(){return this.#a}get siteString(){return this.#o}toString(){return`pptr:${[this.#a,encodeURIComponent(this.#o)].join(";")}`}}const xt=(e,t)=>{if(Object.prototype.hasOwnProperty.call(t,Tt))return t;const r=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t[2];const i=(new Error).stack;return Error.prepareStackTrace=r,Object.assign(t,{[Tt]:It.fromCallSite(e,i)})},Ft=e=>"string"==typeof e||e instanceof String;function Pt(e,...t){if(Ft(e))return dt(0===t.length,"Cannot evaluate a string with arguments"),e;return`(${e})(${t.map((function(e){return Object.is(e,void 0)?"undefined":JSON.stringify(e)})).join(",")})`}async function Rt(e,t){const r=[],i=e.getReader();if(t){const e=await lt.value.fs.promises.open(t,"w+");try{for(;;){const{done:t,value:n}=await i.read();if(t)break;r.push(n),await e.writeFile(n)}}finally{await e.close()}}else for(;;){const{done:e,value:t}=await i.read();if(e)break;r.push(t)}try{const e=function(e){let t=0;for(const r of e)t+=r.length;const r=new Uint8Array(t);let i=0;for(const t of e)r.set(t,i),i+=t.length;return r}(r);return 0===e.length?null:e}catch(e){return Et(e),null}}async function _t(e,t){return new ReadableStream({async pull(r){const{data:i,base64Encoded:n,eof:s}=await e.send("IO.read",{handle:t});r.enqueue(function(e,t){return t?Uint8Array.from(atob(e),(e=>e.codePointAt(0))):(new TextEncoder).encode(e)}(i,n??!1)),s&&(await e.send("IO.close",{handle:t}),r.close())}})}function Dt(e,t){return 0===e?He:Be(e).pipe(xe((()=>{throw new wt(`Timed out after waiting ${e}ms`,{cause:t})})))}const Mt="__puppeteer_utility_world__24.4.0",Ot=/^[\x20\t]*\/\/[@#] sourceURL=\s{0,10}(\S*?)\s{0,10}$/m;const qt=500;const At={px:1,in:96,cm:37.8,mm:3.78};function Nt(e,t="in"){if(void 0===e)return;let r;if("number"==typeof(i=e)||i instanceof Number)r=e;else{if(!Ft(e))throw new Error("page.pdf() Cannot handle parameter type: "+typeof e);{const t=e;let i=t.substring(t.length-2).toLowerCase(),n="";i in At?n=t.substring(0,t.length-2):(i="px",n=t);const s=Number(n);dt(!isNaN(s),"Failed to parse parameter value: "+t),r=s*At[i]}}var i;return r/At[t]}function jt(e,t){return new $((r=>{const i=e=>{r.next(e)};return e.on(t,i),()=>{e.off(t,i)}}))}function Lt(e,t){return e?je(e,"abort").pipe(xe((()=>{if(e.reason instanceof Error)throw e.reason.cause=t,e.reason;throw new Error(e.reason,{cause:t})}))):He}function Bt(e){return _e((t=>Ce(Promise.resolve(e(t))).pipe(We((e=>e)),xe((()=>t)))))}const $t=new Map([["accelerometer","sensors"],["ambient-light-sensor","sensors"],["background-sync","backgroundSync"],["camera","videoCapture"],["clipboard-read","clipboardReadWrite"],["clipboard-sanitized-write","clipboardSanitizedWrite"],["clipboard-write","clipboardReadWrite"],["geolocation","geolocation"],["gyroscope","sensors"],["idle-detection","idleDetection"],["keyboard-lock","keyboardLock"],["magnetometer","sensors"],["microphone","audioCapture"],["midi","midi"],["notifications","notifications"],["payment-handler","paymentHandler"],["persistent-storage","durableStorage"],["pointer-lock","pointerLock"],["midi-sysex","midiSysex"]]);class Ht extends ot{constructor(){super()}async waitForTarget(e,t={}){const{timeout:r=3e4,signal:i}=t;return await Ie($e(jt(this,"targetcreated"),jt(this,"targetchanged"),Ce(this.targets())).pipe(Bt(e),et(Lt(i),Dt(r))))}async pages(){const e=await Promise.all(this.browserContexts().map((e=>e.pages())));return e.reduce(((e,t)=>e.concat(t)),[])}async cookies(){return await this.defaultBrowserContext().cookies()}async setCookie(...e){return await this.defaultBrowserContext().setCookie(...e)}async deleteCookie(...e){return await this.defaultBrowserContext().deleteCookie(...e)}isConnected(){return this.connected}[it](){this.process()?this.close().catch(Et):this.disconnect().catch(Et)}[nt](){return this.process()?this.close():this.disconnect()}}var Kt;!function(e){e.Disconnected=Symbol("CDPSession.Disconnected"),e.Swapped=Symbol("CDPSession.Swapped"),e.Ready=Symbol("CDPSession.Ready"),e.SessionAttached="sessionattached",e.SessionDetached="sessiondetached"}(Kt||(Kt={}));class Vt extends ot{constructor(){super()}parentSession(){}}
/**
* @license
* Copyright 2024 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/class Wt{static create(e){return new Wt(e)}static async race(e){const t=new Set;try{const r=e.map((e=>e instanceof Wt?(e.#c&&t.add(e),e.valueOrThrow()):e));return await Promise.race(r)}finally{for(const e of t)e.reject(new Error("Timeout cleared"))}}#l=!1;#d=!1;#u;#h;#p=new Promise((e=>{this.#h=e}));#c;#f;constructor(e){e&&e.timeout>0&&(this.#f=new wt(e.message),this.#c=setTimeout((()=>{this.reject(this.#f)}),e.timeout))}#m(e){clearTimeout(this.#c),this.#u=e,this.#h()}resolve(e){this.#d||this.#l||(this.#l=!0,this.#m(e))}reject(e){this.#d||this.#l||(this.#d=!0,this.#m(e))}resolved(){return this.#l}finished(){return this.#l||this.#d}value(){return this.#u}#y;valueOrThrow(){return this.#y||(this.#y=(async()=>{if(await this.#p,this.#d)throw this.#u;return this.#u})()),this.#y}}
/**
* @license
* Copyright 2024 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/class Ut{static Guard=class{#g;#w;constructor(e,t){this.#g=e,this.#w=t}[it](){return this.#w?.(),this.#g.release()}};#v=!1;#b=[];async acquire(e){if(!this.#v)return this.#v=!0,new Ut.Guard(this);const t=Wt.create();return this.#b.push(t.resolve.bind(t)),await t.valueOrThrow(),new Ut.Guard(this,e)}release(){const e=this.#b.shift();e?e():this.#v=!1}}
/**
* @license
* Copyright 2017 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/class zt extends ot{constructor(){super()}#k;#S=0;startScreenshot(){const e=this.#k||new Ut;return this.#k=e,this.#S++,e.acquire((()=>{this.#S--,0===this.#S&&(this.#k=void 0)}))}waitForScreenshotOperations(){return this.#k?.acquire()}async waitForTarget(e,t={}){const{timeout:r=3e4}=t;return await Ie($e(jt(this,"targetcreated"),jt(this,"targetchanged"),Ce(this.targets())).pipe(Bt(e),et(Dt(r))))}async deleteCookie(...e){return await this.setCookie(...e.map((e=>({...e,expires:1}))))}get closed(){return!this.browser().browserContexts().includes(this)}get id(){}[it](){this.close().catch(Et)}[nt](){return this.close()}}
/**
* @license
* Copyright 2019 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/class Gt{#C;#E;constructor(){this.#C=null,this.#E=null}setDefaultTimeout(e){this.#C=e}setDefaultNavigationTimeout(e){this.#E=e}navigationTimeout(){return null!==this.#E?this.#E:null!==this.#C?this.#C:3e4}timeout(){return null!==this.#C?this.#C:3e4}}
/**
* @license
* Copyright 2023 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/var Qt=self&&self.__addDisposableResource||function(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var i,n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose],r&&(n=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");n&&(i=function(){try{n.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:i,async:r})}else r&&e.stack.push({async:!0});return t},Jt=self&&self.__disposeResources||function(e){return function(t){function r(r){t.error=t.hasError?new e(r,t.error,"An error was suppressed during disposal."):r,t.hasError=!0}var i,n=0;return function e(){for(;i=t.stack.pop();)try{if(!i.async&&1===n)return n=0,t.stack.push(i),Promise.resolve().then(e);if(i.dispose){var s=i.dispose.call(i.value);if(i.async)return n|=2,Promise.resolve(s).then(e,(function(t){return r(t),e()}))}else n|=1}catch(e){r(e)}if(1===n)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}}("function"==typeof SuppressedError?SuppressedError:function(e,t,r){var i=new Error(r);return i.name="SuppressedError",i.error=e,i.suppressed=t,i});const Xt=new WeakSet;function Yt(e,t){let r=!1;if(e.prototype[it]){const t=e.prototype[it];e.prototype[it]=function(){if(!Xt.has(this))return t.call(this);Xt.delete(this)},r=!0}if(e.prototype[nt]){const t=e.prototype[nt];e.prototype[nt]=function(){if(!Xt.has(this))return t.call(this);Xt.delete(this)},r=!0}return r&&(e.prototype.move=function(){return Xt.add(this),this}),e}function Zt(e=e=>`Attempted to use disposed ${e.constructor.name}.`){return(t,r)=>function(...r){if(this.disposed)throw new Error(e(this));return t.call(this,...r)}}function er(e,t){const r=new WeakMap;let i=-1;return function(...t){if(-1===i&&(i=t.length),i!==t.length)throw new Error("Memoized method was called with the wrong number of arguments");let n=!1,s=r;for(const e of t)s.has(e)||(n=!0,s.set(e,new WeakMap)),s=s.get(e);if(n)return e.call(this,...t)}}function tr(e=function(){return this}){return(t,r)=>{const i=new WeakMap;return async function(...r){const n={stack:[],error:void 0,hasError:!1};try{const s=e.call(this);let a=i.get(s);a||(a=new Ut,i.set(s,a));Qt(n,await a.acquire(),!0);return await t.call(this,...r)}catch(e){n.error=e,n.hasError=!0}finally{const e=Jt(n);e&&await e}}}}new WeakMap;var rr,ir=self&&self.__addDisposableResource||function(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var i,n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose],r&&(n=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");n&&(i=function(){try{n.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:i,async:r})}else r&&e.stack.push({async:!0});return t},nr=self&&self.__disposeResources||function(e){return function(t){function r(r){t.error=t.hasError?new e(r,t.error,"An error was suppressed during disposal."):r,t.hasError=!0}var i,n=0;return function e(){for(;i=t.stack.pop();)try{if(!i.async&&1===n)return n=0,t.stack.push(i),Promise.resolve().then(e);if(i.dispose){var s=i.dispose.call(i.value);if(i.async)return n|=2,Promise.resolve(s).then(e,(function(t){return r(t),e()}))}else n|=1}catch(e){r(e)}if(1===n)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}}("function"==typeof SuppressedError?SuppressedError:function(e,t,r){var i=new Error(r);return i.name="SuppressedError",i.error=e,i.suppressed=t,i});!function(e){e.Action="action"}(rr||(rr={}));class sr extends ot{static race(e){return ur.create(e)}visibility=null;_timeout=3e4;#T=!0;#I=!0;#x=!0;operators={conditions:(e,t)=>_e((r=>$e(...e.map((e=>e(r,t)))).pipe(Ge(r)))),retryAndRaceWithSignalAndTimer:(e,t)=>{const r=[];return e&&r.push(Lt(e,t)),r.push(Dt(this._timeout,t)),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return B(e)}(tt({delay:hr}),et(...r))}};get timeout(){return this._timeout}setTimeout(e){const t=this._clone();return t._timeout=e,t}setVisibility(e){const t=this._clone();return t.visibility=e,t}setWaitForEnabled(e){const t=this._clone();return t.#I=e,t}setEnsureElementIsInTheViewport(e){const t=this._clone();return t.#T=e,t}setWaitForStableBoundingBox(e){const t=this._clone();return t.#x=e,t}copyOptions(e){return this._timeout=e._timeout,this.visibility=e.visibility,this.#I=e.#I,this.#T=e.#T,this.#x=e.#x,this}#F=(e,t)=>this.#I?Ce(e.frame.waitForFunction((e=>{if(!(e instanceof HTMLElement))return!0;return!["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(e.nodeName)||!e.hasAttribute("disabled")}),{timeout:this._timeout,signal:t},e)).pipe(Je()):ie;#P=e=>this.#x?Oe((()=>Ce(e.evaluate((e=>new Promise((t=>{window.requestAnimationFrame((()=>{const r=e.getBoundingClientRect();window.requestAnimationFrame((()=>{const i=e.getBoundingClientRect();t([{x:r.x,y:r.y,width:r.width,height:r.height},{x:i.x,y:i.y,width:i.width,height:i.height}])}))}))}))))))).pipe(Ze((([e,t])=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height)),tt({delay:hr}),Je()):ie;#R=e=>this.#T?Ce(e.isIntersectingViewport({threshold:0})).pipe(We((e=>!e)),_e((()=>Ce(e.scrollIntoView()))),_e((()=>Oe((()=>Ce(e.isIntersectingViewport({threshold:0})))).pipe(Ze(L),tt({delay:hr}),Je())))):ie;#_(e){const t=e?.signal,r=new Error("Locator.click");return this._wait(e).pipe(this.operators.conditions([this.#R,this.#P,this.#F],t),rt((()=>this.emit(rr.Action,void 0))),_e((t=>Ce(t.click(e)).pipe(ze((e=>{throw t.dispose().catch(Et),e}))))),this.operators.retryAndRaceWithSignalAndTimer(t,r))}#D(e,t){const r=t?.signal,i=new Error("Locator.fill");return this._wait(t).pipe(this.operators.conditions([this.#R,this.#P,this.#F],r),rt((()=>this.emit(rr.Action,void 0))),_e((t=>Ce(t.evaluate((e=>e instanceof HTMLSelectElement?"select":e instanceof HTMLTextAreaElement?"typeable-input":e instanceof HTMLInputElement?new Set(["textarea","text","url","tel","search","password","number","email"]).has(e.type)?"typeable-input":"other-input":e.isContentEditable?"contenteditable":"unknown"))).pipe(_e((r=>{switch(r){case"select":return Ce(t.select(e).then(T));case"contenteditable":case"typeable-input":return Ce(t.evaluate(((e,t)=>{const r=e.isContentEditable?e.innerText:e.value;if(t.length<=r.length||!t.startsWith(e.value))return e.isContentEditable?e.innerText="":e.value="",t;const i=e.isContentEditable?e.innerText:e.value;return e.isContentEditable?(e.innerText="",e.innerText=i):(e.value="",e.value=i),t.substring(i.length)}),e)).pipe(_e((e=>Ce(t.type(e)))));case"other-input":return Ce(t.focus()).pipe(_e((()=>Ce(t.evaluate(((e,t)=>{e.value=t,e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))}),e)))));case"unknown":throw new Error("Element cannot be filled out.")}}))).pipe(ze((e=>{throw t.dispose().catch(Et),e}))))),this.operators.retryAndRaceWithSignalAndTimer(r,i))}#M(e){const t=e?.signal,r=new Error("Locator.hover");return this._wait(e).pipe(this.operators.conditions([this.#R,this.#P],t),rt((()=>this.emit(rr.Action,void 0))),_e((e=>Ce(e.hover()).pipe(ze((t=>{throw e.dispose().catch(Et),t}))))),this.operators.retryAndRaceWithSignalAndTimer(t,r))}#O(e){const t=e?.signal,r=new Error("Locator.scroll");return this._wait(e).pipe(this.operators.conditions([this.#R,this.#P],t),rt((()=>this.emit(rr.Action,void 0))),_e((t=>Ce(t.evaluate(((e,t,r)=>{void 0!==t&&(e.scrollTop=t),void 0!==r&&(e.scrollLeft=r)}),e?.scrollTop,e?.scrollLeft)).pipe(ze((e=>{throw t.dispose().catch(Et),e}))))),this.operators.retryAndRaceWithSignalAndTimer(t,r))}clone(){return this._clone()}async waitHandle(e){const t=new Error("Locator.waitHandle");return await Ie(this._wait(e).pipe(this.operators.retryAndRaceWithSignalAndTimer(e?.signal,t)))}async wait(e){const t={stack:[],error:void 0,hasError:!1};try{const r=ir(t,await this.waitHandle(e),!1);return await r.jsonValue()}catch(e){t.error=e,t.hasError=!0}finally{nr(t)}}map(e){return new lr(this._clone(),(t=>t.evaluateHandle(e)))}filter(e){return new cr(this._clone(),(async(t,r)=>(await t.frame.waitForFunction(e,{signal:r,timeout:this._timeout},t),!0)))}filterHandle(e){return new cr(this._clone(),e)}mapHandle(e){return new lr(this._clone(),e)}click(e){return Ie(this.#_(e))}fill(e,t){return Ie(this.#D(e,t))}hover(e){return Ie(this.#M(e))}scroll(e){return Ie(this.#O(e))}}class ar extends sr{static create(e,t){return new ar(e,t).setTimeout("getDefaultTimeout"in e?e.getDefaultTimeout():e.page().getDefaultTimeout())}#q;#A;constructor(e,t){super(),this.#q=e,this.#A=t}_clone(){return new ar(this.#q,this.#A)}_wait(e){const t=e?.signal;return Oe((()=>Ce(this.#q.waitForFunction(this.#A,{timeout:this.timeout,signal:t})))).pipe(Xe())}}class or extends sr{#N;constructor(e){super(),this.#N=e,this.copyOptions(this.#N)}get delegate(){return this.#N}setTimeout(e){const t=super.setTimeout(e);return t.#N=this.#N.setTimeout(e),t}setVisibility(e){const t=super.setVisibility(e);return t.#N=t.#N.setVisibility(e),t}setWaitForEnabled(e){const t=super.setWaitForEnabled(e);return t.#N=this.#N.setWaitForEnabled(e),t}setEnsureElementIsInTheViewport(e){const t=super.setEnsureElementIsInTheViewport(e);return t.#N=this.#N.setEnsureElementIsInTheViewport(e),t}setWaitForStableBoundingBox(e){const t=super.setWaitForStableBoundingBox(e);return t.#N=this.#N.setWaitForStableBoundingBox(e),t}}class cr extends or{#j;constructor(e,t){super(e),this.#j=t}_clone(){return new cr(this.delegate.clone(),this.#j).copyOptions(this)}_wait(e){return this.delegate._wait(e).pipe(_e((t=>Ce(Promise.resolve(this.#j(t,e?.signal))).pipe(We((e=>e)),xe((()=>t))))),Xe())}}class lr extends or{#L;constructor(e,t){super(e),this.#L=t}_clone(){return new lr(this.delegate.clone(),this.#L).copyOptions(this)}_wait(e){return this.delegate._wait(e).pipe(_e((t=>Ce(Promise.resolve(this.#L(t,e?.signal))))))}}class dr extends sr{static create(e,t){return new dr(e,t).setTimeout("getDefaultTimeout"in e?e.getDefaultTimeout():e.page().getDefaultTimeout())}#q;#B;constructor(e,t){super(),this.#q=e,this.#B=t}#$=e=>this.visibility?(()=>{switch(this.visibility){case"hidden":return Oe((()=>Ce(e.isHidden())));case"visible":return Oe((()=>Ce(e.isVisible())))}})().pipe(Ze(L),tt({delay:hr}),Je()):ie;_clone(){return new dr(this.#q,this.#B).copyOptions(this)}_wait(e){const t=e?.signal;return Oe((()=>Ce(this.#q.waitForSelector(this.#B,{visible:!1,timeout:this._timeout,signal:t})))).pipe(We((e=>null!==e)),Xe(),this.operators.conditions([this.#$],t))}}class ur extends sr{static create(e){const t=function(e){for(const t of e)if(!(t instanceof sr))throw new Error("Unknown locator for race candidate");return e}(e);return new ur(t)}#H;constructor(e){super(),this.#H=e}_clone(){return new ur(this.#H.map((e=>e.clone()))).copyOptions(this)}_wait(e){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];ret