@playwright-opentelemetry/trace-viewer 0.3.3 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ (function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return t(this.context.count)},getNextContextId(){return t(this.context.count++)}};function t(t){let n=String(t),r=n.length-1;return e.context.id+(r?String.fromCharCode(96+r):``)+n}function n(t){e.context=t}function r(){return{...e.context,id:e.getNextContextId(),count:0}}var i=(e,t)=>e===t,a=Symbol(`solid-proxy`),o=typeof Proxy==`function`,s=Symbol(`solid-track`),c={equals:i},l=null,u=be,d=1,f=2,p={owned:null,cleanups:null,context:null,owner:null},m={},h=null,g=null,_=null,v=null,y=null,b=null,x=null,S=0;function C(e,t){let n=y,r=h,i=e.length===0,a=t===void 0?r:t,o=i?p:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>M(()=>Te(o)));h=o,y=null;try{return P(s,!0)}finally{y=n,h=r}}function w(e,t){t=t?Object.assign({},c,t):c;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[pe.bind(n),e=>(typeof e==`function`&&(e=g&&g.running&&g.sources.has(n)?e(n.tValue):e(n.value)),me(n,e))]}function T(e,t,n){let r=_e(e,t,!0,d);_&&g&&g.running?b.push(r):he(r)}function E(e,t,n){let r=_e(e,t,!1,d);_&&g&&g.running?b.push(r):he(r)}function D(e,t,n){u=Se;let r=_e(e,t,!1,d),i=fe&&ue(fe);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),x?x.push(r):he(r)}function O(e,t,n){n=n?Object.assign({},c,n):c;let r=_e(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,_&&g&&g.running?(r.tState=d,b.push(r)):he(r),pe.bind(r)}function k(e){return e&&typeof e==`object`&&`then`in e}function A(t,n,r){let i,a,o;typeof n==`function`?(i=t,a=n,o=r||{}):(i=!0,a=t,o=n||{});let s=null,c=m,l=null,u=!1,d=!1,f=`initialValue`in o,p=typeof i==`function`&&O(i),_=new Set,[v,b]=(o.storage||w)(o.initialValue),[x,S]=w(void 0),[C,E]=w(void 0,{equals:!1}),[D,A]=w(f?`ready`:`unresolved`);e.context&&(l=e.getNextContextId(),o.ssrLoadFrom===`initial`?c=o.initialValue:e.load&&e.has(l)&&(c=e.load(l)));function j(e,t,n,r){return s===e&&(s=null,r!==void 0&&(f=!0),(e===c||t===c)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(r,{value:t})),c=m,g&&e&&u?(g.promises.delete(e),u=!1,P(()=>{g.running=!0,ee(t,n)},!1)):ee(t,n)),t}function ee(e,t){P(()=>{t===void 0&&b(()=>e),A(t===void 0?f?`ready`:`unresolved`:`errored`),S(t);for(let e of _.keys())e.decrement();_.clear()},!1)}function te(){let e=fe&&ue(fe),t=v(),n=x();if(n!==void 0&&!s)throw n;return y&&!y.user&&e&&T(()=>{C(),s&&(e.resolved&&g&&u?g.promises.add(s):_.has(e)||(e.increment(),_.add(e)))}),t}function N(e=!0){if(e!==!1&&d)return;d=!1;let t=p?p():i;if(u=g&&g.running,t==null||t===!1){j(s,M(v));return}g&&s&&g.promises.delete(s);let n,r=c===m?M(()=>{try{return a(t,{value:v(),refetching:e})}catch(e){n=e}}):c;if(n!==void 0){j(s,void 0,De(n),t);return}else if(!k(r))return j(s,r,void 0,t),r;return s=r,`v`in r?(r.s===1?j(s,r.v,void 0,t):j(s,void 0,De(r.v),t),r):(d=!0,queueMicrotask(()=>d=!1),P(()=>{A(f?`refreshing`:`pending`),E()},!1),r.then(e=>j(r,e,void 0,t),e=>j(r,void 0,De(e),t)))}Object.defineProperties(te,{state:{get:()=>D()},error:{get:()=>x()},loading:{get(){let e=D();return e===`pending`||e===`refreshing`}},latest:{get(){if(!f)return te();let e=x();if(e&&!s)throw e;return v()}}});let ne=h;return p?T(()=>(ne=h,N(!1))):N(!1),[te,{refetch:e=>ae(ne,()=>N(e)),mutate:b}]}function j(e){return P(e,!1)}function M(e){if(!v&&y===null)return e();let t=y;y=null;try{return v?v.untrack(e):e()}finally{y=t}}function ee(e,t,n){let r=Array.isArray(e),i,a=n&&n.defer;return n=>{let o;if(r){o=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]()}else o=e();if(a)return a=!1,n;let s=M(()=>t(o,i,n));return i=o,s}}function te(e){D(()=>M(e))}function N(e){return h===null||(h.cleanups===null?h.cleanups=[e]:h.cleanups.push(e)),e}function ne(e,t){l||=Symbol(`error`),h=_e(void 0,void 0,!0),h.context={...h.context,[l]:[t]},g&&g.running&&g.sources.add(h);try{return e()}catch(e){ke(e)}finally{h=h.owner}}function re(){return y}function ie(){return h}function ae(e,t){let n=h,r=y;h=e,y=null;try{return P(t,!0)}catch(e){ke(e)}finally{h=n,y=r}}function oe(e){if(g&&g.running)return e(),g.done;let t=y,n=h;return Promise.resolve().then(()=>{y=t,h=n;let r;return(_||fe)&&(r=g||={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0},r.done||=new Promise(e=>r.resolve=e),r.running=!0),P(e,!1),y=h=null,r?r.done:void 0})}var[se,ce]=w(!1);function le(e,t){let n=Symbol(`context`);return{id:n,Provider:je(n),defaultValue:e}}function ue(e){let t;return h&&h.context&&(t=h.context[e.id])!==void 0?t:e.defaultValue}function de(e){let t=O(e),n=O(()=>Ae(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}var fe;function pe(){let e=g&&g.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===d)he(this);else{let e=b;b=null,P(()=>Ce(this),!1),b=e}if(y){let e=this.observers;if(!e||e[e.length-1]!==y){let t=e?e.length:0;y.sources?(y.sources.push(this),y.sourceSlots.push(t)):(y.sources=[this],y.sourceSlots=[t]),e?(e.push(y),this.observerSlots.push(y.sources.length-1)):(this.observers=[y],this.observerSlots=[y.sources.length-1])}}return e&&g.sources.has(this)?this.tValue:this.value}function me(e,t,n){let r=g&&g.running&&g.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(g){let r=g.running;(r||!n&&g.sources.has(e))&&(g.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&P(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=g&&g.running;r&&g.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?b.push(n):x.push(n),n.observers&&we(n)),r?n.tState=d:n.state=d)}if(b.length>1e6)throw b=[],Error()},!1)}return t}function he(e){if(!e.fn)return;Te(e);let t=S;ge(e,g&&g.running&&g.sources.has(e)?e.tValue:e.value,t),g&&!g.running&&g.sources.has(e)&&queueMicrotask(()=>{P(()=>{g&&(g.running=!0),y=h=e,ge(e,e.tValue,t),y=h=null},!1)})}function ge(e,t,n){let r,i=h,a=y;y=h=e;try{r=e.fn(t)}catch(t){return e.pure&&(g&&g.running?(e.tState=d,e.tOwned&&e.tOwned.forEach(Te),e.tOwned=void 0):(e.state=d,e.owned&&e.owned.forEach(Te),e.owned=null)),e.updatedAt=n+1,ke(t)}finally{y=a,h=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?me(e,r,!0):g&&g.running&&e.pure?(g.sources.has(e)||(e.value=r),g.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function _e(e,t,n,r=d,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:h,context:h?h.context:null,pure:n};if(g&&g.running&&(a.state=0,a.tState=r),h===null||h!==p&&(g&&g.running&&h.pure?h.tOwned?h.tOwned.push(a):h.tOwned=[a]:h.owned?h.owned.push(a):h.owned=[a]),v&&a.fn){let e=a.fn,[t,n]=w(void 0,{equals:!1}),r=v.factory(e,n);N(()=>r.dispose());let i,o=()=>oe(n).then(()=>{i&&=(i.dispose(),void 0)});a.fn=n=>(t(),g&&g.running?(i||=v.factory(e,o),i.track(n)):r.track(n))}return a}function ve(e){let t=g&&g.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===f)return Ce(e);if(e.suspense&&M(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<S);){if(t&&g.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(g.disposed.has(t))return}if((t?e.tState:e.state)===d)he(e);else if((t?e.tState:e.state)===f){let t=b;b=null,P(()=>Ce(e,n[0]),!1),b=t}}}function P(e,t){if(b)return e();let n=!1;t||(b=[]),x?n=!0:x=[],S++;try{let t=e();return ye(n),t}catch(e){n||(x=null),b=null,ke(e)}}function ye(e){if(b&&=(_&&g&&g.running?xe(b):be(b),null),e)return;let t;if(g){if(!g.promises.size&&!g.queue.size){let e=g.sources,n=g.disposed;x.push.apply(x,g.effects),t=g.resolve;for(let e of x)`tState`in e&&(e.state=e.tState),delete e.tState;g=null,P(()=>{for(let e of n)Te(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)Te(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}ce(!1)},!1)}else if(g.running){g.running=!1,g.effects.push.apply(g.effects,x),x=null,ce(!0);return}}let n=x;x=null,n.length&&P(()=>u(n),!1),t&&t()}function be(e){for(let t=0;t<e.length;t++)ve(e[t])}function xe(e){for(let t=0;t<e.length;t++){let n=e[t],r=g.queue;r.has(n)||(r.add(n),_(()=>{r.delete(n),P(()=>{g.running=!0,ve(n)},!1),g&&(g.running=!1)}))}}function Se(t){let r,i=0;for(r=0;r<t.length;r++){let e=t[r];e.user?t[i++]=e:ve(e)}if(e.context){if(e.count){e.effects||=[],e.effects.push(...t.slice(0,i));return}n()}for(e.effects&&(e.done||!e.count)&&(t=[...e.effects,...t],i+=e.effects.length,delete e.effects),r=0;r<i;r++)ve(t[r])}function Ce(e,t){let n=g&&g.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===d?i!==t&&(!i.updatedAt||i.updatedAt<S)&&ve(i):e===f&&Ce(i,t)}}}function we(e){let t=g&&g.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=f:r.state=f,r.pure?b.push(r):x.push(r),r.observers&&we(r))}}function Te(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Te(e.tOwned[t]);delete e.tOwned}if(g&&g.running&&e.pure)Ee(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)Te(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}g&&g.running?e.tState=0:e.state=0}function Ee(e,t){if(t||(e.tState=0,g.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)Ee(e.owned[t])}function De(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function Oe(e,t,n){try{for(let n of t)n(e)}catch(e){ke(e,n&&n.owner||null)}}function ke(e,t=h){let n=l&&t&&t.context&&t.context[l],r=De(e);if(!n)throw r;x?x.push({fn(){Oe(r,n,t)},state:d}):Oe(r,n,t)}function Ae(e){if(typeof e==`function`&&!e.length)return Ae(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=Ae(e[n]);if(Array.isArray(r))if(r.length<32768)t.push.apply(t,r);else for(let e=0;e<r.length;e++)t.push(r[e]);else t.push(r)}return t}return e}function je(e,t){return function(t){let n;return E(()=>n=M(()=>(h.context={...h.context,[e]:t.value},de(()=>t.children))),void 0),n}}var Me=Symbol(`fallback`);function Ne(e){for(let t=0;t<e.length;t++)e[t]()}function Pe(e,t,n={}){let r=[],i=[],a=[],o=0,c=t.length>1?[]:null;return N(()=>Ne(a)),()=>{let l=e()||[],u=l.length,d,f;return l[s],M(()=>{let e,t,s,m,h,g,_,v,y;if(u===0)o!==0&&(Ne(a),a=[],r=[],i=[],o=0,c&&=[]),n.fallback&&(r=[Me],i[0]=C(e=>(a[0]=e,n.fallback())),o=1);else if(o===0){for(i=Array(u),f=0;f<u;f++)r[f]=l[f],i[f]=C(p);o=u}else{for(s=Array(u),m=Array(u),c&&(h=Array(u)),g=0,_=Math.min(o,u);g<_&&r[g]===l[g];g++);for(_=o-1,v=u-1;_>=g&&v>=g&&r[_]===l[v];_--,v--)s[v]=i[_],m[v]=a[_],c&&(h[v]=c[_]);for(e=new Map,t=Array(v+1),f=v;f>=g;f--)y=l[f],d=e.get(y),t[f]=d===void 0?-1:d,e.set(y,f);for(d=g;d<=_;d++)y=r[d],f=e.get(y),f!==void 0&&f!==-1?(s[f]=i[d],m[f]=a[d],c&&(h[f]=c[d]),f=t[f],e.set(y,f)):a[d]();for(f=g;f<u;f++)f in s?(i[f]=s[f],a[f]=m[f],c&&(c[f]=h[f],c[f](f))):i[f]=C(p);i=i.slice(0,o=u),r=l.slice(0)}return i});function p(e){if(a[f]=e,c){let[e,n]=w(f);return c[f]=n,t(l[f],e)}return t(l[f])}}}var Fe=!1;function F(t,i){if(Fe&&e.context){let a=e.context;n(r());let o=M(()=>t(i||{}));return n(a),o}return M(()=>t(i||{}))}function Ie(){return!0}var Le={get(e,t,n){return t===a?n:e.get(t)},has(e,t){return t===a?!0:e.has(t)},set:Ie,deleteProperty:Ie,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Ie,deleteProperty:Ie}},ownKeys(e){return e.keys()}};function Re(e){return(e=typeof e==`function`?e():e)?e:{}}function ze(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function I(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t||=!!r&&a in r,e[n]=typeof r==`function`?(t=!0,O(r)):r}if(o&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=Re(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in Re(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(Re(e[n])));return[...new Set(t)]}},Le);let n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i)continue;let a=Object.getOwnPropertyNames(i);for(let e=a.length-1;e>=0;e--){let t=a[e];if(t===`__proto__`||t===`constructor`)continue;let o=Object.getOwnPropertyDescriptor(i,t);if(!r[t])r[t]=o.get?{enumerable:!0,configurable:!0,get:ze.bind(n[t]=[o.get.bind(i)])}:o.value===void 0?void 0:o;else{let e=n[t];e&&(o.get?e.push(o.get.bind(i)):o.value!==void 0&&e.push(()=>o.value))}}}let i={},s=Object.keys(r);for(let e=s.length-1;e>=0;e--){let t=s[e],n=r[t];n&&n.get?Object.defineProperty(i,t,n):i[t]=n?n.value:void 0}return i}function Be(e,...t){let n=t.length;if(o&&a in e){let r=n>1?t.flat():t[0],i=t.map(t=>new Proxy({get(n){return t.includes(n)?e[n]:void 0},has(n){return t.includes(n)&&n in e},keys(){return t.filter(t=>t in e)}},Le));return i.push(new Proxy({get(t){return r.includes(t)?void 0:e[t]},has(t){return r.includes(t)?!1:t in e},keys(){return Object.keys(e).filter(e=>!r.includes(e))}},Le)),i}let r=[];for(let e=0;e<=n;e++)r[e]={};for(let i of Object.getOwnPropertyNames(e)){let a=n;for(let e=0;e<t.length;e++)if(t[e].includes(i)){a=e;break}let o=Object.getOwnPropertyDescriptor(e,i);!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable?r[a][i]=o.value:Object.defineProperty(r[a],i,o)}return r}var Ve=0;function He(){return e.context?e.getNextContextId():`cl-${Ve++}`}var Ue=e=>`Stale read from <${e}>.`;function L(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return O(Pe(()=>e.each,e.children,t||void 0))}function R(e){let t=e.keyed,n=O(()=>e.when,void 0,void 0),r=t?n:O(n,void 0,{equals:(e,t)=>!e==!t});return O(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?M(()=>a(t?i:()=>{if(!M(r))throw Ue(`Show`);return n()})):a}return e.fallback},void 0,void 0)}function We(e){let t=de(()=>e.children),n=O(()=>{let e=t(),n=Array.isArray(e)?e:[e],r=()=>void 0;for(let e=0;e<n.length;e++){let t=e,i=n[e],a=r,o=O(()=>a()?void 0:i.when,void 0,void 0),s=i.keyed?o:O(o,void 0,{equals:(e,t)=>!e==!t});r=()=>a()||(s()?[t,o,i]:void 0)}return r});return O(()=>{let t=n()();if(!t)return e.fallback;let[r,i,a]=t,o=a.children;return typeof o==`function`&&o.length>0?M(()=>o(a.keyed?i():()=>{if(M(n)()?.[0]!==r)throw Ue(`Match`);return i()})):o},void 0,void 0)}function Ge(e){return e}var Ke;function qe(t){let n;e.context&&e.load&&(n=e.load(e.getContextId()));let[r,i]=w(n,void 0);return Ke||=new Set,Ke.add(i),N(()=>Ke.delete(i)),O(()=>{let e;if(e=r()){let n=t.fallback;return typeof n==`function`&&n.length?M(()=>n(e,()=>i())):n}return ne(()=>t.children,i)},void 0,void 0)}var Je=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),Ye=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),Xe=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),Ze=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function Qe(e,t){let n=Ze[e];return typeof n==`object`?n[t]?n.$:void 0:n}var $e=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),et=new Set(`altGlyph.altGlyphDef.altGlyphItem.animate.animateColor.animateMotion.animateTransform.circle.clipPath.color-profile.cursor.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.font.font-face.font-face-format.font-face-name.font-face-src.font-face-uri.foreignObject.g.glyph.glyphRef.hkern.image.line.linearGradient.marker.mask.metadata.missing-glyph.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.svg.switch.symbol.text.textPath.tref.tspan.use.view.vkern`.split(`.`)),tt={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},nt=e=>O(()=>e());function rt(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}var it=`_$DX_DELEGATE`;function at(e,t,n,r={}){let i;return C(r=>{i=r,t===document?e():H(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function z(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>M(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function ot(e,t=window.document){let n=t[it]||(t[it]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,xt))}}function B(e,t,n){_t(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function st(e,t,n,r){_t(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function ct(e,t,n){_t(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function lt(e,t){_t(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function ut(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function dt(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(yt(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(yt(e,i,!0),n[i]=o)}return n}function ft(e,t,n){if(!t)return n?B(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function V(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function pt(e,t={},n,r){let i={};return r||E(()=>i.children=St(e,t.children,i.children)),E(()=>typeof t.ref==`function`&&mt(t.ref,e)),E(()=>ht(e,t,n,!0,i,!0)),i}function mt(e,t,n){return M(()=>e(t,n))}function H(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return St(e,t,r,n);E(r=>St(e,t(),r,n),r)}function ht(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=bt(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||St(e,t.children);continue}let s=t[o];i[o]=bt(e,o,s,i[o],n,a,t)}}function gt(t){let n,r;return!_t()||!(n=e.registry.get(r=Et()))?t():(e.completed&&e.completed.add(n),e.registry.delete(r),n)}function _t(t){return!!e.context&&!e.done&&(!t||t.isConnected)}function vt(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function yt(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function bt(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return ft(e,n,r);if(t===`classList`)return dt(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=$e.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(ut(e,i,n,a),a&&ot([i]))}else if(t.slice(0,5)===`attr:`)B(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)ct(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Ye.has(t))||!i&&((u=Qe(t,e.tagName))||(c=Je.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(_t(e))return n;t===`class`||t===`className`?lt(e,n):s&&!c&&!l?e[vt(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&tt[t.split(`:`)[0]];r?st(e,r,t,n):B(e,Xe[t]||t,n)}return n}function xt(t){if(e.registry&&e.events&&e.events.find(([e,n])=>n===t))return;let n=t.target,r=`$$${t.type}`,i=t.target,a=t.currentTarget,o=e=>Object.defineProperty(t,"target",{configurable:!0,value:e}),s=()=>{let e=n[r];if(e&&!n.disabled){let i=n[`${r}Data`];if(i===void 0?e.call(n,t):e.call(n,i,t),t.cancelBubble)return}return n.host&&typeof n.host!=`string`&&!n.host._$host&&n.contains(t.target)&&o(n.host),!0},c=()=>{for(;s()&&(n=n._$host||n.parentNode||n.host););};if(Object.defineProperty(t,"currentTarget",{configurable:!0,get(){return n||document}}),e.registry&&!e.done&&(e.done=_$HY.done=!0),t.composedPath){let e=t.composedPath();o(e[0]);for(let t=0;t<e.length-2&&(n=e[t],s());t++){if(n._$host){n=n._$host,c();break}if(n.parentNode===a)break}}else c();o(i)}function St(e,t,n,r,i){let a=_t(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=Tt(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=Tt(e,n,r)}else if(o===`function`)return E(()=>{let i=t();for(;typeof i==`function`;)i=i();n=St(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(Ct(o,t,n,i))return E(()=>n=St(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=Tt(e,n,r),s)return n}else c?n.length===0?wt(e,o,r):rt(e,n,o):(n&&Tt(e),wt(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=Tt(e,n,r,t);Tt(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function Ct(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=Ct(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=Ct(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function wt(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Tt(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}function Et(){return e.getNextContextId()}var Dt=`http://www.w3.org/2000/svg`;function Ot(e,t=!1,n=void 0){return t?document.createElementNS(Dt,e):document.createElement(e,{is:n})}function kt(t){let{useShadow:n}=t,r=document.createTextNode(``),i=()=>t.mount||document.body,a=ie(),o,s=!!e.context;return D(()=>{s&&(ie().user=s=!1),o||=ae(a,()=>O(()=>t.children));let e=i();if(e instanceof HTMLHeadElement){let[t,n]=w(!1);C(n=>H(e,()=>t()?n():o(),null)),N(()=>n(!0))}else{let i=Ot(t.isSVG?`g`:`div`,t.isSVG),a=n&&i.attachShadow?i.attachShadow({mode:`open`}):i;Object.defineProperty(i,"_$host",{get(){return r.parentNode},configurable:!0}),H(a,o),e.appendChild(i),t.ref&&t.ref(i),N(()=>e.removeChild(i))}},void 0,{render:!s}),r}function At(t,n){let r=O(t);return O(()=>{let t=r();switch(typeof t){case`function`:return M(()=>t(n));case`string`:let r=et.has(t),i=e.context?gt():Ot(t,r,M(()=>n.is));return pt(i,n,r),i}})}function jt(e){let[,t]=Be(e,[`component`]);return At(()=>e.component,t)}var Mt=z(`<div><div class="text-center space-y-4"><div class="text-2xl font-light text-gray-400"></div><div class=text-gray-500>or</div><label class=inline-block><span class="px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded cursor-pointer transition-colors text-white">Select file</span><input type=file accept=.zip,application/zip class=hidden></label><div class=text-gray-500>or</div><div class="flex items-center gap-2 justify-center"><input type=text placeholder="Enter API URL..."class="px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent w-64 text-gray-900"><button type=button class="px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded transition-colors text-white disabled:opacity-50 disabled:cursor-not-allowed">Load`);function Nt(e){let[t,n]=w(!1),[r,i]=w(``),a=t=>{t.preventDefault(),n(!1);let r=t.dataTransfer?.files;if(!r?.length)return;let i=r[0];(i.type===`application/zip`||i.name.endsWith(`.zip`))&&e.setTraceSource({kind:`local-zip`,file:i})},o=e=>{e.preventDefault(),e.dataTransfer?.types.includes(`Files`)&&n(!0)},s=()=>{n(!1)},c=t=>{let n=t.currentTarget.files;if(!n?.length)return;let r=n[0];(r.type===`application/zip`||r.name.endsWith(`.zip`))&&e.setTraceSource({kind:`local-zip`,file:r})},l=()=>{let t=r().trim();t&&e.setTraceSource({kind:`remote-api`,url:t})},u=e=>{e.key===`Enter`&&l()};return(()=>{var e=Mt(),n=e.firstChild.firstChild,d=n.nextSibling.nextSibling,f=d.firstChild.nextSibling,p=d.nextSibling.nextSibling.firstChild,m=p.nextSibling;return e.addEventListener(`dragleave`,s),e.addEventListener(`dragover`,o),e.addEventListener(`drop`,a),H(n,()=>t()?`Drop trace ZIP file here`:`Drop Playwright OpenTelemetry trace to load`),f.addEventListener(`change`,c),p.$$keydown=u,p.$$input=e=>i(e.currentTarget.value),m.$$click=l,E(n=>{var i=`flex-1 flex items-center justify-center ${t()?`bg-blue-900/20`:``}`,a=!r().trim();return i!==n.e&&lt(e,n.e=i),a!==n.t&&(m.disabled=n.t=a),n},{e:void 0,t:void 0}),E(()=>p.value=r()),e})()}ot([`input`,`keydown`,`click`]);var Pt=new Set([`playwright.test`,`playwright.test.step`]);function Ft(e){let t=[],n=[],r=[];for(let i of e)Pt.has(i.name)?t.push(i):i.serviceName===`playwright-browser`?n.push(i):r.push(i);return{steps:t,browserSpans:n,externalSpans:r}}function It(e,t){let n=[];for(let r of e.resourceSpans){let e=Lt(r.resource.attributes);for(let i of r.scopeSpans)for(let r of i.spans)n.push(Rt(r,t,e))}return n.sort((e,t)=>e.startOffsetMs-t.startOffsetMs),n}function Lt(e){for(let t of e)if(t.key===`service.name`&&t.value.stringValue)return t.value.stringValue;return`unknown`}function Rt(e,t,n){let r=Ht(e.attributes),i=Gt(e.startTimeUnixNano),a=Gt(e.endTimeUnixNano);return{id:e.spanId,parentId:e.parentSpanId??null,traceId:e.traceId,name:e.name,title:Wt(r,e.name),startOffsetMs:i-t,durationMs:a-i,kind:Bt(e.kind),attributes:r,serviceName:n}}var zt={UNSPECIFIED:0,INTERNAL:1,SERVER:2,CLIENT:3,PRODUCER:4,CONSUMER:5};function Bt(e){switch(e){case zt.SERVER:return`server`;case zt.CLIENT:return`client`;case zt.PRODUCER:return`producer`;case zt.CONSUMER:return`consumer`;default:return`internal`}}var Vt=[`test.step.title`,`test.case.title`];function Ht(e){let t={};for(let n of e){let e=Ut(n);e!==void 0&&(t[n.key]=e)}return t}function Ut(e){let{value:t}=e;if(t.stringValue!==void 0)return t.stringValue;if(t.intValue!==void 0)return t.intValue;if(t.doubleValue!==void 0)return t.doubleValue;if(t.boolValue!==void 0)return t.boolValue;if(t.arrayValue!==void 0)return t.arrayValue.values.flatMap(e=>e.stringValue===void 0?[]:[e.stringValue])}function Wt(e,t){for(let t of Vt){let n=e[t];if(typeof n==`string`&&n.length>0)return n}return t}function Gt(e){let t=BigInt(e);return Number(t/BigInt(1e6))}var Kt,qt={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function Jt(e){return!e&&!Kt?qt:{lang:e?.lang??Kt?.lang,message:e?.message,abortEarly:e?.abortEarly??Kt?.abortEarly,abortPipeEarly:e?.abortPipeEarly??Kt?.abortPipeEarly}}var Yt;function Xt(e){return Yt?.get(e)}var Zt;function Qt(e){return Zt?.get(e)}var $t;function en(e,t){return $t?.get(e)?.get(t)}function tn(e){let t=typeof e;return t===`string`?`"${e}"`:t===`number`||t===`bigint`||t===`boolean`?`${e}`:t===`object`||t===`function`?(e&&Object.getPrototypeOf(e)?.constructor?.name)??`null`:t}function nn(e,t,n,r,i){let a=i&&`input`in i?i.input:n.value,o=i?.expected??e.expects??null,s=i?.received??tn(a),c={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:`R`}eceived ${s}`,requirement:e.requirement,path:i?.path,issues:i?.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},l=e.kind===`schema`,u=i?.message??e.message??en(e.reference,c.lang)??(l?Qt(c.lang):null)??r.message??Xt(c.lang);u!==void 0&&(c.message=typeof u==`function`?u(c):u),l&&(n.typed=!1),n.issues?n.issues.push(c):n.issues=[c]}var rn=new WeakMap;function an(e){let t=rn.get(e);return t||(t={version:1,vendor:`valibot`,validate(t){return e[`~run`]({value:t},Jt())}},rn.set(e,t)),t}var on=class extends Error{constructor(e){super(e[0].message),this.name=`ValiError`,this.issues=e}};function sn(e,t,n){return typeof e.fallback==`function`?e.fallback(t,n):e.fallback}function cn(e,t){return{...e,fallback:t,get"~standard"(){return an(this)},"~run"(t,n){let r=e[`~run`](t,n);return r.issues?{typed:!0,value:sn(this,r,n)}:r}}}function ln(e,t,n){return typeof e.default==`function`?e.default(t,n):e.default}function un(e,t){return{kind:`schema`,type:`array`,reference:un,expects:`Array`,async:!1,item:e,message:t,get"~standard"(){return an(this)},"~run"(e,t){let n=e.value;if(Array.isArray(n)){e.typed=!0,e.value=[];for(let r=0;r<n.length;r++){let i=n[r],a=this.item[`~run`]({value:i},t);if(a.issues){let o={type:`array`,origin:`value`,input:n,key:r,value:i};for(let t of a.issues)t.path?t.path.unshift(o):t.path=[o],e.issues?.push(t);if(e.issues||=a.issues,t.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}}else nn(this,`type`,e,t);return e}}}function dn(e){return{kind:`schema`,type:`boolean`,reference:dn,expects:`boolean`,async:!1,message:e,get"~standard"(){return an(this)},"~run"(e,t){return typeof e.value==`boolean`?e.typed=!0:nn(this,`type`,e,t),e}}}function fn(e){return{kind:`schema`,type:`number`,reference:fn,expects:`number`,async:!1,message:e,get"~standard"(){return an(this)},"~run"(e,t){return typeof e.value==`number`&&!isNaN(e.value)?e.typed=!0:nn(this,`type`,e,t),e}}}function pn(e,t){return{kind:`schema`,type:`object`,reference:pn,expects:`Object`,async:!1,entries:e,message:t,get"~standard"(){return an(this)},"~run"(e,t){let n=e.value;if(n&&typeof n==`object`){e.typed=!0,e.value={};for(let r in this.entries){let i=this.entries[r];if(r in n||(i.type===`exact_optional`||i.type===`optional`||i.type===`nullish`)&&i.default!==void 0){let a=r in n?n[r]:ln(i),o=i[`~run`]({value:a},t);if(o.issues){let i={type:`object`,origin:`value`,input:n,key:r,value:a};for(let t of o.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||=o.issues,t.abortEarly){e.typed=!1;break}}o.typed||(e.typed=!1),e.value[r]=o.value}else if(i.fallback!==void 0)e.value[r]=sn(i);else if(i.type!==`exact_optional`&&i.type!==`optional`&&i.type!==`nullish`&&(nn(this,`key`,e,t,{input:void 0,expected:`"${r}"`,path:[{type:`object`,origin:`key`,input:n,key:r,value:n[r]}]}),t.abortEarly))break}}else nn(this,`type`,e,t);return e}}}function mn(e,t){return{kind:`schema`,type:`optional`,reference:mn,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return an(this)},"~run"(e,t){return e.value===void 0&&(this.default!==void 0&&(e.value=ln(this,e,t)),e.value===void 0)?(e.typed=!0,e):this.wrapped[`~run`](e,t)}}}function U(e){return{kind:`schema`,type:`string`,reference:U,expects:`string`,async:!1,message:e,get"~standard"(){return an(this)},"~run"(e,t){return typeof e.value==`string`?e.typed=!0:nn(this,`type`,e,t),e}}}function hn(){return{kind:`schema`,type:`unknown`,reference:hn,expects:`unknown`,async:!1,get"~standard"(){return an(this)},"~run"(e){return e.typed=!0,e}}}function gn(e,t,n){let r=e[`~run`]({value:t},Jt(n));if(r.issues)throw new on(r.issues);return r.value}var _n=pn({key:U(),value:pn({stringValue:mn(U()),intValue:mn(fn()),doubleValue:mn(fn()),boolValue:mn(dn()),arrayValue:mn(pn({values:un(pn({stringValue:mn(U()),intValue:mn(fn()),doubleValue:mn(fn()),boolValue:mn(dn())}))}))})}),vn=pn({resourceSpans:un(pn({resource:pn({attributes:un(_n)}),scopeSpans:un(pn({scope:pn({name:U(),version:U()}),spans:un(pn({traceId:U(),spanId:U(),parentSpanId:mn(U()),name:U(),kind:fn(),startTimeUnixNano:U(),endTimeUnixNano:U(),attributes:un(_n),droppedAttributesCount:cn(fn(),0),events:un(hn()),droppedEventsCount:cn(fn(),0),status:pn({code:fn(),message:mn(U())}),links:un(hn()),droppedLinksCount:cn(fn(),0)}))}))}))});function yn(e){return gn(vn,e)}var bn=Symbol(`store-raw`),xn=Symbol(`store-node`),Sn=Symbol(`store-has`),Cn=Symbol(`store-self`);function wn(e){let t=e[a];if(!t&&(Object.defineProperty(e,a,{value:t=new Proxy(e,Mn)}),!Array.isArray(e))){let n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e),i=Object.getPrototypeOf(e),a=i!==null&&typeof e==`object`&&!!e&&!Array.isArray(e)&&i!==Object.prototype;if(a){let e=Object.getOwnPropertyDescriptors(i);n.push(...Object.keys(e)),Object.assign(r,e)}for(let i=0,o=n.length;i<o;i++){let o=n[i];a&&o===`constructor`||r[o].get&&Object.defineProperty(e,o,{configurable:!0,enumerable:r[o].enumerable,get:r[o].get.bind(t)})}}return t}function Tn(e){let t;return typeof e==`object`&&!!e&&(e[a]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function En(e,t=new Set){let n,r,i,a;if(n=e!=null&&e[bn])return n;if(!Tn(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,a=e.length;n<a;n++)i=e[n],(r=En(i,t))!==i&&(e[n]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);let n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let s=0,c=n.length;s<c;s++)a=n[s],!o[a].get&&(i=e[a],(r=En(i,t))!==i&&(e[a]=r))}return e}function Dn(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function On(e,t,n){if(e[t])return e[t];let[r,i]=w(n,{equals:!1,internal:!0});return r.$=i,e[t]=r}function kn(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===a||t===xn?n:(delete n.value,delete n.writable,n.get=()=>e[a][t],n)}function An(e){re()&&On(Dn(e,xn),Cn)()}function jn(e){return An(e),Reflect.ownKeys(e)}var Mn={get(e,t,n){if(t===bn)return e;if(t===a)return n;if(t===s)return An(e),n;let r=Dn(e,xn),i=r[t],o=i?i():e[t];if(t===xn||t===Sn||t===`__proto__`)return o;if(!i){let n=Object.getOwnPropertyDescriptor(e,t);re()&&(typeof o!=`function`||e.hasOwnProperty(t))&&!(n&&n.get)&&(o=On(r,t,o)())}return Tn(o)?wn(o):o},has(e,t){return t===bn||t===a||t===s||t===xn||t===Sn||t===`__proto__`?!0:(re()&&On(Dn(e,Sn),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:jn,getOwnPropertyDescriptor:kn};function Nn(e,t,n,r=!1){if(t===`__proto__`||!r&&e[t]===n)return;let i=e[t],a=e.length;n===void 0?(delete e[t],e[Sn]&&e[Sn][t]&&i!==void 0&&e[Sn][t].$()):(e[t]=n,e[Sn]&&e[Sn][t]&&i===void 0&&e[Sn][t].$());let o=Dn(e,xn),s;if((s=On(o,t,i))&&s.$(()=>n),Array.isArray(e)&&e.length!==a){for(let t=e.length;t<a;t++)(s=o[t])&&s.$();(s=On(o,`length`,a))&&s.$(e.length)}(s=o[Cn])&&s.$()}function Pn(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];Fn(i)||Nn(e,i,t[i])}}function Fn(e){return e===`__proto__`||e===`constructor`||e===`prototype`}function In(e,t){if(typeof t==`function`&&(t=t(e)),t=En(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){let r=t[n];e[n]!==r&&Nn(e,n,r)}Nn(e,`length`,r)}else Pn(e,t)}function Ln(e,t,n=[]){let r,i=e;if(t.length>1){r=t.shift();let a=typeof r,o=Array.isArray(e);if(a===`string`&&(r===`__proto__`||t.length>1&&Fn(r)))return;if(Array.isArray(r)){for(let i=0;i<r.length;i++)Ln(e,[r[i]].concat(t),n);return}else if(o&&a===`function`){for(let i=0;i<e.length;i++)r(e[i],i)&&Ln(e,[i].concat(t),n);return}else if(o&&a===`object`){let{from:i=0,to:a=e.length-1,by:o=1}=r;for(let r=i;r<=a;r+=o)Ln(e,[r].concat(t),n);return}else if(t.length>1){Ln(e[r],t,[r].concat(n));return}i=e[r],n=[r].concat(n)}let a=t[0];typeof a==`function`&&(a=a(i,n),a===i)||r===void 0&&a==null||(a=En(a),r===void 0||Tn(i)&&Tn(a)&&!Array.isArray(a)?Pn(i,a):Nn(e,r,a))}function Rn(...[e,t]){let n=En(e||{}),r=Array.isArray(n),i=wn(n);function a(...e){j(()=>{r&&e.length===1?In(n,e[0]):Ln(n,e)})}return[i,a]}var zn=new WeakMap,Bn={get(e,t){if(t===bn)return e;let n=e[t];if(t===a||t===s||t===xn||t===Sn||t===`__proto__`)return n;let r;return Tn(n)?zn.get(n)||(zn.set(n,r=new Proxy(n,Bn)),r):n},set(e,t,n){return Nn(e,t,En(n)),!0},deleteProperty(e,t){return Nn(e,t,void 0,!0),!0}};function Vn(e){return t=>{if(Tn(t)){let n;(n=zn.get(t))||zn.set(t,n=new Proxy(t,Bn)),e(n)}return t}}function Hn(e){let[t,n]=Rn(Wn()),r=null;return D(ee(e,e=>{if(r&&r.abort(),!e){n(Wn());return}r=new AbortController;let t=r.signal,i=Gn(e.testInfo.startTimeUnixNano);n({status:`loading`,steps:[],browserSpans:[],externalSpans:[],totalDurationMs:Kn(e),error:void 0}),Un(e,i,t,n)})),N(()=>{r&&r.abort()}),{status:()=>t.status,isLoading:()=>t.status===`loading`,steps:()=>t.steps,browserSpans:()=>t.browserSpans,externalSpans:()=>t.externalSpans,totalDurationMs:()=>t.totalDurationMs,error:()=>t.error}}async function Un(e,t,n,r){try{if(n.aborted)return;let i=Ft(It(e.traceData,t));if(n.aborted)return;r(Vn(e=>{e.steps=i.steps,e.browserSpans=i.browserSpans,e.externalSpans=i.externalSpans,e.status=`loaded`}))}catch(e){if(n.aborted)return;throw r(Vn(t=>{t.status=`error`,t.error=e instanceof Error?e:Error(String(e))})),e}}function Wn(){return{status:`idle`,steps:[],browserSpans:[],externalSpans:[],totalDurationMs:0}}function Gn(e){let t=BigInt(e);return Number(t/BigInt(1e6))}function Kn(e){let t=Gn(e.testInfo.startTimeUnixNano);return Gn(e.testInfo.endTimeUnixNano)-t}var qn=`playwright.test`;function Jn(e){let t=Xn(Yn(e));if(!t)throw Error(`Unable to derive test info: no ${qn} span found in OTLP trace data`);let n=Zn(t.attributes??[]);return{name:$n(n,`test.case.title`)??t.name,describes:tr(n,`playwright.test.describes`),file:$n(n,`code.file.path`)??``,line:er(n,`code.line.number`)??0,status:nr($n(n,`playwright.test.status`)),traceId:t.traceId,startTimeUnixNano:t.startTimeUnixNano,endTimeUnixNano:t.endTimeUnixNano}}function Yn(e){return e.resourceSpans.flatMap(e=>e.scopeSpans.flatMap(e=>e.spans.filter(e=>e.name===qn)))}function Xn(e){let t=e.filter(e=>!e.parentSpanId);return(t.length>0?t:e).sort((e,t)=>e.startTimeUnixNano.localeCompare(t.startTimeUnixNano))[0]}function Zn(e){let t={};for(let n of e){let e=Qn(n);e!==void 0&&(t[n.key]=e)}return t}function Qn(e){let{value:t}=e;if(t.stringValue!==void 0)return t.stringValue;if(t.intValue!==void 0)return t.intValue;if(t.doubleValue!==void 0)return t.doubleValue;if(t.boolValue!==void 0)return t.boolValue;if(t.arrayValue!==void 0)return t.arrayValue.values.flatMap(e=>e.stringValue===void 0?[]:[e.stringValue])}function $n(e,t){let n=e[t];return typeof n==`string`?n:void 0}function er(e,t){let n=e[t];return typeof n==`number`?n:void 0}function tr(e,t){let n=e[t];return Array.isArray(n)?n:[]}function nr(e){switch(e){case`failed`:case`skipped`:case`timedOut`:case`interrupted`:return e;default:return`passed`}}var rr=`traces`,ir=`screenshots`;async function ar(e){let t=e.replace(/\/$/,``),n=`${t}/${rr}`,r=await fetch(n);if(!r.ok){let e=await r.text();throw Error(`Failed to fetch trace data from ${n}: ${r.status} ${e}`)}let i=yn(await r.json()),a=Jn(i),o=`${t}/${ir}`,s=[],c=await fetch(o);if(!c.ok){let e=await c.text();throw Error(`Failed to fetch screenshots list from ${o}: ${c.statusText} ${e}`)}let l=await c.json();for(let e of l.screenshots)s.push({timestamp:e.timestamp,url:`${t}/${ir}/${e.file}`});return s.sort((e,t)=>e.timestamp-t.timestamp),{testInfo:a,traceData:i,screenshots:s}}function or(){return`/`.endsWith(`/`)?`/`:`//`}function sr(e){let t=or();return`${t.endsWith(`/`)?t:`${t}/`}${e.startsWith(`/`)?e.slice(1):e}`}async function cr(){if(!(`serviceWorker`in navigator))throw Error(`Service Workers are not supported in this browser`);let e=or(),t=mr(),n=hr(),r=await navigator.serviceWorker.register(t,{scope:e,type:n});return await navigator.serviceWorker.ready,await ur(await lr(r)),r}async function lr(e){return e.active?e.active:new Promise((t,n)=>{let r=setTimeout(()=>{n(Error(`Timeout waiting for service worker to activate`))},1e4),i=()=>{e.active&&(clearTimeout(r),e.installing?.removeEventListener(`statechange`,i),e.waiting?.removeEventListener(`statechange`,i),t(e.active))};e.installing?.addEventListener(`statechange`,i),e.waiting?.addEventListener(`statechange`,i),e.active&&(clearTimeout(r),t(e.active))})}async function ur(e){return new Promise((t,n)=>{let r=setTimeout(()=>{n(Error(`Service worker did not respond to ping`))},5e3),i=e=>{e.data?.type===`PONG`&&(clearTimeout(r),navigator.serviceWorker.removeEventListener(`message`,i),t())};navigator.serviceWorker.addEventListener(`message`,i),e.postMessage({type:`PING`})})}async function dr(e){let t=(await navigator.serviceWorker.ready).active;if(!t)throw Error(`No active service worker`);return new Promise((n,r)=>{let i=setTimeout(()=>{navigator.serviceWorker.removeEventListener(`message`,a),r(Error(`Timeout loading trace in service worker`))},3e4),a=e=>{e.data?.type===`TRACE_LOADED`?(clearTimeout(i),navigator.serviceWorker.removeEventListener(`message`,a),n(e.data.data)):e.data?.type===`TRACE_LOAD_ERROR`&&(clearTimeout(i),navigator.serviceWorker.removeEventListener(`message`,a),r(Error(`Service worker error: ${e.data.error||`Unknown error`}`)))};navigator.serviceWorker.addEventListener(`message`,a),t.postMessage({type:`LOAD_TRACE`,data:e})})}async function fr(){let e=(await navigator.serviceWorker.ready).active;e&&e.postMessage({type:`UNLOAD_TRACE`})}function pr(e){return sr(`playwright-otel-trace-viewer/v1/${e}`)}function mr(){return sr(`sw.js`)}function hr(){return`classic`}var gr=null;async function _r(e){return await xr(),await br(),yr(e)}async function vr(e){await xr(),await br();let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch ZIP from ${e}: ${t.statusText}`);return yr(await t.blob())}async function yr(e){let t=await dr({zip:e}),n=pr(t.traceId);return{testInfo:Jn(t.traceData),traceData:t.traceData,screenshots:t.screenshotMetas.map(e=>({timestamp:e.timestamp,url:`${n}/screenshots/${e.file}`}))}}async function br(){await fr()}async function xr(){return gr||=cr(),gr}var Sr=z(`<div class="flex flex-1 items-center justify-center"><div class=text-center><div class=mb-2>Loading trace...</div><div class="text-sm text-gray-500">`),Cr=z(`<div class="flex flex-1 items-center justify-center"><div class="text-center text-red-600"><div class="mb-2 font-semibold">Failed to load trace</div><div class=text-sm>`);function wr(e){let t=Tr(()=>e.source);return F(We,{get children(){return[F(Ge,{get when(){return t.loading},get children(){var t=Sr(),n=t.firstChild.firstChild.nextSibling;return H(n,()=>e.source.kind===`local-zip`&&`Extracting ZIP file...`,null),H(n,()=>e.source.kind===`remote-zip`&&`Downloading and extracting ZIP...`,null),H(n,()=>e.source.kind===`remote-api`&&`Fetching trace data...`,null),t}}),F(Ge,{get when(){return t.error},get children(){var e=Cr(),n=e.firstChild.firstChild.nextSibling;return H(n,()=>String(t.error)),e}}),F(Ge,{get when(){return t()},children:t=>e.children(t())})]}})}function Tr(e){let[t]=A(e,async e=>{if(e)return Er(e)});return N(()=>{br()}),t}async function Er(e){switch(e.kind){case`local-zip`:return _r(e.file);case`remote-zip`:return vr(e.url);case`remote-api`:return ar(e.url)}}var Dr=`traceSource`;function Or(){let[e,t]=w(kr());return typeof window<`u`&&window.addEventListener(`popstate`,()=>{t(kr())}),[e,e=>{t(e),Ar(e)}]}function kr(){return jr(new URLSearchParams(window.location.search).get(Dr))}function Ar(e){let t=new URLSearchParams(window.location.search);e?t.set(Dr,Mr(e)):t.delete(Dr);let n=new URL(window.location.href);n.search=t.toString(),window.history.pushState(null,``,n.toString())}function jr(e){if(!e||e.trim()===``)return null;let t=e.trim();return t===`local-zip`||t.startsWith(`local-zip:`)?null:t.endsWith(`.zip`)?{kind:`remote-zip`,url:t}:{kind:`remote-api`,url:t}}function Mr(e){switch(e.kind){case`local-zip`:return`local-zip:${e.file.name}`;case`remote-zip`:return e.url;case`remote-api`:return e.url}}var Nr=1,Pr=100,Fr=10;function Ir(e,t,n){let r=Hr(e),i=1+n,a=Math.max(Nr,Math.min(Pr,r*i)),o=e.totalDurationMs/a;o=Math.max(Fr,o);let s=Wr(t,e)-t*o;return Jr({visibleStartMs:s,visibleEndMs:s+o,totalDurationMs:e.totalDurationMs})}function Lr(e,t){return Jr({visibleStartMs:e.visibleStartMs+t,visibleEndMs:e.visibleEndMs+t,totalDurationMs:e.totalDurationMs})}function Rr(e){return Br(e.totalDurationMs)}function zr(e,t,n,r=.1){let i=(n-t)*r;return Jr({visibleStartMs:t-i,visibleEndMs:n+i,totalDurationMs:e.totalDurationMs})}function Br(e){return{visibleStartMs:0,visibleEndMs:e,totalDurationMs:e}}function Vr(e){return e.visibleEndMs-e.visibleStartMs}function Hr(e){let t=Vr(e);return t<=0?1:e.totalDurationMs/t}function Ur(e,t){let n=Vr(t);return n<=0?0:(e-t.visibleStartMs)/n}function Wr(e,t){let n=Vr(t);return t.visibleStartMs+e*n}function Gr(e,t){return t.totalDurationMs<=0?0:e/t.totalDurationMs}function Kr(e,t,n){return t>n.visibleStartMs&&e<n.visibleEndMs}function qr(e){return e.visibleStartMs<=0&&e.visibleEndMs>=e.totalDurationMs}function Jr(e){let t=Vr(e),n=Math.min(t,e.totalDurationMs),r=e.visibleStartMs,i=e.visibleEndMs;return n<t&&(i=r+n),r<0&&(r=0,i=n),i>e.totalDurationMs&&(i=e.totalDurationMs,r=Math.max(0,i-n)),{visibleStartMs:r,visibleEndMs:i,totalDurationMs:e.totalDurationMs}}var Yr=le();function Xr(e){let[t,n]=w(Br(e.durationMs()||1e3)),[r,i]=w(null);O(()=>{let t=e.durationMs();t>0&&n(Br(t))});let a={viewport:t,durationMs:e.durationMs,testStartTimeMs:e.testStartTimeMs,setViewport:n,pan:e=>{n(t=>Lr(t,e))},zoom:(e,t)=>{n(n=>Ir(n,e,t))},zoomToRange:(e,t)=>{n(n=>zr(n,e,t))},reset:()=>{n(e=>Rr(e))},selectionState:r,startSelection:e=>{i({startPosition:e,currentPosition:e})},updateSelection:e=>{i(t=>t?{startPosition:t.startPosition,currentPosition:e}:null)},endSelection:()=>{let e=r();return i(null),e}};return F(Yr.Provider,{value:a,get children(){return e.children}})}function Zr(){let e=ue(Yr);if(!e)throw Error(`useViewportContext must be used within a ViewportProvider`);return e}var Qr=2;function $r(e,t){let n=e.startOffset+e.duration,r=t.startOffset+t.duration;return!(n+Qr<=t.startOffset||r+Qr<=e.startOffset)}function ei(e,t,n){for(let r=n;r<t.length;r++)if(!t[r].some(t=>$r(e,t)))return r;return t.length}function ti(e){if(e.length===0)return{spans:[],totalRows:0};let t=new Map,n=[],r=[];for(let i of e){let e=0;if(i.parentId!==null){let n=t.get(i.parentId);n!==void 0&&(e=n+1)}let a=ei(i,n,e);for(;n.length<=a;)n.push([]);n[a].push({startOffset:i.startOffset,duration:i.duration}),t.set(i.id,a),r.push({...i,row:a})}return{spans:r,totalRows:n.length}}var ni={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},ri=le({size:24,color:`currentColor`,strokeWidth:2,absoluteStrokeWidth:!1,class:``}),ii=z(`<svg>`),ai=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},oi=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),si=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),ci=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),li=e=>{let t=si(e);return t.charAt(0).toUpperCase()+t.slice(1)},ui=e=>{let[t,n]=Be(e,[`color`,`size`,`strokeWidth`,`children`,`class`,`name`,`iconNode`,`absoluteStrokeWidth`]),r=ue(ri);return(()=>{var e=ii();return pt(e,I(ni,{get width(){return t.size??r.size??ni.width},get height(){return t.size??r.size??ni.height},get stroke(){return t.color??r.color??ni.stroke},get"stroke-width"(){return nt(()=>(t.absoluteStrokeWidth??r.absoluteStrokeWidth)===!0)()?Number(t.strokeWidth??r.strokeWidth??ni[`stroke-width`])*24/Number(t.size??r.size):Number(t.strokeWidth??r.strokeWidth??ni[`stroke-width`])},get class(){return oi(`lucide`,`lucide-icon`,r.class,...t.name==null?[]:[`lucide-${ci(li(t.name))}`,`lucide-${ci(t.name)}`],t.class)},get"aria-hidden"(){return!t.children&&!ai(n)?`true`:void 0}},n),!0,!0),H(e,F(L,{get each(){return t.iconNode},children:([e,t])=>F(jt,I({component:e},t))})),e})()},di=[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]],fi=e=>F(ui,I(e,{iconNode:di,name:`braces`})),pi=[[`path`,{d:`m11 10 3 3`,key:`fzmg1i`}],[`path`,{d:`M6.5 21A3.5 3.5 0 1 0 3 17.5a2.62 2.62 0 0 1-.708 1.792A1 1 0 0 0 3 21z`,key:`p4q2r7`}],[`path`,{d:`M9.969 17.031 21.378 5.624a1 1 0 0 0-3.002-3.002L6.967 14.031`,key:`wy6l02`}]],mi=e=>F(ui,I(e,{iconNode:pi,name:`brush`})),hi=[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]],gi=e=>F(ui,I(e,{iconNode:hi,name:`code`})),_i=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]],vi=e=>F(ui,I(e,{iconNode:_i,name:`file`})),yi=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]],bi=e=>F(ui,I(e,{iconNode:yi,name:`file-text`})),xi=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M7 3v18`,key:`bbkbws`}],[`path`,{d:`M3 7.5h4`,key:`zfgn84`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`path`,{d:`M3 16.5h4`,key:`1230mu`}],[`path`,{d:`M17 3v18`,key:`in4fa5`}],[`path`,{d:`M17 7.5h4`,key:`myr1c1`}],[`path`,{d:`M17 16.5h4`,key:`go4c1d`}]],Si=e=>F(ui,I(e,{iconNode:xi,name:`film`})),Ci=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]],wi=e=>F(ui,I(e,{iconNode:Ci,name:`image`})),Ti=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]],Ei=e=>F(ui,I(e,{iconNode:Ti,name:`panel-top`})),Di=[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]],Oi=e=>F(ui,I(e,{iconNode:Di,name:`type`}));function ki(e){let t=e.attributes[`url.path`];if(typeof t==`string`){if(Ai(e)===`page`)return t;let n=t.split(`/`).filter(Boolean);return n[n.length-1]||t}return e.title}function Ai(e){if(e.attributes[`browser.resource.type`]===`page`)return`page`;let t=e.attributes[`http.resource.type`];if(typeof t==`string`)switch(t){case`document`:return`document`;case`stylesheet`:return`stylesheet`;case`image`:return`image`;case`script`:return`script`;case`fetch`:case`xhr`:return`fetch`;case`font`:return`font`;case`media`:return`media`;default:return`other`}return`other`}function ji(e){return{page:`#7c8cf8`,document:`#4285f4`,stylesheet:`#34a853`,image:`#9c27b0`,script:`#f5a623`,fetch:`#fbbc04`,font:`#ea4335`,media:`#00bcd4`,other:`#9e9e9e`}[e]}function Mi(e,t=14){let n={size:t,class:`flex-shrink-0`};switch(e){case`page`:return F(Ei,n);case`document`:return F(bi,n);case`stylesheet`:return F(mi,n);case`image`:return F(wi,n);case`script`:return F(gi,n);case`fetch`:return F(fi,n);case`font`:return F(Oi,n);case`media`:return F(Si,n);case`other`:return F(vi,n)}}var Ni=z(`<span class="truncate select-none">`),Pi=z(`<div role=listitem class="absolute h-6 rounded-xs text-xs flex items-center gap-1.5 text-white truncate cursor-pointer hover:brightness-110 select-none">`),Fi=2;function Ii(e,t,n){let r=Ur(e,n)*100,i=Ur(e+t,n)*100-r;return{leftPercent:r,widthPercent:i,displayWidthPercent:i>Fi?i:i-.1,shouldShowContent:i>Fi}}function Li(e,t,n){return n?e===n:t?.has(e)??!1}function Ri(e){let{viewport:t}=Zr(),n=()=>Ii(e.startOffset,e.duration,t()),r=()=>Li(e.id,e.matchedSpanIds,e.hoveredSearchSpanId),i=()=>n().shouldShowContent?[nt(()=>e.icon),(()=>{var t=Ni();return H(t,()=>e.name),t})()]:null;return(()=>{var t=Pi();return t.addEventListener(`mouseleave`,()=>e.onHover?.(null)),t.addEventListener(`mouseenter`,()=>e.onHover?.(e.id)),H(t,i),E(i=>{var a=e.name,o=e.id,s=e.name,c=e.startOffset,l=e.duration,u=e.startOffset+e.duration,d=e.row,f={"ring-2 ring-yellow-400 ring-offset-1":r(),"px-2":n().shouldShowContent},p=`${n().leftPercent}%`,m=`${n().displayWidthPercent}%`,h=`${e.row*28}px`,g=e.color,_=`${e.name} (${e.duration}ms)`;return a!==i.e&&B(t,`aria-label`,i.e=a),o!==i.t&&B(t,`data-span-id`,i.t=o),s!==i.a&&B(t,`data-span-name`,i.a=s),c!==i.o&&B(t,`data-span-start-ms`,i.o=c),l!==i.i&&B(t,`data-span-duration-ms`,i.i=l),u!==i.n&&B(t,`data-span-end-ms`,i.n=u),d!==i.s&&B(t,`data-span-row`,i.s=d),i.h=dt(t,f,i.h),p!==i.r&&V(t,`left`,i.r=p),m!==i.d&&V(t,`width`,i.d=m),h!==i.l&&V(t,`top`,i.l=h),g!==i.u&&V(t,`background-color`,i.u=g),_!==i.c&&B(t,`title`,i.c=_),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0}),t})()}var zi=z(`<div class="flex-1 overflow-y-auto overflow-x-hidden p-3"role=list><div class=relative>`),Bi=z(`<div class="h-full flex flex-col bg-gray-50 overflow-hidden"role=region aria-label="Browser Spans"><div class="flex-shrink-0 px-3 py-2 border-b border-gray-200 text-xs font-semibold text-gray-500 uppercase tracking-wide">Browser Spans`),Vi=z(`<div class="flex-1 flex items-center justify-center text-sm text-gray-400">No browser spans`);function Hi(e){return e.map(e=>({id:e.id,name:ki(e),startOffset:e.startOffsetMs,duration:e.durationMs,parentId:e.parentId}))}function Ui(e){let{viewport:t}=Zr(),n=O(()=>ti(Hi(e.spans))),r=O(()=>{let t=new Map;for(let n of e.spans)t.set(n.id,Ai(n));return t}),i=O(()=>n().spans.filter(e=>Kr(e.startOffset,e.startOffset+e.duration,t()))),a=()=>n().totalRows*28,o=()=>e.spans.length===0;return(()=>{var t=Bi();return t.firstChild,H(t,F(R,{get when(){return!o()},get fallback(){return Vi()},get children(){var t=zi(),n=t.firstChild;return H(n,F(L,{get each(){return i()},children:t=>{let n=r().get(t.id)??`other`;return F(Ri,{get id(){return t.id},get name(){return t.name},get startOffset(){return t.startOffset},get duration(){return t.duration},get row(){return t.row},get color(){return ji(n)},get icon(){return Mi(n)},get onHover(){return e.onSpanHover},get matchedSpanIds(){return e.matchedSpanIds},get hoveredSearchSpanId(){return e.hoveredSearchSpanId}})}})),E(e=>V(n,`height`,`${a()}px`)),t}}),null),t})()}function Wi(e,t,n,r,i){return{screenshot:Gi(e,r,i),steps:Ki(e,t),spans:Ki(e,n)}}function Gi(e,t,n){if(t.length===0)return null;let r=n+e,i=null;for(let e of t)e.timestamp<=r&&(!i||e.timestamp>i.timestamp)&&(i=e);return i}function Ki(e,t){let n=t.filter(t=>{let n=t.startOffsetMs,r=t.startOffsetMs+t.durationMs;return e>=n&&e<=r});if(n.length===0)return[];let r=new Map;for(let e of n)r.set(e.id,e);let i=new Map;for(let e of n){let t=e.parentId&&r.has(e.parentId)?e.parentId:null,n=i.get(t)||[];n.push(e),i.set(t,n)}function a(e,t,n){let r=i.get(e)||[];return r.sort((e,t)=>e.startOffsetMs-t.startOffsetMs),r.map(e=>{let r={span:e,depth:t,parent:n,children:[]};return r.children=a(e.id,t+1,r),r})}return a(null,0,null)}function qi(e){let t=[];function n(e){for(let r of e)t.push(r),n(r.children)}return n(e),t}var Ji=[[`path`,{d:`m5 9 7-7 7 7`,key:`1hw5ic`}],[`path`,{d:`M12 16V2`,key:`ywoabb`}],[`circle`,{cx:`12`,cy:`21`,r:`1`,key:`o0uj5v`}]],Yi=e=>F(ui,I(e,{iconNode:Ji,name:`arrow-up-from-dot`})),Xi=[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]],Zi=e=>F(ui,I(e,{iconNode:Xi,name:`search`})),Qi=[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]],$i=e=>F(ui,I(e,{iconNode:Qi,name:`x`})),ea=[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]],ta=e=>F(ui,I(e,{iconNode:ea,name:`zoom-in`}));function na(e){return e<1?`${(e*1e3).toFixed(0)}µs`:e<1e3?`${e.toFixed(1)}ms`:e<6e4?`${(e/1e3).toFixed(2)}s`:`${Math.floor(e/6e4)}m ${(e%6e4/1e3).toFixed(1)}s`}function ra(e){return Array.isArray(e)?e.join(`, `):typeof e==`boolean`?e?`true`:`false`:typeof e==`number`?String(e):e.length>200?`${e.slice(0,200)}...`:e}var ia=z(`<div class="flex items-center gap-1.5 ml-auto"><span class=text-gray-500>Parent:</span><button type=button class="flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium transition-opacity hover:opacity-80"style=color:white><span class="truncate max-w-[150px]">`),aa=z(`<div class="grid grid-cols-[auto,1fr] gap-x-3 gap-y-1"><span class=text-gray-500>Span Name:</span><span class="font-mono text-gray-900">`),oa=z(`<div class="border-t border-gray-200 pt-2 mt-2"><div class="text-gray-500 mb-1">Attributes:</div><div class="grid grid-cols-[auto,1fr] gap-x-3 gap-y-1 pl-2">`),sa=z(`<div class="rounded-md border-2 overflow-hidden transition-all duration-150"><div class="px-3 py-2 text-white text-sm font-medium flex items-center gap-2"><span class=truncate></span></div><div class="bg-gray-50 px-3 py-2 space-y-2 text-xs"><div class="flex flex-wrap items-baseline gap-x-4 gap-y-1"><span><span class=text-gray-500>Duration: </span><span class="font-mono text-gray-900"></span></span><span class=cursor-help><span class=text-gray-500>Time: </span><span class="font-mono text-gray-500"></span></span></div><div class="flex flex-wrap items-start gap-x-4 gap-y-2"><div class="flex gap-x-3 items-baseline"><span class=text-gray-500>Kind:</span><span class="text-gray-900 capitalize">`),ca=z(`<span class="text-gray-500 truncate">:`),la=z(`<span class="font-mono text-gray-900 break-all">`);function ua(e){let{span:t,depth:n,parent:r}=e.hoveredSpan,i=()=>e.colorFn(n,t),a=()=>r?e.colorFn(r.depth,r.span):``,o=t=>{let n=e.testStartTimeMs+t;return`${new Date(n).toLocaleTimeString(`en-US`,{hour12:!1,hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}.${String(n%1e3).padStart(3,`0`)}`},s=()=>t.startOffsetMs+t.durationMs,c=()=>`${na(t.startOffsetMs)} → ${na(s())}`,l=()=>`Start: ${o(t.startOffsetMs)}\nEnd: ${o(s())}`,u=()=>Object.entries(t.attributes).filter(([e])=>e!==`test.step.title`&&e!==`test.case.title`),d=()=>{r&&e.onNavigateToSpan&&e.onNavigateToSpan(r.span.id)};return(()=>{var n=sa(),o=n.firstChild,s=o.firstChild,f=o.nextSibling,p=f.firstChild,m=p.firstChild,h=m.firstChild.nextSibling,g=m.nextSibling,_=g.firstChild.nextSibling,v=p.nextSibling,y=v.firstChild.firstChild.nextSibling;return H(o,()=>e.icon,s),H(s,()=>e.displayTitle??t.title),H(h,()=>na(t.durationMs)),H(_,c),H(y,()=>t.kind),H(v,F(R,{when:r,get children(){var e=ia(),t=e.firstChild.nextSibling,n=t.firstChild;return t.$$click=d,H(t,F(Yi,{size:12}),n),H(n,()=>r.span.title),E(e=>{var n=r.span.id,i=a(),o=`Go to parent: ${r.span.title}`;return n!==e.e&&B(t,`data-parent-span-id`,e.e=n),i!==e.t&&V(t,`background-color`,e.t=i),o!==e.a&&B(t,`title`,e.a=o),e},{e:void 0,t:void 0,a:void 0}),e}}),null),H(f,F(R,{get when(){return t.name!==t.title},get children(){var e=aa(),n=e.firstChild.nextSibling;return H(n,()=>t.name),e}}),null),H(f,F(R,{get when(){return u().length>0},get children(){var e=oa(),t=e.firstChild.nextSibling;return H(t,F(L,{get each(){return u()},children:([e,t])=>[(()=>{var t=ca(),n=t.firstChild;return B(t,`title`,e),H(t,e,n),t})(),(()=>{var e=la();return H(e,()=>ra(t)),E(()=>B(e,`title`,String(t))),e})()]})),e}}),null),E(r=>{var a=t.id,s={"ring-2 ring-blue-200":e.isFocused},c=e.isFocused?`#3b82f6`:i(),u=i(),d=l();return a!==r.e&&B(n,`data-span-id`,r.e=a),r.t=dt(n,s,r.t),c!==r.a&&V(n,`border-color`,r.a=c),u!==r.o&&V(o,`background-color`,r.o=u),d!==r.i&&B(g,`title`,r.i=d),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),n})()}ot([`click`]);var da=z(`<div data-testid=trace-details-panel class="h-full overflow-auto bg-white">`),fa=z(`<div class="h-full flex items-center justify-center text-gray-400 text-sm">Hover over the timeline to see details`),pa=z(`<div><div class="text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2">Steps (<!>)</div><div class=space-y-2>`),ma=z(`<div><div class="text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2">Browser Spans (<!>)</div><div class=space-y-2>`),ha=z(`<div><div class="text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2">External Spans (<!>)</div><div class=space-y-2>`),ga=z(`<div class="text-gray-400 text-sm text-center py-4">No active steps or spans at this time`),_a=z(`<div class="p-4 space-y-6">`),va=z(`<div data-screenshot class="bg-gray-100 rounded-md overflow-hidden border-2 transition-colors duration-150"><img alt="Screenshot at hover time"class="w-full h-auto">`),ya=40,ba=16;function xa(e){let t={server:{h:200,s:70,l:50},client:{h:280,s:60,l:55},producer:{h:160,s:60,l:45},consumer:{h:35,s:70,l:50},internal:{h:100,s:50,l:45}}[e];return`hsl(${t.h}, ${t.s}%, ${t.l}%)`}function Sa(e){let t,n=()=>e.hoveredElements?qi(e.hoveredElements.steps):[],r=()=>e.hoveredElements?qi(e.hoveredElements.spans):[],i=()=>r().filter(e=>e.span.serviceName===`playwright-browser`),a=()=>r().filter(e=>e.span.serviceName!==`playwright-browser`),o=t=>{let n=e.focusedElement;return!!(n&&(n.type===`step`||n.type===`span`)&&n.id===t)},s=()=>e.focusedElement?.type===`screenshot`;return D(()=>{let n=e.focusedElement;if(!(n&&(n.type===`screenshot`||n.id))||!t)return;let r=n.type===`screenshot`?`[data-screenshot]`:`[data-span-id="${n.id}"]`,i=setTimeout(()=>{let e=t?.querySelector(r);if(e&&t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.top-r.top+t.scrollTop,a=Math.max(0,i-ba);t.scrollTo({top:a,behavior:`smooth`})}},ya);N(()=>clearTimeout(i))}),(()=>{var r=da(),c=t;return typeof c==`function`?mt(c,r):t=r,H(r,F(R,{get when(){return e.hoveredElements},get fallback(){return fa()},children:t=>(()=>{var r=_a();return H(r,F(R,{get when(){return t().screenshot},children:e=>(()=>{var t=va(),n=t.firstChild;return E(r=>{var i={"border-blue-500 ring-2 ring-blue-200":s(),"border-gray-200":!s()},a=e().url;return r.e=dt(t,i,r.e),a!==r.t&&B(n,`src`,r.t=a),r},{e:void 0,t:void 0}),t})()}),null),H(r,F(R,{get when(){return n().length>0},get children(){var t=pa(),r=t.firstChild,i=r.firstChild.nextSibling;i.nextSibling;var a=r.nextSibling;return H(r,()=>n().length,i),H(a,F(L,{get each(){return n()},children:t=>F(ua,{hoveredSpan:t,get testStartTimeMs(){return e.testStartTimeMs},colorFn:e=>`hsl(${210+e*30}, 70%, ${55+e*5}%)`,get isFocused(){return o(t.span.id)},get onNavigateToSpan(){return e.onNavigateToSpan}})})),t}}),null),H(r,F(R,{get when(){return i().length>0},get children(){var t=ma(),n=t.firstChild,r=n.firstChild.nextSibling;r.nextSibling;var a=n.nextSibling;return H(n,()=>i().length,r),H(a,F(L,{get each(){return i()},children:t=>{let n=Ai(t.span);return F(ua,{hoveredSpan:t,get testStartTimeMs(){return e.testStartTimeMs},colorFn:()=>ji(n),get isFocused(){return o(t.span.id)},get icon(){return Mi(n,16)},get displayTitle(){return ki(t.span)},get onNavigateToSpan(){return e.onNavigateToSpan}})}})),t}}),null),H(r,F(R,{get when(){return a().length>0},get children(){var t=ha(),n=t.firstChild,r=n.firstChild.nextSibling;r.nextSibling;var i=n.nextSibling;return H(n,()=>a().length,r),H(i,F(L,{get each(){return a()},children:t=>F(ua,{hoveredSpan:t,get testStartTimeMs(){return e.testStartTimeMs},colorFn:(e,t)=>xa(t.kind),get isFocused(){return o(t.span.id)},get onNavigateToSpan(){return e.onNavigateToSpan}})})),t}}),null),H(r,F(R,{get when(){return nt(()=>n().length===0&&i().length===0)()&&a().length===0},get children(){return ga()}}),null),r})()})),r})()}var Ca=z(`<div class="flex-1 overflow-y-auto overflow-x-hidden p-3"role=list><div class=relative>`),wa=z(`<div class="h-full flex flex-col bg-gray-50 overflow-hidden"role=region aria-label="External Spans"><div class="flex-shrink-0 px-3 py-2 border-b border-gray-200 text-xs font-semibold text-gray-500 uppercase tracking-wide">External Spans`),Ta=z(`<div class="flex-1 flex items-center justify-center text-sm text-gray-400">No external spans`);function Ea(e){return e.map(e=>({id:e.id,name:e.title,startOffset:e.startOffsetMs,duration:e.durationMs,parentId:e.parentId}))}function Da(e){let t={server:{h:200,s:70,l:50},client:{h:280,s:60,l:55},producer:{h:160,s:60,l:45},consumer:{h:35,s:70,l:50},internal:{h:100,s:50,l:45}}[e];return`hsl(${t.h}, ${t.s}%, ${t.l}%)`}function Oa(e){let{viewport:t}=Zr(),n=O(()=>ti(Ea(e.spans))),r=O(()=>{let t=new Map;for(let n of e.spans)t.set(n.id,n.kind);return t}),i=O(()=>n().spans.filter(e=>Kr(e.startOffset,e.startOffset+e.duration,t()))),a=()=>n().totalRows*28,o=()=>e.spans.length===0;return(()=>{var t=wa();return t.firstChild,H(t,F(R,{get when(){return!o()},get fallback(){return Ta()},get children(){var t=Ca(),n=t.firstChild;return H(n,F(L,{get each(){return i()},children:t=>{let n=r().get(t.id)??`internal`;return F(Ri,{get id(){return t.id},get name(){return t.name},get startOffset(){return t.startOffset},get duration(){return t.duration},get row(){return t.row},get color(){return Da(n)},get onHover(){return e.onSpanHover},get matchedSpanIds(){return e.matchedSpanIds},get hoveredSearchSpanId(){return e.hoveredSearchSpanId}})}})),E(e=>V(n,`height`,`${a()}px`)),t}}),null),t})()}var ka=z(`<div class="absolute inset-0 bg-white/80 flex items-center justify-center z-50"><div class=text-center><div class="text-gray-600 mb-2">Loading trace data...</div><div class="mx-auto mt-3 h-6 w-6 rounded-full border-2 border-gray-300 border-t-blue-500 animate-spin">`);function Aa(){return ka()}var ja=z(`<div>`);function Ma(e){return(()=>{var t=ja();return H(t,()=>e.title),E(n=>{var r=`flex-shrink-0 px-3 py-2 border-b border-gray-200 text-xs font-semibold uppercase tracking-wide ${e.disabled?`text-gray-400 bg-gray-100 cursor-not-allowed`:`text-gray-500`}`,i=e.disabled?e.disabledTooltip:void 0;return r!==n.e&&lt(t,n.e=r),i!==n.t&&B(t,`title`,n.t=i),n},{e:void 0,t:void 0}),t})()}var Na=z(`<div class="h-full flex flex-col bg-gray-50 overflow-hidden"role=region aria-label="Steps Timeline"><div class="flex-shrink-0 px-3 py-2 border-b border-gray-200 text-xs font-semibold text-gray-500 uppercase tracking-wide">Steps Timeline</div><div class="flex-1 overflow-y-auto overflow-x-hidden p-3"role=list><div class=relative>`);function Pa(e){return e.map(e=>({id:e.id,name:e.title,startOffset:e.startOffsetMs,duration:e.durationMs,parentId:e.parentId}))}function Fa(e){let t=new Map,n=new Map;for(let t of e)n.set(t.id,t);let r=e=>{if(t.has(e.id))return t.get(e.id);if(e.parentId===null)return t.set(e.id,0),0;let i=n.get(e.parentId);if(!i)return t.set(e.id,0),0;let a=r(i)+1;return t.set(e.id,a),a};for(let t of e)r(t);return t}function Ia(e){return`hsl(${210+e*30}, 70%, ${55+e*5}%)`}function La(e){let{viewport:t}=Zr(),n=O(()=>ti(Pa(e.steps))),r=O(()=>Fa(e.steps)),i=O(()=>n().spans.filter(e=>Kr(e.startOffset,e.startOffset+e.duration,t()))),a=()=>n().totalRows*28;return(()=>{var t=Na(),n=t.firstChild.nextSibling.firstChild;return H(n,F(L,{get each(){return i()},children:t=>{let n=r().get(t.id)??0;return F(Ri,{get id(){return t.id},get name(){return t.name},get startOffset(){return t.startOffset},get duration(){return t.duration},get row(){return t.row},get color(){return Ia(n)},get onHover(){return e.onStepHover},get matchedSpanIds(){return e.matchedSpanIds},get hoveredSearchSpanId(){return e.hoveredSearchSpanId}})}})),E(e=>V(n,`height`,`${a()}px`)),t})()}var Ra=le();function za(e){let{viewport:t}=Zr(),[n,r]=w(`hover`),[i,a]=w(null),[o,s]=w(null),[c,l]=w(null),[u,d]=w(null),f=()=>{let e=i();return e===null?null:Wr(e,t())},p=()=>{let e=o();return e===null?null:Wr(e,t())},m=O(()=>{let t=f();return t===null?null:Wi(t,e.steps(),e.spans(),e.screenshots,e.testStartTimeMs())}),h=O(()=>{let t=p();return t===null?null:Wi(t,e.steps(),e.spans(),e.screenshots,e.testStartTimeMs())}),g={mode:n,hoverPosition:i,setHoverPosition:a,lockedPosition:o,lock:(e,t)=>{r(`locked`),s(e),d(t)},unlock:()=>{r(`hover`),s(null),d(null)},enterSearchOverride:()=>{n()===`locked`&&r(`search-override`)},exitSearchOverride:()=>{n()===`search-override`&&r(`locked`)},hoveredElement:c,setHoveredElement:l,lockedElement:u,displayTimeMs:()=>{switch(n()){case`hover`:return f();case`locked`:return p();case`search-override`:return f()}},displayElements:()=>{switch(n()){case`hover`:return m();case`locked`:return h();case`search-override`:return m()}},displayFocusedElement:()=>{switch(n()){case`hover`:return c();case`locked`:return u();case`search-override`:return c()}}};return F(Ra.Provider,{value:g,get children(){return e.children}})}function Ba(){let e=ue(Ra);if(!e)throw Error(`useHoverContext must be used within a HoverProvider`);return e}function Va(e){return e.replace(/[._]/g,` `).toLowerCase()}function Ha(e){return e.replace(/:/g,``).replace(/\s+/g,` `).trim().toLowerCase()}var Ua=(e,t)=>e>t?1:e<t?-1:0,Wa=1/0,Ga=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),Ka=`eexxaacctt`,qa=/\p{P}/gu,Ja=`A-Z`,Ya=`a-z`,Xa=[`en`,{numeric:!0,sensitivity:`base`}],Za=(e,t,n)=>e.replace(Ja,t).replace(Ya,n),Qa={unicode:!1,alpha:null,interSplit:`[^A-Za-z\\d']+`,intraSplit:`[a-z][A-Z]`,interBound:`[^A-Za-z\\d]`,intraBound:`[A-Za-z]\\d|\\d[A-Za-z]|[a-z][A-Z]`,interLft:0,interRgt:0,interChars:`.`,interIns:Wa,intraChars:`[a-z\\d']`,intraIns:null,intraContr:`'[a-z]{1,2}\\b`,intraMode:0,intraSlice:[1,Wa],intraSub:null,intraTrn:null,intraDel:null,intraFilt:(e,t,n)=>!0,toUpper:e=>e.toLocaleUpperCase(),toLower:e=>e.toLocaleLowerCase(),compare:null,sort:(e,t,n,r=Ua)=>{let{idx:i,chars:a,terms:o,interLft2:s,interLft1:c,start:l,intraIns:u,interIns:d,cases:f}=e;return i.map((e,t)=>t).sort((e,n)=>a[n]-a[e]||u[e]-u[n]||o[n]+s[n]+.5*c[n]-(o[e]+s[e]+.5*c[e])||d[e]-d[n]||l[e]-l[n]||f[n]-f[e]||r(t[i[e]],t[i[n]]))}},$a=(e,t)=>t==0?``:t==1?e+`??`:t==Wa?e+`*?`:e+`{0,${t}}?`,eo=`(?:\\b|_)`;function to(e){e=Object.assign({},Qa,e);let{unicode:t,interLft:n,interRgt:r,intraMode:i,intraSlice:a,intraIns:o,intraSub:s,intraTrn:c,intraDel:l,intraContr:u,intraSplit:d,interSplit:f,intraBound:p,interBound:m,intraChars:h,toUpper:g,toLower:_,compare:v}=e;o??=i,s??=i,c??=i,l??=i,v??=typeof Intl>`u`?Ua:new Intl.Collator(...Xa).compare;let y=e.letters??e.alpha;if(y!=null){let e=g(y),t=_(y);f=Za(f,e,t),d=Za(d,e,t),m=Za(m,e,t),p=Za(p,e,t),h=Za(h,e,t),u=Za(u,e,t)}let b=t?`u`:``,x=`".+?"`,S=RegExp(x,`gi`+b),C=RegExp(`(?:\\s+|^)-(?:${h}+|${x})`,`gi`+b),{intraRules:w}=e;w??=e=>{let t=Qa.intraSlice,n=0,r=0,i=0,u=0;if(/[^\d]/.test(e)){let d=e.length;d<=4?d>=3&&(i=Math.min(c,1),d==4&&(n=Math.min(o,1))):(t=a,n=o,r=s,i=c,u=l)}return{intraSlice:t,intraIns:n,intraSub:r,intraTrn:i,intraDel:u}};let T=!!d,E=new RegExp(d,`g`+b),D=new RegExp(f,`g`+b),O=RegExp(`^`+f+`|`+f+`$`,`g`+b),k=new RegExp(u,`gi`+b),A=(e,t=!1)=>{let n=[];e=e.replace(S,e=>(n.push(e),Ka)),e=e.replace(O,``),t||(e=_(e)),T&&(e=e.replace(E,e=>e[0]+` `+e[1]));let r=0;return e.split(D).filter(e=>e!=``).map(e=>e===Ka?n[r++]:e)},j=/[^\d]+|\d+/g,M=(t,a=0,s=!1)=>{let c=A(t);if(c.length==0)return[];let l=Array(c.length).fill(``);c=c.map((e,t)=>e.replace(k,e=>(l[t]=e,``)));let u;if(i==1)u=c.map((e,t)=>{if(e[0]===`"`)return Ga(e.slice(1,-1));let n=``;for(let r of e.matchAll(j)){let e=r[0],{intraSlice:i,intraIns:a,intraSub:o,intraTrn:s,intraDel:c}=w(e);if(a+o+s+c==0)n+=e+l[t];else{let[r,u]=i,d=e.slice(0,r),f=e.slice(u),p=e.slice(r,u);a==1&&d.length==1&&d!=p[0]&&(d+=`(?!`+d+`)`);let m=p.length,g=[e];if(o)for(let e=0;e<m;e++)g.push(d+p.slice(0,e)+h+p.slice(e+1)+f);if(s)for(let e=0;e<m-1;e++)p[e]!=p[e+1]&&g.push(d+p.slice(0,e)+p[e+1]+p[e]+p.slice(e+2)+f);if(c)for(let e=0;e<m;e++)g.push(d+p.slice(0,e+1)+`?`+p.slice(e+1)+f);if(a){let e=$a(h,1);for(let t=0;t<m;t++)g.push(d+p.slice(0,t)+e+p.slice(t)+f)}n+=`(?:`+g.join(`|`)+`)`+l[t]}}return n});else{let e=$a(h,o);a==2&&o>0&&(e=`)(`+e+`)(`),u=c.map((t,n)=>t[0]===`"`?Ga(t.slice(1,-1)):t.split(``).map((e,t,n)=>(o==1&&t==0&&n.length>1&&e!=n[t+1]&&(e+=`(?!`+e+`)`),e)).join(e)+l[n])}let d=n==2?eo:``,f=r==2?eo:``,p=f+$a(e.interChars,e.interIns)+d;return a>0?s?u=d+`(`+u.join(`)`+f+`|`+d+`(`)+`)`+f:(u=`(`+u.join(`)(`+p+`)(`)+`)`,u=`(.??`+d+`)`+u+`(`+f+`.*)`):(u=u.join(p),u=d+u+f),[new RegExp(u,`i`+b),c,l]},ee=(e,t,n)=>{let[r]=M(t);if(r==null)return null;let i=[];if(n!=null)for(let t=0;t<n.length;t++){let a=n[t];r.test(e[a])&&i.push(a)}else for(let t=0;t<e.length;t++)r.test(e[t])&&i.push(t);return i},te=!!p,N=new RegExp(m,b),ne=new RegExp(p,b),re=(t,i,a)=>{let[o,s,c]=M(a,1),l=A(a,!0),[u]=M(a,2),d=s.length,f=Array(d),p=Array(d);for(let e=0;e<d;e++){let t=s[e],n=l[e],r=t[0]==`"`?t.slice(1,-1):t+c[e],i=n[0]==`"`?n.slice(1,-1):n+c[e];f[e]=r,p[e]=i}let m=t.length,h=Array(m).fill(0),g={idx:Array(m),start:h.slice(),chars:h.slice(),cases:h.slice(),terms:h.slice(),interIns:h.slice(),intraIns:h.slice(),interLft2:h.slice(),interRgt2:h.slice(),interLft1:h.slice(),interRgt1:h.slice(),ranges:Array(m)},v=n==1||r==1,y=0;for(let a=0;a<t.length;a++){let s=i[t[a]],c=s.match(o),l=c.index+c[1].length,m=l,h=!1,x=0,S=0,C=0,w=0,T=0,E=0,D=0,O=0,k=0,A=[];for(let t=0,i=2;t<d;t++,i+=2){let a=_(c[i]),o=f[t],u=p[t],g=o.length,y=a.length,j=a==o;if(c[i]==u&&D++,!j&&c[i+1].length>=g){let e=_(c[i+1]).indexOf(o);e>-1&&(A.push(m,y,e,g),m+=ie(c,i,e,g),a=o,y=g,j=!0,t==0&&(l=m))}if(v||j){let e=m-1,u=m+y,d=!1,f=!1;if(e==-1||N.test(s[e]))j&&x++,d=!0;else{if(n==2){h=!0;break}if(te&&ne.test(s[e]+s[e+1]))j&&S++,d=!0;else if(n==1){let e=c[i+1],n=m+y;if(e.length>=g){let r=0,u=!1,f=new RegExp(o,`ig`+b),p;for(;p=f.exec(e);){r=p.index;let e=n+r,t=e-1;if(t==-1||N.test(s[t])){x++,u=!0;break}else if(ne.test(s[t]+s[e])){S++,u=!0;break}}u&&(d=!0,A.push(m,y,r,g),m+=ie(c,i,r,g),a=o,y=g,j=!0,t==0&&(l=m))}if(!d){h=!0;break}}}if(u==s.length||N.test(s[u]))j&&C++,f=!0;else{if(r==2){h=!0;break}if(te&&ne.test(s[u-1]+s[u]))j&&w++,f=!0;else if(r==1){h=!0;break}}j&&(T+=g,d&&f&&E++)}if(y>g&&(k+=y-g),t>0&&(O+=c[i-1].length),!e.intraFilt(o,a,m)){h=!0;break}t<d-1&&(m+=y+c[i+1].length)}if(!h){g.idx[y]=t[a],g.interLft2[y]=x,g.interLft1[y]=S,g.interRgt2[y]=C,g.interRgt1[y]=w,g.chars[y]=T,g.terms[y]=E,g.cases[y]=D,g.interIns[y]=O,g.intraIns[y]=k,g.start[y]=l;let e=s.match(u),n=e.index+e[1].length,r=A.length,i=r>0?0:1/0,o=r-4;for(let t=2;t<e.length;){let r=e[t].length;if(i<=o&&A[i]==n){let r=A[i+1],a=A[i+2],o=A[i+3],s=t,c=``;for(let t=0;t<r;s++)c+=e[s],t+=e[s].length;e.splice(t,s-t,c),n+=ie(e,t,a,o),i+=4}else n+=r,t++}n=e.index+e[1].length;let c=g.ranges[y]=[],d=n,f=n;for(let t=2;t<e.length;t++){let r=e[t].length;n+=r,t%2==0?f=n:r>0&&(c.push(d,f),d=f=n)}f>d&&c.push(d,f),y++}}if(y<t.length)for(let e in g)g[e]=g[e].slice(0,y);return g},ie=(e,t,n,r)=>{let i=e[t]+e[t+1].slice(0,n);return e[t-1]+=i,e[t]=e[t+1].slice(n,n+r),e[t+1]=e[t+1].slice(n+r),i.length},ae=(t,n,r,i=1e3,a)=>{r=r?r===!0?5:r:0;let o=null,s=null,c=[];n=n.replace(C,e=>{let t=e.trim().slice(1);return t=t[0]===`"`?Ga(t.slice(1,-1)):t.replace(qa,``),t!=``&&c.push(t),``});let l=A(n),u;if(c.length>0){if(u=new RegExp(c.join(`|`),`i`+b),l.length==0){let e=[];for(let n=0;n<t.length;n++)u.test(t[n])||e.push(n);return[e,null,null]}}else if(l.length==0)return[null,null,null];if(r>0){let e=A(n);if(e.length>1){let n=e.slice().sort((e,t)=>t.length-e.length);for(let e=0;e<n.length;e++){if(a?.length==0)return[[],null,null];a=ee(t,n[e],a)}if(e.length>r)return[a,null,null];o=ro(e).map(e=>e.join(` `)),s=[];let i=new Set;for(let e=0;e<o.length;e++)if(i.size<a.length){let n=a.filter(e=>!i.has(e)),r=ee(t,o[e],n);for(let e=0;e<r.length;e++)i.add(r[e]);s.push(r)}else s.push([])}}o??(o=[n],s=[a?.length>0?a:ee(t,n)]);let d=null,f=null;if(c.length>0&&(s=s.map(e=>e.filter(e=>!u.test(t[e])))),s.reduce((e,t)=>e+t.length,0)<=i){d={},f=[];for(let n=0;n<s.length;n++){let r=s[n];if(r==null||r.length==0)continue;let i=o[n],a=re(r,t,i),c=e.sort(a,t,i,v);if(n>0)for(let e=0;e<c.length;e++)c[e]+=f.length;for(let e in a)d[e]=(d[e]??[]).concat(a[e]);f=f.concat(c)}}return[[].concat(...s),d,f]};return{search:(...e)=>ae(...e),split:A,filter:ee,info:re,sort:e.sort}}var no=(()=>{let e={A:`ÁÀÃÂÄĄĂÅ`,a:`áàãâäąăå`,E:`ÉÈÊËĖĚ`,e:`éèêëęě`,I:`ÍÌÎÏĮİ`,i:`íìîïįı`,O:`ÓÒÔÕÖ`,o:`óòôõö`,U:`ÚÙÛÜŪŲŮŰ`,u:`úùûüūųůű`,C:`ÇČĆ`,c:`çčć`,D:`Ď`,d:`ď`,G:`Ğ`,g:`ğ`,L:`Ł`,l:`ł`,N:`ÑŃŇ`,n:`ñńň`,S:`ŠŚȘŞ`,s:`šśșş`,T:`ŢȚŤ`,t:`ţțť`,Y:`Ý`,y:`ý`,Z:`ŻŹŽ`,z:`żźž`},t={},n=``;for(let r in e)e[r].split(``).forEach(e=>{n+=e,t[e]=r});let r=RegExp(`[${n}]`,`g`),i=e=>t[e];return e=>{if(typeof e==`string`)return e.replace(r,i);let t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n].replace(r,i);return t}})();function ro(e){e=e.slice();let t=e.length,n=[e.slice()],r=Array(t).fill(0),i=1,a,o;for(;i<t;)r[i]<i?(a=i%2&&r[i],o=e[i],e[i]=e[a],e[a]=o,++r[i],i=1,n.push(e.slice())):(r[i]=0,++i);return n}var io=(e,t)=>t?`<mark>${e}</mark>`:e,ao=(e,t)=>e+t;function oo(e,t,n=io,r=``,i=ao){r=i(r,n(e.substring(0,t[0]),!1))??r;for(let a=0;a<t.length;a+=2){let o=t[a],s=t[a+1];r=i(r,n(e.substring(o,s),!0))??r,a<t.length-3&&(r=i(r,n(e.substring(t[a+1],t[a+2]),!1))??r)}return r=i(r,n(e.substring(t[t.length-1]),!1))??r,r}to.latinize=no,to.permute=e=>ro([...Array(e.length).keys()]).sort((e,t)=>{for(let n=0;n<e.length;n++)if(e[n]!=t[n])return e[n]-t[n];return 0}).map(t=>t.map(t=>e[t])),to.highlight=oo;function so(e){let t=[];for(let n of e){for(let[e,r]of Object.entries(n.attributes)){let i=Va(e),a=String(r),o=`${i} ${a}`.toLowerCase();t.push({spanId:n.id,key:e,value:a,searchText:o})}let e=[{key:`kind`,value:n.kind},{key:`name`,value:n.name},{key:`title`,value:n.title},{key:`serviceName`,value:n.serviceName}];for(let{key:r,value:i}of e){let e=`${Va(r)} ${i}`.toLowerCase();t.push({spanId:n.id,key:r,value:i,searchText:e})}}return t}function co(e,t,n,r){let i=Ha(n);if(!i)return[];let a=new to({intraMode:1,intraIns:1,intraSub:1,intraTrn:1,intraDel:1}),o=a.filter(t,i);if(!o||o.length===0)return[];let s=a.info(o,t,i),c=a.sort(s,t,i),l=new Map(r.map(e=>[e.id,e])),u=[];for(let t of c){let n=e[o[t]],r=l.get(n.spanId);if(!r)continue;let i=s.ranges[t],a=[];for(let e=0;e<i.length;e+=2)a.push([i[e],i[e+1]]);u.push({spanId:n.spanId,spanName:r.name,spanTitle:r.title,key:n.key,value:n.value,searchText:n.searchText,ranges:a})}return u}function lo(e){return e.map(e=>e.searchText)}var uo=le(),fo=e=>{let[t,n]=w(``),r=O(()=>so(e.spans())),i=O(()=>lo(r())),a=O(()=>{let n=t();return n?co(r(),i(),n,e.spans()):[]}),o={query:t,setQuery:n,clearSearch:()=>{n(``)},results:a,matchedSpanIds:O(()=>{let e=a();return new Set(e.map(e=>e.spanId))}),matchedAttributes:O(()=>{let e=a(),t=new Map;for(let n of e){let e=t.get(n.spanId);e?e.add(n.key):t.set(n.spanId,new Set([n.key]))}return t})};return F(uo.Provider,{value:o,get children(){return e.children}})};function po(){let e=ue(uo);if(!e)throw Error(`useSearch must be used within a SearchProvider`);return e}function mo(e){if(e.length===0)return null;let t=e.find(t=>t.name===`playwright.test`&&!e.some(e=>e.id===t.parentId));if(!t)return null;let n=e.filter(e=>e.parentId===t.id),r=n.find(e=>e.title.toLowerCase()===`before hooks`),i=n.find(e=>e.title.toLowerCase()===`after hooks`);if(!r&&!i)return null;let a=[],o=t.startOffsetMs,s=t.startOffsetMs+t.durationMs;r&&a.push({type:`before-hooks`,startMs:r.startOffsetMs,endMs:r.startOffsetMs+r.durationMs,label:`Before Hooks`});let c=r?r.startOffsetMs+r.durationMs:o,l=i?i.startOffsetMs:s;return l>c&&a.push({type:`test-body`,startMs:c,endMs:l,label:`Test Body`}),i&&a.push({type:`after-hooks`,startMs:i.startOffsetMs,endMs:i.startOffsetMs+i.durationMs,label:`After Hooks`}),a}function ho(e){return e?e.find(e=>e.type===`test-body`)??null:null}var go=z(`<div style=height:100%;width:100%>`),_o=z(`<div style=flex-shrink:0;overflow:hidden>`),vo=z(`<div role=separator tabindex=0>`);function yo(e){let[t,n]=w((()=>{let t={};for(let n of e.panels)t[n.id]=n.initialSize;return t})()),[r,i]=w(null),a,o=()=>e.direction===`horizontal`,s=t=>r=>{r.preventDefault(),i(t);let s=r=>{if(!a)return;let i=a.getBoundingClientRect(),s=o()?i.width:i.height,c=(o()?r.clientX-i.left:r.clientY-i.top)/s*100;n(n=>{let r=e.panels,i={...n},a=0;for(let e=0;e<=t;e++)a+=n[r[e].id];let o=0;for(let e=0;e<=t+1;e++)o+=n[r[e].id];let s=c-a,l=r[t],u=r[t+1],d=l.minSize??5,f=u.minSize??5,p=n[l.id]+s,m=n[u.id]-s;return p<d&&(m-=d-p,p=d),m<f&&(p-=f-m,m=f),p=Math.max(d,p),m=Math.max(f,m),i[l.id]=p,i[u.id]=m,i})},c=()=>{i(null),document.removeEventListener(`mousemove`,s),document.removeEventListener(`mouseup`,c)};document.addEventListener(`mousemove`,s),document.addEventListener(`mouseup`,c)};return(()=>{var n=go(),i=a;return typeof i==`function`?mt(i,n):a=n,H(n,F(L,{get each(){return e.panels},children:(n,i)=>[(()=>{var e=_o();return H(e,()=>n.content),E(r=>ft(e,{[o()?`width`:`height`]:`${t()[n.id]}%`},r)),e})(),nt(()=>nt(()=>i()<e.panels.length-1)()&&(()=>{var e=vo();return ut(e,`mousedown`,s(i()),!0),E(a=>{var s=o()?`vertical`:`horizontal`,c=Math.round(t()[n.id]),l=`
2
+ ${o()?`w-1 cursor-col-resize hover:bg-blue-400/50`:`h-1 cursor-row-resize hover:bg-blue-400/50`}
3
+ ${r()===i()?`bg-blue-500`:`bg-gray-300`}
4
+ flex-shrink-0 transition-colors
5
+ `;return s!==a.e&&B(e,`aria-orientation`,a.e=s),c!==a.t&&B(e,`aria-valuenow`,a.t=c),l!==a.a&&lt(e,a.a=l),a},{e:void 0,t:void 0,a:void 0}),e})())]})),E(()=>lt(n,`flex ${o()?`flex-row`:`flex-col`} ${e.class??``}`)),n})()}ot([`mousedown`]);var bo=8;function xo(e){let t=[];if(e.stepsDepth>0&&t.push({key:`steps`,depth:e.stepsDepth}),e.browserDepth>0&&t.push({key:`browser`,depth:e.browserDepth}),e.externalDepth>0&&t.push({key:`external`,depth:e.externalDepth}),t.length===0)return{};if(t.length===1)return{[t[0].key]:100};let n=t.map(e=>({...e,effectiveDepth:Math.max(e.depth,bo)})),r=n.reduce((e,t)=>e+t.effectiveDepth,0),i={};for(let e of n){let t=e.effectiveDepth/r*100;i[e.key]=t}return i}var So=z(`<div style=height:100%;width:100%><div style=flex-shrink:0;overflow:hidden></div><div role=separator tabindex=0></div><div style=flex-shrink:0;overflow:hidden>`);function Co(e){let t=e.initialFirstPanelSize??50,n=e.minFirstPanelSize??10,r=e.maxFirstPanelSize??90,[i,a]=w(t),[o,s]=w(!1),c,l=t=>{t.preventDefault(),s(!0);let i=t=>{if(!c)return;let i=c.getBoundingClientRect(),o;o=e.direction===`horizontal`?(t.clientX-i.left)/i.width*100:(t.clientY-i.top)/i.height*100,o=Math.max(n,Math.min(r,o)),a(o)},o=()=>{s(!1),document.removeEventListener(`mousemove`,i),document.removeEventListener(`mouseup`,o)};document.addEventListener(`mousemove`,i),document.addEventListener(`mouseup`,o)},u=()=>e.direction===`horizontal`;return(()=>{var t=So(),a=t.firstChild,s=a.nextSibling,d=s.nextSibling,f=c;return typeof f==`function`?mt(f,t):c=t,H(a,()=>e.firstPanel),s.$$mousedown=l,B(s,`aria-valuemin`,n),B(s,`aria-valuemax`,r),H(d,()=>e.secondPanel),E(n=>{var r=`flex ${u()?`flex-row`:`flex-col`} ${e.class??``}`,c={[u()?`width`:`height`]:`${i()}%`},l=u()?`vertical`:`horizontal`,f=Math.round(i()),p=`
6
+ ${u()?`w-1 cursor-col-resize hover:bg-blue-400/50`:`h-1 cursor-row-resize hover:bg-blue-400/50`}
7
+ ${o()?`bg-blue-500`:`bg-gray-300`}
8
+ flex-shrink-0 transition-colors
9
+ `,m={[u()?`width`:`height`]:`${100-i()}%`};return r!==n.e&&lt(t,n.e=r),n.t=ft(a,c,n.t),l!==n.a&&B(s,`aria-orientation`,n.a=l),f!==n.o&&B(s,`aria-valuenow`,n.o=f),p!==n.i&&lt(s,n.i=p),n.n=ft(d,m,n.n),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),t})()}ot([`mousedown`]);function wo(e,t,n){if(t<=0)return[];if(e.length===0)return Array(t).fill(null);let r=[...e].sort((e,t)=>e.timestamp-t.timestamp),i=n??{startMs:r[0].timestamp,endMs:r[r.length-1].timestamp};return r.filter(e=>e.timestamp>=i.startMs&&e.timestamp<=i.endMs).length===0?Eo(r,t,i):Do(r,t,i)}function To(e){return{startMs:e.visibleStartMs,endMs:e.visibleEndMs}}function Eo(e,t,n){let r=null;for(let t of e)t.timestamp<n.startMs&&(!r||t.timestamp>r.timestamp)&&(r=t);return r?Array(t).fill(r):Array(t).fill(null)}function Do(e,t,n){let r=n.endMs-n.startMs;if(r<=0){let r=Oo(e,n.startMs);return Array(t).fill(r)}let i=r/t,a=[];for(let r=0;r<t;r++){let o=n.startMs+r*i,s=n.startMs+(r+1)*i,c=(o+s)/2,l=r===t-1,u=e.filter(e=>l?e.timestamp>=o&&e.timestamp<=s:e.timestamp>=o&&e.timestamp<s);if(u.length>0){let e=u.reduce((e,t)=>{let n=Math.abs(e.timestamp-c);return Math.abs(t.timestamp-c)<n?t:e});a.push(e)}else{let t=Oo(e,o);a.push(t)}}return a}function Oo(e,t){let n=null;for(let r of e)r.timestamp<=t&&(!n||r.timestamp>n.timestamp)&&(n=r);return n}var ko=z(`<div class="h-full bg-gray-50 overflow-hidden p-2"role=region aria-label=Screenshots><div class="flex gap-2 h-full">`),Ao=z(`<div class="flex items-center justify-center w-full text-gray-400 text-sm">Resize panel to view screenshots`),jo=z(`<div class="flex items-center justify-center w-full text-gray-400 text-sm">No screenshots available`),Mo=z(`<div class="flex items-center justify-center w-full text-gray-400 text-sm">No screenshots in this time range`),No=z(`<div class="flex-shrink-0 h-full aspect-video">`),Po=z(`<div class="flex-shrink-0 h-full aspect-video bg-white rounded border border-gray-200 overflow-hidden shadow-sm"><img class="w-full h-full object-contain select-none"loading=lazy>`,!0,!1,!1);function Fo(e){let t,[n,r]=w(0),i=O(()=>e.screenshots.map(t=>({timestamp:t.timestamp-e.testStartTimeMs,original:t})));D(()=>{if(!t)return;let e=new ResizeObserver(e=>{for(let t of e){let e=t.contentRect.height,n=t.contentRect.width;if(e>0&&n>0){let t=(e-16)*(16/9),i=Math.floor((n+8)/(t+8));r(Math.max(0,i))}}});e.observe(t),N(()=>{e.disconnect()})});let a=O(()=>{let t=To(e.viewport);return wo(i(),n(),t).map(e=>e?e.original:null)}),o=O(()=>a().some(e=>e!==null));return(()=>{var r=ko(),i=r.firstChild,s=t;return typeof s==`function`?mt(s,r):t=r,H(i,F(R,{get when(){return n()>0},get fallback(){return F(R,{get when(){return e.screenshots.length>0},get fallback(){return jo()},get children(){return Ao()}})},get children(){return F(R,{get when(){return o()},get fallback(){return Mo()},get children(){return F(L,{get each(){return a()},children:t=>F(R,{when:t,get fallback(){return No()},children:t=>(()=>{var n=Po(),r=n.firstChild;return n.addEventListener(`mouseleave`,()=>e.onScreenshotHover?.(null)),n.addEventListener(`mouseenter`,()=>e.onScreenshotHover?.(t().url)),B(r,`draggable`,!1),E(e=>{var i=t().timestamp,a=t().url,o=`Screenshot at ${t().timestamp}`;return i!==e.e&&B(n,`data-screenshot-timestamp`,e.e=i),a!==e.t&&B(r,`src`,e.t=a),o!==e.a&&B(r,`alt`,e.a=o),e},{e:void 0,t:void 0,a:void 0}),n})()})})}})}})),r})()}var Io=()=>(e,t)=>Be(e,t);function Lo(e){return e==null?[]:Array.isArray(e)?e:[e]}var Ro=(e,t)=>e.indexOf(t)!==-1,zo=(e,...t)=>e.concat(t),Bo=(e,...t)=>e.filter(e=>!t.includes(e)),Vo=(e,t)=>Ro(e,t)?Bo(e,t):zo(e,t),Ho=e=>e?.constructor.name===`Array`,Uo=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Wo(e[n],t[n]))return!1;return!0},Wo=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual==`function`&&typeof t?.isEqual==`function`)return e.isEqual(t);if(typeof e==`function`&&typeof t==`function`)return e.toString()===t.toString();if(Ho(e)&&Ho(t))return Uo(Array.from(e),Array.from(t));if(typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(t??Object.create(null)),r=n.length;for(let t=0;t<r;t++)if(!Reflect.has(e,n[t]))return!1;for(let i=0;i<r;i++){let r=n[i];if(!Wo(e[r],t[r]))return!1}return!0},Go=e=>Array.isArray(e),Ko=e=>e===!0||e===!1,qo=e=>typeof e==`object`&&!!e,Jo=e=>qo(e)&&!Go(e),Yo=e=>typeof e==`number`&&!Number.isNaN(e),Xo=e=>typeof e==`string`,Zo=e=>typeof e==`function`,Qo=e=>e==null,$o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),es=e=>Object.prototype.toString.call(e),ts=Function.prototype.toString,ns=ts.call(Object),rs=e=>{if(!qo(e)||es(e)!=`[object Object]`||os(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=$o(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&ts.call(n)==ns},is=e=>typeof e==`object`&&!!e&&`$$typeof`in e&&`props`in e,as=e=>typeof e==`object`&&!!e&&`__v_isVNode`in e,os=e=>is(e)||as(e),ss=()=>{},cs=(...e)=>(...t)=>{e.forEach(function(e){e?.(...t)})};function ls(e,t,...n){if(e in t){let r=t[e];return Zo(r)?r(...n):r}let r=Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw Error.captureStackTrace?.(r,ls),r}function us(e){if(!rs(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(e=>typeof e==`string`),n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=us(t))}return n}function ds(e,t=Object.is){let n={...e},r=new Set,i=e=>(r.add(e),()=>r.delete(e)),a=()=>{r.forEach(e=>e())};return{subscribe:i,get:e=>n[e],set:(e,r)=>{t(n[e],r)||(n[e]=r,a())},update:e=>{let r=!1;for(let i in e){let a=e[i];a!==void 0&&!t(n[i],a)&&(n[i]=a,r=!0)}r&&a()},snapshot:()=>({...n})}}function fs(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function ps(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function ms(e,t){if(e==null)throw Error(t())}function hs(e,t,n){let r=[];for(let n of t)e[n]??r.push(n);if(r.length>0)throw Error(`[zag-js${n?` > ${n}`:``}] missing required props: ${r.join(`, `)}`)}function gs(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function _s(e={}){let{strict:t=!0,hookName:n=`useContext`,providerName:r=`Provider`,errorMessage:i,defaultValue:a}=e,o=le(a);function s(){let e=ue(o);if(!e&&t){let e=Error(i??gs(n,r));throw e.name=`ContextError`,$o(Error,`captureStackTrace`)&&Zo(Error.captureStackTrace)&&Error.captureStackTrace(e,s),e}return e}return[o.Provider,s,o]}var[vs,ys]=_s({hookName:`useRenderStrategyContext`,providerName:`<RenderStrategyProvider />`}),bs=e=>Io()(e,[`lazyMount`,`unmountOnExit`]),xs=e=>typeof e==`function`,Ss=(e,...t)=>xs(e)?e(...t):e;function Cs(e,t){let{state:n,send:r,context:i}=e,a=n.matches(`mounted`,`unmountSuspended`);return{skip:!i.get(`initial`),present:a,setNode(e){e&&r({type:`NODE.SET`,node:e})},unmount(){r({type:`UNMOUNT`})}}}var ws=(...e)=>e.map(e=>e?.trim?.()).filter(Boolean).join(` `),Ts=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Es=e=>{let t={},n;for(;n=Ts.exec(e);)t[n[1]]=n[2];return t},Ds=(e,t)=>{if(Xo(e)){if(Xo(t))return`${e};${t}`;e=Es(e)}else Xo(t)&&(t=Es(t));return Object.assign({},e??{},t??{})};function Os(...e){let t={};for(let n of e){if(!n)continue;for(let e in t){if(e.startsWith(`on`)&&typeof t[e]==`function`&&typeof n[e]==`function`){t[e]=cs(n[e],t[e]);continue}if(e===`className`||e===`class`){t[e]=ws(t[e],n[e]);continue}if(e===`style`){t[e]=Ds(t[e],n[e]);continue}t[e]=n[e]===void 0?t[e]:n[e]}for(let e in n)t[e]===void 0&&(t[e]=n[e]);let e=Object.getOwnPropertySymbols(n);for(let r of e)t[r]=n[r]}return t}var ks=`.`,As=`#`,js=new WeakMap,Ms=new WeakMap;function Ns(e){return e.join(ks)}function Ps(e){return e.includes(ks)}function Fs(e){return e.startsWith(As)}function Is(e){return e.startsWith(ks)}function Ls(e){return Fs(e)?e.slice(As.length):e}function Rs(e,t){return e?`${e}${ks}${t}`:t}function zs(e){let t=new Map,n=new Map,r=(e,i)=>{t.set(e,i);let a=i.id;a&&(n.has(a)&&ps(`[zag-js] Duplicate state id: "${a}"`),n.set(a,e));let o=i.states;if(o){ms(i.initial,()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`),i.initial in o||ps(`[zag-js] Compound state "${e}" has initial "${String(i.initial)}" which is not a child state`);for(let[t,n]of Object.entries(o))n&&r(Rs(e,t),n)}};for(let[t,n]of Object.entries(e.states))n&&r(t,n);return{index:t,idIndex:n}}function Bs(e){let t=js.get(e);if(t)return t;let{index:n,idIndex:r}=zs(e);return js.set(e,n),Ms.set(e,r),n}function Vs(e,t){return Bs(e),Ms.get(e)?.get(t)}function Hs(e){return e?String(e).split(ks).filter(Boolean):[]}function Us(e,t){if(!t)return[];let n=Bs(e),r=Hs(t),i=[],a=[];for(let e of r){a.push(e);let t=Ns(a),r=n.get(t);if(!r)break;i.push({path:t,state:r})}return i}function Ws(e,t){let n=Bs(e),r=Hs(t);if(!r.length)return t;let i=[];for(let e of r){i.push(e);let r=Ns(i);if(!n.has(r))return t}let a=Ns(i),o=n.get(a);for(;o?.initial;){let e=`${a}${ks}${o.initial}`,t=n.get(e);if(!t)break;a=e,o=t}return a}function Gs(e,t){return Bs(e).has(t)}function Ks(e,t,n){let r=String(t);if(Fs(r)){let t=Ls(r),n=Vs(e,t);return ms(n,()=>`[zag-js] Unknown state id: "${t}"`),Ws(e,n)}if(Is(r)&&n)return Ws(e,Rs(n,r.slice(1)));if(!Ps(r)&&n){let t=Hs(n);for(let n=t.length-1;n>=1;n--){let i=Rs(t.slice(0,n).join(ks),r);if(Gs(e,i))return Ws(e,i)}if(Gs(e,r))return Ws(e,r)}return Ws(e,r)}function qs(e,t,n){let r=Us(e,t);for(let e=r.length-1;e>=0;e--){let t=r[e]?.state.on?.[n];if(t)return{transitions:t,source:r[e]?.path}}return{transitions:e.on?.[n],source:void 0}}function Js(e,t,n,r){let i=t?Us(e,t):[],a=Us(e,n),o=0;for(;o<i.length&&o<a.length&&i[o]?.path===a[o]?.path;)o+=1;let s=i.slice(o).reverse(),c=a.slice(o),l=i.at(-1)?.path===a.at(-1)?.path;return r&&l&&(s=i.slice().reverse(),c=a),{exiting:s,entering:c}}function Ys(e,t){return e?e===t||e.startsWith(`${t}${ks}`):!1}function Xs(e,t,n){return Us(e,t).some(e=>e.state.tags?.includes(n))}function Zs(){return{and:(...e)=>function(t){return e.every(e=>t.guard(e))},or:(...e)=>function(t){return e.some(e=>t.guard(e))},not:e=>function(t){return!t.guard(e)}}}function Qs(e){return Bs(e),e}function $s(){return{guards:Zs(),createMachine:e=>Qs(e),choose:e=>function({choose:t}){return t(e)?.actions}}}var ec=(e=>(e.NotStarted=`Not Started`,e.Started=`Started`,e.Stopped=`Stopped`,e))(ec||{}),tc=`__init__`,nc=Object.defineProperty,rc=(e,t,n)=>t in e?nc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ic=(e,t,n)=>rc(e,typeof t==`symbol`?t:t+``,n);function ac(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;let t=e.value.length;e.setSelectionRange(t,t)}catch{}}var oc=()=>void 0,sc=e=>typeof e==`object`&&!!e,W=e=>e?``:void 0,cc=e=>e?`true`:void 0,lc=1,uc=9,dc=11,fc=e=>sc(e)&&e.nodeType===lc&&typeof e.nodeName==`string`,pc=e=>sc(e)&&e.nodeType===uc,mc=e=>sc(e)&&e===e.window,hc=e=>fc(e)?e.localName||``:`#document`;function gc(e){return[`html`,`body`,`#document`].includes(hc(e))}var _c=e=>sc(e)&&e.nodeType!==void 0,vc=e=>_c(e)&&e.nodeType===dc&&`host`in e,yc=e=>!!e?.matches(`a[href]`),bc=e=>fc(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function xc(e){return e?Tc(e.getRootNode())===e:!1}function Sc(e,t){if(!e||!t||!fc(e)||!_c(t))return!1;if(fc(t)&&e===t||e.contains(t))return!0;let n=t.getRootNode?.();if(n&&vc(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Cc(e){return pc(e)?e:mc(e)?e.document:e?.ownerDocument??document}function wc(e){return Cc(e).documentElement}function G(e){return vc(e)?G(e.host):pc(e)?e.defaultView??window:fc(e)?e.ownerDocument?.defaultView??window:window}function Tc(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function Ec(e){if(hc(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||vc(e)&&e.host||wc(e);return vc(t)?t.host:t}function Dc(e){let t;try{if(t=e.getRootNode({composed:!0}),pc(t)||vc(t))return t}catch{}return e.ownerDocument??document}var Oc=new WeakMap;function kc(e){return Oc.has(e)||Oc.set(e,G(e).getComputedStyle(e)),Oc.get(e)}var Ac=new Set([`menu`,`listbox`,`dialog`,`grid`,`tree`,`region`,`application`]),jc=e=>Ac.has(e),Mc=e=>e.getAttribute(`aria-controls`)?.split(` `)||[];function Nc(e,t){let n=new Set,r=Dc(e),i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=Mc(e);for(let e of a){if(!e||n.has(e))continue;n.add(e);let a=r.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;if(e&&jc(e)&&!n&&(a===t||a.contains(t)||i(a)))return!0}}}return!1};return i(e)}var Pc=()=>typeof document<`u`;function Fc(){return navigator.userAgentData?.platform??navigator.platform}function Ic(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}var Lc=e=>Pc()&&e.test(Fc()),Rc=e=>Pc()&&e.test(Ic()),zc=()=>Pc()&&!!navigator.maxTouchPoints,Bc=()=>Lc(/^iPhone/i),Vc=()=>Lc(/^iPad/i)||Wc()&&navigator.maxTouchPoints>1,Hc=()=>Bc()||Vc(),Uc=()=>Wc()||Hc(),Wc=()=>Lc(/^Mac/i),Gc=()=>Rc(/Firefox/i),Kc=()=>Rc(/Android/i);function qc(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function Jc(e){return qc(e)?.[0]??e.target}function Yc(e){let t=e.currentTarget;if(!t||!t.matches(`a[href], button[type='submit'], input[type='submit']`))return!1;let n=e.button===1,r=Qc(e);return n||r}function Xc(e){let t=e.currentTarget;if(!t)return!1;let n=t.localName;return e.altKey?n===`a`||n===`button`&&t.type===`submit`||n===`input`&&t.type===`submit`:!1}function Zc(e){return al(e).isComposing||e.keyCode===229}function Qc(e){return Wc()?e.metaKey:e.ctrlKey}function $c(e){return e.pointerType===``&&e.isTrusted?!0:Kc()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}var el=e=>e.button===0,tl=e=>e.button===2||Wc()&&e.ctrlKey&&e.button===0,nl={Up:`ArrowUp`,Down:`ArrowDown`,Esc:`Escape`," ":`Space`,",":`Comma`,Left:`ArrowLeft`,Right:`ArrowRight`},rl={ArrowLeft:`ArrowRight`,ArrowRight:`ArrowLeft`};function il(e,t={}){let{dir:n=`ltr`,orientation:r=`horizontal`}=t,i=e.key;return i=nl[i]??i,n===`rtl`&&r===`horizontal`&&i in rl&&(i=rl[i]),i}function al(e){return e.nativeEvent??e}var ol=(e,t,n,r)=>{let i=typeof e==`function`?e():e;return i?.addEventListener(t,n,r),()=>{i?.removeEventListener(t,n,r)}},sl=`input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type`;function cl(e){return!fc(e)||e.closest(`[inert]`)?!1:e.matches(sl)&&bc(e)}var ll=class e{constructor(){ic(this,`id`,null),ic(this,`fn_cleanup`),ic(this,`cleanup`,()=>{this.cancel()})}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=e?.()})}cancel(){this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),this.fn_cleanup?.(),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function K(e){let t=ll.create();return t.request(e),t.cleanup}function ul(e){let t=new Set;function n(e){let n=globalThis.requestAnimationFrame(e);t.add(()=>globalThis.cancelAnimationFrame(n))}return n(()=>n(e)),function(){t.forEach(e=>e())}}function dl(e,t,n){let r=K(()=>{e.removeEventListener(t,i,!0),n()}),i=()=>{r(),n()};return e.addEventListener(t,i,{once:!0,capture:!0}),r}function fl(e,t){if(!e)return;let{attributes:n,callback:r}=t,i=new(e.ownerDocument.defaultView||window).MutationObserver(e=>{for(let t of e)t.type===`attributes`&&t.attributeName&&n.includes(t.attributeName)&&r(t)});return i.observe(e,{attributes:!0,attributeFilter:n}),()=>i.disconnect()}function pl(e,t){let{defer:n}=t,r=n?K:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(fl(n,t))})),()=>{i.forEach(e=>e?.())}}function ml(e){let t=()=>{let t=G(e);e.dispatchEvent(new t.MouseEvent(`click`))};Gc()?dl(e,`keyup`,t):queueMicrotask(t)}function hl(e){let t=Ec(e);return gc(t)?Cc(t).body:fc(t)&&yl(t)?t:hl(t)}function gl(e,t=[]){let n=hl(e),r=n===e.ownerDocument.body,i=G(n);return r?t.concat(i,i.visualViewport||[],yl(n)?n:[]):t.concat(n,gl(n,[]))}var _l=/auto|scroll|overlay|hidden|clip/,vl=new Set([`inline`,`contents`]);function yl(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=G(e).getComputedStyle(e);return _l.test(t+r+n)&&!vl.has(i)}function bl(e,t){return Array.from(e?.querySelectorAll(t)??[])}function xl(e,t){return e?.querySelector(t)??null}function Sl(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function Cl(e,t){let{rootEl:n,...r}=t||{};!e||!n||!yl(n)||!Sl(n)||e.scrollIntoView(r)}function wl(e,t){if(!e)return oc;let n=Object.keys(t).reduce((t,n)=>(t[n]=e.style.getPropertyValue(n),t),{});return Tl(n,t)?oc:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute(`style`)})}function Tl(e,t){return Object.keys(e).every(n=>e[n]===t[n])}function El(e,t,n){let{signal:r}=t;return[new Promise((t,i)=>{let a=setTimeout(()=>{i(Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener(`abort`,()=>{clearTimeout(a),i(new DOMException(`Promise aborted`,`AbortError`))}),e.then(e=>{r.aborted||(clearTimeout(a),t(e))}).catch(e=>{r.aborted||(clearTimeout(a),i(e))})}),()=>t.abort()]}function Dl(e,t){let{timeout:n,rootNode:r}=t,i=G(r),a=Cc(r),o=new i.AbortController;return El(new Promise(t=>{let n=e();if(n){t(n);return}let r=new i.MutationObserver(()=>{let n=e();n&&n.isConnected&&(r.disconnect(),t(n))});r.observe(a.body,{childList:!0,subtree:!0})}),o,n)}function Ol(e){let t=()=>e.getRootNode?.()??document,n=()=>Cc(t()),r=()=>n().defaultView??window,i=()=>Tc(t()),a=e=>t().getElementById(e);return{...e,getRootNode:t,getDoc:n,getWin:r,getActiveElement:i,isActiveElement:xc,getById:a}}var kl=Qs({props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e(`present`)?`mounted`:`unmounted`},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:[`cleanupNode`],watch({track:e,prop:t,send:n}){e([()=>t(`present`)],()=>{n({type:`PRESENCE.CHANGED`})})},on:{"NODE.SET":{actions:[`setupNode`]},"PRESENCE.CHANGED":{actions:[`setInitial`,`syncPresence`]}},states:{mounted:{on:{UNMOUNT:{target:`unmounted`,actions:[`clearPrevAnimationName`,`invokeOnExitComplete`]},"UNMOUNT.SUSPEND":{target:`unmountSuspended`}}},unmountSuspended:{effects:[`trackAnimationEvents`],on:{MOUNT:{target:`mounted`,actions:[`setPrevAnimationName`]},UNMOUNT:{target:`unmounted`,actions:[`clearPrevAnimationName`,`invokeOnExitComplete`]}}},unmounted:{on:{MOUNT:{target:`mounted`,actions:[`setPrevAnimationName`]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get(`initial`)||queueMicrotask(()=>{e.set(`initial`,!0)})},invokeOnExitComplete:({prop:e,refs:t})=>{e(`onExitComplete`)?.();let n=t.get(`node`);if(!n)return;let r=new(G(n)).CustomEvent(`exitcomplete`,{bubbles:!1});n.dispatchEvent(r)},setupNode:({refs:e,event:t})=>{e.get(`node`)!==t.node&&(e.set(`node`,t.node),e.set(`styles`,kc(t.node)))},cleanupNode:({refs:e})=>{e.set(`node`,null),e.set(`styles`,null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{let i=r(`present`);if(i)return n({type:`MOUNT`,src:`presence.changed`});let a=t.get(`node`);if(!i&&a?.ownerDocument.visibilityState===`hidden`)return n({type:`UNMOUNT`,src:`visibilitychange`});K(()=>{if(r(`present`))return;let i=Al(t.get(`styles`));e.set(`unmountAnimationName`,i),i===`none`||i===e.get(`prevAnimationName`)||t.get(`styles`)?.display===`none`||t.get(`styles`)?.animationDuration===`0s`?n({type:`UNMOUNT`,src:`presence.changed`}):n({type:`UNMOUNT.SUSPEND`})})},setPrevAnimationName:({context:e,refs:t})=>{K(()=>{e.set(`prevAnimationName`,Al(t.get(`styles`)))})},clearPrevAnimationName:({context:e})=>{e.set(`prevAnimationName`,null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{let i=t.get(`node`);if(!i)return;let a=n=>{(n.composedPath?.()?.[0]??n.target)===i&&e.set(`prevAnimationName`,Al(t.get(`styles`)))},o=a=>{let o=Al(t.get(`styles`));Jc(a)===i&&o===e.get(`unmountAnimationName`)&&!r(`present`)&&n({type:`UNMOUNT`,src:`animationend`})},s=e=>{Jc(e)===i&&!r(`present`)&&n({type:`UNMOUNT`,src:`animationcancel`})};i.addEventListener(`animationstart`,a),i.addEventListener(`animationcancel`,s),i.addEventListener(`animationend`,o);let c=wl(i,{animationFillMode:`forwards`});return()=>{i.removeEventListener(`animationstart`,a),i.removeEventListener(`animationcancel`,s),i.removeEventListener(`animationend`,o),ul(()=>c())}}}}});function Al(e){return e?.animationName||`none`}function jl(e){return new Proxy({},{get(t,n){return n===`style`?t=>e({style:t}).style:e}})}function Ml(e){let t=e().value??e().defaultValue,n=e().isEqual??Object.is,[r,i]=w(t),a=O(()=>e().value!=null),o={current:r()},s={current:void 0};D(()=>{let t=a()?e().value:r();s.current=t,o.current=t});let c=t=>{let r=s.current,c=Zo(t)?t(o.current):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:c,prev:r}),a()||i(c),n(c,r)||e().onChange?.(c,r)};function l(){let t=a()?e().value:r;return Zo(t)?t():t}return{initial:t,ref:o,get:l,set:c,invoke(t,n){e().onChange?.(t,n)},hash(t){return e().hash?.(t)??String(t)}}}Ml.cleanup=e=>{N(()=>e())},Ml.ref=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};function Nl(e){let t={current:e};return{get(e){return t.current[e]},set(e,n){t.current[e]=n}}}function Pl(e){return Zo(e)?e():e}var Fl=(e,t)=>{let n=[],r=!0;D(()=>{if(r){n=e.map(e=>Pl(e)),r=!1;return}let i=!1;for(let t=0;t<e.length;t++)if(!Wo(n[t],Pl(e[t]))){i=!0;break}i&&(n=e.map(e=>Pl(e)),t())})};function Il(e,t={}){let n=O(()=>{let{id:e,ids:n,getRootNode:r}=Rl(t);return Ol({id:e,ids:n,getRootNode:r})}),r=(...t)=>{e.debug&&console.log(...t)},i=zl(O(()=>e.props?.({props:us(Rl(t)),scope:n()})??Rl(t))),a=e.context?.({prop:i,bindable:Ml,get scope(){return n()},flush:Ll,getContext(){return o},getComputed(){return y},getRefs(){return p},getEvent(){return d()}}),o={get(e){return a?.[e].get()},set(e,t){a?.[e].set(t)},initial(e){return a?.[e].initial},hash(e){let t=a?.[e].get();return a?.[e].hash(t)}},s={current:new Map},c={current:null},l={current:null},u={current:{type:``}},d=()=>I(u.current,{current(){return u.current},previous(){return l.current}}),f=()=>I(b,{matches(...e){let t=b.get();return e.some(e=>Ys(t,e))},hasTag(t){return Xs(e,b.get(),t)}}),p=Nl(e.refs?.({prop:i,context:o})??{}),m=()=>({state:f(),context:o,event:d(),prop:i,send:S,action:h,guard:g,track:Fl,refs:p,computed:y,flush:Ll,get scope(){return n()},choose:v}),h=t=>{let n=Zo(t)?t(m()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.actions?.[t];return n||fs(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),n});for(let e of r)e?.(m())},g=t=>{if(Zo(t))return t(m());let n=e.implementations?.guards?.[t];return n||fs(`[zag-js] No implementation found for guard "${JSON.stringify(t)}"`),n?.(m())},_=t=>{let n=Zo(t)?t(m()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.effects?.[t];return n||fs(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),n}),i=[];for(let e of r){let t=e?.(m());t&&i.push(t)}return()=>i.forEach(e=>e?.())},v=e=>Lo(e).find(e=>{let t=!e.guard;return Xo(e.guard)?t=!!g(e.guard):Zo(e.guard)&&(t=e.guard(m())),t}),y=t=>{ms(e.computed,()=>`[zag-js] No computed object found on machine`);let r=e.computed[t];return r({context:o,event:u.current,prop:i,refs:p,scope:n(),computed:y})},b=Ml(()=>({defaultValue:Ks(e,e.initialState({prop:i})),onChange(t,n){let{exiting:r,entering:i}=Js(e,n,t,c.current?.reenter);if(r.forEach(e=>{s.current.get(e.path)?.(),s.current.delete(e.path)}),r.forEach(e=>{h(e.state?.exit)}),h(c.current?.actions),i.forEach(e=>{let t=_(e.state?.effects);if(t){let n=s.current.get(e.path);s.current.set(e.path,n?cs(n,t):t)}}),n===`__init__`){h(e.entry);let t=_(e.effects);if(t){let e=s.current.get(tc);s.current.set(tc,e?cs(e,t):t)}}i.forEach(e=>{h(e.state?.entry)})}})),x=ec.NotStarted;te(()=>{let e=x===ec.Started;x=ec.Started,r(e?`rehydrating...`:`initializing...`),b.invoke(b.initial,tc)}),N(()=>{r(`unmounting...`),x=ec.Stopped,s.current.forEach(e=>e?.()),s.current=new Map,c.current=null,h(e.exit)});let S=t=>{queueMicrotask(()=>{if(x!==ec.Started)return;l.current=u.current,u.current=t;let n=M(()=>b.get()),{transitions:i,source:a}=qs(e,n,t.type),o=v(i);if(!o)return;c.current=o;let s=Ks(e,o.target??n,a);r(`transition`,t.type,o.target||n,`(${o.actions})`),s===n?o.reenter?b.invoke(n,n):h(o.actions):b.set(s)})};return e.watch?.(m()),{state:f(),send:S,context:o,prop:i,get scope(){return n()},refs:p,computed:y,event:d(),getStatus:()=>x}}function Ll(e){e()}function Rl(e){return Zo(e)?e():e}function zl(e){return function(t){return e()[t]}}function q(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`function`&&(r=r()),r){let n=Object.getOwnPropertyDescriptors(r);for(let r in n)r in t||Object.defineProperty(t,r,{enumerable:!0,get(){let t={};if(r===`style`||r===`class`||r===`className`||r.startsWith(`on`)){for(let n=0;n<e.length;n++){let i=e[n];typeof i==`function`&&(i=i()),t=Os(t,{[r]:(i||{})[r]})}return t[r]}for(let t=e.length-1;t>=0;t--){let n,i=e[t];if(typeof i==`function`&&(i=i()),n=(i||{})[r],n!==void 0)return n}}})}}return t}var Bl={onFocus:`onFocusIn`,onBlur:`onFocusOut`,onDoubleClick:`onDblClick`,onChange:`onInput`,defaultChecked:`checked`,defaultValue:`value`,htmlFor:`for`,className:`class`},Vl=e=>e.startsWith(`--`)?e:Yl(e);function Hl(e){return e in Bl?Bl[e]:e}var Ul=jl(e=>{let t={};for(let n in e){let r=e[n];if(!(n===`readOnly`&&r===!1)){if(n===`style`&&Jo(r)){t.style=Wl(r);continue}if(n===`children`){Xo(r)&&(t.textContent=r);continue}t[Hl(n)]=r}}return t});function Wl(e){let t={};for(let n in e){let r=e[n];!Xo(r)&&!Yo(r)||(t[Vl(n)]=r)}return t}var Gl=/[A-Z]/g,Kl=/^ms-/;function ql(e){return`-`+e.toLowerCase()}var Jl={};function Yl(e){if(Jl.hasOwnProperty(e))return Jl[e];let t=e.replace(Gl,ql);return Jl[e]=Kl.test(t)?`-`+t:t}var Xl=e=>{let[t,n]=bs(Ss(e)),[r,i]=w(!1),a=Il(kl,e),o=O(()=>Cs(a,Ul));D(()=>{o().present&&i(!0)});let s=e=>{e&&a.send({type:`NODE.SET`,node:e})};return O(()=>({unmounted:!o().present&&!r()&&t.lazyMount||t.unmountOnExit&&!o().present&&r(),present:o().present,ref:s,presenceProps:{hidden:!o().present,"data-state":o().skip&&n.skipAnimationOnMount?void 0:n.present?`open`:`closed`}}))},Zl=e=>typeof e==`function`,Ql=(e,t)=>{for(let n of e)Zl(n)&&n(t)};function $l(...e){let t=null;return D(()=>{Ql(e,t)}),n=>{t=n,Ql(e,n)}}var eu=e=>t=>{let[n,r]=Be(t,[`asChild`]);return n.asChild?n.asChild(e=>{let[,t]=Be(r,[`ref`]);return q(t,e)}):F(jt,I({component:e},r))};function tu(){let e=new Map;return new Proxy(eu,{apply(e,t,n){return eu(n[0])},get(t,n){let r=n;return e.has(r)||e.set(r,eu(r)),e.get(r)}})}var J=tu(),nu=e=>Io()(e,[`immediate`,`lazyMount`,`onExitComplete`,`present`,`skipAnimationOnMount`,`unmountOnExit`]),[ru,iu]=_s({hookName:`usePresenceContext`,providerName:`<PresenceProvider />`}),[au,ou]=_s({hookName:`useEnvironmentContext`,providerName:`<EnvironmentProvider />`,strict:!1,defaultValue:()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})}),[su,cu]=_s({hookName:`useEnvironmentContext`,providerName:`<EnvironmentProvider />`,strict:!1,defaultValue:()=>({dir:`ltr`,locale:`en-US`})}),lu=Object.defineProperty,uu=(e,t)=>{for(var n in t)lu(e,n,{get:t[n],enumerable:!0})},du=(e,t=[])=>({parts:(...n)=>{if(pu(t))return du(e,n);throw Error(`createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?`)},extendWith:(...n)=>du(e,[...t,...n]),omit:(...n)=>du(e,t.filter(e=>!n.includes(e))),rename:e=>du(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${fu(e)}"][data-part="${fu(n)}"]`,`& [data-scope="${fu(e)}"][data-part="${fu(n)}"]`].join(`, `),attrs:{"data-scope":fu(e),"data-part":fu(n)}}}),{})}),fu=e=>e.replace(/([A-Z])([A-Z])/g,`$1-$2`).replace(/([a-z])([A-Z])/g,`$1-$2`).replace(/[\s_]+/g,`-`).toLowerCase(),pu=e=>e.length===0,mu=du(`tooltip`).parts(`trigger`,`arrow`,`arrowTip`,`positioner`,`content`).build();function hu(e){return!(e.metaKey||!Wc()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}var gu=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function _u(e,t,n){let r=n?Jc(n):null,i=Cc(r),a=G(r),o=Tc(i);return e=e||o instanceof a.HTMLInputElement&&!gu.has(o?.type)||o instanceof a.HTMLTextAreaElement||o instanceof a.HTMLElement&&o.isContentEditable,!(e&&t===`keyboard`&&n instanceof a.KeyboardEvent&&!Reflect.has(Cu,n.key))}var vu=null,yu=new Set,bu=new Map,xu=!1,Su=!1,Cu={Tab:!0,Escape:!0};function wu(e,t){for(let n of yu)n(e,t)}function Tu(e){xu=!0,hu(e)&&(vu=`keyboard`,wu(`keyboard`,e))}function Eu(e){vu=`pointer`,(e.type===`mousedown`||e.type===`pointerdown`)&&(xu=!0,wu(`pointer`,e))}function Du(e){$c(e)&&(xu=!0,vu=`virtual`)}function Ou(e){let t=Jc(e);t===G(t)||t===Cc(t)||!e.isTrusted||(!xu&&!Su&&(vu=`virtual`,wu(`virtual`,e)),xu=!1,Su=!1)}function ku(){xu=!1,Su=!0}function Au(e){if(typeof window>`u`||bu.get(G(e)))return;let t=G(e),n=Cc(e),r=t.HTMLElement.prototype.focus;function i(){xu=!0,r.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:i})}catch{}n.addEventListener(`keydown`,Tu,!0),n.addEventListener(`keyup`,Tu,!0),n.addEventListener(`click`,Du,!0),t.addEventListener(`focus`,Ou,!0),t.addEventListener(`blur`,ku,!1),t.PointerEvent===void 0?(n.addEventListener(`mousedown`,Eu,!0),n.addEventListener(`mousemove`,Eu,!0),n.addEventListener(`mouseup`,Eu,!0)):(n.addEventListener(`pointerdown`,Eu,!0),n.addEventListener(`pointermove`,Eu,!0),n.addEventListener(`pointerup`,Eu,!0)),t.addEventListener(`beforeunload`,()=>{ju(e)},{once:!0}),bu.set(t,{focus:r})}var ju=(e,t)=>{let n=G(e),r=Cc(e);t&&r.removeEventListener(`DOMContentLoaded`,t);let i=bu.get(n);if(i){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:i.focus})}catch{}r.removeEventListener(`keydown`,Tu,!0),r.removeEventListener(`keyup`,Tu,!0),r.removeEventListener(`click`,Du,!0),n.removeEventListener(`focus`,Ou,!0),n.removeEventListener(`blur`,ku,!1),n.PointerEvent===void 0?(r.removeEventListener(`mousedown`,Eu,!0),r.removeEventListener(`mousemove`,Eu,!0),r.removeEventListener(`mouseup`,Eu,!0)):(r.removeEventListener(`pointerdown`,Eu,!0),r.removeEventListener(`pointermove`,Eu,!0),r.removeEventListener(`pointerup`,Eu,!0)),bu.delete(n)}};function Mu(){return vu}function Nu(e){vu=e,wu(e,null)}function Pu(){return vu===`keyboard`||vu===`virtual`}function Fu(e={}){let{isTextInput:t,autoFocus:n,onChange:r,root:i}=e;Au(i),r?.({isFocusVisible:n||Pu(),modality:vu});let a=(e,n)=>{_u(!!t,e,n)&&r?.({isFocusVisible:Pu(),modality:e})};return yu.add(a),()=>{yu.delete(a)}}var Iu=[`top`,`right`,`bottom`,`left`],Lu=Math.min,Ru=Math.max,zu=Math.round,Bu=Math.floor,Vu=e=>({x:e,y:e}),Hu={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Uu(e,t,n){return Ru(e,Lu(t,n))}function Wu(e,t){return typeof e==`function`?e(t):e}function Gu(e){return e.split(`-`)[0]}function Ku(e){return e.split(`-`)[1]}function qu(e){return e===`x`?`y`:`x`}function Ju(e){return e===`y`?`height`:`width`}function Yu(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Xu(e){return qu(Yu(e))}function Zu(e,t,n){n===void 0&&(n=!1);let r=Ku(e),i=Xu(e),a=Ju(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=od(o)),[o,od(o)]}function Qu(e){let t=od(e);return[$u(e),t,$u(t)]}function $u(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ed=[`left`,`right`],td=[`right`,`left`],nd=[`top`,`bottom`],rd=[`bottom`,`top`];function id(e,t,n){switch(e){case`top`:case`bottom`:return n?t?td:ed:t?ed:td;case`left`:case`right`:return t?nd:rd;default:return[]}}function ad(e,t,n,r){let i=Ku(e),a=id(Gu(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map($u)))),a}function od(e){let t=Gu(e);return Hu[t]+e.slice(t.length)}function sd(e){return{top:0,right:0,bottom:0,left:0,...e}}function cd(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:sd(e)}function ld(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ud(e,t,n){let{reference:r,floating:i}=e,a=Yu(t),o=Xu(t),s=Ju(o),c=Gu(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Ku(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function dd(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Wu(t,e),p=cd(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ld(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ld(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var fd=50,pd=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:dd},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ud(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<fd&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ud(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},md=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Wu(e,t)||{};if(l==null)return{};let d=cd(u),f={x:n,y:r},p=Xu(i),m=Ju(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Lu(d[_],T),D=Lu(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=Uu(O,A,k),M=!c.arrow&&Ku(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,ee=M?A<O?A-O:A-k:0;return{[p]:f[p]+ee,data:{[p]:j,centerOffset:A-j-ee,...M&&{alignmentOffset:ee}},reset:M}}}),hd=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Wu(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Gu(r),_=Yu(o),v=Gu(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[od(o)]:Qu(o)),x=p!==`none`;!d&&x&&b.push(...ad(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Zu(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Yu(t))||T.every(e=>Yu(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Yu(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function gd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _d(e){return Iu.some(t=>e[t]>=0)}var vd=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Wu(e,t);switch(i){case`referenceHidden`:{let e=gd(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:_d(e)}}}case`escaped`:{let e=gd(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:_d(e)}}}default:return{}}}}},yd=new Set([`left`,`top`]);async function bd(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Gu(n),s=Ku(n),c=Yu(n)===`y`,l=yd.has(o)?-1:1,u=a&&c?-1:1,d=Wu(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var xd=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await bd(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Sd=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Wu(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Yu(Gu(i)),p=qu(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Uu(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Uu(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Cd=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Wu(e,t),u={x:n,y:r},d=Yu(i),f=qu(d),p=u[f],m=u[d],h=Wu(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=yd.has(Gu(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},wd=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Wu(e,t),u=await o.detectOverflow(t,l),d=Gu(i),f=Ku(i),p=Yu(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Lu(h-u[g],v),x=Lu(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Ru(u.left,0),t=Ru(u.right,0),n=Ru(u.top,0),r=Ru(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Ru(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Ru(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Td(){return typeof window<`u`}function Ed(e){return kd(e)?(e.nodeName||``).toLowerCase():`#document`}function Dd(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Od(e){return((kd(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function kd(e){return Td()?e instanceof Node||e instanceof Dd(e).Node:!1}function Ad(e){return Td()?e instanceof Element||e instanceof Dd(e).Element:!1}function jd(e){return Td()?e instanceof HTMLElement||e instanceof Dd(e).HTMLElement:!1}function Md(e){return!Td()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Dd(e).ShadowRoot}function Nd(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Wd(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Pd(e){return/^(table|td|th)$/.test(Ed(e))}function Fd(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Id=/transform|translate|scale|rotate|perspective|filter/,Ld=/paint|layout|strict|content/,Rd=e=>!!e&&e!==`none`,zd;function Bd(e){let t=Ad(e)?Wd(e):e;return Rd(t.transform)||Rd(t.translate)||Rd(t.scale)||Rd(t.rotate)||Rd(t.perspective)||!Hd()&&(Rd(t.backdropFilter)||Rd(t.filter))||Id.test(t.willChange||``)||Ld.test(t.contain||``)}function Vd(e){let t=Kd(e);for(;jd(t)&&!Ud(t);){if(Bd(t))return t;if(Fd(t))return null;t=Kd(t)}return null}function Hd(){return zd??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),zd}function Ud(e){return/^(html|body|#document)$/.test(Ed(e))}function Wd(e){return Dd(e).getComputedStyle(e)}function Gd(e){return Ad(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Kd(e){if(Ed(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Md(e)&&e.host||Od(e);return Md(t)?t.host:t}function qd(e){let t=Kd(e);return Ud(t)?e.ownerDocument?e.ownerDocument.body:e.body:jd(t)&&Nd(t)?t:qd(t)}function Jd(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=qd(e),i=r===e.ownerDocument?.body,a=Dd(r);if(i){let e=Yd(a);return t.concat(a,a.visualViewport||[],Nd(r)?r:[],e&&n?Jd(e):[])}else return t.concat(r,Jd(r,[],n))}function Yd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xd(e){let t=Wd(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=jd(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=zu(n)!==a||zu(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Zd(e){return Ad(e)?e:e.contextElement}function Qd(e){let t=Zd(e);if(!jd(t))return Vu(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Xd(t),o=(a?zu(n.width):n.width)/r,s=(a?zu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var $d=Vu(0);function ef(e){let t=Dd(e);return!Hd()||!t.visualViewport?$d:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tf(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Dd(e)?!1:t}function nf(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Zd(e),o=Vu(1);t&&(r?Ad(r)&&(o=Qd(r)):o=Qd(e));let s=tf(a,n,r)?ef(a):Vu(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Dd(a),t=r&&Ad(r)?Dd(r):r,n=e,i=Yd(n);for(;i&&r&&t!==n;){let e=Qd(i),t=i.getBoundingClientRect(),r=Wd(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Dd(i),i=Yd(n)}}return ld({width:u,height:d,x:c,y:l})}function rf(e,t){let n=Gd(e).scrollLeft;return t?t.left+n:nf(Od(e)).left+n}function af(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-rf(e,n),y:n.top+t.scrollTop}}function of(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Od(r),s=t?Fd(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Vu(1),u=Vu(0),d=jd(r);if((d||!d&&!a)&&((Ed(r)!==`body`||Nd(o))&&(c=Gd(r)),d)){let e=nf(r);l=Qd(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?af(o,c):Vu(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function sf(e){return Array.from(e.getClientRects())}function cf(e){let t=Od(e),n=Gd(e),r=e.ownerDocument.body,i=Ru(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ru(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+rf(e),s=-n.scrollTop;return Wd(r).direction===`rtl`&&(o+=Ru(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var lf=25;function uf(e,t){let n=Dd(e),r=Od(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Hd();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=rf(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=lf&&(a-=o)}else l<=lf&&(a+=l);return{width:a,height:o,x:s,y:c}}function df(e,t){let n=nf(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=jd(e)?Qd(e):Vu(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function ff(e,t,n){let r;if(t===`viewport`)r=uf(e,n);else if(t===`document`)r=cf(Od(e));else if(Ad(t))r=df(t,n);else{let n=ef(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ld(r)}function pf(e,t){let n=Kd(e);return n===t||!Ad(n)||Ud(n)?!1:Wd(n).position===`fixed`||pf(n,t)}function mf(e,t){let n=t.get(e);if(n)return n;let r=Jd(e,[],!1).filter(e=>Ad(e)&&Ed(e)!==`body`),i=null,a=Wd(e).position===`fixed`,o=a?Kd(e):e;for(;Ad(o)&&!Ud(o);){let t=Wd(o),n=Bd(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Nd(o)&&!n&&pf(e,o))?r=r.filter(e=>e!==o):i=t,o=Kd(o)}return t.set(e,r),r}function hf(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Fd(t)?[]:mf(t,this._c):[].concat(n),r],o=ff(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=ff(t,a[e],i);s=Ru(n.top,s),c=Lu(n.right,c),l=Lu(n.bottom,l),u=Ru(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function gf(e){let{width:t,height:n}=Xd(e);return{width:t,height:n}}function _f(e,t,n){let r=jd(t),i=Od(t),a=n===`fixed`,o=nf(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Vu(0);function l(){c.x=rf(i)}if(r||!r&&!a)if((Ed(t)!==`body`||Nd(i))&&(s=Gd(t)),r){let e=nf(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?af(i,s):Vu(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function vf(e){return Wd(e).position===`static`}function yf(e,t){if(!jd(e)||Wd(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Od(e)===n&&(n=n.ownerDocument.body),n}function bf(e,t){let n=Dd(e);if(Fd(e))return n;if(!jd(e)){let t=Kd(e);for(;t&&!Ud(t);){if(Ad(t)&&!vf(t))return t;t=Kd(t)}return n}let r=yf(e,t);for(;r&&Pd(r)&&vf(r);)r=yf(r,t);return r&&Ud(r)&&vf(r)&&!Bd(r)?n:r||Vd(e)||n}var xf=async function(e){let t=this.getOffsetParent||bf,n=this.getDimensions,r=await n(e.floating);return{reference:_f(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Sf(e){return Wd(e).direction===`rtl`}var Cf={convertOffsetParentRelativeRectToViewportRelativeRect:of,getDocumentElement:Od,getClippingRect:hf,getOffsetParent:bf,getElementRects:xf,getClientRects:sf,getDimensions:gf,getScale:Qd,isElement:Ad,isRTL:Sf};function wf(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Tf(e,t){let n=null,r,i=Od(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Bu(d),h=Bu(i.clientWidth-(u+f)),g=Bu(i.clientHeight-(d+p)),_=Bu(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Ru(0,Lu(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!wf(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Ef(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Zd(e),u=i||a?[...l?Jd(l):[],...t?Jd(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Tf(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?nf(e):null;c&&g();function g(){let t=nf(e);h&&!wf(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Df=xd,Of=Sd,kf=hd,Af=wd,jf=vd,Mf=md,Nf=Cd,Pf=(e,t,n)=>{let r=new Map,i={platform:Cf,...n},a={...i.platform,_c:r};return pd(e,t,{...i,platform:a})};function Ff(e=0,t=0,n=0,r=0){if(typeof DOMRect==`function`)return new DOMRect(e,t,n,r);let i={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...i,toJSON:()=>i}}function If(e){if(!e)return Ff();let{x:t,y:n,width:r,height:i}=e;return Ff(t,n,r,i)}function Lf(e,t){return{contextElement:fc(e)?e:e?.contextElement,getBoundingClientRect:()=>{let n=e,r=t?.(n);return r||!n?If(r):n.getBoundingClientRect()}}}var Rf=e=>({variable:e,reference:`var(${e})`}),zf={arrowSize:Rf(`--arrow-size`),arrowSizeHalf:Rf(`--arrow-size-half`),arrowBg:Rf(`--arrow-background`),transformOrigin:Rf(`--transform-origin`),arrowOffset:Rf(`--arrow-offset`)},Bf=e=>e===`top`||e===`bottom`?`y`:`x`;function Vf(e,t){return{name:`transformOrigin`,fn(n){let{elements:r,middlewareData:i,placement:a,rects:o,y:s}=n,c=a.split(`-`)[0],l=Bf(c),u=i.arrow?.x||0,d=i.arrow?.y||0,f=t?.clientWidth||0,p=t?.clientHeight||0,m=u+f/2,h=d+p/2,g=Math.abs(i.shift?.y||0),_=o.reference.height/2,v=p/2,y=e.offset?.mainAxis??e.gutter,b=typeof y==`number`?y+v:y??v,x=g>b,S={top:`${m}px calc(100% + ${b}px)`,bottom:`${m}px ${-b}px`,left:`calc(100% + ${b}px) ${h}px`,right:`${-b}px ${h}px`}[c],C=`${m}px ${o.reference.y+_-s}px`,w=!!e.overlap&&l===`y`&&x;return r.floating.style.setProperty(zf.transformOrigin.variable,w?C:S),{data:{transformOrigin:w?C:S}}}}}var Hf={name:`rects`,fn({rects:e}){return{data:e}}},Uf=e=>{if(e)return{name:`shiftArrow`,fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:r,y:i}=n.arrow,a=t.split(`-`)[0];return Object.assign(e.style,{left:r==null?``:`${r}px`,top:i==null?``:`${i}px`,[a]:`calc(100% + ${zf.arrowOffset.reference})`}),{}}}};function Wf(e){let[t,n]=e.split(`-`);return{side:t,align:n,hasAlign:n!=null}}function Gf(e){return e.split(`-`)[0]}var Kf={strategy:`absolute`,placement:`bottom`,listeners:!0,restoreStyles:!1,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function qf(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Jf(e,t){return e!=null&&Math.abs(e-t)<.5}function Yf(e){return typeof e==`function`?e():e===`clipping-ancestors`?`clippingAncestors`:e}function Xf(e,t,n){return Mf({element:e||t.createElement(`div`),padding:n.arrowPadding})}function Zf(e,t){if(!Qo(t.offset??t.gutter))return Df(({placement:n})=>{let r=(e?.clientHeight||0)/2,i=t.offset?.mainAxis??t.gutter,a=typeof i==`number`?i+r:i??r,{hasAlign:o}=Wf(n),s=o?void 0:t.shift;return us({crossAxis:t.offset?.crossAxis??s,mainAxis:a,alignmentAxis:t.shift})})}function Qf(e){if(e.flip)return kf(()=>{let t=Yf(e.boundary);return{...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}})}function $f(e){if(!(!e.slide&&!e.overlap))return Of(()=>{let t=Yf(e.boundary);return{...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:Nf()}})}function ep(e){if(e.sizeMiddleware===!1&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,i;return Af(()=>{let a=Yf(e.boundary);return{padding:e.overflowPadding,...a?{boundary:a}:void 0,apply({elements:e,rects:a,availableHeight:o,availableWidth:s}){let c=e.floating,l=Math.round(a.reference.width),u=Math.round(a.reference.height);s=Math.floor(s),o=Math.floor(o),Jf(t,l)||(c.style.setProperty(`--reference-width`,`${l}px`),t=l),Jf(n,u)||(c.style.setProperty(`--reference-height`,`${u}px`),n=u),Jf(r,s)||(c.style.setProperty(`--available-width`,`${s}px`),r=s),Jf(i,o)||(c.style.setProperty(`--available-height`,`${o}px`),i=o)}}})}function tp(e){if(e.hideWhenDetached)return jf(()=>({strategy:`referenceHidden`,boundary:Yf(e.boundary)??`clippingAncestors`}))}function np(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}var rp=[`transform`,`visibility`,`pointer-events`,`--x`,`--y`,`--z-index`,`--reference-width`,`--reference-height`,`--available-width`,`--available-height`,`--transform-origin`],ip=[`top`,`right`,`bottom`,`left`];function ap(e,t){if(!e)return ss;let n=new Map(t.map(t=>[t,e.style.getPropertyValue(t)]));return()=>{n.forEach((t,n)=>{t?e.style.setProperty(n,t):e.style.removeProperty(n)}),e.style.length===0&&e.removeAttribute(`style`)}}function op(e){return e==null?null:fc(e)?e:typeof e==`object`&&e&&`contextElement`in e&&e.contextElement?e.contextElement:e}function sp(e,t,n={}){let r=()=>(typeof t==`function`?t():t)??null,i=()=>{let t=typeof e==`function`?e():e;return n.getAnchorElement?.()??t},a=()=>{let e=i();return!e&&!n.getAnchorRect?null:Lf(e,n.getAnchorRect)},o=Object.assign({},Kf,n),s=[],c=null,l,u;function d(e){l?.(),u?.(),c=e,l=o.restoreStyles?ap(e,rp):void 0;let t=e.querySelector(`[data-part=arrow]`);u=o.restoreStyles?ap(t,ip):void 0,s=[Zf(t,o),Qf(o),$f(o),Xf(t,e.ownerDocument,o),Uf(t),Vf({gutter:o.gutter,offset:o.offset,overlap:o.overlap},t),ep(o),tp(o),Hf]}let{placement:f,strategy:p,onComplete:m,onPositioned:h}=o,g,_,v=!1,y,b,x=ss,S=np(o.listeners);function C(){if(!o.listeners)return;let e=i(),t=a(),n=r();!t||!n||(op(e)!==op(y)||n!==b)&&(x(),y=e,b=n,x=Ef(t,n,T,S))}async function w(){C();let e=r();if(!e)return;e!==c&&(d(e),v=!1);let t=a();if(!t)return;let n=await Pf(t,e,{placement:f,middleware:s,strategy:p});m?.(n);let i=G(e),l=qf(i,n.x),u=qf(i,n.y);if(Jf(g,l)||(e.style.setProperty(`--x`,`${l}px`),g=l),Jf(_,u)||(e.style.setProperty(`--y`,`${u}px`),_=u),o.hideWhenDetached&&(n.middlewareData.hide?.referenceHidden?(e.style.setProperty(`visibility`,`hidden`),e.style.setProperty(`pointer-events`,`none`)):(e.style.removeProperty(`visibility`),e.style.removeProperty(`pointer-events`))),!v){let t=e.firstElementChild;t&&(e.style.setProperty(`--z-index`,kc(t).zIndex),v=!0)}}async function T(){n.updatePosition?(await n.updatePosition({updatePosition:w,floatingElement:r()}),h?.({placed:!0})):await w()}return T(),()=>{x(),u?.(),l?.(),h?.({placed:!1})}}function cp(e,t,n={}){let{defer:r,...i}=n,a=r?K:e=>e(),o=[];return o.push(a(()=>{o.push(sp(e,t,i))})),()=>{o.forEach(e=>e?.())}}var lp={bottom:`rotate(45deg)`,left:`rotate(135deg)`,top:`rotate(225deg)`,right:`rotate(315deg)`};function up(e={}){let{placement:t,sameWidth:n,fitViewport:r,strategy:i=`absolute`}=e;return{arrow:{position:`absolute`,width:zf.arrowSize.reference,height:zf.arrowSize.reference,[zf.arrowSizeHalf.variable]:`calc(${zf.arrowSize.reference} / 2)`,[zf.arrowOffset.variable]:`calc(${zf.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?lp[t.split(`-`)[0]]:void 0,background:zf.arrowBg.reference,top:`0`,left:`0`,width:`100%`,height:`100%`,position:`absolute`,zIndex:`inherit`},floating:{position:i,isolation:`isolate`,minWidth:n?void 0:`max-content`,width:n?`var(--reference-width)`:void 0,maxWidth:r?`var(--available-width)`:void 0,maxHeight:r?`var(--available-height)`:void 0,pointerEvents:t?void 0:`none`,top:`0px`,left:`0px`,transform:t?`translate3d(var(--x), var(--y), 0)`:`translate3d(0, -100vh, 0)`,zIndex:`var(--z-index)`}}}var dp=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`tooltip:${e.id}:trigger:${t}`:`tooltip:${e.id}:trigger`:Zo(n)?n(t):n},fp=e=>e.ids?.content??`tooltip:${e.id}:content`,pp=e=>e.ids?.arrow??`tooltip:${e.id}:arrow`,mp=e=>e.ids?.positioner??`tooltip:${e.id}:popper`,hp=e=>e.getById(dp(e)),gp=e=>e.getById(mp(e)),_p=e=>bl(e.getRootNode(),`[data-scope="tooltip"][data-part="trigger"][data-ownedby="${e.id}"]`),vp=(e,t)=>t==null?hp(e)??_p(e)[0]:e.getById(dp(e,t)),yp=ds({id:null,prevId:null,instant:!1});function bp(e,t){let{state:n,context:r,send:i,scope:a,prop:o,event:s}=e,c=o(`id`),l=!!o(`aria-label`),u=n.matches(`open`,`closing`),d=r.get(`triggerValue`),f=r.get(`currentPlacement`),p=f?Gf(f):void 0,m=fp(a),h=o(`disabled`),g=up({...o(`positioning`),placement:f});return{open:u,setOpen(e){n.matches(`open`,`closing`)!==e&&i({type:e?`open`:`close`})},triggerValue:d,setTriggerValue(e){i({type:`triggerValue.set`,value:e??void 0})},reposition(e={}){i({type:`positioning.set`,options:e})},getTriggerProps(e={}){let{value:n}=e,r=n==null?!1:d===n,s=dp(a,n);return t.button({...mu.trigger.attrs,id:s,"data-ownedby":a.id,"data-value":n,"data-current":W(r),dir:o(`dir`),"data-expanded":W(u),"data-state":u?`open`:`closed`,"aria-describedby":u?m:void 0,onClick(e){e.defaultPrevented||h||o(`closeOnClick`)&&i({type:u&&n!=null&&!r?`triggerValue.set`:`close`,src:`trigger.click`,value:n,triggerId:s})},onFocus(e){e.defaultPrevented||h||Pu()&&i({type:u&&n!=null&&!r?`triggerValue.set`:`open`,src:`trigger.focus`,value:n,triggerId:s})},onBlur(e){e.defaultPrevented||h||c===yp.get(`id`)&&((e.relatedTarget??a.getDoc().activeElement)?.closest(`[data-ownedby="${a.id}"]`)??i({type:`close`,src:`trigger.blur`,value:n,triggerId:s}))},onPointerDown(e){e.defaultPrevented||h||el(e)&&o(`closeOnPointerDown`)&&c===yp.get(`id`)&&i({type:`close`,src:`trigger.pointerdown`,value:n,triggerId:s})},onPointerMove(e){e.defaultPrevented||h||e.pointerType!==`touch`&&i({type:u&&n!=null&&!r?`triggerValue.set`:`pointer.move`,value:n,triggerId:s})},onPointerOver(e){e.defaultPrevented||h||e.pointerType!==`touch`&&i({type:`pointer.move`,value:n,triggerId:s})},onPointerLeave(){h||i({type:`pointer.leave`})},onPointerCancel(){h||i({type:`pointer.leave`})}})},getArrowProps(){return t.element({id:pp(a),...mu.arrow.attrs,dir:o(`dir`),style:g.arrow})},getArrowTipProps(){return t.element({...mu.arrowTip.attrs,dir:o(`dir`),style:g.arrowTip})},getPositionerProps(){return t.element({id:mp(a),...mu.positioner.attrs,dir:o(`dir`),style:g.floating})},getContentProps(){let e=yp.get(`id`)===c,n=yp.get(`prevId`)===c,r=yp.get(`instant`)&&(u&&e||n);return t.element({...mu.content.attrs,dir:o(`dir`),hidden:!u,"data-state":u?`open`:`closed`,"data-instant":W(r),role:l?void 0:`tooltip`,id:l?void 0:m,"data-placement":f,"data-side":p,onPointerEnter(){i({type:`content.pointer.move`})},onPointerLeave(){i({type:`content.pointer.leave`})},style:{pointerEvents:o(`interactive`)?`auto`:`none`}})}}}var{and:xp,not:Sp}=Zs(),Cp=Qs({initialState:({prop:e})=>e(`open`)||e(`defaultOpen`)?`open`:`closed`,props({props:e}){hs(e,[`id`]);let t=e.closeOnClick??!0,n=e.closeOnPointerDown??t;return{openDelay:400,closeDelay:150,closeOnEscape:!0,interactive:!1,closeOnScroll:!0,disabled:!1,...e,closeOnPointerDown:n,closeOnClick:t,positioning:{placement:`bottom`,...e.positioning}}},effects:[`trackFocusVisible`,`trackStore`],context:({bindable:e,prop:t,scope:n})=>({currentPlacement:e(()=>({defaultValue:void 0})),hasPointerMoveOpened:e(()=>({defaultValue:null})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:vp(n,e)})}}))}),watch({track:e,action:t,prop:n}){e([()=>n(`disabled`)],()=>{t([`closeIfDisabled`])}),e([()=>n(`open`)],()=>{t([`toggleVisibility`])}),e([()=>n(`triggerValue`)],()=>{t([`repositionImmediate`])})},on:{"triggerValue.set":{actions:[`setTriggerValue`,`repositionImmediate`]}},states:{closed:{entry:[`clearGlobalId`],on:{"controlled.open":{target:`open`},open:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`invokeOnOpen`]}],"pointer.leave":{actions:[`clearPointerMoveOpened`]},"pointer.move":[{guard:xp(`noVisibleTooltip`,Sp(`hasPointerMoveOpened`)),target:`opening`,actions:[`setTriggerValue`]},{guard:Sp(`hasPointerMoveOpened`),target:`open`,actions:[`setPointerMoveOpened`,`invokeOnOpen`,`setTriggerValue`]}]}},opening:{effects:[`trackScroll`,`trackPointerlockChange`,`waitForOpenDelay`],on:{"after.openDelay":[{guard:`isOpenControlled`,actions:[`setPointerMoveOpened`,`invokeOnOpen`]},{target:`open`,actions:[`setPointerMoveOpened`,`invokeOnOpen`]}],"controlled.open":{target:`open`},"controlled.close":{target:`closed`},open:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`invokeOnOpen`]}],"pointer.leave":[{guard:`isOpenControlled`,actions:[`clearPointerMoveOpened`,`invokeOnClose`,`toggleVisibility`]},{target:`closed`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]}],close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`,`toggleVisibility`]},{target:`closed`,actions:[`invokeOnClose`]}]}},open:{effects:[`trackEscapeKey`,`trackScroll`,`trackPointerlockChange`,`trackPositioning`],entry:[`setGlobalId`],on:{"controlled.close":{target:`closed`},close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"pointer.leave":[{guard:`isVisible`,target:`closing`,actions:[`clearPointerMoveOpened`]},{guard:`isOpenControlled`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]},{target:`closed`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]}],"content.pointer.leave":{guard:`isInteractive`,target:`closing`},"positioning.set":{actions:[`reposition`]},"triggerValue.set":{target:`closing`,actions:[`setTriggerValue`,`immediateReopen`]}}},closing:{effects:[`trackPositioning`,`waitForCloseDelay`],on:{"after.closeDelay":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"controlled.close":{target:`closed`},"controlled.open":{target:`open`},close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"pointer.move":[{guard:`isOpenControlled`,actions:[`setPointerMoveOpened`,`setTriggerValue`,`invokeOnOpen`,`toggleVisibility`]},{target:`open`,actions:[`setPointerMoveOpened`,`setTriggerValue`,`invokeOnOpen`]}],"triggerValue.set":{target:`open`,actions:[`setTriggerValue`,`repositionImmediate`]},reopen:{target:`open`},"content.pointer.move":{guard:`isInteractive`,target:`open`},"positioning.set":{actions:[`reposition`]}}}},implementations:{guards:{noVisibleTooltip:()=>yp.get(`id`)===null,isVisible:({prop:e})=>e(`id`)===yp.get(`id`),isInteractive:({prop:e})=>!!e(`interactive`),hasPointerMoveOpened:({context:e})=>!!e.get(`hasPointerMoveOpened`),isOpenControlled:({prop:e})=>e(`open`)!==void 0},actions:{setGlobalId:({prop:e})=>{let t=yp.get(`id`),n=t!==null&&t!==e(`id`);yp.update({id:e(`id`),prevId:n?t:null,instant:n})},clearGlobalId:({prop:e})=>{e(`id`)===yp.get(`id`)&&yp.update({id:null,prevId:null,instant:!1})},invokeOnOpen:({prop:e})=>{e(`onOpenChange`)?.({open:!0})},invokeOnClose:({prop:e})=>{e(`onOpenChange`)?.({open:!1})},closeIfDisabled:({prop:e,send:t})=>{e(`disabled`)&&t({type:`close`,src:`disabled.change`})},reposition:({context:e,event:t,prop:n,scope:r})=>{t.type===`positioning.set`&&cp(()=>vp(r,e.get(`triggerValue`)),()=>gp(r),{...n(`positioning`),...t.options,listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},repositionImmediate:({context:e,event:t,prop:n,scope:r})=>{let i=t.value??e.get(`triggerValue`);return cp(()=>vp(r,i),()=>gp(r),{...n(`positioning`),onComplete(t){e.set(`currentPlacement`,t.placement)}})},toggleVisibility:({prop:e,event:t,send:n})=>{queueMicrotask(()=>{n({type:e(`open`)?`controlled.open`:`controlled.close`,previousEvent:t})})},setPointerMoveOpened:({context:e,event:t})=>{let n=t.triggerId??t.previousEvent?.triggerId;e.set(`hasPointerMoveOpened`,n??null)},clearPointerMoveOpened:({context:e})=>{e.set(`hasPointerMoveOpened`,null)},setTriggerValue:({context:e,event:t})=>{t.value!==void 0&&e.set(`triggerValue`,t.value)},immediateReopen:({send:e})=>{queueMicrotask(()=>{e({type:`reopen`})})}},effects:{trackFocusVisible:({scope:e})=>Fu({root:e.getRootNode?.()}),trackPositioning:({context:e,prop:t,scope:n})=>(e.get(`currentPlacement`)||e.set(`currentPlacement`,t(`positioning`).placement),cp(()=>vp(n,e.get(`triggerValue`)),()=>gp(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})),trackPointerlockChange:({send:e,scope:t})=>ol(t.getDoc(),`pointerlockchange`,()=>e({type:`close`,src:`pointerlock:change`}),!1),trackScroll:({send:e,prop:t,scope:n,context:r})=>{if(!t(`closeOnScroll`))return;let i=vp(n,r.get(`triggerValue`));if(!i)return;let a=gl(i).map(t=>ol(t,`scroll`,()=>{e({type:`close`,src:`scroll`})},{passive:!0,capture:!0}));return()=>{a.forEach(e=>e?.())}},trackStore:({prop:e,send:t})=>{let n;return queueMicrotask(()=>{n=yp.subscribe(()=>{yp.get(`id`)!==e(`id`)&&t({type:`close`,src:`id.change`})})}),()=>n?.()},trackEscapeKey:({send:e,prop:t})=>t(`closeOnEscape`)?ol(document,`keydown`,t=>{Zc(t)||t.key===`Escape`&&(t.stopPropagation(),e({type:`close`,src:`keydown.escape`}))},!0):void 0,waitForOpenDelay:({send:e,prop:t,event:n})=>{let r=setTimeout(()=>{e({type:`after.openDelay`,previousEvent:n})},t(`openDelay`));return()=>clearTimeout(r)},waitForCloseDelay:({send:e,prop:t,event:n})=>{let r=setTimeout(()=>{e({type:`after.closeDelay`,previousEvent:n})},t(`closeDelay`));return()=>clearTimeout(r)}}}}),[wp,Tp]=_s({hookName:`useTooltipContext`,providerName:`<TooltipProvider />`}),Ep=e=>{let t=Tp(),n=q(()=>t().getArrowProps(),e);return F(J.div,n)},Dp=e=>{let t=Tp(),n=q(()=>t().getArrowTipProps(),e);return F(J.div,n)},Op=e=>{let t=Tp(),n=iu(),r=q(()=>t().getContentProps(),()=>n().presenceProps,e);return F(R,{get when(){return!n().unmounted},get children(){return F(J.div,I(r,{ref(t){var r=$l(n().ref,e.ref);typeof r==`function`&&r(t)}}))}})},kp=e=>e.children(Tp()),Ap=e=>{let t=Tp(),n=iu(),r=q(()=>t().getPositionerProps(),e);return F(R,{get when(){return!n().unmounted},get children(){return F(J.div,r)}})},jp=e=>{let t=He(),n=cu(),r=ou(),i=Il(Cp,O(()=>({id:t,dir:n().dir,getRootNode:r().getRootNode,...Ss(e)})));return O(()=>bp(i,Ul))},Mp=e=>{let[t,n]=nu(e),[r,i]=Io()(n,[`aria-label`,`closeDelay`,`closeOnClick`,`closeOnEscape`,`closeOnPointerDown`,`closeOnScroll`,`defaultOpen`,`disabled`,`id`,`ids`,`interactive`,`onOpenChange`,`open`,`openDelay`,`positioning`,`triggerValue`,`defaultTriggerValue`,`onTriggerValueChange`]),a=jp(r),o=Xl(q(t,()=>({present:a().open})));return F(wp,{value:a,get children(){return F(ru,{value:o,get children(){return i.children}})}})},Np=e=>{let[t,n]=nu(e),r=Xl(q(t,()=>({present:n.value().open})));return F(wp,{get value(){return n.value},get children(){return F(ru,{value:r,get children(){return n.children}})}})},Pp=e=>{let[t,n]=Io()(e,[`value`]),r=Tp(),i=q(()=>r().getTriggerProps(t),n);return F(J.button,i)},Fp={};uu(Fp,{Arrow:()=>Ep,ArrowTip:()=>Dp,Content:()=>Op,Context:()=>kp,Positioner:()=>Ap,Root:()=>Mp,RootProvider:()=>Np,Trigger:()=>Pp});var Ip=[100,200,250,500,1e3,2e3,5e3,1e4,15e3,3e4,6e4,12e4,3e5,6e5];function Lp(e){if(e===0)return`0s`;let t=e/1e3;if(t<1)return`${Math.round(e)}ms`;if(t<60)return t===Math.floor(t)?`${t}s`:`${Math.round(t*10)/10}s`;let n=Math.floor(t/60),r=Math.round(t%60);return r===0?`${n}m`:`${n}m ${r}s`}function Rp(e,t=60){if(e<=0)return 0;let n=Math.floor(e/t)+1;return Math.max(2,n)}function zp(e,t){if(e<=0||t<2)return e>0?e:1e3;for(let n of Ip)if(Math.floor(e/n)+1<=t)return n;let n=e/(t-1),r=10**Math.floor(Math.log10(n));return Math.ceil(n/r)*r}function Bp(e,t){if(e<=0)return[{position:0,timeMs:0,label:`0s`}];let n=[];for(let r=0;r<=e;r+=t)n.push({position:r/e,timeMs:r,label:Lp(r)});let r=n[n.length-1];return r&&r.timeMs<e&&(e-r.timeMs<=t*.5&&n.pop(),n.push({position:1,timeMs:e,label:Lp(e)})),n}function Vp(e,t,n=60){let r=zp(e,Rp(t,n));return{intervalMs:r,ticks:Bp(e,r)}}var Hp=z(`<div class="absolute top-0 bottom-0 bg-gray-300/30 pointer-events-none"style=left:0%>`),Up=z(`<div class="absolute top-0 bottom-0 bg-gray-300/30 pointer-events-none"style=right:0%>`),Wp=z(`<div class="absolute top-0 bottom-0 bg-blue-500/10 border-y border-blue-400/50">`),Gp=z(`<div class="absolute top-0 bottom-0 w-1.5 bg-blue-500 hover:bg-blue-600 cursor-ew-resize z-10 transition-colors"style=transform:translateX(-50%)><div class="absolute inset-y-1 left-0.5 w-px bg-blue-300">`),Kp=z(`<div class="relative h-1.5 bg-gray-100 border-b border-gray-200">`),qp=z(`<div class="flex-shrink-0 select-none"><div class="relative h-6 bg-gray-50">`),Jp=z(`<div class="absolute top-0 bottom-0 flex items-center pointer-events-none"><div class="w-px h-5 bg-gray-300"></div><span class="text-[10px] text-gray-500 whitespace-nowrap pl-1">`),Yp=z(`<div class="absolute top-0 bottom-0 w-px bg-blue-500 pointer-events-none z-50">`),Xp=.01;function Zp(e){let t,[n,r]=w([]),[i,a]=w(null);D(()=>{if(!t)return;let n=new ResizeObserver(t=>{for(let n of t){let t=n.contentRect.width;t>0&&r(Vp(e.durationMs,t).ticks)}});n.observe(t),N(()=>{n.disconnect()})}),D(()=>{if(t){let n=t.getBoundingClientRect().width;n>0&&r(Vp(e.durationMs,n).ticks)}});let o=()=>Gr(e.viewport.visibleStartMs,e.viewport)*100,s=()=>Gr(e.viewport.visibleEndMs,e.viewport)*100,c=()=>s()-o(),l=()=>e.hoverPosition===null?null:Gr(Wr(e.hoverPosition,e.viewport),e.viewport)*100,u=n=>r=>{if(r.preventDefault(),r.stopPropagation(),!t)return;let i=t.getBoundingClientRect().width;a({mode:n,startMouseX:r.clientX,containerWidth:i,initialViewport:{...e.viewport}})},d=t=>{let n=i();if(!n||!e.onViewportChange)return;let r=(t.clientX-n.startMouseX)/n.containerWidth*n.initialViewport.totalDurationMs,a;switch(n.mode){case`left-handle`:{let e=n.initialViewport.visibleStartMs+r,t=n.initialViewport.visibleEndMs-n.initialViewport.totalDurationMs*Xp;a={...n.initialViewport,visibleStartMs:Math.max(0,Math.min(t,e))};break}case`right-handle`:{let e=n.initialViewport.visibleEndMs+r,t=n.initialViewport.visibleStartMs+n.initialViewport.totalDurationMs*Xp,i=n.initialViewport.totalDurationMs;a={...n.initialViewport,visibleEndMs:Math.max(t,Math.min(i,e))};break}case`pan`:{let e=n.initialViewport.visibleEndMs-n.initialViewport.visibleStartMs,t=n.initialViewport.visibleStartMs+r,i=n.initialViewport.visibleEndMs+r;t<0&&(t=0,i=e),i>n.initialViewport.totalDurationMs&&(i=n.initialViewport.totalDurationMs,t=i-e),a={...n.initialViewport,visibleStartMs:t,visibleEndMs:i};break}}e.onViewportChange(Jr(a))},f=()=>{a(null)};te(()=>{let e=e=>d(e),t=()=>f();document.addEventListener(`mousemove`,e),document.addEventListener(`mouseup`,t),N(()=>{document.removeEventListener(`mousemove`,e),document.removeEventListener(`mouseup`,t)})});let p=()=>{let e=i();if(e)return e.mode===`pan`?`grabbing`:`ew-resize`},m=e=>{switch(e){case`before-hooks`:return`bg-amber-300/60 hover:bg-amber-300/80`;case`test-body`:return`bg-green-300/60 hover:bg-green-300/80`;case`after-hooks`:return`bg-amber-300/60 hover:bg-amber-300/80`}},h=t=>{let n=t.startMs/e.durationMs*100;return{left:n,width:t.endMs/e.durationMs*100-n}},g=()=>e.testPhases&&e.testPhases.length>0,_=t=>{t.stopPropagation(),e.onDoubleClick?.()};return(()=>{var r=qp(),a=r.firstChild;r.$$dblclick=_;var d=t;return typeof d==`function`?mt(d,a):t=a,H(a,F(R,{get when(){return!qr(e.viewport)},get children(){return[(()=>{var e=Hp();return E(t=>V(e,`width`,`${o()}%`)),e})(),(()=>{var e=Up();return E(t=>V(e,`left`,`${s()}%`)),e})(),(()=>{var e=Wp();return ut(e,`mousedown`,u(`pan`),!0),E(t=>{var n=`${o()}%`,r=`${c()}%`,a=i()?.mode===`pan`?`grabbing`:`grab`;return n!==t.e&&V(e,`left`,t.e=n),r!==t.t&&V(e,`width`,t.t=r),a!==t.a&&V(e,`cursor`,t.a=a),t},{e:void 0,t:void 0,a:void 0}),e})(),(()=>{var e=Gp();return ut(e,`mousedown`,u(`left-handle`),!0),E(t=>V(e,`left`,`${o()}%`)),e})(),(()=>{var e=Gp();return ut(e,`mousedown`,u(`right-handle`),!0),E(t=>V(e,`left`,`${s()}%`)),e})()]}}),null),H(a,F(L,{get each(){return n()},children:(e,t)=>{let r=()=>t()===n().length-1;return(()=>{var t=Jp(),n=t.firstChild.nextSibling;return H(n,()=>e.label),E(i=>{var a=`${e.position*100}%`,o=r()?`absolute`:`relative`,s=r()?`1px`:void 0;return a!==i.e&&V(t,`left`,i.e=a),o!==i.t&&V(n,`position`,i.t=o),s!==i.a&&V(n,`right`,i.a=s),i},{e:void 0,t:void 0,a:void 0}),t})()}}),null),H(a,F(R,{get when(){return l()},keyed:!0,children:e=>(()=>{var t=Yp();return V(t,`left`,`${e}%`),t})()}),null),H(r,F(R,{get when(){return g()},get children(){var t=Kp();return H(t,F(L,{get each(){return e.testPhases},children:t=>{let n=h(t);return F(Fp.Root,{openDelay:300,closeDelay:0,get children(){return[F(Fp.Trigger,{get class(){return`absolute top-0 bottom-0 cursor-pointer transition-colors ${m(t.type)}`},get style(){return{left:`${n.left}%`,width:`${n.width}%`}},onClick:()=>{e.onPhaseClick?.(t)}}),F(kt,{get children(){return F(Fp.Positioner,{get children(){return F(Fp.Content,{class:`bg-gray-900 text-white text-xs px-2 py-1 rounded shadow-lg z-50 flex items-center gap-1.5`,get children(){return[F(ta,{size:12}),nt(()=>t.label)]}})}})}})]}})}})),t}}),null),E(e=>{var t={"border-b border-gray-200":!g()},n=p();return e.e=dt(a,t,e.e),n!==e.t&&V(a,`cursor`,e.t=n),e},{e:void 0,t:void 0}),r})()}ot([`dblclick`,`mousedown`]);var Qp=du(`fieldset`).parts(`root`,`errorText`,`helperText`,`legend`).build(),[$p,em]=_s({hookName:`useFieldsetContext`,providerName:`<FieldsetProvider />`,strict:!1}),tm=e=>e.children(em()),nm=e=>{let t=em(),n=q(()=>t().getErrorTextProps(),e);return F(R,{get when(){return t().invalid},get children(){return F(J.span,n)}})},rm=e=>{let t=em(),n=q(()=>t().getHelperTextProps(),e);return F(J.span,n)},im=e=>{let t=em(),n=q(()=>t().getLegendProps(),e);return F(J.legend,n)},am=e=>{let t=ou(),n=I({disabled:!1,invalid:!1},Ss(e)),[r,i]=w(void 0),a=n.id??He(),o=`fieldset::${a}::legend`,s=`fieldset::${a}::error-text`,c=`fieldset::${a}::helper-text`,[l,u]=w(!1),[d,f]=w(!1);te(()=>{let e=r();if(!e)return;let n=()=>{let e=t().getRootNode();u(!!e.getElementById(s)),f(!!e.getElementById(c))};n();let i=new(t().getWindow()).MutationObserver(n);i.observe(e,{childList:!0,subtree:!0}),N(()=>i.disconnect())});let p=O(()=>{let e=[];return l()&&n.invalid&&e.push(s),d()&&e.push(c),e}),m=()=>({...Qp.root.attrs,disabled:n.disabled,"data-disabled":W(n.disabled),"data-invalid":W(n.invalid),"aria-labelledby":o,"aria-describedby":p().join(` `)||void 0}),h=()=>({id:o,...Qp.legend.attrs,"data-disabled":W(n.disabled),"data-invalid":W(n.invalid)}),g=()=>({id:c,...Qp.helperText.attrs}),_=()=>({id:s,...Qp.errorText.attrs,"aria-live":`polite`});return O(()=>({refs:{rootRef:i},ids:{legend:o,errorText:s,helperText:c},disabled:n.disabled,invalid:n.invalid,getRootProps:m,getLegendProps:h,getHelperTextProps:g,getErrorTextProps:_}))},om=e=>{let[t,n]=Io()(e,[`id`,`disabled`,`invalid`]),r=am(t),i=q(()=>r().getRootProps(),n);return F($p,{value:r,get children(){return F(J.fieldset,I(i,{ref(t){var n=$l(r().refs.rootRef,e.ref);typeof n==`function`&&n(t)}}))}})};om.displayName=`FieldsetRoot`;var sm=e=>{let[{value:t},n]=Io()(e,[`value`]),r=q(()=>t().getRootProps(),n);return F($p,{value:t,get children(){return F(J.fieldset,r)}})};uu({},{Context:()=>tm,ErrorText:()=>nm,HelperText:()=>rm,Legend:()=>im,Root:()=>om,RootProvider:()=>sm});var cm=du(`field`).parts(`root`,`errorText`,`helperText`,`input`,`label`,`select`,`textarea`,`requiredIndicator`).build(),lm=e=>{if(!e)return;let t=kc(e),n=G(e),r=Cc(e),i=()=>{requestAnimationFrame(()=>{e.style.height=`auto`;let n;n=t.boxSizing===`content-box`?e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!==`none`&&n>parseFloat(t.maxHeight)?(t.overflowY===`hidden`&&(e.style.overflowY=`scroll`),n=parseFloat(t.maxHeight)):t.overflowY!==`hidden`&&(e.style.overflowY=`hidden`),e.style.height=`${n}px`})};e.addEventListener(`input`,i),e.form?.addEventListener(`reset`,i);let a=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),`value`);a&&Object.defineProperty(e,"value",{...a,set(t){let r=a.get?.call(this);a.set?.call(this,t),i(),r!==t&&queueMicrotask(()=>{e.dispatchEvent(new n.InputEvent(`input`,{bubbles:!0}))})}});let o=new n.ResizeObserver(()=>{requestAnimationFrame(()=>i())});o.observe(e);let s=new n.MutationObserver(()=>i());return s.observe(e,{attributes:!0,attributeFilter:[`rows`,`placeholder`]}),r.fonts?.addEventListener(`loadingdone`,i),()=>{e.removeEventListener(`input`,i),e.form?.removeEventListener(`reset`,i),r.fonts?.removeEventListener(`loadingdone`,i),o.disconnect(),s.disconnect()}},[um,dm]=_s({hookName:`useFieldContext`,providerName:`<FieldProvider />`,strict:!1}),fm=e=>e.children(dm()),pm=e=>{let t=dm(),n=q(()=>t().getErrorTextProps(),e);return F(R,{get when(){return t?.().invalid},get children(){return F(J.span,n)}})},mm=e=>{let t=dm(),n=q(()=>t().getHelperTextProps(),e);return F(J.span,n)},hm=e=>{let t=dm(),n=q(()=>t?.().getInputProps(),e);return F(J.input,n)},gm=e=>{let t=dm(),n=O(()=>{let n=t?.();if(!n)throw Error(`Field.Item must be used within Field.Root`);let r=`field::${n.ids.control}::item::${e.value}`,i=`${r}::label`,a=()=>({...n.getInputProps(),id:r});return()=>({...n,ids:{...n.ids,control:r,label:i},getLabelProps:()=>({...n.getLabelProps(),id:i,htmlFor:r}),getInputProps:()=>({...a(),...cm.input.attrs}),getSelectProps:()=>({...a(),...cm.select.attrs}),getTextareaProps:()=>({...a(),...cm.textarea.attrs})})});return F(um,{get value(){return n()},get children(){return e.children}})},_m=e=>{let t=dm(),n=q(()=>t?.().getLabelProps(),e);return F(J.label,n)},vm=e=>{let t=dm(),n=q(()=>t().getRequiredIndicatorProps(),e);return F(R,{get when(){return t().required},get fallback(){return e.fallback},get children(){return F(J.span,I(n,{get children(){return e.children??`*`}}))}})},ym=e=>{let t=em(),n=ou(),r=I({disabled:!!t?.().disabled,required:!1,invalid:!1,readOnly:!1},e),[i,a]=w(!1),[o,s]=w(!1),c=r.id??He(),[l,u]=w(void 0),d=r.ids?.control??`field::${c}`,f=r.ids?.errorText??`field::${c}::error-text`,p=r.ids?.helperText??`field::${c}::helper-text`,m=r.ids?.label??`field::${c}::label`;te(()=>{let e=l();if(!e)return;let t=()=>{let e=n().getRootNode();a(!!e.getElementById(f)),s(!!e.getElementById(p))};t();let r=new(n().getWindow()).MutationObserver(t);r.observe(e,{childList:!0,subtree:!0}),N(()=>r.disconnect())});let h=()=>({...cm.root.attrs,id:d,role:`group`,"data-disabled":W(r.disabled),"data-invalid":W(r.invalid),"data-readonly":W(r.readOnly)}),g=r.target?`field::${c}::item::${r.target}`:void 0,_=()=>({...cm.label.attrs,id:m,"data-disabled":W(r.disabled),"data-invalid":W(r.invalid),"data-readonly":W(r.readOnly),"data-required":W(r.required),htmlFor:g??c}),v=O(()=>{let e=[];return i()&&r.invalid&&e.push(f),o()&&e.push(p),e}),y=()=>({"aria-describedby":v().join(` `)||void 0,"aria-invalid":cc(r.invalid),"data-invalid":W(r.invalid),"data-required":W(r.required),"data-readonly":W(r.readOnly),id:c,required:r.required,disabled:r.disabled,readOnly:r.readOnly||void 0}),b=()=>({...y(),...cm.input.attrs}),x=()=>({...y(),...cm.textarea.attrs}),S=()=>({...y(),...cm.select.attrs}),C=()=>({id:p,...cm.helperText.attrs,"data-disabled":W(r.disabled)}),T=()=>({id:f,...cm.errorText.attrs,"aria-live":`polite`}),E=()=>({"aria-hidden":!0,...cm.requiredIndicator.attrs});return O(()=>({ariaDescribedby:v().join(` `),ids:{control:c,label:m,errorText:f,helperText:p},refs:{rootRef:u},disabled:r.disabled,invalid:r.invalid,readOnly:r.readOnly,required:r.required,getLabelProps:_,getRootProps:h,getInputProps:b,getTextareaProps:x,getSelectProps:S,getHelperTextProps:C,getErrorTextProps:T,getRequiredIndicatorProps:E}))},bm=e=>{let[t,n]=Io()(e,[`id`,`ids`,`disabled`,`invalid`,`readOnly`,`required`,`target`]),r=ym(t),i=q(()=>r().getRootProps(),n);return F(um,{value:r,get children(){return F(J.div,I(i,{ref(t){var n=$l(r().refs.rootRef,e.ref);typeof n==`function`&&n(t)}}))}})},xm=e=>{let[{value:t},n]=Io()(e,[`value`]),r=q(()=>t().getRootProps(),n);return F(um,{value:t,get children(){return F(J.div,r)}})},Sm=e=>{let t=dm(),n=q(()=>t?.().getSelectProps(),e);return F(J.select,n)},Cm=e=>{let t=dm(),n,[r,i]=Be(e,[`autoresize`]),a=q(()=>t?.().getTextareaProps(),()=>({style:{resize:r.autoresize?`none`:void 0}}),i);return te(()=>{if(!r.autoresize)return;let e=lm(n);N(()=>e?.())}),F(J.textarea,I(a,{ref(t){var r=$l(e=>n=e,e.ref);typeof r==`function`&&r(t)}}))};uu({},{Context:()=>fm,ErrorText:()=>pm,HelperText:()=>mm,Input:()=>hm,Item:()=>gm,Label:()=>_m,RequiredIndicator:()=>vm,Root:()=>bm,RootProvider:()=>xm,Select:()=>Sm,Textarea:()=>Cm});var wm=du(`combobox`).parts(`root`,`clearTrigger`,`content`,`control`,`input`,`item`,`itemGroup`,`itemGroupLabel`,`itemIndicator`,`itemText`,`label`,`list`,`positioner`,`trigger`),Y=wm.build(),Tm=Object.defineProperty,Em=(e,t,n)=>t in e?Tm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,X=(e,t,n)=>Em(e,typeof t==`symbol`?t:t+``,n),Dm={itemToValue(e){return typeof e==`string`?e:Jo(e)&&$o(e,`value`)?e.value:``},itemToString(e){return typeof e==`string`?e:Jo(e)&&$o(e,`label`)?e.label:Dm.itemToValue(e)},isItemDisabled(e){return Jo(e)&&$o(e,`disabled`)?!!e.disabled:!1}},Om=class e{constructor(t){X(this,`options`,t),X(this,`items`),X(this,`indexMap`,null),X(this,`copy`,t=>new e({...this.options,items:t??[...this.items]})),X(this,`isEqual`,e=>Wo(this.items,e.items)),X(this,`setItems`,e=>this.copy(e)),X(this,`getValues`,(e=this.items)=>{let t=[];for(let n of e){let e=this.getItemValue(n);e!=null&&t.push(e)}return t}),X(this,`find`,e=>{if(e==null)return null;let t=this.indexOf(e);return t===-1?null:this.at(t)}),X(this,`findMany`,e=>{let t=[];for(let n of e){let e=this.find(n);e!=null&&t.push(e)}return t}),X(this,`at`,e=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[e]??null;let t=0,n=this.group();for(let[,r]of n)for(let n of r){if(t===e)return n;t++}return null}),X(this,`sortFn`,(e,t)=>{let n=this.indexOf(e),r=this.indexOf(t);return(n??0)-(r??0)}),X(this,`sort`,e=>[...e].sort(this.sortFn.bind(this))),X(this,`getItemValue`,e=>e==null?null:this.options.itemToValue?.(e)??Dm.itemToValue(e)),X(this,`getItemDisabled`,e=>e==null?!1:this.options.isItemDisabled?.(e)??Dm.isItemDisabled(e)),X(this,`stringifyItem`,e=>e==null?null:this.options.itemToString?.(e)??Dm.itemToString(e)),X(this,`stringify`,e=>e==null?null:this.stringifyItem(this.find(e))),X(this,`stringifyItems`,(e,t=`, `)=>{let n=[];for(let t of e){let e=this.stringifyItem(t);e!=null&&n.push(e)}return n.join(t)}),X(this,`stringifyMany`,(e,t)=>this.stringifyItems(this.findMany(e),t)),X(this,`has`,e=>this.indexOf(e)!==-1),X(this,`hasItem`,e=>e==null?!1:this.has(this.getItemValue(e))),X(this,`group`,()=>{let{groupBy:e,groupSort:t}=this.options;if(!e)return[[``,[...this.items]]];let n=new Map;this.items.forEach((t,r)=>{let i=e(t,r);n.has(i)||n.set(i,[]),n.get(i).push(t)});let r=Array.from(n.entries());return t&&r.sort(([e],[n])=>{if(typeof t==`function`)return t(e,n);if(Array.isArray(t)){let r=t.indexOf(e),i=t.indexOf(n);return r===-1?1:i===-1?-1:r-i}return t===`asc`?e.localeCompare(n):t===`desc`?n.localeCompare(e):0}),r}),X(this,`getNextValue`,(e,t=1,n=!1)=>{let r=this.indexOf(e);if(r===-1)return null;for(r=n?Math.min(r+t,this.size-1):r+t;r<=this.size&&this.getItemDisabled(this.at(r));)r++;return this.getItemValue(this.at(r))}),X(this,`getPreviousValue`,(e,t=1,n=!1)=>{let r=this.indexOf(e);if(r===-1)return null;for(r=n?Math.max(r-t,0):r-t;r>=0&&this.getItemDisabled(this.at(r));)r--;return this.getItemValue(this.at(r))}),X(this,`indexOf`,e=>{if(e==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(t=>this.getItemValue(t)===e);if(!this.indexMap){this.indexMap=new Map;let e=0,t=this.group();for(let[,n]of t)for(let t of n){let n=this.getItemValue(t);n!=null&&this.indexMap.set(n,e),e++}}return this.indexMap.get(e)??-1}),X(this,`getByText`,(e,t)=>{let n=t==null?-1:this.indexOf(t),r=e.length===1;for(let i=0;i<this.items.length;i++){let a=this.items[(n+i+1)%this.items.length];if(!(r&&this.getItemValue(a)===t)&&!this.getItemDisabled(a)&&km(this.stringifyItem(a),e))return a}}),X(this,`search`,(e,t)=>{let{state:n,currentValue:r,timeout:i=350}=t,a=n.keysSoFar+e,o=a.length>1&&Array.from(a).every(e=>e===a[0])?a[0]:a,s=this.getByText(o,r),c=this.getItemValue(s);function l(){clearTimeout(n.timer),n.timer=-1}function u(e){n.keysSoFar=e,l(),e!==``&&(n.timer=+setTimeout(()=>{u(``),l()},i))}return u(a),c}),X(this,`update`,(e,t)=>{let n=this.indexOf(e);return n===-1?this:this.copy([...this.items.slice(0,n),t,...this.items.slice(n+1)])}),X(this,`upsert`,(e,t,n=`append`)=>{let r=this.indexOf(e);return r===-1?(n===`append`?this.append:this.prepend)(t):this.copy([...this.items.slice(0,r),t,...this.items.slice(r+1)])}),X(this,`insert`,(e,...t)=>this.copy(Am(this.items,e,...t))),X(this,`insertBefore`,(e,...t)=>{let n=this.indexOf(e);if(n===-1)if(this.items.length===0)n=0;else return this;return this.copy(Am(this.items,n,...t))}),X(this,`insertAfter`,(e,...t)=>{let n=this.indexOf(e);if(n===-1)if(this.items.length===0)n=0;else return this;return this.copy(Am(this.items,n+1,...t))}),X(this,`prepend`,(...e)=>this.copy(Am(this.items,0,...e))),X(this,`append`,(...e)=>this.copy(Am(this.items,this.items.length,...e))),X(this,`filter`,e=>{let t=this.items.filter((t,n)=>e(this.stringifyItem(t),n,t));return this.copy(t)}),X(this,`remove`,(...e)=>{let t=e.map(e=>typeof e==`string`?e:this.getItemValue(e));return this.copy(this.items.filter(e=>{let n=this.getItemValue(e);return n==null?!1:!t.includes(n)}))}),X(this,`move`,(e,t)=>{let n=this.indexOf(e);return n===-1?this:this.copy(jm(this.items,[n],t))}),X(this,`moveBefore`,(e,...t)=>{let n=this.items.findIndex(t=>this.getItemValue(t)===e);if(n===-1)return this;let r=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(jm(this.items,r,n))}),X(this,`moveAfter`,(e,...t)=>{let n=this.items.findIndex(t=>this.getItemValue(t)===e);if(n===-1)return this;let r=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(jm(this.items,r,n+1))}),X(this,`reorder`,(e,t)=>this.copy(jm(this.items,[e],t))),X(this,`compareValue`,(e,t)=>{let n=this.indexOf(e),r=this.indexOf(t);return n<r?-1:+(n>r)}),X(this,`range`,(e,t)=>{let n=[],r=e;for(;r!=null;){if(this.find(r)&&n.push(r),r===t)return n;r=this.getNextValue(r)}return[]}),X(this,`getValueRange`,(e,t)=>e&&t?this.compareValue(e,t)<=0?this.range(e,t):this.range(t,e):[]),X(this,`toString`,()=>{let e=``;for(let t of this.items){let n=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(`:`);e+=n+`,`}return e}),X(this,`toJSON`,()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}*[Symbol.iterator](){yield*this.items}},km=(e,t)=>!!e?.toLowerCase().startsWith(t.toLowerCase());function Am(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function jm(e,t,n){t=[...t].sort((e,t)=>e-t);let r=t.map(t=>e[t]);for(let n=t.length-1;n>=0;n--)e=[...e.slice(0,t[n]),...e.slice(t[n]+1)];return n=Math.max(0,n-t.filter(e=>e<n).length),[...e.slice(0,n),...r,...e.slice(n)]}function Mm({values:e,collection:t,selectedItemMap:n}){let r=[];for(let i of e){let e=t.find(i)??n.get(i);e!=null&&r.push(e)}return r}function Nm({selectedItemMap:e,values:t,selectedItems:n,collection:r}){let i=new Map(e);for(let e of n){let t=r.getItemValue(e);t!=null&&i.set(t,e)}let a=new Set(t);for(let e of i.keys())a.has(e)||i.delete(e);return i}function Pm({values:e,collection:t,selectedItemMap:n}){let r=Mm({values:e,collection:t,selectedItemMap:n});return{selectedItems:r,nextSelectedItemMap:Nm({selectedItemMap:n,values:e,selectedItems:r,collection:t})}}function Fm({selectedItems:e,collection:t}){return Nm({selectedItemMap:new Map,values:e.map(e=>t.getItemValue(e)).filter(Boolean),selectedItems:e,collection:t})}var Im=e=>new Om(e);Im.empty=()=>new Om({items:[]});var Lm=e=>e.ids?.root??`combobox:${e.id}`,Rm=e=>e.ids?.label??`combobox:${e.id}:label`,zm=e=>e.ids?.control??`combobox:${e.id}:control`,Bm=e=>e.ids?.input??`combobox:${e.id}:input`,Vm=e=>e.ids?.content??`combobox:${e.id}:content`,Hm=e=>e.ids?.positioner??`combobox:${e.id}:popper`,Um=e=>e.ids?.trigger??`combobox:${e.id}:toggle-btn`,Wm=e=>e.ids?.clearTrigger??`combobox:${e.id}:clear-btn`,Gm=(e,t)=>e.ids?.itemGroup?.(t)??`combobox:${e.id}:optgroup:${t}`,Km=(e,t)=>e.ids?.itemGroupLabel?.(t)??`combobox:${e.id}:optgroup-label:${t}`,qm=(e,t)=>e.ids?.item?.(t)??`combobox:${e.id}:option:${t}`,Jm=e=>e.getById(Vm(e)),Ym=e=>e.getById(Bm(e)),Xm=e=>e.getById(Hm(e)),Zm=e=>e.getById(zm(e)),Qm=e=>e.getById(Um(e)),$m=e=>e.getById(Wm(e)),eh=(e,t)=>{if(t==null)return null;let n=`[role=option][data-value="${CSS.escape(t)}"]`;return xl(Jm(e),n)},th=e=>{let t=Ym(e);e.isActiveElement(t)||t?.focus({preventScroll:!0}),ac(t)},nh=e=>{let t=Qm(e);e.isActiveElement(t)||t?.focus({preventScroll:!0})};function rh(e,t){let{context:n,prop:r,state:i,send:a,scope:o,computed:s,event:c}=e,l=r(`translations`),u=r(`collection`),d=!!r(`disabled`),f=s(`isInteractive`),p=!!r(`invalid`),m=!!r(`required`),h=!!r(`readOnly`),g=i.hasTag(`open`),_=i.hasTag(`focused`),v=r(`composite`),y=n.get(`highlightedValue`),b=n.get(`currentPlacement`),x=b?Gf(b):void 0,S=up({...r(`positioning`),placement:b});function C(e){let t=u.getItemDisabled(e.item),r=u.getItemValue(e.item);return ms(r,()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`),{value:r,disabled:!!(d||t),highlighted:y===r,selected:n.get(`value`).includes(r)}}return{focused:_,open:g,inputValue:n.get(`inputValue`),highlightedValue:y,highlightedItem:n.get(`highlightedItem`),value:n.get(`value`),valueAsString:s(`valueAsString`),hasSelectedItems:s(`hasSelectedItems`),selectedItems:s(`selectedItems`),collection:r(`collection`),multiple:!!r(`multiple`),disabled:!!d,syncSelectedItems(){a({type:`SELECTED_ITEMS.SYNC`})},reposition(e={}){a({type:`POSITIONING.SET`,options:e})},setHighlightValue(e){a({type:`HIGHLIGHTED_VALUE.SET`,value:e})},clearHighlightValue(){a({type:`HIGHLIGHTED_VALUE.CLEAR`})},selectValue(e){a({type:`ITEM.SELECT`,value:e})},setValue(e){a({type:`VALUE.SET`,value:e})},setInputValue(e,t=`script`){a({type:`INPUT_VALUE.SET`,value:e,src:t})},clearValue(e){a(e==null?{type:`VALUE.CLEAR`}:{type:`ITEM.CLEAR`,value:e})},focus(){Ym(o)?.focus()},setOpen(e,t=`script`){i.hasTag(`open`)!==e&&a({type:e?`OPEN`:`CLOSE`,src:t})},getRootProps(){return t.element({...Y.root.attrs,dir:r(`dir`),id:Lm(o),"data-invalid":W(p),"data-readonly":W(h)})},getLabelProps(){return t.label({...Y.label.attrs,dir:r(`dir`),htmlFor:Bm(o),id:Rm(o),"data-readonly":W(h),"data-disabled":W(d),"data-invalid":W(p),"data-required":W(m),"data-focus":W(_),onClick(e){v||(e.preventDefault(),Qm(o)?.focus({preventScroll:!0}))}})},getControlProps(){return t.element({...Y.control.attrs,dir:r(`dir`),id:zm(o),"data-state":g?`open`:`closed`,"data-focus":W(_),"data-disabled":W(d),"data-invalid":W(p)})},getPositionerProps(){return t.element({...Y.positioner.attrs,dir:r(`dir`),id:Hm(o),style:S.floating})},getInputProps(){return t.input({...Y.input.attrs,dir:r(`dir`),"aria-invalid":cc(p),"data-invalid":W(p),"data-autofocus":W(r(`autoFocus`)),name:r(`name`),form:r(`form`),disabled:d,required:r(`required`),autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`none`,spellCheck:`false`,readOnly:h,placeholder:r(`placeholder`),id:Bm(o),type:`text`,role:`combobox`,defaultValue:n.get(`inputValue`),"aria-autocomplete":s(`autoComplete`)?`both`:`list`,"aria-controls":Vm(o),"aria-expanded":g,"data-state":g?`open`:`closed`,"aria-activedescendant":y?qm(o,y):void 0,onClick(e){e.defaultPrevented||r(`openOnClick`)&&f&&a({type:`INPUT.CLICK`,src:`input-click`})},onFocus(){d||a({type:`INPUT.FOCUS`})},onBlur(){d||a({type:`INPUT.BLUR`})},onChange(e){a({type:`INPUT.CHANGE`,value:e.currentTarget.value,src:`input-change`})},onKeyDown(e){if(e.defaultPrevented||!f||e.ctrlKey||e.shiftKey||Zc(e))return;let t=r(`openOnKeyPress`),n=e.ctrlKey||e.metaKey||e.shiftKey,i={ArrowDown(e){!t&&!g||(a({type:e.altKey?`OPEN`:`INPUT.ARROW_DOWN`,keypress:!0,src:`arrow-key`}),e.preventDefault())},ArrowUp(){!t&&!g||(a({type:e.altKey?`CLOSE`:`INPUT.ARROW_UP`,keypress:!0,src:`arrow-key`}),e.preventDefault())},Home(e){n||(a({type:`INPUT.HOME`,keypress:!0}),g&&e.preventDefault())},End(e){n||(a({type:`INPUT.END`,keypress:!0}),g&&e.preventDefault())},Enter(e){a({type:`INPUT.ENTER`,keypress:!0,src:`item-select`});let t=y!=null,n=r(`alwaysSubmitOnEnter`),i=s(`isCustomValue`)&&!r(`allowCustomValue`);if(g&&!n&&(t||i)&&e.preventDefault(),y==null)return;let c=eh(o,y);yc(c)&&r(`navigate`)?.({value:y,node:c,href:c.href})},Escape(){a({type:`INPUT.ESCAPE`,keypress:!0,src:`escape-key`}),e.preventDefault()}}[il(e,{dir:r(`dir`)})];i?.(e)}})},getTriggerProps(e={}){return t.button({...Y.trigger.attrs,dir:r(`dir`),id:Um(o),"aria-haspopup":v?`listbox`:`dialog`,type:`button`,tabIndex:e.focusable?void 0:-1,"aria-label":l.triggerLabel,"aria-expanded":g,"data-state":g?`open`:`closed`,"aria-controls":g?Vm(o):void 0,disabled:d,"data-invalid":W(p),"data-focusable":W(e.focusable),"data-readonly":W(h),"data-disabled":W(d),onFocus(){e.focusable&&a({type:`INPUT.FOCUS`,src:`trigger`})},onClick(e){e.defaultPrevented||f&&el(e)&&a({type:`TRIGGER.CLICK`,src:`trigger-click`})},onPointerDown(e){f&&e.pointerType!==`touch`&&el(e)&&(e.preventDefault(),queueMicrotask(()=>{th(o)}))},onKeyDown(e){if(e.defaultPrevented||v)return;let t={ArrowDown(){a({type:`INPUT.ARROW_DOWN`,src:`arrow-key`})},ArrowUp(){a({type:`INPUT.ARROW_UP`,src:`arrow-key`})}}[il(e,{dir:r(`dir`)})];t&&(t(e),e.preventDefault())}})},getContentProps(){return t.element({...Y.content.attrs,dir:r(`dir`),id:Vm(o),role:v?`listbox`:`dialog`,tabIndex:-1,hidden:!g,"data-state":g?`open`:`closed`,"data-placement":b,"data-side":x,"aria-labelledby":Rm(o),"aria-multiselectable":r(`multiple`)&&v?!0:void 0,"data-empty":W(u.size===0),onPointerDown(e){el(e)&&e.preventDefault()}})},getListProps(){return t.element({...Y.list.attrs,role:v?void 0:`listbox`,"data-empty":W(u.size===0),"aria-labelledby":Rm(o),"aria-multiselectable":r(`multiple`)&&!v?!0:void 0})},getClearTriggerProps(){return t.button({...Y.clearTrigger.attrs,dir:r(`dir`),id:Wm(o),type:`button`,tabIndex:-1,disabled:d,"data-invalid":W(p),"aria-label":l.clearTriggerLabel,"aria-controls":Bm(o),hidden:!n.get(`value`).length,onPointerDown(e){el(e)&&e.preventDefault()},onClick(e){e.defaultPrevented||f&&a({type:`VALUE.CLEAR`,src:`clear-trigger`})}})},getItemState:C,getItemProps(e){let n=C(e),i=n.value;return t.element({...Y.item.attrs,dir:r(`dir`),id:qm(o,i),role:`option`,tabIndex:-1,"data-highlighted":W(n.highlighted),"data-state":n.selected?`checked`:`unchecked`,"aria-selected":cc(n.selected),"aria-disabled":cc(n.disabled),"data-disabled":W(n.disabled),"data-value":n.value,onPointerMove(){n.disabled||n.highlighted||a({type:`ITEM.POINTER_MOVE`,value:i})},onPointerLeave(){e.persistFocus||n.disabled||c.previous()?.type.includes(`POINTER`)&&a({type:`ITEM.POINTER_LEAVE`,value:i})},onClick(e){Xc(e)||Yc(e)||tl(e)||n.disabled||a({type:`ITEM.CLICK`,src:`item-select`,value:i})}})},getItemTextProps(e){let n=C(e);return t.element({...Y.itemText.attrs,dir:r(`dir`),"data-state":n.selected?`checked`:`unchecked`,"data-disabled":W(n.disabled),"data-highlighted":W(n.highlighted)})},getItemIndicatorProps(e){let n=C(e);return t.element({"aria-hidden":!0,...Y.itemIndicator.attrs,dir:r(`dir`),"data-state":n.selected?`checked`:`unchecked`,hidden:!n.selected})},getItemGroupProps(e){let{id:n}=e;return t.element({...Y.itemGroup.attrs,dir:r(`dir`),id:Gm(o,n),"aria-labelledby":Km(o,n),"data-empty":W(u.size===0),role:`group`})},getItemGroupLabelProps(e){let{htmlFor:n}=e;return t.element({...Y.itemGroupLabel.attrs,dir:r(`dir`),id:Km(o,n),role:`presentation`})}}}function ih(e){let t={each(t){for(let n=0;n<e.frames?.length;n+=1){let r=e.frames[n];r&&t(r)}},addEventListener(e,n,r){return t.each(t=>{try{t.document.addEventListener(e,n,r)}catch{}}),()=>{try{t.removeEventListener(e,n,r)}catch{}}},removeEventListener(e,n,r){t.each(t=>{try{t.document.removeEventListener(e,n,r)}catch{}})}};return t}function ah(e){let t=e.frameElement==null?null:e.parent;return{addEventListener:(e,n,r)=>{try{t?.addEventListener(e,n,r)}catch{}return()=>{try{t?.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{t?.removeEventListener(e,n,r)}catch{}}}}var oh=`pointerdown.outside`,sh=`focus.outside`;function ch(e){for(let t of e)if(fc(t)&&cl(t))return!0;return!1}var lh=e=>`clientY`in e;function uh(e,t){if(!lh(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function dh(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function fh(e,t){if(!t||!lh(e))return!1;let n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,a=i&&e.clientY>t.offsetTop+t.clientHeight;return dh({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},{x:e.clientX,y:e.clientY})?r||a:!1}function ph(e,t){let{exclude:n,onFocusOutside:r,onPointerDownOutside:i,onInteractOutside:a,defer:o,followControlledElements:s=!0}=t;if(!e)return;let c=Cc(e),l=G(e),u=ih(l),d=ah(l);function f(t,r){if(!fc(r)||!r.isConnected||Sc(e,r)||uh(e,t)||s&&Nc(e,r))return!1;let i=c.querySelector(`[aria-controls="${e.id}"]`);return i&&fh(t,hl(i))||fh(t,hl(e))?!1:!n?.(r)}let p=new Set,m=vc(e?.getRootNode()),h=!1;function g(t){h=!0;let n=()=>{h=!1};c.addEventListener(`pointerup`,n,{once:!0}),l.addEventListener(`pointerup`,n,{once:!0});function r(n){let r=o&&!zc()?K:e=>e(),s=n??t,c=s?.composedPath?.()??[s?.target];r(()=>{let n=m?c[0]:Jc(t);if(!(!e||!f(t,n))){if(i||a){let t=cs(i,a);e.addEventListener(oh,t,{once:!0})}hh(e,oh,{bubbles:!1,cancelable:!0,detail:{originalEvent:s,contextmenu:tl(s),focusable:ch(c),target:n}})}})}t.pointerType===`touch`?(p.forEach(e=>e()),p.add(ol(c,`click`,r,{once:!0})),p.add(d.addEventListener(`click`,r,{once:!0})),p.add(u.addEventListener(`click`,r,{once:!0}))):r()}let _=new Set,v=setTimeout(()=>{_.add(ol(c,`pointerdown`,g,!0)),_.add(d.addEventListener(`pointerdown`,g,!0)),_.add(u.addEventListener(`pointerdown`,g,!0))},0);function y(t){h||(o?K:e=>e())(()=>{let n=t?.composedPath?.()??[t?.target],i=m?n[0]:Jc(t);if(!(!e||!f(t,i))){if(r||a){let t=cs(r,a);e.addEventListener(sh,t,{once:!0})}hh(e,sh,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:cl(i),target:i}})}})}return zc()||(_.add(ol(c,`focusin`,y,!0)),_.add(d.addEventListener(`focusin`,y,!0)),_.add(u.addEventListener(`focusin`,y,!0))),()=>{clearTimeout(v),p.forEach(e=>e()),_.forEach(e=>e())}}function mh(e,t){let{defer:n}=t,r=n?K:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(ph(n,t))})),()=>{i.forEach(e=>e?.())}}function hh(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function gh(e,t){return ol(Cc(e),`keydown`,e=>{e.key===`Escape`&&(e.isComposing||t?.(e))},{capture:!0})}var _h=`layer:request-dismiss`,Z={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1)},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){let n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(e=>e.type===t)},getParentLayerOfType(e,t){let n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(e=>e.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(e=>Sc(e.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>Sc(t,e))},add(e){let t=this.indexOf(e.node);t!==-1&&this.layers.splice(t,1),this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(this.layers[t].styleTargets?.forEach(e=>{let t=e();t&&yh(t)}),this.recentlyRemoved.add(e),ul(()=>this.recentlyRemoved.delete(e)),t<this.count()-1&&this.getNestedLayers(e).forEach(t=>Z.dismiss(t.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{vh(e,t,e.node),e.styleTargets?.forEach(n=>{let r=n();if(!r||r===e.node)return;vh(e,t,r);let{zIndex:i}=kc(e.node);r.style.setProperty(`--z-index`,i)})})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let r=this.layers[n];xh(e,_h,e=>{r.requestDismiss?.(e),e.defaultPrevented||r?.dismiss()}),bh(e,_h,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function vh(e,t,n){n.style.setProperty(`--layer-index`,`${t}`),n.removeAttribute(`data-nested`),n.removeAttribute(`data-has-nested`),Z.getParentLayerOfType(e.node,e.type)&&n.setAttribute(`data-nested`,e.type);let r=Z.countNestedLayersOfType(e.node,e.type);r>0&&n.setAttribute(`data-has-nested`,e.type),n.style.setProperty(`--nested-layer-count`,`${r}`)}function yh(e){e.style.removeProperty(`--layer-index`),e.style.removeProperty(`--nested-layer-count`),e.style.removeProperty(`--z-index`),e.removeAttribute(`data-nested`),e.removeAttribute(`data-has-nested`)}function bh(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function xh(e,t,n){e.addEventListener(t,n,{once:!0})}var Sh=new WeakMap,Ch=new WeakMap;function wh(e){return Z.isBelowPointerBlockingLayer(e)?`none`:`auto`}function Th(e){let t=wh(e);e.style.pointerEvents!==t&&(e.style.pointerEvents=t)}function Eh(e){if(Ch.has(e))return;let t=G(e);if(t.MutationObserver===void 0)return;let n=new t.MutationObserver(()=>{Ch.has(e)&&Th(e)});n.observe(e,{attributes:!0,attributeFilter:[`style`]}),Ch.set(e,n)}function Dh(){Z.layers.forEach(({node:e})=>{Th(e),Eh(e)})}function Oh(e){let t=Ch.get(e);t&&(t.disconnect(),Ch.delete(e)),e.style.pointerEvents=``}function kh(e,t){let n=Cc(e),r=[];return Z.hasPointerBlockingLayer()&&!n.body.hasAttribute(`data-inert`)&&(Sh.set(n.body,n.body.style.pointerEvents),queueMicrotask(()=>{let e=n.body;e&&(e.style.pointerEvents=`none`,e.setAttribute(`data-inert`,``))})),t?.forEach(e=>{let[t,n]=Dl(()=>{let t=e();return fc(t)?t:null},{timeout:1e3});t.then(e=>r.push(wl(e,{pointerEvents:`auto`}))),r.push(n)}),()=>{Z.hasPointerBlockingLayer()||(queueMicrotask(()=>{let e=n.body;if(!e)return;let t=Sh.get(e);t!==void 0&&(e.style.pointerEvents=t,Sh.delete(e)),e.removeAttribute(`data-inert`),e.style.length===0&&e.removeAttribute(`style`)}),r.forEach(e=>e()))}}function Ah(e,t){let{warnOnMissingNode:n=!0}=t;if(n&&!e){fs("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;let{onDismiss:r,onRequestDismiss:i,pointerBlocking:a,exclude:o,debug:s,type:c=`dialog`,layerStyleTargets:l}=t,u={dismiss:r,node:e,type:c,pointerBlocking:a,requestDismiss:i,styleTargets:l};Z.add(u),Dh();function d(n){let i=Jc(n.detail.originalEvent);Z.isBelowPointerBlockingLayer(e)||Z.isInBranch(i)||(t.onPointerDownOutside?.(n),t.onInteractOutside?.(n),!n.defaultPrevented&&(s&&console.log(`onPointerDownOutside:`,n.detail.originalEvent),r?.()))}function f(e){let n=Jc(e.detail.originalEvent);Z.isInBranch(n)||(t.onFocusOutside?.(e),t.onInteractOutside?.(e),!e.defaultPrevented&&(s&&console.log(`onFocusOutside:`,e.detail.originalEvent),r?.()))}function p(n){Z.isTopMost(e)&&(t.onEscapeKeyDown?.(n),!n.defaultPrevented&&r&&(n.preventDefault(),r()))}function m(n){if(!e)return!1;let r=typeof o==`function`?o():o,i=Array.isArray(r)?r:[r],a=t.persistentElements?.map(e=>e()).filter(fc);return a&&i.push(...a),i.some(e=>Sc(e,n))||Z.isInNestedLayer(e,n)}let h=[a?kh(e,t.persistentElements):void 0,gh(e,p),mh(e,{exclude:m,onFocusOutside:f,onPointerDownOutside:d,defer:t.defer})];return()=>{Z.remove(e),Dh(),Oh(e),h.forEach(e=>e?.())}}function jh(e,t){let{defer:n}=t,r=n?K:e=>e(),i=[];return i.push(r(()=>{let n=Zo(e)?e():e;i.push(Ah(n,t))})),()=>{i.forEach(e=>e?.())}}var Mh=`__live-region__`,Nh=`__live-region-debug__`,Ph=`position:fixed;inset-inline:0;bottom:0;z-index:2147483647;padding:12px 16px;background:black;color:white;font-size:14px;line-height:20px;text-align:center;pointer-events:none;`;function Fh(e={}){let{level:t=`polite`,document:n=document,root:r,delay:i=0,debug:a=!1}=e,o=n.defaultView??window,s=r??n.body;function c(){if(!a)return;let e=n.getElementById(Nh);return e||(e=n.createElement(`div`),e.id=Nh,e.dataset.liveAnnouncerDebug=`true`,e.setAttribute(`aria-hidden`,`true`),e.style.cssText=Ph,s.appendChild(e),e)}function l(e,r){n.getElementById(Mh)?.remove(),r??=i;let a=n.createElement(`span`);a.id=Mh,a.dataset.liveAnnouncer=`true`;let l=t===`assertive`?`alert`:`status`;a.setAttribute(`aria-live`,t),a.setAttribute(`role`,l),Object.assign(a.style,{border:`0`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`}),s.appendChild(a),o.setTimeout(()=>{if(!a.isConnected)return;a.textContent=e;let t=c();t&&(t.textContent=e)},r)}function u(){n.getElementById(Mh)?.remove(),n.getElementById(Nh)?.remove()}return{announce:l,destroy:u,toJSON(){return Mh}}}var{guards:Ih,createMachine:Lh,choose:Rh}=$s(),{and:Q,not:zh}=Ih,Bh=Lh({props({props:e}){return{loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:``,closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:`none`,selectionBehavior:e.multiple?`clear`:`replace`,openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:e}){ml(e)},collection:Im.empty(),...e,positioning:{placement:`bottom`,sameWidth:!0,...e.positioning},translations:{triggerLabel:`Toggle suggestions`,clearTriggerLabel:`Clear value`,...e.translations}}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open.suggesting`:`closed.idle`},context({prop:e,bindable:t,getContext:n,getEvent:r}){let i=e(`value`)??e(`defaultValue`)??[],a=e(`collection`).findMany(i);return{currentPlacement:t(()=>({defaultValue:void 0})),value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),isEqual:Wo,hash(e){return e.join(`,`)},onChange(t){let r=n(),i=e(`collection`),a=Pm({values:t,collection:i,selectedItemMap:r.get(`selectedItemMap`)}),o=e(`value`)??t,s=o===t?a:Pm({values:o,collection:i,selectedItemMap:a.nextSelectedItemMap});r.set(`selectedItemMap`,s.nextSelectedItemMap),e(`onValueChange`)?.({value:t,items:a.selectedItems})}})),highlightedValue:t(()=>({defaultValue:e(`defaultHighlightedValue`)||null,value:e(`highlightedValue`),onChange(t){let n=e(`collection`).find(t);e(`onHighlightChange`)?.({highlightedValue:t,highlightedItem:n})}})),inputValue:t(()=>{let t=e(`inputValue`)||e(`defaultInputValue`),n=e(`value`)||e(`defaultValue`);if(!t.trim()&&!e(`multiple`)){let r=e(`collection`).stringifyMany(n);t=ls(e(`selectionBehavior`),{preserve:t||r,replace:r,clear:``})}return{defaultValue:t,value:e(`inputValue`),onChange(t){let n=r(),i=(n.previousEvent||n).src;e(`onInputValueChange`)?.({inputValue:t,reason:i})}}}),highlightedItem:t(()=>{let t=e(`highlightedValue`);return{defaultValue:e(`collection`).find(t)}}),selectedItemMap:t(()=>({defaultValue:Fm({selectedItems:a,collection:e(`collection`)})}))}},computed:{isInputValueEmpty:({context:e})=>e.get(`inputValue`).length===0,isInteractive:({prop:e})=>!(e(`readOnly`)||e(`disabled`)),autoComplete:({prop:e})=>e(`inputBehavior`)===`autocomplete`,autoHighlight:({prop:e})=>e(`inputBehavior`)===`autohighlight`,hasSelectedItems:({context:e})=>e.get(`value`).length>0,selectedItems:({context:e,prop:t})=>Mm({values:e.get(`value`),collection:t(`collection`),selectedItemMap:e.get(`selectedItemMap`)}),valueAsString:({computed:e,prop:t})=>t(`collection`).stringifyItems(e(`selectedItems`)),isCustomValue:({context:e,computed:t})=>e.get(`inputValue`)!==t(`valueAsString`)},watch({context:e,prop:t,track:n,action:r,send:i}){n([()=>e.hash(`value`)],()=>{r([`syncSelectedItems`])}),n([()=>e.get(`inputValue`)],()=>{r([`syncInputValue`])}),n([()=>e.get(`highlightedValue`)],()=>{r([`syncHighlightedItem`,`autofillInputValue`,`announceHighlightedItem`])}),n([()=>t(`open`)],()=>{r([`toggleVisibility`])}),n([()=>t(`collection`).toString()],()=>{i({type:`CHILDREN_CHANGE`})})},on:{"SELECTED_ITEMS.SYNC":{actions:[`syncSelectedItems`]},"HIGHLIGHTED_VALUE.SET":{actions:[`setHighlightedValue`]},"HIGHLIGHTED_VALUE.CLEAR":{actions:[`clearHighlightedValue`]},"ITEM.SELECT":{actions:[`selectItem`]},"ITEM.CLEAR":{actions:[`clearItem`]},"VALUE.SET":{actions:[`setValue`]},"INPUT_VALUE.SET":{actions:[`setInputValue`]},"POSITIONING.SET":{actions:[`reposition`]}},entry:Rh([{guard:`autoFocus`,actions:[`setInitialFocus`]}]),states:{closed:{tags:[`closed`],initial:`idle`,states:{idle:{tags:[`idle`],entry:[`scrollContentToTop`,`clearHighlightedValue`],on:{"CONTROLLED.OPEN":{target:`open.interacting`},"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`,`invokeOnOpen`]}],"INPUT.CLICK":[{guard:`isOpenControlled`,actions:[`highlightFirstSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`highlightFirstSelectedItem`,`invokeOnOpen`]}],"INPUT.FOCUS":{target:`focused`},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open.interacting`,actions:[`invokeOnOpen`]}],"VALUE.CLEAR":{target:`focused`,actions:[`clearInputValue`,`clearSelectedItems`,`setInitialFocus`]}}},focused:{tags:[`focused`],entry:[`scrollContentToTop`,`clearHighlightedValue`],on:{"CONTROLLED.OPEN":[{guard:`isChangeEvent`,target:`open.suggesting`},{target:`open.interacting`}],"INPUT.CHANGE":[{guard:Q(`isOpenControlled`,`openOnChange`),actions:[`setInputValue`,`invokeOnOpen`,`highlightFirstItemIfNeeded`]},{guard:`openOnChange`,target:`open.suggesting`,actions:[`setInputValue`,`invokeOnOpen`,`highlightFirstItemIfNeeded`]},{actions:[`setInputValue`]}],"LAYER.INTERACT_OUTSIDE":{target:`idle`},"INPUT.ESCAPE":{guard:Q(`isCustomValue`,zh(`allowCustomValue`)),actions:[`revertInputValue`]},"INPUT.BLUR":{target:`idle`},"INPUT.CLICK":[{guard:`isOpenControlled`,actions:[`highlightFirstSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`highlightFirstSelectedItem`,`invokeOnOpen`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`,`invokeOnOpen`]}],"INPUT.ARROW_DOWN":[{guard:Q(`isOpenControlled`,`autoComplete`),actions:[`invokeOnOpen`]},{guard:`autoComplete`,target:`open.interacting`,actions:[`invokeOnOpen`]},{guard:`isOpenControlled`,actions:[`highlightFirstOrSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`highlightFirstOrSelectedItem`,`invokeOnOpen`]}],"INPUT.ARROW_UP":[{guard:Q(`isOpenControlled`,`autoComplete`),actions:[`invokeOnOpen`]},{guard:`autoComplete`,target:`open.interacting`,actions:[`invokeOnOpen`]},{guard:`isOpenControlled`,actions:[`highlightLastOrSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`highlightLastOrSelectedItem`,`invokeOnOpen`]}],OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open.interacting`,actions:[`invokeOnOpen`]}],"VALUE.CLEAR":{actions:[`clearInputValue`,`clearSelectedItems`]}}}}},open:{tags:[`open`,`focused`],entry:[`setInitialFocus`],effects:[`trackFocusVisible`,`scrollToHighlightedItem`,`trackDismissableLayer`,`trackPlacement`,`trackLiveRegion`],on:{"CONTROLLED.CLOSE":[{guard:`restoreFocus`,target:`closed.focused`,actions:[`setFinalFocus`]},{target:`closed.idle`}],"INPUT.ENTER":[{guard:Q(`isOpenControlled`,`isCustomValue`,zh(`hasHighlightedItem`),zh(`allowCustomValue`)),actions:[`revertInputValue`,`invokeOnClose`]},{guard:Q(`isCustomValue`,zh(`hasHighlightedItem`),zh(`allowCustomValue`)),target:`closed.focused`,actions:[`revertInputValue`,`invokeOnClose`]},{guard:Q(`isOpenControlled`,`closeOnSelect`),actions:[`selectHighlightedItem`,`invokeOnClose`]},{guard:`closeOnSelect`,target:`closed.focused`,actions:[`selectHighlightedItem`,`invokeOnClose`,`setFinalFocus`]},{actions:[`selectHighlightedItem`]}],"ITEM.CLICK":[{guard:Q(`isOpenControlled`,`closeOnSelect`),actions:[`selectItem`,`invokeOnClose`]},{guard:`closeOnSelect`,target:`closed.focused`,actions:[`selectItem`,`invokeOnClose`,`setFinalFocus`]},{actions:[`selectItem`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.focused`,actions:[`invokeOnClose`]}],"LAYER.INTERACT_OUTSIDE":[{guard:Q(`isOpenControlled`,`isCustomValue`,zh(`allowCustomValue`)),actions:[`revertInputValue`,`invokeOnClose`]},{guard:Q(`isCustomValue`,zh(`allowCustomValue`)),target:`closed.idle`,actions:[`revertInputValue`,`invokeOnClose`]},{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.idle`,actions:[`invokeOnClose`]}],CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.focused`,actions:[`invokeOnClose`,`setFinalFocus`]}],"VALUE.CLEAR":[{guard:`isOpenControlled`,actions:[`clearInputValue`,`clearSelectedItems`,`invokeOnClose`]},{target:`closed.focused`,actions:[`clearInputValue`,`clearSelectedItems`,`invokeOnClose`,`setFinalFocus`]}]},initial:`interacting`,states:{interacting:{on:{CHILDREN_CHANGE:[{guard:`isHighlightedItemRemoved`,actions:[`clearHighlightedValue`]},{actions:[`scrollToHighlightedItem`]}],"INPUT.HOME":{actions:[`highlightFirstItem`]},"INPUT.END":{actions:[`highlightLastItem`]},"INPUT.ARROW_DOWN":[{guard:Q(`autoComplete`,`isLastItemHighlighted`),actions:[`clearHighlightedValue`,`scrollContentToTop`]},{actions:[`highlightNextItem`]}],"INPUT.ARROW_UP":[{guard:Q(`autoComplete`,`isFirstItemHighlighted`),actions:[`clearHighlightedValue`]},{actions:[`highlightPrevItem`]}],"INPUT.CHANGE":[{guard:`autoComplete`,target:`suggesting`,actions:[`setInputValue`]},{target:`suggesting`,actions:[`clearHighlightedValue`,`setInputValue`]}],"ITEM.POINTER_MOVE":{actions:[`setHighlightedValue`]},"ITEM.POINTER_LEAVE":{actions:[`clearHighlightedValue`]},"LAYER.ESCAPE":[{guard:Q(`isOpenControlled`,`autoComplete`),actions:[`syncInputValue`,`invokeOnClose`]},{guard:`autoComplete`,target:`closed.focused`,actions:[`syncInputValue`,`invokeOnClose`]},{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.focused`,actions:[`invokeOnClose`,`setFinalFocus`]}]}},suggesting:{on:{CHILDREN_CHANGE:[{guard:Q(`isHighlightedItemRemoved`,`hasCollectionItems`,`autoHighlight`),actions:[`clearHighlightedValue`,`highlightFirstItem`]},{guard:`isHighlightedItemRemoved`,actions:[`clearHighlightedValue`]},{guard:`autoHighlight`,actions:[`highlightFirstItem`]}],"INPUT.ARROW_DOWN":{target:`interacting`,actions:[`highlightNextItem`]},"INPUT.ARROW_UP":{target:`interacting`,actions:[`highlightPrevItem`]},"INPUT.HOME":{target:`interacting`,actions:[`highlightFirstItem`]},"INPUT.END":{target:`interacting`,actions:[`highlightLastItem`]},"INPUT.CHANGE":{actions:[`setInputValue`]},"LAYER.ESCAPE":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.focused`,actions:[`invokeOnClose`]}],"ITEM.POINTER_MOVE":{target:`interacting`,actions:[`setHighlightedValue`]},"ITEM.POINTER_LEAVE":{actions:[`clearHighlightedValue`]}}}}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e(`isInputValueEmpty`),autoComplete:({computed:e,prop:t})=>e(`autoComplete`)&&!t(`multiple`),autoHighlight:({computed:e})=>e(`autoHighlight`),isFirstItemHighlighted:({prop:e,context:t})=>e(`collection`).firstValue===t.get(`highlightedValue`),isLastItemHighlighted:({prop:e,context:t})=>e(`collection`).lastValue===t.get(`highlightedValue`),isCustomValue:({computed:e})=>e(`isCustomValue`),allowCustomValue:({prop:e})=>!!e(`allowCustomValue`),hasHighlightedItem:({context:e})=>e.get(`highlightedValue`)!=null,closeOnSelect:({prop:e})=>!!e(`closeOnSelect`),isOpenControlled:({prop:e})=>e(`open`)!=null,openOnChange:({prop:e,context:t})=>{let n=e(`openOnChange`);return Ko(n)?n:!!n?.({inputValue:t.get(`inputValue`)})},restoreFocus:({event:e})=>{let t=e.restoreFocus??e.previousEvent?.restoreFocus;return t==null?!0:!!t},isChangeEvent:({event:e})=>e.previousEvent?.type===`INPUT.CHANGE`,autoFocus:({prop:e})=>!!e(`autoFocus`),isHighlightedItemRemoved:({prop:e,context:t})=>!e(`collection`).has(t.get(`highlightedValue`)),hasCollectionItems:({prop:e})=>e(`collection`).size>0},effects:{trackFocusVisible({scope:e}){return Fu({root:e.getRootNode?.()})},trackDismissableLayer({send:e,prop:t,scope:n}){return t(`disableLayer`)?void 0:jh(()=>Jm(n),{type:`listbox`,defer:!0,exclude:()=>[Ym(n),Qm(n),$m(n)],onFocusOutside:t(`onFocusOutside`),onPointerDownOutside:t(`onPointerDownOutside`),onInteractOutside:t(`onInteractOutside`),onEscapeKeyDown(t){t.preventDefault(),t.stopPropagation(),e({type:`LAYER.ESCAPE`,src:`escape-key`})},onDismiss(){e({type:`LAYER.INTERACT_OUTSIDE`,src:`interact-outside`,restoreFocus:!1})}})},trackLiveRegion({refs:e,scope:t}){let n=Fh({level:`assertive`,document:t.getDoc()});return e.set(`liveRegion`,n),()=>n.destroy()},trackPlacement({context:e,prop:t,scope:n}){return e.set(`currentPlacement`,t(`positioning`).placement),cp(()=>Zm(n)||Qm(n),()=>Xm(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n}){let r=Ym(n),i=[],a=r=>{if(Mu()===`pointer`)return;let a=e.get(`highlightedValue`);if(!a)return;let o=Jm(n),s=t(`scrollToIndexFn`);if(s){s({index:t(`collection`).indexOf(a),immediate:r,getElement:()=>eh(n,a)});return}let c=eh(n,a),l=K(()=>{Cl(c,{rootEl:o,block:`nearest`})});i.push(l)},o=K(()=>{Nu(`virtual`),a(!0)});i.push(o);let s=pl(r,{attributes:[`aria-activedescendant`],callback:()=>a(!1)});return i.push(s),()=>{i.forEach(e=>e())}}},actions:{reposition({context:e,prop:t,scope:n,event:r}){cp(()=>Zm(n),()=>Xm(n),{...t(`positioning`),...r.options,defer:!0,listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},setHighlightedValue({context:e,event:t}){t.value!=null&&e.set(`highlightedValue`,t.value)},clearHighlightedValue({context:e}){e.set(`highlightedValue`,null)},selectHighlightedItem(e){let{context:t,prop:n}=e,r=n(`collection`),i=t.get(`highlightedValue`);if(!i||!r.has(i))return;let a=n(`multiple`)?Vo(t.get(`value`),i):[i];n(`onSelect`)?.({value:a,itemValue:i}),t.set(`value`,a);let o=ls(n(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:r.stringifyMany(a),clear:``});t.set(`inputValue`,o)},scrollToHighlightedItem({context:e,prop:t,scope:n}){ul(()=>{let r=e.get(`highlightedValue`);if(r==null)return;let i=eh(n,r),a=Jm(n),o=t(`scrollToIndexFn`);if(o){o({index:t(`collection`).indexOf(r),immediate:!0,getElement:()=>eh(n,r)});return}Cl(i,{rootEl:a,block:`nearest`})})},selectItem(e){let{context:t,event:n,flush:r,prop:i}=e;n.value!=null&&r(()=>{let e=i(`multiple`)?Vo(t.get(`value`),n.value):[n.value];i(`onSelect`)?.({value:e,itemValue:n.value}),t.set(`value`,e);let r=ls(i(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:i(`collection`).stringifyMany(e),clear:``});t.set(`inputValue`,r)})},clearItem(e){let{context:t,event:n,flush:r,prop:i}=e;n.value!=null&&r(()=>{let e=Bo(t.get(`value`),n.value);t.set(`value`,e);let r=ls(i(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:i(`collection`).stringifyMany(e),clear:``});t.set(`inputValue`,r)})},setInitialFocus({scope:e}){K(()=>{th(e)})},setFinalFocus({scope:e}){K(()=>{Qm(e)?.dataset.focusable==null?th(e):nh(e)})},syncInputValue({context:e,scope:t,event:n}){let r=Ym(t);r&&(r.value=e.get(`inputValue`),queueMicrotask(()=>{n.current().type!==`INPUT.CHANGE`&&ac(r)}))},setInputValue({context:e,event:t}){e.set(`inputValue`,t.value)},clearInputValue({context:e}){e.set(`inputValue`,``)},revertInputValue({context:e,prop:t,computed:n}){let r=ls(t(`selectionBehavior`),{replace:n(`hasSelectedItems`)?n(`valueAsString`):``,preserve:e.get(`inputValue`),clear:``});e.set(`inputValue`,r)},setValue(e){let{context:t,flush:n,event:r,prop:i}=e;n(()=>{t.set(`value`,r.value);let e=ls(i(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:i(`collection`).stringifyMany(r.value),clear:``});t.set(`inputValue`,e)})},clearSelectedItems(e){let{context:t,flush:n,prop:r}=e;n(()=>{t.set(`value`,[]);let e=ls(r(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:r(`collection`).stringifyMany([]),clear:``});t.set(`inputValue`,e)})},scrollContentToTop({prop:e,scope:t}){let n=e(`scrollToIndexFn`);if(n){let r=e(`collection`).firstValue;n({index:0,immediate:!0,getElement:()=>eh(t,r)})}else{let e=Jm(t);if(!e)return;e.scrollTop=0}},invokeOnOpen({prop:e,event:t,context:n}){let r=Vh(t);e(`onOpenChange`)?.({open:!0,reason:r,value:n.get(`value`)})},invokeOnClose({prop:e,event:t,context:n}){let r=Vh(t);e(`onOpenChange`)?.({open:!1,reason:r,value:n.get(`value`)})},highlightFirstItem({context:e,prop:t,scope:n}){(Jm(n)?queueMicrotask:K)(()=>{let n=t(`collection`).firstValue;n&&e.set(`highlightedValue`,n)})},highlightFirstItemIfNeeded({computed:e,action:t}){e(`autoHighlight`)&&t([`highlightFirstItem`])},highlightLastItem({context:e,prop:t,scope:n}){(Jm(n)?queueMicrotask:K)(()=>{let n=t(`collection`).lastValue;n&&e.set(`highlightedValue`,n)})},highlightNextItem({context:e,prop:t}){let n=null,r=e.get(`highlightedValue`),i=t(`collection`);r?(n=i.getNextValue(r),!n&&t(`loopFocus`)&&(n=i.firstValue)):n=i.firstValue,n&&e.set(`highlightedValue`,n)},highlightPrevItem({context:e,prop:t}){let n=null,r=e.get(`highlightedValue`),i=t(`collection`);r?(n=i.getPreviousValue(r),!n&&t(`loopFocus`)&&(n=i.lastValue)):n=i.lastValue,n&&e.set(`highlightedValue`,n)},highlightFirstSelectedItem({context:e,prop:t}){K(()=>{let[n]=t(`collection`).sort(e.get(`value`));n&&e.set(`highlightedValue`,n)})},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){K(()=>{let r=null;r=n(`hasSelectedItems`)?t(`collection`).sort(e.get(`value`))[0]:t(`collection`).firstValue,r&&e.set(`highlightedValue`,r)})},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){K(()=>{let r=t(`collection`),i=null;i=n(`hasSelectedItems`)?r.sort(e.get(`value`))[0]:r.lastValue,i&&e.set(`highlightedValue`,i)})},autofillInputValue({context:e,computed:t,prop:n,event:r,scope:i}){let a=Ym(i),o=n(`collection`);if(!t(`autoComplete`)||!a||!r.keypress)return;let s=o.stringify(e.get(`highlightedValue`));K(()=>{a.value=s||e.get(`inputValue`)})},syncSelectedItems(e){queueMicrotask(()=>{let{context:t,prop:n}=e,r=n(`collection`),i=t.get(`value`),a=Pm({values:i,collection:r,selectedItemMap:t.get(`selectedItemMap`)});t.set(`selectedItemMap`,a.nextSelectedItemMap);let o=ls(n(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:r.stringifyMany(i),clear:``});t.set(`inputValue`,o)})},syncHighlightedItem({context:e,prop:t}){let n=t(`collection`).find(e.get(`highlightedValue`));e.set(`highlightedItem`,n)},announceHighlightedItem({context:e,prop:t,refs:n}){if(!Uc())return;let r=e.get(`highlightedValue`),i=r?t(`collection`).stringifyItem(t(`collection`).find(r)):null;if(!i)return;let a=r?e.get(`value`).includes(r):!1;n.get(`liveRegion`)?.announce(a?`${i}, selected`:i)},toggleVisibility({event:e,send:t,prop:n}){t({type:n(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:e})}}}});function Vh(e){return(e.previousEvent||e).src}var Hh=wm.extendWith(`empty`),[Uh,$]=_s({hookName:`useComboboxContext`,providerName:`<ComboboxProvider />`}),Wh=e=>{let t=$(),n=q(()=>t().getClearTriggerProps(),e);return F(J.button,n)},Gh=e=>{let t=$(),n=iu(),r=q(()=>t().getContentProps(),()=>n().presenceProps,e);return F(R,{get when(){return!n().unmounted},get children(){return F(J.div,I(r,{ref(t){var r=$l(n().ref,e.ref);typeof r==`function`&&r(t)}}))}})},Kh=Hh.build(),qh=e=>{let t=$(),n=O(()=>t().collection.size);return F(R,{get when(){return n()===0},get children(){return F(J.div,I(()=>Kh.empty.attrs,e,{role:`presentation`}))}})},Jh=e=>e.children($()),Yh=e=>{let t=$(),n=q(()=>t().getControlProps(),e);return F(J.div,n)},Xh=e=>{let t=$(),n=q(()=>t().getInputProps(),e),r=dm();return F(J.input,I({get"aria-describedby"(){return r?.().ariaDescribedby}},n))},[Zh,Qh]=_s({hookName:`useComboboxItemContext`,providerName:`<ComboboxItemProvider />`}),[$h,eg]=_s({hookName:`useComboboxItemPropsContext`,providerName:`<ComboboxItemPropsProvider />`}),tg=e=>{let[t,n]=Io()(e,[`item`,`persistFocus`]),r=$(),i=q(()=>r().getItemProps(t),n),a=O(()=>r().getItemState(t));return F($h,{value:t,get children(){return F(Zh,{value:a,get children(){return F(J.div,i)}})}})},ng=e=>e.children(Qh()),[rg,ig]=_s({hookName:`useComboboxItemGroupPropsContext`,providerName:`<ComboboxItemGroupPropsProvider />`}),ag=e=>{let[t,n]=Io()(e,[`id`]),r=$(),i=q({id:He()},t),a=q(()=>r().getItemGroupProps(i),n);return F(rg,{value:i,get children(){return F(J.div,a)}})},og=e=>{let t=$(),n=ig(),r=q(()=>t().getItemGroupLabelProps({htmlFor:n.id}),e);return F(J.div,r)},sg=e=>{let t=$(),n=eg(),r=q(()=>t().getItemIndicatorProps(n),e);return F(J.div,r)},cg=e=>{let t=$(),n=eg(),r=q(()=>t().getItemTextProps(n),e);return F(J.span,r)},lg=e=>{let t=$(),n=q(()=>t().getLabelProps(),e);return F(J.label,n)},ug=e=>{let t=$(),n=q(()=>t().getListProps(),e);return F(J.div,n)},dg=e=>{let t=$(),n=iu(),r=q(()=>t().getPositionerProps(),e);return F(R,{get when(){return!n().unmounted},get children(){return F(J.div,r)}})},fg=e=>{let t=cu(),n=ou(),r=He(),i=dm(),a=Il(Bh,O(()=>({id:r,ids:{label:i?.().ids.label,input:i?.().ids.control},disabled:i?.().disabled,readOnly:i?.().readOnly,required:i?.().required,invalid:i?.().invalid,dir:t().dir,getRootNode:n().getRootNode,...Ss(e)})));return O(()=>rh(a,Ul))},pg=e=>{let[t,n]=nu(e),[r,i]=Io()(n,`allowCustomValue.alwaysSubmitOnEnter.autoFocus.closeOnSelect.collection.composite.defaultHighlightedValue.defaultInputValue.defaultOpen.defaultValue.disabled.disableLayer.form.highlightedValue.id.ids.inputBehavior.inputValue.invalid.loopFocus.multiple.name.navigate.onFocusOutside.onHighlightChange.onInputValueChange.onInteractOutside.onOpenChange.onPointerDownOutside.onValueChange.onSelect.open.openOnChange.openOnClick.openOnKeyPress.placeholder.positioning.readOnly.required.scrollToIndexFn.selectionBehavior.translations.value`.split(`.`)),a=fg(r),o=Xl(q(t,()=>({present:a().open}))),s=q(()=>a().getRootProps(),i);return F(Uh,{value:a,get children(){return F(ru,{value:o,get children(){return F(J.div,s)}})}})},mg=e=>{let[t,n]=nu(e),[{value:r},i]=Io()(n,[`value`]),a=Xl(q(t,()=>({present:r().open}))),o=q(()=>r().getRootProps(),i);return F(Uh,{value:r,get children(){return F(ru,{value:a,get children(){return F(J.div,o)}})}})},hg=e=>{let[t,n]=Io()(e,[`focusable`]),r=$(),i=q(()=>r().getTriggerProps(t),n);return F(J.button,i)},gg={};uu(gg,{ClearTrigger:()=>Wh,Content:()=>Gh,Context:()=>Jh,Control:()=>Yh,Empty:()=>qh,Input:()=>Xh,Item:()=>tg,ItemContext:()=>ng,ItemGroup:()=>ag,ItemGroupLabel:()=>og,ItemIndicator:()=>sg,ItemText:()=>cg,Label:()=>lg,List:()=>ug,Positioner:()=>dg,Root:()=>pg,RootProvider:()=>mg,Trigger:()=>hg});var _g=e=>new Om(e);function vg(e){let t=O(()=>Be(typeof e==`function`?e():e,[`initialItems`,`filter`,`limit`])),[n,r]=w((()=>{let[e]=t();return e.initialItems})()),[i,a]=w(``),o=e=>{r(e),a(``)},s=e=>{let[,n]=t();return _g({...n,items:e})};return{collection:O(()=>{let[e,r]=t(),a=e.filter,o=n();i()&&a&&(o=s(n()).filter((e,t,n)=>a(e,i(),n)).items);let c=e.limit==null?o:o.slice(0,e.limit);return _g({...r,items:c})}),filter:(e=``)=>{a(e)},set:e=>{o(e)},reset:()=>{let[e]=t();o(e.initialItems)},clear:()=>{o([])},insert:(e,...t)=>{let r=s(n()).insert(e,...t).items;o(r)},insertBefore:(e,...t)=>{let r=s(n()).insertBefore(e,...t).items;o(r)},insertAfter:(e,...t)=>{let r=s(n()).insertAfter(e,...t).items;o(r)},remove:(...e)=>{let t=s(n()).remove(...e).items;o(t)},move:(e,t)=>{let r=s(n()).move(e,t).items;o(r)},moveBefore:(e,...t)=>{let r=s(n()).moveBefore(e,...t).items;o(r)},moveAfter:(e,...t)=>{let r=s(n()).moveAfter(e,...t).items;o(r)},reorder:(e,t)=>{let r=s(n()).reorder(e,t).items;o(r)},append:(...e)=>{let t=s(n()).append(...e).items;o(t)},upsert:(e,t,r=`append`)=>{let i=s(n()).upsert(e,t,r).items;o(i)},prepend:(...e)=>{let t=s(n()).prepend(...e).items;o(t)},update:(e,t)=>{let r=s(n()).update(e,t).items;o(r)}}}var yg=z(`<span>`),bg=z(`<span class="bg-yellow-200 font-semibold">`),xg=z(`<div class="absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none">`),Sg=z(`<div class="absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none"><kbd class="px-1.5 py-0.5 text-xs font-mono text-gray-400 bg-gray-100 border border-gray-300 rounded">/`),Cg=z(`<button type=button class="absolute right-2 top-1/2 -translate-y-1/2 p-1 hover:bg-gray-200 rounded"aria-label="Clear search"title="Clear search">`),wg=z(`<div class="px-4 py-2 text-xs text-gray-400 bg-gray-50 border-t border-gray-200">Showing 50 of <!> results`),Tg=z(`<div class="px-4 py-3 text-sm text-gray-500">No results found`),Eg=z(`<div class="text-xs text-gray-500 mt-0.5 truncate">`),Dg=50;function Og(e,t){if(t.length===0)return(()=>{var t=yg();return H(t,e),t})();let n=[],r=0;for(let[i,a]of t)i>r&&n.push((()=>{var t=yg();return H(t,()=>e.slice(r,i)),t})()),n.push((()=>{var t=bg();return H(t,()=>e.slice(i,a+1)),t})()),r=a+1;return r<e.length&&n.push((()=>{var t=yg();return H(t,()=>e.slice(r)),t})()),n}function kg(e,t){return new Set([`kind`,`name`,`title`,`serviceName`]).has(e)?t:`${e}: ${t}`}function Ag(e){let[t,n]=w(e.query),[r,i]=w(!1),[a,o]=w(!1),s,c;D(()=>n(e.query)),D(()=>{t().length>0?i(!0):i(!1)});let{collection:l,set:u}=vg({initialItems:[],itemToString:e=>kg(e.key,e.value),itemToValue:e=>`${e.spanId}-${e.key}`});D(()=>u(e.results.slice(0,Dg)));let d=t=>{t.reason===`input-change`&&(n(t.inputValue),s&&clearTimeout(s),s=window.setTimeout(()=>{e.onQueryChange(t.inputValue)},200))},f=t=>{t.open||(i(!1),e.onResultHover?.(null))},p=t=>{let n=t.items[0];n&&(e.onResultSelect(n.spanId),i(!1),e.onResultHover?.(null))},m=t=>{e.onResultHover?.(t.highlightedItem?.spanId??null)},h=()=>{n(``),i(!1),s&&clearTimeout(s),e.onClear(),e.onResultHover?.(null)};return te(()=>{let e=e=>{e.key===`/`&&!a()&&!(e.target instanceof HTMLInputElement)&&!(e.target instanceof HTMLTextAreaElement)&&(e.preventDefault(),c?.focus())};document.addEventListener(`keydown`,e),N(()=>document.removeEventListener(`keydown`,e))}),N(()=>{s&&clearTimeout(s)}),F(gg.Root,{get collection(){return l()},get inputValue(){return t()},onInputValueChange:d,onOpenChange:f,onValueChange:p,onHighlightChange:m,get open(){return r()},allowCustomValue:!0,selectionBehavior:`preserve`,multiple:!1,get children(){return[F(gg.Control,{class:`relative flex items-center`,get children(){return[(()=>{var e=xg();return H(e,F(Zi,{size:16,class:`text-gray-400`})),e})(),F(gg.Input,{ref(e){var t=c;typeof t==`function`?t(e):c=e},onFocus:()=>o(!0),onBlur:()=>o(!1),class:`w-full pl-9 pr-8 py-1.5 text-sm border border-gray-300 rounded-md
10
+ bg-gray-50 focus:bg-white
11
+ focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent`,get placeholder(){return e.placeholder||`Search spans...`}}),F(R,{get when(){return nt(()=>!a())()&&!t()},get children(){return Sg()}}),F(R,{get when(){return t()},get children(){var e=Cg();return e.$$click=h,H(e,F($i,{size:14,class:`text-gray-500`})),e}})]}}),F(kt,{get children(){return F(gg.Positioner,{get children(){return F(gg.Content,{class:`mt-1 bg-white border border-gray-300 rounded-md shadow-lg max-h-96 overflow-y-auto z-50`,get children(){return F(R,{get when(){return l().items.length>0},get fallback(){return F(R,{get when(){return t()},get children(){return Tg()}})},get children(){return[F(L,{get each(){return l().items},children:e=>F(gg.Item,{item:e,class:`w-full text-left px-4 py-2 border-b border-gray-100 last:border-b-0
12
+ data-[highlighted]:bg-blue-50 cursor-pointer`,get children(){return[F(gg.ItemText,{class:`text-sm font-mono`,get children(){return Og(kg(e.key,e.value),e.ranges)}}),(()=>{var t=Eg();return H(t,()=>e.spanTitle),t})()]}})}),F(R,{get when(){return e.results.length>Dg},get children(){var t=wg(),n=t.firstChild.nextSibling;return n.nextSibling,H(t,()=>e.results.length,n),t}})]}})}})}})}})]}})}ot([`click`]);var jg=z(`<header class="flex-shrink-0 border-b border-gray-200 bg-white px-4 py-3"data-testid=trace-viewer-header><div class="flex items-center gap-4"><span></span><div class="flex-1 min-w-0"><div class="flex items-baseline gap-2"><span class="font-semibold text-gray-900 truncate"data-testid=test-name></span></div><div class="flex items-center gap-3 text-xs text-gray-500"><span class="font-mono truncate"data-testid=test-file-location>:</span><span class=text-gray-300>|</span><span class=font-mono>ms</span><span data-testid=test-status></span></div></div><div class=w-80></div><div class="flex-shrink-0 text-right min-w-[140px]">`),Mg=z(`<span class="text-gray-500 text-sm truncate"data-testid=test-describes> <span class=text-gray-400>›`),Ng=z(`<div><div class="text-sm font-mono text-gray-300">--</div><div class="text-xs font-mono text-gray-200">--`),Pg=z(`<div><div class="text-sm font-mono text-blue-600">ms</div><div class="text-xs font-mono text-gray-400">`);function Fg(e){let{testInfo:t}=e,n=po(),r=()=>{let e=BigInt(t.startTimeUnixNano),n=BigInt(t.endTimeUnixNano);return Number((n-e)/BigInt(1e6))},i=()=>{switch(t.status){case`passed`:return`text-green-600`;case`failed`:return`text-red-600`;case`skipped`:return`text-yellow-600`;case`timedOut`:return`text-orange-600`;case`interrupted`:return`text-orange-600`;default:return`text-gray-500`}},a=()=>{switch(t.status){case`passed`:return`✓`;case`failed`:return`✗`;case`skipped`:return`○`;case`timedOut`:return`⏱`;case`interrupted`:return`⚠`;default:return`?`}},o=()=>{let e=BigInt(t.startTimeUnixNano),n=Number(e/BigInt(1e6));return new Date(n)},s=e=>{let t=new Date(o().getTime()+e);return`${t.toLocaleDateString(void 0,{month:`short`,day:`numeric`})}, ${t.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1})}.${t.getMilliseconds().toString().padStart(3,`0`)}`},c=t=>{e.onSpanSelect?.(t)};return(()=>{var o=jg(),l=o.firstChild.firstChild,u=l.nextSibling,d=u.firstChild,f=d.firstChild,p=d.nextSibling.firstChild,m=p.firstChild,h=p.nextSibling.nextSibling,g=h.firstChild,_=h.nextSibling,v=u.nextSibling,y=v.nextSibling;return H(l,a),H(d,(()=>{var e=nt(()=>t.describes.length>0);return()=>e()&&(()=>{var e=Mg(),n=e.firstChild;return H(e,()=>t.describes.join(` › `),n),e})()})(),f),H(f,()=>t.name),H(p,()=>t.file,m),H(p,()=>t.line,null),H(h,r,g),H(_,()=>t.status),H(v,F(Ag,{get results(){return n.results()},get query(){return n.query()},get onQueryChange(){return n.setQuery},get onClear(){return n.clearSearch},onResultSelect:c,get onResultHover(){return e.onSpanHover}})),H(y,F(R,{get when(){return e.hoverTimeMs()},get fallback(){return Ng()},children:e=>(()=>{var t=Pg(),n=t.firstChild,r=n.firstChild,i=n.nextSibling;return H(n,()=>Math.round(e()),r),H(i,()=>s(e())),t})()})),E(e=>{var t=`text-xl ${i()}`,n=i();return t!==e.e&&lt(l,e.e=t),n!==e.t&&lt(_,e.t=n),e},{e:void 0,t:void 0}),o})()}var Ig=z(`<div class=h-full>`),Lg=z(`<div class="flex-shrink-0 border-t border-gray-300">`),Rg=z(`<div class="absolute top-0 bottom-0 bg-blue-500/20 border-x-2 border-blue-500 pointer-events-none z-40">`),zg=z(`<div class="absolute top-0 bottom-0 w-px bg-blue-500 pointer-events-none z-50">`),Bg=z(`<div class="absolute top-0 bottom-0 bg-blue-600 pointer-events-none z-50"style=width:3px;margin-left:-1px>`),Vg=z(`<div class="absolute top-0 bottom-0 w-px bg-blue-400 pointer-events-none z-45">`),Hg=z(`<div class="flex flex-col h-full relative"><div class="flex-1 min-h-0 relative flex flex-col"role=region aria-label="Trace timeline"><div class="flex-1 min-h-0">`),Ug=z(`<main class="flex flex-col h-full w-full bg-white text-gray-900"aria-label="Trace viewer"><div class="flex-1 min-h-0">`),Wg={screenshots:`Screenshots`,steps:`Steps Timeline`,browser:`Browser Spans`,external:`External Spans`},Gg={screenshots:`No screenshots were captured during this test`,steps:`No test steps were recorded`,browser:`No browser spans were captured`,external:`No external spans were captured`},Kg=.2,qg=.005,Jg=1;function Yg(e){return e.map(e=>({id:e.id,name:e.title,startOffset:e.startOffsetMs,duration:e.durationMs,parentId:e.parentId}))}function Xg(e){let t=Hn(()=>e.traceInfo),n=()=>t.totalDurationMs(),r=()=>{let t=BigInt(e.traceInfo.testInfo.startTimeUnixNano);return Number(t/BigInt(1e6))};return F(Xr,{durationMs:n,testStartTimeMs:r,get children(){return F(fo,{spans:()=>[...t.steps(),...t.browserSpans(),...t.externalSpans()],get children(){return F(za,{steps:()=>t.steps(),spans:()=>[...t.browserSpans(),...t.externalSpans()],get screenshots(){return e.traceInfo.screenshots},testStartTimeMs:r,get children(){return F(Zg,{get traceInfo(){return e.traceInfo},traceData:t,testStartTimeMs:r})}})}})}})}function Zg(e){let{viewport:t,setViewport:n,zoomToRange:r,pan:i,zoom:a,reset:o}=Zr(),{mode:s,hoverPosition:c,setHoverPosition:l,lockedPosition:u,lock:d,unlock:f,enterSearchOverride:p,exitSearchOverride:m,hoveredElement:h,setHoveredElement:g,lockedElement:_,displayTimeMs:v,displayElements:y,displayFocusedElement:b}=Ba(),[x,S]=w(null),[C,T]=w(null),k,A=O(()=>{let t=e.traceData.steps();return t.length===0?0:ti(Yg(t)).totalRows}),j=O(()=>{let t=e.traceData.browserSpans();return t.length===0?0:ti(Yg(t)).totalRows}),M=O(()=>{let t=e.traceData.externalSpans();return t.length===0?0:ti(Yg(t)).totalRows}),ee=()=>e.traceInfo.screenshots.length>0,ne=()=>A()>0,re=()=>j()>0,ie=()=>M()>0,ae=O(()=>{let e=[];return ee()||e.push({id:`screenshots`,title:Wg.screenshots,tooltip:Gg.screenshots}),ne()||e.push({id:`steps`,title:Wg.steps,tooltip:Gg.steps}),re()||e.push({id:`browser`,title:Wg.browser,tooltip:Gg.browser}),ie()||e.push({id:`external`,title:Wg.external,tooltip:Gg.external}),e}),oe=O(()=>mo(e.traceData.steps())),[se,ce]=w(!1);D(()=>{if(e.traceData.isLoading()||se())return;let t=oe();if(!t)return;let n=ho(t);n&&(r(n.startMs,n.endMs),ce(!0))});let le=e=>{r(e.startMs,e.endMs)},ue=O(()=>{let e=xo({stepsDepth:A(),browserDepth:j(),externalDepth:M()}),t=[];return ne()&&e.steps!==void 0&&t.push({id:`steps`,initialSize:e.steps,minSize:15}),re()&&e.browser!==void 0&&t.push({id:`browser`,initialSize:e.browser,minSize:15}),ie()&&e.external!==void 0&&t.push({id:`external`,initialSize:e.external,minSize:15}),t}),de=()=>ue().length>0,fe=e=>{if(e.button!==0||!k)return;let t=e.target,n=window.getComputedStyle(t);if(n.cursor===`col-resize`||n.cursor===`row-resize`)return;let r=k.getBoundingClientRect(),i=(e.clientX-r.left)/r.width;i>=0&&i<=1&&S({startPosition:i,currentPosition:i})},pe=e=>{if(!k)return;let t=k.getBoundingClientRect(),n=(e.clientX-t.left)/t.width,r=x();if(r){let e=Math.max(0,Math.min(1,n));S({startPosition:r.startPosition,currentPosition:e})}let i=e.target,a=window.getComputedStyle(i);if(a.cursor===`col-resize`||a.cursor===`row-resize`){s()===`hover`&&l(null);return}s()===`hover`&&l(n>=0&&n<=1?n:null)},me=()=>{let e=x();if(e){let n=Wr(Math.min(e.startPosition,e.currentPosition),t()),i=Wr(Math.max(e.startPosition,e.currentPosition),t()),a=(t().visibleEndMs-t().visibleStartMs)*.02;if(i-n>a)r(n,i);else switch(s()){case`hover`:d(e.startPosition,h());break;case`locked`:case`search-override`:l(e.startPosition),f();break}S(null)}},he=()=>{s()===`hover`&&l(null)};te(()=>{let e=()=>me();document.addEventListener(`mouseup`,e);let t=e=>{let t=s();e.key===`Escape`&&t!==`hover`&&f()};document.addEventListener(`keydown`,t),N(()=>{document.removeEventListener(`mouseup`,e),document.removeEventListener(`keydown`,t)})});let ge=e=>{n(e)},_e=e=>{if(k){if((e.metaKey||e.ctrlKey||e.shiftKey)&&e.deltaY!==0){e.preventDefault();let t=k.getBoundingClientRect();a(Math.max(0,Math.min(1,(e.clientX-t.left)/t.width)),-e.deltaY*qg);return}if(Math.abs(e.deltaX)>Math.abs(e.deltaY)){e.preventDefault();let n=t().visibleEndMs-t().visibleStartMs;i(e.deltaX*Kg*n/100)}}},ve=()=>{f(),o()},P=e=>{e&&s()===`hover`&&g({type:`screenshot`,id:e})},ye=e=>{e&&s()===`hover`&&g({type:`step`,id:e})},be=e=>{e&&s()===`hover`&&g({type:`span`,id:e})},xe=n=>{let r=[...e.traceData.steps(),...e.traceData.browserSpans(),...e.traceData.externalSpans()].find(e=>e.id===n);if(r){let e=Ur(r.startOffsetMs,t());d(Math.max(0,Math.min(1,e)),{type:r.name===`playwright.test`||r.name===`playwright.test.step`?`step`:`span`,id:n})}},Se=t=>{let n=[...e.traceData.steps(),...e.traceData.browserSpans(),...e.traceData.externalSpans()].find(e=>e.id===t);if(n){let e=n.name===`playwright.test`||n.name===`playwright.test.step`,r=s();if(r===`locked`||r===`search-override`){let n=u();n!==null&&d(n,{type:e?`step`:`span`,id:t})}}},Ce=n=>{if(T(n),!n){s()===`search-override`&&m(),l(null),g(null);return}s()===`locked`&&p();let r=[...e.traceData.steps(),...e.traceData.browserSpans(),...e.traceData.externalSpans()].find(e=>e.id===n);if(r){if(Kr(r.startOffsetMs,r.startOffsetMs+r.durationMs,t())){let e=Ur(r.startOffsetMs,t());l(Math.max(0,Math.min(1,e)))}g({type:r.name===`playwright.test`||r.name===`playwright.test.step`?`step`:`span`,id:n})}},we=()=>{let e=x();return e?Math.min(e.startPosition,e.currentPosition)*100:0},Te=()=>{let e=x();return e?Math.abs(e.currentPosition-e.startPosition)*100:0},Ee=()=>{let t=po(),n=n=>{switch(n){case`steps`:return F(La,{get steps(){return e.traceData.steps()},onStepHover:ye,get matchedSpanIds(){return t.matchedSpanIds()},get hoveredSearchSpanId(){return C()}});case`browser`:return F(Ui,{get spans(){return e.traceData.browserSpans()},onSpanHover:be,get matchedSpanIds(){return t.matchedSpanIds()},get hoveredSearchSpanId(){return C()}});case`external`:return F(Oa,{get spans(){return e.traceData.externalSpans()},onSpanHover:be,get matchedSpanIds(){return t.matchedSpanIds()},get hoveredSearchSpanId(){return C()}});default:return null}},r=ue().map(e=>({...e,content:n(e.id)}));return r.length===0?null:r.length===1?(()=>{var e=Ig();return H(e,()=>r[0].content),e})():F(yo,{direction:`vertical`,panels:r})},De=()=>(()=>{var n=Hg(),r=n.firstChild,i=r.firstChild;H(n,F(R,{get when(){return e.traceData.isLoading()},get children(){return F(Aa,{})}}),r),H(n,F(Zp,{get durationMs(){return e.traceData.totalDurationMs()},get viewport(){return t()},get hoverPosition(){return c()},onViewportChange:ge,get testPhases(){return oe()},onPhaseClick:le,onDoubleClick:ve}),r),r.$$dblclick=ve,r.addEventListener(`wheel`,_e),r.addEventListener(`mouseleave`,he),r.$$mousemove=pe,r.$$mousedown=fe;var a=k;return typeof a==`function`?mt(a,r):k=r,H(i,F(R,{get when(){return nt(()=>!!ee())()&&de()},get fallback(){return F(R,{get when(){return ee()},get fallback(){return F(R,{get when(){return de()},get children(){return F(Ee,{})}})},get children(){return F(Fo,{get screenshots(){return e.traceInfo.screenshots},get viewport(){return t()},get testStartTimeMs(){return e.testStartTimeMs()},onScreenshotHover:P})}})},get children(){return F(Co,{direction:`vertical`,initialFirstPanelSize:12,minFirstPanelSize:7,maxFirstPanelSize:40,get firstPanel(){return F(Fo,{get screenshots(){return e.traceInfo.screenshots},get viewport(){return t()},get testStartTimeMs(){return e.testStartTimeMs()},onScreenshotHover:P})},get secondPanel(){return F(Ee,{})}})}})),H(r,F(R,{get when(){return ae().length>0},get children(){var e=Lg();return H(e,F(L,{get each(){return ae()},children:e=>F(Ma,{get title(){return e.title},disabled:!0,get disabledTooltip(){return e.tooltip}})})),e}}),null),H(r,F(R,{get when(){return nt(()=>!!x())()&&Te()>Jg},get children(){var e=Rg();return E(t=>{var n=`${we()}%`,r=`${Te()}%`;return n!==t.e&&V(e,`left`,t.e=n),r!==t.t&&V(e,`width`,t.t=r),t},{e:void 0,t:void 0}),e}}),null),H(r,F(R,{get when(){return nt(()=>s()===`hover`)()&&c()!==null},get children(){var e=zg();return E(t=>V(e,`left`,`${c()*100}%`)),e}}),null),H(r,F(R,{get when(){return nt(()=>s()===`locked`)()&&u()!==null},get children(){var e=Bg();return E(t=>V(e,`left`,`${u()*100}%`)),e}}),null),H(r,F(R,{get when(){return s()===`search-override`},get children(){return[F(R,{get when(){return u()!==null},get children(){var e=Bg();return E(t=>V(e,`left`,`${u()*100}%`)),e}}),F(R,{get when(){return c()!==null},get children(){var e=Vg();return E(t=>V(e,`left`,`${c()*100}%`)),e}})]}}),null),E(e=>V(r,`cursor`,x()?`crosshair`:void 0)),n})();return(()=>{var t=Ug(),n=t.firstChild;return H(t,F(Fg,{get testInfo(){return e.traceInfo.testInfo},hoverTimeMs:v,onSpanSelect:xe,onSpanHover:Ce}),n),H(n,F(Co,{direction:`horizontal`,initialFirstPanelSize:75,minFirstPanelSize:50,maxFirstPanelSize:90,get firstPanel(){return F(De,{})},get secondPanel(){return F(Sa,{get traceInfo(){return e.traceInfo},get hoveredElements(){return y()},get testStartTimeMs(){return e.testStartTimeMs()},get focusedElement(){return b()},onNavigateToSpan:Se})}})),t})()}ot([`mousedown`,`mousemove`,`dblclick`]);var Qg=z(`<div class="flex h-screen w-screen">`),$g=z(`<div><h1>Error</h1><p></p><button type=button>Try Again`);function e_(){let[e,t]=Or();return F(qe,{fallback:(e,t)=>(()=>{var n=$g(),r=n.firstChild.nextSibling,i=r.nextSibling;return H(r,()=>e.message),ut(i,`click`,t,!0),n})(),get children(){var n=Qg();return H(n,F(R,{get when(){return e()},get fallback(){return F(Nt,{setTraceSource:t})},children:e=>F(wr,{get source(){return e()},children:e=>F(Xg,{traceInfo:e})})})),n}})}ot([`click`]);var t_=document.getElementById(`root`);if(!t_)throw Error(`Root element not found`);at(()=>F(e_,{}),t_);