autotel-devtools 26.0.0 → 27.1.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.
- package/README.md +12 -9
- package/dist/cli.cjs +12 -6
- package/dist/cli.js +12 -6
- package/dist/fullpage.global.js +34 -34
- package/dist/{grpc-C35twtEj.js → grpc-CejDNrpg.js} +1 -1
- package/dist/{grpc-AXr0CnZ_.cjs → grpc-D-PgIW-i.cjs} +1 -1
- package/dist/{http-Dc57PtwQ.cjs → http-C6eqJu9T.cjs} +3 -0
- package/dist/{http-JTSqQPVJ.js → http-KCnGSZXe.js} +3 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/server/index.cjs +2 -2
- package/dist/server/index.js +2 -2
- package/dist/widget.global.js +15 -15
- package/package.json +8 -8
package/dist/fullpage.global.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
var AutotelDevtools=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Array.isArray,n=Array.prototype.indexOf,r=Array.prototype.includes,i=Array.from,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyDescriptors,c=Object.prototype,l=Array.prototype,u=Object.getPrototypeOf,d=Object.isExtensible;function f(e){return typeof e==`function`}var p=()=>{};function m(e){for(var t=0;t<e.length;t++)e[t]()}function h(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function g(e,t,n=!1){return e===void 0?n?t():t:e}function _(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);let n=[];for(let r of e)if(n.push(r),n.length===t)break;return n}function v(e){"@babel/helpers - typeof";return v=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},v(e)}function y(e,t){if(v(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(v(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function b(e){var t=y(e,`string`);return v(t)==`symbol`?t:t+``}function x(e,t,n){return(t=b(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=1<<24,C=1024,w=2048,T=4096,ee=8192,te=16384,ne=32768,re=1<<25,ie=65536,ae=1<<19,oe=1<<20,se=1<<25,ce=65536,le=1<<21,E=1<<22,ue=1<<23,de=Symbol(`$state`),fe=Symbol(`legacy props`),pe=Symbol(``),me=Symbol(`attributes`),he=Symbol(`class`),ge=Symbol(`style`),_e=Symbol(`text`),ve=Symbol(`form reset`),ye=new class extends Error{constructor(...e){super(...e),x(this,`name`,`StaleReactionError`),x(this,`message`,"The reaction that called `getAbortSignal()` was re-run or destroyed")}},be=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function xe(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Se(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Ce(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function we(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Te(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Ee(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function De(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Oe(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function ke(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ae(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function je(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Me(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Ne={},Pe=Symbol(`uninitialized`),Fe=`http://www.w3.org/2000/svg`,Ie=`@attach`;function Le(){console.warn(`https://svelte.dev/e/derived_inert`)}function Re(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function ze(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Be(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var Ve=!1;function He(e){Ve=e}var Ue;function We(e){if(e===null)throw Re(),Ne;return Ue=e}function Ge(){return We(kr(Ue))}function D(e){if(Ve){if(kr(Ue)!==null)throw Re(),Ne;Ue=e}}function Ke(e=1){if(Ve){for(var t=e,n=Ue;t--;)n=kr(n);Ue=n}}function qe(e=!0){for(var t=0,n=Ue;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=kr(n);e&&n.remove(),n=i}}function Je(e){if(!e||e.nodeType!==8)throw Re(),Ne;return e.data}function Ye(e){return e===this.v}function Xe(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Ze(e){return!Xe(e,this.v)}var Qe=null;function $e(e){Qe=e}function et(e){return st(`getContext`).get(e)}function tt(e,t){return st(`setContext`).set(e,t),t}function nt(e){return st(`hasContext`).has(e)}function rt(){return st(`getAllContexts`)}function it(e,t=!1,n){Qe={p:Qe,i:!1,c:null,e:null,s:e,x:null,r:mi,l:null}}function at(e){var t=Qe,n=t.e;if(n!==null){t.e=null;for(var r of n)Br(r)}return e!==void 0&&(t.x=e),t.i=!0,Qe=t.p,e??{}}function ot(){return!0}function st(e){var t;return Qe===null&&xe(e),(t=Qe).c??(t.c=new Map(ct(Qe)||void 0))}function ct(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var lt=[];function ut(){var e=lt;lt=[],m(e)}function dt(e){if(lt.length===0&&!Tn){var t=lt;queueMicrotask(()=>{t===lt&&ut()})}lt.push(e)}function ft(){for(;lt.length>0;)ut()}function pt(e){var t=mi;if(t===null)return di.f|=ue,e;if(!(t.f&32768)&&!(t.f&4))throw e;mt(e,t)}function mt(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}var ht=~(w|T|C);function gt(e,t){e.f=e.f&ht|t}function _t(e){e.f&512||e.deps===null?gt(e,C):gt(e,T)}function vt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=ce,vt(t.deps))}function yt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),vt(e.deps),gt(e,C)}var bt=!1;function xt(e){var t=bt;try{return bt=!1,[e(),bt]}finally{bt=t}}function St(e,t){if(t){let t=document.body;e.autofocus=!0,dt(()=>{document.activeElement===t&&e.focus()})}}var Ct=!1;function wt(){Ct||(Ct=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[ve]?.()})},{capture:!0}))}function Tt(e){var t=di,n=mi;pi(null),hi(null);try{return e()}finally{pi(t),hi(n)}}function Et(e,t,n,r=n){e.addEventListener(t,()=>Tt(n));let i=e[ve];i?e[ve]=()=>{i(),r(!0)}:e[ve]=()=>r(!0),wt()}function Dt(e){let t=0,n=pr(0),r;return()=>{Lr()&&(z(n),Kr(()=>(t===0&&(r=Ii(()=>e(()=>_r(n)))),t+=1,()=>{dt(()=>{--t,t===0&&(r?.(),r=void 0,_r(n))})})))}}function Ot(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function kt(e,t){Ot(e,t),t.add(e)}function O(e,t,n){Ot(e,t),t.set(e,n)}function k(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function A(e,t,n){return e.set(k(e,t),n),n}function j(e,t){return e.get(k(e,t))}var At=ie|ae;function jt(e,t,n,r){new Yt(e,t,n,r)}var Mt=new WeakMap,Nt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,It=new WeakMap,Lt=new WeakMap,Rt=new WeakMap,zt=new WeakMap,Bt=new WeakMap,Vt=new WeakMap,Ht=new WeakMap,Ut=new WeakMap,Wt=new WeakMap,Gt=new WeakMap,Kt=new WeakMap,qt=new WeakMap,Jt=new WeakSet,Yt=class{constructor(e,t,n,r){kt(this,Jt),x(this,`parent`,void 0),x(this,`is_pending`,!1),x(this,`transform_error`,void 0),O(this,Mt,void 0),O(this,Nt,Ve?Ue:null),O(this,Pt,void 0),O(this,Ft,void 0),O(this,It,void 0),O(this,Lt,null),O(this,Rt,null),O(this,zt,null),O(this,Bt,null),O(this,Vt,0),O(this,Ht,0),O(this,Ut,!1),O(this,Wt,new Set),O(this,Gt,new Set),O(this,Kt,null),O(this,qt,Dt(()=>(A(Kt,this,pr(j(Vt,this))),()=>{A(Kt,this,null)}))),A(Mt,this,e),A(Pt,this,t),A(Ft,this,e=>{var t=mi;t.b=this,t.f|=128,n(e)}),this.parent=mi.b,this.transform_error=r??this.parent?.transform_error??(e=>e),A(It,this,qr(()=>{if(Ve){let e=j(Nt,this);Ge();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));k(Jt,this,Zt).call(this,t)}else t?k(Jt,this,$t).call(this):k(Jt,this,Xt).call(this)}else k(Jt,this,en).call(this)},At)),Ve&&A(Mt,this,Ue)}defer_effect(e){yt(e,j(Wt,this),j(Gt,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!j(Pt,this).pending}update_pending_count(e,t){k(Jt,this,rn).call(this,e,t),A(Vt,this,j(Vt,this)+e),!(!j(Kt,this)||j(Ut,this))&&(A(Ut,this,!0),dt(()=>{A(Ut,this,!1),j(Kt,this)&&hr(j(Kt,this),j(Vt,this))}))}get_effect_pending(){return j(qt,this).call(this),z(j(Kt,this))}error(e){if(!j(Pt,this).onerror&&!j(Pt,this).failed)throw e;xn?.is_fork?(j(Lt,this)&&xn.skip_effect(j(Lt,this)),j(Rt,this)&&xn.skip_effect(j(Rt,this)),j(zt,this)&&xn.skip_effect(j(zt,this)),xn.oncommit(()=>{k(Jt,this,an).call(this,e)})):k(Jt,this,an).call(this,e)}};function Xt(){try{A(Lt,this,Yr(()=>j(Ft,this).call(this,j(Mt,this))))}catch(e){this.error(e)}}function Zt(e){let t=j(Pt,this).failed,{reset:n,invoke_onerror:r}=k(Jt,this,Qt).call(this,e);dt(r),t&&A(zt,this,Yr(()=>{t(j(Mt,this),()=>e,()=>n)}))}function Qt(e){var t=!1,n=!1;let r=()=>{if(t){Be();return}t=!0,n&&Me(),j(zt,this)!==null&&ni(j(zt,this),()=>{A(zt,this,null)}),k(Jt,this,nn).call(this,()=>{k(Jt,this,en).call(this)})};return{reset:r,invoke_onerror:()=>{try{n=!0,j(Pt,this).onerror?.(e,r),n=!1}catch(e){mt(e,j(It,this)&&j(It,this).parent)}}}}function $t(){let e=j(Pt,this).pending;e&&(this.is_pending=!0,A(Rt,this,Yr(()=>e(j(Mt,this)))),dt(()=>{var e=A(Bt,this,document.createDocumentFragment()),t=Dr();e.append(t),A(Lt,this,k(Jt,this,nn).call(this,()=>Yr(()=>j(Ft,this).call(this,t)))),j(Ht,this)===0&&(j(Mt,this).before(e),A(Bt,this,null),ni(j(Rt,this),()=>{A(Rt,this,null)}),k(Jt,this,tn).call(this,xn))}))}function en(){try{if(this.is_pending=this.has_pending_snippet(),A(Ht,this,0),A(Vt,this,0),A(Lt,this,Yr(()=>{j(Ft,this).call(this,j(Mt,this))})),j(Ht,this)>0){var e=A(Bt,this,document.createDocumentFragment());oi(j(Lt,this),e);let t=j(Pt,this).pending;A(Rt,this,Yr(()=>t(j(Mt,this))))}else k(Jt,this,tn).call(this,xn)}catch(e){this.error(e)}}function tn(e){this.is_pending=!1,e.transfer_effects(j(Wt,this),j(Gt,this))}function nn(e){var t=mi,n=di,r=Qe;hi(j(It,this)),pi(j(It,this)),$e(j(It,this).ctx);try{return qn.ensure(),e()}catch(e){return pt(e),null}finally{hi(t),pi(n),$e(r)}}function rn(e,t){if(!this.has_pending_snippet()){if(this.parent){var n;k(Jt,n=this.parent,rn).call(n,e,t)}return}A(Ht,this,j(Ht,this)+e),j(Ht,this)===0&&(k(Jt,this,tn).call(this,t),j(Rt,this)&&ni(j(Rt,this),()=>{A(Rt,this,null)}),j(Bt,this)&&(j(Mt,this).before(j(Bt,this)),A(Bt,this,null)))}function an(e){j(Lt,this)&&($r(j(Lt,this)),A(Lt,this,null)),j(Rt,this)&&($r(j(Rt,this)),A(Rt,this,null)),j(zt,this)&&($r(j(zt,this)),A(zt,this,null)),Ve&&(We(j(Nt,this)),Ke(),We(qe()));let t=j(Pt,this).failed,n=e=>{let{reset:n,invoke_onerror:r}=k(Jt,this,Qt).call(this,e);r(),t&&A(zt,this,k(Jt,this,nn).call(this,()=>{try{return Yr(()=>{var r=mi;r.b=this,r.f|=128,t(j(Mt,this),()=>e,()=>n)})}catch(e){return mt(e,j(It,this).parent),null}}))};dt(()=>{var t;try{t=this.transform_error(e)}catch(e){mt(e,j(It,this)&&j(It,this).parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>mt(e,j(It,this)&&j(It,this).parent)):n(t)})}function on(e,t,n,r){let i=ot()?un:pn;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=mi,c=sn(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){mt(e,s)}cn()}}var d=ln();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>fn(e))).then(u).catch(e=>mt(e,s)).finally(d)}l?l.then(()=>{c(),f(),cn()}):f()}function sn(){var e=mi,t=di,n=Qe,r=xn;return function(i=!0){hi(e),pi(t),$e(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function cn(e=!0){hi(null),pi(null),$e(null),e&&xn?.deactivate()}function ln(){var e=mi,t=e.b,n=xn,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function un(e){var t=2|w;return mi!==null&&(mi.f|=ae),{ctx:Qe,deps:null,effects:null,equals:Ye,f:t,fn:e,reactions:null,rv:0,v:Pe,wv:0,parent:mi,ac:null}}var dn=Symbol(`obsolete`);function fn(e,t,n){let r=mi;r===null&&Se();var i=void 0,a=pr(Pe),o=!di,s=new Set;return Gr(()=>{var t=mi,n=h();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ye&&n.reject(e)}).finally(cn)}catch(e){n.reject(e),cn()}var c=xn;if(o){if(t.f&32768)var l=ln();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(dn);else for(let e of s.values())e.reject(dn);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==dn&&(c.activate(),t?(a.f|=ue,hr(a,t)):(a.f&8388608&&(a.f^=ue),hr(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),Rr(()=>{for(let e of s)e.reject(dn)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function M(e){let t=un(e);return _i(t),t}function pn(e){let t=un(e);return t.equals=Ze,t}function mn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)$r(t[n])}}function hn(e){var t,n=mi,r=e.parent;if(!li&&r!==null&&e.v!==Pe&&r.f&24576)return Le(),e.v;hi(r);try{e.f&=~ce,mn(e),t=ki(e)}finally{hi(n)}return t}function gn(e){var t=hn(e);if(!e.equals(t)&&(e.wv=Ei(),(!xn?.is_fork||e.deps===null)&&(xn===null?e.v=t:(xn.capture(e,t,!0),Sn?.capture(e,t,!0)),e.deps===null))){gt(e,C);return}li||(Cn===null?_t(e):(Lr()||xn?.is_fork)&&Cn.set(e,t))}function _n(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Tt(()=>{t.ac.abort(ye),t.ac=null}),t.fn!==null&&(t.teardown=p),ji(t,0),Zr(t))}function vn(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Mi(t)}var yn,bn=null,xn=null,Sn=null,Cn=null,wn=null,Tn=!1,En=!1,Dn=null,On=null,kn=0,An=1,jn=new WeakMap,Mn=new WeakMap,Nn=new WeakMap,Pn=new WeakMap,Fn=new WeakMap,In=new WeakMap,Ln=new WeakMap,Rn=new WeakMap,zn=new WeakMap,Bn=new WeakMap,Vn=new WeakMap,Hn=new WeakMap,Un=new WeakMap,Wn=new WeakMap,Gn=new WeakMap,Kn=new WeakSet,qn=class e{constructor(){kt(this,Kn),x(this,`id`,An++),O(this,jn,!1),x(this,`linked`,!0),O(this,Mn,null),O(this,Nn,null),x(this,`async_deriveds`,new Map),x(this,`current`,new Map),x(this,`previous`,new Map),O(this,Pn,new Set),O(this,Fn,new Set),O(this,In,0),O(this,Ln,new Map),O(this,Rn,null),O(this,zn,[]),O(this,Bn,[]),O(this,Vn,new Set),O(this,Hn,new Set),O(this,Un,new Map),O(this,Wn,new Set),x(this,`is_fork`,!1),O(this,Gn,!1),bn===null?bn=this:(A(Nn,bn,this),A(Mn,this,bn)),bn=this}skip_effect(e){j(Un,this).has(e)||j(Un,this).set(e,{d:[],m:[]}),j(Wn,this).delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=j(Un,this).get(e);if(n){j(Un,this).delete(e);for(var r of n.d)gt(r,w),t(r);for(r of n.m)gt(r,T),t(r)}j(Wn,this).add(e)}capture(e,t,n=!1){e.v!==Pe&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),Cn?.set(e,t)),this.is_fork||(e.v=t)}activate(){xn=this}deactivate(){xn=null,Cn=null}flush(){try{En=!0,xn=this,k(Kn,this,Yn).call(this)}finally{kn=0,wn=null,Dn=null,On=null,En=!1,xn=null,Cn=null,dr.clear()}}discard(){for(let e of j(Fn,this))e(this);j(Fn,this).clear();for(let e of this.async_deriveds.values())e.reject(dn);k(Kn,this,er).call(this),j(Rn,this)?.resolve()}register_created_effect(e){j(Bn,this).push(e)}increment(e,t){if(A(In,this,j(In,this)+1),e){let e=j(Ln,this).get(t)??0;j(Ln,this).set(t,e+1)}}decrement(e,t){if(A(In,this,j(In,this)-1),e){let e=j(Ln,this).get(t)??0;e===1?j(Ln,this).delete(t):j(Ln,this).set(t,e-1)}j(Gn,this)||(A(Gn,this,!0),dt(()=>{A(Gn,this,!1),this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)j(Vn,this).add(t);for(let e of t)j(Hn,this).add(e);e.clear(),t.clear()}oncommit(e){j(Pn,this).add(e)}ondiscard(e){j(Fn,this).add(e)}settled(){return(j(Rn,this)??A(Rn,this,h())).promise}static ensure(){if(xn===null){let t=xn=new e;!En&&!Tn&&dt(()=>{j(jn,t)||t.flush()})}return xn}apply(){Cn=null}schedule(e){if(wn=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Dn!==null&&t===mi&&(di===null||!(di.f&2)))return;if(n&96){if(!(n&1024))return;t.f^=C}}j(zn,this).push(t)}};yn=qn;function Jn(){if(this.is_fork)return!0;for(let n of j(Ln,this).keys()){for(var e=n,t=!1;e.parent!==null;){if(j(Un,this).has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}function Yn(){A(jn,this,!0),kn++>1e3&&(k(Kn,this,er).call(this),nr());for(let e of j(Vn,this))j(Hn,this).delete(e),gt(e,w),this.schedule(e);for(let e of j(Hn,this))gt(e,T),this.schedule(e);let e=j(zn,this);A(zn,this,[]),this.apply();var t=Dn=[],n=[],r=On=[];for(let r of e)try{k(Kn,this,Xn).call(this,r,t,n)}catch(e){throw lr(r),k(Kn,this,Jn).call(this)||this.discard(),e}if(xn=null,r.length>0){var i=yn.ensure();for(let e of r)i.schedule(e)}if(Dn=null,On=null,k(Kn,this,Jn).call(this)){k(Kn,this,$n).call(this,n),k(Kn,this,$n).call(this,t);for(let[e,t]of j(Un,this))cr(e,t);r.length>0&&k(Kn,xn,Yn).call(xn);return}let a=k(Kn,this,Zn).call(this);if(a){k(Kn,this,$n).call(this,n),k(Kn,this,$n).call(this,t),k(Kn,a,Qn).call(a,this);return}j(Vn,this).clear(),j(Hn,this).clear();for(let e of j(Pn,this))e(this);j(Pn,this).clear(),Sn=this,ir(n),ir(t),Sn=null,j(Rn,this)?.resolve();var o=xn;if(j(In,this)===0&&(j(zn,this).length===0||o!==null)&&k(Kn,this,er).call(this),j(zn,this).length>0)if(o!==null){let e=o;j(zn,e).push(...j(zn,this).filter(t=>!j(zn,e).includes(t)))}else o=this;o!==null&&k(Kn,o,Yn).call(o)}function Xn(e,t,n){e.f^=C;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||j(Un,this).has(r))&&r.fn!==null){a?r.f^=C:i&4?t.push(r):Di(r)&&(i&16&&j(Hn,this).add(r),Mi(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}function Zn(){for(var e=j(Mn,this);e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=j(Mn,e)}return null}function Qn(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(j(Vn,e),j(Hn,e));let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(j(Hn,this).delete(i),gt(i,w),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),k(Kn,e,er).call(e),xn=this,k(Kn,this,Yn).call(this)}function $n(e){for(var t=0;t<e.length;t+=1)yt(e[t],j(Vn,this),j(Hn,this))}function er(){if(this.linked){var e=j(Mn,this),t=j(Nn,this);e===null||A(Nn,e,t),t===null?bn=e:A(Mn,t,e),this.linked=!1}}function tr(e){var t=Tn;Tn=!0;try{var n;for(e&&(xn!==null&&!xn.is_fork&&xn.flush(),n=e());;){if(ft(),xn===null)return n;xn.flush()}}finally{Tn=t}}function nr(){try{De()}catch(e){mt(e,wn)}}var rr=null;function ir(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Di(r)&&(rr=new Set,Mi(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&ti(r),rr?.size>0)){dr.clear();for(let e of rr){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)rr.has(n)&&(rr.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Mi(n)}}rr.clear()}}rr=null}}function ar(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?ar(i,t,n,r):e&4194320&&!(e&2048)&&or(i,t,r)&&(gt(i,w),sr(i))}}function or(e,t,n){let i=n.get(e);if(i!==void 0)return i;if(e.deps!==null)for(let i of e.deps){if(r.call(t,i))return!0;if(i.f&2&&or(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function sr(e){xn.schedule(e)}function cr(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),gt(e,C);for(var n=e.first;n!==null;)cr(n,t),n=n.next}}function lr(e){gt(e,C);for(var t=e.first;t!==null;)lr(t),t=t.next}var ur=new Set,dr=new Map,fr=!1;function pr(e,t){return{f:0,v:e,reactions:null,equals:Ye,rv:0,wv:0}}function N(e,t){let n=pr(e,t);return _i(n),n}function mr(e,t=!1,n=!0){let r=pr(e);return t||(r.equals=Ze),r}function P(e,t,n=!1){return di!==null&&(!fi||di.f&131072)&&ot()&&di.f&4325394&&(gi===null||!gi.has(e))&&je(),hr(e,n?yr(t):t,On)}function hr(e,t,n=null){if(!e.equals(t)){dr.set(e,li?t:e.v);var r=qn.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&hn(t),Cn===null&&_t(t)}e.wv=Ei(),vr(e,w,n),ot()&&mi!==null&&mi.f&1024&&!(mi.f&96)&&(bi===null?xi([e]):bi.push(e)),!r.is_fork&&ur.size>0&&!fr&&gr()}return t}function gr(){fr=!1;for(let e of ur){e.f&1024&>(e,T);let t;try{t=Di(e)}catch{t=!0}t&&Mi(e)}ur.clear()}function _r(e){P(e,e.v+1)}function vr(e,t,n){var r=e.reactions;if(r!==null)for(var i=ot(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===mi)){var l=(c&w)===0;if(l&>(s,t),c&131072)ur.add(s);else if(c&2){var u=s;Cn?.delete(u),c&65536||(c&512&&(mi===null||!(mi.f&2097152))&&(s.f|=ce),vr(u,T,n))}else if(l){var d=s;c&16&&rr!==null&&rr.add(d),n===null?sr(d):n.push(d)}}}}function yr(e){if(typeof e!=`object`||!e||de in e)return e;let n=u(e);if(n!==c&&n!==l)return e;var r=new Map,i=t(e),a=N(0),s=null,d=wi,f=e=>{if(wi===d)return e();var t=di,n=wi;pi(null),Ti(d);var r=e();return pi(t),Ti(n),r};return i&&r.set(`length`,N(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&ke();var i=r.get(t);return i===void 0?f(()=>{var e=N(n.value,s);return r.set(t,e),e}):P(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>N(Pe,s));r.set(t,e),_r(a)}}else P(n,Pe),_r(a);return!0},get(t,n,i){if(n===de)return e;var a=r.get(n),c=n in t;if(a===void 0&&(!c||o(t,n)?.writable)&&(a=f(()=>N(yr(c?t[n]:Pe),s)),r.set(n,a)),a!==void 0){var l=z(a);return l===Pe?void 0:l}return Reflect.get(t,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&`value`in n){var i=r.get(t);i&&(n.value=z(i))}else if(n===void 0){var a=r.get(t),o=a?.v;if(a!==void 0&&o!==Pe)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return n},has(e,t){if(t===de)return!0;var n=r.get(t),i=n!==void 0&&n.v!==Pe||Reflect.has(e,t);return(n!==void 0||mi!==null&&(!i||o(e,t)?.writable))&&(n===void 0&&(n=f(()=>N(i?yr(e[t]):Pe,s)),r.set(t,n)),z(n)===Pe)?!1:i},set(e,t,n,c){var l=r.get(t),u=t in e;if(i&&t===`length`)for(var d=n;d<l.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>N(Pe,s)),r.set(d+``,p)):P(p,Pe)}if(l===void 0)(!u||o(e,t)?.writable)&&(l=f(()=>N(void 0,s)),P(l,yr(n)),r.set(t,l));else{u=l.v!==Pe;var m=f(()=>yr(n));P(l,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(c,n),!u){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&P(g,_+1)}_r(a)}return!0},ownKeys(e){z(a);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==Pe});for(var[n,i]of r)i.v!==Pe&&!(n in e)&&t.push(n);return t},setPrototypeOf(){Ae()}})}function br(e){try{if(typeof e==`object`&&e&&de in e)return e[de]}catch{}return e}function xr(e,t){return Object.is(br(e),br(t))}var Sr,Cr,wr,Tr;function Er(){if(Sr===void 0){Sr=window,Cr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;wr=o(t,`firstChild`).get,Tr=o(t,`nextSibling`).get,d(e)&&(e[he]=void 0,e[me]=null,e[ge]=void 0,e.__e=void 0),d(n)&&(n[_e]=void 0)}}function Dr(e=``){return document.createTextNode(e)}function Or(e){return wr.call(e)}function kr(e){return Tr.call(e)}function F(e,t){if(!Ve)return Or(e);var n=Or(Ue);if(n===null)n=Ue.appendChild(Dr());else if(t&&n.nodeType!==3){var r=Dr();return n?.before(r),We(r),r}return t&&Nr(n),We(n),n}function I(e,t=!1){if(!Ve){var n=Or(e);return n instanceof Comment&&n.data===``?kr(n):n}if(t){if(Ue?.nodeType!==3){var r=Dr();return Ue?.before(r),We(r),r}Nr(Ue)}return Ue}function L(e,t=1,n=!1){let r=Ve?Ue:e;for(var i;t--;)i=r,r=kr(r);if(!Ve)return r;if(n){if(r?.nodeType!==3){var a=Dr();return r===null?i?.after(a):r.before(a),We(a),a}Nr(r)}return We(r),r}function Ar(e){e.textContent=``}function jr(){return!1}function Mr(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function Nr(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Pr(e){mi===null&&(di===null&&Ee(e),Te()),li&&we(e)}function Fr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Ir(e,t){var n=mi;n!==null&&n.f&8192&&(e|=ee);var r={ctx:Qe,deps:null,nodes:null,f:e|w|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};xn?.register_created_effect(r);var i=r;if(e&4)Dn===null?qn.ensure().schedule(r):Dn.push(r);else if(t!==null){try{Mi(r)}catch(e){throw $r(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=ie))}if(i!==null&&(i.parent=n,n!==null&&Fr(i,n),di!==null&&di.f&2&&!(e&64))){var a=di;(a.effects??(a.effects=[])).push(i)}return r}function Lr(){return di!==null&&!fi}function Rr(e){let t=Ir(8,null);return gt(t,C),t.teardown=e,t}function zr(e){Pr(`$effect`);var t=mi.f;if(!di&&t&32&&Qe!==null&&!Qe.i){var n=Qe;(n.e??(n.e=[])).push(e)}else return Br(e)}function Br(e){return Ir(4|oe,e)}function Vr(e){return Pr(`$effect.pre`),Ir(8|oe,e)}function Hr(e){qn.ensure();let t=Ir(64|ae,e);return()=>{$r(t)}}function Ur(e){qn.ensure();let t=Ir(64|ae,e);return(e={})=>new Promise(n=>{e.outro?ni(t,()=>{$r(t),n(void 0)}):($r(t),n(void 0))})}function Wr(e){return Ir(4,e)}function Gr(e){return Ir(E|ae,e)}function Kr(e,t=0){return Ir(8|t,e)}function R(e,t=[],n=[],r=[]){on(r,t,n,t=>{Ir(8,()=>{e(...t.map(z))})})}function qr(e,t=0){return Ir(16|t,e)}function Jr(e,t=0){return Ir(S|t,e)}function Yr(e){return Ir(32|ae,e)}function Xr(e){var t=e.teardown;if(t!==null){let e=li,n=di;ui(!0),pi(null);try{t.call(null)}finally{ui(e),pi(n)}}}function Zr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Tt(()=>{e.abort(ye)});var r=n.next;n.f&64?n.parent=null:$r(n,t),n=r}}function Qr(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||$r(t),t=n}}function $r(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(ei(e.nodes.start,e.nodes.end),n=!0),e.f|=re,Zr(e,t&&!n),ji(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Xr(e),e.f^=re,e.f|=te;var i=e.parent;i!==null&&i.first!==null&&ti(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function ei(e,t){for(;e!==null;){var n=e===t?null:kr(e);e.remove(),e=n}}function ti(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function ni(e,t,n=!0){var r=[];ri(e,r,!0);var i=()=>{n&&$r(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function ri(e,t,n){if(!(e.f&8192)){e.f^=ee;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;ri(i,t,o?n:!1)}i=a}}}function ii(e){ai(e,!0)}function ai(e,t){if(e.f&8192){e.f^=ee,e.f&1024||(gt(e,w),qn.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;ai(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function oi(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:kr(n);t.append(n),n=i}}var si=null,ci=!1,li=!1;function ui(e){li=e}var di=null,fi=!1;function pi(e){di=e}var mi=null;function hi(e){mi=e}var gi=null;function _i(e){di!==null&&(gi??(gi=new Set)).add(e)}var vi=null,yi=0,bi=null;function xi(e){bi=e}var Si=1,Ci=0,wi=Ci;function Ti(e){wi=e}function Ei(){return++Si}function Di(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~ce),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Di(a)&&gn(a),a.wv>e.wv)return!0}t&512&&Cn===null&>(e,C)}return!1}function Oi(e,t,n=!0){var r=e.reactions;if(r!==null&&!(gi!==null&&gi.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Oi(a,t,!1):t===a&&(n?gt(a,w):a.f&1024&>(a,T),sr(a))}}function ki(e){var t=vi,n=yi,r=bi,i=di,a=gi,o=Qe,s=fi,c=wi,l=e.f;vi=null,yi=0,bi=null,di=l&96?null:e,gi=null,$e(e.ctx),fi=!1,wi=++Ci,e.ac!==null&&(Tt(()=>{e.ac.abort(ye)}),e.ac=null);try{e.f|=le;var u=e.fn,d=u();e.f|=ne;var f=e.deps,p=xn?.is_fork;if(vi!==null){var m;if(p||ji(e,yi),f!==null&&yi>0)for(f.length=yi+vi.length,m=0;m<vi.length;m++)f[yi+m]=vi[m];else e.deps=f=vi;if(Lr()&&e.f&512)for(m=yi;m<f.length;m++){var h;((h=f[m]).reactions??(h.reactions=[])).push(e)}}else!p&&f!==null&&yi<f.length&&(ji(e,yi),f.length=yi);if(ot()&&bi!==null&&!fi&&f!==null&&!(e.f&6146))for(m=0;m<bi.length;m++)Oi(bi[m],e);if(i!==null&&i!==e){if(Ci++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Ci;if(t!==null)for(let e of t)e.rv=Ci;bi!==null&&(r===null?r=bi:r.push(...bi))}return e.f&8388608&&(e.f^=ue),d}catch(e){return pt(e)}finally{e.f^=le,vi=t,yi=n,bi=r,di=i,gi=a,$e(o),fi=s,wi=c}}function Ai(e,t){let i=t.reactions;if(i!==null){var a=n.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=t.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&t.f&2&&(vi===null||!r.call(vi,t))){var s=t;s.f&512&&(s.f^=512,s.f&=~ce),s.v!==Pe&&_t(s),s.ac!==null&&Tt(()=>{s.ac.abort(ye),s.ac=null,gt(s,w)}),_n(s),ji(s,0)}}function ji(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Ai(e,n[r])}function Mi(e){var t=e.f;if(!(t&16384)){gt(e,C);var n=mi,r=ci;mi=e,ci=(t&96)==0;try{t&16777232?Qr(e):Zr(e),Xr(e);var i=ki(e);e.teardown=typeof i==`function`?i:null,e.wv=Si}finally{ci=r,mi=n}}}async function Ni(){await Promise.resolve(),tr()}function z(e){var t=(e.f&2)!=0;if(si?.add(e),di!==null&&!fi&&!(mi!==null&&mi.f&16384)&&(gi===null||!gi.has(e))){var n=di.deps;if(di.f&2097152)e.rv<Ci&&(e.rv=Ci,vi===null&&n!==null&&n[yi]===e?yi++:vi===null?vi=[e]:vi.push(e));else{var i;(i=di).deps??(i.deps=[]),r.call(di.deps,e)||di.deps.push(e);var a=e.reactions;a===null?e.reactions=[di]:r.call(a,di)||a.push(di)}}if(li&&dr.has(e))return dr.get(e);if(t){var o=e;if(li){var s=o.v;return(!(o.f&1024)&&o.reactions!==null||Fi(o))&&(s=hn(o)),dr.set(o,s),s}var c=(o.f&512)==0&&!fi&&di!==null&&(ci||(di.f&512)!=0),l=(o.f&ne)===0;Di(o)&&(c&&(o.f|=512),gn(o)),c&&!l&&(vn(o),Pi(o))}if(Cn?.has(e))return Cn.get(e);if(e.f&8388608)throw e.v;return e.v}function Pi(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&2&&!(t.f&512)&&(vn(t),Pi(t))}function Fi(e){if(e.v===Pe)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(dr.has(t)||t.f&2&&Fi(t))return!0;return!1}function Ii(e){var t=fi;try{return fi=!0,e()}finally{fi=t}}function Li(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(de in e)Ri(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&de in n&&Ri(n)}}}function Ri(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Ri(e[n],t)}catch{}let n=u(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=s(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}function zi(){return Symbol(Ie)}function Bi(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var Vi=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function Hi(e){return Vi.includes(e)}var Ui=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`),Wi={formnovalidate:`formNoValidate`,ismap:`isMap`,nomodule:`noModule`,playsinline:`playsInline`,readonly:`readOnly`,defaultvalue:`defaultValue`,defaultchecked:`defaultChecked`,srcobject:`srcObject`,novalidate:`noValidate`,allowfullscreen:`allowFullscreen`,disablepictureinpicture:`disablePictureInPicture`,disableremoteplayback:`disableRemotePlayback`};function Gi(e){return e=e.toLowerCase(),Wi[e]??e}[...Ui];var Ki=[`touchstart`,`touchmove`];function qi(e){return Ki.includes(e)}var Ji=[`textarea`,`script`,`style`,`title`];function Yi(e){return Ji.includes(e)}var Xi=Symbol(`events`),Zi=new Set,Qi=new Set;function $i(e,t,n,r={}){function i(e){if(r.capture||ia.call(t,e),!e.cancelBubble)return Tt(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?dt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function ea(e,t,n,r={}){var i=$i(t,e,n,r);return()=>{e.removeEventListener(t,i,r)}}function ta(e,t,n,r,i){var a={capture:r,passive:i},o=$i(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Rr(()=>{t.removeEventListener(e,o,a)})}function B(e,t,n){(t[Xi]??(t[Xi]={}))[e]=n}function na(e){for(var t=0;t<e.length;t++)Zi.add(e[t]);for(var n of Qi)n(e)}var ra=null;function ia(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],o=i[0]||e.target;ra=e;var s=0,c=ra===e&&e[Xi];if(c){var l=i.indexOf(c);if(l!==-1&&(t===document||t===window)){e[Xi]=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(o=i[s]||e.target,o!==t){a(e,`currentTarget`,{configurable:!0,get(){return o||n}});var d=di,f=mi;pi(null),hi(null);try{for(var p,m=[];o!==null&&o!==t;){try{var h=o[Xi]?.[r];h!=null&&(!o.disabled||e.target===o)&&h.call(o,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;s++,o=s<i.length?i[s]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[Xi]=t,delete e.currentTarget,pi(d),hi(f)}}}var aa=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function oa(e){return aa?.createHTML(e)??e}function sa(e){var t=Mr(`template`);return t.innerHTML=oa(e.replaceAll(`<!>`,`<!---->`)),t.content}function ca(e,t){var n=mi;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function V(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(Ve)return ca(Ue,null),Ue;i===void 0&&(i=sa(a?e:`<!>`+e),n||(i=Or(i)));var t=r||Cr?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Or(t),s=t.lastChild;ca(o,s)}else ca(t,t);return t}}function la(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(Ve)return ca(Ue,null),Ue;if(!o){var e=Or(sa(a));if(i)for(o=document.createDocumentFragment();Or(e);)o.appendChild(Or(e));else o=Or(e)}var t=o.cloneNode(!0);if(i){var n=Or(t),r=t.lastChild;ca(n,r)}else ca(t,t);return t}}function ua(e,t){return la(e,t,`svg`)}function da(){if(Ve)return ca(Ue,null),Ue;var e=document.createDocumentFragment(),t=document.createComment(``),n=Dr();return e.append(t,n),ca(t,n),e}function H(e,t){if(Ve){var n=mi;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=Ue),Ge();return}e!==null&&e.before(t)}function fa(){var e,t;if(Ve&&Ue&&Ue.nodeType===8&&Ue.textContent?.startsWith(`$`)){let e=Ue.textContent.substring(1);return Ge(),e}return(e=(t=window).__svelte??(t.__svelte={})).uid??(e.uid=1),`c${window.__svelte.uid++}`}var pa=!0;function ma(e){pa=e}function U(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[_e]??(e[_e]=e.nodeValue))&&(e[_e]=n,e.nodeValue=`${n}`)}function ha(e,t){return _a(e,t)}var ga=new Map;function _a(e,{target:t,anchor:n,props:r={},events:a,context:o,intro:s=!0,transformError:c}){Er();var l=void 0,u=Ur(()=>{var u=n??t.appendChild(Dr());jt(u,{pending:()=>{}},t=>{it({});var n=Qe;if(o&&(n.c=o),a&&(r.$$events=a),Ve&&ca(t,null),pa=s,l=e(t,r)||{},pa=!0,Ve&&(mi.nodes.end=Ue,Ue===null||Ue.nodeType!==8||Ue.data!==`]`))throw Re(),Ne;at()},c);var d=new Set,f=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!d.has(r)){d.add(r);var i=qi(r);for(let e of[t,document]){var a=ga.get(e);a===void 0&&(a=new Map,ga.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,ia,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(i(Zi)),Qi.add(f),()=>{for(var e of d)for(let n of[t,document]){var r=ga.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,ia),r.delete(e),r.size===0&&ga.delete(n)):r.set(e,i)}Qi.delete(f),u!==n&&u.parentNode?.removeChild(u)}});return va.set(l,u),l}var va=new WeakMap;function ya(e,t){let n=va.get(e);return n?(va.delete(e),n(t)):Promise.resolve()}var ba=new WeakMap,xa=new WeakMap,Sa=new WeakMap,Ca=new WeakMap,wa=new WeakMap,Ta=new WeakMap,Ea=new WeakMap,Da=class{constructor(e,t=!0){x(this,`anchor`,void 0),O(this,ba,new Map),O(this,xa,new Map),O(this,Sa,new Map),O(this,Ca,new Set),O(this,wa,!0),O(this,Ta,e=>{if(j(ba,this).has(e)){var t=j(ba,this).get(e),n=j(xa,this).get(t);if(n)ii(n),j(Ca,this).delete(t);else{var r=j(Sa,this).get(t);r&&(ii(r.effect),j(xa,this).set(t,r.effect),j(Sa,this).delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of j(ba,this)){if(j(ba,this).delete(t),t===e)break;let r=j(Sa,this).get(n);r&&($r(r.effect),j(Sa,this).delete(n))}for(let[e,r]of j(xa,this)){if(e===t||j(Ca,this).has(e))continue;let i=()=>{if(Array.from(j(ba,this).values()).includes(e)){var t=document.createDocumentFragment();oi(r,t),t.append(Dr()),j(Sa,this).set(e,{effect:r,fragment:t})}else $r(r);j(Ca,this).delete(e),j(xa,this).delete(e)};j(wa,this)||!n?(j(Ca,this).add(e),ni(r,i,!1)):i()}}}),O(this,Ea,e=>{j(ba,this).delete(e);let t=Array.from(j(ba,this).values());for(let[e,n]of j(Sa,this))t.includes(e)||($r(n.effect),j(Sa,this).delete(e))}),this.anchor=e,A(wa,this,t)}ensure(e,t){var n=xn,r=jr();if(t&&!j(xa,this).has(e)&&!j(Sa,this).has(e))if(r){var i=document.createDocumentFragment(),a=Dr();i.append(a),j(Sa,this).set(e,{effect:Yr(()=>t(a)),fragment:i})}else j(xa,this).set(e,Yr(()=>t(this.anchor)));if(j(ba,this).set(n,e),r){for(let[t,r]of j(xa,this))t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of j(Sa,this))t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(j(Ta,this)),n.ondiscard(j(Ea,this))}else Ve&&(this.anchor=Ue),j(Ta,this).call(this,n)}};function W(e,t,n=!1){var r;Ve&&(r=Ue,Ge());var i=new Da(e),a=n?ie:0;function o(e,t){if(Ve){var n=Je(r);if(e!==parseInt(n.substring(1))){var a=qe();We(a),i.anchor=a,He(!1),i.ensure(e,t),He(!0);return}}i.ensure(e,t)}qr(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var Oa=Symbol(`NaN`);function ka(e,t,n){Ve&&Ge();var r=new Da(e),i=!ot();qr(()=>{var e=t();e!==e&&(e=Oa),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function Aa(e,t){return t}function ja(e,t,n){for(var r=[],a=t.length,o,s=t.length,c=0;c<a;c++){let n=t[c];ni(n,()=>{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;Ma(e,i(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else--s},!1)}if(s===0){var l=r.length===0&&n!==null;if(l){var u=n,d=u.parentNode;Ar(d),d.append(u),e.items.clear()}Ma(e,t,!l)}else o={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(o)}function Ma(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=se,oi(a,document.createDocumentFragment())):$r(t[i],n)}}var Na;function G(e,n,r,a,o,s=null){var c=e,l=new Map;if(n&4){var u=e;c=Ve?We(Or(u)):u.appendChild(Dr())}Ve&&Ge();var d=null,f=pn(()=>{var e=r();return t(e)?e:e==null?[]:i(e)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=d,Fa(v,p,c,n,a),d!==null&&(p.length===0?d.f&33554432?(d.f^=se,La(d,null,c)):ii(d):ni(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:qr(()=>{p=z(f);var e=p.length;let t=!1;Ve&&Je(c)===`[!`!=(e===0)&&(c=qe(),We(c),He(!1),t=!0);for(var i=new Set,u=xn,v=jr(),y=0;y<e;y+=1){Ve&&Ue.nodeType===8&&Ue.data===`]`&&(c=Ue,t=!0,He(!1));var b=p[y],x=a(b,y),S=h?null:l.get(x);S?(S.v&&hr(S.v,b),S.i&&hr(S.i,y),v&&u.unskip_effect(S.e)):(S=Ia(l,h?c:Na??(Na=Dr()),b,x,y,o,n,r),h||(S.e.f|=se),l.set(x,S)),i.add(x)}if(e===0&&s&&!d&&(h?d=Yr(()=>s(c)):(d=Yr(()=>s(Na??(Na=Dr()))),d.f|=se)),e>i.size&&Ce(``,``,``),Ve&&e>0&&We(qe()),!h)if(m.set(u,i),v){for(let[e,t]of l)i.has(e)||u.skip_effect(t.e);u.oncommit(g),u.ondiscard(_)}else g(u);t&&He(!0),z(f)}),flags:n,items:l,pending:m,outrogroups:null,fallback:d};h=!1,Ve&&(c=Ue)}function Pa(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Fa(e,t,n,r,a){var o=(r&8)!=0,s=t.length,c=e.items,l=Pa(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v<s;v+=1)h=t[v],g=a(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??(f=new Set)).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=a(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(ii(_),o&&(_.nodes?.a?.unfix(),(f??(f=new Set)).delete(_))),_.f&33554432)if(_.f^=se,_===l)La(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Ra(e,d,_),Ra(e,_,y),La(_,y,n),d=_,p=[],m=[],l=Pa(d.next);continue}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],C=p[p.length-1];for(x=0;x<p.length;x+=1)La(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Ra(e,S.prev,C.next),Ra(e,d,S),Ra(e,C,b),l=b,d=C,--v,p=[],m=[]}else u.delete(_),La(_,l,n),Ra(e,_.prev,_.next),Ra(e,_,d===null?e.effect.first:d.next),Ra(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??(u=new Set)).add(l),m.push(l),l=Pa(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Pa(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Ma(e,i(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var w=[];if(u!==void 0)for(_ of u)_.f&8192||w.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&w.push(l),l=Pa(l.next);var T=w.length;if(T>0){var ee=r&4&&s===0?n:null;if(o){for(v=0;v<T;v+=1)w[v].nodes?.a?.measure();for(v=0;v<T;v+=1)w[v].nodes?.a?.fix()}ja(e,w,ee)}}o&&dt(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Ia(e,t,n,r,i,a,o,s){var c=o&1?o&16?pr(n):mr(n,!1,!1):null,l=o&2?pr(i):null;return{v:c,i:l,e:Yr(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function La(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=kr(r);if(a.before(r),r===i)return;r=o}}function Ra(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function za(e,t,...n){var r=new Da(e);qr(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},ie)}function Ba(e,t,n){var r;Ve&&(r=Ue,Ge());var i=new Da(e);qr(()=>{var e=t()??null;if(Ve&&Je(r)===`[`!=(e!==null)){var a=qe();We(a),i.anchor=a,He(!1),i.ensure(e,e&&(t=>n(t,e))),He(!0);return}i.ensure(e,e&&(t=>n(t,e)))},ie)}var Va=()=>performance.now(),Ha={tick:e=>requestAnimationFrame(e),now:()=>Va(),tasks:new Set};function Ua(){let e=Ha.now();Ha.tasks.forEach(t=>{t.c(e)||(Ha.tasks.delete(t),t.f())}),Ha.tasks.size!==0&&Ha.tick(Ua)}function Wa(e){let t;return Ha.tasks.size===0&&Ha.tick(Ua),{promise:new Promise(n=>{Ha.tasks.add(t={c:e,f:n})}),abort(){Ha.tasks.delete(t)}}}function Ga(e,t){Tt(()=>{e.dispatchEvent(new CustomEvent(t))})}function Ka(e){if(e===`float`)return`cssFloat`;if(e===`offset`)return`cssOffset`;if(e.startsWith(`--`))return e;let t=e.split(`-`);return t.length===1?t[0]:t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join(``)}function qa(e){let t={},n=e.split(`;`);for(let e of n){let[n,r]=e.split(`:`);if(!n||r===void 0)break;let i=Ka(n.trim());t[i]=r.trim()}return t}var Ja=e=>e;function Ya(e,t,n,r){var i,a=(e&1)!=0,o=(e&2)!=0,s=a&&o,c=(e&4)!=0,l=s?`both`:a?`in`:`out`,u,d=t.inert,f=t.style.overflow,p,m;function h(){return Tt(()=>u??(u=n()(t,r?.()??{},{direction:l})))}var g={is_global:c,in(){if(t.inert=d,!a){m?.abort(),m?.reset?.();return}o||p?.abort(),p=Xa(t,h(),m,1,()=>{Ga(t,`introstart`)},()=>{Ga(t,`introend`),p?.abort(),p=u=void 0,t.style.overflow=f})},out(e){if(!o){e?.(),u=void 0;return}t.inert=!0,m=Xa(t,h(),p,0,()=>{Ga(t,`outrostart`)},()=>{Ga(t,`outroend`),e?.()})},stop:()=>{p?.abort(),m?.abort()}},_=mi;if(((i=_.nodes).t??(i.t=[])).push(g),a&&pa){var v=c;if(!v){for(var y=_.parent;y&&y.f&65536;)for(;(y=y.parent)&&!(y.f&16););v=!y||(y.f&32768)!=0}v&&Wr(()=>{Ii(()=>g.in())})}}function Xa(e,t,n,r,i,a){var o=r===1;if(f(t)){var s,c=!1;return dt(()=>{c||(s=Xa(e,t({direction:o?`in`:`out`}),n,r,i,a))}),{abort:()=>{c=!0,s?.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(n?.deactivate(),!t?.duration&&!t?.delay)return i(),a(),{abort:p,deactivate:p,reset:p,t:()=>r};let{delay:l=0,css:u,tick:d,easing:m=Ja}=t;var h=[];if(o&&n===void 0&&(d&&d(0,1),u)){var g=qa(u(0,1));h.push(g,g)}var _=()=>1-r,v=e.animate(h,{duration:l,fill:`forwards`});return v.onfinish=()=>{v.cancel(),i();var o=n?.t()??1-r;n?.abort();var s=r-o,c=t.duration*Math.abs(s),l=[];if(c>0){var f=!1;if(u)for(var p=Math.ceil(c/(1e3/60)),h=0;h<=p;h+=1){var g=o+s*m(h/p),y=qa(u(g,1-g));l.push(y),f||(f=y.overflow===`hidden`)}f&&(e.style.overflow=`hidden`),_=()=>{var e=v.currentTime;return o+s*m(e/c)},d&&Wa(()=>{if(v.playState!==`running`)return!1;var e=_();return d(e,1-e),!0})}v=e.animate(l,{duration:c,fill:`forwards`}),v.onfinish=()=>{_=()=>r,d?.(r,1-r),a()}},{abort:()=>{v&&(v.cancel(),v.effect=null,v.onfinish=p)},deactivate:()=>{a=p},reset:()=>{r===0&&d?.(1,0)},t:()=>_()}}function Za(e,t,n,r,i,a){let o=Ve;Ve&&Ge();var s=null;Ve&&Ue.nodeType===1&&(s=Ue,Ge());var c=Ve?Ue:e,l=new Da(c,!1);qr(()=>{let e=t()||null;var a=i?i():n||e===`svg`?Fe:void 0;if(e===null){l.ensure(null,null),ma(!0);return}return l.ensure(e,t=>{if(e){if(s=Ve?s:Mr(e,a),ca(s,s),r){var n=null;Ve&&Yi(e)&&s.append(n=document.createComment(``));var i=Ve?Or(s):s.appendChild(Dr());Ve&&(i===null?He(!1):We(i)),r(s,i),n?.remove()}mi.nodes.end=s,t.before(s)}Ve&&We(t)}),ma(!0),()=>{e&&ma(!1)}},ie),Rr(()=>{ma(!0)}),o&&(He(!0),We(c))}function Qa(e,t,n){Wr(()=>{var r=Ii(()=>t(e,n?.())||{});if(n&&r?.update){var i=!1,a={};Kr(()=>{var e=n();Li(e),i&&Xe(a,e)&&(a=e,r.update(e))}),i=!0}if(r?.destroy)return()=>r.destroy()})}function $a(e,t){var n=void 0,r;Jr(()=>{n!==(n=t())&&(r&&($r(r),r=null),n&&(r=Yr(()=>{Wr(()=>n(e))})))})}function eo(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=eo(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function to(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=eo(e))&&(r&&(r+=` `),r+=t);return r}function K(e){return typeof e==`object`?to(e):e??``}var no=[...`
|
|
2
|
-
\r\f\xA0\v`];function ro(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||no.includes(r[o-1]))&&(s===r.length||no.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function io(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function ao(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function oo(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(ao)),i&&c.push(...Object.keys(i).map(ao));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=ao(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=io(r)),i&&(n+=io(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function q(e,t,n,r,i,a){var o=e[he];if(Ve||o!==n||o===void 0){var s=ro(n,r,a);(!Ve||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[he]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function so(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function co(e,t,n,r){var i=e[ge];if(Ve||i!==t){var a=oo(t,r);(!Ve||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[ge]=t}else r&&(Array.isArray(r)?(so(e,n?.[0],r[0]),so(e,n?.[1],r[1],`important`)):so(e,n,r));return r}function lo(e,n,r=!1){if(e.multiple){if(n==null)return;if(!t(n))return ze();for(var i of e.options)i.selected=n.includes(po(i));return}for(i of e.options)if(xr(po(i),n)){i.selected=!0;return}(!r||n!==void 0)&&(e.selectedIndex=-1)}function uo(e){var t=new MutationObserver(()=>{`__value`in e&&lo(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),Rr(()=>{t.disconnect()})}function fo(e,t,n=t){var r=new WeakSet,i=!0;Et(e,`change`,t=>{var i=t?`[selected]`:`:checked`,a;if(e.multiple)a=[].map.call(e.querySelectorAll(i),po);else{var o=e.querySelector(i)??e.querySelector(`option:not([disabled])`);a=o&&po(o)}n(a),e.__value=a,xn!==null&&r.add(xn)}),Wr(()=>{var a=t();if(e===document.activeElement){var o=xn;if(r.has(o))return}if(lo(e,a,i),i&&a===void 0){var s=e.querySelector(`:checked`);s!==null&&(a=po(s),n(a))}e.__value=a,i=!1}),uo(e)}function po(e){return`__value`in e?e.__value:e.value}var mo=Symbol(`class`),ho=Symbol(`style`),go=Symbol(`is custom element`),_o=Symbol(`is html`),vo=be?`link`:`LINK`,yo=be?`input`:`INPUT`,bo=be?`option`:`OPTION`,xo=be?`select`:`SELECT`,So=be?`progress`:`PROGRESS`;function Co(e){if(Ve){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;J(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;J(e,`checked`,null),e.checked=r}}};e[ve]=n,dt(n),wt()}}function wo(e,t){var n=ko(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==So)||(e.value=t??``)}function To(e,t){var n=ko(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function Eo(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function J(e,t,n,r){var i=ko(e);Ve&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===vo)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[pe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&jo(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Do(e,t,n,r,i=!1,a=!1){if(Ve&&i&&e.nodeName===yo){var o=e;(o.type===`checkbox`?`defaultChecked`:`defaultValue`)in n||Co(o)}var s=ko(e),c=s[go],l=!s[_o];let u=Ve&&c;u&&He(!1);var d=t||{},f=e.nodeName===bo;for(var p in t)p in n||(n[p]=null);n.class?n.class=K(n.class):(r||n[mo])&&(n.class=null),n[ho]&&(n.style??(n.style=null));var m=jo(e);if(e.nodeName===yo&&`type`in n&&(`value`in n||`__value`in n)){var h=n.type;(h!==d.type||h===void 0&&e.hasAttribute(`type`))&&(d.type=h,J(e,`type`,h,a))}for(let i in n){let o=n[i];if(f&&i===`value`&&o==null){e.value=e.__value=``,d[i]=o;continue}if(i===`class`){q(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,o,r,t?.[mo],n[mo]),d[i]=o,d[mo]=n[mo];continue}if(i===`style`){co(e,o,t?.[ho],n[ho]),d[i]=o,d[ho]=n[ho];continue}var g=d[i];if(!(o===g&&!(o===void 0&&e.hasAttribute(i)))){d[i]=o;var _=i[0]+i[1];if(_!==`$$`)if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var v=Hi(r);if(Bi(r)&&(r=r.slice(0,-7),t.capture=!0),!v&&g){if(o!=null)continue;e.removeEventListener(r,d[n],t),d[n]=null}if(v)B(r,e,o),na([r]);else if(o!=null){function y(e){d[i].call(this,e)}d[n]=$i(r,e,y,t)}}else if(i===`style`)J(e,i,o);else if(i===`autofocus`)St(e,!!o);else if(!c&&(i===`__value`||i===`value`&&o!=null))e.value=e.__value=o;else if(i===`selected`&&f)Eo(e,o);else{var b=i;l||(b=Gi(b));var x=b===`defaultValue`||b===`defaultChecked`;if(o==null&&!c&&!x)if(s[i]=null,b===`value`||b===`checked`){let n=e,r=t===void 0;if(b===`value`){let e=n.defaultValue;n.removeAttribute(b),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(b),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i);else x||m.includes(b)&&(c||typeof o!=`string`)?(e[b]=o,b in s&&(s[b]=Pe)):typeof o!=`function`&&J(e,b,o,a)}}}return u&&He(!0),d}function Oo(e,t,n=[],r=[],i=[],a,o=!1,s=!1){on(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===xo,l=!1;if(Jr(()=>{var u=t(...n.map(z)),d=Do(e,r,u,a,o,s);l&&c&&`value`in u&&lo(e,u.value);for(let e of Object.getOwnPropertySymbols(i))u[e]||$r(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var f=u[t];t.description===`@attach`&&(!r||f!==r[t])&&(i[t]&&$r(i[t]),i[t]=Yr(()=>$a(e,()=>f))),d[t]=f}r=d}),c){var u=e;Wr(()=>{lo(u,r.value,!0),uo(u)})}l=!0})}function ko(e){return e[me]??(e[me]={[go]:e.nodeName.includes(`-`),[_o]:e.namespaceURI===`http://www.w3.org/1999/xhtml`})}var Ao=new Map;function jo(e){var t=e.getAttribute(`is`)||e.nodeName,n=Ao.get(t);if(n)return n;Ao.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=s(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.push(o);i=u(i)}return n}function Mo(e,t,n=t){var r=new WeakSet;Et(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=No(e)?Po(a):a,n(a),xn!==null&&r.add(xn),await Ni(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(Ve&&e.defaultValue!==e.value||Ii(t)==null&&e.value)&&(n(No(e)?Po(e.value):e.value),xn!==null&&r.add(xn)),Kr(()=>{var n=t();if(e===document.activeElement){var i=xn;if(r.has(i))return}No(e)&&n===Po(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}function No(e){var t=e.type;return t===`number`||t===`range`}function Po(e){return e===``?null:+e}var Fo,Io=new WeakMap,Lo=new WeakMap,Ro=new WeakMap,zo=new WeakSet,Bo=class{constructor(e){kt(this,zo),O(this,Io,new WeakMap),O(this,Lo,void 0),O(this,Ro,void 0),A(Ro,this,e)}observe(e,t){var n=j(Io,this).get(e)||new Set;return n.add(t),j(Io,this).set(e,n),k(zo,this,Vo).call(this).observe(e,j(Ro,this)),()=>{var n=j(Io,this).get(e);n.delete(t),n.size===0&&(j(Io,this).delete(e),j(Lo,this).unobserve(e))}}};Fo=Bo;function Vo(){return j(Lo,this)??A(Lo,this,new ResizeObserver(e=>{for(var t of e){Fo.entries.set(t.target,t);for(var n of j(Io,this).get(t.target)||[])n(t)}}))}x(Bo,`entries`,new WeakMap);function Ho(e,t){return e===t||e?.[de]===t}function Uo(e={},t,n,r){var i=Qe.r,a=mi;return Wr(()=>{var o,s;return Kr(()=>{o=s,s=r?.()||[],Ii(()=>{Ho(n(...s),e)||(t(e,...s),o&&Ho(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Ho(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var Wo={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return!e.exclude.has(t)&&t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function Y(e,t,n){return new Proxy({props:e,exclude:t},Wo)}var Go={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(f(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];f(i)&&(i=i());let a=o(i,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(f(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=o(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===de||t===fe)return!1;for(let n of e.props)if(f(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(f(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function X(...e){return new Proxy({props:e},Go)}function Z(e,t,n,r){var i=!0,a=(n&8)!=0,s=(n&16)!=0,c=r,l=!0,u=void 0,d=()=>s&&i?(u??(u=un(r)),z(u)):(l&&(l=!1,c=s?Ii(r):r),c);let f;if(a){var p=de in e||fe in e;f=o(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=xt(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&Oe(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?un:pn)(()=>(v=!1,g()));a&&z(y);var b=mi;return(function(e,t){if(arguments.length>0){let n=t?z(y):i&&a?yr(e):e;return P(y,n),v=!0,c!==void 0&&(c=n),e}return li&&v||b.f&16384?y.v:z(y)})}function Ko(e){Qe===null&&xe(`onMount`),zr(()=>{let t=Ii(e);if(typeof t==`function`)return t})}if(typeof window<`u`){var qo,Jo;((qo=(Jo=window).__svelte??(Jo.__svelte={})).v??(qo.v=new Set)).add(`5`)}function Yo(e){return{...e,endTime:e.endTime??(e.startTime??0)+(e.duration??0)}}function Xo(e){let t=Array.isArray(e.spans)?e.spans.map(Yo):[];return{...Yo(e),rootSpan:e.rootSpan?Yo(e.rootSpan):t[0],spans:t}}var Zo=e=>e.map(Xo),Qo=class{constructor(e){x(this,`url`,void 0),x(this,`ws`,null),x(this,`reconnectTimer`,null),x(this,`messageHandlers`,new Set),x(this,`statusHandlers`,new Set),x(this,`reconnectAttempts`,0),x(this,`closed`,!1),x(this,`reconnectDelay`,1e3),x(this,`maxReconnectDelay`,15e3),this.url=e}connect(){this.closed=!1;try{this.ws=new WebSocket(this.url),this.ws.addEventListener(`open`,()=>{this.reconnectAttempts=0,this.emitStatus(`connected`)}),this.ws.addEventListener(`message`,e=>{try{let t=JSON.parse(e.data),n=Array.isArray(t?.traces)?{...t,traces:Zo(t.traces)}:t;for(let e of this.messageHandlers)e(n)}catch{}}),this.ws.addEventListener(`close`,()=>{this.emitStatus(`disconnected`),this.scheduleReconnect()})}catch{this.emitStatus(`disconnected`),this.scheduleReconnect()}}emitStatus(e){if(!this.closed)for(let t of this.statusHandlers)t(e)}scheduleReconnect(){if(this.closed||this.reconnectTimer)return;this.reconnectAttempts++;let e=Math.min(this.reconnectDelay*2**(this.reconnectAttempts-1),this.maxReconnectDelay);this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},e)}onMessage(e){return this.messageHandlers.add(e),()=>this.messageHandlers.delete(e)}onStatusChange(e){return this.statusHandlers.add(e),()=>this.statusHandlers.delete(e)}disconnect(){this.closed=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(),this.ws=null),this.messageHandlers.clear(),this.statusHandlers.clear()}isConnected(){return this.ws?.readyState===WebSocket.OPEN}};function $o(e){try{let t=new URL(e);return t.protocol===`ws:`?`http://${t.host}`:t.protocol===`wss:`?`https://${t.host}`:null}catch{return null}}function es(e,t=fetch){return async(n,r)=>{if(n.kind!==`app`)return null;let i=new URL(`/source`,e);i.searchParams.set(`file`,n.file),i.searchParams.set(`line`,String(n.line)),i.searchParams.set(`context`,String(r));try{let e=await t(i.toString());return e.ok?await e.json():null}catch{return null}}}var ts=null;function ns(e){ts=e===null?null:es(e)}var rs=(e,t)=>ts===null?Promise.resolve(null):ts(e,t),is=new WeakMap,as=class{constructor(e){O(this,is,N(void 0)),P(j(is,this),e,!0)}get value(){return z(j(is,this))}set value(e){P(j(is,this),e,!0)}},os=new WeakMap,ss=new WeakMap,cs=class{constructor(e){O(this,os,void 0),O(this,ss,M(()=>j(os,this).call(this))),A(os,this,e)}get value(){return z(j(ss,this))}};function ls(e){return new as(e)}function us(e){return new cs(e)}function ds(e){return Hr(()=>{zr(e)})}function fs(e,...t){for(let n of t){let t=e?.[n];if(typeof t==`string`&&t.length>0)return t}}function ps(e){return typeof e==`string`?e:void 0}function ms(e){if(typeof e==`number`)return e;if(typeof e==`string`&&e!==``){let t=Number(e);return Number.isFinite(t)?t:void 0}}function hs(e){if(typeof e==`boolean`)return e;if(e===`true`)return!0;if(e===`false`)return!1}function gs(e){if(Array.isArray(e)){let t=e.filter(e=>typeof e==`string`);return t.length===e.length?t:void 0}return typeof e==`string`?[e]:void 0}function _s(e,t){let n=e.attributes||{},r=[n[`service.name`],n[`peer.service`],n[`http.host`],n[`db.system`],n[`messaging.system`],n[`rpc.service`],t];for(let e of r){let t=ps(e)?.trim();if(t)return t}return`unknown`}function vs(e,t){return ps(e[`db.system`])===void 0?ps(e[`cache.system`])===void 0?ps(e[`messaging.system`])===void 0?ps(e[`peer.service`])!==void 0||ps(e[`net.peer.name`])!==void 0||ps(e[`http.host`])!==void 0?t===e[`service.name`]?`service`:`external`:ps(e[`service.name`])===void 0?`unknown`:`service`:`messaging`:`cache`:`database`}function ys(e){if(e.resourceName)return e.resourceName;let t=e.resource||{},n=[t[`service.name`],t[`service.namespace`],t[`host.name`],t[`container.name`]];for(let e of n){let t=ps(e)?.trim();if(t)return t}return`unknown`}function bs(e,t){if(e===0&&t===0)return`unknown`;let n=e===0?1:t/e;return n>=.2?`unhealthy`:n>=.05?`degraded`:`healthy`}function xs(e){let t=new Map,n=(e,n=`unknown`)=>{let r=t.get(e);if(r)return r.type===`unknown`&&n!==`unknown`&&(r.type=n),r;let i={name:e,type:n,health:`unknown`,requestCount:0,errorCount:0,traceCount:0,logCount:0};return t.set(e,i),i};for(let t of e.traces){let e=new Set;for(let r of t.spans){let i=_s(r,t.service),a=n(i,vs(r.attributes,i));a.requestCount+=1,a.lastSeen=Math.max(a.lastSeen??0,r.endTime),r.status.code===`ERROR`&&(a.errorCount+=1),e.has(i)||(a.traceCount+=1,e.add(i))}}for(let t of e.logs){let e=n(ys(t),`service`);e.logCount+=1,e.lastSeen=Math.max(e.lastSeen??0,t.timestamp)}for(let t of e.errors){if(!t.service)continue;let e=n(t.service,`service`);e.errorCount+=t.count,e.lastSeen=Math.max(e.lastSeen??0,t.lastSeen)}return[...t.values()].map(e=>({...e,health:bs(e.requestCount,e.errorCount)})).sort((e,t)=>{let n=(t.lastSeen??0)-(e.lastSeen??0);return n===0?e.name.localeCompare(t.name):n})}var Ss=[{id:`all`,label:`All time`,durationMs:null},{id:`5m`,label:`Last 5m`,durationMs:5*6e4},{id:`15m`,label:`Last 15m`,durationMs:15*6e4},{id:`30m`,label:`Last 30m`,durationMs:30*6e4},{id:`1h`,label:`Last 1h`,durationMs:60*6e4},{id:`3h`,label:`Last 3h`,durationMs:180*6e4},{id:`6h`,label:`Last 6h`,durationMs:360*6e4},{id:`24h`,label:`Last 24h`,durationMs:1440*6e4},{id:`7d`,label:`Last 7d`,durationMs:10080*6e4}],Cs={type:`preset`,preset:`all`},ws=new Map(Ss.map(e=>[e.id,e]));function Ts(e,t){let n=ws.get(e);return!n||n.durationMs===null?{start:null,end:null}:{start:t-n.durationMs,end:t}}function Es(e,t){return e.type===`preset`?Ts(e.preset,t):{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function Ds(e){return e.start===null||e.end===null}function Os(e){return e.type===`preset`?ws.get(e.preset)?.label??`All time`:`${ks(e.start)} → ${ks(e.end)}`}function ks(e){let t=new Date(e),n=new Date,r=t.toDateString()===n.toDateString(),i=t.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`});return r?i:`${t.toLocaleDateString(void 0,{month:`short`,day:`numeric`})} ${i}`}function As(e){return e.type===`preset`?e.preset===Cs.preset?null:e.preset:`custom:${e.start}:${e.end}`}function js(e){if(!e)return Cs;if(e.startsWith(`custom:`)){let[,t,n]=e.split(`:`),r=Number(t),i=Number(n);return!Number.isFinite(r)||!Number.isFinite(i)?Cs:{type:`custom`,start:r,end:i}}return ws.has(e)?{type:`preset`,preset:e}:Cs}function Ms(e){if(!Ds(e))return{start:e.start,end:e.end}}var Ns=[`gen_ai.system`,`gen_ai.provider.name`,`gen_ai.operation.name`,`ai.model.provider`];function Ps(e){let t=e.attributes??{};for(let e of Ns)if(t[e]!=null)return!0;return!1}function Fs(e){let t=e.toLowerCase();return t===`az.ai.openai`||t===`azure_openai`?`openai`:t===`vertex_ai`||t===`gcp.vertex_ai`||t===`gcp.gemini`?`google`:t}function Is(e){let t=Object.keys(e).sort((e,t)=>{let n=e.split(`/`)[1]??``;return(t.split(`/`)[1]??``).length-n.length});return(n,r)=>{let i=Fs(n),a=r.toLowerCase();for(let n of t){let[t,r]=n.split(`/`);if(t===i&&a.startsWith(r))return e[n]}}}var Ls=Is({"openai/gpt-4o":{inputPerMTok:2.5,outputPerMTok:10},"openai/gpt-4o-mini":{inputPerMTok:.15,outputPerMTok:.6},"openai/gpt-4-turbo":{inputPerMTok:10,outputPerMTok:30},"openai/gpt-3.5-turbo":{inputPerMTok:.5,outputPerMTok:1.5},"anthropic/claude-opus-4":{inputPerMTok:15,outputPerMTok:75},"anthropic/claude-sonnet-4":{inputPerMTok:3,outputPerMTok:15},"anthropic/claude-3-5-sonnet":{inputPerMTok:3,outputPerMTok:15},"anthropic/claude-3-5-haiku":{inputPerMTok:.8,outputPerMTok:4},"anthropic/claude-3-opus":{inputPerMTok:15,outputPerMTok:75},"anthropic/claude-3-haiku":{inputPerMTok:.25,outputPerMTok:1.25},"google/gemini-2.5-flash":{inputPerMTok:.3,outputPerMTok:2.5},"google/gemini-2.0-flash":{inputPerMTok:.1,outputPerMTok:.4},"google/gemini-1.5-pro":{inputPerMTok:1.25,outputPerMTok:5},"google/gemini-1.5-flash":{inputPerMTok:.075,outputPerMTok:.3},"mistral/mistral-large":{inputPerMTok:2,outputPerMTok:6},"mistral/mistral-small":{inputPerMTok:.2,outputPerMTok:.6},"groq/llama-3.1-70b":{inputPerMTok:.59,outputPerMTok:.79},"deepseek/deepseek-chat":{inputPerMTok:.27,outputPerMTok:1.1}});function Rs(e){let t=Ls(e.provider,e.model);if(!t)return{currency:`USD`,input:0,output:0,cacheRead:0,cacheWrite:0,total:0,source:`unknown`};let n=t.cacheReadPerMTok??t.inputPerMTok*.1,r=t.cacheWritePerMTok??t.inputPerMTok*1.25,i=(e.cacheReadInputTokens??0)/1e6*n,a=(e.cacheCreationInputTokens??0)/1e6*r,o=Math.max(0,(e.inputTokens??0)-(e.cacheReadInputTokens??0)-(e.cacheCreationInputTokens??0))/1e6*t.inputPerMTok,s=(e.outputTokens??0)/1e6*t.outputPerMTok;return{currency:`USD`,input:o,output:s,cacheRead:i,cacheWrite:a,total:o+s+i+a,source:`table`}}function zs(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function Bs(e,t){let n=e[t];return typeof n==`string`?n:void 0}function Vs(e,t){let n=e[t];return typeof n==`number`?n:void 0}function Hs(e,t){return zs(e[t])}function Us(e,t){let n=e[t];return Array.isArray(n)?n:[]}function Ws(e,t){return Array.isArray(e[t])}function Gs(e,t,n,r){return r.filter(t=>n(e,t)===void 0).map(e=>`${t}: Missing or invalid ${e}`)}function Ks(e){if(e!=null){if(typeof e==`object`)return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return}}}function qs(e){if(Array.isArray(e.parts))return e.parts.map(e=>{let t=e.type??`text`;return t===`text`?{kind:`text`,text:String(e.content??``)}:t===`image`?{kind:`image`,mediaType:`image/*`,dataRef:String(e.content??``)}:t===`audio`?{kind:`audio`,mediaType:`audio/*`,dataRef:String(e.content??``)}:{kind:`json`,value:e.content}});if(Array.isArray(e.content))return e.content.map(e=>e.type===`text`||e.text!==void 0?{kind:`text`,text:String(e.text??``)}:e.type===`image`?{kind:`image`,mediaType:e.mimeType??`image/*`,dataRef:String(e.image??e.data??``)}:e.type===`audio`?{kind:`audio`,mediaType:e.mimeType??`audio/*`,dataRef:String(e.data??``)}:{kind:`json`,value:e});let t=ps(e.content);return t===void 0?e.content==null?[]:[{kind:`json`,value:e.content}]:[{kind:`text`,text:t}]}function Js(e){let t=zs(e);return t&&`value`in t?t.value:e}function Ys(e){return e.type===`tool-call`?{kind:`call`,call:{id:e.toolCallId,name:e.toolName??``,arguments:Ks(e.input)??e.input??{}}}:e.type===`tool-result`?{kind:`result`,result:{id:e.toolCallId,value:Js(e.output)}}:e.type===`text`||e.text!==void 0?{kind:`text`,text:String(e.text??``)}:null}function Xs(e){return e.type===`tool_call`?{kind:`call`,call:{id:e.id,name:e.name??``,arguments:Ks(e.arguments)??e.arguments??{}}}:e.type===`tool_call_response`?{kind:`result`,result:{id:e.id,value:Js(e.response)}}:e.type===`text`||e.type==null?{kind:`text`,text:String(e.content??``)}:null}function Zs(e,t,n){let r=[],i=[],a=[];for(let e of t)e.kind===`call`?r.push(e.call):e.kind===`result`?a.push(e.result):i.push({kind:`text`,text:e.text});if(a.length>1){let t={role:e,parts:[]};return t._toolResults=a,t}let o={role:e,parts:i};return r.length>0&&(o.toolCalls=r),a.length===1&&(o.toolCallId=a[0].id,o.parts=[{kind:`json`,value:a[0].value}]),n&&(o.finishReason=n),o}function Qs(e){let t=e.role??`user`;if(Array.isArray(e.content)){let n=e.content;if(n.some(e=>e.type===`tool-call`||e.type===`tool-result`))return Zs(t,n.map(Ys).filter(e=>e!==null),e.finish_reason)}if(Array.isArray(e.parts)){let n=e.parts;if(n.some(e=>e.type===`tool_call`||e.type===`tool_call_response`))return Zs(t,n.map(Xs).filter(e=>e!==null),e.finish_reason)}let n={role:t,parts:qs(e)};return Array.isArray(e.tool_calls)&&e.tool_calls.length>0&&(n.toolCalls=e.tool_calls.map(e=>({id:e.id,name:e.function?.name??``,arguments:Ks(e.function?.arguments)??e.function?.arguments??{},type:e.type}))),e.tool_call_id&&(n.toolCallId=e.tool_call_id),e.finish_reason&&(n.finishReason=e.finish_reason),n}function $s(e,t){let n=Ks(e[t]);if(Array.isArray(n))return n.map(Qs)}function ec(e){if(!e||e.length===0)return[];let t=[];for(let n of e){let e=n.attributes??{};if(n.name===`gen_ai.choice`){let n=e.message,r=Ks(e.message)??n,i=ps(e.finish_reason);if(r){let e=Qs(r);i&&(e.finishReason=i),t.push(e)}continue}let r=n.name.match(/^gen_ai\.(system|user|assistant|tool)\.message$/);if(!r)continue;let i=r[1],a=e.content,o=ps(a),s=o===void 0?a:Ks(o)??o;t.push(Qs({role:i,content:s,tool_calls:Ks(e.tool_calls),tool_call_id:ps(e.id)??ps(e.tool_call_id)}))}return t}function tc(e){let t=Ks(e[`gen_ai.tool.definitions`]??e[`gen_ai.orchestrator.agent.definitions`]);if(Array.isArray(t))return t.filter(e=>ps(e.name)!==void 0).map(e=>({name:e.name,description:e.description,type:e.type,schema:e.schema??e.parameters}))}function nc(e){return{inputTokens:ms(e[`gen_ai.usage.input_tokens`])??ms(e[`gen_ai.usage.prompt_tokens`])??ms(e[`llm.usage.prompt_tokens`])??ms(e[`ai.usage.inputTokens`]),outputTokens:ms(e[`gen_ai.usage.output_tokens`])??ms(e[`gen_ai.usage.completion_tokens`])??ms(e[`llm.usage.completion_tokens`])??ms(e[`ai.usage.outputTokens`]),reasoningOutputTokens:ms(e[`gen_ai.usage.reasoning.output_tokens`]),cacheReadInputTokens:ms(e[`gen_ai.usage.cache_read.input_tokens`]),cacheCreationInputTokens:ms(e[`gen_ai.usage.cache_creation.input_tokens`])}}function rc(e){let t=ms(e[`gen_ai.response.time_to_first_chunk`]),n=ms(e[`gen_ai.response.time_to_finish`]),r=ms(e[`gen_ai.response.output_tokens_per_second`]),i=ms(e[`gen_ai.response.time_per_output_chunk`]);if(!(t===void 0&&n===void 0&&r===void 0&&i===void 0))return{timeToFirstChunkS:t,timeToFinishS:n,outputTokensPerSecond:r,timePerOutputChunkS:i}}function ic(e){let t=ms(e[`gen_ai.session.cost.usd`]),n=ms(e[`gen_ai.session.input_tokens`]),r=ms(e[`gen_ai.session.output_tokens`]),i=ms(e[`gen_ai.session.step.count`]),a=ms(e[`gen_ai.session.tool_call.count`]),o=ms(e[`gen_ai.session.error.count`]);if(!(t===void 0&&n===void 0&&r===void 0&&i===void 0&&a===void 0&&o===void 0))return{costUsd:t,inputTokens:n,outputTokens:r,stepCount:i,toolCallCount:a,errorCount:o}}function ac(e,t){let n=ps(e[`gen_ai.guard.rule`]);if(n)return{rule:n,action:ps(e[`gen_ai.guard.action`])??t,message:ps(e[`gen_ai.guard.message`]),observed:ms(e[`gen_ai.guard.observed`]),limit:ms(e[`gen_ai.guard.limit`])}}function oc(e,t){let n=hs(e[`gen_ai.guard.stopped`]),r=[],i=ac(e),a=e=>{e&&(!i||e.action===`stop`)&&(i=e)};for(let e of t??[]){let t=e.attributes??{};if(e.name===`gen_ai.guard.stop`)a(ac(t,`stop`));else if(e.name===`gen_ai.guard.warning`)a(ac(t,`warn`));else if(e.name===`gen_ai.client.warnings`){let e=Ks(t[`gen_ai.warnings`]);Array.isArray(e)&&r.push(...e)}}return(n!==void 0||i)&&(i={...i,stopped:n??i?.action===`stop`}),{guard:i,warnings:r.length>0?r:void 0}}function sc(e){let t=e.toLowerCase();return t===`az.ai.openai`||t===`azure_openai`?`openai`:t===`gcp.vertex_ai`||t===`vertex_ai`||t===`gcp.gemini`||t===`google-gla`||t===`google_genai`||t===`gemini`?`google`:t}var cc=new Set(`gen_ai.system,gen_ai.provider.name,gen_ai.operation.name,gen_ai.request.model,gen_ai.response.model,gen_ai.response.id,gen_ai.response.finish_reasons,gen_ai.request.temperature,gen_ai.request.top_p,gen_ai.request.top_k,gen_ai.request.max_tokens,gen_ai.request.stop_sequences,gen_ai.request.seed,gen_ai.request.frequency_penalty,gen_ai.request.presence_penalty,gen_ai.request.choice.count,gen_ai.usage.input_tokens,gen_ai.usage.output_tokens,gen_ai.usage.prompt_tokens,gen_ai.usage.completion_tokens,gen_ai.usage.reasoning.output_tokens,gen_ai.usage.cache_read.input_tokens,gen_ai.usage.cache_creation.input_tokens,gen_ai.usage.cost.usd,gen_ai.response.time_to_first_chunk,gen_ai.response.time_to_finish,gen_ai.response.output_tokens_per_second,gen_ai.response.time_per_output_chunk,gen_ai.guard.stopped,gen_ai.guard.rule,gen_ai.guard.action,gen_ai.guard.message,gen_ai.guard.observed,gen_ai.guard.limit,gen_ai.session.cost.usd,gen_ai.session.input_tokens,gen_ai.session.output_tokens,gen_ai.session.step.count,gen_ai.session.tool_call.count,gen_ai.session.error.count,gen_ai.input.messages,gen_ai.output.messages,gen_ai.input.messages.ref,gen_ai.output.messages.ref,gen_ai.system_instructions,gen_ai.tool.definitions,gen_ai.orchestrator.agent.definitions,gen_ai.agent.id,gen_ai.agent.name,gen_ai.agent.description,gen_ai.tool.name,gen_ai.tool.call.id,gen_ai.handoff.from_agent,gen_ai.handoff.to_agent,gen_ai.guardrail.name,gen_ai.guardrail.triggered,gen_ai.conversation.id,gen_ai.evaluation.name,gen_ai.evaluation.score.value,gen_ai.evaluation.score.label,gen_ai.evaluation.explanation,gen_ai.audio.input.format,gen_ai.audio.output.format,gen_ai.speech.voice,gen_ai.speech.input_text,gen_ai.transcription.text,gen_ai.embeddings.dimension.count,gen_ai.openai.request.service_tier,gen_ai.openai.response.service_tier,gen_ai.openai.response.system_fingerprint,gen_ai.openai.request.response_format,openai.request.service_tier,openai.response.service_tier,openai.response.system_fingerprint,openai.request.response_format`.split(`,`));function lc(e){let t=e.attributes??{},n=sc(ps(t[`gen_ai.provider.name`])??ps(t[`gen_ai.system`])??ps(t[`ai.model.provider`])??`unknown`),r=ps(t[`gen_ai.operation.name`])??`chat`,i=ps(t[`gen_ai.request.model`])??ps(t[`llm.request.model`])??ps(t.model_name)??ps(t[`ai.model.id`])??`unknown`,a=ps(t[`gen_ai.response.model`])??ps(t[`llm.response.model`])??ps(t[`ai.response.model`]),o=$s(t,`gen_ai.input.messages`)??[],s=$s(t,`gen_ai.output.messages`)??[],c=[],l=Ks(t[`gen_ai.system_instructions`]);if(Array.isArray(l)&&l.length>0){let e=zs(l[0]);c=e&&`role`in e?l.map(e=>Qs(e)):[{role:`system`,parts:l.map(e=>e.type===`text`||e.content!==void 0?{kind:`text`,text:String(e.content??``)}:{kind:`json`,value:e})}]}let u=o.length||s.length||c.length?[...c,...o,...s]:ec(e.events),d=ps(t[`gen_ai.input.messages.ref`]),f=ps(t[`gen_ai.output.messages.ref`]),p=u.some(e=>e.role===`system`||e.role===`user`),m=u.some(e=>e.role===`assistant`);if(d&&!p&&u.push({role:`user`,parts:[{kind:`ref`,ref:d,direction:`input`}]}),f&&!m&&u.push({role:`assistant`,parts:[{kind:`ref`,ref:f,direction:`output`}]}),u.length===0){let e=Ks(t[`ai.prompt.messages`]);if(Array.isArray(e))u.push(...e.map(Qs));else{let e=Ks(t[`ai.prompt`]);e&&(Array.isArray(e.messages)?u.push(...e.messages.map(Qs)):(e.system&&u.push({role:`system`,parts:[{kind:`text`,text:e.system}]}),e.prompt&&u.push({role:`user`,parts:[{kind:`text`,text:e.prompt}]})))}let n=Ks(t[`ai.response.toolCalls`]),r=Array.isArray(n)?n.filter(e=>ps(e.toolName)!==void 0).map(e=>({id:e.toolCallId,name:e.toolName,arguments:Ks(e.input??e.args)??e.input??e.args??{}})):void 0,i=ps(t[`ai.response.text`]);if(i||r&&r.length>0){let e=gs(t[`gen_ai.response.finish_reasons`])?.[0]??ps(t[`ai.response.finishReason`]),n=Qs({role:`assistant`,content:i??``});e&&(n.finishReason=e),r&&r.length>0&&(n.toolCalls=r),u.push(n)}}if(u.length===0){let e=Ks(t[`pydantic_ai.all_messages`]);Array.isArray(e)&&u.push(...e.map(Qs))}if(u.length===0){let e=[];for(let n=0;n<32;n++){let r=ps(t[`gen_ai.prompt.${n}.role`])??ps(t[`llm.prompts.${n}.role`]),i=t[`gen_ai.prompt.${n}.content`]??t[`llm.prompts.${n}.content`];if(!r)break;e.push(Qs({role:r,content:i}))}for(let n=0;n<32;n++){let r=ps(t[`gen_ai.completion.${n}.role`])??ps(t[`llm.completions.${n}.role`]),i=t[`gen_ai.completion.${n}.content`]??t[`llm.completions.${n}.content`],a=ps(t[`gen_ai.completion.${n}.finish_reason`]);if(!r)break;let o=Qs({role:r,content:i});a&&(o.finishReason=a),e.push(o)}e.length>0&&(u=e)}u=u.flatMap(e=>{let t=e._toolResults;return t?t.map(e=>({role:`tool`,parts:[{kind:`json`,value:e.value}],toolCallId:e.id})):[e]});let h=[];for(let e of u)e.toolCalls&&h.push(...e.toolCalls);if(h.length>0){let e=new Map;for(let t of h)t.id&&e.set(t.id,t);for(let t of u){if(t.role!==`tool`||!t.toolCallId)continue;let n=e.get(t.toolCallId);if(!n||n.result!==void 0)continue;let r=t.parts.find(e=>e.kind===`text`),i=t.parts.find(e=>e.kind===`json`);r&&r.kind===`text`?n.result=Ks(r.text)??r.text:i&&i.kind===`json`&&(n.result=i.value)}}let g=nc(t),_=Rs({provider:n,model:a??i,inputTokens:g.inputTokens,outputTokens:g.outputTokens,cacheReadInputTokens:g.cacheReadInputTokens,cacheCreationInputTokens:g.cacheCreationInputTokens}),v=ms(t[`gen_ai.usage.cost.usd`]),y=v===void 0?_:{currency:`USD`,input:_?.input??0,output:_?.output??0,cacheRead:_?.cacheRead??0,cacheWrite:_?.cacheWrite??0,total:v,source:`reported`},b=rc(t),x=ic(t),{guard:S,warnings:C}=oc(t,e.events),w=gs(t[`gen_ai.response.finish_reasons`]),T=ps(t[`gen_ai.agent.name`]),ee=ps(t[`gen_ai.agent.id`]),te=ps(t[`gen_ai.agent.description`]),ne=ps(t[`gen_ai.tool.name`]),re=ps(t[`gen_ai.tool.call.id`]),ie=ps(t[`gen_ai.handoff.from_agent`]),ae=ps(t[`gen_ai.handoff.to_agent`]),oe=ps(t[`gen_ai.guardrail.name`]),se=hs(t[`gen_ai.guardrail.triggered`]),ce=ps(t[`gen_ai.evaluation.name`]),le=ms(t[`gen_ai.evaluation.score.value`]),E=ps(t[`gen_ai.evaluation.score.label`]),ue=ps(t[`gen_ai.evaluation.explanation`]),de=ps(t[`gen_ai.audio.input.format`]),fe=ps(t[`gen_ai.audio.output.format`]),pe=ps(t[`gen_ai.speech.voice`]),me=ps(t[`gen_ai.speech.input_text`]),he=ps(t[`gen_ai.transcription.text`]),ge=ms(t[`gen_ai.embeddings.dimension.count`]),_e=ps(t[`agent.consent.outcome`]),ve=ps(t[`policy.decision`]),ye=ps(t[`mcp.security.injection.verdict`]),be=ps(t[`agent.action.risk_class`]),xe=ps(t[`agent.input.provenance`]),Se=ms(t[`agent.plan.step_index`]),Ce=ps(t[`security.event`]),we=hs(t[`gen_ai.guard.stopped`]),Te=_e||ve||ye||be||xe||Se!==void 0||Ce||we!==void 0||S?.stopped?{..._e&&{consentOutcome:_e},...ve&&{policyDecision:ve},...ye&&{injectionVerdict:ye},...be&&{actionRiskClass:be},...xe&&{inputProvenance:xe},...Se!==void 0&&{planStepIndex:Se},...Ce&&{securityEvent:Ce},guardStopped:S?.stopped??we}:void 0,Ee={};for(let[e,n]of Object.entries(t))cc.has(e)||e.startsWith(`gen_ai.prompt.`)||e.startsWith(`gen_ai.completion.`)||e.startsWith(`llm.prompts.`)||e.startsWith(`llm.completions.`)||(Ee[e]=n);return{traceId:e.traceId,spanId:e.spanId,parentSpanId:e.parentSpanId,name:e.name,startMs:e.startTime,endMs:e.endTime,status:e.status?.code===`OK`?`ok`:e.status?.code===`ERROR`?`error`:`unset`,errorMessage:e.status?.message,provider:n,operation:r,requestModel:i,responseModel:a,params:{temperature:ms(t[`gen_ai.request.temperature`]),topP:ms(t[`gen_ai.request.top_p`]),topK:ms(t[`gen_ai.request.top_k`]),maxTokens:ms(t[`gen_ai.request.max_tokens`]),stopSequences:gs(t[`gen_ai.request.stop_sequences`]),seed:ms(t[`gen_ai.request.seed`]),frequencyPenalty:ms(t[`gen_ai.request.frequency_penalty`]),presencePenalty:ms(t[`gen_ai.request.presence_penalty`]),choiceCount:ms(t[`gen_ai.request.choice.count`])},messages:u,toolDefinitions:tc(t),toolCalls:h,usage:g,cost:y,streaming:b,guard:S,session:x,warnings:C,finishReasons:w,responseId:ps(t[`gen_ai.response.id`]),agent:ee||T||te?{id:ee,name:T,description:te}:void 0,tool:ne||re?{name:ne,callId:re}:void 0,handoff:ie||ae?{fromAgent:ie,toAgent:ae}:void 0,guardrail:oe||se!==void 0?{name:oe,triggered:se}:void 0,conversationId:ps(t[`gen_ai.conversation.id`]),agentSecurity:Te,evaluation:ce||le!==void 0||E||ue?{name:ce,scoreValue:le,scoreLabel:E,explanation:ue}:void 0,modality:de||fe||pe||me||he||ge?{audioInputFormat:de,audioOutputFormat:fe,speechVoice:pe,speechInputText:me,transcriptionText:he,embeddingDimensions:ge}:void 0,extras:{openaiServiceTier:ps(t[`gen_ai.openai.request.service_tier`])||ps(t[`gen_ai.openai.response.service_tier`])||ps(t[`openai.request.service_tier`])||ps(t[`openai.response.service_tier`])?{request:ps(t[`gen_ai.openai.request.service_tier`])??ps(t[`openai.request.service_tier`]),response:ps(t[`gen_ai.openai.response.service_tier`])??ps(t[`openai.response.service_tier`])}:void 0,openaiSystemFingerprint:ps(t[`gen_ai.openai.response.system_fingerprint`])??ps(t[`openai.response.system_fingerprint`]),openaiResponseFormat:ps(t[`gen_ai.openai.request.response_format`])??ps(t[`openai.request.response_format`]),raw:Ee}}}function uc(e){let t=new Map;for(let n of e){let e=n.attributes??{},r=e[`ai.toolCall.id`];if(typeof r!=`string`)continue;let i=e[`ai.toolCall.result`];if(i!=null)if(typeof i==`string`)try{t.set(r,JSON.parse(i))}catch{t.set(r,i)}else t.set(r,i)}return t}function dc(e,t){if(t.size!==0){for(let n of e.toolCalls){if(n.result!==void 0||!n.id)continue;let e=t.get(n.id);e!==void 0&&(n.result=e)}for(let n of e.messages)if(n.toolCalls)for(let e of n.toolCalls){if(e.result!==void 0||!e.id)continue;let n=t.get(e.id);n!==void 0&&(e.result=n)}}}function fc(e,...t){for(let n of t){let t=e[n];if(t==null||t instanceof Object)continue;let r=String(t);if(r.length>0)return r}}function pc(e,...t){for(let n of t){let t=e[n];if(t==null||t instanceof Object||t===!0||t===!1)continue;let r=Number(t);if(Number.isFinite(r)&&String(t).trim()!==``)return r}}function mc(e,...t){for(let n of t){let t=e[n];if(t===!0||t===`true`)return!0;if(t===!1||t===`false`)return!1}}var hc=[[`claude-opus-4`,15,75],[`claude-sonnet-4`,3,15],[`claude-haiku-4`,.8,4],[`claude-3-5-sonnet`,3,15],[`claude-3-5-haiku`,.8,4],[`claude-3-opus`,15,75],[`claude-3-haiku`,.25,1.25],[`opus`,15,75],[`sonnet`,3,15],[`haiku`,.8,4]];function gc(e,t,n){if(!e)return;let r=e.toLowerCase(),i=hc.find(([e])=>r.includes(e));if(!i)return;let[,a,o]=i;return(t??0)/1e6*a+(n??0)/1e6*o}function _c(...e){return Object.assign({},...e)}function vc(e){return{user:fc(e,`user.id`,`user.account_uuid`,`user.email`),organization:fc(e,`organization.id`),terminal:fc(e,`terminal.type`),appVersion:fc(e,`app.version`),model:fc(e,`model`)}}var yc=`mcp__`;function bc(e){if(!e.startsWith(yc))return{name:e,isMcp:!1};let t=e.slice(5),n=t.indexOf(`__`);if(n===-1)return{name:e,isMcp:!0,mcpServer:t||void 0};let r=t.slice(0,n),i=t.slice(n+2);return{name:e,isMcp:!0,mcpServer:r||void 0,mcpTool:i||void 0}}function xc(e){return e.startsWith(yc)}var Sc=[`file`,`shell`,`search`,`web`,`todo`,`subagent`,`skill`,`mcp`,`other`],Cc=new Map([[`read`,`file`],[`edit`,`file`],[`write`,`file`],[`multiedit`,`file`],[`notebookedit`,`file`],[`bash`,`shell`],[`bashoutput`,`shell`],[`killshell`,`shell`],[`killbash`,`shell`],[`grep`,`search`],[`glob`,`search`],[`ls`,`search`],[`webfetch`,`web`],[`websearch`,`web`],[`todowrite`,`todo`],[`task`,`subagent`],[`agent`,`subagent`],[`skill`,`skill`]]);function wc(e){return xc(e)?`mcp`:Cc.get(e.toLowerCase())??`other`}function Tc(e){return fc(e,`subagent_type`,`agent_type`,`subagent.type`)}function Ec(e){return fc(e,`skill`,`skill_name`,`skill.name`)}var Dc=new Map([[`user_prompt`,`user_prompt`],[`api_request`,`api_request`],[`api_error`,`api_error`],[`tool_result`,`tool_result`],[`tool_decision`,`tool_decision`],[`mcp_server_connection`,`mcp_connection`],[`plugin_loaded`,`plugin_loaded`],[`hook_execution_complete`,`hook_execution`]]),Oc=[...Dc.keys()];function kc(e,t){let n=wc(e),r={...bc(e),category:n};if(n===`subagent`){let e=Tc(t);e&&(r.subAgentType=e)}else if(n===`skill`){let e=Ec(t);e&&(r.skillName=e)}return r}var Ac=new Map([[`lines_of_code.count`,`lines_of_code`],[`commit.count`,`commit`],[`pull_request.count`,`pull_request`],[`active_time.total`,`active_time`]]);function jc(e){let{kind:t,prefix:n,scopeHint:r,serviceHint:i}=e,a=e=>e!==void 0&&e.includes(r),o=e=>{let t=fc(e,`service.name`);return t!==void 0&&t.includes(i)},s=e=>e.startsWith(n)?e.slice(n.length):e;return{kind:t,matchesMetric(e){return e.name.startsWith(n)||a(e.scope?.name)||o(e.resource)},matchesEvent(e){return e.eventName.startsWith(n)||a(e.scope?.name)||o(e.resource)},normalizeEvent(e){let n=_c(e.resource,e.attributes),r=s(e.eventName)||fc(n,`event.name`)||e.eventName,i=Dc.get(r)??`other`,a=fc(n,`session.id`);if(!a)return null;let o={id:`${a}:0`,sessionId:a,agent:t,type:i,rawEventName:r,timestamp:e.timestamp,model:fc(n,`model`),attributes:e.attributes};switch(i){case`api_request`:{o.inputTokens=pc(n,`input_tokens`),o.outputTokens=pc(n,`output_tokens`),o.cacheReadTokens=pc(n,`cache_read_tokens`),o.contextLineageId=fc(n,`query_source`),o.tokenSource=fc(n,`token_source`)===`estimated`?`estimated`:void 0,o.cacheCreationTokens=pc(n,`cache_creation_tokens`),o.durationMs=pc(n,`duration_ms`);let e=pc(n,`cost_usd`,`cost`);if(e===void 0){let e=gc(o.model,o.inputTokens,o.outputTokens);e!==void 0&&(o.costUsd=e,o.costSource=`estimated`)}else o.costUsd=e,o.costSource=`reported`;break}case`api_error`:o.errorMessage=fc(n,`error`,`error.message`,`message`),o.statusCode=pc(n,`status_code`,`http.status_code`),o.durationMs=pc(n,`duration_ms`);break;case`tool_result`:{let e=fc(n,`tool_name`,`name`,`tool`);e&&(o.tool=kc(e,n)),o.success=mc(n,`success`),o.durationMs=pc(n,`duration_ms`);let t=fc(n,`decision`);(t===`accept`||t===`reject`)&&(o.decision=t);break}case`tool_decision`:{let e=fc(n,`tool_name`,`name`,`tool`);e&&(o.tool=kc(e,n));let t=fc(n,`decision`);(t===`accept`||t===`reject`)&&(o.decision=t);break}case`user_prompt`:{o.promptLength=pc(n,`prompt_length`,`prompt.length`);let e=fc(n,`prompt`);e&&(o.promptText=e);break}case`mcp_connection`:o.mcpServerName=fc(n,`server_name`,`name`),o.mcpTransport=fc(n,`transport_type`,`transport`),o.mcpStatus=fc(n,`status`),o.durationMs=pc(n,`duration_ms`);break;case`plugin_loaded`:o.pluginName=fc(n,`plugin.name`,`plugin_name`,`name`),o.pluginVersion=fc(n,`plugin.version`,`plugin_version`);break;case`hook_execution`:o.hookName=fc(n,`hook_event`,`hook_name`,`name`),o.hookSuccess=pc(n,`num_success`),o.hookBlocked=pc(n,`num_blocking`),o.hookErrored=pc(n,`num_non_blocking_error`),o.hookCancelled=pc(n,`num_cancelled`);break;default:break}return o},normalizeMetric(e){let n=Ac.get(s(e.name))??`other`;return e.dataPoints.map(r=>{let i=_c(e.resource,r.attributes);return{agent:t,sessionId:fc(i,`session.id`),identity:vc(i),kind:n,value:r.value,temporality:e.temporality,timestamp:r.timestamp,attributes:r.attributes}})}}}jc({kind:`claude-code`,prefix:`claude_code.`,scopeHint:`claude_code`,serviceHint:`claude-code`});var Mc={handled:Oc,ignored:[`api_request_body`,`api_response_body`,`assistant_response`,`hook_registered`,`hook_execution_start`]};[...Mc.handled,...Mc.ignored],jc({kind:`opencode`,prefix:`opencode.`,scopeHint:`opencode`,serviceHint:`opencode`});function Nc(){return Object.fromEntries(Sc.map(e=>[e,0]))}function Pc(e){let t={sessions:0,costUsd:0,inputTokens:0,outputTokens:0,apiRequests:0,apiErrors:0,accepted:0,rejected:0,models:{},tools:{},toolCategories:Nc(),mcpServers:{},subAgents:{},skills:{},mcpConnections:{},plugins:{},hooks:{runs:0,blocked:0,errored:0,cancelled:0}};for(let n of e){t.sessions+=1;let{rollup:e}=n;t.costUsd+=e.costUsd,t.inputTokens+=e.inputTokens,t.outputTokens+=e.outputTokens,t.apiRequests+=e.apiRequests,t.apiErrors+=e.apiErrors,t.accepted+=e.accepted,t.rejected+=e.rejected;for(let[n,r]of Object.entries(e.models))t.models[n]=(t.models[n]??0)+r;for(let n of Object.values(e.tools))t.tools[n.name]=(t.tools[n.name]??0)+n.count,n.isMcp&&n.mcpServer&&(t.mcpServers[n.mcpServer]=(t.mcpServers[n.mcpServer]??0)+n.count);for(let n of Sc)t.toolCategories[n]+=e.toolCategories[n];for(let[n,r]of Object.entries(e.subAgents))t.subAgents[n]=(t.subAgents[n]??0)+r;for(let[n,r]of Object.entries(e.skills))t.skills[n]=(t.skills[n]??0)+r;for(let n of Object.values(e.mcpConnections)){let e=t.mcpConnections[n.name]??{name:n.name,transport:n.transport,connected:!1,connects:0,disconnects:0};e.connects+=n.connects,e.disconnects+=n.disconnects,e.connected=e.connected||n.connected,n.transport&&(e.transport=n.transport),t.mcpConnections[n.name]=e}for(let n of Object.values(e.plugins))t.plugins[n.name]=n;t.hooks.runs+=e.hooks.runs,t.hooks.blocked+=e.hooks.blocked,t.hooks.errored+=e.hooks.errored,t.hooks.cancelled+=e.hooks.cancelled}return t}var Fc=ls(!1),Ic=ls({x:20,y:20}),Lc=ls(`bottom-right`),Rc=ls(`bottom`),zc=ls(!1),Bc=ls(`traces`),Vc=ls(null),Hc=ls(null),Uc=ls(null);function Wc(e,t){Uc.value={traceId:e,spanId:t}}var Gc=ls(`system`);function Kc(){try{let e=localStorage.getItem(`autotel-devtools-theme`);if(e===`light`||e===`dark`||e===`system`)return e}catch{}return`system`}var qc=[`system`,`light`,`dark`];function Jc(){let e=qc[(qc.indexOf(Gc.value)+1)%qc.length];Gc.value=e;try{localStorage.setItem(`autotel-devtools-theme`,e)}catch{}}var Yc=`autotel-devtools-editor`;function Xc(){try{let e=localStorage.getItem(Yc);if(e===`vscode`||e===`cursor`||e===`webstorm`)return e}catch{}return`vscode`}var Zc=ls(Xc());function Qc(e){Zc.value=e;try{localStorage.setItem(Yc,e)}catch{}}var $c=ls(null);function el(e){$c.value=e}function tl(){$c.value=null}function nl(e){$c.value=$c.value?null:e}var rl={vertical:440,horizontal:560},il=ls({...rl});function al(e){return globalThis.window===void 0?e===`vertical`?{min:200,max:900}:{min:360,max:1200}:e===`vertical`?{min:200,max:Math.round(window.innerHeight*.92)}:{min:360,max:Math.round(window.innerWidth*.92)}}function ol(e,t){let{min:n,max:r}=al(e),i=Math.min(r,Math.max(n,Math.round(t)));il.value={...il.value,[e]:i}}function sl(e){ol(e,rl[e])}var cl=ls([]),ll=ls({connectionStatus:`disconnected`}),ul=ls([]),dl=ls([]),fl=ls(`disconnected`),pl=ls(null),ml=ls(Cs),hl=ls([]),gl=ls([]),_l=ls(`pending`),vl=us(()=>{if(_l.value===`ready`)return hl.value;let e=Es(ml.value,Date.now());if(Ds(e))return cl.value;let{start:t,end:n}=e;return cl.value.filter(e=>e.startTime>=t&&e.startTime<=n)}),yl=ls(0),bl=15e3,xl=[];function Sl(e,t,n){if(e+t+n===0)return;let r=Date.now();xl.push({t:r,traces:e,logs:t,metrics:n});let i=r-bl;(xl.length>1024||xl[0].t<i)&&(xl=xl.filter(e=>e.t>=i)),yl.value+=1}function Cl(e=5e3,t=Date.now()){let n=t-e,r=0,i=0,a=0;for(let e of xl)e.t>=n&&(r+=e.traces,i+=e.logs,a+=e.metrics);let o=e/1e3;return{traces:r/o,logs:i/o,metrics:a/o,total:(r+i+a)/o}}var wl=ls(!1),Tl=ls([]),El=ls([]),Dl=us(()=>Tl.value.length),Ol=us(()=>El.value.length),kl=ls(!1),Al=us(()=>cl.value.filter(e=>e.status===`ERROR`)),jl=us(()=>{let e=Al.value;return Fc.value?0:e.length}),Ml=ls({key:`time`,dir:`desc`}),Nl=ls(``),Pl=ls(`all`),Fl=ls(0),Il=ls(new Set);function Ll(e){let t=new Set(Il.value);t.has(e)?t.delete(e):t.add(e),Il.value=t}function Rl(){Il.value.size>0&&(Il.value=new Set)}var zl=ls(``),Bl=new Map([[`time`,`desc`],[`duration`,`desc`],[`spans`,`desc`],[`service`,`asc`],[`name`,`asc`],[`status`,`desc`]]);function Vl(e){let t=Ml.value;Ml.value=t.key===e?{key:e,dir:t.dir===`asc`?`desc`:`asc`}:{key:e,dir:Bl.get(e)??`desc`}}var Hl=new Set([`service`,`name`]);function Ul(e,t){return(t===`service`?e.service:e.rootSpan?.name)??``}function Wl(e,t){switch(t){case`duration`:return e.duration;case`spans`:return e.spans.length;case`status`:return+(e.status===`ERROR`);default:return e.startTime}}function Gl(e,t,n){return Hl.has(n)?Ul(e,n).localeCompare(Ul(t,n)):Wl(e,n)-Wl(t,n)}var Kl=us(()=>{let{key:e,dir:t}=Ml.value,n=t===`asc`?1:-1;return[...cl.value].sort((t,r)=>{let i=Gl(t,r,e);return i===0?r.startTime-t.startTime:i*n})}),ql=us(()=>[...dl.value].sort((e,t)=>t.timestamp-e.timestamp)),Jl=ls([]),Yl=ls(null),Xl=us(()=>[...Jl.value].sort((e,t)=>t.lastSeen-e.lastSeen)),Zl=us(()=>Pc(Jl.value)),Ql=us(()=>{let e=Xl.value;if(e.length===0)return null;let t=Yl.value;return e.find(e=>e.id===t)??e[0]});function $l(e){Yl.value=e}var eu=us(()=>xs({traces:vl.value,logs:dl.value,errors:ul.value})),tu=us(()=>{let e=[];for(let t of vl.value){let n=uc(t.spans);for(let r of t.spans){if(!Ps(r))continue;let i=lc(r);dc(i,n),e.push({raw:r,normalized:i,service:t.service,traceId:t.traceId})}}return e.sort((e,t)=>t.normalized.startMs-e.normalized.startMs),e}),nu=us(()=>tu.value.length),ru=us(()=>vl.value.filter(e=>e.spans.length>1).length),iu=us(()=>{if(_l.value===`ready`)return gl.value;let e=Es(ml.value,Date.now());if(Ds(e))return ul.value;let{start:t,end:n}=e;return ul.value.filter(e=>e.lastSeen>=t&&e.firstSeen<=n)}),au=us(()=>[...iu.value].sort((e,t)=>t.lastSeen-e.lastSeen)),ou=us(()=>[...iu.value].sort((e,t)=>t.count-e.count)),su=us(()=>iu.value.reduce((e,t)=>e+t.count,0)),cu=us(()=>{let e=Date.now()-3600*1e3;return ul.value.filter(t=>t.lastSeen>e).reduce((e,t)=>e+t.count,0)}),lu=us(()=>{let e=Vc.value;return e&&vl.value.find(t=>t.traceId===e)||null}),uu=ls(new Set);function du(e){let t=new Set(uu.value);t.has(e)?t.delete(e):t.add(e),uu.value=t}function fu(){uu.value=new Set(vl.value.map(e=>e.traceId))}function pu(){uu.value=new Set}function mu(){let e=uu.value;cl.value=cl.value.filter(t=>!e.has(t.traceId)),hl.value=hl.value.filter(t=>!e.has(t.traceId)),pu(),Vc.value&&e.has(Vc.value)&&(Vc.value=null)}var hu=us(()=>uu.value.size);function gu(e,t){let n=[...t].sort((e,t)=>e.startTime-t.startTime),r=n.find(e=>!e.parentSpanId)??e.rootSpan??n[0],i=Math.min(...n.map(e=>e.startTime)),a=Math.max(...n.map(e=>e.endTime)),o=n.some(e=>e.status.code===`ERROR`)?`ERROR`:`OK`,s=fs(r?.attributes,`service.name`);return{...e,rootSpan:r,spans:n,startTime:i,endTime:a,duration:a-i,status:o,service:s??e.service}}function _u(e,t){let n=new Map;for(let t of e.spans)n.set(t.spanId,t);for(let e of t.spans)n.has(e.spanId)||n.set(e.spanId,e);return gu(e,[...n.values()])}function vu(e,t){if(t.length===0)return e;let n=new Map;for(let e of t){let t=n.get(e.traceId);n.set(e.traceId,t?_u(t,e):e)}let r=new Set(e.map(e=>e.traceId)),i=e.map(e=>{let t=n.get(e.traceId);return t?_u(e,t):e});for(let[e,t]of n)r.has(e)||i.push(t);return i}function yu(e,t,n){let r=vu(e,t);return r.length>n?r.slice(-n):r}function bu(e,t){if(t.length===0)return e;let n=[...t,...e];return n.length>zu?n.slice(0,zu):n}function xu(e,t,n,r=n){return{ingest(i,a){i.length!==0&&(a?t.value=r(t.value,i):e.value=n(e.value,i))},flushToLive(){t.value.length!==0&&(e.value=n(e.value,t.value),t.value=[])},clearPending(){t.value=[]}}}var Su=xu(cl,Tl,vu,(e,t)=>yu(e,t,zu)),Cu=xu(dl,El,bu),wu=[Su,Cu];function Tu(e){if(kl.value){e.health&&(ll.value=e.health,fl.value=e.health.connectionStatus);return}let t=wl.value;Su.ingest(e.traces??[],t),Cu.ingest(e.logs??[],t),Sl(e.traces?.length??0,e.logs?.length??0,0),e.health&&(ll.value=e.health,fl.value=e.health.connectionStatus),e.errors&&(ul.value=e.errors),e.agents&&(Jl.value=e.agents)}function Eu(e){if(wl.value!==e&&(wl.value=e,!e))for(let e of wu)e.flushToLive()}function Du(){Eu(!wl.value)}function Ou(){for(let e of wu)e.clearPending()}function ku(e){cl.value=e.traces??[],dl.value=(e.logs??[]).slice(0,zu),ul.value=e.errors??[],Tl.value=[],El.value=[],wl.value=!1,kl.value=!0}function Au(){kl.value=!1,cl.value=[],dl.value=[],ul.value=[]}function ju(){Fc.value=!Fc.value}function Mu(e){Bc.value=e}function Nu(e,t=null){Vc.value=e,Hc.value=e?t:null}function Pu(e,t){Nu(e,t??null),Mu(`traces`)}function Fu(e,t){Ic.value={x:e,y:t}}function Iu(e){Lc.value=e}function Lu(e){Rc.value=e}function Ru(){let e=[`bottom`,`right`,`left`],t=Rc.value??`bottom`;Rc.value=e[(e.indexOf(t)+1)%e.length]}var zu=100;function Bu(){cl.value=[],hl.value=[],ul.value=[],gl.value=[],dl.value=[],Jl.value=[],Yl.value=null,Tl.value=[],El.value=[],uu.value=new Set,Vc.value=null,Hc.value=null,_l.value=`pending`,kl.value=!1}function Vu(e){if(e.length===0)return;let t=new Set(cl.value.map(e=>e.traceId)),n=e.filter(e=>!t.has(e.traceId));n.length>0?(console.log(`[Autotel Devtools] Importing ${n.length} trace(s)`),cl.value=[...cl.value,...n]):console.log(`[Autotel Devtools] No new traces to import (all duplicates)`)}var Hu=ls(`local`),Uu=`autotel-devtools-widget-state`;function Wu(){try{let e=localStorage.getItem(Uu);if(e){let t=JSON.parse(e);t.position&&(Ic.value=t.position),t.corner&&(Lc.value=t.corner),t.docked&&(Rc.value=t.docked),t.panelSize&&(il.value={vertical:Number(t.panelSize.vertical)||440,horizontal:Number(t.panelSize.horizontal)||560}),typeof t.timeZone==`string`&&(Hu.value=t.timeZone)}}catch(e){console.error(`[Autotel Devtools] Failed to load persisted state:`,e)}}function Gu(){try{let e={position:Ic.value,corner:Lc.value,docked:Rc.value,panelSize:il.value,timeZone:Hu.value};localStorage.setItem(Uu,JSON.stringify(e))}catch(e){console.error(`[Autotel Devtools] Failed to persist state:`,e)}}ds(()=>{Ic.value,Lc.value,Rc.value,Hu.value,il.value,Gu()});var Ku=[`traces`,`resources`,`service-map`,`metrics`,`logs`,`errors`,`genai`,`flow`,`security`];function qu(e,t){return e.find(e=>e===t)}function Ju(e){return qu(Ku,e)!==void 0}var Yu=[`time`,`duration`,`spans`,`service`,`name`,`status`],Xu=[`error`,`ok`],Zu={key:`time`,dir:`desc`};function Qu(e){if(!e)return;let[t,n]=e.split(`:`),r=qu(Yu,t);return r&&{key:r,dir:n===`asc`?`asc`:`desc`}}function $u(e){let t=e.startsWith(`#`)?e.slice(1):e;if(!t)return{};let n=new URLSearchParams(t),r={},i=n.get(`tab`);Ju(i)&&(r.tab=i);let a=n.get(`trace`)||void 0;a&&(r.traceId=a);let o=n.get(`span`)||void 0;a&&o&&(r.spanId=o);let s=n.get(`q`)||void 0;s&&(r.q=s);let c=qu(Xu,n.get(`status`));c&&(r.status=c);let l=n.get(`min`),u=l==null?NaN:Number(l);Number.isFinite(u)&&u>0&&(r.minDuration=u);let d=n.get(`window`);d&&(r.window=js(d));let f=Qu(n.get(`sort`));f&&(r.sort=f);let p=n.get(`gq`)||void 0;return p&&(r.genaiQuery=p),r}function ed(e){let t=new URLSearchParams;if(e.tab&&e.tab!==`traces`&&t.set(`tab`,e.tab),e.traceId&&t.set(`trace`,e.traceId),e.traceId&&e.spanId&&t.set(`span`,e.spanId),e.q&&t.set(`q`,e.q),e.status&&e.status!==`all`&&t.set(`status`,e.status),e.minDuration&&e.minDuration>0&&t.set(`min`,String(e.minDuration)),e.window){let n=As(e.window);n&&t.set(`window`,n)}e.sort&&!(e.sort.key===Zu.key&&e.sort.dir===Zu.dir)&&t.set(`sort`,`${e.sort.key}:${e.sort.dir}`),e.genaiQuery&&t.set(`gq`,e.genaiQuery);let n=t.toString();return n?`#${n}`:``}function td(e,t){return e&&(e.tab!==t.tab||e.traceId!==t.traceId||e.spanId!==t.spanId)?`push`:`replace`}var nd=new Set([`$$slots`,`$$events`,`$$legacy`,`fill`,`width`,`height`]),rd=ua(`<svg><circle cx="17" cy="20" r="3" fill="#9AAAB4"></circle><path fill="#DA2F47" d="M19.235 17.059a1.003 1.003 0 0 1-1.353.412L5.529 10.883a1.004 1.004 0 0 1-.412-1.353L7.94 4.235c.259-.485.868-.67 1.353-.412l12.353 6.588c.485.259.671.868.412 1.353z"></path><path fill="#DA2F47" d="M31.177 22.293a1.004 1.004 0 0 1-1.354.412l-9.705-5.176a1.004 1.004 0 0 1-.412-1.354l1.882-3.529c.259-.485.868-.67 1.354-.412l9.705 5.176c.485.259.671.868.412 1.354z"></path><path fill="#BB1A34" d="m19.235 17.058 2.824-5.293 1.765.941L20.999 18z"></path><path fill="#9D0522" d="m28.942 22.235 2.823-5.294 3.53 1.882-2.824 5.294z"></path><path fill="#292F33" d="m8.294 7.824 1.882-3.53-.881-.47v-.001L4.882 1.471a1.003 1.003 0 0 0-1.353.411L.706 7.177a1 1 0 0 0 .412 1.353l3.529 1.882 1.766.941.47-.882zM23 25a2 2 0 0 1-2 2h-8a2 2 0 0 1 0-4h8a2 2 0 0 1 2 2"></path><path fill="#9AAAB4" d="m9.467 36 3.344-7.152c.468-1 .036-2.191-.965-2.658a1.997 1.997 0 0 0-2.658.965L5.052 36zm15.065 0h4.416l-4.137-8.846a1.997 1.997 0 0 0-2.658-.965 2 2 0 0 0-.965 2.658zM19 36v-8a2 2 0 0 0-4 0v8z"></path></svg>`);function id(e,t){let n=Z(t,`width`,3,40),r=Z(t,`height`,3,40),i=Y(t,nd);var a=rd();Oo(a,()=>({width:n(),height:r(),viewBox:`0 0 36 36`,xmlns:`http://www.w3.org/2000/svg`,...i})),H(e,a)}function ad(e){let t=e<0,n=Math.abs(e),r;if(n===0)r=`0`;else if(n<.001)r=`${(n*1e6).toFixed(0)}ns`;else if(n<1)r=`${(n*1e3).toFixed(2).replace(/\.?0+$/,``)}µs`;else if(n<1e3)r=`${n.toFixed(2).replace(/\.?0+$/,``)}ms`;else if(n<6e4)r=`${(n/1e3).toFixed(2).replace(/\.?0+$/,``)}s`;else{let e=Math.floor(n/6e4),t=Math.floor(n%6e4/1e3);r=t>0?`${e}m ${t}s`:`${e}m`}return t?`⚠ ${r}`:r}function od(e){let t=new Date(e),n=new Date().getTime()-t.getTime();if(n<6e4){let e=Math.floor(n/1e3);return e<=1?`just now`:`${e}s ago`}return n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:t.toLocaleTimeString()}function sd(e){return new Intl.NumberFormat().format(e)}function cd(e){switch(e){case`OK`:return`text-green-600`;case`ERROR`:return`text-red-600`;default:return`text-gray-500`}}function ld(e,t,n,r){let i=n/2,a=r/2;return e<i&&t<a?{corner:`top-left`,x:20,y:20}:e>=i&&t<a?{corner:`top-right`,x:n-100,y:20}:e<i&&t>=a?{corner:`bottom-left`,x:20,y:r-100}:{corner:`bottom-right`,x:n-100,y:r-100}}function ud(e,t,n){return Math.min(Math.max(e,t),n)}function dd(e){return e.replace(/[\w.+-]+@[\w-]+\.[\w.-]+/g,`«email»`).replace(/\b(sk|pk|ghp|xox[baprs])[-_][A-Za-z0-9]{8,}\b/g,`«secret»`).replace(/\b[A-Za-z0-9_-]{32,}\b/g,`«token»`)}var fd=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},pd=(e,t)=>({classGroupId:e,validator:t}),md=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),hd=`-`,gd=[],_d=`arbitrary..`,vd=e=>{let t=xd(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return bd(e);let n=e.split(hd);return yd(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?fd(i,t):t:i||gd}return n[e]||gd}}},yd=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=yd(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(hd):e.slice(t).join(hd),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},bd=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?_d+r:void 0})(),xd=e=>{let{theme:t,classGroups:n}=e;return Sd(n,t)},Sd=(e,t)=>{let n=md();for(let r in e){let i=e[r];Cd(i,n,r,t)}return n},Cd=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];wd(i,t,n,r)}},wd=(e,t,n,r)=>{if(typeof e==`string`){Td(e,t,n);return}if(typeof e==`function`){Ed(e,t,n,r);return}Dd(e,t,n,r)},Td=(e,t,n)=>{let r=e===``?t:Od(t,e);r.classGroupId=n},Ed=(e,t,n,r)=>{if(kd(e)){Cd(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(pd(n,e))},Dd=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Cd(o,Od(t,a),n,r)}},Od=(e,t)=>{let n=e,r=t.split(hd),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=md(),n.nextPart.set(t,i)),n=i}return n},kd=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ad=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},jd=`!`,Md=`:`,Nd=[],Pd=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Fd=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Md){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(jd)?(c=s.slice(0,-1),l=!0):s.startsWith(jd)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Pd(t,l,c,u)};if(t){let e=t+Md,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Pd(Nd,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Id=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Ld=e=>({cache:Ad(e.cacheSize),parseClassName:Fd(e),sortModifiers:Id(e),postfixLookupClassGroupIds:Rd(e),...vd(e)}),Rd=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},zd=/\s+/,Bd=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(zd),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+jd:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Vd=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Hd(n))&&(i&&(i+=` `),i+=r);return i},Hd=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Hd(e[r]))&&(n&&(n+=` `),n+=t);return n},Ud=(e,...t)=>{let n,r,i,a,o=o=>(n=Ld(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Bd(e,n);return i(e,a),a};return a=o,(...e)=>a(Vd(...e))},Wd=[],Gd=e=>{let t=t=>t[e]||Wd;return t.isThemeGetter=!0,t},Kd=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qd=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jd=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Yd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Zd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$d=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ef=e=>Jd.test(e),tf=e=>!!e&&!Number.isNaN(Number(e)),nf=e=>!!e&&Number.isInteger(Number(e)),rf=e=>e.endsWith(`%`)&&tf(e.slice(0,-1)),af=e=>Yd.test(e),of=()=>!0,sf=e=>Xd.test(e)&&!Zd.test(e),cf=()=>!1,lf=e=>Qd.test(e),uf=e=>$d.test(e),df=e=>!mf(e)&&!Sf(e),ff=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),pf=e=>Af(e,Pf,cf),mf=e=>Kd.test(e),hf=e=>Af(e,Ff,sf),gf=e=>Af(e,If,tf),_f=e=>Af(e,Rf,of),vf=e=>Af(e,Lf,cf),yf=e=>Af(e,Mf,cf),bf=e=>Af(e,Nf,uf),xf=e=>Af(e,zf,lf),Sf=e=>qd.test(e),Cf=e=>jf(e,Ff),wf=e=>jf(e,Lf),Tf=e=>jf(e,Mf),Ef=e=>jf(e,Pf),Df=e=>jf(e,Nf),Of=e=>jf(e,zf,!0),kf=e=>jf(e,Rf,!0),Af=(e,t,n)=>{let r=Kd.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},jf=(e,t,n=!1)=>{let r=qd.exec(e);return r?r[1]?t(r[1]):n:!1},Mf=e=>e===`position`||e===`percentage`,Nf=e=>e===`image`||e===`url`,Pf=e=>e===`length`||e===`size`||e===`bg-size`,Ff=e=>e===`length`,If=e=>e===`number`,Lf=e=>e===`family-name`,Rf=e=>e===`number`||e===`weight`,zf=e=>e===`shadow`,Bf=Ud(()=>{let e=Gd(`color`),t=Gd(`font`),n=Gd(`text`),r=Gd(`font-weight`),i=Gd(`tracking`),a=Gd(`leading`),o=Gd(`breakpoint`),s=Gd(`container`),c=Gd(`spacing`),l=Gd(`radius`),u=Gd(`shadow`),d=Gd(`inset-shadow`),f=Gd(`text-shadow`),p=Gd(`drop-shadow`),m=Gd(`blur`),h=Gd(`perspective`),g=Gd(`aspect`),_=Gd(`ease`),v=Gd(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Sf,mf],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Sf,mf,c],T=()=>[ef,`full`,`auto`,...w()],ee=()=>[nf,`none`,`subgrid`,Sf,mf],te=()=>[`auto`,{span:[`full`,nf,Sf,mf]},nf,Sf,mf],ne=()=>[nf,`auto`,Sf,mf],re=()=>[`auto`,`min`,`max`,`fr`,Sf,mf],ie=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ae=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],oe=()=>[`auto`,...w()],se=()=>[ef,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ce=()=>[ef,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],le=()=>[ef,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],E=()=>[e,Sf,mf],ue=()=>[...b(),Tf,yf,{position:[Sf,mf]}],de=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],fe=()=>[`auto`,`cover`,`contain`,Ef,pf,{size:[Sf,mf]}],pe=()=>[rf,Cf,hf],me=()=>[``,`none`,`full`,l,Sf,mf],he=()=>[``,tf,Cf,hf],ge=()=>[`solid`,`dashed`,`dotted`,`double`],_e=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ve=()=>[tf,rf,Tf,yf],ye=()=>[``,`none`,m,Sf,mf],be=()=>[`none`,tf,Sf,mf],xe=()=>[`none`,tf,Sf,mf],Se=()=>[tf,Sf,mf],Ce=()=>[ef,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[af],breakpoint:[af],color:[of],container:[af],"drop-shadow":[af],ease:[`in`,`out`,`in-out`],font:[df],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[af],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[af],shadow:[af],spacing:[`px`,tf],text:[af],"text-shadow":[af],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ef,mf,Sf,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Sf,mf]}],"container-named":[ff],columns:[{columns:[tf,mf,Sf,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[nf,`auto`,Sf,mf]}],basis:[{basis:[ef,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[tf,ef,`auto`,`initial`,`none`,mf]}],grow:[{grow:[``,tf,Sf,mf]}],shrink:[{shrink:[``,tf,Sf,mf]}],order:[{order:[nf,`first`,`last`,`none`,Sf,mf]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ie(),`normal`]}],"justify-items":[{"justify-items":[...ae(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ae()]}],"align-content":[{content:[`normal`,...ie()]}],"align-items":[{items:[...ae(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ae(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...ae(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ae()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:oe()}],mx:[{mx:oe()}],my:[{my:oe()}],ms:[{ms:oe()}],me:[{me:oe()}],mbs:[{mbs:oe()}],mbe:[{mbe:oe()}],mt:[{mt:oe()}],mr:[{mr:oe()}],mb:[{mb:oe()}],ml:[{ml:oe()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:se()}],"inline-size":[{inline:[`auto`,...ce()]}],"min-inline-size":[{"min-inline":[`auto`,...ce()]}],"max-inline-size":[{"max-inline":[`none`,...ce()]}],"block-size":[{block:[`auto`,...le()]}],"min-block-size":[{"min-block":[`auto`,...le()]}],"max-block-size":[{"max-block":[`none`,...le()]}],w:[{w:[s,`screen`,...se()]}],"min-w":[{"min-w":[s,`screen`,`none`,...se()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...se()]}],h:[{h:[`screen`,`lh`,...se()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...se()]}],"max-h":[{"max-h":[`screen`,`lh`,...se()]}],"font-size":[{text:[`base`,n,Cf,hf]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,kf,_f]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,rf,mf]}],"font-family":[{font:[wf,vf,t]}],"font-features":[{"font-features":[mf]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Sf,mf]}],"line-clamp":[{"line-clamp":[tf,`none`,Sf,gf]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Sf,mf]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Sf,mf]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ge(),`wavy`]}],"text-decoration-thickness":[{decoration:[tf,`from-font`,`auto`,Sf,hf]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[tf,`auto`,Sf,mf]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[nf,Sf,mf]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Sf,mf]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Sf,mf]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:de()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},nf,Sf,mf],radial:[``,Sf,mf],conic:[nf,Sf,mf]},Df,bf]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:me()}],"rounded-s":[{"rounded-s":me()}],"rounded-e":[{"rounded-e":me()}],"rounded-t":[{"rounded-t":me()}],"rounded-r":[{"rounded-r":me()}],"rounded-b":[{"rounded-b":me()}],"rounded-l":[{"rounded-l":me()}],"rounded-ss":[{"rounded-ss":me()}],"rounded-se":[{"rounded-se":me()}],"rounded-ee":[{"rounded-ee":me()}],"rounded-es":[{"rounded-es":me()}],"rounded-tl":[{"rounded-tl":me()}],"rounded-tr":[{"rounded-tr":me()}],"rounded-br":[{"rounded-br":me()}],"rounded-bl":[{"rounded-bl":me()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":he()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ge(),`hidden`,`none`]}],"divide-style":[{divide:[...ge(),`hidden`,`none`]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-bs":[{"border-bs":E()}],"border-color-be":[{"border-be":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...ge(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[tf,Sf,mf]}],"outline-w":[{outline:[``,tf,Cf,hf]}],"outline-color":[{outline:E()}],shadow:[{shadow:[``,`none`,u,Of,xf]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":[`none`,d,Of,xf]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:he()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[tf,hf]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":[`none`,f,Of,xf]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[tf,Sf,mf]}],"mix-blend":[{"mix-blend":[..._e(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":_e()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[tf]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[Sf,mf]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[tf]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ue()}],"mask-repeat":[{mask:de()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Sf,mf]}],filter:[{filter:[``,`none`,Sf,mf]}],blur:[{blur:ye()}],brightness:[{brightness:[tf,Sf,mf]}],contrast:[{contrast:[tf,Sf,mf]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Of,xf]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:[``,tf,Sf,mf]}],"hue-rotate":[{"hue-rotate":[tf,Sf,mf]}],invert:[{invert:[``,tf,Sf,mf]}],saturate:[{saturate:[tf,Sf,mf]}],sepia:[{sepia:[``,tf,Sf,mf]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Sf,mf]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[tf,Sf,mf]}],"backdrop-contrast":[{"backdrop-contrast":[tf,Sf,mf]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,tf,Sf,mf]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[tf,Sf,mf]}],"backdrop-invert":[{"backdrop-invert":[``,tf,Sf,mf]}],"backdrop-opacity":[{"backdrop-opacity":[tf,Sf,mf]}],"backdrop-saturate":[{"backdrop-saturate":[tf,Sf,mf]}],"backdrop-sepia":[{"backdrop-sepia":[``,tf,Sf,mf]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Sf,mf]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[tf,`initial`,Sf,mf]}],ease:[{ease:[`linear`,`initial`,_,Sf,mf]}],delay:[{delay:[tf,Sf,mf]}],animate:[{animate:[`none`,v,Sf,mf]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Sf,mf]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:be()}],"rotate-x":[{"rotate-x":be()}],"rotate-y":[{"rotate-y":be()}],"rotate-z":[{"rotate-z":be()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":[`scale-3d`],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[Sf,mf,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Ce()}],"translate-x":[{"translate-x":Ce()}],"translate-y":[{"translate-y":Ce()}],"translate-z":[{"translate-z":Ce()}],"translate-none":[`translate-none`],zoom:[{zoom:[nf,Sf,mf]}],accent:[{accent:E()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Sf,mf]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":E()}],"scrollbar-track-color":[{"scrollbar-track":E()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Sf,mf]}],fill:[{fill:[`none`,...E()]}],"stroke-w":[{stroke:[tf,Cf,hf,gf]}],stroke:[{stroke:[`none`,...E()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),Q=(...e)=>Bf(to(e)),Vf=V(`<button title="Autolemetry Observability"><!></button>`);function Hf(e,t){it(t,!0);let n=N(void 0),r=!1,i={x:0,y:0},a=M(()=>Ic.value),o=M(()=>jl.value),s=M(()=>Fc.value),c=M(()=>z(o)>0),l=M(()=>z(c)?`#DA2F47`:`#22c55e`);function u(e){e.button===0&&(r=!0,i={x:e.clientX-z(a).x,y:e.clientY-z(a).y},z(n)?.setPointerCapture(e.pointerId),e.preventDefault())}function d(e){r&&Fu(ud(e.clientX-i.x,0,window.innerWidth-48),ud(e.clientY-i.y,0,window.innerHeight-48))}function f(e){if(!r)return;r=!1,z(n)?.releasePointerCapture(e.pointerId);let t=ld(z(a).x,z(a).y,window.innerWidth,window.innerHeight);Fu(t.x,t.y),Iu(t.corner)}function p(){r||ju()}var m=da(),h=I(m),g=e=>{var t=Vf(),r=F(t);{let e=M(()=>z(c)?`#fff`:void 0);id(r,{get fill(){return z(e)},width:28,height:28})}D(t),Uo(t,e=>P(n,e),()=>z(n)),R(e=>{q(t,1,e),co(t,`width: 48px; height: 48px; left: ${z(a).x??``}px; top: ${z(a).y??``}px; transform: translate3d(0, 0, 0); border-color: ${z(l)??``};`)},[()=>K(Q(`fixed z-[1000] rounded-full border-2 shadow-md`,`flex items-center justify-center cursor-pointer touch-none`,`transition-all duration-150 select-none`,`hover:shadow-lg`,`bg-surface hover:bg-subtle`))]),B(`click`,t,p),B(`pointerdown`,t,u),B(`pointermove`,t,d),B(`pointerup`,t,f),H(e,t)};W(h,e=>{z(s)||e(g)}),H(e,m),at()}na([`click`,`pointerdown`,`pointermove`,`pointerup`]);var Uf={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`},Wf=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Gf=Symbol(`lucide-context`),Kf=()=>et(Gf),qf=new Set([`$$slots`,`$$events`,`$$legacy`,`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`,`children`]),Jf=ua(`<svg><!><!></svg>`);function $(e,t){it(t,!0);let n=Kf()??{},r=Z(t,`color`,19,()=>n.color??`currentColor`),i=Z(t,`size`,19,()=>n.size??24),a=Z(t,`strokeWidth`,19,()=>n.strokeWidth??2),o=Z(t,`absoluteStrokeWidth`,19,()=>n.absoluteStrokeWidth??!1),s=Z(t,`iconNode`,19,()=>[]),c=Y(t,qf),l=M(()=>o()?Number(a())*24/Number(i()):a());var u=Jf();Oo(u,e=>({...Uf,...e,...c,width:i(),height:i(),stroke:r(),"stroke-width":z(l),class:[`lucide-icon lucide`,n.class,t.name&&`lucide-${t.name}`,t.class]}),[()=>!t.children&&!Wf(c)&&{"aria-hidden":`true`}]);var d=F(u);G(d,17,s,Aa,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=da();Za(I(a),r,!0,(e,t)=>{Oo(e,()=>({...i()}))}),H(e,a)}),za(L(d),()=>t.children??p),D(u),H(e,u),at()}var Yf=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xf(e,t){let n=Y(t,Yf),r=[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`}]];$(e,X({name:`activity`},()=>n,{get iconNode(){return r}}))}var Zf=new Set([`$$slots`,`$$events`,`$$legacy`]);function Qf(e,t){let n=Y(t,Zf),r=[[`path`,{d:`M12 5v14`}],[`path`,{d:`m19 12-7 7-7-7`}]];$(e,X({name:`arrow-down`},()=>n,{get iconNode(){return r}}))}var $f=new Set([`$$slots`,`$$events`,`$$legacy`]);function ep(e,t){let n=Y(t,$f),r=[[`path`,{d:`m12 19-7-7 7-7`}],[`path`,{d:`M19 12H5`}]];$(e,X({name:`arrow-left`},()=>n,{get iconNode(){return r}}))}var tp=new Set([`$$slots`,`$$events`,`$$legacy`]);function np(e,t){let n=Y(t,tp),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`m12 5 7 7-7 7`}]];$(e,X({name:`arrow-right`},()=>n,{get iconNode(){return r}}))}var rp=new Set([`$$slots`,`$$events`,`$$legacy`]);function ip(e,t){let n=Y(t,rp),r=[[`path`,{d:`m5 12 7-7 7 7`}],[`path`,{d:`M12 19V5`}]];$(e,X({name:`arrow-up`},()=>n,{get iconNode(){return r}}))}var ap=new Set([`$$slots`,`$$events`,`$$legacy`]);function op(e,t){let n=Y(t,ap),r=[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`}]];$(e,X({name:`blocks`},()=>n,{get iconNode(){return r}}))}var sp=new Set([`$$slots`,`$$events`,`$$legacy`]);function cp(e,t){let n=Y(t,sp),r=[[`path`,{d:`M12 8V4H8`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`}],[`path`,{d:`M2 14h2`}],[`path`,{d:`M20 14h2`}],[`path`,{d:`M15 13v2`}],[`path`,{d:`M9 13v2`}]];$(e,X({name:`bot`},()=>n,{get iconNode(){return r}}))}var lp=new Set([`$$slots`,`$$events`,`$$legacy`]);function up(e,t){let n=Y(t,lp),r=[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`}],[`path`,{d:`m7 16.5-4.74-2.85`}],[`path`,{d:`m7 16.5 5-3`}],[`path`,{d:`M7 16.5v5.17`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`}],[`path`,{d:`m17 16.5-5-3`}],[`path`,{d:`m17 16.5 4.74-2.85`}],[`path`,{d:`M17 16.5v5.17`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`}],[`path`,{d:`M12 8 7.26 5.15`}],[`path`,{d:`m12 8 4.74-2.85`}],[`path`,{d:`M12 13.5V8`}]];$(e,X({name:`boxes`},()=>n,{get iconNode(){return r}}))}var dp=new Set([`$$slots`,`$$events`,`$$legacy`]);function fp(e,t){let n=Y(t,dp),r=[[`path`,{d:`M12 18V5`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`}]];$(e,X({name:`brain`},()=>n,{get iconNode(){return r}}))}var pp=new Set([`$$slots`,`$$events`,`$$legacy`]);function mp(e,t){let n=Y(t,pp),r=[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`}],[`circle`,{cx:`12`,cy:`13`,r:`3`}]];$(e,X({name:`camera`},()=>n,{get iconNode(){return r}}))}var hp=new Set([`$$slots`,`$$events`,`$$legacy`]);function gp(e,t){let n=Y(t,hp),r=[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`}],[`path`,{d:`M18 17V9`}],[`path`,{d:`M13 17V5`}],[`path`,{d:`M8 17v-3`}]];$(e,X({name:`chart-column`},()=>n,{get iconNode(){return r}}))}var _p=new Set([`$$slots`,`$$events`,`$$legacy`]);function vp(e,t){let n=Y(t,_p),r=[[`path`,{d:`M5 21v-6`}],[`path`,{d:`M12 21V9`}],[`path`,{d:`M19 21V3`}]];$(e,X({name:`chart-no-axes-column-increasing`},()=>n,{get iconNode(){return r}}))}var yp=new Set([`$$slots`,`$$events`,`$$legacy`]);function bp(e,t){let n=Y(t,yp),r=[[`path`,{d:`M20 6 9 17l-5-5`}]];$(e,X({name:`check`},()=>n,{get iconNode(){return r}}))}var xp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sp(e,t){let n=Y(t,xp),r=[[`path`,{d:`m6 9 6 6 6-6`}]];$(e,X({name:`chevron-down`},()=>n,{get iconNode(){return r}}))}var Cp=new Set([`$$slots`,`$$events`,`$$legacy`]);function wp(e,t){let n=Y(t,Cp),r=[[`path`,{d:`m15 18-6-6 6-6`}]];$(e,X({name:`chevron-left`},()=>n,{get iconNode(){return r}}))}var Tp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ep(e,t){let n=Y(t,Tp),r=[[`path`,{d:`m9 18 6-6-6-6`}]];$(e,X({name:`chevron-right`},()=>n,{get iconNode(){return r}}))}var Dp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Op(e,t){let n=Y(t,Dp),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`}]];$(e,X({name:`circle-alert`},()=>n,{get iconNode(){return r}}))}var kp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ap(e,t){let n=Y(t,kp),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}],[`path`,{d:`M12 17h.01`}]];$(e,X({name:`circle-question-mark`},()=>n,{get iconNode(){return r}}))}var jp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Mp(e,t){let n=Y(t,jp),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 6v6l4 2`}]];$(e,X({name:`clock`},()=>n,{get iconNode(){return r}}))}var Np=new Set([`$$slots`,`$$events`,`$$legacy`]);function Pp(e,t){let n=Y(t,Np),r=[[`path`,{d:`m18 16 4-4-4-4`}],[`path`,{d:`m6 8-4 4 4 4`}],[`path`,{d:`m14.5 4-5 16`}]];$(e,X({name:`code-xml`},()=>n,{get iconNode(){return r}}))}var Fp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ip(e,t){let n=Y(t,Fp),r=[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`}],[`path`,{d:`M15 6h1v4`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`}],[`circle`,{cx:`16`,cy:`8`,r:`6`}]];$(e,X({name:`coins`},()=>n,{get iconNode(){return r}}))}var Lp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Rp(e,t){let n=Y(t,Lp),r=[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]];$(e,X({name:`copy`},()=>n,{get iconNode(){return r}}))}var zp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Bp(e,t){let n=Y(t,zp),r=[[`path`,{d:`M12 20v2`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M17 20v2`}],[`path`,{d:`M17 2v2`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M2 17h2`}],[`path`,{d:`M2 7h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`M20 17h2`}],[`path`,{d:`M20 7h2`}],[`path`,{d:`M7 20v2`}],[`path`,{d:`M7 2v2`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`}]];$(e,X({name:`cpu`},()=>n,{get iconNode(){return r}}))}var Vp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Hp(e,t){let n=Y(t,Vp),r=[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`}]];$(e,X({name:`database`},()=>n,{get iconNode(){return r}}))}var Up=new Set([`$$slots`,`$$events`,`$$legacy`]);function Wp(e,t){let n=Y(t,Up),r=[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`}]];$(e,X({name:`dollar-sign`},()=>n,{get iconNode(){return r}}))}var Gp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Kp(e,t){let n=Y(t,Gp),r=[[`path`,{d:`M12 15V3`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}],[`path`,{d:`m7 10 5 5 5-5`}]];$(e,X({name:`download`},()=>n,{get iconNode(){return r}}))}var qp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jp(e,t){let n=Y(t,qp),r=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`M10 14 21 3`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}]];$(e,X({name:`external-link`},()=>n,{get iconNode(){return r}}))}var Yp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xp(e,t){let n=Y(t,Yp),r=[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}],[`path`,{d:`m2 2 20 20`}]];$(e,X({name:`eye-off`},()=>n,{get iconNode(){return r}}))}var Zp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Qp(e,t){let n=Y(t,Zp),r=[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];$(e,X({name:`eye`},()=>n,{get iconNode(){return r}}))}var $p=new Set([`$$slots`,`$$events`,`$$legacy`]);function em(e,t){let n=Y(t,$p),r=[[`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`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]];$(e,X({name:`file-exclamation-point`},()=>n,{get iconNode(){return r}}))}var tm=new Set([`$$slots`,`$$events`,`$$legacy`]);function nm(e,t){let n=Y(t,tm),r=[[`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`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 9H8`}],[`path`,{d:`M16 13H8`}],[`path`,{d:`M16 17H8`}]];$(e,X({name:`file-text`},()=>n,{get iconNode(){return r}}))}var rm=new Set([`$$slots`,`$$events`,`$$legacy`]);function im(e,t){let n=Y(t,rm),r=[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`}]];$(e,X({name:`flag`},()=>n,{get iconNode(){return r}}))}var am=new Set([`$$slots`,`$$events`,`$$legacy`]);function om(e,t){let n=Y(t,am),r=[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`}]];$(e,X({name:`flame`},()=>n,{get iconNode(){return r}}))}var sm=new Set([`$$slots`,`$$events`,`$$legacy`]);function cm(e,t){let n=Y(t,sm),r=[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`}]];$(e,X({name:`funnel`},()=>n,{get iconNode(){return r}}))}var lm=new Set([`$$slots`,`$$events`,`$$legacy`]);function um(e,t){let n=Y(t,lm),r=[[`path`,{d:`m12 14 4-4`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`}]];$(e,X({name:`gauge`},()=>n,{get iconNode(){return r}}))}var dm=new Set([`$$slots`,`$$events`,`$$legacy`]);function fm(e,t){let n=Y(t,dm),r=[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}]];$(e,X({name:`git-branch`},()=>n,{get iconNode(){return r}}))}var pm=new Set([`$$slots`,`$$events`,`$$legacy`]);function mm(e,t){let n=Y(t,pm),r=[[`circle`,{cx:`18`,cy:`18`,r:`3`}],[`circle`,{cx:`6`,cy:`6`,r:`3`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`}]];$(e,X({name:`git-compare`},()=>n,{get iconNode(){return r}}))}var hm=new Set([`$$slots`,`$$events`,`$$legacy`]);function gm(e,t){let n=Y(t,hm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 9h18`}],[`path`,{d:`M3 15h18`}],[`path`,{d:`M9 3v18`}],[`path`,{d:`M15 3v18`}]];$(e,X({name:`grid-3x3`},()=>n,{get iconNode(){return r}}))}var _m=new Set([`$$slots`,`$$events`,`$$legacy`]);function vm(e,t){let n=Y(t,_m),r=[[`circle`,{cx:`12`,cy:`9`,r:`1`}],[`circle`,{cx:`19`,cy:`9`,r:`1`}],[`circle`,{cx:`5`,cy:`9`,r:`1`}],[`circle`,{cx:`12`,cy:`15`,r:`1`}],[`circle`,{cx:`19`,cy:`15`,r:`1`}],[`circle`,{cx:`5`,cy:`15`,r:`1`}]];$(e,X({name:`grip-horizontal`},()=>n,{get iconNode(){return r}}))}var ym=new Set([`$$slots`,`$$events`,`$$legacy`]);function bm(e,t){let n=Y(t,ym),r=[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`}]];$(e,X({name:`hash`},()=>n,{get iconNode(){return r}}))}var xm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sm(e,t){let n=Y(t,xm),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 16v-4`}],[`path`,{d:`M12 8h.01`}]];$(e,X({name:`info`},()=>n,{get iconNode(){return r}}))}var Cm=new Set([`$$slots`,`$$events`,`$$legacy`]);function wm(e,t){let n=Y(t,Cm),r=[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`}]];$(e,X({name:`layers`},()=>n,{get iconNode(){return r}}))}var Tm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Em(e,t){let n=Y(t,Tm),r=[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`}],[`path`,{d:`M14 4h7`}],[`path`,{d:`M14 9h7`}],[`path`,{d:`M14 15h7`}],[`path`,{d:`M14 20h7`}]];$(e,X({name:`layout-list`},()=>n,{get iconNode(){return r}}))}var Dm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Om(e,t){let n=Y(t,Dm),r=[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`}]];$(e,X({name:`link-2`},()=>n,{get iconNode(){return r}}))}var km=new Set([`$$slots`,`$$events`,`$$legacy`]);function Am(e,t){let n=Y(t,km),r=[[`path`,{d:`M8 5h13`}],[`path`,{d:`M13 12h8`}],[`path`,{d:`M13 19h8`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`}]];$(e,X({name:`list-tree`},()=>n,{get iconNode(){return r}}))}var jm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Mm(e,t){let n=Y(t,jm),r=[[`path`,{d:`M3 5h.01`}],[`path`,{d:`M3 12h.01`}],[`path`,{d:`M3 19h.01`}],[`path`,{d:`M8 5h13`}],[`path`,{d:`M8 12h13`}],[`path`,{d:`M8 19h13`}]];$(e,X({name:`list`},()=>n,{get iconNode(){return r}}))}var Nm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Pm(e,t){let n=Y(t,Nm),r=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`m21 3-7 7`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M9 21H3v-6`}]];$(e,X({name:`maximize-2`},()=>n,{get iconNode(){return r}}))}var Fm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Im(e,t){let n=Y(t,Fm),r=[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}]];$(e,X({name:`message-square`},()=>n,{get iconNode(){return r}}))}var Lm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Rm(e,t){let n=Y(t,Lm),r=[[`path`,{d:`m14 10 7-7`}],[`path`,{d:`M20 10h-6V4`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M4 14h6v6`}]];$(e,X({name:`minimize-2`},()=>n,{get iconNode(){return r}}))}var zm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Bm(e,t){let n=Y(t,zm),r=[[`path`,{d:`M5 12h14`}]];$(e,X({name:`minus`},()=>n,{get iconNode(){return r}}))}var Vm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Hm(e,t){let n=Y(t,Vm),r=[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`}]];$(e,X({name:`monitor`},()=>n,{get iconNode(){return r}}))}var Um=new Set([`$$slots`,`$$events`,`$$legacy`]);function Wm(e,t){let n=Y(t,Um),r=[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`}]];$(e,X({name:`moon`},()=>n,{get iconNode(){return r}}))}var Gm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Km(e,t){let n=Y(t,Gm),r=[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`}],[`path`,{d:`M12 12V8`}]];$(e,X({name:`network`},()=>n,{get iconNode(){return r}}))}var qm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jm(e,t){let n=Y(t,qm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 15h18`}]];$(e,X({name:`panel-bottom`},()=>n,{get iconNode(){return r}}))}var Ym=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xm(e,t){let n=Y(t,Ym),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M9 3v18`}]];$(e,X({name:`panel-left`},()=>n,{get iconNode(){return r}}))}var Zm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Qm(e,t){let n=Y(t,Zm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M15 3v18`}]];$(e,X({name:`panel-right`},()=>n,{get iconNode(){return r}}))}var $m=new Set([`$$slots`,`$$events`,`$$legacy`]);function eh(e,t){let n=Y(t,$m),r=[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`}]];$(e,X({name:`pause`},()=>n,{get iconNode(){return r}}))}var th=new Set([`$$slots`,`$$events`,`$$legacy`]);function nh(e,t){let n=Y(t,th),r=[[`path`,{d:`M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4`}],[`rect`,{width:`10`,height:`7`,x:`12`,y:`13`,rx:`2`}]];$(e,X({name:`picture-in-picture-2`},()=>n,{get iconNode(){return r}}))}var rh=new Set([`$$slots`,`$$events`,`$$legacy`]);function ih(e,t){let n=Y(t,rh),r=[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`}]];$(e,X({name:`play`},()=>n,{get iconNode(){return r}}))}var ah=new Set([`$$slots`,`$$events`,`$$legacy`]);function oh(e,t){let n=Y(t,ah),r=[[`path`,{d:`M12 22v-5`}],[`path`,{d:`M15 8V2`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`}],[`path`,{d:`M9 8V2`}]];$(e,X({name:`plug`},()=>n,{get iconNode(){return r}}))}var sh=new Set([`$$slots`,`$$events`,`$$legacy`]);function ch(e,t){let n=Y(t,sh),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`M12 5v14`}]];$(e,X({name:`plus`},()=>n,{get iconNode(){return r}}))}var lh=new Set([`$$slots`,`$$events`,`$$legacy`]);function uh(e,t){let n=Y(t,lh),r=[[`path`,{d:`M19.07 4.93A10 10 0 0 0 6.99 3.34`}],[`path`,{d:`M4 6h.01`}],[`path`,{d:`M2.29 9.62A10 10 0 1 0 21.31 8.35`}],[`path`,{d:`M16.24 7.76A6 6 0 1 0 8.23 16.67`}],[`path`,{d:`M12 18h.01`}],[`path`,{d:`M17.99 11.66A6 6 0 0 1 15.77 16.67`}],[`circle`,{cx:`12`,cy:`12`,r:`2`}],[`path`,{d:`m13.41 10.59 5.66-5.66`}]];$(e,X({name:`radar`},()=>n,{get iconNode(){return r}}))}var dh=new Set([`$$slots`,`$$events`,`$$legacy`]);function fh(e,t){let n=Y(t,dh),r=[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}],[`path`,{d:`M8 16H3v5`}]];$(e,X({name:`refresh-cw`},()=>n,{get iconNode(){return r}}))}var ph=new Set([`$$slots`,`$$events`,`$$legacy`]);function mh(e,t){let n=Y(t,ph),r=[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]];$(e,X({name:`rotate-ccw`},()=>n,{get iconNode(){return r}}))}var hh=new Set([`$$slots`,`$$events`,`$$legacy`]);function gh(e,t){let n=Y(t,hh),r=[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}],[`path`,{d:`m16 16-1.9-1.9`}]];$(e,X({name:`scan-search`},()=>n,{get iconNode(){return r}}))}var _h=new Set([`$$slots`,`$$events`,`$$legacy`]);function vh(e,t){let n=Y(t,_h),r=[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}]];$(e,X({name:`scan`},()=>n,{get iconNode(){return r}}))}var yh=new Set([`$$slots`,`$$events`,`$$legacy`]);function bh(e,t){let n=Y(t,yh),r=[[`circle`,{cx:`6`,cy:`6`,r:`3`}],[`path`,{d:`M8.12 8.12 12 12`}],[`path`,{d:`M20 4 8.12 15.88`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}],[`path`,{d:`M14.8 14.8 20 20`}]];$(e,X({name:`scissors`},()=>n,{get iconNode(){return r}}))}var xh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sh(e,t){let n=Y(t,xh),r=[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]];$(e,X({name:`search`},()=>n,{get iconNode(){return r}}))}var Ch=new Set([`$$slots`,`$$events`,`$$legacy`]);function wh(e,t){let n=Y(t,Ch),r=[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`}]];$(e,X({name:`server`},()=>n,{get iconNode(){return r}}))}var Th=new Set([`$$slots`,`$$events`,`$$legacy`]);function Eh(e,t){let n=Y(t,Th),r=[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];$(e,X({name:`settings`},()=>n,{get iconNode(){return r}}))}var Dh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Oh(e,t){let n=Y(t,Dh),r=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}],[`path`,{d:`M12 8v4`}],[`path`,{d:`M12 16h.01`}]];$(e,X({name:`shield-alert`},()=>n,{get iconNode(){return r}}))}var kh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ah(e,t){let n=Y(t,kh),r=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}]];$(e,X({name:`shield`},()=>n,{get iconNode(){return r}}))}var jh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Mh(e,t){let n=Y(t,jh),r=[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`}],[`path`,{d:`M20 2v4`}],[`path`,{d:`M22 4h-4`}],[`circle`,{cx:`4`,cy:`20`,r:`2`}]];$(e,X({name:`sparkles`},()=>n,{get iconNode(){return r}}))}var Nh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ph(e,t){let n=Y(t,Nh),r=[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M12 20v2`}],[`path`,{d:`m4.93 4.93 1.41 1.41`}],[`path`,{d:`m17.66 17.66 1.41 1.41`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`m6.34 17.66-1.41 1.41`}],[`path`,{d:`m19.07 4.93-1.41 1.41`}]];$(e,X({name:`sun`},()=>n,{get iconNode(){return r}}))}var Fh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ih(e,t){let n=Y(t,Fh),r=[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`}]];$(e,X({name:`tag`},()=>n,{get iconNode(){return r}}))}var Lh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Rh(e,t){let n=Y(t,Lh),r=[[`path`,{d:`M12 19h8`}],[`path`,{d:`m4 17 6-6-6-6`}]];$(e,X({name:`terminal`},()=>n,{get iconNode(){return r}}))}var zh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Bh(e,t){let n=Y(t,zh),r=[[`path`,{d:`M10 11v6`}],[`path`,{d:`M14 11v6`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}],[`path`,{d:`M3 6h18`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}]];$(e,X({name:`trash-2`},()=>n,{get iconNode(){return r}}))}var Vh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Hh(e,t){let n=Y(t,Vh),r=[[`path`,{d:`M16 7h6v6`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`}]];$(e,X({name:`trending-up`},()=>n,{get iconNode(){return r}}))}var Uh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Wh(e,t){let n=Y(t,Uh),r=[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]];$(e,X({name:`triangle-alert`},()=>n,{get iconNode(){return r}}))}var Gh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Kh(e,t){let n=Y(t,Gh),r=[[`path`,{d:`M12 3v12`}],[`path`,{d:`m17 8-5-5-5 5`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}]];$(e,X({name:`upload`},()=>n,{get iconNode(){return r}}))}var qh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jh(e,t){let n=Y(t,qh),r=[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`}],[`circle`,{cx:`12`,cy:`7`,r:`4`}]];$(e,X({name:`user`},()=>n,{get iconNode(){return r}}))}var Yh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xh(e,t){let n=Y(t,Yh),r=[[`path`,{d:`M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2`}],[`path`,{d:`m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06`}],[`path`,{d:`m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8`}]];$(e,X({name:`webhook`},()=>n,{get iconNode(){return r}}))}var Zh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Qh(e,t){let n=Y(t,Zh),r=[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`}]];$(e,X({name:`workflow`},()=>n,{get iconNode(){return r}}))}var $h=new Set([`$$slots`,`$$events`,`$$legacy`]);function eg(e,t){let n=Y(t,$h),r=[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`}]];$(e,X({name:`wrench`},()=>n,{get iconNode(){return r}}))}var tg=new Set([`$$slots`,`$$events`,`$$legacy`]);function ng(e,t){let n=Y(t,tg),r=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]];$(e,X({name:`x`},()=>n,{get iconNode(){return r}}))}var rg=new Set([`$$slots`,`$$events`,`$$legacy`]);function ig(e,t){let n=Y(t,rg),r=[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`}]];$(e,X({name:`zap`},()=>n,{get iconNode(){return r}}))}function ag(e){let t=e-1;return t*t*t+1}function og(){return globalThis.window===void 0?null:window.documentPictureInPicture??null}function sg(){return og()!==null}var cg=null,lg=null;async function ug(e,t,{width:n=720,height:r=560}={}){let i=og();if(!i||cg)return!1;let a=await i.requestWindow({width:n,height:r});cg=a,a.document.title=e.ownerDocument.title||`autotel devtools`;let o=a.document.createElement(`style`);return o.textContent=`html,body{margin:0;padding:0;height:100%;width:100%;overflow:hidden;background:transparent}`,a.document.head.appendChild(o),lg=e.ownerDocument.createComment(`autotel-pip-placeholder`),e.replaceWith(lg),a.document.body.appendChild(e),a.addEventListener(`pagehide`,()=>fg(t),{once:!0}),!0}function dg(e){if(!cg)return;let t=cg;fg(e);try{t.close()}catch{}}function fg(e){let t=cg;if(!t)return;cg=null;let n=t.document.body.firstElementChild;n&&(lg?.isConnected?lg.replaceWith(n):document.body.appendChild(n)),lg=null,e?.()}var pg=[{fill:`#ede9fe`,stroke:`#8b5cf6`},{fill:`#ccfbf1`,stroke:`#14b8a6`},{fill:`#dbeafe`,stroke:`#3b82f6`},{fill:`#fef9c3`,stroke:`#ca8a04`},{fill:`#fce7f3`,stroke:`#db2777`},{fill:`#dcfce7`,stroke:`#16a34a`},{fill:`#ffedd5`,stroke:`#ea580c`},{fill:`#e0e7ff`,stroke:`#6366f1`}];function mg(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return pg[t%pg.length]}var hg=[{keys:[`1-6`],description:`Switch between tabs (Traces through Errors)`},{keys:[`?`],description:`Show/hide this shortcuts help`},{keys:[`Esc`],description:`Close shortcuts help / go back from trace detail`},{keys:[`/`],description:`Focus search filter`}],gg=[{keys:[`/`],description:`Focus search filter`},{keys:[`Esc`],description:`Clear selection / clear search`},{keys:[`CmdOrCtrl`,`A`],description:`Select all traces`},{keys:[`?`],description:`Show/hide keyboard shortcuts`}],_g=[{keys:[`Esc`],description:`Go back to trace list / close span detail`},{keys:[`w`],description:`Switch to waterfall view`},{keys:[`f`],description:`Switch to flame graph view`},{keys:[`l`],description:`Switch to list view`},{keys:[`↑`,`↓`,`Enter`],description:`Navigate spans / select in waterfall`},{keys:[`e`,`Shift+E`],description:`Next / previous error span`},{keys:[`/`],description:`Search spans in this trace`},{keys:[`?`],description:`Show/hide keyboard shortcuts`}];function vg(){let e=document.activeElement;if(!e)return!1;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||!!e.isContentEditable}function yg(e){return t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e())}}var bg=globalThis.navigator!==void 0&&/Mac|iPhone|iPad|iPod/.test(navigator.platform),xg=V(`<div class="border border-line rounded-lg p-3 bg-subtle"><div class="font-semibold text-fg"> </div> <div class="text-xs text-fg-subtle mt-0.5"> </div></div>`),Sg=V(`<div class="p-3 bg-danger-bg border border-danger-border rounded-md text-sm text-danger flex items-start gap-2"><!> <span> </span></div>`),Cg=V(`<p class="mb-1 last:mb-0"> </p>`),wg=V(`<div class="p-3 bg-accent/10 border border-accent/30 rounded-md text-sm text-accent"></div>`),Tg=V(`<div class="p-3 bg-success-bg border border-success-border rounded-md text-sm text-success"> </div>`),Eg=V(`<div class="fixed inset-0 z-[1100] flex items-center justify-center" role="dialog" aria-modal="true" aria-label="Import traces"><button type="button" aria-label="Close" class="absolute inset-0 bg-black/55 backdrop-blur-[2px] at-backdrop-in"></button> <div tabindex="-1" class="at-modal-in relative z-[1] w-[min(560px,92vw)] max-h-[85vh] overflow-hidden flex flex-col bg-surface rounded-lg shadow-xl border border-line outline-none"><div class="flex items-center justify-between px-4 py-3 border-b border-line bg-subtle flex-shrink-0"><span class="text-sm font-semibold text-fg">Import Traces</span> <button class="inline-flex items-center justify-center w-7 h-7 bg-transparent border border-line rounded text-sm text-fg-subtle hover:bg-danger-bg hover:border-danger-border hover:text-danger transition-colors" title="Close (Esc)"><!></button></div> <div class="overflow-y-auto p-4 flex flex-col gap-3"><label class="flex flex-col gap-2 text-sm text-fg-muted"><span class="font-semibold text-fg">JSON file</span> <span class="inline-flex items-center px-3 py-1.5 border border-line rounded text-sm text-fg-muted bg-surface hover:bg-subtle cursor-pointer w-fit transition-colors"><!> Choose file</span> <input type="file" accept=".json,application/json" class="hidden"/></label> <!> <!> <!> <!></div> <div class="flex items-center justify-end gap-3 px-4 py-3 border-t border-line bg-subtle flex-shrink-0"><button class="px-3 py-1.5 text-sm border border-line rounded bg-surface text-fg-muted hover:bg-subtle disabled:opacity-50 disabled:cursor-not-allowed transition-colors">Cancel</button> <button class="px-4 py-1.5 text-sm rounded bg-accent text-white hover:bg-accent/90 disabled:opacity-50 disabled:cursor-not-allowed transition-colors"> </button></div></div></div>`);function Dg(e,t){it(t,!0);function n(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}let r=N(null),i=N(!1),a=N(null),o=N(null),s=N(void 0);zr(()=>{let e=e=>{e.key===`Escape`&&(e.stopPropagation(),t.onclose())};return window.addEventListener(`keydown`,e),z(s)?.focus(),()=>window.removeEventListener(`keydown`,e)});let c=e=>{let t=e.target.files?.[0];t&&(P(r,t,!0),P(o,null),P(a,null))},l=async()=>{if(z(r)){P(i,!0),P(o,null);try{let e=await t.onimport(z(r));P(a,e,!0),e.errors.length>0&&P(o,e.errors.join(`; `),!0),e.imported>0&&e.errors.length===0&&setTimeout(t.onclose,1500)}catch(e){P(o,String(e),!0)}finally{P(i,!1)}}};var u=Eg(),d=F(u),f=L(d,2),p=F(f),m=L(F(p),2);ng(F(m),{size:14}),D(m),D(p);var h=L(p,2),g=F(h),_=L(F(g),2);Kh(F(_),{size:14,class:`mr-1.5`}),Ke(),D(_);var v=L(_,2);D(g);var y=L(g,2),b=e=>{var t=xg(),i=F(t),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(t),R(e=>{U(a,z(r).name),U(s,e)},[()=>n(z(r).size)]),H(e,t)};W(y,e=>{z(r)&&e(b)});var x=L(y,2),S=e=>{var t=Sg(),n=F(t);Wh(n,{size:14,class:`flex-shrink-0 mt-0.5`});var r=L(n,2),i=F(r,!0);D(r),D(t),R(()=>U(i,z(o))),H(e,t)};W(x,e=>{z(o)&&e(S)});var C=L(x,2),w=e=>{var t=wg();G(t,21,()=>z(a).warnings,Aa,(e,t)=>{var n=Cg(),r=F(n,!0);D(n),R(()=>U(r,z(t))),H(e,n)}),D(t),H(e,t)};W(C,e=>{z(a)&&z(a).warnings.length>0&&e(w)});var T=L(C,2),ee=e=>{var t=Tg(),n=F(t);D(t),R(()=>U(n,`Successfully imported ${z(a).imported??``} trace${z(a).imported===1?``:`s`}.`)),H(e,t)};W(T,e=>{z(a)&&z(a).imported>0&&e(ee)}),D(h);var te=L(h,2),ne=F(te),re=L(ne,2),ie=F(re,!0);D(re),D(te),D(f),Uo(f,e=>P(s,e),()=>z(s)),D(u),R(()=>{ne.disabled=z(i),re.disabled=!z(r)||z(i),U(ie,z(i)?`Importing...`:`Confirm Import`)}),B(`click`,d,function(...e){t.onclose?.apply(this,e)}),B(`click`,m,function(...e){t.onclose?.apply(this,e)}),B(`change`,v,c),B(`click`,ne,function(...e){t.onclose?.apply(this,e)}),B(`click`,re,l),H(e,u),at()}na([`click`,`change`]);function Og(e,t){if(t.length===0)return e.duration;let n=t.map(t=>[Math.max(t.startTime,e.startTime),Math.min(t.endTime,e.endTime)]).filter(([e,t])=>t>e).sort((e,t)=>e[0]-t[0]),r=0,i=-1/0,a=-1/0;for(let[e,t]of n)e>a?(a>i&&(r+=a-i),i=e,a=t):t>a&&(a=t);return a>i&&(r+=a-i),Math.max(0,e.duration-r)}function kg(e){let t=new Set;if(e.length===0)return t;let n=new Map;for(let t of e)n.set(t.spanId,t);let r=new Map;for(let t of e){let e=t.parentSpanId&&n.has(t.parentSpanId)?t.parentSpanId:``,i=r.get(e);i?i.push(t):r.set(e,[t])}let i=r.get(``)??[];if(i.length===0)return t;let a=e=>e.reduce((e,t)=>t.endTime>e.endTime?t:e),o=a(i);for(;o&&!t.has(o.spanId);){t.add(o.spanId);let e=r.get(o.spanId);o=e&&e.length?a(e):void 0}return t}function Ag(e,t=()=>!1){let n=[],r=(e,i,a)=>{e.forEach((o,s)=>{let c=s===e.length-1;n.push({node:o,connectors:{ancestorLines:[...i],isLast:c,depth:a}}),!(t(o)||o.children.length===0)&&r(o.children,[...i,!c],a+1)})};return r(e,[],0),n}function jg(e){if(e!==`local`)return e===`utc`?`UTC`:e}function Mg(e,t){try{return new Intl.DateTimeFormat(void 0,{...t,timeZone:jg(e)})}catch{return new Intl.DateTimeFormat(void 0,t)}}function Ng(e,t=`local`){return Mg(t,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}).format(new Date(e))}function Pg(e=`local`){return e===`utc`?`UTC`:Mg(e,{timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??`Local`}var Fg=2;function Ig(e,t,n){let r=[];for(let i=0;i<e.length;i++){let a=n>0?(e[i].timestamp-t)/n*100:0,o=Math.min(Math.max(a,0),100),s=r.find(e=>e.every(e=>Math.abs(o-e.posPercent)>Fg));s?s.push({index:i,posPercent:o}):r.push([{index:i,posPercent:o}])}return r}var Lg=new Set([`error`,`fatal`,`critical`]);function Rg(e){if(e.name===`exception`)return`exception`;let t=e.attributes?.level??e.attributes?.severity;return typeof t==`string`&&Lg.has(t.toLowerCase())?`exception`:`event`}var zg=V(`<span class="absolute inset-y-0 border-l border-line"></span>`),Bg=V(`<span class="relative shrink-0"><!></span>`),Vg=V(`<span class="relative shrink-0"><span></span> <span class="absolute top-1/2 border-t border-line"></span></span>`),Hg=V(`<span aria-hidden="true" data-testid="tree-gutter"><!> <!></span>`);function Ug(e,t){it(t,!0);let n=Z(t,`indent`,3,16);var r=Hg(),i=F(r);G(i,17,()=>t.ancestorLines,Aa,(e,t)=>{var r=Bg(),i=F(r),a=e=>{var t=zg();R(()=>co(t,`left:${n()/2}px`)),H(e,t)};W(i,e=>{z(t)&&e(a)}),D(r),R(()=>{co(r,`width:${n()??``}px`),J(r,`data-testid`,z(t)?`gutter-line`:`gutter-blank`)}),H(e,r)});var a=L(i,2),o=e=>{var r=Vg(),i=F(r),a=L(i,2);D(r),R(e=>{co(r,`width:${n()??``}px`),J(r,`data-testid`,t.isLast?`gutter-elbow`:`gutter-tee`),q(i,1,e),co(i,`left:${n()/2}px`),co(a,`left:${n()/2}px; width:${n()/2}px`)},[()=>K(Q(`absolute top-0 border-l border-line`,t.isLast?`h-1/2`:`inset-y-0`))]),H(e,r)};W(a,e=>{(t.ancestorLines.length>0||!t.isLast)&&e(o)}),D(r),R(e=>q(r,1,e),[()=>K(Q(`flex shrink-0 self-stretch`,t.class))]),H(e,r),at()}function Wg(e){let t=e.children.length;for(let n of e.children)t+=Wg(n);return t}function Gg(e,t){let n=t.startTime,r=t.duration||1,i=e.startTime-n,a=i/r*100,o=e.duration/r*100;return{offsetMs:i,offsetPercent:Math.max(0,Math.min(100,a)),widthPercent:Math.max(.5,Math.min(100-a,o))}}function Kg(e){switch(e){case`SERVER`:return`bg-blue-500`;case`CLIENT`:return`bg-green-500`;case`PRODUCER`:return`bg-purple-500`;case`CONSUMER`:return`bg-orange-500`;default:return`bg-gray-500`}}function qg(e){switch(e){case`SERVER`:return`bg-blue-400`;case`CLIENT`:return`bg-green-400`;case`PRODUCER`:return`bg-purple-400`;case`CONSUMER`:return`bg-orange-400`;default:return`bg-gray-400`}}var Jg=V(`<button class="p-0.5 hover:bg-hover rounded flex-shrink-0"><!></button>`),Yg=V(`<div class="w-4"></div>`),Xg=V(`<span class="text-xs text-fg-subtle ml-1"> </span>`),Zg=V(`<span class="absolute inset-0 flex items-center justify-center text-[10px] text-white font-medium"> </span>`),Qg=V(`<button type="button"></button>`),$g=V(`<div class="flex gap-2 py-0.5"><span class="text-fg-subtle flex-shrink-0"> </span> <span class="text-fg break-all"> </span></div>`),e_=V(`<div class="font-mono text-[11px] text-fg-muted bg-subtle rounded p-2 border border-line-subtle max-h-[160px] overflow-auto"></div>`),t_=V(`<div class="text-[11px] text-fg-subtle italic">No attributes</div>`),n_=V(`<div class="absolute z-30 top-[calc(100%-2px)] left-2 right-2 max-w-[420px] bg-surface border border-line rounded-md shadow-lg p-2.5 text-left at-modal-in"><div class="flex items-center gap-2 mb-1.5"><span></span> <span> </span> <span class="text-[10px] text-fg-subtle font-mono"> </span> <button type="button" class="p-0.5 hover:bg-hover rounded flex-shrink-0" aria-label="Close event detail"><!></button></div> <div class="text-[10px] text-fg-subtle font-mono mb-1.5"> </div> <!></div>`),r_=V(`<div><div class="w-[200px] shrink-0 pr-2 py-2 flex items-center gap-1 min-w-0"><!> <!> <!> <!> <!> <span> </span> <!></div> <div class="flex-1 relative"><div><!></div> <!> <!></div> <div class="w-[80px] shrink-0 px-2 py-2 text-right"><span> </span></div></div>`);function i_(e,t){it(t,!0);let n=M(()=>t.node.span),r=M(()=>Gg(z(n),t.trace)),i=M(()=>z(n).status.code===`ERROR`),a=M(()=>z(n).events&&z(n).events.length>0),o=M(()=>Ig(z(n).events??[],t.trace.startTime,t.trace.duration)),s=N(null),c=e=>{P(s,z(s)===e?null:e,!0)};zr(()=>{if(z(s)===null)return;let e=()=>{P(s,null)},t=t=>{t.key===`Escape`&&e()};return window.addEventListener(`click`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`click`,e),window.removeEventListener(`keydown`,t)}});var l=r_(),u=F(l),d=F(u),f=e=>{Ug(e,{get ancestorLines(){return t.connectors.ancestorLines},get isLast(){return t.connectors.isLast}})};W(d,e=>{t.connectors&&e(f)});var p=L(d,2),m=e=>{var n=Jg(),r=F(n),i=e=>{Ep(e,{size:12,class:`text-fg-subtle`})},a=e=>{Sp(e,{size:12,class:`text-fg-subtle`})};W(r,e=>{t.isCollapsed?e(i):e(a,-1)}),D(n),B(`click`,n,e=>{e.stopPropagation(),t.onToggleCollapse?.()}),H(e,n)},h=e=>{H(e,Yg())};W(p,e=>{t.hasChildren?e(m):e(h,-1)});var g=L(p,2),v=e=>{Op(e,{size:12,class:`text-danger flex-shrink-0`})};W(g,e=>{z(i)&&e(v)});var y=L(g,2),b=e=>{Sm(e,{size:10,class:`text-accent flex-shrink-0`})};W(y,e=>{z(a)&&e(b)});var x=L(y,2),S=e=>{ig(e,{size:10,class:`text-warning fill-warning flex-shrink-0`})};W(x,e=>{t.isCritical&&e(S)});var C=L(x,2),w=F(C,!0);D(C);var T=L(C,2),ee=e=>{var n=Xg(),r=F(n);D(n),R(e=>U(r,`(+${e??``})`),[()=>Wg(t.node)]),H(e,n)};W(T,e=>{t.isCollapsed&&t.node.children.length>0&&e(ee)}),D(u);var te=L(u,2),ne=F(te),re=F(ne),ie=e=>{var t=Zg(),r=F(t,!0);D(t),R(e=>U(r,e),[()=>ad(z(n).duration)]),H(e,t)};W(re,e=>{z(r).widthPercent>10&&e(ie)}),D(ne);var ae=L(ne,2);G(ae,17,()=>z(o),Aa,(e,r,i)=>{var a=da();G(I(a),17,()=>z(r),e=>e.index,(e,r)=>{let a=M(()=>z(n).events[z(r).index]),o=M(()=>28+i*8),l=M(()=>Rg(z(a))===`exception`);var u=Qg();R((e,t)=>{q(u,1,e),co(u,`left: ${z(r).posPercent}%; top: ${z(o)}px; transform: translateX(-50%);`),J(u,`title`,t),J(u,`aria-label`,`Event ${z(a).name}`)},[()=>K(Q(`absolute w-2.5 h-2.5 rounded-full border border-white z-10 cursor-pointer hover:scale-125 transition-transform`,z(l)?`bg-danger`:`bg-warning`,z(s)===z(r).index&&`ring-2 ring-accent scale-125`)),()=>`${z(a).name} at ${ad(z(a).timestamp-t.trace.startTime)} — click for detail`]),B(`click`,u,e=>{e.stopPropagation(),c(z(r).index)}),H(e,u)}),H(e,a)});var oe=L(ae,2),se=e=>{let r=M(()=>z(n).events[z(s)]),i=M(()=>Rg(z(r))===`exception`);var a=n_(),o=F(a),c=F(o),l=L(c,2),u=F(l,!0);D(l);var d=L(l,2),f=F(d);D(d);var p=L(d,2);ng(F(p),{size:12,class:`text-fg-subtle`}),D(p),D(o);var m=L(o,2),h=F(m,!0);D(m);var g=L(m,2),v=e=>{var t=e_();G(t,21,()=>Object.entries(z(r).attributes),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=$g(),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,r()),U(l,e)},[()=>typeof i()==`object`?JSON.stringify(i()):String(i())]),H(e,a)}),D(t),H(e,t)},y=M(()=>z(r).attributes&&Object.keys(z(r).attributes).length>0),b=e=>{H(e,t_())};W(g,e=>{z(y)?e(v):e(b,-1)}),D(a),R((e,t,n,i)=>{q(c,1,e),q(l,1,t),U(u,z(r).name),U(f,`+${n??``}`),U(h,i)},[()=>K(Q(`w-2 h-2 rounded-full flex-shrink-0`,z(i)?`bg-danger`:`bg-warning`)),()=>K(Q(`text-xs font-medium flex-1 truncate`,z(i)?`text-danger`:`text-fg`)),()=>ad(z(r).timestamp-t.trace.startTime),()=>Ng(z(r).timestamp,Hu.value)]),B(`click`,a,e=>e.stopPropagation()),B(`click`,p,e=>{e.stopPropagation(),P(s,null)}),H(e,a)};W(oe,e=>{z(s)!==null&&z(n).events?.[z(s)]&&e(se)}),D(te);var ce=L(te,2),le=F(ce),E=F(le,!0);D(le),D(ce),D(l),R((e,i,a,o,s,c,d)=>{J(l,`id`,`waterfall-row-${z(n).spanId}`),q(l,1,e),co(u,t.connectors?`padding-left: 8px;`:`padding-left: ${8+t.node.depth*16}px;`),q(C,1,i),J(C,`title`,z(n).name),U(w,z(n).name||`unknown`),co(te,a),q(ne,1,o),co(ne,`left: ${z(r).offsetPercent}%; width: ${z(r).widthPercent}%; top: 6px; min-width: 4px;`),J(ne,`title`,s),q(le,1,c),U(E,d)},[()=>K(Q(`flex items-center border-b border-line-subtle hover:bg-accent/5 cursor-pointer transition-colors`,t.isSelected&&`bg-accent/10 hover:bg-accent/15`,z(i)&&`bg-danger-bg/40 hover:bg-danger-bg/60`,t.isCritical&&`border-l-2 border-l-warning`)),()=>K(Q(`text-xs truncate`,z(i)?`text-danger`:`text-fg`)),()=>`height: ${Math.max(32,30+z(o).length*8)}px;`,()=>K(Q(`absolute h-5 rounded-sm transition-colors group`,z(i)?`bg-danger`:Kg(z(n).kind),t.isSelected&&(z(i)?`bg-danger`:qg(z(n).kind)))),()=>`${z(n).name}: ${ad(z(n).duration)}`,()=>K(Q(`text-xs font-mono`,z(i)?`text-danger`:`text-fg-muted`)),()=>ad(z(n).duration)]),B(`click`,l,()=>t.onSelect?.()),H(e,l),at()}na([`click`]);function a_(e){let t=new Map,n=[],r=new Map;for(let n of e)t.set(n.spanId,{span:n,children:[],depth:0});for(let i of e){let e=t.get(i.spanId);if(i.parentSpanId){let n=t.get(i.parentSpanId);if(n)n.children.push(e);else{let t=r.get(i.parentSpanId)||[];t.push(e),r.set(i.parentSpanId,t)}}else n.push(e)}let i=(e,t,n=new Set)=>{if(!n.has(e.span.spanId)){n.add(e.span.spanId),e.depth=t;for(let r of e.children)i(r,t+1,new Set(n))}};for(let[t,i]of r){i.sort((e,t)=>e.span.startTime-t.span.startTime);let r=Math.min(...i.map(e=>e.span.startTime)),a=Math.max(...i.map(e=>e.span.endTime)),o=e.find(e=>e.spanId===t),s={span:{spanId:t,traceId:i[0].span.traceId,parentSpanId:o?.parentSpanId||void 0,name:`(missing)`,kind:`INTERNAL`,startTime:r,endTime:a,duration:a-r,attributes:{},status:{code:`UNSET`},events:[]},children:i,depth:0};n.push(s)}for(let e of n)i(e,0);let a=e=>{e.sort((e,t)=>e.span.startTime-t.span.startTime);for(let t of e)a(t.children)};return a(n),n}var o_=V(`<div class="absolute text-[10px] whitespace-nowrap tabular-nums"> </div>`),s_=V(`<div class="absolute top-0 bottom-0 border-l border-line-subtle"></div>`),c_=V(`<div></div>`),l_=V(`<div><!></div>`),u_=V(`<div class="px-3 py-6 text-center text-xs text-fg-subtle"> </div>`),d_=V(`<div class="flex items-center gap-1"><div></div> <span class="text-fg-muted"> </span></div>`),f_=V(`<div class="flex flex-col h-full"><div class="flex border-b border-line bg-subtle text-xs text-fg-subtle"><div class="w-[200px] shrink-0 px-3 py-2 font-medium text-fg-muted">Span Name</div> <div class="flex-1 relative py-2"></div> <div class="w-[80px] shrink-0 px-2 py-2 text-right font-medium text-fg-muted">Duration</div></div> <div class="flex-1 overflow-auto relative"><div class="absolute inset-0 pointer-events-none"></div> <div class="relative"><!> <!> <!> <!></div></div> <div class="flex items-center gap-4 px-3 py-2 border-t border-line bg-subtle text-xs"><span class="text-fg-subtle font-medium">Kind:</span> <!> <button title="Highlight the spans that determine total trace latency"><!> Critical path</button></div></div>`);function p_(e,t){it(t,!0);let n=Z(t,`selectedSpanId`,3,null),r=Z(t,`query`,3,``),i=M(()=>{let e=r().trim().toLowerCase();if(!e)return new Set;let n=new Set,i=(t.trace.service?.toLowerCase()??``).includes(e);for(let r of t.trace.spans)(i||r.name?.toLowerCase().includes(e))&&n.add(r.spanId);return n}),a=M(()=>r().trim().length>0);zr(()=>{t.onMatchCount?.(z(i).size)});let o=N(yr(new Set)),s=N(!0),c=N(void 0),l=N(0),u=N(void 0),d=N(0),f=N(0),p=M(()=>kg(t.trace.spans));zr(()=>{let e=z(c);if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(e=>{P(l,e[0].contentRect.width,!0)});return t.observe(e),()=>t.disconnect()});let m=M(()=>a_(t.trace.spans)),h=M(()=>Ag(z(m),e=>z(o).has(e.span.spanId))),g=M(()=>z(h).map(e=>e.node)),_=M(()=>z(h).length<300||z(f)===0?{start:0,end:z(h).length}:{start:Math.max(0,Math.floor(z(d)/34)-12),end:Math.min(z(h).length,Math.ceil((z(d)+z(f))/34)+12)}),v=M(()=>z(h).slice(z(_).start,z(_).end));zr(()=>{let e=z(u);if(!e||typeof ResizeObserver>`u`)return;P(f,e.clientHeight,!0);let t=new ResizeObserver(()=>{P(f,e.clientHeight,!0)});return t.observe(e),()=>t.disconnect()});function y(e){if(!z(u)||z(h).length<300)return;let t=e*34,n=t+34;t<z(u).scrollTop?z(u).scrollTop=t:n>z(u).scrollTop+z(u).clientHeight&&(z(u).scrollTop=n-z(u).clientHeight),P(d,z(u).scrollTop,!0)}let b=e=>{if($c.value||vg()||e.key!==`ArrowUp`&&e.key!==`ArrowDown`&&e.key!==`Enter`)return;e.preventDefault();let r=z(g).findIndex(e=>e.span.spanId===n()),i;if(e.key===`ArrowUp`)i=r>0?r-1:z(g).length-1;else if(e.key===`ArrowDown`)i=r<z(g).length-1?r+1:0;else{if(r>=0){t.onSpanSelect?.(z(g)[r].span);return}i=0}let a=z(g)[i];a&&(t.onSpanSelect?.(a.span),y(i),document.getElementById(`waterfall-row-${a.span.spanId}`)?.scrollIntoView({block:`nearest`}))};zr(()=>(z(g),n(),window.addEventListener(`keydown`,b),()=>window.removeEventListener(`keydown`,b))),zr(()=>{let e=n();e&&Ii(()=>{let n=new Map(t.trace.spans.map(e=>[e.spanId,e])),r=new Set(z(o)),i=!1,a=n.get(e)?.parentSpanId;for(;a;)r.delete(a)&&(i=!0),a=n.get(a)?.parentSpanId;i&&P(o,r,!0);let s=z(h).findIndex(t=>t.node.span.spanId===e);s>=0&&y(s),requestAnimationFrame(()=>document.getElementById(`waterfall-row-${e}`)?.scrollIntoView({block:`center`}))})});let x=e=>{let t=new Set(z(o));t.has(e)?t.delete(e):t.add(e),P(o,t,!0)},S=e=>t.trace.spans.some(t=>t.parentSpanId===e),C=M(()=>{let e=t.trace.duration||1,n=z(l)>0?Math.min(8,Math.max(2,Math.floor(z(l)/90))):5,r=[];for(let t=0;t<=n;t++)r.push({percent:t/n*100,label:ad(t/n*e),align:t===0?`start`:t===n?`end`:`mid`});return r}),w=[`SERVER`,`CLIENT`,`INTERNAL`,`PRODUCER`,`CONSUMER`];var T=f_(),ee=F(T),te=L(F(ee),2);G(te,21,()=>z(C),Aa,(e,t)=>{var n=o_(),r=F(n,!0);D(n),R(()=>{co(n,`left: ${z(t).percent}%; transform: ${z(t).align===`start`?`translateX(0)`:z(t).align===`end`?`translateX(-100%)`:`translateX(-50%)`};`),U(r,z(t).label)}),H(e,n)}),D(te),Uo(te,e=>P(c,e),()=>z(c)),Ke(2),D(ee);var ne=L(ee,2),re=F(ne);co(re,`left: 200px; right: 80px;`),G(re,21,()=>z(C),Aa,(e,t)=>{var n=s_();R(()=>co(n,`left: ${z(t).percent}%;`)),H(e,n)}),D(re);var ie=L(re,2),ae=F(ie),oe=e=>{var t=c_();R(()=>co(t,`height: ${z(_).start*34}px`)),H(e,t)};W(ae,e=>{z(_).start>0&&e(oe)});var se=L(ae,2);G(se,17,()=>z(v),({node:e,connectors:t})=>e.span.spanId,(e,r)=>{let c=()=>z(r).node,l=()=>z(r).connectors,u=M(()=>z(i).has(c().span.spanId));var d=l_(),f=F(d);{let e=M(()=>n()===c().span.spanId),r=M(()=>z(o).has(c().span.spanId)),i=M(()=>S(c().span.spanId)),a=M(()=>z(s)&&z(p).has(c().span.spanId));i_(f,{get node(){return c()},get trace(){return t.trace},get isSelected(){return z(e)},get isCollapsed(){return z(r)},get hasChildren(){return z(i)},get isCritical(){return z(a)},get connectors(){return l()},onSelect:()=>t.onSpanSelect?.(c().span),onToggleCollapse:()=>x(c().span.spanId)})}D(d),R(e=>q(d,1,e),[()=>K(Q(`transition-opacity`,z(a)&&!z(u)&&`opacity-40`,z(a)&&z(u)&&`ring-1 ring-inset ring-accent rounded-sm`))]),H(e,d)});var ce=L(se,2),le=e=>{var t=c_();R(()=>co(t,`height: ${(z(h).length-z(_).end)*34}px`)),H(e,t)};W(ce,e=>{z(_).end<z(h).length&&e(le)});var E=L(ce,2),ue=e=>{var t=u_(),n=F(t);D(t),R(e=>U(n,`No spans match “${e??``}”.`),[()=>r().trim()]),H(e,t)};W(E,e=>{z(a)&&z(i).size===0&&e(ue)}),D(ie),D(ne),Uo(ne,e=>P(u,e),()=>z(u));var de=L(ne,2),fe=L(F(de),2);G(fe,16,()=>w,e=>e,(e,t)=>{var n=d_(),r=F(n),i=L(r,2),a=F(i,!0);D(i),D(n),R(e=>{q(r,1,e),U(a,t)},[()=>K(Q(`w-3 h-3 rounded-sm`,Kg(t)))]),H(e,n)});var pe=L(fe,2);ig(F(pe),{size:11}),Ke(),D(pe),D(de),D(T),R(e=>q(pe,1,e),[()=>K(Q(`ml-auto flex items-center gap-1 px-1.5 py-0.5 rounded border transition-colors`,z(s)?`bg-warning-bg text-warning border-warning-border`:`text-fg-subtle border-line hover:bg-hover`))]),ta(`scroll`,ne,e=>P(d,e.currentTarget.scrollTop,!0)),B(`click`,pe,()=>P(s,!z(s))),H(e,T),at()}na([`click`]);function m_(e,t){let n=new Map,r=[],i=t.duration||1,a=t.startTime;for(let t of e){let e=(t.startTime-a)/i*100,r=t.duration/i*100;n.set(t.spanId,{span:t,children:[],depth:0,x:Math.max(0,e),width:Math.max(.5,Math.min(100-e,r))})}for(let t of e){let e=n.get(t.spanId);if(t.parentSpanId){let i=n.get(t.parentSpanId);i?(i.children.push(e),e.depth=i.depth+1):r.push(e)}else r.push(e)}let o=e=>{e.sort((e,t)=>e.span.startTime-t.span.startTime);for(let t of e)o(t.children)};return o(r),r}function h_(e){let t=[],n=e=>{t.push(e),e.children.forEach(n)};return e.forEach(n),t}function g_(e){let t=0,n=e=>{t=Math.max(t,e.depth),e.children.forEach(n)};return e.forEach(n),t}function __(e,t,n){let r=n.find(e=>e.spanId===t);if(!r)return e;let i=r.startTime,a=r.duration||1,o=(e,t)=>{let r=n.find(t=>t.spanId===e);return r?r.parentSpanId===t?!0:r.parentSpanId?o(r.parentSpanId,t):!1:!1},s=e=>{if(!(e.span.spanId===t||o(e.span.spanId,t)))return{...e,x:-100,width:0,children:e.children.map(s)};let n=(e.span.startTime-i)/a*100,r=e.span.duration/a*100;return{...e,x:Math.max(0,n),width:Math.max(.5,Math.min(100-Math.max(0,n),r)),children:e.children.map(s)}};return e.map(s)}function v_(e){if(e.status.code===`ERROR`)return`bg-red-500 hover:bg-red-400`;switch(e.kind){case`SERVER`:return`bg-blue-500 hover:bg-blue-400`;case`CLIENT`:return`bg-green-500 hover:bg-green-400`;case`PRODUCER`:return`bg-purple-500 hover:bg-purple-400`;case`CONSUMER`:return`bg-orange-500 hover:bg-orange-400`;default:return`bg-gray-500 hover:bg-gray-400`}}function y_(e){return e.status.code===`ERROR`?`ring-2 ring-danger`:`ring-2 ring-accent`}var b_=V(`<div class="absolute inset-0 flex items-center px-1.5 overflow-hidden"><span class="text-[10px] text-white font-medium truncate"> </span></div>`),x_=V(`<div role="button" tabindex="-1"><!></div>`),S_=V(`<span class="flex items-center gap-2"><span class="font-medium">Zoomed:</span> <span class="truncate max-w-[200px]"> </span></span>`),C_=V(`<span>Click a span to zoom in, double-click to select</span>`),w_=V(`<button class="p-1.5 hover:bg-hover rounded transition-colors flex items-center gap-1 text-xs text-fg-muted" title="Reset zoom"><!> Reset</button>`),T_=V(`<div class="absolute left-0 right-0"></div>`),E_=V(`<div class="flex items-center gap-1 mt-1 text-danger"><!> <span>Error</span></div>`),D_=V(`<div class="absolute z-50 pointer-events-none"><div class="bg-surface text-fg text-xs rounded-md shadow-lg p-2 max-w-[200px]"><div class="font-medium truncate mb-1"> </div> <div class="flex items-center gap-2 text-fg-muted"><span> </span> <span>|</span> <span> </span></div> <!></div></div>`),O_=V(`<div class="flex items-center gap-1"><div></div> <span class="text-fg-muted"> </span></div>`),k_=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between px-3 py-2 border-b border-line bg-subtle"><div class="text-xs text-fg-muted"><!></div> <div class="flex items-center gap-1"><!></div></div> <div class="flex-1 overflow-auto p-4 relative" role="presentation"><div class="relative w-full"></div> <!></div> <div class="flex items-center gap-4 px-3 py-2 border-t border-line bg-subtle text-xs"><span class="text-fg-subtle font-medium">Kind:</span> <!> <div class="flex items-center gap-1 ml-2"><div class="w-3 h-3 rounded-sm bg-red-500"></div> <span class="text-fg-muted">ERROR</span></div></div></div>`);function A_(e,t){it(t,!0);let n=(e,n=p,r=p,i=p)=>{let a=M(()=>{let{span:e,x:t,width:r}=n();return{span:e,x:t,width:r}});var o=da(),s=I(o),c=e=>{var n=x_(),i=M(()=>yg(()=>f(z(a).span.spanId))),o=F(n),s=e=>{var t=b_(),n=F(t),r=F(n,!0);D(n),D(t),R(()=>U(r,z(a).span.name)),H(e,t)};W(o,e=>{z(a).width>5&&e(s)}),D(n),R((e,t)=>{q(n,1,e),co(n,`left: ${z(a).x??``}%; width: ${z(a).width??``}%; height: 24px; min-width: 4px;`),J(n,`title`,t)},[()=>K(Q(`absolute cursor-pointer transition-all`,v_(z(a).span),r()&&y_(z(a).span),`rounded-sm`)),()=>`${z(a).span.name}: ${ad(z(a).span.duration)}`]),B(`click`,n,()=>f(z(a).span.spanId)),B(`keydown`,n,function(...e){z(i)?.apply(this,e)}),B(`dblclick`,n,()=>t.onSpanSelect?.(z(a).span)),B(`mousemove`,n,e=>h(e,z(a).span)),ta(`mouseleave`,n,g),H(e,n)};W(s,e=>{z(a).width<=0||z(a).x<0||e(c)}),H(e,o)},r=N(yr({focusedSpanId:null})),i=N(null),a=N(yr({x:0,y:0})),o=N(void 0),s=M(()=>m_(t.trace.spans,t.trace)),c=M(()=>z(r).focusedSpanId?__(z(s),z(r).focusedSpanId,t.trace.spans):z(s)),l=M(()=>h_(z(c))),u=M(()=>g_(z(c))),d=M(()=>{let e=new Map;for(let t of z(l))if(t.width>0){let n=e.get(t.depth)||[];n.push(t),e.set(t.depth,n)}return e}),f=e=>{P(r,{focusedSpanId:e},!0)},m=()=>{P(r,{focusedSpanId:null},!0)},h=(e,t)=>{if(z(o)){let t=z(o).getBoundingClientRect();P(a,{x:e.clientX-t.left,y:e.clientY-t.top},!0)}P(i,t,!0)},g=()=>{P(i,null)},v=M(()=>(z(u)+1)*26+20);var y=k_(),b=F(y),x=F(b),S=F(x),C=e=>{var n=S_(),i=L(F(n),2),a=F(i,!0);D(i),D(n),R(e=>U(a,e),[()=>t.trace.spans.find(e=>e.spanId===z(r).focusedSpanId)?.name]),H(e,n)},w=e=>{H(e,C_())};W(S,e=>{z(r).focusedSpanId?e(C):e(w,-1)}),D(x);var T=L(x,2),ee=F(T),te=e=>{var t=w_();mh(F(t),{size:14}),Ke(),D(t),B(`click`,t,m),H(e,t)};W(ee,e=>{z(r).focusedSpanId&&e(te)}),D(T),D(b);var ne=L(b,2),re=F(ne);G(re,21,()=>[...z(d).entries()],([e,t])=>e,(e,r)=>{var a=M(()=>_(z(r),2));let o=()=>z(a)[0],s=()=>z(a)[1];var c=T_();G(c,21,s,e=>e.span.spanId,(e,r)=>{n(e,()=>z(r),()=>t.selectedSpanId===z(r).span.spanId,()=>z(i)?.spanId===z(r).span.spanId)}),D(c),R(()=>co(c,`top: ${o()*26}px;`)),H(e,c)}),D(re);var ie=L(re,2),ae=e=>{var t=D_(),n=F(t),r=F(n),s=F(r,!0);D(r);var c=L(r,2),l=F(c),u=F(l,!0);D(l);var d=L(l,4),f=F(d,!0);D(d),D(c);var p=L(c,2),m=e=>{var t=E_();Op(F(t),{size:10}),Ke(2),D(t),H(e,t)};W(p,e=>{z(i).status.code===`ERROR`&&e(m)}),D(n),D(t),R((e,n)=>{co(t,`left: ${e??``}px; top: ${z(a).y+10}px;`),U(s,z(i).name),U(u,n),U(f,z(i).kind)},[()=>Math.min(z(a).x+10,(z(o)?.clientWidth||300)-220),()=>ad(z(i).duration)]),H(e,t)};W(ie,e=>{z(i)&&e(ae)}),D(ne),Uo(ne,e=>P(o,e),()=>z(o));var oe=L(ne,2);G(L(F(oe),2),16,()=>[`SERVER`,`CLIENT`,`INTERNAL`,`PRODUCER`,`CONSUMER`],e=>e,(e,t)=>{var n=O_(),r=F(n),i=L(r,2),a=F(i,!0);D(i),D(n),R(e=>{q(r,1,e),U(a,t)},[()=>K(Q(`w-3 h-3 rounded-sm`,t===`SERVER`&&`bg-blue-500`,t===`CLIENT`&&`bg-green-500`,t===`PRODUCER`&&`bg-purple-500`,t===`CONSUMER`&&`bg-orange-500`,t===`INTERNAL`&&`bg-gray-500`))]),H(e,n)}),Ke(2),D(oe),D(y),R(()=>co(re,`height: ${z(v)??``}px; min-width: 100%;`)),ta(`mouseleave`,ne,g),H(e,y),at()}na([`click`,`keydown`,`dblclick`,`mousemove`]);function j_(e){if(typeof e==`object`&&e)return e;if(typeof e!=`string`)return null;let t=e.trim();if(t.length<2)return null;let n=t[0];if(n!==`{`&&n!==`[`)return null;try{let e=JSON.parse(t);return typeof e==`object`&&e?e:null}catch{return null}}var M_=V(`<div class="relative group"><!> <button title="Copy"><!></button></div>`);function N_(e,t){it(t,!0);let n=N(!1);async function r(){try{await navigator.clipboard.writeText(t.content),P(n,!0),setTimeout(()=>P(n,!1),2e3)}catch(e){console.error(`Failed to copy:`,e)}}var i=M_(),a=F(i);za(a,()=>t.children);var o=L(a,2),s=F(o),c=e=>{bp(e,{size:14,class:`text-success`})},l=e=>{Rp(e,{size:14,class:`text-fg-muted`})};W(s,e=>{z(n)?e(c):e(l,-1)}),D(o),D(i),R(e=>q(o,1,e),[()=>K(Q(`absolute top-2 right-2 p-1.5 rounded-md`,`bg-surface border border-line shadow-sm`,`opacity-0 group-hover:opacity-100 transition-opacity`,`hover:bg-subtle`))]),B(`click`,o,r),H(e,i),at()}na([`click`]);var P_=V(`<button type="button" class="absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-fg-subtle hover:text-fg-muted"><!></button>`),F_=V(`<div><!> <input/> <!></div>`);function I_(e,t){it(t,!0);let n=Z(t,`value`,15),r=Z(t,`clearTitle`,3,`Clear filter`),i=Z(t,`class`,3,`flex-1`),a=Z(t,`inputClass`,3,`border-line focus:border-line`),o=Z(t,`ref`,15,null);function s(e){n(e),t.onValue?.(e)}var c=F_(),l=F(c);Sh(l,{size:12,class:`absolute left-2 top-1/2 -translate-y-1/2 text-fg-subtle`});var u=L(l,2);Co(u),Uo(u,e=>o(e),()=>o());var d=L(u,2),f=e=>{var t=P_();ng(F(t),{size:12}),D(t),R(()=>J(t,`title`,r())),B(`click`,t,()=>s(``)),H(e,t)};W(d,e=>{n()&&e(f)}),D(c),R((e,r)=>{q(c,1,e),wo(u,n()),J(u,`placeholder`,t.placeholder),J(u,`aria-label`,t.ariaLabel),q(u,1,r)},[()=>K(Q(`relative`,i())),()=>K(Q(`w-full pl-7 pr-7 py-1 text-xs rounded border focus:outline-none`,a()))]),B(`input`,u,e=>s(e.currentTarget.value)),H(e,c),at()}na([`input`,`click`]);function L_(e,t){return!e||t.some(t=>t!=null&&String(t).toLowerCase().includes(e))}var R_=V(`<span class="text-fg-subtle"> </span>`),z_=V(`<div class="flex gap-1 leading-5"><!> <span> </span></div>`),B_=V(`<span class="text-fg-subtle opacity-70"> </span>`),V_=V(`<div class="pl-3 ml-1 border-l border-line-subtle"><!> <div class="text-fg-subtle"> </div></div>`),H_=V(`<div class="leading-5"><button class="inline-flex items-center gap-1 hover:bg-hover rounded px-0.5"><!> <!> <span class="text-fg-subtle"> </span> <!></button> <!></div>`);function U_(e,t){it(t,!0);function n(e){if(e===null)return`text-fg-subtle`;switch(typeof e){case`string`:return`text-green-600`;case`number`:return`text-blue-600`;case`boolean`:return`text-purple-600`;default:return`text-fg`}}function r(e){return e===null?`null`:typeof e==`string`?`"${e}"`:String(e)}let i=M(()=>t.value!==null&&typeof t.value==`object`),a=N(t.depth<2),o=M(()=>Array.isArray(t.value)),s=M(()=>z(o)?t.value.map((e,t)=>[String(t),e]):Object.entries(t.value)),c=M(()=>z(o)?`[`:`{`),l=M(()=>z(o)?`]`:`}`),u=M(()=>`${z(s).length} ${z(o)?`items`:`keys`}`);var d=da(),f=I(d),p=e=>{var i=z_(),a=F(i),o=e=>{var n=R_(),r=F(n);D(n),R(()=>U(r,`${t.label??``}:`)),H(e,n)};W(a,e=>{t.label!==void 0&&e(o)});var s=L(a,2),c=F(s,!0);D(s),D(i),R((e,t)=>{q(s,1,e),U(c,t)},[()=>K(Q(`break-all`,n(t.value))),()=>r(t.value)]),H(e,i)},m=e=>{var n=H_(),r=F(n),i=F(r),o=e=>{Sp(e,{size:10})},d=e=>{Ep(e,{size:10})};W(i,e=>{z(a)?e(o):e(d,-1)});var f=L(i,2),p=e=>{var n=R_(),r=F(n);D(n),R(()=>U(r,`${t.label??``}:`)),H(e,n)};W(f,e=>{t.label!==void 0&&e(p)});var m=L(f,2),h=F(m,!0);D(m);var g=L(m,2),v=e=>{var t=B_(),n=F(t,!0);D(t),R(()=>U(n,z(u))),H(e,t)};W(g,e=>{z(a)||e(v)}),D(r);var y=L(r,2),b=e=>{var n=V_(),r=F(n);G(r,17,()=>z(s),([e,t])=>e,(e,n)=>{var r=M(()=>_(z(n),2));let i=()=>z(r)[0],a=()=>z(r)[1];{let n=M(()=>t.depth+1);U_(e,{get label(){return i()},get value(){return a()},get depth(){return z(n)}})}});var i=L(r,2),a=F(i,!0);D(i),D(n),R(()=>U(a,z(l))),H(e,n)};W(y,e=>{z(a)&&e(b)}),D(n),R(()=>U(h,z(a)?z(c):`${z(c)}…${z(l)}`)),B(`click`,r,()=>P(a,!z(a))),H(e,n)};W(f,e=>{z(i)?e(m,-1):e(p)}),H(e,d),at()}na([`click`]);var W_=V(`<div class="font-mono text-xs text-fg"><!></div>`);function G_(e,t){var n=W_();U_(F(n),{get value(){return t.data},depth:0}),D(n),H(e,n)}var K_=V(`<button type="button" class="font-mono text-accent hover:underline truncate flex-1 text-left cursor-pointer"> </button>`),q_=V(`<code class="font-mono text-fg-muted truncate flex-1"> </code>`),J_=V(`<div class="flex items-center gap-2"><span class="text-fg-subtle w-24 flex-shrink-0"> </span> <!> <button class="p-1 hover:bg-hover rounded transition-colors flex-shrink-0" title="Copy to clipboard"><!></button></div>`);function Y_(e,t){let n=N(!1),r=async()=>{await navigator.clipboard.writeText(t.value),P(n,!0),setTimeout(()=>P(n,!1),2e3)};var i=J_(),a=F(i),o=F(a);D(a);var s=L(a,2),c=e=>{var n=K_(),r=F(n,!0);D(n),R(()=>{J(n,`title`,t.activateTitle??`Open`),U(r,t.value)}),B(`click`,n,function(...e){t.onActivate?.apply(this,e)}),H(e,n)},l=e=>{var n=q_(),r=F(n,!0);D(n),R(()=>U(r,t.value)),H(e,n)};W(s,e=>{t.onActivate?e(c):e(l,-1)});var u=L(s,2),d=F(u),f=e=>{bp(e,{size:12,class:`text-success`})},p=e=>{Rp(e,{size:12,class:`text-fg-subtle`})};W(d,e=>{z(n)?e(f):e(p,-1)}),D(u),D(i),R(()=>U(o,`${t.label??``}:`)),B(`click`,u,r),H(e,i)}na([`click`]);var X_=V(`<button type="button"><!></button>`);function Z_(e,t){it(t,!0);let n=Z(t,`label`,3,`Copy`),r=Z(t,`size`,3,12),i=Z(t,`class`,3,``),a=Z(t,`stop`,3,!0),o=N(!1);async function s(e){a()&&(e.stopPropagation(),e.preventDefault());try{await navigator.clipboard.writeText(t.value),P(o,!0),setTimeout(()=>P(o,!1),1500)}catch(e){console.error(`[autotel-devtools] copy failed:`,e)}}var c=X_(),l=F(c),u=e=>{bp(e,{get size(){return r()},class:`text-success`})},d=e=>{Rp(e,{get size(){return r()}})};W(l,e=>{z(o)?e(u):e(d,-1)}),D(c),R(e=>{J(c,`title`,z(o)?`Copied!`:n()),J(c,`aria-label`,n()),q(c,1,e)},[()=>K(Q(`inline-flex items-center justify-center p-1 rounded flex-shrink-0`,`text-fg-subtle hover:text-fg hover:bg-hover transition-colors`,i()))]),B(`click`,c,s),H(e,c),at()}na([`click`]);function Q_(e){return`'${e.replaceAll(`'`,`'\\''`)}'`}function $_(e){if(typeof e==`string`&&e.length>0)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e)}function ev(e){let t=$_(e[`url.full`])??$_(e[`http.url`]);if(t)return t;let n=$_(e[`server.address`])??$_(e[`net.peer.name`]),r=$_(e[`url.path`])??$_(e[`http.target`]);if(!n||!r)return;let i=$_(e[`url.scheme`])??`https`,a=$_(e[`server.port`]),o=$_(e[`url.query`]);return`${i}://${a&&a!==`80`&&a!==`443`?`${n}:${a}`:n}${r}${o?`?${o}`:``}`}function tv(e){let t=e.attributes??{},n=$_(t[`http.request.method`])??$_(t[`http.method`]),r=ev(t);if(!n||!r)return null;let i=[`curl -X ${n.toUpperCase()}`,Q_(r)],a=Object.entries(t).filter(([e])=>e.startsWith(`http.request.header.`)).sort(([e],[t])=>e.localeCompare(t));for(let[e,t]of a){let n=e.slice(20),r=Array.isArray(t)?t.map(String).join(`, `):$_(t);r&&i.push(`-H ${Q_(`${n}: ${r}`)}`)}return i.join(` `)}var nv={count:`autotel.schema.violations`,severity:`autotel.schema.violation.severity`,codes:`autotel.schema.violation.codes`};function rv(e){let t=e.attributes??{},n=t[nv.count],r=typeof n==`number`?n:Number(n);if(!Number.isFinite(r)||r<=0)return null;let i=t[nv.codes];return{count:r,severity:t[nv.severity]===`error`?`error`:`warning`,codes:Array.isArray(i)?i.map(String):[]}}var iv=[`code.filepath`,`code.file.path`],av=[`code.lineno`,`code.line.number`],ov=[`code.column`,`code.column.number`],sv=[`code.function`,`code.function.name`];function cv(e,t){for(let n of t){let t=e[n];if(typeof t==`string`&&t.length>0)return t}}function lv(e,t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t;if(typeof t==`string`&&t.trim()!==``&&Number.isFinite(Number(t)))return Number(t)}}function uv(e,t,n,r){if(e===`webstorm`){let e=`jetbrains://web-storm/navigate/reference?path=${encodeURIComponent(t)}`;return n!==void 0&&(e+=`&line=${n}`),e}let i=`${e}://file/${t.replace(/^\//,``)}`;return n!==void 0&&(i+=`:${n}`,r!==void 0&&(i+=`:${r}`)),i}function dv(e,t){let n=cv(e,iv);if(!n)return null;let r=lv(e,av),i=lv(e,ov),a=cv(e,sv),o=cv(e,[`code.namespace`]),s=n.split(/[/\\]/).pop()||n;return{filepath:n,line:r,column:i,functionName:a,namespace:o,display:r===void 0?s:`${s}:${r}`,href:uv(t,n,r,i)}}function fv(e,t){for(let n of t){let t=e[n];if(typeof t==`string`&&t.length>0)return t}}function pv(e,t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t;if(typeof t==`string`&&t.trim()!==``&&Number.isFinite(Number(t)))return Number(t)}}function mv(e){let t=fv(e,[`db.system`,`db.system.name`]),n=fv(e,[`db.statement`,`db.query.text`]);return!t&&!n?null:{system:t,statement:n,operation:fv(e,[`db.operation`,`db.operation.name`]),table:fv(e,[`db.sql.table`,`db.collection.name`]),dbName:fv(e,[`db.name`,`db.namespace`]),rowCount:pv(e,[`db.response.returned_rows`,`db.rows_affected`])}}var hv=new Set(`select.from.where.insert.into.values.update.set.delete.join.left.right.inner.outer.full.cross.on.and.or.not.in.is.null.as.order.by.group.having.limit.offset.distinct.union.all.returning.with.using.between.like.asc.desc.count.case.when.then.else.end.exists.create.table.alter.drop.index`.split(`.`)),gv=/('(?:[^']|'')*'|[A-Za-z_][A-Za-z0-9_]*|[^A-Za-z_']+)/g;function _v(e){let t=[];for(let[n]of e.matchAll(gv))n.startsWith(`'`)?t.push({text:n,kind:`string`}):/^[A-Za-z_]/.test(n)&&hv.has(n.toLowerCase())?t.push({text:n,kind:`keyword`}):t.push({text:n,kind:`text`});return t}var vv=(e,t=p,n=p,r=p)=>{let i=M(()=>xv.test(t())),a=M(()=>Sv.some(e=>t().startsWith(e))),o=M(()=>z(i)?null:j_(n()));var s=da(),c=I(s),l=e=>{var n=Dv(),r=F(n),i=F(r),s=F(i,!0);D(i);var c=L(i,2),l=L(c,2),u=e=>{var t=Ev();q(t,1,K(Tv)),H(e,t)};W(l,e=>{z(a)&&e(u)}),D(r);var d=L(r,2);G_(F(d),{get data(){return z(o)}}),D(d),D(n),R(e=>{U(s,t()),q(c,1,e)},[()=>K(Q(wv,`bg-amber-500/15 text-amber-600 border-amber-500/30`))]),H(e,n)},u=e=>{let o=M(()=>Cv(n())),s=M(()=>String(n()));var c=kv(),l=F(c),u=F(l),d=F(u,!0);D(u);var f=L(u,2),p=F(f,!0);D(f);var m=L(f,2),h=e=>{var t=Ev();q(t,1,K(Tv)),H(e,t)};W(m,e=>{z(a)&&!z(i)&&e(h)});var g=L(m,2),_=e=>{var n=Ov();Pm(F(n),{size:10,class:`text-fg-subtle`}),D(n),B(`click`,n,()=>r()({key:t(),value:z(s)})),H(e,n)};W(g,e=>{!z(i)&&z(s).length>60&&e(_)}),D(l);var v=L(l,2),y=F(v,!0);D(v),D(c),R(e=>{J(u,`title`,t()),U(d,t()),q(f,1,e),U(p,z(i)?`sensitive`:z(o).label),U(y,z(i)?`[redacted]`:z(s))},[()=>K(Q(wv,z(o).cls))]),H(e,c)};W(c,e=>{z(o)===null?e(u,-1):e(l)}),H(e,s)},yv=(e,t=p,n=p,r=p,i=p,a=p)=>{var o=jv(),s=F(o),c=F(s);za(F(c),n),D(c);var l=L(c,2),u=F(l,!0);D(l);var d=L(l,2);{let e=M(()=>Q(`text-fg-subtle transition-transform`,r()&&`rotate-180`));Sp(d,{size:14,get class(){return z(e)}})}D(s);var f=L(s,2),m=e=>{var t=Av();za(F(t),a),D(t),H(e,t)};W(f,e=>{r()&&e(m)}),D(o),R(()=>U(u,t())),B(`click`,s,function(...e){i()?.apply(this,e)}),H(e,o)},bv=(e,t=p,n=p,r=p)=>{var i=Mv(),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(i),R(()=>{J(i,`title`,r()),U(o,t()),U(c,n())}),H(e,i)},xv=/(password|secret|token|authorization|api[-_.]?key)/i,Sv=[`service.`,`deployment.`,`host.`,`container.`,`process.`];function Cv(e){return e==null?{label:`null`,cls:`bg-hover text-fg-subtle border-line`}:Array.isArray(e)?{label:`array`,cls:`bg-amber-500/15 text-amber-600 border-amber-500/30`}:typeof e==`string`?{label:`string`,cls:`bg-green-500/15 text-green-600 border-green-500/30`}:typeof e==`number`?{label:`number`,cls:`bg-blue-500/15 text-blue-600 border-blue-500/30`}:typeof e==`boolean`?{label:`boolean`,cls:`bg-purple-500/15 text-purple-600 border-purple-500/30`}:{label:`object`,cls:`bg-stone-500/15 text-stone-600 border-stone-500/30`}}var wv=`text-[9px] px-1.5 py-px rounded border font-mono flex-shrink-0`,Tv=`${wv} bg-hover text-fg-subtle border-line`,Ev=V(`<span>resource</span>`),Dv=V(`<div class="py-1 border-b border-line-subtle last:border-b-0"><div class="flex items-center gap-2"><span class="text-fg-subtle font-medium"> </span> <span>json</span> <!></div> <div class="mt-1"><!></div></div>`),Ov=V(`<button class="ml-auto p-0.5 hover:bg-hover rounded flex-shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity" title="View full value"><!></button>`),kv=V(`<div class="group py-1 border-b border-line-subtle last:border-b-0"><div class="flex items-center gap-2 min-w-0"><span class="text-fg-subtle font-medium truncate"> </span> <span> </span> <!> <!></div> <div class="mt-0.5 text-fg leading-snug at-wrap-anywhere"> </div></div>`),Av=V(`<div class="px-4 pb-3"><!></div>`),jv=V(`<div class="border-b border-line-subtle"><button class="w-full flex items-center gap-2 px-4 py-3 hover:bg-subtle transition-colors"><span class="text-fg-subtle"><!></span> <span class="text-xs font-medium text-fg-muted flex-1 text-left"> </span> <!></button> <!></div>`),Mv=V(`<div><div class="text-fg-subtle mb-0.5"> </div> <div class="font-mono font-medium text-fg"> </div></div>`),Nv=V(`<span class="px-2 py-0.5 rounded bg-hover text-fg-subtle text-xs font-mono" title="Instrumentation scope"> </span>`),Pv=V(`<div class="grid grid-cols-2 gap-3 text-xs"><!> <!> <!> <!> <!></div>`),Fv=V(`<div class="mx-4 mt-4 p-3 bg-danger-bg border border-danger-border rounded-md"><div class="flex items-start gap-2"><!> <div class="text-xs text-danger"><span class="font-medium">Error:</span> </div></div></div>`),Iv=V(`<li class="font-mono text-[11px] text-fg-muted"> </li>`),Lv=V(`<p class="mt-1 text-[11px] text-fg-subtle"> </p>`),Rv=V(`<div><div class="mb-1 flex items-center gap-1.5"><!> <span class="text-xs font-medium text-fg"> </span></div> <ul class="space-y-0.5"></ul> <!></div>`),zv=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="mb-1 flex items-center justify-between gap-2"><span class="text-[11px] uppercase tracking-wide text-fg-muted">Reproduce</span> <!></div> <code class="block overflow-x-auto whitespace-pre rounded bg-subtle px-2 py-1 text-[11px] text-fg-muted"> </code> <p class="mt-1 text-[11px] text-fg-subtle">Rebuilt from span attributes. Headers appear only if captured; the
|
|
3
|
-
body is never recorded.</p></div>`),
|
|
4
|
-
${t.span.scope.version?`@${t.span.scope.version}`:``}`)),H(e,n)};W(he,e=>{t.span.scope?.name&&e(ge)}),D(ue),D(ce);var _e=L(ce,2);
|
|
5
|
-
${z(i).count===1?`contract violation`:`contract violations`}`)}),H(e,t)};W(Se,e=>{z(i)&&e(Ce)});var we=L(Se,2),Te=e=>{var t=zv(),n=F(t);Z_(L(F(n),2),{get value(){return z(r)},label:`Copy as curl`}),D(n);var i=L(n,2),a=F(i,!0);D(i),Ke(2),D(t),R(()=>U(a,z(r))),H(e,t)};W(we,e=>{z(r)&&e(Te)});var Ee=L(we,2),De=F(Ee),Oe=F(De);Y_(Oe,{label:`Span ID`,get value(){return t.span.spanId}});var ke=L(Oe,2);{let e=M(()=>z(ne)&&z(ne).spanId!==t.span.spanId?()=>re(z(ne).spanId):void 0);Y_(ke,{label:`Trace ID`,get value(){return t.span.traceId},get onActivate(){return z(e)},activateTitle:`Go to root span`})}var Ae=L(ke,2),je=e=>{{let n=M(()=>z(ee)?()=>re(t.span.parentSpanId):void 0),r=M(()=>z(ee)?`Go to parent span`:`Parent span not captured in this trace`);Y_(e,{label:`Parent Span ID`,get value(){return t.span.parentSpanId},get onActivate(){return z(n)},get activateTitle(){return z(r)}})}};W(Ae,e=>{t.span.parentSpanId&&e(je)}),D(De),D(Ee);var Me=L(Ee,2),Ne=F(Me);Ih(F(Ne),{size:14,class:`text-fg-subtle`}),Ke(2),D(Ne);var Pe=L(Ne,2),Fe=F(Pe);bv(Fe,()=>`Trace Service`,()=>t.trace.service);var Ie=L(Fe,2);bv(Ie,()=>`Derived Resource`,()=>z(f));var Le=L(Ie,2);bv(Le,()=>`Resource Type`,()=>z(p));var Re=L(Le,2);{let e=M(()=>String(z(m).length));bv(Re,()=>`Resource Attrs`,()=>z(e))}D(Pe),D(Me);var ze=L(Me,2),Be=e=>{var t=Hv(),r=F(t),i=F(r);Pp(i,{size:14,class:`text-fg-subtle`});var a=L(i,4);G(a,21,()=>n,e=>e.value,(e,t)=>{var n=Bv(),r=F(n,!0);D(n);var i={};R(()=>{U(r,z(t).label),i!==(i=z(t).value)&&(n.value=(n.__value=z(t).value)??``)}),H(e,n)}),D(a);var o;uo(a),D(r);var s=L(r,2),c=F(s);Jp(c,{size:12,class:`flex-shrink-0`});var l=L(c,2),u=F(l,!0);D(l),D(s);var d=L(s,2),f=e=>{var t=Vv(),n=F(t);D(t),R(()=>U(n,`${z(b).namespace?`${z(b).namespace}.`:``}${z(b).functionName??``}()`)),H(e,t)};W(d,e=>{z(b).functionName&&e(f)});var p=L(d,2),m=F(p,!0);D(p),D(t),R(()=>{o!==(o=Zc.value)&&(a.value=(a.__value=Zc.value)??``,lo(a,Zc.value)),J(s,`href`,z(b).href),J(s,`title`,`Open ${z(b).filepath}${z(b).line?`:${z(b).line}`:``}`),U(u,z(b).display),U(m,z(b).filepath)}),B(`change`,a,e=>Qc(e.currentTarget.value)),H(e,t)};W(ze,e=>{z(b)&&e(Be)});var Ve=L(ze,2),He=e=>{var t=qv(),n=F(t),r=F(n);Hp(r,{size:14,class:`text-fg-subtle`});var i=L(r,4),a=e=>{var t=Uv(),n=F(t,!0);D(t),R(()=>U(n,z(x).system)),H(e,t)};W(i,e=>{z(x).system&&e(a)}),D(n);var o=L(n,2),s=e=>{var t=Wv(),n=F(t),r=e=>{bv(e,()=>`Operation`,()=>z(x).operation)};W(n,e=>{z(x).operation&&e(r)});var i=L(n,2),a=e=>{bv(e,()=>`Table`,()=>z(x).table)};W(i,e=>{z(x).table&&e(a)});var o=L(i,2),s=e=>{bv(e,()=>`Database`,()=>z(x).dbName)};W(o,e=>{z(x).dbName&&e(s)});var c=L(o,2),l=e=>{{let t=M(()=>String(z(x).rowCount));bv(e,()=>`Rows`,()=>z(t))}};W(c,e=>{z(x).rowCount!==void 0&&e(l)}),D(t),H(e,t)};W(o,e=>{(z(x).operation||z(x).table||z(x).dbName||z(x).rowCount!==void 0)&&e(s)});var c=L(o,2),l=e=>{N_(e,{get content(){return z(x).statement},children:(e,t)=>{var n=Kv();G(n,21,()=>z(S),Aa,(e,t)=>{var n=Gv(),r=F(n,!0);D(n),R(()=>{q(n,1,K(z(t).kind===`keyword`?`text-indigo-500 font-semibold`:z(t).kind===`string`?`text-green-500`:``)),U(r,z(t).text)}),H(e,n)}),D(n),H(e,n)},$$slots:{default:!0}})};W(c,e=>{z(x).statement&&e(l)}),D(t),H(e,t)};W(Ve,e=>{z(x)&&e(He)});var Ue=L(Ve,2),We=e=>{var t=Qv(),n=F(t);wm(F(n),{size:14,class:`text-fg-subtle`}),Ke(2),D(n);var r=L(n,2),i=F(r),a=e=>{var t=Jv(),n=L(F(t),2),r=F(n,!0);D(n),D(t),R(()=>U(r,z(ee).name)),H(e,t)};W(i,e=>{z(ee)&&e(a)});var o=L(i,2),s=e=>{var t=Zv(),n=F(t),r=F(n);D(n);var i=L(n,2),a=F(i);G(a,17,()=>z(te).slice(0,5),e=>e.spanId,(e,t)=>{var n=Yv(),r=F(n,!0);D(n),R(()=>U(r,z(t).name)),H(e,n)});var o=L(a,2),s=e=>{var t=Xv(),n=F(t);D(t),R(()=>U(n,`+${z(te).length-5} more`)),H(e,t)};W(o,e=>{z(te).length>5&&e(s)}),D(i),D(t),R(()=>U(r,`Children (${z(te).length??``}):`)),H(e,t)};W(o,e=>{z(te).length>0&&e(s)}),D(r),D(t),H(e,t)};W(Ue,e=>{(z(ee)||z(te).length>0)&&e(We)});var Ge=L(Ue,2),qe=e=>{let n=e=>{Ih(e,{size:14})},r=e=>{var n=ty(),r=I(n);I_(r,{class:`mb-2`,inputClass:`border-line bg-subtle text-fg focus:border-line focus-visible:ring-1 focus-visible:ring-accent`,placeholder:`Filter attributes by key or value…`,ariaLabel:`Filter attributes by key or value`,get value(){return z(g)},set value(e){P(g,e,!0)}});var i=L(r,2);{let e=M(()=>JSON.stringify(t.span.attributes,null,2));N_(i,{get content(){return z(e)},children:(e,t)=>{var n=ey(),r=F(n),i=e=>{H(e,$v())},a=e=>{var t=da();G(I(t),17,()=>z(v),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));vv(e,()=>z(n)[0],()=>z(n)[1],()=>e=>P(o,e,!0))}),H(e,t)};W(r,e=>{z(v).length===0?e(i):e(a,-1)}),D(n),H(e,n)},$$slots:{default:!0}})}H(e,n)};{let i=M(()=>z(y)?`Attributes (${z(v).length} of ${Object.keys(t.span.attributes).length})`:`Attributes (${Object.keys(t.span.attributes).length})`);yv(e,()=>z(i),()=>n,()=>z(a).attributes,()=>()=>s(`attributes`),()=>r)}};W(Ge,e=>{z(l)&&e(qe)});var Je=L(Ge,2),Ye=e=>{let n=e=>{Sm(e,{size:14})},r=e=>{var n=iy();G(n,21,()=>t.span.events,Aa,(e,n)=>{var r=ry(),i=F(r),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s);D(s),D(i);var l=L(i,2),u=e=>{{let t=M(()=>JSON.stringify(z(n).attributes,null,2));N_(e,{get content(){return z(t)},children:(e,t)=>{var r=ny(),i=F(r),a=F(i,!0);D(i),D(r),R(e=>U(a,e),[()=>JSON.stringify(z(n).attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},d=M(()=>z(n).attributes&&Object.keys(z(n).attributes).length>0);W(l,e=>{z(d)&&e(u)}),D(r),R(e=>{U(o,z(n).name),U(c,`+${e??``}`)},[()=>ad(z(n).timestamp-t.span.startTime)]),H(e,r)}),D(n),H(e,n)};yv(e,()=>`Events (${t.span.events.length})`,()=>n,()=>z(a).events,()=>()=>s(`events`),()=>r)};W(Je,e=>{z(u)&&e(Ye)});var Xe=L(Je,2),Ze=e=>{let n=e=>{Om(e,{size:14})},r=e=>{var n=cy();G(n,21,()=>t.span.links,Aa,(e,t)=>{var n=sy(),r=F(n),i=L(F(r),2),a=F(i,!0);D(i),N_(L(i,2),{get content(){return z(t).traceId},children:(e,t)=>{H(e,ay())},$$slots:{default:!0}}),D(r);var o=L(r,2),s=L(F(o),2),c=F(s,!0);D(s),N_(L(s,2),{get content(){return z(t).spanId},children:(e,t)=>{H(e,ay())},$$slots:{default:!0}}),D(o);var l=L(o,2),u=e=>{var n=oy(),r=F(n),i=F(r,!0);D(r),D(n),R(e=>U(i,e),[()=>Object.entries(z(t).attributes).map(([e,t])=>`${e}: ${typeof t==`object`?JSON.stringify(t):t}`).join(`, `)]),H(e,n)},d=M(()=>z(t).attributes&&Object.keys(z(t).attributes).length>0);W(l,e=>{z(d)&&e(u)}),D(n),R(()=>{U(a,z(t).traceId),U(c,z(t).spanId)}),B(`click`,i,()=>Pu(z(t).traceId,z(t).spanId)),B(`click`,s,()=>Pu(z(t).traceId,z(t).spanId)),H(e,n)}),D(n),H(e,n)};yv(e,()=>`Links (${t.span.links.length})`,()=>n,()=>z(a).links,()=>()=>s(`links`),()=>r)};W(Xe,e=>{z(d)&&e(Ze)});var Qe=L(Xe,2),$e=e=>{var n=dy(),r=F(n),i=F(r);nm(i,{size:14,class:`text-fg-subtle`});var a=L(i,2),o=F(a);D(a),D(r);var s=L(r,2),c=F(s);G(c,23,()=>z(ae).slice(0,50),(e,t)=>e.id||t,(e,n)=>{let r=M(()=>z(n).spanId===t.span.spanId),i=M(()=>z(n).severityText||`INFO`),a=M(()=>z(i)===`ERROR`?`text-danger`:z(i)===`WARN`?`text-warning`:`text-fg-subtle`),o=M(()=>typeof z(n).body==`string`?z(n).body:JSON.stringify(z(n).body));var s=uy(),c=F(s),l=F(c),u=F(l,!0);D(l);var d=L(l,2),f=e=>{H(e,ly())};W(d,e=>{z(r)&&e(f)});var p=L(d,2),m=F(p,!0);D(p),D(c);var h=L(c,2),g=F(h,!0);D(h),D(s),R((e,t,n)=>{q(s,1,e),q(l,1,t),U(u,z(i)),U(m,n),U(g,z(o))},[()=>K(Q(`text-xs p-2 rounded border`,z(r)?`border-accent/30 bg-accent/10`:`border-line-subtle bg-subtle`)),()=>K(Q(`font-mono font-medium`,z(a))),()=>Ng(z(n).timestamp,Hu.value)]),H(e,s)}),D(c),D(s),D(n),R(()=>U(o,`Correlated Logs (${z(ae).length??``})`)),H(e,n)};W(Qe,e=>{z(ae).length>0&&e($e)}),D(ve)}var et=L(ve,2),tt=e=>{var t=fy(),n=F(t),r=L(n,2),i=F(r),a=F(i),s=F(a,!0);D(a);var c=L(a,2);ng(F(c),{size:16,class:`text-fg-subtle`}),D(c),D(i);var l=L(i,2),u=F(l),d=F(u,!0);D(u),D(l),D(r),D(t),R(()=>{J(t,`aria-label`,`Full value for ${z(o).key}`),U(s,z(o).key),U(d,z(o).value)}),B(`click`,n,()=>P(o,null)),B(`click`,c,()=>P(o,null)),H(e,t)};W(et,e=>{z(o)&&e(tt)}),D(oe),R(e=>{U(E,t.span.name||`Unknown Span`),q(de,1,e),U(fe,t.span.status.code),U(me,t.span.kind)},[()=>K(Q(`px-2 py-0.5 rounded text-xs font-medium`,z(c)?`bg-danger-bg text-danger`:t.span.status.code===`OK`?`bg-success-bg text-success`:`bg-hover text-fg-muted`))]),B(`click`,_e,function(...e){t.onClose?.apply(this,e)}),H(e,oe),at()}na([`click`,`change`]);var hy=V(`<div><div class="absolute inset-y-0 -left-1.5 -right-1.5"></div> <div></div></div>`);function gy(e,t){it(t,!0);var n=hy(),r=L(F(n),2);D(n),R((e,i)=>{J(n,`role`,t.role),J(n,`aria-orientation`,t[`aria-orientation`]),J(n,`aria-valuenow`,t[`aria-valuenow`]),J(n,`aria-valuemin`,t[`aria-valuemin`]),J(n,`tabindex`,t.tabIndex),J(n,`title`,t.title??`Drag to resize · double-click to reset`),q(n,1,e),q(r,1,i)},[()=>K(Q(`group relative z-10 shrink-0 cursor-col-resize self-stretch outline-none`,`w-px bg-hover`)),()=>K(Q(`absolute inset-y-0 -left-px w-0.5 transition-colors`,`group-hover:bg-accent group-focus-visible:bg-accent`,t.dragging&&`bg-accent`))]),B(`pointerdown`,n,function(...e){t.onPointerDown?.apply(this,e)}),B(`keydown`,n,function(...e){t.onKeyDown?.apply(this,e)}),B(`dblclick`,n,function(...e){t.onDblClick?.apply(this,e)}),H(e,n),at()}na([`pointerdown`,`keydown`,`dblclick`]);function _y(e,t){e.preventDefault();let n=document.body.style.cursor,r=document.body.style.userSelect;document.body.style.cursor=t.cursor,document.body.style.userSelect=`none`,t.onStart?.();let i=e=>t.onMove(e),a=()=>{document.body.style.cursor=n,document.body.style.userSelect=r,window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a),t.onEnd?.()};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a)}function vy(e,t){if(!e)return t;try{let t=window.localStorage.getItem(e);if(t!=null){let e=Number(t);if(Number.isFinite(e))return e}}catch{}return t}function yy(e,t){if(e)try{window.localStorage.setItem(e,String(Math.round(t)))}catch{}}function by(e){let{initial:t,min:n,minOther:r,containerRef:i,storageKey:a,invert:o=!1,step:s=24}=e,c=Math.max(n,vy(a,t)),l=N(yr(c)),u=N(!1),d={current:c},f=()=>{let e=i.current?.clientWidth;return e?Math.max(n,e-r):1/0},p=e=>Math.min(f(),Math.max(n,e)),m=e=>{P(l,e,!0),d.current=e},h=e=>{let t=e.clientX,n=d.current;_y(e,{cursor:`col-resize`,onStart:()=>P(u,!0),onMove:e=>{let r=e.clientX-t,i=o?-r:r;m(p(n+i))},onEnd:()=>{P(u,!1),yy(a,d.current)}})},g=e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;e.preventDefault();let t=e.key===`ArrowLeft`?-s:s,n=p(d.current+(o?-t:t));m(n),yy(a,n)},_=()=>{let e=p(t);m(e),yy(a,e)};return{get size(){return z(l)},get dragging(){return z(u)},get separatorProps(){return{role:`separator`,"aria-orientation":`vertical`,"aria-valuenow":Math.round(z(l)),"aria-valuemin":n,tabIndex:0,onPointerDown:h,onKeyDown:g,onDblClick:_}}}}var xy=V(`<div><!></div>`),Sy=V(`<div class="flex flex-col gap-2"><button class="flex items-center gap-2 cursor-pointer text-fg-muted hover:text-fg transition-colors w-fit"><!> <span class="text-xs font-medium"> </span></button> <!></div>`);function Cy(e,t){it(t,!0);var n=Sy(),r=F(n),i=F(r);{let e=M(()=>Q(`text-fg-subtle transition-transform`,t.expanded&&`rotate-180`));Sp(i,{size:12,get class(){return z(e)}})}var a=L(i,2),o=F(a,!0);D(a),D(r);var s=L(r,2),c=e=>{var n=xy();za(F(n),()=>t.children),D(n),H(e,n)};W(s,e=>{t.expanded&&e(c)}),D(n),R(()=>U(o,t.label)),B(`click`,r,function(...e){t.onToggle?.apply(this,e)}),H(e,n),at()}na([`click`]);var wy=V(`<div class="bg-subtle rounded p-3 border border-line font-mono text-xs"><pre class="whitespace-pre-wrap break-words text-fg"> </pre></div>`),Ty=V(`<div class="font-mono text-xs text-fg-muted mt-1"> </div>`),Ey=V(`<div class="bg-subtle rounded p-2.5 border border-line"><div class="font-medium text-xs text-fg mb-1.5"> </div> <!></div>`),Dy=V(`<div class="space-y-2"></div>`),Oy=V(`<div class="text-xs text-fg-muted"><span class="font-medium">Status message:</span> </div>`),ky=V(`<div role="presentation" class="mt-3 pt-3 border-t border-line space-y-3"><!> <!> <!></div>`),Ay=V(`<div role="button" tabindex="0" data-focus-inset=""><div class="flex items-center justify-between gap-4"><div class="flex-1 min-w-0"><div class="font-medium text-sm mb-1 text-fg"> </div> <div class="flex items-center gap-3 text-xs text-fg-muted"><span> </span> <span> </span> <span class="text-fg-subtle"> </span></div></div> <button class="p-1 hover:bg-hover rounded"><!></button></div> <!></div>`);function jy(e,t){it(t,!0);let n=N(!1),r=N(yr({attributes:!1,events:!1})),i=M(()=>t.span.status.code===`ERROR`);function a(e){P(r,{...z(r),[e]:!z(r)[e]},!0)}function o(){let e=0,n=t.span;for(;n.parentSpanId;){e++;let r=t.trace.spans.find(e=>e.spanId===n.parentSpanId);if(!r)break;n=r}return e}let s=M(o),c=M(()=>Object.keys(t.span.attributes||{}).length>0),l=M(()=>t.span.events&&t.span.events.length>0);var u=Ay(),d=M(()=>yg(t.onSelect)),f=F(u),p=F(f),m=F(p),h=F(m,!0);D(m);var g=L(m,2),_=F(g),v=F(_,!0);D(_);var y=L(_,2),b=F(y,!0);D(y);var x=L(y,2),S=F(x,!0);D(x),D(g),D(p);var C=L(p,2),w=F(C);{let e=M(()=>Q(`text-fg-subtle transition-transform flex-shrink-0`,z(n)&&`rotate-180`));Sp(w,{size:14,get class(){return z(e)}})}D(C),D(f);var T=L(f,2),ee=e=>{var n=ky(),i=F(n),o=e=>{Cy(e,{label:`All attributes`,get expanded(){return z(r).attributes},onToggle:()=>a(`attributes`),children:(e,n)=>{{let n=M(()=>JSON.stringify(t.span.attributes,null,2));N_(e,{get content(){return z(n)},children:(e,n)=>{var r=wy(),i=F(r),a=F(i,!0);D(i),D(r),R(e=>U(a,e),[()=>JSON.stringify(t.span.attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},$$slots:{default:!0}})};W(i,e=>{z(c)&&e(o)});var s=L(i,2),u=e=>{{let n=M(()=>`Events (${t.span.events.length})`);Cy(e,{get label(){return z(n)},get expanded(){return z(r).events},onToggle:()=>a(`events`),children:(e,n)=>{var r=Dy();G(r,21,()=>t.span.events,Aa,(e,t)=>{var n=Ey(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=e=>{{let n=M(()=>JSON.stringify(z(t).attributes,null,2));N_(e,{get content(){return z(n)},children:(e,n)=>{var r=Ty(),i=F(r,!0);D(r),R(e=>U(i,e),[()=>JSON.stringify(z(t).attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},s=M(()=>z(t).attributes&&Object.keys(z(t).attributes).length>0);W(a,e=>{z(s)&&e(o)}),D(n),R(()=>U(i,z(t).name)),H(e,n)}),D(r),H(e,r)},$$slots:{default:!0}})}};W(s,e=>{z(l)&&e(u)});var d=L(s,2),f=e=>{var n=Oy(),r=L(F(n));D(n),R(()=>U(r,` ${t.span.status.message??``}`)),H(e,n)};W(d,e=>{t.span.status.message&&e(f)}),D(n),B(`click`,n,e=>e.stopPropagation()),H(e,n)};W(T,e=>{z(n)&&e(ee)}),D(u),R((e,n,r)=>{q(u,1,e),co(u,`padding-left: ${16+z(s)*20}px;`),U(h,t.span.name||`unknown`),q(_,1,n),U(v,t.span.status.code),U(b,r),U(S,t.span.kind)},[()=>K(Q(`px-4 py-3`,`hover:bg-subtle transition-colors cursor-pointer`,z(i)&&`bg-danger-bg`,t.isSelected&&`bg-hover hover:bg-hover`)),()=>K(Q(`font-medium`,cd(t.span.status.code))),()=>ad(t.span.duration)]),B(`click`,u,function(...e){t.onSelect?.apply(this,e)}),B(`keydown`,u,function(...e){z(d)?.apply(this,e)}),B(`click`,C,e=>{e.stopPropagation(),P(n,!z(n))}),H(e,u),at()}na([`click`,`keydown`]);var My=`1.0.0`;function Ny(e){return{version:My,exportedAt:new Date().toISOString(),trace:e}}function Py(e){return{version:My,exportedAt:new Date().toISOString(),traces:e}}function Fy(e){return JSON.stringify(e,null,2)}function Iy(e,t){let n=Fy(Ny(e)),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`trace-${e.traceId.slice(0,8)}-${new Date().toISOString().split(`T`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}function Ly(e,t){let n=Fy(Py(e)),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`traces-${e.length}-${new Date().toISOString().split(`T`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}async function Ry(e){let t=Fy(Ny(e));await navigator.clipboard.writeText(t)}function zy(e,t){if(!e)return[`${t}: Invalid span data`];let n=e;return[...Gs(n,t,Bs,[`spanId`,`traceId`,`name`]),...Gs(n,t,Vs,[`startTime`,`endTime`,`duration`]),...Gs(n,t,Hs,[`status`])]}function By(e,t){let n=`trace[${t}]`;if(!e)return{errors:[`${n}: Invalid trace data`],warnings:[]};let r=e,i=Bs(r,`correlationId`)?[]:[`${n}: Missing correlationId, will use traceId`],a=Hs(r,`rootSpan`),o=Ws(r,`spans`)?Us(r,`spans`).flatMap((e,t)=>zy(zs(e),`${n}.spans[${t}]`)):[`${n}: Missing or invalid spans array`];return{errors:[...Gs(r,n,Bs,[`traceId`]),...a?zy(a,`${n}.rootSpan`):[`${n}: Missing or invalid rootSpan`],...o,...Gs(r,n,Vs,[`startTime`,`endTime`,`duration`])],warnings:i}}function Vy(e){return e}function Hy(e){let t=[],n=[],r=[],i;try{i=JSON.parse(e)}catch(e){return{success:!1,traces:[],errors:[`Invalid JSON: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}let a=zs(i);if(!a)return{success:!1,traces:[],errors:[`Parsed data is not an object`],warnings:[]};let o=Bs(a,`version`);o&&o!==My&&n.push(`Version mismatch: expected ${My}, got ${o}`);let s=Hs(a,`trace`);if(s){let e=By(s,0);t.push(...e.errors),n.push(...e.warnings),e.errors.length===0&&r.push(Uy(Vy(s)))}else if(Ws(a,`traces`))for(let[e,i]of Us(a,`traces`).entries()){let a=zs(i),o=By(a,e);t.push(...o.errors),n.push(...o.warnings),a&&o.errors.length===0&&r.push(Uy(Vy(a)))}else if(a.traceId){let e=By(a,0);t.push(...e.errors),n.push(...e.warnings),e.errors.length===0&&r.push(Uy(Vy(a)))}else t.push(`Unrecognized format: expected { trace: ... } or { traces: [...] } or direct trace object`);return{success:t.length===0&&r.length>0,traces:r,errors:t,warnings:n}}function Uy(e){return{...e,correlationId:e.correlationId||e.traceId.slice(0,8),service:e.service||`imported`,status:e.status||(e.spans.some(e=>e.status.code===`ERROR`)?`ERROR`:`OK`),spans:e.spans.map(Wy),rootSpan:Wy(e.rootSpan)}}function Wy(e){return{...e,kind:e.kind||`INTERNAL`,attributes:e.attributes||{},status:{code:e.status?.code||`UNSET`,message:e.status?.message},events:e.events||[]}}function Gy(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=()=>n(Error(`Failed to read file`)),r.readAsText(e)})}function Ky(e){return{version:My,kind:`autotel-devtools-snapshot`,capturedAt:new Date().toISOString(),data:e}}function qy(e,t){let n=JSON.stringify(Ky(e),null,2),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`autotel-snapshot-${new Date().toISOString().replaceAll(`:`,`-`).split(`.`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}function Jy(e,t){return Us(e,t)}function Yy(e){let t;try{t=JSON.parse(e)}catch(e){return{success:!1,errors:[`Invalid JSON: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}let n=zs(t);if(!n)return{success:!1,errors:[`Snapshot is not an object`],warnings:[]};let r=[];n.kind&&n.kind!==`autotel-devtools-snapshot`&&r.push(`Unexpected snapshot kind: ${String(n.kind)}`);let i=Bs(n,`version`);i&&i!==My&&r.push(`Version mismatch: expected ${My}, got ${i}`);let a=Hs(n,`data`)??n,o=Jy(a,`traces`).map(Uy),s=Jy(a,`logs`),c=Jy(a,`errors`);return o.length===0&&s.length===0&&c.length===0?{success:!1,errors:[`Snapshot contains no traces, logs, or errors`],warnings:r}:{success:!0,snapshot:{traces:o,logs:s,errors:c},errors:[],warnings:r}}async function Xy(e){try{return Yy(await Gy(e))}catch(e){return{success:!1,errors:[`Failed to read file: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}}var Zy=V(`<div class="text-warning">Partial trace — the root span has not arrived. This is the highest
|
|
6
|
-
span received; the duration covers only the spans present.</div>`)
|
|
7
|
-
${z(o)===1?`match`:`matches`}`)),H(e,t)},c=M(()=>z(a).trim());W(r,e=>{z(c)&&e(i)}),D(t),H(e,t)};W(Ee,e=>{z(n)===`waterfall`&&e(De)});var Oe=L(Ee,2),ke=F(Oe),Ae=F(ke),je=e=>{{let n=M(()=>z(r)?.spanId);p_(e,{get trace(){return t.trace},onSpanSelect:i,get selectedSpanId(){return z(n)},get query(){return z(a)},onMatchCount:e=>P(o,e,!0)})}},Me=e=>{{let n=M(()=>z(r)?.spanId);A_(e,{get trace(){return t.trace},onSpanSelect:i,get selectedSpanId(){return z(n)}})}},Ne=e=>{var n=eb(),a=F(n);G(a,21,()=>t.trace.spans,e=>e.spanId,(e,n)=>{{let a=M(()=>z(r)?.spanId===z(n).spanId);jy(e,{get span(){return z(n)},get trace(){return t.trace},get isSelected(){return z(a)},onSelect:()=>i(z(n))})}}),D(a),D(n),H(e,n)};W(Ae,e=>{z(n)===`waterfall`?e(je):z(n)===`flame`?e(Me,1):e(Ne,-1)}),D(ke);var Pe=L(ke,2),Fe=e=>{var n=tb(),a=I(n);gy(a,X({get dragging(){return z(f)},title:`Drag to resize the detail panel · double-click to reset`},()=>z(p)));var o=L(a,2);my(F(o),{get span(){return z(r)},get trace(){return t.trace},onClose:()=>i(null)}),D(o),R(()=>co(o,`width: ${z(d)??``}px;`)),H(e,n)};W(Pe,e=>{z(r)&&e(Fe)}),D(Oe),Uo(Oe,e=>P(l,e),()=>z(l)),D(v),R((e,n,r,i,a,o,s)=>{q(x,1,e),q(ie,1,n),q(ae,1,r),q(oe,1,i),U(ue,t.trace.rootSpan.name||`Trace`),U(he,a),U(ve,`Trace ID: ${t.trace.traceId??``}`),q(be,1,o),U(xe,t.trace.status),U(Ce,s),U(Te,`${t.trace.spans.length??``} spans`)},[()=>K(Q(`text-xs text-fg-muted hover:text-fg`,`flex items-center gap-1 transition-colors`)),()=>K(Q(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`waterfall`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>K(Q(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`flame`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>K(Q(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`list`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>h(t.trace.startTime),()=>K(Q(`font-medium text-sm mb-1`,cd(t.trace.status))),()=>ad(t.trace.duration)]),B(`click`,x,()=>Nu(null)),B(`click`,w,_),B(`click`,ne,g),B(`click`,ie,()=>P(n,`waterfall`)),B(`click`,ae,()=>P(n,`flame`)),B(`click`,oe,()=>P(n,`list`)),B(`click`,se,()=>el(_g)),H(e,v),at()}na([`click`]);var ib=V(`<span class="ml-0.5 min-w-[16px] px-1 rounded-full bg-accent text-[10px] font-semibold text-white text-center tabular-nums"> </span>`),ab=V(`<div class="sticky top-0 bg-surface p-2 border-b border-line-subtle"><div class="relative"><!> <input type="text" placeholder="Narrow options…" class="w-full pl-6 pr-2 py-1 text-xs rounded border border-line bg-subtle text-fg focus:outline-none focus:border-accent"/></div></div>`),ob=V(`<span class="text-accent normal-case"> </span>`),sb=V(`<div class="px-1 py-1 text-xs text-fg-subtle">No matches</div>`),cb=ua(`<svg viewBox="0 0 12 12" class="w-2.5 h-2.5 text-white" fill="none" stroke="currentColor" stroke-width="2"><path d="M2.5 6.5l2.5 2.5 4.5-5" stroke-linecap="round" stroke-linejoin="round"></path></svg>`),lb=V(`<button type="button" role="menuitemcheckbox"><span><!></span> <span class="flex-1 truncate"> </span> <span class="flex-shrink-0 font-mono tabular-nums text-fg-subtle"> </span></button>`),ub=V(`<div class="flex flex-col gap-0.5"></div>`),db=V(`<div class="p-2 border-b border-line-subtle last:border-b-0"><div class="flex items-center justify-between px-1 pb-1 text-[10px] font-semibold uppercase tracking-wide text-fg-subtle"><span> </span> <!></div> <!></div>`),fb=V(`<button type="button" class="flex items-center gap-1 w-full px-3 py-2 text-xs text-fg-subtle hover:bg-hover transition-colors border-t border-line"><!> Clear all filters</button>`),pb=V(`<div class="absolute right-0 z-30 mt-1 w-64 max-h-[60vh] overflow-auto rounded-md border border-line bg-surface shadow-lg" role="menu"><!> <!> <!></div>`),mb=V(`<div class="relative"><button type="button" aria-haspopup="true" title="Filter by facets"><!> <span>Filter</span> <!></button> <!></div>`);function hb(e,t){it(t,!0);let n=Z(t,`searchThreshold`,3,8),r=N(!1),i=N(``),a=N(void 0),o=M(()=>t.facets.reduce((e,t)=>e+t.selected.size,0)),s=M(()=>t.facets.some(e=>e.options.length>n()));function c(e){let t=z(i).trim().toLowerCase();return[...t?e.options.filter(e=>e.value.toLowerCase().includes(t)):e.options].sort((t,n)=>{let r=+!!e.selected.has(t.value),i=+!!e.selected.has(n.value);return r===i?t.count===n.count?t.value.localeCompare(n.value):n.count-t.count:i-r})}function l(){P(r,!z(r)),z(r)||P(i,``)}zr(()=>{if(!z(r))return;let e=e=>{z(a)&&!e.composedPath().includes(z(a))&&(P(r,!1),P(i,``))},t=e=>{e.key===`Escape`&&(P(r,!1),P(i,``))};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}});var u=mb(),d=F(u),f=F(d);cm(f,{size:12});var p=L(f,4),m=e=>{var t=ib(),n=F(t,!0);D(t),R(()=>U(n,z(o))),H(e,t)};W(p,e=>{z(o)>0&&e(m)}),D(d);var h=L(d,2),g=e=>{var n=pb(),r=F(n),a=e=>{var t=ab(),n=F(t),r=F(n);Sh(r,{size:12,class:`absolute left-2 top-1/2 -translate-y-1/2 text-fg-subtle`});var a=L(r,2);Co(a),D(n),D(t),Mo(a,()=>z(i),e=>P(i,e)),H(e,t)};W(r,e=>{z(s)&&e(a)});var l=L(r,2);G(l,17,()=>t.facets,e=>e.key,(e,t)=>{let n=M(()=>c(z(t)));var r=db(),i=F(r),a=F(i),o=F(a,!0);D(a);var s=L(a,2),l=e=>{var n=ob(),r=F(n,!0);D(n),R(()=>U(r,z(t).selected.size)),H(e,n)};W(s,e=>{z(t).selected.size>0&&e(l)}),D(i);var u=L(i,2),d=e=>{H(e,sb())},f=e=>{var r=ub();G(r,21,()=>z(n),e=>e.value,(e,n)=>{let r=M(()=>z(t).selected.has(z(n).value));var i=lb(),a=F(i),o=F(a),s=e=>{H(e,cb())};W(o,e=>{z(r)&&e(s)}),D(a);var c=L(a,2),l=F(c,!0);D(c);var u=L(c,2),d=F(u,!0);D(u),D(i),R((e,t)=>{q(i,1,e),J(i,`aria-checked`,z(r)),q(a,1,t),J(c,`title`,z(n).value),U(l,z(n).value),U(d,z(n).count)},[()=>K(Q(`flex items-center gap-2 px-1.5 py-1 rounded text-xs text-left transition-colors`,z(r)?`bg-accent/15 text-accent`:`text-fg-muted hover:bg-hover`)),()=>K(Q(`flex-shrink-0 w-3 h-3 rounded-sm border flex items-center justify-center`,z(r)?`bg-accent border-accent`:`border-line`))]),B(`click`,i,()=>z(t).onToggle(z(n).value)),H(e,i)}),D(r),H(e,r)};W(u,e=>{z(n).length===0?e(d):e(f,-1)}),D(r),R(()=>U(o,z(t).label)),H(e,r)});var u=L(l,2),d=e=>{var n=fb();ng(F(n),{size:12}),Ke(),D(n),B(`click`,n,function(...e){t.onClearAll?.apply(this,e)}),H(e,n)};W(u,e=>{z(o)>0&&e(d)}),D(n),H(e,n)};W(h,e=>{z(r)&&e(g)}),D(u),Uo(u,e=>P(a,e),()=>z(a)),R(e=>{q(d,1,e),J(d,`aria-expanded`,z(r))},[()=>K(Q(`flex items-center gap-1 px-2 py-1 text-xs rounded border transition-colors`,z(o)>0||z(r)?`border-accent/40 bg-accent/10 text-accent`:`border-line text-fg-muted hover:bg-hover`))]),B(`click`,d,l),H(e,u),at()}na([`click`]);var gb={"=~":`REGEXP`,"!~":`NOT REGEXP`},_b=/[^\s()[\],=!<>^$"']/,vb=[`>=`,`<=`,`!=`,`=~`,`!~`,`=`,`>`,`<`,`^`,`$`];function yb(e){let t=[],n=0,r=(e,n,r,i,a=!0)=>t.push({type:e,value:n,from:r,to:i,terminated:a});for(;n<e.length;){let t=e[n];if(/\s/.test(t)){n++;continue}let i={"(":`lparen`,")":`rparen`,"[":`lbracket`,"]":`rbracket`,",":`comma`};if(i[t]){r(i[t],t,n,n+1),n++;continue}if(t===`"`||t===`'`){let i=n,a=t;n++;let o=``,s=!1;for(;n<e.length;){if(e[n]===`\\`&&n+1<e.length){o+=e[n+1],n+=2;continue}if(e[n]===a){n++,s=!0;break}o+=e[n],n++}r(`string`,o,i,n,s);continue}let a=vb.find(t=>e.startsWith(t,n));if(a){r(`sigil`,a,n,n+a.length),n+=a.length;continue}let o=n;for(;n<e.length&&_b.test(e[n]);)n++;n===o&&n++,r(`word`,e.slice(o,n),o,n)}return t}var bb=new Set([`and`,`or`]),xb=new Set([`null`,`nil`]),Sb=new Map([[`contains`,`CONTAINS`],[`regexp`,`REGEXP`],[`in`,`IN`]]);function Cb(e){let t=yb(e),n=[],r=()=>({from:t.length?t[t.length-1].to:0,to:e.length}),i=0,a=(e=0)=>t[i+e],o=()=>t[i++],s=(e,t)=>n.push({message:e,range:t}),c=(e=0)=>{let t=a(e);return t?.type===`word`?t.value.toLowerCase():void 0},l=(e=0)=>{let t=c(e);return t!==void 0&&bb.has(t)};function u(e,t){return{from:e.from,to:t.to}}function d(){let e=o();if(!e){s(`Expected a value`,r());return}if(e.type===`string`)return e.terminated||s(`Unterminated quoted string`,{from:e.from,to:e.to}),{type:`string`,value:e.value};if(e.type===`lbracket`){let e=[];if(a()?.type===`rbracket`)return o(),{type:`array`,values:e};for(;;){let t=d();if(!t)return{type:`array`,values:e};e.push(t);let n=a();if(n?.type===`comma`){o();continue}return n?.type===`rbracket`?(o(),{type:`array`,values:e}):(s(`Expected "," or "]" in array`,n??r()),{type:`array`,values:e})}}if(e.type===`word`){let t=e.value.toLowerCase();if(xb.has(t))return{type:`null`};if(t===`true`)return{type:`boolean`,value:!0};if(t===`false`)return{type:`boolean`,value:!1};let n=Number(e.value);return Number.isFinite(n)?{type:`number`,value:n}:{type:`string`,value:e.value}}s(`Expected a value, found "${e.value}"`,e)}function f(){let e=a();if(!e)return;if(e.type===`sigil`)return o(),gb[e.value]??e.value;if(e.type!==`word`)return;let t=e.value.toLowerCase();if(t===`not`){let e=c(1),t=e?Sb.get(e):void 0;return t?(o(),o(),`NOT ${t}`):void 0}let n=Sb.get(t);if(n)return o(),n}function p(){let e=a();if(!e){s(`Expected a condition`,r());return}if(e.type===`lparen`){o();let e=g(),t=a();return t?.type===`rparen`?o():s(`Unclosed parenthesis — expected ")"`,t??r()),e}if(e.type===`word`||e.type===`string`){let n=i;o();let r=f();if(r){let n=d();if(!n)return;let a=t[i-1];return{type:`comparison`,field:e.value,op:r,value:n,range:u(e,a??e)}}return i=n,o(),e.type===`string`&&!e.terminated&&s(`Unterminated quoted string`,{from:e.from,to:e.to}),{type:`freeText`,text:e.value,range:{from:e.from,to:e.to}}}s(`Unexpected "${e.value}"`,e),o()}function m(){let e=a();return!e||e.type===`rparen`||e.type===`rbracket`||e.type===`comma`?!1:!l()}function h(){let e=p();if(e)for(;;){if(c()===`and`){o();let t=p();if(!t)return e;e={type:`and`,left:e,right:t,range:wb(e,t)};continue}if(m()){let t=p();if(!t)return e;e={type:`and`,left:e,right:t,range:wb(e,t)};continue}return e}}function g(){let e=h();if(e){for(;c()===`or`;){o();let t=h();if(!t)return e;e={type:`or`,left:e,right:t,range:wb(e,t)}}return e}}if(t.length===0)return{ok:!0,node:{type:`all`}};let _=g(),v=a();return v&&s(`Unexpected "${v.value}"`,v),n.length>0||!_?{ok:!1,errors:n.length>0?n:[{message:`Invalid query`,range:r()}]}:{ok:!0,node:_}}function wb(e,t){let n=`range`in e?e.range.from:0;return{from:n,to:`range`in t?t.range.to:n}}var Tb=V(`<button type="button" title="Clear query" aria-label="Clear query" class="absolute right-1.5 top-[7px] p-0.5 text-fg-subtle hover:text-fg-muted"><!></button>`),Eb=V(`<button type="button" role="option" aria-selected="false" class="block w-full px-2 py-1.5 text-left font-mono text-xs text-fg hover:bg-hover"> </button>`),Db=V(`<div role="listbox" aria-label="Query fields" class="absolute left-0 right-0 top-full z-30 mt-1 max-h-48 overflow-auto rounded border border-line bg-surface shadow-lg"></div>`),Ob=V(`<div id="query-error" role="status" class="mt-1 flex items-start gap-1.5 text-[11px] text-danger"><!> <span> <span class="text-fg-subtle"> </span></span></div>`),kb=V(`<div><!> <input spellcheck="false" autocomplete="off" autocapitalize="off" aria-label="Query"/> <!> <!> <!></div>`);function Ab(e,t){it(t,!0);let n=Z(t,`placeholder`,3,`Filter — e.g. service = api AND duration > 100`),r=Z(t,`fields`,19,()=>[]),i=Z(t,`ref`,15,null),a=M(()=>Cb(t.value)),o=M(()=>z(a).ok?[]:z(a).errors),s=M(()=>z(o).length>0?z(o):t.serverErrors??[]),c=M(()=>z(s).length>0&&t.value.trim().length>0),l=N(!1),u=M(()=>{let e=t.value.match(/(?:^|[\s(])([A-Za-z_][\w.-]*)$/),n=e?.[1]?.toLowerCase()??``;return t.value.trim().length>0&&!e?[]:r().filter(e=>e.toLowerCase().startsWith(n)).filter(e=>e.toLowerCase()!==n).slice(0,8)});function d(e){e.key===`Enter`&&!z(c)&&(e.preventDefault(),t.onSubmit(t.value)),e.key===`Escape`&&t.value&&(e.preventDefault(),t.onInput(``),t.onSubmit(``))}function f(){t.onInput(``),t.onSubmit(``),i()?.focus()}function p(e){let n=t.value.match(/(?:^|[\s(])([A-Za-z_][\w.-]*)$/),r=n?.[1]?t.value.length-n[1].length:t.value.length;t.onInput(`${t.value.slice(0,r)}${e} = `),i()?.focus()}var m=kb(),h=F(m);Sh(h,{size:12,class:`absolute left-2 top-[9px] text-fg-subtle pointer-events-none`});var g=L(h,2);Co(g),Uo(g,e=>i(e),()=>i());var _=L(g,2),v=e=>{var t=Tb();ng(F(t),{size:12}),D(t),B(`click`,t,f),H(e,t)};W(_,e=>{t.value&&e(v)});var y=L(_,2),b=e=>{var t=Db();G(t,20,()=>z(u),e=>e,(e,t)=>{var n=Eb(),r=F(n,!0);D(n),R(()=>U(r,t)),B(`mousedown`,n,e=>e.preventDefault()),B(`click`,n,()=>p(t)),H(e,n)}),D(t),H(e,t)};W(y,e=>{z(l)&&z(u).length>0&&e(b)});var x=L(y,2),S=e=>{var t=Ob(),n=F(t);Op(n,{size:12,class:`mt-px shrink-0`});var r=L(n,2),i=F(r),a=L(i),o=F(a);D(a),D(r),D(t),R(()=>{U(i,`${z(s)[0].message??``} `),U(o,`(column ${z(s)[0].range.from+1})`)}),H(e,t)};W(x,e=>{z(c)&&e(S)}),D(m),R((e,r)=>{q(m,1,e),wo(g,t.value),J(g,`placeholder`,n()),J(g,`aria-invalid`,z(c)?`true`:void 0),J(g,`aria-describedby`,z(c)?`query-error`:void 0),q(g,1,r)},[()=>K(Q(`relative`,t.class)),()=>K(Q(`w-full pl-7 pr-7 py-1.5 text-xs font-mono rounded border bg-surface text-fg`,`focus:outline-none focus:ring-1`,z(c)?`border-danger-border focus:ring-danger`:`border-line focus:ring-accent`))]),B(`input`,g,e=>t.onInput(e.currentTarget.value)),B(`keydown`,g,d),ta(`focus`,g,()=>P(l,!0)),ta(`blur`,g,()=>P(l,!1)),H(e,m),at()}na([`input`,`keydown`,`click`,`mousedown`]);function jb(e){return typeof e==`function`}function Mb(e){return typeof e==`object`&&!!e}var Nb=[`string`,`number`,`bigint`,`boolean`];function Pb(e){return e==null||Nb.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>Pb(e)):typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype}var Fb=Symbol(`box`),Ib=Symbol(`is-writable`);function Lb(e,t){let n=M(e);return t?{[Fb]:!0,[Ib]:!0,get current(){return z(n)},set current(e){t(e)}}:{[Fb]:!0,get current(){return e()}}}function Rb(e){return Mb(e)&&Fb in e}function zb(e){return Rb(e)?e:jb(e)?Lb(e):Bb(e)}function Bb(e){let t=N(yr(e));return{[Fb]:!0,[Ib]:!0,get current(){return z(t)},set current(e){P(t,e,!0)}}}function Vb(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var Hb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ub=/\n/g,Wb=/^\s*/,Gb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Kb=/^:\s*/,qb=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Jb=/^[;\s]*/,Yb=/^\s+|\s+$/g,Xb=`
|
|
8
|
-
`,
|
|
9
|
-
`)}function
|
|
10
|
-
`,` `)}var
|
|
11
|
-
`,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Sx=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function Cx(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var wx,Tx=!1,Ex=new WeakMap,Dx=new WeakMap,Ox=new WeakMap,kx=new WeakSet;wx=class extends Date{constructor(...e){super(...e),kt(this,kx),O(this,Ex,N(super.getTime())),O(this,Dx,new Map),O(this,Ox,di),Tx||k(kx,this,Ax).call(this)}};function Ax(){Tx=!0;var e=wx.prototype,t=Date.prototype,n=Object.getOwnPropertyNames(t);for(let r of n)(r.startsWith(`get`)||r.startsWith(`to`)||r===`valueOf`)&&(e[r]=function(...e){if(e.length>0)return z(j(Ex,this)),t[r].apply(this,e);var n=j(Dx,this).get(r);if(n===void 0){let i=di;pi(j(Ox,this)),n=M(()=>(z(j(Ex,this)),t[r].apply(this,e))),j(Dx,this).set(r,n),pi(i)}return z(n)}),r.startsWith(`set`)&&(e[r]=function(...e){var n=t[r].apply(this,e);return P(j(Ex,this),t.getTime.call(this)),n})}var jx,Mx,Nx=[`forEach`,`isDisjointFrom`,`isSubsetOf`,`isSupersetOf`],Px=[`difference`,`intersection`,`symmetricDifference`,`union`],Fx=!1,Ix=new WeakMap,Lx=new WeakMap,Rx=new WeakMap,zx=new WeakMap,Bx=new WeakSet;Mx=Symbol.iterator,jx=class extends Set{constructor(e){if(super(),kt(this,Bx),O(this,Ix,new Map),O(this,Lx,N(0)),O(this,Rx,N(0)),O(this,zx,wi||-1),e){for(var t of e)super.add(t);j(Rx,this).v=super.size}Fx||k(Bx,this,Hx).call(this)}has(e){var t=super.has(e),n=j(Ix,this),r=n.get(e);if(r===void 0){if(!t)return z(j(Lx,this)),!1;r=k(Bx,this,Vx).call(this,!0),n.set(e,r)}return z(r),t}add(e){return super.has(e)||(super.add(e),P(j(Rx,this),super.size),_r(j(Lx,this))),this}delete(e){var t=super.delete(e),n=j(Ix,this),r=n.get(e);return r!==void 0&&(n.delete(e),P(r,!1)),t&&(P(j(Rx,this),super.size),_r(j(Lx,this))),t}clear(){if(super.size!==0){super.clear();var e=j(Ix,this);for(var t of e.values())P(t,!1);e.clear(),P(j(Rx,this),0),_r(j(Lx,this))}}keys(){return this.values()}values(){return z(j(Lx,this)),super.values()}entries(){return z(j(Lx,this)),super.entries()}[Mx](){return this.keys()}get size(){return z(j(Rx,this))}};function Vx(e){return wi===j(zx,this)?N(e):pr(e)}function Hx(){Fx=!0;var e=jx.prototype,t=Set.prototype;for(let n of Nx)e[n]=function(...e){return z(j(Lx,this)),t[n].apply(this,e)};for(let n of Px)e[n]=function(...e){z(j(Lx,this));var r=t[n].apply(this,e);return new jx(r)}}function Ux(e){return Ux=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ux(e)}function Wx(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=Ux(e))!==null;);return e}function Gx(){return Gx=typeof Reflect<`u`&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=Wx(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Gx.apply(null,arguments)}function Kx(e,t,n,r){var i=Gx(Ux(1&r?e.prototype:e),t,n);return 2&r&&typeof i==`function`?function(e){return i.apply(n,e)}:i}var qx,Jx,Yx=new WeakMap,Xx=new WeakMap,Zx=new WeakMap,Qx=new WeakMap,$x=new WeakSet;Jx=Symbol.iterator;var eS=class extends Map{constructor(e){if(super(),kt(this,$x),O(this,Yx,new Map),O(this,Xx,N(0)),O(this,Zx,N(0)),O(this,Qx,wi||-1),e){for(var[t,n]of e)super.set(t,n);j(Zx,this).v=super.size}}has(e){var t=j(Yx,this),n=t.get(e);if(n===void 0)if(super.has(e))n=k($x,this,tS).call(this,0),t.set(e,n);else return z(j(Xx,this)),!1;return z(n),!0}forEach(e,t){k($x,this,nS).call(this),super.forEach(e,t)}get(e){var t=j(Yx,this),n=t.get(e);if(n===void 0)if(super.has(e))n=k($x,this,tS).call(this,0),t.set(e,n);else{z(j(Xx,this));return}return z(n),super.get(e)}set(e,t){var n=j(Yx,this),r=n.get(e),i=super.get(e),a=super.set(e,t),o=j(Xx,this);if(r===void 0)r=k($x,this,tS).call(this,0),n.set(e,r),P(j(Zx,this),super.size),_r(o);else if(i!==t){_r(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&_r(o)}return a}delete(e){var t=j(Yx,this),n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),P(n,-1)),r&&(P(j(Zx,this),super.size),_r(j(Xx,this))),r}clear(){if(super.size!==0){super.clear();var e=j(Yx,this);P(j(Zx,this),0);for(var t of e.values())P(t,-1);_r(j(Xx,this)),e.clear()}}keys(){return z(j(Xx,this)),super.keys()}values(){return k($x,this,nS).call(this),super.values()}entries(){return k($x,this,nS).call(this),super.entries()}[Jx](){return this.entries()}get size(){return z(j(Zx,this)),super.size}};qx=eS;function tS(e){return wi===j(Qx,this)?N(e):pr(e)}function nS(){z(j(Xx,this));var e=j(Yx,this);if(j(Zx,this).v!==e.size){for(var t of Kx(qx.prototype,`keys`,this,2)([]))if(!e.has(t)){var n=k($x,this,tS).call(this,0);e.set(t,n)}}for([,n]of j(Yx,this))z(n)}var rS=new WeakMap,iS=new WeakMap;new class{constructor(e={}){O(this,rS,void 0),O(this,iS,void 0);let{window:t=Sx,document:n=t?.document}=e;t!==void 0&&(A(rS,this,n),A(iS,this,Dt(e=>{let n=ea(t,`focusin`,e),r=ea(t,`focusout`,e);return()=>{n(),r()}})))}get current(){return j(iS,this)?.call(this),j(rS,this)?Cx(j(rS,this)):null}};function aS(e){return typeof e==`function`}var oS=new WeakMap,sS=new WeakMap,cS=class{constructor(e){O(this,oS,void 0),O(this,sS,void 0),A(oS,this,e),A(sS,this,Symbol(e))}get key(){return j(sS,this)}exists(){return nt(j(sS,this))}get(){let e=et(j(sS,this));if(e===void 0)throw Error(`Context "${j(oS,this)}" not found`);return e}getOr(e){let t=et(j(sS,this));return t===void 0?e:t}set(e){return tt(j(sS,this),e)}};function lS(e,t){switch(e){case`post`:zr(t);break;case`pre`:Vr(t);break}}function uS(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;lS(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=Ii(()=>n(t,o));return o=t,r})}function dS(e,t,n){let r=Hr(()=>{let i=!1;uS(e,t,(e,t)=>{if(i){r();return}let a=n(e,t);return i=!0,a},{lazy:!0})});zr(()=>r)}function fS(e,t,n){uS(e,`post`,t,n)}function pS(e,t,n){uS(e,`pre`,t,n)}fS.pre=pS;function mS(e,t){dS(e,`post`,t)}function hS(e,t){dS(e,`pre`,t)}mS.pre=hS;function gS(e){return aS(e)?e():e}var _S=new WeakMap,vS=new WeakMap,yS=new WeakMap,bS=new WeakMap,xS=new WeakMap,SS=new WeakMap,CS=new WeakMap,wS=new WeakMap,TS=class{constructor(e,t={box:`border-box`}){O(this,_S,{width:0,height:0}),O(this,vS,!1),O(this,yS,void 0),O(this,bS,void 0),O(this,xS,void 0),O(this,SS,M(()=>(z(j(wS,this))?.(),this.getSize().width))),O(this,CS,M(()=>(z(j(wS,this))?.(),this.getSize().height))),O(this,wS,M(()=>{let e=gS(j(bS,this));if(e)return Dt(t=>{if(!j(xS,this))return;let n=new(j(xS,this)).ResizeObserver(e=>{A(vS,this,!0);for(let t of e){let e=j(yS,this).box===`content-box`?t.contentBoxSize:t.borderBoxSize,n=Array.isArray(e)?e:[e];j(_S,this).width=n.reduce((e,t)=>Math.max(e,t.inlineSize),0),j(_S,this).height=n.reduce((e,t)=>Math.max(e,t.blockSize),0)}t()});return n.observe(e),()=>{A(vS,this,!1),n.disconnect()}})})),A(xS,this,t.window??Sx),A(yS,this,t),A(bS,this,e),A(_S,this,{width:0,height:0})}calculateSize(){let e=gS(j(bS,this));if(!e||!j(xS,this))return;let t=e.offsetWidth,n=e.offsetHeight;if(j(yS,this).box===`border-box`)return{width:t,height:n};let r=j(xS,this).getComputedStyle(e),i=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),a=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),o=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),s=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth);return{width:t-i-o,height:n-a-s}}getSize(){return j(vS,this)?j(_S,this):this.calculateSize()??j(_S,this)}get current(){return z(j(wS,this))?.(),this.getSize()}get width(){return z(j(SS,this))}get height(){return z(j(CS,this))}};function ES(e,t){let n,r=null;return(...i)=>new Promise(a=>{r&&r(void 0),r=a,clearTimeout(n),n=setTimeout(async()=>{let t=await e(...i);r&&(r(t),r=null)},t)})}function DS(e,t){let n=0,r=null;return(...i)=>{let a=Date.now();return n&&a-n<t?r??Promise.resolve(void 0):(n=a,r=e(...i),r)}}function OS(e,t,n={},r){let{lazy:i=!1,once:a=!1,initialValue:o,debounce:s,throttle:c}=n,l=N(yr(o)),u=N(!1),d=N(void 0),f=N(yr([])),p=()=>{z(f).forEach(e=>e()),P(f,[],!0)},m=e=>{P(f,[...z(f),e],!0)},h=async(e,n,r=!1)=>{try{P(u,!0),P(d,void 0),p();let i=new AbortController;m(()=>i.abort());let a=await t(e,n,{data:z(l),refetching:r,onCleanup:m,signal:i.signal});return P(l,a,!0),a}catch(e){e instanceof DOMException&&e.name===`AbortError`||P(d,e,!0);return}finally{P(u,!1)}},g=s?ES(h,s):c?DS(h,c):h,_=Array.isArray(e)?e:[e],v;return r((t,n)=>{a&&v||(v=t,g(Array.isArray(e)?t:t[0],Array.isArray(e)?n:n?.[0]))},{lazy:i}),{get current(){return z(l)},get loading(){return z(u)},get error(){return z(d)},mutate:e=>{P(l,e,!0)},refetch:t=>{let n=_.map(e=>e());return g(Array.isArray(e)?n:n[0],Array.isArray(e)?n:n[0],t??!0)}}}function kS(e,t,n){return OS(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];fS(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}function AS(e,t,n){return OS(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];fS.pre(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}kS.pre=AS;function jS(e){zr(()=>()=>{e()})}function MS(e,t){return setTimeout(t,e)}function NS(e){Ni().then(e)}var PS=1,FS=9,IS=11;function LS(e){return Mb(e)&&e.nodeType===PS&&typeof e.nodeName==`string`}function RS(e){return Mb(e)&&e.nodeType===FS}function zS(e){return Mb(e)&&e.constructor?.name===`VisualViewport`}function BS(e){return Mb(e)&&e.nodeType!==void 0}function VS(e){return BS(e)&&e.nodeType===IS&&`host`in e}function HS(e,t){if(!e||!t||!LS(e)||!LS(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&VS(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function US(e){return RS(e)?e:zS(e)?e.document:e?.ownerDocument??document}function WS(e){return VS(e)?WS(e.host):RS(e)?e.defaultView??window:LS(e)?e.ownerDocument?.defaultView??window:window}function GS(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var KS=new WeakMap,qS=class{get root(){return z(j(KS,this))}set root(e){P(j(KS,this),e)}constructor(e){x(this,`element`,void 0),O(this,KS,M(()=>this.element.current?this.element.current.getRootNode()??document:document)),x(this,`getDocument`,()=>US(this.root)),x(this,`getWindow`,()=>this.getDocument().defaultView??window),x(this,`getActiveElement`,()=>GS(this.root)),x(this,`isActiveElement`,e=>e===this.getActiveElement()),x(this,`querySelector`,e=>this.root?this.root.querySelector(e):null),x(this,`querySelectorAll`,e=>this.root?this.root.querySelectorAll(e):[]),x(this,`setTimeout`,(e,t)=>this.getWindow().setTimeout(e,t)),x(this,`clearTimeout`,e=>this.getWindow().clearTimeout(e)),typeof e==`function`?this.element=Lb(e):this.element=e}getElementById(e){return this.root.getElementById(e)}};function JS(e,t){return{[zi()]:n=>Rb(e)?(e.current=n,Ii(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Ii(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function YS(e){return e?`true`:`false`}function XS(e){return e?`open`:`closed`}function ZS(e){return e===`starting`?{"data-starting-style":``}:e===`ending`?{"data-ending-style":``}:{}}var QS=new WeakMap,$S=new WeakMap,eC=class{constructor(e){O(this,QS,void 0),O(this,$S,void 0),x(this,`attrs`,void 0),A(QS,this,e.getVariant?e.getVariant():null),A($S,this,j(QS,this)?`data-${j(QS,this)}-`:`data-${e.component}-`),this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${j($S,this)}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function tC(e){let t=new eC(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var nC=typeof document<`u`,rC=iC();function iC(){return nC&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function aC(e){return e instanceof HTMLElement}function oC(e){return e instanceof Element}function sC(e){return e instanceof Element||e instanceof SVGElement}function cC(e){return e.pointerType===`touch`}function lC(e){return e!==null}var uC=new WeakMap,dC=new WeakMap,fC=new WeakMap,pC=new WeakMap,mC=new WeakSet,hC=class{constructor(e){kt(this,mC),O(this,uC,void 0),O(this,dC,null),O(this,fC,null),O(this,pC,0),A(uC,this,e),jS(()=>k(mC,this,gC).call(this))}run(e){k(mC,this,gC).call(this);let t=j(uC,this).ref.current;if(!t)return;if(typeof t.getAnimations!=`function`){k(mC,this,_C).call(this,e);return}let n=j(pC,this),r=()=>{n===j(pC,this)&&k(mC,this,_C).call(this,e)},i=()=>{if(n!==j(pC,this))return;let e=t.getAnimations();if(e.length===0){r();return}Promise.all(e.map(e=>e.finished)).then(()=>{r()}).catch(()=>{if(n===j(pC,this)){if(t.getAnimations().some(e=>e.pending||e.playState!==`finished`)){i();return}r()}})},a=()=>{A(dC,this,window.requestAnimationFrame(()=>{A(dC,this,null),i()}))};if(!j(uC,this).afterTick.current){a();return}A(dC,this,window.requestAnimationFrame(()=>{A(dC,this,null);let e=`data-starting-style`;if(!t.hasAttribute(e)){a();return}A(fC,this,new MutationObserver(()=>{n===j(pC,this)&&(t.hasAttribute(e)||(j(fC,this)?.disconnect(),A(fC,this,null),a()))})),j(fC,this).observe(t,{attributes:!0,attributeFilter:[e]})}))}};function gC(){var e;j(dC,this)!==null&&(window.cancelAnimationFrame(j(dC,this)),A(dC,this,null)),j(fC,this)?.disconnect(),A(fC,this,null),A(pC,this,(e=j(pC,this),e++,e))}function _C(e){let t=()=>{e()};j(uC,this).afterTick?NS(t):t()}var vC=new WeakMap,yC=new WeakMap,bC=new WeakMap,xC=new WeakMap,SC=new WeakMap,CC=new WeakMap,wC=new WeakMap,TC=new WeakSet,EC=class{constructor(e){kt(this,TC),O(this,vC,void 0),O(this,yC,void 0),O(this,bC,void 0),O(this,xC,N(!1)),O(this,SC,N(void 0)),O(this,CC,!1),O(this,wC,null),A(vC,this,e),P(j(xC,this),e.open.current,!0),A(yC,this,e.enabled??!0),A(bC,this,new hC({ref:j(vC,this).ref,afterTick:j(vC,this).open})),jS(()=>k(TC,this,DC).call(this)),fS(()=>j(vC,this).open.current,e=>{if(!j(CC,this)){A(CC,this,!0);return}if(k(TC,this,DC).call(this),!e&&j(vC,this).shouldSkipExitAnimation?.()){P(j(xC,this),!1),P(j(SC,this),void 0),j(vC,this).onComplete?.();return}if(e&&P(j(xC,this),!0),P(j(SC,this),e?`starting`:`ending`,!0),e&&A(wC,this,window.requestAnimationFrame(()=>{A(wC,this,null),j(vC,this).open.current&&P(j(SC,this),void 0)})),!j(yC,this)){e||P(j(xC,this),!1),P(j(SC,this),void 0),j(vC,this).onComplete?.();return}j(bC,this).run(()=>{e===j(vC,this).open.current&&(j(vC,this).open.current||P(j(xC,this),!1),P(j(SC,this),void 0),j(vC,this).onComplete?.())})})}get shouldRender(){return z(j(xC,this))}get transitionStatus(){return z(j(SC,this))}};function DC(){j(wC,this)!==null&&(window.cancelAnimationFrame(j(wC,this)),A(wC,this,null))}function OC(){}function kC(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}function AC(e,t){var n=da();ka(I(n),()=>t.children,e=>{var n=da();za(I(n),()=>t.children??p),H(e,n)}),H(e,n)}var jC=new cS(`BitsConfig`);function MC(){let e=new PC(null,{});return jC.getOr(e).opts}function NC(e){return jC.set(new PC(jC.getOr(null),e))}var PC=class{constructor(e,t){x(this,`opts`,void 0);let n=FC(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function FC(e,t){return n=>Lb(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function IC(e,t){return n=>{let r=MC();return Lb(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var LC=IC(e=>e.defaultPortalTo,`body`);function RC(e,t){it(t,!0);let n=LC(()=>t.to),r=rt(),i=M(a);function a(){if(!nC||t.disabled)return null;let e=null;return e=typeof n.current==`string`?document.querySelector(n.current):n.current,e}let o;function s(){o&&(ya(o),o=null)}fS([()=>z(i),()=>t.disabled],([e,n])=>{if(!e||n){s();return}return o=ha(AC,{target:e,props:{children:t.children},context:r}),()=>{s()}});var c=da(),l=I(c),u=e=>{var n=da();za(I(n),()=>t.children??p),H(e,n)};W(l,e=>{t.disabled&&e(u)}),H(e,c),at()}var zC=class{constructor(e,t={bubbles:!0,cancelable:!0}){x(this,`eventName`,void 0),x(this,`options`,void 0),this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){let n=this.createEvent(t);return e.dispatchEvent(n),n}listen(e,t,n){return ea(e,this.eventName,e=>{t(e)},n)}};function BC(e,t=500){let n=null,r=(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function VC(e,t){return e===t||e.contains(t)}function HC(e){return e?.ownerDocument??document}function UC(e,t){let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}var WC=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],GC=WC.join(`,`),KC=typeof Element>`u`,qC=KC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,JC=!KC&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},YC=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):YC(e.parentNode))},XC=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},ZC=function(e,t,n){if(YC(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(GC));return t&&qC.call(e,GC)&&r.unshift(e),r=r.filter(n),r},QC=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!YC(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=QC(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{qC.call(a,GC)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!YC(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=QC(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},$C=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},ew=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||XC(e))&&!$C(e)?0:e.tabIndex},tw=function(e,t){var n=ew(e);return n<0&&t&&!$C(e)?0:n},nw=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},rw=function(e){return e.tagName===`INPUT`},iw=function(e){return rw(e)&&e.type===`hidden`},aw=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},ow=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},sw=function(e){if(!e.name)return!0;var t=e.form||JC(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=ow(r,e.form);return!i||i===e},cw=function(e){return rw(e)&&e.type===`radio`},lw=function(e){return cw(e)&&!sw(e)},uw=function(e){var t=e&&JC(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=JC(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},dw=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},fw=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var i=getComputedStyle(e).visibility;if(i===`hidden`||i===`collapse`)return!0;var a=qC.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(qC.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=JC(e);if(s&&!s.shadowRoot&&r(s)===!0)return dw(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(uw(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return dw(e);return!1},pw=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return qC.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},mw=function(e,t){return!(t.disabled||iw(t)||fw(t,e)||aw(t)||pw(t))},hw=function(e,t){return!(lw(t)||ew(t)<0||!mw(e,t))},gw=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},_w=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=tw(a,i),s=i?_w(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(nw).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},vw=function(e,t){return t=t||{},_w(t.getShadowRoot?QC([e],t.includeContainer,{filter:hw.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:gw}):ZC(e,t.includeContainer,hw.bind(null,t)))},yw=function(e,t){return t=t||{},t.getShadowRoot?QC([e],t.includeContainer,{filter:mw.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):ZC(e,t.includeContainer,mw.bind(null,t))},bw=function(e,t){if(t=t||{},!e)throw Error(`No node provided`);return qC.call(e,GC)!==!1&&hw(t,e)},xw=WC.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),Sw=function(e,t){if(t=t||{},!e)throw Error(`No node provided`);return qC.call(e,xw)!==!1&&mw(t,e)},Cw=`data-context-menu-trigger`,ww=`data-context-menu-content`;new cS(`Menu.Root`),new cS(`Menu.Root | Menu.Sub`),new cS(`Menu.Content`),new cS(`Menu.Group | Menu.RadioGroup`),new cS(`Menu.RadioGroup`),new cS(`Menu.CheckboxGroup`),new zC(`bitsmenuopen`,{bubbles:!1,cancelable:!0}),tC({component:`menu`,parts:[`trigger`,`content`,`sub-trigger`,`item`,`group`,`group-heading`,`checkbox-group`,`checkbox-item`,`radio-group`,`radio-item`,`separator`,`sub-content`,`arrow`]});var Tw;(Tw=globalThis).bitsDismissableLayers??(Tw.bitsDismissableLayers=new Map);var Ew=new WeakMap,Dw=new WeakMap,Ow=new WeakMap,kw=new WeakMap,Aw=new WeakMap,jw=new WeakMap,Mw=new WeakMap,Nw=new WeakMap,Pw=new WeakMap,Fw=new WeakSet,Iw=new WeakMap,Lw=new WeakMap,Rw=new WeakMap,zw=new WeakMap,Bw=new WeakMap,Vw=new WeakMap,Hw=new WeakMap,Uw=new WeakMap,Ww=new WeakMap,Gw=class e{static create(t){return new e(t)}constructor(e){kt(this,Fw),x(this,`opts`,void 0),O(this,Ew,void 0),O(this,Dw,void 0),O(this,Ow,{pointerdown:!1}),O(this,kw,!1),O(this,Aw,!1),O(this,jw,void 0),O(this,Mw,void 0),O(this,Nw,OC),O(this,Pw,e=>{e.defaultPrevented||this.opts.ref.current&&NS(()=>{!this.opts.ref.current||j(Vw,this).call(this,e.target)||e.target&&!j(Aw,this)&&j(Mw,this).current?.(e)})}),O(this,Iw,e=>{let t=e;t.defaultPrevented&&(t=Zw(e)),j(Ew,this).current(e)}),O(this,Lw,BC(e=>{if(!this.opts.ref.current){j(Nw,this).call(this);return}let t=this.opts.isValidEvent.current(e,this.opts.ref.current)||Xw(e,this.opts.ref.current);if(!j(kw,this)||k(Fw,this,qw).call(this)||!t){j(Nw,this).call(this);return}let n=e;if(n.defaultPrevented&&(n=Zw(n)),j(Dw,this).current!==`close`&&j(Dw,this).current!==`defer-otherwise-close`){j(Nw,this).call(this);return}e.pointerType===`touch`?(j(Nw,this).call(this),A(Nw,this,ea(j(jw,this),`click`,j(Iw,this),{once:!0}))):j(Ew,this).current(n)},10)),O(this,Rw,e=>{j(Ow,this)[e.type]=!0}),O(this,zw,e=>{j(Ow,this)[e.type]=!1}),O(this,Bw,()=>{this.opts.ref.current&&A(kw,this,Yw(this.opts.ref.current))}),O(this,Vw,e=>this.opts.ref.current?VC(this.opts.ref.current,e):!1),O(this,Hw,BC(()=>{for(let e in j(Ow,this))j(Ow,this)[e]=!1;A(kw,this,!1)},20)),O(this,Uw,()=>{A(Aw,this,!0)}),O(this,Ww,()=>{A(Aw,this,!1)}),x(this,`props`,{onfocuscapture:j(Uw,this),onblurcapture:j(Ww,this)}),this.opts=e,A(Dw,this,e.interactOutsideBehavior),A(Ew,this,e.onInteractOutside),A(Mw,this,e.onFocusOutside),zr(()=>{A(jw,this,HC(this.opts.ref.current))});let t=OC,n=null,r=!1,i=()=>{n!=null&&(clearTimeout(n),n=null)},a=()=>{i(),j(Hw,this).call(this),globalThis.bitsDismissableLayers.delete(this),j(Lw,this).destroy(),t()};fS([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return i(),n=MS(1,()=>{n=null,!(r||!this.opts.ref.current)&&(globalThis.bitsDismissableLayers.set(this,j(Dw,this)),t(),t=k(Fw,this,Kw).call(this))}),a}),jS(()=>{r=!0,i(),j(Hw,this).destroy(),globalThis.bitsDismissableLayers.delete(this),j(Lw,this).destroy(),j(Nw,this).call(this),t()})}};function Kw(){return mx(ea(j(jw,this),`pointerdown`,mx(j(Rw,this),j(Bw,this)),{capture:!0}),ea(j(jw,this),`pointerdown`,mx(j(zw,this),j(Lw,this))),ea(j(jw,this),`focusin`,j(Pw,this)))}function qw(){return Object.values(j(Ow,this)).some(Boolean)}function Jw(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function Yw(e){let t=[...globalThis.bitsDismissableLayers],n=Jw(t);if(n)return n[0].opts.ref.current===e;let[r]=t[0];return r.opts.ref.current===e}function Xw(e,t){let n=e.target;if(!sC(n))return!1;let r=!!n.closest(`[${Cw}]`),i=!!t.closest(`[${ww}]`);return`button`in e&&e.button>0&&!r?!1:`button`in e&&e.button===0&&r&&i?!0:r&&i?!1:HC(n).documentElement.contains(n)&&!VC(t,n)&&UC(e,t)}function Zw(e){let t=e.currentTarget,n=e.target,r;r=e instanceof PointerEvent?new PointerEvent(e.type,e):new PointerEvent(`pointerdown`,e);let i=!1;return new Proxy(r,{get:(r,a)=>a===`currentTarget`?t:a===`target`?n:a===`preventDefault`?()=>{i=!0,typeof r.preventDefault==`function`&&r.preventDefault()}:a===`defaultPrevented`?i:a in r?r[a]:e[a]})}function Qw(e,t){it(t,!0);let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`onInteractOutside`,3,OC),i=Z(t,`onFocusOutside`,3,OC),a=Z(t,`isValidEvent`,3,()=>!1),o=Gw.create({id:Lb(()=>t.id),interactOutsideBehavior:Lb(()=>n()),onInteractOutside:Lb(()=>r()),enabled:Lb(()=>t.enabled),onFocusOutside:Lb(()=>i()),isValidEvent:Lb(()=>a()),ref:t.ref});var s=da();za(I(s),()=>t.children??p,()=>({props:o.props})),H(e,s),at()}var $w;($w=globalThis).bitsEscapeLayers??($w.bitsEscapeLayers=new Map);var eT=new WeakMap,tT=new WeakMap,nT=class e{static create(t){return new e(t)}constructor(e){x(this,`opts`,void 0),x(this,`domContext`,void 0),O(this,eT,()=>ea(this.domContext.getDocument(),`keydown`,j(tT,this),{passive:!1})),O(this,tT,e=>{if(e.key!==`Escape`||!rT(this))return;let t=new KeyboardEvent(e.type,e);e.preventDefault();let n=this.opts.escapeKeydownBehavior.current;n!==`close`&&n!==`defer-otherwise-close`||this.opts.onEscapeKeydown.current(t)}),this.opts=e,this.domContext=new qS(this.opts.ref);let t=OC;fS(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=j(eT,this).call(this)),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}};function rT(e){let t=[...globalThis.bitsEscapeLayers],n=t.findLast(([e,{current:t}])=>t===`close`||t===`ignore`);if(n)return n[0]===e;let[r]=t[0];return r===e}function iT(e,t){it(t,!0);let n=Z(t,`escapeKeydownBehavior`,3,`close`),r=Z(t,`onEscapeKeydown`,3,OC);nT.create({escapeKeydownBehavior:Lb(()=>n()),onEscapeKeydown:Lb(()=>r()),enabled:Lb(()=>t.enabled),ref:t.ref});var i=da();za(I(i),()=>t.children??p),H(e,i),at()}var aT=new WeakMap,oT=new WeakMap,sT=new WeakMap,cT=class e{constructor(){O(this,aT,Bb([])),O(this,oT,new WeakMap),O(this,sT,new WeakMap)}static getInstance(){return this.instance||(this.instance=new e),this.instance}register(e){let t=this.getActive();t&&t!==e&&t.pause();let n=document.activeElement;n&&n!==document.body&&j(sT,this).set(e,n),j(aT,this).current=j(aT,this).current.filter(t=>t!==e),j(aT,this).current.unshift(e)}unregister(e){j(aT,this).current=j(aT,this).current.filter(t=>t!==e);let t=this.getActive();t&&t.resume()}getActive(){return j(aT,this).current[0]}setFocusMemory(e,t){j(oT,this).set(e,t)}getFocusMemory(e){return j(oT,this).get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){j(sT,this).set(e,t)}getPreFocusMemory(e){return j(sT,this).get(e)}clearPreFocusMemory(e){j(sT,this).delete(e)}};x(cT,`instance`,void 0);var lT=new WeakMap,uT=new WeakMap,dT=new WeakMap,fT=new WeakMap,pT=new WeakMap,mT=new WeakSet,hT=class e{constructor(e){kt(this,mT),O(this,lT,!1),O(this,uT,null),O(this,dT,cT.getInstance()),O(this,fT,[]),O(this,pT,void 0),A(pT,this,e)}get paused(){return j(lT,this)}pause(){A(lT,this,!0)}resume(){A(lT,this,!1)}mount(e){j(uT,this)&&this.unmount(),A(uT,this,e),j(dT,this).register(this),k(mT,this,yT).call(this),k(mT,this,_T).call(this)}unmount(){j(uT,this)&&(k(mT,this,gT).call(this),k(mT,this,vT).call(this),j(dT,this).unregister(this),j(dT,this).clearPreFocusMemory(this),A(uT,this,null))}static use(t){let n=null;return fS([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||(n=new e(t)),n.mount(r)):n&&(n.unmount(),n=null)}),jS(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function gT(){for(let e of j(fT,this))e();A(fT,this,[])}function _T(){if(!j(uT,this))return;let e=new CustomEvent(`focusScope.onOpenAutoFocus`,{bubbles:!1,cancelable:!0});j(pT,this).onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!j(uT,this))return;let e=k(mT,this,xT).call(this);e?(e.focus(),j(dT,this).setFocusMemory(this,e)):j(uT,this).focus()})}function vT(){let e=new CustomEvent(`focusScope.onCloseAutoFocus`,{bubbles:!1,cancelable:!0});if(j(pT,this).onCloseAutoFocus.current?.(e),!e.defaultPrevented){let e=j(dT,this).getPreFocusMemory(this);if(e&&document.contains(e))try{e.focus()}catch{document.body.focus()}}}function yT(){if(!j(uT,this)||!j(pT,this).trap.current)return;let e=j(uT,this),t=e.ownerDocument;j(fT,this).push(ea(t,`focusin`,t=>{if(j(lT,this)||!j(dT,this).isActiveScope(this))return;let n=t.target;if(n)if(e.contains(n))j(dT,this).setFocusMemory(this,n);else{let n=j(dT,this).getFocusMemory(this);if(n&&e.contains(n)&&Sw(n))t.preventDefault(),n.focus();else{let t=k(mT,this,xT).call(this),n=k(mT,this,ST).call(this)[0];(t||n||e).focus()}}},{capture:!0}),ea(e,`keydown`,e=>{if(!j(pT,this).loop||j(lT,this)||e.key!==`Tab`||!j(dT,this).isActiveScope(this))return;let n=k(mT,this,bT).call(this);if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&t.activeElement===i?(e.preventDefault(),r.focus()):e.shiftKey&&t.activeElement===r&&(e.preventDefault(),i.focus())}));let n=new MutationObserver(()=>{let t=j(dT,this).getFocusMemory(this);if(t&&!e.contains(t)){let t=k(mT,this,xT).call(this),n=k(mT,this,ST).call(this)[0],r=t||n;r?(r.focus(),j(dT,this).setFocusMemory(this,r)):e.focus()}});n.observe(e,{childList:!0,subtree:!0}),j(fT,this).push(()=>n.disconnect())}function bT(){return j(uT,this)?vw(j(uT,this),{includeContainer:!1,getShadowRoot:!0}):[]}function xT(){return k(mT,this,bT).call(this)[0]||null}function ST(){return j(uT,this)?yw(j(uT,this),{includeContainer:!1,getShadowRoot:!0}):[]}function CT(e,t){it(t,!0);let n=Z(t,`enabled`,3,!1),r=Z(t,`trapFocus`,3,!1),i=Z(t,`loop`,3,!1),a=Z(t,`onCloseAutoFocus`,3,OC),o=Z(t,`onOpenAutoFocus`,3,OC),s=hT.use({enabled:Lb(()=>n()),trap:Lb(()=>r()),loop:i(),onCloseAutoFocus:Lb(()=>a()),onOpenAutoFocus:Lb(()=>o()),ref:t.ref});var c=da();za(I(c),()=>t.focusScope??p,()=>({props:s.props})),H(e,c),at()}var wT,TT=()=>{};(wT=globalThis).bitsTextSelectionLayers??(wT.bitsTextSelectionLayers=new Map);var ET=new WeakMap,DT=new WeakMap,OT=new WeakMap,kT=new WeakMap,AT=new WeakSet,jT=new WeakMap,MT=new WeakMap,NT=new WeakMap,PT=class e{static create(t){return new e(t)}constructor(e){kt(this,AT),x(this,`opts`,void 0),x(this,`domContext`,void 0),O(this,ET,OC),O(this,DT,!1),O(this,OT,TT),O(this,kT,TT),O(this,jT,e=>{j(kT,this).call(this,e)}),O(this,MT,e=>{if(!j(DT,this))return;let t=this.opts.ref.current,n=e.target;!aC(t)||!aC(n)||!zT(this)||!HS(t,n)||(j(OT,this).call(this,e),!e.defaultPrevented&&A(ET,this,LT(t,this.domContext.getDocument().body)))}),O(this,NT,()=>{j(ET,this).call(this),A(ET,this,OC)}),this.opts=e,this.domContext=new qS(e.ref);let t=OC;fS(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([e,n,r])=>(A(DT,this,e),A(OT,this,n),A(kT,this,r),e&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=k(AT,this,FT).call(this)),()=>{A(DT,this,!1),t(),j(NT,this).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}};function FT(){return mx(ea(this.domContext.getDocument(),`pointerdown`,j(MT,this)),ea(this.domContext.getDocument(),`pointerup`,Vb(j(NT,this),j(jT,this))))}var IT=e=>e.style.userSelect||e.style.webkitUserSelect;function LT(e,t){let n=IT(t),r=IT(e);return RT(t,`none`),RT(e,`text`),()=>{RT(t,n),RT(e,r)}}function RT(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function zT(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function BT(e,t){it(t,!0);let n=Z(t,`preventOverflowTextSelection`,3,!0),r=Z(t,`onPointerDown`,3,OC),i=Z(t,`onPointerUp`,3,OC);PT.create({id:Lb(()=>t.id),onPointerDown:Lb(()=>r()),onPointerUp:Lb(()=>i()),enabled:Lb(()=>t.enabled&&n()),ref:t.ref});var a=da();za(I(a),()=>t.children??p),H(e,a),at()}var VT;(VT=globalThis).bitsIdCounter??(VT.bitsIdCounter={current:0});function HT(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var UT=new WeakMap,WT=new WeakMap,GT=new WeakMap,KT=new WeakMap,qT=new WeakSet,JT=class{constructor(e){kt(this,qT),O(this,UT,void 0),O(this,WT,0),O(this,GT,N()),O(this,KT,void 0),A(UT,this,e)}get(...e){return A(WT,this,j(WT,this)+1),z(j(GT,this))===void 0&&A(KT,this,Hr(()=>{P(j(GT,this),j(UT,this).call(this,...e),!0)})),zr(()=>()=>{k(qT,this,YT).call(this)}),z(j(GT,this))}};function YT(){A(WT,this,j(WT,this)-1),j(KT,this)&&j(WT,this)<=0&&(j(KT,this).call(this),P(j(GT,this),void 0),A(KT,this,void 0))}var XT=new eS,ZT=N(null),QT=null,$T=null,eE=!1,tE=Lb(()=>{for(let e of XT.values())if(e)return!0;return!1}),nE=null,rE=new JT(()=>{function e(){document.body.setAttribute(`style`,z(ZT)??``),document.body.style.removeProperty(`--scrollbar-width`),rC&&QT?.(),P(ZT,null)}function t(){$T!==null&&(window.clearTimeout($T),$T=null)}function n(e,n){t(),eE=!0,nE=Date.now();let r=nE,i=()=>{$T=null,nE===r&&(lE(XT)?eE=!1:(eE=!1,n()))},a=e===null?24:e;$T=window.setTimeout(i,a)}function r(){z(ZT)===null&&XT.size===0&&!eE&&P(ZT,document.body.getAttribute(`style`),!0)}return fS(()=>tE.current,()=>{if(!tE.current)return;r(),eE=!1;let e=getComputedStyle(document.documentElement),t=getComputedStyle(document.body),n=e.scrollbarGutter?.includes(`stable`)||t.scrollbarGutter?.includes(`stable`),i=window.innerWidth-document.documentElement.clientWidth,a={padding:Number.parseInt(t.paddingRight??`0`,10)+i,margin:Number.parseInt(t.marginRight??`0`,10)};i>0&&!n&&(document.body.style.paddingRight=`${a.padding}px`,document.body.style.marginRight=`${a.margin}px`,document.body.style.setProperty(`--scrollbar-width`,`${i}px`)),document.body.style.overflow=`hidden`,rC&&(QT=ea(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),NS(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})}),jS(()=>()=>{QT?.()}),{get lockMap(){return XT},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}}),iE=new WeakMap,aE=new WeakMap,oE=new WeakMap,sE=new WeakMap,cE=class{constructor(e,t=()=>null){O(this,iE,HT()),O(this,aE,void 0),O(this,oE,()=>null),O(this,sE,void 0),x(this,`locked`,void 0),A(aE,this,e),A(oE,this,t),A(sE,this,rE.get()),j(sE,this)&&(j(sE,this).cancelPendingCleanup(),j(sE,this).ensureInitialStyleCaptured(),j(sE,this).lockMap.set(j(iE,this),j(aE,this)??!1),this.locked=Lb(()=>j(sE,this).lockMap.get(j(iE,this))??!1,e=>j(sE,this).lockMap.set(j(iE,this),e)),jS(()=>{if(j(sE,this).lockMap.delete(j(iE,this)),lE(j(sE,this).lockMap))return;let e=j(oE,this).call(this);j(sE,this).scheduleCleanupIfNoNewLocks(e,()=>{j(sE,this).resetBodyStyle()})}))}};function lE(e){for(let[t,n]of e)if(n)return!0;return!1}function uE(e,t){it(t,!0);let n=Z(t,`preventScroll`,3,!0),r=Z(t,`restoreScrollDelay`,3,null);n()&&new cE(n(),()=>r()),at()}function dE(e,t){it(t,!0),NC({defaultPortalTo:Lb(()=>t.defaultPortalTo),defaultLocale:Lb(()=>t.defaultLocale)});var n=da();za(I(n),()=>t.children??p),H(e,n),at()}var fE=[`top`,`right`,`bottom`,`left`],pE=Math.min,mE=Math.max,hE=Math.round,gE=Math.floor,_E=e=>({x:e,y:e}),vE={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function yE(e,t,n){return mE(e,pE(t,n))}function bE(e,t){return typeof e==`function`?e(t):e}function xE(e){return e.split(`-`)[0]}function SE(e){return e.split(`-`)[1]}function CE(e){return e===`x`?`y`:`x`}function wE(e){return e===`y`?`height`:`width`}function TE(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function EE(e){return CE(TE(e))}function DE(e,t,n){n===void 0&&(n=!1);let r=SE(e),i=EE(e),a=wE(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=IE(o)),[o,IE(o)]}function OE(e){let t=IE(e);return[kE(e),t,kE(t)]}function kE(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var AE=[`left`,`right`],jE=[`right`,`left`],ME=[`top`,`bottom`],NE=[`bottom`,`top`];function PE(e,t,n){switch(e){case`top`:case`bottom`:return n?t?jE:AE:t?AE:jE;case`left`:case`right`:return t?ME:NE;default:return[]}}function FE(e,t,n,r){let i=SE(e),a=PE(xE(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(kE)))),a}function IE(e){let t=xE(e);return vE[t]+e.slice(t.length)}function LE(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function RE(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:LE(e)}function zE(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 BE(e,t,n){let{reference:r,floating:i}=e,a=TE(t),o=EE(t),s=wE(o),c=xE(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}}let m=SE(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function VE(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}=bE(t,e),p=RE(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=zE(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=zE(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 HE=50,UE=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:VE},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=BE(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<HE&&(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}=BE(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},WE=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}=bE(e,t)||{};if(l==null)return{};let d=RE(u),f={x:n,y:r},p=EE(i),m=wE(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,ee=pE(d[_],T),te=pE(d[v],T),ne=C-h[m]-te,re=C/2-h[m]/2+w,ie=yE(ee,re,ne),ae=!c.arrow&&SE(i)!=null&&re!==ie&&a.reference[m]/2-(re<ee?ee:te)-h[m]/2<0,oe=ae?re<ee?re-ee:re-ne:0;return{[p]:f[p]+oe,data:{[p]:ie,centerOffset:re-ie-oe,...ae&&{alignmentOffset:oe}},reset:ae}}}),GE=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}=bE(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=xE(r),_=TE(o),v=xE(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[IE(o)]:OE(o)),x=p!==`none`;!d&&x&&b.push(...FE(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=DE(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`&&_!==TE(t))||T.every(e=>TE(e.placement)!==_||e.overflows[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=TE(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 KE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qE(e){return fE.some(t=>e[t]>=0)}var JE=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=bE(e,t);switch(i){case`referenceHidden`:{let e=KE(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:qE(e)}}}case`escaped`:{let e=KE(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:qE(e)}}}default:return{}}}}},YE=new Set([`left`,`top`]);async function XE(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=xE(n),s=SE(n),c=TE(n)===`y`,l=YE.has(o)?-1:1,u=a&&c?-1:1,d=bE(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 ZE=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 XE(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}}}}},QE=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}=bE(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=TE(i),p=CE(f),m=u[p],h=u[f],g=(e,t)=>yE(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},$E=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}=bE(e,t),u={x:n,y:r},d=TE(i),f=CE(d),p=u[f],m=u[d],h=bE(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};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=YE.has(xE(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}}}},eD=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=bE(e,t),c=await i.detectOverflow(t,s),l=xE(n),u=SE(n),d=TE(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=pE(p-c[m],g),y=pE(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*mE(c.left,c.right):S=p-2*mE(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function tD(){return typeof window<`u`}function nD(e){return aD(e)?(e.nodeName||``).toLowerCase():`#document`}function rD(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function iD(e){return((aD(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function aD(e){return tD()?e instanceof Node||e instanceof rD(e).Node:!1}function oD(e){return tD()?e instanceof Element||e instanceof rD(e).Element:!1}function sD(e){return tD()?e instanceof HTMLElement||e instanceof rD(e).HTMLElement:!1}function cD(e){return!tD()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof rD(e).ShadowRoot}function lD(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=bD(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function uD(e){return/^(table|td|th)$/.test(nD(e))}function dD(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var fD=/transform|translate|scale|rotate|perspective|filter/,pD=/paint|layout|strict|content/,mD=e=>!!e&&e!==`none`,hD;function gD(e){let t=oD(e)?bD(e):e;return mD(t.transform)||mD(t.translate)||mD(t.scale)||mD(t.rotate)||mD(t.perspective)||!vD()&&(mD(t.backdropFilter)||mD(t.filter))||fD.test(t.willChange||``)||pD.test(t.contain||``)}function _D(e){let t=SD(e);for(;sD(t)&&!yD(t);){if(gD(t))return t;if(dD(t))return null;t=SD(t)}return null}function vD(){return hD??(hD=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`)),hD}function yD(e){return/^(html|body|#document)$/.test(nD(e))}function bD(e){return rD(e).getComputedStyle(e)}function xD(e){return oD(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function SD(e){if(nD(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||cD(e)&&e.host||iD(e);return cD(t)?t.host:t}function CD(e){let t=SD(e);return yD(t)?(e.ownerDocument||e).body:sD(t)&&lD(t)?t:CD(t)}function wD(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=CD(e),i=r===e.ownerDocument?.body,a=rD(r);if(i){let e=TD(a);return t.concat(a,a.visualViewport||[],lD(r)?r:[],e&&n?wD(e):[])}else return t.concat(r,wD(r,[],n))}function TD(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ED(e){let t=bD(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=sD(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=hE(n)!==a||hE(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function DD(e){return oD(e)?e:e.contextElement}function OD(e){let t=DD(e);if(!sD(t))return _E(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ED(t),o=(a?hE(n.width):n.width)/r,s=(a?hE(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var kD=_E(0);function AD(e){let t=rD(e);return!vD()||!t.visualViewport?kD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jD(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===rD(e)}function MD(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=DD(e),o=_E(1);t&&(r?oD(r)&&(o=OD(r)):o=OD(e));let s=jD(a,n,r)?AD(a):_E(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&&r){let e=rD(a),t=oD(r)?rD(r):r,n=e,i=TD(n);for(;i&&t!==n;){let e=OD(i),t=i.getBoundingClientRect(),r=bD(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=rD(i),i=TD(n)}}return zE({width:u,height:d,x:c,y:l})}function ND(e,t){let n=xD(e).scrollLeft;return t?t.left+n:MD(iD(e)).left+n}function PD(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ND(e,n),y:n.top+t.scrollTop}}function FD(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=iD(r),s=t?dD(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=_E(1),u=_E(0),d=sD(r);if((d||!a)&&((nD(r)!==`body`||lD(o))&&(c=xD(r)),d)){let e=MD(r);l=OD(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?PD(o,c):_E(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 ID(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function LD(e){let t=xD(e),n=e.ownerDocument.body,r=mE(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=mE(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+ND(e),o=-t.scrollTop;return bD(n).direction===`rtl`&&(a+=mE(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var RD=25;function zD(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=rD(e),a=iD(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!vD()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(ND(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=RD&&(s-=o)}return{width:s,height:c,x:l,y:u}}function BD(e,t){let n=MD(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=OD(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function VD(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=zD(e,n,t);else if(t===`document`)r=LD(iD(e));else if(oD(t))r=BD(t,n);else{let n=AD(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return zE(r)}function HD(e,t){let n=t.get(e);if(n)return n;let r=wD(e,[],!1).filter(e=>oD(e)&&nD(e)!==`body`),i=null,a=bD(e).position===`fixed`,o=a?SD(e):e;for(;oD(o)&&!yD(o);){let e=bD(o),t=gD(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=SD(o)}return t.set(e,r),r}function UD(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?dD(t)?[]:HD(t,this._c):[].concat(n),r],o=VD(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=VD(t,a[e],i);s=mE(n.top,s),c=pE(n.right,c),l=pE(n.bottom,l),u=mE(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function WD(e){let{width:t,height:n}=ED(e);return{width:t,height:n}}function GD(e,t,n){let r=sD(t),i=iD(t),a=n===`fixed`,o=MD(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=_E(0);if((r||!a)&&((nD(t)!==`body`||lD(i))&&(s=xD(t)),r)){let e=MD(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=ND(i));let l=i&&!r&&!a?PD(i,s):_E(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function KD(e){return bD(e).position===`static`}function qD(e,t){if(!sD(e)||bD(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return iD(e)===n&&(n=n.ownerDocument.body),n}function JD(e,t){let n=rD(e);if(dD(e))return n;if(!sD(e)){let t=SD(e);for(;t&&!yD(t);){if(oD(t)&&!KD(t))return t;t=SD(t)}return n}let r=qD(e,t);for(;r&&uD(r)&&KD(r);)r=qD(r,t);return r&&yD(r)&&KD(r)&&!gD(r)?n:r||_D(e)||n}var YD=async function(e){let t=this.getOffsetParent||JD,n=this.getDimensions,r=await n(e.floating);return{reference:GD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function XD(e){return bD(e).direction===`rtl`}var ZD={convertOffsetParentRelativeRectToViewportRelativeRect:FD,getDocumentElement:iD,getClippingRect:UD,getOffsetParent:JD,getElementRects:YD,getClientRects:ID,getDimensions:WD,getScale:OD,isElement:oD,isRTL:XD};function QD(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $D(e,t,n){let r=null,i,a=iD(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=gE(d),h=gE(a.clientWidth-(u+f)),g=gE(a.clientHeight-(d+p)),_=gE(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:mE(0,pE(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!QD(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=rD(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function eO(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=DD(e),u=i||a?[...l?wD(l):[],...t?wD(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?$D(l,n,a):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?MD(e):null;c&&g();function g(){let t=MD(e);h&&!QD(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 tO=ZE,nO=QE,rO=GE,iO=eD,aO=JE,oO=WE,sO=$E,cO=(e,t,n)=>{let r=new Map,i=n??{},a={...ZD,...i.platform,_c:r};return UE(e,t,{...i,platform:a})};function lO(e){return typeof e==`function`?e():e}function uO(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dO(e,t){let n=uO(e);return Math.round(t*n)/n}function fO(e){return{[`--bits-${e}-content-transform-origin`]:`var(--bits-floating-transform-origin)`,[`--bits-${e}-content-available-width`]:`var(--bits-floating-available-width)`,[`--bits-${e}-content-available-height`]:`var(--bits-floating-available-height)`,[`--bits-${e}-anchor-width`]:`var(--bits-floating-anchor-width)`,[`--bits-${e}-anchor-height`]:`var(--bits-floating-anchor-height)`}}function pO(e){let t=e.whileElementsMounted,n=M(()=>lO(e.open)??!0),r=M(()=>lO(e.middleware)),i=M(()=>lO(e.transform)??!0),a=M(()=>lO(e.placement)??`bottom`),o=M(()=>lO(e.strategy)??`absolute`),s=M(()=>lO(e.sideOffset)??0),c=M(()=>lO(e.alignOffset)??0),l=e.reference,u=N(0),d=N(0),f=Bb(null),p=N(yr(z(o))),m=N(yr(z(a))),h=N(yr({})),g=N(!1),_=!1,v=0,y=M(()=>{let e=f.current?dO(f.current,z(u)):z(u),t=f.current?dO(f.current,z(d)):z(d);return z(i)?{position:z(p),left:`0`,top:`0`,transform:`translate(${e}px, ${t}px)`,...f.current&&uO(f.current)>=1.5&&{willChange:`transform`}}:{position:z(p),left:`${e}px`,top:`${t}px`}}),b;function x(){if(l.current===null||f.current===null)return;let e=l.current,t=f.current,i=++v;cO(e,t,{middleware:z(r),placement:z(a),strategy:z(o)}).then(r=>{if(i===v&&!(l.current!==e||f.current!==t)){if(mO(e)){P(h,{...z(h),hide:{...z(h).hide,referenceHidden:!0}},!0);return}if(!z(n)&&z(u)!==0&&z(d)!==0){let e=Math.max(Math.abs(z(s)),Math.abs(z(c)),15);if(r.x<=e&&r.y<=e)return}P(u,r.x,!0),P(d,r.y,!0),P(p,r.strategy,!0),P(m,r.placement,!0),P(h,r.middlewareData,!0),P(g,!0)}})}function S(){typeof b==`function`&&(b(),b=void 0),v++}function C(){if(S(),t===void 0){x();return}z(n)&&(l.current===null||f.current===null||(b=t(l.current,f.current,x)))}function w(){!z(n)&&f.current===null&&P(g,!1)}function T(){return[z(r),z(a),z(o),z(s),z(c),z(n)]}return zr(()=>{t===void 0&&z(n)&&x()}),zr(C),zr(()=>{if(t!==void 0){if(T(),!z(n)){_=!1;return}if(!z(g)){_=!1;return}if(!_){_=!0;return}x()}}),zr(w),zr(()=>S),{floating:f,reference:l,get strategy(){return z(p)},get placement(){return z(m)},get middlewareData(){return z(h)},get isPositioned(){return z(g)},get floatingStyles(){return z(y)},get update(){return x}}}function mO(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var hO={top:`bottom`,right:`left`,bottom:`top`,left:`right`},gO=new cS(`Floating.Root`),_O=new cS(`Floating.Content`),vO=new cS(`Floating.Root`),yO=class e{static create(t=!1){return t?vO.set(new e):gO.set(new e)}constructor(){x(this,`anchorNode`,Bb(null)),x(this,`customAnchorNode`,Bb(null)),x(this,`triggerNode`,Bb(null)),zr(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current==`string`?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},bO=new WeakMap,xO=new WeakMap,SO=new WeakMap,CO=new WeakMap,wO=new WeakMap,TO=new WeakMap,EO=new WeakMap,DO=new WeakMap,OO=new WeakMap,kO=new WeakMap,AO=new WeakMap,jO=new WeakMap,MO=new WeakMap,NO=new WeakMap,PO=new WeakMap,FO=new WeakMap,IO=new WeakMap,LO=new WeakMap,RO=new WeakMap,zO=new WeakMap,BO=new WeakMap,VO=new WeakMap,HO=new WeakMap,UO=new WeakMap,WO=class e{static create(t,n=!1){return n?_O.set(new e(t,vO.get())):_O.set(new e(t,gO.get()))}get hasExplicitBoundaries(){return z(j(DO,this))}set hasExplicitBoundaries(e){P(j(DO,this),e)}get detectOverflowOptions(){return z(j(OO,this))}set detectOverflowOptions(e){P(j(OO,this),e)}get middleware(){return z(j(NO,this))}set middleware(e){P(j(NO,this),e)}get placedSide(){return z(j(PO,this))}set placedSide(e){P(j(PO,this),e)}get placedAlign(){return z(j(FO,this))}set placedAlign(e){P(j(FO,this),e)}get arrowX(){return z(j(IO,this))}set arrowX(e){P(j(IO,this),e)}get arrowY(){return z(j(LO,this))}set arrowY(e){P(j(LO,this),e)}get cannotCenterArrow(){return z(j(RO,this))}set cannotCenterArrow(e){P(j(RO,this),e)}get contentZIndex(){return z(j(zO,this))}set contentZIndex(e){P(j(zO,this),e,!0)}get arrowBaseSide(){return z(j(BO,this))}set arrowBaseSide(e){P(j(BO,this),e)}get wrapperProps(){return z(j(VO,this))}set wrapperProps(e){P(j(VO,this),e)}get props(){return z(j(HO,this))}set props(e){P(j(HO,this),e)}get arrowStyle(){return z(j(UO,this))}set arrowStyle(e){P(j(UO,this),e)}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`contentRef`,Bb(null)),x(this,`wrapperRef`,Bb(null)),x(this,`arrowRef`,Bb(null)),x(this,`contentAttachment`,JS(this.contentRef)),x(this,`wrapperAttachment`,JS(this.wrapperRef)),x(this,`arrowAttachment`,JS(this.arrowRef)),x(this,`arrowId`,Bb(HT())),O(this,bO,M(()=>{if(typeof this.opts.style==`string`)return px(this.opts.style);if(!this.opts.style)return{}})),O(this,xO,void 0),O(this,SO,new TS(()=>this.arrowRef.current??void 0)),O(this,CO,M(()=>j(SO,this)?.width??0)),O(this,wO,M(()=>j(SO,this)?.height??0)),O(this,TO,M(()=>this.opts.side?.current+(this.opts.align.current===`center`?``:`-${this.opts.align.current}`))),O(this,EO,M(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current])),O(this,DO,M(()=>z(j(EO,this)).length>0)),O(this,OO,M(()=>({padding:this.opts.collisionPadding.current,boundary:z(j(EO,this)).filter(lC),altBoundary:this.hasExplicitBoundaries}))),O(this,kO,N(void 0)),O(this,AO,N(void 0)),O(this,jO,N(void 0)),O(this,MO,N(void 0)),O(this,NO,M(()=>[tO({mainAxis:this.opts.sideOffset.current+z(j(wO,this)),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&nO({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current===`partial`?sO():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&rO({...this.detectOverflowOptions}),iO({...this.detectOverflowOptions,apply:({rects:e,availableWidth:t,availableHeight:n})=>{let{width:r,height:i}=e.reference;P(j(kO,this),t,!0),P(j(AO,this),n,!0),P(j(jO,this),r,!0),P(j(MO,this),i,!0)}}),this.arrowRef.current&&oO({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),KO({arrowWidth:z(j(CO,this)),arrowHeight:z(j(wO,this))}),this.opts.hideWhenDetached.current&&aO({strategy:`referenceHidden`,...this.detectOverflowOptions})].filter(Boolean))),x(this,`floating`,void 0),O(this,PO,M(()=>JO(this.floating.placement))),O(this,FO,M(()=>YO(this.floating.placement))),O(this,IO,M(()=>this.floating.middlewareData.arrow?.x??0)),O(this,LO,M(()=>this.floating.middlewareData.arrow?.y??0)),O(this,RO,M(()=>this.floating.middlewareData.arrow?.centerOffset!==0)),O(this,zO,N()),O(this,BO,M(()=>hO[this.placedSide])),O(this,VO,M(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":``,style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${z(j(kO,this))}px`,"--bits-floating-available-height":`${z(j(AO,this))}px`,"--bits-floating-anchor-width":`${z(j(jO,this))}px`,"--bits-floating-anchor-height":`${z(j(MO,this))}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:`hidden`,"pointer-events":`none`},...z(j(bO,this))},dir:this.opts.dir.current,...this.wrapperAttachment}))),O(this,HO,M(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:vx({...z(j(bO,this))}),...this.contentAttachment}))),O(this,UO,M(()=>({position:`absolute`,left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[this.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[this.placedSide],visibility:this.cannotCenterArrow?`hidden`:void 0}))),this.opts=e,this.root=t,A(xO,this,e.updatePositionStrategy),e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),fS(()=>e.customAnchor.current,e=>{this.root.customAnchorNode.current=e}),this.floating=pO({strategy:()=>this.opts.strategy.current,placement:()=>z(j(TO,this)),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...e)=>eO(...e,{animationFrame:j(xO,this)?.current===`always`}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),zr(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),fS(()=>this.contentRef.current,e=>{if(!e||!this.opts.enabled.current)return;let t=WS(e),n=t.requestAnimationFrame(()=>{if(this.contentRef.current!==e||!this.opts.enabled.current)return;let n=t.getComputedStyle(e).zIndex;n!==this.contentZIndex&&(this.contentZIndex=n)});return()=>{t.cancelAnimationFrame(n)}}),zr(()=>{this.floating.floating.current=this.wrapperRef.current})}},GO=class e{static create(t,n=!1){return n?new e(t,vO.get()):new e(t,gO.get())}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),this.opts=e,this.root=t,e.virtualEl&&e.virtualEl.current?t.triggerNode=zb(e.virtualEl.current):t.triggerNode=e.ref}};function KO(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=qO(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}}function qO(e){let[t,n=`center`]=e.split(`-`);return[t,n]}function JO(e){return qO(e)[0]}function YO(e){return qO(e)[1]}function XO(e,t){it(t,!0);let n=Z(t,`tooltip`,3,!1);yO.create(n());var r=da();za(I(r),()=>t.children??p),H(e,r),at()}function ZO(e,t){it(t,!0);let n=Z(t,`tooltip`,3,!1);GO.create({id:Lb(()=>t.id),virtualEl:Lb(()=>t.virtualEl),ref:t.ref},n());var r=da();za(I(r),()=>t.children??p),H(e,r),at()}function QO(e,t){it(t,!0);let n=Z(t,`side`,3,`bottom`),r=Z(t,`sideOffset`,3,0),i=Z(t,`align`,3,`center`),a=Z(t,`alignOffset`,3,0),o=Z(t,`arrowPadding`,3,0),s=Z(t,`avoidCollisions`,3,!0),c=Z(t,`collisionBoundary`,19,()=>[]),l=Z(t,`collisionPadding`,3,0),u=Z(t,`hideWhenDetached`,3,!1),d=Z(t,`onPlaced`,3,()=>{}),f=Z(t,`sticky`,3,`partial`),m=Z(t,`updatePositionStrategy`,3,`optimized`),h=Z(t,`strategy`,3,`fixed`),g=Z(t,`dir`,3,`ltr`),_=Z(t,`style`,19,()=>({})),v=Z(t,`wrapperId`,19,HT),y=Z(t,`customAnchor`,3,null),b=Z(t,`tooltip`,3,!1),x=WO.create({side:Lb(()=>n()),sideOffset:Lb(()=>r()),align:Lb(()=>i()),alignOffset:Lb(()=>a()),id:Lb(()=>t.id),arrowPadding:Lb(()=>o()),avoidCollisions:Lb(()=>s()),collisionBoundary:Lb(()=>c()),collisionPadding:Lb(()=>l()),hideWhenDetached:Lb(()=>u()),onPlaced:Lb(()=>d()),sticky:Lb(()=>f()),updatePositionStrategy:Lb(()=>m()),strategy:Lb(()=>h()),dir:Lb(()=>g()),style:Lb(()=>_()),enabled:Lb(()=>t.enabled),wrapperId:Lb(()=>v()),customAnchor:Lb(()=>y())},b()),S=M(()=>xx(x.wrapperProps,{style:{pointerEvents:`auto`}}));var C=da();za(I(C),()=>t.content??p,()=>({props:x.props,wrapperProps:z(S)})),H(e,C),at()}function $O(e,t){it(t,!0),Ko(()=>{t.onPlaced?.()});var n=da();za(I(n),()=>t.content??p,()=>({props:{},wrapperProps:{}})),H(e,n),at()}var ek=new Set([`$$slots`,`$$events`,`$$legacy`,`content`,`isStatic`,`onPlaced`]);function tk(e,t){let n=Z(t,`isStatic`,3,!1),r=Y(t,ek);var i=da(),a=I(i),o=e=>{$O(e,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},s=e=>{QO(e,X({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};W(a,e=>{n()?e(o):e(s,-1)}),H(e,i)}var nk=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled.ref.tooltip.contentPointerEvents`.split(`.`)),rk=V(`<!> <!>`,1);function ik(e,t){it(t,!0);let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Z(t,`tooltip`,3,!1),c=Z(t,`contentPointerEvents`,3,`auto`),l=Y(t,nk),u=M(()=>t.preventScroll??!0),d=M(()=>t.strategy??(z(u)?`fixed`:`absolute`));tk(e,{get isStatic(){return o()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return z(d)},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get enabled(){return t.enabled},get tooltip(){return s()},content:(e,a)=>{let o=()=>(a?.()).props,s=()=>(a?.()).wrapperProps;var d=rk(),f=I(d),m=e=>{uE(e,{get preventScroll(){return z(u)}})},h=e=>{uE(e,{get preventScroll(){return z(u)}})};W(f,e=>{t.forceMount&&t.enabled?e(m):t.forceMount||e(h,1)}),CT(L(f,2),{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return r()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(e,r)=>{let a=()=>(r?.()).props;iT(e,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,r)=>{Qw(e,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return i()},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{let r=()=>(n?.()).props;BT(e,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{var i=da(),u=I(i);{let e=M(()=>({props:xx(l,o(),r(),a(),{style:{pointerEvents:c()}}),wrapperProps:s()}));za(u,()=>t.popper??p,()=>z(e))}H(e,i)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),H(e,d)},$$slots:{content:!0}}),at()}var ak=new Set(`$$slots.$$events.$$legacy.popper.open.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.ref.shouldRender`.split(`.`));function ok(e,t){let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Y(t,ak);var c=da(),l=I(c),u=e=>{ik(e,X({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>s))};W(l,e=>{t.shouldRender&&e(u)}),H(e,c)}var sk=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled`.split(`.`));function ck(e,t){let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Y(t,sk);ik(e,X({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside}},()=>s,{forceMount:!0}))}function lk(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]??[0,0],[c,l]=t[o]??[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function uk(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function dk(e,t){let n=e.left+e.width/2,r=e.top+e.height/2,i=t.left+t.width/2,a=t.top+t.height/2,o=i-n,s=a-r;return Math.abs(o)>Math.abs(s)?o>0?`right`:`left`:s>0?`bottom`:`top`}var fk=new WeakMap,pk=new WeakMap,mk=new WeakMap,hk=new WeakMap,gk=new WeakMap,_k=new WeakMap,vk=new WeakMap,yk=new WeakMap,bk=new WeakMap,xk=new WeakSet,Sk=class{constructor(e){kt(this,xk),O(this,fk,void 0),O(this,pk,void 0),O(this,mk,void 0),O(this,hk,null),O(this,gk,null),O(this,_k,[]),O(this,vk,null),O(this,yk,null),O(this,bk,null),A(fk,this,e),A(pk,this,e.buffer??1);let t=e.transitIntentTimeout;A(mk,this,typeof t==`number`&&t>0?t:null),fS([e.triggerNode,e.contentNode,e.enabled],([e,t,n])=>{if(!e||!t||!n){A(vk,this,null),k(xk,this,Ok).call(this);return}return j(vk,this)&&j(vk,this)!==e&&k(xk,this,Ok).call(this),A(vk,this,e),[ea(US(e),`pointermove`,n=>{k(xk,this,Dk).call(this,[n.clientX,n.clientY],e,t)}),ea(e,`pointerleave`,e=>{let n=e.relatedTarget;if(oC(n)&&t.contains(n))return;let r=j(fk,this).ignoredTargets?.()??[];oC(n)&&r.some(e=>e===n||e.contains(n))||(A(_k,this,oC(n)&&r.length>0?r.filter(e=>n.contains(e)):[]),A(hk,this,[e.clientX,e.clientY]),A(gk,this,`content`),k(xk,this,wk).call(this))}),ea(e,`pointerenter`,()=>{k(xk,this,Ok).call(this)}),ea(t,`pointerenter`,()=>{k(xk,this,Ok).call(this)}),ea(t,`pointerleave`,t=>{let n=t.relatedTarget;oC(n)&&e.contains(n)||(A(hk,this,[t.clientX,t.clientY]),A(gk,this,`trigger`),k(xk,this,wk).call(this))})].reduce((e,t)=>()=>{e(),t()},()=>{})})}};function Ck(){j(yk,this)!==null&&(cancelAnimationFrame(j(yk,this)),A(yk,this,null))}function wk(){k(xk,this,Ck).call(this),A(yk,this,requestAnimationFrame(()=>{A(yk,this,null),!(!j(hk,this)||!j(gk,this))&&(k(xk,this,Ok).call(this),j(fk,this).onPointerExit())}))}function Tk(){j(bk,this)!==null&&(clearTimeout(j(bk,this)),A(bk,this,null))}function Ek(){j(mk,this)!==null&&(k(xk,this,Tk).call(this),A(bk,this,window.setTimeout(()=>{A(bk,this,null),!(!j(hk,this)||!j(gk,this))&&(k(xk,this,Ok).call(this),j(fk,this).onPointerExit())},j(mk,this))))}function Dk(e,t,n){if(!j(hk,this)||!j(gk,this))return;k(xk,this,Ck).call(this),k(xk,this,Ek).call(this);let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();if(j(gk,this)===`content`&&uk(e,i)){k(xk,this,Ok).call(this);return}if(j(gk,this)===`trigger`&&uk(e,r)){k(xk,this,Ok).call(this);return}if(j(gk,this)===`content`&&j(_k,this).length>0)for(let t of j(_k,this)){let n=t.getBoundingClientRect();if(uk(e,n))return;let i=dk(r,n),a=k(xk,this,kk).call(this,r,n,i);if(a&&lk(e,a))return}let a=dk(r,i),o=k(xk,this,kk).call(this,r,i,a);if(o&&lk(e,o))return;let s=j(gk,this)===`content`?i:r;lk(e,k(xk,this,Ak).call(this,j(hk,this),s,a,j(gk,this)))||(k(xk,this,Ok).call(this),j(fk,this).onPointerExit())}function Ok(){A(hk,this,null),A(gk,this,null),A(_k,this,[]),k(xk,this,Ck).call(this),k(xk,this,Tk).call(this)}function kk(e,t,n){let r=j(pk,this);switch(n){case`top`:return[[Math.min(e.left,t.left)-r,e.top],[Math.min(e.left,t.left)-r,t.bottom],[Math.max(e.right,t.right)+r,t.bottom],[Math.max(e.right,t.right)+r,e.top]];case`bottom`:return[[Math.min(e.left,t.left)-r,e.bottom],[Math.min(e.left,t.left)-r,t.top],[Math.max(e.right,t.right)+r,t.top],[Math.max(e.right,t.right)+r,e.bottom]];case`left`:return[[e.left,Math.min(e.top,t.top)-r],[t.right,Math.min(e.top,t.top)-r],[t.right,Math.max(e.bottom,t.bottom)+r],[e.left,Math.max(e.bottom,t.bottom)+r]];case`right`:return[[e.right,Math.min(e.top,t.top)-r],[t.left,Math.min(e.top,t.top)-r],[t.left,Math.max(e.bottom,t.bottom)+r],[e.right,Math.max(e.bottom,t.bottom)+r]]}}function Ak(e,t,n,r){let i=j(pk,this)*4,[a,o]=e;switch(r===`trigger`?k(xk,this,jk).call(this,n):n){case`top`:return[[a-i,o+i],[a+i,o+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case`bottom`:return[[a-i,o-i],[a+i,o-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case`left`:return[[a+i,o-i],[a+i,o+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case`right`:return[[a-i,o-i],[a-i,o+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}function jk(e){switch(e){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`}}var Mk=tC({component:`popover`,parts:[`root`,`trigger`,`content`,`close`,`overlay`]}),Nk=new cS(`Popover.Root`),Pk=new WeakMap,Fk=new WeakMap,Ik=new WeakMap,Lk=new WeakMap,Rk=new WeakMap,zk=new WeakMap,Bk=new WeakMap,Vk=new WeakMap,Hk=new WeakMap,Uk=new WeakSet,Wk=class e{static create(t){return Nk.set(new e(t))}get contentNode(){return z(j(Pk,this))}set contentNode(e){P(j(Pk,this),e,!0)}get triggerNode(){return z(j(Fk,this))}set triggerNode(e){P(j(Fk,this),e,!0)}get overlayNode(){return z(j(Ik,this))}set overlayNode(e){P(j(Ik,this),e,!0)}get openedViaHover(){return z(j(Lk,this))}set openedViaHover(e){P(j(Lk,this),e,!0)}get hasInteractedWithContent(){return z(j(Rk,this))}set hasInteractedWithContent(e){P(j(Rk,this),e,!0)}get hoverCooldown(){return z(j(zk,this))}set hoverCooldown(e){P(j(zk,this),e,!0)}get closeDelay(){return z(j(Bk,this))}set closeDelay(e){P(j(Bk,this),e,!0)}constructor(e){kt(this,Uk),x(this,`opts`,void 0),O(this,Pk,N(null)),x(this,`contentPresence`,void 0),O(this,Fk,N(null)),O(this,Ik,N(null)),x(this,`overlayPresence`,void 0),O(this,Lk,N(!1)),O(this,Rk,N(!1)),O(this,zk,N(!1)),O(this,Bk,N(0)),O(this,Vk,null),O(this,Hk,null),this.opts=e,this.contentPresence=new EC({ref:Lb(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new EC({ref:Lb(()=>this.overlayNode),open:this.opts.open}),fS(()=>this.opts.open.current,e=>{e||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,k(Uk,this,Gk).call(this))})}setDomContext(e){A(Hk,this,e)}toggleOpen(){k(Uk,this,Gk).call(this),this.opts.open.current=!this.opts.open.current}handleClose(){k(Uk,this,Gk).call(this),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){k(Uk,this,Gk).call(this),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(k(Uk,this,Gk).call(this),this.closeDelay<=0?this.opts.open.current=!1:j(Hk,this)&&A(Vk,this,j(Hk,this).setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),A(Vk,this,null)},this.closeDelay))))}cancelDelayedClose(){k(Uk,this,Gk).call(this)}markInteraction(){this.hasInteractedWithContent=!0,k(Uk,this,Gk).call(this)}};function Gk(){j(Vk,this)!==null&&j(Hk,this)&&(j(Hk,this).clearTimeout(j(Vk,this)),A(Vk,this,null))}var Kk=new WeakMap,qk=new WeakMap,Jk=new WeakMap,Yk=new WeakSet,Xk=new WeakMap,Zk=class e{static create(t){return new e(t,Nk.get())}constructor(e,t){kt(this,Yk),x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`attachment`,void 0),x(this,`domContext`,void 0),O(this,Kk,null),O(this,qk,null),O(this,Jk,N(!1)),O(this,Xk,M(()=>({id:this.opts.id.current,"aria-haspopup":`dialog`,"aria-expanded":YS(this.root.opts.open.current),"data-state":XS(this.root.opts.open.current),"aria-controls":k(Yk,this,tA).call(this),[Mk.trigger]:``,disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}))),this.opts=e,this.root=t,this.attachment=JS(this.opts.ref,e=>this.root.triggerNode=e),this.domContext=new qS(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),fS(()=>this.opts.closeDelay.current,e=>{this.root.closeDelay=e})}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||cC(e)||(P(j(Jk,this),!0),k(Yk,this,$k).call(this),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;let t=this.opts.openDelay.current;t<=0?this.root.handleHoverOpen():A(Kk,this,this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),A(Kk,this,null)},t))}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(cC(e)||(P(j(Jk,this),!1),k(Yk,this,Qk).call(this),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(k(Yk,this,eA).call(this),z(j(Jk,this))&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}z(j(Jk,this))&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),k(Yk,this,eA).call(this),this.root.toggleOpen())}get props(){return z(j(Xk,this))}set props(e){P(j(Xk,this),e)}};function Qk(){j(Kk,this)!==null&&(this.domContext.clearTimeout(j(Kk,this)),A(Kk,this,null))}function $k(){j(qk,this)!==null&&(this.domContext.clearTimeout(j(qk,this)),A(qk,this,null))}function eA(){k(Yk,this,Qk).call(this),k(Yk,this,$k).call(this)}function tA(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}var nA=new WeakMap,rA=new WeakMap,iA=class e{static create(t){return new e(t,Nk.get())}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`attachment`,void 0),x(this,`onInteractOutside`,e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!oC(e.target))return;let t=e.target.closest(Mk.selector(`trigger`));if(!(t&&t===this.root.triggerNode)){if(this.opts.customAnchor.current){if(oC(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current==`string`){let t=document.querySelector(this.opts.customAnchor.current);if(t&&t.contains(e.target))return}}this.root.handleClose()}}),x(this,`onEscapeKeydown`,e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()}),O(this,nA,M(()=>({open:this.root.opts.open.current}))),O(this,rA,M(()=>({id:this.opts.id.current,tabindex:-1,"data-state":XS(this.root.opts.open.current),...ZS(this.root.contentPresence.transitionStatus),[Mk.content]:``,style:{pointerEvents:`auto`,contain:`layout style`},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}))),x(this,`popperProps`,{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}),this.opts=e,this.root=t,this.attachment=JS(this.opts.ref,e=>this.root.contentNode=e),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new Sk({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){let t=e.target;oC(t)&&bw(t)&&this.root.markInteraction()}onpointerenter(e){cC(e)||this.root.cancelDelayedClose()}onpointerleave(e){cC(e)}get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}get snippetProps(){return z(j(nA,this))}set snippetProps(e){P(j(nA,this),e)}get props(){return z(j(rA,this))}set props(e){P(j(rA,this),e)}},aA=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`,`forceMount`,`onOpenAutoFocus`,`onCloseAutoFocus`,`onEscapeKeydown`,`onInteractOutside`,`trapFocus`,`preventScroll`,`customAnchor`,`style`]),oA=V(`<div><div><!></div></div>`);function sA(e,t){let n=fa();it(t,!0);let r=Z(t,`ref`,15,null),i=Z(t,`id`,19,()=>kC(n)),a=Z(t,`forceMount`,3,!1),o=Z(t,`onOpenAutoFocus`,3,OC),s=Z(t,`onCloseAutoFocus`,3,OC),c=Z(t,`onEscapeKeydown`,3,OC),l=Z(t,`onInteractOutside`,3,OC),u=Z(t,`trapFocus`,3,!0),d=Z(t,`preventScroll`,3,!1),f=Z(t,`customAnchor`,3,null),m=Y(t,aA),h=iA.create({id:Lb(()=>i()),ref:Lb(()=>r(),e=>r(e)),onInteractOutside:Lb(()=>l()),onEscapeKeydown:Lb(()=>c()),customAnchor:Lb(()=>f())}),g=M(()=>xx(m,h.props)),_=M(()=>u()&&h.shouldTrapFocus);function v(e){h.shouldTrapFocus||e.preventDefault(),o()(e)}var y=da(),b=I(y),x=e=>{ck(e,X(()=>z(g),()=>h.popperProps,{get ref(){return h.opts.ref},get enabled(){return h.root.opts.open.current},get id(){return i()},get trapFocus(){return z(_)},get preventScroll(){return d()},loop:!0,forceMount:!0,get customAnchor(){return f()},onOpenAutoFocus:v,get onCloseAutoFocus(){return s()},get shouldRender(){return h.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=M(()=>xx(r(),{style:fO(`popover`)},{style:t.style}));var o=da(),s=I(o),c=e=>{var n=da(),r=I(n);{let e=M(()=>({props:z(a),wrapperProps:i(),...h.snippetProps}));za(r,()=>t.child,()=>z(e))}H(e,n)},l=e=>{var n=oA();Oo(n,()=>({...i()}));var r=F(n);Oo(r,()=>({...z(a)})),za(F(r),()=>t.children??p),D(r),D(n),H(e,n)};W(s,e=>{t.child?e(c):e(l,-1)}),H(e,o)},$$slots:{popper:!0}}))},S=e=>{ok(e,X(()=>z(g),()=>h.popperProps,{get ref(){return h.opts.ref},get open(){return h.root.opts.open.current},get id(){return i()},get trapFocus(){return z(_)},get preventScroll(){return d()},loop:!0,forceMount:!1,get customAnchor(){return f()},onOpenAutoFocus:v,get onCloseAutoFocus(){return s()},get shouldRender(){return h.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=M(()=>xx(r(),{style:fO(`popover`)},{style:t.style}));var o=da(),s=I(o),c=e=>{var n=da(),r=I(n);{let e=M(()=>({props:z(a),wrapperProps:i(),...h.snippetProps}));za(r,()=>t.child,()=>z(e))}H(e,n)},l=e=>{var n=oA();Oo(n,()=>({...i()}));var r=F(n);Oo(r,()=>({...z(a)})),za(F(r),()=>t.children??p),D(r),D(n),H(e,n)};W(s,e=>{t.child?e(c):e(l,-1)}),H(e,o)},$$slots:{popper:!0}}))};W(b,e=>{a()?e(x):a()||e(S,1)}),H(e,y),at()}var cA=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`type`,`disabled`,`openOnHover`,`openDelay`,`closeDelay`]),lA=V(`<button><!></button>`);function uA(e,t){let n=fa();it(t,!0);let r=Z(t,`id`,19,()=>kC(n)),i=Z(t,`ref`,15,null),a=Z(t,`type`,3,`button`),o=Z(t,`disabled`,3,!1),s=Z(t,`openOnHover`,3,!1),c=Z(t,`openDelay`,3,700),l=Z(t,`closeDelay`,3,300),u=Y(t,cA),d=Zk.create({id:Lb(()=>r()),ref:Lb(()=>i(),e=>i(e)),disabled:Lb(()=>!!o()),openOnHover:Lb(()=>s()),openDelay:Lb(()=>c()),closeDelay:Lb(()=>l())}),f=M(()=>xx(u,d.props,{type:a()}));ZO(e,{get id(){return r()},get ref(){return d.opts.ref},children:(e,n)=>{var r=da(),i=I(r),a=e=>{var n=da();za(I(n),()=>t.child,()=>({props:z(f)})),H(e,n)},o=e=>{var n=lA();Oo(n,()=>({...z(f)})),za(F(n),()=>t.children??p),D(n),H(e,n)};W(i,e=>{t.child?e(a):e(o,-1)}),H(e,r)},$$slots:{default:!0}}),at()}function dA(e,t){it(t,!0);let n=Z(t,`open`,15,!1),r=Z(t,`onOpenChange`,3,OC),i=Z(t,`onOpenChangeComplete`,3,OC);Wk.create({open:Lb(()=>n(),e=>{n(e),r()(e)}),onOpenChangeComplete:Lb(()=>i())}),XO(e,{children:(e,n)=>{var r=da();za(I(r),()=>t.children??p),H(e,r)},$$slots:{default:!0}}),at()}var fA=V(`<!> `,1),pA=V(`<button type="button"> <!></button>`),mA=V(`<button type="button"> </button>`),hA=V(`<div role="group" aria-label="Presets"></div> <div class="mt-1 border-t border-line pt-2 px-2 pb-1"><div class="text-[11px] uppercase tracking-wide text-fg-subtle mb-1.5">Custom range</div> <label class="block text-[11px] text-fg-muted mb-1">From <input type="datetime-local" class="mt-0.5 w-full rounded border border-line bg-subtle px-1.5 py-1 text-xs text-fg focus:outline-none focus:border-accent"/></label> <label class="block text-[11px] text-fg-muted mb-2">To <input type="datetime-local" class="mt-0.5 w-full rounded border border-line bg-subtle px-1.5 py-1 text-xs text-fg focus:outline-none focus:border-accent"/></label> <div class="mb-2 border-t border-line pt-2"><div class="mb-1 text-[11px] text-fg-muted">Show times in</div> <div class="flex gap-1"></div> <div class="mt-1 text-[11px] text-fg-subtle"> </div></div> <button type="button">Apply</button></div>`,1),gA=V(`<!> <!>`,1);function _A(e,t){it(t,!0);let n=N(!1),r=M(()=>t.selection.type===`custom`?{start:t.selection.start,end:t.selection.end}:{start:Date.now()-15*6e4,end:Date.now()}),i=N(``),a=N(``);function o(e){P(n,e,!0),e&&(P(i,u(z(r).start),!0),P(a,u(z(r).end),!0))}function s(e){t.onChange({type:`preset`,preset:e}),P(n,!1)}function c(){let e=d(z(i)),r=d(z(a));e===null||r===null||(t.onChange({type:`custom`,start:e,end:r}),P(n,!1))}let l=M(()=>d(z(i))!==null&&d(z(a))!==null);function u(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function d(e){if(!e)return null;let t=new Date(e).getTime();return Number.isFinite(t)?t:null}var f=da();Ba(I(f),()=>dA,(e,r)=>{r(e,{onOpenChange:o,get open(){return z(n)},set open(e){P(n,e,!0)},children:(e,n)=>{var r=gA(),o=I(r);{let e=M(()=>Q(`inline-flex items-center gap-1.5 px-2 py-1 text-xs rounded border`,`border-line bg-surface text-fg-muted hover:text-fg hover:bg-hover`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,t.class));Ba(o,()=>uA,(n,r)=>{r(n,{"aria-label":`Time window`,title:`Change the time window`,get class(){return z(e)},children:(e,n)=>{var r=fA(),i=I(r);Mp(i,{size:12});var a=L(i);R(e=>U(a,` ${e??``}`),[()=>Os(t.selection)]),H(e,r)},$$slots:{default:!0}})})}Ba(L(o,2),()=>RC,(e,n)=>{n(e,{children:(e,n)=>{var r=da();Ba(I(r),()=>sA,(e,n)=>{n(e,{sideOffset:6,align:`start`,class:`z-50 w-64 rounded-md border border-line bg-surface p-1 shadow-lg`,children:(e,n)=>{var r=hA(),o=I(r);G(o,21,()=>Ss,e=>e.id,(e,n)=>{let r=M(()=>t.selection.type===`preset`&&t.selection.preset===z(n).id);var i=pA(),a=F(i),o=L(a),c=e=>{bp(e,{size:12,class:`text-accent`})};W(o,e=>{z(r)&&e(c)}),D(i),R(e=>{J(i,`aria-current`,z(r)?`true`:void 0),q(i,1,e),U(a,`${z(n).label??``} `)},[()=>K(Q(`flex w-full items-center justify-between rounded px-2 py-1.5 text-xs`,`text-fg hover:bg-hover focus-visible:outline-none focus-visible:bg-hover`,z(r)&&`bg-selected font-medium`))]),B(`click`,i,()=>s(z(n).id)),H(e,i)}),D(o);var u=L(o,2),d=L(F(u),2),f=L(F(d));Co(f),D(d);var p=L(d,2),m=L(F(p));Co(m),D(p);var h=L(p,2),g=L(F(h),2);G(g,20,()=>[{id:`local`,label:`Local`},{id:`utc`,label:`UTC`}],e=>e.id,(e,t)=>{var n=mA(),r=F(n,!0);D(n),R(e=>{J(n,`aria-pressed`,Hu.value===t.id),q(n,1,e),U(r,t.label)},[()=>K(Q(`flex-1 rounded px-2 py-1 text-xs`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,Hu.value===t.id?`bg-accent text-white`:`border border-line text-fg-muted hover:text-fg`))]),B(`click`,n,()=>Hu.value=t.id),H(e,n)}),D(g);var _=L(g,2),v=F(_);D(_),D(h);var y=L(h,2);D(u),R((e,t)=>{U(v,`Currently ${e??``}`),y.disabled=!z(l),q(y,1,t)},[()=>Pg(Hu.value),()=>K(Q(`w-full rounded px-2 py-1 text-xs font-medium`,`bg-accent text-white hover:opacity-90`,`disabled:opacity-40 disabled:cursor-not-allowed`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`))]),Mo(f,()=>z(i),e=>P(i,e)),Mo(m,()=>z(a),e=>P(a,e)),B(`click`,y,c),H(e,r)},$$slots:{default:!0}})}),H(e,r)},$$slots:{default:!0}})}),H(e,r)},$$slots:{default:!0}})}),H(e,f),at()}na([`click`]);var vA=V(`<button type="button" aria-live="polite" title="Show the newest matches and follow new data again"><!> </button>`);function yA(e,t){it(t,!0);let n=M(()=>!t.live&&t.count>0),r=M(()=>t.count>999?`999+`:String(t.count));var i=da(),a=I(i),o=e=>{var n=vA(),i=F(n);ip(i,{size:12});var a=L(i);D(n),R(e=>{q(n,1,e),U(a,` ${z(r)??``} new`)},[()=>K(Q(`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium`,`bg-accent text-white shadow-sm hover:opacity-90 focus-visible:outline-none`,`focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1`,`transition-opacity`,t.class))]),B(`click`,n,function(...e){t.onResume?.apply(this,e)}),H(e,n)};W(a,e=>{z(n)&&e(o)}),H(e,i),at()}na([`click`]);async function bA(e,t){try{let n=await t.fetch(`${t.baseUrl}/api/query/${e}/fields`,{signal:t.signal});if(!n.ok)return[];let r=await n.json();return Array.isArray(r.fields)?r.fields:[]}catch{return[]}}async function xA(e,t,n){let r={query:t.query};t.window&&(r.window=t.window),t.limit!==void 0&&(r.limit=t.limit),t.cursor&&(r.cursor=t.cursor);let i;try{i=await n.fetch(e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(r),signal:n.signal})}catch(e){return CA(e)?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}let a;try{a=await i.json()}catch{return{status:`error`,message:`Unexpected response from ${n.baseUrl} (not JSON)`}}if(i.status===400){let e=a.errors;return e?.length?{status:`invalid`,errors:e}:{status:`error`,message:`Invalid query request`}}return i.status===403?{status:`error`,message:`Forbidden: the devtools server rejected this origin. Open the viewer from the same machine.`}:i.ok?{status:`ok`,payload:a}:{status:`error`,message:`Server error: ${a.error??i.statusText}`}}async function SA(e,t){let n=await xA(`${t.baseUrl}/api/query/traces`,e,t);if(n.status!==`ok`)return n;let r=n.payload;return{status:`ok`,traces:r.traces??[],nextCursor:r.nextCursor??null}}function CA(e){return typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`}async function wA(e,t){let n=await xA(`${t.baseUrl}/api/query/logs`,e,t);if(n.status!==`ok`)return n;let r=n.payload;return{status:`ok`,logs:r.logs??[],nextCursor:r.nextCursor??null}}async function TA(e,t){let n=await xA(`${t.baseUrl}/api/query/errors`,e,t);return n.status===`ok`?{status:`ok`,errors:n.payload.errors??[]}:n}async function EA(e,t){let n=await xA(`${t.baseUrl}/api/query/webmcp`,{query:``,...e},t);return n.status===`ok`?{status:`ok`,webmcp:n.payload.webmcp??{tools:[],summary:{installations:0,emptyInstallations:0,toolsOffered:0,toolsWithdrawn:0,calls:0,errors:0,resultBytes:0,envelopeBytes:0,toolsWithDroppedAnnotations:0,toolsWithoutInputSchema:0,toolsWithLabelMismatch:0,toolsRedefined:0,refusedCalls:0}}}:n}function DA(){return{reasons:{query:!1,scrolled:!1,selected:!1,window:!1},pending:0}}function OA(e){return!Object.values(e.reasons).some(Boolean)}function kA(e){return OA(e)?0:e.pending}function AA(e,t){switch(t.type){case`query-changed`:return jA(e,`query`,t.query.trim().length>0);case`scrolled`:return jA(e,`scrolled`,!t.atTop);case`row-selected`:return jA(e,`selected`,!0);case`row-deselected`:return jA(e,`selected`,!1);case`window-changed`:return jA(e,`window`,t.bounded);case`arrived`:return OA(e)?e:{...e,pending:Math.max(0,e.pending+t.count)};case`resumed`:return DA()}}function jA(e,t,n){if(e.reasons[t]===n)return e;let r={reasons:{...e.reasons,[t]:n},pending:e.pending};return OA(r)&&(r.pending=0),r}var MA={run:async(e,t)=>{let n=await SA(e,t);return n.status===`ok`?{status:`ok`,rows:n.traces,nextCursor:n.nextCursor}:n}},NA={run:async(e,t)=>{let n=await wA(e,t);return n.status===`ok`?{status:`ok`,rows:n.logs,nextCursor:n.nextCursor}:n}},PA=200,FA=100;function IA(e,t){let n=e.now??(()=>Date.now()),r=e.debounceMs??PA,i=e.pageSize??FA,a=new as(``),o=ml,s=new as([]),c=new as([]),l=new as(null),u=new as(!1),d=new as(!1),f=new as(null),p=new as(DA()),m=0,h=null,g=null;function _(e){p.value=AA(p.value,e)}async function v(r={}){let p=++m;h?.abort();let g=new AbortController;h=g,u.value=!0;let _=Es(o.value,n()),v=await t.run({query:a.value,window:Ms(_),limit:i,cursor:r.append?f.value??void 0:void 0},{fetch:e.client.fetch,baseUrl:typeof e.client.baseUrl==`function`?e.client.baseUrl():e.client.baseUrl,signal:g.signal});if(p===m)switch(u.value=!1,v.status){case`ok`:s.value=r.append?[...s.value,...v.rows]:v.rows,f.value=v.nextCursor,c.value=[],l.value=null,d.value=!0;return;case`invalid`:c.value=v.errors,l.value=null;return;case`error`:c.value=[],l.value=v.message;return;case`aborted`:return}}function y(){if(g&&clearTimeout(g),r<=0){v();return}g=setTimeout(()=>{g=null,v()},r)}return{text:a,window:o,results:s,errors:c,failure:l,loading:u,ready:d,nextCursor:f,tail:p,get live(){return OA(p.value)},get pending(){return kA(p.value)},setText(e){a.value=e,_({type:`query-changed`,query:e}),y()},submit(){g&&(clearTimeout(g),g=null),v()},refresh(){return g&&(clearTimeout(g),g=null),v()},setWindow(e){o.value=e,_({type:`window-changed`,bounded:!Ds(Es(e,n()))}),v()},setScrolledToTop(e){_({type:`scrolled`,atTop:e})},setSelected(e){_(e?{type:`row-selected`}:{type:`row-deselected`})},arrived(e){_({type:`arrived`,count:e}),OA(p.value)&&v()},resume(){_({type:`resumed`}),a.value=``,v()},loadMore(){!f.value||u.value||v({append:!0})},removeRows(e){s.value=s.value.filter(t=>!e(t))},dispose(){g&&clearTimeout(g),h?.abort()}}}function LA(e){return IA(e,MA)}function RA(e){return IA(e,NA)}function zA(e,t){let n=t,r=!0;if(typeof IntersectionObserver>`u`)return{update:e=>{n=e}};let i=new IntersectionObserver(e=>{let t=e[e.length-1];if(t){if(!t.isIntersecting){r=!0;return}!r||n.disabled||(r=!1,n.onReach())}},{root:n.root??null,rootMargin:n.rootMargin??`200px`});return i.observe(e),{update(e){let t=n.disabled;n=e,t&&!e.disabled&&(r=!0)},destroy(){i.disconnect()}}}function BA(e){let t=e.target;return/^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)||t.isContentEditable}function VA(e,t){return e>t-1?t-1:e}function HA(e,t,n,r){return n===0?e:e<0?t>0?0:r===`last`?n-1:0:Math.min(Math.max(e+t,0),n-1)}function UA(e){let{count:t,onActivate:n,scrollToIndex:r,fromUnsetUp:i=`first`}=e,a=N(-1),o=M(()=>VA(z(a),t())),s=e=>{t()!==0&&(P(a,HA(z(o),e,t(),i),!0),r?.(z(a)))};return{get cursor(){return z(o)},set cursor(e){P(a,e,!0)},onKeyDown:e=>{BA(e)||(e.key===`ArrowDown`||e.key===`j`?(e.preventDefault(),s(1)):e.key===`ArrowUp`||e.key===`k`?(e.preventDefault(),s(-1)):e.key===`Enter`&&z(o)>=0&&z(o)<t()&&(e.preventDefault(),n(z(o))))}}}var WA=V(`<button><span class="truncate"> </span> <!></button>`),GA=V(`<span class="flex-shrink-0 px-1.5 py-0.5 rounded bg-warning-bg text-warning text-[10px] font-medium uppercase tracking-wide" title="Partial trace: the root span has not arrived, so this row shows the highest span received and a duration covering only that part.">partial</span>`),KA=V(`<div role="option" tabindex="-1" data-focus-inset=""><label class="cursor-pointer flex items-center"><input type="checkbox" class="w-3.5 h-3.5 rounded border-line text-accent"/></label> <button type="button"> </button> <div class="flex items-center gap-1.5 min-w-0"><!> <span class="truncate text-sm text-fg"> </span> <!> <!></div> <span class="font-mono text-xs text-fg-muted text-right tabular-nums"> </span> <span class="trace-col-spans font-mono text-xs text-fg-subtle text-right tabular-nums"> </span> <span class="trace-col-time font-mono text-[11px] text-fg-subtle truncate"> </span> <span> </span> <!></div>`),qA=V(`<span class="text-xs font-normal text-accent"> </span>`),JA=V(`<div class="flex items-center gap-1 mr-2 px-2 border-r border-line"><button class="flex items-center gap-1 px-2 py-1 text-xs rounded bg-accent/10 text-accent hover:bg-accent/20 transition-colors" title="Export selected traces"><!> </button> <button class="flex items-center gap-1 px-2 py-1 text-xs rounded bg-danger-bg text-danger hover:bg-danger-bg/80 transition-colors" title="Delete selected traces"><!> Delete</button></div>`),YA=V(`<button class="px-2 py-1 text-xs rounded text-fg-subtle hover:bg-hover transition-colors" title="Drop buffered traces received while paused">Drop buffer</button>`),XA=V(`<button class="p-1.5 hover:bg-hover rounded transition-colors" title="Export all traces as JSON"><!></button>`),ZA=V(`<div class="text-center text-fg-subtle text-sm py-12">Loading traces…</div>`),QA=V(`<div class="mx-auto flex max-w-2xl flex-col items-center gap-3 px-6 py-12 text-center text-sm text-fg-subtle"><p class="font-medium text-fg">No traces yet — send telemetry to get started</p> <p class="max-w-lg text-xs text-fg-muted">Both standard OTLP transports are ready. Existing SDK defaults
|
|
12
|
-
usually work unchanged.</p> <div class="grid w-full gap-2 text-left md:grid-cols-2"><div class="rounded-md border border-line bg-subtle p-3"><div class="mb-1 text-[11px] font-semibold uppercase tracking-wide">OTLP/gRPC</div> <code class="break-all text-xs text-fg">OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317</code></div> <div class="rounded-md border border-line bg-subtle p-3"><div class="mb-1 text-[11px] font-semibold uppercase tracking-wide">OTLP/HTTP</div> <code class="break-all text-xs text-fg">OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318</code></div></div></div>`),$A=V(`<div class="text-center text-fg-subtle text-sm py-12">No traces match the current filter.</div>`),ej=V(`<div class="px-4 py-3 text-center text-xs text-fg-subtle"> </div>`),tj=V(`<div><div class="trace-grid sticky top-0 z-10 px-4 py-2 border-b border-line bg-subtle text-[11px] font-semibold uppercase tracking-wide text-fg-subtle"><label class="cursor-pointer flex items-center"><input type="checkbox" class="w-3.5 h-3.5 rounded border-line text-accent"/></label> <!> <!> <!> <!> <!> <!> <span></span></div> <!> <!></div>`),nj=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> <!></h3> <div class="flex items-center gap-1"><!> <button><!> </button> <!> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Import traces from file"><!></button> <!> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Keyboard shortcuts (?)"><!></button></div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!> <!> <select class="text-xs border border-line rounded px-1.5 py-1 bg-surface text-fg-muted"><option>All</option><option>Errors</option><option>OK</option></select> <!> <div class="flex items-center text-xs text-fg-subtle flex-shrink-0" title="Only show traces at least this slow"><span class="mr-1">≥</span> <input type="number" placeholder="0" class="w-14 px-1 py-1 rounded border border-line bg-surface text-fg-muted focus:outline-none"/> <span class="ml-1">ms</span></div></div> <div class="trace-list-container flex-1 overflow-auto focus:outline-none" role="listbox" aria-label="Traces" tabindex="0"><!></div> <!></div>`);function rj(e,t){it(t,!0);let n=(e,t=p,n=p,r=p,i=p)=>{let a=M(()=>z(s).key===n());var o=WA(),c=F(o),l=F(c,!0);D(c);var u=L(c,2),d=e=>{var t=da(),n=I(t),r=e=>{ip(e,{size:11,class:`flex-shrink-0`})},i=e=>{Qf(e,{size:11,class:`flex-shrink-0`})};W(n,e=>{z(s).dir===`asc`?e(r):e(i,-1)}),H(e,t)};W(u,e=>{z(a)&&e(d)}),D(o),R((e,n)=>{q(o,1,e),J(o,`title`,n),U(l,t())},[()=>K(Q(`flex items-center gap-1 min-w-0 transition-colors hover:text-fg-muted`,z(a)?`text-fg-muted`:`text-fg-subtle`,r()===`end`&&`justify-end`,i())),()=>`Sort by ${t().toLowerCase()}`]),B(`click`,o,()=>Vl(n())),H(e,o)},r=(e,t=p,n=p,r=p)=>{let i=M(()=>t().status===`ERROR`),a=M(()=>mg(t().service||`unknown`)),o=M(()=>oe.cursor===r());var s=KA(),c=M(()=>yg(()=>Nu(t().traceId))),l=F(s),u=F(l);Co(u),D(l);var d=L(l,2),f=F(d,!0);D(d);var m=L(d,2),h=F(m),g=e=>{Op(e,{size:13,class:`text-danger flex-shrink-0`})};W(h,e=>{z(i)&&e(g)});var v=L(h,2),y=F(v,!0);D(v);var b=L(v,2),x=e=>{H(e,GA())};W(b,e=>{t().partial&&e(x)}),Z_(L(b,2),{get value(){return t().traceId},label:`Copy trace ID`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(m);var S=L(m,2),C=F(S,!0);D(S);var w=L(S,2),T=F(w,!0);D(w);var ee=L(w,2),te=F(ee,!0);D(ee);var ne=L(ee,2),re=F(ne,!0);D(ne),Ep(L(ne,2),{size:15,class:`text-fg-subtle justify-self-end`}),D(s),R((e,i,c,l,p)=>{q(s,1,e),J(s,`aria-selected`,z(o)),J(s,`data-row-index`,r()),To(u,n()),q(d,1,i),co(d,`background-color: ${z(a).fill??``}; color: ${z(a).stroke??``};`),J(d,`title`,`Filter by ${t().service||`unknown`}`),U(f,t().service||`unknown`),J(v,`title`,t().rootSpan.name),U(y,t().rootSpan.name||`unknown`),U(C,c),U(T,t().spans.length),U(te,l),q(ne,1,p),U(re,t().status)},[()=>K(Q(`group trace-grid px-4 py-2 border-b border-line-subtle cursor-pointer transition-colors`,`row-virtual`,n()?`bg-accent/10`:z(i)?`bg-danger-bg/40 hover:bg-danger-bg/70`:`hover:bg-hover`,z(o)&&`ring-1 ring-inset ring-accent bg-accent/10`)),()=>K(Q(`text-[11px] font-medium px-2 py-0.5 rounded truncate text-left transition-shadow`,z(_).has(t().service||`unknown`)&&`ring-1 ring-inset ring-accent`)),()=>ad(t().duration),()=>od(t().startTime),()=>K(Q(`text-[10px] font-semibold px-1.5 py-0.5 rounded justify-self-start`,z(i)?`bg-danger-bg text-danger`:t().status===`OK`?`bg-success-bg text-success`:`bg-hover text-fg-muted`))]),B(`click`,s,()=>{oe.cursor=r(),Nu(t().traceId)}),B(`keydown`,s,function(...e){z(c)?.apply(this,e)}),B(`click`,u,e=>e.stopPropagation()),B(`change`,u,()=>du(t().traceId)),B(`click`,d,e=>{e.stopPropagation(),Ll(t().service||`unknown`)}),H(e,s)};function i(e,t,n,r,i){return n===`error`&&e.status!==`ERROR`||n===`ok`&&e.status===`ERROR`||r>0&&e.duration<r||i.size>0&&!i.has(e.service||`unknown`)?!1:L_(t.toLowerCase(),[e.service,e.rootSpan?.name,e.traceId,e.correlationId,...e.spans.map(e=>e.name)])}let a=M(()=>Kl.value),o=M(()=>vl.value),s=M(()=>Ml.value),c=M(()=>lu.value),l=M(()=>wl.value),u=M(()=>Dl.value),d=M(()=>uu.value),f=M(()=>hu.value),m=M(()=>Nl.value),h=M(()=>Pl.value),g=M(()=>Fl.value),_=M(()=>Il.value),v=M(()=>{let e=new Map;for(let t of z(a)){let n=t.service||`unknown`;e.set(n,(e.get(n)??0)+1)}return{key:`service`,label:`Service`,options:[...e.entries()].map(([e,t])=>({value:e,count:t})),selected:z(_),onToggle:Ll}}),y=M(()=>z(v).options.length>1),b=N(null),x=N(!1),S=M(()=>z(f)>0);zr(()=>{if(z(c))return;let e=e=>{if(!($c.value||z(x))){if(e.key===`/`&&!vg()){e.preventDefault(),z(b)?.focus();return}e.key===`Escape`&&(z(S)?pu():document.activeElement===z(b)&&(Nl.value=``,C.setText(``))),e.key===`a`&&(e.metaKey||e.ctrlKey)&&!vg()&&(e.preventDefault(),fu())}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});let C=LA({client:{fetch:globalThis.fetch.bind(globalThis),baseUrl:w}});function w(){let e=pl.value;return(e?$o(e):null)??globalThis.location.origin}zr(()=>()=>C.dispose());let T=N(null),ee=N(yr([]));zr(()=>{let e=w();e!==z(T)&&(P(T,e,!0),bA(`traces`,{fetch:globalThis.fetch.bind(globalThis),baseUrl:e}).then(e=>P(ee,e,!0)),!C.ready.value&&Nl.value?C.setText(Nl.value):C.refresh())});let te=N(0);zr(()=>{let e=z(a).length;e>z(te)&&C.arrived(e-z(te)),P(te,e,!0)}),zr(()=>{C.setSelected(z(c)!=null)});let ne=M(()=>C.results.value),re=M(()=>{let e=C.ready.value&&C.failure.value===null,t=z(o);return e&&(t=z(m).length>0?z(ne):ie(z(ne),z(o))),t.filter(t=>i(t,e?``:z(m),z(h),z(g),z(_)))});function ie(e,t){let n=new Set(e.map(e=>e.traceId));return[...e,...t.filter(e=>!n.has(e.traceId))]}let ae=N(void 0),oe=UA({count:()=>z(re).length,onActivate:e=>{let t=z(re)[e];t&&Nu(t.traceId)},scrollToIndex:e=>queueMicrotask(()=>{z(ae)?.querySelector(`[data-row-index="${e}"]`)?.scrollIntoView({block:`nearest`})})});function se(){let e=z(re).filter(e=>z(d).has(e.traceId));e.length>0&&Ly(e)}async function ce(){let e=[...z(d)];if(!(e.length===0||!globalThis.confirm(`Delete ${e.length} stored trace${e.length===1?``:`s`}?`)))try{await fetch(`${w()}/api/traces`,{method:`DELETE`,headers:{"content-type":`application/json`},body:JSON.stringify({traceIds:e})})}catch{}finally{let t=new Set(e);C.removeRows(e=>t.has(e.traceId)),mu()}}let le=M(()=>z(m).length>0||z(h)!==`all`||z(g)>0||z(_).size>0),E=M(()=>z(re).length>0&&z(re).every(e=>z(d).has(e.traceId)));var ue=da(),de=I(ue),fe=e=>{rb(e,{get trace(){return z(c)}})},pe=e=>{var t=nj(),i=F(t),o=F(i),s=F(o);Hp(s,{size:16});var c=L(s),p=L(c),m=e=>{var t=qA(),n=F(t);D(t),R(()=>U(n,`(${z(f)??``} selected)`)),H(e,t)};W(p,e=>{z(S)&&e(m)}),D(o);var _=L(o,2),w=F(_),T=e=>{var t=JA(),n=F(t),r=F(n);Kp(r,{size:12});var i=L(r);D(n);var a=L(n,2);Bh(F(a),{size:12}),Ke(),D(a),D(t),R(()=>U(i,` Export (${z(f)??``})`)),B(`click`,n,se),B(`click`,a,ce),H(e,t)};W(w,e=>{z(S)&&e(T)});var te=L(w,2),ne=F(te),ie=e=>{ih(e,{size:12})},ue=e=>{eh(e,{size:12})};W(ne,e=>{z(l)?e(ie):e(ue,-1)});var de=L(ne);D(te);var fe=L(te,2),pe=e=>{var t=YA();B(`click`,t,function(...e){Ou?.apply(this,e)}),H(e,t)};W(fe,e=>{z(l)&&z(u)>0&&e(pe)});var me=L(fe,2);Kh(F(me),{size:14,class:`text-fg-subtle`}),D(me);var he=L(me,2),ge=e=>{var t=XA();Kp(F(t),{size:14,class:`text-fg-subtle`}),D(t),B(`click`,t,()=>Ly(z(re))),H(e,t)};W(he,e=>{z(re).length>0&&e(ge)});var _e=L(he,2);Ap(F(_e),{size:14,class:`text-fg-subtle`}),D(_e),D(_),D(i);var ve=L(i,2),ye=F(ve);Ab(ye,{get value(){return C.text.value},onInput:e=>{C.setText(e),Nl.value=e},onSubmit:()=>C.submit(),get serverErrors(){return C.errors.value},get fields(){return z(ee)},class:`flex-1`,get ref(){return z(b)},set ref(e){P(b,e,!0)}});var be=L(ye,2);_A(be,{get selection(){return C.window.value},onChange:e=>C.setWindow(e)});var xe=L(be,2);yA(xe,{get count(){return C.pending},get live(){return C.live},onResume:()=>{Nl.value=``,C.resume()}});var Se=L(xe,2),Ce=F(Se);Ce.value=Ce.__value=`all`;var we=L(Ce);we.value=we.__value=`error`;var Te=L(we);Te.value=Te.__value=`ok`,D(Se);var Ee;uo(Se);var De=L(Se,2),Oe=e=>{{let t=M(()=>[z(v)]);hb(e,{get facets(){return z(t)},get onClearAll(){return Rl}})}};W(De,e=>{z(y)&&e(Oe)});var ke=L(De,2),Ae=L(F(ke),2);Co(Ae),J(Ae,`min`,0),J(Ae,`step`,50),Ke(2),D(ke),D(ve);var je=L(ve,2),Me=F(je),Ne=e=>{H(e,ZA())},Pe=e=>{H(e,QA())},Fe=e=>{H(e,$A())},Ie=e=>{var t=tj(),i=F(t),a=F(i),o=F(a);Co(o),D(a);var s=L(a,2);n(s,()=>`Service`,()=>`service`);var c=L(s,2);n(c,()=>`Operation`,()=>`name`);var l=L(c,2);n(l,()=>`Duration`,()=>`duration`,()=>`end`);var u=L(l,2);n(u,()=>`Spans`,()=>`spans`,()=>`end`,()=>`trace-col-spans`);var f=L(u,2);n(f,()=>`Time`,()=>`time`,()=>void 0,()=>`trace-col-time`);var p=L(f,2);n(p,()=>`Status`,()=>`status`),Ke(2),D(i);var m=L(i,2);G(m,19,()=>z(re),e=>e.traceId,(e,t,n)=>{{let i=M(()=>z(d).has(z(t).traceId));r(e,()=>z(t),()=>z(i),()=>z(n))}});var h=L(m,2),g=e=>{var t=ej(),n=F(t,!0);D(t),Qa(t,(e,t)=>zA?.(e,t),()=>({onReach:()=>C.loadMore(),disabled:C.loading.value})),R(()=>U(n,C.loading.value?`Loading…`:`Scroll for more`)),H(e,t)};W(h,e=>{C.nextCursor.value&&e(g)}),D(t),R(()=>{J(a,`title`,z(E)?`Clear selection`:`Select all`),To(o,z(E))}),B(`click`,o,e=>e.stopPropagation()),B(`change`,o,()=>z(E)?pu():fu()),H(e,t)};W(Me,e=>{C.loading.value&&!C.ready.value&&z(a).length===0?e(Ne):z(re).length===0&&!z(le)?e(Pe,1):z(re).length===0?e(Fe,2):e(Ie,-1)}),D(je),Uo(je,e=>P(ae,e),()=>z(ae));var Le=L(je,2),Re=e=>{Dg(e,{onclose:()=>P(x,!1),onimport:async e=>{try{let t=Hy(await Gy(e));return t.success&&t.traces.length>0?(Vu(t.traces),{imported:t.traces.length,errors:[],warnings:t.warnings}):{imported:0,errors:t.errors,warnings:t.warnings}}catch(e){return{imported:0,errors:[String(e)],warnings:[]}}}})};W(Le,e=>{z(x)&&e(Re)}),D(t),R(e=>{U(c,` Traces (${(z(le)?`${z(re).length} of ${z(a).length}`:z(a).length)??``}) `),q(te,1,e),J(te,`title`,z(l)?`Resume live tail`:`Pause live tail`),U(de,` ${z(l)?`Resume${z(u)>0?` (+${z(u)})`:``}`:`Pause`}`),Ee!==(Ee=z(h))&&(Se.value=(Se.__value=z(h))??``,lo(Se,z(h))),wo(Ae,z(g)||``)},[()=>K(Q(`flex items-center gap-1 px-2 py-1 text-xs rounded transition-colors`,z(l)?`bg-warning-bg text-warning hover:bg-warning-bg/80`:`hover:bg-hover text-fg-muted`))]),B(`click`,te,function(...e){Du?.apply(this,e)}),B(`click`,me,()=>P(x,!0)),B(`click`,_e,()=>el(gg)),B(`change`,Se,e=>Pl.value=e.currentTarget.value),B(`input`,Ae,e=>Fl.value=Number(e.currentTarget.value)||0),B(`keydown`,je,function(...e){oe.onKeyDown?.apply(this,e)}),H(e,t)};W(de,e=>{z(c)?e(fe):e(pe,-1)}),H(e,ue),at()}na([`click`,`keydown`,`change`,`input`]);var ij=(e,t=p,n=p,r=p)=>{let i=M(t);var a=aj(),o=F(a);Ba(o,()=>z(i),(e,t)=>{t(e,{size:12})});var s=L(o,1,!0);D(a),R(()=>{q(a,1,`flex items-center gap-1 px-2 py-1 bg-subtle rounded-md ${r()??``}`),U(s,n())}),H(e,a)},aj=V(`<span><!> </span>`),oj=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-violet-100 text-violet-700 rounded-full"> </span>`),sj=V(`<div class="flex-1 flex flex-col items-center justify-center text-center gap-4 px-6"><!> <div class="max-w-md"><p class="text-sm font-medium text-fg">Waiting for coding-agent telemetry</p> <p class="text-xs text-fg-muted mt-1.5">Launch Claude Code wired to this receiver and its sessions, tokens,
|
|
1
|
+
var AutotelDevtools=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Array.isArray,n=Array.prototype.indexOf,r=Array.prototype.includes,i=Array.from,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyDescriptors,c=Object.prototype,l=Array.prototype,u=Object.getPrototypeOf,d=Object.isExtensible;function f(e){return typeof e==`function`}var p=()=>{};function m(e){for(var t=0;t<e.length;t++)e[t]()}function h(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function g(e,t,n=!1){return e===void 0?n?t():t:e}function _(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);let n=[];for(let r of e)if(n.push(r),n.length===t)break;return n}function v(e){"@babel/helpers - typeof";return v=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},v(e)}function y(e,t){if(v(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(v(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function b(e){var t=y(e,`string`);return v(t)==`symbol`?t:t+``}function x(e,t,n){return(t=b(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=1<<24,C=1024,w=2048,T=4096,ee=8192,te=16384,ne=32768,re=1<<25,ie=65536,ae=1<<19,oe=1<<20,se=1<<25,ce=65536,le=1<<21,E=1<<22,ue=1<<23,de=Symbol(`$state`),fe=Symbol(`legacy props`),pe=Symbol(``),me=Symbol(`attributes`),he=Symbol(`class`),ge=Symbol(`style`),_e=Symbol(`text`),ve=Symbol(`form reset`),ye=new class extends Error{constructor(...e){super(...e),x(this,`name`,`StaleReactionError`),x(this,`message`,"The reaction that called `getAbortSignal()` was re-run or destroyed")}},be=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function xe(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Se(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Ce(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function we(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Te(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Ee(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function De(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Oe(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function ke(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ae(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function je(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Me(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Ne={},Pe=Symbol(`uninitialized`),Fe=`http://www.w3.org/2000/svg`,Ie=`@attach`;function Le(){console.warn(`https://svelte.dev/e/derived_inert`)}function Re(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function ze(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Be(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var Ve=!1;function He(e){Ve=e}var Ue;function We(e){if(e===null)throw Re(),Ne;return Ue=e}function Ge(){return We(Dr(Ue))}function D(e){if(Ve){if(Dr(Ue)!==null)throw Re(),Ne;Ue=e}}function Ke(e=1){if(Ve){for(var t=e,n=Ue;t--;)n=Dr(n);Ue=n}}function qe(e=!0){for(var t=0,n=Ue;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Dr(n);e&&n.remove(),n=i}}function Je(e){if(!e||e.nodeType!==8)throw Re(),Ne;return e.data}function Ye(e){return e===this.v}function Xe(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Ze(e){return!Xe(e,this.v)}var Qe=null;function $e(e){Qe=e}function et(e){return st(`getContext`).get(e)}function tt(e,t){return st(`setContext`).set(e,t),t}function nt(e){return st(`hasContext`).has(e)}function rt(){return st(`getAllContexts`)}function it(e,t=!1,n){Qe={p:Qe,i:!1,c:null,e:null,s:e,x:null,r:fi,l:null}}function at(e){var t=Qe,n=t.e;if(n!==null){t.e=null;for(var r of n)Rr(r)}return e!==void 0&&(t.x=e),t.i=!0,Qe=t.p,e??{}}function ot(){return!0}function st(e){var t;return Qe===null&&xe(e),(t=Qe).c??(t.c=new Map(ct(Qe)||void 0))}function ct(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var lt=[];function ut(){var e=lt;lt=[],m(e)}function dt(e){if(lt.length===0&&!Tn){var t=lt;queueMicrotask(()=>{t===lt&&ut()})}lt.push(e)}function ft(){for(;lt.length>0;)ut()}function pt(e){var t=fi;if(t===null)return li.f|=ue,e;if(!(t.f&32768)&&!(t.f&4))throw e;mt(e,t)}function mt(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}var ht=~(w|T|C);function gt(e,t){e.f=e.f&ht|t}function _t(e){e.f&512||e.deps===null?gt(e,C):gt(e,T)}function vt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=ce,vt(t.deps))}function yt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),vt(e.deps),gt(e,C)}var bt=!1;function xt(e){var t=bt;try{return bt=!1,[e(),bt]}finally{bt=t}}function St(e,t){if(t){let t=document.body;e.autofocus=!0,dt(()=>{document.activeElement===t&&e.focus()})}}var Ct=!1;function wt(){Ct||(Ct=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[ve]?.()})},{capture:!0}))}function Tt(e){var t=li,n=fi;di(null),pi(null);try{return e()}finally{di(t),pi(n)}}function Et(e,t,n,r=n){e.addEventListener(t,()=>Tt(n));let i=e[ve];e[ve]=i?()=>{i(),r(!0)}:()=>r(!0),wt()}function Dt(e){let t=0,n=dr(0),r;return()=>{Fr()&&(z(n),Wr(()=>(t===0&&(r=Pi(()=>e(()=>hr(n)))),t+=1,()=>{dt(()=>{--t,t===0&&(r?.(),r=void 0,hr(n))})})))}}function Ot(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function kt(e,t){Ot(e,t),t.add(e)}function O(e,t,n){Ot(e,t),t.set(e,n)}function k(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function A(e,t,n){return e.set(k(e,t),n),n}function j(e,t){return e.get(k(e,t))}var At=ie|ae;function jt(e,t,n,r){new Yt(e,t,n,r)}var Mt=new WeakMap,Nt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,It=new WeakMap,Lt=new WeakMap,Rt=new WeakMap,zt=new WeakMap,Bt=new WeakMap,Vt=new WeakMap,Ht=new WeakMap,Ut=new WeakMap,Wt=new WeakMap,Gt=new WeakMap,Kt=new WeakMap,qt=new WeakMap,Jt=new WeakSet,Yt=class{constructor(e,t,n,r){kt(this,Jt),x(this,`parent`,void 0),x(this,`is_pending`,!1),x(this,`transform_error`,void 0),O(this,Mt,void 0),O(this,Nt,Ve?Ue:null),O(this,Pt,void 0),O(this,Ft,void 0),O(this,It,void 0),O(this,Lt,null),O(this,Rt,null),O(this,zt,null),O(this,Bt,null),O(this,Vt,0),O(this,Ht,0),O(this,Ut,!1),O(this,Wt,new Set),O(this,Gt,new Set),O(this,Kt,null),O(this,qt,Dt(()=>(A(Kt,this,dr(j(Vt,this))),()=>{A(Kt,this,null)}))),A(Mt,this,e),A(Pt,this,t),A(Ft,this,e=>{var t=fi;t.b=this,t.f|=128,n(e)}),this.parent=fi.b,this.transform_error=r??this.parent?.transform_error??(e=>e),A(It,this,Gr(()=>{if(Ve){let e=j(Nt,this);Ge();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));k(Jt,this,Zt).call(this,t)}else t?k(Jt,this,$t).call(this):k(Jt,this,Xt).call(this)}else k(Jt,this,en).call(this)},At)),Ve&&A(Mt,this,Ue)}defer_effect(e){yt(e,j(Wt,this),j(Gt,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!j(Pt,this).pending}update_pending_count(e,t){k(Jt,this,rn).call(this,e,t),A(Vt,this,j(Vt,this)+e),!(!j(Kt,this)||j(Ut,this))&&(A(Ut,this,!0),dt(()=>{A(Ut,this,!1),j(Kt,this)&&pr(j(Kt,this),j(Vt,this))}))}get_effect_pending(){return j(qt,this).call(this),z(j(Kt,this))}error(e){if(!j(Pt,this).onerror&&!j(Pt,this).failed)throw e;xn?.is_fork?(j(Lt,this)&&xn.skip_effect(j(Lt,this)),j(Rt,this)&&xn.skip_effect(j(Rt,this)),j(zt,this)&&xn.skip_effect(j(zt,this)),xn.oncommit(()=>{k(Jt,this,an).call(this,e)})):k(Jt,this,an).call(this,e)}};function Xt(){try{A(Lt,this,qr(()=>j(Ft,this).call(this,j(Mt,this))))}catch(e){this.error(e)}}function Zt(e){let t=j(Pt,this).failed,{reset:n,invoke_onerror:r}=k(Jt,this,Qt).call(this,e);dt(r),t&&A(zt,this,qr(()=>{t(j(Mt,this),()=>e,()=>n)}))}function Qt(e){var t=!1,n=!1;let r=()=>{if(t){Be();return}t=!0,n&&Me(),j(zt,this)!==null&&ei(j(zt,this),()=>{A(zt,this,null)}),k(Jt,this,nn).call(this,()=>{k(Jt,this,en).call(this)})};return{reset:r,invoke_onerror:()=>{try{n=!0,j(Pt,this).onerror?.(e,r),n=!1}catch(e){mt(e,j(It,this)&&j(It,this).parent)}}}}function $t(){let e=j(Pt,this).pending;e&&(this.is_pending=!0,A(Rt,this,qr(()=>e(j(Mt,this)))),dt(()=>{var e=A(Bt,this,document.createDocumentFragment()),t=Tr();e.append(t),A(Lt,this,k(Jt,this,nn).call(this,()=>qr(()=>j(Ft,this).call(this,t)))),j(Ht,this)===0&&(j(Mt,this).before(e),A(Bt,this,null),ei(j(Rt,this),()=>{A(Rt,this,null)}),k(Jt,this,tn).call(this,xn))}))}function en(){try{if(this.is_pending=this.has_pending_snippet(),A(Ht,this,0),A(Vt,this,0),A(Lt,this,qr(()=>{j(Ft,this).call(this,j(Mt,this))})),j(Ht,this)>0){var e=A(Bt,this,document.createDocumentFragment());ii(j(Lt,this),e);let t=j(Pt,this).pending;A(Rt,this,qr(()=>t(j(Mt,this))))}else k(Jt,this,tn).call(this,xn)}catch(e){this.error(e)}}function tn(e){this.is_pending=!1,e.transfer_effects(j(Wt,this),j(Gt,this))}function nn(e){var t=fi,n=li,r=Qe;pi(j(It,this)),di(j(It,this)),$e(j(It,this).ctx);try{return qn.ensure(),e()}catch(e){return pt(e),null}finally{pi(t),di(n),$e(r)}}function rn(e,t){if(!this.has_pending_snippet()){if(this.parent){var n;k(Jt,n=this.parent,rn).call(n,e,t)}return}A(Ht,this,j(Ht,this)+e),j(Ht,this)===0&&(k(Jt,this,tn).call(this,t),j(Rt,this)&&ei(j(Rt,this),()=>{A(Rt,this,null)}),j(Bt,this)&&(j(Mt,this).before(j(Bt,this)),A(Bt,this,null)))}function an(e){j(Lt,this)&&(Zr(j(Lt,this)),A(Lt,this,null)),j(Rt,this)&&(Zr(j(Rt,this)),A(Rt,this,null)),j(zt,this)&&(Zr(j(zt,this)),A(zt,this,null)),Ve&&(We(j(Nt,this)),Ke(),We(qe()));let t=j(Pt,this).failed,n=e=>{let{reset:n,invoke_onerror:r}=k(Jt,this,Qt).call(this,e);r(),t&&A(zt,this,k(Jt,this,nn).call(this,()=>{try{return qr(()=>{var r=fi;r.b=this,r.f|=128,t(j(Mt,this),()=>e,()=>n)})}catch(e){return mt(e,j(It,this).parent),null}}))};dt(()=>{var t;try{t=this.transform_error(e)}catch(e){mt(e,j(It,this)&&j(It,this).parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>mt(e,j(It,this)&&j(It,this).parent)):n(t)})}function on(e,t,n,r){let i=ot()?un:pn;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=fi,c=sn(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){mt(e,s)}cn()}}var d=ln();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>fn(e))).then(u).catch(e=>mt(e,s)).finally(d)}l?l.then(()=>{c(),f(),cn()}):f()}function sn(){var e=fi,t=li,n=Qe,r=xn;return function(i=!0){pi(e),di(t),$e(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function cn(e=!0){pi(null),di(null),$e(null),e&&xn?.deactivate()}function ln(){var e=fi,t=e.b,n=xn,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function un(e){var t=2|w;return fi!==null&&(fi.f|=ae),{ctx:Qe,deps:null,effects:null,equals:Ye,f:t,fn:e,reactions:null,rv:0,v:Pe,wv:0,parent:fi,ac:null}}var dn=Symbol(`obsolete`);function fn(e,t,n){let r=fi;r===null&&Se();var i=void 0,a=dr(Pe),o=!li,s=new Set;return Ur(()=>{var t=fi,n=h();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ye&&n.reject(e)}).finally(cn)}catch(e){n.reject(e),cn()}var c=xn;if(o){if(t.f&32768)var l=ln();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(dn);else for(let e of s.values())e.reject(dn);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==dn&&(c.activate(),t?(a.f|=ue,pr(a,t)):(a.f&8388608&&(a.f^=ue),pr(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),Ir(()=>{for(let e of s)e.reject(dn)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function M(e){let t=un(e);return hi(t),t}function pn(e){let t=un(e);return t.equals=Ze,t}function mn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Zr(t[n])}}function hn(e){var t,n=fi,r=e.parent;if(!si&&r!==null&&e.v!==Pe&&r.f&24576)return Le(),e.v;pi(r);try{e.f&=~ce,mn(e),t=Di(e)}finally{pi(n)}return t}function gn(e){var t=hn(e);if(!e.equals(t)&&(e.wv=wi(),(!xn?.is_fork||e.deps===null)&&(xn===null?e.v=t:(xn.capture(e,t,!0),Sn?.capture(e,t,!0)),e.deps===null))){gt(e,C);return}si||(Cn===null?_t(e):(Fr()||xn?.is_fork)&&Cn.set(e,t))}function _n(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Tt(()=>{t.ac.abort(ye),t.ac=null}),t.fn!==null&&(t.teardown=p),ki(t,0),Yr(t))}function vn(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Ai(t)}var yn,bn=null,xn=null,Sn=null,Cn=null,wn=null,Tn=!1,En=!1,Dn=null,On=null,kn=0,An=1,jn=new WeakMap,Mn=new WeakMap,Nn=new WeakMap,Pn=new WeakMap,Fn=new WeakMap,In=new WeakMap,Ln=new WeakMap,Rn=new WeakMap,zn=new WeakMap,Bn=new WeakMap,Vn=new WeakMap,Hn=new WeakMap,Un=new WeakMap,Wn=new WeakMap,Gn=new WeakMap,Kn=new WeakSet,qn=class e{constructor(){kt(this,Kn),x(this,`id`,An++),O(this,jn,!1),x(this,`linked`,!0),O(this,Mn,null),O(this,Nn,null),x(this,`async_deriveds`,new Map),x(this,`current`,new Map),x(this,`previous`,new Map),O(this,Pn,new Set),O(this,Fn,new Set),O(this,In,0),O(this,Ln,new Map),O(this,Rn,null),O(this,zn,[]),O(this,Bn,[]),O(this,Vn,new Set),O(this,Hn,new Set),O(this,Un,new Map),O(this,Wn,new Set),x(this,`is_fork`,!1),O(this,Gn,!1),bn===null?bn=this:(A(Nn,bn,this),A(Mn,this,bn)),bn=this}skip_effect(e){j(Un,this).has(e)||j(Un,this).set(e,{d:[],m:[]}),j(Wn,this).delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=j(Un,this).get(e);if(n){j(Un,this).delete(e);for(var r of n.d)gt(r,w),t(r);for(r of n.m)gt(r,T),t(r)}j(Wn,this).add(e)}capture(e,t,n=!1){e.v!==Pe&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),Cn?.set(e,t)),this.is_fork||(e.v=t)}activate(){xn=this}deactivate(){xn=null,Cn=null}flush(){try{En=!0,xn=this,k(Kn,this,Yn).call(this)}finally{kn=0,wn=null,Dn=null,On=null,En=!1,xn=null,Cn=null,lr.clear()}}discard(){for(let e of j(Fn,this))e(this);j(Fn,this).clear();for(let e of this.async_deriveds.values())e.reject(dn);k(Kn,this,er).call(this),j(Rn,this)?.resolve()}register_created_effect(e){j(Bn,this).push(e)}increment(e,t){if(A(In,this,j(In,this)+1),e){let e=j(Ln,this).get(t)??0;j(Ln,this).set(t,e+1)}}decrement(e,t){if(A(In,this,j(In,this)-1),e){let e=j(Ln,this).get(t)??0;e===1?j(Ln,this).delete(t):j(Ln,this).set(t,e-1)}j(Gn,this)||(A(Gn,this,!0),dt(()=>{A(Gn,this,!1),this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)j(Vn,this).add(t);for(let e of t)j(Hn,this).add(e);e.clear(),t.clear()}oncommit(e){j(Pn,this).add(e)}ondiscard(e){j(Fn,this).add(e)}settled(){return(j(Rn,this)??A(Rn,this,h())).promise}static ensure(){if(xn===null){let t=xn=new e;!En&&!Tn&&dt(()=>{j(jn,t)||t.flush()})}return xn}apply(){Cn=null}schedule(e){if(wn=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Dn!==null&&t===fi&&(li===null||!(li.f&2)))return;if(n&96){if(!(n&1024))return;t.f^=C}}j(zn,this).push(t)}};yn=qn;function Jn(){if(this.is_fork)return!0;for(let n of j(Ln,this).keys()){for(var e=n,t=!1;e.parent!==null;){if(j(Un,this).has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}function Yn(){A(jn,this,!0),kn++>1e3&&(k(Kn,this,er).call(this),nr());for(let e of j(Vn,this))j(Hn,this).delete(e),gt(e,w),this.schedule(e);for(let e of j(Hn,this))gt(e,T),this.schedule(e);let e=j(zn,this);A(zn,this,[]),this.apply();var t=Dn=[],n=[],r=On=[];for(let r of e)try{k(Kn,this,Xn).call(this,r,t,n)}catch(e){throw sr(r),k(Kn,this,Jn).call(this)||this.discard(),e}if(xn=null,r.length>0){var i=yn.ensure();for(let e of r)i.schedule(e)}if(Dn=null,On=null,k(Kn,this,Jn).call(this)){k(Kn,this,$n).call(this,n),k(Kn,this,$n).call(this,t);for(let[e,t]of j(Un,this))or(e,t);r.length>0&&k(Kn,xn,Yn).call(xn);return}let a=k(Kn,this,Zn).call(this);if(a){k(Kn,this,$n).call(this,n),k(Kn,this,$n).call(this,t),k(Kn,a,Qn).call(a,this);return}j(Vn,this).clear(),j(Hn,this).clear();for(let e of j(Pn,this))e(this);j(Pn,this).clear(),Sn=this,ir(n),ir(t),Sn=null,j(Rn,this)?.resolve();var o=xn;if(j(In,this)===0&&(j(zn,this).length===0||o!==null)&&k(Kn,this,er).call(this),j(zn,this).length>0){if(o!==null){let e=o;j(zn,e).push(...j(zn,this).filter(t=>!j(zn,e).includes(t)))}else o=this}o!==null&&k(Kn,o,Yn).call(o)}function Xn(e,t,n){e.f^=C;for(var r=e.first;r!==null;){var i=r.f,a=!!(i&96);if(!(a&&i&1024||i&8192||j(Un,this).has(r))&&r.fn!==null){a?r.f^=C:i&4?t.push(r):Ti(r)&&(i&16&&j(Hn,this).add(r),Ai(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}function Zn(){for(var e=j(Mn,this);e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=j(Mn,e)}return null}function Qn(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(j(Vn,e),j(Hn,e));let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(j(Hn,this).delete(i),gt(i,w),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),k(Kn,e,er).call(e),xn=this,k(Kn,this,Yn).call(this)}function $n(e){for(var t=0;t<e.length;t+=1)yt(e[t],j(Vn,this),j(Hn,this))}function er(){if(this.linked){var e=j(Mn,this),t=j(Nn,this);e===null||A(Nn,e,t),t===null?bn=e:A(Mn,t,e),this.linked=!1}}function tr(e){var t=Tn;Tn=!0;try{var n;for(e&&(xn!==null&&!xn.is_fork&&xn.flush(),n=e());;){if(ft(),xn===null)return n;xn.flush()}}finally{Tn=t}}function nr(){try{De()}catch(e){mt(e,wn)}}var rr=null;function ir(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Ti(r)&&(rr=new Set,Ai(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&$r(r),rr?.size>0)){lr.clear();for(let e of rr){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)rr.has(n)&&(rr.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Ai(n)}}rr.clear()}}rr=null}}function ar(e){xn.schedule(e)}function or(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),gt(e,C);for(var n=e.first;n!==null;)or(n,t),n=n.next}}function sr(e){gt(e,C);for(var t=e.first;t!==null;)sr(t),t=t.next}var cr=new Set,lr=new Map,ur=!1;function dr(e,t){return{f:0,v:e,reactions:null,equals:Ye,rv:0,wv:0}}function N(e,t){let n=dr(e,t);return hi(n),n}function fr(e,t=!1,n=!0){let r=dr(e);return t||(r.equals=Ze),r}function P(e,t,n=!1){return li!==null&&(!ui||li.f&131072)&&ot()&&li.f&4325394&&(mi===null||!mi.has(e))&&je(),pr(e,n?_r(t):t,On)}function pr(e,t,n=null){if(!e.equals(t)){lr.set(e,si?t:e.v);var r=qn.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&hn(t),Cn===null&&_t(t)}e.wv=wi(),gr(e,w,n),ot()&&fi!==null&&fi.f&1024&&!(fi.f&96)&&(vi===null?yi([e]):vi.push(e)),!r.is_fork&&cr.size>0&&!ur&&mr()}return t}function mr(){ur=!1;for(let e of cr){e.f&1024&>(e,T);let t;try{t=Ti(e)}catch{t=!0}t&&Ai(e)}cr.clear()}function hr(e){P(e,e.v+1)}function gr(e,t,n){var r=e.reactions;if(r!==null)for(var i=ot(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===fi)){var l=(c&w)===0;if(l&>(s,t),c&131072)cr.add(s);else if(c&2){var u=s;Cn?.delete(u),c&65536||(c&512&&(fi===null||!(fi.f&2097152))&&(s.f|=ce),gr(u,T,n))}else if(l){var d=s;c&16&&rr!==null&&rr.add(d),n===null?ar(d):n.push(d)}}}}function _r(e){if(typeof e!=`object`||!e||de in e)return e;let n=u(e);if(n!==c&&n!==l)return e;var r=new Map,i=t(e),a=N(0),s=null,d=Si,f=e=>{if(Si===d)return e();var t=li,n=Si;di(null),Ci(d);var r=e();return di(t),Ci(n),r};return i&&r.set(`length`,N(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&ke();var i=r.get(t);return i===void 0?f(()=>{var e=N(n.value,s);return r.set(t,e),e}):P(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>N(Pe,s));r.set(t,e),hr(a)}}else P(n,Pe),hr(a);return!0},get(t,n,i){if(n===de)return e;var a=r.get(n),c=n in t;if(a===void 0&&(!c||o(t,n)?.writable)&&(a=f(()=>N(_r(c?t[n]:Pe),s)),r.set(n,a)),a!==void 0){var l=z(a);return l===Pe?void 0:l}return Reflect.get(t,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&`value`in n){var i=r.get(t);i&&(n.value=z(i))}else if(n===void 0){var a=r.get(t),o=a?.v;if(a!==void 0&&o!==Pe)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return n},has(e,t){if(t===de)return!0;var n=r.get(t),i=n!==void 0&&n.v!==Pe||Reflect.has(e,t);return(n!==void 0||fi!==null&&(!i||o(e,t)?.writable))&&(n===void 0&&(n=f(()=>N(i?_r(e[t]):Pe,s)),r.set(t,n)),z(n)===Pe)?!1:i},set(e,t,n,c){var l=r.get(t),u=t in e;if(i&&t===`length`)for(var d=n;d<l.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>N(Pe,s)),r.set(d+``,p)):P(p,Pe)}if(l===void 0)(!u||o(e,t)?.writable)&&(l=f(()=>N(void 0,s)),P(l,_r(n)),r.set(t,l));else{u=l.v!==Pe;var m=f(()=>_r(n));P(l,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(c,n),!u){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&P(g,_+1)}hr(a)}return!0},ownKeys(e){z(a);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==Pe});for(var[n,i]of r)i.v!==Pe&&!(n in e)&&t.push(n);return t},setPrototypeOf(){Ae()}})}function vr(e){try{if(typeof e==`object`&&e&&de in e)return e[de]}catch{}return e}function yr(e,t){return Object.is(vr(e),vr(t))}var br,xr,Sr,Cr;function wr(){if(br===void 0){br=window,xr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Sr=o(t,`firstChild`).get,Cr=o(t,`nextSibling`).get,d(e)&&(e[he]=void 0,e[me]=null,e[ge]=void 0,e.__e=void 0),d(n)&&(n[_e]=void 0)}}function Tr(e=``){return document.createTextNode(e)}function Er(e){return Sr.call(e)}function Dr(e){return Cr.call(e)}function F(e,t){if(!Ve)return Er(e);var n=Er(Ue);if(n===null)n=Ue.appendChild(Tr());else if(t&&n.nodeType!==3){var r=Tr();return n?.before(r),We(r),r}return t&&jr(n),We(n),n}function I(e,t=!1){if(!Ve){var n=Er(e);return n instanceof Comment&&n.data===``?Dr(n):n}if(t){if(Ue?.nodeType!==3){var r=Tr();return Ue?.before(r),We(r),r}jr(Ue)}return Ue}function L(e,t=1,n=!1){let r=Ve?Ue:e;for(var i;t--;)i=r,r=Dr(r);if(!Ve)return r;if(n){if(r?.nodeType!==3){var a=Tr();return r===null?i?.after(a):r.before(a),We(a),a}jr(r)}return We(r),r}function Or(e){e.textContent=``}function kr(){return!1}function Ar(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function jr(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Mr(e){fi===null&&(li===null&&Ee(e),Te()),si&&we(e)}function Nr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Pr(e,t){var n=fi;n!==null&&n.f&8192&&(e|=ee);var r={ctx:Qe,deps:null,nodes:null,f:e|w|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};xn?.register_created_effect(r);var i=r;if(e&4)Dn===null?qn.ensure().schedule(r):Dn.push(r);else if(t!==null){try{Ai(r)}catch(e){throw Zr(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=ie))}if(i!==null&&(i.parent=n,n!==null&&Nr(i,n),li!==null&&li.f&2&&!(e&64))){var a=li;(a.effects??(a.effects=[])).push(i)}return r}function Fr(){return li!==null&&!ui}function Ir(e){let t=Pr(8,null);return gt(t,C),t.teardown=e,t}function Lr(e){Mr(`$effect`);var t=fi.f;if(!li&&t&32&&Qe!==null&&!Qe.i){var n=Qe;(n.e??(n.e=[])).push(e)}else return Rr(e)}function Rr(e){return Pr(4|oe,e)}function zr(e){return Mr(`$effect.pre`),Pr(8|oe,e)}function Br(e){qn.ensure();let t=Pr(64|ae,e);return()=>{Zr(t)}}function Vr(e){qn.ensure();let t=Pr(64|ae,e);return(e={})=>new Promise(n=>{e.outro?ei(t,()=>{Zr(t),n(void 0)}):(Zr(t),n(void 0))})}function Hr(e){return Pr(4,e)}function Ur(e){return Pr(E|ae,e)}function Wr(e,t=0){return Pr(8|t,e)}function R(e,t=[],n=[],r=[]){on(r,t,n,t=>{Pr(8,()=>{e(...t.map(z))})})}function Gr(e,t=0){return Pr(16|t,e)}function Kr(e,t=0){return Pr(S|t,e)}function qr(e){return Pr(32|ae,e)}function Jr(e){var t=e.teardown;if(t!==null){let e=si,n=li;ci(!0),di(null);try{t.call(null)}finally{ci(e),di(n)}}}function Yr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Tt(()=>{e.abort(ye)});var r=n.next;n.f&64?n.parent=null:Zr(n,t),n=r}}function Xr(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||Zr(t),t=n}}function Zr(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Qr(e.nodes.start,e.nodes.end),n=!0),e.f|=re,Yr(e,t&&!n),ki(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Jr(e),e.f^=re,e.f|=te;var i=e.parent;i!==null&&i.first!==null&&$r(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Qr(e,t){for(;e!==null;){var n=e===t?null:Dr(e);e.remove(),e=n}}function $r(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function ei(e,t,n=!0){var r=[];ti(e,r,!0);var i=()=>{n&&Zr(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function ti(e,t,n){if(!(e.f&8192)){e.f^=ee;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=!!(i.f&65536)||!!(i.f&32)&&!!(e.f&16);ti(i,t,o?n:!1)}i=a}}}function ni(e){ri(e,!0)}function ri(e,t){if(e.f&8192){e.f^=ee,e.f&1024||(gt(e,w),qn.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);ri(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function ii(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Dr(n);t.append(n),n=i}}var ai=null,oi=!1,si=!1;function ci(e){si=e}var li=null,ui=!1;function di(e){li=e}var fi=null;function pi(e){fi=e}var mi=null;function hi(e){li!==null&&(mi??(mi=new Set)).add(e)}var gi=null,_i=0,vi=null;function yi(e){vi=e}var bi=1,xi=0,Si=xi;function Ci(e){Si=e}function wi(){return++bi}function Ti(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~ce),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Ti(a)&&gn(a),a.wv>e.wv)return!0}t&512&&Cn===null&>(e,C)}return!1}function Ei(e,t,n=!0){var r=e.reactions;if(r!==null&&!(mi!==null&&mi.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Ei(a,t,!1):t===a&&(n?gt(a,w):a.f&1024&>(a,T),ar(a))}}function Di(e){var t=gi,n=_i,r=vi,i=li,a=mi,o=Qe,s=ui,c=Si,l=e.f;gi=null,_i=0,vi=null,li=l&96?null:e,mi=null,$e(e.ctx),ui=!1,Si=++xi,e.ac!==null&&(Tt(()=>{e.ac.abort(ye)}),e.ac=null);try{e.f|=le;var u=e.fn,d=u();e.f|=ne;var f=e.deps,p=xn?.is_fork;if(gi!==null){var m;if(p||ki(e,_i),f!==null&&_i>0)for(f.length=_i+gi.length,m=0;m<gi.length;m++)f[_i+m]=gi[m];else e.deps=f=gi;if(Fr()&&e.f&512)for(m=_i;m<f.length;m++){var h;((h=f[m]).reactions??(h.reactions=[])).push(e)}}else!p&&f!==null&&_i<f.length&&(ki(e,_i),f.length=_i);if(ot()&&vi!==null&&!ui&&f!==null&&!(e.f&6146))for(m=0;m<vi.length;m++)Ei(vi[m],e);if(i!==null&&i!==e){if(xi++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=xi;if(t!==null)for(let e of t)e.rv=xi;vi!==null&&(r===null?r=vi:r.push(...vi))}return e.f&8388608&&(e.f^=ue),d}catch(e){return pt(e)}finally{e.f^=le,gi=t,_i=n,vi=r,li=i,mi=a,$e(o),ui=s,Si=c}}function Oi(e,t){let i=t.reactions;if(i!==null){var a=n.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=t.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&t.f&2&&(gi===null||!r.call(gi,t))){var s=t;s.f&512&&(s.f^=512,s.f&=~ce),s.v!==Pe&&_t(s),s.ac!==null&&Tt(()=>{s.ac.abort(ye),s.ac=null,gt(s,w)}),_n(s),ki(s,0)}}function ki(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Oi(e,n[r])}function Ai(e){var t=e.f;if(!(t&16384)){gt(e,C);var n=fi,r=oi;fi=e,oi=!(t&96);try{t&16777232?Xr(e):Yr(e),Jr(e);var i=Di(e);e.teardown=typeof i==`function`?i:null,e.wv=bi}finally{oi=r,fi=n}}}async function ji(){await Promise.resolve(),tr()}function z(e){var t=!!(e.f&2);if(ai?.add(e),li!==null&&!ui&&!(fi!==null&&fi.f&16384)&&(mi===null||!mi.has(e))){var n=li.deps;if(li.f&2097152)e.rv<xi&&(e.rv=xi,gi===null&&n!==null&&n[_i]===e?_i++:gi===null?gi=[e]:gi.push(e));else{var i;(i=li).deps??(i.deps=[]),r.call(li.deps,e)||li.deps.push(e);var a=e.reactions;a===null?e.reactions=[li]:r.call(a,li)||a.push(li)}}if(si&&lr.has(e))return lr.get(e);if(t){var o=e;if(si){var s=o.v;return(!(o.f&1024)&&o.reactions!==null||Ni(o))&&(s=hn(o)),lr.set(o,s),s}var c=!(o.f&512)&&!ui&&li!==null&&(oi||!!(li.f&512)),l=(o.f&ne)===0;Ti(o)&&(c&&(o.f|=512),gn(o)),c&&!l&&(vn(o),Mi(o))}if(Cn?.has(e))return Cn.get(e);if(e.f&8388608)throw e.v;return e.v}function Mi(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&2&&!(t.f&512)&&(vn(t),Mi(t))}function Ni(e){if(e.v===Pe)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(lr.has(t)||t.f&2&&Ni(t))return!0;return!1}function Pi(e){var t=ui;try{return ui=!0,e()}finally{ui=t}}function Fi(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(de in e)Ii(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&de in n&&Ii(n)}}}function Ii(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Ii(e[n],t)}catch{}let n=u(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=s(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}function Li(){return Symbol(Ie)}function Ri(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var zi=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function Bi(e){return zi.includes(e)}var Vi=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`),Hi={formnovalidate:`formNoValidate`,ismap:`isMap`,nomodule:`noModule`,playsinline:`playsInline`,readonly:`readOnly`,defaultvalue:`defaultValue`,defaultchecked:`defaultChecked`,srcobject:`srcObject`,novalidate:`noValidate`,allowfullscreen:`allowFullscreen`,disablepictureinpicture:`disablePictureInPicture`,disableremoteplayback:`disableRemotePlayback`};function Ui(e){return e=e.toLowerCase(),Hi[e]??e}[...Vi];var Wi=[`touchstart`,`touchmove`];function Gi(e){return Wi.includes(e)}var Ki=[`textarea`,`script`,`style`,`title`];function qi(e){return Ki.includes(e)}var Ji=Symbol(`events`),Yi=new Set,Xi=new Set;function Zi(e,t,n,r={}){function i(e){if(r.capture||na.call(t,e),!e.cancelBubble)return Tt(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?dt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Qi(e,t,n,r={}){var i=Zi(t,e,n,r);return()=>{e.removeEventListener(t,i,r)}}function $i(e,t,n,r,i){var a={capture:r,passive:i},o=Zi(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Ir(()=>{t.removeEventListener(e,o,a)})}function B(e,t,n){(t[Ji]??(t[Ji]={}))[e]=n}function ea(e){for(var t=0;t<e.length;t++)Yi.add(e[t]);for(var n of Xi)n(e)}var ta=null;function na(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],o=i[0]||e.target;ta=e;var s=0,c=ta===e&&e[Ji];if(c){var l=i.indexOf(c);if(l!==-1&&(t===document||t===window)){e[Ji]=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(o=i[s]||e.target,o!==t){a(e,`currentTarget`,{configurable:!0,get(){return o||n}});var d=li,f=fi;di(null),pi(null);try{for(var p,m=[];o!==null&&o!==t;){try{var h=o[Ji]?.[r];h!=null&&(!o.disabled||e.target===o)&&h.call(o,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;s++,o=s<i.length?i[s]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[Ji]=t,delete e.currentTarget,di(d),pi(f)}}}var ra=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function ia(e){return ra?.createHTML(e)??e}function aa(e){var t=Ar(`template`);return t.innerHTML=ia(e.replaceAll(`<!>`,`<!---->`)),t.content}function oa(e,t){var n=fi;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function V(e,t){var n=!!(t&1),r=!!(t&2),i,a=!e.startsWith(`<!>`);return()=>{if(Ve)return oa(Ue,null),Ue;i===void 0&&(i=aa(a?e:`<!>`+e),n||(i=Er(i)));var t=r||xr?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Er(t),s=t.lastChild;oa(o,s)}else oa(t,t);return t}}function sa(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=!!(t&1),a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(Ve)return oa(Ue,null),Ue;if(!o){var e=Er(aa(a));if(i)for(o=document.createDocumentFragment();Er(e);)o.appendChild(Er(e));else o=Er(e)}var t=o.cloneNode(!0);if(i){var n=Er(t),r=t.lastChild;oa(n,r)}else oa(t,t);return t}}function ca(e,t){return sa(e,t,`svg`)}function la(){if(Ve)return oa(Ue,null),Ue;var e=document.createDocumentFragment(),t=document.createComment(``),n=Tr();return e.append(t,n),oa(t,n),e}function H(e,t){if(Ve){var n=fi;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=Ue),Ge();return}e!==null&&e.before(t)}function ua(){var e,t;if(Ve&&Ue&&Ue.nodeType===8&&Ue.textContent?.startsWith(`$`)){let e=Ue.textContent.substring(1);return Ge(),e}return(e=(t=window).__svelte??(t.__svelte={})).uid??(e.uid=1),`c${window.__svelte.uid++}`}var da=!0;function fa(e){da=e}function U(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[_e]??(e[_e]=e.nodeValue))&&(e[_e]=n,e.nodeValue=`${n}`)}function pa(e,t){return ha(e,t)}var ma=new Map;function ha(e,{target:t,anchor:n,props:r={},events:a,context:o,intro:s=!0,transformError:c}){wr();var l=void 0,u=Vr(()=>{var u=n??t.appendChild(Tr());jt(u,{pending:()=>{}},t=>{it({});var n=Qe;if(o&&(n.c=o),a&&(r.$$events=a),Ve&&oa(t,null),da=s,l=e(t,r)||{},da=!0,Ve&&(fi.nodes.end=Ue,Ue===null||Ue.nodeType!==8||Ue.data!==`]`))throw Re(),Ne;at()},c);var d=new Set,f=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!d.has(r)){d.add(r);var i=Gi(r);for(let e of[t,document]){var a=ma.get(e);a===void 0&&(a=new Map,ma.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,na,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(i(Yi)),Xi.add(f),()=>{for(var e of d)for(let n of[t,document]){var r=ma.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,na),r.delete(e),r.size===0&&ma.delete(n)):r.set(e,i)}Xi.delete(f),u!==n&&u.parentNode?.removeChild(u)}});return ga.set(l,u),l}var ga=new WeakMap;function _a(e,t){let n=ga.get(e);return n?(ga.delete(e),n(t)):Promise.resolve()}var va=new WeakMap,ya=new WeakMap,ba=new WeakMap,xa=new WeakMap,Sa=new WeakMap,Ca=new WeakMap,wa=new WeakMap,Ta=class{constructor(e,t=!0){x(this,`anchor`,void 0),O(this,va,new Map),O(this,ya,new Map),O(this,ba,new Map),O(this,xa,new Set),O(this,Sa,!0),O(this,Ca,e=>{if(j(va,this).has(e)){var t=j(va,this).get(e),n=j(ya,this).get(t);if(n)ni(n),j(xa,this).delete(t);else{var r=j(ba,this).get(t);r&&(ni(r.effect),j(ya,this).set(t,r.effect),j(ba,this).delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of j(va,this)){if(j(va,this).delete(t),t===e)break;let r=j(ba,this).get(n);r&&(Zr(r.effect),j(ba,this).delete(n))}for(let[e,r]of j(ya,this)){if(e===t||j(xa,this).has(e))continue;let i=()=>{if(Array.from(j(va,this).values()).includes(e)){var t=document.createDocumentFragment();ii(r,t),t.append(Tr()),j(ba,this).set(e,{effect:r,fragment:t})}else Zr(r);j(xa,this).delete(e),j(ya,this).delete(e)};j(Sa,this)||!n?(j(xa,this).add(e),ei(r,i,!1)):i()}}}),O(this,wa,e=>{j(va,this).delete(e);let t=Array.from(j(va,this).values());for(let[e,n]of j(ba,this))t.includes(e)||(Zr(n.effect),j(ba,this).delete(e))}),this.anchor=e,A(Sa,this,t)}ensure(e,t){var n=xn,r=kr();if(t&&!j(ya,this).has(e)&&!j(ba,this).has(e)){if(r){var i=document.createDocumentFragment(),a=Tr();i.append(a),j(ba,this).set(e,{effect:qr(()=>t(a)),fragment:i})}else j(ya,this).set(e,qr(()=>t(this.anchor)))}if(j(va,this).set(n,e),r){for(let[t,r]of j(ya,this))t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of j(ba,this))t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(j(Ca,this)),n.ondiscard(j(wa,this))}else Ve&&(this.anchor=Ue),j(Ca,this).call(this,n)}};function W(e,t,n=!1){var r;Ve&&(r=Ue,Ge());var i=new Ta(e),a=n?ie:0;function o(e,t){if(Ve){var n=Je(r);if(e!==parseInt(n.substring(1))){var a=qe();We(a),i.anchor=a,He(!1),i.ensure(e,t),He(!0);return}}i.ensure(e,t)}Gr(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var Ea=Symbol(`NaN`);function Da(e,t,n){Ve&&Ge();var r=new Ta(e),i=!ot();Gr(()=>{var e=t();e!==e&&(e=Ea),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function Oa(e,t){return t}function ka(e,t,n){for(var r=[],a=t.length,o,s=t.length,c=0;c<a;c++){let n=t[c];ei(n,()=>{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;Aa(e,i(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else--s},!1)}if(s===0){var l=r.length===0&&n!==null;if(l){var u=n,d=u.parentNode;Or(d),d.append(u),e.items.clear()}Aa(e,t,!l)}else o={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(o)}function Aa(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=se,ii(a,document.createDocumentFragment())):Zr(t[i],n)}}var ja;function G(e,n,r,a,o,s=null){var c=e,l=new Map;if(n&4){var u=e;c=Ve?We(Er(u)):u.appendChild(Tr())}Ve&&Ge();var d=null,f=pn(()=>{var e=r();return t(e)?e:e==null?[]:i(e)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=d,Na(v,p,c,n,a),d!==null&&(p.length===0?d.f&33554432?(d.f^=se,Fa(d,null,c)):ni(d):ei(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:Gr(()=>{p=z(f);var e=p.length;let t=!1;Ve&&Je(c)===`[!`!=(e===0)&&(c=qe(),We(c),He(!1),t=!0);for(var i=new Set,u=xn,v=kr(),y=0;y<e;y+=1){Ve&&Ue.nodeType===8&&Ue.data===`]`&&(c=Ue,t=!0,He(!1));var b=p[y],x=a(b,y),S=h?null:l.get(x);S?(S.v&&pr(S.v,b),S.i&&pr(S.i,y),v&&u.unskip_effect(S.e)):(S=Pa(l,h?c:ja??(ja=Tr()),b,x,y,o,n,r),h||(S.e.f|=se),l.set(x,S)),i.add(x)}if(e===0&&s&&!d&&(h?d=qr(()=>s(c)):(d=qr(()=>s(ja??(ja=Tr()))),d.f|=se)),e>i.size&&Ce(``,``,``),Ve&&e>0&&We(qe()),!h){if(m.set(u,i),v){for(let[e,t]of l)i.has(e)||u.skip_effect(t.e);u.oncommit(g),u.ondiscard(_)}else g(u)}t&&He(!0),z(f)}),flags:n,items:l,pending:m,outrogroups:null,fallback:d};h=!1,Ve&&(c=Ue)}function Ma(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Na(e,t,n,r,a){var o=!!(r&8),s=t.length,c=e.items,l=Ma(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v<s;v+=1)h=t[v],g=a(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??(f=new Set)).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=a(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(ni(_),o&&(_.nodes?.a?.unfix(),(f??(f=new Set)).delete(_))),_.f&33554432){if(_.f^=se,_===l)Fa(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Ia(e,d,_),Ia(e,_,y),Fa(_,y,n),d=_,p=[],m=[],l=Ma(d.next);continue}}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],C=p[p.length-1];for(x=0;x<p.length;x+=1)Fa(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Ia(e,S.prev,C.next),Ia(e,d,S),Ia(e,C,b),l=b,d=C,--v,p=[],m=[]}else u.delete(_),Fa(_,l,n),Ia(e,_.prev,_.next),Ia(e,_,d===null?e.effect.first:d.next),Ia(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??(u=new Set)).add(l),m.push(l),l=Ma(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Ma(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Aa(e,i(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var w=[];if(u!==void 0)for(_ of u)_.f&8192||w.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&w.push(l),l=Ma(l.next);var T=w.length;if(T>0){var ee=r&4&&s===0?n:null;if(o){for(v=0;v<T;v+=1)w[v].nodes?.a?.measure();for(v=0;v<T;v+=1)w[v].nodes?.a?.fix()}ka(e,w,ee)}}o&&dt(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Pa(e,t,n,r,i,a,o,s){var c=o&1?o&16?dr(n):fr(n,!1,!1):null,l=o&2?dr(i):null;return{v:c,i:l,e:qr(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Fa(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=Dr(r);if(a.before(r),r===i)return;r=o}}function Ia(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function La(e,t,...n){var r=new Ta(e);Gr(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},ie)}function Ra(e,t,n){var r;Ve&&(r=Ue,Ge());var i=new Ta(e);Gr(()=>{var e=t()??null;if(Ve&&Je(r)===`[`!=(e!==null)){var a=qe();We(a),i.anchor=a,He(!1),i.ensure(e,e&&(t=>n(t,e))),He(!0);return}i.ensure(e,e&&(t=>n(t,e)))},ie)}var za=()=>performance.now(),Ba={tick:e=>requestAnimationFrame(e),now:()=>za(),tasks:new Set};function Va(){let e=Ba.now();Ba.tasks.forEach(t=>{t.c(e)||(Ba.tasks.delete(t),t.f())}),Ba.tasks.size!==0&&Ba.tick(Va)}function Ha(e){let t;return Ba.tasks.size===0&&Ba.tick(Va),{promise:new Promise(n=>{Ba.tasks.add(t={c:e,f:n})}),abort(){Ba.tasks.delete(t)}}}function Ua(e,t){Tt(()=>{e.dispatchEvent(new CustomEvent(t))})}function Wa(e){if(e===`float`)return`cssFloat`;if(e===`offset`)return`cssOffset`;if(e.startsWith(`--`))return e;let t=e.split(`-`);return t.length===1?t[0]:t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join(``)}function Ga(e){let t={},n=e.split(`;`);for(let e of n){let[n,r]=e.split(`:`);if(!n||r===void 0)break;let i=Wa(n.trim());t[i]=r.trim()}return t}var Ka=e=>e;function qa(e,t,n,r){var i,a=!!(e&1),o=!!(e&2),s=a&&o,c=!!(e&4),l=s?`both`:a?`in`:`out`,u,d=t.inert,f=t.style.overflow,p,m;function h(){return Tt(()=>u??(u=n()(t,r?.()??{},{direction:l})))}var g={is_global:c,in(){if(t.inert=d,!a){m?.abort(),m?.reset?.();return}o||p?.abort(),p=Ja(t,h(),m,1,()=>{Ua(t,`introstart`)},()=>{Ua(t,`introend`),p?.abort(),p=u=void 0,t.style.overflow=f})},out(e){if(!o){e?.(),u=void 0;return}t.inert=!0,m=Ja(t,h(),p,0,()=>{Ua(t,`outrostart`)},()=>{Ua(t,`outroend`),e?.()})},stop:()=>{p?.abort(),m?.abort()}},_=fi;if(((i=_.nodes).t??(i.t=[])).push(g),a&&da){var v=c;if(!v){for(var y=_.parent;y&&y.f&65536;)for(;(y=y.parent)&&!(y.f&16););v=!y||!!(y.f&32768)}v&&Hr(()=>{Pi(()=>g.in())})}}function Ja(e,t,n,r,i,a){var o=r===1;if(f(t)){var s,c=!1;return dt(()=>{c||(s=Ja(e,t({direction:o?`in`:`out`}),n,r,i,a))}),{abort:()=>{c=!0,s?.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(n?.deactivate(),!t?.duration&&!t?.delay)return i(),a(),{abort:p,deactivate:p,reset:p,t:()=>r};let{delay:l=0,css:u,tick:d,easing:m=Ka}=t;var h=[];if(o&&n===void 0&&(d&&d(0,1),u)){var g=Ga(u(0,1));h.push(g,g)}var _=()=>1-r,v=e.animate(h,{duration:l,fill:`forwards`});return v.onfinish=()=>{v.cancel(),i();var o=n?.t()??1-r;n?.abort();var s=r-o,c=t.duration*Math.abs(s),l=[];if(c>0){var f=!1;if(u)for(var p=Math.ceil(c/(1e3/60)),h=0;h<=p;h+=1){var g=o+s*m(h/p),y=Ga(u(g,1-g));l.push(y),f||(f=y.overflow===`hidden`)}f&&(e.style.overflow=`hidden`),_=()=>{var e=v.currentTime;return o+s*m(e/c)},d&&Ha(()=>{if(v.playState!==`running`)return!1;var e=_();return d(e,1-e),!0})}v=e.animate(l,{duration:c,fill:`forwards`}),v.onfinish=()=>{_=()=>r,d?.(r,1-r),a()}},{abort:()=>{v&&(v.cancel(),v.effect=null,v.onfinish=p)},deactivate:()=>{a=p},reset:()=>{r===0&&d?.(1,0)},t:()=>_()}}function Ya(e,t,n,r,i,a){let o=Ve;Ve&&Ge();var s=null;Ve&&Ue.nodeType===1&&(s=Ue,Ge());var c=Ve?Ue:e,l=new Ta(c,!1);Gr(()=>{let e=t()||null;var a=i?i():n||e===`svg`?Fe:void 0;if(e===null){l.ensure(null,null),fa(!0);return}return l.ensure(e,t=>{if(e){if(s=Ve?s:Ar(e,a),oa(s,s),r){var n=null;Ve&&qi(e)&&s.append(n=document.createComment(``));var i=Ve?Er(s):s.appendChild(Tr());Ve&&(i===null?He(!1):We(i)),r(s,i),n?.remove()}fi.nodes.end=s,t.before(s)}Ve&&We(t)}),fa(!0),()=>{e&&fa(!1)}},ie),Ir(()=>{fa(!0)}),o&&(He(!0),We(c))}function Xa(e,t,n){Hr(()=>{var r=Pi(()=>t(e,n?.())||{});if(n&&r?.update){var i=!1,a={};Wr(()=>{var e=n();Fi(e),i&&Xe(a,e)&&(a=e,r.update(e))}),i=!0}if(r?.destroy)return()=>r.destroy()})}function Za(e,t){var n=void 0,r;Kr(()=>{n!==(n=t())&&(r&&(Zr(r),r=null),n&&(r=qr(()=>{Hr(()=>n(e))})))})}function Qa(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Qa(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function $a(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Qa(e))&&(r&&(r+=` `),r+=t);return r}function K(e){return typeof e==`object`?$a(e):e??``}var eo=[...`
|
|
2
|
+
\r\f\xA0\v`];function to(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||eo.includes(r[o-1]))&&(s===r.length||eo.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function no(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function ro(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function io(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(ro)),i&&c.push(...Object.keys(i).map(ro));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=ro(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=no(r)),i&&(n+=no(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function q(e,t,n,r,i,a){var o=e[he];if(Ve||o!==n||o===void 0){var s=to(n,r,a);(!Ve||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[he]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function ao(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function oo(e,t,n,r){var i=e[ge];if(Ve||i!==t){var a=io(t,r);(!Ve||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[ge]=t}else r&&(Array.isArray(r)?(ao(e,n?.[0],r[0]),ao(e,n?.[1],r[1],`important`)):ao(e,n,r));return r}function so(e,n,r=!1){if(e.multiple){if(n==null)return;if(!t(n))return ze();for(var i of e.options)i.selected=n.includes(uo(i));return}for(i of e.options)if(yr(uo(i),n)){i.selected=!0;return}(!r||n!==void 0)&&(e.selectedIndex=-1)}function co(e){var t=new MutationObserver(()=>{`__value`in e&&so(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),Ir(()=>{t.disconnect()})}function lo(e,t,n=t){var r=new WeakSet,i=!0;Et(e,`change`,t=>{var i=t?`[selected]`:`:checked`,a;if(e.multiple)a=[].map.call(e.querySelectorAll(i),uo);else{var o=e.querySelector(i)??e.querySelector(`option:not([disabled])`);a=o&&uo(o)}n(a),e.__value=a,xn!==null&&r.add(xn)}),Hr(()=>{var a=t();if(e===document.activeElement){var o=xn;if(r.has(o))return}if(so(e,a,i),i&&a===void 0){var s=e.querySelector(`:checked`);s!==null&&(a=uo(s),n(a))}e.__value=a,i=!1}),co(e)}function uo(e){return`__value`in e?e.__value:e.value}var fo=Symbol(`class`),po=Symbol(`style`),mo=Symbol(`is custom element`),ho=Symbol(`is html`),go=be?`link`:`LINK`,_o=be?`input`:`INPUT`,vo=be?`option`:`OPTION`,yo=be?`select`:`SELECT`,bo=be?`progress`:`PROGRESS`;function xo(e){if(Ve){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;J(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;J(e,`checked`,null),e.checked=r}}};e[ve]=n,dt(n),wt()}}function So(e,t){var n=Do(e);n.value!==(n.value=t??void 0)&&(e.value!==t||t===0&&e.nodeName===bo)&&(e.value=t??``)}function Co(e,t){var n=Do(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function wo(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function J(e,t,n,r){var i=Do(e);Ve&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===go)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[pe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ko(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function To(e,t,n,r,i=!1,a=!1){if(Ve&&i&&e.nodeName===_o){var o=e;(o.type===`checkbox`?`defaultChecked`:`defaultValue`)in n||xo(o)}var s=Do(e),c=s[mo],l=!s[ho];let u=Ve&&c;u&&He(!1);var d=t||{},f=e.nodeName===vo;for(var p in t)p in n||(n[p]=null);n.class?n.class=K(n.class):(r||n[fo])&&(n.class=null),n[po]&&(n.style??(n.style=null));var m=ko(e);if(e.nodeName===_o&&`type`in n&&(`value`in n||`__value`in n)){var h=n.type;(h!==d.type||h===void 0&&e.hasAttribute(`type`))&&(d.type=h,J(e,`type`,h,a))}for(let i in n){let o=n[i];if(f&&i===`value`&&o==null){e.value=e.__value=``,d[i]=o;continue}if(i===`class`){q(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,o,r,t?.[fo],n[fo]),d[i]=o,d[fo]=n[fo];continue}if(i===`style`){oo(e,o,t?.[po],n[po]),d[i]=o,d[po]=n[po];continue}var g=d[i];if(!(o===g&&!(o===void 0&&e.hasAttribute(i)))){d[i]=o;var _=i[0]+i[1];if(_!==`$$`){if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var v=Bi(r);if(Ri(r)&&(r=r.slice(0,-7),t.capture=!0),!v&&g){if(o!=null)continue;e.removeEventListener(r,d[n],t),d[n]=null}if(v)B(r,e,o),ea([r]);else if(o!=null){function y(e){d[i].call(this,e)}d[n]=Zi(r,e,y,t)}}else if(i===`style`)J(e,i,o);else if(i===`autofocus`)St(e,!!o);else if(!c&&(i===`__value`||i===`value`&&o!=null))e.value=e.__value=o;else if(i===`selected`&&f)wo(e,o);else{var b=i;l||(b=Ui(b));var x=b===`defaultValue`||b===`defaultChecked`;if(o==null&&!c&&!x){if(s[i]=null,b===`value`||b===`checked`){let n=e,r=t===void 0;if(b===`value`){let e=n.defaultValue;n.removeAttribute(b),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(b),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i)}else x||m.includes(b)&&(c||typeof o!=`string`)?(e[b]=o,b in s&&(s[b]=Pe)):typeof o!=`function`&&J(e,b,o,a)}}}}return u&&He(!0),d}function Eo(e,t,n=[],r=[],i=[],a,o=!1,s=!1){on(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===yo,l=!1;if(Kr(()=>{var u=t(...n.map(z)),d=To(e,r,u,a,o,s);l&&c&&`value`in u&&so(e,u.value);for(let e of Object.getOwnPropertySymbols(i))u[e]||Zr(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var f=u[t];t.description===`@attach`&&(!r||f!==r[t])&&(i[t]&&Zr(i[t]),i[t]=qr(()=>Za(e,()=>f))),d[t]=f}r=d}),c){var u=e;Hr(()=>{so(u,r.value,!0),co(u)})}l=!0})}function Do(e){return e[me]??(e[me]={[mo]:e.nodeName.includes(`-`),[ho]:e.namespaceURI===`http://www.w3.org/1999/xhtml`})}var Oo=new Map;function ko(e){var t=e.getAttribute(`is`)||e.nodeName,n=Oo.get(t);if(n)return n;Oo.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=s(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.push(o);i=u(i)}return n}function Ao(e,t,n=t){var r=new WeakSet;Et(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=jo(e)?Mo(a):a,n(a),xn!==null&&r.add(xn),await ji(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(Ve&&e.defaultValue!==e.value||Pi(t)==null&&e.value)&&(n(jo(e)?Mo(e.value):e.value),xn!==null&&r.add(xn)),Wr(()=>{var n=t();if(e===document.activeElement){var i=xn;if(r.has(i))return}jo(e)&&n===Mo(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}function jo(e){var t=e.type;return t===`number`||t===`range`}function Mo(e){return e===``?null:+e}var No,Po=new WeakMap,Fo=new WeakMap,Io=new WeakMap,Lo=new WeakSet,Ro=class{constructor(e){kt(this,Lo),O(this,Po,new WeakMap),O(this,Fo,void 0),O(this,Io,void 0),A(Io,this,e)}observe(e,t){var n=j(Po,this).get(e)||new Set;return n.add(t),j(Po,this).set(e,n),k(Lo,this,zo).call(this).observe(e,j(Io,this)),()=>{var n=j(Po,this).get(e);n.delete(t),n.size===0&&(j(Po,this).delete(e),j(Fo,this).unobserve(e))}}};No=Ro;function zo(){return j(Fo,this)??A(Fo,this,new ResizeObserver(e=>{for(var t of e){No.entries.set(t.target,t);for(var n of j(Po,this).get(t.target)||[])n(t)}}))}x(Ro,`entries`,new WeakMap);function Bo(e,t){return e===t||e?.[de]===t}function Vo(e={},t,n,r){var i=Qe.r,a=fi;return Hr(()=>{var o,s;return Wr(()=>{o=s,s=r?.()||[],Pi(()=>{Bo(n(...s),e)||(t(e,...s),o&&Bo(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Bo(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var Ho={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return!e.exclude.has(t)&&t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function Y(e,t,n){return new Proxy({props:e,exclude:t},Ho)}var Uo={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(f(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];f(i)&&(i=i());let a=o(i,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(f(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=o(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===de||t===fe)return!1;for(let n of e.props)if(f(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(f(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function X(...e){return new Proxy({props:e},Uo)}function Z(e,t,n,r){var i=!0,a=!!(n&8),s=!!(n&16),c=r,l=!0,u=void 0,d=()=>s&&i?(u??(u=un(r)),z(u)):(l&&(l=!1,c=s?Pi(r):r),c);let f;if(a){var p=de in e||fe in e;f=o(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=xt(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&Oe(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?un:pn)(()=>(v=!1,g()));a&&z(y);var b=fi;return(function(e,t){if(arguments.length>0){let n=t?z(y):i&&a?_r(e):e;return P(y,n),v=!0,c!==void 0&&(c=n),e}return si&&v||b.f&16384?y.v:z(y)})}function Wo(e){Qe===null&&xe(`onMount`),Lr(()=>{let t=Pi(e);if(typeof t==`function`)return t})}if(typeof window<`u`){var Go,Ko;((Go=(Ko=window).__svelte??(Ko.__svelte={})).v??(Go.v=new Set)).add(`5`)}function qo(e){return{...e,endTime:e.endTime??(e.startTime??0)+(e.duration??0)}}function Jo(e){let t=Array.isArray(e.spans)?e.spans.map(qo):[];return{...qo(e),rootSpan:e.rootSpan?qo(e.rootSpan):t[0],spans:t}}var Yo=e=>e.map(Jo),Xo=class{constructor(e){x(this,`url`,void 0),x(this,`ws`,null),x(this,`reconnectTimer`,null),x(this,`messageHandlers`,new Set),x(this,`statusHandlers`,new Set),x(this,`reconnectAttempts`,0),x(this,`closed`,!1),x(this,`reconnectDelay`,1e3),x(this,`maxReconnectDelay`,15e3),this.url=e}connect(){this.closed=!1;try{this.ws=new WebSocket(this.url),this.ws.addEventListener(`open`,()=>{this.reconnectAttempts=0,this.emitStatus(`connected`)}),this.ws.addEventListener(`message`,e=>{try{let t=JSON.parse(e.data),n=Array.isArray(t?.traces)?{...t,traces:Yo(t.traces)}:t;for(let e of this.messageHandlers)e(n)}catch{}}),this.ws.addEventListener(`close`,()=>{this.emitStatus(`disconnected`),this.scheduleReconnect()})}catch{this.emitStatus(`disconnected`),this.scheduleReconnect()}}emitStatus(e){if(!this.closed)for(let t of this.statusHandlers)t(e)}scheduleReconnect(){if(this.closed||this.reconnectTimer)return;this.reconnectAttempts++;let e=Math.min(this.reconnectDelay*2**(this.reconnectAttempts-1),this.maxReconnectDelay);this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},e)}onMessage(e){return this.messageHandlers.add(e),()=>this.messageHandlers.delete(e)}onStatusChange(e){return this.statusHandlers.add(e),()=>this.statusHandlers.delete(e)}disconnect(){this.closed=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(),this.ws=null),this.messageHandlers.clear(),this.statusHandlers.clear()}isConnected(){return this.ws?.readyState===WebSocket.OPEN}};function Zo(e){try{let t=new URL(e);return t.protocol===`ws:`?`http://${t.host}`:t.protocol===`wss:`?`https://${t.host}`:null}catch{return null}}function Qo(e,t=fetch){return async(n,r)=>{if(n.kind!==`app`)return null;let i=new URL(`/source`,e);i.searchParams.set(`file`,n.file),i.searchParams.set(`line`,String(n.line)),i.searchParams.set(`context`,String(r));try{let e=await t(i.toString());return e.ok?await e.json():null}catch{return null}}}var $o=null;function es(e){$o=e===null?null:Qo(e)}var ts=(e,t)=>$o===null?Promise.resolve(null):$o(e,t),ns=new WeakMap,rs=class{constructor(e){O(this,ns,N(void 0)),P(j(ns,this),e,!0)}get value(){return z(j(ns,this))}set value(e){P(j(ns,this),e,!0)}},is=new WeakMap,as=new WeakMap,os=class{constructor(e){O(this,is,void 0),O(this,as,M(()=>j(is,this).call(this))),A(is,this,e)}get value(){return z(j(as,this))}};function ss(e){return new rs(e)}function cs(e){return new os(e)}function ls(e){return Br(()=>{Lr(e)})}function us(e,...t){for(let n of t){let t=e?.[n];if(typeof t==`string`&&t.length>0)return t}}function Q(e){return typeof e==`string`?e:void 0}function ds(e){if(typeof e==`number`)return e;if(typeof e==`string`&&e!==``){let t=Number(e);return Number.isFinite(t)?t:void 0}}function fs(e){if(typeof e==`boolean`)return e;if(e===`true`)return!0;if(e===`false`)return!1}function ps(e){if(Array.isArray(e)){let t=e.filter(e=>typeof e==`string`);return t.length===e.length?t:void 0}return typeof e==`string`?[e]:void 0}function ms(e,t){let n=e.attributes||{},r=[n[`service.name`],n[`service.peer.name`],n[`peer.service`],n[`http.host`],n[`db.system.name`],n[`db.system`],n[`messaging.system`],n[`rpc.service`],t];for(let e of r){let t=Q(e)?.trim();if(t)return t}return`unknown`}function hs(e,t){return Q(e[`db.system.name`])!==void 0||Q(e[`db.system`])!==void 0?`database`:Q(e[`cache.system`])===void 0?Q(e[`messaging.system`])===void 0?Q(e[`service.peer.name`])!==void 0||Q(e[`peer.service`])!==void 0||Q(e[`net.peer.name`])!==void 0||Q(e[`http.host`])!==void 0?t===e[`service.name`]?`service`:`external`:Q(e[`service.name`])===void 0?`unknown`:`service`:`messaging`:`cache`}function gs(e){if(e.resourceName)return e.resourceName;let t=e.resource||{},n=[t[`service.name`],t[`service.namespace`],t[`host.name`],t[`container.name`]];for(let e of n){let t=Q(e)?.trim();if(t)return t}return`unknown`}function _s(e,t){if(e===0&&t===0)return`unknown`;let n=e===0?1:t/e;return n>=.2?`unhealthy`:n>=.05?`degraded`:`healthy`}function vs(e){let t=new Map,n=(e,n=`unknown`)=>{let r=t.get(e);if(r)return r.type===`unknown`&&n!==`unknown`&&(r.type=n),r;let i={name:e,type:n,health:`unknown`,requestCount:0,errorCount:0,traceCount:0,logCount:0};return t.set(e,i),i};for(let t of e.traces){let e=new Set;for(let r of t.spans){let i=ms(r,t.service),a=n(i,hs(r.attributes,i));a.requestCount+=1,a.lastSeen=Math.max(a.lastSeen??0,r.endTime),r.status.code===`ERROR`&&(a.errorCount+=1),e.has(i)||(a.traceCount+=1,e.add(i))}}for(let t of e.logs){let e=n(gs(t),`service`);e.logCount+=1,e.lastSeen=Math.max(e.lastSeen??0,t.timestamp)}for(let t of e.errors){if(!t.service)continue;let e=n(t.service,`service`);e.errorCount+=t.count,e.lastSeen=Math.max(e.lastSeen??0,t.lastSeen)}return[...t.values()].map(e=>({...e,health:_s(e.requestCount,e.errorCount)})).sort((e,t)=>{let n=(t.lastSeen??0)-(e.lastSeen??0);return n===0?e.name.localeCompare(t.name):n})}var ys=[{id:`all`,label:`All time`,durationMs:null},{id:`5m`,label:`Last 5m`,durationMs:3e5},{id:`15m`,label:`Last 15m`,durationMs:9e5},{id:`30m`,label:`Last 30m`,durationMs:18e5},{id:`1h`,label:`Last 1h`,durationMs:36e5},{id:`3h`,label:`Last 3h`,durationMs:108e5},{id:`6h`,label:`Last 6h`,durationMs:216e5},{id:`24h`,label:`Last 24h`,durationMs:864e5},{id:`7d`,label:`Last 7d`,durationMs:6048e5}],bs={type:`preset`,preset:`all`},xs=new Map(ys.map(e=>[e.id,e]));function Ss(e,t){let n=xs.get(e);return!n||n.durationMs===null?{start:null,end:null}:{start:t-n.durationMs,end:t}}function Cs(e,t){return e.type===`preset`?Ss(e.preset,t):{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function ws(e){return e.start===null||e.end===null}function Ts(e){return e.type===`preset`?xs.get(e.preset)?.label??`All time`:`${Es(e.start)} → ${Es(e.end)}`}function Es(e){let t=new Date(e),n=new Date,r=t.toDateString()===n.toDateString(),i=t.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`});return r?i:`${t.toLocaleDateString(void 0,{month:`short`,day:`numeric`})} ${i}`}function Ds(e){return e.type===`preset`?e.preset===bs.preset?null:e.preset:`custom:${e.start}:${e.end}`}function Os(e){if(!e)return bs;if(e.startsWith(`custom:`)){let[,t,n]=e.split(`:`),r=Number(t),i=Number(n);return!Number.isFinite(r)||!Number.isFinite(i)?bs:{type:`custom`,start:r,end:i}}return xs.has(e)?{type:`preset`,preset:e}:bs}function ks(e){if(!ws(e))return{start:e.start,end:e.end}}var As=[`gen_ai.system`,`gen_ai.provider.name`,`gen_ai.operation.name`,`ai.model.provider`];function js(e){let t=e.attributes??{};for(let e of As)if(t[e]!=null)return!0;return!1}function Ms(e){let t=e.toLowerCase();return t===`az.ai.openai`||t===`azure_openai`?`openai`:t===`vertex_ai`||t===`gcp.vertex_ai`||t===`gcp.gemini`?`google`:t}function Ns(e){let t=Object.keys(e).sort((e,t)=>{let n=e.split(`/`)[1]??``;return(t.split(`/`)[1]??``).length-n.length});return(n,r)=>{let i=Ms(n),a=r.toLowerCase();for(let n of t){let[t,r]=n.split(`/`);if(t===i&&a.startsWith(r))return e[n]}}}var Ps=Ns({"openai/gpt-4o":{inputPerMTok:2.5,outputPerMTok:10},"openai/gpt-4o-mini":{inputPerMTok:.15,outputPerMTok:.6},"openai/gpt-4-turbo":{inputPerMTok:10,outputPerMTok:30},"openai/gpt-3.5-turbo":{inputPerMTok:.5,outputPerMTok:1.5},"anthropic/claude-opus-4":{inputPerMTok:15,outputPerMTok:75},"anthropic/claude-sonnet-4":{inputPerMTok:3,outputPerMTok:15},"anthropic/claude-3-5-sonnet":{inputPerMTok:3,outputPerMTok:15},"anthropic/claude-3-5-haiku":{inputPerMTok:.8,outputPerMTok:4},"anthropic/claude-3-opus":{inputPerMTok:15,outputPerMTok:75},"anthropic/claude-3-haiku":{inputPerMTok:.25,outputPerMTok:1.25},"google/gemini-2.5-flash":{inputPerMTok:.3,outputPerMTok:2.5},"google/gemini-2.0-flash":{inputPerMTok:.1,outputPerMTok:.4},"google/gemini-1.5-pro":{inputPerMTok:1.25,outputPerMTok:5},"google/gemini-1.5-flash":{inputPerMTok:.075,outputPerMTok:.3},"mistral/mistral-large":{inputPerMTok:2,outputPerMTok:6},"mistral/mistral-small":{inputPerMTok:.2,outputPerMTok:.6},"groq/llama-3.1-70b":{inputPerMTok:.59,outputPerMTok:.79},"deepseek/deepseek-chat":{inputPerMTok:.27,outputPerMTok:1.1}});function Fs(e){let t=Ps(e.provider,e.model);if(!t)return{currency:`USD`,input:0,output:0,cacheRead:0,cacheWrite:0,total:0,source:`unknown`};let n=t.cacheReadPerMTok??t.inputPerMTok*.1,r=t.cacheWritePerMTok??t.inputPerMTok*1.25,i=(e.cacheReadInputTokens??0)/1e6*n,a=(e.cacheCreationInputTokens??0)/1e6*r,o=Math.max(0,(e.inputTokens??0)-(e.cacheReadInputTokens??0)-(e.cacheCreationInputTokens??0))/1e6*t.inputPerMTok,s=(e.outputTokens??0)/1e6*t.outputPerMTok;return{currency:`USD`,input:o,output:s,cacheRead:i,cacheWrite:a,total:o+s+i+a,source:`table`}}function Is(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function Ls(e,t){let n=e[t];return typeof n==`string`?n:void 0}function Rs(e,t){let n=e[t];return typeof n==`number`?n:void 0}function zs(e,t){return Is(e[t])}function Bs(e,t){let n=e[t];return Array.isArray(n)?n:[]}function Vs(e,t){return Array.isArray(e[t])}function Hs(e,t,n,r){return r.filter(t=>n(e,t)===void 0).map(e=>`${t}: Missing or invalid ${e}`)}function Us(e){if(e!=null){if(typeof e==`object`)return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return}}}function Ws(e){if(Array.isArray(e.parts))return e.parts.map(e=>{let t=e.type??`text`;return t===`text`?{kind:`text`,text:String(e.content??``)}:t===`image`?{kind:`image`,mediaType:`image/*`,dataRef:String(e.content??``)}:t===`audio`?{kind:`audio`,mediaType:`audio/*`,dataRef:String(e.content??``)}:{kind:`json`,value:e.content}});if(Array.isArray(e.content))return e.content.map(e=>e.type===`text`||e.text!==void 0?{kind:`text`,text:String(e.text??``)}:e.type===`image`?{kind:`image`,mediaType:e.mimeType??`image/*`,dataRef:String(e.image??e.data??``)}:e.type===`audio`?{kind:`audio`,mediaType:e.mimeType??`audio/*`,dataRef:String(e.data??``)}:{kind:`json`,value:e});let t=Q(e.content);return t===void 0?e.content==null?[]:[{kind:`json`,value:e.content}]:[{kind:`text`,text:t}]}function Gs(e){let t=Is(e);return t&&`value`in t?t.value:e}function Ks(e){return e.type===`tool-call`?{kind:`call`,call:{id:e.toolCallId,name:e.toolName??``,arguments:Us(e.input)??e.input??{}}}:e.type===`tool-result`?{kind:`result`,result:{id:e.toolCallId,value:Gs(e.output)}}:e.type===`text`||e.text!==void 0?{kind:`text`,text:String(e.text??``)}:null}function qs(e){return e.type===`tool_call`?{kind:`call`,call:{id:e.id,name:e.name??``,arguments:Us(e.arguments)??e.arguments??{}}}:e.type===`tool_call_response`?{kind:`result`,result:{id:e.id,value:Gs(e.response)}}:e.type===`text`||e.type==null?{kind:`text`,text:String(e.content??``)}:null}function Js(e,t,n){let r=[],i=[],a=[];for(let e of t)e.kind===`call`?r.push(e.call):e.kind===`result`?a.push(e.result):i.push({kind:`text`,text:e.text});if(a.length>1){let t={role:e,parts:[]};return t._toolResults=a,t}let o={role:e,parts:i};return r.length>0&&(o.toolCalls=r),a.length===1&&(o.toolCallId=a[0].id,o.parts=[{kind:`json`,value:a[0].value}]),n&&(o.finishReason=n),o}function Ys(e){let t=e.role??`user`;if(Array.isArray(e.content)){let n=e.content;if(n.some(e=>e.type===`tool-call`||e.type===`tool-result`))return Js(t,n.map(Ks).filter(e=>e!==null),e.finish_reason)}if(Array.isArray(e.parts)){let n=e.parts;if(n.some(e=>e.type===`tool_call`||e.type===`tool_call_response`))return Js(t,n.map(qs).filter(e=>e!==null),e.finish_reason)}let n={role:t,parts:Ws(e)};return Array.isArray(e.tool_calls)&&e.tool_calls.length>0&&(n.toolCalls=e.tool_calls.map(e=>({id:e.id,name:e.function?.name??``,arguments:Us(e.function?.arguments)??e.function?.arguments??{},type:e.type}))),e.tool_call_id&&(n.toolCallId=e.tool_call_id),e.finish_reason&&(n.finishReason=e.finish_reason),n}function Xs(e,t){let n=Us(e[t]);if(Array.isArray(n))return n.map(Ys)}function Zs(e){if(!e||e.length===0)return[];let t=[];for(let n of e){let e=n.attributes??{};if(n.name===`gen_ai.choice`){let n=e.message,r=Us(e.message)??n,i=Q(e.finish_reason);if(r){let e=Ys(r);i&&(e.finishReason=i),t.push(e)}continue}let r=n.name.match(/^gen_ai\.(system|user|assistant|tool)\.message$/);if(!r)continue;let i=r[1],a=e.content,o=Q(a),s=o===void 0?a:Us(o)??o;t.push(Ys({role:i,content:s,tool_calls:Us(e.tool_calls),tool_call_id:Q(e.id)??Q(e.tool_call_id)}))}return t}function Qs(e){let t=Us(e[`gen_ai.tool.definitions`]??e[`gen_ai.orchestrator.agent.definitions`]);if(Array.isArray(t))return t.filter(e=>Q(e.name)!==void 0).map(e=>({name:e.name,description:e.description,type:e.type,schema:e.schema??e.parameters}))}function $s(e){return{inputTokens:ds(e[`gen_ai.usage.input_tokens`])??ds(e[`gen_ai.usage.prompt_tokens`])??ds(e[`llm.usage.prompt_tokens`])??ds(e[`ai.usage.inputTokens`]),outputTokens:ds(e[`gen_ai.usage.output_tokens`])??ds(e[`gen_ai.usage.completion_tokens`])??ds(e[`llm.usage.completion_tokens`])??ds(e[`ai.usage.outputTokens`]),reasoningOutputTokens:ds(e[`gen_ai.usage.reasoning.output_tokens`]),cacheReadInputTokens:ds(e[`gen_ai.usage.cache_read.input_tokens`]),cacheCreationInputTokens:ds(e[`gen_ai.usage.cache_creation.input_tokens`])}}function ec(e){let t=ds(e[`gen_ai.response.time_to_first_chunk`]),n=ds(e[`gen_ai.response.time_to_finish`]),r=ds(e[`gen_ai.response.output_tokens_per_second`]),i=ds(e[`gen_ai.response.time_per_output_chunk`]);if(t!==void 0||n!==void 0||r!==void 0||i!==void 0)return{timeToFirstChunkS:t,timeToFinishS:n,outputTokensPerSecond:r,timePerOutputChunkS:i}}function tc(e){let t=ds(e[`gen_ai.session.cost.usd`]),n=ds(e[`gen_ai.session.input_tokens`]),r=ds(e[`gen_ai.session.output_tokens`]),i=ds(e[`gen_ai.session.step.count`]),a=ds(e[`gen_ai.session.tool_call.count`]),o=ds(e[`gen_ai.session.error.count`]);if(t!==void 0||n!==void 0||r!==void 0||i!==void 0||a!==void 0||o!==void 0)return{costUsd:t,inputTokens:n,outputTokens:r,stepCount:i,toolCallCount:a,errorCount:o}}function nc(e,t){let n=Q(e[`gen_ai.guard.rule`]);if(n)return{rule:n,action:Q(e[`gen_ai.guard.action`])??t,message:Q(e[`gen_ai.guard.message`]),observed:ds(e[`gen_ai.guard.observed`]),limit:ds(e[`gen_ai.guard.limit`])}}function rc(e,t){let n=fs(e[`gen_ai.guard.stopped`]),r=[],i=nc(e),a=e=>{e&&(!i||e.action===`stop`)&&(i=e)};for(let e of t??[]){let t=e.attributes??{};if(e.name===`gen_ai.guard.stop`)a(nc(t,`stop`));else if(e.name===`gen_ai.guard.warning`)a(nc(t,`warn`));else if(e.name===`gen_ai.client.warnings`){let e=Us(t[`gen_ai.warnings`]);Array.isArray(e)&&r.push(...e)}}return(n!==void 0||i)&&(i={...i,stopped:n??i?.action===`stop`}),{guard:i,warnings:r.length>0?r:void 0}}function ic(e){let t=e.toLowerCase();return t===`az.ai.openai`||t===`azure_openai`?`openai`:t===`gcp.vertex_ai`||t===`vertex_ai`||t===`gcp.gemini`||t===`google-gla`||t===`google_genai`||t===`gemini`?`google`:t}var ac=new Set(`gen_ai.system,gen_ai.provider.name,gen_ai.operation.name,gen_ai.request.model,gen_ai.response.model,gen_ai.response.id,gen_ai.response.finish_reasons,gen_ai.request.temperature,gen_ai.request.top_p,gen_ai.request.top_k,gen_ai.request.max_tokens,gen_ai.request.stop_sequences,gen_ai.request.seed,gen_ai.request.frequency_penalty,gen_ai.request.presence_penalty,gen_ai.request.choice.count,gen_ai.usage.input_tokens,gen_ai.usage.output_tokens,gen_ai.usage.prompt_tokens,gen_ai.usage.completion_tokens,gen_ai.usage.reasoning.output_tokens,gen_ai.usage.cache_read.input_tokens,gen_ai.usage.cache_creation.input_tokens,gen_ai.usage.cost.usd,gen_ai.response.time_to_first_chunk,gen_ai.response.time_to_finish,gen_ai.response.output_tokens_per_second,gen_ai.response.time_per_output_chunk,gen_ai.guard.stopped,gen_ai.guard.rule,gen_ai.guard.action,gen_ai.guard.message,gen_ai.guard.observed,gen_ai.guard.limit,gen_ai.session.cost.usd,gen_ai.session.input_tokens,gen_ai.session.output_tokens,gen_ai.session.step.count,gen_ai.session.tool_call.count,gen_ai.session.error.count,gen_ai.input.messages,gen_ai.output.messages,gen_ai.input.messages.ref,gen_ai.output.messages.ref,gen_ai.system_instructions,gen_ai.tool.definitions,gen_ai.orchestrator.agent.definitions,gen_ai.agent.id,gen_ai.agent.name,gen_ai.agent.description,gen_ai.tool.name,gen_ai.tool.call.id,gen_ai.handoff.from_agent,gen_ai.handoff.to_agent,gen_ai.guardrail.name,gen_ai.guardrail.triggered,gen_ai.conversation.id,gen_ai.evaluation.name,gen_ai.evaluation.score.value,gen_ai.evaluation.score.label,gen_ai.evaluation.explanation,gen_ai.audio.input.format,gen_ai.audio.output.format,gen_ai.speech.voice,gen_ai.speech.input_text,gen_ai.transcription.text,gen_ai.embeddings.dimension.count,gen_ai.openai.request.service_tier,gen_ai.openai.response.service_tier,gen_ai.openai.response.system_fingerprint,gen_ai.openai.request.response_format,openai.request.service_tier,openai.response.service_tier,openai.response.system_fingerprint,openai.request.response_format`.split(`,`));function oc(e){let t=e.attributes??{},n=ic(Q(t[`gen_ai.provider.name`])??Q(t[`gen_ai.system`])??Q(t[`ai.model.provider`])??`unknown`),r=Q(t[`gen_ai.operation.name`])??`chat`,i=Q(t[`gen_ai.request.model`])??Q(t[`llm.request.model`])??Q(t.model_name)??Q(t[`ai.model.id`])??`unknown`,a=Q(t[`gen_ai.response.model`])??Q(t[`llm.response.model`])??Q(t[`ai.response.model`]),o=Xs(t,`gen_ai.input.messages`)??[],s=Xs(t,`gen_ai.output.messages`)??[],c=[],l=Us(t[`gen_ai.system_instructions`]);if(Array.isArray(l)&&l.length>0){let e=Is(l[0]);c=e&&`role`in e?l.map(e=>Ys(e)):[{role:`system`,parts:l.map(e=>e.type===`text`||e.content!==void 0?{kind:`text`,text:String(e.content??``)}:{kind:`json`,value:e})}]}let u=o.length||s.length||c.length?[...c,...o,...s]:Zs(e.events),d=Q(t[`gen_ai.input.messages.ref`]),f=Q(t[`gen_ai.output.messages.ref`]),p=u.some(e=>e.role===`system`||e.role===`user`),m=u.some(e=>e.role===`assistant`);if(d&&!p&&u.push({role:`user`,parts:[{kind:`ref`,ref:d,direction:`input`}]}),f&&!m&&u.push({role:`assistant`,parts:[{kind:`ref`,ref:f,direction:`output`}]}),u.length===0){let e=Us(t[`ai.prompt.messages`]);if(Array.isArray(e))u.push(...e.map(Ys));else{let e=Us(t[`ai.prompt`]);e&&(Array.isArray(e.messages)?u.push(...e.messages.map(Ys)):(e.system&&u.push({role:`system`,parts:[{kind:`text`,text:e.system}]}),e.prompt&&u.push({role:`user`,parts:[{kind:`text`,text:e.prompt}]})))}let n=Us(t[`ai.response.toolCalls`]),r=Array.isArray(n)?n.filter(e=>Q(e.toolName)!==void 0).map(e=>({id:e.toolCallId,name:e.toolName,arguments:Us(e.input??e.args)??e.input??e.args??{}})):void 0,i=Q(t[`ai.response.text`]);if(i||r&&r.length>0){let e=ps(t[`gen_ai.response.finish_reasons`])?.[0]??Q(t[`ai.response.finishReason`]),n=Ys({role:`assistant`,content:i??``});e&&(n.finishReason=e),r&&r.length>0&&(n.toolCalls=r),u.push(n)}}if(u.length===0){let e=Us(t[`pydantic_ai.all_messages`]);Array.isArray(e)&&u.push(...e.map(Ys))}if(u.length===0){let e=[];for(let n=0;n<32;n++){let r=Q(t[`gen_ai.prompt.${n}.role`])??Q(t[`llm.prompts.${n}.role`]),i=t[`gen_ai.prompt.${n}.content`]??t[`llm.prompts.${n}.content`];if(!r)break;e.push(Ys({role:r,content:i}))}for(let n=0;n<32;n++){let r=Q(t[`gen_ai.completion.${n}.role`])??Q(t[`llm.completions.${n}.role`]),i=t[`gen_ai.completion.${n}.content`]??t[`llm.completions.${n}.content`],a=Q(t[`gen_ai.completion.${n}.finish_reason`]);if(!r)break;let o=Ys({role:r,content:i});a&&(o.finishReason=a),e.push(o)}e.length>0&&(u=e)}u=u.flatMap(e=>{let t=e._toolResults;return t?t.map(e=>({role:`tool`,parts:[{kind:`json`,value:e.value}],toolCallId:e.id})):[e]});let h=[];for(let e of u)e.toolCalls&&h.push(...e.toolCalls);if(h.length>0){let e=new Map;for(let t of h)t.id&&e.set(t.id,t);for(let t of u){if(t.role!==`tool`||!t.toolCallId)continue;let n=e.get(t.toolCallId);if(!n||n.result!==void 0)continue;let r=t.parts.find(e=>e.kind===`text`),i=t.parts.find(e=>e.kind===`json`);r&&r.kind===`text`?n.result=Us(r.text)??r.text:i&&i.kind===`json`&&(n.result=i.value)}}let g=$s(t),_=Fs({provider:n,model:a??i,inputTokens:g.inputTokens,outputTokens:g.outputTokens,cacheReadInputTokens:g.cacheReadInputTokens,cacheCreationInputTokens:g.cacheCreationInputTokens}),v=ds(t[`gen_ai.usage.cost.usd`]),y=v===void 0?_:{currency:`USD`,input:_?.input??0,output:_?.output??0,cacheRead:_?.cacheRead??0,cacheWrite:_?.cacheWrite??0,total:v,source:`reported`},b=ec(t),x=tc(t),{guard:S,warnings:C}=rc(t,e.events),w=ps(t[`gen_ai.response.finish_reasons`]),T=Q(t[`gen_ai.agent.name`]),ee=Q(t[`gen_ai.agent.id`]),te=Q(t[`gen_ai.agent.description`]),ne=Q(t[`gen_ai.tool.name`]),re=Q(t[`gen_ai.tool.call.id`]),ie=Q(t[`gen_ai.handoff.from_agent`]),ae=Q(t[`gen_ai.handoff.to_agent`]),oe=Q(t[`gen_ai.guardrail.name`]),se=fs(t[`gen_ai.guardrail.triggered`]),ce=Q(t[`gen_ai.evaluation.name`]),le=ds(t[`gen_ai.evaluation.score.value`]),E=Q(t[`gen_ai.evaluation.score.label`]),ue=Q(t[`gen_ai.evaluation.explanation`]),de=Q(t[`gen_ai.audio.input.format`]),fe=Q(t[`gen_ai.audio.output.format`]),pe=Q(t[`gen_ai.speech.voice`]),me=Q(t[`gen_ai.speech.input_text`]),he=Q(t[`gen_ai.transcription.text`]),ge=ds(t[`gen_ai.embeddings.dimension.count`]),_e=Q(t[`agent.consent.outcome`]),ve=Q(t[`policy.decision`]),ye=Q(t[`mcp.security.injection.verdict`]),be=Q(t[`agent.action.risk_class`]),xe=Q(t[`agent.input.provenance`]),Se=ds(t[`agent.plan.step_index`]),Ce=Q(t[`security.event`]),we=fs(t[`gen_ai.guard.stopped`]),Te=_e||ve||ye||be||xe||Se!==void 0||Ce||we!==void 0||S?.stopped?{..._e&&{consentOutcome:_e},...ve&&{policyDecision:ve},...ye&&{injectionVerdict:ye},...be&&{actionRiskClass:be},...xe&&{inputProvenance:xe},...Se!==void 0&&{planStepIndex:Se},...Ce&&{securityEvent:Ce},guardStopped:S?.stopped??we}:void 0,Ee={};for(let[e,n]of Object.entries(t))ac.has(e)||e.startsWith(`gen_ai.prompt.`)||e.startsWith(`gen_ai.completion.`)||e.startsWith(`llm.prompts.`)||e.startsWith(`llm.completions.`)||(Ee[e]=n);return{traceId:e.traceId,spanId:e.spanId,parentSpanId:e.parentSpanId,name:e.name,startMs:e.startTime,endMs:e.endTime,status:e.status?.code===`OK`?`ok`:e.status?.code===`ERROR`?`error`:`unset`,errorMessage:e.status?.message,provider:n,operation:r,requestModel:i,responseModel:a,params:{temperature:ds(t[`gen_ai.request.temperature`]),topP:ds(t[`gen_ai.request.top_p`]),topK:ds(t[`gen_ai.request.top_k`]),maxTokens:ds(t[`gen_ai.request.max_tokens`]),stopSequences:ps(t[`gen_ai.request.stop_sequences`]),seed:ds(t[`gen_ai.request.seed`]),frequencyPenalty:ds(t[`gen_ai.request.frequency_penalty`]),presencePenalty:ds(t[`gen_ai.request.presence_penalty`]),choiceCount:ds(t[`gen_ai.request.choice.count`])},messages:u,toolDefinitions:Qs(t),toolCalls:h,usage:g,cost:y,streaming:b,guard:S,session:x,warnings:C,finishReasons:w,responseId:Q(t[`gen_ai.response.id`]),agent:ee||T||te?{id:ee,name:T,description:te}:void 0,tool:ne||re?{name:ne,callId:re}:void 0,handoff:ie||ae?{fromAgent:ie,toAgent:ae}:void 0,guardrail:oe||se!==void 0?{name:oe,triggered:se}:void 0,conversationId:Q(t[`gen_ai.conversation.id`]),agentSecurity:Te,evaluation:ce||le!==void 0||E||ue?{name:ce,scoreValue:le,scoreLabel:E,explanation:ue}:void 0,modality:de||fe||pe||me||he||ge?{audioInputFormat:de,audioOutputFormat:fe,speechVoice:pe,speechInputText:me,transcriptionText:he,embeddingDimensions:ge}:void 0,extras:{openaiServiceTier:Q(t[`gen_ai.openai.request.service_tier`])||Q(t[`gen_ai.openai.response.service_tier`])||Q(t[`openai.request.service_tier`])||Q(t[`openai.response.service_tier`])?{request:Q(t[`gen_ai.openai.request.service_tier`])??Q(t[`openai.request.service_tier`]),response:Q(t[`gen_ai.openai.response.service_tier`])??Q(t[`openai.response.service_tier`])}:void 0,openaiSystemFingerprint:Q(t[`gen_ai.openai.response.system_fingerprint`])??Q(t[`openai.response.system_fingerprint`]),openaiResponseFormat:Q(t[`gen_ai.openai.request.response_format`])??Q(t[`openai.request.response_format`]),raw:Ee}}}function sc(e){let t=new Map;for(let n of e){let e=n.attributes??{},r=e[`ai.toolCall.id`];if(typeof r!=`string`)continue;let i=e[`ai.toolCall.result`];if(i!=null){if(typeof i==`string`)try{t.set(r,JSON.parse(i))}catch{t.set(r,i)}else t.set(r,i)}}return t}function cc(e,t){if(t.size!==0){for(let n of e.toolCalls){if(n.result!==void 0||!n.id)continue;let e=t.get(n.id);e!==void 0&&(n.result=e)}for(let n of e.messages)if(n.toolCalls)for(let e of n.toolCalls){if(e.result!==void 0||!e.id)continue;let n=t.get(e.id);n!==void 0&&(e.result=n)}}}function lc(e,...t){for(let n of t){let t=e[n];if(t==null||t instanceof Object)continue;let r=String(t);if(r.length>0)return r}}function uc(e,...t){for(let n of t){let t=e[n];if(t==null||t instanceof Object||t===!0||t===!1)continue;let r=Number(t);if(Number.isFinite(r)&&String(t).trim()!==``)return r}}function dc(e,...t){for(let n of t){let t=e[n];if(t===!0||t===`true`)return!0;if(t===!1||t===`false`)return!1}}var fc=[[`claude-opus-4`,15,75],[`claude-sonnet-4`,3,15],[`claude-haiku-4`,.8,4],[`claude-3-5-sonnet`,3,15],[`claude-3-5-haiku`,.8,4],[`claude-3-opus`,15,75],[`claude-3-haiku`,.25,1.25],[`opus`,15,75],[`sonnet`,3,15],[`haiku`,.8,4]];function pc(e,t,n){if(!e)return;let r=e.toLowerCase(),i=fc.find(([e])=>r.includes(e));if(!i)return;let[,a,o]=i;return(t??0)/1e6*a+(n??0)/1e6*o}function mc(...e){return Object.assign({},...e)}function hc(e){return{user:lc(e,`user.id`,`user.account_uuid`,`user.email`),organization:lc(e,`organization.id`),terminal:lc(e,`terminal.type`),appVersion:lc(e,`app.version`),model:lc(e,`model`)}}var gc=`mcp__`;function _c(e){if(!e.startsWith(gc))return{name:e,isMcp:!1};let t=e.slice(5),n=t.indexOf(`__`);if(n===-1)return{name:e,isMcp:!0,mcpServer:t||void 0};let r=t.slice(0,n),i=t.slice(n+2);return{name:e,isMcp:!0,mcpServer:r||void 0,mcpTool:i||void 0}}function vc(e){return e.startsWith(gc)}var yc=[`file`,`shell`,`search`,`web`,`todo`,`subagent`,`skill`,`mcp`,`other`],bc=new Map([[`read`,`file`],[`edit`,`file`],[`write`,`file`],[`multiedit`,`file`],[`notebookedit`,`file`],[`bash`,`shell`],[`bashoutput`,`shell`],[`killshell`,`shell`],[`killbash`,`shell`],[`grep`,`search`],[`glob`,`search`],[`ls`,`search`],[`webfetch`,`web`],[`websearch`,`web`],[`todowrite`,`todo`],[`task`,`subagent`],[`agent`,`subagent`],[`skill`,`skill`]]);function xc(e){return vc(e)?`mcp`:bc.get(e.toLowerCase())??`other`}function Sc(e){return lc(e,`subagent_type`,`agent_type`,`subagent.type`)}function Cc(e){return lc(e,`skill`,`skill_name`,`skill.name`)}var wc=new Map([[`user_prompt`,`user_prompt`],[`api_request`,`api_request`],[`api_error`,`api_error`],[`api_refusal`,`api_refusal`],[`tool_result`,`tool_result`],[`tool_decision`,`tool_decision`],[`mcp_server_connection`,`mcp_connection`],[`plugin_loaded`,`plugin_loaded`],[`hook_execution_complete`,`hook_execution`]]),Tc=[...wc.keys()];function Ec(e,t){let n=xc(e),r={..._c(e),category:n};if(n===`subagent`){let e=Sc(t);e&&(r.subAgentType=e)}else if(n===`skill`){let e=Cc(t);e&&(r.skillName=e)}return r}var Dc=new Map([[`lines_of_code.count`,`lines_of_code`],[`commit.count`,`commit`],[`pull_request.count`,`pull_request`],[`active_time.total`,`active_time`]]);function Oc(e){let{kind:t,prefix:n,scopeHint:r,serviceHint:i}=e,a=e=>e!==void 0&&e.includes(r),o=e=>{let t=lc(e,`service.name`);return t!==void 0&&t.includes(i)},s=e=>e.startsWith(n)?e.slice(n.length):e;return{kind:t,matchesMetric(e){return e.name.startsWith(n)||a(e.scope?.name)||o(e.resource)},matchesEvent(e){return e.eventName.startsWith(n)||a(e.scope?.name)||o(e.resource)},normalizeEvent(e){let n=mc(e.resource,e.attributes),r=s(e.eventName)||lc(n,`event.name`)||e.eventName,i=wc.get(r)??`other`,a=lc(n,`session.id`);if(!a)return null;let o={id:`${a}:0`,sessionId:a,agent:t,type:i,rawEventName:r,timestamp:e.timestamp,model:lc(n,`model`),promptId:lc(n,`prompt.id`),attributes:e.attributes};switch((i===`api_request`||i===`api_error`||i===`api_refusal`)&&(o.effort=lc(n,`effort`),o.speed=lc(n,`speed`),o.agentName=lc(n,`agent.name`),o.skillName=lc(n,`skill.name`)),i){case`api_request`:{o.inputTokens=uc(n,`input_tokens`),o.outputTokens=uc(n,`output_tokens`),o.cacheReadTokens=uc(n,`cache_read_tokens`),o.contextLineageId=lc(n,`query_source`),o.tokenSource=lc(n,`token_source`)===`estimated`?`estimated`:void 0,o.cacheCreationTokens=uc(n,`cache_creation_tokens`),o.durationMs=uc(n,`duration_ms`);let e=uc(n,`cost_usd`,`cost`);if(e===void 0){let e=pc(o.model,o.inputTokens,o.outputTokens);e!==void 0&&(o.costUsd=e,o.costSource=`estimated`)}else o.costUsd=e,o.costSource=`reported`;break}case`api_refusal`:o.durationMs=uc(n,`duration_ms`);break;case`api_error`:o.errorMessage=lc(n,`error`,`error.message`,`message`),o.statusCode=uc(n,`status_code`,`http.response.status_code`,`http.status_code`),o.durationMs=uc(n,`duration_ms`);break;case`tool_result`:{let e=lc(n,`tool_name`,`name`,`tool`);e&&(o.tool=Ec(e,n)),o.success=dc(n,`success`),o.durationMs=uc(n,`duration_ms`);let t=lc(n,`decision`);(t===`accept`||t===`reject`)&&(o.decision=t);break}case`tool_decision`:{let e=lc(n,`tool_name`,`name`,`tool`);e&&(o.tool=Ec(e,n));let t=lc(n,`decision`);(t===`accept`||t===`reject`)&&(o.decision=t);break}case`user_prompt`:{o.promptLength=uc(n,`prompt_length`,`prompt.length`);let e=lc(n,`prompt`);e&&(o.promptText=e);break}case`mcp_connection`:o.mcpServerName=lc(n,`server_name`,`name`),o.mcpTransport=lc(n,`transport_type`,`transport`),o.mcpStatus=lc(n,`status`),o.durationMs=uc(n,`duration_ms`);break;case`plugin_loaded`:o.pluginName=lc(n,`plugin.name`,`plugin_name`,`name`),o.pluginVersion=lc(n,`plugin.version`,`plugin_version`);break;case`hook_execution`:o.hookName=lc(n,`hook_event`,`hook_name`,`name`),o.hookSuccess=uc(n,`num_success`),o.hookBlocked=uc(n,`num_blocking`),o.hookErrored=uc(n,`num_non_blocking_error`),o.hookCancelled=uc(n,`num_cancelled`)}return o},normalizeMetric(e){let n=Dc.get(s(e.name))??`other`;return e.dataPoints.map(r=>{let i=mc(e.resource,r.attributes);return{agent:t,sessionId:lc(i,`session.id`),identity:hc(i),kind:n,value:r.value,temporality:e.temporality,timestamp:r.timestamp,attributes:r.attributes}})}}}Oc({kind:`claude-code`,prefix:`claude_code.`,scopeHint:`claude_code`,serviceHint:`claude-code`});var kc={handled:Tc,ignored:[`api_request_body`,`api_response_body`,`assistant_response`,`hook_registered`,`hook_execution_start`,`permission_mode_changed`,`auth`]};[...kc.handled,...kc.ignored],Oc({kind:`opencode`,prefix:`opencode.`,scopeHint:`opencode`,serviceHint:`opencode`});function Ac(){return Object.fromEntries(yc.map(e=>[e,0]))}function jc(){return Object.create(null)}function Mc(){return{requests:0,costUsd:0,inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0}}function Nc(e,t){for(let[n,r]of Object.entries(t)){let t=e[n]??(e[n]=Mc());t.requests+=r.requests,t.costUsd+=r.costUsd,t.inputTokens+=r.inputTokens,t.outputTokens+=r.outputTokens,t.cacheReadTokens+=r.cacheReadTokens,t.cacheCreationTokens+=r.cacheCreationTokens}}function Pc(e){let t={sessions:0,costUsd:0,inputTokens:0,outputTokens:0,apiRequests:0,apiErrors:0,accepted:0,rejected:0,byModel:jc(),byEffort:jc(),bySkill:jc(),byAgent:jc(),tools:jc(),toolCategories:Ac(),mcpServers:jc(),subAgents:jc(),skills:jc(),mcpConnections:jc(),plugins:jc(),hooks:{runs:0,blocked:0,errored:0,cancelled:0}};for(let n of e){t.sessions+=1;let{rollup:e}=n;t.costUsd+=e.costUsd,t.inputTokens+=e.inputTokens,t.outputTokens+=e.outputTokens,t.apiRequests+=e.apiRequests,t.apiErrors+=e.apiErrors,t.accepted+=e.accepted,t.rejected+=e.rejected,Nc(t.byModel,e.byModel),Nc(t.byEffort,e.byEffort),Nc(t.bySkill,e.bySkill),Nc(t.byAgent,e.byAgent);for(let n of Object.values(e.tools))t.tools[n.name]=(t.tools[n.name]??0)+n.count,n.isMcp&&n.mcpServer&&(t.mcpServers[n.mcpServer]=(t.mcpServers[n.mcpServer]??0)+n.count);for(let n of yc)t.toolCategories[n]+=e.toolCategories[n];for(let[n,r]of Object.entries(e.subAgents))t.subAgents[n]=(t.subAgents[n]??0)+r;for(let[n,r]of Object.entries(e.skills))t.skills[n]=(t.skills[n]??0)+r;for(let n of Object.values(e.mcpConnections)){let e=t.mcpConnections[n.name]??{name:n.name,transport:n.transport,connected:!1,connects:0,disconnects:0};e.connects+=n.connects,e.disconnects+=n.disconnects,e.connected=e.connected||n.connected,n.transport&&(e.transport=n.transport),t.mcpConnections[n.name]=e}for(let n of Object.values(e.plugins))t.plugins[n.name]=n;t.hooks.runs+=e.hooks.runs,t.hooks.blocked+=e.hooks.blocked,t.hooks.errored+=e.hooks.errored,t.hooks.cancelled+=e.hooks.cancelled}return t}var Fc=ss(!1),Ic=ss({x:20,y:20}),Lc=ss(`bottom-right`),Rc=ss(`bottom`),zc=ss(!1),Bc=ss(`traces`),Vc=ss(null),Hc=ss(null),Uc=ss(null);function Wc(e,t){Uc.value={traceId:e,spanId:t}}var Gc=ss(`system`);function Kc(){try{let e=localStorage.getItem(`autotel-devtools-theme`);if(e===`light`||e===`dark`||e===`system`)return e}catch{}return`system`}var qc=[`system`,`light`,`dark`];function Jc(){let e=qc[(qc.indexOf(Gc.value)+1)%qc.length];Gc.value=e;try{localStorage.setItem(`autotel-devtools-theme`,e)}catch{}}var Yc=`autotel-devtools-editor`;function Xc(){try{let e=localStorage.getItem(Yc);if(e===`vscode`||e===`cursor`||e===`webstorm`)return e}catch{}return`vscode`}var Zc=ss(Xc());function Qc(e){Zc.value=e;try{localStorage.setItem(Yc,e)}catch{}}var $c=ss(null);function el(e){$c.value=e}function tl(){$c.value=null}function nl(e){$c.value=$c.value?null:e}var rl={vertical:440,horizontal:560},il=ss({...rl});function al(e){return globalThis.window===void 0?e===`vertical`?{min:200,max:900}:{min:360,max:1200}:e===`vertical`?{min:200,max:Math.round(window.innerHeight*.92)}:{min:360,max:Math.round(window.innerWidth*.92)}}function ol(e,t){let{min:n,max:r}=al(e),i=Math.min(r,Math.max(n,Math.round(t)));il.value={...il.value,[e]:i}}function sl(e){ol(e,rl[e])}var cl=ss([]),ll=ss({connectionStatus:`disconnected`}),ul=ss([]),dl=ss([]),fl=ss(`disconnected`),pl=ss(null),ml=ss(bs),hl=ss([]),gl=ss([]),_l=ss(`pending`),vl=cs(()=>{if(_l.value===`ready`)return hl.value;let e=Cs(ml.value,Date.now());if(ws(e))return cl.value;let{start:t,end:n}=e;return cl.value.filter(e=>e.startTime>=t&&e.startTime<=n)}),yl=ss(0),bl=15e3,xl=[];function Sl(e,t,n){if(e+t+n===0)return;let r=Date.now();xl.push({t:r,traces:e,logs:t,metrics:n});let i=r-bl;(xl.length>1024||xl[0].t<i)&&(xl=xl.filter(e=>e.t>=i)),yl.value+=1}function Cl(e=5e3,t=Date.now()){let n=t-e,r=0,i=0,a=0;for(let e of xl)e.t>=n&&(r+=e.traces,i+=e.logs,a+=e.metrics);let o=e/1e3;return{traces:r/o,logs:i/o,metrics:a/o,total:(r+i+a)/o}}var wl=ss(!1),Tl=ss([]),El=ss([]),Dl=cs(()=>Tl.value.length),Ol=cs(()=>El.value.length),kl=ss(!1),Al=cs(()=>cl.value.filter(e=>e.status===`ERROR`)),jl=cs(()=>{let e=Al.value;return Fc.value?0:e.length}),Ml=ss({key:`time`,dir:`desc`}),Nl=ss(``),Pl=ss(`all`),Fl=ss(0),Il=ss(new Set);function Ll(e){let t=new Set(Il.value);t.has(e)?t.delete(e):t.add(e),Il.value=t}function Rl(){Il.value.size>0&&(Il.value=new Set)}var zl=ss(``),Bl=new Map([[`time`,`desc`],[`duration`,`desc`],[`spans`,`desc`],[`service`,`asc`],[`name`,`asc`],[`status`,`desc`]]);function Vl(e){let t=Ml.value;Ml.value=t.key===e?{key:e,dir:t.dir===`asc`?`desc`:`asc`}:{key:e,dir:Bl.get(e)??`desc`}}var Hl=new Set([`service`,`name`]);function Ul(e,t){return(t===`service`?e.service:e.rootSpan?.name)??``}function Wl(e,t){switch(t){case`duration`:return e.duration;case`spans`:return e.spans.length;case`status`:return+(e.status===`ERROR`);default:return e.startTime}}function Gl(e,t,n){return Hl.has(n)?Ul(e,n).localeCompare(Ul(t,n)):Wl(e,n)-Wl(t,n)}var Kl=cs(()=>{let{key:e,dir:t}=Ml.value,n=t===`asc`?1:-1;return[...cl.value].sort((t,r)=>{let i=Gl(t,r,e);return i===0?r.startTime-t.startTime:i*n})}),ql=cs(()=>[...dl.value].sort((e,t)=>t.timestamp-e.timestamp)),Jl=ss([]),Yl=ss(null),Xl=cs(()=>[...Jl.value].sort((e,t)=>t.lastSeen-e.lastSeen)),Zl=cs(()=>Pc(Jl.value)),Ql=cs(()=>{let e=Xl.value;if(e.length===0)return null;let t=Yl.value;return e.find(e=>e.id===t)??e[0]});function $l(e){Yl.value=e}var eu=cs(()=>vs({traces:vl.value,logs:dl.value,errors:ul.value})),tu=cs(()=>{let e=[];for(let t of vl.value){let n=sc(t.spans);for(let r of t.spans){if(!js(r))continue;let i=oc(r);cc(i,n),e.push({raw:r,normalized:i,service:t.service,traceId:t.traceId})}}return e.sort((e,t)=>t.normalized.startMs-e.normalized.startMs),e}),nu=cs(()=>tu.value.length),ru=cs(()=>vl.value.filter(e=>e.spans.length>1).length),iu=cs(()=>{if(_l.value===`ready`)return gl.value;let e=Cs(ml.value,Date.now());if(ws(e))return ul.value;let{start:t,end:n}=e;return ul.value.filter(e=>e.lastSeen>=t&&e.firstSeen<=n)}),au=cs(()=>[...iu.value].sort((e,t)=>t.lastSeen-e.lastSeen)),ou=cs(()=>[...iu.value].sort((e,t)=>t.count-e.count)),su=cs(()=>iu.value.reduce((e,t)=>e+t.count,0)),cu=cs(()=>{let e=Date.now()-36e5;return ul.value.filter(t=>t.lastSeen>e).reduce((e,t)=>e+t.count,0)}),lu=cs(()=>{let e=Vc.value;return e&&vl.value.find(t=>t.traceId===e)||null}),uu=ss(new Set);function du(e){let t=new Set(uu.value);t.has(e)?t.delete(e):t.add(e),uu.value=t}function fu(){uu.value=new Set(vl.value.map(e=>e.traceId))}function pu(){uu.value=new Set}function mu(){let e=uu.value;cl.value=cl.value.filter(t=>!e.has(t.traceId)),hl.value=hl.value.filter(t=>!e.has(t.traceId)),pu(),Vc.value&&e.has(Vc.value)&&(Vc.value=null)}var hu=cs(()=>uu.value.size);function gu(e,t){let n=[...t].sort((e,t)=>e.startTime-t.startTime),r=n.find(e=>!e.parentSpanId)??e.rootSpan??n[0],i=Math.min(...n.map(e=>e.startTime)),a=Math.max(...n.map(e=>e.endTime)),o=n.some(e=>e.status.code===`ERROR`)?`ERROR`:`OK`,s=us(r?.attributes,`service.name`);return{...e,rootSpan:r,spans:n,startTime:i,endTime:a,duration:a-i,status:o,service:s??e.service}}function _u(e,t){let n=new Map;for(let t of e.spans)n.set(t.spanId,t);for(let e of t.spans)n.has(e.spanId)||n.set(e.spanId,e);return gu(e,[...n.values()])}function vu(e,t){if(t.length===0)return e;let n=new Map;for(let e of t){let t=n.get(e.traceId);n.set(e.traceId,t?_u(t,e):e)}let r=new Set(e.map(e=>e.traceId)),i=e.map(e=>{let t=n.get(e.traceId);return t?_u(e,t):e});for(let[e,t]of n)r.has(e)||i.push(t);return i}function yu(e,t,n){let r=vu(e,t);return r.length>n?r.slice(-n):r}function bu(e,t){if(t.length===0)return e;let n=[...t,...e];return n.length>zu?n.slice(0,zu):n}function xu(e,t,n,r=n){return{ingest(i,a){i.length!==0&&(a?t.value=r(t.value,i):e.value=n(e.value,i))},flushToLive(){t.value.length!==0&&(e.value=n(e.value,t.value),t.value=[])},clearPending(){t.value=[]}}}var Su=xu(cl,Tl,vu,(e,t)=>yu(e,t,zu)),Cu=xu(dl,El,bu),wu=[Su,Cu];function Tu(e){if(kl.value){e.health&&(ll.value=e.health,fl.value=e.health.connectionStatus);return}let t=wl.value;Su.ingest(e.traces??[],t),Cu.ingest(e.logs??[],t),Sl(e.traces?.length??0,e.logs?.length??0,0),e.health&&(ll.value=e.health,fl.value=e.health.connectionStatus),e.errors&&(ul.value=e.errors),e.agents&&(Jl.value=e.agents)}function Eu(e){if(wl.value!==e&&(wl.value=e,!e))for(let e of wu)e.flushToLive()}function Du(){Eu(!wl.value)}function Ou(){for(let e of wu)e.clearPending()}function ku(e){cl.value=e.traces??[],dl.value=(e.logs??[]).slice(0,zu),ul.value=e.errors??[],Tl.value=[],El.value=[],wl.value=!1,kl.value=!0}function Au(){kl.value=!1,cl.value=[],dl.value=[],ul.value=[]}function ju(){Fc.value=!Fc.value}function Mu(e){Bc.value=e}function Nu(e,t=null){Vc.value=e,Hc.value=e?t:null}function Pu(e,t){Nu(e,t??null),Mu(`traces`)}function Fu(e,t){Ic.value={x:e,y:t}}function Iu(e){Lc.value=e}function Lu(e){Rc.value=e}function Ru(){let e=[`bottom`,`right`,`left`],t=Rc.value??`bottom`;Rc.value=e[(e.indexOf(t)+1)%e.length]}var zu=100;function Bu(){cl.value=[],hl.value=[],ul.value=[],gl.value=[],dl.value=[],Jl.value=[],Yl.value=null,Tl.value=[],El.value=[],uu.value=new Set,Vc.value=null,Hc.value=null,_l.value=`pending`,kl.value=!1}function Vu(e){if(e.length===0)return;let t=new Set(cl.value.map(e=>e.traceId)),n=e.filter(e=>!t.has(e.traceId));n.length>0?(console.log(`[Autotel Devtools] Importing ${n.length} trace(s)`),cl.value=[...cl.value,...n]):console.log(`[Autotel Devtools] No new traces to import (all duplicates)`)}var Hu=ss(`local`),Uu=`autotel-devtools-widget-state`;function Wu(){try{let e=localStorage.getItem(Uu);if(e){let t=JSON.parse(e);t.position&&(Ic.value=t.position),t.corner&&(Lc.value=t.corner),t.docked&&(Rc.value=t.docked),t.panelSize&&(il.value={vertical:Number(t.panelSize.vertical)||440,horizontal:Number(t.panelSize.horizontal)||560}),typeof t.timeZone==`string`&&(Hu.value=t.timeZone)}}catch(e){console.error(`[Autotel Devtools] Failed to load persisted state:`,e)}}function Gu(){try{let e={position:Ic.value,corner:Lc.value,docked:Rc.value,panelSize:il.value,timeZone:Hu.value};localStorage.setItem(Uu,JSON.stringify(e))}catch(e){console.error(`[Autotel Devtools] Failed to persist state:`,e)}}ls(()=>{Ic.value,Lc.value,Rc.value,Hu.value,il.value,Gu()});var Ku=[`traces`,`resources`,`service-map`,`metrics`,`logs`,`errors`,`genai`,`flow`,`security`];function qu(e,t){return e.find(e=>e===t)}function Ju(e){return qu(Ku,e)!==void 0}var Yu=[`time`,`duration`,`spans`,`service`,`name`,`status`],Xu=[`error`,`ok`],Zu={key:`time`,dir:`desc`};function Qu(e){if(!e)return;let[t,n]=e.split(`:`),r=qu(Yu,t);return r&&{key:r,dir:n===`asc`?`asc`:`desc`}}function $u(e){let t=e.startsWith(`#`)?e.slice(1):e;if(!t)return{};let n=new URLSearchParams(t),r={},i=n.get(`tab`);Ju(i)&&(r.tab=i);let a=n.get(`trace`)||void 0;a&&(r.traceId=a);let o=n.get(`span`)||void 0;a&&o&&(r.spanId=o);let s=n.get(`q`)||void 0;s&&(r.q=s);let c=qu(Xu,n.get(`status`));c&&(r.status=c);let l=n.get(`min`),u=l==null?NaN:Number(l);Number.isFinite(u)&&u>0&&(r.minDuration=u);let d=n.get(`window`);d&&(r.window=Os(d));let f=Qu(n.get(`sort`));f&&(r.sort=f);let p=n.get(`gq`)||void 0;return p&&(r.genaiQuery=p),r}function ed(e){let t=new URLSearchParams;if(e.tab&&e.tab!==`traces`&&t.set(`tab`,e.tab),e.traceId&&t.set(`trace`,e.traceId),e.traceId&&e.spanId&&t.set(`span`,e.spanId),e.q&&t.set(`q`,e.q),e.status&&e.status!==`all`&&t.set(`status`,e.status),e.minDuration&&e.minDuration>0&&t.set(`min`,String(e.minDuration)),e.window){let n=Ds(e.window);n&&t.set(`window`,n)}e.sort&&(e.sort.key!==Zu.key||e.sort.dir!==Zu.dir)&&t.set(`sort`,`${e.sort.key}:${e.sort.dir}`),e.genaiQuery&&t.set(`gq`,e.genaiQuery);let n=t.toString();return n?`#${n}`:``}function td(e,t){return e&&(e.tab!==t.tab||e.traceId!==t.traceId||e.spanId!==t.spanId)?`push`:`replace`}var nd=new Set([`$$slots`,`$$events`,`$$legacy`,`fill`,`width`,`height`]),rd=ca(`<svg><circle cx="17" cy="20" r="3" fill="#9AAAB4"></circle><path fill="#DA2F47" d="M19.235 17.059a1.003 1.003 0 0 1-1.353.412L5.529 10.883a1.004 1.004 0 0 1-.412-1.353L7.94 4.235c.259-.485.868-.67 1.353-.412l12.353 6.588c.485.259.671.868.412 1.353z"></path><path fill="#DA2F47" d="M31.177 22.293a1.004 1.004 0 0 1-1.354.412l-9.705-5.176a1.004 1.004 0 0 1-.412-1.354l1.882-3.529c.259-.485.868-.67 1.354-.412l9.705 5.176c.485.259.671.868.412 1.354z"></path><path fill="#BB1A34" d="m19.235 17.058 2.824-5.293 1.765.941L20.999 18z"></path><path fill="#9D0522" d="m28.942 22.235 2.823-5.294 3.53 1.882-2.824 5.294z"></path><path fill="#292F33" d="m8.294 7.824 1.882-3.53-.881-.47v-.001L4.882 1.471a1.003 1.003 0 0 0-1.353.411L.706 7.177a1 1 0 0 0 .412 1.353l3.529 1.882 1.766.941.47-.882zM23 25a2 2 0 0 1-2 2h-8a2 2 0 0 1 0-4h8a2 2 0 0 1 2 2"></path><path fill="#9AAAB4" d="m9.467 36 3.344-7.152c.468-1 .036-2.191-.965-2.658a1.997 1.997 0 0 0-2.658.965L5.052 36zm15.065 0h4.416l-4.137-8.846a1.997 1.997 0 0 0-2.658-.965 2 2 0 0 0-.965 2.658zM19 36v-8a2 2 0 0 0-4 0v8z"></path></svg>`);function id(e,t){let n=Z(t,`width`,3,40),r=Z(t,`height`,3,40),i=Y(t,nd);var a=rd();Eo(a,()=>({width:n(),height:r(),viewBox:`0 0 36 36`,xmlns:`http://www.w3.org/2000/svg`,...i})),H(e,a)}function ad(e){let t=e<0,n=Math.abs(e),r;if(n===0)r=`0`;else if(n<.001)r=`${(n*1e6).toFixed(0)}ns`;else if(n<1)r=`${(n*1e3).toFixed(2).replace(/\.?0+$/,``)}µs`;else if(n<1e3)r=`${n.toFixed(2).replace(/\.?0+$/,``)}ms`;else if(n<6e4)r=`${(n/1e3).toFixed(2).replace(/\.?0+$/,``)}s`;else{let e=Math.floor(n/6e4),t=Math.floor(n%6e4/1e3);r=t>0?`${e}m ${t}s`:`${e}m`}return t?`⚠ ${r}`:r}function od(e){let t=new Date(e),n=new Date().getTime()-t.getTime();if(n<6e4){let e=Math.floor(n/1e3);return e<=1?`just now`:`${e}s ago`}return n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:t.toLocaleTimeString()}function sd(e){return new Intl.NumberFormat().format(e)}function cd(e){switch(e){case`OK`:return`text-green-600`;case`ERROR`:return`text-red-600`;default:return`text-gray-500`}}function ld(e,t,n,r){let i=n/2,a=r/2;return e<i&&t<a?{corner:`top-left`,x:20,y:20}:e>=i&&t<a?{corner:`top-right`,x:n-100,y:20}:e<i&&t>=a?{corner:`bottom-left`,x:20,y:r-100}:{corner:`bottom-right`,x:n-100,y:r-100}}function ud(e,t,n){return Math.min(Math.max(e,t),n)}function dd(e){return e.replace(/[\w.+-]+@[\w-]+\.[\w.-]+/g,`«email»`).replace(/\b(sk|pk|ghp|xox[baprs])[-_][A-Za-z0-9]{8,}\b/g,`«secret»`).replace(/\b[A-Za-z0-9_-]{32,}\b/g,`«token»`)}var fd=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},pd=(e,t)=>({classGroupId:e,validator:t}),md=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),hd=`-`,gd=[],_d=`arbitrary..`,vd=e=>{let t=xd(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return bd(e);let n=e.split(hd);return yd(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?fd(i,t):t:i||gd}return n[e]||gd}}},yd=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=yd(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(hd):e.slice(t).join(hd),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},bd=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?_d+r:void 0})(),xd=e=>{let{theme:t,classGroups:n}=e;return Sd(n,t)},Sd=(e,t)=>{let n=md();for(let r in e){let i=e[r];Cd(i,n,r,t)}return n},Cd=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];wd(i,t,n,r)}},wd=(e,t,n,r)=>{if(typeof e==`string`){Td(e,t,n);return}if(typeof e==`function`){Ed(e,t,n,r);return}Dd(e,t,n,r)},Td=(e,t,n)=>{let r=e===``?t:Od(t,e);r.classGroupId=n},Ed=(e,t,n,r)=>{if(kd(e)){Cd(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(pd(n,e))},Dd=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Cd(o,Od(t,a),n,r)}},Od=(e,t)=>{let n=e,r=t.split(hd),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=md(),n.nextPart.set(t,i)),n=i}return n},kd=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ad=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},jd=`!`,Md=`:`,Nd=[],Pd=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Fd=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Md){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(jd)?(c=s.slice(0,-1),l=!0):s.startsWith(jd)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Pd(t,l,c,u)};if(t){let e=t+Md,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Pd(Nd,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Id=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Ld=e=>({cache:Ad(e.cacheSize),parseClassName:Fd(e),sortModifiers:Id(e),postfixLookupClassGroupIds:Rd(e),...vd(e)}),Rd=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},zd=/\s+/,Bd=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(zd),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+jd:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Vd=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Hd(n))&&(i&&(i+=` `),i+=r);return i},Hd=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Hd(e[r]))&&(n&&(n+=` `),n+=t);return n},Ud=(e,...t)=>{let n,r,i,a,o=o=>(n=Ld(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Bd(e,n);return i(e,a),a};return a=o,(...e)=>a(Vd(...e))},Wd=[],Gd=e=>{let t=t=>t[e]||Wd;return t.isThemeGetter=!0,t},Kd=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qd=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jd=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Yd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Zd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$d=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ef=e=>Jd.test(e),tf=e=>!!e&&!Number.isNaN(Number(e)),nf=e=>!!e&&Number.isInteger(Number(e)),rf=e=>e.endsWith(`%`)&&tf(e.slice(0,-1)),af=e=>Yd.test(e),of=()=>!0,sf=e=>Xd.test(e)&&!Zd.test(e),cf=()=>!1,lf=e=>Qd.test(e),uf=e=>$d.test(e),df=e=>!mf(e)&&!Sf(e),ff=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),pf=e=>Af(e,Pf,cf),mf=e=>Kd.test(e),hf=e=>Af(e,Ff,sf),gf=e=>Af(e,If,tf),_f=e=>Af(e,Rf,of),vf=e=>Af(e,Lf,cf),yf=e=>Af(e,Mf,cf),bf=e=>Af(e,Nf,uf),xf=e=>Af(e,zf,lf),Sf=e=>qd.test(e),Cf=e=>jf(e,Ff),wf=e=>jf(e,Lf),Tf=e=>jf(e,Mf),Ef=e=>jf(e,Pf),Df=e=>jf(e,Nf),Of=e=>jf(e,zf,!0),kf=e=>jf(e,Rf,!0),Af=(e,t,n)=>{let r=Kd.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},jf=(e,t,n=!1)=>{let r=qd.exec(e);return r?r[1]?t(r[1]):n:!1},Mf=e=>e===`position`||e===`percentage`,Nf=e=>e===`image`||e===`url`,Pf=e=>e===`length`||e===`size`||e===`bg-size`,Ff=e=>e===`length`,If=e=>e===`number`,Lf=e=>e===`family-name`,Rf=e=>e===`number`||e===`weight`,zf=e=>e===`shadow`,Bf=Ud(()=>{let e=Gd(`color`),t=Gd(`font`),n=Gd(`text`),r=Gd(`font-weight`),i=Gd(`tracking`),a=Gd(`leading`),o=Gd(`breakpoint`),s=Gd(`container`),c=Gd(`spacing`),l=Gd(`radius`),u=Gd(`shadow`),d=Gd(`inset-shadow`),f=Gd(`text-shadow`),p=Gd(`drop-shadow`),m=Gd(`blur`),h=Gd(`perspective`),g=Gd(`aspect`),_=Gd(`ease`),v=Gd(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Sf,mf],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Sf,mf,c],T=()=>[ef,`full`,`auto`,...w()],ee=()=>[nf,`none`,`subgrid`,Sf,mf],te=()=>[`auto`,{span:[`full`,nf,Sf,mf]},nf,Sf,mf],ne=()=>[nf,`auto`,Sf,mf],re=()=>[`auto`,`min`,`max`,`fr`,Sf,mf],ie=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ae=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],oe=()=>[`auto`,...w()],se=()=>[ef,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ce=()=>[ef,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],le=()=>[ef,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],E=()=>[e,Sf,mf],ue=()=>[...b(),Tf,yf,{position:[Sf,mf]}],de=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],fe=()=>[`auto`,`cover`,`contain`,Ef,pf,{size:[Sf,mf]}],pe=()=>[rf,Cf,hf],me=()=>[``,`none`,`full`,l,Sf,mf],he=()=>[``,tf,Cf,hf],ge=()=>[`solid`,`dashed`,`dotted`,`double`],_e=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ve=()=>[tf,rf,Tf,yf],ye=()=>[``,`none`,m,Sf,mf],be=()=>[`none`,tf,Sf,mf],xe=()=>[`none`,tf,Sf,mf],Se=()=>[tf,Sf,mf],Ce=()=>[ef,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[af],breakpoint:[af],color:[of],container:[af],"drop-shadow":[af],ease:[`in`,`out`,`in-out`],font:[df],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[af],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[af],shadow:[af],spacing:[`px`,tf],text:[af],"text-shadow":[af],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ef,mf,Sf,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Sf,mf]}],"container-named":[ff],columns:[{columns:[tf,mf,Sf,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[nf,`auto`,Sf,mf]}],basis:[{basis:[ef,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[tf,ef,`auto`,`initial`,`none`,mf]}],grow:[{grow:[``,tf,Sf,mf]}],shrink:[{shrink:[``,tf,Sf,mf]}],order:[{order:[nf,`first`,`last`,`none`,Sf,mf]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ie(),`normal`]}],"justify-items":[{"justify-items":[...ae(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ae()]}],"align-content":[{content:[`normal`,...ie()]}],"align-items":[{items:[...ae(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ae(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...ae(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ae()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:oe()}],mx:[{mx:oe()}],my:[{my:oe()}],ms:[{ms:oe()}],me:[{me:oe()}],mbs:[{mbs:oe()}],mbe:[{mbe:oe()}],mt:[{mt:oe()}],mr:[{mr:oe()}],mb:[{mb:oe()}],ml:[{ml:oe()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:se()}],"inline-size":[{inline:[`auto`,...ce()]}],"min-inline-size":[{"min-inline":[`auto`,...ce()]}],"max-inline-size":[{"max-inline":[`none`,...ce()]}],"block-size":[{block:[`auto`,...le()]}],"min-block-size":[{"min-block":[`auto`,...le()]}],"max-block-size":[{"max-block":[`none`,...le()]}],w:[{w:[s,`screen`,...se()]}],"min-w":[{"min-w":[s,`screen`,`none`,...se()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...se()]}],h:[{h:[`screen`,`lh`,...se()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...se()]}],"max-h":[{"max-h":[`screen`,`lh`,...se()]}],"font-size":[{text:[`base`,n,Cf,hf]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,kf,_f]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,rf,mf]}],"font-family":[{font:[wf,vf,t]}],"font-features":[{"font-features":[mf]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Sf,mf]}],"line-clamp":[{"line-clamp":[tf,`none`,Sf,gf]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Sf,mf]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Sf,mf]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ge(),`wavy`]}],"text-decoration-thickness":[{decoration:[tf,`from-font`,`auto`,Sf,hf]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[tf,`auto`,Sf,mf]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[nf,Sf,mf]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Sf,mf]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Sf,mf]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:de()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},nf,Sf,mf],radial:[``,Sf,mf],conic:[nf,Sf,mf]},Df,bf]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:me()}],"rounded-s":[{"rounded-s":me()}],"rounded-e":[{"rounded-e":me()}],"rounded-t":[{"rounded-t":me()}],"rounded-r":[{"rounded-r":me()}],"rounded-b":[{"rounded-b":me()}],"rounded-l":[{"rounded-l":me()}],"rounded-ss":[{"rounded-ss":me()}],"rounded-se":[{"rounded-se":me()}],"rounded-ee":[{"rounded-ee":me()}],"rounded-es":[{"rounded-es":me()}],"rounded-tl":[{"rounded-tl":me()}],"rounded-tr":[{"rounded-tr":me()}],"rounded-br":[{"rounded-br":me()}],"rounded-bl":[{"rounded-bl":me()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":he()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ge(),`hidden`,`none`]}],"divide-style":[{divide:[...ge(),`hidden`,`none`]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-bs":[{"border-bs":E()}],"border-color-be":[{"border-be":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...ge(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[tf,Sf,mf]}],"outline-w":[{outline:[``,tf,Cf,hf]}],"outline-color":[{outline:E()}],shadow:[{shadow:[``,`none`,u,Of,xf]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":[`none`,d,Of,xf]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:he()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[tf,hf]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":[`none`,f,Of,xf]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[tf,Sf,mf]}],"mix-blend":[{"mix-blend":[..._e(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":_e()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[tf]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[Sf,mf]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[tf]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ue()}],"mask-repeat":[{mask:de()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Sf,mf]}],filter:[{filter:[``,`none`,Sf,mf]}],blur:[{blur:ye()}],brightness:[{brightness:[tf,Sf,mf]}],contrast:[{contrast:[tf,Sf,mf]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Of,xf]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:[``,tf,Sf,mf]}],"hue-rotate":[{"hue-rotate":[tf,Sf,mf]}],invert:[{invert:[``,tf,Sf,mf]}],saturate:[{saturate:[tf,Sf,mf]}],sepia:[{sepia:[``,tf,Sf,mf]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Sf,mf]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[tf,Sf,mf]}],"backdrop-contrast":[{"backdrop-contrast":[tf,Sf,mf]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,tf,Sf,mf]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[tf,Sf,mf]}],"backdrop-invert":[{"backdrop-invert":[``,tf,Sf,mf]}],"backdrop-opacity":[{"backdrop-opacity":[tf,Sf,mf]}],"backdrop-saturate":[{"backdrop-saturate":[tf,Sf,mf]}],"backdrop-sepia":[{"backdrop-sepia":[``,tf,Sf,mf]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Sf,mf]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[tf,`initial`,Sf,mf]}],ease:[{ease:[`linear`,`initial`,_,Sf,mf]}],delay:[{delay:[tf,Sf,mf]}],animate:[{animate:[`none`,v,Sf,mf]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Sf,mf]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:be()}],"rotate-x":[{"rotate-x":be()}],"rotate-y":[{"rotate-y":be()}],"rotate-z":[{"rotate-z":be()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":[`scale-3d`],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[Sf,mf,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Ce()}],"translate-x":[{"translate-x":Ce()}],"translate-y":[{"translate-y":Ce()}],"translate-z":[{"translate-z":Ce()}],"translate-none":[`translate-none`],zoom:[{zoom:[nf,Sf,mf]}],accent:[{accent:E()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Sf,mf]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":E()}],"scrollbar-track-color":[{"scrollbar-track":E()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Sf,mf]}],fill:[{fill:[`none`,...E()]}],"stroke-w":[{stroke:[tf,Cf,hf,gf]}],stroke:[{stroke:[`none`,...E()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),$=(...e)=>Bf($a(e)),Vf=V(`<button title="Autolemetry Observability"><!></button>`);function Hf(e,t){it(t,!0);let n=N(void 0),r=!1,i={x:0,y:0},a=M(()=>Ic.value),o=M(()=>jl.value),s=M(()=>Fc.value),c=M(()=>z(o)>0),l=M(()=>z(c)?`#DA2F47`:`#22c55e`);function u(e){e.button===0&&(r=!0,i={x:e.clientX-z(a).x,y:e.clientY-z(a).y},z(n)?.setPointerCapture(e.pointerId),e.preventDefault())}function d(e){r&&Fu(ud(e.clientX-i.x,0,window.innerWidth-48),ud(e.clientY-i.y,0,window.innerHeight-48))}function f(e){if(!r)return;r=!1,z(n)?.releasePointerCapture(e.pointerId);let t=ld(z(a).x,z(a).y,window.innerWidth,window.innerHeight);Fu(t.x,t.y),Iu(t.corner)}function p(){r||ju()}var m=la(),h=I(m),g=e=>{var t=Vf(),r=F(t);{let e=M(()=>z(c)?`#fff`:void 0);id(r,{get fill(){return z(e)},width:28,height:28})}D(t),Vo(t,e=>P(n,e),()=>z(n)),R(e=>{q(t,1,e),oo(t,`width: 48px; height: 48px; left: ${z(a).x??``}px; top: ${z(a).y??``}px; transform: translate3d(0, 0, 0); border-color: ${z(l)??``};`)},[()=>K($(`fixed z-[1000] rounded-full border-2 shadow-md`,`flex items-center justify-center cursor-pointer touch-none`,`transition-all duration-150 select-none`,`hover:shadow-lg`,`bg-surface hover:bg-subtle`))]),B(`click`,t,p),B(`pointerdown`,t,u),B(`pointermove`,t,d),B(`pointerup`,t,f),H(e,t)};W(h,e=>{z(s)||e(g)}),H(e,m),at()}ea([`click`,`pointerdown`,`pointermove`,`pointerup`]);var Uf={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`},Wf=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Gf=Symbol(`lucide-context`),Kf=()=>et(Gf),qf=new Set([`$$slots`,`$$events`,`$$legacy`,`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`,`children`]),Jf=ca(`<svg><!><!></svg>`);function Yf(e,t){it(t,!0);let n=Kf()??{},r=Z(t,`color`,19,()=>n.color??`currentColor`),i=Z(t,`size`,19,()=>n.size??24),a=Z(t,`strokeWidth`,19,()=>n.strokeWidth??2),o=Z(t,`absoluteStrokeWidth`,19,()=>n.absoluteStrokeWidth??!1),s=Z(t,`iconNode`,19,()=>[]),c=Y(t,qf),l=M(()=>o()?Number(a())*24/Number(i()):a());var u=Jf();Eo(u,e=>({...Uf,...e,...c,width:i(),height:i(),stroke:r(),"stroke-width":z(l),class:[`lucide-icon lucide`,n.class,t.name&&`lucide-${t.name}`,t.class]}),[()=>!t.children&&!Wf(c)&&{"aria-hidden":`true`}]);var d=F(u);G(d,17,s,Oa,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=la();Ya(I(a),r,!0,(e,t)=>{Eo(e,()=>({...i()}))}),H(e,a)}),La(L(d),()=>t.children??p),D(u),H(e,u),at()}var Xf=new Set([`$$slots`,`$$events`,`$$legacy`]);function Zf(e,t){let n=Y(t,Xf),r=[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`}]];Yf(e,X({name:`activity`},()=>n,{get iconNode(){return r}}))}var Qf=new Set([`$$slots`,`$$events`,`$$legacy`]);function $f(e,t){let n=Y(t,Qf),r=[[`path`,{d:`M12 5v14`}],[`path`,{d:`m19 12-7 7-7-7`}]];Yf(e,X({name:`arrow-down`},()=>n,{get iconNode(){return r}}))}var ep=new Set([`$$slots`,`$$events`,`$$legacy`]);function tp(e,t){let n=Y(t,ep),r=[[`path`,{d:`m12 19-7-7 7-7`}],[`path`,{d:`M19 12H5`}]];Yf(e,X({name:`arrow-left`},()=>n,{get iconNode(){return r}}))}var np=new Set([`$$slots`,`$$events`,`$$legacy`]);function rp(e,t){let n=Y(t,np),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`m12 5 7 7-7 7`}]];Yf(e,X({name:`arrow-right`},()=>n,{get iconNode(){return r}}))}var ip=new Set([`$$slots`,`$$events`,`$$legacy`]);function ap(e,t){let n=Y(t,ip),r=[[`path`,{d:`m5 12 7-7 7 7`}],[`path`,{d:`M12 19V5`}]];Yf(e,X({name:`arrow-up`},()=>n,{get iconNode(){return r}}))}var op=new Set([`$$slots`,`$$events`,`$$legacy`]);function sp(e,t){let n=Y(t,op),r=[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`}]];Yf(e,X({name:`blocks`},()=>n,{get iconNode(){return r}}))}var cp=new Set([`$$slots`,`$$events`,`$$legacy`]);function lp(e,t){let n=Y(t,cp),r=[[`path`,{d:`M12 8V4H8`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`}],[`path`,{d:`M2 14h2`}],[`path`,{d:`M20 14h2`}],[`path`,{d:`M15 13v2`}],[`path`,{d:`M9 13v2`}]];Yf(e,X({name:`bot`},()=>n,{get iconNode(){return r}}))}var up=new Set([`$$slots`,`$$events`,`$$legacy`]);function dp(e,t){let n=Y(t,up),r=[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`}],[`path`,{d:`m7 16.5-4.74-2.85`}],[`path`,{d:`m7 16.5 5-3`}],[`path`,{d:`M7 16.5v5.17`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`}],[`path`,{d:`m17 16.5-5-3`}],[`path`,{d:`m17 16.5 4.74-2.85`}],[`path`,{d:`M17 16.5v5.17`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`}],[`path`,{d:`M12 8 7.26 5.15`}],[`path`,{d:`m12 8 4.74-2.85`}],[`path`,{d:`M12 13.5V8`}]];Yf(e,X({name:`boxes`},()=>n,{get iconNode(){return r}}))}var fp=new Set([`$$slots`,`$$events`,`$$legacy`]);function pp(e,t){let n=Y(t,fp),r=[[`path`,{d:`M12 18V5`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`}]];Yf(e,X({name:`brain`},()=>n,{get iconNode(){return r}}))}var mp=new Set([`$$slots`,`$$events`,`$$legacy`]);function hp(e,t){let n=Y(t,mp),r=[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`}],[`circle`,{cx:`12`,cy:`13`,r:`3`}]];Yf(e,X({name:`camera`},()=>n,{get iconNode(){return r}}))}var gp=new Set([`$$slots`,`$$events`,`$$legacy`]);function _p(e,t){let n=Y(t,gp),r=[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`}],[`path`,{d:`M18 17V9`}],[`path`,{d:`M13 17V5`}],[`path`,{d:`M8 17v-3`}]];Yf(e,X({name:`chart-column`},()=>n,{get iconNode(){return r}}))}var vp=new Set([`$$slots`,`$$events`,`$$legacy`]);function yp(e,t){let n=Y(t,vp),r=[[`path`,{d:`M5 21v-6`}],[`path`,{d:`M12 21V9`}],[`path`,{d:`M19 21V3`}]];Yf(e,X({name:`chart-no-axes-column-increasing`},()=>n,{get iconNode(){return r}}))}var bp=new Set([`$$slots`,`$$events`,`$$legacy`]);function xp(e,t){let n=Y(t,bp),r=[[`path`,{d:`M20 6 9 17l-5-5`}]];Yf(e,X({name:`check`},()=>n,{get iconNode(){return r}}))}var Sp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Cp(e,t){let n=Y(t,Sp),r=[[`path`,{d:`m6 9 6 6 6-6`}]];Yf(e,X({name:`chevron-down`},()=>n,{get iconNode(){return r}}))}var wp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Tp(e,t){let n=Y(t,wp),r=[[`path`,{d:`m15 18-6-6 6-6`}]];Yf(e,X({name:`chevron-left`},()=>n,{get iconNode(){return r}}))}var Ep=new Set([`$$slots`,`$$events`,`$$legacy`]);function Dp(e,t){let n=Y(t,Ep),r=[[`path`,{d:`m9 18 6-6-6-6`}]];Yf(e,X({name:`chevron-right`},()=>n,{get iconNode(){return r}}))}var Op=new Set([`$$slots`,`$$events`,`$$legacy`]);function kp(e,t){let n=Y(t,Op),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`}]];Yf(e,X({name:`circle-alert`},()=>n,{get iconNode(){return r}}))}var Ap=new Set([`$$slots`,`$$events`,`$$legacy`]);function jp(e,t){let n=Y(t,Ap),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}],[`path`,{d:`M12 17h.01`}]];Yf(e,X({name:`circle-question-mark`},()=>n,{get iconNode(){return r}}))}var Mp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Np(e,t){let n=Y(t,Mp),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 6v6l4 2`}]];Yf(e,X({name:`clock`},()=>n,{get iconNode(){return r}}))}var Pp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Fp(e,t){let n=Y(t,Pp),r=[[`path`,{d:`m18 16 4-4-4-4`}],[`path`,{d:`m6 8-4 4 4 4`}],[`path`,{d:`m14.5 4-5 16`}]];Yf(e,X({name:`code-xml`},()=>n,{get iconNode(){return r}}))}var Ip=new Set([`$$slots`,`$$events`,`$$legacy`]);function Lp(e,t){let n=Y(t,Ip),r=[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`}],[`path`,{d:`M15 6h1v4`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`}],[`circle`,{cx:`16`,cy:`8`,r:`6`}]];Yf(e,X({name:`coins`},()=>n,{get iconNode(){return r}}))}var Rp=new Set([`$$slots`,`$$events`,`$$legacy`]);function zp(e,t){let n=Y(t,Rp),r=[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]];Yf(e,X({name:`copy`},()=>n,{get iconNode(){return r}}))}var Bp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Vp(e,t){let n=Y(t,Bp),r=[[`path`,{d:`M12 20v2`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M17 20v2`}],[`path`,{d:`M17 2v2`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M2 17h2`}],[`path`,{d:`M2 7h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`M20 17h2`}],[`path`,{d:`M20 7h2`}],[`path`,{d:`M7 20v2`}],[`path`,{d:`M7 2v2`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`}]];Yf(e,X({name:`cpu`},()=>n,{get iconNode(){return r}}))}var Hp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Up(e,t){let n=Y(t,Hp),r=[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`}]];Yf(e,X({name:`database`},()=>n,{get iconNode(){return r}}))}var Wp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Gp(e,t){let n=Y(t,Wp),r=[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`}]];Yf(e,X({name:`dollar-sign`},()=>n,{get iconNode(){return r}}))}var Kp=new Set([`$$slots`,`$$events`,`$$legacy`]);function qp(e,t){let n=Y(t,Kp),r=[[`path`,{d:`M12 15V3`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}],[`path`,{d:`m7 10 5 5 5-5`}]];Yf(e,X({name:`download`},()=>n,{get iconNode(){return r}}))}var Jp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Yp(e,t){let n=Y(t,Jp),r=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`M10 14 21 3`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}]];Yf(e,X({name:`external-link`},()=>n,{get iconNode(){return r}}))}var Xp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Zp(e,t){let n=Y(t,Xp),r=[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}],[`path`,{d:`m2 2 20 20`}]];Yf(e,X({name:`eye-off`},()=>n,{get iconNode(){return r}}))}var Qp=new Set([`$$slots`,`$$events`,`$$legacy`]);function $p(e,t){let n=Y(t,Qp),r=[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];Yf(e,X({name:`eye`},()=>n,{get iconNode(){return r}}))}var em=new Set([`$$slots`,`$$events`,`$$legacy`]);function tm(e,t){let n=Y(t,em),r=[[`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`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]];Yf(e,X({name:`file-exclamation-point`},()=>n,{get iconNode(){return r}}))}var nm=new Set([`$$slots`,`$$events`,`$$legacy`]);function rm(e,t){let n=Y(t,nm),r=[[`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`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 9H8`}],[`path`,{d:`M16 13H8`}],[`path`,{d:`M16 17H8`}]];Yf(e,X({name:`file-text`},()=>n,{get iconNode(){return r}}))}var im=new Set([`$$slots`,`$$events`,`$$legacy`]);function am(e,t){let n=Y(t,im),r=[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`}]];Yf(e,X({name:`flag`},()=>n,{get iconNode(){return r}}))}var om=new Set([`$$slots`,`$$events`,`$$legacy`]);function sm(e,t){let n=Y(t,om),r=[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`}]];Yf(e,X({name:`flame`},()=>n,{get iconNode(){return r}}))}var cm=new Set([`$$slots`,`$$events`,`$$legacy`]);function lm(e,t){let n=Y(t,cm),r=[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`}]];Yf(e,X({name:`funnel`},()=>n,{get iconNode(){return r}}))}var um=new Set([`$$slots`,`$$events`,`$$legacy`]);function dm(e,t){let n=Y(t,um),r=[[`path`,{d:`m12 14 4-4`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`}]];Yf(e,X({name:`gauge`},()=>n,{get iconNode(){return r}}))}var fm=new Set([`$$slots`,`$$events`,`$$legacy`]);function pm(e,t){let n=Y(t,fm),r=[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}]];Yf(e,X({name:`git-branch`},()=>n,{get iconNode(){return r}}))}var mm=new Set([`$$slots`,`$$events`,`$$legacy`]);function hm(e,t){let n=Y(t,mm),r=[[`circle`,{cx:`18`,cy:`18`,r:`3`}],[`circle`,{cx:`6`,cy:`6`,r:`3`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`}]];Yf(e,X({name:`git-compare`},()=>n,{get iconNode(){return r}}))}var gm=new Set([`$$slots`,`$$events`,`$$legacy`]);function _m(e,t){let n=Y(t,gm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 9h18`}],[`path`,{d:`M3 15h18`}],[`path`,{d:`M9 3v18`}],[`path`,{d:`M15 3v18`}]];Yf(e,X({name:`grid-3x3`},()=>n,{get iconNode(){return r}}))}var vm=new Set([`$$slots`,`$$events`,`$$legacy`]);function ym(e,t){let n=Y(t,vm),r=[[`circle`,{cx:`12`,cy:`9`,r:`1`}],[`circle`,{cx:`19`,cy:`9`,r:`1`}],[`circle`,{cx:`5`,cy:`9`,r:`1`}],[`circle`,{cx:`12`,cy:`15`,r:`1`}],[`circle`,{cx:`19`,cy:`15`,r:`1`}],[`circle`,{cx:`5`,cy:`15`,r:`1`}]];Yf(e,X({name:`grip-horizontal`},()=>n,{get iconNode(){return r}}))}var bm=new Set([`$$slots`,`$$events`,`$$legacy`]);function xm(e,t){let n=Y(t,bm),r=[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`}]];Yf(e,X({name:`hash`},()=>n,{get iconNode(){return r}}))}var Sm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Cm(e,t){let n=Y(t,Sm),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 16v-4`}],[`path`,{d:`M12 8h.01`}]];Yf(e,X({name:`info`},()=>n,{get iconNode(){return r}}))}var wm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Tm(e,t){let n=Y(t,wm),r=[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`}]];Yf(e,X({name:`layers`},()=>n,{get iconNode(){return r}}))}var Em=new Set([`$$slots`,`$$events`,`$$legacy`]);function Dm(e,t){let n=Y(t,Em),r=[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`}],[`path`,{d:`M14 4h7`}],[`path`,{d:`M14 9h7`}],[`path`,{d:`M14 15h7`}],[`path`,{d:`M14 20h7`}]];Yf(e,X({name:`layout-list`},()=>n,{get iconNode(){return r}}))}var Om=new Set([`$$slots`,`$$events`,`$$legacy`]);function km(e,t){let n=Y(t,Om),r=[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`}]];Yf(e,X({name:`link-2`},()=>n,{get iconNode(){return r}}))}var Am=new Set([`$$slots`,`$$events`,`$$legacy`]);function jm(e,t){let n=Y(t,Am),r=[[`path`,{d:`M8 5h13`}],[`path`,{d:`M13 12h8`}],[`path`,{d:`M13 19h8`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`}]];Yf(e,X({name:`list-tree`},()=>n,{get iconNode(){return r}}))}var Mm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Nm(e,t){let n=Y(t,Mm),r=[[`path`,{d:`M3 5h.01`}],[`path`,{d:`M3 12h.01`}],[`path`,{d:`M3 19h.01`}],[`path`,{d:`M8 5h13`}],[`path`,{d:`M8 12h13`}],[`path`,{d:`M8 19h13`}]];Yf(e,X({name:`list`},()=>n,{get iconNode(){return r}}))}var Pm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Fm(e,t){let n=Y(t,Pm),r=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`m21 3-7 7`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M9 21H3v-6`}]];Yf(e,X({name:`maximize-2`},()=>n,{get iconNode(){return r}}))}var Im=new Set([`$$slots`,`$$events`,`$$legacy`]);function Lm(e,t){let n=Y(t,Im),r=[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}]];Yf(e,X({name:`message-square`},()=>n,{get iconNode(){return r}}))}var Rm=new Set([`$$slots`,`$$events`,`$$legacy`]);function zm(e,t){let n=Y(t,Rm),r=[[`path`,{d:`m14 10 7-7`}],[`path`,{d:`M20 10h-6V4`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M4 14h6v6`}]];Yf(e,X({name:`minimize-2`},()=>n,{get iconNode(){return r}}))}var Bm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Vm(e,t){let n=Y(t,Bm),r=[[`path`,{d:`M5 12h14`}]];Yf(e,X({name:`minus`},()=>n,{get iconNode(){return r}}))}var Hm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Um(e,t){let n=Y(t,Hm),r=[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`}]];Yf(e,X({name:`monitor`},()=>n,{get iconNode(){return r}}))}var Wm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Gm(e,t){let n=Y(t,Wm),r=[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`}]];Yf(e,X({name:`moon`},()=>n,{get iconNode(){return r}}))}var Km=new Set([`$$slots`,`$$events`,`$$legacy`]);function qm(e,t){let n=Y(t,Km),r=[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`}],[`path`,{d:`M12 12V8`}]];Yf(e,X({name:`network`},()=>n,{get iconNode(){return r}}))}var Jm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ym(e,t){let n=Y(t,Jm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 15h18`}]];Yf(e,X({name:`panel-bottom`},()=>n,{get iconNode(){return r}}))}var Xm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Zm(e,t){let n=Y(t,Xm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M9 3v18`}]];Yf(e,X({name:`panel-left`},()=>n,{get iconNode(){return r}}))}var Qm=new Set([`$$slots`,`$$events`,`$$legacy`]);function $m(e,t){let n=Y(t,Qm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M15 3v18`}]];Yf(e,X({name:`panel-right`},()=>n,{get iconNode(){return r}}))}var eh=new Set([`$$slots`,`$$events`,`$$legacy`]);function th(e,t){let n=Y(t,eh),r=[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`}]];Yf(e,X({name:`pause`},()=>n,{get iconNode(){return r}}))}var nh=new Set([`$$slots`,`$$events`,`$$legacy`]);function rh(e,t){let n=Y(t,nh),r=[[`path`,{d:`M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4`}],[`rect`,{width:`10`,height:`7`,x:`12`,y:`13`,rx:`2`}]];Yf(e,X({name:`picture-in-picture-2`},()=>n,{get iconNode(){return r}}))}var ih=new Set([`$$slots`,`$$events`,`$$legacy`]);function ah(e,t){let n=Y(t,ih),r=[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`}]];Yf(e,X({name:`play`},()=>n,{get iconNode(){return r}}))}var oh=new Set([`$$slots`,`$$events`,`$$legacy`]);function sh(e,t){let n=Y(t,oh),r=[[`path`,{d:`M12 22v-5`}],[`path`,{d:`M15 8V2`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`}],[`path`,{d:`M9 8V2`}]];Yf(e,X({name:`plug`},()=>n,{get iconNode(){return r}}))}var ch=new Set([`$$slots`,`$$events`,`$$legacy`]);function lh(e,t){let n=Y(t,ch),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`M12 5v14`}]];Yf(e,X({name:`plus`},()=>n,{get iconNode(){return r}}))}var uh=new Set([`$$slots`,`$$events`,`$$legacy`]);function dh(e,t){let n=Y(t,uh),r=[[`path`,{d:`M19.07 4.93A10 10 0 0 0 6.99 3.34`}],[`path`,{d:`M4 6h.01`}],[`path`,{d:`M2.29 9.62A10 10 0 1 0 21.31 8.35`}],[`path`,{d:`M16.24 7.76A6 6 0 1 0 8.23 16.67`}],[`path`,{d:`M12 18h.01`}],[`path`,{d:`M17.99 11.66A6 6 0 0 1 15.77 16.67`}],[`circle`,{cx:`12`,cy:`12`,r:`2`}],[`path`,{d:`m13.41 10.59 5.66-5.66`}]];Yf(e,X({name:`radar`},()=>n,{get iconNode(){return r}}))}var fh=new Set([`$$slots`,`$$events`,`$$legacy`]);function ph(e,t){let n=Y(t,fh),r=[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}],[`path`,{d:`M8 16H3v5`}]];Yf(e,X({name:`refresh-cw`},()=>n,{get iconNode(){return r}}))}var mh=new Set([`$$slots`,`$$events`,`$$legacy`]);function hh(e,t){let n=Y(t,mh),r=[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]];Yf(e,X({name:`rotate-ccw`},()=>n,{get iconNode(){return r}}))}var gh=new Set([`$$slots`,`$$events`,`$$legacy`]);function _h(e,t){let n=Y(t,gh),r=[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}],[`path`,{d:`m16 16-1.9-1.9`}]];Yf(e,X({name:`scan-search`},()=>n,{get iconNode(){return r}}))}var vh=new Set([`$$slots`,`$$events`,`$$legacy`]);function yh(e,t){let n=Y(t,vh),r=[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}]];Yf(e,X({name:`scan`},()=>n,{get iconNode(){return r}}))}var bh=new Set([`$$slots`,`$$events`,`$$legacy`]);function xh(e,t){let n=Y(t,bh),r=[[`circle`,{cx:`6`,cy:`6`,r:`3`}],[`path`,{d:`M8.12 8.12 12 12`}],[`path`,{d:`M20 4 8.12 15.88`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}],[`path`,{d:`M14.8 14.8 20 20`}]];Yf(e,X({name:`scissors`},()=>n,{get iconNode(){return r}}))}var Sh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ch(e,t){let n=Y(t,Sh),r=[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]];Yf(e,X({name:`search`},()=>n,{get iconNode(){return r}}))}var wh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Th(e,t){let n=Y(t,wh),r=[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`}]];Yf(e,X({name:`server`},()=>n,{get iconNode(){return r}}))}var Eh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Dh(e,t){let n=Y(t,Eh),r=[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];Yf(e,X({name:`settings`},()=>n,{get iconNode(){return r}}))}var Oh=new Set([`$$slots`,`$$events`,`$$legacy`]);function kh(e,t){let n=Y(t,Oh),r=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}],[`path`,{d:`M12 8v4`}],[`path`,{d:`M12 16h.01`}]];Yf(e,X({name:`shield-alert`},()=>n,{get iconNode(){return r}}))}var Ah=new Set([`$$slots`,`$$events`,`$$legacy`]);function jh(e,t){let n=Y(t,Ah),r=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}]];Yf(e,X({name:`shield`},()=>n,{get iconNode(){return r}}))}var Mh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Nh(e,t){let n=Y(t,Mh),r=[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`}],[`path`,{d:`M20 2v4`}],[`path`,{d:`M22 4h-4`}],[`circle`,{cx:`4`,cy:`20`,r:`2`}]];Yf(e,X({name:`sparkles`},()=>n,{get iconNode(){return r}}))}var Ph=new Set([`$$slots`,`$$events`,`$$legacy`]);function Fh(e,t){let n=Y(t,Ph),r=[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M12 20v2`}],[`path`,{d:`m4.93 4.93 1.41 1.41`}],[`path`,{d:`m17.66 17.66 1.41 1.41`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`m6.34 17.66-1.41 1.41`}],[`path`,{d:`m19.07 4.93-1.41 1.41`}]];Yf(e,X({name:`sun`},()=>n,{get iconNode(){return r}}))}var Ih=new Set([`$$slots`,`$$events`,`$$legacy`]);function Lh(e,t){let n=Y(t,Ih),r=[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`}]];Yf(e,X({name:`tag`},()=>n,{get iconNode(){return r}}))}var Rh=new Set([`$$slots`,`$$events`,`$$legacy`]);function zh(e,t){let n=Y(t,Rh),r=[[`path`,{d:`M12 19h8`}],[`path`,{d:`m4 17 6-6-6-6`}]];Yf(e,X({name:`terminal`},()=>n,{get iconNode(){return r}}))}var Bh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Vh(e,t){let n=Y(t,Bh),r=[[`path`,{d:`M10 11v6`}],[`path`,{d:`M14 11v6`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}],[`path`,{d:`M3 6h18`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}]];Yf(e,X({name:`trash-2`},()=>n,{get iconNode(){return r}}))}var Hh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Uh(e,t){let n=Y(t,Hh),r=[[`path`,{d:`M16 7h6v6`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`}]];Yf(e,X({name:`trending-up`},()=>n,{get iconNode(){return r}}))}var Wh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Gh(e,t){let n=Y(t,Wh),r=[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]];Yf(e,X({name:`triangle-alert`},()=>n,{get iconNode(){return r}}))}var Kh=new Set([`$$slots`,`$$events`,`$$legacy`]);function qh(e,t){let n=Y(t,Kh),r=[[`path`,{d:`M12 3v12`}],[`path`,{d:`m17 8-5-5-5 5`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}]];Yf(e,X({name:`upload`},()=>n,{get iconNode(){return r}}))}var Jh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Yh(e,t){let n=Y(t,Jh),r=[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`}],[`circle`,{cx:`12`,cy:`7`,r:`4`}]];Yf(e,X({name:`user`},()=>n,{get iconNode(){return r}}))}var Xh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Zh(e,t){let n=Y(t,Xh),r=[[`path`,{d:`M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2`}],[`path`,{d:`m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06`}],[`path`,{d:`m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8`}]];Yf(e,X({name:`webhook`},()=>n,{get iconNode(){return r}}))}var Qh=new Set([`$$slots`,`$$events`,`$$legacy`]);function $h(e,t){let n=Y(t,Qh),r=[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`}]];Yf(e,X({name:`workflow`},()=>n,{get iconNode(){return r}}))}var eg=new Set([`$$slots`,`$$events`,`$$legacy`]);function tg(e,t){let n=Y(t,eg),r=[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`}]];Yf(e,X({name:`wrench`},()=>n,{get iconNode(){return r}}))}var ng=new Set([`$$slots`,`$$events`,`$$legacy`]);function rg(e,t){let n=Y(t,ng),r=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]];Yf(e,X({name:`x`},()=>n,{get iconNode(){return r}}))}var ig=new Set([`$$slots`,`$$events`,`$$legacy`]);function ag(e,t){let n=Y(t,ig),r=[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`}]];Yf(e,X({name:`zap`},()=>n,{get iconNode(){return r}}))}function og(e){let t=e-1;return t*t*t+1}function sg(){return globalThis.window===void 0?null:window.documentPictureInPicture??null}function cg(){return sg()!==null}var lg=null,ug=null;async function dg(e,t,{width:n=720,height:r=560}={}){let i=sg();if(!i||lg)return!1;let a=await i.requestWindow({width:n,height:r});lg=a,a.document.title=e.ownerDocument.title||`autotel devtools`;let o=a.document.createElement(`style`);return o.textContent=`html,body{margin:0;padding:0;height:100%;width:100%;overflow:hidden;background:transparent}`,a.document.head.appendChild(o),ug=e.ownerDocument.createComment(`autotel-pip-placeholder`),e.replaceWith(ug),a.document.body.appendChild(e),a.addEventListener(`pagehide`,()=>pg(t),{once:!0}),!0}function fg(e){if(!lg)return;let t=lg;pg(e);try{t.close()}catch{}}function pg(e){let t=lg;if(!t)return;lg=null;let n=t.document.body.firstElementChild;n&&(ug?.isConnected?ug.replaceWith(n):document.body.appendChild(n)),ug=null,e?.()}var mg=[{fill:`#ede9fe`,stroke:`#8b5cf6`},{fill:`#ccfbf1`,stroke:`#14b8a6`},{fill:`#dbeafe`,stroke:`#3b82f6`},{fill:`#fef9c3`,stroke:`#ca8a04`},{fill:`#fce7f3`,stroke:`#db2777`},{fill:`#dcfce7`,stroke:`#16a34a`},{fill:`#ffedd5`,stroke:`#ea580c`},{fill:`#e0e7ff`,stroke:`#6366f1`}];function hg(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return mg[t%mg.length]}var gg=[{keys:[`1-6`],description:`Switch between tabs (Traces through Errors)`},{keys:[`?`],description:`Show/hide this shortcuts help`},{keys:[`Esc`],description:`Close shortcuts help / go back from trace detail`},{keys:[`/`],description:`Focus search filter`}],_g=[{keys:[`/`],description:`Focus search filter`},{keys:[`Esc`],description:`Clear selection / clear search`},{keys:[`CmdOrCtrl`,`A`],description:`Select all traces`},{keys:[`?`],description:`Show/hide keyboard shortcuts`}],vg=[{keys:[`Esc`],description:`Go back to trace list / close span detail`},{keys:[`w`],description:`Switch to waterfall view`},{keys:[`f`],description:`Switch to flame graph view`},{keys:[`l`],description:`Switch to list view`},{keys:[`↑`,`↓`,`Enter`],description:`Navigate spans / select in waterfall`},{keys:[`e`,`Shift+E`],description:`Next / previous error span`},{keys:[`/`],description:`Search spans in this trace`},{keys:[`?`],description:`Show/hide keyboard shortcuts`}];function yg(){let e=document.activeElement;if(!e)return!1;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||!!e.isContentEditable}function bg(e){return t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e())}}var xg=globalThis.navigator!==void 0&&/Mac|iPhone|iPad|iPod/.test(navigator.platform),Sg=V(`<div class="border border-line rounded-lg p-3 bg-subtle"><div class="font-semibold text-fg"> </div> <div class="text-xs text-fg-subtle mt-0.5"> </div></div>`),Cg=V(`<div class="p-3 bg-danger-bg border border-danger-border rounded-md text-sm text-danger flex items-start gap-2"><!> <span> </span></div>`),wg=V(`<p class="mb-1 last:mb-0"> </p>`),Tg=V(`<div class="p-3 bg-accent/10 border border-accent/30 rounded-md text-sm text-accent"></div>`),Eg=V(`<div class="p-3 bg-success-bg border border-success-border rounded-md text-sm text-success"> </div>`),Dg=V(`<div class="fixed inset-0 z-[1100] flex items-center justify-center" role="dialog" aria-modal="true" aria-label="Import traces"><button type="button" aria-label="Close" class="absolute inset-0 bg-black/55 backdrop-blur-[2px] at-backdrop-in"></button> <div tabindex="-1" class="at-modal-in relative z-[1] w-[min(560px,92vw)] max-h-[85vh] overflow-hidden flex flex-col bg-surface rounded-lg shadow-xl border border-line outline-none"><div class="flex items-center justify-between px-4 py-3 border-b border-line bg-subtle flex-shrink-0"><span class="text-sm font-semibold text-fg">Import Traces</span> <button class="inline-flex items-center justify-center w-7 h-7 bg-transparent border border-line rounded text-sm text-fg-subtle hover:bg-danger-bg hover:border-danger-border hover:text-danger transition-colors" title="Close (Esc)"><!></button></div> <div class="overflow-y-auto p-4 flex flex-col gap-3"><label class="flex flex-col gap-2 text-sm text-fg-muted"><span class="font-semibold text-fg">JSON file</span> <span class="inline-flex items-center px-3 py-1.5 border border-line rounded text-sm text-fg-muted bg-surface hover:bg-subtle cursor-pointer w-fit transition-colors"><!> Choose file</span> <input type="file" accept=".json,application/json" class="hidden"/></label> <!> <!> <!> <!></div> <div class="flex items-center justify-end gap-3 px-4 py-3 border-t border-line bg-subtle flex-shrink-0"><button class="px-3 py-1.5 text-sm border border-line rounded bg-surface text-fg-muted hover:bg-subtle disabled:opacity-50 disabled:cursor-not-allowed transition-colors">Cancel</button> <button class="px-4 py-1.5 text-sm rounded bg-accent text-white hover:bg-accent/90 disabled:opacity-50 disabled:cursor-not-allowed transition-colors"> </button></div></div></div>`);function Og(e,t){it(t,!0);function n(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}let r=N(null),i=N(!1),a=N(null),o=N(null),s=N(void 0);Lr(()=>{let e=e=>{e.key===`Escape`&&(e.stopPropagation(),t.onclose())};return window.addEventListener(`keydown`,e),z(s)?.focus(),()=>window.removeEventListener(`keydown`,e)});let c=e=>{let t=e.target.files?.[0];t&&(P(r,t,!0),P(o,null),P(a,null))},l=async()=>{if(z(r)){P(i,!0),P(o,null);try{let e=await t.onimport(z(r));P(a,e,!0),e.errors.length>0&&P(o,e.errors.join(`; `),!0),e.imported>0&&e.errors.length===0&&setTimeout(t.onclose,1500)}catch(e){P(o,String(e),!0)}finally{P(i,!1)}}};var u=Dg(),d=F(u),f=L(d,2),p=F(f),m=L(F(p),2);rg(F(m),{size:14}),D(m),D(p);var h=L(p,2),g=F(h),_=L(F(g),2);qh(F(_),{size:14,class:`mr-1.5`}),Ke(),D(_);var v=L(_,2);D(g);var y=L(g,2),b=e=>{var t=Sg(),i=F(t),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(t),R(e=>{U(a,z(r).name),U(s,e)},[()=>n(z(r).size)]),H(e,t)};W(y,e=>{z(r)&&e(b)});var x=L(y,2),S=e=>{var t=Cg(),n=F(t);Gh(n,{size:14,class:`flex-shrink-0 mt-0.5`});var r=L(n,2),i=F(r,!0);D(r),D(t),R(()=>U(i,z(o))),H(e,t)};W(x,e=>{z(o)&&e(S)});var C=L(x,2),w=e=>{var t=Tg();G(t,21,()=>z(a).warnings,Oa,(e,t)=>{var n=wg(),r=F(n,!0);D(n),R(()=>U(r,z(t))),H(e,n)}),D(t),H(e,t)};W(C,e=>{z(a)&&z(a).warnings.length>0&&e(w)});var T=L(C,2),ee=e=>{var t=Eg(),n=F(t);D(t),R(()=>U(n,`Successfully imported ${z(a).imported??``} trace${z(a).imported===1?``:`s`}.`)),H(e,t)};W(T,e=>{z(a)&&z(a).imported>0&&e(ee)}),D(h);var te=L(h,2),ne=F(te),re=L(ne,2),ie=F(re,!0);D(re),D(te),D(f),Vo(f,e=>P(s,e),()=>z(s)),D(u),R(()=>{ne.disabled=z(i),re.disabled=!z(r)||z(i),U(ie,z(i)?`Importing...`:`Confirm Import`)}),B(`click`,d,function(...e){t.onclose?.apply(this,e)}),B(`click`,m,function(...e){t.onclose?.apply(this,e)}),B(`change`,v,c),B(`click`,ne,function(...e){t.onclose?.apply(this,e)}),B(`click`,re,l),H(e,u),at()}ea([`click`,`change`]);function kg(e,t){if(t.length===0)return e.duration;let n=t.map(t=>[Math.max(t.startTime,e.startTime),Math.min(t.endTime,e.endTime)]).filter(([e,t])=>t>e).sort((e,t)=>e[0]-t[0]),r=0,i=-1/0,a=-1/0;for(let[e,t]of n)e>a?(a>i&&(r+=a-i),i=e,a=t):t>a&&(a=t);return a>i&&(r+=a-i),Math.max(0,e.duration-r)}function Ag(e){let t=new Set;if(e.length===0)return t;let n=new Map;for(let t of e)n.set(t.spanId,t);let r=new Map;for(let t of e){let e=t.parentSpanId&&n.has(t.parentSpanId)?t.parentSpanId:``,i=r.get(e);i?i.push(t):r.set(e,[t])}let i=r.get(``)??[];if(i.length===0)return t;let a=e=>e.reduce((e,t)=>t.endTime>e.endTime?t:e),o=a(i);for(;o&&!t.has(o.spanId);){t.add(o.spanId);let e=r.get(o.spanId);o=e&&e.length?a(e):void 0}return t}function jg(e,t=()=>!1){let n=[],r=(e,i,a)=>{e.forEach((o,s)=>{let c=s===e.length-1;n.push({node:o,connectors:{ancestorLines:[...i],isLast:c,depth:a}}),!(t(o)||o.children.length===0)&&r(o.children,[...i,!c],a+1)})};return r(e,[],0),n}function Mg(e){if(e!==`local`)return e===`utc`?`UTC`:e}function Ng(e,t){try{return new Intl.DateTimeFormat(void 0,{...t,timeZone:Mg(e)})}catch{return new Intl.DateTimeFormat(void 0,t)}}function Pg(e,t=`local`){return Ng(t,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}).format(new Date(e))}function Fg(e=`local`){return e===`utc`?`UTC`:Ng(e,{timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??`Local`}var Ig=2;function Lg(e,t,n){let r=[];for(let i=0;i<e.length;i++){let a=n>0?(e[i].timestamp-t)/n*100:0,o=Math.min(Math.max(a,0),100),s=r.find(e=>e.every(e=>Math.abs(o-e.posPercent)>Ig));s?s.push({index:i,posPercent:o}):r.push([{index:i,posPercent:o}])}return r}var Rg=new Set([`error`,`fatal`,`critical`]);function zg(e){if(e.name===`exception`)return`exception`;let t=e.attributes?.level??e.attributes?.severity;return typeof t==`string`&&Rg.has(t.toLowerCase())?`exception`:`event`}var Bg=V(`<span class="absolute inset-y-0 border-l border-line"></span>`),Vg=V(`<span class="relative shrink-0"><!></span>`),Hg=V(`<span class="relative shrink-0"><span></span> <span class="absolute top-1/2 border-t border-line"></span></span>`),Ug=V(`<span aria-hidden="true" data-testid="tree-gutter"><!> <!></span>`);function Wg(e,t){it(t,!0);let n=Z(t,`indent`,3,16);var r=Ug(),i=F(r);G(i,17,()=>t.ancestorLines,Oa,(e,t)=>{var r=Vg(),i=F(r),a=e=>{var t=Bg();R(()=>oo(t,`left:${n()/2}px`)),H(e,t)};W(i,e=>{z(t)&&e(a)}),D(r),R(()=>{oo(r,`width:${n()??``}px`),J(r,`data-testid`,z(t)?`gutter-line`:`gutter-blank`)}),H(e,r)});var a=L(i,2),o=e=>{var r=Hg(),i=F(r),a=L(i,2);D(r),R(e=>{oo(r,`width:${n()??``}px`),J(r,`data-testid`,t.isLast?`gutter-elbow`:`gutter-tee`),q(i,1,e),oo(i,`left:${n()/2}px`),oo(a,`left:${n()/2}px; width:${n()/2}px`)},[()=>K($(`absolute top-0 border-l border-line`,t.isLast?`h-1/2`:`inset-y-0`))]),H(e,r)};W(a,e=>{(t.ancestorLines.length>0||!t.isLast)&&e(o)}),D(r),R(e=>q(r,1,e),[()=>K($(`flex shrink-0 self-stretch`,t.class))]),H(e,r),at()}function Gg(e){let t=e.children.length;for(let n of e.children)t+=Gg(n);return t}function Kg(e,t){let n=t.startTime,r=t.duration||1,i=e.startTime-n,a=i/r*100,o=e.duration/r*100;return{offsetMs:i,offsetPercent:Math.max(0,Math.min(100,a)),widthPercent:Math.max(.5,Math.min(100-a,o))}}function qg(e){switch(e){case`SERVER`:return`bg-blue-500`;case`CLIENT`:return`bg-green-500`;case`PRODUCER`:return`bg-purple-500`;case`CONSUMER`:return`bg-orange-500`;default:return`bg-gray-500`}}function Jg(e){switch(e){case`SERVER`:return`bg-blue-400`;case`CLIENT`:return`bg-green-400`;case`PRODUCER`:return`bg-purple-400`;case`CONSUMER`:return`bg-orange-400`;default:return`bg-gray-400`}}var Yg=V(`<button class="p-0.5 hover:bg-hover rounded flex-shrink-0"><!></button>`),Xg=V(`<div class="w-4"></div>`),Zg=V(`<span class="text-xs text-fg-subtle ml-1"> </span>`),Qg=V(`<span class="absolute inset-0 flex items-center justify-center text-[10px] text-white font-medium"> </span>`),$g=V(`<button type="button"></button>`),e_=V(`<div class="flex gap-2 py-0.5"><span class="text-fg-subtle flex-shrink-0"> </span> <span class="text-fg break-all"> </span></div>`),t_=V(`<div class="font-mono text-[11px] text-fg-muted bg-subtle rounded p-2 border border-line-subtle max-h-[160px] overflow-auto"></div>`),n_=V(`<div class="text-[11px] text-fg-subtle italic">No attributes</div>`),r_=V(`<div class="absolute z-30 top-[calc(100%-2px)] left-2 right-2 max-w-[420px] bg-surface border border-line rounded-md shadow-lg p-2.5 text-left at-modal-in"><div class="flex items-center gap-2 mb-1.5"><span></span> <span> </span> <span class="text-[10px] text-fg-subtle font-mono"> </span> <button type="button" class="p-0.5 hover:bg-hover rounded flex-shrink-0" aria-label="Close event detail"><!></button></div> <div class="text-[10px] text-fg-subtle font-mono mb-1.5"> </div> <!></div>`),i_=V(`<div><div class="w-[200px] shrink-0 pr-2 py-2 flex items-center gap-1 min-w-0"><!> <!> <!> <!> <!> <span> </span> <!></div> <div class="flex-1 relative"><div><!></div> <!> <!></div> <div class="w-[80px] shrink-0 px-2 py-2 text-right"><span> </span></div></div>`);function a_(e,t){it(t,!0);let n=M(()=>t.node.span),r=M(()=>Kg(z(n),t.trace)),i=M(()=>z(n).status.code===`ERROR`),a=M(()=>z(n).events&&z(n).events.length>0),o=M(()=>Lg(z(n).events??[],t.trace.startTime,t.trace.duration)),s=N(null),c=e=>{P(s,z(s)===e?null:e,!0)};Lr(()=>{if(z(s)===null)return;let e=()=>{P(s,null)},t=t=>{t.key===`Escape`&&e()};return window.addEventListener(`click`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`click`,e),window.removeEventListener(`keydown`,t)}});var l=i_(),u=F(l),d=F(u),f=e=>{Wg(e,{get ancestorLines(){return t.connectors.ancestorLines},get isLast(){return t.connectors.isLast}})};W(d,e=>{t.connectors&&e(f)});var p=L(d,2),m=e=>{var n=Yg(),r=F(n),i=e=>{Dp(e,{size:12,class:`text-fg-subtle`})},a=e=>{Cp(e,{size:12,class:`text-fg-subtle`})};W(r,e=>{t.isCollapsed?e(i):e(a,-1)}),D(n),B(`click`,n,e=>{e.stopPropagation(),t.onToggleCollapse?.()}),H(e,n)},h=e=>{H(e,Xg())};W(p,e=>{t.hasChildren?e(m):e(h,-1)});var g=L(p,2),v=e=>{kp(e,{size:12,class:`text-danger flex-shrink-0`})};W(g,e=>{z(i)&&e(v)});var y=L(g,2),b=e=>{Cm(e,{size:10,class:`text-accent flex-shrink-0`})};W(y,e=>{z(a)&&e(b)});var x=L(y,2),S=e=>{ag(e,{size:10,class:`text-warning fill-warning flex-shrink-0`})};W(x,e=>{t.isCritical&&e(S)});var C=L(x,2),w=F(C,!0);D(C);var T=L(C,2),ee=e=>{var n=Zg(),r=F(n);D(n),R(e=>U(r,`(+${e??``})`),[()=>Gg(t.node)]),H(e,n)};W(T,e=>{t.isCollapsed&&t.node.children.length>0&&e(ee)}),D(u);var te=L(u,2),ne=F(te),re=F(ne),ie=e=>{var t=Qg(),r=F(t,!0);D(t),R(e=>U(r,e),[()=>ad(z(n).duration)]),H(e,t)};W(re,e=>{z(r).widthPercent>10&&e(ie)}),D(ne);var ae=L(ne,2);G(ae,17,()=>z(o),Oa,(e,r,i)=>{var a=la();G(I(a),17,()=>z(r),e=>e.index,(e,r)=>{let a=M(()=>z(n).events[z(r).index]),o=M(()=>28+i*8),l=M(()=>zg(z(a))===`exception`);var u=$g();R((e,t)=>{q(u,1,e),oo(u,`left: ${z(r).posPercent}%; top: ${z(o)}px; transform: translateX(-50%);`),J(u,`title`,t),J(u,`aria-label`,`Event ${z(a).name}`)},[()=>K($(`absolute w-2.5 h-2.5 rounded-full border border-white z-10 cursor-pointer hover:scale-125 transition-transform`,z(l)?`bg-danger`:`bg-warning`,z(s)===z(r).index&&`ring-2 ring-accent scale-125`)),()=>`${z(a).name} at ${ad(z(a).timestamp-t.trace.startTime)} — click for detail`]),B(`click`,u,e=>{e.stopPropagation(),c(z(r).index)}),H(e,u)}),H(e,a)});var oe=L(ae,2),se=e=>{let r=M(()=>z(n).events[z(s)]),i=M(()=>zg(z(r))===`exception`);var a=r_(),o=F(a),c=F(o),l=L(c,2),u=F(l,!0);D(l);var d=L(l,2),f=F(d);D(d);var p=L(d,2);rg(F(p),{size:12,class:`text-fg-subtle`}),D(p),D(o);var m=L(o,2),h=F(m,!0);D(m);var g=L(m,2),v=e=>{var t=t_();G(t,21,()=>Object.entries(z(r).attributes),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=e_(),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,r()),U(l,e)},[()=>typeof i()==`object`?JSON.stringify(i()):String(i())]),H(e,a)}),D(t),H(e,t)},y=M(()=>z(r).attributes&&Object.keys(z(r).attributes).length>0),b=e=>{H(e,n_())};W(g,e=>{z(y)?e(v):e(b,-1)}),D(a),R((e,t,n,i)=>{q(c,1,e),q(l,1,t),U(u,z(r).name),U(f,`+${n??``}`),U(h,i)},[()=>K($(`w-2 h-2 rounded-full flex-shrink-0`,z(i)?`bg-danger`:`bg-warning`)),()=>K($(`text-xs font-medium flex-1 truncate`,z(i)?`text-danger`:`text-fg`)),()=>ad(z(r).timestamp-t.trace.startTime),()=>Pg(z(r).timestamp,Hu.value)]),B(`click`,a,e=>e.stopPropagation()),B(`click`,p,e=>{e.stopPropagation(),P(s,null)}),H(e,a)};W(oe,e=>{z(s)!==null&&z(n).events?.[z(s)]&&e(se)}),D(te);var ce=L(te,2),le=F(ce),E=F(le,!0);D(le),D(ce),D(l),R((e,i,a,o,s,c,d)=>{J(l,`id`,`waterfall-row-${z(n).spanId}`),q(l,1,e),oo(u,t.connectors?`padding-left: 8px;`:`padding-left: ${8+t.node.depth*16}px;`),q(C,1,i),J(C,`title`,z(n).name),U(w,z(n).name||`unknown`),oo(te,a),q(ne,1,o),oo(ne,`left: ${z(r).offsetPercent}%; width: ${z(r).widthPercent}%; top: 6px; min-width: 4px;`),J(ne,`title`,s),q(le,1,c),U(E,d)},[()=>K($(`flex items-center border-b border-line-subtle hover:bg-accent/5 cursor-pointer transition-colors`,t.isSelected&&`bg-accent/10 hover:bg-accent/15`,z(i)&&`bg-danger-bg/40 hover:bg-danger-bg/60`,t.isCritical&&`border-l-2 border-l-warning`)),()=>K($(`text-xs truncate`,z(i)?`text-danger`:`text-fg`)),()=>`height: ${Math.max(32,30+z(o).length*8)}px;`,()=>K($(`absolute h-5 rounded-sm transition-colors group`,z(i)?`bg-danger`:qg(z(n).kind),t.isSelected&&(z(i)?`bg-danger`:Jg(z(n).kind)))),()=>`${z(n).name}: ${ad(z(n).duration)}`,()=>K($(`text-xs font-mono`,z(i)?`text-danger`:`text-fg-muted`)),()=>ad(z(n).duration)]),B(`click`,l,()=>t.onSelect?.()),H(e,l),at()}ea([`click`]);function o_(e){let t=new Map,n=[],r=new Map;for(let n of e)t.set(n.spanId,{span:n,children:[],depth:0});for(let i of e){let e=t.get(i.spanId);if(i.parentSpanId){let n=t.get(i.parentSpanId);if(n)n.children.push(e);else{let t=r.get(i.parentSpanId)||[];t.push(e),r.set(i.parentSpanId,t)}}else n.push(e)}let i=(e,t,n=new Set)=>{if(!n.has(e.span.spanId)){n.add(e.span.spanId),e.depth=t;for(let r of e.children)i(r,t+1,new Set(n))}};for(let[t,i]of r){i.sort((e,t)=>e.span.startTime-t.span.startTime);let r=Math.min(...i.map(e=>e.span.startTime)),a=Math.max(...i.map(e=>e.span.endTime)),o=e.find(e=>e.spanId===t),s={span:{spanId:t,traceId:i[0].span.traceId,parentSpanId:o?.parentSpanId||void 0,name:`(missing)`,kind:`INTERNAL`,startTime:r,endTime:a,duration:a-r,attributes:{},status:{code:`UNSET`},events:[]},children:i,depth:0};n.push(s)}for(let e of n)i(e,0);let a=e=>{e.sort((e,t)=>e.span.startTime-t.span.startTime);for(let t of e)a(t.children)};return a(n),n}var s_=V(`<div class="absolute text-[10px] whitespace-nowrap tabular-nums"> </div>`),c_=V(`<div class="absolute top-0 bottom-0 border-l border-line-subtle"></div>`),l_=V(`<div></div>`),u_=V(`<div><!></div>`),d_=V(`<div class="px-3 py-6 text-center text-xs text-fg-subtle"> </div>`),f_=V(`<div class="flex items-center gap-1"><div></div> <span class="text-fg-muted"> </span></div>`),p_=V(`<div class="flex flex-col h-full"><div class="flex border-b border-line bg-subtle text-xs text-fg-subtle"><div class="w-[200px] shrink-0 px-3 py-2 font-medium text-fg-muted">Span Name</div> <div class="flex-1 relative py-2"></div> <div class="w-[80px] shrink-0 px-2 py-2 text-right font-medium text-fg-muted">Duration</div></div> <div class="flex-1 overflow-auto relative"><div class="absolute inset-0 pointer-events-none"></div> <div class="relative"><!> <!> <!> <!></div></div> <div class="flex items-center gap-4 px-3 py-2 border-t border-line bg-subtle text-xs"><span class="text-fg-subtle font-medium">Kind:</span> <!> <button title="Highlight the spans that determine total trace latency"><!> Critical path</button></div></div>`);function m_(e,t){it(t,!0);let n=Z(t,`selectedSpanId`,3,null),r=Z(t,`query`,3,``),i=M(()=>{let e=r().trim().toLowerCase();if(!e)return new Set;let n=new Set,i=(t.trace.service?.toLowerCase()??``).includes(e);for(let r of t.trace.spans)(i||r.name?.toLowerCase().includes(e))&&n.add(r.spanId);return n}),a=M(()=>r().trim().length>0);Lr(()=>{t.onMatchCount?.(z(i).size)});let o=N(_r(new Set)),s=N(!0),c=N(void 0),l=N(0),u=N(void 0),d=N(0),f=N(0),p=M(()=>Ag(t.trace.spans));Lr(()=>{let e=z(c);if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(e=>{P(l,e[0].contentRect.width,!0)});return t.observe(e),()=>t.disconnect()});let m=M(()=>o_(t.trace.spans)),h=M(()=>jg(z(m),e=>z(o).has(e.span.spanId))),g=M(()=>z(h).map(e=>e.node)),_=M(()=>z(h).length<300||z(f)===0?{start:0,end:z(h).length}:{start:Math.max(0,Math.floor(z(d)/34)-12),end:Math.min(z(h).length,Math.ceil((z(d)+z(f))/34)+12)}),v=M(()=>z(h).slice(z(_).start,z(_).end));Lr(()=>{let e=z(u);if(!e||typeof ResizeObserver>`u`)return;P(f,e.clientHeight,!0);let t=new ResizeObserver(()=>{P(f,e.clientHeight,!0)});return t.observe(e),()=>t.disconnect()});function y(e){if(!z(u)||z(h).length<300)return;let t=e*34,n=t+34;t<z(u).scrollTop?z(u).scrollTop=t:n>z(u).scrollTop+z(u).clientHeight&&(z(u).scrollTop=n-z(u).clientHeight),P(d,z(u).scrollTop,!0)}let b=e=>{if($c.value||yg()||e.key!==`ArrowUp`&&e.key!==`ArrowDown`&&e.key!==`Enter`)return;e.preventDefault();let r=z(g).findIndex(e=>e.span.spanId===n()),i;if(e.key===`ArrowUp`)i=r>0?r-1:z(g).length-1;else if(e.key===`ArrowDown`)i=r<z(g).length-1?r+1:0;else{if(r>=0){t.onSpanSelect?.(z(g)[r].span);return}i=0}let a=z(g)[i];a&&(t.onSpanSelect?.(a.span),y(i),document.getElementById(`waterfall-row-${a.span.spanId}`)?.scrollIntoView({block:`nearest`}))};Lr(()=>(z(g),n(),window.addEventListener(`keydown`,b),()=>window.removeEventListener(`keydown`,b))),Lr(()=>{let e=n();e&&Pi(()=>{let n=new Map(t.trace.spans.map(e=>[e.spanId,e])),r=new Set(z(o)),i=!1,a=n.get(e)?.parentSpanId;for(;a;)r.delete(a)&&(i=!0),a=n.get(a)?.parentSpanId;i&&P(o,r,!0);let s=z(h).findIndex(t=>t.node.span.spanId===e);s>=0&&y(s),requestAnimationFrame(()=>document.getElementById(`waterfall-row-${e}`)?.scrollIntoView({block:`center`}))})});let x=e=>{let t=new Set(z(o));t.has(e)?t.delete(e):t.add(e),P(o,t,!0)},S=e=>t.trace.spans.some(t=>t.parentSpanId===e),C=M(()=>{let e=t.trace.duration||1,n=z(l)>0?Math.min(8,Math.max(2,Math.floor(z(l)/90))):5,r=[];for(let t=0;t<=n;t++)r.push({percent:t/n*100,label:ad(t/n*e),align:t===0?`start`:t===n?`end`:`mid`});return r}),w=[`SERVER`,`CLIENT`,`INTERNAL`,`PRODUCER`,`CONSUMER`];var T=p_(),ee=F(T),te=L(F(ee),2);G(te,21,()=>z(C),Oa,(e,t)=>{var n=s_(),r=F(n,!0);D(n),R(()=>{oo(n,`left: ${z(t).percent}%; transform: ${z(t).align===`start`?`translateX(0)`:z(t).align===`end`?`translateX(-100%)`:`translateX(-50%)`};`),U(r,z(t).label)}),H(e,n)}),D(te),Vo(te,e=>P(c,e),()=>z(c)),Ke(2),D(ee);var ne=L(ee,2),re=F(ne);oo(re,`left: 200px; right: 80px;`),G(re,21,()=>z(C),Oa,(e,t)=>{var n=c_();R(()=>oo(n,`left: ${z(t).percent}%;`)),H(e,n)}),D(re);var ie=L(re,2),ae=F(ie),oe=e=>{var t=l_();R(()=>oo(t,`height: ${z(_).start*34}px`)),H(e,t)};W(ae,e=>{z(_).start>0&&e(oe)});var se=L(ae,2);G(se,17,()=>z(v),({node:e,connectors:t})=>e.span.spanId,(e,r)=>{let c=()=>z(r).node,l=()=>z(r).connectors,u=M(()=>z(i).has(c().span.spanId));var d=u_(),f=F(d);{let e=M(()=>n()===c().span.spanId),r=M(()=>z(o).has(c().span.spanId)),i=M(()=>S(c().span.spanId)),a=M(()=>z(s)&&z(p).has(c().span.spanId));a_(f,{get node(){return c()},get trace(){return t.trace},get isSelected(){return z(e)},get isCollapsed(){return z(r)},get hasChildren(){return z(i)},get isCritical(){return z(a)},get connectors(){return l()},onSelect:()=>t.onSpanSelect?.(c().span),onToggleCollapse:()=>x(c().span.spanId)})}D(d),R(e=>q(d,1,e),[()=>K($(`transition-opacity`,z(a)&&!z(u)&&`opacity-40`,z(a)&&z(u)&&`ring-1 ring-inset ring-accent rounded-sm`))]),H(e,d)});var ce=L(se,2),le=e=>{var t=l_();R(()=>oo(t,`height: ${(z(h).length-z(_).end)*34}px`)),H(e,t)};W(ce,e=>{z(_).end<z(h).length&&e(le)});var E=L(ce,2),ue=e=>{var t=d_(),n=F(t);D(t),R(e=>U(n,`No spans match “${e??``}”.`),[()=>r().trim()]),H(e,t)};W(E,e=>{z(a)&&z(i).size===0&&e(ue)}),D(ie),D(ne),Vo(ne,e=>P(u,e),()=>z(u));var de=L(ne,2),fe=L(F(de),2);G(fe,16,()=>w,e=>e,(e,t)=>{var n=f_(),r=F(n),i=L(r,2),a=F(i,!0);D(i),D(n),R(e=>{q(r,1,e),U(a,t)},[()=>K($(`w-3 h-3 rounded-sm`,qg(t)))]),H(e,n)});var pe=L(fe,2);ag(F(pe),{size:11}),Ke(),D(pe),D(de),D(T),R(e=>q(pe,1,e),[()=>K($(`ml-auto flex items-center gap-1 px-1.5 py-0.5 rounded border transition-colors`,z(s)?`bg-warning-bg text-warning border-warning-border`:`text-fg-subtle border-line hover:bg-hover`))]),$i(`scroll`,ne,e=>P(d,e.currentTarget.scrollTop,!0)),B(`click`,pe,()=>P(s,!z(s))),H(e,T),at()}ea([`click`]);function h_(e,t){let n=new Map,r=[],i=t.duration||1,a=t.startTime;for(let t of e){let e=(t.startTime-a)/i*100,r=t.duration/i*100;n.set(t.spanId,{span:t,children:[],depth:0,x:Math.max(0,e),width:Math.max(.5,Math.min(100-e,r))})}for(let t of e){let e=n.get(t.spanId);if(t.parentSpanId){let i=n.get(t.parentSpanId);i?(i.children.push(e),e.depth=i.depth+1):r.push(e)}else r.push(e)}let o=e=>{e.sort((e,t)=>e.span.startTime-t.span.startTime);for(let t of e)o(t.children)};return o(r),r}function g_(e){let t=[],n=e=>{t.push(e),e.children.forEach(n)};return e.forEach(n),t}function __(e){let t=0,n=e=>{t=Math.max(t,e.depth),e.children.forEach(n)};return e.forEach(n),t}function v_(e,t,n){let r=n.find(e=>e.spanId===t);if(!r)return e;let i=r.startTime,a=r.duration||1,o=(e,t)=>{let r=n.find(t=>t.spanId===e);return r?r.parentSpanId===t?!0:r.parentSpanId?o(r.parentSpanId,t):!1:!1},s=e=>{if(!(e.span.spanId===t||o(e.span.spanId,t)))return{...e,x:-100,width:0,children:e.children.map(s)};let n=(e.span.startTime-i)/a*100,r=e.span.duration/a*100;return{...e,x:Math.max(0,n),width:Math.max(.5,Math.min(100-Math.max(0,n),r)),children:e.children.map(s)}};return e.map(s)}function y_(e){if(e.status.code===`ERROR`)return`bg-red-500 hover:bg-red-400`;switch(e.kind){case`SERVER`:return`bg-blue-500 hover:bg-blue-400`;case`CLIENT`:return`bg-green-500 hover:bg-green-400`;case`PRODUCER`:return`bg-purple-500 hover:bg-purple-400`;case`CONSUMER`:return`bg-orange-500 hover:bg-orange-400`;default:return`bg-gray-500 hover:bg-gray-400`}}function b_(e){return e.status.code===`ERROR`?`ring-2 ring-danger`:`ring-2 ring-accent`}var x_=V(`<div class="absolute inset-0 flex items-center px-1.5 overflow-hidden"><span class="text-[10px] text-white font-medium truncate"> </span></div>`),S_=V(`<div role="button" tabindex="-1"><!></div>`),C_=V(`<span class="flex items-center gap-2"><span class="font-medium">Zoomed:</span> <span class="truncate max-w-[200px]"> </span></span>`),w_=V(`<span>Click a span to zoom in, double-click to select</span>`),T_=V(`<button class="p-1.5 hover:bg-hover rounded transition-colors flex items-center gap-1 text-xs text-fg-muted" title="Reset zoom"><!> Reset</button>`),E_=V(`<div class="absolute left-0 right-0"></div>`),D_=V(`<div class="flex items-center gap-1 mt-1 text-danger"><!> <span>Error</span></div>`),O_=V(`<div class="absolute z-50 pointer-events-none"><div class="bg-surface text-fg text-xs rounded-md shadow-lg p-2 max-w-[200px]"><div class="font-medium truncate mb-1"> </div> <div class="flex items-center gap-2 text-fg-muted"><span> </span> <span>|</span> <span> </span></div> <!></div></div>`),k_=V(`<div class="flex items-center gap-1"><div></div> <span class="text-fg-muted"> </span></div>`),A_=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between px-3 py-2 border-b border-line bg-subtle"><div class="text-xs text-fg-muted"><!></div> <div class="flex items-center gap-1"><!></div></div> <div class="flex-1 overflow-auto p-4 relative" role="presentation"><div class="relative w-full"></div> <!></div> <div class="flex items-center gap-4 px-3 py-2 border-t border-line bg-subtle text-xs"><span class="text-fg-subtle font-medium">Kind:</span> <!> <div class="flex items-center gap-1 ml-2"><div class="w-3 h-3 rounded-sm bg-red-500"></div> <span class="text-fg-muted">ERROR</span></div></div></div>`);function j_(e,t){it(t,!0);let n=(e,n=p,r=p,i=p)=>{let a=M(()=>{let{span:e,x:t,width:r}=n();return{span:e,x:t,width:r}});var o=la(),s=I(o),c=e=>{var n=S_(),i=M(()=>bg(()=>f(z(a).span.spanId))),o=F(n),s=e=>{var t=x_(),n=F(t),r=F(n,!0);D(n),D(t),R(()=>U(r,z(a).span.name)),H(e,t)};W(o,e=>{z(a).width>5&&e(s)}),D(n),R((e,t)=>{q(n,1,e),oo(n,`left: ${z(a).x??``}%; width: ${z(a).width??``}%; height: 24px; min-width: 4px;`),J(n,`title`,t)},[()=>K($(`absolute cursor-pointer transition-all`,y_(z(a).span),r()&&b_(z(a).span),`rounded-sm`)),()=>`${z(a).span.name}: ${ad(z(a).span.duration)}`]),B(`click`,n,()=>f(z(a).span.spanId)),B(`keydown`,n,function(...e){z(i)?.apply(this,e)}),B(`dblclick`,n,()=>t.onSpanSelect?.(z(a).span)),B(`mousemove`,n,e=>h(e,z(a).span)),$i(`mouseleave`,n,g),H(e,n)};W(s,e=>{z(a).width<=0||z(a).x<0||e(c)}),H(e,o)},r=N(_r({focusedSpanId:null})),i=N(null),a=N(_r({x:0,y:0})),o=N(void 0),s=M(()=>h_(t.trace.spans,t.trace)),c=M(()=>z(r).focusedSpanId?v_(z(s),z(r).focusedSpanId,t.trace.spans):z(s)),l=M(()=>g_(z(c))),u=M(()=>__(z(c))),d=M(()=>{let e=new Map;for(let t of z(l))if(t.width>0){let n=e.get(t.depth)||[];n.push(t),e.set(t.depth,n)}return e}),f=e=>{P(r,{focusedSpanId:e},!0)},m=()=>{P(r,{focusedSpanId:null},!0)},h=(e,t)=>{if(z(o)){let t=z(o).getBoundingClientRect();P(a,{x:e.clientX-t.left,y:e.clientY-t.top},!0)}P(i,t,!0)},g=()=>{P(i,null)},v=M(()=>(z(u)+1)*26+20);var y=A_(),b=F(y),x=F(b),S=F(x),C=e=>{var n=C_(),i=L(F(n),2),a=F(i,!0);D(i),D(n),R(e=>U(a,e),[()=>t.trace.spans.find(e=>e.spanId===z(r).focusedSpanId)?.name]),H(e,n)},w=e=>{H(e,w_())};W(S,e=>{z(r).focusedSpanId?e(C):e(w,-1)}),D(x);var T=L(x,2),ee=F(T),te=e=>{var t=T_();hh(F(t),{size:14}),Ke(),D(t),B(`click`,t,m),H(e,t)};W(ee,e=>{z(r).focusedSpanId&&e(te)}),D(T),D(b);var ne=L(b,2),re=F(ne);G(re,21,()=>[...z(d).entries()],([e,t])=>e,(e,r)=>{var a=M(()=>_(z(r),2));let o=()=>z(a)[0],s=()=>z(a)[1];var c=E_();G(c,21,s,e=>e.span.spanId,(e,r)=>{n(e,()=>z(r),()=>t.selectedSpanId===z(r).span.spanId,()=>z(i)?.spanId===z(r).span.spanId)}),D(c),R(()=>oo(c,`top: ${o()*26}px;`)),H(e,c)}),D(re);var ie=L(re,2),ae=e=>{var t=O_(),n=F(t),r=F(n),s=F(r,!0);D(r);var c=L(r,2),l=F(c),u=F(l,!0);D(l);var d=L(l,4),f=F(d,!0);D(d),D(c);var p=L(c,2),m=e=>{var t=D_();kp(F(t),{size:10}),Ke(2),D(t),H(e,t)};W(p,e=>{z(i).status.code===`ERROR`&&e(m)}),D(n),D(t),R((e,n)=>{oo(t,`left: ${e??``}px; top: ${z(a).y+10}px;`),U(s,z(i).name),U(u,n),U(f,z(i).kind)},[()=>Math.min(z(a).x+10,(z(o)?.clientWidth||300)-220),()=>ad(z(i).duration)]),H(e,t)};W(ie,e=>{z(i)&&e(ae)}),D(ne),Vo(ne,e=>P(o,e),()=>z(o));var oe=L(ne,2);G(L(F(oe),2),16,()=>[`SERVER`,`CLIENT`,`INTERNAL`,`PRODUCER`,`CONSUMER`],e=>e,(e,t)=>{var n=k_(),r=F(n),i=L(r,2),a=F(i,!0);D(i),D(n),R(e=>{q(r,1,e),U(a,t)},[()=>K($(`w-3 h-3 rounded-sm`,t===`SERVER`&&`bg-blue-500`,t===`CLIENT`&&`bg-green-500`,t===`PRODUCER`&&`bg-purple-500`,t===`CONSUMER`&&`bg-orange-500`,t===`INTERNAL`&&`bg-gray-500`))]),H(e,n)}),Ke(2),D(oe),D(y),R(()=>oo(re,`height: ${z(v)??``}px; min-width: 100%;`)),$i(`mouseleave`,ne,g),H(e,y),at()}ea([`click`,`keydown`,`dblclick`,`mousemove`]);function M_(e){if(typeof e==`object`&&e)return e;if(typeof e!=`string`)return null;let t=e.trim();if(t.length<2)return null;let n=t[0];if(n!==`{`&&n!==`[`)return null;try{let e=JSON.parse(t);return typeof e==`object`&&e?e:null}catch{return null}}var N_=V(`<div class="relative group"><!> <button title="Copy"><!></button></div>`);function P_(e,t){it(t,!0);let n=N(!1);async function r(){try{await navigator.clipboard.writeText(t.content),P(n,!0),setTimeout(()=>P(n,!1),2e3)}catch(e){console.error(`Failed to copy:`,e)}}var i=N_(),a=F(i);La(a,()=>t.children);var o=L(a,2),s=F(o),c=e=>{xp(e,{size:14,class:`text-success`})},l=e=>{zp(e,{size:14,class:`text-fg-muted`})};W(s,e=>{z(n)?e(c):e(l,-1)}),D(o),D(i),R(e=>q(o,1,e),[()=>K($(`absolute top-2 right-2 p-1.5 rounded-md`,`bg-surface border border-line shadow-sm`,`opacity-0 group-hover:opacity-100 transition-opacity`,`hover:bg-subtle`))]),B(`click`,o,r),H(e,i),at()}ea([`click`]);var F_=V(`<button type="button" class="absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-fg-subtle hover:text-fg-muted"><!></button>`),I_=V(`<div><!> <input/> <!></div>`);function L_(e,t){it(t,!0);let n=Z(t,`value`,15),r=Z(t,`clearTitle`,3,`Clear filter`),i=Z(t,`class`,3,`flex-1`),a=Z(t,`inputClass`,3,`border-line focus:border-line`),o=Z(t,`ref`,15,null);function s(e){n(e),t.onValue?.(e)}var c=I_(),l=F(c);Ch(l,{size:12,class:`absolute left-2 top-1/2 -translate-y-1/2 text-fg-subtle`});var u=L(l,2);xo(u),Vo(u,e=>o(e),()=>o());var d=L(u,2),f=e=>{var t=F_();rg(F(t),{size:12}),D(t),R(()=>J(t,`title`,r())),B(`click`,t,()=>s(``)),H(e,t)};W(d,e=>{n()&&e(f)}),D(c),R((e,r)=>{q(c,1,e),So(u,n()),J(u,`placeholder`,t.placeholder),J(u,`aria-label`,t.ariaLabel),q(u,1,r)},[()=>K($(`relative`,i())),()=>K($(`w-full pl-7 pr-7 py-1 text-xs rounded border focus:outline-none`,a()))]),B(`input`,u,e=>s(e.currentTarget.value)),H(e,c),at()}ea([`input`,`click`]);function R_(e,t){return!e||t.some(t=>t!=null&&String(t).toLowerCase().includes(e))}var z_=V(`<span class="text-fg-subtle"> </span>`),B_=V(`<div class="flex gap-1 leading-5"><!> <span> </span></div>`),V_=V(`<span class="text-fg-subtle opacity-70"> </span>`),H_=V(`<div class="pl-3 ml-1 border-l border-line-subtle"><!> <div class="text-fg-subtle"> </div></div>`),U_=V(`<div class="leading-5"><button class="inline-flex items-center gap-1 hover:bg-hover rounded px-0.5"><!> <!> <span class="text-fg-subtle"> </span> <!></button> <!></div>`);function W_(e,t){it(t,!0);function n(e){if(e===null)return`text-fg-subtle`;switch(typeof e){case`string`:return`text-green-600`;case`number`:return`text-blue-600`;case`boolean`:return`text-purple-600`;default:return`text-fg`}}function r(e){return e===null?`null`:typeof e==`string`?`"${e}"`:String(e)}let i=M(()=>t.value!==null&&typeof t.value==`object`),a=N(t.depth<2),o=M(()=>Array.isArray(t.value)),s=M(()=>z(o)?t.value.map((e,t)=>[String(t),e]):Object.entries(t.value)),c=M(()=>z(o)?`[`:`{`),l=M(()=>z(o)?`]`:`}`),u=M(()=>`${z(s).length} ${z(o)?`items`:`keys`}`);var d=la(),f=I(d),p=e=>{var i=B_(),a=F(i),o=e=>{var n=z_(),r=F(n);D(n),R(()=>U(r,`${t.label??``}:`)),H(e,n)};W(a,e=>{t.label!==void 0&&e(o)});var s=L(a,2),c=F(s,!0);D(s),D(i),R((e,t)=>{q(s,1,e),U(c,t)},[()=>K($(`break-all`,n(t.value))),()=>r(t.value)]),H(e,i)},m=e=>{var n=U_(),r=F(n),i=F(r),o=e=>{Cp(e,{size:10})},d=e=>{Dp(e,{size:10})};W(i,e=>{z(a)?e(o):e(d,-1)});var f=L(i,2),p=e=>{var n=z_(),r=F(n);D(n),R(()=>U(r,`${t.label??``}:`)),H(e,n)};W(f,e=>{t.label!==void 0&&e(p)});var m=L(f,2),h=F(m,!0);D(m);var g=L(m,2),v=e=>{var t=V_(),n=F(t,!0);D(t),R(()=>U(n,z(u))),H(e,t)};W(g,e=>{z(a)||e(v)}),D(r);var y=L(r,2),b=e=>{var n=H_(),r=F(n);G(r,17,()=>z(s),([e,t])=>e,(e,n)=>{var r=M(()=>_(z(n),2));let i=()=>z(r)[0],a=()=>z(r)[1];{let n=M(()=>t.depth+1);W_(e,{get label(){return i()},get value(){return a()},get depth(){return z(n)}})}});var i=L(r,2),a=F(i,!0);D(i),D(n),R(()=>U(a,z(l))),H(e,n)};W(y,e=>{z(a)&&e(b)}),D(n),R(()=>U(h,z(a)?z(c):`${z(c)}…${z(l)}`)),B(`click`,r,()=>P(a,!z(a))),H(e,n)};W(f,e=>{z(i)?e(m,-1):e(p)}),H(e,d),at()}ea([`click`]);var G_=V(`<div class="font-mono text-xs text-fg"><!></div>`);function K_(e,t){var n=G_();W_(F(n),{get value(){return t.data},depth:0}),D(n),H(e,n)}var q_=V(`<button type="button" class="font-mono text-accent hover:underline truncate flex-1 text-left cursor-pointer"> </button>`),J_=V(`<code class="font-mono text-fg-muted truncate flex-1"> </code>`),Y_=V(`<div class="flex items-center gap-2"><span class="text-fg-subtle w-24 flex-shrink-0"> </span> <!> <button class="p-1 hover:bg-hover rounded transition-colors flex-shrink-0" title="Copy to clipboard"><!></button></div>`);function X_(e,t){let n=N(!1),r=async()=>{await navigator.clipboard.writeText(t.value),P(n,!0),setTimeout(()=>P(n,!1),2e3)};var i=Y_(),a=F(i),o=F(a);D(a);var s=L(a,2),c=e=>{var n=q_(),r=F(n,!0);D(n),R(()=>{J(n,`title`,t.activateTitle??`Open`),U(r,t.value)}),B(`click`,n,function(...e){t.onActivate?.apply(this,e)}),H(e,n)},l=e=>{var n=J_(),r=F(n,!0);D(n),R(()=>U(r,t.value)),H(e,n)};W(s,e=>{t.onActivate?e(c):e(l,-1)});var u=L(s,2),d=F(u),f=e=>{xp(e,{size:12,class:`text-success`})},p=e=>{zp(e,{size:12,class:`text-fg-subtle`})};W(d,e=>{z(n)?e(f):e(p,-1)}),D(u),D(i),R(()=>U(o,`${t.label??``}:`)),B(`click`,u,r),H(e,i)}ea([`click`]);var Z_=V(`<button type="button"><!></button>`);function Q_(e,t){it(t,!0);let n=Z(t,`label`,3,`Copy`),r=Z(t,`size`,3,12),i=Z(t,`class`,3,``),a=Z(t,`stop`,3,!0),o=N(!1);async function s(e){a()&&(e.stopPropagation(),e.preventDefault());try{await navigator.clipboard.writeText(t.value),P(o,!0),setTimeout(()=>P(o,!1),1500)}catch(e){console.error(`[autotel-devtools] copy failed:`,e)}}var c=Z_(),l=F(c),u=e=>{xp(e,{get size(){return r()},class:`text-success`})},d=e=>{zp(e,{get size(){return r()}})};W(l,e=>{z(o)?e(u):e(d,-1)}),D(c),R(e=>{J(c,`title`,z(o)?`Copied!`:n()),J(c,`aria-label`,n()),q(c,1,e)},[()=>K($(`inline-flex items-center justify-center p-1 rounded flex-shrink-0`,`text-fg-subtle hover:text-fg hover:bg-hover transition-colors`,i()))]),B(`click`,c,s),H(e,c),at()}ea([`click`]);function $_(e){return`'${e.replaceAll(`'`,`'\\''`)}'`}function ev(e){if(typeof e==`string`&&e.length>0)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e)}function tv(e){let t=ev(e[`url.full`])??ev(e[`http.url`]);if(t)return t;let n=ev(e[`server.address`])??ev(e[`net.peer.name`]),r=ev(e[`url.path`])??ev(e[`http.target`]);if(!n||!r)return;let i=ev(e[`url.scheme`])??`https`,a=ev(e[`server.port`]),o=ev(e[`url.query`]);return`${i}://${a&&a!==`80`&&a!==`443`?`${n}:${a}`:n}${r}${o?`?${o}`:``}`}function nv(e){let t=e.attributes??{},n=ev(t[`http.request.method`])??ev(t[`http.method`]),r=tv(t);if(!n||!r)return null;let i=[`curl -X ${n.toUpperCase()}`,$_(r)],a=Object.entries(t).filter(([e])=>e.startsWith(`http.request.header.`)).sort(([e],[t])=>e.localeCompare(t));for(let[e,t]of a){let n=e.slice(20),r=Array.isArray(t)?t.map(String).join(`, `):ev(t);r&&i.push(`-H ${$_(`${n}: ${r}`)}`)}return i.join(` `)}var rv={count:`autotel.schema.violations`,severity:`autotel.schema.violation.severity`,codes:`autotel.schema.violation.codes`};function iv(e){let t=e.attributes??{},n=t[rv.count],r=typeof n==`number`?n:Number(n);if(!Number.isFinite(r)||r<=0)return null;let i=t[rv.codes];return{count:r,severity:t[rv.severity]===`error`?`error`:`warning`,codes:Array.isArray(i)?i.map(String):[]}}var av=[`code.filepath`,`code.file.path`],ov=[`code.lineno`,`code.line.number`],sv=[`code.column`,`code.column.number`],cv=[`code.function`,`code.function.name`];function lv(e,t){for(let n of t){let t=e[n];if(typeof t==`string`&&t.length>0)return t}}function uv(e,t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t;if(typeof t==`string`&&t.trim()!==``&&Number.isFinite(Number(t)))return Number(t)}}function dv(e,t,n,r){if(e===`webstorm`){let e=`jetbrains://web-storm/navigate/reference?path=${encodeURIComponent(t)}`;return n!==void 0&&(e+=`&line=${n}`),e}let i=`${e}://file/${t.replace(/^\//,``)}`;return n!==void 0&&(i+=`:${n}`,r!==void 0&&(i+=`:${r}`)),i}function fv(e,t){let n=lv(e,av);if(!n)return null;let r=uv(e,ov),i=uv(e,sv),a=lv(e,cv),o=lv(e,[`code.namespace`]),s=n.split(/[/\\]/).pop()||n;return{filepath:n,line:r,column:i,functionName:a,namespace:o,display:r===void 0?s:`${s}:${r}`,href:dv(t,n,r,i)}}function pv(e,t){for(let n of t){let t=e[n];if(typeof t==`string`&&t.length>0)return t}}function mv(e,t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t;if(typeof t==`string`&&t.trim()!==``&&Number.isFinite(Number(t)))return Number(t)}}function hv(e){let t=pv(e,[`db.system`,`db.system.name`]),n=pv(e,[`db.statement`,`db.query.text`]);return!t&&!n?null:{system:t,statement:n,operation:pv(e,[`db.operation`,`db.operation.name`]),table:pv(e,[`db.sql.table`,`db.collection.name`]),dbName:pv(e,[`db.name`,`db.namespace`]),rowCount:mv(e,[`db.response.returned_rows`,`db.rows_affected`])}}var gv=new Set(`select.from.where.insert.into.values.update.set.delete.join.left.right.inner.outer.full.cross.on.and.or.not.in.is.null.as.order.by.group.having.limit.offset.distinct.union.all.returning.with.using.between.like.asc.desc.count.case.when.then.else.end.exists.create.table.alter.drop.index`.split(`.`)),_v=/('(?:[^']|'')*'|[A-Za-z_][A-Za-z0-9_]*|[^A-Za-z_']+)/g;function vv(e){let t=[];for(let[n]of e.matchAll(_v))n.startsWith(`'`)?t.push({text:n,kind:`string`}):/^[A-Za-z_]/.test(n)&&gv.has(n.toLowerCase())?t.push({text:n,kind:`keyword`}):t.push({text:n,kind:`text`});return t}var yv=(e,t=p,n=p,r=p)=>{let i=M(()=>Sv.test(t())),a=M(()=>Cv.some(e=>t().startsWith(e))),o=M(()=>z(i)?null:M_(n()));var s=la(),c=I(s),l=e=>{var n=Ov(),r=F(n),i=F(r),s=F(i,!0);D(i);var c=L(i,2),l=L(c,2),u=e=>{var t=Dv();q(t,1,K(Ev)),H(e,t)};W(l,e=>{z(a)&&e(u)}),D(r);var d=L(r,2);K_(F(d),{get data(){return z(o)}}),D(d),D(n),R(e=>{U(s,t()),q(c,1,e)},[()=>K($(Tv,`bg-amber-500/15 text-amber-600 border-amber-500/30`))]),H(e,n)},u=e=>{let o=M(()=>wv(n())),s=M(()=>String(n()));var c=Av(),l=F(c),u=F(l),d=F(u,!0);D(u);var f=L(u,2),p=F(f,!0);D(f);var m=L(f,2),h=e=>{var t=Dv();q(t,1,K(Ev)),H(e,t)};W(m,e=>{z(a)&&!z(i)&&e(h)});var g=L(m,2),_=e=>{var n=kv();Fm(F(n),{size:10,class:`text-fg-subtle`}),D(n),B(`click`,n,()=>r()({key:t(),value:z(s)})),H(e,n)};W(g,e=>{!z(i)&&z(s).length>60&&e(_)}),D(l);var v=L(l,2),y=F(v,!0);D(v),D(c),R(e=>{J(u,`title`,t()),U(d,t()),q(f,1,e),U(p,z(i)?`sensitive`:z(o).label),U(y,z(i)?`[redacted]`:z(s))},[()=>K($(Tv,z(o).cls))]),H(e,c)};W(c,e=>{z(o)===null?e(u,-1):e(l)}),H(e,s)},bv=(e,t=p,n=p,r=p,i=p,a=p)=>{var o=Mv(),s=F(o),c=F(s);La(F(c),n),D(c);var l=L(c,2),u=F(l,!0);D(l);var d=L(l,2);{let e=M(()=>$(`text-fg-subtle transition-transform`,r()&&`rotate-180`));Cp(d,{size:14,get class(){return z(e)}})}D(s);var f=L(s,2),m=e=>{var t=jv();La(F(t),a),D(t),H(e,t)};W(f,e=>{r()&&e(m)}),D(o),R(()=>U(u,t())),B(`click`,s,function(...e){i()?.apply(this,e)}),H(e,o)},xv=(e,t=p,n=p,r=p)=>{var i=Nv(),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(i),R(()=>{J(i,`title`,r()),U(o,t()),U(c,n())}),H(e,i)},Sv=/(password|secret|token|authorization|api[-_.]?key)/i,Cv=[`service.`,`deployment.`,`host.`,`container.`,`process.`];function wv(e){return e==null?{label:`null`,cls:`bg-hover text-fg-subtle border-line`}:Array.isArray(e)?{label:`array`,cls:`bg-amber-500/15 text-amber-600 border-amber-500/30`}:typeof e==`string`?{label:`string`,cls:`bg-green-500/15 text-green-600 border-green-500/30`}:typeof e==`number`?{label:`number`,cls:`bg-blue-500/15 text-blue-600 border-blue-500/30`}:typeof e==`boolean`?{label:`boolean`,cls:`bg-purple-500/15 text-purple-600 border-purple-500/30`}:{label:`object`,cls:`bg-stone-500/15 text-stone-600 border-stone-500/30`}}var Tv=`text-[9px] px-1.5 py-px rounded border font-mono flex-shrink-0`,Ev=`${Tv} bg-hover text-fg-subtle border-line`,Dv=V(`<span>resource</span>`),Ov=V(`<div class="py-1 border-b border-line-subtle last:border-b-0"><div class="flex items-center gap-2"><span class="text-fg-subtle font-medium"> </span> <span>json</span> <!></div> <div class="mt-1"><!></div></div>`),kv=V(`<button class="ml-auto p-0.5 hover:bg-hover rounded flex-shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity" title="View full value"><!></button>`),Av=V(`<div class="group py-1 border-b border-line-subtle last:border-b-0"><div class="flex items-center gap-2 min-w-0"><span class="text-fg-subtle font-medium truncate"> </span> <span> </span> <!> <!></div> <div class="mt-0.5 text-fg leading-snug at-wrap-anywhere"> </div></div>`),jv=V(`<div class="px-4 pb-3"><!></div>`),Mv=V(`<div class="border-b border-line-subtle"><button class="w-full flex items-center gap-2 px-4 py-3 hover:bg-subtle transition-colors"><span class="text-fg-subtle"><!></span> <span class="text-xs font-medium text-fg-muted flex-1 text-left"> </span> <!></button> <!></div>`),Nv=V(`<div><div class="text-fg-subtle mb-0.5"> </div> <div class="font-mono font-medium text-fg"> </div></div>`),Pv=V(`<span class="px-2 py-0.5 rounded bg-hover text-fg-subtle text-xs font-mono" title="Instrumentation scope"> </span>`),Fv=V(`<div class="grid grid-cols-2 gap-3 text-xs"><!> <!> <!> <!> <!></div>`),Iv=V(`<div class="mx-4 mt-4 p-3 bg-danger-bg border border-danger-border rounded-md"><div class="flex items-start gap-2"><!> <div class="text-xs text-danger"><span class="font-medium">Error:</span> </div></div></div>`),Lv=V(`<li class="font-mono text-[11px] text-fg-muted"> </li>`),Rv=V(`<p class="mt-1 text-[11px] text-fg-subtle"> </p>`),zv=V(`<div><div class="mb-1 flex items-center gap-1.5"><!> <span class="text-xs font-medium text-fg"> </span></div> <ul class="space-y-0.5"></ul> <!></div>`),Bv=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="mb-1 flex items-center justify-between gap-2"><span class="text-[11px] uppercase tracking-wide text-fg-muted">Reproduce</span> <!></div> <code class="block overflow-x-auto whitespace-pre rounded bg-subtle px-2 py-1 text-[11px] text-fg-muted"> </code> <p class="mt-1 text-[11px] text-fg-subtle">Rebuilt from span attributes. Headers appear only if captured; the
|
|
3
|
+
body is never recorded.</p></div>`),Vv=V(`<option> </option>`),Hv=V(`<div class="mt-1 text-[11px] text-fg-subtle font-mono"> </div>`),Uv=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="flex items-center gap-2 mb-2"><!> <span class="text-xs font-medium text-fg-muted flex-1">Code Location</span> <select class="text-[10px] bg-subtle border border-line rounded px-1 py-0.5 text-fg-muted" title="Editor to open source files in"></select></div> <a class="group flex items-center gap-2 text-xs font-mono text-accent hover:underline break-all"><!> <span class="break-all"> </span></a> <!> <div class="mt-1 text-[10px] text-fg-subtle break-all"> </div></div>`),Wv=V(`<span class="text-[10px] px-1.5 py-px rounded border font-mono bg-indigo-500/15 text-indigo-600 border-indigo-500/30"> </span>`),Gv=V(`<div class="grid grid-cols-2 gap-2 text-xs mb-2"><!> <!> <!> <!></div>`),Kv=V(`<span> </span>`),qv=V(`<pre class="bg-subtle rounded p-2.5 border border-line font-mono text-[11px] text-fg whitespace-pre-wrap break-all overflow-auto max-h-[240px]"></pre>`),Jv=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="flex items-center gap-2 mb-2"><!> <span class="text-xs font-medium text-fg-muted flex-1">Database</span> <!></div> <!> <!></div>`),Yv=V(`<div class="flex items-center gap-2"><span class="text-fg-subtle">Parent:</span> <span class="font-medium text-fg"> </span></div>`),Xv=V(`<div class="text-fg-muted truncate"> </div>`),Zv=V(`<div class="text-fg-subtle"> </div>`),Qv=V(`<div><span class="text-fg-subtle"> </span> <div class="mt-1 space-y-1 pl-2"><!> <!></div></div>`),$v=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="flex items-center gap-2 mb-2"><!> <span class="text-xs font-medium text-fg-muted">Relationships</span></div> <div class="space-y-2 text-xs"><!> <!></div></div>`),ey=V(`<div class="text-fg-subtle py-2 text-center">No matches</div>`),ty=V(`<div class="bg-subtle rounded p-3 border border-line font-mono text-xs h-[300px] min-h-[120px] overflow-auto resize-y" title="Drag bottom edge to resize"><!></div>`),ny=V(`<!> <!>`,1),ry=V(`<div class="font-mono text-[11px] text-fg-muted mt-1"><pre class="whitespace-pre-wrap break-words"> </pre></div>`),iy=V(`<div class="bg-subtle rounded p-2.5 border border-line"><div class="flex items-center justify-between mb-1"><span class="font-medium text-xs text-fg"> </span> <span class="text-[10px] text-fg-subtle"> </span></div> <!></div>`),ay=V(`<div class="space-y-2"></div>`),oy=V(`<span></span>`),sy=V(`<div class="mt-1.5 pt-1.5 border-t border-line"><div class="font-mono text-[10px] text-fg-subtle"> </div></div>`),cy=V(`<div class="bg-subtle rounded p-2.5 border border-line"><div class="flex items-center gap-2 text-xs mb-1"><span class="text-fg-subtle">Trace:</span> <button type="button" title="Open linked span in the Traces waterfall" class="font-mono text-accent hover:underline text-[11px] truncate text-left cursor-pointer"> </button> <!></div> <div class="flex items-center gap-2 text-xs"><span class="text-fg-subtle">Span:</span> <button type="button" title="Open linked span in the Traces waterfall" class="font-mono text-accent hover:underline text-[11px] truncate text-left cursor-pointer"> </button> <!></div> <!></div>`),ly=V(`<div class="space-y-1.5"></div>`),uy=V(`<span class="text-[10px] text-accent font-medium">this span</span>`),dy=V(`<div><div class="flex items-center gap-2 mb-0.5"><span> </span> <!> <span class="text-fg-subtle text-[10px] ml-auto"> </span></div> <div class="text-fg-muted break-all line-clamp-2"> </div></div>`),fy=V(`<div class="border-b border-line-subtle"><div class="flex items-center gap-2 px-4 py-3"><!> <span class="text-xs font-medium text-fg-muted"> </span></div> <div class="px-4 pb-3"><div class="space-y-1.5 max-h-[200px] overflow-auto"></div></div></div>`),py=V(`<div class="fixed inset-0 z-[1200] flex items-center justify-center" role="dialog" aria-modal="true"><div class="absolute inset-0 bg-black/60 backdrop-blur-[2px] at-backdrop-in"></div> <div class="at-modal-in relative z-[1] w-[min(700px,92vw)] max-h-[85vh] flex flex-col bg-surface rounded-lg shadow-xl border border-line overflow-hidden"><div class="flex items-center justify-between px-4 py-2.5 border-b border-line bg-subtle flex-shrink-0"><span class="text-sm font-mono font-semibold text-fg-muted truncate"> </span> <button class="p-1 hover:bg-hover rounded transition-colors" title="Close (Esc)"><!></button></div> <div class="overflow-auto p-4"><pre class="font-mono text-xs text-fg whitespace-pre-wrap break-all"> </pre></div></div></div>`),my=V(`<div class="flex flex-col h-full bg-surface border-l border-line"><div class="flex items-start justify-between gap-3 px-4 py-3 border-b border-line bg-subtle"><div class="flex-1 min-w-0"><h3 class="font-semibold text-sm text-fg truncate mb-1"> </h3> <div class="flex items-center gap-2 flex-wrap"><span> </span> <span class="px-2 py-0.5 rounded bg-hover text-fg-muted text-xs font-medium"> </span> <!></div></div> <button class="p-1.5 hover:bg-hover rounded-md transition-colors flex-shrink-0" title="Close"><!></button></div> <div class="flex-1 overflow-auto"><!> <!> <!> <!> <div class="px-4 py-3 border-b border-line-subtle"><div class="space-y-2 text-xs"><!> <!> <!></div></div> <div class="px-4 py-3 border-b border-line-subtle"><div class="flex items-center gap-2 mb-2"><!> <span class="text-xs font-medium text-fg-muted">Resource</span></div> <div class="grid grid-cols-2 gap-3 text-xs"><!> <!> <!> <!></div></div> <!> <!> <!> <!> <!> <!> <!></div> <!></div>`);function hy(e,t){it(t,!0);let n=[{value:`vscode`,label:`VS Code`},{value:`cursor`,label:`Cursor`},{value:`webstorm`,label:`WebStorm`}],r=M(()=>nv(t.span)),i=M(()=>iv(t.span)),a=N(_r({timing:!0,attributes:!0,events:!1,links:!1})),o=N(null),s=e=>{P(a,{...z(a),[e]:!z(a)[e]},!0)},c=M(()=>t.span.status.code===`ERROR`),l=M(()=>Object.keys(t.span.attributes||{}).length>0),u=M(()=>t.span.events&&t.span.events.length>0),d=M(()=>t.span.links&&t.span.links.length>0),f=M(()=>ms(t.span,t.trace.service)),p=M(()=>hs(t.span.attributes,z(f))),m=M(()=>Object.entries(t.span.attributes||{}).filter(([e])=>e.startsWith(`service.`)||e.startsWith(`deployment.`)||e.startsWith(`host.`)||e.startsWith(`container.`)||e.startsWith(`process.`))),h=M(()=>Object.entries(t.span.attributes||{}).sort(([e],[t])=>e.localeCompare(t))),g=N(``),v=M(()=>{let e=z(g).trim().toLowerCase();return e?z(h).filter(([t,n])=>R_(e,[t,n])):z(h)}),y=M(()=>z(g).trim().length>0),b=M(()=>fv(t.span.attributes||{},Zc.value)),x=M(()=>hv(t.span.attributes||{})),S=M(()=>z(x)?.statement?vv(z(x).statement):[]),C=M(()=>kg(t.span,t.trace.spans.filter(e=>e.parentSpanId===t.span.spanId))),w=M(()=>t.span.startTime-t.trace.startTime),T=M(()=>t.span.endTime-t.trace.startTime),ee=M(()=>t.trace.spans.find(e=>e.spanId===t.span.parentSpanId)),te=M(()=>t.trace.spans.filter(e=>e.parentSpanId===t.span.spanId)),ne=M(()=>t.trace.spans.find(e=>!e.parentSpanId)),re=e=>Nu(t.trace.traceId,e),ie=M(()=>dl.value),ae=M(()=>z(ie).filter(e=>e.traceId===t.trace.traceId));var oe=my(),se=F(oe),ce=F(se),le=F(ce),E=F(le,!0);D(le);var ue=L(le,2),de=F(ue),fe=F(de,!0);D(de);var pe=L(de,2),me=F(pe,!0);D(pe);var he=L(pe,2),ge=e=>{var n=Pv(),r=F(n);D(n),R(()=>U(r,`${t.span.scope.name??``}
|
|
4
|
+
${t.span.scope.version?`@${t.span.scope.version}`:``}`)),H(e,n)};W(he,e=>{t.span.scope?.name&&e(ge)}),D(ue),D(ce);var _e=L(ce,2);rg(F(_e),{size:16,class:`text-fg-subtle`}),D(_e),D(se);var ve=L(se,2);{let e=e=>{Np(e,{size:14})},c=e=>{var n=Fv(),r=F(n);{let e=M(()=>ad(t.span.duration));xv(r,()=>`Duration`,()=>z(e))}var i=L(r,2);{let e=M(()=>ad(z(C)));xv(i,()=>`Self time`,()=>z(e),()=>`Time in this span excluding its children`)}var a=L(i,2);{let e=M(()=>ad(z(w)));xv(a,()=>`Start (relative)`,()=>z(e))}var o=L(a,2);{let e=M(()=>ad(z(T)));xv(o,()=>`End (relative)`,()=>z(e))}var s=L(o,2);{let e=M(()=>Pg(t.span.startTime,Hu.value));xv(s,()=>`Start Time`,()=>z(e))}D(n),H(e,n)};var ye=F(ve),be=e=>{var n=Iv(),r=F(n),i=F(r);kp(i,{size:14,class:`text-danger flex-shrink-0 mt-0.5`});var a=L(i,2),o=L(F(a));D(a),D(r),D(n),R(()=>U(o,` ${t.span.status.message??``}`)),H(e,n)};W(ye,e=>{t.span.status.message&&e(be)});var xe=L(ye,2);bv(xe,()=>`Timing`,()=>e,()=>z(a).timing,()=>()=>s(`timing`),()=>c);var Se=L(xe,2),Ce=e=>{var t=zv(),n=F(t),r=F(n);{let e=M(()=>z(i).severity===`error`?`text-danger`:`text-warning`);Gh(r,{size:13,get class(){return z(e)}})}var a=L(r,2),o=F(a);D(a),D(n);var s=L(n,2);G(s,20,()=>z(i).codes,e=>e,(e,t)=>{var n=Lv(),r=F(n,!0);D(n),R(()=>U(r,t)),H(e,n)}),D(s);var c=L(s,2),l=e=>{var t=Rv(),n=F(t);D(t),R(()=>U(n,`${z(i).count-z(i).codes.length} more not listed on the span.`)),H(e,t)};W(c,e=>{z(i).count>z(i).codes.length&&e(l)}),D(t),R(()=>{q(t,1,K(z(i).severity===`error`?`border-b border-line-subtle bg-danger/5 px-4 py-3`:`border-b border-line-subtle bg-warning/5 px-4 py-3`)),U(o,`${z(i).count??``}
|
|
5
|
+
${z(i).count===1?`contract violation`:`contract violations`}`)}),H(e,t)};W(Se,e=>{z(i)&&e(Ce)});var we=L(Se,2),Te=e=>{var t=Bv(),n=F(t);Q_(L(F(n),2),{get value(){return z(r)},label:`Copy as curl`}),D(n);var i=L(n,2),a=F(i,!0);D(i),Ke(2),D(t),R(()=>U(a,z(r))),H(e,t)};W(we,e=>{z(r)&&e(Te)});var Ee=L(we,2),De=F(Ee),Oe=F(De);X_(Oe,{label:`Span ID`,get value(){return t.span.spanId}});var ke=L(Oe,2);{let e=M(()=>z(ne)&&z(ne).spanId!==t.span.spanId?()=>re(z(ne).spanId):void 0);X_(ke,{label:`Trace ID`,get value(){return t.span.traceId},get onActivate(){return z(e)},activateTitle:`Go to root span`})}var Ae=L(ke,2),je=e=>{{let n=M(()=>z(ee)?()=>re(t.span.parentSpanId):void 0),r=M(()=>z(ee)?`Go to parent span`:`Parent span not captured in this trace`);X_(e,{label:`Parent Span ID`,get value(){return t.span.parentSpanId},get onActivate(){return z(n)},get activateTitle(){return z(r)}})}};W(Ae,e=>{t.span.parentSpanId&&e(je)}),D(De),D(Ee);var Me=L(Ee,2),Ne=F(Me);Lh(F(Ne),{size:14,class:`text-fg-subtle`}),Ke(2),D(Ne);var Pe=L(Ne,2),Fe=F(Pe);xv(Fe,()=>`Trace Service`,()=>t.trace.service);var Ie=L(Fe,2);xv(Ie,()=>`Derived Resource`,()=>z(f));var Le=L(Ie,2);xv(Le,()=>`Resource Type`,()=>z(p));var Re=L(Le,2);{let e=M(()=>String(z(m).length));xv(Re,()=>`Resource Attrs`,()=>z(e))}D(Pe),D(Me);var ze=L(Me,2),Be=e=>{var t=Uv(),r=F(t),i=F(r);Fp(i,{size:14,class:`text-fg-subtle`});var a=L(i,4);G(a,21,()=>n,e=>e.value,(e,t)=>{var n=Vv(),r=F(n,!0);D(n);var i={};R(()=>{U(r,z(t).label),i!==(i=z(t).value)&&(n.value=(n.__value=z(t).value)??``)}),H(e,n)}),D(a);var o;co(a),D(r);var s=L(r,2),c=F(s);Yp(c,{size:12,class:`flex-shrink-0`});var l=L(c,2),u=F(l,!0);D(l),D(s);var d=L(s,2),f=e=>{var t=Hv(),n=F(t);D(t),R(()=>U(n,`${z(b).namespace?`${z(b).namespace}.`:``}${z(b).functionName??``}()`)),H(e,t)};W(d,e=>{z(b).functionName&&e(f)});var p=L(d,2),m=F(p,!0);D(p),D(t),R(()=>{o!==(o=Zc.value)&&(a.value=(a.__value=Zc.value)??``,so(a,Zc.value)),J(s,`href`,z(b).href),J(s,`title`,`Open ${z(b).filepath}${z(b).line?`:${z(b).line}`:``}`),U(u,z(b).display),U(m,z(b).filepath)}),B(`change`,a,e=>Qc(e.currentTarget.value)),H(e,t)};W(ze,e=>{z(b)&&e(Be)});var Ve=L(ze,2),He=e=>{var t=Jv(),n=F(t),r=F(n);Up(r,{size:14,class:`text-fg-subtle`});var i=L(r,4),a=e=>{var t=Wv(),n=F(t,!0);D(t),R(()=>U(n,z(x).system)),H(e,t)};W(i,e=>{z(x).system&&e(a)}),D(n);var o=L(n,2),s=e=>{var t=Gv(),n=F(t),r=e=>{xv(e,()=>`Operation`,()=>z(x).operation)};W(n,e=>{z(x).operation&&e(r)});var i=L(n,2),a=e=>{xv(e,()=>`Table`,()=>z(x).table)};W(i,e=>{z(x).table&&e(a)});var o=L(i,2),s=e=>{xv(e,()=>`Database`,()=>z(x).dbName)};W(o,e=>{z(x).dbName&&e(s)});var c=L(o,2),l=e=>{{let t=M(()=>String(z(x).rowCount));xv(e,()=>`Rows`,()=>z(t))}};W(c,e=>{z(x).rowCount!==void 0&&e(l)}),D(t),H(e,t)};W(o,e=>{(z(x).operation||z(x).table||z(x).dbName||z(x).rowCount!==void 0)&&e(s)});var c=L(o,2),l=e=>{P_(e,{get content(){return z(x).statement},children:(e,t)=>{var n=qv();G(n,21,()=>z(S),Oa,(e,t)=>{var n=Kv(),r=F(n,!0);D(n),R(()=>{q(n,1,K(z(t).kind===`keyword`?`text-indigo-500 font-semibold`:z(t).kind===`string`?`text-green-500`:``)),U(r,z(t).text)}),H(e,n)}),D(n),H(e,n)},$$slots:{default:!0}})};W(c,e=>{z(x).statement&&e(l)}),D(t),H(e,t)};W(Ve,e=>{z(x)&&e(He)});var Ue=L(Ve,2),We=e=>{var t=$v(),n=F(t);Tm(F(n),{size:14,class:`text-fg-subtle`}),Ke(2),D(n);var r=L(n,2),i=F(r),a=e=>{var t=Yv(),n=L(F(t),2),r=F(n,!0);D(n),D(t),R(()=>U(r,z(ee).name)),H(e,t)};W(i,e=>{z(ee)&&e(a)});var o=L(i,2),s=e=>{var t=Qv(),n=F(t),r=F(n);D(n);var i=L(n,2),a=F(i);G(a,17,()=>z(te).slice(0,5),e=>e.spanId,(e,t)=>{var n=Xv(),r=F(n,!0);D(n),R(()=>U(r,z(t).name)),H(e,n)});var o=L(a,2),s=e=>{var t=Zv(),n=F(t);D(t),R(()=>U(n,`+${z(te).length-5} more`)),H(e,t)};W(o,e=>{z(te).length>5&&e(s)}),D(i),D(t),R(()=>U(r,`Children (${z(te).length??``}):`)),H(e,t)};W(o,e=>{z(te).length>0&&e(s)}),D(r),D(t),H(e,t)};W(Ue,e=>{(z(ee)||z(te).length>0)&&e(We)});var Ge=L(Ue,2),qe=e=>{let n=e=>{Lh(e,{size:14})},r=e=>{var n=ny(),r=I(n);L_(r,{class:`mb-2`,inputClass:`border-line bg-subtle text-fg focus:border-line focus-visible:ring-1 focus-visible:ring-accent`,placeholder:`Filter attributes by key or value…`,ariaLabel:`Filter attributes by key or value`,get value(){return z(g)},set value(e){P(g,e,!0)}});var i=L(r,2);{let e=M(()=>JSON.stringify(t.span.attributes,null,2));P_(i,{get content(){return z(e)},children:(e,t)=>{var n=ty(),r=F(n),i=e=>{H(e,ey())},a=e=>{var t=la();G(I(t),17,()=>z(v),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));yv(e,()=>z(n)[0],()=>z(n)[1],()=>e=>P(o,e,!0))}),H(e,t)};W(r,e=>{z(v).length===0?e(i):e(a,-1)}),D(n),H(e,n)},$$slots:{default:!0}})}H(e,n)};{let i=M(()=>z(y)?`Attributes (${z(v).length} of ${Object.keys(t.span.attributes).length})`:`Attributes (${Object.keys(t.span.attributes).length})`);bv(e,()=>z(i),()=>n,()=>z(a).attributes,()=>()=>s(`attributes`),()=>r)}};W(Ge,e=>{z(l)&&e(qe)});var Je=L(Ge,2),Ye=e=>{let n=e=>{Cm(e,{size:14})},r=e=>{var n=ay();G(n,21,()=>t.span.events,Oa,(e,n)=>{var r=iy(),i=F(r),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s);D(s),D(i);var l=L(i,2),u=e=>{{let t=M(()=>JSON.stringify(z(n).attributes,null,2));P_(e,{get content(){return z(t)},children:(e,t)=>{var r=ry(),i=F(r),a=F(i,!0);D(i),D(r),R(e=>U(a,e),[()=>JSON.stringify(z(n).attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},d=M(()=>z(n).attributes&&Object.keys(z(n).attributes).length>0);W(l,e=>{z(d)&&e(u)}),D(r),R(e=>{U(o,z(n).name),U(c,`+${e??``}`)},[()=>ad(z(n).timestamp-t.span.startTime)]),H(e,r)}),D(n),H(e,n)};bv(e,()=>`Events (${t.span.events.length})`,()=>n,()=>z(a).events,()=>()=>s(`events`),()=>r)};W(Je,e=>{z(u)&&e(Ye)});var Xe=L(Je,2),Ze=e=>{let n=e=>{km(e,{size:14})},r=e=>{var n=ly();G(n,21,()=>t.span.links,Oa,(e,t)=>{var n=cy(),r=F(n),i=L(F(r),2),a=F(i,!0);D(i),P_(L(i,2),{get content(){return z(t).traceId},children:(e,t)=>{H(e,oy())},$$slots:{default:!0}}),D(r);var o=L(r,2),s=L(F(o),2),c=F(s,!0);D(s),P_(L(s,2),{get content(){return z(t).spanId},children:(e,t)=>{H(e,oy())},$$slots:{default:!0}}),D(o);var l=L(o,2),u=e=>{var n=sy(),r=F(n),i=F(r,!0);D(r),D(n),R(e=>U(i,e),[()=>Object.entries(z(t).attributes).map(([e,t])=>`${e}: ${typeof t==`object`?JSON.stringify(t):t}`).join(`, `)]),H(e,n)},d=M(()=>z(t).attributes&&Object.keys(z(t).attributes).length>0);W(l,e=>{z(d)&&e(u)}),D(n),R(()=>{U(a,z(t).traceId),U(c,z(t).spanId)}),B(`click`,i,()=>Pu(z(t).traceId,z(t).spanId)),B(`click`,s,()=>Pu(z(t).traceId,z(t).spanId)),H(e,n)}),D(n),H(e,n)};bv(e,()=>`Links (${t.span.links.length})`,()=>n,()=>z(a).links,()=>()=>s(`links`),()=>r)};W(Xe,e=>{z(d)&&e(Ze)});var Qe=L(Xe,2),$e=e=>{var n=fy(),r=F(n),i=F(r);rm(i,{size:14,class:`text-fg-subtle`});var a=L(i,2),o=F(a);D(a),D(r);var s=L(r,2),c=F(s);G(c,23,()=>z(ae).slice(0,50),(e,t)=>e.id||t,(e,n)=>{let r=M(()=>z(n).spanId===t.span.spanId),i=M(()=>z(n).severityText||`INFO`),a=M(()=>z(i)===`ERROR`?`text-danger`:z(i)===`WARN`?`text-warning`:`text-fg-subtle`),o=M(()=>typeof z(n).body==`string`?z(n).body:JSON.stringify(z(n).body));var s=dy(),c=F(s),l=F(c),u=F(l,!0);D(l);var d=L(l,2),f=e=>{H(e,uy())};W(d,e=>{z(r)&&e(f)});var p=L(d,2),m=F(p,!0);D(p),D(c);var h=L(c,2),g=F(h,!0);D(h),D(s),R((e,t,n)=>{q(s,1,e),q(l,1,t),U(u,z(i)),U(m,n),U(g,z(o))},[()=>K($(`text-xs p-2 rounded border`,z(r)?`border-accent/30 bg-accent/10`:`border-line-subtle bg-subtle`)),()=>K($(`font-mono font-medium`,z(a))),()=>Pg(z(n).timestamp,Hu.value)]),H(e,s)}),D(c),D(s),D(n),R(()=>U(o,`Correlated Logs (${z(ae).length??``})`)),H(e,n)};W(Qe,e=>{z(ae).length>0&&e($e)}),D(ve)}var et=L(ve,2),tt=e=>{var t=py(),n=F(t),r=L(n,2),i=F(r),a=F(i),s=F(a,!0);D(a);var c=L(a,2);rg(F(c),{size:16,class:`text-fg-subtle`}),D(c),D(i);var l=L(i,2),u=F(l),d=F(u,!0);D(u),D(l),D(r),D(t),R(()=>{J(t,`aria-label`,`Full value for ${z(o).key}`),U(s,z(o).key),U(d,z(o).value)}),B(`click`,n,()=>P(o,null)),B(`click`,c,()=>P(o,null)),H(e,t)};W(et,e=>{z(o)&&e(tt)}),D(oe),R(e=>{U(E,t.span.name||`Unknown Span`),q(de,1,e),U(fe,t.span.status.code),U(me,t.span.kind)},[()=>K($(`px-2 py-0.5 rounded text-xs font-medium`,z(c)?`bg-danger-bg text-danger`:t.span.status.code===`OK`?`bg-success-bg text-success`:`bg-hover text-fg-muted`))]),B(`click`,_e,function(...e){t.onClose?.apply(this,e)}),H(e,oe),at()}ea([`click`,`change`]);var gy=V(`<div><div class="absolute inset-y-0 -left-1.5 -right-1.5"></div> <div></div></div>`);function _y(e,t){it(t,!0);var n=gy(),r=L(F(n),2);D(n),R((e,i)=>{J(n,`role`,t.role),J(n,`aria-orientation`,t[`aria-orientation`]),J(n,`aria-valuenow`,t[`aria-valuenow`]),J(n,`aria-valuemin`,t[`aria-valuemin`]),J(n,`tabindex`,t.tabIndex),J(n,`title`,t.title??`Drag to resize · double-click to reset`),q(n,1,e),q(r,1,i)},[()=>K($(`group relative z-10 shrink-0 cursor-col-resize self-stretch outline-none`,`w-px bg-hover`)),()=>K($(`absolute inset-y-0 -left-px w-0.5 transition-colors`,`group-hover:bg-accent group-focus-visible:bg-accent`,t.dragging&&`bg-accent`))]),B(`pointerdown`,n,function(...e){t.onPointerDown?.apply(this,e)}),B(`keydown`,n,function(...e){t.onKeyDown?.apply(this,e)}),B(`dblclick`,n,function(...e){t.onDblClick?.apply(this,e)}),H(e,n),at()}ea([`pointerdown`,`keydown`,`dblclick`]);function vy(e,t){e.preventDefault();let n=document.body.style.cursor,r=document.body.style.userSelect;document.body.style.cursor=t.cursor,document.body.style.userSelect=`none`,t.onStart?.();let i=e=>t.onMove(e),a=()=>{document.body.style.cursor=n,document.body.style.userSelect=r,window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a),t.onEnd?.()};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a)}function yy(e,t){if(!e)return t;try{let t=window.localStorage.getItem(e);if(t!=null){let e=Number(t);if(Number.isFinite(e))return e}}catch{}return t}function by(e,t){if(e)try{window.localStorage.setItem(e,String(Math.round(t)))}catch{}}function xy(e){let{initial:t,min:n,minOther:r,containerRef:i,storageKey:a,invert:o=!1,step:s=24}=e,c=Math.max(n,yy(a,t)),l=N(_r(c)),u=N(!1),d={current:c},f=()=>{let e=i.current?.clientWidth;return e?Math.max(n,e-r):1/0},p=e=>Math.min(f(),Math.max(n,e)),m=e=>{P(l,e,!0),d.current=e},h=e=>{let t=e.clientX,n=d.current;vy(e,{cursor:`col-resize`,onStart:()=>P(u,!0),onMove:e=>{let r=e.clientX-t,i=o?-r:r;m(p(n+i))},onEnd:()=>{P(u,!1),by(a,d.current)}})},g=e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;e.preventDefault();let t=e.key===`ArrowLeft`?-s:s,n=p(d.current+(o?-t:t));m(n),by(a,n)},_=()=>{let e=p(t);m(e),by(a,e)};return{get size(){return z(l)},get dragging(){return z(u)},get separatorProps(){return{role:`separator`,"aria-orientation":`vertical`,"aria-valuenow":Math.round(z(l)),"aria-valuemin":n,tabIndex:0,onPointerDown:h,onKeyDown:g,onDblClick:_}}}}var Sy=V(`<div><!></div>`),Cy=V(`<div class="flex flex-col gap-2"><button class="flex items-center gap-2 cursor-pointer text-fg-muted hover:text-fg transition-colors w-fit"><!> <span class="text-xs font-medium"> </span></button> <!></div>`);function wy(e,t){it(t,!0);var n=Cy(),r=F(n),i=F(r);{let e=M(()=>$(`text-fg-subtle transition-transform`,t.expanded&&`rotate-180`));Cp(i,{size:12,get class(){return z(e)}})}var a=L(i,2),o=F(a,!0);D(a),D(r);var s=L(r,2),c=e=>{var n=Sy();La(F(n),()=>t.children),D(n),H(e,n)};W(s,e=>{t.expanded&&e(c)}),D(n),R(()=>U(o,t.label)),B(`click`,r,function(...e){t.onToggle?.apply(this,e)}),H(e,n),at()}ea([`click`]);var Ty=V(`<div class="bg-subtle rounded p-3 border border-line font-mono text-xs"><pre class="whitespace-pre-wrap break-words text-fg"> </pre></div>`),Ey=V(`<div class="font-mono text-xs text-fg-muted mt-1"> </div>`),Dy=V(`<div class="bg-subtle rounded p-2.5 border border-line"><div class="font-medium text-xs text-fg mb-1.5"> </div> <!></div>`),Oy=V(`<div class="space-y-2"></div>`),ky=V(`<div class="text-xs text-fg-muted"><span class="font-medium">Status message:</span> </div>`),Ay=V(`<div role="presentation" class="mt-3 pt-3 border-t border-line space-y-3"><!> <!> <!></div>`),jy=V(`<div role="button" tabindex="0" data-focus-inset=""><div class="flex items-center justify-between gap-4"><div class="flex-1 min-w-0"><div class="font-medium text-sm mb-1 text-fg"> </div> <div class="flex items-center gap-3 text-xs text-fg-muted"><span> </span> <span> </span> <span class="text-fg-subtle"> </span></div></div> <button class="p-1 hover:bg-hover rounded"><!></button></div> <!></div>`);function My(e,t){it(t,!0);let n=N(!1),r=N(_r({attributes:!1,events:!1})),i=M(()=>t.span.status.code===`ERROR`);function a(e){P(r,{...z(r),[e]:!z(r)[e]},!0)}function o(){let e=0,n=t.span;for(;n.parentSpanId;){e++;let r=t.trace.spans.find(e=>e.spanId===n.parentSpanId);if(!r)break;n=r}return e}let s=M(o),c=M(()=>Object.keys(t.span.attributes||{}).length>0),l=M(()=>t.span.events&&t.span.events.length>0);var u=jy(),d=M(()=>bg(t.onSelect)),f=F(u),p=F(f),m=F(p),h=F(m,!0);D(m);var g=L(m,2),_=F(g),v=F(_,!0);D(_);var y=L(_,2),b=F(y,!0);D(y);var x=L(y,2),S=F(x,!0);D(x),D(g),D(p);var C=L(p,2),w=F(C);{let e=M(()=>$(`text-fg-subtle transition-transform flex-shrink-0`,z(n)&&`rotate-180`));Cp(w,{size:14,get class(){return z(e)}})}D(C),D(f);var T=L(f,2),ee=e=>{var n=Ay(),i=F(n),o=e=>{wy(e,{label:`All attributes`,get expanded(){return z(r).attributes},onToggle:()=>a(`attributes`),children:(e,n)=>{{let n=M(()=>JSON.stringify(t.span.attributes,null,2));P_(e,{get content(){return z(n)},children:(e,n)=>{var r=Ty(),i=F(r),a=F(i,!0);D(i),D(r),R(e=>U(a,e),[()=>JSON.stringify(t.span.attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},$$slots:{default:!0}})};W(i,e=>{z(c)&&e(o)});var s=L(i,2),u=e=>{{let n=M(()=>`Events (${t.span.events.length})`);wy(e,{get label(){return z(n)},get expanded(){return z(r).events},onToggle:()=>a(`events`),children:(e,n)=>{var r=Oy();G(r,21,()=>t.span.events,Oa,(e,t)=>{var n=Dy(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=e=>{{let n=M(()=>JSON.stringify(z(t).attributes,null,2));P_(e,{get content(){return z(n)},children:(e,n)=>{var r=Ey(),i=F(r,!0);D(r),R(e=>U(i,e),[()=>JSON.stringify(z(t).attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},s=M(()=>z(t).attributes&&Object.keys(z(t).attributes).length>0);W(a,e=>{z(s)&&e(o)}),D(n),R(()=>U(i,z(t).name)),H(e,n)}),D(r),H(e,r)},$$slots:{default:!0}})}};W(s,e=>{z(l)&&e(u)});var d=L(s,2),f=e=>{var n=ky(),r=L(F(n));D(n),R(()=>U(r,` ${t.span.status.message??``}`)),H(e,n)};W(d,e=>{t.span.status.message&&e(f)}),D(n),B(`click`,n,e=>e.stopPropagation()),H(e,n)};W(T,e=>{z(n)&&e(ee)}),D(u),R((e,n,r)=>{q(u,1,e),oo(u,`padding-left: ${16+z(s)*20}px;`),U(h,t.span.name||`unknown`),q(_,1,n),U(v,t.span.status.code),U(b,r),U(S,t.span.kind)},[()=>K($(`px-4 py-3`,`hover:bg-subtle transition-colors cursor-pointer`,z(i)&&`bg-danger-bg`,t.isSelected&&`bg-hover hover:bg-hover`)),()=>K($(`font-medium`,cd(t.span.status.code))),()=>ad(t.span.duration)]),B(`click`,u,function(...e){t.onSelect?.apply(this,e)}),B(`keydown`,u,function(...e){z(d)?.apply(this,e)}),B(`click`,C,e=>{e.stopPropagation(),P(n,!z(n))}),H(e,u),at()}ea([`click`,`keydown`]);var Ny=`1.0.0`;function Py(e){return{version:Ny,exportedAt:new Date().toISOString(),trace:e}}function Fy(e){return{version:Ny,exportedAt:new Date().toISOString(),traces:e}}function Iy(e){return JSON.stringify(e,null,2)}function Ly(e,t){let n=Iy(Py(e)),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`trace-${e.traceId.slice(0,8)}-${new Date().toISOString().split(`T`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}function Ry(e,t){let n=Iy(Fy(e)),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`traces-${e.length}-${new Date().toISOString().split(`T`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}async function zy(e){let t=Iy(Py(e));await navigator.clipboard.writeText(t)}function By(e,t){if(!e)return[`${t}: Invalid span data`];let n=e;return[...Hs(n,t,Ls,[`spanId`,`traceId`,`name`]),...Hs(n,t,Rs,[`startTime`,`endTime`,`duration`]),...Hs(n,t,zs,[`status`])]}function Vy(e,t){let n=`trace[${t}]`;if(!e)return{errors:[`${n}: Invalid trace data`],warnings:[]};let r=e,i=Ls(r,`correlationId`)?[]:[`${n}: Missing correlationId, will use traceId`],a=zs(r,`rootSpan`),o=Vs(r,`spans`)?Bs(r,`spans`).flatMap((e,t)=>By(Is(e),`${n}.spans[${t}]`)):[`${n}: Missing or invalid spans array`];return{errors:[...Hs(r,n,Ls,[`traceId`]),...a?By(a,`${n}.rootSpan`):[`${n}: Missing or invalid rootSpan`],...o,...Hs(r,n,Rs,[`startTime`,`endTime`,`duration`])],warnings:i}}function Hy(e){return e}function Uy(e){let t=[],n=[],r=[],i;try{i=JSON.parse(e)}catch(e){return{success:!1,traces:[],errors:[`Invalid JSON: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}let a=Is(i);if(!a)return{success:!1,traces:[],errors:[`Parsed data is not an object`],warnings:[]};let o=Ls(a,`version`);o&&o!==Ny&&n.push(`Version mismatch: expected ${Ny}, got ${o}`);let s=zs(a,`trace`);if(s){let e=Vy(s,0);t.push(...e.errors),n.push(...e.warnings),e.errors.length===0&&r.push(Wy(Hy(s)))}else if(Vs(a,`traces`))for(let[e,i]of Bs(a,`traces`).entries()){let a=Is(i),o=Vy(a,e);t.push(...o.errors),n.push(...o.warnings),a&&o.errors.length===0&&r.push(Wy(Hy(a)))}else if(a.traceId){let e=Vy(a,0);t.push(...e.errors),n.push(...e.warnings),e.errors.length===0&&r.push(Wy(Hy(a)))}else t.push(`Unrecognized format: expected { trace: ... } or { traces: [...] } or direct trace object`);return{success:t.length===0&&r.length>0,traces:r,errors:t,warnings:n}}function Wy(e){return{...e,correlationId:e.correlationId||e.traceId.slice(0,8),service:e.service||`imported`,status:e.status||(e.spans.some(e=>e.status.code===`ERROR`)?`ERROR`:`OK`),spans:e.spans.map(Gy),rootSpan:Gy(e.rootSpan)}}function Gy(e){return{...e,kind:e.kind||`INTERNAL`,attributes:e.attributes||{},status:{code:e.status?.code||`UNSET`,message:e.status?.message},events:e.events||[]}}function Ky(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=()=>n(Error(`Failed to read file`)),r.readAsText(e)})}function qy(e){return{version:Ny,kind:`autotel-devtools-snapshot`,capturedAt:new Date().toISOString(),data:e}}function Jy(e,t){let n=JSON.stringify(qy(e),null,2),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`autotel-snapshot-${new Date().toISOString().replaceAll(`:`,`-`).split(`.`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}function Yy(e,t){return Bs(e,t)}function Xy(e){let t;try{t=JSON.parse(e)}catch(e){return{success:!1,errors:[`Invalid JSON: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}let n=Is(t);if(!n)return{success:!1,errors:[`Snapshot is not an object`],warnings:[]};let r=[];n.kind&&n.kind!==`autotel-devtools-snapshot`&&r.push(`Unexpected snapshot kind: ${String(n.kind)}`);let i=Ls(n,`version`);i&&i!==Ny&&r.push(`Version mismatch: expected ${Ny}, got ${i}`);let a=zs(n,`data`)??n,o=Yy(a,`traces`).map(Wy),s=Yy(a,`logs`),c=Yy(a,`errors`);return o.length===0&&s.length===0&&c.length===0?{success:!1,errors:[`Snapshot contains no traces, logs, or errors`],warnings:r}:{success:!0,snapshot:{traces:o,logs:s,errors:c},errors:[],warnings:r}}async function Zy(e){try{return Xy(await Ky(e))}catch(e){return{success:!1,errors:[`Failed to read file: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}}var Qy=V(`<div class="text-warning">Partial trace — the root span has not arrived. This is the highest
|
|
6
|
+
span received; the duration covers only the spans present.</div>`),$y=V(`<span class="text-xs text-fg-muted tabular-nums flex-shrink-0"> </span>`),eb=V(`<div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!></div>`),tb=V(`<div class="overflow-auto h-full"><div class="divide-y divide-line-subtle"></div></div>`),nb=V(`<!> <div class="flex-shrink-0 overflow-hidden"><!></div>`,1),rb=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line"><div class="flex items-center justify-between mb-3"><button><!> Back to traces</button> <div class="flex items-center gap-2"><div class="flex items-center gap-1"><button class="p-1.5 hover:bg-hover rounded transition-colors" title="Copy trace JSON to clipboard"><!></button> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Download trace as JSON"><!></button></div> <div class="flex items-center gap-1 bg-hover rounded-md p-0.5"><button title="Waterfall view (w)"><!> Timeline</button> <button title="Flame graph view (f)"><!> Flame</button> <button title="List view (l)"><!> List</button></div> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Keyboard shortcuts (?)"><!></button></div></div> <div class="flex items-start justify-between gap-4"><div class="flex-1 min-w-0"><h3 class="font-semibold text-base mb-1.5 text-fg"> </h3> <div class="text-xs text-fg-subtle space-y-0.5"><!> <div> </div> <div class="font-mono flex items-center gap-1"><span class="truncate"> </span> <!></div></div></div> <div class="text-right flex-shrink-0"><div> </div> <div class="text-xs text-fg-muted"> </div> <div class="text-xs text-fg-subtle mt-1"> </div></div></div></div> <!> <div class="flex-1 overflow-hidden flex"><div class="flex-1 overflow-hidden min-w-0"><!></div> <!></div></div>`);function ib(e,t){it(t,!0);let n=N(`waterfall`),r=M(()=>t.trace.spans.find(e=>e.spanId===Hc.value)??null),i=e=>Hc.value=e?.spanId??null,a=N(``),o=N(0),s=N(null);Lr(()=>{let e=e=>{e.key===`/`&&z(n)===`waterfall`&&!yg()&&(e.preventDefault(),z(s)?.focus())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});let c=N(!1),l=N(void 0),u=xy({initial:320,min:260,minOther:360,containerRef:{get current(){return z(l)??null}},storageKey:`autotel-devtools:span-detail-width`,invert:!0}),d=M(()=>u.size),f=M(()=>u.dragging),p=M(()=>u.separatorProps);function m(e,t,n){let r=e.filter(e=>e.status.code===`ERROR`);return r.length===0?null:r[((t?r.findIndex(e=>e.spanId===t.spanId):-1)+n+r.length)%r.length]}Lr(()=>{let e=e=>{if(!$c.value){if(e.key===`Escape`){z(r)?i(null):Nu(null);return}if(!yg()){if(e.key===`w`)e.preventDefault(),P(n,`waterfall`);else if(e.key===`f`)e.preventDefault(),P(n,`flame`);else if(e.key===`l`)e.preventDefault(),P(n,`list`);else if(e.key===`e`&&!e.shiftKey){e.preventDefault();let n=m(t.trace.spans,z(r),1);n&&i(n)}else if(e.key===`E`&&e.shiftKey){e.preventDefault();let n=m(t.trace.spans,z(r),-1);n&&i(n)}}}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});function h(e){return new Date(e).toLocaleString(`en-US`,{month:`long`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0})}function g(){Ly(t.trace)}async function _(){await zy(t.trace),P(c,!0),setTimeout(()=>P(c,!1),2e3)}var v=rb(),y=F(v),b=F(y),x=F(b);Tp(F(x),{size:14}),Ke(),D(x);var S=L(x,2),C=F(S),w=F(C),T=F(w),ee=e=>{xp(e,{size:14,class:`text-success`})},te=e=>{zp(e,{size:14,class:`text-fg-subtle`})};W(T,e=>{z(c)?e(ee):e(te,-1)}),D(w);var ne=L(w,2);qp(F(ne),{size:14,class:`text-fg-subtle`}),D(ne),D(C);var re=L(C,2),ie=F(re);_p(F(ie),{size:12}),Ke(),D(ie);var ae=L(ie,2);sm(F(ae),{size:12}),Ke(),D(ae);var oe=L(ae,2);Dm(F(oe),{size:12}),Ke(),D(oe),D(re);var se=L(re,2);jp(F(se),{size:14,class:`text-fg-subtle`}),D(se),D(S),D(b);var ce=L(b,2),le=F(ce),E=F(le),ue=F(E,!0);D(E);var de=L(E,2),fe=F(de),pe=e=>{H(e,Qy())};W(fe,e=>{t.trace.partial&&e(pe)});var me=L(fe,2),he=F(me,!0);D(me);var ge=L(me,2),_e=F(ge),ve=F(_e);D(_e),Q_(L(_e,2),{get value(){return t.trace.traceId},label:`Copy trace ID`,stop:!1}),D(ge),D(de),D(le);var ye=L(le,2),be=F(ye),xe=F(be,!0);D(be);var Se=L(be,2),Ce=F(Se,!0);D(Se);var we=L(Se,2),Te=F(we);D(we),D(ye),D(ce),D(y);var Ee=L(y,2),De=e=>{var t=eb(),n=F(t);L_(n,{placeholder:`Search spans… (press /)`,ariaLabel:`Search spans by name or service`,clearTitle:`Clear search`,get value(){return z(a)},set value(e){P(a,e,!0)},get ref(){return z(s)},set ref(e){P(s,e,!0)}});var r=L(n,2),i=e=>{var t=$y(),n=F(t);D(t),R(()=>U(n,`${z(o)??``}
|
|
7
|
+
${z(o)===1?`match`:`matches`}`)),H(e,t)},c=M(()=>z(a).trim());W(r,e=>{z(c)&&e(i)}),D(t),H(e,t)};W(Ee,e=>{z(n)===`waterfall`&&e(De)});var Oe=L(Ee,2),ke=F(Oe),Ae=F(ke),je=e=>{{let n=M(()=>z(r)?.spanId);m_(e,{get trace(){return t.trace},onSpanSelect:i,get selectedSpanId(){return z(n)},get query(){return z(a)},onMatchCount:e=>P(o,e,!0)})}},Me=e=>{{let n=M(()=>z(r)?.spanId);j_(e,{get trace(){return t.trace},onSpanSelect:i,get selectedSpanId(){return z(n)}})}},Ne=e=>{var n=tb(),a=F(n);G(a,21,()=>t.trace.spans,e=>e.spanId,(e,n)=>{{let a=M(()=>z(r)?.spanId===z(n).spanId);My(e,{get span(){return z(n)},get trace(){return t.trace},get isSelected(){return z(a)},onSelect:()=>i(z(n))})}}),D(a),D(n),H(e,n)};W(Ae,e=>{z(n)===`waterfall`?e(je):z(n)===`flame`?e(Me,1):e(Ne,-1)}),D(ke);var Pe=L(ke,2),Fe=e=>{var n=nb(),a=I(n);_y(a,X({get dragging(){return z(f)},title:`Drag to resize the detail panel · double-click to reset`},()=>z(p)));var o=L(a,2);hy(F(o),{get span(){return z(r)},get trace(){return t.trace},onClose:()=>i(null)}),D(o),R(()=>oo(o,`width: ${z(d)??``}px;`)),H(e,n)};W(Pe,e=>{z(r)&&e(Fe)}),D(Oe),Vo(Oe,e=>P(l,e),()=>z(l)),D(v),R((e,n,r,i,a,o,s)=>{q(x,1,e),q(ie,1,n),q(ae,1,r),q(oe,1,i),U(ue,t.trace.rootSpan.name||`Trace`),U(he,a),U(ve,`Trace ID: ${t.trace.traceId??``}`),q(be,1,o),U(xe,t.trace.status),U(Ce,s),U(Te,`${t.trace.spans.length??``} spans`)},[()=>K($(`text-xs text-fg-muted hover:text-fg`,`flex items-center gap-1 transition-colors`)),()=>K($(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`waterfall`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>K($(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`flame`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>K($(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`list`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>h(t.trace.startTime),()=>K($(`font-medium text-sm mb-1`,cd(t.trace.status))),()=>ad(t.trace.duration)]),B(`click`,x,()=>Nu(null)),B(`click`,w,_),B(`click`,ne,g),B(`click`,ie,()=>P(n,`waterfall`)),B(`click`,ae,()=>P(n,`flame`)),B(`click`,oe,()=>P(n,`list`)),B(`click`,se,()=>el(vg)),H(e,v),at()}ea([`click`]);var ab=V(`<span class="ml-0.5 min-w-[16px] px-1 rounded-full bg-accent text-[10px] font-semibold text-white text-center tabular-nums"> </span>`),ob=V(`<div class="sticky top-0 bg-surface p-2 border-b border-line-subtle"><div class="relative"><!> <input type="text" placeholder="Narrow options…" class="w-full pl-6 pr-2 py-1 text-xs rounded border border-line bg-subtle text-fg focus:outline-none focus:border-accent"/></div></div>`),sb=V(`<span class="text-accent normal-case"> </span>`),cb=V(`<div class="px-1 py-1 text-xs text-fg-subtle">No matches</div>`),lb=ca(`<svg viewBox="0 0 12 12" class="w-2.5 h-2.5 text-white" fill="none" stroke="currentColor" stroke-width="2"><path d="M2.5 6.5l2.5 2.5 4.5-5" stroke-linecap="round" stroke-linejoin="round"></path></svg>`),ub=V(`<button type="button" role="menuitemcheckbox"><span><!></span> <span class="flex-1 truncate"> </span> <span class="flex-shrink-0 font-mono tabular-nums text-fg-subtle"> </span></button>`),db=V(`<div class="flex flex-col gap-0.5"></div>`),fb=V(`<div class="p-2 border-b border-line-subtle last:border-b-0"><div class="flex items-center justify-between px-1 pb-1 text-[10px] font-semibold uppercase tracking-wide text-fg-subtle"><span> </span> <!></div> <!></div>`),pb=V(`<button type="button" class="flex items-center gap-1 w-full px-3 py-2 text-xs text-fg-subtle hover:bg-hover transition-colors border-t border-line"><!> Clear all filters</button>`),mb=V(`<div class="absolute right-0 z-30 mt-1 w-64 max-h-[60vh] overflow-auto rounded-md border border-line bg-surface shadow-lg" role="menu"><!> <!> <!></div>`),hb=V(`<div class="relative"><button type="button" aria-haspopup="true" title="Filter by facets"><!> <span>Filter</span> <!></button> <!></div>`);function gb(e,t){it(t,!0);let n=Z(t,`searchThreshold`,3,8),r=N(!1),i=N(``),a=N(void 0),o=M(()=>t.facets.reduce((e,t)=>e+t.selected.size,0)),s=M(()=>t.facets.some(e=>e.options.length>n()));function c(e){let t=z(i).trim().toLowerCase();return[...t?e.options.filter(e=>e.value.toLowerCase().includes(t)):e.options].sort((t,n)=>{let r=+!!e.selected.has(t.value),i=+!!e.selected.has(n.value);return r===i?t.count===n.count?t.value.localeCompare(n.value):n.count-t.count:i-r})}function l(){P(r,!z(r)),z(r)||P(i,``)}Lr(()=>{if(!z(r))return;let e=e=>{z(a)&&!e.composedPath().includes(z(a))&&(P(r,!1),P(i,``))},t=e=>{e.key===`Escape`&&(P(r,!1),P(i,``))};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}});var u=hb(),d=F(u),f=F(d);lm(f,{size:12});var p=L(f,4),m=e=>{var t=ab(),n=F(t,!0);D(t),R(()=>U(n,z(o))),H(e,t)};W(p,e=>{z(o)>0&&e(m)}),D(d);var h=L(d,2),g=e=>{var n=mb(),r=F(n),a=e=>{var t=ob(),n=F(t),r=F(n);Ch(r,{size:12,class:`absolute left-2 top-1/2 -translate-y-1/2 text-fg-subtle`});var a=L(r,2);xo(a),D(n),D(t),Ao(a,()=>z(i),e=>P(i,e)),H(e,t)};W(r,e=>{z(s)&&e(a)});var l=L(r,2);G(l,17,()=>t.facets,e=>e.key,(e,t)=>{let n=M(()=>c(z(t)));var r=fb(),i=F(r),a=F(i),o=F(a,!0);D(a);var s=L(a,2),l=e=>{var n=sb(),r=F(n,!0);D(n),R(()=>U(r,z(t).selected.size)),H(e,n)};W(s,e=>{z(t).selected.size>0&&e(l)}),D(i);var u=L(i,2),d=e=>{H(e,cb())},f=e=>{var r=db();G(r,21,()=>z(n),e=>e.value,(e,n)=>{let r=M(()=>z(t).selected.has(z(n).value));var i=ub(),a=F(i),o=F(a),s=e=>{H(e,lb())};W(o,e=>{z(r)&&e(s)}),D(a);var c=L(a,2),l=F(c,!0);D(c);var u=L(c,2),d=F(u,!0);D(u),D(i),R((e,t)=>{q(i,1,e),J(i,`aria-checked`,z(r)),q(a,1,t),J(c,`title`,z(n).value),U(l,z(n).value),U(d,z(n).count)},[()=>K($(`flex items-center gap-2 px-1.5 py-1 rounded text-xs text-left transition-colors`,z(r)?`bg-accent/15 text-accent`:`text-fg-muted hover:bg-hover`)),()=>K($(`flex-shrink-0 w-3 h-3 rounded-sm border flex items-center justify-center`,z(r)?`bg-accent border-accent`:`border-line`))]),B(`click`,i,()=>z(t).onToggle(z(n).value)),H(e,i)}),D(r),H(e,r)};W(u,e=>{z(n).length===0?e(d):e(f,-1)}),D(r),R(()=>U(o,z(t).label)),H(e,r)});var u=L(l,2),d=e=>{var n=pb();rg(F(n),{size:12}),Ke(),D(n),B(`click`,n,function(...e){t.onClearAll?.apply(this,e)}),H(e,n)};W(u,e=>{z(o)>0&&e(d)}),D(n),H(e,n)};W(h,e=>{z(r)&&e(g)}),D(u),Vo(u,e=>P(a,e),()=>z(a)),R(e=>{q(d,1,e),J(d,`aria-expanded`,z(r))},[()=>K($(`flex items-center gap-1 px-2 py-1 text-xs rounded border transition-colors`,z(o)>0||z(r)?`border-accent/40 bg-accent/10 text-accent`:`border-line text-fg-muted hover:bg-hover`))]),B(`click`,d,l),H(e,u),at()}ea([`click`]);var _b={"=~":`REGEXP`,"!~":`NOT REGEXP`},vb=/[^\s()[\],=!<>^$"']/,yb=[`>=`,`<=`,`!=`,`=~`,`!~`,`=`,`>`,`<`,`^`,`$`];function bb(e){let t=[],n=0,r=(e,n,r,i,a=!0)=>t.push({type:e,value:n,from:r,to:i,terminated:a});for(;n<e.length;){let t=e[n];if(/\s/.test(t)){n++;continue}let i={"(":`lparen`,")":`rparen`,"[":`lbracket`,"]":`rbracket`,",":`comma`};if(i[t]){r(i[t],t,n,n+1),n++;continue}if(t===`"`||t===`'`){let i=n,a=t;n++;let o=``,s=!1;for(;n<e.length;){if(e[n]===`\\`&&n+1<e.length){o+=e[n+1],n+=2;continue}if(e[n]===a){n++,s=!0;break}o+=e[n],n++}r(`string`,o,i,n,s);continue}let a=yb.find(t=>e.startsWith(t,n));if(a){r(`sigil`,a,n,n+a.length),n+=a.length;continue}let o=n;for(;n<e.length&&vb.test(e[n]);)n++;n===o&&n++,r(`word`,e.slice(o,n),o,n)}return t}var xb=new Set([`and`,`or`]),Sb=new Set([`null`,`nil`]),Cb=new Map([[`contains`,`CONTAINS`],[`regexp`,`REGEXP`],[`in`,`IN`]]);function wb(e){let t=bb(e),n=[],r=()=>({from:t.length?t[t.length-1].to:0,to:e.length}),i=0,a=(e=0)=>t[i+e],o=()=>t[i++],s=(e,t)=>n.push({message:e,range:t}),c=(e=0)=>{let t=a(e);return t?.type===`word`?t.value.toLowerCase():void 0},l=(e=0)=>{let t=c(e);return t!==void 0&&xb.has(t)};function u(e,t){return{from:e.from,to:t.to}}function d(){let e=o();if(!e){s(`Expected a value`,r());return}if(e.type===`string`)return e.terminated||s(`Unterminated quoted string`,{from:e.from,to:e.to}),{type:`string`,value:e.value};if(e.type===`lbracket`){let e=[];if(a()?.type===`rbracket`)return o(),{type:`array`,values:e};for(;;){let t=d();if(!t)return{type:`array`,values:e};e.push(t);let n=a();if(n?.type===`comma`){o();continue}return n?.type===`rbracket`?(o(),{type:`array`,values:e}):(s(`Expected "," or "]" in array`,n??r()),{type:`array`,values:e})}}if(e.type===`word`){let t=e.value.toLowerCase();if(Sb.has(t))return{type:`null`};if(t===`true`)return{type:`boolean`,value:!0};if(t===`false`)return{type:`boolean`,value:!1};let n=Number(e.value);return Number.isFinite(n)?{type:`number`,value:n}:{type:`string`,value:e.value}}s(`Expected a value, found "${e.value}"`,e)}function f(){let e=a();if(!e)return;if(e.type===`sigil`)return o(),_b[e.value]??e.value;if(e.type!==`word`)return;let t=e.value.toLowerCase();if(t===`not`){let e=c(1),t=e?Cb.get(e):void 0;return t?(o(),o(),`NOT ${t}`):void 0}let n=Cb.get(t);if(n)return o(),n}function p(){let e=a();if(!e){s(`Expected a condition`,r());return}if(e.type===`lparen`){o();let e=g(),t=a();return t?.type===`rparen`?o():s(`Unclosed parenthesis — expected ")"`,t??r()),e}if(e.type===`word`||e.type===`string`){let n=i;o();let r=f();if(r){let n=d();if(!n)return;let a=t[i-1];return{type:`comparison`,field:e.value,op:r,value:n,range:u(e,a??e)}}return i=n,o(),e.type===`string`&&!e.terminated&&s(`Unterminated quoted string`,{from:e.from,to:e.to}),{type:`freeText`,text:e.value,range:{from:e.from,to:e.to}}}s(`Unexpected "${e.value}"`,e),o()}function m(){let e=a();return!e||e.type===`rparen`||e.type===`rbracket`||e.type===`comma`?!1:!l()}function h(){let e=p();if(e)for(;;){if(c()===`and`){o();let t=p();if(!t)return e;e={type:`and`,left:e,right:t,range:Tb(e,t)};continue}if(m()){let t=p();if(!t)return e;e={type:`and`,left:e,right:t,range:Tb(e,t)};continue}return e}}function g(){let e=h();if(e){for(;c()===`or`;){o();let t=h();if(!t)return e;e={type:`or`,left:e,right:t,range:Tb(e,t)}}return e}}if(t.length===0)return{ok:!0,node:{type:`all`}};let _=g(),v=a();return v&&s(`Unexpected "${v.value}"`,v),n.length>0||!_?{ok:!1,errors:n.length>0?n:[{message:`Invalid query`,range:r()}]}:{ok:!0,node:_}}function Tb(e,t){let n=`range`in e?e.range.from:0;return{from:n,to:`range`in t?t.range.to:n}}var Eb=V(`<button type="button" title="Clear query" aria-label="Clear query" class="absolute right-1.5 top-[7px] p-0.5 text-fg-subtle hover:text-fg-muted"><!></button>`),Db=V(`<button type="button" role="option" aria-selected="false" class="block w-full px-2 py-1.5 text-left font-mono text-xs text-fg hover:bg-hover"> </button>`),Ob=V(`<div role="listbox" aria-label="Query fields" class="absolute left-0 right-0 top-full z-30 mt-1 max-h-48 overflow-auto rounded border border-line bg-surface shadow-lg"></div>`),kb=V(`<div id="query-error" role="status" class="mt-1 flex items-start gap-1.5 text-[11px] text-danger"><!> <span> <span class="text-fg-subtle"> </span></span></div>`),Ab=V(`<div><!> <input spellcheck="false" autocomplete="off" autocapitalize="off" aria-label="Query"/> <!> <!> <!></div>`);function jb(e,t){it(t,!0);let n=Z(t,`placeholder`,3,`Filter — e.g. service = api AND duration > 100`),r=Z(t,`fields`,19,()=>[]),i=Z(t,`ref`,15,null),a=M(()=>wb(t.value)),o=M(()=>z(a).ok?[]:z(a).errors),s=M(()=>z(o).length>0?z(o):t.serverErrors??[]),c=M(()=>z(s).length>0&&t.value.trim().length>0),l=N(!1),u=M(()=>{let e=t.value.match(/(?:^|[\s(])([A-Za-z_][\w.-]*)$/),n=e?.[1]?.toLowerCase()??``;return t.value.trim().length>0&&!e?[]:r().filter(e=>e.toLowerCase().startsWith(n)).filter(e=>e.toLowerCase()!==n).slice(0,8)});function d(e){e.key===`Enter`&&!z(c)&&(e.preventDefault(),t.onSubmit(t.value)),e.key===`Escape`&&t.value&&(e.preventDefault(),t.onInput(``),t.onSubmit(``))}function f(){t.onInput(``),t.onSubmit(``),i()?.focus()}function p(e){let n=t.value.match(/(?:^|[\s(])([A-Za-z_][\w.-]*)$/),r=n?.[1]?t.value.length-n[1].length:t.value.length;t.onInput(`${t.value.slice(0,r)}${e} = `),i()?.focus()}var m=Ab(),h=F(m);Ch(h,{size:12,class:`absolute left-2 top-[9px] text-fg-subtle pointer-events-none`});var g=L(h,2);xo(g),Vo(g,e=>i(e),()=>i());var _=L(g,2),v=e=>{var t=Eb();rg(F(t),{size:12}),D(t),B(`click`,t,f),H(e,t)};W(_,e=>{t.value&&e(v)});var y=L(_,2),b=e=>{var t=Ob();G(t,20,()=>z(u),e=>e,(e,t)=>{var n=Db(),r=F(n,!0);D(n),R(()=>U(r,t)),B(`mousedown`,n,e=>e.preventDefault()),B(`click`,n,()=>p(t)),H(e,n)}),D(t),H(e,t)};W(y,e=>{z(l)&&z(u).length>0&&e(b)});var x=L(y,2),S=e=>{var t=kb(),n=F(t);kp(n,{size:12,class:`mt-px shrink-0`});var r=L(n,2),i=F(r),a=L(i),o=F(a);D(a),D(r),D(t),R(()=>{U(i,`${z(s)[0].message??``} `),U(o,`(column ${z(s)[0].range.from+1})`)}),H(e,t)};W(x,e=>{z(c)&&e(S)}),D(m),R((e,r)=>{q(m,1,e),So(g,t.value),J(g,`placeholder`,n()),J(g,`aria-invalid`,z(c)?`true`:void 0),J(g,`aria-describedby`,z(c)?`query-error`:void 0),q(g,1,r)},[()=>K($(`relative`,t.class)),()=>K($(`w-full pl-7 pr-7 py-1.5 text-xs font-mono rounded border bg-surface text-fg`,`focus:outline-none focus:ring-1`,z(c)?`border-danger-border focus:ring-danger`:`border-line focus:ring-accent`))]),B(`input`,g,e=>t.onInput(e.currentTarget.value)),B(`keydown`,g,d),$i(`focus`,g,()=>P(l,!0)),$i(`blur`,g,()=>P(l,!1)),H(e,m),at()}ea([`input`,`keydown`,`click`,`mousedown`]);function Mb(e){return typeof e==`function`}function Nb(e){return typeof e==`object`&&!!e}var Pb=[`string`,`number`,`bigint`,`boolean`];function Fb(e){return e==null||Pb.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>Fb(e)):typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype}var Ib=Symbol(`box`),Lb=Symbol(`is-writable`);function Rb(e,t){let n=M(e);return t?{[Ib]:!0,[Lb]:!0,get current(){return z(n)},set current(e){t(e)}}:{[Ib]:!0,get current(){return e()}}}function zb(e){return Nb(e)&&Ib in e}function Bb(e){return zb(e)?e:Mb(e)?Rb(e):Vb(e)}function Vb(e){let t=N(_r(e));return{[Ib]:!0,[Lb]:!0,get current(){return z(t)},set current(e){P(t,e,!0)}}}function Hb(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var Ub=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Wb=/\n/g,Gb=/^\s*/,Kb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,qb=/^:\s*/,Jb=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Yb=/^[;\s]*/,Xb=/^\s+|\s+$/g,Zb=`
|
|
8
|
+
`,Qb=`/`,$b=`*`,ex=``,tx=`comment`,nx=`declaration`;function rx(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t=t||{};var n=1,r=1;function i(e){var t=e.match(Wb);t&&(n+=t.length);var i=e.lastIndexOf(Zb);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(Gb)}function u(e){var t;for(e=e||[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(Qb==e.charAt(0)&&$b==e.charAt(1)){for(var n=2;ex!=e.charAt(n)&&($b!=e.charAt(n)||Qb!=e.charAt(n+1));)++n;if(n+=2,ex===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:tx,comment:o})}}function f(){var e=a(),t=c(Kb);if(t){if(d(),!c(qb))return s(`property missing ':'`);var n=c(Jb),r=e({type:nx,property:ix(t[0].replace(Ub,ex)),value:n?ix(n[0].replace(Ub,ex)):ex});return c(Yb),r}}function p(){var e=[];u(e);for(var t;t=f();)t!==!1&&(e.push(t),u(e));return e}return l(),p()}function ix(e){return e?e.replace(Xb,ex):ex}function ax(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=rx(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n=n||{},n[r]=a)}),n}var ox=/\d/,sx=[`-`,`_`,`/`,`.`];function cx(e=``){if(!ox.test(e))return e!==e.toLowerCase()}function lx(e){let t=[],n=``,r,i;for(let a of e){let e=sx.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=cx(a);if(i===!1){if(r===!1&&o===!0){t.push(n),n=a,r=o;continue}if(r===!0&&o===!1&&n.length>1){let e=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=e+a,r=o;continue}}n+=a,r=o,i=e}return t.push(n),t}function ux(e){return e?lx(e).map(e=>fx(e)).join(``):``}function dx(e){return px(ux(e||``))}function fx(e){return e?e[0].toUpperCase()+e.slice(1):``}function px(e){return e?e[0].toLowerCase()+e.slice(1):``}function mx(e){if(!e)return{};let t={};function n(e,n){if(e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)){t[ux(e)]=n;return}if(e.startsWith(`--`)){t[e]=n;return}t[dx(e)]=n}return ax(e,n),t}function hx(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function gx(e,t){let n=RegExp(e,`g`);return e=>{if(typeof e!=`string`)throw TypeError(`expected an argument of type string, but got ${typeof e}`);return e.match(n)?e.replace(n,t):e}}var _x=gx(/[A-Z]/,e=>`-${e.toLowerCase()}`);function vx(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${_x(t)}: ${e[t]};`).join(`
|
|
9
|
+
`)}function yx(e={}){return vx(e).replace(`
|
|
10
|
+
`,` `)}var bx=new Set(`onabort.onanimationcancel.onanimationend.onanimationiteration.onanimationstart.onauxclick.onbeforeinput.onbeforetoggle.onblur.oncancel.oncanplay.oncanplaythrough.onchange.onclick.onclose.oncompositionend.oncompositionstart.oncompositionupdate.oncontextlost.oncontextmenu.oncontextrestored.oncopy.oncuechange.oncut.ondblclick.ondrag.ondragend.ondragenter.ondragleave.ondragover.ondragstart.ondrop.ondurationchange.onemptied.onended.onerror.onfocus.onfocusin.onfocusout.onformdata.ongotpointercapture.oninput.oninvalid.onkeydown.onkeypress.onkeyup.onload.onloadeddata.onloadedmetadata.onloadstart.onlostpointercapture.onmousedown.onmouseenter.onmouseleave.onmousemove.onmouseout.onmouseover.onmouseup.onpaste.onpause.onplay.onplaying.onpointercancel.onpointerdown.onpointerenter.onpointerleave.onpointermove.onpointerout.onpointerover.onpointerup.onprogress.onratechange.onreset.onresize.onscroll.onscrollend.onsecuritypolicyviolation.onseeked.onseeking.onselect.onselectionchange.onselectstart.onslotchange.onstalled.onsubmit.onsuspend.ontimeupdate.ontoggle.ontouchcancel.ontouchend.ontouchmove.ontouchstart.ontransitioncancel.ontransitionend.ontransitionrun.ontransitionstart.onvolumechange.onwaiting.onwebkitanimationend.onwebkitanimationiteration.onwebkitanimationstart.onwebkittransitionend.onwheel`.split(`.`));function xx(e){return bx.has(e)}function Sx(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];if(r){for(let e of Object.keys(r)){let n=t[e],i=r[e],a=typeof n==`function`,o=typeof i==`function`;if(a&&typeof o&&xx(e))t[e]=Hb(n,i);else if(a&&o)t[e]=hx(n,i);else if(e===`class`){let r=Fb(n),a=Fb(i);r&&a?t[e]=$a(n,i):r?t[e]=$a(n):a&&(t[e]=$a(i))}else if(e===`style`){let r=typeof n==`object`,a=typeof i==`object`,o=typeof n==`string`,s=typeof i==`string`;if(r&&a)t[e]={...n,...i};else if(r&&s){let r=mx(i);t[e]={...n,...r}}else if(o&&a)t[e]={...mx(n),...i};else if(o&&s){let r=mx(n),a=mx(i);t[e]={...r,...a}}else r?t[e]=n:a?t[e]=i:o?t[e]=n:s&&(t[e]=i)}else t[e]=i===void 0?n:i}for(let e of Object.getOwnPropertySymbols(r)){let n=t[e],i=r[e];t[e]=i===void 0?n:i}}}return typeof t.style==`object`&&(t.style=yx(t.style).replaceAll(`
|
|
11
|
+
`,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Cx=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function wx(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Tx,Ex=!1,Dx=new WeakMap,Ox=new WeakMap,kx=new WeakMap,Ax=new WeakSet;Tx=class extends Date{constructor(...e){super(...e),kt(this,Ax),O(this,Dx,N(super.getTime())),O(this,Ox,new Map),O(this,kx,li),Ex||k(Ax,this,jx).call(this)}};function jx(){Ex=!0;var e=Tx.prototype,t=Date.prototype,n=Object.getOwnPropertyNames(t);for(let r of n)(r.startsWith(`get`)||r.startsWith(`to`)||r===`valueOf`)&&(e[r]=function(...e){if(e.length>0)return z(j(Dx,this)),t[r].apply(this,e);var n=j(Ox,this).get(r);if(n===void 0){let i=li;di(j(kx,this)),n=M(()=>(z(j(Dx,this)),t[r].apply(this,e))),j(Ox,this).set(r,n),di(i)}return z(n)}),r.startsWith(`set`)&&(e[r]=function(...e){var n=t[r].apply(this,e);return P(j(Dx,this),t.getTime.call(this)),n})}var Mx,Nx,Px=[`forEach`,`isDisjointFrom`,`isSubsetOf`,`isSupersetOf`],Fx=[`difference`,`intersection`,`symmetricDifference`,`union`],Ix=!1,Lx=new WeakMap,Rx=new WeakMap,zx=new WeakMap,Bx=new WeakMap,Vx=new WeakSet;Nx=Symbol.iterator,Mx=class extends Set{constructor(e){if(super(),kt(this,Vx),O(this,Lx,new Map),O(this,Rx,N(0)),O(this,zx,N(0)),O(this,Bx,Si||-1),e){for(var t of e)super.add(t);j(zx,this).v=super.size}Ix||k(Vx,this,Ux).call(this)}has(e){var t=super.has(e),n=j(Lx,this),r=n.get(e);if(r===void 0){if(!t)return z(j(Rx,this)),!1;r=k(Vx,this,Hx).call(this,!0),n.set(e,r)}return z(r),t}add(e){return super.has(e)||(super.add(e),P(j(zx,this),super.size),hr(j(Rx,this))),this}delete(e){var t=super.delete(e),n=j(Lx,this),r=n.get(e);return r!==void 0&&(n.delete(e),P(r,!1)),t&&(P(j(zx,this),super.size),hr(j(Rx,this))),t}clear(){if(super.size!==0){super.clear();var e=j(Lx,this);for(var t of e.values())P(t,!1);e.clear(),P(j(zx,this),0),hr(j(Rx,this))}}keys(){return this.values()}values(){return z(j(Rx,this)),super.values()}entries(){return z(j(Rx,this)),super.entries()}[Nx](){return this.keys()}get size(){return z(j(zx,this))}};function Hx(e){return Si===j(Bx,this)?N(e):dr(e)}function Ux(){Ix=!0;var e=Mx.prototype,t=Set.prototype;for(let n of Px)e[n]=function(...e){return z(j(Rx,this)),t[n].apply(this,e)};for(let n of Fx)e[n]=function(...e){z(j(Rx,this));var r=t[n].apply(this,e);return new Mx(r)}}function Wx(e){return Wx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wx(e)}function Gx(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=Wx(e))!==null;);return e}function Kx(){return Kx=typeof Reflect<`u`&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=Gx(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Kx.apply(null,arguments)}function qx(e,t,n,r){var i=Kx(Wx(1&r?e.prototype:e),t,n);return 2&r&&typeof i==`function`?function(e){return i.apply(n,e)}:i}var Jx,Yx,Xx=new WeakMap,Zx=new WeakMap,Qx=new WeakMap,$x=new WeakMap,eS=new WeakSet;Yx=Symbol.iterator;var tS=class extends Map{constructor(e){if(super(),kt(this,eS),O(this,Xx,new Map),O(this,Zx,N(0)),O(this,Qx,N(0)),O(this,$x,Si||-1),e){for(var[t,n]of e)super.set(t,n);j(Qx,this).v=super.size}}has(e){var t=j(Xx,this),n=t.get(e);if(n===void 0){if(super.has(e))n=k(eS,this,nS).call(this,0),t.set(e,n);else return z(j(Zx,this)),!1}return z(n),!0}forEach(e,t){k(eS,this,rS).call(this),super.forEach(e,t)}get(e){var t=j(Xx,this),n=t.get(e);if(n===void 0){if(super.has(e))n=k(eS,this,nS).call(this,0),t.set(e,n);else{z(j(Zx,this));return}}return z(n),super.get(e)}set(e,t){var n=j(Xx,this),r=n.get(e),i=super.get(e),a=super.set(e,t),o=j(Zx,this);if(r===void 0)r=k(eS,this,nS).call(this,0),n.set(e,r),P(j(Qx,this),super.size),hr(o);else if(i!==t){hr(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&hr(o)}return a}delete(e){var t=j(Xx,this),n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),P(n,-1)),r&&(P(j(Qx,this),super.size),hr(j(Zx,this))),r}clear(){if(super.size!==0){super.clear();var e=j(Xx,this);P(j(Qx,this),0);for(var t of e.values())P(t,-1);hr(j(Zx,this)),e.clear()}}keys(){return z(j(Zx,this)),super.keys()}values(){return k(eS,this,rS).call(this),super.values()}entries(){return k(eS,this,rS).call(this),super.entries()}[Yx](){return this.entries()}get size(){return z(j(Qx,this)),super.size}};Jx=tS;function nS(e){return Si===j($x,this)?N(e):dr(e)}function rS(){z(j(Zx,this));var e=j(Xx,this);if(j(Qx,this).v!==e.size){for(var t of qx(Jx.prototype,`keys`,this,2)([]))if(!e.has(t)){var n=k(eS,this,nS).call(this,0);e.set(t,n)}}for([,n]of j(Xx,this))z(n)}var iS=new WeakMap,aS=new WeakMap;new class{constructor(e={}){O(this,iS,void 0),O(this,aS,void 0);let{window:t=Cx,document:n=t?.document}=e;t!==void 0&&(A(iS,this,n),A(aS,this,Dt(e=>{let n=Qi(t,`focusin`,e),r=Qi(t,`focusout`,e);return()=>{n(),r()}})))}get current(){return j(aS,this)?.call(this),j(iS,this)?wx(j(iS,this)):null}};function oS(e){return typeof e==`function`}var sS=new WeakMap,cS=new WeakMap,lS=class{constructor(e){O(this,sS,void 0),O(this,cS,void 0),A(sS,this,e),A(cS,this,Symbol(e))}get key(){return j(cS,this)}exists(){return nt(j(cS,this))}get(){let e=et(j(cS,this));if(e===void 0)throw Error(`Context "${j(sS,this)}" not found`);return e}getOr(e){let t=et(j(cS,this));return t===void 0?e:t}set(e){return tt(j(cS,this),e)}};function uS(e,t){switch(e){case`post`:Lr(t);break;case`pre`:zr(t)}}function dS(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;uS(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=Pi(()=>n(t,o));return o=t,r})}function fS(e,t,n){dS(e,`post`,t,n)}function pS(e,t,n){dS(e,`pre`,t,n)}fS.pre=pS;function mS(e){return oS(e)?e():e}var hS=new WeakMap,gS=new WeakMap,_S=new WeakMap,vS=new WeakMap,yS=new WeakMap,bS=new WeakMap,xS=new WeakMap,SS=new WeakMap,CS=class{constructor(e,t={box:`border-box`}){O(this,hS,{width:0,height:0}),O(this,gS,!1),O(this,_S,void 0),O(this,vS,void 0),O(this,yS,void 0),O(this,bS,M(()=>(z(j(SS,this))?.(),this.getSize().width))),O(this,xS,M(()=>(z(j(SS,this))?.(),this.getSize().height))),O(this,SS,M(()=>{let e=mS(j(vS,this));if(e)return Dt(t=>{if(!j(yS,this))return;let n=new(j(yS,this)).ResizeObserver(e=>{A(gS,this,!0);for(let t of e){let e=j(_S,this).box===`content-box`?t.contentBoxSize:t.borderBoxSize,n=Array.isArray(e)?e:[e];j(hS,this).width=n.reduce((e,t)=>Math.max(e,t.inlineSize),0),j(hS,this).height=n.reduce((e,t)=>Math.max(e,t.blockSize),0)}t()});return n.observe(e),()=>{A(gS,this,!1),n.disconnect()}})})),A(yS,this,t.window??Cx),A(_S,this,t),A(vS,this,e),A(hS,this,{width:0,height:0})}calculateSize(){let e=mS(j(vS,this));if(!e||!j(yS,this))return;let t=e.offsetWidth,n=e.offsetHeight;if(j(_S,this).box===`border-box`)return{width:t,height:n};let r=j(yS,this).getComputedStyle(e),i=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),a=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),o=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),s=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth);return{width:t-i-o,height:n-a-s}}getSize(){return j(gS,this)?j(hS,this):this.calculateSize()??j(hS,this)}get current(){return z(j(SS,this))?.(),this.getSize()}get width(){return z(j(bS,this))}get height(){return z(j(xS,this))}};function wS(e){Lr(()=>()=>{e()})}function TS(e,t){return setTimeout(t,e)}function ES(e){ji().then(e)}var DS=1,OS=9,kS=11;function AS(e){return Nb(e)&&e.nodeType===DS&&typeof e.nodeName==`string`}function jS(e){return Nb(e)&&e.nodeType===OS}function MS(e){return Nb(e)&&e.constructor?.name===`VisualViewport`}function NS(e){return Nb(e)&&e.nodeType!==void 0}function PS(e){return NS(e)&&e.nodeType===kS&&`host`in e}function FS(e,t){if(!e||!t||!AS(e)||!AS(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&PS(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function IS(e){return jS(e)?e:MS(e)?e.document:e?.ownerDocument??document}function LS(e){return PS(e)?LS(e.host):jS(e)?e.defaultView??window:AS(e)?e.ownerDocument?.defaultView??window:window}function RS(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var zS=new WeakMap,BS=class{get root(){return z(j(zS,this))}set root(e){P(j(zS,this),e)}constructor(e){x(this,`element`,void 0),O(this,zS,M(()=>this.element.current?this.element.current.getRootNode()??document:document)),x(this,`getDocument`,()=>IS(this.root)),x(this,`getWindow`,()=>this.getDocument().defaultView??window),x(this,`getActiveElement`,()=>RS(this.root)),x(this,`isActiveElement`,e=>e===this.getActiveElement()),x(this,`querySelector`,e=>this.root?this.root.querySelector(e):null),x(this,`querySelectorAll`,e=>this.root?this.root.querySelectorAll(e):[]),x(this,`setTimeout`,(e,t)=>this.getWindow().setTimeout(e,t)),x(this,`clearTimeout`,e=>this.getWindow().clearTimeout(e)),this.element=typeof e==`function`?Rb(e):e}getElementById(e){return this.root.getElementById(e)}};function VS(e,t){return{[Li()]:n=>zb(e)?(e.current=n,Pi(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Pi(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function HS(e){return e?`true`:`false`}function US(e){return e?`open`:`closed`}function WS(e){return e===`starting`?{"data-starting-style":``}:e===`ending`?{"data-ending-style":``}:{}}var GS=new WeakMap,KS=new WeakMap,qS=class{constructor(e){O(this,GS,void 0),O(this,KS,void 0),x(this,`attrs`,void 0),A(GS,this,e.getVariant?e.getVariant():null),A(KS,this,j(GS,this)?`data-${j(GS,this)}-`:`data-${e.component}-`),this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${j(KS,this)}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function JS(e){let t=new qS(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var YS=typeof document<`u`,XS=ZS();function ZS(){return YS&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function QS(e){return e instanceof HTMLElement}function $S(e){return e instanceof Element}function eC(e){return e instanceof Element||e instanceof SVGElement}function tC(e){return e.pointerType===`touch`}function nC(e){return e!==null}var rC=new WeakMap,iC=new WeakMap,aC=new WeakMap,oC=new WeakMap,sC=new WeakSet,cC=class{constructor(e){kt(this,sC),O(this,rC,void 0),O(this,iC,null),O(this,aC,null),O(this,oC,0),A(rC,this,e),wS(()=>k(sC,this,lC).call(this))}run(e){k(sC,this,lC).call(this);let t=j(rC,this).ref.current;if(!t)return;if(typeof t.getAnimations!=`function`){k(sC,this,uC).call(this,e);return}let n=j(oC,this),r=()=>{n===j(oC,this)&&k(sC,this,uC).call(this,e)},i=()=>{if(n!==j(oC,this))return;let e=t.getAnimations();if(e.length===0){r();return}Promise.all(e.map(e=>e.finished)).then(()=>{r()}).catch(()=>{if(n===j(oC,this)){if(t.getAnimations().some(e=>e.pending||e.playState!==`finished`)){i();return}r()}})},a=()=>{A(iC,this,window.requestAnimationFrame(()=>{A(iC,this,null),i()}))};if(!j(rC,this).afterTick.current){a();return}A(iC,this,window.requestAnimationFrame(()=>{A(iC,this,null);let e=`data-starting-style`;if(!t.hasAttribute(e)){a();return}A(aC,this,new MutationObserver(()=>{n===j(oC,this)&&(t.hasAttribute(e)||(j(aC,this)?.disconnect(),A(aC,this,null),a()))})),j(aC,this).observe(t,{attributes:!0,attributeFilter:[e]})}))}};function lC(){var e;j(iC,this)!==null&&(window.cancelAnimationFrame(j(iC,this)),A(iC,this,null)),j(aC,this)?.disconnect(),A(aC,this,null),A(oC,this,(e=j(oC,this),e++,e))}function uC(e){let t=()=>{e()};j(rC,this).afterTick?ES(t):t()}var dC=new WeakMap,fC=new WeakMap,pC=new WeakMap,mC=new WeakMap,hC=new WeakMap,gC=new WeakMap,_C=new WeakMap,vC=new WeakSet,yC=class{constructor(e){kt(this,vC),O(this,dC,void 0),O(this,fC,void 0),O(this,pC,void 0),O(this,mC,N(!1)),O(this,hC,N(void 0)),O(this,gC,!1),O(this,_C,null),A(dC,this,e),P(j(mC,this),e.open.current,!0),A(fC,this,e.enabled??!0),A(pC,this,new cC({ref:j(dC,this).ref,afterTick:j(dC,this).open})),wS(()=>k(vC,this,bC).call(this)),fS(()=>j(dC,this).open.current,e=>{if(!j(gC,this)){A(gC,this,!0);return}if(k(vC,this,bC).call(this),!e&&j(dC,this).shouldSkipExitAnimation?.()){P(j(mC,this),!1),P(j(hC,this),void 0),j(dC,this).onComplete?.();return}if(e&&P(j(mC,this),!0),P(j(hC,this),e?`starting`:`ending`,!0),e&&A(_C,this,window.requestAnimationFrame(()=>{A(_C,this,null),j(dC,this).open.current&&P(j(hC,this),void 0)})),!j(fC,this)){e||P(j(mC,this),!1),P(j(hC,this),void 0),j(dC,this).onComplete?.();return}j(pC,this).run(()=>{e===j(dC,this).open.current&&(j(dC,this).open.current||P(j(mC,this),!1),P(j(hC,this),void 0),j(dC,this).onComplete?.())})})}get shouldRender(){return z(j(mC,this))}get transitionStatus(){return z(j(hC,this))}};function bC(){j(_C,this)!==null&&(window.cancelAnimationFrame(j(_C,this)),A(_C,this,null))}function xC(){}function SC(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}function CC(e,t){var n=la();Da(I(n),()=>t.children,e=>{var n=la();La(I(n),()=>t.children??p),H(e,n)}),H(e,n)}var wC=new lS(`BitsConfig`);function TC(){let e=new DC(null,{});return wC.getOr(e).opts}function EC(e){return wC.set(new DC(wC.getOr(null),e))}var DC=class{constructor(e,t){x(this,`opts`,void 0);let n=OC(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function OC(e,t){return n=>Rb(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function kC(e,t){return n=>{let r=TC();return Rb(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var AC=kC(e=>e.defaultPortalTo,`body`);function jC(e,t){it(t,!0);let n=AC(()=>t.to),r=rt(),i=M(a);function a(){if(!YS||t.disabled)return null;let e=null;return e=typeof n.current==`string`?document.querySelector(n.current):n.current,e}let o;function s(){o&&(_a(o),o=null)}fS([()=>z(i),()=>t.disabled],([e,n])=>{if(!e||n){s();return}return o=pa(CC,{target:e,props:{children:t.children},context:r}),()=>{s()}});var c=la(),l=I(c),u=e=>{var n=la();La(I(n),()=>t.children??p),H(e,n)};W(l,e=>{t.disabled&&e(u)}),H(e,c),at()}var MC=class{constructor(e,t={bubbles:!0,cancelable:!0}){x(this,`eventName`,void 0),x(this,`options`,void 0),this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){let n=this.createEvent(t);return e.dispatchEvent(n),n}listen(e,t,n){return Qi(e,this.eventName,e=>{t(e)},n)}};function NC(e,t=500){let n=null,r=(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function PC(e,t){return e===t||e.contains(t)}function FC(e){return e?.ownerDocument??document}function IC(e,t){let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}var LC=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],RC=LC.join(`,`),zC=typeof Element>`u`,BC=zC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,VC=!zC&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},HC=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):HC(e.parentNode))},UC=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},WC=function(e,t,n){if(HC(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(RC));return t&&BC.call(e,RC)&&r.unshift(e),r=r.filter(n),r},GC=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!HC(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=GC(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{BC.call(a,RC)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!HC(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=GC(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}}return r},KC=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},qC=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||UC(e))&&!KC(e)?0:e.tabIndex},JC=function(e,t){var n=qC(e);return n<0&&t&&!KC(e)?0:n},YC=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},XC=function(e){return e.tagName===`INPUT`},ZC=function(e){return XC(e)&&e.type===`hidden`},QC=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},$C=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},ew=function(e){if(!e.name)return!0;var t=e.form||VC(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=$C(r,e.form);return!i||i===e},tw=function(e){return XC(e)&&e.type===`radio`},nw=function(e){return tw(e)&&!ew(e)},rw=function(e){var t=e&&VC(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=VC(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},iw=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},aw=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var i=getComputedStyle(e).visibility;if(i===`hidden`||i===`collapse`)return!0;var a=BC.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(BC.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=VC(e);if(s&&!s.shadowRoot&&r(s)===!0)return iw(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(rw(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return iw(e);return!1},ow=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return BC.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},sw=function(e,t){return!(t.disabled||ZC(t)||aw(t,e)||QC(t)||ow(t))},cw=function(e,t){return!(nw(t)||qC(t)<0||!sw(e,t))},lw=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},uw=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=JC(a,i),s=i?uw(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(YC).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},dw=function(e,t){return t=t||{},uw(t.getShadowRoot?GC([e],t.includeContainer,{filter:cw.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:lw}):WC(e,t.includeContainer,cw.bind(null,t)))},fw=function(e,t){return t=t||{},t.getShadowRoot?GC([e],t.includeContainer,{filter:sw.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):WC(e,t.includeContainer,sw.bind(null,t))},pw=function(e,t){if(t=t||{},!e)throw Error(`No node provided`);return BC.call(e,RC)!==!1&&cw(t,e)},mw=LC.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),hw=function(e,t){if(t=t||{},!e)throw Error(`No node provided`);return BC.call(e,mw)!==!1&&sw(t,e)},gw=`data-context-menu-trigger`,_w=`data-context-menu-content`;new lS(`Menu.Root`),new lS(`Menu.Root | Menu.Sub`),new lS(`Menu.Content`),new lS(`Menu.Group | Menu.RadioGroup`),new lS(`Menu.RadioGroup`),new lS(`Menu.CheckboxGroup`),new MC(`bitsmenuopen`,{bubbles:!1,cancelable:!0}),JS({component:`menu`,parts:[`trigger`,`content`,`sub-trigger`,`item`,`group`,`group-heading`,`checkbox-group`,`checkbox-item`,`radio-group`,`radio-item`,`separator`,`sub-content`,`arrow`]});var vw;(vw=globalThis).bitsDismissableLayers??(vw.bitsDismissableLayers=new Map);var yw=new WeakMap,bw=new WeakMap,xw=new WeakMap,Sw=new WeakMap,Cw=new WeakMap,ww=new WeakMap,Tw=new WeakMap,Ew=new WeakMap,Dw=new WeakMap,Ow=new WeakSet,kw=new WeakMap,Aw=new WeakMap,jw=new WeakMap,Mw=new WeakMap,Nw=new WeakMap,Pw=new WeakMap,Fw=new WeakMap,Iw=new WeakMap,Lw=new WeakMap,Rw=class e{static create(t){return new e(t)}constructor(e){kt(this,Ow),x(this,`opts`,void 0),O(this,yw,void 0),O(this,bw,void 0),O(this,xw,{pointerdown:!1}),O(this,Sw,!1),O(this,Cw,!1),O(this,ww,void 0),O(this,Tw,void 0),O(this,Ew,xC),O(this,Dw,e=>{e.defaultPrevented||this.opts.ref.current&&ES(()=>{!this.opts.ref.current||j(Pw,this).call(this,e.target)||e.target&&!j(Cw,this)&&j(Tw,this).current?.(e)})}),O(this,kw,e=>{let t=e;t.defaultPrevented&&(t=Ww(e)),j(yw,this).current(e)}),O(this,Aw,NC(e=>{if(!this.opts.ref.current){j(Ew,this).call(this);return}let t=this.opts.isValidEvent.current(e,this.opts.ref.current)||Uw(e,this.opts.ref.current);if(!j(Sw,this)||k(Ow,this,Bw).call(this)||!t){j(Ew,this).call(this);return}let n=e;if(n.defaultPrevented&&(n=Ww(n)),j(bw,this).current!==`close`&&j(bw,this).current!==`defer-otherwise-close`){j(Ew,this).call(this);return}e.pointerType===`touch`?(j(Ew,this).call(this),A(Ew,this,Qi(j(ww,this),`click`,j(kw,this),{once:!0}))):j(yw,this).current(n)},10)),O(this,jw,e=>{j(xw,this)[e.type]=!0}),O(this,Mw,e=>{j(xw,this)[e.type]=!1}),O(this,Nw,()=>{this.opts.ref.current&&A(Sw,this,Hw(this.opts.ref.current))}),O(this,Pw,e=>this.opts.ref.current?PC(this.opts.ref.current,e):!1),O(this,Fw,NC(()=>{for(let e in j(xw,this))j(xw,this)[e]=!1;A(Sw,this,!1)},20)),O(this,Iw,()=>{A(Cw,this,!0)}),O(this,Lw,()=>{A(Cw,this,!1)}),x(this,`props`,{onfocuscapture:j(Iw,this),onblurcapture:j(Lw,this)}),this.opts=e,A(bw,this,e.interactOutsideBehavior),A(yw,this,e.onInteractOutside),A(Tw,this,e.onFocusOutside),Lr(()=>{A(ww,this,FC(this.opts.ref.current))});let t=xC,n=null,r=!1,i=()=>{n!=null&&(clearTimeout(n),n=null)},a=()=>{i(),j(Fw,this).call(this),globalThis.bitsDismissableLayers.delete(this),j(Aw,this).destroy(),t()};fS([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return i(),n=TS(1,()=>{n=null,!(r||!this.opts.ref.current)&&(globalThis.bitsDismissableLayers.set(this,j(bw,this)),t(),t=k(Ow,this,zw).call(this))}),a}),wS(()=>{r=!0,i(),j(Fw,this).destroy(),globalThis.bitsDismissableLayers.delete(this),j(Aw,this).destroy(),j(Ew,this).call(this),t()})}};function zw(){return hx(Qi(j(ww,this),`pointerdown`,hx(j(jw,this),j(Nw,this)),{capture:!0}),Qi(j(ww,this),`pointerdown`,hx(j(Mw,this),j(Aw,this))),Qi(j(ww,this),`focusin`,j(Dw,this)))}function Bw(){return Object.values(j(xw,this)).some(Boolean)}function Vw(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function Hw(e){let t=[...globalThis.bitsDismissableLayers],n=Vw(t);if(n)return n[0].opts.ref.current===e;let[r]=t[0];return r.opts.ref.current===e}function Uw(e,t){let n=e.target;if(!eC(n))return!1;let r=!!n.closest(`[${gw}]`),i=!!t.closest(`[${_w}]`);return`button`in e&&e.button>0&&!r?!1:`button`in e&&e.button===0&&r&&i?!0:r&&i?!1:FC(n).documentElement.contains(n)&&!PC(t,n)&&IC(e,t)}function Ww(e){let t=e.currentTarget,n=e.target,r;r=e instanceof PointerEvent?new PointerEvent(e.type,e):new PointerEvent(`pointerdown`,e);let i=!1;return new Proxy(r,{get:(r,a)=>a===`currentTarget`?t:a===`target`?n:a===`preventDefault`?()=>{i=!0,typeof r.preventDefault==`function`&&r.preventDefault()}:a===`defaultPrevented`?i:a in r?r[a]:e[a]})}function Gw(e,t){it(t,!0);let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`onInteractOutside`,3,xC),i=Z(t,`onFocusOutside`,3,xC),a=Z(t,`isValidEvent`,3,()=>!1),o=Rw.create({id:Rb(()=>t.id),interactOutsideBehavior:Rb(()=>n()),onInteractOutside:Rb(()=>r()),enabled:Rb(()=>t.enabled),onFocusOutside:Rb(()=>i()),isValidEvent:Rb(()=>a()),ref:t.ref});var s=la();La(I(s),()=>t.children??p,()=>({props:o.props})),H(e,s),at()}var Kw;(Kw=globalThis).bitsEscapeLayers??(Kw.bitsEscapeLayers=new Map);var qw=new WeakMap,Jw=new WeakMap,Yw=class e{static create(t){return new e(t)}constructor(e){x(this,`opts`,void 0),x(this,`domContext`,void 0),O(this,qw,()=>Qi(this.domContext.getDocument(),`keydown`,j(Jw,this),{passive:!1})),O(this,Jw,e=>{if(e.key!==`Escape`||!Xw(this))return;let t=new KeyboardEvent(e.type,e);e.preventDefault();let n=this.opts.escapeKeydownBehavior.current;(n===`close`||n===`defer-otherwise-close`)&&this.opts.onEscapeKeydown.current(t)}),this.opts=e,this.domContext=new BS(this.opts.ref);let t=xC;fS(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=j(qw,this).call(this)),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}};function Xw(e){let t=[...globalThis.bitsEscapeLayers],n=t.findLast(([e,{current:t}])=>t===`close`||t===`ignore`);if(n)return n[0]===e;let[r]=t[0];return r===e}function Zw(e,t){it(t,!0);let n=Z(t,`escapeKeydownBehavior`,3,`close`),r=Z(t,`onEscapeKeydown`,3,xC);Yw.create({escapeKeydownBehavior:Rb(()=>n()),onEscapeKeydown:Rb(()=>r()),enabled:Rb(()=>t.enabled),ref:t.ref});var i=la();La(I(i),()=>t.children??p),H(e,i),at()}var Qw=new WeakMap,$w=new WeakMap,eT=new WeakMap,tT=class e{constructor(){O(this,Qw,Vb([])),O(this,$w,new WeakMap),O(this,eT,new WeakMap)}static getInstance(){return this.instance||(this.instance=new e),this.instance}register(e){let t=this.getActive();t&&t!==e&&t.pause();let n=document.activeElement;n&&n!==document.body&&j(eT,this).set(e,n),j(Qw,this).current=j(Qw,this).current.filter(t=>t!==e),j(Qw,this).current.unshift(e)}unregister(e){j(Qw,this).current=j(Qw,this).current.filter(t=>t!==e);let t=this.getActive();t&&t.resume()}getActive(){return j(Qw,this).current[0]}setFocusMemory(e,t){j($w,this).set(e,t)}getFocusMemory(e){return j($w,this).get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){j(eT,this).set(e,t)}getPreFocusMemory(e){return j(eT,this).get(e)}clearPreFocusMemory(e){j(eT,this).delete(e)}};x(tT,`instance`,void 0);var nT=new WeakMap,rT=new WeakMap,iT=new WeakMap,aT=new WeakMap,oT=new WeakMap,sT=new WeakSet,cT=class e{constructor(e){kt(this,sT),O(this,nT,!1),O(this,rT,null),O(this,iT,tT.getInstance()),O(this,aT,[]),O(this,oT,void 0),A(oT,this,e)}get paused(){return j(nT,this)}pause(){A(nT,this,!0)}resume(){A(nT,this,!1)}mount(e){j(rT,this)&&this.unmount(),A(rT,this,e),j(iT,this).register(this),k(sT,this,fT).call(this),k(sT,this,uT).call(this)}unmount(){j(rT,this)&&(k(sT,this,lT).call(this),k(sT,this,dT).call(this),j(iT,this).unregister(this),j(iT,this).clearPreFocusMemory(this),A(rT,this,null))}static use(t){let n=null;return fS([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||(n=new e(t)),n.mount(r)):n&&(n.unmount(),n=null)}),wS(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function lT(){for(let e of j(aT,this))e();A(aT,this,[])}function uT(){if(!j(rT,this))return;let e=new CustomEvent(`focusScope.onOpenAutoFocus`,{bubbles:!1,cancelable:!0});j(oT,this).onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!j(rT,this))return;let e=k(sT,this,mT).call(this);e?(e.focus(),j(iT,this).setFocusMemory(this,e)):j(rT,this).focus()})}function dT(){let e=new CustomEvent(`focusScope.onCloseAutoFocus`,{bubbles:!1,cancelable:!0});if(j(oT,this).onCloseAutoFocus.current?.(e),!e.defaultPrevented){let e=j(iT,this).getPreFocusMemory(this);if(e&&document.contains(e))try{e.focus()}catch{document.body.focus()}}}function fT(){if(!j(rT,this)||!j(oT,this).trap.current)return;let e=j(rT,this),t=e.ownerDocument;j(aT,this).push(Qi(t,`focusin`,t=>{if(j(nT,this)||!j(iT,this).isActiveScope(this))return;let n=t.target;if(n){if(e.contains(n))j(iT,this).setFocusMemory(this,n);else{let n=j(iT,this).getFocusMemory(this);if(n&&e.contains(n)&&hw(n))t.preventDefault(),n.focus();else{let t=k(sT,this,mT).call(this),n=k(sT,this,hT).call(this)[0];(t||n||e).focus()}}}},{capture:!0}),Qi(e,`keydown`,e=>{if(!j(oT,this).loop||j(nT,this)||e.key!==`Tab`||!j(iT,this).isActiveScope(this))return;let n=k(sT,this,pT).call(this);if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&t.activeElement===i?(e.preventDefault(),r.focus()):e.shiftKey&&t.activeElement===r&&(e.preventDefault(),i.focus())}));let n=new MutationObserver(()=>{let t=j(iT,this).getFocusMemory(this);if(t&&!e.contains(t)){let t=k(sT,this,mT).call(this),n=k(sT,this,hT).call(this)[0],r=t||n;r?(r.focus(),j(iT,this).setFocusMemory(this,r)):e.focus()}});n.observe(e,{childList:!0,subtree:!0}),j(aT,this).push(()=>n.disconnect())}function pT(){return j(rT,this)?dw(j(rT,this),{includeContainer:!1,getShadowRoot:!0}):[]}function mT(){return k(sT,this,pT).call(this)[0]||null}function hT(){return j(rT,this)?fw(j(rT,this),{includeContainer:!1,getShadowRoot:!0}):[]}function gT(e,t){it(t,!0);let n=Z(t,`enabled`,3,!1),r=Z(t,`trapFocus`,3,!1),i=Z(t,`loop`,3,!1),a=Z(t,`onCloseAutoFocus`,3,xC),o=Z(t,`onOpenAutoFocus`,3,xC),s=cT.use({enabled:Rb(()=>n()),trap:Rb(()=>r()),loop:i(),onCloseAutoFocus:Rb(()=>a()),onOpenAutoFocus:Rb(()=>o()),ref:t.ref});var c=la();La(I(c),()=>t.focusScope??p,()=>({props:s.props})),H(e,c),at()}var _T,vT=()=>{};(_T=globalThis).bitsTextSelectionLayers??(_T.bitsTextSelectionLayers=new Map);var yT=new WeakMap,bT=new WeakMap,xT=new WeakMap,ST=new WeakMap,CT=new WeakSet,wT=new WeakMap,TT=new WeakMap,ET=new WeakMap,DT=class e{static create(t){return new e(t)}constructor(e){kt(this,CT),x(this,`opts`,void 0),x(this,`domContext`,void 0),O(this,yT,xC),O(this,bT,!1),O(this,xT,vT),O(this,ST,vT),O(this,wT,e=>{j(ST,this).call(this,e)}),O(this,TT,e=>{if(!j(bT,this))return;let t=this.opts.ref.current,n=e.target;!QS(t)||!QS(n)||!MT(this)||!FS(t,n)||(j(xT,this).call(this,e),!e.defaultPrevented&&A(yT,this,AT(t,this.domContext.getDocument().body)))}),O(this,ET,()=>{j(yT,this).call(this),A(yT,this,xC)}),this.opts=e,this.domContext=new BS(e.ref);let t=xC;fS(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([e,n,r])=>(A(bT,this,e),A(xT,this,n),A(ST,this,r),e&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=k(CT,this,OT).call(this)),()=>{A(bT,this,!1),t(),j(ET,this).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}};function OT(){return hx(Qi(this.domContext.getDocument(),`pointerdown`,j(TT,this)),Qi(this.domContext.getDocument(),`pointerup`,Hb(j(ET,this),j(wT,this))))}var kT=e=>e.style.userSelect||e.style.webkitUserSelect;function AT(e,t){let n=kT(t),r=kT(e);return jT(t,`none`),jT(e,`text`),()=>{jT(t,n),jT(e,r)}}function jT(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function MT(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function NT(e,t){it(t,!0);let n=Z(t,`preventOverflowTextSelection`,3,!0),r=Z(t,`onPointerDown`,3,xC),i=Z(t,`onPointerUp`,3,xC);DT.create({id:Rb(()=>t.id),onPointerDown:Rb(()=>r()),onPointerUp:Rb(()=>i()),enabled:Rb(()=>t.enabled&&n()),ref:t.ref});var a=la();La(I(a),()=>t.children??p),H(e,a),at()}var PT;(PT=globalThis).bitsIdCounter??(PT.bitsIdCounter={current:0});function FT(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var IT=new WeakMap,LT=new WeakMap,RT=new WeakMap,zT=new WeakMap,BT=new WeakSet,VT=class{constructor(e){kt(this,BT),O(this,IT,void 0),O(this,LT,0),O(this,RT,N()),O(this,zT,void 0),A(IT,this,e)}get(...e){return A(LT,this,j(LT,this)+1),z(j(RT,this))===void 0&&A(zT,this,Br(()=>{P(j(RT,this),j(IT,this).call(this,...e),!0)})),Lr(()=>()=>{k(BT,this,HT).call(this)}),z(j(RT,this))}};function HT(){A(LT,this,j(LT,this)-1),j(zT,this)&&j(LT,this)<=0&&(j(zT,this).call(this),P(j(RT,this),void 0),A(zT,this,void 0))}var UT=new tS,WT=N(null),GT=null,KT=null,qT=!1,JT=Rb(()=>{for(let e of UT.values())if(e)return!0;return!1}),YT=null,XT=new VT(()=>{function e(){document.body.setAttribute(`style`,z(WT)??``),document.body.style.removeProperty(`--scrollbar-width`),XS&>?.(),P(WT,null)}function t(){KT!==null&&(window.clearTimeout(KT),KT=null)}function n(e,n){t(),qT=!0,YT=Date.now();let r=YT,i=()=>{KT=null,YT===r&&(nE(UT)?qT=!1:(qT=!1,n()))},a=e===null?24:e;KT=window.setTimeout(i,a)}function r(){z(WT)===null&&UT.size===0&&!qT&&P(WT,document.body.getAttribute(`style`),!0)}return fS(()=>JT.current,()=>{if(!JT.current)return;r(),qT=!1;let e=getComputedStyle(document.documentElement),t=getComputedStyle(document.body),n=e.scrollbarGutter?.includes(`stable`)||t.scrollbarGutter?.includes(`stable`),i=window.innerWidth-document.documentElement.clientWidth,a={padding:Number.parseInt(t.paddingRight??`0`,10)+i,margin:Number.parseInt(t.marginRight??`0`,10)};i>0&&!n&&(document.body.style.paddingRight=`${a.padding}px`,document.body.style.marginRight=`${a.margin}px`,document.body.style.setProperty(`--scrollbar-width`,`${i}px`)),document.body.style.overflow=`hidden`,XS&&(GT=Qi(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),ES(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})}),wS(()=>()=>{GT?.()}),{get lockMap(){return UT},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}}),ZT=new WeakMap,QT=new WeakMap,$T=new WeakMap,eE=new WeakMap,tE=class{constructor(e,t=()=>null){O(this,ZT,FT()),O(this,QT,void 0),O(this,$T,()=>null),O(this,eE,void 0),x(this,`locked`,void 0),A(QT,this,e),A($T,this,t),A(eE,this,XT.get()),j(eE,this)&&(j(eE,this).cancelPendingCleanup(),j(eE,this).ensureInitialStyleCaptured(),j(eE,this).lockMap.set(j(ZT,this),j(QT,this)??!1),this.locked=Rb(()=>j(eE,this).lockMap.get(j(ZT,this))??!1,e=>j(eE,this).lockMap.set(j(ZT,this),e)),wS(()=>{if(j(eE,this).lockMap.delete(j(ZT,this)),nE(j(eE,this).lockMap))return;let e=j($T,this).call(this);j(eE,this).scheduleCleanupIfNoNewLocks(e,()=>{j(eE,this).resetBodyStyle()})}))}};function nE(e){for(let[t,n]of e)if(n)return!0;return!1}function rE(e,t){it(t,!0);let n=Z(t,`preventScroll`,3,!0),r=Z(t,`restoreScrollDelay`,3,null);n()&&new tE(n(),()=>r()),at()}function iE(e,t){it(t,!0),EC({defaultPortalTo:Rb(()=>t.defaultPortalTo),defaultLocale:Rb(()=>t.defaultLocale)});var n=la();La(I(n),()=>t.children??p),H(e,n),at()}var aE=[`top`,`right`,`bottom`,`left`],oE=Math.min,sE=Math.max,cE=Math.round,lE=Math.floor,uE=e=>({x:e,y:e}),dE={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function fE(e,t,n){return sE(e,oE(t,n))}function pE(e,t){return typeof e==`function`?e(t):e}function mE(e){return e.split(`-`)[0]}function hE(e){return e.split(`-`)[1]}function gE(e){return e===`x`?`y`:`x`}function _E(e){return e===`y`?`height`:`width`}function vE(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function yE(e){return gE(vE(e))}function bE(e,t,n){n===void 0&&(n=!1);let r=hE(e),i=yE(e),a=_E(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=kE(o)),[o,kE(o)]}function xE(e){let t=kE(e);return[SE(e),t,SE(t)]}function SE(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var CE=[`left`,`right`],wE=[`right`,`left`],TE=[`top`,`bottom`],EE=[`bottom`,`top`];function DE(e,t,n){switch(e){case`top`:case`bottom`:return n?t?wE:CE:t?CE:wE;case`left`:case`right`:return t?TE:EE;default:return[]}}function OE(e,t,n,r){let i=hE(e),a=DE(mE(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(SE)))),a}function kE(e){let t=mE(e);return dE[t]+e.slice(t.length)}function AE(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function jE(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:AE(e)}function ME(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 NE(e,t,n){let{reference:r,floating:i}=e,a=vE(t),o=yE(t),s=_E(o),c=mE(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}}let m=hE(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function PE(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}=pE(t,e),p=jE(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ME(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=ME(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 FE=50,IE=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:PE},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=NE(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<FE&&(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}=NE(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},LE=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}=pE(e,t)||{};if(l==null)return{};let d=jE(u),f={x:n,y:r},p=yE(i),m=_E(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,ee=oE(d[_],T),te=oE(d[v],T),ne=C-h[m]-te,re=C/2-h[m]/2+w,ie=fE(ee,re,ne),ae=!c.arrow&&hE(i)!=null&&re!==ie&&a.reference[m]/2-(re<ee?ee:te)-h[m]/2<0,oe=ae?re<ee?re-ee:re-ne:0;return{[p]:f[p]+oe,data:{[p]:ie,centerOffset:re-ie-oe,...ae&&{alignmentOffset:oe}},reset:ae}}}),RE=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}=pE(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=mE(r),_=vE(o),v=mE(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[kE(o)]:xE(o)),x=p!==`none`;!d&&x&&b.push(...OE(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=bE(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`||_===vE(t)||T.every(e=>vE(e.placement)!==_||e.overflows[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=vE(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}if(r!==n)return{reset:{placement:n}}}return{}}}};function zE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function BE(e){return aE.some(t=>e[t]>=0)}var VE=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=pE(e,t);switch(i){case`referenceHidden`:{let e=zE(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:BE(e)}}}case`escaped`:{let e=zE(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:BE(e)}}}default:return{}}}}},HE=new Set([`left`,`top`]);async function UE(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=mE(n),s=hE(n),c=vE(n)===`y`,l=HE.has(o)?-1:1,u=a&&c?-1:1,d=pE(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 WE=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 UE(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}}}}},GE=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}=pE(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=vE(i),p=gE(f),m=u[p],h=u[f],g=(e,t)=>fE(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},KE=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}=pE(e,t),u={x:n,y:r},d=vE(i),f=gE(d),p=u[f],m=u[d],h=pE(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};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=HE.has(mE(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}}}},qE=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=pE(e,t),c=await i.detectOverflow(t,s),l=mE(n),u=hE(n),d=vE(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=oE(p-c[m],g),y=oE(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*sE(c.left,c.right):S=p-2*sE(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function JE(){return typeof window<`u`}function YE(e){return QE(e)?(e.nodeName||``).toLowerCase():`#document`}function XE(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ZE(e){return((QE(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function QE(e){return JE()?e instanceof Node||e instanceof XE(e).Node:!1}function $E(e){return JE()?e instanceof Element||e instanceof XE(e).Element:!1}function eD(e){return JE()?e instanceof HTMLElement||e instanceof XE(e).HTMLElement:!1}function tD(e){return!JE()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof XE(e).ShadowRoot}function nD(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=pD(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function rD(e){return/^(table|td|th)$/.test(YE(e))}function iD(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var aD=/transform|translate|scale|rotate|perspective|filter/,oD=/paint|layout|strict|content/,sD=e=>!!e&&e!==`none`,cD;function lD(e){let t=$E(e)?pD(e):e;return sD(t.transform)||sD(t.translate)||sD(t.scale)||sD(t.rotate)||sD(t.perspective)||!dD()&&(sD(t.backdropFilter)||sD(t.filter))||aD.test(t.willChange||``)||oD.test(t.contain||``)}function uD(e){let t=hD(e);for(;eD(t)&&!fD(t);){if(lD(t))return t;if(iD(t))return null;t=hD(t)}return null}function dD(){return cD??(cD=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`)),cD}function fD(e){return/^(html|body|#document)$/.test(YE(e))}function pD(e){return XE(e).getComputedStyle(e)}function mD(e){return $E(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hD(e){if(YE(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||tD(e)&&e.host||ZE(e);return tD(t)?t.host:t}function gD(e){let t=hD(e);return fD(t)?(e.ownerDocument||e).body:eD(t)&&nD(t)?t:gD(t)}function _D(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=gD(e),i=r===e.ownerDocument?.body,a=XE(r);if(i){let e=vD(a);return t.concat(a,a.visualViewport||[],nD(r)?r:[],e&&n?_D(e):[])}return t.concat(r,_D(r,[],n))}function vD(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yD(e){let t=pD(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=eD(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=cE(n)!==a||cE(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function bD(e){return $E(e)?e:e.contextElement}function xD(e){let t=bD(e);if(!eD(t))return uE(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=yD(t),o=(a?cE(n.width):n.width)/r,s=(a?cE(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var SD=uE(0);function CD(e){let t=XE(e);return!dD()||!t.visualViewport?SD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wD(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===XE(e)}function TD(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=bD(e),o=uE(1);t&&(r?$E(r)&&(o=xD(r)):o=xD(e));let s=wD(a,n,r)?CD(a):uE(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&&r){let e=XE(a),t=$E(r)?XE(r):r,n=e,i=vD(n);for(;i&&t!==n;){let e=xD(i),t=i.getBoundingClientRect(),r=pD(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=XE(i),i=vD(n)}}return ME({width:u,height:d,x:c,y:l})}function ED(e,t){let n=mD(e).scrollLeft;return t?t.left+n:TD(ZE(e)).left+n}function DD(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ED(e,n),y:n.top+t.scrollTop}}function OD(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=ZE(r),s=t?iD(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=uE(1),u=uE(0),d=eD(r);if((d||!a)&&((YE(r)!==`body`||nD(o))&&(c=mD(r)),d)){let e=TD(r);l=xD(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?DD(o,c):uE(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 kD(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function AD(e){let t=mD(e),n=e.ownerDocument.body,r=sE(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=sE(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+ED(e),o=-t.scrollTop;return pD(n).direction===`rtl`&&(a+=sE(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var jD=25;function MD(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=XE(e),a=ZE(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!dD()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(ED(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=jD&&(s-=o)}return{width:s,height:c,x:l,y:u}}function ND(e,t){let n=TD(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=xD(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function PD(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=MD(e,n,t);else if(t===`document`)r=AD(ZE(e));else if($E(t))r=ND(t,n);else{let n=CD(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ME(r)}function FD(e,t){let n=t.get(e);if(n)return n;let r=_D(e,[],!1).filter(e=>$E(e)&&YE(e)!==`body`),i=null,a=pD(e).position===`fixed`,o=a?hD(e):e;for(;$E(o)&&!fD(o);){let e=pD(o),t=lD(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=hD(o)}return t.set(e,r),r}function ID(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?iD(t)?[]:FD(t,this._c):[].concat(n),r],o=PD(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=PD(t,a[e],i);s=sE(n.top,s),c=oE(n.right,c),l=oE(n.bottom,l),u=sE(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function LD(e){let{width:t,height:n}=yD(e);return{width:t,height:n}}function RD(e,t,n){let r=eD(t),i=ZE(t),a=n===`fixed`,o=TD(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=uE(0);if((r||!a)&&((YE(t)!==`body`||nD(i))&&(s=mD(t)),r)){let e=TD(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=ED(i));let l=i&&!r&&!a?DD(i,s):uE(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function zD(e){return pD(e).position===`static`}function BD(e,t){if(!eD(e)||pD(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return ZE(e)===n&&(n=n.ownerDocument.body),n}function VD(e,t){let n=XE(e);if(iD(e))return n;if(!eD(e)){let t=hD(e);for(;t&&!fD(t);){if($E(t)&&!zD(t))return t;t=hD(t)}return n}let r=BD(e,t);for(;r&&rD(r)&&zD(r);)r=BD(r,t);return r&&fD(r)&&zD(r)&&!lD(r)?n:r||uD(e)||n}var HD=async function(e){let t=this.getOffsetParent||VD,n=this.getDimensions,r=await n(e.floating);return{reference:RD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function UD(e){return pD(e).direction===`rtl`}var WD={convertOffsetParentRelativeRectToViewportRelativeRect:OD,getDocumentElement:ZE,getClippingRect:ID,getOffsetParent:VD,getElementRects:HD,getClientRects:kD,getDimensions:LD,getScale:xD,isElement:$E,isRTL:UD};function GD(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function KD(e,t,n){let r=null,i,a=ZE(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=lE(d),h=lE(a.clientWidth-(u+f)),g=lE(a.clientHeight-(d+p)),_=lE(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:sE(0,oE(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!GD(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=XE(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function qD(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=bD(e),u=i||a?[...l?_D(l):[],...t?_D(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?KD(l,n,a):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?TD(e):null;c&&g();function g(){let t=TD(e);h&&!GD(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 JD=WE,YD=GE,XD=RE,ZD=qE,QD=VE,$D=LE,eO=KE,tO=(e,t,n)=>{let r=new Map,i=n??{},a={...WD,...i.platform,_c:r};return IE(e,t,{...i,platform:a})};function nO(e){return typeof e==`function`?e():e}function rO(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function iO(e,t){let n=rO(e);return Math.round(t*n)/n}function aO(e){return{[`--bits-${e}-content-transform-origin`]:`var(--bits-floating-transform-origin)`,[`--bits-${e}-content-available-width`]:`var(--bits-floating-available-width)`,[`--bits-${e}-content-available-height`]:`var(--bits-floating-available-height)`,[`--bits-${e}-anchor-width`]:`var(--bits-floating-anchor-width)`,[`--bits-${e}-anchor-height`]:`var(--bits-floating-anchor-height)`}}function oO(e){let t=e.whileElementsMounted,n=M(()=>nO(e.open)??!0),r=M(()=>nO(e.middleware)),i=M(()=>nO(e.transform)??!0),a=M(()=>nO(e.placement)??`bottom`),o=M(()=>nO(e.strategy)??`absolute`),s=M(()=>nO(e.sideOffset)??0),c=M(()=>nO(e.alignOffset)??0),l=e.reference,u=N(0),d=N(0),f=Vb(null),p=N(_r(z(o))),m=N(_r(z(a))),h=N(_r({})),g=N(!1),_=!1,v=0,y=M(()=>{let e=f.current?iO(f.current,z(u)):z(u),t=f.current?iO(f.current,z(d)):z(d);return z(i)?{position:z(p),left:`0`,top:`0`,transform:`translate(${e}px, ${t}px)`,...f.current&&rO(f.current)>=1.5&&{willChange:`transform`}}:{position:z(p),left:`${e}px`,top:`${t}px`}}),b;function x(){if(l.current===null||f.current===null)return;let e=l.current,t=f.current,i=++v;tO(e,t,{middleware:z(r),placement:z(a),strategy:z(o)}).then(r=>{if(i===v&&l.current===e&&f.current===t){if(sO(e)){P(h,{...z(h),hide:{...z(h).hide,referenceHidden:!0}},!0);return}if(!z(n)&&z(u)!==0&&z(d)!==0){let e=Math.max(Math.abs(z(s)),Math.abs(z(c)),15);if(r.x<=e&&r.y<=e)return}P(u,r.x,!0),P(d,r.y,!0),P(p,r.strategy,!0),P(m,r.placement,!0),P(h,r.middlewareData,!0),P(g,!0)}})}function S(){typeof b==`function`&&(b(),b=void 0),v++}function C(){if(S(),t===void 0){x();return}z(n)&&l.current!==null&&f.current!==null&&(b=t(l.current,f.current,x))}function w(){!z(n)&&f.current===null&&P(g,!1)}function T(){return[z(r),z(a),z(o),z(s),z(c),z(n)]}return Lr(()=>{t===void 0&&z(n)&&x()}),Lr(C),Lr(()=>{if(t!==void 0){if(T(),!z(n)){_=!1;return}if(!z(g)){_=!1;return}if(!_){_=!0;return}x()}}),Lr(w),Lr(()=>S),{floating:f,reference:l,get strategy(){return z(p)},get placement(){return z(m)},get middlewareData(){return z(h)},get isPositioned(){return z(g)},get floatingStyles(){return z(y)},get update(){return x}}}function sO(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var cO={top:`bottom`,right:`left`,bottom:`top`,left:`right`},lO=new lS(`Floating.Root`),uO=new lS(`Floating.Content`),dO=new lS(`Floating.Root`),fO=class e{static create(t=!1){return t?dO.set(new e):lO.set(new e)}constructor(){x(this,`anchorNode`,Vb(null)),x(this,`customAnchorNode`,Vb(null)),x(this,`triggerNode`,Vb(null)),Lr(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current==`string`?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},pO=new WeakMap,mO=new WeakMap,hO=new WeakMap,gO=new WeakMap,_O=new WeakMap,vO=new WeakMap,yO=new WeakMap,bO=new WeakMap,xO=new WeakMap,SO=new WeakMap,CO=new WeakMap,wO=new WeakMap,TO=new WeakMap,EO=new WeakMap,DO=new WeakMap,OO=new WeakMap,kO=new WeakMap,AO=new WeakMap,jO=new WeakMap,MO=new WeakMap,NO=new WeakMap,PO=new WeakMap,FO=new WeakMap,IO=new WeakMap,LO=class e{static create(t,n=!1){return n?uO.set(new e(t,dO.get())):uO.set(new e(t,lO.get()))}get hasExplicitBoundaries(){return z(j(bO,this))}set hasExplicitBoundaries(e){P(j(bO,this),e)}get detectOverflowOptions(){return z(j(xO,this))}set detectOverflowOptions(e){P(j(xO,this),e)}get middleware(){return z(j(EO,this))}set middleware(e){P(j(EO,this),e)}get placedSide(){return z(j(DO,this))}set placedSide(e){P(j(DO,this),e)}get placedAlign(){return z(j(OO,this))}set placedAlign(e){P(j(OO,this),e)}get arrowX(){return z(j(kO,this))}set arrowX(e){P(j(kO,this),e)}get arrowY(){return z(j(AO,this))}set arrowY(e){P(j(AO,this),e)}get cannotCenterArrow(){return z(j(jO,this))}set cannotCenterArrow(e){P(j(jO,this),e)}get contentZIndex(){return z(j(MO,this))}set contentZIndex(e){P(j(MO,this),e,!0)}get arrowBaseSide(){return z(j(NO,this))}set arrowBaseSide(e){P(j(NO,this),e)}get wrapperProps(){return z(j(PO,this))}set wrapperProps(e){P(j(PO,this),e)}get props(){return z(j(FO,this))}set props(e){P(j(FO,this),e)}get arrowStyle(){return z(j(IO,this))}set arrowStyle(e){P(j(IO,this),e)}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`contentRef`,Vb(null)),x(this,`wrapperRef`,Vb(null)),x(this,`arrowRef`,Vb(null)),x(this,`contentAttachment`,VS(this.contentRef)),x(this,`wrapperAttachment`,VS(this.wrapperRef)),x(this,`arrowAttachment`,VS(this.arrowRef)),x(this,`arrowId`,Vb(FT())),O(this,pO,M(()=>{if(typeof this.opts.style==`string`)return mx(this.opts.style);if(!this.opts.style)return{}})),O(this,mO,void 0),O(this,hO,new CS(()=>this.arrowRef.current??void 0)),O(this,gO,M(()=>j(hO,this)?.width??0)),O(this,_O,M(()=>j(hO,this)?.height??0)),O(this,vO,M(()=>this.opts.side?.current+(this.opts.align.current===`center`?``:`-${this.opts.align.current}`))),O(this,yO,M(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current])),O(this,bO,M(()=>z(j(yO,this)).length>0)),O(this,xO,M(()=>({padding:this.opts.collisionPadding.current,boundary:z(j(yO,this)).filter(nC),altBoundary:this.hasExplicitBoundaries}))),O(this,SO,N(void 0)),O(this,CO,N(void 0)),O(this,wO,N(void 0)),O(this,TO,N(void 0)),O(this,EO,M(()=>[JD({mainAxis:this.opts.sideOffset.current+z(j(_O,this)),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&YD({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current===`partial`?eO():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&XD({...this.detectOverflowOptions}),ZD({...this.detectOverflowOptions,apply:({rects:e,availableWidth:t,availableHeight:n})=>{let{width:r,height:i}=e.reference;P(j(SO,this),t,!0),P(j(CO,this),n,!0),P(j(wO,this),r,!0),P(j(TO,this),i,!0)}}),this.arrowRef.current&&$D({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),zO({arrowWidth:z(j(gO,this)),arrowHeight:z(j(_O,this))}),this.opts.hideWhenDetached.current&&QD({strategy:`referenceHidden`,...this.detectOverflowOptions})].filter(Boolean))),x(this,`floating`,void 0),O(this,DO,M(()=>VO(this.floating.placement))),O(this,OO,M(()=>HO(this.floating.placement))),O(this,kO,M(()=>this.floating.middlewareData.arrow?.x??0)),O(this,AO,M(()=>this.floating.middlewareData.arrow?.y??0)),O(this,jO,M(()=>this.floating.middlewareData.arrow?.centerOffset!==0)),O(this,MO,N()),O(this,NO,M(()=>cO[this.placedSide])),O(this,PO,M(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":``,style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${z(j(SO,this))}px`,"--bits-floating-available-height":`${z(j(CO,this))}px`,"--bits-floating-anchor-width":`${z(j(wO,this))}px`,"--bits-floating-anchor-height":`${z(j(TO,this))}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:`hidden`,"pointer-events":`none`},...z(j(pO,this))},dir:this.opts.dir.current,...this.wrapperAttachment}))),O(this,FO,M(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:yx({...z(j(pO,this))}),...this.contentAttachment}))),O(this,IO,M(()=>({position:`absolute`,left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[this.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[this.placedSide],visibility:this.cannotCenterArrow?`hidden`:void 0}))),this.opts=e,this.root=t,A(mO,this,e.updatePositionStrategy),e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),fS(()=>e.customAnchor.current,e=>{this.root.customAnchorNode.current=e}),this.floating=oO({strategy:()=>this.opts.strategy.current,placement:()=>z(j(vO,this)),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...e)=>qD(...e,{animationFrame:j(mO,this)?.current===`always`}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),Lr(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),fS(()=>this.contentRef.current,e=>{if(!e||!this.opts.enabled.current)return;let t=LS(e),n=t.requestAnimationFrame(()=>{if(this.contentRef.current!==e||!this.opts.enabled.current)return;let n=t.getComputedStyle(e).zIndex;n!==this.contentZIndex&&(this.contentZIndex=n)});return()=>{t.cancelAnimationFrame(n)}}),Lr(()=>{this.floating.floating.current=this.wrapperRef.current})}},RO=class e{static create(t,n=!1){return n?new e(t,dO.get()):new e(t,lO.get())}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),this.opts=e,this.root=t,t.triggerNode=e.virtualEl&&e.virtualEl.current?Bb(e.virtualEl.current):e.ref}};function zO(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=BO(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}}function BO(e){let[t,n=`center`]=e.split(`-`);return[t,n]}function VO(e){return BO(e)[0]}function HO(e){return BO(e)[1]}function UO(e,t){it(t,!0);let n=Z(t,`tooltip`,3,!1);fO.create(n());var r=la();La(I(r),()=>t.children??p),H(e,r),at()}function WO(e,t){it(t,!0);let n=Z(t,`tooltip`,3,!1);RO.create({id:Rb(()=>t.id),virtualEl:Rb(()=>t.virtualEl),ref:t.ref},n());var r=la();La(I(r),()=>t.children??p),H(e,r),at()}function GO(e,t){it(t,!0);let n=Z(t,`side`,3,`bottom`),r=Z(t,`sideOffset`,3,0),i=Z(t,`align`,3,`center`),a=Z(t,`alignOffset`,3,0),o=Z(t,`arrowPadding`,3,0),s=Z(t,`avoidCollisions`,3,!0),c=Z(t,`collisionBoundary`,19,()=>[]),l=Z(t,`collisionPadding`,3,0),u=Z(t,`hideWhenDetached`,3,!1),d=Z(t,`onPlaced`,3,()=>{}),f=Z(t,`sticky`,3,`partial`),m=Z(t,`updatePositionStrategy`,3,`optimized`),h=Z(t,`strategy`,3,`fixed`),g=Z(t,`dir`,3,`ltr`),_=Z(t,`style`,19,()=>({})),v=Z(t,`wrapperId`,19,FT),y=Z(t,`customAnchor`,3,null),b=Z(t,`tooltip`,3,!1),x=LO.create({side:Rb(()=>n()),sideOffset:Rb(()=>r()),align:Rb(()=>i()),alignOffset:Rb(()=>a()),id:Rb(()=>t.id),arrowPadding:Rb(()=>o()),avoidCollisions:Rb(()=>s()),collisionBoundary:Rb(()=>c()),collisionPadding:Rb(()=>l()),hideWhenDetached:Rb(()=>u()),onPlaced:Rb(()=>d()),sticky:Rb(()=>f()),updatePositionStrategy:Rb(()=>m()),strategy:Rb(()=>h()),dir:Rb(()=>g()),style:Rb(()=>_()),enabled:Rb(()=>t.enabled),wrapperId:Rb(()=>v()),customAnchor:Rb(()=>y())},b()),S=M(()=>Sx(x.wrapperProps,{style:{pointerEvents:`auto`}}));var C=la();La(I(C),()=>t.content??p,()=>({props:x.props,wrapperProps:z(S)})),H(e,C),at()}function KO(e,t){it(t,!0),Wo(()=>{t.onPlaced?.()});var n=la();La(I(n),()=>t.content??p,()=>({props:{},wrapperProps:{}})),H(e,n),at()}var qO=new Set([`$$slots`,`$$events`,`$$legacy`,`content`,`isStatic`,`onPlaced`]);function JO(e,t){let n=Z(t,`isStatic`,3,!1),r=Y(t,qO);var i=la(),a=I(i),o=e=>{KO(e,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},s=e=>{GO(e,X({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};W(a,e=>{n()?e(o):e(s,-1)}),H(e,i)}var YO=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled.ref.tooltip.contentPointerEvents`.split(`.`)),XO=V(`<!> <!>`,1);function ZO(e,t){it(t,!0);let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Z(t,`tooltip`,3,!1),c=Z(t,`contentPointerEvents`,3,`auto`),l=Y(t,YO),u=M(()=>t.preventScroll??!0),d=M(()=>t.strategy??(z(u)?`fixed`:`absolute`));JO(e,{get isStatic(){return o()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return z(d)},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get enabled(){return t.enabled},get tooltip(){return s()},content:(e,a)=>{let o=()=>(a?.()).props,s=()=>(a?.()).wrapperProps;var d=XO(),f=I(d),m=e=>{rE(e,{get preventScroll(){return z(u)}})},h=e=>{rE(e,{get preventScroll(){return z(u)}})};W(f,e=>{t.forceMount&&t.enabled?e(m):t.forceMount||e(h,1)}),gT(L(f,2),{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return r()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(e,r)=>{let a=()=>(r?.()).props;Zw(e,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,r)=>{Gw(e,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return i()},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{let r=()=>(n?.()).props;NT(e,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{var i=la(),u=I(i);{let e=M(()=>({props:Sx(l,o(),r(),a(),{style:{pointerEvents:c()}}),wrapperProps:s()}));La(u,()=>t.popper??p,()=>z(e))}H(e,i)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),H(e,d)},$$slots:{content:!0}}),at()}var QO=new Set(`$$slots.$$events.$$legacy.popper.open.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.ref.shouldRender`.split(`.`));function $O(e,t){let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Y(t,QO);var c=la(),l=I(c),u=e=>{ZO(e,X({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>s))};W(l,e=>{t.shouldRender&&e(u)}),H(e,c)}var ek=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled`.split(`.`));function tk(e,t){let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Y(t,ek);ZO(e,X({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside}},()=>s,{forceMount:!0}))}function nk(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]??[0,0],[c,l]=t[o]??[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function rk(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function ik(e,t){let n=e.left+e.width/2,r=e.top+e.height/2,i=t.left+t.width/2,a=t.top+t.height/2,o=i-n,s=a-r;return Math.abs(o)>Math.abs(s)?o>0?`right`:`left`:s>0?`bottom`:`top`}var ak=new WeakMap,ok=new WeakMap,sk=new WeakMap,ck=new WeakMap,lk=new WeakMap,uk=new WeakMap,dk=new WeakMap,fk=new WeakMap,pk=new WeakMap,mk=new WeakSet,hk=class{constructor(e){kt(this,mk),O(this,ak,void 0),O(this,ok,void 0),O(this,sk,void 0),O(this,ck,null),O(this,lk,null),O(this,uk,[]),O(this,dk,null),O(this,fk,null),O(this,pk,null),A(ak,this,e),A(ok,this,e.buffer??1);let t=e.transitIntentTimeout;A(sk,this,typeof t==`number`&&t>0?t:null),fS([e.triggerNode,e.contentNode,e.enabled],([e,t,n])=>{if(!e||!t||!n){A(dk,this,null),k(mk,this,xk).call(this);return}return j(dk,this)&&j(dk,this)!==e&&k(mk,this,xk).call(this),A(dk,this,e),[Qi(IS(e),`pointermove`,n=>{k(mk,this,bk).call(this,[n.clientX,n.clientY],e,t)}),Qi(e,`pointerleave`,e=>{let n=e.relatedTarget;if($S(n)&&t.contains(n))return;let r=j(ak,this).ignoredTargets?.()??[];$S(n)&&r.some(e=>e===n||e.contains(n))||(A(uk,this,$S(n)&&r.length>0?r.filter(e=>n.contains(e)):[]),A(ck,this,[e.clientX,e.clientY]),A(lk,this,`content`),k(mk,this,_k).call(this))}),Qi(e,`pointerenter`,()=>{k(mk,this,xk).call(this)}),Qi(t,`pointerenter`,()=>{k(mk,this,xk).call(this)}),Qi(t,`pointerleave`,t=>{let n=t.relatedTarget;$S(n)&&e.contains(n)||(A(ck,this,[t.clientX,t.clientY]),A(lk,this,`trigger`),k(mk,this,_k).call(this))})].reduce((e,t)=>()=>{e(),t()},()=>{})})}};function gk(){j(fk,this)!==null&&(cancelAnimationFrame(j(fk,this)),A(fk,this,null))}function _k(){k(mk,this,gk).call(this),A(fk,this,requestAnimationFrame(()=>{A(fk,this,null),!(!j(ck,this)||!j(lk,this))&&(k(mk,this,xk).call(this),j(ak,this).onPointerExit())}))}function vk(){j(pk,this)!==null&&(clearTimeout(j(pk,this)),A(pk,this,null))}function yk(){j(sk,this)!==null&&(k(mk,this,vk).call(this),A(pk,this,window.setTimeout(()=>{A(pk,this,null),!(!j(ck,this)||!j(lk,this))&&(k(mk,this,xk).call(this),j(ak,this).onPointerExit())},j(sk,this))))}function bk(e,t,n){if(!j(ck,this)||!j(lk,this))return;k(mk,this,gk).call(this),k(mk,this,yk).call(this);let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();if(j(lk,this)===`content`&&rk(e,i)){k(mk,this,xk).call(this);return}if(j(lk,this)===`trigger`&&rk(e,r)){k(mk,this,xk).call(this);return}if(j(lk,this)===`content`&&j(uk,this).length>0)for(let t of j(uk,this)){let n=t.getBoundingClientRect();if(rk(e,n))return;let i=ik(r,n),a=k(mk,this,Sk).call(this,r,n,i);if(a&&nk(e,a))return}let a=ik(r,i),o=k(mk,this,Sk).call(this,r,i,a);if(o&&nk(e,o))return;let s=j(lk,this)===`content`?i:r;nk(e,k(mk,this,Ck).call(this,j(ck,this),s,a,j(lk,this)))||(k(mk,this,xk).call(this),j(ak,this).onPointerExit())}function xk(){A(ck,this,null),A(lk,this,null),A(uk,this,[]),k(mk,this,gk).call(this),k(mk,this,vk).call(this)}function Sk(e,t,n){let r=j(ok,this);switch(n){case`top`:return[[Math.min(e.left,t.left)-r,e.top],[Math.min(e.left,t.left)-r,t.bottom],[Math.max(e.right,t.right)+r,t.bottom],[Math.max(e.right,t.right)+r,e.top]];case`bottom`:return[[Math.min(e.left,t.left)-r,e.bottom],[Math.min(e.left,t.left)-r,t.top],[Math.max(e.right,t.right)+r,t.top],[Math.max(e.right,t.right)+r,e.bottom]];case`left`:return[[e.left,Math.min(e.top,t.top)-r],[t.right,Math.min(e.top,t.top)-r],[t.right,Math.max(e.bottom,t.bottom)+r],[e.left,Math.max(e.bottom,t.bottom)+r]];case`right`:return[[e.right,Math.min(e.top,t.top)-r],[t.left,Math.min(e.top,t.top)-r],[t.left,Math.max(e.bottom,t.bottom)+r],[e.right,Math.max(e.bottom,t.bottom)+r]]}}function Ck(e,t,n,r){let i=j(ok,this)*4,[a,o]=e;switch(r===`trigger`?k(mk,this,wk).call(this,n):n){case`top`:return[[a-i,o+i],[a+i,o+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case`bottom`:return[[a-i,o-i],[a+i,o-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case`left`:return[[a+i,o-i],[a+i,o+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case`right`:return[[a-i,o-i],[a-i,o+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}function wk(e){switch(e){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`}}var Tk=JS({component:`popover`,parts:[`root`,`trigger`,`content`,`close`,`overlay`]}),Ek=new lS(`Popover.Root`),Dk=new WeakMap,Ok=new WeakMap,kk=new WeakMap,Ak=new WeakMap,jk=new WeakMap,Mk=new WeakMap,Nk=new WeakMap,Pk=new WeakMap,Fk=new WeakMap,Ik=new WeakSet,Lk=class e{static create(t){return Ek.set(new e(t))}get contentNode(){return z(j(Dk,this))}set contentNode(e){P(j(Dk,this),e,!0)}get triggerNode(){return z(j(Ok,this))}set triggerNode(e){P(j(Ok,this),e,!0)}get overlayNode(){return z(j(kk,this))}set overlayNode(e){P(j(kk,this),e,!0)}get openedViaHover(){return z(j(Ak,this))}set openedViaHover(e){P(j(Ak,this),e,!0)}get hasInteractedWithContent(){return z(j(jk,this))}set hasInteractedWithContent(e){P(j(jk,this),e,!0)}get hoverCooldown(){return z(j(Mk,this))}set hoverCooldown(e){P(j(Mk,this),e,!0)}get closeDelay(){return z(j(Nk,this))}set closeDelay(e){P(j(Nk,this),e,!0)}constructor(e){kt(this,Ik),x(this,`opts`,void 0),O(this,Dk,N(null)),x(this,`contentPresence`,void 0),O(this,Ok,N(null)),O(this,kk,N(null)),x(this,`overlayPresence`,void 0),O(this,Ak,N(!1)),O(this,jk,N(!1)),O(this,Mk,N(!1)),O(this,Nk,N(0)),O(this,Pk,null),O(this,Fk,null),this.opts=e,this.contentPresence=new yC({ref:Rb(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new yC({ref:Rb(()=>this.overlayNode),open:this.opts.open}),fS(()=>this.opts.open.current,e=>{e||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,k(Ik,this,Rk).call(this))})}setDomContext(e){A(Fk,this,e)}toggleOpen(){k(Ik,this,Rk).call(this),this.opts.open.current=!this.opts.open.current}handleClose(){k(Ik,this,Rk).call(this),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){k(Ik,this,Rk).call(this),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(k(Ik,this,Rk).call(this),this.closeDelay<=0?this.opts.open.current=!1:j(Fk,this)&&A(Pk,this,j(Fk,this).setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),A(Pk,this,null)},this.closeDelay))))}cancelDelayedClose(){k(Ik,this,Rk).call(this)}markInteraction(){this.hasInteractedWithContent=!0,k(Ik,this,Rk).call(this)}};function Rk(){j(Pk,this)!==null&&j(Fk,this)&&(j(Fk,this).clearTimeout(j(Pk,this)),A(Pk,this,null))}var zk=new WeakMap,Bk=new WeakMap,Vk=new WeakMap,Hk=new WeakSet,Uk=new WeakMap,Wk=class e{static create(t){return new e(t,Ek.get())}constructor(e,t){kt(this,Hk),x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`attachment`,void 0),x(this,`domContext`,void 0),O(this,zk,null),O(this,Bk,null),O(this,Vk,N(!1)),O(this,Uk,M(()=>({id:this.opts.id.current,"aria-haspopup":`dialog`,"aria-expanded":HS(this.root.opts.open.current),"data-state":US(this.root.opts.open.current),"aria-controls":k(Hk,this,Jk).call(this),[Tk.trigger]:``,disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}))),this.opts=e,this.root=t,this.attachment=VS(this.opts.ref,e=>this.root.triggerNode=e),this.domContext=new BS(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),fS(()=>this.opts.closeDelay.current,e=>{this.root.closeDelay=e})}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||tC(e)||(P(j(Vk,this),!0),k(Hk,this,Kk).call(this),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;let t=this.opts.openDelay.current;t<=0?this.root.handleHoverOpen():A(zk,this,this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),A(zk,this,null)},t))}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(tC(e)||(P(j(Vk,this),!1),k(Hk,this,Gk).call(this),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(k(Hk,this,qk).call(this),z(j(Vk,this))&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}z(j(Vk,this))&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),k(Hk,this,qk).call(this),this.root.toggleOpen())}get props(){return z(j(Uk,this))}set props(e){P(j(Uk,this),e)}};function Gk(){j(zk,this)!==null&&(this.domContext.clearTimeout(j(zk,this)),A(zk,this,null))}function Kk(){j(Bk,this)!==null&&(this.domContext.clearTimeout(j(Bk,this)),A(Bk,this,null))}function qk(){k(Hk,this,Gk).call(this),k(Hk,this,Kk).call(this)}function Jk(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}var Yk=new WeakMap,Xk=new WeakMap,Zk=class e{static create(t){return new e(t,Ek.get())}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`attachment`,void 0),x(this,`onInteractOutside`,e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!$S(e.target))return;let t=e.target.closest(Tk.selector(`trigger`));if(!(t&&t===this.root.triggerNode)){if(this.opts.customAnchor.current){if($S(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current==`string`){let t=document.querySelector(this.opts.customAnchor.current);if(t&&t.contains(e.target))return}}this.root.handleClose()}}),x(this,`onEscapeKeydown`,e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()}),O(this,Yk,M(()=>({open:this.root.opts.open.current}))),O(this,Xk,M(()=>({id:this.opts.id.current,tabindex:-1,"data-state":US(this.root.opts.open.current),...WS(this.root.contentPresence.transitionStatus),[Tk.content]:``,style:{pointerEvents:`auto`,contain:`layout style`},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}))),x(this,`popperProps`,{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}),this.opts=e,this.root=t,this.attachment=VS(this.opts.ref,e=>this.root.contentNode=e),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new hk({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){let t=e.target;$S(t)&&pw(t)&&this.root.markInteraction()}onpointerenter(e){tC(e)||this.root.cancelDelayedClose()}onpointerleave(e){tC(e)}get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}get snippetProps(){return z(j(Yk,this))}set snippetProps(e){P(j(Yk,this),e)}get props(){return z(j(Xk,this))}set props(e){P(j(Xk,this),e)}},Qk=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`,`forceMount`,`onOpenAutoFocus`,`onCloseAutoFocus`,`onEscapeKeydown`,`onInteractOutside`,`trapFocus`,`preventScroll`,`customAnchor`,`style`]),$k=V(`<div><div><!></div></div>`);function eA(e,t){let n=ua();it(t,!0);let r=Z(t,`ref`,15,null),i=Z(t,`id`,19,()=>SC(n)),a=Z(t,`forceMount`,3,!1),o=Z(t,`onOpenAutoFocus`,3,xC),s=Z(t,`onCloseAutoFocus`,3,xC),c=Z(t,`onEscapeKeydown`,3,xC),l=Z(t,`onInteractOutside`,3,xC),u=Z(t,`trapFocus`,3,!0),d=Z(t,`preventScroll`,3,!1),f=Z(t,`customAnchor`,3,null),m=Y(t,Qk),h=Zk.create({id:Rb(()=>i()),ref:Rb(()=>r(),e=>r(e)),onInteractOutside:Rb(()=>l()),onEscapeKeydown:Rb(()=>c()),customAnchor:Rb(()=>f())}),g=M(()=>Sx(m,h.props)),_=M(()=>u()&&h.shouldTrapFocus);function v(e){h.shouldTrapFocus||e.preventDefault(),o()(e)}var y=la(),b=I(y),x=e=>{tk(e,X(()=>z(g),()=>h.popperProps,{get ref(){return h.opts.ref},get enabled(){return h.root.opts.open.current},get id(){return i()},get trapFocus(){return z(_)},get preventScroll(){return d()},loop:!0,forceMount:!0,get customAnchor(){return f()},onOpenAutoFocus:v,get onCloseAutoFocus(){return s()},get shouldRender(){return h.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=M(()=>Sx(r(),{style:aO(`popover`)},{style:t.style}));var o=la(),s=I(o),c=e=>{var n=la(),r=I(n);{let e=M(()=>({props:z(a),wrapperProps:i(),...h.snippetProps}));La(r,()=>t.child,()=>z(e))}H(e,n)},l=e=>{var n=$k();Eo(n,()=>({...i()}));var r=F(n);Eo(r,()=>({...z(a)})),La(F(r),()=>t.children??p),D(r),D(n),H(e,n)};W(s,e=>{t.child?e(c):e(l,-1)}),H(e,o)},$$slots:{popper:!0}}))},S=e=>{$O(e,X(()=>z(g),()=>h.popperProps,{get ref(){return h.opts.ref},get open(){return h.root.opts.open.current},get id(){return i()},get trapFocus(){return z(_)},get preventScroll(){return d()},loop:!0,forceMount:!1,get customAnchor(){return f()},onOpenAutoFocus:v,get onCloseAutoFocus(){return s()},get shouldRender(){return h.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=M(()=>Sx(r(),{style:aO(`popover`)},{style:t.style}));var o=la(),s=I(o),c=e=>{var n=la(),r=I(n);{let e=M(()=>({props:z(a),wrapperProps:i(),...h.snippetProps}));La(r,()=>t.child,()=>z(e))}H(e,n)},l=e=>{var n=$k();Eo(n,()=>({...i()}));var r=F(n);Eo(r,()=>({...z(a)})),La(F(r),()=>t.children??p),D(r),D(n),H(e,n)};W(s,e=>{t.child?e(c):e(l,-1)}),H(e,o)},$$slots:{popper:!0}}))};W(b,e=>{a()?e(x):a()||e(S,1)}),H(e,y),at()}var tA=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`type`,`disabled`,`openOnHover`,`openDelay`,`closeDelay`]),nA=V(`<button><!></button>`);function rA(e,t){let n=ua();it(t,!0);let r=Z(t,`id`,19,()=>SC(n)),i=Z(t,`ref`,15,null),a=Z(t,`type`,3,`button`),o=Z(t,`disabled`,3,!1),s=Z(t,`openOnHover`,3,!1),c=Z(t,`openDelay`,3,700),l=Z(t,`closeDelay`,3,300),u=Y(t,tA),d=Wk.create({id:Rb(()=>r()),ref:Rb(()=>i(),e=>i(e)),disabled:Rb(()=>!!o()),openOnHover:Rb(()=>s()),openDelay:Rb(()=>c()),closeDelay:Rb(()=>l())}),f=M(()=>Sx(u,d.props,{type:a()}));WO(e,{get id(){return r()},get ref(){return d.opts.ref},children:(e,n)=>{var r=la(),i=I(r),a=e=>{var n=la();La(I(n),()=>t.child,()=>({props:z(f)})),H(e,n)},o=e=>{var n=nA();Eo(n,()=>({...z(f)})),La(F(n),()=>t.children??p),D(n),H(e,n)};W(i,e=>{t.child?e(a):e(o,-1)}),H(e,r)},$$slots:{default:!0}}),at()}function iA(e,t){it(t,!0);let n=Z(t,`open`,15,!1),r=Z(t,`onOpenChange`,3,xC),i=Z(t,`onOpenChangeComplete`,3,xC);Lk.create({open:Rb(()=>n(),e=>{n(e),r()(e)}),onOpenChangeComplete:Rb(()=>i())}),UO(e,{children:(e,n)=>{var r=la();La(I(r),()=>t.children??p),H(e,r)},$$slots:{default:!0}}),at()}var aA=V(`<!> `,1),oA=V(`<button type="button"> <!></button>`),sA=V(`<button type="button"> </button>`),cA=V(`<div role="group" aria-label="Presets"></div> <div class="mt-1 border-t border-line pt-2 px-2 pb-1"><div class="text-[11px] uppercase tracking-wide text-fg-subtle mb-1.5">Custom range</div> <label class="block text-[11px] text-fg-muted mb-1">From <input type="datetime-local" class="mt-0.5 w-full rounded border border-line bg-subtle px-1.5 py-1 text-xs text-fg focus:outline-none focus:border-accent"/></label> <label class="block text-[11px] text-fg-muted mb-2">To <input type="datetime-local" class="mt-0.5 w-full rounded border border-line bg-subtle px-1.5 py-1 text-xs text-fg focus:outline-none focus:border-accent"/></label> <div class="mb-2 border-t border-line pt-2"><div class="mb-1 text-[11px] text-fg-muted">Show times in</div> <div class="flex gap-1"></div> <div class="mt-1 text-[11px] text-fg-subtle"> </div></div> <button type="button">Apply</button></div>`,1),lA=V(`<!> <!>`,1);function uA(e,t){it(t,!0);let n=N(!1),r=M(()=>t.selection.type===`custom`?{start:t.selection.start,end:t.selection.end}:{start:Date.now()-9e5,end:Date.now()}),i=N(``),a=N(``);function o(e){P(n,e,!0),e&&(P(i,u(z(r).start),!0),P(a,u(z(r).end),!0))}function s(e){t.onChange({type:`preset`,preset:e}),P(n,!1)}function c(){let e=d(z(i)),r=d(z(a));e!==null&&r!==null&&(t.onChange({type:`custom`,start:e,end:r}),P(n,!1))}let l=M(()=>d(z(i))!==null&&d(z(a))!==null);function u(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function d(e){if(!e)return null;let t=new Date(e).getTime();return Number.isFinite(t)?t:null}var f=la();Ra(I(f),()=>iA,(e,r)=>{r(e,{onOpenChange:o,get open(){return z(n)},set open(e){P(n,e,!0)},children:(e,n)=>{var r=lA(),o=I(r);{let e=M(()=>$(`inline-flex items-center gap-1.5 px-2 py-1 text-xs rounded border`,`border-line bg-surface text-fg-muted hover:text-fg hover:bg-hover`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,t.class));Ra(o,()=>rA,(n,r)=>{r(n,{"aria-label":`Time window`,title:`Change the time window`,get class(){return z(e)},children:(e,n)=>{var r=aA(),i=I(r);Np(i,{size:12});var a=L(i);R(e=>U(a,` ${e??``}`),[()=>Ts(t.selection)]),H(e,r)},$$slots:{default:!0}})})}Ra(L(o,2),()=>jC,(e,n)=>{n(e,{children:(e,n)=>{var r=la();Ra(I(r),()=>eA,(e,n)=>{n(e,{sideOffset:6,align:`start`,class:`z-50 w-64 rounded-md border border-line bg-surface p-1 shadow-lg`,children:(e,n)=>{var r=cA(),o=I(r);G(o,21,()=>ys,e=>e.id,(e,n)=>{let r=M(()=>t.selection.type===`preset`&&t.selection.preset===z(n).id);var i=oA(),a=F(i),o=L(a),c=e=>{xp(e,{size:12,class:`text-accent`})};W(o,e=>{z(r)&&e(c)}),D(i),R(e=>{J(i,`aria-current`,z(r)?`true`:void 0),q(i,1,e),U(a,`${z(n).label??``} `)},[()=>K($(`flex w-full items-center justify-between rounded px-2 py-1.5 text-xs`,`text-fg hover:bg-hover focus-visible:outline-none focus-visible:bg-hover`,z(r)&&`bg-selected font-medium`))]),B(`click`,i,()=>s(z(n).id)),H(e,i)}),D(o);var u=L(o,2),d=L(F(u),2),f=L(F(d));xo(f),D(d);var p=L(d,2),m=L(F(p));xo(m),D(p);var h=L(p,2),g=L(F(h),2);G(g,20,()=>[{id:`local`,label:`Local`},{id:`utc`,label:`UTC`}],e=>e.id,(e,t)=>{var n=sA(),r=F(n,!0);D(n),R(e=>{J(n,`aria-pressed`,Hu.value===t.id),q(n,1,e),U(r,t.label)},[()=>K($(`flex-1 rounded px-2 py-1 text-xs`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,Hu.value===t.id?`bg-accent text-white`:`border border-line text-fg-muted hover:text-fg`))]),B(`click`,n,()=>Hu.value=t.id),H(e,n)}),D(g);var _=L(g,2),v=F(_);D(_),D(h);var y=L(h,2);D(u),R((e,t)=>{U(v,`Currently ${e??``}`),y.disabled=!z(l),q(y,1,t)},[()=>Fg(Hu.value),()=>K($(`w-full rounded px-2 py-1 text-xs font-medium`,`bg-accent text-white hover:opacity-90`,`disabled:opacity-40 disabled:cursor-not-allowed`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`))]),Ao(f,()=>z(i),e=>P(i,e)),Ao(m,()=>z(a),e=>P(a,e)),B(`click`,y,c),H(e,r)},$$slots:{default:!0}})}),H(e,r)},$$slots:{default:!0}})}),H(e,r)},$$slots:{default:!0}})}),H(e,f),at()}ea([`click`]);var dA=V(`<button type="button" aria-live="polite" title="Show the newest matches and follow new data again"><!> </button>`);function fA(e,t){it(t,!0);let n=M(()=>!t.live&&t.count>0),r=M(()=>t.count>999?`999+`:String(t.count));var i=la(),a=I(i),o=e=>{var n=dA(),i=F(n);ap(i,{size:12});var a=L(i);D(n),R(e=>{q(n,1,e),U(a,` ${z(r)??``} new`)},[()=>K($(`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium`,`bg-accent text-white shadow-sm hover:opacity-90 focus-visible:outline-none`,`focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1`,`transition-opacity`,t.class))]),B(`click`,n,function(...e){t.onResume?.apply(this,e)}),H(e,n)};W(a,e=>{z(n)&&e(o)}),H(e,i),at()}ea([`click`]);async function pA(e,t){try{let n=await t.fetch(`${t.baseUrl}/api/query/${e}/fields`,{signal:t.signal});if(!n.ok)return[];let r=await n.json();return Array.isArray(r.fields)?r.fields:[]}catch{return[]}}async function mA(e,t,n){let r={query:t.query};t.window&&(r.window=t.window),t.limit!==void 0&&(r.limit=t.limit),t.cursor&&(r.cursor=t.cursor);let i;try{i=await n.fetch(e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(r),signal:n.signal})}catch(e){return gA(e)?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}let a;try{a=await i.json()}catch{return{status:`error`,message:`Unexpected response from ${n.baseUrl} (not JSON)`}}if(i.status===400){let e=a.errors;return e?.length?{status:`invalid`,errors:e}:{status:`error`,message:`Invalid query request`}}return i.status===403?{status:`error`,message:`Forbidden: the devtools server rejected this origin. Open the viewer from the same machine.`}:i.ok?{status:`ok`,payload:a}:{status:`error`,message:`Server error: ${a.error??i.statusText}`}}async function hA(e,t){let n=await mA(`${t.baseUrl}/api/query/traces`,e,t);if(n.status!==`ok`)return n;let r=n.payload;return{status:`ok`,traces:r.traces??[],nextCursor:r.nextCursor??null}}function gA(e){return typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`}async function _A(e,t){let n=await mA(`${t.baseUrl}/api/query/logs`,e,t);if(n.status!==`ok`)return n;let r=n.payload;return{status:`ok`,logs:r.logs??[],nextCursor:r.nextCursor??null}}async function vA(e,t){let n=await mA(`${t.baseUrl}/api/query/errors`,e,t);return n.status===`ok`?{status:`ok`,errors:n.payload.errors??[]}:n}async function yA(e,t){let n=await mA(`${t.baseUrl}/api/query/webmcp`,{query:``,...e},t);return n.status===`ok`?{status:`ok`,webmcp:n.payload.webmcp??{tools:[],summary:{installations:0,emptyInstallations:0,toolsOffered:0,toolsWithdrawn:0,calls:0,errors:0,resultBytes:0,envelopeBytes:0,toolsWithDroppedAnnotations:0,toolsWithoutInputSchema:0,toolsWithLabelMismatch:0,toolsRedefined:0,refusedCalls:0}}}:n}function bA(){return{reasons:{query:!1,scrolled:!1,selected:!1,window:!1},pending:0}}function xA(e){return!Object.values(e.reasons).some(Boolean)}function SA(e){return xA(e)?0:e.pending}function CA(e,t){switch(t.type){case`query-changed`:return wA(e,`query`,t.query.trim().length>0);case`scrolled`:return wA(e,`scrolled`,!t.atTop);case`row-selected`:return wA(e,`selected`,!0);case`row-deselected`:return wA(e,`selected`,!1);case`window-changed`:return wA(e,`window`,t.bounded);case`arrived`:return xA(e)?e:{...e,pending:Math.max(0,e.pending+t.count)};case`resumed`:return bA()}}function wA(e,t,n){if(e.reasons[t]===n)return e;let r={reasons:{...e.reasons,[t]:n},pending:e.pending};return xA(r)&&(r.pending=0),r}var TA={run:async(e,t)=>{let n=await hA(e,t);return n.status===`ok`?{status:`ok`,rows:n.traces,nextCursor:n.nextCursor}:n}},EA={run:async(e,t)=>{let n=await _A(e,t);return n.status===`ok`?{status:`ok`,rows:n.logs,nextCursor:n.nextCursor}:n}},DA=200,OA=100;function kA(e,t){let n=e.now??(()=>Date.now()),r=e.debounceMs??DA,i=e.pageSize??OA,a=new rs(``),o=ml,s=new rs([]),c=new rs([]),l=new rs(null),u=new rs(!1),d=new rs(!1),f=new rs(null),p=new rs(bA()),m=0,h=null,g=null;function _(e){p.value=CA(p.value,e)}async function v(r={}){let p=++m;h?.abort();let g=new AbortController;h=g,u.value=!0;let _=Cs(o.value,n()),v=await t.run({query:a.value,window:ks(_),limit:i,cursor:r.append?f.value??void 0:void 0},{fetch:e.client.fetch,baseUrl:typeof e.client.baseUrl==`function`?e.client.baseUrl():e.client.baseUrl,signal:g.signal});if(p===m)switch(u.value=!1,v.status){case`ok`:s.value=r.append?[...s.value,...v.rows]:v.rows,f.value=v.nextCursor,c.value=[],l.value=null,d.value=!0;return;case`invalid`:c.value=v.errors,l.value=null;return;case`error`:c.value=[],l.value=v.message;return;case`aborted`:return}}function y(){if(g&&clearTimeout(g),r<=0){v();return}g=setTimeout(()=>{g=null,v()},r)}return{text:a,window:o,results:s,errors:c,failure:l,loading:u,ready:d,nextCursor:f,tail:p,get live(){return xA(p.value)},get pending(){return SA(p.value)},setText(e){a.value=e,_({type:`query-changed`,query:e}),y()},submit(){g&&(clearTimeout(g),g=null),v()},refresh(){return g&&(clearTimeout(g),g=null),v()},setWindow(e){o.value=e,_({type:`window-changed`,bounded:!ws(Cs(e,n()))}),v()},setScrolledToTop(e){_({type:`scrolled`,atTop:e})},setSelected(e){_(e?{type:`row-selected`}:{type:`row-deselected`})},arrived(e){_({type:`arrived`,count:e}),xA(p.value)&&v()},resume(){_({type:`resumed`}),a.value=``,v()},loadMore(){!f.value||u.value||v({append:!0})},removeRows(e){s.value=s.value.filter(t=>!e(t))},dispose(){g&&clearTimeout(g),h?.abort()}}}function AA(e){return kA(e,TA)}function jA(e){return kA(e,EA)}function MA(e,t){let n=t,r=!0;if(typeof IntersectionObserver>`u`)return{update:e=>{n=e}};let i=new IntersectionObserver(e=>{let t=e[e.length-1];if(t){if(!t.isIntersecting){r=!0;return}!r||n.disabled||(r=!1,n.onReach())}},{root:n.root??null,rootMargin:n.rootMargin??`200px`});return i.observe(e),{update(e){let t=n.disabled;n=e,t&&!e.disabled&&(r=!0)},destroy(){i.disconnect()}}}function NA(e){let t=e.target;return/^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)||t.isContentEditable}function PA(e,t){return e>t-1?t-1:e}function FA(e,t,n,r){return n===0?e:e<0?t>0?0:r===`last`?n-1:0:Math.min(Math.max(e+t,0),n-1)}function IA(e){let{count:t,onActivate:n,scrollToIndex:r,fromUnsetUp:i=`first`}=e,a=N(-1),o=M(()=>PA(z(a),t())),s=e=>{t()!==0&&(P(a,FA(z(o),e,t(),i),!0),r?.(z(a)))};return{get cursor(){return z(o)},set cursor(e){P(a,e,!0)},onKeyDown:e=>{NA(e)||(e.key===`ArrowDown`||e.key===`j`?(e.preventDefault(),s(1)):e.key===`ArrowUp`||e.key===`k`?(e.preventDefault(),s(-1)):e.key===`Enter`&&z(o)>=0&&z(o)<t()&&(e.preventDefault(),n(z(o))))}}}var LA=V(`<button><span class="truncate"> </span> <!></button>`),RA=V(`<span class="flex-shrink-0 px-1.5 py-0.5 rounded bg-warning-bg text-warning text-[10px] font-medium uppercase tracking-wide" title="Partial trace: the root span has not arrived, so this row shows the highest span received and a duration covering only that part.">partial</span>`),zA=V(`<div role="option" tabindex="-1" data-focus-inset=""><label class="cursor-pointer flex items-center"><input type="checkbox" class="w-3.5 h-3.5 rounded border-line text-accent"/></label> <button type="button"> </button> <div class="flex items-center gap-1.5 min-w-0"><!> <span class="truncate text-sm text-fg"> </span> <!> <!></div> <span class="font-mono text-xs text-fg-muted text-right tabular-nums"> </span> <span class="trace-col-spans font-mono text-xs text-fg-subtle text-right tabular-nums"> </span> <span class="trace-col-time font-mono text-[11px] text-fg-subtle truncate"> </span> <span> </span> <!></div>`),BA=V(`<span class="text-xs font-normal text-accent"> </span>`),VA=V(`<div class="flex items-center gap-1 mr-2 px-2 border-r border-line"><button class="flex items-center gap-1 px-2 py-1 text-xs rounded bg-accent/10 text-accent hover:bg-accent/20 transition-colors" title="Export selected traces"><!> </button> <button class="flex items-center gap-1 px-2 py-1 text-xs rounded bg-danger-bg text-danger hover:bg-danger-bg/80 transition-colors" title="Delete selected traces"><!> Delete</button></div>`),HA=V(`<button class="px-2 py-1 text-xs rounded text-fg-subtle hover:bg-hover transition-colors" title="Drop buffered traces received while paused">Drop buffer</button>`),UA=V(`<button class="p-1.5 hover:bg-hover rounded transition-colors" title="Export all traces as JSON"><!></button>`),WA=V(`<div class="text-center text-fg-subtle text-sm py-12">Loading traces…</div>`),GA=V(`<div class="mx-auto flex max-w-2xl flex-col items-center gap-3 px-6 py-12 text-center text-sm text-fg-subtle"><p class="font-medium text-fg">No traces yet — send telemetry to get started</p> <p class="max-w-lg text-xs text-fg-muted">Both standard OTLP transports are ready. Existing SDK defaults
|
|
12
|
+
usually work unchanged.</p> <div class="grid w-full gap-2 text-left md:grid-cols-2"><div class="rounded-md border border-line bg-subtle p-3"><div class="mb-1 text-[11px] font-semibold uppercase tracking-wide">OTLP/gRPC</div> <code class="break-all text-xs text-fg">OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317</code></div> <div class="rounded-md border border-line bg-subtle p-3"><div class="mb-1 text-[11px] font-semibold uppercase tracking-wide">OTLP/HTTP</div> <code class="break-all text-xs text-fg">OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318</code></div></div></div>`),KA=V(`<div class="text-center text-fg-subtle text-sm py-12">No traces match the current filter.</div>`),qA=V(`<div class="px-4 py-3 text-center text-xs text-fg-subtle"> </div>`),JA=V(`<div><div class="trace-grid sticky top-0 z-10 px-4 py-2 border-b border-line bg-subtle text-[11px] font-semibold uppercase tracking-wide text-fg-subtle"><label class="cursor-pointer flex items-center"><input type="checkbox" class="w-3.5 h-3.5 rounded border-line text-accent"/></label> <!> <!> <!> <!> <!> <!> <span></span></div> <!> <!></div>`),YA=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> <!></h3> <div class="flex items-center gap-1"><!> <button><!> </button> <!> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Import traces from file"><!></button> <!> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Keyboard shortcuts (?)"><!></button></div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!> <!> <select class="text-xs border border-line rounded px-1.5 py-1 bg-surface text-fg-muted"><option>All</option><option>Errors</option><option>OK</option></select> <!> <div class="flex items-center text-xs text-fg-subtle flex-shrink-0" title="Only show traces at least this slow"><span class="mr-1">≥</span> <input type="number" placeholder="0" class="w-14 px-1 py-1 rounded border border-line bg-surface text-fg-muted focus:outline-none"/> <span class="ml-1">ms</span></div></div> <div class="trace-list-container flex-1 overflow-auto focus:outline-none" role="listbox" aria-label="Traces" tabindex="0"><!></div> <!></div>`);function XA(e,t){it(t,!0);let n=(e,t=p,n=p,r=p,i=p)=>{let a=M(()=>z(s).key===n());var o=LA(),c=F(o),l=F(c,!0);D(c);var u=L(c,2),d=e=>{var t=la(),n=I(t),r=e=>{ap(e,{size:11,class:`flex-shrink-0`})},i=e=>{$f(e,{size:11,class:`flex-shrink-0`})};W(n,e=>{z(s).dir===`asc`?e(r):e(i,-1)}),H(e,t)};W(u,e=>{z(a)&&e(d)}),D(o),R((e,n)=>{q(o,1,e),J(o,`title`,n),U(l,t())},[()=>K($(`flex items-center gap-1 min-w-0 transition-colors hover:text-fg-muted`,z(a)?`text-fg-muted`:`text-fg-subtle`,r()===`end`&&`justify-end`,i())),()=>`Sort by ${t().toLowerCase()}`]),B(`click`,o,()=>Vl(n())),H(e,o)},r=(e,t=p,n=p,r=p)=>{let i=M(()=>t().status===`ERROR`),a=M(()=>hg(t().service||`unknown`)),o=M(()=>oe.cursor===r());var s=zA(),c=M(()=>bg(()=>Nu(t().traceId))),l=F(s),u=F(l);xo(u),D(l);var d=L(l,2),f=F(d,!0);D(d);var m=L(d,2),h=F(m),g=e=>{kp(e,{size:13,class:`text-danger flex-shrink-0`})};W(h,e=>{z(i)&&e(g)});var v=L(h,2),y=F(v,!0);D(v);var b=L(v,2),x=e=>{H(e,RA())};W(b,e=>{t().partial&&e(x)}),Q_(L(b,2),{get value(){return t().traceId},label:`Copy trace ID`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(m);var S=L(m,2),C=F(S,!0);D(S);var w=L(S,2),T=F(w,!0);D(w);var ee=L(w,2),te=F(ee,!0);D(ee);var ne=L(ee,2),re=F(ne,!0);D(ne),Dp(L(ne,2),{size:15,class:`text-fg-subtle justify-self-end`}),D(s),R((e,i,c,l,p)=>{q(s,1,e),J(s,`aria-selected`,z(o)),J(s,`data-row-index`,r()),Co(u,n()),q(d,1,i),oo(d,`background-color: ${z(a).fill??``}; color: ${z(a).stroke??``};`),J(d,`title`,`Filter by ${t().service||`unknown`}`),U(f,t().service||`unknown`),J(v,`title`,t().rootSpan.name),U(y,t().rootSpan.name||`unknown`),U(C,c),U(T,t().spans.length),U(te,l),q(ne,1,p),U(re,t().status)},[()=>K($(`group trace-grid px-4 py-2 border-b border-line-subtle cursor-pointer transition-colors`,`row-virtual`,n()?`bg-accent/10`:z(i)?`bg-danger-bg/40 hover:bg-danger-bg/70`:`hover:bg-hover`,z(o)&&`ring-1 ring-inset ring-accent bg-accent/10`)),()=>K($(`text-[11px] font-medium px-2 py-0.5 rounded truncate text-left transition-shadow`,z(_).has(t().service||`unknown`)&&`ring-1 ring-inset ring-accent`)),()=>ad(t().duration),()=>od(t().startTime),()=>K($(`text-[10px] font-semibold px-1.5 py-0.5 rounded justify-self-start`,z(i)?`bg-danger-bg text-danger`:t().status===`OK`?`bg-success-bg text-success`:`bg-hover text-fg-muted`))]),B(`click`,s,()=>{oe.cursor=r(),Nu(t().traceId)}),B(`keydown`,s,function(...e){z(c)?.apply(this,e)}),B(`click`,u,e=>e.stopPropagation()),B(`change`,u,()=>du(t().traceId)),B(`click`,d,e=>{e.stopPropagation(),Ll(t().service||`unknown`)}),H(e,s)};function i(e,t,n,r,i){return n===`error`&&e.status!==`ERROR`||n===`ok`&&e.status===`ERROR`||r>0&&e.duration<r||i.size>0&&!i.has(e.service||`unknown`)?!1:R_(t.toLowerCase(),[e.service,e.rootSpan?.name,e.traceId,e.correlationId,...e.spans.map(e=>e.name)])}let a=M(()=>Kl.value),o=M(()=>vl.value),s=M(()=>Ml.value),c=M(()=>lu.value),l=M(()=>wl.value),u=M(()=>Dl.value),d=M(()=>uu.value),f=M(()=>hu.value),m=M(()=>Nl.value),h=M(()=>Pl.value),g=M(()=>Fl.value),_=M(()=>Il.value),v=M(()=>{let e=new Map;for(let t of z(a)){let n=t.service||`unknown`;e.set(n,(e.get(n)??0)+1)}return{key:`service`,label:`Service`,options:[...e.entries()].map(([e,t])=>({value:e,count:t})),selected:z(_),onToggle:Ll}}),y=M(()=>z(v).options.length>1),b=N(null),x=N(!1),S=M(()=>z(f)>0);Lr(()=>{if(z(c))return;let e=e=>{if(!($c.value||z(x))){if(e.key===`/`&&!yg()){e.preventDefault(),z(b)?.focus();return}e.key===`Escape`&&(z(S)?pu():document.activeElement===z(b)&&(Nl.value=``,C.setText(``))),e.key===`a`&&(e.metaKey||e.ctrlKey)&&!yg()&&(e.preventDefault(),fu())}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});let C=AA({client:{fetch:globalThis.fetch.bind(globalThis),baseUrl:w}});function w(){let e=pl.value;return(e?Zo(e):null)??globalThis.location.origin}Lr(()=>()=>C.dispose());let T=N(null),ee=N(_r([]));Lr(()=>{let e=w();e!==z(T)&&(P(T,e,!0),pA(`traces`,{fetch:globalThis.fetch.bind(globalThis),baseUrl:e}).then(e=>P(ee,e,!0)),!C.ready.value&&Nl.value?C.setText(Nl.value):C.refresh())});let te=N(0);Lr(()=>{let e=z(a).length;e>z(te)&&C.arrived(e-z(te)),P(te,e,!0)}),Lr(()=>{C.setSelected(z(c)!=null)});let ne=M(()=>C.results.value),re=M(()=>{let e=C.ready.value&&C.failure.value===null,t=z(o);return e&&(t=z(m).length>0?z(ne):ie(z(ne),z(o))),t.filter(t=>i(t,e?``:z(m),z(h),z(g),z(_)))});function ie(e,t){let n=new Set(e.map(e=>e.traceId));return[...e,...t.filter(e=>!n.has(e.traceId))]}let ae=N(void 0),oe=IA({count:()=>z(re).length,onActivate:e=>{let t=z(re)[e];t&&Nu(t.traceId)},scrollToIndex:e=>queueMicrotask(()=>{z(ae)?.querySelector(`[data-row-index="${e}"]`)?.scrollIntoView({block:`nearest`})})});function se(){let e=z(re).filter(e=>z(d).has(e.traceId));e.length>0&&Ry(e)}async function ce(){let e=[...z(d)];if(!(e.length===0||!globalThis.confirm(`Delete ${e.length} stored trace${e.length===1?``:`s`}?`)))try{await fetch(`${w()}/api/traces`,{method:`DELETE`,headers:{"content-type":`application/json`},body:JSON.stringify({traceIds:e})})}catch{}finally{let t=new Set(e);C.removeRows(e=>t.has(e.traceId)),mu()}}let le=M(()=>z(m).length>0||z(h)!==`all`||z(g)>0||z(_).size>0),E=M(()=>z(re).length>0&&z(re).every(e=>z(d).has(e.traceId)));var ue=la(),de=I(ue),fe=e=>{ib(e,{get trace(){return z(c)}})},pe=e=>{var t=YA(),i=F(t),o=F(i),s=F(o);Up(s,{size:16});var c=L(s),p=L(c),m=e=>{var t=BA(),n=F(t);D(t),R(()=>U(n,`(${z(f)??``} selected)`)),H(e,t)};W(p,e=>{z(S)&&e(m)}),D(o);var _=L(o,2),w=F(_),T=e=>{var t=VA(),n=F(t),r=F(n);qp(r,{size:12});var i=L(r);D(n);var a=L(n,2);Vh(F(a),{size:12}),Ke(),D(a),D(t),R(()=>U(i,` Export (${z(f)??``})`)),B(`click`,n,se),B(`click`,a,ce),H(e,t)};W(w,e=>{z(S)&&e(T)});var te=L(w,2),ne=F(te),ie=e=>{ah(e,{size:12})},ue=e=>{th(e,{size:12})};W(ne,e=>{z(l)?e(ie):e(ue,-1)});var de=L(ne);D(te);var fe=L(te,2),pe=e=>{var t=HA();B(`click`,t,function(...e){Ou?.apply(this,e)}),H(e,t)};W(fe,e=>{z(l)&&z(u)>0&&e(pe)});var me=L(fe,2);qh(F(me),{size:14,class:`text-fg-subtle`}),D(me);var he=L(me,2),ge=e=>{var t=UA();qp(F(t),{size:14,class:`text-fg-subtle`}),D(t),B(`click`,t,()=>Ry(z(re))),H(e,t)};W(he,e=>{z(re).length>0&&e(ge)});var _e=L(he,2);jp(F(_e),{size:14,class:`text-fg-subtle`}),D(_e),D(_),D(i);var ve=L(i,2),ye=F(ve);jb(ye,{get value(){return C.text.value},onInput:e=>{C.setText(e),Nl.value=e},onSubmit:()=>C.submit(),get serverErrors(){return C.errors.value},get fields(){return z(ee)},class:`flex-1`,get ref(){return z(b)},set ref(e){P(b,e,!0)}});var be=L(ye,2);uA(be,{get selection(){return C.window.value},onChange:e=>C.setWindow(e)});var xe=L(be,2);fA(xe,{get count(){return C.pending},get live(){return C.live},onResume:()=>{Nl.value=``,C.resume()}});var Se=L(xe,2),Ce=F(Se);Ce.value=Ce.__value=`all`;var we=L(Ce);we.value=we.__value=`error`;var Te=L(we);Te.value=Te.__value=`ok`,D(Se);var Ee;co(Se);var De=L(Se,2),Oe=e=>{{let t=M(()=>[z(v)]);gb(e,{get facets(){return z(t)},get onClearAll(){return Rl}})}};W(De,e=>{z(y)&&e(Oe)});var ke=L(De,2),Ae=L(F(ke),2);xo(Ae),J(Ae,`min`,0),J(Ae,`step`,50),Ke(2),D(ke),D(ve);var je=L(ve,2),Me=F(je),Ne=e=>{H(e,WA())},Pe=e=>{H(e,GA())},Fe=e=>{H(e,KA())},Ie=e=>{var t=JA(),i=F(t),a=F(i),o=F(a);xo(o),D(a);var s=L(a,2);n(s,()=>`Service`,()=>`service`);var c=L(s,2);n(c,()=>`Operation`,()=>`name`);var l=L(c,2);n(l,()=>`Duration`,()=>`duration`,()=>`end`);var u=L(l,2);n(u,()=>`Spans`,()=>`spans`,()=>`end`,()=>`trace-col-spans`);var f=L(u,2);n(f,()=>`Time`,()=>`time`,()=>void 0,()=>`trace-col-time`);var p=L(f,2);n(p,()=>`Status`,()=>`status`),Ke(2),D(i);var m=L(i,2);G(m,19,()=>z(re),e=>e.traceId,(e,t,n)=>{{let i=M(()=>z(d).has(z(t).traceId));r(e,()=>z(t),()=>z(i),()=>z(n))}});var h=L(m,2),g=e=>{var t=qA(),n=F(t,!0);D(t),Xa(t,(e,t)=>MA?.(e,t),()=>({onReach:()=>C.loadMore(),disabled:C.loading.value})),R(()=>U(n,C.loading.value?`Loading…`:`Scroll for more`)),H(e,t)};W(h,e=>{C.nextCursor.value&&e(g)}),D(t),R(()=>{J(a,`title`,z(E)?`Clear selection`:`Select all`),Co(o,z(E))}),B(`click`,o,e=>e.stopPropagation()),B(`change`,o,()=>z(E)?pu():fu()),H(e,t)};W(Me,e=>{C.loading.value&&!C.ready.value&&z(a).length===0?e(Ne):z(re).length===0&&!z(le)?e(Pe,1):z(re).length===0?e(Fe,2):e(Ie,-1)}),D(je),Vo(je,e=>P(ae,e),()=>z(ae));var Le=L(je,2),Re=e=>{Og(e,{onclose:()=>P(x,!1),onimport:async e=>{try{let t=Uy(await Ky(e));return t.success&&t.traces.length>0?(Vu(t.traces),{imported:t.traces.length,errors:[],warnings:t.warnings}):{imported:0,errors:t.errors,warnings:t.warnings}}catch(e){return{imported:0,errors:[String(e)],warnings:[]}}}})};W(Le,e=>{z(x)&&e(Re)}),D(t),R(e=>{U(c,` Traces (${(z(le)?`${z(re).length} of ${z(a).length}`:z(a).length)??``}) `),q(te,1,e),J(te,`title`,z(l)?`Resume live tail`:`Pause live tail`),U(de,` ${z(l)?`Resume${z(u)>0?` (+${z(u)})`:``}`:`Pause`}`),Ee!==(Ee=z(h))&&(Se.value=(Se.__value=z(h))??``,so(Se,z(h))),So(Ae,z(g)||``)},[()=>K($(`flex items-center gap-1 px-2 py-1 text-xs rounded transition-colors`,z(l)?`bg-warning-bg text-warning hover:bg-warning-bg/80`:`hover:bg-hover text-fg-muted`))]),B(`click`,te,function(...e){Du?.apply(this,e)}),B(`click`,me,()=>P(x,!0)),B(`click`,_e,()=>el(_g)),B(`change`,Se,e=>Pl.value=e.currentTarget.value),B(`input`,Ae,e=>Fl.value=Number(e.currentTarget.value)||0),B(`keydown`,je,function(...e){oe.onKeyDown?.apply(this,e)}),H(e,t)};W(de,e=>{z(c)?e(fe):e(pe,-1)}),H(e,ue),at()}ea([`click`,`keydown`,`change`,`input`]);var ZA=(e,t=p,n=p,r=p)=>{let i=M(t);var a=QA(),o=F(a);Ra(o,()=>z(i),(e,t)=>{t(e,{size:12})});var s=L(o,1,!0);D(a),R(()=>{q(a,1,`flex items-center gap-1 px-2 py-1 bg-subtle rounded-md ${r()??``}`),U(s,n())}),H(e,a)},QA=V(`<span><!> </span>`),$A=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-violet-100 text-violet-700 rounded-full"> </span>`),ej=V(`<div class="flex-1 flex flex-col items-center justify-center text-center gap-4 px-6"><!> <div class="max-w-md"><p class="text-sm font-medium text-fg">Waiting for coding-agent telemetry</p> <p class="text-xs text-fg-muted mt-1.5">Launch Claude Code wired to this receiver and its sessions, tokens,
|
|
13
13
|
cost, tool, MCP, sub-agent & skill usage will appear here.</p></div> <div class="flex items-center gap-2 bg-subtle border border-line rounded-md px-3 py-2 font-mono text-xs text-fg"><!> <span></span> <!></div> <p class="text-[11px] text-fg-muted/80 max-w-md">Uses OTLP <span class="font-mono">http/protobuf</span> on <span class="font-mono">:4318</span>. Standard OTLP/gRPC exporters can
|
|
14
|
-
connect on <span class="font-mono">:4317</span>.</p></div>`),cj=V(`<span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-red-600"><!> </span>`),lj=V(`<span class="px-2 py-1 bg-subtle rounded-md text-fg-muted font-mono"> </span>`),uj=V(`<button><div class="flex items-center justify-between gap-2"><span class="font-mono text-xs text-fg truncate"> </span> <span class="text-[11px] text-fg-muted"> </span></div> <div class="flex items-center gap-2 mt-1 text-[11px] text-fg-muted"><span> </span> <span>·</span> <span> </span> <span>·</span> <span> </span></div></button>`),dj=V(`<span class="text-[11px] text-fg-muted"> </span>`),fj=V(`<span class="text-amber-500" title="includes estimated cost">~</span>`),pj=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg-muted flex items-center gap-1 border border-line" title="Context was replaced by a summary — inferred from token counts, not reported by the agent"><!> </span>`),mj=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg flex items-center gap-1"><!> </span>`),hj=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span>`),gj=V(`<span class="text-red-500"> </span>`),_j=V(`<span> </span>`),vj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> <!> <!> </span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span> </span> <!> <!></span></div>`),yj=V(`<div class="p-3 border-b border-line"><div class="text-[11px] font-semibold text-fg-muted uppercase mb-2">Tools & MCP</div> <div class="flex flex-col gap-1"></div></div>`),bj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> </span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span></span> <!> <!></span></div>`),xj=V(`<span class="text-fg-muted flex-shrink-0"> </span>`),Sj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> </span> <!></div>`),Cj=V(`<span class="text-amber-600"> </span>`),wj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg flex items-center gap-1.5"><!> hooks</span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span> </span> <!> <!></span></div>`),Tj=V(`<div class="p-3 border-b border-line"><div class="text-[11px] font-semibold text-fg-muted uppercase mb-2">Runtime environment</div> <div class="flex flex-col gap-1"><!> <!> <!></div></div>`),Ej=V(`<!>Hide prompts`,1),Dj=V(`<!>Reveal prompts`,1),Oj=V(`<div><!> <span class="whitespace-nowrap"> </span> <span></span></div>`),kj=V(`<!> <div class="flex items-center gap-2 text-xs py-1 border-b border-line/50"><span class="text-fg-muted tabular-nums flex-shrink-0"> </span> <span> </span> <span class="text-fg truncate"> </span> <span class="text-fg-muted truncate ml-auto text-right"> </span></div>`,1),Aj=V(`<div class="p-3 border-b border-line"><div class="flex items-center justify-between gap-2"><span class="font-mono text-xs text-fg"> </span> <!></div> <div class="flex flex-wrap gap-2 mt-2 text-[11px]"><span class="px-2 py-0.5 bg-subtle rounded text-fg"> <!></span> <span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span> <span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span> <!> <span class="px-2 py-0.5 bg-subtle rounded text-fg flex items-center gap-1"><!> </span> <!> <!></div></div> <!> <!> <div class="p-3"><div class="flex items-center justify-between mb-2"><div class="text-[11px] font-semibold text-fg-muted uppercase">Timeline</div> <button class="flex items-center gap-1 text-[11px] text-fg-muted hover:text-fg" title="Reveal / hide captured prompt text"><!></button></div> <div class="flex flex-col gap-1"></div></div>`,1),jj=V(`<div class="flex flex-wrap gap-2 p-3 border-b border-line text-xs"><span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> </span> <span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> </span> <span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> <!> </span> <!> <!> <!> <!> <!> <!></div> <div class="flex-1 flex min-h-0"><div class="w-64 flex-shrink-0 overflow-y-auto border-r border-line"></div> <div class="flex-1 overflow-y-auto min-w-0"><!></div></div>`,1),Mj=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between p-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Agents <!></h3></div> <!></div>`);function Nj(e,t){it(t,!0);let n=M(()=>Xl.value),r=M(()=>Ql.value),i=M(()=>Zl.value),a=N(!1);function o(e){return e===0?`$0`:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}function s(e){return e.length>12?`${e.slice(0,8)}…${e.slice(-4)}`:e}function c(e){return Object.entries(e).filter(([,e])=>e>0).sort((e,t)=>t[1]-e[1])}function l(e){switch(e.type){case`api_request`:return e.model??`api request`;case`api_error`:return`api error`;case`tool_result`:case`tool_decision`:return e.tool?.name??`tool`;case`user_prompt`:return`prompt`;case`mcp_connection`:return e.mcpServerName??`mcp server`;case`plugin_loaded`:return e.pluginName??`plugin`;case`hook_execution`:return e.hookName??`hook`;default:return e.rawEventName}}function u(e){let t=[];if(e.type===`api_request`){e.costUsd!==void 0&&t.push(o(e.costUsd));let n=(e.inputTokens??0)+(e.outputTokens??0);n>0&&t.push(`${sd(n)} tok`),e.durationMs&&t.push(ad(e.durationMs))}else e.type===`tool_result`?(e.tool?.isMcp&&e.tool.mcpServer?t.push(`mcp:${e.tool.mcpServer}`):e.tool&&t.push(e.tool.category),e.success===!1&&t.push(`failed`),e.durationMs&&t.push(ad(e.durationMs))):e.type===`tool_decision`?e.tool&&t.push(e.tool.category):e.type===`user_prompt`?e.promptText?t.push(z(a)?dd(e.promptText):`${e.promptLength??e.promptText.length} chars (hidden)`):e.promptLength!==void 0&&t.push(`${e.promptLength} chars`):e.type===`api_error`?(e.statusCode&&t.push(String(e.statusCode)),e.errorMessage&&t.push(e.errorMessage)):e.type===`mcp_connection`?(e.mcpStatus&&t.push(e.mcpStatus),e.mcpTransport&&t.push(e.mcpTransport),e.durationMs&&t.push(ad(e.durationMs))):e.type===`plugin_loaded`?e.pluginVersion&&t.push(`v${e.pluginVersion}`):e.type===`hook_execution`&&(e.hookBlocked&&t.push(`${e.hookBlocked} blocked`),e.hookErrored&&t.push(`${e.hookErrored} errored`));return t.join(` · `)}function d(e){return e.rollup.inputTokens+e.rollup.outputTokens}let f=M(()=>z(r)?[...z(r).timeline].reverse().slice(0,200):[]),p=M(()=>z(r)?Object.values(z(r).rollup.tools).sort((e,t)=>t.count-e.count):[]),m=M(()=>z(r)?Object.values(z(r).rollup.mcpConnections):[]),h=M(()=>z(r)?Object.values(z(r).rollup.plugins):[]),g=M(()=>z(r)?.rollup.hooks),v=M(()=>z(r)?.rollup.compactions??[]),y=M(()=>new Map(z(v).map(e=>[e.atEventId,e]))),b=M(()=>z(v).reduce((e,t)=>e+t.droppedTokens,0)),x=M(()=>z(m).length>0||z(h).length>0||z(g)!==void 0&&z(g).runs>0);var S=Mj(),C=F(S),w=F(C),T=F(w);cp(T,{size:16,class:`text-violet-500`});var ee=L(T,2),te=e=>{var t=oj(),r=F(t,!0);D(t),R(()=>U(r,z(n).length)),H(e,t)};W(ee,e=>{z(n).length>0&&e(te)}),D(w),D(C);var ne=L(C,2),re=e=>{var t=sj(),n=F(t);cp(n,{size:40,class:`text-fg-muted opacity-40`});var r=L(n,4),i=F(r);Rh(i,{size:13,class:`text-fg-muted flex-shrink-0`});var a=L(i,2);a.textContent=`npx autotel-devtools claude`,Z_(L(a,2),{value:`npx autotel-devtools claude`,label:`Copy launch command`}),D(r),Ke(2),D(t),H(e,t)},ie=e=>{var t=jj(),S=I(t),C=F(S),w=F(C);Wp(w,{size:12,class:`text-emerald-500`});var T=L(w,1,!0);D(C);var ee=L(C,2),te=F(ee);Ip(te,{size:12,class:`text-amber-500`});var ne=L(te);D(ee);var re=L(ee,2),ie=F(re);bp(ie,{size:12,class:`text-emerald-500`});var ae=L(ie),oe=L(ae);ng(oe,{size:12,class:`text-red-500 ml-1`});var se=L(oe,1,!0);D(re);var ce=L(re,2),le=e=>{var t=cj(),n=F(t);Wh(n,{size:12});var r=L(n);D(t),R(()=>U(r,`${z(i).apiErrors??``} errors`)),H(e,t)};W(ce,e=>{z(i).apiErrors>0&&e(le)});var E=L(ce,2);G(E,17,()=>c(z(i).toolCategories),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];ij(e,()=>eg,()=>`${r()} ${i()}`,()=>`text-fg-muted`)});var ue=L(E,2);G(ue,17,()=>c(z(i).mcpServers),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];ij(e,()=>wh,()=>`mcp:${r()} ${i()}`,()=>`text-sky-600`)});var de=L(ue,2);G(de,17,()=>c(z(i).subAgents),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];ij(e,()=>cp,()=>`${r()} ${i()}`,()=>`text-violet-600`)});var fe=L(de,2);G(fe,17,()=>c(z(i).skills),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];ij(e,()=>Mh,()=>`${r()} ${i()}`,()=>`text-fuchsia-600`)}),G(L(fe,2),17,()=>c(z(i).models),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=lj(),o=F(a);D(a),R(()=>U(o,`${r()??``} ×${i()??``}`)),H(e,a)}),D(S);var pe=L(S,2),me=F(pe);G(me,21,()=>z(n),e=>e.id,(e,t)=>{var n=uj(),i=F(n),a=F(i),c=F(a,!0);D(a);var l=L(a,2),u=F(l,!0);D(l),D(i);var f=L(i,2),p=F(f),m=F(p,!0);D(p);var h=L(p,4),g=F(h);D(h);var _=L(h,4),v=F(_,!0);D(_),D(f),D(n),R((e,i,a,o)=>{q(n,1,`w-full text-left px-3 py-2.5 border-b border-line hover:bg-subtle transition-colors ${z(r)?.id===z(t).id?`bg-subtle`:``}`),U(c,e),U(u,z(t).agent),U(m,i),U(g,`${a??``} tok`),U(v,o)},[()=>s(z(t).id),()=>o(z(t).rollup.costUsd),()=>sd(d(z(t))),()=>ad(z(t).lastSeen-z(t).firstSeen)]),B(`click`,n,()=>$l(z(t).id)),H(e,n)}),D(me);var he=L(me,2),ge=F(he),_e=e=>{var t=Aj(),n=I(t),i=F(n),s=F(i),c=F(s,!0);D(s);var d=L(s,2),_=e=>{var t=dj(),n=F(t);D(t),R(()=>U(n,`${z(r).terminal??``??``}${z(r).appVersion?` · v${z(r).appVersion}`:``}`)),H(e,t)};W(d,e=>{(z(r).terminal||z(r).appVersion)&&e(_)}),D(i);var S=L(i,2),C=F(S),w=F(C),T=L(w),ee=e=>{H(e,fj())};W(T,e=>{z(r).rollup.costEstimatedUsd>0&&e(ee)}),D(C);var te=L(C,2),ne=F(te);D(te);var re=L(te,2),ie=F(re);D(re);var ae=L(re,2),oe=e=>{var t=pj(),n=F(t);bh(n,{size:11});var r=L(n);D(t),R(e=>U(r,`${z(v).length??``} context reset${z(v).length>1?`s`:``} · ${e??``} tokens`),[()=>sd(z(b))]),H(e,t)};W(ae,e=>{z(v).length>0&&e(oe)});var se=L(ae,2),ce=F(se);Im(ce,{size:11});var le=L(ce,1,!0);D(se);var E=L(se,2),ue=e=>{var t=mj(),n=F(t);fm(n,{size:11});var i=L(n);D(t),R(()=>U(i,`+${z(r).rollup.linesAdded??``}/-${z(r).rollup.linesRemoved??``}`)),H(e,t)};W(E,e=>{(z(r).rollup.linesAdded||z(r).rollup.linesRemoved)&&e(ue)});var de=L(E,2),fe=e=>{var t=hj(),n=F(t);D(t),R(()=>U(n,`${z(r).rollup.commits??``} commits`)),H(e,t)};W(de,e=>{z(r).rollup.commits&&e(fe)}),D(S),D(n);var pe=L(n,2),me=e=>{var t=yj(),n=L(F(t),2);G(n,21,()=>z(p),e=>e.name,(e,t)=>{var n=vj(),r=F(n),i=F(r),a=e=>{wh(e,{size:11,class:`text-sky-500`})};W(i,e=>{z(t).isMcp&&e(a)});var o=L(i,2),s=e=>{cp(e,{size:11,class:`text-violet-500`})};W(o,e=>{z(t).category===`subagent`&&e(s)});var c=L(o,2),l=e=>{Mh(e,{size:11,class:`text-fuchsia-500`})};W(c,e=>{z(t).category===`skill`&&e(l)});var u=L(c);D(r);var d=L(r,2),f=F(d),p=F(f);D(f);var m=L(f,2),h=e=>{var n=gj(),r=F(n);D(n),R(()=>U(r,`${z(t).failures??``} fail`)),H(e,n)};W(m,e=>{z(t).failures>0&&e(h)});var g=L(m,2),_=e=>{var n=_j(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>ad(z(t).totalDurationMs)]),H(e,n)};W(g,e=>{z(t).totalDurationMs>0&&e(_)}),D(d),D(n),R(()=>{U(u,` ${z(t).name??``}`),U(p,`×${z(t).count??``}`)}),H(e,n)}),D(n),D(t),H(e,t)};W(pe,e=>{z(p).length>0&&e(me)});var he=L(pe,2),ge=e=>{var t=Tj(),n=L(F(t),2),r=F(n);G(r,17,()=>z(m),e=>e.name,(e,t)=>{var n=bj(),r=F(n),i=F(r);oh(i,{size:11,class:`text-sky-500 flex-shrink-0`});var a=L(i);D(r);var o=L(r,2),s=F(o),c=L(s,2),l=e=>{var n=_j(),r=F(n,!0);D(n),R(()=>U(r,z(t).transport)),H(e,n)};W(c,e=>{z(t).transport&&e(l)});var u=L(c,2),d=e=>{var n=_j(),r=F(n);D(n),R(()=>U(r,`${z(t).connects??``}↑/${z(t).disconnects??``}↓`)),H(e,n)};W(u,e=>{z(t).disconnects>0&&e(d)}),D(o),D(n),R(()=>{U(a,` ${z(t).name??``}`),q(s,1,`w-1.5 h-1.5 rounded-full ${z(t).connected?`bg-emerald-500`:`bg-fg-subtle`}`),J(s,`title`,z(t).connected?`connected`:`disconnected`)}),H(e,n)});var i=L(r,2);G(i,17,()=>z(h),e=>e.name,(e,t)=>{var n=Sj(),r=F(n),i=F(r);op(i,{size:11,class:`text-fuchsia-500 flex-shrink-0`});var a=L(i);D(r);var o=L(r,2),s=e=>{var n=xj(),r=F(n);D(n),R(()=>U(r,`v${z(t).version??``}`)),H(e,n)};W(o,e=>{z(t).version&&e(s)}),D(n),R(()=>U(a,` ${z(t).name??``}`)),H(e,n)});var a=L(i,2),o=e=>{var t=wj(),n=F(t);Xh(F(n),{size:11,class:`text-amber-500 flex-shrink-0`}),Ke(),D(n);var r=L(n,2),i=F(r),a=F(i);D(i);var o=L(i,2),s=e=>{var t=Cj(),n=F(t);D(t),R(()=>U(n,`${z(g).blocked??``} blocked`)),H(e,t)};W(o,e=>{z(g).blocked>0&&e(s)});var c=L(o,2),l=e=>{var t=gj(),n=F(t);D(t),R(()=>U(n,`${z(g).errored??``} err`)),H(e,t)};W(c,e=>{z(g).errored>0&&e(l)}),D(r),D(t),R(()=>U(a,`×${z(g).runs??``}`)),H(e,t)};W(a,e=>{z(g)&&z(g).runs>0&&e(o)}),D(n),D(t),H(e,t)};W(he,e=>{z(x)&&e(ge)});var _e=L(he,2),ve=F(_e),ye=L(F(ve),2),be=F(ye),xe=e=>{var t=Ej();Xp(I(t),{size:12}),Ke(),H(e,t)},Se=e=>{var t=Dj();Qp(I(t),{size:12}),Ke(),H(e,t)};W(be,e=>{z(a)?e(xe):e(Se,-1)}),D(ye),D(ve);var Ce=L(ve,2);G(Ce,21,()=>z(f),e=>e.id,(e,t)=>{let n=M(()=>z(y).get(z(t).id));var r=kj(),i=I(r),a=e=>{var t=Oj(),r=F(t);bh(r,{size:11,class:`flex-shrink-0`});var i=L(r,2),a=F(i);D(i);var o=L(i,2);D(t),R(e=>{q(t,1,`flex items-center gap-2 my-1 text-[11px] ${z(n).confidence===`likely`?`text-fg-muted`:`text-fg-muted/70`}`),U(a,`${e??``} tokens left the agent's
|
|
15
|
-
context · ${z(n).confidence??``}`),q(o,1,`flex-1 border-t border-dashed ${z(n).confidence===`likely`?`border-line`:`border-line/60`}`)},[()=>sd(z(n).droppedTokens)]),H(e,t)};W(i,e=>{z(n)&&e(a)});var o=L(i,2),s=F(o),c=F(s,!0);D(s);var
|
|
16
|
-
`)]),H(e,n)};W(C,e=>{t.span.warnings&&t.span.warnings.length>0&&e(w)});var T=L(C,2),ee=e=>{var t=
|
|
17
|
-
transcripts.</p></div>`),
|
|
14
|
+
connect on <span class="font-mono">:4317</span>.</p></div>`),tj=V(`<span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-red-600"><!> </span>`),nj=V(`<span class="px-2 py-1 bg-subtle rounded-md text-fg-muted font-mono"> </span>`),rj=V(`<button><div class="flex items-center justify-between gap-2"><span class="font-mono text-xs text-fg truncate"> </span> <span class="text-[11px] text-fg-muted"> </span></div> <div class="flex items-center gap-2 mt-1 text-[11px] text-fg-muted"><span> </span> <span>·</span> <span> </span> <span>·</span> <span> </span></div></button>`),ij=V(`<span class="text-[11px] text-fg-muted"> </span>`),aj=V(`<span class="text-amber-500" title="includes estimated cost">~</span>`),oj=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg-muted flex items-center gap-1 border border-line" title="Context was replaced by a summary — inferred from token counts, not reported by the agent"><!> </span>`),sj=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg flex items-center gap-1"><!> </span>`),cj=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span>`),lj=V(`<span class="text-red-500"> </span>`),uj=V(`<span> </span>`),dj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> <!> <!> </span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span> </span> <!> <!></span></div>`),fj=V(`<div class="p-3 border-b border-line"><div class="text-[11px] font-semibold text-fg-muted uppercase mb-2">Tools & MCP</div> <div class="flex flex-col gap-1"></div></div>`),pj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> </span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span></span> <!> <!></span></div>`),mj=V(`<span class="text-fg-muted flex-shrink-0"> </span>`),hj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> </span> <!></div>`),gj=V(`<span class="text-amber-600"> </span>`),_j=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg flex items-center gap-1.5"><!> hooks</span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span> </span> <!> <!></span></div>`),vj=V(`<div class="p-3 border-b border-line"><div class="text-[11px] font-semibold text-fg-muted uppercase mb-2">Runtime environment</div> <div class="flex flex-col gap-1"><!> <!> <!></div></div>`),yj=V(`<!>Hide prompts`,1),bj=V(`<!>Reveal prompts`,1),xj=V(`<div><!> <span class="whitespace-nowrap"> </span> <span></span></div>`),Sj=V(`<!> <div class="flex items-center gap-2 text-xs py-1 border-b border-line/50"><span class="text-fg-muted tabular-nums flex-shrink-0"> </span> <span> </span> <span class="text-fg truncate"> </span> <span class="text-fg-muted truncate ml-auto text-right"> </span></div>`,1),Cj=V(`<div class="p-3 border-b border-line"><div class="flex items-center justify-between gap-2"><span class="font-mono text-xs text-fg"> </span> <!></div> <div class="flex flex-wrap gap-2 mt-2 text-[11px]"><span class="px-2 py-0.5 bg-subtle rounded text-fg"> <!></span> <span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span> <span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span> <!> <span class="px-2 py-0.5 bg-subtle rounded text-fg flex items-center gap-1"><!> </span> <!> <!></div></div> <!> <!> <div class="p-3"><div class="flex items-center justify-between mb-2"><div class="text-[11px] font-semibold text-fg-muted uppercase">Timeline</div> <button class="flex items-center gap-1 text-[11px] text-fg-muted hover:text-fg" title="Reveal / hide captured prompt text"><!></button></div> <div class="flex flex-col gap-1"></div></div>`,1),wj=V(`<div class="flex flex-wrap gap-2 p-3 border-b border-line text-xs"><span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> </span> <span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> </span> <span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> <!> </span> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <div class="flex-1 flex min-h-0"><div class="w-64 flex-shrink-0 overflow-y-auto border-r border-line"></div> <div class="flex-1 overflow-y-auto min-w-0"><!></div></div>`,1),Tj=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between p-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Agents <!></h3></div> <!></div>`);function Ej(e,t){it(t,!0);let n=M(()=>Xl.value),r=M(()=>Ql.value),i=M(()=>Zl.value),a=N(!1);function o(e){return e===0?`$0`:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}function s(e){return e.length>12?`${e.slice(0,8)}…${e.slice(-4)}`:e}function c(e){return Object.entries(e).filter(([,e])=>e>0).sort((e,t)=>t[1]-e[1])}function l(e){return Object.entries(e).sort((e,t)=>t[1].costUsd-e[1].costUsd)}function u(e){switch(e.type){case`api_request`:return e.model??`api request`;case`api_error`:return`api error`;case`tool_result`:case`tool_decision`:return e.tool?.name??`tool`;case`user_prompt`:return`prompt`;case`mcp_connection`:return e.mcpServerName??`mcp server`;case`plugin_loaded`:return e.pluginName??`plugin`;case`hook_execution`:return e.hookName??`hook`;default:return e.rawEventName}}function d(e){let t=[];if(e.type===`api_request`){e.costUsd!==void 0&&t.push(o(e.costUsd));let n=(e.inputTokens??0)+(e.outputTokens??0);n>0&&t.push(`${sd(n)} tok`),e.durationMs&&t.push(ad(e.durationMs)),e.effort&&t.push(e.effort),e.speed&&t.push(e.speed),e.skillName&&t.push(`skill:${e.skillName}`),e.agentName&&t.push(`agent:${e.agentName}`)}else e.type===`tool_result`?(e.tool?.isMcp&&e.tool.mcpServer?t.push(`mcp:${e.tool.mcpServer}`):e.tool&&t.push(e.tool.category),e.success===!1&&t.push(`failed`),e.durationMs&&t.push(ad(e.durationMs))):e.type===`tool_decision`?e.tool&&t.push(e.tool.category):e.type===`user_prompt`?e.promptText?t.push(z(a)?dd(e.promptText):`${e.promptLength??e.promptText.length} chars (hidden)`):e.promptLength!==void 0&&t.push(`${e.promptLength} chars`):e.type===`api_error`?(e.statusCode&&t.push(String(e.statusCode)),e.errorMessage&&t.push(e.errorMessage)):e.type===`mcp_connection`?(e.mcpStatus&&t.push(e.mcpStatus),e.mcpTransport&&t.push(e.mcpTransport),e.durationMs&&t.push(ad(e.durationMs))):e.type===`plugin_loaded`?e.pluginVersion&&t.push(`v${e.pluginVersion}`):e.type===`hook_execution`&&(e.hookBlocked&&t.push(`${e.hookBlocked} blocked`),e.hookErrored&&t.push(`${e.hookErrored} errored`));return t.join(` · `)}function f(e){return e.rollup.inputTokens+e.rollup.outputTokens}let p=M(()=>z(r)?[...z(r).timeline].reverse().slice(0,200):[]),m=M(()=>z(r)?Object.values(z(r).rollup.tools).sort((e,t)=>t.count-e.count):[]),h=M(()=>z(r)?Object.values(z(r).rollup.mcpConnections):[]),g=M(()=>z(r)?Object.values(z(r).rollup.plugins):[]),v=M(()=>z(r)?.rollup.hooks),y=M(()=>z(r)?.rollup.compactions??[]),b=M(()=>new Map(z(y).map(e=>[e.atEventId,e]))),x=M(()=>z(y).reduce((e,t)=>e+t.droppedTokens,0)),S=M(()=>z(h).length>0||z(g).length>0||z(v)!==void 0&&z(v).runs>0);var C=Tj(),w=F(C),T=F(w),ee=F(T);lp(ee,{size:16,class:`text-violet-500`});var te=L(ee,2),ne=e=>{var t=$A(),r=F(t,!0);D(t),R(()=>U(r,z(n).length)),H(e,t)};W(te,e=>{z(n).length>0&&e(ne)}),D(T),D(w);var re=L(w,2),ie=e=>{var t=ej(),n=F(t);lp(n,{size:40,class:`text-fg-muted opacity-40`});var r=L(n,4),i=F(r);zh(i,{size:13,class:`text-fg-muted flex-shrink-0`});var a=L(i,2);a.textContent=`npx autotel-devtools claude`,Q_(L(a,2),{value:`npx autotel-devtools claude`,label:`Copy launch command`}),D(r),Ke(2),D(t),H(e,t)},ae=e=>{var t=wj(),C=I(t),w=F(C),T=F(w);Gp(T,{size:12,class:`text-emerald-500`});var ee=L(T,1,!0);D(w);var te=L(w,2),ne=F(te);Lp(ne,{size:12,class:`text-amber-500`});var re=L(ne);D(te);var ie=L(te,2),ae=F(ie);xp(ae,{size:12,class:`text-emerald-500`});var oe=L(ae),se=L(oe);rg(se,{size:12,class:`text-red-500 ml-1`});var ce=L(se,1,!0);D(ie);var le=L(ie,2),E=e=>{var t=tj(),n=F(t);Gh(n,{size:12});var r=L(n);D(t),R(()=>U(r,`${z(i).apiErrors??``} errors`)),H(e,t)};W(le,e=>{z(i).apiErrors>0&&e(E)});var ue=L(le,2);G(ue,17,()=>c(z(i).toolCategories),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];ZA(e,()=>tg,()=>`${r()} ${i()}`,()=>`text-fg-muted`)});var de=L(ue,2);G(de,17,()=>c(z(i).mcpServers),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];ZA(e,()=>Th,()=>`mcp:${r()} ${i()}`,()=>`text-sky-600`)});var fe=L(de,2);G(fe,17,()=>c(z(i).subAgents),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];ZA(e,()=>lp,()=>`${r()} ${i()}`,()=>`text-violet-600`)});var pe=L(fe,2);G(pe,17,()=>c(z(i).skills),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];ZA(e,()=>Nh,()=>`${r()} ${i()}`,()=>`text-fuchsia-600`)});var me=L(pe,2);G(me,17,()=>l(z(i).byEffort),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];{let t=M(()=>`${r()} ${o(i().costUsd)}`);ZA(e,()=>dm,()=>z(t),()=>`text-amber-600`)}});var he=L(me,2);G(he,17,()=>l(z(i).bySkill),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];{let t=M(()=>`${r()} ${o(i().costUsd)}`);ZA(e,()=>Nh,()=>z(t),()=>`text-fuchsia-600`)}});var ge=L(he,2);G(ge,17,()=>l(z(i).byAgent),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];{let t=M(()=>`${r()} ${o(i().costUsd)}`);ZA(e,()=>lp,()=>z(t),()=>`text-violet-600`)}}),G(L(ge,2),17,()=>l(z(i).byModel),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=nj(),s=F(a);D(a),R(e=>U(s,`${r()??``} ×${i().requests??``} ${e??``}`),[()=>o(i().costUsd)]),H(e,a)}),D(C);var _e=L(C,2),ve=F(_e);G(ve,21,()=>z(n),e=>e.id,(e,t)=>{var n=rj(),i=F(n),a=F(i),c=F(a,!0);D(a);var l=L(a,2),u=F(l,!0);D(l),D(i);var d=L(i,2),p=F(d),m=F(p,!0);D(p);var h=L(p,4),g=F(h);D(h);var _=L(h,4),v=F(_,!0);D(_),D(d),D(n),R((e,i,a,o)=>{q(n,1,`w-full text-left px-3 py-2.5 border-b border-line hover:bg-subtle transition-colors ${z(r)?.id===z(t).id?`bg-subtle`:``}`),U(c,e),U(u,z(t).agent),U(m,i),U(g,`${a??``} tok`),U(v,o)},[()=>s(z(t).id),()=>o(z(t).rollup.costUsd),()=>sd(f(z(t))),()=>ad(z(t).lastSeen-z(t).firstSeen)]),B(`click`,n,()=>$l(z(t).id)),H(e,n)}),D(ve);var ye=L(ve,2),be=F(ye),xe=e=>{var t=Cj(),n=I(t),i=F(n),s=F(i),c=F(s,!0);D(s);var l=L(s,2),f=e=>{var t=ij(),n=F(t);D(t),R(()=>U(n,`${z(r).terminal??``??``}${z(r).appVersion?` · v${z(r).appVersion}`:``}`)),H(e,t)};W(l,e=>{(z(r).terminal||z(r).appVersion)&&e(f)}),D(i);var _=L(i,2),C=F(_),w=F(C),T=L(w),ee=e=>{H(e,aj())};W(T,e=>{z(r).rollup.costEstimatedUsd>0&&e(ee)}),D(C);var te=L(C,2),ne=F(te);D(te);var re=L(te,2),ie=F(re);D(re);var ae=L(re,2),oe=e=>{var t=oj(),n=F(t);xh(n,{size:11});var r=L(n);D(t),R(e=>U(r,`${z(y).length??``} context reset${z(y).length>1?`s`:``} · ${e??``} tokens`),[()=>sd(z(x))]),H(e,t)};W(ae,e=>{z(y).length>0&&e(oe)});var se=L(ae,2),ce=F(se);Lm(ce,{size:11});var le=L(ce,1,!0);D(se);var E=L(se,2),ue=e=>{var t=sj(),n=F(t);pm(n,{size:11});var i=L(n);D(t),R(()=>U(i,`+${z(r).rollup.linesAdded??``}/-${z(r).rollup.linesRemoved??``}`)),H(e,t)};W(E,e=>{(z(r).rollup.linesAdded||z(r).rollup.linesRemoved)&&e(ue)});var de=L(E,2),fe=e=>{var t=cj(),n=F(t);D(t),R(()=>U(n,`${z(r).rollup.commits??``} commits`)),H(e,t)};W(de,e=>{z(r).rollup.commits&&e(fe)}),D(_),D(n);var pe=L(n,2),me=e=>{var t=fj(),n=L(F(t),2);G(n,21,()=>z(m),e=>e.name,(e,t)=>{var n=dj(),r=F(n),i=F(r),a=e=>{Th(e,{size:11,class:`text-sky-500`})};W(i,e=>{z(t).isMcp&&e(a)});var o=L(i,2),s=e=>{lp(e,{size:11,class:`text-violet-500`})};W(o,e=>{z(t).category===`subagent`&&e(s)});var c=L(o,2),l=e=>{Nh(e,{size:11,class:`text-fuchsia-500`})};W(c,e=>{z(t).category===`skill`&&e(l)});var u=L(c);D(r);var d=L(r,2),f=F(d),p=F(f);D(f);var m=L(f,2),h=e=>{var n=lj(),r=F(n);D(n),R(()=>U(r,`${z(t).failures??``} fail`)),H(e,n)};W(m,e=>{z(t).failures>0&&e(h)});var g=L(m,2),_=e=>{var n=uj(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>ad(z(t).totalDurationMs)]),H(e,n)};W(g,e=>{z(t).totalDurationMs>0&&e(_)}),D(d),D(n),R(()=>{U(u,` ${z(t).name??``}`),U(p,`×${z(t).count??``}`)}),H(e,n)}),D(n),D(t),H(e,t)};W(pe,e=>{z(m).length>0&&e(me)});var he=L(pe,2),ge=e=>{var t=vj(),n=L(F(t),2),r=F(n);G(r,17,()=>z(h),e=>e.name,(e,t)=>{var n=pj(),r=F(n),i=F(r);sh(i,{size:11,class:`text-sky-500 flex-shrink-0`});var a=L(i);D(r);var o=L(r,2),s=F(o),c=L(s,2),l=e=>{var n=uj(),r=F(n,!0);D(n),R(()=>U(r,z(t).transport)),H(e,n)};W(c,e=>{z(t).transport&&e(l)});var u=L(c,2),d=e=>{var n=uj(),r=F(n);D(n),R(()=>U(r,`${z(t).connects??``}↑/${z(t).disconnects??``}↓`)),H(e,n)};W(u,e=>{z(t).disconnects>0&&e(d)}),D(o),D(n),R(()=>{U(a,` ${z(t).name??``}`),q(s,1,`w-1.5 h-1.5 rounded-full ${z(t).connected?`bg-emerald-500`:`bg-fg-subtle`}`),J(s,`title`,z(t).connected?`connected`:`disconnected`)}),H(e,n)});var i=L(r,2);G(i,17,()=>z(g),e=>e.name,(e,t)=>{var n=hj(),r=F(n),i=F(r);sp(i,{size:11,class:`text-fuchsia-500 flex-shrink-0`});var a=L(i);D(r);var o=L(r,2),s=e=>{var n=mj(),r=F(n);D(n),R(()=>U(r,`v${z(t).version??``}`)),H(e,n)};W(o,e=>{z(t).version&&e(s)}),D(n),R(()=>U(a,` ${z(t).name??``}`)),H(e,n)});var a=L(i,2),o=e=>{var t=_j(),n=F(t);Zh(F(n),{size:11,class:`text-amber-500 flex-shrink-0`}),Ke(),D(n);var r=L(n,2),i=F(r),a=F(i);D(i);var o=L(i,2),s=e=>{var t=gj(),n=F(t);D(t),R(()=>U(n,`${z(v).blocked??``} blocked`)),H(e,t)};W(o,e=>{z(v).blocked>0&&e(s)});var c=L(o,2),l=e=>{var t=lj(),n=F(t);D(t),R(()=>U(n,`${z(v).errored??``} err`)),H(e,t)};W(c,e=>{z(v).errored>0&&e(l)}),D(r),D(t),R(()=>U(a,`×${z(v).runs??``}`)),H(e,t)};W(a,e=>{z(v)&&z(v).runs>0&&e(o)}),D(n),D(t),H(e,t)};W(he,e=>{z(S)&&e(ge)});var _e=L(he,2),ve=F(_e),ye=L(F(ve),2),be=F(ye),xe=e=>{var t=yj();Zp(I(t),{size:12}),Ke(),H(e,t)},Se=e=>{var t=bj();$p(I(t),{size:12}),Ke(),H(e,t)};W(be,e=>{z(a)?e(xe):e(Se,-1)}),D(ye),D(ve);var Ce=L(ve,2);G(Ce,21,()=>z(p),e=>e.id,(e,t)=>{let n=M(()=>z(b).get(z(t).id));var r=Sj(),i=I(r),a=e=>{var t=xj(),r=F(t);xh(r,{size:11,class:`flex-shrink-0`});var i=L(r,2),a=F(i);D(i);var o=L(i,2);D(t),R(e=>{q(t,1,`flex items-center gap-2 my-1 text-[11px] ${z(n).confidence===`likely`?`text-fg-muted`:`text-fg-muted/70`}`),U(a,`${e??``} tokens left the agent's
|
|
15
|
+
context · ${z(n).confidence??``}`),q(o,1,`flex-1 border-t border-dashed ${z(n).confidence===`likely`?`border-line`:`border-line/60`}`)},[()=>sd(z(n).droppedTokens)]),H(e,t)};W(i,e=>{z(n)&&e(a)});var o=L(i,2),s=F(o),c=F(s,!0);D(s);var l=L(s,2),f=F(l,!0);D(l);var p=L(l,2),m=F(p,!0);D(p);var h=L(p,2),g=F(h,!0);D(h),D(o),R((e,n,r)=>{U(c,e),q(l,1,`px-1.5 py-0.5 rounded text-[10px] flex-shrink-0 ${z(t).type===`api_error`?`bg-red-100 text-red-700`:z(t).decision===`reject`?`bg-amber-100 text-amber-700`:`bg-subtle text-fg-muted`}`),U(f,z(t).type),U(m,n),U(g,r)},[()=>od(z(t).timestamp),()=>u(z(t)),()=>d(z(t))]),H(e,r)}),D(Ce),D(_e),R((e,t,n)=>{U(c,z(r).id),U(w,`${e??``} `),U(ne,`${t??``} in / ${n??``} out`),U(ie,`${z(r).rollup.apiRequests??``} req`),U(le,z(r).rollup.prompts)},[()=>o(z(r).rollup.costUsd),()=>sd(z(r).rollup.inputTokens),()=>sd(z(r).rollup.outputTokens)]),B(`click`,ye,()=>P(a,!z(a))),H(e,t)};W(be,e=>{z(r)&&e(xe)}),D(ye),D(_e),R((e,t,n)=>{U(ee,e),U(re,` ${t??``} in / ${n??``} out`),U(oe,`${z(i).accepted??``} `),U(ce,z(i).rejected)},[()=>o(z(i).costUsd),()=>sd(z(i).inputTokens),()=>sd(z(i).outputTokens)]),H(e,t)};W(re,e=>{z(n).length===0?e(ie):e(ae,-1)}),D(C),H(e,C),at()}ea([`click`]);function Dj(e,t){return e==null&&t==null?`—`:`${e??`—`}→${t??`—`}`}function Oj(e,t=!0){return e==null||!t?`—`:e<1e-4?`$${(e*1e6).toFixed(2)}μ`:e<.01?`$${(e*1e3).toFixed(3)}m`:`$${e.toFixed(4)}`}function kj(e,t){return e==null?`—`:t&&t>0?`${e} (${t} cached)`:String(e)}function Aj(e,t){return e==null?`—`:t&&t>0?`${e} (${t} reasoning)`:String(e)}function jj(e){return e==null?`—`:`${e>=10?Math.round(e):e.toFixed(1)} tok/s`}function Mj(e){return e==null?`—`:e<1?`${Math.round(e*1e3)}ms`:`${e.toFixed(e<10?2:1)}s`}function Nj(e){if(e.length===0)return{label:``,details:``};let t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);let n=[...t.keys()],r=e=>{let n=t.get(e)??0;return n>1?`${e} (x${n})`:e},i=n.map(r).join(`, `);return n.length===1?{label:r(n[0]),details:``}:n.length===2?{label:`${r(n[0])}, ${r(n[1])}`,details:i}:{label:`${r(n[0])}, ${r(n[1])}, …`,details:i}}var Pj=new Set([`chat`,`text_completion`,`generate_content`,`embeddings`]),Fj=new Set([`invoke_agent`,`create_agent`]);function Ij(e){return e.operation===`execute_handoff`||e.handoff!=null}function Lj(e){let t=new Set;for(let n of e){let r=n.endMs-n.startMs;for(let i of e){if(i===n)continue;let e=i.endMs-i.startMs;if(i.startMs>=n.startMs&&i.endMs<=n.endMs&&e<r){t.add(n.spanId);break}}}return t}function Rj(e){let t={spanCount:e.length,modelCalls:0,toolCalls:0,agentInvocations:0,handoffs:0,errors:0,inputTokens:0,outputTokens:0,totalTokens:0,reasoningTokens:0,cachedTokens:0,totalCostUsd:0,costKnown:!1,costComplete:!0,durationMs:0,models:[],providers:[]};if(e.length===0)return t.costComplete=!1,t;let n=Lj(e),r=1/0,i=-1/0,a=0,o=0,s=new Set,c=new Set,l=new Set,u=0;for(let d of e){r=Math.min(r,d.startMs),i=Math.max(i,d.endMs),d.status===`error`&&t.errors++;let e=d.operation,f=n.has(d.spanId);if(e===`execute_tool`&&!f&&a++,!f)for(let e of d.toolCalls)e.id?l.add(e.id):u++;if(Fj.has(e)&&t.agentInvocations++,Ij(d)&&t.handoffs++,Pj.has(e)&&!f){t.modelCalls++;let e=d.responseModel??d.requestModel;e&&e!==`unknown`&&s.add(e),d.provider&&d.provider!==`unknown`&&c.add(d.provider);let n=d.usage;t.inputTokens+=n.inputTokens??0,t.outputTokens+=n.outputTokens??0,t.reasoningTokens+=n.reasoningOutputTokens??0,t.cachedTokens+=n.cacheReadInputTokens??0,d.cost&&d.cost.source!==`unknown`?(t.totalCostUsd+=d.cost.total,o++):t.costComplete=!1}}return t.totalTokens=t.inputTokens+t.outputTokens,t.toolCalls=a>0?a:l.size+u,t.costKnown=o>0,t.modelCalls===0&&(t.costComplete=!1),t.durationMs=i>r?i-r:0,t.models=[...s],t.providers=[...c],t}function zj(e){let t=new Map;for(let n of e){let e=n.normalized.conversationId,r=e??`trace:${n.traceId}`,i=t.get(r);i?(i.rows.push(n),i.latest=Math.max(i.latest,n.normalized.startMs)):t.set(r,{key:r,conversationId:e,traceId:n.traceId,rows:[n],latest:n.normalized.startMs})}return[...t.values()].sort((e,t)=>t.latest-e.latest)}var Bj=Ns({"openai/gpt-4o":128e3,"openai/gpt-4o-mini":128e3,"openai/gpt-4.1":1047576,"openai/gpt-4-turbo":128e3,"openai/gpt-4":8192,"openai/gpt-3.5-turbo":16385,"openai/o1":2e5,"openai/o3":2e5,"anthropic/claude-opus-4":2e5,"anthropic/claude-sonnet-4":2e5,"anthropic/claude-3-5-sonnet":2e5,"anthropic/claude-3-5-haiku":2e5,"anthropic/claude-3-opus":2e5,"anthropic/claude-3-haiku":2e5,"google/gemini-2.5-pro":1048576,"google/gemini-2.5-flash":1048576,"google/gemini-2.0-flash":1048576,"google/gemini-1.5-pro":2097152,"google/gemini-1.5-flash":1048576,"mistral/mistral-large":128e3,"mistral/mistral-small":32e3,"groq/llama-3.1-70b":131072,"deepseek/deepseek-chat":65536}),Vj=V(`<span class="inline-flex items-center gap-1.5"><svg class="flex-shrink-0 -rotate-90" role="img"><circle fill="none" stroke="currentColor" class="text-line"></circle><circle fill="none" stroke="currentColor" stroke-linecap="round"></circle></svg> <span> </span></span>`);function Hj(e,t){it(t,!0);let n=Z(t,`size`,3,30),r=M(()=>t.total>0?Math.min(t.used/t.total,1):0),i=M(()=>Math.round(z(r)*100)),a=M(()=>z(r)>=.9?{arc:`text-danger`,label:`text-danger`}:z(r)>=.7?{arc:`text-warning`,label:`text-warning`}:{arc:`text-success`,label:`text-fg-muted`}),o=M(()=>(n()-3)/2),s=M(()=>2*Math.PI*z(o)),c=M(()=>z(s)*(1-z(r))),l=M(()=>`${t.used.toLocaleString()} / ${t.total.toLocaleString()} tokens · ${z(i)}% of context window`);var u=Vj(),d=F(u),f=F(d);J(f,`stroke-width`,3);var p=L(f);J(p,`stroke-width`,3),D(d);var m=L(d,2),h=F(m);D(m),D(u),R((e,t)=>{J(u,`title`,z(l)),J(u,`aria-label`,z(l)),J(d,`width`,n()),J(d,`height`,n()),J(d,`viewBox`,`0 0 ${n()} ${n()}`),J(f,`cx`,n()/2),J(f,`cy`,n()/2),J(f,`r`,z(o)),J(p,`cx`,n()/2),J(p,`cy`,n()/2),J(p,`r`,z(o)),J(p,`stroke-dasharray`,z(s)),J(p,`stroke-dashoffset`,z(c)),q(p,0,e),q(m,1,t),U(h,`${z(i)??``}%`)},[()=>K($(`transition-all duration-300`,z(a).arc)),()=>K($(`font-mono text-[11px] tabular-nums`,z(a).label))]),H(e,u),at()}var Uj=V(`<span><!> </span>`),Wj=V(`<span class="group inline-flex items-center gap-0.5"><span class="font-mono text-fg"> </span> <!></span>`),Gj=V(`<button type="button" class="font-mono text-[11px] text-accent hover:underline cursor-pointer" title="Open trace in waterfall"> </button>`),Kj=V(`<span class="font-mono text-[11px] text-fg-subtle"> </span>`),qj=V(`<span class="text-fg-subtle font-mono text-xs"> </span>`),Jj=V(`<span class="inline-flex items-center gap-1 font-mono text-xs" title="Streaming: time to first chunk · output throughput"><!> </span>`),Yj=V(`<div><!> <!> <!> <!> <span class="text-fg-subtle"> </span> <span class="group inline-flex items-center gap-0.5"><!> <!></span> <!> <span class="ml-auto flex items-center gap-3 text-fg-muted"><!> <span class="inline-flex items-center gap-1" title="Latency"><!> </span> <span class="inline-flex items-center gap-1 font-mono text-xs" title="Tokens in (cached) → out (reasoning)"><!> <span class="text-fg-subtle">→</span> </span> <!> <span><!> </span></span></div>`);function Xj(e,t){it(t,!0);let n={openai:`bg-emerald-500/15 text-emerald-600 border-emerald-500/30`,anthropic:`bg-orange-500/15 text-orange-600 border-orange-500/30`,google:`bg-blue-500/15 text-blue-600 border-blue-500/30`,mistral:`bg-fuchsia-500/15 text-fuchsia-600 border-fuchsia-500/30`,groq:`bg-amber-500/15 text-amber-600 border-amber-500/30`,deepseek:`bg-cyan-500/15 text-cyan-600 border-cyan-500/30`},r=M(()=>n[t.span.provider]??`bg-subtle text-fg-muted border-line`),i=M(()=>ad(t.span.endMs-t.span.startMs)),a=M(()=>kj(t.span.usage.inputTokens,t.span.usage.cacheReadInputTokens)),o=M(()=>Aj(t.span.usage.outputTokens,t.span.usage.reasoningOutputTokens)),s=M(()=>Bj(t.span.provider,t.span.responseModel??t.span.requestModel)),c=M(()=>z(s)!=null&&t.span.usage.inputTokens!=null),l=M(()=>[[`temp`,t.span.params.temperature],[`top_p`,t.span.params.topP],[`max`,t.span.params.maxTokens]].filter(([,e])=>e!==void 0).map(([e,t])=>`${e} ${t}`).join(` · `)),u=M(()=>{let e=t.span.streaming;if(!e)return null;let n=[];return e.timeToFirstChunkS!==void 0&&n.push(`TTFC ${Mj(e.timeToFirstChunkS)}`),e.outputTokensPerSecond!==void 0&&n.push(jj(e.outputTokensPerSecond)),n.length>0?n.join(` · `):null}),d=M(()=>t.span.cost?.source===`table`||t.span.cost?.source===`reported`),f=`inline-flex items-center gap-1 px-2 py-0.5 rounded border text-xs font-medium`,p=`bg-amber-500/15 text-amber-600 border-amber-500/30`,m=M(()=>t.span.provider===`unknown`&&t.span.agent?.name?null:t.span.provider),h=M(()=>t.span.responseModel??t.span.requestModel),g=M(()=>t.span.agent?.name&&(t.span.provider===`unknown`||z(h)===`unknown`));var _=Yj(),v=F(_),y=e=>{var n=Uj(),r=F(n);lp(r,{size:12});var i=L(r);D(n),R(e=>{q(n,1,e),U(i,` agent: ${t.span.agent.name??``}`)},[()=>K($(f,`bg-violet-500/15 text-violet-600 border-violet-500/30`))]),H(e,n)},b=e=>{var t=Uj(),n=F(t);Vp(n,{size:12});var i=L(n);D(t),R(e=>{q(t,1,e),U(i,` ${z(m)??``}`)},[()=>K($(f,z(r)))]),H(e,t)};W(v,e=>{z(g)?e(y):e(b,-1)});var x=L(v,2),S=e=>{var n=Uj(),r=F(n);kh(r,{size:12});var i=L(r);D(n),R(e=>{q(n,1,e),J(n,`title`,t.span.guard.message??(t.span.guard.stopped?`Guard stopped the run`:`Guard warning`)),U(i,` guard${t.span.guard.rule?`: ${t.span.guard.rule}`:``}`)},[()=>K($(f,t.span.guard.stopped||t.span.guard.action===`stop`?`bg-red-500/15 text-red-600 border-red-500/30`:p))]),H(e,n)};W(x,e=>{t.span.guard&&e(S)});var C=L(x,2),w=e=>{var n=Uj(),r=F(n);Gh(r,{size:12});var i=L(r);D(n),R((e,r)=>{q(n,1,e),J(n,`title`,r),U(i,` ${t.span.warnings.length??``} warning${t.span.warnings.length===1?``:`s`}`)},[()=>K($(f,p)),()=>t.span.warnings.map(e=>e.message??e.setting??e.type).filter(Boolean).join(`
|
|
16
|
+
`)]),H(e,n)};W(C,e=>{t.span.warnings&&t.span.warnings.length>0&&e(w)});var T=L(C,2),ee=e=>{var t=Wj(),n=F(t),r=F(n,!0);D(n),Q_(L(n,2),{get value(){return z(h)},label:`Copy model name`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(t),R(()=>U(r,z(h))),H(e,t)};W(T,e=>{z(h)!==`unknown`&&e(ee)});var te=L(T,2),ne=F(te,!0);D(te);var re=L(te,2),ie=F(re),ae=e=>{var n=Gj(),r=F(n);D(n),R(e=>U(r,`trace ${e??``}…`),[()=>t.span.traceId.slice(0,8)]),B(`click`,n,function(...e){t.onOpenTrace?.apply(this,e)}),H(e,n)},oe=e=>{var n=Kj(),r=F(n);D(n),R(e=>{J(n,`title`,t.span.traceId),U(r,`trace ${e??``}…`)},[()=>t.span.traceId.slice(0,8)]),H(e,n)};W(ie,e=>{t.onOpenTrace?e(ae):e(oe,-1)}),Q_(L(ie,2),{get value(){return t.span.traceId},label:`Copy trace ID`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(re);var se=L(re,2),ce=e=>{var t=qj(),n=F(t,!0);D(t),R(()=>U(n,z(l))),H(e,t)};W(se,e=>{z(l)&&e(ce)});var le=L(se,2),E=F(le),ue=e=>{var t=Jj(),n=F(t);dm(n,{size:12});var r=L(n);D(t),R(()=>U(r,` ${z(u)??``}`)),H(e,t)};W(E,e=>{z(u)&&e(ue)});var de=L(E,2),fe=F(de);Np(fe,{size:12});var pe=L(fe);D(de);var me=L(de,2),he=F(me);xm(he,{size:12});var ge=L(he),_e=L(ge,2);D(me);var ve=L(me,2),ye=e=>{{let n=M(()=>t.span.usage.inputTokens??0),r=M(()=>z(s)??0);Hj(e,{get used(){return z(n)},get total(){return z(r)}})}};W(ve,e=>{z(c)&&e(ye)});var be=L(ve,2),xe=F(be);Lp(xe,{size:12});var Se=L(xe);D(be),D(le),D(_),R((e,n,r)=>{q(_,1,e),U(ne,t.span.operation),U(pe,` ${z(i)??``}`),U(ge,` ${z(a)??``} `),U(_e,` ${z(o)??``}`),q(be,1,n),J(be,`title`,t.span.cost?.source===`reported`?`Reported cost (gen_ai.usage.cost.usd)`:t.span.cost?.source===`table`?`Estimated cost`:`No price for ${t.span.provider}/${t.span.requestModel}`),U(Se,` ${r??``}`)},[()=>K($(`flex items-center gap-3 flex-wrap`,`px-3 py-2 border-b border-line`,`text-sm`)),()=>K($(`inline-flex items-center gap-1`,z(d)?`text-fg`:`text-fg-subtle`)),()=>Oj(t.span.cost?.total,z(d))]),H(e,_),at()}ea([`click`]);function Zj(e){if(!e)return``;if(/[\s/:.]/.test(e))return e;let t=e.replace(/[_-]+/g,` `).replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1 $2`).trim();return!t.includes(` `)&&t===e?e.charAt(0).toUpperCase()+e.slice(1):t.split(` `).filter(Boolean).map(e=>e.length>1&&e===e.toUpperCase()?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `)}function Qj(e){if(e===void 0)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}var $j=V(`<div> </div> <pre> </pre>`,1);function eM(e,t){it(t,!0);let n=Z(t,`tone`,3,`neutral`);var r=$j(),i=I(r),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),R((e,n,r)=>{q(i,1,e),U(a,t.label),q(o,1,n),U(s,r)},[()=>K($(`text-[10px] font-medium uppercase tracking-wider mb-1`,n()===`positive`?`text-success`:`text-fg-subtle`)),()=>K($(`text-xs p-2 rounded overflow-x-auto whitespace-pre-wrap`,n()===`positive`?`bg-surface border border-success-border text-fg`:`bg-subtle border border-line text-fg`)),()=>Qj(t.value)]),H(e,r),at()}var tM=V(`<span class="font-mono text-[11px] text-violet-600/70 truncate"> </span>`),nM=V(`<span class="ml-auto text-[10px] uppercase tracking-wide text-fg-subtle">no result</span>`),rM=V(`<div class="px-3 py-2 border-t border-emerald-500/30 bg-emerald-500/15"><!></div>`),iM=V(`<div class="px-3 py-1.5 border-t border-line-subtle bg-subtle/60 text-[10px] font-mono text-fg-subtle"> </div>`),aM=V(`<div class="px-3 py-2 border-t border-violet-500/30 bg-surface"><!></div> <!> <!>`,1),oM=V(`<div class="mt-2 border border-violet-500/30 rounded-md overflow-hidden"><button type="button"><!> <!> <span class="font-mono font-medium text-violet-600"> </span> <!> <!></button> <!></div>`);function sM(e,t){it(t,!0);let n=M(()=>Zj(t.call.name)),r=M(()=>z(n)&&z(n)!==t.call.name?z(n):void 0),i=N(!1);function a(e){if(typeof e!=`object`||!e||Array.isArray(e))return``;let t=Object.entries(e);return t.length===0?``:t.slice(0,3).map(([e,t])=>`${e}: ${typeof t==`string`?`"${t.length>20?t.slice(0,20)+`…`:t}"`:t===null?`null`:typeof t==`object`?`…`:String(t)}`).join(`, `)}let o=M(()=>typeof t.call.arguments==`string`?(()=>{try{return JSON.parse(t.call.arguments)}catch{return t.call.arguments}})():t.call.arguments),s=M(()=>t.call.result),c=M(()=>a(z(o)));var l=oM(),u=F(l),d=F(u);{let e=M(()=>$(`text-violet-600 transition-transform shrink-0`,z(i)&&`rotate-90`));Dp(d,{size:12,get class(){return z(e)}})}var f=L(d,2);tg(f,{size:12,class:`text-violet-600 shrink-0`});var p=L(f,2),m=F(p,!0);D(p);var h=L(p,2),g=e=>{var t=tM(),n=F(t);D(t),R(()=>U(n,`(${z(c)??``})`)),H(e,t)};W(h,e=>{!z(i)&&z(c)&&e(g)});var _=L(h,2),v=e=>{H(e,nM())};W(_,e=>{!z(i)&&z(s)===void 0&&e(v)}),D(u);var y=L(u,2),b=e=>{var n=aM(),r=I(n);eM(F(r),{label:`Input`,get value(){return z(o)}}),D(r);var i=L(r,2),a=e=>{var t=rM();eM(F(t),{label:`Output`,get value(){return z(s)},tone:`positive`}),D(t),H(e,t)};W(i,e=>{z(s)!==void 0&&e(a)});var c=L(i,2),l=e=>{var n=iM(),r=F(n);D(n),R(()=>U(r,`id: ${t.call.id??``}`)),H(e,n)};W(c,e=>{t.call.id&&e(l)}),H(e,n)};W(y,e=>{z(i)&&e(b)}),D(l),R(e=>{q(u,1,e),J(p,`title`,z(r)),U(m,t.call.name)},[()=>K($(`w-full px-2.5 py-1.5 flex items-center gap-1.5 text-left`,`text-xs bg-violet-500/15 hover:bg-violet-500/25 transition-colors`))]),B(`click`,u,()=>P(i,!z(i))),H(e,l),at()}ea([`click`]);var cM=(e,t=p)=>{var n=la(),r=I(n),i=e=>{var n=dM(),r=F(n,!0);D(n),R(()=>U(r,t().text)),H(e,n)},a=e=>{var n=fM(),r=F(n);D(n),R(()=>U(r,`[image · ${t().mediaType??``} · ref=${t().dataRef??``}]`)),H(e,n)},o=e=>{var n=fM(),r=F(n);D(n),R(()=>U(r,`[audio · ${t().mediaType??``} · ref=${t().dataRef??``}]`)),H(e,n)},s=e=>{var n=pM(),r=F(n),i=L(r),a=F(i,!0);D(i),D(n),R(()=>{U(r,`Content stored externally (${t().direction??``}). Reference: `),U(a,t().ref)}),H(e,n)},c=e=>{let n=M(()=>JSON.stringify(t().value,null,2));P_(e,{get content(){return z(n)},children:(e,t)=>{var r=mM(),i=F(r,!0);D(r),R(()=>U(i,z(n))),H(e,r)},$$slots:{default:!0}})};W(r,e=>{t().kind===`text`?e(i):t().kind===`image`?e(a,1):t().kind===`audio`?e(o,2):t().kind===`ref`?e(s,3):e(c,-1)}),H(e,n)},lM=(e,t=p)=>{var n=SM(),r=F(n);tg(F(r),{size:14}),Ke(),D(r);var i=L(r,2),a=F(i),o=e=>{var n=vM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().handoff.fromAgent)),H(e,n)};W(a,e=>{t().handoff?.fromAgent&&e(o)});var s=L(a,2),c=e=>{var n=yM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().handoff.toAgent)),H(e,n)};W(s,e=>{t().handoff?.toAgent&&e(c)});var l=L(s,2),u=e=>{var n=bM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().conversationId)),H(e,n)};W(l,e=>{t().conversationId&&e(u)});var d=L(l,2),f=e=>{var n=xM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().agent.name)),H(e,n)};W(d,e=>{t().agent?.name&&e(f)}),D(i),D(n),H(e,n)},uM=(e,t=p)=>{var n=wM(),r=F(n);lp(F(r),{size:14}),Ke(),D(r);var i=L(r,2),a=F(i),o=e=>{var n=xM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().agent.name)),H(e,n)};W(a,e=>{t().agent?.name&&e(o)});var s=L(a,2),c=e=>{var n=CM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().agent.description)),H(e,n)};W(s,e=>{t().agent?.description&&e(c)});var l=L(s,2),u=e=>{var n=bM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().conversationId)),H(e,n)};W(l,e=>{t().conversationId&&e(u)}),D(i),Ke(2),D(n),H(e,n)},dM=V(`<p class="whitespace-pre-wrap leading-relaxed text-fg text-sm"> </p>`),fM=V(`<div class="text-xs text-fg-subtle italic"> </div>`),pM=V(`<div class="text-xs text-fg-muted italic"> <code class="not-italic text-fg"> </code></div>`),mM=V(`<pre class="text-xs bg-code text-fg p-2 rounded overflow-x-auto"> </pre>`),hM=V(`<span class="text-[10px] text-fg-subtle"> </span>`),gM=V(`<span class="text-[10px] font-mono text-fg-subtle"> </span>`),_M=V(`<div><div class="flex items-center gap-1.5 mb-1.5"><span><!> </span> <!> <!> <!></div> <div class="space-y-2"></div> <!></div>`),vM=V(`<div class="text-fg-subtle">from</div> <div class="font-mono"> </div>`,1),yM=V(`<div class="text-fg-subtle">to</div> <div class="font-mono"> </div>`,1),bM=V(`<div class="text-fg-subtle">conversation</div> <div class="font-mono text-xs text-fg-muted truncate"> </div>`,1),xM=V(`<div class="text-fg-subtle">agent</div> <div class="font-mono"> </div>`,1),SM=V(`<div class="p-4 space-y-3 text-sm"><div class="flex items-center gap-2 text-violet-600 font-medium"><!> Agent handoff</div> <div class="grid grid-cols-[80px_1fr] gap-y-2 text-fg-muted"><!> <!> <!> <!></div></div>`),CM=V(`<div class="text-fg-subtle">description</div> <div> </div>`,1),wM=V(`<div class="p-4 space-y-3 text-sm"><div class="flex items-center gap-2 text-violet-600 font-medium"><!> Agent run</div> <div class="grid grid-cols-[100px_1fr] gap-y-2 text-fg-muted"><!> <!> <!></div> <p class="text-xs text-fg-subtle italic">Agent-run spans aggregate child LLM calls. Open child spans for
|
|
17
|
+
transcripts.</p></div>`),TM=V(`<div class="p-4 text-sm text-fg-subtle italic">No conversation payload on this span. Enable content capture (<code class="text-xs">OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true</code>) in your instrumentation to see prompts and completions.</div>`),EM=V(`<div class="p-3 space-y-2"></div>`);function DM(e,t){it(t,!0);let n=(e,t=p)=>{let n=M(()=>i[t().role]??i.user),a=M(()=>z(n).icon);var o=_M(),s=F(o),c=F(s),l=F(c);Ra(l,()=>z(a),(e,t)=>{t(e,{size:10})});var u=L(l);D(c);var d=L(c,2),f=e=>{var n=hM(),r=F(n);D(n),R(()=>U(r,`finish: ${t().finishReason??``}`)),H(e,n)};W(d,e=>{t().finishReason&&e(f)});var m=L(d,2),h=e=>{var n=gM(),r=F(n);D(n),R(()=>U(r,`tool_call_id=${t().toolCallId??``}`)),H(e,n)};W(m,e=>{t().toolCallId&&e(h)});var g=L(m,2);{let e=M(()=>r(t()));Q_(g,{get value(){return z(e)},label:`Copy message`,class:`ml-auto opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`})}D(s);var _=L(s,2);G(_,20,()=>t().parts,e=>e,(e,t)=>{cM(e,()=>t)}),D(_),G(L(_,2),16,()=>t().toolCalls??[],e=>e,(e,t)=>{sM(e,{get call(){return t}})}),D(o),R((e,t)=>{q(o,1,e),q(c,1,t),U(u,` ${z(n).label??``}`)},[()=>K($(`group border rounded-lg px-3 py-2`,z(n).wrap)),()=>K($(`inline-flex items-center gap-1 px-1.5 py-0.5`,`rounded text-[10px] font-medium uppercase tracking-wide`,z(n).chip))]),H(e,o)};function r(e){let t=e.parts.map(e=>e.kind===`text`?e.text:e.kind===`ref`?`[ref:${e.direction}] ${e.ref}`:e.kind===`image`||e.kind===`audio`?`[${e.kind} · ${e.mediaType} · ${e.dataRef}]`:JSON.stringify(e.value,null,2));for(let n of e.toolCalls??[])t.push(JSON.stringify({tool:n.name,...n},null,2));return t.join(`
|
|
18
18
|
|
|
19
|
-
`)}let i={system:{wrap:`bg-subtle border-line`,chip:`bg-hover text-fg-muted`,label:`system`,icon:Eh},user:{wrap:`bg-blue-500/10 border-blue-500/30`,chip:`bg-blue-500/15 text-blue-600`,label:`user`,icon:Jh},assistant:{wrap:`bg-emerald-500/10 border-emerald-500/30`,chip:`bg-emerald-500/15 text-emerald-600`,label:`assistant`,icon:cp},tool:{wrap:`bg-amber-500/10 border-amber-500/30`,chip:`bg-amber-500/15 text-amber-600`,label:`tool`,icon:eg}};var a=da(),o=I(a),s=e=>{var n=da(),r=I(n),i=e=>{gM(e,()=>t.span)},a=e=>{_M(e,()=>t.span)},o=e=>{H(e,MM())};W(r,e=>{t.span.operation===`execute_handoff`||t.span.handoff?e(i):t.span.operation===`invoke_agent`||t.span.operation===`create_agent`?e(a,1):e(o,-1)}),H(e,n)},c=e=>{var r=NM();G(r,20,()=>t.span.messages,e=>e,(e,t)=>{n(e,()=>t)}),D(r),H(e,r)};W(o,e=>{t.span.messages.length===0?e(s):e(c,-1)}),H(e,a),at()}var FM=V(`<span class="inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-700 border border-amber-500/20 font-mono" title="Agent security signal"><!> </span>`),IM=V(`<button type="button"><!> <span class="truncate"> </span></button>`),LM=V(`<div class="flex items-center gap-3"><div><!> <span class="truncate"> </span></div> <div class="relative flex-1 h-6 bg-subtle border border-line-subtle rounded"></div></div>`),RM=V(`<div class="border border-line rounded-lg overflow-hidden bg-surface"><header class="px-3 py-2 border-b border-line bg-subtle flex items-center gap-2 text-sm"><!> <span class="font-mono text-xs text-fg-muted truncate"> </span> <span class="text-xs text-fg-subtle ml-auto flex items-center gap-1.5 flex-wrap justify-end"><!> </span></header> <div class="p-3 space-y-1.5"></div></div>`),zM=V(`<div class="p-6 text-sm text-fg-subtle">No conversations to display.</div>`),BM=V(`<div class="p-3 space-y-3 overflow-y-auto h-full"></div>`);function VM(e,t){it(t,!0);let n=(e,n=p)=>{let r=M(()=>s(n()));var i=RM(),a=F(i),l=F(a);cp(l,{size:14,class:`text-violet-600`});var u=L(l,2),d=F(u,!0);D(u);var f=L(u,2),m=F(f);G(m,16,()=>c(n()),e=>e,(e,t)=>{var n=FM(),r=F(n);Ah(r,{size:10});var i=L(r);D(n),R(()=>U(i,` ${t??``}`)),H(e,n)});var h=L(m);D(f),D(a);var g=L(a,2);G(g,20,()=>z(r).laneOrder,e=>e,(e,i)=>{let a=M(()=>z(r).laneMap.get(i)),s=M(()=>i.startsWith(`handoff:`));var c=LM(),l=F(c),u=F(l),d=e=>{np(e,{size:11})},f=e=>{Bp(e,{size:11,class:`text-fg-subtle`})};W(u,e=>{z(s)?e(d):e(f,-1)});var p=L(u,2),m=F(p,!0);D(p),D(l);var h=L(l,2);G(h,21,()=>z(a),e=>e.spanId,(e,a)=>{let c=M(()=>(z(a).startMs-n().startMs)/z(r).durationMs*100),l=M(()=>Math.max(.5,(z(a).endMs-z(a).startMs)/z(r).durationMs*100)),u=M(()=>z(a).status===`error`),d=M(()=>z(a).spanId===t.selectedSpanId),f=M(()=>z(r).wrapperIdsByLane.get(i)?.has(z(a).spanId)??!1);var p=IM(),m=F(p),h=e=>{Wh(e,{size:9})};W(m,e=>{z(u)&&e(h)});var g=L(m,2),_=F(g,!0);D(g),D(p),R((e,t)=>{J(p,`title`,e),q(p,1,t),co(p,`left: ${z(c)??``}%; width: ${z(l)??``}%; min-width: 8px; z-index: ${z(f)?1:2};`),U(_,z(a).operation)},[()=>`${z(a).operation} · ${ad(z(a).endMs-z(a).startMs)}${z(a).usage.inputTokens==null?``:` · ${z(a).usage.inputTokens}→${z(a).usage.outputTokens??`—`}`}${z(f)?` (wraps children)`:``}`,()=>K(Q(`absolute top-0.5 bottom-0.5 rounded text-[10px] font-mono px-1 truncate flex items-center gap-1 transition-all`,o(z(f),z(s),z(u)),z(d)&&`ring-2 ring-accent ring-offset-1`))]),B(`click`,p,()=>t.onSelectSpan?.(z(a).spanId)),H(e,p)}),D(h),D(c),R(e=>{q(l,1,e),J(l,`title`,i),U(m,i)},[()=>K(Q(`w-44 shrink-0 flex items-center gap-1.5 text-xs font-mono truncate`,z(s)?`text-violet-600`:`text-fg-muted`))]),H(e,c)}),D(g),D(i),R((e,t)=>{J(u,`title`,n().conversationId),U(d,e),U(h,` ${n().spans.length??``} span${n().spans.length===1?``:`s`} · ${t??``} · ${n().service??``}`)},[()=>n().conversationId.startsWith(`trace:`)?`trace ${n().conversationId.slice(6,14)}…`:`conversation ${n().conversationId.slice(0,12)}…`,()=>ad(z(r).durationMs)]),H(e,i)};function r(e){let t=new Map;for(let n of e){let e=n.normalized.conversationId??`trace:${n.traceId}`,r=t.get(e);r?(r.spans.push(n.normalized),r.startMs=Math.min(r.startMs,n.normalized.startMs),r.endMs=Math.max(r.endMs,n.normalized.endMs)):t.set(e,{conversationId:e,service:n.service,traceId:n.traceId,spans:[n.normalized],startMs:n.normalized.startMs,endMs:n.normalized.endMs})}return[...t.values()].sort((e,t)=>t.startMs-e.startMs)}function i(e){return e.handoff?`handoff: ${e.handoff.fromAgent??`?`} → ${e.handoff.toAgent??`?`}`:e.agent?.name?e.agent.name:`${e.provider}/${e.responseModel??e.requestModel}`}function a(e){let t=new Set;for(let n=0;n<e.length;n++){let r=e[n];for(let i=0;i<e.length;i++){if(n===i)continue;let a=e[i];if(a.startMs>=r.startMs&&a.endMs<=r.endMs&&a.endMs-a.startMs<r.endMs-r.startMs){t.add(r.spanId);break}}}return t}function o(e,t,n){return e?`bg-transparent border border-dashed border-line text-fg-subtle hover:bg-hover/50`:t?`bg-violet-500/15 hover:bg-violet-500/25 text-violet-600 border border-violet-500/30`:n?`bg-red-500/15 hover:bg-red-500/25 text-red-600 border border-red-500/30`:`bg-emerald-500/15 hover:bg-emerald-500/25 text-emerald-600 border border-emerald-500/30`}function s(e){let t=[],n=new Map;for(let r of e.spans){let e=i(r);n.has(e)||(n.set(e,[]),t.push(e)),n.get(e).push(r)}let r=new Map;for(let[e,t]of n)r.set(e,a(t));return{laneOrder:t,laneMap:n,wrapperIdsByLane:r,durationMs:Math.max(1,e.endMs-e.startMs)}}function c(e){let t=new Set;for(let n of e.spans){let e=n.agentSecurity;e&&(e.consentOutcome&&t.add(`consent:${e.consentOutcome}`),e.policyDecision===`deny`&&t.add(`policy:deny`),e.injectionVerdict&&e.injectionVerdict!==`clean`&&t.add(`injection:${e.injectionVerdict}`),e.guardStopped&&t.add(`guard:stop`),e.securityEvent&&t.add(e.securityEvent),e.planStepIndex!==void 0&&t.add(`plan:#${e.planStepIndex}`))}return[...t]}let l=M(()=>r(t.rows));var u=da(),d=I(u),f=e=>{H(e,zM())},m=e=>{var t=BM();G(t,21,()=>z(l),e=>e.conversationId,(e,t)=>{n(e,()=>z(t))}),D(t),H(e,t)};W(d,e=>{z(l).length===0?e(f):e(m,-1)}),H(e,u),at()}na([`click`]);function HM(e,t=80){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t)}…`:n}function UM(e,t=60){if(e==null)return``;if(typeof e==`string`)return HM(e,t);try{return HM(JSON.stringify(e),t)}catch{return HM(String(e),t)}}function WM(e){let t=e.responseModel??e.requestModel;return t&&t!==`unknown`?e.provider&&e.provider!==`unknown`?`${e.provider}/${t}`:t:e.agent?.name??e.provider??`model`}function GM(e){let{inputTokens:t,outputTokens:n}=e.usage;if(!(t==null&&n==null))return{input:t,output:n}}function KM(e){for(let t=e.messages.length-1;t>=0;t--){let n=e.messages[t];if(n.role!==`assistant`)continue;let r=n.parts.filter(e=>e.kind===`text`).map(e=>e.text).join(` `).trim();if(r)return r}}function qM(e){let t=e.extras?.raw??{},n=t.tool_response??t.tool_result;return n==null?``:UM(n)}function JM(e){if(e.length===0)return[];let t=new Map(e.map(e=>[e.spanId,e])),n=new Map,r=[];for(let i of e){let e=i.parentSpanId;if(e&&t.has(e)){let t=n.get(e)??[];t.push(i),n.set(e,t)}else r.push(i)}let i=new Set;for(let t of e)t.operation===`execute_tool`&&t.tool?.callId&&i.add(t.tool.callId);let a=new Set,o=(e,t)=>e.startMs-t.startMs||e.endMs-t.endMs,s=0,c=()=>`trace-${s++}`;function l(e,t){return(n.get(e.spanId)??[]).sort(o).map(e=>u(e,t))}function u(e,t){let n=e.operation,r=e.endMs-e.startMs,o={startMs:e.startMs,durationMs:r,spanId:e.spanId};if(n===`execute_handoff`||e.handoff){let n=e.handoff?.fromAgent??`?`,r=e.handoff?.toAgent??`?`;return{id:c(),kind:`handoff`,label:`${n} → ${r}`,depth:t,...o,children:l(e,t+1)}}if(Hj.has(n))return{id:c(),kind:`agent`,label:`Agent: ${e.agent?.name??`agent`}`,depth:t,...o,tokens:GM(e),children:l(e,t+1)};if(n===`execute_tool`){let n=e.tool?.name??e.agent?.name??e.name??`tool`,r=qM(e);return{id:c(),kind:`tool`,label:`Tool: ${n}`,sublabel:r?`→ ${r}`:void 0,depth:t,...o,children:l(e,t+1)}}if(Vj.has(n)){let n=l(e,t+1);if(n.length>0)return{id:c(),kind:`group`,label:WM(e),depth:t,...o,tokens:GM(e),children:n};let r=[],s=e.usage.reasoningOutputTokens??0;s>0&&r.push({id:c(),kind:`reasoning`,label:`Reasoning`,sublabel:`${s} tokens`,depth:t+1,children:[]});for(let n of e.toolCalls){if(n.id&&i.has(n.id)||n.id&&a.has(n.id))continue;n.id&&a.add(n.id);let e=UM(n.arguments,40),o=n.result===void 0?``:` → ${UM(n.result,40)}`;r.push({id:c(),kind:`tool`,label:`Tool: ${n.name}`,sublabel:`${e}${o}`.trim()||void 0,depth:t+1,children:[]})}let u=KM(e);return u&&r.push({id:c(),kind:`text`,label:`Text`,sublabel:HM(u),depth:t+1,children:[]}),{id:c(),kind:`step`,label:WM(e),sublabel:e.operation,depth:t,...o,tokens:GM(e),children:r}}return{id:c(),kind:`step`,label:e.name||n,depth:t,...o,children:l(e,t+1)}}return r.sort(o).map(e=>u(e,0))}function YM(e){let t=[],n=e=>{t.push(e);for(let t of e.children)n(t)};for(let t of e)n(t);return t}var XM={agent:{icon:cp,dot:`bg-violet-500`,text:`text-violet-600`},group:{icon:wm,dot:`bg-blue-500`,text:`text-blue-600`},step:{icon:Bp,dot:`bg-blue-500`,text:`text-fg`},reasoning:{icon:fp,dot:`bg-amber-500`,text:`text-amber-600`},tool:{icon:eg,dot:`bg-purple-500`,text:`text-purple-600`},text:{icon:Im,dot:`bg-emerald-500`,text:`text-emerald-600`},handoff:{icon:np,dot:`bg-violet-500`,text:`text-violet-600`}};function ZM(e){if(!e)return``;let{input:t,output:n}=e;return t==null&&n==null?``:`${t??`—`}→${n??`—`}`}var QM=V(`<div class="p-6 text-sm text-fg-subtle">No trace to display.</div>`),$M=V(`<span class="text-line-subtle select-none">·</span>`),eN=V(`<span class="min-w-0 flex-1 truncate text-fg-subtle font-sans"> </span>`),tN=V(`<span class="flex-1"></span>`),nN=V(`<span title="tokens in → out"> </span>`),rN=V(`<span class="text-fg-muted"> </span>`),iN=V(`<button type="button"><span class="relative flex items-center gap-1.5 shrink-0"><!> <span></span> <!></span> <span> </span> <!> <span class="shrink-0 flex items-center gap-2 text-fg-subtle tabular-nums"><!> <!></span></button>`),aN=V(`<div class="py-1 overflow-y-auto h-full font-mono text-xs"></div>`);function oN(e,t){it(t,!0);let n=Z(t,`selectedSpanId`,3,null),r=M(()=>YM(t.nodes));var i=da(),a=I(i),o=e=>{H(e,QM())},s=e=>{var i=aN();G(i,21,()=>z(r),e=>e.id,(e,r)=>{let i=M(()=>XM[z(r).kind]),a=M(()=>z(i).icon),o=M(()=>z(r).spanId!=null),s=M(()=>z(r).spanId!=null&&z(r).spanId===n());var c=iN(),l=F(c),u=F(l),d=e=>{H(e,$M())};W(u,e=>{z(r).depth>0&&e(d)});var f=L(u,2),p=L(f,2);{let e=M(()=>Q(`shrink-0`,z(i).text));Ba(p,()=>z(a),(t,n)=>{n(t,{size:12,get class(){return z(e)}})})}D(l);var m=L(l,2),h=F(m,!0);D(m);var g=L(m,2),_=e=>{var t=eN(),n=F(t,!0);D(t),R(()=>U(n,z(r).sublabel)),H(e,t)},v=e=>{H(e,tN())};W(g,e=>{z(r).sublabel?e(_):e(v,-1)});var y=L(g,2),b=F(y),x=e=>{var t=nN(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>ZM(z(r).tokens)]),H(e,t)},S=M(()=>ZM(z(r).tokens));W(b,e=>{z(S)&&e(x)});var C=L(b,2),w=e=>{var t=rN(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>ad(z(r).durationMs)]),H(e,t)};W(C,e=>{z(r).durationMs!=null&&z(r).durationMs>0&&e(w)}),D(y),D(c),R((e,t,n)=>{c.disabled=!z(o),q(c,1,e),co(c,`padding-left: ${z(r).depth*18+8}px`),q(f,1,t),q(m,1,n),U(h,z(r).label)},[()=>K(Q(`group flex w-full items-center gap-2 py-1 pr-3 text-left transition-colors`,z(o)?`hover:bg-subtle cursor-pointer`:`cursor-default`,z(s)&&`bg-accent/10`)),()=>K(Q(`w-1.5 h-1.5 rounded-full shrink-0`,z(i).dot)),()=>K(Q(`shrink-0 font-medium`,z(i).text))]),B(`click`,c,()=>z(r).spanId&&t.onSelectSpan?.(z(r).spanId)),H(e,c)}),D(i),H(e,i)};W(a,e=>{z(r).length===0?e(o):e(s,-1)}),H(e,i),at()}na([`click`]);function sN(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e4?`${(e/1e3).toFixed(0)}k`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}var cN=V(`<div><!> <span class="text-[10px] uppercase tracking-wide text-fg-subtle"> </span> <span class="text-xs font-mono font-semibold tabular-nums"> </span></div>`),lN=V(`<div class="flex items-center gap-1.5 px-2 py-1 text-[11px] text-fg-subtle font-mono truncate max-w-full"> </div>`),uN=V(`<div class="flex flex-wrap items-stretch gap-1.5 px-3 py-2 border-b border-line bg-subtle/40" role="group" aria-label="Run summary"><!> <!></div>`);function dN(e,t){it(t,!0);let n=M(()=>[t.summary.costKnown&&{icon:Wp,label:`Cost`,value:Fj(t.summary.totalCostUsd)+(t.summary.costComplete?``:`+`),title:t.summary.costComplete?`Total cost across this run (exact)`:`Total cost — lower bound; some model calls are not in the price table`,accent:!0},t.summary.totalTokens>0&&{icon:bm,label:`Tokens`,value:`${sN(t.summary.inputTokens)}→${sN(t.summary.outputTokens)}`,title:`${t.summary.inputTokens.toLocaleString()} in → ${t.summary.outputTokens.toLocaleString()} out`},t.summary.reasoningTokens>0&&{icon:fp,label:`Reasoning`,value:sN(t.summary.reasoningTokens),title:`${t.summary.reasoningTokens.toLocaleString()} reasoning tokens`},t.summary.modelCalls>0&&{icon:Bp,label:`Model calls`,value:String(t.summary.modelCalls),title:`${t.summary.modelCalls} LLM request(s)`},t.summary.toolCalls>0&&{icon:eg,label:`Tools`,value:String(t.summary.toolCalls),title:`${t.summary.toolCalls} tool execution(s)`},t.summary.agentInvocations>1&&{icon:cp,label:`Agents`,value:String(t.summary.agentInvocations),title:`${t.summary.agentInvocations} agent invocation(s)`},t.summary.durationMs>0&&{icon:Mp,label:`Duration`,value:ad(t.summary.durationMs),title:`Wall-clock span of the run`},t.summary.errors>0&&{icon:Wh,label:`Errors`,value:String(t.summary.errors),title:`${t.summary.errors} errored span(s)`,danger:!0}].filter(Boolean));var r=da(),i=I(r),a=e=>{var r=uN(),i=F(r);G(i,17,()=>z(n),e=>e.label,(e,t)=>{let n=M(()=>z(t).icon);var r=cN(),i=F(r);{let e=M(()=>Q(`shrink-0`,z(t).danger?`text-danger`:z(t).accent?`text-accent`:`text-fg-subtle`));Ba(i,()=>z(n),(t,n)=>{n(t,{size:12,get class(){return z(e)}})})}var a=L(i,2),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(r),R(e=>{q(r,1,e),J(r,`title`,z(t).title),U(o,z(t).label),U(c,z(t).value)},[()=>K(Q(`flex items-center gap-1.5 px-2 py-1 rounded border bg-surface`,z(t).danger?`border-danger/30 text-danger`:z(t).accent?`border-accent/30 text-fg`:`border-line text-fg`))]),H(e,r)});var a=L(i,2),o=e=>{var n=lN(),r=F(n);D(n),R((e,i)=>{J(n,`title`,e),U(r,`${i??``}${t.summary.models.length>2?` +${t.summary.models.length-2}`:``}`)},[()=>`Models: ${t.summary.models.join(`, `)}`,()=>t.summary.models.slice(0,2).join(` · `)]),H(e,n)};W(a,e=>{t.summary.models.length>0&&e(o)}),D(r),H(e,r)};W(i,e=>{z(n).length>0&&e(a)}),H(e,r),at()}var fN=V(`<div class="border-b border-line bg-surface shadow-sm" role="region" aria-label="Guided tour"><div class="h-0.5 bg-line"><div class="h-full bg-accent transition-all duration-300"></div></div> <div class="flex items-start gap-3 px-3 py-2.5"><div class="flex items-center gap-2 shrink-0 pt-0.5"><span></span> <span><!> </span></div> <div class="min-w-0 flex-1"><div class="text-sm font-semibold text-fg leading-tight"> </div> <p class="mt-0.5 text-xs text-fg-muted leading-relaxed"> </p></div> <div class="flex items-center gap-1 shrink-0"><span class="text-[11px] text-fg-subtle tabular-nums mr-1"> </span> <button type="button" class="p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover disabled:opacity-30 disabled:hover:bg-transparent transition-colors" aria-label="Previous step" title="Previous (←)"><!></button> <button type="button"><!></button> <button type="button" class="p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover disabled:opacity-30 disabled:hover:bg-transparent transition-colors" aria-label="Next step" title="Next (→ or Space)"><!></button> <button type="button" class="p-1 ml-1 rounded text-fg-subtle hover:text-fg hover:bg-hover transition-colors" aria-label="Exit tour" title="Exit (Esc)"><!></button></div></div></div>`);function pN(e,t){it(t,!0);let n=Z(t,`index`,15),r=N(!1),i=M(()=>t.steps[n()]),a=M(()=>n()<=0),o=M(()=>n()>=t.steps.length-1),s=M(()=>t.steps.length>1?(n()+1)/t.steps.length*100:100);function c(){z(o)||n(n()+1)}function l(){z(a)||n(n()-1)}function u(){P(r,!z(r))}zr(()=>{if(!z(r))return;if(z(o)){P(r,!1);return}let e=setTimeout(()=>{n(n()+1)},2600);return()=>clearTimeout(e)});function d(e){e.key===`ArrowRight`||e.key===` `?(e.preventDefault(),c()):e.key===`ArrowLeft`?(e.preventDefault(),l()):e.key===`Escape`&&t.onClose()}let f={Agent:{icon:cp,dot:`bg-violet-500`,chip:`text-violet-600 bg-violet-500/10`},Handoff:{icon:np,dot:`bg-violet-500`,chip:`text-violet-600 bg-violet-500/10`},Tool:{icon:eg,dot:`bg-amber-500`,chip:`text-amber-600 bg-amber-500/10`}};function p(e){return e.startsWith(`Model`)?{icon:Bp,dot:`bg-emerald-500`,chip:`text-emerald-600 bg-emerald-500/10`}:f[e]??{icon:Bp,dot:`bg-accent`,chip:`text-fg-muted bg-hover`}}var m=da();ta(`keydown`,Sr,d);var h=I(m),g=e=>{let d=M(()=>p(z(i).role)),f=M(()=>z(d).icon);var m=fN(),h=F(m),g=F(h);D(h);var _=L(h,2),v=F(_),y=F(v),b=L(y,2),x=F(b);Ba(x,()=>z(f),(e,t)=>{t(e,{size:11})});var S=L(x);D(b),D(v);var C=L(v,2),w=F(C),T=F(w,!0);D(w);var ee=L(w,2),te=F(ee,!0);D(ee),D(C);var ne=L(C,2),re=F(ne),ie=F(re);D(re);var ae=L(re,2);wp(F(ae),{size:15}),D(ae);var oe=L(ae,2),se=F(oe),ce=e=>{eh(e,{size:15})},le=e=>{ih(e,{size:15})};W(se,e=>{z(r)?e(ce):e(le,-1)}),D(oe);var E=L(oe,2);Ep(F(E),{size:15}),D(E);var ue=L(E,2);ng(F(ue),{size:15}),D(ue),D(ne),D(_),D(m),R((e,c,l)=>{co(g,`width: ${z(s)??``}%`),q(y,1,e),q(b,1,c),U(S,` ${z(i).role??``}`),U(T,z(i).title),U(te,z(i).explain),U(ie,`${n()+1} / ${t.steps.length??``}`),ae.disabled=z(a),q(oe,1,l),J(oe,`aria-label`,z(r)?`Pause auto-play`:`Play tour`),J(oe,`title`,z(r)?`Pause`:`Auto-play`),E.disabled=z(o)},[()=>K(Q(`w-2 h-2 rounded-full`,z(d).dot)),()=>K(Q(`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-medium uppercase tracking-wide`,z(d).chip)),()=>K(Q(`p-1 rounded transition-colors`,z(r)?`text-accent bg-accent/10`:`text-fg-subtle hover:text-fg hover:bg-hover`))]),B(`click`,ae,l),B(`click`,oe,u),B(`click`,E,c),B(`click`,ue,function(...e){t.onClose?.apply(this,e)}),H(e,m)};W(h,e=>{z(i)&&e(g)}),H(e,m),at()}na([`click`]);function mN(e){if(!e)return!1;let t=e.toLowerCase();return t===`tool_call`||t===`tool_calls`||t===`tool_use`||t===`function_call`}function hN(e){return e.toolCalls.length>0||e.messages.some(e=>e.role===`assistant`&&(e.toolCalls?.length??0)>0)||e.finishReasons?.some(mN)?!0:e.messages.some(e=>mN(e.finishReason))}function gN(e){let t=e.responseModel??e.requestModel;return t&&t!==`unknown`?t:e.provider===`unknown`?`model`:e.provider}function _N(e){let t=e.operation;if(t===`invoke_agent`||t===`create_agent`)return{role:`Agent`,title:`Agent: ${e.agent?.name??`agent`}`,explain:`An agent orchestrates the work — it reads the goal, calls the model, runs tools, and decides what to do next.`};if(t===`execute_handoff`||e.handoff){let t=e.handoff?.fromAgent??`?`,n=e.handoff?.toAgent??`?`;return{role:`Handoff`,title:`Handoff: ${t} → ${n}`,explain:`Control passes from "${t}" to "${n}" — a specialised agent takes over for the next part of the task.`}}if(t===`execute_tool`)return{role:`Tool`,title:`Tool: ${e.tool?.name??e.agent?.name??e.name??`tool`}`,explain:`A tool is real code the agent ran — the model chose the input, the function returned the output.`};if(t===`embeddings`)return{role:`Embeddings`,title:`Embeddings: ${gN(e)}`,explain:`The text is turned into vectors so the agent can search or compare meaning, not just keywords.`};if(t===`speech`||t===`transcription`)return{role:t===`speech`?`Speech`:`Transcription`,title:`${t===`speech`?`Text → speech`:`Audio → text`}: ${gN(e)}`,explain:t===`speech`?`The model converts text into spoken audio.`:`The model converts spoken audio into text the agent can read.`};if(Vj.has(t)){if(hN(e)){let t=Bj(e.toolCalls.map(e=>e.name).filter(Boolean));return{role:`Model · planning`,title:t.label?`Model calls ${t.label}`:`Model decides what to do`,explain:`The model reads the request, reasons about it, and decides which tools to call — it requests them, it does not run them yet.`}}return{role:`Model · responding`,title:`Model writes the answer`,explain:`The model takes everything gathered so far and synthesises it into the answer. This step often carries the most input, so it can be the most expensive.`}}return{role:t,title:e.name||t,explain:`A step in the agent run.`}}function vN(e){return[...e].sort((e,t)=>e.startMs-t.startMs||e.endMs-t.endMs).map(e=>({span:e,..._N(e)}))}function yN(e,t){return t?Kj(e).find(e=>e.rows.some(e=>e.normalized.spanId===t))?.rows??[]:[]}function bN(e){return Pj(e.inputTokens,e.outputTokens)}function xN(e){return Fj(e?.total,e?.source===`table`)}function SN(e,t){let n=e.normalized;return L_(t.toLowerCase(),[n.responseModel??n.requestModel,n.requestModel,n.provider,String(n.operation),n.name,n.agent?.name,e.service])}var CN=V(`<span class="ml-1 text-[10px] text-fg-subtle">(by trace)</span>`),wN=V(`<div class="flex items-center gap-1 px-3 py-1.5 border-b border-line bg-subtle/50"><button type="button"><!> List</button> <button type="button"><!> Timeline <!></button> <button type="button" title="Decompose the selected run into reasoning, tools, text and nested agents"><!> Trace</button> <button type="button" title="Step through this run with plain-language narration"><!> Explain run</button></div>`),TN=V(`<li class="px-3 py-6 text-xs text-fg-subtle text-center">No matches</li>`),EN=V(`<div class="mt-0.5 text-[10px] text-fg-subtle truncate"> </div>`),DN=V(`<li role="option"><button type="button"><div class="flex items-center gap-1.5 text-xs font-mono"><!> <span class="text-fg truncate"> </span></div> <div class="mt-0.5 flex items-center gap-2 text-[11px] text-fg-subtle"><span> </span> <span>·</span> <span> </span> <span>·</span> <span> </span> <span class="ml-auto"> </span></div> <!></button></li>`),ON=V(`<div class="px-3 py-2 border-b border-line bg-subtle/50"><div class="mb-1.5 flex items-center justify-between gap-2 text-[11px] font-medium text-fg-muted"><span> </span> <span> </span></div> <!></div> <ul class="divide-y divide-line overflow-y-auto flex-1 focus:outline-none" tabindex="0" role="listbox" aria-label="GenAI spans"><!> <!></ul>`,1),kN=V(`<div class="p-6 text-sm text-fg-subtle"><div class="flex items-center gap-2 mb-2 text-fg-muted font-medium"><!> No GenAI spans yet</div> <p>Spans appear here as soon as your app emits OpenTelemetry GenAI semconv
|
|
19
|
+
`)}let i={system:{wrap:`bg-subtle border-line`,chip:`bg-hover text-fg-muted`,label:`system`,icon:Dh},user:{wrap:`bg-blue-500/10 border-blue-500/30`,chip:`bg-blue-500/15 text-blue-600`,label:`user`,icon:Yh},assistant:{wrap:`bg-emerald-500/10 border-emerald-500/30`,chip:`bg-emerald-500/15 text-emerald-600`,label:`assistant`,icon:lp},tool:{wrap:`bg-amber-500/10 border-amber-500/30`,chip:`bg-amber-500/15 text-amber-600`,label:`tool`,icon:tg}};var a=la(),o=I(a),s=e=>{var n=la(),r=I(n),i=e=>{lM(e,()=>t.span)},a=e=>{uM(e,()=>t.span)},o=e=>{H(e,TM())};W(r,e=>{t.span.operation===`execute_handoff`||t.span.handoff?e(i):t.span.operation===`invoke_agent`||t.span.operation===`create_agent`?e(a,1):e(o,-1)}),H(e,n)},c=e=>{var r=EM();G(r,20,()=>t.span.messages,e=>e,(e,t)=>{n(e,()=>t)}),D(r),H(e,r)};W(o,e=>{t.span.messages.length===0?e(s):e(c,-1)}),H(e,a),at()}var OM=V(`<span class="inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-700 border border-amber-500/20 font-mono" title="Agent security signal"><!> </span>`),kM=V(`<button type="button"><!> <span class="truncate"> </span></button>`),AM=V(`<div class="flex items-center gap-3"><div><!> <span class="truncate"> </span></div> <div class="relative flex-1 h-6 bg-subtle border border-line-subtle rounded"></div></div>`),jM=V(`<div class="border border-line rounded-lg overflow-hidden bg-surface"><header class="px-3 py-2 border-b border-line bg-subtle flex items-center gap-2 text-sm"><!> <span class="font-mono text-xs text-fg-muted truncate"> </span> <span class="text-xs text-fg-subtle ml-auto flex items-center gap-1.5 flex-wrap justify-end"><!> </span></header> <div class="p-3 space-y-1.5"></div></div>`),MM=V(`<div class="p-6 text-sm text-fg-subtle">No conversations to display.</div>`),NM=V(`<div class="p-3 space-y-3 overflow-y-auto h-full"></div>`);function PM(e,t){it(t,!0);let n=(e,n=p)=>{let r=M(()=>s(n()));var i=jM(),a=F(i),l=F(a);lp(l,{size:14,class:`text-violet-600`});var u=L(l,2),d=F(u,!0);D(u);var f=L(u,2),m=F(f);G(m,16,()=>c(n()),e=>e,(e,t)=>{var n=OM(),r=F(n);jh(r,{size:10});var i=L(r);D(n),R(()=>U(i,` ${t??``}`)),H(e,n)});var h=L(m);D(f),D(a);var g=L(a,2);G(g,20,()=>z(r).laneOrder,e=>e,(e,i)=>{let a=M(()=>z(r).laneMap.get(i)),s=M(()=>i.startsWith(`handoff:`));var c=AM(),l=F(c),u=F(l),d=e=>{rp(e,{size:11})},f=e=>{Vp(e,{size:11,class:`text-fg-subtle`})};W(u,e=>{z(s)?e(d):e(f,-1)});var p=L(u,2),m=F(p,!0);D(p),D(l);var h=L(l,2);G(h,21,()=>z(a),e=>e.spanId,(e,a)=>{let c=M(()=>(z(a).startMs-n().startMs)/z(r).durationMs*100),l=M(()=>Math.max(.5,(z(a).endMs-z(a).startMs)/z(r).durationMs*100)),u=M(()=>z(a).status===`error`),d=M(()=>z(a).spanId===t.selectedSpanId),f=M(()=>z(r).wrapperIdsByLane.get(i)?.has(z(a).spanId)??!1);var p=kM(),m=F(p),h=e=>{Gh(e,{size:9})};W(m,e=>{z(u)&&e(h)});var g=L(m,2),_=F(g,!0);D(g),D(p),R((e,t)=>{J(p,`title`,e),q(p,1,t),oo(p,`left: ${z(c)??``}%; width: ${z(l)??``}%; min-width: 8px; z-index: ${z(f)?1:2};`),U(_,z(a).operation)},[()=>`${z(a).operation} · ${ad(z(a).endMs-z(a).startMs)}${z(a).usage.inputTokens==null?``:` · ${z(a).usage.inputTokens}→${z(a).usage.outputTokens??`—`}`}${z(f)?` (wraps children)`:``}`,()=>K($(`absolute top-0.5 bottom-0.5 rounded text-[10px] font-mono px-1 truncate flex items-center gap-1 transition-all`,o(z(f),z(s),z(u)),z(d)&&`ring-2 ring-accent ring-offset-1`))]),B(`click`,p,()=>t.onSelectSpan?.(z(a).spanId)),H(e,p)}),D(h),D(c),R(e=>{q(l,1,e),J(l,`title`,i),U(m,i)},[()=>K($(`w-44 shrink-0 flex items-center gap-1.5 text-xs font-mono truncate`,z(s)?`text-violet-600`:`text-fg-muted`))]),H(e,c)}),D(g),D(i),R((e,t)=>{J(u,`title`,n().conversationId),U(d,e),U(h,` ${n().spans.length??``} span${n().spans.length===1?``:`s`} · ${t??``} · ${n().service??``}`)},[()=>n().conversationId.startsWith(`trace:`)?`trace ${n().conversationId.slice(6,14)}…`:`conversation ${n().conversationId.slice(0,12)}…`,()=>ad(z(r).durationMs)]),H(e,i)};function r(e){let t=new Map;for(let n of e){let e=n.normalized.conversationId??`trace:${n.traceId}`,r=t.get(e);r?(r.spans.push(n.normalized),r.startMs=Math.min(r.startMs,n.normalized.startMs),r.endMs=Math.max(r.endMs,n.normalized.endMs)):t.set(e,{conversationId:e,service:n.service,traceId:n.traceId,spans:[n.normalized],startMs:n.normalized.startMs,endMs:n.normalized.endMs})}return[...t.values()].sort((e,t)=>t.startMs-e.startMs)}function i(e){return e.handoff?`handoff: ${e.handoff.fromAgent??`?`} → ${e.handoff.toAgent??`?`}`:e.agent?.name?e.agent.name:`${e.provider}/${e.responseModel??e.requestModel}`}function a(e){let t=new Set;for(let n=0;n<e.length;n++){let r=e[n];for(let i=0;i<e.length;i++){if(n===i)continue;let a=e[i];if(a.startMs>=r.startMs&&a.endMs<=r.endMs&&a.endMs-a.startMs<r.endMs-r.startMs){t.add(r.spanId);break}}}return t}function o(e,t,n){return e?`bg-transparent border border-dashed border-line text-fg-subtle hover:bg-hover/50`:t?`bg-violet-500/15 hover:bg-violet-500/25 text-violet-600 border border-violet-500/30`:n?`bg-red-500/15 hover:bg-red-500/25 text-red-600 border border-red-500/30`:`bg-emerald-500/15 hover:bg-emerald-500/25 text-emerald-600 border border-emerald-500/30`}function s(e){let t=[],n=new Map;for(let r of e.spans){let e=i(r);n.has(e)||(n.set(e,[]),t.push(e)),n.get(e).push(r)}let r=new Map;for(let[e,t]of n)r.set(e,a(t));return{laneOrder:t,laneMap:n,wrapperIdsByLane:r,durationMs:Math.max(1,e.endMs-e.startMs)}}function c(e){let t=new Set;for(let n of e.spans){let e=n.agentSecurity;e&&(e.consentOutcome&&t.add(`consent:${e.consentOutcome}`),e.policyDecision===`deny`&&t.add(`policy:deny`),e.injectionVerdict&&e.injectionVerdict!==`clean`&&t.add(`injection:${e.injectionVerdict}`),e.guardStopped&&t.add(`guard:stop`),e.securityEvent&&t.add(e.securityEvent),e.planStepIndex!==void 0&&t.add(`plan:#${e.planStepIndex}`))}return[...t]}let l=M(()=>r(t.rows));var u=la(),d=I(u),f=e=>{H(e,MM())},m=e=>{var t=NM();G(t,21,()=>z(l),e=>e.conversationId,(e,t)=>{n(e,()=>z(t))}),D(t),H(e,t)};W(d,e=>{z(l).length===0?e(f):e(m,-1)}),H(e,u),at()}ea([`click`]);function FM(e,t=80){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t)}…`:n}function IM(e,t=60){if(e==null)return``;if(typeof e==`string`)return FM(e,t);try{return FM(JSON.stringify(e),t)}catch{return FM(String(e),t)}}function LM(e){let t=e.responseModel??e.requestModel;return t&&t!==`unknown`?e.provider&&e.provider!==`unknown`?`${e.provider}/${t}`:t:e.agent?.name??e.provider??`model`}function RM(e){let{inputTokens:t,outputTokens:n}=e.usage;if(t!=null||n!=null)return{input:t,output:n}}function zM(e){for(let t=e.messages.length-1;t>=0;t--){let n=e.messages[t];if(n.role!==`assistant`)continue;let r=n.parts.filter(e=>e.kind===`text`).map(e=>e.text).join(` `).trim();if(r)return r}}function BM(e){let t=e.extras?.raw??{},n=t.tool_response??t.tool_result;return n==null?``:IM(n)}function VM(e){if(e.length===0)return[];let t=new Map(e.map(e=>[e.spanId,e])),n=new Map,r=[];for(let i of e){let e=i.parentSpanId;if(e&&t.has(e)){let t=n.get(e)??[];t.push(i),n.set(e,t)}else r.push(i)}let i=new Set;for(let t of e)t.operation===`execute_tool`&&t.tool?.callId&&i.add(t.tool.callId);let a=new Set,o=(e,t)=>e.startMs-t.startMs||e.endMs-t.endMs,s=0,c=()=>`trace-${s++}`;function l(e,t){return(n.get(e.spanId)??[]).sort(o).map(e=>u(e,t))}function u(e,t){let n=e.operation,r=e.endMs-e.startMs,o={startMs:e.startMs,durationMs:r,spanId:e.spanId};if(n===`execute_handoff`||e.handoff){let n=e.handoff?.fromAgent??`?`,r=e.handoff?.toAgent??`?`;return{id:c(),kind:`handoff`,label:`${n} → ${r}`,depth:t,...o,children:l(e,t+1)}}if(Fj.has(n))return{id:c(),kind:`agent`,label:`Agent: ${e.agent?.name??`agent`}`,depth:t,...o,tokens:RM(e),children:l(e,t+1)};if(n===`execute_tool`){let n=e.tool?.name??e.agent?.name??e.name??`tool`,r=BM(e);return{id:c(),kind:`tool`,label:`Tool: ${n}`,sublabel:r?`→ ${r}`:void 0,depth:t,...o,children:l(e,t+1)}}if(Pj.has(n)){let n=l(e,t+1);if(n.length>0)return{id:c(),kind:`group`,label:LM(e),depth:t,...o,tokens:RM(e),children:n};let r=[],s=e.usage.reasoningOutputTokens??0;s>0&&r.push({id:c(),kind:`reasoning`,label:`Reasoning`,sublabel:`${s} tokens`,depth:t+1,children:[]});for(let n of e.toolCalls){if(n.id&&i.has(n.id)||n.id&&a.has(n.id))continue;n.id&&a.add(n.id);let e=IM(n.arguments,40),o=n.result===void 0?``:` → ${IM(n.result,40)}`;r.push({id:c(),kind:`tool`,label:`Tool: ${n.name}`,sublabel:`${e}${o}`.trim()||void 0,depth:t+1,children:[]})}let u=zM(e);return u&&r.push({id:c(),kind:`text`,label:`Text`,sublabel:FM(u),depth:t+1,children:[]}),{id:c(),kind:`step`,label:LM(e),sublabel:e.operation,depth:t,...o,tokens:RM(e),children:r}}return{id:c(),kind:`step`,label:e.name||n,depth:t,...o,children:l(e,t+1)}}return r.sort(o).map(e=>u(e,0))}function HM(e){let t=[],n=e=>{t.push(e);for(let t of e.children)n(t)};for(let t of e)n(t);return t}var UM={agent:{icon:lp,dot:`bg-violet-500`,text:`text-violet-600`},group:{icon:Tm,dot:`bg-blue-500`,text:`text-blue-600`},step:{icon:Vp,dot:`bg-blue-500`,text:`text-fg`},reasoning:{icon:pp,dot:`bg-amber-500`,text:`text-amber-600`},tool:{icon:tg,dot:`bg-purple-500`,text:`text-purple-600`},text:{icon:Lm,dot:`bg-emerald-500`,text:`text-emerald-600`},handoff:{icon:rp,dot:`bg-violet-500`,text:`text-violet-600`}};function WM(e){if(!e)return``;let{input:t,output:n}=e;return t==null&&n==null?``:`${t??`—`}→${n??`—`}`}var GM=V(`<div class="p-6 text-sm text-fg-subtle">No trace to display.</div>`),KM=V(`<span class="text-line-subtle select-none">·</span>`),qM=V(`<span class="min-w-0 flex-1 truncate text-fg-subtle font-sans"> </span>`),JM=V(`<span class="flex-1"></span>`),YM=V(`<span title="tokens in → out"> </span>`),XM=V(`<span class="text-fg-muted"> </span>`),ZM=V(`<button type="button"><span class="relative flex items-center gap-1.5 shrink-0"><!> <span></span> <!></span> <span> </span> <!> <span class="shrink-0 flex items-center gap-2 text-fg-subtle tabular-nums"><!> <!></span></button>`),QM=V(`<div class="py-1 overflow-y-auto h-full font-mono text-xs"></div>`);function $M(e,t){it(t,!0);let n=Z(t,`selectedSpanId`,3,null),r=M(()=>HM(t.nodes));var i=la(),a=I(i),o=e=>{H(e,GM())},s=e=>{var i=QM();G(i,21,()=>z(r),e=>e.id,(e,r)=>{let i=M(()=>UM[z(r).kind]),a=M(()=>z(i).icon),o=M(()=>z(r).spanId!=null),s=M(()=>z(r).spanId!=null&&z(r).spanId===n());var c=ZM(),l=F(c),u=F(l),d=e=>{H(e,KM())};W(u,e=>{z(r).depth>0&&e(d)});var f=L(u,2),p=L(f,2);{let e=M(()=>$(`shrink-0`,z(i).text));Ra(p,()=>z(a),(t,n)=>{n(t,{size:12,get class(){return z(e)}})})}D(l);var m=L(l,2),h=F(m,!0);D(m);var g=L(m,2),_=e=>{var t=qM(),n=F(t,!0);D(t),R(()=>U(n,z(r).sublabel)),H(e,t)},v=e=>{H(e,JM())};W(g,e=>{z(r).sublabel?e(_):e(v,-1)});var y=L(g,2),b=F(y),x=e=>{var t=YM(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>WM(z(r).tokens)]),H(e,t)},S=M(()=>WM(z(r).tokens));W(b,e=>{z(S)&&e(x)});var C=L(b,2),w=e=>{var t=XM(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>ad(z(r).durationMs)]),H(e,t)};W(C,e=>{z(r).durationMs!=null&&z(r).durationMs>0&&e(w)}),D(y),D(c),R((e,t,n)=>{c.disabled=!z(o),q(c,1,e),oo(c,`padding-left: ${z(r).depth*18+8}px`),q(f,1,t),q(m,1,n),U(h,z(r).label)},[()=>K($(`group flex w-full items-center gap-2 py-1 pr-3 text-left transition-colors`,z(o)?`hover:bg-subtle cursor-pointer`:`cursor-default`,z(s)&&`bg-accent/10`)),()=>K($(`w-1.5 h-1.5 rounded-full shrink-0`,z(i).dot)),()=>K($(`shrink-0 font-medium`,z(i).text))]),B(`click`,c,()=>z(r).spanId&&t.onSelectSpan?.(z(r).spanId)),H(e,c)}),D(i),H(e,i)};W(a,e=>{z(r).length===0?e(o):e(s,-1)}),H(e,i),at()}ea([`click`]);function eN(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e4?`${(e/1e3).toFixed(0)}k`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}var tN=V(`<div><!> <span class="text-[10px] uppercase tracking-wide text-fg-subtle"> </span> <span class="text-xs font-mono font-semibold tabular-nums"> </span></div>`),nN=V(`<div class="flex items-center gap-1.5 px-2 py-1 text-[11px] text-fg-subtle font-mono truncate max-w-full"> </div>`),rN=V(`<div class="flex flex-wrap items-stretch gap-1.5 px-3 py-2 border-b border-line bg-subtle/40" role="group" aria-label="Run summary"><!> <!></div>`);function iN(e,t){it(t,!0);let n=M(()=>[t.summary.costKnown&&{icon:Gp,label:`Cost`,value:Oj(t.summary.totalCostUsd)+(t.summary.costComplete?``:`+`),title:t.summary.costComplete?`Total cost across this run (exact)`:`Total cost — lower bound; some model calls are not in the price table`,accent:!0},t.summary.totalTokens>0&&{icon:xm,label:`Tokens`,value:`${eN(t.summary.inputTokens)}→${eN(t.summary.outputTokens)}`,title:`${t.summary.inputTokens.toLocaleString()} in → ${t.summary.outputTokens.toLocaleString()} out`},t.summary.reasoningTokens>0&&{icon:pp,label:`Reasoning`,value:eN(t.summary.reasoningTokens),title:`${t.summary.reasoningTokens.toLocaleString()} reasoning tokens`},t.summary.modelCalls>0&&{icon:Vp,label:`Model calls`,value:String(t.summary.modelCalls),title:`${t.summary.modelCalls} LLM request(s)`},t.summary.toolCalls>0&&{icon:tg,label:`Tools`,value:String(t.summary.toolCalls),title:`${t.summary.toolCalls} tool execution(s)`},t.summary.agentInvocations>1&&{icon:lp,label:`Agents`,value:String(t.summary.agentInvocations),title:`${t.summary.agentInvocations} agent invocation(s)`},t.summary.durationMs>0&&{icon:Np,label:`Duration`,value:ad(t.summary.durationMs),title:`Wall-clock span of the run`},t.summary.errors>0&&{icon:Gh,label:`Errors`,value:String(t.summary.errors),title:`${t.summary.errors} errored span(s)`,danger:!0}].filter(Boolean));var r=la(),i=I(r),a=e=>{var r=rN(),i=F(r);G(i,17,()=>z(n),e=>e.label,(e,t)=>{let n=M(()=>z(t).icon);var r=tN(),i=F(r);{let e=M(()=>$(`shrink-0`,z(t).danger?`text-danger`:z(t).accent?`text-accent`:`text-fg-subtle`));Ra(i,()=>z(n),(t,n)=>{n(t,{size:12,get class(){return z(e)}})})}var a=L(i,2),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(r),R(e=>{q(r,1,e),J(r,`title`,z(t).title),U(o,z(t).label),U(c,z(t).value)},[()=>K($(`flex items-center gap-1.5 px-2 py-1 rounded border bg-surface`,z(t).danger?`border-danger/30 text-danger`:z(t).accent?`border-accent/30 text-fg`:`border-line text-fg`))]),H(e,r)});var a=L(i,2),o=e=>{var n=nN(),r=F(n);D(n),R((e,i)=>{J(n,`title`,e),U(r,`${i??``}${t.summary.models.length>2?` +${t.summary.models.length-2}`:``}`)},[()=>`Models: ${t.summary.models.join(`, `)}`,()=>t.summary.models.slice(0,2).join(` · `)]),H(e,n)};W(a,e=>{t.summary.models.length>0&&e(o)}),D(r),H(e,r)};W(i,e=>{z(n).length>0&&e(a)}),H(e,r),at()}var aN=V(`<div class="border-b border-line bg-surface shadow-sm" role="region" aria-label="Guided tour"><div class="h-0.5 bg-line"><div class="h-full bg-accent transition-all duration-300"></div></div> <div class="flex items-start gap-3 px-3 py-2.5"><div class="flex items-center gap-2 shrink-0 pt-0.5"><span></span> <span><!> </span></div> <div class="min-w-0 flex-1"><div class="text-sm font-semibold text-fg leading-tight"> </div> <p class="mt-0.5 text-xs text-fg-muted leading-relaxed"> </p></div> <div class="flex items-center gap-1 shrink-0"><span class="text-[11px] text-fg-subtle tabular-nums mr-1"> </span> <button type="button" class="p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover disabled:opacity-30 disabled:hover:bg-transparent transition-colors" aria-label="Previous step" title="Previous (←)"><!></button> <button type="button"><!></button> <button type="button" class="p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover disabled:opacity-30 disabled:hover:bg-transparent transition-colors" aria-label="Next step" title="Next (→ or Space)"><!></button> <button type="button" class="p-1 ml-1 rounded text-fg-subtle hover:text-fg hover:bg-hover transition-colors" aria-label="Exit tour" title="Exit (Esc)"><!></button></div></div></div>`);function oN(e,t){it(t,!0);let n=Z(t,`index`,15),r=N(!1),i=M(()=>t.steps[n()]),a=M(()=>n()<=0),o=M(()=>n()>=t.steps.length-1),s=M(()=>t.steps.length>1?(n()+1)/t.steps.length*100:100);function c(){z(o)||n(n()+1)}function l(){z(a)||n(n()-1)}function u(){P(r,!z(r))}Lr(()=>{if(!z(r))return;if(z(o)){P(r,!1);return}let e=setTimeout(()=>{n(n()+1)},2600);return()=>clearTimeout(e)});function d(e){e.key===`ArrowRight`||e.key===` `?(e.preventDefault(),c()):e.key===`ArrowLeft`?(e.preventDefault(),l()):e.key===`Escape`&&t.onClose()}let f={Agent:{icon:lp,dot:`bg-violet-500`,chip:`text-violet-600 bg-violet-500/10`},Handoff:{icon:rp,dot:`bg-violet-500`,chip:`text-violet-600 bg-violet-500/10`},Tool:{icon:tg,dot:`bg-amber-500`,chip:`text-amber-600 bg-amber-500/10`}};function p(e){return e.startsWith(`Model`)?{icon:Vp,dot:`bg-emerald-500`,chip:`text-emerald-600 bg-emerald-500/10`}:f[e]??{icon:Vp,dot:`bg-accent`,chip:`text-fg-muted bg-hover`}}var m=la();$i(`keydown`,br,d);var h=I(m),g=e=>{let d=M(()=>p(z(i).role)),f=M(()=>z(d).icon);var m=aN(),h=F(m),g=F(h);D(h);var _=L(h,2),v=F(_),y=F(v),b=L(y,2),x=F(b);Ra(x,()=>z(f),(e,t)=>{t(e,{size:11})});var S=L(x);D(b),D(v);var C=L(v,2),w=F(C),T=F(w,!0);D(w);var ee=L(w,2),te=F(ee,!0);D(ee),D(C);var ne=L(C,2),re=F(ne),ie=F(re);D(re);var ae=L(re,2);Tp(F(ae),{size:15}),D(ae);var oe=L(ae,2),se=F(oe),ce=e=>{th(e,{size:15})},le=e=>{ah(e,{size:15})};W(se,e=>{z(r)?e(ce):e(le,-1)}),D(oe);var E=L(oe,2);Dp(F(E),{size:15}),D(E);var ue=L(E,2);rg(F(ue),{size:15}),D(ue),D(ne),D(_),D(m),R((e,c,l)=>{oo(g,`width: ${z(s)??``}%`),q(y,1,e),q(b,1,c),U(S,` ${z(i).role??``}`),U(T,z(i).title),U(te,z(i).explain),U(ie,`${n()+1} / ${t.steps.length??``}`),ae.disabled=z(a),q(oe,1,l),J(oe,`aria-label`,z(r)?`Pause auto-play`:`Play tour`),J(oe,`title`,z(r)?`Pause`:`Auto-play`),E.disabled=z(o)},[()=>K($(`w-2 h-2 rounded-full`,z(d).dot)),()=>K($(`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-medium uppercase tracking-wide`,z(d).chip)),()=>K($(`p-1 rounded transition-colors`,z(r)?`text-accent bg-accent/10`:`text-fg-subtle hover:text-fg hover:bg-hover`))]),B(`click`,ae,l),B(`click`,oe,u),B(`click`,E,c),B(`click`,ue,function(...e){t.onClose?.apply(this,e)}),H(e,m)};W(h,e=>{z(i)&&e(g)}),H(e,m),at()}ea([`click`]);function sN(e){if(!e)return!1;let t=e.toLowerCase();return t===`tool_call`||t===`tool_calls`||t===`tool_use`||t===`function_call`}function cN(e){return e.toolCalls.length>0||e.messages.some(e=>e.role===`assistant`&&(e.toolCalls?.length??0)>0)||e.finishReasons?.some(sN)?!0:e.messages.some(e=>sN(e.finishReason))}function lN(e){let t=e.responseModel??e.requestModel;return t&&t!==`unknown`?t:e.provider===`unknown`?`model`:e.provider}function uN(e){let t=e.operation;if(t===`invoke_agent`||t===`create_agent`)return{role:`Agent`,title:`Agent: ${e.agent?.name??`agent`}`,explain:`An agent orchestrates the work — it reads the goal, calls the model, runs tools, and decides what to do next.`};if(t===`execute_handoff`||e.handoff){let t=e.handoff?.fromAgent??`?`,n=e.handoff?.toAgent??`?`;return{role:`Handoff`,title:`Handoff: ${t} → ${n}`,explain:`Control passes from "${t}" to "${n}" — a specialised agent takes over for the next part of the task.`}}if(t===`execute_tool`)return{role:`Tool`,title:`Tool: ${e.tool?.name??e.agent?.name??e.name??`tool`}`,explain:`A tool is real code the agent ran — the model chose the input, the function returned the output.`};if(t===`embeddings`)return{role:`Embeddings`,title:`Embeddings: ${lN(e)}`,explain:`The text is turned into vectors so the agent can search or compare meaning, not just keywords.`};if(t===`speech`||t===`transcription`)return{role:t===`speech`?`Speech`:`Transcription`,title:`${t===`speech`?`Text → speech`:`Audio → text`}: ${lN(e)}`,explain:t===`speech`?`The model converts text into spoken audio.`:`The model converts spoken audio into text the agent can read.`};if(Pj.has(t)){if(cN(e)){let t=Nj(e.toolCalls.map(e=>e.name).filter(Boolean));return{role:`Model · planning`,title:t.label?`Model calls ${t.label}`:`Model decides what to do`,explain:`The model reads the request, reasons about it, and decides which tools to call — it requests them, it does not run them yet.`}}return{role:`Model · responding`,title:`Model writes the answer`,explain:`The model takes everything gathered so far and synthesises it into the answer. This step often carries the most input, so it can be the most expensive.`}}return{role:t,title:e.name||t,explain:`A step in the agent run.`}}function dN(e){return[...e].sort((e,t)=>e.startMs-t.startMs||e.endMs-t.endMs).map(e=>({span:e,...uN(e)}))}function fN(e,t){return t?zj(e).find(e=>e.rows.some(e=>e.normalized.spanId===t))?.rows??[]:[]}function pN(e){return Dj(e.inputTokens,e.outputTokens)}function mN(e){return Oj(e?.total,e?.source===`table`)}function hN(e,t){let n=e.normalized;return R_(t.toLowerCase(),[n.responseModel??n.requestModel,n.requestModel,n.provider,String(n.operation),n.name,n.agent?.name,e.service])}var gN=V(`<span class="ml-1 text-[10px] text-fg-subtle">(by trace)</span>`),_N=V(`<div class="flex items-center gap-1 px-3 py-1.5 border-b border-line bg-subtle/50"><button type="button"><!> List</button> <button type="button"><!> Timeline <!></button> <button type="button" title="Decompose the selected run into reasoning, tools, text and nested agents"><!> Trace</button> <button type="button" title="Step through this run with plain-language narration"><!> Explain run</button></div>`),vN=V(`<li class="px-3 py-6 text-xs text-fg-subtle text-center">No matches</li>`),yN=V(`<div class="mt-0.5 text-[10px] text-fg-subtle truncate"> </div>`),bN=V(`<li role="option"><button type="button"><div class="flex items-center gap-1.5 text-xs font-mono"><!> <span class="text-fg truncate"> </span></div> <div class="mt-0.5 flex items-center gap-2 text-[11px] text-fg-subtle"><span> </span> <span>·</span> <span> </span> <span>·</span> <span> </span> <span class="ml-auto"> </span></div> <!></button></li>`),xN=V(`<div class="px-3 py-2 border-b border-line bg-subtle/50"><div class="mb-1.5 flex items-center justify-between gap-2 text-[11px] font-medium text-fg-muted"><span> </span> <span> </span></div> <!></div> <ul class="divide-y divide-line overflow-y-auto flex-1 focus:outline-none" tabindex="0" role="listbox" aria-label="GenAI spans"><!> <!></ul>`,1),SN=V(`<div class="p-6 text-sm text-fg-subtle"><div class="flex items-center gap-2 mb-2 text-fg-muted font-medium"><!> No GenAI spans yet</div> <p>Spans appear here as soon as your app emits OpenTelemetry GenAI semconv
|
|
20
20
|
attributes (any of <code class="text-xs">gen_ai.system</code>, <code class="text-xs">gen_ai.provider.name</code>, or <code class="text-xs">gen_ai.operation.name</code>). Works with Vercel AI
|
|
21
21
|
SDK <code class="text-xs">experimental_telemetry</code>, Pydantic AI +
|
|
22
22
|
Logfire, OpenAI Agents v2, Anthropic, Google GenAI, LangChain, OpenLLMetry
|
|
23
|
-
— anything following the spec.</p></div>`),
|
|
24
|
-
to arrive.</div>`),MN=V(`<div class="flex flex-col h-full"><!> <!> <div class="flex-1 overflow-hidden"><!></div></div>`),NN=V(`<div class="flex items-center justify-between px-3 pt-2"><button type="button" class="@md:hidden inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors"><!> Back</button> <button type="button" class="ml-auto inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors" title="Open this span in the Traces waterfall"><!> Open in Traces</button></div> <!> <!> <!>`,1),PN=V(`<div class="flex flex-col h-full"><!> <!> <div class="@container flex flex-1 overflow-hidden"><div><!></div> <div><!></div></div></div>`);function FN(e,t){it(t,!0);let n=e=>{var t=wN(),n=F(t);Mm(F(n),{size:12}),Ke(),D(n);var r=L(n,2),i=F(r);Km(i,{size:12});var a=L(i,2),s=e=>{H(e,CN())};W(a,e=>{z(p)||e(s)}),D(r);var c=L(r,2);Am(F(c),{size:12}),Ke(),D(c);var l=L(c,2);Mh(F(l),{size:12}),Ke(),D(l),D(t),R((e,t,i,a)=>{q(n,1,e),r.disabled=!z(p)&&!1,q(r,1,t),q(c,1,i),l.disabled=z(g).length===0||z(y),q(l,1,a)},[()=>K(Q(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`list`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K(Q(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`timeline`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K(Q(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`trace`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K(Q(`ml-auto inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,`text-accent hover:bg-accent/10 disabled:opacity-40 disabled:hover:bg-transparent`))]),B(`click`,n,()=>P(o,`list`)),B(`click`,r,()=>P(o,`timeline`)),B(`click`,c,()=>P(o,`trace`)),B(`click`,l,S),H(e,t)},r=e=>{var t=ON(),n=I(t),r=F(n),o=F(r),p=F(o);D(o);var h=L(o,2),g=F(h);D(h),D(r),I_(L(r,2),{get value(){return z(s)},onValue:e=>zl.value=e,class:``,inputClass:`border-line bg-subtle text-fg focus:border-line focus:ring-1 focus:ring-accent`,placeholder:`Filter by model, operation, agent…`,ariaLabel:`Filter GenAI spans`}),D(n);var _=L(n,2),v=F(_),S=e=>{H(e,TN())};W(v,e=>{z(c).length===0&&e(S)}),G(L(v,2),19,()=>z(c),e=>e.normalized.spanId,(e,t,n)=>{let r=M(()=>z(t).normalized.spanId===z(f)?.normalized.spanId),i=M(()=>z(t).normalized.status===`error`),o=M(()=>z(t).normalized.responseModel??z(t).normalized.requestModel),s=M(()=>z(t).normalized.agent?.name&&(z(t).normalized.provider===`unknown`||z(o)===`unknown`));var c=DN(),d=F(c),p=F(d),m=F(p),h=e=>{{let t=M(()=>z(i)?`text-danger`:`text-accent`);cp(e,{size:11,get class(){return z(t)}})}},g=e=>{{let t=M(()=>z(i)?`text-danger`:`text-fg-subtle`);Bp(e,{size:11,get class(){return z(t)}})}};W(m,e=>{z(s)?e(h):e(g,-1)});var _=L(m,2),v=F(_,!0);D(_),D(p);var S=L(p,2),C=F(S),w=F(C,!0);D(C);var T=L(C,4),ee=F(T,!0);D(T);var te=L(T,4),ne=F(te,!0);D(te);var re=L(te,2),ie=F(re,!0);D(re),D(S);var ae=L(S,2),oe=e=>{var n=EN(),r=F(n,!0);D(n),R(()=>U(r,z(t).service)),H(e,n)};W(ae,e=>{z(t).service&&e(oe)}),D(d),Uo(d,(e,t)=>l[t]=e,e=>l?.[e],()=>[z(n)]),D(c),R((e,i,a,l)=>{J(c,`aria-selected`,z(r)),J(d,`data-row-index`,z(n)),q(d,1,e),U(v,z(s)?`agent: ${z(t).normalized.agent.name}`:`${z(t).normalized.provider}/${z(o)}`),U(w,z(t).normalized.operation),U(ee,i),U(ne,a),U(ie,l)},[()=>K(Q(`w-full text-left px-3 py-2 hover:bg-subtle transition-colors`,z(r)&&`bg-hover hover:bg-hover`,z(n)===u.cursor&&`ring-1 ring-inset ring-accent bg-accent/10`)),()=>ad(z(t).normalized.endMs-z(t).normalized.startMs),()=>bN(z(t).normalized.usage),()=>xN(z(t).normalized.cost)]),B(`click`,d,()=>{if(u.cursor=z(n),P(a,z(t).normalized.spanId,!0),z(y)){let e=z(x).findIndex(e=>e.span.spanId===z(t).normalized.spanId);e>=0&&P(b,e,!0)}}),H(e,c)}),D(_),R(()=>{U(p,`Spans (${(z(d)?`${z(c).length} of ${z(i).length}`:z(i).length)??``})`),U(g,`${z(m)??``} run${z(m)===1?``:`s`}`)}),B(`keydown`,_,function(...e){u.onKeyDown?.apply(this,e)}),H(e,t)},i=M(()=>tu.value),a=N(null),o=N(`list`),s=M(()=>zl.value),c=M(()=>z(i).filter(e=>SN(e,z(s)))),l=yr([]),u=UA({count:()=>z(c).length,fromUnsetUp:`last`,onActivate:e=>{P(a,z(c)[e].normalized.spanId,!0)},scrollToIndex:e=>l[e]?.scrollIntoView({block:`nearest`})}),d=M(()=>z(s).length>0),f=M(()=>z(c).find(e=>e.normalized.spanId===z(a))??z(c)[0]??z(i).find(e=>e.normalized.spanId===z(a))??z(i)[0]),p=M(()=>z(i).some(e=>e.normalized.conversationId)),m=M(()=>Kj(z(i)).length),h=M(()=>z(a)!==null),g=M(()=>yN(z(i),z(f)?.normalized.spanId??z(a)??void 0)),_=M(()=>Gj(z(g).map(e=>e.normalized))),v=M(()=>JM(z(g).map(e=>e.normalized))),y=N(!1),b=N(0),x=M(()=>z(y)?vN(z(g).map(e=>e.normalized)):[]);function S(){z(g).length!==0&&(P(o,`list`),z(a)===null&&P(a,z(g)[0].normalized.spanId,!0),P(b,0),P(y,!0))}function C(){P(y,!1)}zr(()=>{if(!z(y))return;let e=z(x)[z(b)]?.span.spanId;e&&e!==z(a)&&P(a,e,!0)});var w=da(),T=I(w),ee=e=>{var t=kN(),n=F(t);Im(F(n),{size:16}),Ke(),D(n),Ke(2),D(t),H(e,t)},te=e=>{var t=AN(),r=F(t);n(r);var s=L(r,2),c=F(s);{let e=M(()=>z(f)?.normalized.spanId??null);VM(c,{get rows(){return z(i)},get selectedSpanId(){return z(e)},onSelectSpan:e=>{P(a,e,!0),P(o,`list`)}})}D(s),D(t),H(e,t)},ne=e=>{var t=MN(),r=F(t);n(r);var i=L(r,2),s=e=>{dN(e,{get summary(){return z(_)}})};W(i,e=>{z(_).spanCount>0&&e(s)});var c=L(i,2),l=F(c),u=e=>{H(e,jN())},d=e=>{{let t=M(()=>z(f)?.normalized.spanId??null);oN(e,{get nodes(){return z(v)},get selectedSpanId(){return z(t)},onSelectSpan:e=>{P(a,e,!0),P(o,`list`)}})}};W(l,e=>{z(g).length===0?e(u):e(d,-1)}),D(c),D(t),H(e,t)},re=e=>{var t=PN(),i=F(t);n(i);var o=L(i,2),s=e=>{pN(e,{get steps(){return z(x)},onClose:C,get index(){return z(b)},set index(e){P(b,e,!0)}})};W(o,e=>{z(y)&&z(x).length>0&&e(s)});var c=L(o,2),l=F(c),u=F(l);r(u),D(l);var d=L(l,2),p=F(d),m=e=>{var t=NN(),n=I(t),r=F(n);ep(F(r),{size:11}),Ke(),D(r);var i=L(r,2);Jp(F(i),{size:11}),Ke(),D(i),D(n);var o=L(n,2),s=e=>{dN(e,{get summary(){return z(_)}})};W(o,e=>{z(_).spanCount>0&&e(s)});var c=L(o,2);rM(c,{get span(){return z(f).normalized},onOpenTrace:()=>Pu(z(f).traceId,z(f).normalized.spanId)}),PM(L(c,2),{get span(){return z(f).normalized}}),B(`click`,r,()=>P(a,null)),B(`click`,i,()=>Pu(z(f).traceId,z(f).normalized.spanId)),H(e,t)};W(p,e=>{z(f)&&e(m)}),D(d),D(c),D(t),R((e,t)=>{q(l,1,e),q(d,1,t)},[()=>K(Q(`flex flex-col w-full border-line @md:w-72 @md:shrink-0 @md:border-r`,z(h)&&`hidden @md:flex`)),()=>K(Q(`flex-1 overflow-y-auto w-full`,!z(h)&&`hidden @md:block`))]),H(e,t)};W(T,e=>{z(i).length===0?e(ee):z(o)===`timeline`?e(te,1):z(o)===`trace`?e(ne,2):e(re,-1)}),H(e,w),at()}na([`click`,`keydown`]);var IN=`__start__`,LN=`__end__`;function RN(e){return e[`ai.toolCall.name`]!=null||e[`operation.name`]===`ai.toolCall`||e[`ai.operationId`]===`ai.toolCall`||e[`gen_ai.operation.name`]===`execute_tool`||e[`gen_ai.tool.name`]!=null}function zN(e){return e[`gen_ai.system`]!=null||e[`gen_ai.provider.name`]!=null||e[`ai.model.provider`]!=null||e[`gen_ai.request.model`]!=null||e[`ai.model.id`]!=null}function BN(e){return e[`db.system`]!=null||e[`db.statement`]!=null||e[`db.query.text`]!=null}function VN(e,t){return e.kind===`CLIENT`&&(t[`http.method`]!=null||t[`http.request.method`]!=null||t[`url.full`]!=null||t[`http.url`]!=null)}function HN(e){let t=e.lastIndexOf(`:`);return t>0&&e.slice(t+1).startsWith(`ai.`)?e.slice(t+1):e}function UN(e){let t=e.attributes??{};return RN(t)?{role:`tool`,label:ps(t[`ai.toolCall.name`])??ps(t[`gen_ai.tool.name`])??HN(e.name)}:zN(t)?{role:`llm`,label:HN(e.name)}:BN(t)?{role:`db`,label:ps(t[`db.operation`])??ps(t[`db.system`])??HN(e.name)}:VN(e,t)?{role:`http`,label:ps(t[`http.route`])??ps(t[`url.path`])??HN(e.name)}:e.kind===`SERVER`||e.kind===`CONSUMER`?{role:`entry`,label:HN(e.name)}:{role:`function`,label:HN(e.name)}}function WN(e){let t=ps(e);if(t===void 0)return e;let n=t.trim();if(!n||n[0]!==`{`&&n[0]!==`[`)return e;try{return JSON.parse(n)}catch{return e}}function GN(e,t){let n=e.attributes??{},r={};return t===`tool`?(n[`ai.toolCall.args`]!=null&&(r.input=WN(n[`ai.toolCall.args`])),n[`ai.toolCall.result`]!=null&&(r.output=WN(n[`ai.toolCall.result`]))):t===`llm`?(n[`ai.prompt`]==null?n[`gen_ai.prompt`]!=null&&(r.input=WN(n[`gen_ai.prompt`])):r.input=WN(n[`ai.prompt`]),n[`ai.response.text`]==null?n[`gen_ai.completion`]!=null&&(r.output=WN(n[`gen_ai.completion`])):r.output=WN(n[`ai.response.text`])):t===`db`&&(n[`db.statement`]==null?n[`db.query.text`]!=null&&(r.input=n[`db.query.text`]):r.input=n[`db.statement`]),r.input===void 0&&(r.input=WN(n[`autotel.input`]??n[`code.function.input`]??n.input??n[`rpc.request.body`])),r.output===void 0&&(r.output=WN(n[`autotel.output`]??n[`code.function.output`]??n.output??n[`rpc.response.body`])),r}function KN(e,t){if(!t)return;let n=e.metrics??{};t.inputTokens!=null&&(n.inputTokens=(n.inputTokens??0)+t.inputTokens),t.outputTokens!=null&&(n.outputTokens=(n.outputTokens??0)+t.outputTokens),t.costUsd!=null&&(n.costUsd=(n.costUsd??0)+t.costUsd),e.metrics=n}function qN(e,t={}){let n=t.bookends??!0,r=new Map;for(let t of e)r.set(t.spanId,t);let i=new Map,a=new Map,o=[...e].sort((e,t)=>e.startTime-t.startTime);for(let e of o){let{role:n,label:r}=UN(e),o=`${n}|${r}`;i.set(e.spanId,o);let s=a.get(o);if(s||(s={id:o,label:r,role:n,count:0,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}},a.set(o,s)),s.count++,e.status?.code===`ERROR`&&s.errorCount++,s.totalDurationMs+=e.duration,s.spanIds.push(e.spanId),KN(s,t.metricsBySpanId?.get(e.spanId)),s.sample.input===void 0&&s.sample.output===void 0){let t=GN(e,n);(t.input!==void 0||t.output!==void 0)&&(s.sample=t)}}let s=new Map,c=(e,t)=>{if(e===t)return;let n=`${e}>${t}`,r=s.get(n);r?r.count++:s.set(n,{source:e,target:t,count:1})},l=new Set,u=new Set;for(let e of o){let t=i.get(e.spanId),n=e.parentSpanId?r.get(e.parentSpanId):void 0;if(n){let e=i.get(n.spanId);e!==t&&(c(e,t),l.add(e),u.add(t))}}let d=[...a.values()];if(n&&d.length>0){let e={id:IN,label:`__start__`,role:`entry`,count:1,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}},t={id:LN,label:`__end__`,role:`end`,count:1,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}};a.set(IN,e),a.set(LN,t);for(let e of d)u.has(e.id)||c(IN,e.id),l.has(e.id)||c(e.id,LN)}return{nodes:[...a.values()],edges:[...s.values()]}}function JN(e){let t={};for(let n of e){if(!n.metrics)continue;let{inputTokens:e,outputTokens:r,costUsd:i}=n.metrics;e!=null&&(t.inputTokens=(t.inputTokens??0)+e),r!=null&&(t.outputTokens=(t.outputTokens??0)+r),i!=null&&(t.costUsd=(t.costUsd??0)+i)}return t}var YN=7.2,XN=28,ZN=96,QN=280,$N=32,eP=24;function tP(e){let t=e.label.length*YN+XN,n=e.count>1?34:0;return Math.max(ZN,Math.min(QN,t+n))}function nP(e){let{nodes:t,edges:n}=e;if(t.length===0)return{nodes:[],edges:[],width:0,height:0};let r=t.map(e=>e.id),i=new Map,a=new Map;for(let e of r)i.set(e,[]),a.set(e,[]);for(let e of n)i.get(e.source)?.push(e.target),a.get(e.target)?.push(e.source);let o=new Map,s=r.filter(e=>(a.get(e)?.length??0)===0),c=s.length>0?s:[r[0]],l=[...c];for(let e of c)o.set(e,0);let u=0;for(;l.length&&u++<r.length*r.length+r.length;){let e=l.shift(),t=o.get(e)??0;for(let n of i.get(e)??[])(o.get(n)??-1)<t+1&&(o.set(n,t+1),l.push(n))}for(let e of r)o.has(e)||o.set(e,0);let d=Math.max(...o.values()),f=Array.from({length:d+1},()=>[]);for(let e of r)f[o.get(e)].push(e);for(let e=0;e<2;e++)for(let e=1;e<=d;e++){let t=f[e-1],n=new Map;t.forEach((e,t)=>n.set(e,t)),f[e].sort((e,t)=>{let r=a.get(e)??[],i=a.get(t)??[];return(r.length?r.reduce((e,t)=>e+(n.get(t)??0),0)/r.length:999)-(i.length?i.reduce((e,t)=>e+(n.get(t)??0),0)/i.length:999)})}let p=new Map(t.map(e=>[e.id,e])),m=new Map(t.map(e=>[e.id,tP(e)])),h=f.map(e=>e.reduce((e,t)=>e+(m.get(t)??ZN)+$N,0)),g=Math.max(...h,ZN),_=[];return f.forEach((e,t)=>{let n=eP+(g-h[t])/2;for(let r of e){let e=p.get(r),i=m.get(r)??ZN;_.push({...e,x:n,y:eP+t*122,width:i,layer:t}),n+=i+$N}}),{nodes:_,edges:n,width:g+eP*2,height:eP*2+(d+1)*122}}var rP={entry:{fill:`fill-emerald-500/15`,stroke:`stroke-emerald-500/60`,text:`fill-emerald-600`,dot:`bg-emerald-500`,label:`Entry`},end:{fill:`fill-rose-500/15`,stroke:`stroke-rose-500/60`,text:`fill-rose-600`,dot:`bg-rose-500`,label:`End`},llm:{fill:`fill-blue-500/15`,stroke:`stroke-blue-500/60`,text:`fill-blue-600`,dot:`bg-blue-500`,label:`LLM`},tool:{fill:`fill-violet-500/15`,stroke:`stroke-violet-500/60`,text:`fill-violet-600`,dot:`bg-violet-500`,label:`AI tool`},function:{fill:`fill-amber-500/15`,stroke:`stroke-amber-500/60`,text:`fill-amber-600`,dot:`bg-amber-500`,label:`Function`},db:{fill:`fill-teal-500/15`,stroke:`stroke-teal-500/60`,text:`fill-teal-600`,dot:`bg-teal-500`,label:`Database`},http:{fill:`fill-sky-500/15`,stroke:`stroke-sky-500/60`,text:`fill-sky-600`,dot:`bg-sky-500`,label:`HTTP`}},iP=[`entry`,`llm`,`tool`,`function`,`db`,`http`,`end`],aP=V(`<div class="p-6 text-sm text-fg-subtle"><div class="flex items-center gap-2 mb-2 text-fg-muted font-medium"><!> No flow to show yet</div> <p>The Flow view turns a trace into a call graph — entry points, LLM calls,
|
|
23
|
+
— anything following the spec.</p></div>`),CN=V(`<div class="flex flex-col h-full"><!> <div class="flex-1 overflow-hidden"><!></div></div>`),wN=V(`<div class="p-6 text-sm text-fg-subtle">Select a span (in List) to trace its run, or wait for a multi-span run
|
|
24
|
+
to arrive.</div>`),TN=V(`<div class="flex flex-col h-full"><!> <!> <div class="flex-1 overflow-hidden"><!></div></div>`),EN=V(`<div class="flex items-center justify-between px-3 pt-2"><button type="button" class="@md:hidden inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors"><!> Back</button> <button type="button" class="ml-auto inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors" title="Open this span in the Traces waterfall"><!> Open in Traces</button></div> <!> <!> <!>`,1),DN=V(`<div class="flex flex-col h-full"><!> <!> <div class="@container flex flex-1 overflow-hidden"><div><!></div> <div><!></div></div></div>`);function ON(e,t){it(t,!0);let n=e=>{var t=_N(),n=F(t);Nm(F(n),{size:12}),Ke(),D(n);var r=L(n,2),i=F(r);qm(i,{size:12});var a=L(i,2),s=e=>{H(e,gN())};W(a,e=>{z(p)||e(s)}),D(r);var c=L(r,2);jm(F(c),{size:12}),Ke(),D(c);var l=L(c,2);Nh(F(l),{size:12}),Ke(),D(l),D(t),R((e,t,i,a)=>{q(n,1,e),r.disabled=!z(p)&&!1,q(r,1,t),q(c,1,i),l.disabled=z(g).length===0||z(y),q(l,1,a)},[()=>K($(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`list`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K($(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`timeline`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K($(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`trace`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K($(`ml-auto inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,`text-accent hover:bg-accent/10 disabled:opacity-40 disabled:hover:bg-transparent`))]),B(`click`,n,()=>P(o,`list`)),B(`click`,r,()=>P(o,`timeline`)),B(`click`,c,()=>P(o,`trace`)),B(`click`,l,S),H(e,t)},r=e=>{var t=xN(),n=I(t),r=F(n),o=F(r),p=F(o);D(o);var h=L(o,2),g=F(h);D(h),D(r),L_(L(r,2),{get value(){return z(s)},onValue:e=>zl.value=e,class:``,inputClass:`border-line bg-subtle text-fg focus:border-line focus:ring-1 focus:ring-accent`,placeholder:`Filter by model, operation, agent…`,ariaLabel:`Filter GenAI spans`}),D(n);var _=L(n,2),v=F(_),S=e=>{H(e,vN())};W(v,e=>{z(c).length===0&&e(S)}),G(L(v,2),19,()=>z(c),e=>e.normalized.spanId,(e,t,n)=>{let r=M(()=>z(t).normalized.spanId===z(f)?.normalized.spanId),i=M(()=>z(t).normalized.status===`error`),o=M(()=>z(t).normalized.responseModel??z(t).normalized.requestModel),s=M(()=>z(t).normalized.agent?.name&&(z(t).normalized.provider===`unknown`||z(o)===`unknown`));var c=bN(),d=F(c),p=F(d),m=F(p),h=e=>{{let t=M(()=>z(i)?`text-danger`:`text-accent`);lp(e,{size:11,get class(){return z(t)}})}},g=e=>{{let t=M(()=>z(i)?`text-danger`:`text-fg-subtle`);Vp(e,{size:11,get class(){return z(t)}})}};W(m,e=>{z(s)?e(h):e(g,-1)});var _=L(m,2),v=F(_,!0);D(_),D(p);var S=L(p,2),C=F(S),w=F(C,!0);D(C);var T=L(C,4),ee=F(T,!0);D(T);var te=L(T,4),ne=F(te,!0);D(te);var re=L(te,2),ie=F(re,!0);D(re),D(S);var ae=L(S,2),oe=e=>{var n=yN(),r=F(n,!0);D(n),R(()=>U(r,z(t).service)),H(e,n)};W(ae,e=>{z(t).service&&e(oe)}),D(d),Vo(d,(e,t)=>l[t]=e,e=>l?.[e],()=>[z(n)]),D(c),R((e,i,a,l)=>{J(c,`aria-selected`,z(r)),J(d,`data-row-index`,z(n)),q(d,1,e),U(v,z(s)?`agent: ${z(t).normalized.agent.name}`:`${z(t).normalized.provider}/${z(o)}`),U(w,z(t).normalized.operation),U(ee,i),U(ne,a),U(ie,l)},[()=>K($(`w-full text-left px-3 py-2 hover:bg-subtle transition-colors`,z(r)&&`bg-hover hover:bg-hover`,z(n)===u.cursor&&`ring-1 ring-inset ring-accent bg-accent/10`)),()=>ad(z(t).normalized.endMs-z(t).normalized.startMs),()=>pN(z(t).normalized.usage),()=>mN(z(t).normalized.cost)]),B(`click`,d,()=>{if(u.cursor=z(n),P(a,z(t).normalized.spanId,!0),z(y)){let e=z(x).findIndex(e=>e.span.spanId===z(t).normalized.spanId);e>=0&&P(b,e,!0)}}),H(e,c)}),D(_),R(()=>{U(p,`Spans (${(z(d)?`${z(c).length} of ${z(i).length}`:z(i).length)??``})`),U(g,`${z(m)??``} run${z(m)===1?``:`s`}`)}),B(`keydown`,_,function(...e){u.onKeyDown?.apply(this,e)}),H(e,t)},i=M(()=>tu.value),a=N(null),o=N(`list`),s=M(()=>zl.value),c=M(()=>z(i).filter(e=>hN(e,z(s)))),l=_r([]),u=IA({count:()=>z(c).length,fromUnsetUp:`last`,onActivate:e=>{P(a,z(c)[e].normalized.spanId,!0)},scrollToIndex:e=>l[e]?.scrollIntoView({block:`nearest`})}),d=M(()=>z(s).length>0),f=M(()=>z(c).find(e=>e.normalized.spanId===z(a))??z(c)[0]??z(i).find(e=>e.normalized.spanId===z(a))??z(i)[0]),p=M(()=>z(i).some(e=>e.normalized.conversationId)),m=M(()=>zj(z(i)).length),h=M(()=>z(a)!==null),g=M(()=>fN(z(i),z(f)?.normalized.spanId??z(a)??void 0)),_=M(()=>Rj(z(g).map(e=>e.normalized))),v=M(()=>VM(z(g).map(e=>e.normalized))),y=N(!1),b=N(0),x=M(()=>z(y)?dN(z(g).map(e=>e.normalized)):[]);function S(){z(g).length!==0&&(P(o,`list`),z(a)===null&&P(a,z(g)[0].normalized.spanId,!0),P(b,0),P(y,!0))}function C(){P(y,!1)}Lr(()=>{if(!z(y))return;let e=z(x)[z(b)]?.span.spanId;e&&e!==z(a)&&P(a,e,!0)});var w=la(),T=I(w),ee=e=>{var t=SN(),n=F(t);Lm(F(n),{size:16}),Ke(),D(n),Ke(2),D(t),H(e,t)},te=e=>{var t=CN(),r=F(t);n(r);var s=L(r,2),c=F(s);{let e=M(()=>z(f)?.normalized.spanId??null);PM(c,{get rows(){return z(i)},get selectedSpanId(){return z(e)},onSelectSpan:e=>{P(a,e,!0),P(o,`list`)}})}D(s),D(t),H(e,t)},ne=e=>{var t=TN(),r=F(t);n(r);var i=L(r,2),s=e=>{iN(e,{get summary(){return z(_)}})};W(i,e=>{z(_).spanCount>0&&e(s)});var c=L(i,2),l=F(c),u=e=>{H(e,wN())},d=e=>{{let t=M(()=>z(f)?.normalized.spanId??null);$M(e,{get nodes(){return z(v)},get selectedSpanId(){return z(t)},onSelectSpan:e=>{P(a,e,!0),P(o,`list`)}})}};W(l,e=>{z(g).length===0?e(u):e(d,-1)}),D(c),D(t),H(e,t)},re=e=>{var t=DN(),i=F(t);n(i);var o=L(i,2),s=e=>{oN(e,{get steps(){return z(x)},onClose:C,get index(){return z(b)},set index(e){P(b,e,!0)}})};W(o,e=>{z(y)&&z(x).length>0&&e(s)});var c=L(o,2),l=F(c),u=F(l);r(u),D(l);var d=L(l,2),p=F(d),m=e=>{var t=EN(),n=I(t),r=F(n);tp(F(r),{size:11}),Ke(),D(r);var i=L(r,2);Yp(F(i),{size:11}),Ke(),D(i),D(n);var o=L(n,2),s=e=>{iN(e,{get summary(){return z(_)}})};W(o,e=>{z(_).spanCount>0&&e(s)});var c=L(o,2);Xj(c,{get span(){return z(f).normalized},onOpenTrace:()=>Pu(z(f).traceId,z(f).normalized.spanId)}),DM(L(c,2),{get span(){return z(f).normalized}}),B(`click`,r,()=>P(a,null)),B(`click`,i,()=>Pu(z(f).traceId,z(f).normalized.spanId)),H(e,t)};W(p,e=>{z(f)&&e(m)}),D(d),D(c),D(t),R((e,t)=>{q(l,1,e),q(d,1,t)},[()=>K($(`flex flex-col w-full border-line @md:w-72 @md:shrink-0 @md:border-r`,z(h)&&`hidden @md:flex`)),()=>K($(`flex-1 overflow-y-auto w-full`,!z(h)&&`hidden @md:block`))]),H(e,t)};W(T,e=>{z(i).length===0?e(ee):z(o)===`timeline`?e(te,1):z(o)===`trace`?e(ne,2):e(re,-1)}),H(e,w),at()}ea([`click`,`keydown`]);var kN=`__start__`,AN=`__end__`;function jN(e){return e[`ai.toolCall.name`]!=null||e[`operation.name`]===`ai.toolCall`||e[`ai.operationId`]===`ai.toolCall`||e[`gen_ai.operation.name`]===`execute_tool`||e[`gen_ai.tool.name`]!=null}function MN(e){return e[`gen_ai.system`]!=null||e[`gen_ai.provider.name`]!=null||e[`ai.model.provider`]!=null||e[`gen_ai.request.model`]!=null||e[`ai.model.id`]!=null}function NN(e){return e[`db.system.name`]!=null||e[`db.system`]!=null||e[`db.statement`]!=null||e[`db.query.text`]!=null}function PN(e,t){return e.kind===`CLIENT`&&(t[`http.method`]!=null||t[`http.request.method`]!=null||t[`url.full`]!=null||t[`http.url`]!=null)}function FN(e){let t=e.lastIndexOf(`:`);return t>0&&e.slice(t+1).startsWith(`ai.`)?e.slice(t+1):e}function IN(e){let t=e.attributes??{};return jN(t)?{role:`tool`,label:Q(t[`ai.toolCall.name`])??Q(t[`gen_ai.tool.name`])??FN(e.name)}:MN(t)?{role:`llm`,label:FN(e.name)}:NN(t)?{role:`db`,label:Q(t[`db.operation.name`])??Q(t[`db.operation`])??Q(t[`db.system.name`])??Q(t[`db.system`])??FN(e.name)}:PN(e,t)?{role:`http`,label:Q(t[`http.route`])??Q(t[`url.path`])??FN(e.name)}:e.kind===`SERVER`||e.kind===`CONSUMER`?{role:`entry`,label:FN(e.name)}:{role:`function`,label:FN(e.name)}}function LN(e){let t=Q(e);if(t===void 0)return e;let n=t.trim();if(!n||n[0]!==`{`&&n[0]!==`[`)return e;try{return JSON.parse(n)}catch{return e}}function RN(e,t){let n=e.attributes??{},r={};return t===`tool`?(n[`ai.toolCall.args`]!=null&&(r.input=LN(n[`ai.toolCall.args`])),n[`ai.toolCall.result`]!=null&&(r.output=LN(n[`ai.toolCall.result`]))):t===`llm`?(n[`ai.prompt`]==null?n[`gen_ai.prompt`]!=null&&(r.input=LN(n[`gen_ai.prompt`])):r.input=LN(n[`ai.prompt`]),n[`ai.response.text`]==null?n[`gen_ai.completion`]!=null&&(r.output=LN(n[`gen_ai.completion`])):r.output=LN(n[`ai.response.text`])):t===`db`&&(n[`db.statement`]==null?n[`db.query.text`]!=null&&(r.input=n[`db.query.text`]):r.input=n[`db.statement`]),r.input===void 0&&(r.input=LN(n[`autotel.input`]??n[`code.function.input`]??n.input??n[`rpc.request.body`])),r.output===void 0&&(r.output=LN(n[`autotel.output`]??n[`code.function.output`]??n.output??n[`rpc.response.body`])),r}function zN(e,t){if(!t)return;let n=e.metrics??{};t.inputTokens!=null&&(n.inputTokens=(n.inputTokens??0)+t.inputTokens),t.outputTokens!=null&&(n.outputTokens=(n.outputTokens??0)+t.outputTokens),t.costUsd!=null&&(n.costUsd=(n.costUsd??0)+t.costUsd),e.metrics=n}function BN(e,t={}){let n=t.bookends??!0,r=new Map;for(let t of e)r.set(t.spanId,t);let i=new Map,a=new Map,o=[...e].sort((e,t)=>e.startTime-t.startTime);for(let e of o){let{role:n,label:r}=IN(e),o=`${n}|${r}`;i.set(e.spanId,o);let s=a.get(o);if(s||(s={id:o,label:r,role:n,count:0,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}},a.set(o,s)),s.count++,e.status?.code===`ERROR`&&s.errorCount++,s.totalDurationMs+=e.duration,s.spanIds.push(e.spanId),zN(s,t.metricsBySpanId?.get(e.spanId)),s.sample.input===void 0&&s.sample.output===void 0){let t=RN(e,n);(t.input!==void 0||t.output!==void 0)&&(s.sample=t)}}let s=new Map,c=(e,t)=>{if(e===t)return;let n=`${e}>${t}`,r=s.get(n);r?r.count++:s.set(n,{source:e,target:t,count:1})},l=new Set,u=new Set;for(let e of o){let t=i.get(e.spanId),n=e.parentSpanId?r.get(e.parentSpanId):void 0;if(n){let e=i.get(n.spanId);e!==t&&(c(e,t),l.add(e),u.add(t))}}let d=[...a.values()];if(n&&d.length>0){let e={id:kN,label:`__start__`,role:`entry`,count:1,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}},t={id:AN,label:`__end__`,role:`end`,count:1,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}};a.set(kN,e),a.set(AN,t);for(let e of d)u.has(e.id)||c(kN,e.id),l.has(e.id)||c(e.id,AN)}return{nodes:[...a.values()],edges:[...s.values()]}}function VN(e){let t={};for(let n of e){if(!n.metrics)continue;let{inputTokens:e,outputTokens:r,costUsd:i}=n.metrics;e!=null&&(t.inputTokens=(t.inputTokens??0)+e),r!=null&&(t.outputTokens=(t.outputTokens??0)+r),i!=null&&(t.costUsd=(t.costUsd??0)+i)}return t}var HN=7.2,UN=28,WN=96,GN=280,KN=32,qN=24;function JN(e){let t=e.label.length*HN+UN,n=e.count>1?34:0;return Math.max(WN,Math.min(GN,t+n))}function YN(e){let{nodes:t,edges:n}=e;if(t.length===0)return{nodes:[],edges:[],width:0,height:0};let r=t.map(e=>e.id),i=new Map,a=new Map;for(let e of r)i.set(e,[]),a.set(e,[]);for(let e of n)i.get(e.source)?.push(e.target),a.get(e.target)?.push(e.source);let o=new Map,s=r.filter(e=>(a.get(e)?.length??0)===0),c=s.length>0?s:[r[0]],l=[...c];for(let e of c)o.set(e,0);let u=0;for(;l.length&&u++<r.length*r.length+r.length;){let e=l.shift(),t=o.get(e)??0;for(let n of i.get(e)??[])(o.get(n)??-1)<t+1&&(o.set(n,t+1),l.push(n))}for(let e of r)o.has(e)||o.set(e,0);let d=Math.max(...o.values()),f=Array.from({length:d+1},()=>[]);for(let e of r)f[o.get(e)].push(e);for(let e=0;e<2;e++)for(let e=1;e<=d;e++){let t=f[e-1],n=new Map;t.forEach((e,t)=>n.set(e,t)),f[e].sort((e,t)=>{let r=a.get(e)??[],i=a.get(t)??[];return(r.length?r.reduce((e,t)=>e+(n.get(t)??0),0)/r.length:999)-(i.length?i.reduce((e,t)=>e+(n.get(t)??0),0)/i.length:999)})}let p=new Map(t.map(e=>[e.id,e])),m=new Map(t.map(e=>[e.id,JN(e)])),h=f.map(e=>e.reduce((e,t)=>e+(m.get(t)??WN)+KN,0)),g=Math.max(...h,WN),_=[];return f.forEach((e,t)=>{let n=qN+(g-h[t])/2;for(let r of e){let e=p.get(r),i=m.get(r)??WN;_.push({...e,x:n,y:qN+t*122,width:i,layer:t}),n+=i+KN}}),{nodes:_,edges:n,width:g+48,height:48+(d+1)*122}}var XN={entry:{fill:`fill-emerald-500/15`,stroke:`stroke-emerald-500/60`,text:`fill-emerald-600`,dot:`bg-emerald-500`,label:`Entry`},end:{fill:`fill-rose-500/15`,stroke:`stroke-rose-500/60`,text:`fill-rose-600`,dot:`bg-rose-500`,label:`End`},llm:{fill:`fill-blue-500/15`,stroke:`stroke-blue-500/60`,text:`fill-blue-600`,dot:`bg-blue-500`,label:`LLM`},tool:{fill:`fill-violet-500/15`,stroke:`stroke-violet-500/60`,text:`fill-violet-600`,dot:`bg-violet-500`,label:`AI tool`},function:{fill:`fill-amber-500/15`,stroke:`stroke-amber-500/60`,text:`fill-amber-600`,dot:`bg-amber-500`,label:`Function`},db:{fill:`fill-teal-500/15`,stroke:`stroke-teal-500/60`,text:`fill-teal-600`,dot:`bg-teal-500`,label:`Database`},http:{fill:`fill-sky-500/15`,stroke:`stroke-sky-500/60`,text:`fill-sky-600`,dot:`bg-sky-500`,label:`HTTP`}},ZN=[`entry`,`llm`,`tool`,`function`,`db`,`http`,`end`],QN=V(`<div class="p-6 text-sm text-fg-subtle"><div class="flex items-center gap-2 mb-2 text-fg-muted font-medium"><!> No flow to show yet</div> <p>The Flow view turns a trace into a call graph — entry points, LLM calls,
|
|
25
25
|
AI tool calls and plain functions, with repeated calls collapsed into one
|
|
26
26
|
node (e.g. <code class="text-xs">calculate (5)</code>). Send a trace to
|
|
27
|
-
devtools and it appears here.</p></div>`),oP=V(`<option> </option>`),sP=V(`<select class="text-xs bg-surface border border-line rounded px-2 py-1 text-fg max-w-[16rem]"></select>`),cP=V(`<div class="flex items-center gap-1.5 text-xs font-medium text-fg-muted"><!> </div>`),lP=V(`<span> </span>`),uP=V(`<div class="flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-accent/10 border border-accent/30 text-[11px] font-medium text-accent" title="Total LLM tokens and cost for this trace"><!> <!> <span class="font-mono text-accent/80"> </span></div>`),dP=V(`<span class="text-[10px] text-fg-muted whitespace-nowrap"> </span>`),fP=V(`<div class="flex items-center gap-1 text-[10px] text-fg-subtle"><span></span> </div>`),pP=V(`<div class="absolute left-1/2 top-3 -translate-x-1/2 z-10 px-3 py-1.5 rounded border border-line bg-subtle text-xs text-fg-muted shadow-sm"> </div>`),mP=ua(`<text text-anchor="middle" class="fill-fg-subtle text-[10px]" dy="-2"> </text>`),hP=ua(`<path fill="none" stroke-width="1.5" marker-end="url(#flow-arrow)"></path><!>`,1),gP=ua(`<g><rect width="28" height="16" rx="8"></rect><text text-anchor="middle" dominant-baseline="central" class="fill-white text-[10px] font-semibold"> </text></g>`),_P=ua(`<g role="button" tabindex="0"><rect rx="8"></rect><text text-anchor="middle" dominant-baseline="central"> </text><!></g>`),vP=V(`<button type="button" class="ml-auto shrink-0 inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors" title="Open this span in the Traces waterfall"><!> Traces</button> <!>`,1),yP=V(`<span>·</span> <span class="text-danger"> </span>`,1),bP=V(`<span>·</span> <span> </span>`,1),xP=V(`<span class="font-medium"> </span> <span class="text-fg-subtle">·</span>`,1),SP=V(`<div class="mt-1.5 flex items-center gap-1.5 text-[11px] text-accent"><!> <!> <span class="font-mono text-accent/80"> </span></div>`),CP=V(`<div class="px-3 py-2 border-b border-line"><!></div>`),wP=V(`<div class="px-3 py-2 border-b border-success-border bg-success-bg"><!></div>`),TP=V(`<div class="px-3 py-3 text-xs text-fg-subtle flex items-center gap-1.5"><!> No input/output captured for this node.</div>`),EP=V(`<div class="w-80 shrink-0 border-l border-line overflow-y-auto bg-surface"><div class="px-3 py-2.5 border-b border-line"><div class="group flex items-center gap-1.5"><span></span> <span class="font-mono text-sm font-medium text-fg truncate"> </span> <!> <!></div> <div class="mt-1 flex items-center gap-2 text-[11px] text-fg-subtle flex-wrap"><span class="uppercase tracking-wide"> </span> <span>·</span> <span> </span> <!> <!></div> <!></div> <!> <!> <!></div>`),DP=V(`<div class="flex flex-col h-full"><div class="flex items-center gap-3 px-3 py-1.5 border-b border-line bg-subtle/50 flex-wrap"><!> <!> <!> <div class="flex items-center gap-3 flex-wrap"><!> <!></div></div> <div class="flex flex-1 overflow-hidden"><div class="relative flex-1 overflow-auto bg-surface focus:outline-none" role="application" aria-label="Flow call graph — arrow keys to navigate, Enter to open in Traces" tabindex="0"><!> <svg class="min-w-full" role="presentation"><defs><marker id="flow-arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" class="fill-fg-subtle"></path></marker></defs><!><!></svg></div> <!></div></div>`);function OP(e,t){it(t,!0);let n=M(()=>vl.value),r=N(null),i=N(null),a=M(()=>z(n).find(e=>e.traceId===z(r))??z(n)[0]),o=M(()=>{let e=new Map;if(!z(a))return e;let t=tu.value.filter(e=>e.traceId===z(a).traceId),n=e=>e?.source===`table`?e.total:void 0,r=e=>e.normalized.usage.inputTokens!=null||e.normalized.usage.outputTokens!=null||n(e.normalized.cost)!=null,i=new Set(t.filter(r).map(e=>e.raw.spanId)),o=new Map(z(a).spans.map(e=>[e.spanId,e])),s=e=>{let t=e.parentSpanId;for(;t;){if(i.has(t))return!0;t=o.get(t)?.parentSpanId}return!1};for(let i of t){if(!r(i)||s(i.raw))continue;let{usage:t,cost:a}=i.normalized;e.set(i.raw.spanId,{inputTokens:t.inputTokens,outputTokens:t.outputTokens,costUsd:n(a)})}return e}),s=M(()=>z(a)?nP(qN(z(a).spans,{metricsBySpanId:z(o)})):null),c=M(()=>z(s)?JN(z(s).nodes):{}),l=M(()=>{let e=new Map;if(z(s))for(let t of z(s).nodes)e.set(t.id,t);return e}),u=M(()=>z(i)?z(l).get(z(i))??null:null),d=N(``);function f(e,t){return L_(t,[e.label,rP[e.role].label])}let p=M(()=>z(d).trim().length>0),m=M(()=>{let e=new Set;if(!z(s)||!z(p))return e;let t=z(d).trim().toLowerCase();for(let n of z(s).nodes)f(n,t)&&e.add(n.id);return e}),h=M(()=>z(m).size),g=M(()=>z(s)?.nodes.length??0);function _(e,t){let n=z(l).get(e),r=z(l).get(t);if(!n||!r)return``;let i=n.x+n.width/2,a=n.y+44,o=r.x+r.width/2,s=r.y,c=(a+s)/2;return`M ${i} ${a} C ${i} ${c}, ${o} ${c}, ${o} ${s}`}function v(e){P(i,z(i)===e?null:e,!0)}function y(e){!z(a)||e.spanIds.length===0||Pu(z(a).traceId,e.spanIds[0])}function b(e){let t=z(s)?.nodes??[];if(t.length===0)return;let n=z(i)?z(l).get(z(i)):void 0;if(!n){P(i,t[0].id,!0);return}if(e===`left`||e===`right`){let r=t.filter(e=>e.layer===n.layer).sort((e,t)=>e.x-t.x),a=r.findIndex(e=>e.id===n.id),o=r[e===`left`?a-1:a+1];o&&P(i,o.id,!0);return}let r=n.layer+(e===`down`?1:-1),a=t.filter(e=>e.layer===r);if(a.length===0)return;let o=n.x+n.width/2,c=a.reduce((e,t)=>Math.abs(t.x+t.width/2-o)<Math.abs(e.x+e.width/2-o)?t:e);P(i,c.id,!0)}let x=N(!1);function S(e){if(z(x))switch(e.key){case`ArrowLeft`:e.preventDefault(),b(`left`);break;case`ArrowRight`:e.preventDefault(),b(`right`);break;case`ArrowUp`:e.preventDefault(),b(`up`);break;case`ArrowDown`:e.preventDefault(),b(`down`);break;case`Enter`:z(u)&&y(z(u));break;case`Escape`:P(i,null);break}}zr(()=>(window.addEventListener(`keydown`,S),()=>window.removeEventListener(`keydown`,S)));var C=da(),w=I(C),T=e=>{var t=aP(),n=F(t);Qh(F(n),{size:16}),Ke(),D(n),Ke(2),D(t),H(e,t)},ee=e=>{var t=DP(),o=F(t),f=F(o),b=e=>{var t=sP();G(t,21,()=>z(n),e=>e.traceId,(e,t)=>{var n=oP(),r=F(n);D(n);var i={};R(e=>{U(r,`${z(t).service??``} · ${e??``}`),i!==(i=z(t).traceId)&&(n.value=(n.__value=z(t).traceId)??``)},[()=>z(t).rootSpan?.name??z(t).traceId.slice(0,8)]),H(e,n)}),D(t),fo(t,()=>z(r),e=>P(r,e)),H(e,t)},S=e=>{var t=cP(),n=F(t);Qh(n,{size:13});var r=L(n);D(t),R(()=>U(r,` ${z(a).rootSpan?.name??`Flow`??``}`)),H(e,t)};W(f,e=>{z(n).length>1?e(b):e(S,-1)});var C=L(f,2),w=e=>{var t=uP(),n=F(t);Ip(n,{size:11,class:`text-accent`});var r=L(n,2),i=e=>{var t=lP(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Fj(z(c).costUsd)]),H(e,t)};W(r,e=>{z(c).costUsd!=null&&e(i)});var a=L(r,2),o=F(a,!0);D(a),D(t),R(e=>U(o,e),[()=>Pj(z(c).inputTokens,z(c).outputTokens)]),H(e,t)};W(C,e=>{(z(c).costUsd!=null||z(c).inputTokens!=null)&&e(w)});var T=L(C,2);{let e=M(()=>Q(`bg-subtle text-fg`,z(p)?`border-accent ring-1 ring-accent`:`border-line`));I_(T,{class:`ml-auto w-48 max-w-[14rem]`,get inputClass(){return z(e)},ariaLabel:`Search flow nodes by name or type`,placeholder:`Search nodes…`,clearTitle:`Clear search`,get value(){return z(d)},set value(e){P(d,e,!0)}})}var ee=L(T,2),te=F(ee),ne=e=>{var t=dP(),n=F(t);D(t),R(()=>U(n,`Nodes (${z(h)??``} of ${z(g)??``})`)),H(e,t)};W(te,e=>{z(p)&&e(ne)}),G(L(te,2),16,()=>iP,e=>e,(e,t)=>{var n=fP(),r=F(n),i=L(r);D(n),R(e=>{q(r,1,e),U(i,` ${rP[t].label??``}`)},[()=>K(Q(`inline-block w-2 h-2 rounded-sm`,rP[t].dot))]),H(e,n)}),D(ee),D(o);var re=L(o,2),ie=F(re),ae=F(ie),oe=e=>{var t=pP(),n=F(t);D(t),R(e=>U(n,`No matches for “${e??``}”`),[()=>z(d).trim()]),H(e,t)};W(ae,e=>{z(p)&&z(h)===0&&e(oe)});var se=L(ae,2),ce=L(F(se));G(ce,17,()=>z(s).edges,e=>e.source+`>`+e.target,(e,t)=>{let n=M(()=>z(i)&&z(t).source!==z(i)&&z(t).target!==z(i));var r=hP(),a=I(r),o=L(a),s=e=>{let n=M(()=>z(l).get(z(t).source)),r=M(()=>z(l).get(z(t).target));var i=da(),a=I(i),o=e=>{var i=mP(),a=F(i);D(i),R(()=>{J(i,`x`,(z(n).x+z(n).width/2+z(r).x+z(r).width/2)/2),J(i,`y`,(z(n).y+44+z(r).y)/2),U(a,`×${z(t).count??``}`)}),H(e,i)};W(a,e=>{z(n)&&z(r)&&e(o)}),H(e,i)};W(o,e=>{z(t).count>1&&e(s)}),R((e,t)=>{J(a,`d`,e),q(a,0,t)},[()=>_(z(t).source,z(t).target),()=>K(Q(`stroke-fg-subtle transition-opacity`,z(n)&&`opacity-20`))]),H(e,r)}),G(L(ce),17,()=>z(s).nodes,e=>e.id,(e,t)=>{let n=M(()=>rP[z(t).role]),r=M(()=>z(t).id===z(i)),a=M(()=>z(m).has(z(t).id)),o=M(()=>z(p)&&z(a)),s=M(()=>z(p)&&!z(a)||z(i)&&!z(r)),c=M(()=>z(t).errorCount>0);var l=_P(),u=F(l),d=L(u),f=F(d,!0);D(d);var h=L(d),g=e=>{var n=gP(),r=F(n),i=L(r),a=F(i,!0);D(i),D(n),R(e=>{J(r,`x`,z(t).x+z(t).width-26),J(r,`y`,z(t).y-8),q(r,0,e),J(i,`x`,z(t).x+z(t).width-12),J(i,`y`,z(t).y),U(a,z(c)?`${z(t).count-z(t).errorCount}/${z(t).count}`:`${z(t).count}`)},[()=>K(Q(z(c)?`fill-red-500`:`fill-fg-muted`))]),H(e,n)};W(h,e=>{z(t).count>1&&e(g)}),D(l),R((e,n,i,a)=>{q(l,0,e),J(u,`x`,z(t).x),J(u,`y`,z(t).y),J(u,`width`,z(t).width),J(u,`height`,44),q(u,0,n),J(u,`stroke-width`,z(r)||z(o)?2.5:1.5),J(d,`x`,z(t).x+z(t).width/2),J(d,`y`,z(t).y+44/2),q(d,0,i),U(f,a)},[()=>K(Q(`cursor-pointer transition-opacity focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent`,z(s)&&`opacity-40`)),()=>K(Q(z(n).fill,z(o)?`stroke-accent`:z(c)?`stroke-red-500`:z(n).stroke,(z(r)||z(o))&&`stroke-[2.5px]`)),()=>K(Q(`text-[12px] font-medium font-mono`,z(n).text)),()=>z(t).label.length>26?z(t).label.slice(0,25)+`…`:z(t).label]),B(`click`,l,()=>v(z(t).id)),B(`keydown`,l,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(z(t).id))}),H(e,l)}),D(se),D(ie);var le=L(ie,2),E=e=>{let t=M(()=>rP[z(u).role]);var n=EP(),r=F(n),i=F(r),o=F(i),s=L(o,2),c=F(s,!0);D(s);var l=L(s,2);Z_(l,{get value(){return z(u).label},label:`Copy node name`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`});var d=L(l,2),f=e=>{var t=vP(),n=I(t);Jp(F(n),{size:11}),Ke(),D(n),Z_(L(n,2),{get value(){return z(a).traceId},label:`Copy trace ID`,class:`shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),B(`click`,n,()=>y(z(u))),H(e,t)};W(d,e=>{z(u).spanIds.length>0&&e(f)}),D(i);var p=L(i,2),m=F(p),h=F(m,!0);D(m);var g=L(m,4),_=F(g);D(g);var v=L(g,2),b=e=>{var t=yP(),n=L(I(t),2),r=F(n);D(n),R(()=>U(r,`${z(u).errorCount??``} errored`)),H(e,t)};W(v,e=>{z(u).errorCount>0&&e(b)});var x=L(v,2),S=e=>{var t=bP(),n=L(I(t),2),r=F(n,!0);D(n),R(e=>U(r,e),[()=>ad(z(u).totalDurationMs)]),H(e,t)};W(x,e=>{z(u).totalDurationMs>0&&e(S)}),D(p);var C=L(p,2),w=e=>{var t=SP(),n=F(t);Ip(n,{size:11,class:`text-accent`});var r=L(n,2),i=e=>{var t=xP(),n=I(t),r=F(n,!0);D(n),Ke(2),R(e=>U(r,e),[()=>Fj(z(u).metrics.costUsd)]),H(e,t)};W(r,e=>{z(u).metrics.costUsd!=null&&e(i)});var a=L(r,2),o=F(a);D(a),D(t),R(e=>U(o,`${e??``} tokens`),[()=>Pj(z(u).metrics.inputTokens,z(u).metrics.outputTokens)]),H(e,t)};W(C,e=>{z(u).metrics&&e(w)}),D(r);var T=L(r,2),ee=e=>{var t=CP(),n=F(t);{let e=M(()=>aM(z(u).sample.input));N_(n,{get content(){return z(e)},children:(e,t)=>{sM(e,{label:`Input`,get value(){return z(u).sample.input}})},$$slots:{default:!0}})}D(t),H(e,t)};W(T,e=>{z(u).sample.input!==void 0&&e(ee)});var te=L(T,2),ne=e=>{var t=wP(),n=F(t);{let e=M(()=>aM(z(u).sample.output));N_(n,{get content(){return z(e)},children:(e,t)=>{sM(e,{label:`Output`,get value(){return z(u).sample.output},tone:`positive`})},$$slots:{default:!0}})}D(t),H(e,t)};W(te,e=>{z(u).sample.output!==void 0&&e(ne)});var re=L(te,2),ie=e=>{var t=TP();Im(F(t),{size:13}),Ke(),D(t),H(e,t)};W(re,e=>{z(u).sample.input===void 0&&z(u).sample.output===void 0&&e(ie)}),D(n),R(e=>{q(o,1,e),U(c,z(u).label),U(h,z(t).label),U(_,`${z(u).count??``}
|
|
28
|
-
${z(u).count===1?`call`:`calls`}`)},[()=>K(Q(`inline-block w-2 h-2 rounded-sm`,z(t).dot))]),H(e,n)};W(le,e=>{z(u)&&e(E)}),D(re),D(t),R(()=>{J(se,`width`,z(s).width),J(se,`height`,z(s).height),J(se,`viewBox`,`0 0 ${z(s).width} ${z(s).height}`)}),B(`focusin`,ie,()=>P(x,!0)),B(`focusout`,ie,()=>P(x,!1)),H(e,t)};W(w,e=>{!z(a)||!z(s)||z(s).nodes.length===0?e(T):e(ee,-1)}),H(e,C),at()}na([`focusin`,`focusout`,`click`,`keydown`]);var kP=(e,t=p,n=p)=>{var r=jP(),i=F(r),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(r),R(()=>{U(a,t()),U(s,n())}),H(e,r)},AP=(e,t=p,n=p,r=p)=>{var i=da(),a=I(i),o=e=>{var i=MP(),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(i),R(e=>{J(i,`title`,e),U(o,t()),U(c,n())},[()=>`View ${t().toLowerCase()} in the ${r()} tab`]),B(`click`,i,()=>Mu(r())),H(e,i)},s=e=>{kP(e,t,n)};W(a,e=>{n()>0?e(o):e(s,-1)}),H(e,i)},jP=V(`<div><div class="text-[11px] uppercase tracking-wide text-fg-subtle"> </div> <div class="text-sm text-fg"> </div></div>`),MP=V(`<button type="button" class="group/stat text-left rounded -m-1 p-1 hover:bg-hover transition-colors"><div class="text-[11px] uppercase tracking-wide text-fg-subtle"> </div> <div class="text-sm text-accent group-hover/stat:underline"> </div></button>`),NP=V(`<div class="border border-line rounded-md p-3 bg-surface"><div class="flex items-start justify-between gap-2 mb-2"><div><div class="text-sm font-medium text-fg"> </div> <div class="text-xs text-fg-subtle uppercase tracking-wide"> </div></div> <span> </span></div> <div class="grid grid-cols-2 gap-2 text-xs text-fg-muted sm:grid-cols-5"><!> <!> <!> <!> <!></div></div>`),PP=V(`<option> </option>`),FP=V(`<div class="text-center text-fg-subtle text-sm py-12">No resources derived yet. Send traces or logs with resource metadata.</div>`),IP=V(`<div class="space-y-2"></div>`),LP=V(`<div class="flex flex-col h-full p-4"><div class="flex flex-col gap-3 mb-4 pb-3 border-b border-line"><div class="flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3></div> <div class="flex flex-wrap gap-2"><input type="search" placeholder="Filter resources" class="px-3 py-2 text-xs border border-line rounded-md min-w-[180px]"/> <select class="px-3 py-2 text-xs border border-line rounded-md bg-surface"><option>All types</option><!></select></div></div> <div class="flex-1 overflow-auto"><!></div></div>`);function RP(e,t){it(t,!0);let n=(e,t=p)=>{var n=NP(),r=F(n),a=F(r),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a);var u=L(a,2),d=F(u,!0);D(u),D(r);var f=L(r,2),m=F(f);kP(m,()=>`Requests`,()=>t().requestCount);var h=L(m,2);AP(h,()=>`Errors`,()=>t().errorCount,()=>`errors`);var g=L(h,2);AP(g,()=>`Traces`,()=>t().traceCount,()=>`traces`);var _=L(g,2);AP(_,()=>`Logs`,()=>t().logCount,()=>`logs`);var v=L(_,2);{let e=M(()=>t().lastSeen?od(t().lastSeen):`n/a`);kP(v,()=>`Last Seen`,()=>z(e))}D(f),D(n),R(e=>{U(s,t().name),U(l,t().type),q(u,1,e),U(d,t().health)},[()=>K(Q(`px-2 py-1 rounded border text-[11px] font-medium capitalize`,i(t().health)))]),H(e,n)},r=[`service`,`database`,`cache`,`messaging`,`external`,`unknown`];function i(e){switch(e){case`healthy`:return`bg-success-bg text-success border-success-border`;case`degraded`:return`bg-warning-bg text-warning border-warning-border`;case`unhealthy`:return`bg-danger-bg text-danger border-danger-border`;default:return`bg-subtle text-fg-muted border-line`}}let a=M(()=>eu.value),o=N(``),s=N(`all`),c=M(()=>{let e=z(o).trim().toLowerCase();return z(a).filter(t=>(z(s)===`all`||t.type===z(s))&&L_(e,[t.name]))});var l=LP(),u=F(l),d=F(u),f=F(d),m=F(f);up(m,{size:16});var h=L(m);D(f),D(d);var g=L(d,2),_=F(g);Co(_);var v=L(_,2),y=F(v);y.value=y.__value=`all`,G(L(y),16,()=>r,e=>e,(e,t)=>{var n=PP(),r=F(n,!0);D(n);var i={};R(()=>{U(r,t),i!==(i=t)&&(n.value=(n.__value=t)??``)}),H(e,n)}),D(v);var b;uo(v),D(g),D(u);var x=L(u,2),S=F(x),C=e=>{H(e,FP())},w=e=>{var t=IP();G(t,21,()=>z(c),e=>e.name,(e,t)=>{n(e,()=>z(t))}),D(t),H(e,t)};W(S,e=>{z(c).length===0?e(C):e(w,-1)}),D(x),D(l),R(()=>{U(h,` Resources (${z(a).length??``})`),wo(_,z(o)),b!==(b=z(s))&&(v.value=(v.__value=z(s))??``,lo(v,z(s)))}),B(`input`,_,e=>P(o,e.currentTarget.value,!0)),B(`change`,v,e=>P(s,e.currentTarget.value,!0)),H(e,l),at()}na([`click`,`input`,`change`]);var zP=200,BP=70,VP=20;function HP(e,t){return _s(e,t)}function UP(e){let t=e.attributes||{};return t[`db.system`]||t[`db.name`]||t[`db.statement`]?`database`:t[`messaging.system`]||t[`messaging.destination`]||t[`messaging.url`]?`messaging`:t[`rpc.system`]||t[`rpc.service`]||t[`peer.service`]?`external`:`service`}function WP(e,t){if(e.length===0)return 0;let n=Math.ceil(t/100*e.length)-1;return e[Math.max(0,n)]}function GP(e){let t=new Map,n=new Map;for(let r of e){let e=new Map;for(let t of r.spans)e.set(t.spanId,t);for(let i of r.spans){let a=HP(i,r.service),o=t.get(a);o||(o={id:a,name:a,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:`service`},t.set(a,o)),o.requestCount++,i.status.code===`ERROR`&&o.errorCount++,o.avgLatency=(o.avgLatency*(o.requestCount-1)+i.duration)/o.requestCount,o.minLatency=Math.min(o.minLatency,i.duration),o.maxLatency=Math.max(o.maxLatency,i.duration),o.spanKinds.add(i.kind);let s=UP(i),c=String(i.attributes?.[`service.name`]||r.service||a);if(s!==`service`&&a!==c&&(o.nodeType=s),i.kind===`CLIENT`){let e=r.spans.find(e=>e.parentSpanId===i.spanId&&e.kind===`SERVER`),o=String(i.attributes?.[`service.name`]||r.service||a),s=(e?HP(e,r.service):void 0)||fs(i.attributes,`peer.service`,`http.host`,`db.system`,`net.peer.name`,`rpc.service`,`messaging.system`)||`external`;if(t.has(o)||t.set(o,{id:o,name:o,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:`service`}),o!==s){let e=`${o}->${s}`,r=n.get(e);if(!r)if(r={id:e,source:o,target:s,requestCount:0,errorCount:0,avgLatency:0,p50Latency:0,p99Latency:0,latencies:[]},n.set(e,r),!t.has(s))t.set(s,{id:s,name:s,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:UP(i)});else{let e=t.get(s),n=UP(i);n!==`service`&&(e.nodeType=n)}r.requestCount++,i.status.code===`ERROR`&&r.errorCount++,r.avgLatency=(r.avgLatency*(r.requestCount-1)+i.duration)/r.requestCount,r.latencies.push(i.duration);let a=[...r.latencies].sort((e,t)=>e-t);r.p50Latency=WP(a,50),r.p99Latency=WP(a,99)}}if(i.kind!==`SERVER`||!i.parentSpanId)continue;let l=e.get(i.parentSpanId);if(!l||l.kind!==`CLIENT`)continue;let u=HP(l,r.service);if(u===a)continue;let d=`${u}->${a}`;n.has(d)||n.set(d,{id:d,source:u,target:a,requestCount:1,errorCount:+(i.status.code===`ERROR`),avgLatency:i.duration,p50Latency:i.duration,p99Latency:i.duration,latencies:[i.duration]})}}return{nodes:[...t.values()].map(e=>({...e,minLatency:e.minLatency===1/0?0:e.minLatency})),connections:[...n.values()]}}function KP(e,t){let n=new Map;if(e.length===0)return n;if(e.length===1)return n.set(e[0].id,{x:180,y:92}),n;let r=e.map(e=>e.id),i=new Map,a=new Map;for(let e of r)i.set(e,[]),a.set(e,[]);for(let e of t)i.has(e.source)&&i.get(e.source).push(e.target),a.has(e.target)&&a.get(e.target).push(e.source);let o=new Map,s=r.filter(e=>(a.get(e)?.length??0)===0),c=s.length>0?s:r,l=[...c];for(let e of c)o.set(e,0);for(;l.length>0;){let e=l.shift(),t=o.get(e)??0;for(let n of i.get(e)??[])(o.get(n)??-1)<=t&&(o.set(n,t+1),l.push(n))}for(let e of r)o.has(e)||o.set(e,0);let u=Math.max(...Array.from(o.values())),d=Array.from({length:u+1},()=>[]);for(let e of r)d[o.get(e)].push(e);for(let e=0;e<2;e++)for(let e=1;e<=u;e++){let t=d[e-1],n=new Map;t.forEach((e,t)=>n.set(e,t)),d[e].sort((e,t)=>{let r=a.get(e)??[],i=a.get(t)??[];return(r.length>0?r.reduce((e,t)=>e+(n.get(t)??0),0)/r.length:999)-(i.length>0?i.reduce((e,t)=>e+(n.get(t)??0),0)/i.length:999)})}let f=Math.max(...d.map(e=>e.length)),p=Math.max(f*122-BP,52);for(let e=0;e<=u;e++){let t=d[e],r=(p-(t.length*122-BP))/2,i=e*zP+140/2+VP;t.forEach((e,t)=>{n.set(e,{x:i-140/2,y:r+t*122+VP})})}return n}function qP(e,t,n){return Math.min(n,Math.max(t,e))}function JP(e,t,n,r,i){let a=qP(t,r,i);if(a===e.scale)return e;let o=(n.x-e.translate.x)/e.scale,s=(n.y-e.translate.y)/e.scale;return{scale:a,translate:{x:n.x-o*a,y:n.y-s*a}}}function YP(e,t,n,r,i,a){let o=e.maxX-e.minX,s=e.maxY-e.minY,c=t-r*2,l=n-r*2,u=qP(Math.min(o>0?c/o:a,s>0?l/s:a),i,a);return{scale:u,translate:{x:(t-o*u)/2-e.minX*u,y:(n-s*u)/2-e.minY*u}}}function XP(e){let{viewWidth:t,viewHeight:n,svg:r,contentBounds:i,minScale:a=.2,maxScale:o=3,zoomStep:s=1.2,fitPadding:c=24}=e,l=N(1),u=N(yr({x:0,y:0})),d=N(!1),f={x:0,y:0,tx:0,ty:0},p=(e,i)=>{let a=r();if(!a)return{x:e,y:i};let o=a.getBoundingClientRect(),s=o.width>0?t()/o.width:1,c=o.height>0?n()/o.height:1;return{x:(e-o.left)*s,y:(i-o.top)*c}},m=e=>{P(l,e.scale,!0),P(u,e.translate,!0)},h=(e,t)=>m(JP({scale:z(l),translate:z(u)},e,t,a,o)),g=()=>{P(l,1),P(u,{x:0,y:0},!0)},_=e=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let t=p(e.clientX,e.clientY),n=e.deltaY<0?s:1/s;h(z(l)*n,t)},v=e=>{e.button===0&&(e.target?.closest(`[data-node]`)||(P(d,!0),f={x:e.clientX,y:e.clientY,tx:z(u).x,ty:z(u).y},r()?.setPointerCapture?.(e.pointerId)))},y=e=>{let i=r();if(!z(d)||!i)return;let a=i.getBoundingClientRect(),o=a.width>0?t()/a.width:1,s=a.height>0?n()/a.height:1;P(u,{x:f.tx+(e.clientX-f.x)*o,y:f.ty+(e.clientY-f.y)*s},!0)},b=e=>{z(d)&&(P(d,!1),r()?.releasePointerCapture?.(e.pointerId))},x=()=>({x:t()/2,y:n()/2});return{get scale(){return z(l)},get translate(){return z(u)},get isPanning(){return z(d)},onWheel:_,onPointerDown:v,onPointerMove:y,onPointerEnd:b,zoomIn:()=>h(z(l)*s,x()),zoomOut:()=>h(z(l)/s,x()),fit:()=>{let e=i();if(!e){g();return}m(YP(e,t(),n(),c,a,o))},reset:g}}var ZP=(e,t=p,n=p,r)=>{let i=pn(()=>g(r?.(),!1));var a=QP(),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,t()),q(c,1,e),U(l,n())},[()=>K(Q(`font-medium`,z(i)?`text-danger`:`text-fg`))]),H(e,a)},QP=V(`<div class="flex justify-between text-xs"><span class="text-fg-subtle"> </span> <span> </span></div>`),$P=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle p-8"><!> <p class="text-sm text-center">No traces available to build service map. <br/> Traces will appear here as they are captured.</p></div>`),eF=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle p-8"><!> <p class="text-sm text-center">No services detected in traces. <br/> Service information is extracted from span attributes.</p></div>`),tF=V(`<span class="text-xs text-fg-subtle flex-shrink-0">No service matches</span>`),nF=ua(`<g><path fill="none" stroke-linecap="round"></path><text text-anchor="middle"> </text></g>`),rF=ua(`<rect fill="none" class="stroke-accent"></rect>`),iF=ua(`<rect></rect><path></path><ellipse></ellipse>`,1),aF=ua(`<polygon></polygon>`),oF=ua(`<rect></rect>`),sF=ua(`<rect fill="#64748b"></rect>`),cF=ua(`<tspan fill="#dc2626" class="font-semibold"> </tspan>`),lF=ua(`<g role="button" tabindex="0"><!><g filter="url(#nodeShadow)"><!></g><!><text text-anchor="middle" class="text-[11px] font-semibold" fill="#1f2937"> </text><text text-anchor="middle" class="text-[10px]" fill="#475569"> <!></text></g>`),uF=V(`<div class="space-y-3 pr-8"><!> <!> <!> <!> <!> <!></div>`),dF=V(`<span class="text-danger"> </span>`),fF=V(`<div class="text-xs p-2 bg-surface rounded border border-line"><div class="flex items-center gap-1 text-fg-muted"><span class="font-medium"> </span> <!></div> <div class="flex items-center gap-2 mt-1 text-fg-subtle"><span> </span> <!> <span> </span></div></div>`),pF=V(`<div class="mt-4 pt-4 border-t border-line"><div class="group flex items-center justify-between mb-2"><h5 class="text-xs font-medium text-fg-muted">Connections</h5> <!></div> <div class="space-y-2"></div></div>`),mF=V(`<div class="w-64 border-l border-line bg-subtle overflow-auto"><div class="p-4"><div class="flex items-center justify-between mb-4"><div class="group flex items-center gap-1 min-w-0"><h4 class="font-semibold text-fg truncate"> </h4> <!></div> <button class="text-fg-subtle hover:text-fg-muted">×</button></div> <!> <!></div></div>`),hF=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3> <div class="text-xs text-fg-subtle"> </div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!></div> <div class="flex-1 overflow-hidden flex"><div class="relative flex-1 overflow-auto p-4"><svg role="application" aria-label="Service map. Drag to pan, ctrl or cmd and scroll to zoom."><defs><marker id="arrowhead" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0, 10 3.5, 0 7" fill="#94a3b8"></polygon></marker><marker id="arrowhead-error" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0, 10 3.5, 0 7" fill="#ef4444"></polygon></marker><filter id="nodeShadow" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#0f172a" flood-opacity="0.14"></feDropShadow></filter></defs><g><!><!></g></svg> <div class="absolute bottom-3 right-3 flex flex-col gap-1 rounded-md border border-line bg-surface p-1 shadow-sm"><button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Zoom in" aria-label="Zoom in"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Zoom out" aria-label="Zoom out"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Fit to content" aria-label="Fit to content"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Reset to 1:1" aria-label="Reset zoom to 1:1"><!></button></div></div> <!></div> <div class="flex items-center gap-4 px-4 py-2 border-t border-line bg-subtle text-xs"><div class="flex items-center gap-1"><div class="w-4 h-4 rounded-full border-2 border-accent bg-surface"></div> <span class="text-fg-muted">Healthy</span></div> <div class="flex items-center gap-1"><div class="w-4 h-4 rounded-full border-2 border-danger-border bg-surface"></div> <span class="text-fg-muted">Has Errors</span></div> <div class="flex items-center gap-1"><div class="w-6 h-0.5 bg-fg-subtle"></div> <span class="text-fg-muted">Connection</span></div></div></div>`);function gF(e,t){it(t,!0);let n=M(()=>vl.value),r=N(null),i=N(null),a=N(``),o=M(()=>GP(z(n))),s=M(()=>z(o).nodes),c=M(()=>z(o).connections),l=M(()=>z(a).length>0);function u(e){return L_(z(a).toLowerCase(),[e.name])}let d=M(()=>z(s).filter(u)),f=M(()=>new Set(z(d).map(e=>e.id))),p=M(()=>z(d).length>0),m=M(()=>KP(z(s),z(c))),h=M(()=>{let e=400;for(let[,t]of z(m))t.x+140+20>e&&(e=t.x+140+20);return e}),g=M(()=>{let e=300;for(let[,t]of z(m))t.y+52+20>e&&(e=t.y+52+20);return e}),_=N(null),v=XP({viewWidth:()=>z(h),viewHeight:()=>z(g),svg:()=>z(_),contentBounds:()=>{let e=1/0,t=1/0,n=-1/0,r=-1/0;for(let[,i]of z(m))e=Math.min(e,i.x),t=Math.min(t,i.y),n=Math.max(n,i.x+140),r=Math.max(r,i.y+52);return Number.isFinite(e)?{minX:e,minY:t,maxX:n,maxY:r}:null}}),y=M(()=>z(r)?z(s).find(e=>e.id===z(r))??null:null);function b(e,t){if(e.key===`Enter`||e.key===` `){e.preventDefault(),P(r,z(r)===t?null:t,!0);return}e.key===`Escape`&&z(r)&&(e.stopPropagation(),P(r,null))}let x=M(()=>z(r)?z(c).filter(e=>e.source===z(r)||e.target===z(r)):[]),S=M(()=>z(x).length>0?JSON.stringify(z(x).map(e=>({source:e.source,target:e.target,requests:e.requestCount,errors:e.errorCount,avgLatency:ad(e.avgLatency)})),null,2):``),C=M(()=>{if(!z(y))return``;let e=z(y);return JSON.stringify({service:e.name,requests:e.requestCount,errors:e.errorCount,errorRate:`${(e.errorCount/e.requestCount*100).toFixed(1)}%`,avgLatency:ad(e.avgLatency),minLatency:ad(e.minLatency),maxLatency:ad(e.maxLatency),connections:z(x).map(e=>({source:e.source,target:e.target,requests:e.requestCount,errors:e.errorCount,avgLatency:ad(e.avgLatency)}))},null,2)});var w=da(),T=I(w),ee=e=>{var t=$P();Xf(F(t),{size:48,class:`mb-4 opacity-50`}),Ke(2),D(t),H(e,t)},te=e=>{var t=eF();wh(F(t),{size:48,class:`mb-4 opacity-50`}),Ke(2),D(t),H(e,t)},ne=e=>{var t=hF(),n=F(t),o=F(n),u=F(o);Xf(u,{size:16});var w=L(u);D(o);var T=L(o,2),ee=F(T);D(T),D(n);var te=L(n,2),ne=F(te);I_(ne,{placeholder:`Find a service by name…`,ariaLabel:`Find a service by name`,get value(){return z(a)},set value(e){P(a,e,!0)}});var re=L(ne,2),ie=e=>{H(e,tF())};W(re,e=>{z(l)&&!z(p)&&e(ie)}),D(te);var ae=L(te,2),oe=F(ae),se=F(oe);co(se,`min-height: 300px;`);var ce=L(F(se)),le=F(ce);G(le,17,()=>z(c),e=>e.id,(e,t)=>{let n=M(()=>z(m).get(z(t).source)),i=M(()=>z(m).get(z(t).target));var a=da(),o=I(a),s=e=>{let a=M(()=>z(r)===z(t).source||z(r)===z(t).target),o=M(()=>z(t).errorCount>0),s=M(()=>z(n).x+140),c=M(()=>z(n).y+52/2),l=M(()=>z(i).x),u=M(()=>z(i).y+52/2),d=M(()=>Math.abs(z(l)-z(s))*.5),f=M(()=>z(t).requestCount>0?z(t).errorCount/z(t).requestCount*100:0),p=M(()=>z(o)?`${z(t).requestCount}× · ${z(f).toFixed(0)}% err · ${ad(z(t).p50Latency)}`:`${z(t).requestCount}× · ${ad(z(t).p50Latency)}`);var m=nF(),h=F(m),g=L(h),_=F(g,!0);D(g),D(m),R(e=>{J(h,`d`,`M${z(s)},${z(c)} C${z(s)+z(d)},${z(c)} ${z(l)-z(d)},${z(u)} ${z(l)},${z(u)}`),J(h,`stroke`,z(o)?`#ef4444`:`#94a3b8`),J(h,`stroke-width`,z(o)||z(a)?2.5:1.5),J(h,`stroke-dasharray`,z(o)?`6 4`:void 0),J(h,`stroke-opacity`,z(r)&&!z(a)?.2:1),J(h,`marker-end`,`url(#${z(o)?`arrowhead-error`:`arrowhead`})`),J(g,`x`,(z(s)+z(l))/2),J(g,`y`,(z(c)+z(u))/2-6),q(g,0,e),J(g,`opacity`,z(r)&&!z(a)?.25:1),U(_,z(p))},[()=>K(Q(`at-edge-label text-[10px]`,z(o)?`fill-danger font-medium`:`fill-fg-subtle`))]),H(e,m)};W(o,e=>{z(n)&&z(i)&&e(s)}),H(e,a)}),G(L(le),17,()=>z(s),e=>e.id,(e,t)=>{let n=M(()=>z(m).get(z(t).id));var a=da(),o=I(a),s=e=>{let a=M(()=>z(r)===z(t).id),o=M(()=>z(i)===z(t).id),s=M(()=>z(t).errorCount>0),c=M(()=>z(f).has(z(t).id)),u=M(()=>z(l)&&!z(c)),d=M(()=>mg(z(t).id)),p=M(()=>z(d).fill),m=M(()=>z(s)?`#ef4444`:z(d).stroke),h=M(()=>z(a)||z(s)?2.5:z(o)?2:1.5);var g=lF(),_=F(g),v=e=>{var t=rF();J(t,`x`,-3),J(t,`y`,-3),J(t,`rx`,11),J(t,`stroke-width`,2.5),R(()=>{J(t,`width`,146),J(t,`height`,58)}),H(e,t)};W(_,e=>{z(l)&&z(c)&&e(v)});var y=L(_),S=F(y),C=e=>{var t=iF(),n=I(t);J(n,`x`,2),J(n,`y`,6);var r=L(n),i=L(r);J(i,`cy`,6),J(i,`ry`,6),R(()=>{J(n,`width`,136),J(n,`height`,40),J(n,`fill`,z(p)),J(r,`d`,`M2,46 A${140/2-2},6 0 0,0 138,46 L138,6 A${140/2-2},6 0 0,1 2,6 Z`),J(r,`fill`,z(p)),J(r,`stroke`,z(m)),J(r,`stroke-width`,z(h)),J(i,`cx`,140/2),J(i,`rx`,140/2-2),J(i,`fill`,z(p)),J(i,`stroke`,z(m)),J(i,`stroke-width`,z(h))}),H(e,t)},w=e=>{var t=aF();R(()=>{J(t,`points`,`${140/2},2 138,${52/4} 138,${156/4} ${140/2},50 2,${156/4} 2,${52/4}`),J(t,`fill`,z(p)),J(t,`stroke`,z(m)),J(t,`stroke-width`,z(h))}),H(e,t)},T=e=>{var t=oF();J(t,`x`,2),J(t,`y`,2),J(t,`rx`,8),R(()=>{J(t,`width`,136),J(t,`height`,48),J(t,`fill`,z(p)),J(t,`stroke`,z(m)),J(t,`stroke-width`,z(h))}),H(e,t)};W(S,e=>{z(t).nodeType===`database`?e(C):z(t).nodeType===`messaging`?e(w,1):e(T,-1)}),D(y);var ee=L(y),te=e=>{var t=sF();J(t,`x`,0),J(t,`y`,0),J(t,`rx`,8),J(t,`opacity`,.4),R(()=>{J(t,`width`,140),J(t,`height`,52)}),H(e,t)},ne=M(()=>z(r)&&!z(a)&&!z(x).some(e=>e.source===z(t).id||e.target===z(t).id));W(ee,e=>{z(ne)&&e(te)});var re=L(ee),ie=F(re,!0);D(re);var ae=L(re),oe=F(ae),se=L(oe),ce=e=>{var n=cF(),r=F(n);D(n),R(()=>U(r,` · ${z(t).errorCount??``} err`)),H(e,n)};W(se,e=>{z(s)&&e(ce)}),D(ae),D(g),R((e,r)=>{J(g,`data-node`,z(t).id),J(g,`transform`,`translate(${z(n).x}, ${z(n).y})`),q(g,0,e),J(g,`aria-label`,z(t).name),J(re,`x`,140/2),J(re,`y`,52/2-3),U(ie,r),J(ae,`x`,140/2),J(ae,`y`,38),U(oe,`${z(t).requestCount??``} span${z(t).requestCount===1?``:`s`} `)},[()=>K(Q(`cursor-pointer`,z(u)&&`opacity-30`)),()=>z(t).name.length>16?z(t).name.slice(0,14)+`…`:z(t).name]),B(`click`,g,()=>P(r,z(a)?null:z(t).id,!0)),B(`keydown`,g,e=>b(e,z(t).id)),ta(`mouseenter`,g,()=>P(i,z(t).id,!0)),ta(`mouseleave`,g,()=>P(i,null)),H(e,g)};W(o,e=>{z(n)&&e(s)}),H(e,a)}),D(ce),D(se),Uo(se,e=>P(_,e),()=>z(_));var E=L(se,2),ue=F(E);ch(F(ue),{size:14}),D(ue);var de=L(ue,2);Bm(F(de),{size:14}),D(de);var fe=L(de,2);vh(F(fe),{size:14}),D(fe);var pe=L(fe,2);mh(F(pe),{size:14}),D(pe),D(E),D(oe);var me=L(oe,2),he=e=>{var t=mF(),n=F(t),i=F(n),a=F(i),o=F(a),s=F(o,!0);D(o),Z_(L(o,2),{get value(){return z(y).name},label:`Copy service name`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(a);var c=L(a,2);D(i);var l=L(i,2);N_(l,{get content(){return z(C)},children:(e,t)=>{var n=uF(),r=F(n);{let e=M(()=>z(y).requestCount.toString());ZP(r,()=>`Requests`,()=>z(e))}var i=L(r,2);{let e=M(()=>z(y).errorCount.toString());ZP(i,()=>`Errors`,()=>z(e),()=>z(y).errorCount>0)}var a=L(i,2);{let e=M(()=>`${(z(y).errorCount/z(y).requestCount*100).toFixed(1)}%`);ZP(a,()=>`Error Rate`,()=>z(e),()=>z(y).errorCount>0)}var o=L(a,2);{let e=M(()=>ad(z(y).avgLatency));ZP(o,()=>`Avg Latency`,()=>z(e))}var s=L(o,2);{let e=M(()=>ad(z(y).minLatency));ZP(s,()=>`Min Latency`,()=>z(e))}var c=L(s,2);{let e=M(()=>ad(z(y).maxLatency));ZP(c,()=>`Max Latency`,()=>z(e))}D(n),H(e,n)},$$slots:{default:!0}});var u=L(l,2),d=e=>{var t=pF(),n=F(t);Z_(L(F(n),2),{get value(){return z(S)},label:`Copy connections`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(n);var i=L(n,2);G(i,21,()=>z(x),e=>e.id,(e,t)=>{var n=fF(),i=F(n),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=e=>{np(e,{size:10})},l=e=>{np(e,{size:10,class:`rotate-180`})};W(s,e=>{z(t).source===z(r)?e(c):e(l,-1)}),D(i);var u=L(i,2),d=F(u),f=F(d);D(d);var p=L(d,2),m=e=>{var n=dF(),r=F(n);D(n),R(()=>U(r,`${z(t).errorCount??``} err`)),H(e,n)};W(p,e=>{z(t).errorCount>0&&e(m)});var h=L(p,2),g=F(h,!0);D(h),D(u),D(n),R(e=>{U(o,z(t).source===z(r)?z(t).target:z(t).source),U(f,`${z(t).requestCount??``} req`),U(g,e)},[()=>ad(z(t).avgLatency)]),H(e,n)}),D(i),D(t),H(e,t)};W(u,e=>{z(x).length>0&&e(d)}),D(n),D(t),R(()=>U(s,z(y).name)),B(`click`,c,()=>P(r,null)),H(e,t)};W(me,e=>{z(y)&&e(he)}),D(ae),Ke(2),D(t),R(e=>{U(w,` Service Map (${(z(l)?`${z(d).length} of ${z(s).length}`:z(s).length)??``} services)`),U(ee,`${z(c).length??``} connections`),J(se,`viewBox`,`0 0 ${z(h)} ${z(g)}`),q(se,0,e),J(ce,`transform`,`translate(${v.translate.x}, ${v.translate.y}) scale(${v.scale})`)},[()=>K(Q(`w-full h-full`,v.isPanning?`cursor-grabbing`:`cursor-grab`))]),ta(`wheel`,se,function(...e){v.onWheel?.apply(this,e)}),B(`pointerdown`,se,function(...e){v.onPointerDown?.apply(this,e)}),B(`pointermove`,se,function(...e){v.onPointerMove?.apply(this,e)}),B(`pointerup`,se,function(...e){v.onPointerEnd?.apply(this,e)}),ta(`pointercancel`,se,function(...e){v.onPointerEnd?.apply(this,e)}),ta(`pointerleave`,se,function(...e){v.onPointerEnd?.apply(this,e)}),B(`click`,ue,function(...e){v.zoomIn?.apply(this,e)}),B(`click`,de,function(...e){v.zoomOut?.apply(this,e)}),B(`click`,fe,function(...e){v.fit?.apply(this,e)}),B(`click`,pe,function(...e){v.reset?.apply(this,e)}),H(e,t)};W(T,e=>{z(n).length===0?e(ee):z(s).length===0?e(te,1):e(ne,-1)}),H(e,w),at()}na([`pointerdown`,`pointermove`,`pointerup`,`click`,`keydown`]);async function _F(e,t=``){let n=t?`?q=${encodeURIComponent(t)}`:``;return bF(`${e.baseUrl}/api/metrics${n}`,{method:`GET`,signal:e.signal},e,e=>e.metrics??[])}async function vF(e,t){let n={name:e.name};return e.window&&(n.window=e.window),n.maxPoints=e.maxPoints??1500,bF(`${t.baseUrl}/api/query/metrics`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(n),signal:t.signal},t,e=>e.series??[])}async function yF(e,t){return bF(`${t.baseUrl}/api/metrics?name=${encodeURIComponent(e)}`,{method:`DELETE`,signal:t.signal},t,e=>e.deletedSeries??0)}async function bF(e,t,n,r){let i;try{i=await n.fetch(e,t)}catch(e){return xF(e)?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}if(i.status===403)return{status:`error`,message:`Forbidden: the devtools server rejected this origin. Open the viewer from the same machine.`};let a;try{a=await i.json()}catch{return{status:`error`,message:`Unexpected response from ${n.baseUrl} (not JSON)`}}return i.ok?{status:`ok`,data:r(a)}:{status:`error`,message:`Server error: ${a.error??i.statusText}`}}function xF(e){return typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`}function SF(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function CF(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function wF(e){let t,n,r;e.length===2?(t=e===SF||e===CF?e:TF,n=e,r=e):(t=SF,n=(t,n)=>SF(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function TF(){return 0}function EF(e){return e===null?NaN:+e}var DF=wF(SF),OF=DF.right;DF.left,wF(EF).center;var kF=Math.sqrt(50),AF=Math.sqrt(10),jF=Math.sqrt(2);function MF(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=kF?10:a>=AF?5:a>=jF?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?MF(e,t,n*2):[s,c,l]}function NF(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?MF(t,e,n):MF(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function PF(e,t,n){return t=+t,e=+e,n=+n,MF(e,t,n)[2]}function FF(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?PF(t,e,n):PF(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function IF(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function LF(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function RF(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function zF(){}var BF=.7,VF=1/BF,HF=`\\s*([+-]?\\d+)\\s*`,UF=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,WF=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,GF=/^#([0-9a-f]{3,8})$/,KF=RegExp(`^rgb\\(${HF},${HF},${HF}\\)$`),qF=RegExp(`^rgb\\(${WF},${WF},${WF}\\)$`),JF=RegExp(`^rgba\\(${HF},${HF},${HF},${UF}\\)$`),YF=RegExp(`^rgba\\(${WF},${WF},${WF},${UF}\\)$`),XF=RegExp(`^hsl\\(${UF},${WF},${WF}\\)$`),ZF=RegExp(`^hsla\\(${UF},${WF},${WF},${UF}\\)$`),QF={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};LF(zF,rI,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$F,formatHex:$F,formatHex8:eI,formatHsl:tI,formatRgb:nI,toString:nI});function $F(){return this.rgb().formatHex()}function eI(){return this.rgb().formatHex8()}function tI(){return gI(this).formatHsl()}function nI(){return this.rgb().formatRgb()}function rI(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=GF.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?iI(t):n===3?new cI(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?aI(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?aI(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=KF.exec(e))?new cI(t[1],t[2],t[3],1):(t=qF.exec(e))?new cI(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=JF.exec(e))?aI(t[1],t[2],t[3],t[4]):(t=YF.exec(e))?aI(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=XF.exec(e))?hI(t[1],t[2]/100,t[3]/100,1):(t=ZF.exec(e))?hI(t[1],t[2]/100,t[3]/100,t[4]):QF.hasOwnProperty(e)?iI(QF[e]):e===`transparent`?new cI(NaN,NaN,NaN,0):null}function iI(e){return new cI(e>>16&255,e>>8&255,e&255,1)}function aI(e,t,n,r){return r<=0&&(e=t=n=NaN),new cI(e,t,n,r)}function oI(e){return e instanceof zF||(e=rI(e)),e?(e=e.rgb(),new cI(e.r,e.g,e.b,e.opacity)):new cI}function sI(e,t,n,r){return arguments.length===1?oI(e):new cI(e,t,n,r??1)}function cI(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}LF(cI,sI,RF(zF,{brighter(e){return e=e==null?VF:VF**+e,new cI(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?BF:BF**+e,new cI(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cI(pI(this.r),pI(this.g),pI(this.b),fI(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:lI,formatHex:lI,formatHex8:uI,formatRgb:dI,toString:dI}));function lI(){return`#${mI(this.r)}${mI(this.g)}${mI(this.b)}`}function uI(){return`#${mI(this.r)}${mI(this.g)}${mI(this.b)}${mI((isNaN(this.opacity)?1:this.opacity)*255)}`}function dI(){let e=fI(this.opacity);return`${e===1?`rgb(`:`rgba(`}${pI(this.r)}, ${pI(this.g)}, ${pI(this.b)}${e===1?`)`:`, ${e})`}`}function fI(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function pI(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function mI(e){return e=pI(e),(e<16?`0`:``)+e.toString(16)}function hI(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new vI(e,t,n,r)}function gI(e){if(e instanceof vI)return new vI(e.h,e.s,e.l,e.opacity);if(e instanceof zF||(e=rI(e)),!e)return new vI;if(e instanceof vI)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new vI(o,s,c,e.opacity)}function _I(e,t,n,r){return arguments.length===1?gI(e):new vI(e,t,n,r??1)}function vI(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}LF(vI,_I,RF(zF,{brighter(e){return e=e==null?VF:VF**+e,new vI(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?BF:BF**+e,new vI(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new cI(xI(e>=240?e-240:e+120,i,r),xI(e,i,r),xI(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new vI(yI(this.h),bI(this.s),bI(this.l),fI(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=fI(this.opacity);return`${e===1?`hsl(`:`hsla(`}${yI(this.h)}, ${bI(this.s)*100}%, ${bI(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function yI(e){return e=(e||0)%360,e<0?e+360:e}function bI(e){return Math.max(0,Math.min(1,e||0))}function xI(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var SI=e=>()=>e;function CI(e,t){return function(n){return e+n*t}}function wI(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function TI(e){return(e=+e)==1?EI:function(t,n){return n-t?wI(t,n,e):SI(isNaN(t)?n:t)}}function EI(e,t){var n=t-e;return n?CI(e,n):SI(isNaN(e)?t:e)}var DI=(function e(t){var n=TI(t);function r(e,t){var r=n((e=sI(e)).r,(t=sI(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=EI(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function OI(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function kI(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function AI(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=zI(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function jI(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function MI(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function NI(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=zI(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var PI=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,FI=new RegExp(PI.source,`g`);function II(e){return function(){return e}}function LI(e){return function(t){return e(t)+``}}function RI(e,t){var n=PI.lastIndex=FI.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=PI.exec(e))&&(i=FI.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:MI(r,i)})),n=FI.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?LI(c[0].x):II(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function zI(e,t){var n=typeof t,r;return t==null||n===`boolean`?SI(t):(n===`number`?MI:n===`string`?(r=rI(t))?(t=r,DI):RI:t instanceof rI?DI:t instanceof Date?jI:kI(t)?OI:Array.isArray(t)?AI:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?NI:MI)(e,t)}function BI(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function VI(e){return function(){return e}}function HI(e){return+e}var UI=[0,1];function WI(e){return e}function GI(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:VI(isNaN(t)?NaN:.5)}function KI(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function qI(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=GI(i,r),a=n(o,a)):(r=GI(r,i),a=n(a,o)),function(e){return a(r(e))}}function JI(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=GI(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=OF(e,t,1,r)-1;return a[n](i[n](t))}}function YI(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function XI(){var e=UI,t=UI,n=zI,r,i,a,o=WI,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==WI&&(o=KI(e[0],e[n-1])),s=n>2?JI:qI,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||(c=s(e.map(r),t,n)))(r(o(i)))}return d.invert=function(n){return o(i((l||(l=s(t,e.map(r),MI)))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,HI),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=BI,u()},d.clamp=function(e){return arguments.length?(o=e?!0:WI,u()):o!==WI},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function ZI(){return XI()(WI,WI)}function QI(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function $I(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function eL(e){return e=$I(Math.abs(e)),e?e[1]:NaN}function tL(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function nL(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var rL=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function iL(e){if(!(t=rL.exec(e)))throw Error(`invalid format: `+e);var t;return new aL({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}iL.prototype=aL.prototype;function aL(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}aL.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function oL(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var sL;function cL(e,t){var n=$I(e,t);if(!n)return e+``;var r=n[0],i=n[1],a=i-(sL=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+$I(e,Math.max(0,t+a-1))[0]}function lL(e,t){var n=$I(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var uL={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:QI,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>lL(e*100,t),r:lL,s:cL,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function dL(e){return e}var fL=Array.prototype.map,pL=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function mL(e){var t=e.grouping===void 0||e.thousands===void 0?dL:tL(fL.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?dL:nL(fL.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e){e=iL(e);var l=e.fill,u=e.align,d=e.sign,f=e.symbol,p=e.zero,m=e.width,h=e.comma,g=e.precision,_=e.trim,v=e.type;v===`n`?(h=!0,v=`g`):uL[v]||(g===void 0&&(g=12),_=!0,v=`g`),(p||l===`0`&&u===`=`)&&(p=!0,l=`0`,u=`=`);var y=f===`$`?n:f===`#`&&/[boxX]/.test(v)?`0`+v.toLowerCase():``,b=f===`$`?r:/[%p]/.test(v)?o:``,x=uL[v],S=/[defgprs%]/.test(v);g=g===void 0?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function C(e){var n=y,r=b,o,f,C;if(v===`c`)r=x(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),g),_&&(e=oL(e)),w&&+e==0&&d!==`+`&&(w=!1),n=(w?d===`(`?d:s:d===`-`||d===`(`?``:d)+n,r=(v===`s`?pL[8+sL/3]:``)+r+(w&&d===`(`?`)`:``),S){for(o=-1,f=e.length;++o<f;)if(C=e.charCodeAt(o),48>C||C>57){r=(C===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}h&&!p&&(e=t(e,1/0));var T=n.length+e.length+r.length,ee=T<m?Array(m-T+1).join(l):``;switch(h&&p&&(e=t(ee+e,ee.length?m-r.length:1/0),ee=``),u){case`<`:e=n+e+r+ee;break;case`=`:e=n+ee+e+r;break;case`^`:e=ee.slice(0,T=ee.length>>1)+n+e+r+ee.slice(T);break;default:e=ee+n+e+r;break}return a(e)}return C.toString=function(){return e+``},C}function u(e,t){var n=l((e=iL(e),e.type=`f`,e)),r=Math.max(-8,Math.min(8,Math.floor(eL(t)/3)))*3,i=10**-r,a=pL[8+r/3];return function(e){return n(i*e)+a}}return{format:l,formatPrefix:u}}var hL,gL,_L;vL({thousands:`,`,grouping:[3],currency:[`$`,``]});function vL(e){return hL=mL(e),gL=hL.format,_L=hL.formatPrefix,hL}function yL(e){return Math.max(0,-eL(Math.abs(e)))}function bL(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(eL(t)/3)))*3-eL(Math.abs(e)))}function xL(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,eL(t)-eL(e))+1}function SL(e,t,n,r){var i=FF(e,t,n),a;switch(r=iL(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=bL(i,o))&&(r.precision=a),_L(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=xL(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=yL(i))&&(r.precision=a-(r.type===`%`)*2);break}return gL(r)}function CL(e){var t=e.domain;return e.ticks=function(e){var n=t();return NF(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return SL(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=PF(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function wL(){var e=ZI();return e.copy=function(){return YI(e,wL())},IF.apply(e,arguments),CL(e)}function TL(e){return function(){return e}}var EL=Math.PI,DL=2*EL,OL=1e-6,kL=DL-OL;function AL(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function jL(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return AL;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var ML=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?AL:jL(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>OL)if(!(Math.abs(u*s-c*l)>OL)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((EL-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>OL&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>OL||Math.abs(this._y1-l)>OL)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%DL+DL),d>kL?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>OL&&this._append`A${n},${n},0,${+(d>=EL)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function NL(){return new ML}NL.prototype=ML.prototype;function PL(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new ML(t)}Array.prototype.slice;function FL(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function IL(e){this._context=e}IL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function LL(e){return new IL(e)}function RL(e){return e[0]}function zL(e){return e[1]}function BL(e,t){var n=TL(!0),r=null,i=LL,a=null,o=PL(s);e=typeof e==`function`?e:e===void 0?RL:TL(e),t=typeof t==`function`?t:t===void 0?zL:TL(t);function s(s){var c,l=(s=FL(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:TL(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:TL(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:TL(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function VL(e,t,n){var r=null,i=TL(!0),a=null,o=LL,s=null,c=PL(l);e=typeof e==`function`?e:e===void 0?RL:TL(+e),t=typeof t==`function`?t:TL(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?zL:TL(+n);function l(l){var u,d,f,p=(l=FL(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return BL().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:TL(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:TL(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:TL(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:TL(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:TL(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:TL(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:TL(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var HL=ua(`<svg role="img"><path fill="none" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"></path></svg>`),UL=V(`<span>—</span>`);function WL(e,t){it(t,!0);let n=Z(t,`width`,3,80),r=Z(t,`height`,3,20),i=Z(t,`color`,3,`var(--color-accent)`),a=M(()=>t.points.map(e=>e.value??0)),o=M(()=>{if(t.points.length<2)return null;let e=wL().domain([t.points[0].timestamp,t.points[t.points.length-1].timestamp]).range([1,n()-1]),i=Math.min(...z(a)),o=Math.max(...z(a)),s=wL().domain(i===o?[i-1,o+1]:[i,o]).range([r()-1,1]);return BL().x(t=>e(t.timestamp)).y(e=>s(e.value??0))(t.points)});var s=da(),c=I(s),l=e=>{var a=HL(),s=F(a);D(a),R(e=>{J(a,`width`,n()),J(a,`height`,r()),J(a,`viewBox`,`0 0 ${n()??``} ${r()??``}`),J(a,`aria-label`,t.ariaLabel??`Sparkline, ${t.points.length} points`),q(a,0,e),J(s,`d`,z(o)),J(s,`stroke`,i())},[()=>K(Q(`overflow-visible`,t.class))]),H(e,a)},u=e=>{var i=UL();R(e=>{q(i,1,e),co(i,`width:${n()??``}px;height:${r()??``}px`)},[()=>K(Q(`text-[10px] text-fg-subtle`,t.class))]),H(e,i)};W(c,e=>{z(o)?e(l):e(u,-1)}),H(e,s),at()}function GL(e,t){if(t===void 0)return e;if(t===`cumulative`&&e.length<2)return[];let n=[],r=+(t===`cumulative`);for(let i=r;i<e.length;i++){let r=e[i-1],a=r?.value??0,o=e[i].value??0,s=o;t===`cumulative`&&o>=a&&(s=o-a);let c=e[i].startTimestamp??r?.timestamp,l=c===void 0?0:(e[i].timestamp-c)/1e3;n.push({...e[i],value:l>0?s/l:s})}return n}function KL(e,t,n){if(e.length!==t.length+1)return;let r=e.reduce((e,t)=>e+t,0);if(r===0)return;let i=n*r,a=0;for(let n=0;n<e.length;n++){let r=e[n];if(a+r>=i){let e=n===0?0:t[n-1],o=n<t.length?t[n]:t[t.length-1];if(r===0)return o;let s=(i-a)/r;return e+(o-e)*s}a+=r}return t[t.length-1]}function qL(e,t){return e.length===t.length+1?t.length===0?[{label:`all`,count:e[0],from:-1/0,to:1/0}]:e.map((e,n)=>{let r=n===0?-1/0:t[n-1],i=n<t.length?t[n]:1/0;return{label:n===0?`≤${eR(t[0])}`:n===t.length?`>${eR(t[t.length-1])}`:`${eR(t[n-1])}–${eR(t[n])}`,count:e,from:r,to:i}}):[]}function JL(e){if(e.bucketCounts&&e.explicitBounds)return qL(e.bucketCounts,e.explicitBounds);if(e.scale===void 0)return[];let t=2**2**-e.scale,n=[];if(YL(n,e.negative,t,!0),e.zeroCount!==void 0){let t=e.zeroThreshold??0;n.push({label:t>0?`−${eR(t)}–${eR(t)}`:`0`,count:e.zeroCount,from:-t,to:t})}return YL(n,e.positive,t,!1),n.sort((e,t)=>e.from-t.from)}function YL(e,t,n,r){if(t)for(let i=0;i<t.bucketCounts.length;i++){let a=t.offset+i,o=n**a,s=n**(a+1),c=r?-s:o,l=r?-o:s;e.push({label:`${eR(c)}–${eR(l)}`,count:t.bucketCounts[i],from:c,to:l})}}function XL(e,t){if(e.bucketCounts&&e.explicitBounds)return KL(e.bucketCounts,e.explicitBounds,t);let n=JL(e),r=n.reduce((e,t)=>e+t.count,0);if(r===0)return;let i=t*r,a=0;for(let e of n){if(a+e.count>=i)return e.count===0?e.to:e.from+(i-a)/e.count*(e.to-e.from);a+=e.count}return n[n.length-1]?.to}function ZL(e,t){if(e.length===0)return;let n=e.map(e=>e.value??0);switch(t){case`sum`:return n.reduce((e,t)=>e+t,0);case`avg`:return n.reduce((e,t)=>e+t,0)/n.length;case`min`:return Math.min(...n);case`max`:return Math.max(...n);case`last`:return n[n.length-1];case`count`:return e.length}}function QL(e,t,n){if(!Number.isFinite(e)||!Number.isFinite(t)||e===t)return[e];let r=(t-e)/Math.max(1,n),i=10**Math.floor(Math.log10(r)),a=r/i,o=(a<=1?1:a<=2?2:a<=5?5:10)*i,s=Math.floor(e/o)*o,c=Math.ceil(t/o)*o,l=[],u=Math.round((c-s)/o);for(let e=0;e<=u;e++)l.push(s+e*o);return l}function $L(e,t){if(e.length<=t||t<3)return e;let n=Math.max(1,Math.floor((t-2)/2)),r=e.length/n,i=new Map;i.set(0,e[0]),i.set(e.length-1,e[e.length-1]);for(let t=0;t<n;t++){let n=Math.floor(t*r),a=Math.min(e.length,Math.floor((t+1)*r));if(n>=a)continue;let o=n,s=n;for(let t=n;t<a;t++){let n=e[t].value??0;n<(e[o].value??0)&&(o=t),n>(e[s].value??0)&&(s=t)}i.set(o,e[o]),i.set(s,e[s])}return[...i.entries()].sort((e,t)=>e[0]-t[0]).map(([,e])=>e)}function eR(e){return Number.isFinite(e)?Math.abs(e)>=1e3?e.toLocaleString(void 0,{maximumFractionDigits:0}):String(Math.round(e*100)/100):`∞`}function tR(e){if(e.length===0)return[];let t=[...new Set(e.flatMap(e=>e.map(e=>e.timestamp)))].sort((e,t)=>e-t),n=e.map(e=>new Map(e.map(e=>[e.timestamp,e.value??0]))),r=new Map(t.map(e=>[e,0]));return n.map(e=>t.map(t=>{let n=r.get(t)??0,i=e.get(t)??0,a=n+Math.max(0,i);return r.set(t,a),{timestamp:t,y0:n,y1:a}}))}function nR(e,t){return t.map(t=>({quantile:t,points:e.flatMap(e=>{let n=XL(e,t);return n===void 0?[]:[{timestamp:e.timestamp,value:n}]})}))}function rR(e){let t=e.filter(e=>JL(e).length>0);if(t.length===0)return{columns:[],rows:[],max:0};let n=t[0],r=JL(n),i=r.map(e=>({label:e.label,from:e.from,to:e.to}));if(i.length===0)return{columns:[],rows:[],max:0};let a=t.filter(e=>JL(e).length===r.length&&JL(e).every((e,t)=>e.label===r[t].label)),o=Math.max(0,...a.flatMap(e=>JL(e).map(e=>e.count)));return{columns:a.slice().sort((e,t)=>e.timestamp-t.timestamp).map(e=>({timestamp:e.timestamp,cells:JL(e).map(({count:e})=>({count:e,intensity:o>0?e/o:0}))})),rows:i,max:o}}var iR=V(`<div>No data in this window</div>`),aR=ua(`<line x1="0" stroke="var(--color-line-subtle)" stroke-width="1"></line><text x="-6" text-anchor="end" dominant-baseline="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`,1),oR=ua(`<text text-anchor="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`),sR=ua(`<path opacity="0.75" stroke="var(--color-surface)" stroke-width="0.5" data-testid="stack-band"></path>`),cR=ua(`<path opacity="0.15"></path>`),lR=ua(`<path fill="none" stroke-width="1.5" stroke-linejoin="round"></path>`),uR=ua(`<circle r="2.5"></circle>`),dR=ua(`<!><!>`,1),fR=ua(`<circle r="3.5" fill="var(--color-warning)" stroke="var(--color-surface)" stroke-width="1" role="button" tabindex="0" class="cursor-pointer"></circle>`),pR=ua(`<svg role="img"><g><!><!><!><!></g></svg>`);function mR(e,t){it(t,!0);let n=Z(t,`width`,3,640),r=Z(t,`height`,3,220),i=Z(t,`area`,3,!1),a=Z(t,`stacked`,3,!1),o={top:8,right:12,bottom:22,left:44},s=M(()=>Math.max(1,n()-o.left-o.right)),c=M(()=>Math.max(1,r()-o.top-o.bottom)),l=M(()=>t.series.map(e=>({...e,points:$L(e.points,400)}))),u=M(()=>z(l).filter(e=>!t.isolated?.size||t.isolated.has(e.seriesId))),d=M(()=>a()?tR(z(u).map(e=>e.points)):null),f=M(()=>{let e=z(u).flatMap(e=>e.points);if(e.length===0)return null;let t=e.map(e=>e.timestamp),n=z(d)?z(d).flatMap(e=>e.map(e=>e.y1)):e.map(e=>e.value??0),r=Math.min(...t),i=Math.max(...t),a=Math.min(0,...n),o=Math.max(...n);return{minTime:r,maxTime:i===r?r+1:i,minValue:a,maxValue:o===a?a+1:o}}),p=M(()=>z(f)?wL().domain([z(f).minTime,z(f).maxTime]).range([0,z(s)]):null),m=M(()=>z(f)?wL().domain([z(f).minValue,z(f).maxValue]).range([z(c),0]):null),h=M(()=>z(f)?QL(z(f).minValue,z(f).maxValue,4):[]),g=M(()=>z(f)?QL(z(f).minTime,z(f).maxTime,4):[]);function _(e){return!z(p)||!z(m)||e.length===0||e.length===1?null:BL().x(e=>z(p)(e.timestamp)).y(e=>z(m)(e.value??0))(e)}function v(e){return!z(p)||!z(m)||e.length<2?null:VL().x(e=>z(p)(e.timestamp)).y0(z(m)(Math.max(0,z(f)?.minValue??0))).y1(e=>z(m)(e.value??0))(e)}function y(e){return mg(e.seriesId).stroke}function b(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function x(e){return Math.abs(e)>=1e3?e.toLocaleString(void 0,{maximumFractionDigits:0}):String(Math.round(e*1e3)/1e3)}function S(e){return!z(p)||!z(m)||e.length<2?null:VL().x(e=>z(p)(e.timestamp)).y0(e=>z(m)(e.y0)).y1(e=>z(m)(e.y1))(e)}let C=M(()=>!z(p)||!z(m)?[]:z(u).flatMap(e=>e.points.flatMap(t=>(t.exemplars??[]).filter(e=>e.traceId).map(n=>({key:`${e.seriesId}:${n.timestamp}:${n.traceId}`,x:z(p)(n.timestamp||t.timestamp),y:z(m)(n.value),traceId:n.traceId,spanId:n.spanId,value:n.value})))));var w=da(),T=I(w),ee=e=>{var n=iR();R(e=>{q(n,1,e),co(n,`height:${r()??``}px`)},[()=>K(Q(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,n)},te=e=>{var a=pR(),l=F(a),f=F(l);G(f,16,()=>z(h),e=>e,(e,t)=>{let n=M(()=>z(m)?z(m)(t):0);var r=da(),i=I(r),a=e=>{var r=aR(),i=I(r),a=L(i),o=F(a,!0);D(a),R(e=>{J(i,`x2`,z(s)),J(i,`y1`,z(n)),J(i,`y2`,z(n)),J(a,`y`,z(n)),U(o,e)},[()=>x(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(c)&&e(a)}),H(e,r)});var w=L(f);G(w,16,()=>z(g),e=>e,(e,t)=>{let n=M(()=>z(p)?z(p)(t):0);var r=da(),i=I(r),a=e=>{var r=oR(),i=F(r,!0);D(r),R(e=>{J(r,`x`,z(n)),J(r,`y`,z(c)+14),U(i,e)},[()=>b(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(s)&&e(a)}),H(e,r)});var T=L(w),ee=e=>{var t=da();G(I(t),19,()=>z(u),e=>e.seriesId,(e,t,n)=>{let r=M(()=>S(z(d)[z(n)]));var i=da(),a=I(i),o=e=>{var n=sR();R(e=>{J(n,`d`,z(r)),J(n,`fill`,e)},[()=>y(z(t))]),H(e,n)};W(a,e=>{z(r)&&e(o)}),H(e,i)}),H(e,t)},te=e=>{var t=da();G(I(t),17,()=>z(u),e=>e.seriesId,(e,t)=>{let n=M(()=>_(z(t).points));var r=dR(),a=I(r),o=e=>{let n=M(()=>v(z(t).points));var r=da(),i=I(r),a=e=>{var r=cR();R(e=>{J(r,`d`,z(n)),J(r,`fill`,e)},[()=>y(z(t))]),H(e,r)};W(i,e=>{z(n)&&e(a)}),H(e,r)};W(a,e=>{i()&&e(o)});var s=L(a),c=e=>{var r=lR();R(e=>{J(r,`d`,z(n)),J(r,`stroke`,e)},[()=>y(z(t))]),H(e,r)},l=e=>{var n=uR();R((e,t,r)=>{J(n,`cx`,e),J(n,`cy`,t),J(n,`fill`,r)},[()=>z(p)?z(p)(z(t).points[0].timestamp):0,()=>z(m)?z(m)(z(t).points[0].value??0):0,()=>y(z(t))]),H(e,n)};W(s,e=>{z(n)?e(c):z(t).points.length===1&&e(l,1)}),H(e,r)}),H(e,t)};W(T,e=>{z(d)?e(ee):e(te,-1)}),G(L(T),17,()=>z(C),e=>e.key,(e,n)=>{var r=fR();R(e=>{J(r,`cx`,z(n).x),J(r,`cy`,z(n).y),J(r,`aria-label`,`Open trace ${z(n).traceId??``} (${e??``})`)},[()=>x(z(n).value)]),B(`click`,r,()=>t.onExemplar?.(z(n).traceId,z(n).spanId)),B(`keydown`,r,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t.onExemplar?.(z(n).traceId,z(n).spanId))}),H(e,r)}),D(l),D(a),R(e=>{J(a,`width`,n()),J(a,`height`,r()),J(a,`viewBox`,`0 0 ${n()??``} ${r()??``}`),J(a,`aria-label`,`Time series chart, ${z(u).length??``} series`),q(a,0,e),J(l,`transform`,`translate(${o.left??``},${o.top??``})`)},[()=>K(Q(`overflow-visible`,t.class))]),H(e,a)};W(T,e=>{z(f)?e(te,-1):e(ee)}),H(e,w),at()}na([`click`,`keydown`]);var hR=V(`<div>No bucket data on this point</div>`),gR=V(`<div class="flex-1 flex flex-col items-center justify-end h-full gap-1"><span class="text-[10px] text-fg-subtle tabular-nums"> </span> <div class="w-full rounded-t bg-accent/70 hover:bg-accent transition-colors"></div> <span class="text-[10px] text-fg-subtle truncate w-full text-center"> </span></div>`),_R=V(`<span><span class="text-fg-subtle"> </span> <span class="font-mono text-fg"> </span></span>`),vR=V(`<span class="ml-auto"><span class="text-fg-subtle">count</span> <span class="font-mono text-fg"> </span></span>`),yR=V(`<div><div class="flex items-end gap-1" role="img"></div> <div class="flex items-center gap-4 text-[11px] text-fg-muted border-t border-line pt-2"><!> <!></div></div>`);function bR(e,t){it(t,!0);let n=Z(t,`height`,3,160),r=M(()=>JL(t.point)),i=M(()=>Math.max(1,...z(r).map(e=>e.count))),a=M(()=>z(r).reduce((e,t)=>e+t.count,0)),o=M(()=>[.5,.9,.99].map(e=>({label:`p${e*100}`,value:XL(t.point,e)})));function s(e){if(e===void 0)return`—`;let n=Math.round(e*100)/100;return t.unit?`${n}${t.unit}`:String(n)}function c(e){return z(a)===0?`0%`:`${Math.round(e/z(a)*100)}%`}var l=da(),u=I(l),d=e=>{var r=hR();R(e=>{q(r,1,e),co(r,`height:${n()??``}px`)},[()=>K(Q(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,r)},f=e=>{var l=yR(),u=F(l);G(u,21,()=>z(r),e=>e.label,(e,t)=>{var n=gR(),r=F(n),a=F(r,!0);D(r);var o=L(r,2),s=L(o,2),l=F(s,!0);D(s),D(n),R(e=>{U(a,z(t).count),co(o,`height:${z(t).count/z(i)*100}%`),J(o,`title`,`${z(t).label??``}: ${z(t).count??``} (${e??``})`),U(l,z(t).label)},[()=>c(z(t).count)]),H(e,n)}),D(u);var d=L(u,2),f=F(d);G(f,17,()=>z(o),e=>e.label,(e,t)=>{var n=_R(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a,!0);D(a),D(n),R(e=>{U(i,z(t).label),U(o,e)},[()=>s(z(t).value)]),H(e,n)});var p=L(f,2),m=e=>{var n=vR(),r=L(F(n),2),i=F(r,!0);D(r),D(n),R(()=>U(i,t.point.count)),H(e,n)};W(p,e=>{t.point.count!==void 0&&e(m)}),D(d),D(l),R(e=>{q(l,1,e),co(u,`height:${n()??``}px`),J(u,`aria-label`,`Histogram, ${z(r).length??``} buckets, ${z(a)??``} observations`)},[()=>K(Q(`flex flex-col gap-2`,t.class))]),H(e,l)};W(u,e=>{z(r).length===0?e(d):e(f,-1)}),H(e,l),at()}var xR=V(`<div>No bucketed data in this window</div>`),SR=V(`<span class="ml-0.5"> </span>`),CR=V(`<div class="text-[10px] text-fg-subtle flex items-center justify-end"> <!></div>`),wR=V(`<button type="button" class="w-full rounded-[1px] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent"></button>`),TR=V(`<div class="flex-1 min-w-[8px] flex flex-col gap-px"></div>`),ER=V(`<div><div class="flex" role="img"><div class="shrink-0 pr-2 text-right"></div> <div class="flex-1 min-w-0 overflow-x-auto"><div class="flex gap-px h-full"></div></div></div> <div class="flex items-center gap-2 text-[10px] text-fg-subtle pl-2"><span> </span> <span class="flex-1 border-t border-line-subtle"></span> <span> </span> <span class="ml-2"> </span></div></div>`);function DR(e,t){it(t,!0);let n=Z(t,`rowHeight`,3,22),r=M(()=>rR(t.points));function i(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function a(e){return e===0?`background: var(--color-subtle)`:`background: color-mix(in oklch, var(--color-accent) ${(.12+e*.88)*100}%, transparent)`}var o=da(),s=I(o),c=e=>{var n=xR();R(e=>q(n,1,e),[()=>K(Q(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded p-6`,t.class))]),H(e,n)},l=e=>{var o=ER(),s=F(o),c=F(s);G(c,21,()=>[...z(r).rows].reverse(),e=>e.label,(e,r)=>{var i=CR(),a=F(i,!0),o=L(a),s=e=>{var n=SR(),r=F(n,!0);D(n),R(()=>U(r,t.unit)),H(e,n)};W(o,e=>{t.unit&&e(s)}),D(i),R(()=>{co(i,`height:${n()??``}px`),U(a,z(r).label)}),H(e,i)}),D(c);var l=L(c,2),u=F(l);G(u,21,()=>z(r).columns,e=>e.timestamp,(e,o)=>{var s=TR();G(s,21,()=>[...z(o).cells].reverse(),Aa,(e,s,c)=>{let l=M(()=>z(o).cells.length-1-c);var u=wR();R((e,i,a)=>{co(u,`height:${n()??``}px; ${e??``}`),J(u,`title`,`${z(r).rows[z(l)].label??``}${t.unit??``??``} at ${i??``}: ${z(s).count??``}`),J(u,`aria-label`,`${z(r).rows[z(l)].label??``} at ${a??``}: ${z(s).count??``} observations`)},[()=>a(z(s).intensity),()=>i(z(o).timestamp),()=>i(z(o).timestamp)]),B(`click`,u,()=>t.onCell?.(z(o).timestamp,z(l))),H(e,u)}),D(s),H(e,s)}),D(u),D(l),D(s);var d=L(s,2),f=F(d),p=F(f,!0);D(f);var m=L(f,4),h=F(m,!0);D(m);var g=L(m,2),_=F(g);D(g),D(d),D(o),R((e,t,n)=>{q(o,1,e),J(s,`aria-label`,`Distribution heatmap, ${z(r).rows.length??``} buckets over ${z(r).columns.length??``} intervals, busiest cell ${z(r).max??``}`),U(p,t),U(h,n),U(_,`busiest ${z(r).max??``}`)},[()=>K(Q(`flex flex-col gap-1`,t.class)),()=>i(z(r).columns[0].timestamp),()=>i(z(r).columns[z(r).columns.length-1].timestamp)]),H(e,o)};W(s,e=>{z(r).columns.length===0?e(c):e(l,-1)}),H(e,o),at()}na([`click`]);var OR=V(`<div>No bucketed data in this window</div>`),kR=ua(`<line x1="0" stroke="var(--color-line-subtle)"></line><text x="-6" text-anchor="end" dominant-baseline="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`,1),AR=ua(`<text text-anchor="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`),jR=ua(`<path fill="var(--color-accent)"></path>`),MR=ua(`<path fill="none" stroke="var(--color-accent)" stroke-width="1.25"></path>`),NR=V(`<span><span class="text-fg-subtle"> </span> <span class="font-mono text-fg ml-1"> </span></span>`),PR=V(`<div><svg role="img" class="overflow-visible"><g><!><!><!><!></g></svg> <div class="flex items-center gap-4 text-[11px] border-t border-line pt-2"></div></div>`);function FR(e,t){it(t,!0);let n=Z(t,`quantiles`,19,()=>[.5,.9,.99]),r=Z(t,`width`,3,640),i=Z(t,`height`,3,220),a={top:8,right:12,bottom:22,left:48},o=M(()=>Math.max(1,r()-a.left-a.right)),s=M(()=>Math.max(1,i()-a.top-a.bottom)),c=M(()=>[...n()].sort((e,t)=>e-t)),l=M(()=>nR(t.points,z(c))),u=M(()=>{let e=z(l).flatMap(e=>e.points);if(e.length===0)return null;let t=e.map(e=>e.timestamp),n=e.map(e=>e.value),r=Math.min(...t),i=Math.max(...t),a=Math.max(...n);return{minTime:r,maxTime:i===r?r+1:i,maxValue:a===0?1:a}}),d=M(()=>z(u)?wL().domain([z(u).minTime,z(u).maxTime]).range([0,z(o)]):null),f=M(()=>z(u)?wL().domain([0,z(u).maxValue]).range([z(s),0]):null),p=M(()=>z(u)?QL(0,z(u).maxValue,4):[]),m=M(()=>z(u)?QL(z(u).minTime,z(u).maxTime,4):[]);function h(e){return!z(d)||!z(f)||e.points.length<2?null:VL().x(e=>z(d)(e.timestamp)).y0(z(s)).y1(e=>z(f)(e.value))(e.points)}function g(e){return!z(d)||!z(f)||e.points.length<2?null:BL().x(e=>z(d)(e.timestamp)).y(e=>z(f)(e.value))(e.points)}function _(e){return .3-e*.08}function v(e){return`p${Math.round(e*100)}`}function y(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`})}function b(e){let n=Math.round(e*10)/10;return t.unit?`${n}${t.unit}`:String(n)}let x=M(()=>z(l).map(e=>({quantile:e.quantile,value:e.points[e.points.length-1]?.value})));var S=da(),C=I(S),w=e=>{var n=OR();R(e=>{q(n,1,e),co(n,`height:${i()??``}px`)},[()=>K(Q(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,n)},T=e=>{var n=PR(),u=F(n),S=F(u),C=F(S);G(C,16,()=>z(p),e=>e,(e,t)=>{let n=M(()=>z(f)?z(f)(t):0);var r=da(),i=I(r),a=e=>{var r=kR(),i=I(r),a=L(i),s=F(a,!0);D(a),R(e=>{J(i,`x2`,z(o)),J(i,`y1`,z(n)),J(i,`y2`,z(n)),J(a,`y`,z(n)),U(s,e)},[()=>b(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(s)&&e(a)}),H(e,r)});var w=L(C);G(w,16,()=>z(m),e=>e,(e,t)=>{let n=M(()=>z(d)?z(d)(t):0);var r=da(),i=I(r),a=e=>{var r=AR(),i=F(r,!0);D(r),R(e=>{J(r,`x`,z(n)),J(r,`y`,z(s)+14),U(i,e)},[()=>y(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(o)&&e(a)}),H(e,r)});var T=L(w);G(T,19,()=>[...z(l)].reverse(),e=>e.quantile,(e,t,n)=>{let r=M(()=>h(z(t)));var i=da(),a=I(i),o=e=>{var i=jR();R((e,t)=>{J(i,`d`,z(r)),J(i,`opacity`,e),J(i,`data-testid`,`band-${t??``}`)},[()=>_(z(l).length-1-z(n)),()=>v(z(t).quantile)]),H(e,i)};W(a,e=>{z(r)&&e(o)}),H(e,i)}),G(L(T),17,()=>z(l),e=>e.quantile,(e,t)=>{let n=M(()=>g(z(t)));var r=da(),i=I(r),a=e=>{var r=MR();R(e=>{J(r,`d`,z(n)),J(r,`data-testid`,`line-${e??``}`)},[()=>v(z(t).quantile)]),H(e,r)};W(i,e=>{z(n)&&e(a)}),H(e,r)}),D(S),D(u);var ee=L(u,2);G(ee,21,()=>z(x),e=>e.quantile,(e,t)=>{var n=NR(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a,!0);D(a),D(n),R((e,t)=>{U(i,e),U(o,t)},[()=>v(z(t).quantile),()=>z(t).value===void 0?`—`:b(z(t).value)]),H(e,n)}),D(ee),D(n),R((e,t)=>{q(n,1,e),J(u,`width`,r()),J(u,`height`,i()),J(u,`viewBox`,`0 0 ${r()??``} ${i()??``}`),J(u,`aria-label`,`Percentile bands: ${t??``}`),J(S,`transform`,`translate(${a.left??``},${a.top??``})`)},[()=>K(Q(`flex flex-col gap-2`,t.class)),()=>z(c).map(v).join(`, `)]),H(e,n)};W(C,e=>{z(u)?e(T,-1):e(w)}),H(e,S),at()}var IR=V(`<button type="button"><!> </button>`),LR=V(`<div class="flex rounded border border-line overflow-hidden" role="group" aria-label="Chart type"></div>`),RR=V(`<option> </option>`),zR=V(`<label class="flex items-center gap-1.5 text-[11px] text-fg-muted cursor-pointer" title="Show cumulative or delta counter change per second"><input type="checkbox" class="w-3 h-3 rounded border-line"/> Rate</label>`),BR=V(`<label class="flex items-center gap-1.5 text-[11px] text-fg-muted cursor-pointer" title="Stack the series so each sits on the sum of those below"><input type="checkbox" class="w-3 h-3 rounded border-line"/> <!> Stack</label>`),VR=V(`<label class="flex items-center gap-1 text-[11px] text-fg-muted"><span class="text-fg-subtle">Summarise</span> <select aria-label="Summary statistic" class="rounded border border-line bg-surface px-1.5 py-1 text-[11px] text-fg"></select></label> <!> <!>`,1),HR=V(`<div><!> <!></div>`);function UR(e,t){it(t,!0);let n=M(()=>t.kind===`histogram`||t.kind===`exponentialHistogram`),r=M(()=>t.kind!==`gauge`),i=M(()=>t.kind===`sum`),a=[{id:`timeseries`,label:`Time series`,icon:Hh},{id:`percentiles`,label:`Percentiles`,icon:gp},{id:`heatmap`,label:`Heatmap`,icon:gm}],o=M(()=>z(n)?a:a.filter(e=>e.id===`timeseries`)),s=[{id:`sum`,label:`Sum`},{id:`avg`,label:`Avg`},{id:`min`,label:`Min`},{id:`max`,label:`Max`},{id:`last`,label:`Last`},{id:`count`,label:`Count`}];var c=HR(),l=F(c),u=e=>{var n=LR();G(n,21,()=>z(o),e=>e.id,(e,n)=>{let r=M(()=>z(n).icon);var i=IR(),a=F(i);Ba(a,()=>z(r),(e,t)=>{t(e,{size:11})});var o=L(a);D(i),R(e=>{J(i,`aria-pressed`,t.mode===z(n).id),J(i,`title`,z(n).label),q(i,1,e),U(o,` ${z(n).label??``}`)},[()=>K(Q(`flex items-center gap-1 px-2 py-1 text-[11px] transition-colors`,`focus-visible:outline-none focus-visible:bg-hover`,t.mode===z(n).id?`bg-selected text-fg font-medium`:`text-fg-muted hover:bg-hover`))]),B(`click`,i,()=>t.onMode(z(n).id)),H(e,i)}),D(n),H(e,n)};W(l,e=>{z(o).length>1&&e(u)});var d=L(l,2),f=e=>{var n=VR(),a=I(n),o=L(F(a),2);G(o,21,()=>s,e=>e.id,(e,t)=>{var n=RR(),r=F(n,!0);D(n);var i={};R(()=>{U(r,z(t).label),i!==(i=z(t).id)&&(n.value=(n.__value=z(t).id)??``)}),H(e,n)}),D(o);var c;uo(o),D(a);var l=L(a,2),u=e=>{var n=zR(),r=F(n);Co(r),Ke(),D(n),R(()=>To(r,t.rate)),B(`change`,r,e=>t.onRate(e.currentTarget.checked)),H(e,n)};W(l,e=>{z(i)&&e(u)});var d=L(l,2),f=e=>{var n=BR(),r=F(n);Co(r),wm(L(r,2),{size:11}),Ke(),D(n),R(()=>To(r,t.stacked)),B(`change`,r,e=>t.onStacked(e.currentTarget.checked)),H(e,n)};W(d,e=>{z(r)&&e(f)}),R(()=>{c!==(c=t.aggregate)&&(o.value=(o.__value=t.aggregate)??``,lo(o,t.aggregate))}),B(`change`,o,e=>t.onAggregate(e.currentTarget.value)),H(e,n)};W(d,e=>{t.mode===`timeseries`&&e(f)}),D(c),R(e=>q(c,1,e),[()=>K(Q(`flex items-center gap-3 flex-wrap`,t.class))]),H(e,c),at()}na([`click`,`change`]);var WR=V(`<button type="button" title="Delete this metric stream" aria-label="Delete selected metric" class="p-1.5 hover:bg-danger-bg rounded transition-colors text-fg-subtle hover:text-danger"><!></button>`),GR=V(`<div role="alert" class="m-4 rounded border border-danger-border bg-danger-bg px-3 py-2 text-xs text-danger"> </div>`),KR=V(`<div class="flex-1 flex items-center justify-center text-sm text-fg-subtle">No metrics received yet. Point an OTLP exporter at this server.</div>`),qR=V(`<span> </span>`),JR=V(`<button type="button" role="option"><div class="flex items-center justify-between gap-2"><span class="text-xs font-medium text-fg truncate"> </span> <!></div> <div class="mt-0.5 flex items-center gap-2 text-[10px] text-fg-subtle"><span class="uppercase tracking-wide"> </span> <!> <span> </span></div></button>`),YR=V(`<div class="p-3 text-xs text-fg-subtle">No metric matches that filter.</div>`),XR=V(`<div class="text-sm text-fg-subtle">Select a metric.</div>`),ZR=V(`<p class="text-xs text-fg-muted mt-0.5"> </p>`),QR=V(`<div class="text-xs text-fg-subtle">No data for this metric in the selected window.</div>`),$R=V(`<button type="button"><span class="w-2.5 h-2.5 rounded-sm shrink-0"></span> <span class="truncate text-fg-muted font-mono"> </span> <span class="ml-auto font-mono text-fg tabular-nums"> </span></button>`),ez=V(`<div class="mt-3 border-t border-line pt-2 space-y-1" role="group" aria-label="Series"></div>`),tz=V(`<div class="mb-3"><h4 class="text-sm font-semibold text-fg"> </h4> <!></div> <!> <!> <!>`,1),nz=V(`<div class="flex-1 flex min-h-0"><div class="w-72 shrink-0 border-r border-line flex flex-col min-h-0"><div class="p-2 border-b border-line"><!></div> <div class="flex-1 overflow-auto" role="listbox" aria-label="Metrics"><!> <!></div></div> <div class="flex-1 min-w-0 overflow-auto p-4"><!></div></div>`),rz=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between px-4 py-2 border-b border-line gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg shrink-0"><!> Metrics</h3> <!> <div class="flex items-center gap-1"><!> <button type="button" title="Refresh" aria-label="Refresh metrics" class="p-1.5 hover:bg-hover rounded transition-colors text-fg-subtle"><!></button></div></div> <!> <!></div>`);function iz(e,t){it(t,!0);function n(){let e=pl.value;return(e?$o(e):null)??globalThis.location.origin}let r=N(yr([])),i=N(null),a=N(yr([])),o=N(null),s=N(!1),c=N(``),l=M(()=>ml.value),u=N(yr(new Set)),d=N(`timeseries`),f=N(`sum`),p=N(!1),m=N(!0),h=()=>({fetch:globalThis.fetch.bind(globalThis),baseUrl:n()});async function g(e=z(c)){let t=await _F(h(),e);t.status===`ok`?(P(r,t.data,!0),P(o,null),!z(i)&&z(r).length>0&&v(z(r)[0].name)):t.status===`error`&&P(o,t.message,!0)}async function _(e){P(s,!0);let t=await vF({name:e,window:Ms(Es(ml.value,Date.now()))},h());t.status!==`aborted`&&(P(s,!1),t.status===`ok`?(P(a,t.data,!0),P(o,null)):P(o,t.message,!0))}function v(e){P(i,e,!0),P(u,new Set,!0),P(d,`timeseries`),P(f,`sum`),P(p,!1),_(e)}function y(){g(),z(i)&&_(z(i))}function b(e){ml.value=e,z(i)&&_(z(i))}function x(e,t){Nu(e),Wc(e,t),Mu(`traces`)}function S(e){let t=new Set(z(u));t.has(e)?t.delete(e):t.add(e),P(u,t,!0)}async function C(){if(!z(i)||!globalThis.confirm(`Delete every stored series for “${z(i)}”?`))return;let e=await yF(z(i),h());if(e.status!==`ok`){e.status===`error`&&P(o,e.message,!0);return}P(i,null),P(a,[],!0),await g(``)}zr(()=>{let e=z(c),t=setTimeout(()=>void g(e),200);return()=>clearTimeout(t)});let w=M(()=>z(r).find(e=>e.name===z(i))),T=M(()=>z(w)?.kind===`histogram`||z(w)?.kind===`exponentialHistogram`),ee=M(()=>z(a).map(e=>({...e,points:z(m)?GL(e.points,e.temporality):e.points}))),te=M(()=>z(a).flatMap(e=>e.points).sort((e,t)=>e.timestamp-t.timestamp)),ne=M(()=>z(r)),re=M(()=>z(a).map(e=>({id:e.seriesId,color:mg(e.seriesId).stroke,label:ie(e),value:ZL(z(m)?GL(e.points,e.temporality):e.points,e.kind===`gauge`?`last`:z(f))})));function ie(e){let t=Object.entries(e.attributes),n=Object.entries(e.resource??{}).filter(([e])=>e!==`service.name`);return[...t,...n].map(([e,t])=>`${e}=${String(t)}`).join(` `)||e.service}function ae(e,t){return e===void 0?`—`:`${(Math.round(e*100)/100).toLocaleString(void 0,{maximumFractionDigits:2})}${t&&t!==`1`?` ${t}`:``}${z(m)&&z(w)?.kind===`sum`?`/s`:``}`}var oe=rz(),se=F(oe),ce=F(se);vp(F(ce),{size:16}),Ke(),D(ce);var le=L(ce,2);_A(le,{get selection(){return z(l)},onChange:b});var E=L(le,2),ue=F(E),de=e=>{var t=WR();Bh(F(t),{size:14}),D(t),B(`click`,t,C),H(e,t)};W(ue,e=>{z(i)&&e(de)});var fe=L(ue,2),pe=F(fe);{let e=M(()=>z(s)?`animate-spin`:``);fh(pe,{size:14,get class(){return z(e)}})}D(fe),D(E),D(se);var me=L(se,2),he=e=>{var t=GR(),n=F(t,!0);D(t),R(()=>U(n,z(o))),H(e,t)};W(me,e=>{z(o)&&e(he)});var ge=L(me,2),_e=e=>{H(e,KR())},ve=e=>{var t=nz(),n=F(t),r=F(n);I_(F(r),{get value(){return z(c)},onValue:e=>P(c,e,!0),placeholder:`Filter metrics…`,ariaLabel:`Filter metrics`}),D(r);var o=L(r,2),s=F(o);G(s,17,()=>z(ne),e=>e.name+e.kind,(e,t)=>{var n=JR(),r=F(n),o=F(r),s=F(o,!0);D(o);var c=L(o,2),l=e=>{{let n=M(()=>z(m)?GL(z(a)[0].points,z(a)[0].temporality):z(a)[0].points);WL(e,{get points(){return z(n)},width:48,height:14,get ariaLabel(){return`${z(t).name??``} trend`}})}};W(c,e=>{z(t).name===z(i)&&z(a).length>0&&e(l)}),D(r);var u=L(r,2),d=F(u),f=F(d,!0);D(d);var p=L(d,2),h=e=>{var n=qR(),r=F(n,!0);D(n),R(()=>U(r,z(t).unit)),H(e,n)};W(p,e=>{z(t).unit&&z(t).unit!==`1`&&e(h)});var g=L(p,2),_=F(g);D(g),D(u),D(n),R(e=>{J(n,`aria-selected`,z(t).name===z(i)),q(n,1,e),U(s,z(t).name),U(f,z(t).kind),U(_,`${z(t).seriesCount??``}
|
|
29
|
-
series`)},[()=>K(Q(`w-full text-left px-3 py-2 border-b border-line-subtle hover:bg-hover`,`focus-visible:outline-none focus-visible:bg-hover`,z(t).name===z(i)&&`bg-selected`))]),B(`click`,n,()=>v(z(t).name)),H(e,n)});var l=L(s,2),h=e=>{H(e,YR())};W(l,e=>{z(ne).length===0&&e(h)}),D(o),D(n);var g=L(n,2),_=F(g),y=e=>{H(e,XR())},b=e=>{var t=tz(),n=I(t),r=F(n),i=F(r,!0);D(r);var o=L(r,2),s=e=>{var t=ZR(),n=F(t,!0);D(t),R(()=>U(n,z(w).description)),H(e,t)};W(o,e=>{z(w).description&&e(s)}),D(n);var c=L(n,2);UR(c,{get kind(){return z(w).kind},get mode(){return z(d)},onMode:e=>P(d,e,!0),get aggregate(){return z(f)},onAggregate:e=>P(f,e,!0),get stacked(){return z(p)},onStacked:e=>P(p,e,!0),get rate(){return z(m)},onRate:e=>P(m,e,!0),class:`mb-3`});var l=L(c,2),h=e=>{H(e,QR())},g=e=>{DR(e,{get points(){return z(te)},get unit(){return z(w).unit}})},_=e=>{FR(e,{get points(){return z(te)},get unit(){return z(w).unit}})},v=e=>{bR(e,{get point(){return z(te)[z(te).length-1]},get unit(){return z(w).unit}})},y=e=>{{let t=M(()=>z(ee).length===1&&!z(p));mR(e,{get series(){return z(ee)},get isolated(){return z(u)},get stacked(){return z(p)},get area(){return z(t)},onExemplar:x})}};W(l,e=>{z(a).length===0?e(h):z(d)===`heatmap`?e(g,1):z(d)===`percentiles`?e(_,2):z(T)?e(v,3):e(y,-1)});var b=L(l,2),C=e=>{var t=ez();G(t,21,()=>z(re),e=>e.id,(e,t)=>{var n=$R(),r=F(n),i=L(r,2),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(n),R((e,i,o)=>{J(n,`aria-pressed`,e),q(n,1,i),co(r,`background:${z(t).color??``}`),U(a,z(t).label),U(s,o)},[()=>z(u).has(z(t).id),()=>K(Q(`w-full flex items-center gap-2 px-1 py-0.5 rounded text-[11px] hover:bg-hover`,`focus-visible:outline-none focus-visible:bg-hover`,z(u).size>0&&!z(u).has(z(t).id)&&`opacity-40`)),()=>ae(z(t).value,z(w).unit)]),B(`click`,n,()=>S(z(t).id)),H(e,n)}),D(t),H(e,t)};W(b,e=>{z(a).length>0&&z(d)===`timeseries`&&e(C)}),R(()=>U(i,z(w).name)),H(e,t)};W(_,e=>{z(w)?e(b,-1):e(y)}),D(g),D(t),H(e,t)};W(ge,e=>{z(r).length===0?e(_e):e(ve,-1)}),D(oe),B(`click`,fe,y),H(e,oe),at()}na([`click`]);function az(e){let t=e.severityNumber,n=(e.severityText??``).toUpperCase();return n===`ERROR`||t!==void 0&&t>=17?`error`:n===`WARN`||n===`WARNING`||t!==void 0&&t>=13?`warn`:`info`}function oz(e){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function sz(e){try{return JSON.stringify({body:e.body,severity:e.severityText??null,severityNumber:e.severityNumber??null,timestamp:e.timestamp,traceId:e.traceId??null,attributes:e.attributes??{}},null,2)}catch{return oz(e.body)}}function cz(e,t,n){if(n!==`all`){let t=az(e);if(n===`error`&&t!==`error`||n===`warn`&&t!==`warn`&&t!==`error`||n===`info`&&t!==`info`)return!1}return L_(t.toLowerCase(),[oz(e.body),e.severityText,e.resourceName,e.traceId])}function lz(e){let t=az(e);return t===`error`?`text-danger`:t===`warn`?`text-warning`:`text-fg-subtle`}function uz(e){let t=az(e);return t===`error`?`bg-danger`:t===`warn`?`bg-warning`:`bg-line`}function dz(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function fz(e){try{return JSON.stringify(e.attributes??{},null,2)}catch{return`{}`}}var pz=V(`<span class="flex-shrink-0 text-fg-subtle truncate max-w-[10rem]"> </span>`),mz=V(`<button type="button" title="Go to trace" aria-label="Go to trace" class="flex-shrink-0 inline-flex items-center justify-center p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity"><!></button>`),hz=V(`<div class="font-mono text-xs break-words whitespace-pre-wrap pr-6"> </div>`),gz=V(`<pre class="font-mono text-[11px] text-fg-muted whitespace-pre-wrap break-words pr-6"> </pre>`),_z=V(`<div class="flex items-center gap-1"><button type="button" class="inline-flex items-center gap-1 text-xs text-fg-muted hover:underline"><!> Go to trace</button> <!></div>`),vz=V(`<div class="pl-3 pr-2 pb-2 space-y-2"><!> <!> <!></div>`),yz=V(`<div class="group relative flex flex-col border-b border-line-subtle hover:bg-hover"><span aria-hidden="true"></span> <div class="flex items-center gap-2 pl-3 pr-2 py-1 text-xs"><button type="button" class="flex flex-1 items-center gap-2 min-w-0 text-left"><span class="font-mono tabular-nums text-fg-subtle flex-shrink-0"> </span> <span> </span> <span class="font-mono text-fg truncate min-w-0 flex-1"> </span> <!></button> <!> <!></div> <!></div>`),bz=V(`<button class="px-2 py-1 text-xs rounded text-fg-subtle hover:bg-hover transition-colors" title="Drop buffered logs received while paused">Drop buffer</button>`),xz=V(`<div class="text-center text-fg-subtle text-sm py-12">Loading logs…</div>`),Sz=V(`<div class="text-center text-fg-subtle text-sm py-12">No logs yet. Send logs via AutotelLogExporter or POST /ingest/logs.</div>`),Cz=V(`<div class="text-center text-fg-subtle text-sm py-12">No logs match the current filter.</div>`),wz=V(`<div class="px-4 py-3 text-center text-xs text-fg-subtle"> </div>`),Tz=V(`<!> <!>`,1),Ez=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3> <div class="flex items-center gap-1"><button><!> </button> <!></div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!> <!> <select class="text-xs border border-line rounded px-1.5 py-1 bg-surface text-fg-muted"><option>All</option><option>Errors</option><option>Warn+</option><option>Info</option></select></div> <div class="flex-1 overflow-auto space-y-0"><!></div></div>`);function Dz(e,t){it(t,!0);let n=(e,t=p)=>{let n=M(()=>oz(t().body)),r=M(()=>lz(t())),i=M(()=>uz(t())),a=M(()=>z(c).has(t().id));var o=yz(),s=F(o),u=L(s,2),d=F(u),f=F(d),m=F(f,!0);D(f);var h=L(f,2),g=F(h,!0);D(h);var _=L(h,2),v=F(_,!0);D(_);var b=L(_,2),x=e=>{var n=pz(),r=F(n,!0);D(n),R(()=>U(r,t().resourceName)),H(e,n)};W(b,e=>{t().resourceName&&e(x)}),D(d);var S=L(d,2),C=e=>{var n=mz();Om(F(n),{size:12}),D(n),B(`click`,n,()=>y(t())),H(e,n)};W(S,e=>{t().traceId&&e(C)});var w=L(S,2);{let e=M(()=>sz(t()));Z_(w,{get value(){return z(e)},label:`Copy log as JSON`,class:`flex-shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`})}D(u);var T=L(u,2),ee=e=>{var r=vz(),i=F(r);N_(i,{get content(){return z(n)},children:(e,t)=>{var r=hz(),i=F(r,!0);D(r),R(()=>U(i,z(n))),H(e,r)},$$slots:{default:!0}});var a=L(i,2),o=e=>{{let n=M(()=>fz(t()));N_(e,{get content(){return z(n)},children:(e,n)=>{var r=gz(),i=F(r,!0);D(r),R(e=>U(i,e),[()=>fz(t())]),H(e,r)},$$slots:{default:!0}})}},s=M(()=>t().attributes&&Object.keys(t().attributes).length>0);W(a,e=>{z(s)&&e(o)});var c=L(a,2),l=e=>{var n=_z(),r=F(n);Om(F(r),{size:12}),Ke(),D(r),Z_(L(r,2),{get value(){return t().traceId},label:`Copy trace ID`}),D(n),B(`click`,r,()=>y(t())),H(e,n)};W(c,e=>{t().traceId&&e(l)}),D(r),H(e,r)};W(T,e=>{z(a)&&e(ee)}),D(o),R((e,r,i)=>{q(s,1,e),J(d,`aria-expanded`,z(a)),J(d,`title`,z(a)?`Collapse log`:`Expand log`),U(m,r),q(h,1,i),U(g,t().severityText??`LOG`),U(v,z(n))},[()=>K(Q(`absolute inset-y-0 left-0 w-0.5`,z(i))),()=>dz(t().timestamp),()=>K(Q(`flex-shrink-0 font-medium uppercase tracking-wide text-[10px]`,z(r)))]),B(`click`,d,()=>l(t().id)),H(e,o)},r=M(()=>ql.value),i=M(()=>wl.value),a=M(()=>Ol.value),o=N(``),s=N(`all`),c=N(yr(new Set));function l(e){let t=new Set(z(c));t.has(e)?t.delete(e):t.add(e),P(c,t,!0)}let u=RA({client:{fetch:globalThis.fetch.bind(globalThis),baseUrl:()=>(pl.value?$o(pl.value):null)??globalThis.location.origin}});zr(()=>()=>u.dispose());let d=N(null),f=N(yr([]));zr(()=>{let e=(pl.value?$o(pl.value):null)??globalThis.location.origin;e!==z(d)&&(P(d,e,!0),bA(`logs`,{fetch:globalThis.fetch.bind(globalThis),baseUrl:e}).then(e=>P(f,e,!0)),u.refresh())});let m=N(0);zr(()=>{let e=z(r).length;e>z(m)&&u.arrived(e-z(m)),P(m,e,!0)});let h=M(()=>u.results.value),g=M(()=>{let e=u.ready.value&&u.failure.value===null,t=z(r);return e&&(t=z(o).length>0?z(h):_(z(h),z(r))),t.filter(t=>cz(t,e?``:z(o),z(s)))});function _(e,t){let n=new Set(e.map(e=>e.id));return[...e,...t.filter(e=>!n.has(e.id))]}let v=M(()=>z(o).length>0||z(s)!==`all`);function y(e){e.traceId&&(Nu(e.traceId),Mu(`traces`))}var b=Ez(),x=F(b),S=F(x),C=F(S);nm(C,{size:16});var w=L(C);D(S);var T=L(S,2),ee=F(T),te=F(ee),ne=e=>{ih(e,{size:12})},re=e=>{eh(e,{size:12})};W(te,e=>{z(i)?e(ne):e(re,-1)});var ie=L(te);D(ee);var ae=L(ee,2),oe=e=>{var t=bz();B(`click`,t,function(...e){Ou?.apply(this,e)}),H(e,t)};W(ae,e=>{z(i)&&z(a)>0&&e(oe)}),D(T),D(x);var se=L(x,2),ce=F(se);Ab(ce,{get value(){return u.text.value},onInput:e=>{u.setText(e),P(o,e,!0)},onSubmit:()=>u.submit(),get serverErrors(){return u.errors.value},get fields(){return z(f)},placeholder:`Filter — e.g. severity_number >= 17 AND service = api`,class:`flex-1`});var le=L(ce,2);_A(le,{get selection(){return u.window.value},onChange:e=>u.setWindow(e)});var E=L(le,2);yA(E,{get count(){return u.pending},get live(){return u.live},onResume:()=>{P(o,``),u.resume()}});var ue=L(E,2),de=F(ue);de.value=de.__value=`all`;var fe=L(de);fe.value=fe.__value=`error`;var pe=L(fe);pe.value=pe.__value=`warn`;var me=L(pe);me.value=me.__value=`info`,D(ue);var he;uo(ue),D(se);var ge=L(se,2),_e=F(ge),ve=e=>{H(e,xz())},ye=e=>{H(e,Sz())},be=e=>{H(e,Cz())},xe=e=>{var t=Tz(),r=I(t);G(r,17,()=>z(g),e=>e.id,(e,t)=>{n(e,()=>z(t))});var i=L(r,2),a=e=>{var t=wz(),n=F(t,!0);D(t),Qa(t,(e,t)=>zA?.(e,t),()=>({onReach:()=>u.loadMore(),disabled:u.loading.value})),R(()=>U(n,u.loading.value?`Loading…`:`Scroll for more`)),H(e,t)};W(i,e=>{u.nextCursor.value&&e(a)}),H(e,t)};W(_e,e=>{u.loading.value&&!u.ready.value&&z(r).length===0?e(ve):z(g).length===0&&!z(v)?e(ye,1):z(g).length===0?e(be,2):e(xe,-1)}),D(ge),D(b),R(e=>{U(w,` Logs (${z(g).length??``})`),q(ee,1,e),J(ee,`title`,z(i)?`Resume live tail`:`Pause live tail`),U(ie,` ${z(i)?`Resume${z(a)>0?` (+${z(a)})`:``}`:`Pause`}`),he!==(he=z(s))&&(ue.value=(ue.__value=z(s))??``,lo(ue,z(s)))},[()=>K(Q(`flex items-center gap-1 px-2 py-1 text-xs rounded transition-colors`,z(i)?`bg-warning-bg text-warning hover:bg-warning-bg`:`hover:bg-hover text-fg-muted`))]),B(`click`,ee,function(...e){Du?.apply(this,e)}),B(`change`,ue,e=>P(s,e.currentTarget.value,!0)),H(e,b),at()}na([`click`,`change`]);var Oz=V(`<p class="p-3 text-xs text-fg-muted">No stack frames on this error.</p>`),kz=V(`<button type="button"><span class="font-mono text-xs text-fg"> </span> <span class="font-mono text-[11px] text-fg-subtle"> </span></button>`),Az=V(`<div class="flex flex-col items-start gap-0.5 px-3 py-2"><span class="flex items-center gap-2"><span class="font-mono text-xs text-fg-muted"> </span> <span class="rounded bg-subtle px-1.5 py-0.5 text-[10px] text-fg-subtle"> </span></span> <span class="font-mono text-[11px] text-fg-muted"> </span></div>`),jz=V(`<li><!></li>`),Mz=V(`<ol class="divide-y divide-line-subtle"></ol>`);function Nz(e,t){it(t,!0);let n=Z(t,`selected`,3,null),r={dependency:`node_modules`,native:`runtime`};function i(e){return`${e.file}:${e.line}:${e.column}`}function a(e){return n()!==null&&n().file===e.file&&n().line===e.line&&n().column===e.column}var o=da(),s=I(o),c=e=>{H(e,Oz())},l=e=>{var n=Mz();G(n,21,()=>t.frames,Aa,(e,n)=>{let o=M(()=>z(n).kind===`app`?null:r[z(n).kind]);var s=jz(),c=F(s),l=e=>{var r=kz(),o=F(r),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(r),R((e,t)=>{q(r,1,e),U(s,z(n).function??`(anonymous)`),U(l,t)},[()=>K(Q(`flex w-full flex-col items-start gap-0.5 px-3 py-2 text-left transition-colors hover:bg-hover`,a(z(n))&&`bg-subtle border-l-2 border-accent`)),()=>i(z(n))]),B(`click`,r,()=>t.onselect?.(z(n))),H(e,r)},u=e=>{var t=Az(),r=F(t),a=F(r),s=F(a,!0);D(a);var c=L(a,2),l=F(c,!0);D(c),D(r);var u=L(r,2),d=F(u,!0);D(u),D(t),R(e=>{U(s,z(n).function??`(anonymous)`),U(l,z(o)),U(d,e)},[()=>i(z(n))]),H(e,t)};W(c,e=>{z(n).kind===`app`?e(l):e(u,-1)}),D(s),H(e,s)}),D(n),H(e,n)};W(s,e=>{t.frames.length===0?e(c):e(l,-1)}),H(e,o),at()}na([`click`]);var Pz=V(`<p class="p-3 text-xs text-fg-muted">This file could not be read. It may be outside the project, or generated
|
|
30
|
-
rather than written.</p>`),
|
|
31
|
-
`)){let e=Bz.exec(n);if(e){let n=Hz(e[2]);t.push({function:e[1],file:n,line:Number(e[3]),column:Number(e[4]),kind:zz(n)});continue}let r=Vz.exec(n);if(r){let e=Hz(r[1]);t.push({file:e,line:Number(r[2]),column:Number(r[3]),kind:zz(e)})}}return t}var Wz=V(`<div class="overflow-hidden rounded border border-line"><!></div>`),Gz=V(`<div class="flex flex-col gap-2"><div class="overflow-hidden rounded border border-line"><!></div> <!></div>`);function Kz(e,t){it(t,!0);let n=Z(t,`context`,3,4),r=M(()=>Uz(t.stackTrace)),i=N(null),a=N(null),o=N(!1),s=0;async function c(e){P(i,e,!0),P(o,!1);let r=++s,c=await t.loadSource(e,n());r===s&&(P(a,c,!0),P(o,!0))}var l=da(),u=I(l),d=e=>{var t=Gz(),n=F(t);Nz(F(n),{get frames(){return z(r)},get selected(){return z(i)},onselect:c}),D(n);var s=L(n,2),l=e=>{var t=Wz();Rz(F(t),{get window(){return z(a)}}),D(t),H(e,t)};W(s,e=>{z(o)&&e(l)}),D(t),H(e,t)};W(u,e=>{z(r).length>0&&e(d)}),H(e,l),at()}function qz(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s ago`;let n=Math.floor(t/60);if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}var Jz=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded"> </span>`),Yz=V(`<pre class="text-xs font-mono bg-code text-fg p-2 rounded overflow-x-auto whitespace-pre-wrap"> </pre>`),Xz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Stack Trace</h5> <!> <details class="mt-2"><summary class="cursor-pointer text-[11px] text-fg-subtle hover:text-fg">Raw stack</summary> <!></details></div>`),Zz=V(`<span class="px-2 py-0.5 text-xs font-mono bg-hover text-fg-muted rounded"> </span>`),Qz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Affected Operations</h5> <div class="flex flex-wrap gap-1"></div></div>`),$z=V(`<div class="group flex items-center gap-1"><button class="flex items-center gap-1 text-xs text-fg-muted hover:text-fg font-mono"><!> <!></button> <!></div>`),eB=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Recent Traces</h5> <div class="space-y-1"></div></div>`),tB=V(`<div class="flex gap-2"><span class="text-fg-subtle"> </span> <span class="font-mono text-fg-muted"> </span></div>`),nB=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Context</h5> <div class="text-xs space-y-0.5"></div></div>`),rB=V(`<div class="border-t border-line p-3 bg-subtle space-y-3"><!> <!> <!> <!> <div class="text-xs text-fg-subtle pt-2 border-t border-line"><div class="flex gap-4"><span> </span> <span> </span></div></div></div>`),iB=V(`<div role="option"><button class="w-full p-3 flex items-start gap-3 hover:bg-subtle transition-colors text-left"><div class="mt-0.5"><!></div> <div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-1"><span class="text-sm font-semibold text-danger"> </span> <span class="px-1.5 py-0.5 text-xs font-medium bg-danger-bg text-danger rounded"> </span> <!></div> <div class="group flex items-start gap-1 mb-2"><p class="text-sm text-fg-muted truncate"> </p> <!></div> <div class="flex items-center gap-4 text-xs text-fg-subtle"><span class="flex items-center gap-1"><!> </span> <span class="flex items-center gap-1"><!> </span></div></div></button> <!></div>`),aB=V(`<span class="text-xs font-normal text-fg-muted"> </span>`),oB=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-danger-bg text-danger rounded-full"> </span>`),sB=V(`<div class="flex gap-4 mb-4 p-3 bg-subtle rounded-md border border-line"><div class="text-sm"><span class="text-fg-muted">Groups:</span> <span class="font-semibold text-fg"> </span></div> <div class="text-sm"><span class="text-fg-muted">Total:</span> <span class="font-semibold text-fg"> </span></div> <div class="text-sm"><span class="text-fg-muted">Last hour:</span> <span class="font-semibold text-danger"> </span></div></div>`),cB=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No errors captured</p> <p class="text-xs text-fg-subtle mt-1">Errors from failed traces will appear here</p></div>`),lB=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No matching errors</p> <p class="text-xs text-fg-subtle mt-1">No error groups match the current filter</p></div>`),uB=V(`<div class="flex flex-col h-full p-4"><div class="flex items-center justify-between mb-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Errors <!> <!></h3> <div class="flex items-center gap-2"><select class="text-xs border border-line rounded px-2 py-1 bg-surface text-fg-muted"><option>Most Recent</option><option>Most Frequent</option></select></div></div> <!> <!> <div role="listbox" tabindex="0" aria-label="Error groups" class="flex-1 overflow-auto space-y-2 focus:outline-none"><!></div></div>`);function dB(e,t){it(t,!0);let n=(e,t=p,n=p,r=p,i=p)=>{let a=M(()=>Date.now()-t().firstSeen),o=M(()=>Date.now()-t().lastSeen);var s=iB(),c=F(s),l=F(c),u=F(l),d=e=>{Sp(e,{size:16,class:`text-fg-subtle`})},f=e=>{Ep(e,{size:16,class:`text-fg-subtle`})};W(u,e=>{n()?e(d):e(f,-1)}),D(l);var v=L(l,2),y=F(v),b=F(y),x=F(b,!0);D(b);var S=L(b,2),C=F(S);D(S);var w=L(S,2),T=e=>{var n=Jz(),r=F(n,!0);D(n),R(()=>U(r,t().service)),H(e,n)};W(w,e=>{t().service&&e(T)}),D(y);var ee=L(y,2),te=F(ee),ne=F(te,!0);D(te);var re=L(te,2);{let e=M(()=>`${t().type}: ${t().message}`);Z_(re,{get value(){return z(e)},label:`Copy error message`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`})}D(ee);var ie=L(ee,2),ae=F(ie),oe=F(ae);Mp(oe,{size:12});var se=L(oe);D(ae);var ce=L(ae,2),le=F(ce);Mp(le,{size:12});var E=L(le);D(ce),D(ie),D(v),D(c);var ue=L(c,2),de=e=>{var n=rB(),r=F(n),i=e=>{var n=Xz(),r=L(F(n),2);Kz(r,{get stackTrace(){return t().stackTrace},get loadSource(){return rs}});var i=L(r,2);N_(L(F(i),2),{get content(){return t().stackTrace},children:(e,n)=>{var r=Yz(),i=F(r,!0);D(r),R(()=>U(i,t().stackTrace)),H(e,r)},$$slots:{default:!0}}),D(i),D(n),H(e,n)};W(r,e=>{t().stackTrace&&e(i)});var a=L(r,2),o=e=>{var n=Qz(),r=L(F(n),2);G(r,21,()=>t().affectedSpans,Aa,(e,t)=>{var n=Zz(),r=F(n,!0);D(n),R(()=>U(r,z(t))),H(e,n)}),D(r),D(n),H(e,n)};W(a,e=>{t().affectedSpans.length>0&&e(o)});var s=L(a,2),c=e=>{var n=eB(),r=L(F(n),2);G(r,20,()=>t().affectedTraces.slice(0,5),e=>e,(e,t)=>{var n=$z(),r=F(n),i=F(r);bm(i,{size:10});var a=L(i);Jp(L(a),{size:10}),D(r),Z_(L(r,2),{get value(){return t},label:`Copy trace ID`,size:10,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(n),R(e=>U(a,` ${e??``}... `),[()=>t.slice(0,16)]),B(`click`,r,()=>g(t)),H(e,n)}),D(r),D(n),H(e,n)};W(s,e=>{t().affectedTraces.length>0&&e(c)});var l=L(s,2),u=e=>{var n=nB(),r=L(F(n),2);G(r,21,()=>Object.entries(t().attributes),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=tB(),o=F(a),s=F(o);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,`${r()??``}:`),U(l,e)},[()=>String(i())]),H(e,a)}),D(r),D(n),H(e,n)},d=M(()=>t().attributes&&Object.keys(t().attributes).length>0);W(l,e=>{z(d)&&e(u)});var f=L(l,2),p=F(f),m=F(p),h=F(m);D(m);var v=L(m,2),y=F(v);D(v),D(p),D(f),D(n),R((e,t)=>{U(h,`First seen: ${e??``}`),U(y,`Last seen: ${t??``}`)},[()=>od(t().firstSeen),()=>od(t().lastSeen)]),H(e,n)};W(ue,e=>{n()&&e(de)}),D(s),R((e,n)=>{J(s,`aria-selected`,i()),J(s,`data-row-index`,r()),q(s,1,`border border-line rounded-md bg-surface overflow-hidden${i()?` ring-1 ring-inset ring-accent bg-accent/10`:``}`),U(x,t().type),U(C,`${t().count??``}x`),U(ne,t().message),U(se,` First: ${e??``}`),U(E,` Last: ${n??``}`)},[()=>qz(z(a)),()=>qz(z(o))]),B(`click`,c,()=>{m.cursor=r(),h(t().fingerprint)}),H(e,s)};function r(e,t){return L_(t.toLowerCase(),[e.type,e.message,...e.affectedTraces])}let i=N(`recent`),a=N(null),o=N(``),s=N(void 0),c=M(()=>z(i)===`recent`?au.value:ou.value),l=M(()=>z(c).filter(e=>r(e,z(o)))),u=M(()=>z(o).length>0),d=M(()=>su.value),f=M(()=>cu.value),m=UA({count:()=>z(l).length,onActivate:e=>{let t=z(l)[e];t&&h(t.fingerprint)},scrollToIndex:e=>z(s)?.querySelector(`[data-row-index="${e}"]`)?.scrollIntoView({block:`nearest`})});function h(e){P(a,z(a)===e?null:e,!0)}function g(e){Nu(e),Mu(`traces`)}var v=uB(),y=F(v),b=F(y),x=F(b);Wh(x,{size:16,class:`text-danger`});var S=L(x,2),C=e=>{var t=aB(),n=F(t);D(t),R(()=>U(n,`(${z(l).length??``} of ${z(c).length??``})`)),H(e,t)};W(S,e=>{z(u)&&e(C)});var w=L(S,2),T=e=>{var t=oB(),n=F(t,!0);D(t),R(()=>U(n,z(d))),H(e,t)};W(w,e=>{z(d)>0&&e(T)}),D(b);var ee=L(b,2),te=F(ee),ne=F(te);ne.value=ne.__value=`recent`;var re=L(ne);re.value=re.__value=`frequent`,D(te);var ie;uo(te),D(ee),D(y);var ae=L(y,2),oe=e=>{I_(e,{class:`mb-4`,inputClass:`border-line bg-subtle text-fg focus:border-line focus:ring-1 focus:ring-accent`,placeholder:`Filter by type, message, trace id…`,ariaLabel:`Filter errors`,get value(){return z(o)},set value(e){P(o,e,!0)}})};W(ae,e=>{z(c).length>0&&e(oe)});var se=L(ae,2),ce=e=>{var t=sB(),n=F(t),r=L(F(n),2),i=F(r,!0);D(r),D(n);var a=L(n,2),o=L(F(a),2),s=F(o,!0);D(o),D(a);var p=L(a,2),m=L(F(p),2),h=F(m,!0);D(m),D(p),D(t),R(()=>{U(i,z(u)?`${z(l).length} of ${z(c).length}`:z(c).length),U(s,z(d)),U(h,z(f))}),H(e,t)};W(se,e=>{z(d)>0&&e(ce)});var le=L(se,2),E=F(le),ue=e=>{var t=cB();Wh(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},de=e=>{var t=lB();Sh(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},fe=e=>{var t=da();G(I(t),19,()=>z(l),e=>e.fingerprint,(e,t,r)=>{n(e,()=>z(t),()=>z(a)===z(t).fingerprint,()=>z(r),()=>m.cursor===z(r))}),H(e,t)};W(E,e=>{z(c).length===0?e(ue):z(l).length===0?e(de,1):e(fe,-1)}),D(le),Uo(le,e=>P(s,e),()=>z(s)),D(v),R(()=>{ie!==(ie=z(i))&&(te.value=(te.__value=z(i))??``,lo(te,z(i)))}),B(`change`,te,e=>P(i,e.target.value,!0)),B(`keydown`,le,function(...e){m.onKeyDown?.apply(this,e)}),H(e,v),at()}na([`click`,`change`,`keydown`]);var fB={info:0,warning:1,error:2,critical:3};function pB(e,t=`info`){return typeof e==`string`&&e in fB?e:t}function mB(e,t){return fB[e]>=fB[t]}var hB={marker:`autotel.security`,forceKeep:`autotel.security.force_keep`,event:`security.event`,category:`security.category`,outcome:`security.outcome`,severity:`security.severity`,actorId:`security.actor_id`,targetType:`security.target_type`,targetId:`security.target_id`,tenantId:`security.tenant_id`,reason:`security.reason`,droppedKeys:`security.dropped_keys`,suspiciousRequest:`security.suspicious_request`,signal:`security.signal`};function gB(e){return typeof e==`string`&&e.length>0?e:void 0}function _B(e,t){let n=e.attributes??{},r=gB(n[hB.event]),i=n[hB.suspiciousRequest]===!0;return!r&&!i?null:{traceId:e.traceId,spanId:e.spanId,spanName:e.name,service:t,timestamp:e.startTime,event:r,category:gB(n[hB.category]),outcome:gB(n[hB.outcome]),severity:pB(n[hB.severity],i?`warning`:`info`),reason:gB(n[hB.reason]),suspicious:i,signal:gB(n[hB.signal])}}function vB(e){let t=[];for(let n of e)for(let e of n.spans){let r=_B(e,n.service);r&&t.push(r)}return t.sort((e,t)=>t.timestamp-e.timestamp)}function yB(e){let t={info:0,warning:0,error:0,critical:0};for(let n of e)t[n.severity]+=1;return t}function bB(e,t){return mB(e.severity,t)}function xB(e){switch(e){case`critical`:return`bg-red-100 text-red-700`;case`error`:return`bg-orange-100 text-orange-700`;case`warning`:return`bg-amber-100 text-amber-700`;default:return`bg-hover text-fg-muted`}}var SB=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-red-100 text-red-700 rounded-full"> </span>`),CB=V(`<div class="flex gap-4 mb-4 p-3 bg-subtle rounded-md border border-line"><div class="text-sm"><span class="text-fg-muted">Critical:</span> <span class="font-semibold text-red-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Error:</span> <span class="font-semibold text-orange-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Warning:</span> <span class="font-semibold text-amber-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Info:</span> <span class="font-semibold text-fg"> </span></div></div>`),wB=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No security events captured</p> <p class="text-xs text-fg-subtle mt-1">Spans with security.* attributes (autotel-audit) will appear here</p></div>`),TB=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded"> </span>`),EB=V(`<span class="text-fg-subtle"> </span>`),DB=V(`<div class="border border-line rounded-md bg-surface p-3"><div class="flex items-center gap-2 mb-1"><!> <span class="text-sm font-semibold text-fg"> </span> <span> </span> <!> <!> <!></div> <p class="text-xs text-fg-muted truncate mb-2 font-mono"> <!></p> <div class="flex items-center gap-4 text-xs text-fg-subtle"><span> </span> <button class="flex items-center gap-1 text-fg-muted hover:text-fg font-mono"><!> <!></button></div></div>`),OB=V(`<div class="flex flex-col h-full p-4"><div class="flex items-center justify-between mb-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Security <!></h3> <select class="text-xs border border-line rounded px-2 py-1 bg-surface text-fg-muted"><option>All severities</option><option>Warning+</option><option>Error+</option><option>Critical only</option></select></div> <!> <div class="flex-1 overflow-auto space-y-2"><!></div></div>`);function kB(e,t){it(t,!0);let n=N(`info`),r=M(()=>vB(vl.value)),i=M(()=>yB(z(r))),a=M(()=>z(r).filter(e=>bB(e,z(n))));function o(e,t){Nu(e,t),Mu(`traces`)}function s(e){return e.event?e.event:e.signal?`probe: ${e.signal}`:`suspicious request`}var c=OB(),l=F(c),u=F(l),d=F(u);Oh(d,{size:16,class:`text-red-500`});var f=L(d,2),p=e=>{var t=SB(),n=F(t,!0);D(t),R(()=>U(n,z(r).length)),H(e,t)};W(f,e=>{z(r).length>0&&e(p)}),D(u);var m=L(u,2),h=F(m);h.value=h.__value=`info`;var g=L(h);g.value=g.__value=`warning`;var _=L(g);_.value=_.__value=`error`;var v=L(_);v.value=v.__value=`critical`,D(m);var y;uo(m),D(l);var b=L(l,2),x=e=>{var t=CB(),n=F(t),r=L(F(n),2),a=F(r,!0);D(r),D(n);var o=L(n,2),s=L(F(o),2),c=F(s,!0);D(s),D(o);var l=L(o,2),u=L(F(l),2),d=F(u,!0);D(u),D(l);var f=L(l,2),p=L(F(f),2),m=F(p,!0);D(p),D(f),D(t),R(()=>{U(a,z(i).critical),U(c,z(i).error),U(d,z(i).warning),U(m,z(i).info)}),H(e,t)};W(b,e=>{z(r).length>0&&e(x)});var S=L(b,2),C=F(S),w=e=>{var t=wB();Oh(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},T=e=>{var t=da();G(I(t),17,()=>z(a),e=>e.traceId+e.spanId,(e,t)=>{var n=DB(),r=F(n),i=F(r),a=e=>{uh(e,{size:14,class:`text-amber-500`})};W(i,e=>{z(t).suspicious&&e(a)});var c=L(i,2),l=F(c,!0);D(c);var u=L(c,2),d=F(u,!0);D(u);var f=L(u,2),p=e=>{var n=TB(),r=F(n,!0);D(n),R(()=>U(r,z(t).category)),H(e,n)};W(f,e=>{z(t).category&&e(p)});var m=L(f,2),h=e=>{var n=TB(),r=F(n,!0);D(n),R(()=>U(r,z(t).outcome)),H(e,n)};W(m,e=>{z(t).outcome&&e(h)});var g=L(m,2),_=e=>{var n=TB(),r=F(n,!0);D(n),R(()=>U(r,z(t).service)),H(e,n)};W(g,e=>{z(t).service&&e(_)}),D(r);var v=L(r,2),y=F(v),b=L(y),x=e=>{var n=EB(),r=F(n);D(n),R(()=>U(r,`— ${z(t).reason??``}`)),H(e,n)};W(b,e=>{z(t).reason&&e(x)}),D(v);var S=L(v,2),C=F(S),w=F(C,!0);D(C);var T=L(C,2),ee=F(T);bm(ee,{size:10});var te=L(ee);Jp(L(te),{size:10}),D(T),D(S),D(n),R((e,n,r,i)=>{U(l,e),q(u,1,n),U(d,z(t).severity),U(y,`${z(t).spanName??``} `),U(w,r),U(te,` ${i??``}... `)},[()=>s(z(t)),()=>`px-1.5 py-0.5 text-xs font-medium rounded `+xB(z(t).severity),()=>od(z(t).timestamp),()=>z(t).traceId.slice(0,16)]),B(`click`,T,()=>o(z(t).traceId,z(t).spanId)),H(e,n)}),H(e,t)};W(C,e=>{z(a).length===0?e(w):e(T,-1)}),D(S),D(c),R(()=>{y!==(y=z(n))&&(m.value=(m.__value=z(n))??``,lo(m,z(n)))}),B(`change`,m,e=>P(n,e.target.value,!0)),H(e,c),at()}na([`change`,`click`]);async function AB(e,t){let n;try{n=await t.fetch(`${t.baseUrl}/api/analysis/compare`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e),signal:t.signal})}catch(e){return e?.name===`AbortError`?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}let r;try{r=await n.json()}catch{return{status:`error`,message:`Unexpected response (not JSON)`}}let i=r;if(n.status===501)return{status:`unavailable`,message:i.message??`Comparison is unavailable on this server.`};if(n.status===400)return{status:`invalid`,message:i.message??i.error??`Invalid query`};if(!n.ok)return{status:`error`,message:i.error??n.statusText};let a=i.outlierCount??0,o=i.baselineCount??0;return a===0||o===0?{status:`empty`,outlierCount:a,baselineCount:o}:{status:`ok`,differences:i.differences??[],outlierCount:a,baselineCount:o}}var jB=V(`<!> Mark now`,1),MB=V(`<!> Comparing since mark`,1),NB=V(`<option> </option>`),PB=V(`<div class="mb-2 grid grid-cols-2 gap-2"><label class="block text-[11px] text-fg-muted">Arm <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"></select></label> <label class="block text-[11px] text-fg-muted">Against <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"><option>Every other arm</option><!></select></label></div>`),FB=V(`<label class="mb-2 block text-[11px] text-fg-muted">Experiment <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"><option>Compare by query instead</option><!></select></label> <!>`,1),IB=V(`<label class="mb-1 block text-[11px] text-fg-muted">Investigating <input placeholder="duration > 500" class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 font-mono text-xs text-fg focus:border-accent focus:outline-none"/></label>`),LB=V(`<p class="mb-1 text-[11px] text-fg-subtle">Comparing spans since the mark against those before it, within the
|
|
32
|
-
current time window.</p>`),
|
|
27
|
+
devtools and it appears here.</p></div>`),$N=V(`<option> </option>`),eP=V(`<select class="text-xs bg-surface border border-line rounded px-2 py-1 text-fg max-w-[16rem]"></select>`),tP=V(`<div class="flex items-center gap-1.5 text-xs font-medium text-fg-muted"><!> </div>`),nP=V(`<span> </span>`),rP=V(`<div class="flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-accent/10 border border-accent/30 text-[11px] font-medium text-accent" title="Total LLM tokens and cost for this trace"><!> <!> <span class="font-mono text-accent/80"> </span></div>`),iP=V(`<span class="text-[10px] text-fg-muted whitespace-nowrap"> </span>`),aP=V(`<div class="flex items-center gap-1 text-[10px] text-fg-subtle"><span></span> </div>`),oP=V(`<div class="absolute left-1/2 top-3 -translate-x-1/2 z-10 px-3 py-1.5 rounded border border-line bg-subtle text-xs text-fg-muted shadow-sm"> </div>`),sP=ca(`<text text-anchor="middle" class="fill-fg-subtle text-[10px]" dy="-2"> </text>`),cP=ca(`<path fill="none" stroke-width="1.5" marker-end="url(#flow-arrow)"></path><!>`,1),lP=ca(`<g><rect width="28" height="16" rx="8"></rect><text text-anchor="middle" dominant-baseline="central" class="fill-white text-[10px] font-semibold"> </text></g>`),uP=ca(`<g role="button" tabindex="0"><rect rx="8"></rect><text text-anchor="middle" dominant-baseline="central"> </text><!></g>`),dP=V(`<button type="button" class="ml-auto shrink-0 inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors" title="Open this span in the Traces waterfall"><!> Traces</button> <!>`,1),fP=V(`<span>·</span> <span class="text-danger"> </span>`,1),pP=V(`<span>·</span> <span> </span>`,1),mP=V(`<span class="font-medium"> </span> <span class="text-fg-subtle">·</span>`,1),hP=V(`<div class="mt-1.5 flex items-center gap-1.5 text-[11px] text-accent"><!> <!> <span class="font-mono text-accent/80"> </span></div>`),gP=V(`<div class="px-3 py-2 border-b border-line"><!></div>`),_P=V(`<div class="px-3 py-2 border-b border-success-border bg-success-bg"><!></div>`),vP=V(`<div class="px-3 py-3 text-xs text-fg-subtle flex items-center gap-1.5"><!> No input/output captured for this node.</div>`),yP=V(`<div class="w-80 shrink-0 border-l border-line overflow-y-auto bg-surface"><div class="px-3 py-2.5 border-b border-line"><div class="group flex items-center gap-1.5"><span></span> <span class="font-mono text-sm font-medium text-fg truncate"> </span> <!> <!></div> <div class="mt-1 flex items-center gap-2 text-[11px] text-fg-subtle flex-wrap"><span class="uppercase tracking-wide"> </span> <span>·</span> <span> </span> <!> <!></div> <!></div> <!> <!> <!></div>`),bP=V(`<div class="flex flex-col h-full"><div class="flex items-center gap-3 px-3 py-1.5 border-b border-line bg-subtle/50 flex-wrap"><!> <!> <!> <div class="flex items-center gap-3 flex-wrap"><!> <!></div></div> <div class="flex flex-1 overflow-hidden"><div class="relative flex-1 overflow-auto bg-surface focus:outline-none" role="application" aria-label="Flow call graph — arrow keys to navigate, Enter to open in Traces" tabindex="0"><!> <svg class="min-w-full" role="presentation"><defs><marker id="flow-arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" class="fill-fg-subtle"></path></marker></defs><!><!></svg></div> <!></div></div>`);function xP(e,t){it(t,!0);let n=M(()=>vl.value),r=N(null),i=N(null),a=M(()=>z(n).find(e=>e.traceId===z(r))??z(n)[0]),o=M(()=>{let e=new Map;if(!z(a))return e;let t=tu.value.filter(e=>e.traceId===z(a).traceId),n=e=>e?.source===`table`?e.total:void 0,r=e=>e.normalized.usage.inputTokens!=null||e.normalized.usage.outputTokens!=null||n(e.normalized.cost)!=null,i=new Set(t.filter(r).map(e=>e.raw.spanId)),o=new Map(z(a).spans.map(e=>[e.spanId,e])),s=e=>{let t=e.parentSpanId;for(;t;){if(i.has(t))return!0;t=o.get(t)?.parentSpanId}return!1};for(let i of t){if(!r(i)||s(i.raw))continue;let{usage:t,cost:a}=i.normalized;e.set(i.raw.spanId,{inputTokens:t.inputTokens,outputTokens:t.outputTokens,costUsd:n(a)})}return e}),s=M(()=>z(a)?YN(BN(z(a).spans,{metricsBySpanId:z(o)})):null),c=M(()=>z(s)?VN(z(s).nodes):{}),l=M(()=>{let e=new Map;if(z(s))for(let t of z(s).nodes)e.set(t.id,t);return e}),u=M(()=>z(i)?z(l).get(z(i))??null:null),d=N(``);function f(e,t){return R_(t,[e.label,XN[e.role].label])}let p=M(()=>z(d).trim().length>0),m=M(()=>{let e=new Set;if(!z(s)||!z(p))return e;let t=z(d).trim().toLowerCase();for(let n of z(s).nodes)f(n,t)&&e.add(n.id);return e}),h=M(()=>z(m).size),g=M(()=>z(s)?.nodes.length??0);function _(e,t){let n=z(l).get(e),r=z(l).get(t);if(!n||!r)return``;let i=n.x+n.width/2,a=n.y+44,o=r.x+r.width/2,s=r.y,c=(a+s)/2;return`M ${i} ${a} C ${i} ${c}, ${o} ${c}, ${o} ${s}`}function v(e){P(i,z(i)===e?null:e,!0)}function y(e){!z(a)||e.spanIds.length===0||Pu(z(a).traceId,e.spanIds[0])}function b(e){let t=z(s)?.nodes??[];if(t.length===0)return;let n=z(i)?z(l).get(z(i)):void 0;if(!n){P(i,t[0].id,!0);return}if(e===`left`||e===`right`){let r=t.filter(e=>e.layer===n.layer).sort((e,t)=>e.x-t.x),a=r.findIndex(e=>e.id===n.id),o=r[e===`left`?a-1:a+1];o&&P(i,o.id,!0);return}let r=n.layer+(e===`down`?1:-1),a=t.filter(e=>e.layer===r);if(a.length===0)return;let o=n.x+n.width/2,c=a.reduce((e,t)=>Math.abs(t.x+t.width/2-o)<Math.abs(e.x+e.width/2-o)?t:e);P(i,c.id,!0)}let x=N(!1);function S(e){if(z(x))switch(e.key){case`ArrowLeft`:e.preventDefault(),b(`left`);break;case`ArrowRight`:e.preventDefault(),b(`right`);break;case`ArrowUp`:e.preventDefault(),b(`up`);break;case`ArrowDown`:e.preventDefault(),b(`down`);break;case`Enter`:z(u)&&y(z(u));break;case`Escape`:P(i,null)}}Lr(()=>(window.addEventListener(`keydown`,S),()=>window.removeEventListener(`keydown`,S)));var C=la(),w=I(C),T=e=>{var t=QN(),n=F(t);$h(F(n),{size:16}),Ke(),D(n),Ke(2),D(t),H(e,t)},ee=e=>{var t=bP(),o=F(t),f=F(o),b=e=>{var t=eP();G(t,21,()=>z(n),e=>e.traceId,(e,t)=>{var n=$N(),r=F(n);D(n);var i={};R(e=>{U(r,`${z(t).service??``} · ${e??``}`),i!==(i=z(t).traceId)&&(n.value=(n.__value=z(t).traceId)??``)},[()=>z(t).rootSpan?.name??z(t).traceId.slice(0,8)]),H(e,n)}),D(t),lo(t,()=>z(r),e=>P(r,e)),H(e,t)},S=e=>{var t=tP(),n=F(t);$h(n,{size:13});var r=L(n);D(t),R(()=>U(r,` ${z(a).rootSpan?.name??`Flow`??``}`)),H(e,t)};W(f,e=>{z(n).length>1?e(b):e(S,-1)});var C=L(f,2),w=e=>{var t=rP(),n=F(t);Lp(n,{size:11,class:`text-accent`});var r=L(n,2),i=e=>{var t=nP(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Oj(z(c).costUsd)]),H(e,t)};W(r,e=>{z(c).costUsd!=null&&e(i)});var a=L(r,2),o=F(a,!0);D(a),D(t),R(e=>U(o,e),[()=>Dj(z(c).inputTokens,z(c).outputTokens)]),H(e,t)};W(C,e=>{(z(c).costUsd!=null||z(c).inputTokens!=null)&&e(w)});var T=L(C,2);{let e=M(()=>$(`bg-subtle text-fg`,z(p)?`border-accent ring-1 ring-accent`:`border-line`));L_(T,{class:`ml-auto w-48 max-w-[14rem]`,get inputClass(){return z(e)},ariaLabel:`Search flow nodes by name or type`,placeholder:`Search nodes…`,clearTitle:`Clear search`,get value(){return z(d)},set value(e){P(d,e,!0)}})}var ee=L(T,2),te=F(ee),ne=e=>{var t=iP(),n=F(t);D(t),R(()=>U(n,`Nodes (${z(h)??``} of ${z(g)??``})`)),H(e,t)};W(te,e=>{z(p)&&e(ne)}),G(L(te,2),16,()=>ZN,e=>e,(e,t)=>{var n=aP(),r=F(n),i=L(r);D(n),R(e=>{q(r,1,e),U(i,` ${XN[t].label??``}`)},[()=>K($(`inline-block w-2 h-2 rounded-sm`,XN[t].dot))]),H(e,n)}),D(ee),D(o);var re=L(o,2),ie=F(re),ae=F(ie),oe=e=>{var t=oP(),n=F(t);D(t),R(e=>U(n,`No matches for “${e??``}”`),[()=>z(d).trim()]),H(e,t)};W(ae,e=>{z(p)&&z(h)===0&&e(oe)});var se=L(ae,2),ce=L(F(se));G(ce,17,()=>z(s).edges,e=>e.source+`>`+e.target,(e,t)=>{let n=M(()=>z(i)&&z(t).source!==z(i)&&z(t).target!==z(i));var r=cP(),a=I(r),o=L(a),s=e=>{let n=M(()=>z(l).get(z(t).source)),r=M(()=>z(l).get(z(t).target));var i=la(),a=I(i),o=e=>{var i=sP(),a=F(i);D(i),R(()=>{J(i,`x`,(z(n).x+z(n).width/2+z(r).x+z(r).width/2)/2),J(i,`y`,(z(n).y+44+z(r).y)/2),U(a,`×${z(t).count??``}`)}),H(e,i)};W(a,e=>{z(n)&&z(r)&&e(o)}),H(e,i)};W(o,e=>{z(t).count>1&&e(s)}),R((e,t)=>{J(a,`d`,e),q(a,0,t)},[()=>_(z(t).source,z(t).target),()=>K($(`stroke-fg-subtle transition-opacity`,z(n)&&`opacity-20`))]),H(e,r)}),G(L(ce),17,()=>z(s).nodes,e=>e.id,(e,t)=>{let n=M(()=>XN[z(t).role]),r=M(()=>z(t).id===z(i)),a=M(()=>z(m).has(z(t).id)),o=M(()=>z(p)&&z(a)),s=M(()=>z(p)&&!z(a)||z(i)&&!z(r)),c=M(()=>z(t).errorCount>0);var l=uP(),u=F(l),d=L(u),f=F(d,!0);D(d);var h=L(d),g=e=>{var n=lP(),r=F(n),i=L(r),a=F(i,!0);D(i),D(n),R(e=>{J(r,`x`,z(t).x+z(t).width-26),J(r,`y`,z(t).y-8),q(r,0,e),J(i,`x`,z(t).x+z(t).width-12),J(i,`y`,z(t).y),U(a,z(c)?`${z(t).count-z(t).errorCount}/${z(t).count}`:`${z(t).count}`)},[()=>K($(z(c)?`fill-red-500`:`fill-fg-muted`))]),H(e,n)};W(h,e=>{z(t).count>1&&e(g)}),D(l),R((e,n,i,a)=>{q(l,0,e),J(u,`x`,z(t).x),J(u,`y`,z(t).y),J(u,`width`,z(t).width),J(u,`height`,44),q(u,0,n),J(u,`stroke-width`,z(r)||z(o)?2.5:1.5),J(d,`x`,z(t).x+z(t).width/2),J(d,`y`,z(t).y+22),q(d,0,i),U(f,a)},[()=>K($(`cursor-pointer transition-opacity focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent`,z(s)&&`opacity-40`)),()=>K($(z(n).fill,z(o)?`stroke-accent`:z(c)?`stroke-red-500`:z(n).stroke,(z(r)||z(o))&&`stroke-[2.5px]`)),()=>K($(`text-[12px] font-medium font-mono`,z(n).text)),()=>z(t).label.length>26?z(t).label.slice(0,25)+`…`:z(t).label]),B(`click`,l,()=>v(z(t).id)),B(`keydown`,l,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(z(t).id))}),H(e,l)}),D(se),D(ie);var le=L(ie,2),E=e=>{let t=M(()=>XN[z(u).role]);var n=yP(),r=F(n),i=F(r),o=F(i),s=L(o,2),c=F(s,!0);D(s);var l=L(s,2);Q_(l,{get value(){return z(u).label},label:`Copy node name`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`});var d=L(l,2),f=e=>{var t=dP(),n=I(t);Yp(F(n),{size:11}),Ke(),D(n),Q_(L(n,2),{get value(){return z(a).traceId},label:`Copy trace ID`,class:`shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),B(`click`,n,()=>y(z(u))),H(e,t)};W(d,e=>{z(u).spanIds.length>0&&e(f)}),D(i);var p=L(i,2),m=F(p),h=F(m,!0);D(m);var g=L(m,4),_=F(g);D(g);var v=L(g,2),b=e=>{var t=fP(),n=L(I(t),2),r=F(n);D(n),R(()=>U(r,`${z(u).errorCount??``} errored`)),H(e,t)};W(v,e=>{z(u).errorCount>0&&e(b)});var x=L(v,2),S=e=>{var t=pP(),n=L(I(t),2),r=F(n,!0);D(n),R(e=>U(r,e),[()=>ad(z(u).totalDurationMs)]),H(e,t)};W(x,e=>{z(u).totalDurationMs>0&&e(S)}),D(p);var C=L(p,2),w=e=>{var t=hP(),n=F(t);Lp(n,{size:11,class:`text-accent`});var r=L(n,2),i=e=>{var t=mP(),n=I(t),r=F(n,!0);D(n),Ke(2),R(e=>U(r,e),[()=>Oj(z(u).metrics.costUsd)]),H(e,t)};W(r,e=>{z(u).metrics.costUsd!=null&&e(i)});var a=L(r,2),o=F(a);D(a),D(t),R(e=>U(o,`${e??``} tokens`),[()=>Dj(z(u).metrics.inputTokens,z(u).metrics.outputTokens)]),H(e,t)};W(C,e=>{z(u).metrics&&e(w)}),D(r);var T=L(r,2),ee=e=>{var t=gP(),n=F(t);{let e=M(()=>Qj(z(u).sample.input));P_(n,{get content(){return z(e)},children:(e,t)=>{eM(e,{label:`Input`,get value(){return z(u).sample.input}})},$$slots:{default:!0}})}D(t),H(e,t)};W(T,e=>{z(u).sample.input!==void 0&&e(ee)});var te=L(T,2),ne=e=>{var t=_P(),n=F(t);{let e=M(()=>Qj(z(u).sample.output));P_(n,{get content(){return z(e)},children:(e,t)=>{eM(e,{label:`Output`,get value(){return z(u).sample.output},tone:`positive`})},$$slots:{default:!0}})}D(t),H(e,t)};W(te,e=>{z(u).sample.output!==void 0&&e(ne)});var re=L(te,2),ie=e=>{var t=vP();Lm(F(t),{size:13}),Ke(),D(t),H(e,t)};W(re,e=>{z(u).sample.input===void 0&&z(u).sample.output===void 0&&e(ie)}),D(n),R(e=>{q(o,1,e),U(c,z(u).label),U(h,z(t).label),U(_,`${z(u).count??``}
|
|
28
|
+
${z(u).count===1?`call`:`calls`}`)},[()=>K($(`inline-block w-2 h-2 rounded-sm`,z(t).dot))]),H(e,n)};W(le,e=>{z(u)&&e(E)}),D(re),D(t),R(()=>{J(se,`width`,z(s).width),J(se,`height`,z(s).height),J(se,`viewBox`,`0 0 ${z(s).width} ${z(s).height}`)}),B(`focusin`,ie,()=>P(x,!0)),B(`focusout`,ie,()=>P(x,!1)),H(e,t)};W(w,e=>{!z(a)||!z(s)||z(s).nodes.length===0?e(T):e(ee,-1)}),H(e,C),at()}ea([`focusin`,`focusout`,`click`,`keydown`]);var SP=(e,t=p,n=p)=>{var r=wP(),i=F(r),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(r),R(()=>{U(a,t()),U(s,n())}),H(e,r)},CP=(e,t=p,n=p,r=p)=>{var i=la(),a=I(i),o=e=>{var i=TP(),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(i),R(e=>{J(i,`title`,e),U(o,t()),U(c,n())},[()=>`View ${t().toLowerCase()} in the ${r()} tab`]),B(`click`,i,()=>Mu(r())),H(e,i)},s=e=>{SP(e,t,n)};W(a,e=>{n()>0?e(o):e(s,-1)}),H(e,i)},wP=V(`<div><div class="text-[11px] uppercase tracking-wide text-fg-subtle"> </div> <div class="text-sm text-fg"> </div></div>`),TP=V(`<button type="button" class="group/stat text-left rounded -m-1 p-1 hover:bg-hover transition-colors"><div class="text-[11px] uppercase tracking-wide text-fg-subtle"> </div> <div class="text-sm text-accent group-hover/stat:underline"> </div></button>`),EP=V(`<div class="border border-line rounded-md p-3 bg-surface"><div class="flex items-start justify-between gap-2 mb-2"><div><div class="text-sm font-medium text-fg"> </div> <div class="text-xs text-fg-subtle uppercase tracking-wide"> </div></div> <span> </span></div> <div class="grid grid-cols-2 gap-2 text-xs text-fg-muted sm:grid-cols-5"><!> <!> <!> <!> <!></div></div>`),DP=V(`<option> </option>`),OP=V(`<div class="text-center text-fg-subtle text-sm py-12">No resources derived yet. Send traces or logs with resource metadata.</div>`),kP=V(`<div class="space-y-2"></div>`),AP=V(`<div class="flex flex-col h-full p-4"><div class="flex flex-col gap-3 mb-4 pb-3 border-b border-line"><div class="flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3></div> <div class="flex flex-wrap gap-2"><input type="search" placeholder="Filter resources" class="px-3 py-2 text-xs border border-line rounded-md min-w-[180px]"/> <select class="px-3 py-2 text-xs border border-line rounded-md bg-surface"><option>All types</option><!></select></div></div> <div class="flex-1 overflow-auto"><!></div></div>`);function jP(e,t){it(t,!0);let n=(e,t=p)=>{var n=EP(),r=F(n),a=F(r),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a);var u=L(a,2),d=F(u,!0);D(u),D(r);var f=L(r,2),m=F(f);SP(m,()=>`Requests`,()=>t().requestCount);var h=L(m,2);CP(h,()=>`Errors`,()=>t().errorCount,()=>`errors`);var g=L(h,2);CP(g,()=>`Traces`,()=>t().traceCount,()=>`traces`);var _=L(g,2);CP(_,()=>`Logs`,()=>t().logCount,()=>`logs`);var v=L(_,2);{let e=M(()=>t().lastSeen?od(t().lastSeen):`n/a`);SP(v,()=>`Last Seen`,()=>z(e))}D(f),D(n),R(e=>{U(s,t().name),U(l,t().type),q(u,1,e),U(d,t().health)},[()=>K($(`px-2 py-1 rounded border text-[11px] font-medium capitalize`,i(t().health)))]),H(e,n)},r=[`service`,`database`,`cache`,`messaging`,`external`,`unknown`];function i(e){switch(e){case`healthy`:return`bg-success-bg text-success border-success-border`;case`degraded`:return`bg-warning-bg text-warning border-warning-border`;case`unhealthy`:return`bg-danger-bg text-danger border-danger-border`;default:return`bg-subtle text-fg-muted border-line`}}let a=M(()=>eu.value),o=N(``),s=N(`all`),c=M(()=>{let e=z(o).trim().toLowerCase();return z(a).filter(t=>(z(s)===`all`||t.type===z(s))&&R_(e,[t.name]))});var l=AP(),u=F(l),d=F(u),f=F(d),m=F(f);dp(m,{size:16});var h=L(m);D(f),D(d);var g=L(d,2),_=F(g);xo(_);var v=L(_,2),y=F(v);y.value=y.__value=`all`,G(L(y),16,()=>r,e=>e,(e,t)=>{var n=DP(),r=F(n,!0);D(n);var i={};R(()=>{U(r,t),i!==(i=t)&&(n.value=(n.__value=t)??``)}),H(e,n)}),D(v);var b;co(v),D(g),D(u);var x=L(u,2),S=F(x),C=e=>{H(e,OP())},w=e=>{var t=kP();G(t,21,()=>z(c),e=>e.name,(e,t)=>{n(e,()=>z(t))}),D(t),H(e,t)};W(S,e=>{z(c).length===0?e(C):e(w,-1)}),D(x),D(l),R(()=>{U(h,` Resources (${z(a).length??``})`),So(_,z(o)),b!==(b=z(s))&&(v.value=(v.__value=z(s))??``,so(v,z(s)))}),B(`input`,_,e=>P(o,e.currentTarget.value,!0)),B(`change`,v,e=>P(s,e.currentTarget.value,!0)),H(e,l),at()}ea([`click`,`input`,`change`]);var MP=200,NP=70,PP=20;function FP(e,t){return ms(e,t)}function IP(e){let t=e.attributes||{};return t[`db.system.name`]||t[`db.system`]||t[`db.namespace`]||t[`db.name`]||t[`db.query.text`]||t[`db.statement`]?`database`:t[`messaging.system`]||t[`messaging.destination`]||t[`messaging.url`]?`messaging`:t[`rpc.system.name`]||t[`rpc.system`]||t[`rpc.service`]||t[`peer.service`]?`external`:`service`}function LP(e,t){if(e.length===0)return 0;let n=Math.ceil(t/100*e.length)-1;return e[Math.max(0,n)]}function RP(e){let t=new Map,n=new Map;for(let r of e){let e=new Map;for(let t of r.spans)e.set(t.spanId,t);for(let i of r.spans){let a=FP(i,r.service),o=t.get(a);o||(o={id:a,name:a,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:`service`},t.set(a,o)),o.requestCount++,i.status.code===`ERROR`&&o.errorCount++,o.avgLatency=(o.avgLatency*(o.requestCount-1)+i.duration)/o.requestCount,o.minLatency=Math.min(o.minLatency,i.duration),o.maxLatency=Math.max(o.maxLatency,i.duration),o.spanKinds.add(i.kind);let s=IP(i),c=String(i.attributes?.[`service.name`]||r.service||a);if(s!==`service`&&a!==c&&(o.nodeType=s),i.kind===`CLIENT`){let e=r.spans.find(e=>e.parentSpanId===i.spanId&&e.kind===`SERVER`),o=String(i.attributes?.[`service.name`]||r.service||a),s=(e?FP(e,r.service):void 0)||us(i.attributes,`peer.service`,`http.host`,`db.system.name`,`db.system`,`net.peer.name`,`rpc.service`,`messaging.system`)||`external`;if(t.has(o)||t.set(o,{id:o,name:o,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:`service`}),o!==s){let e=`${o}->${s}`,r=n.get(e);if(!r){if(r={id:e,source:o,target:s,requestCount:0,errorCount:0,avgLatency:0,p50Latency:0,p99Latency:0,latencies:[]},n.set(e,r),!t.has(s))t.set(s,{id:s,name:s,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:IP(i)});else{let e=t.get(s),n=IP(i);n!==`service`&&(e.nodeType=n)}}r.requestCount++,i.status.code===`ERROR`&&r.errorCount++,r.avgLatency=(r.avgLatency*(r.requestCount-1)+i.duration)/r.requestCount,r.latencies.push(i.duration);let a=[...r.latencies].sort((e,t)=>e-t);r.p50Latency=LP(a,50),r.p99Latency=LP(a,99)}}if(i.kind!==`SERVER`||!i.parentSpanId)continue;let l=e.get(i.parentSpanId);if(!l||l.kind!==`CLIENT`)continue;let u=FP(l,r.service);if(u===a)continue;let d=`${u}->${a}`;n.has(d)||n.set(d,{id:d,source:u,target:a,requestCount:1,errorCount:+(i.status.code===`ERROR`),avgLatency:i.duration,p50Latency:i.duration,p99Latency:i.duration,latencies:[i.duration]})}}return{nodes:[...t.values()].map(e=>({...e,minLatency:e.minLatency===1/0?0:e.minLatency})),connections:[...n.values()]}}function zP(e,t){let n=new Map;if(e.length===0)return n;if(e.length===1)return n.set(e[0].id,{x:180,y:92}),n;let r=e.map(e=>e.id),i=new Map,a=new Map;for(let e of r)i.set(e,[]),a.set(e,[]);for(let e of t)i.has(e.source)&&i.get(e.source).push(e.target),a.has(e.target)&&a.get(e.target).push(e.source);let o=new Map,s=r.filter(e=>(a.get(e)?.length??0)===0),c=s.length>0?s:r,l=[...c];for(let e of c)o.set(e,0);for(;l.length>0;){let e=l.shift(),t=o.get(e)??0;for(let n of i.get(e)??[])(o.get(n)??-1)<=t&&(o.set(n,t+1),l.push(n))}for(let e of r)o.has(e)||o.set(e,0);let u=Math.max(...Array.from(o.values())),d=Array.from({length:u+1},()=>[]);for(let e of r)d[o.get(e)].push(e);for(let e=0;e<2;e++)for(let e=1;e<=u;e++){let t=d[e-1],n=new Map;t.forEach((e,t)=>n.set(e,t)),d[e].sort((e,t)=>{let r=a.get(e)??[],i=a.get(t)??[];return(r.length>0?r.reduce((e,t)=>e+(n.get(t)??0),0)/r.length:999)-(i.length>0?i.reduce((e,t)=>e+(n.get(t)??0),0)/i.length:999)})}let f=Math.max(...d.map(e=>e.length)),p=Math.max(f*122-NP,52);for(let e=0;e<=u;e++){let t=d[e],r=(p-(t.length*122-NP))/2,i=e*MP+70+PP;t.forEach((e,t)=>{n.set(e,{x:i-70,y:r+t*122+PP})})}return n}function BP(e,t,n){return Math.min(n,Math.max(t,e))}function VP(e,t,n,r,i){let a=BP(t,r,i);if(a===e.scale)return e;let o=(n.x-e.translate.x)/e.scale,s=(n.y-e.translate.y)/e.scale;return{scale:a,translate:{x:n.x-o*a,y:n.y-s*a}}}function HP(e,t,n,r,i,a){let o=e.maxX-e.minX,s=e.maxY-e.minY,c=t-r*2,l=n-r*2,u=BP(Math.min(o>0?c/o:a,s>0?l/s:a),i,a);return{scale:u,translate:{x:(t-o*u)/2-e.minX*u,y:(n-s*u)/2-e.minY*u}}}function UP(e){let{viewWidth:t,viewHeight:n,svg:r,contentBounds:i,minScale:a=.2,maxScale:o=3,zoomStep:s=1.2,fitPadding:c=24}=e,l=N(1),u=N(_r({x:0,y:0})),d=N(!1),f={x:0,y:0,tx:0,ty:0},p=(e,i)=>{let a=r();if(!a)return{x:e,y:i};let o=a.getBoundingClientRect(),s=o.width>0?t()/o.width:1,c=o.height>0?n()/o.height:1;return{x:(e-o.left)*s,y:(i-o.top)*c}},m=e=>{P(l,e.scale,!0),P(u,e.translate,!0)},h=(e,t)=>m(VP({scale:z(l),translate:z(u)},e,t,a,o)),g=()=>{P(l,1),P(u,{x:0,y:0},!0)},_=e=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let t=p(e.clientX,e.clientY),n=e.deltaY<0?s:1/s;h(z(l)*n,t)},v=e=>{e.button===0&&(e.target?.closest(`[data-node]`)||(P(d,!0),f={x:e.clientX,y:e.clientY,tx:z(u).x,ty:z(u).y},r()?.setPointerCapture?.(e.pointerId)))},y=e=>{let i=r();if(!z(d)||!i)return;let a=i.getBoundingClientRect(),o=a.width>0?t()/a.width:1,s=a.height>0?n()/a.height:1;P(u,{x:f.tx+(e.clientX-f.x)*o,y:f.ty+(e.clientY-f.y)*s},!0)},b=e=>{z(d)&&(P(d,!1),r()?.releasePointerCapture?.(e.pointerId))},x=()=>({x:t()/2,y:n()/2});return{get scale(){return z(l)},get translate(){return z(u)},get isPanning(){return z(d)},onWheel:_,onPointerDown:v,onPointerMove:y,onPointerEnd:b,zoomIn:()=>h(z(l)*s,x()),zoomOut:()=>h(z(l)/s,x()),fit:()=>{let e=i();if(!e){g();return}m(HP(e,t(),n(),c,a,o))},reset:g}}var WP=(e,t=p,n=p,r)=>{let i=pn(()=>g(r?.(),!1));var a=GP(),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,t()),q(c,1,e),U(l,n())},[()=>K($(`font-medium`,z(i)?`text-danger`:`text-fg`))]),H(e,a)},GP=V(`<div class="flex justify-between text-xs"><span class="text-fg-subtle"> </span> <span> </span></div>`),KP=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle p-8"><!> <p class="text-sm text-center">No traces available to build service map. <br/> Traces will appear here as they are captured.</p></div>`),qP=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle p-8"><!> <p class="text-sm text-center">No services detected in traces. <br/> Service information is extracted from span attributes.</p></div>`),JP=V(`<span class="text-xs text-fg-subtle flex-shrink-0">No service matches</span>`),YP=ca(`<g><path fill="none" stroke-linecap="round"></path><text text-anchor="middle"> </text></g>`),XP=ca(`<rect fill="none" class="stroke-accent"></rect>`),ZP=ca(`<rect></rect><path></path><ellipse></ellipse>`,1),QP=ca(`<polygon></polygon>`),$P=ca(`<rect></rect>`),eF=ca(`<rect fill="#64748b"></rect>`),tF=ca(`<tspan fill="#dc2626" class="font-semibold"> </tspan>`),nF=ca(`<g role="button" tabindex="0"><!><g filter="url(#nodeShadow)"><!></g><!><text text-anchor="middle" class="text-[11px] font-semibold" fill="#1f2937"> </text><text text-anchor="middle" class="text-[10px]" fill="#475569"> <!></text></g>`),rF=V(`<div class="space-y-3 pr-8"><!> <!> <!> <!> <!> <!></div>`),iF=V(`<span class="text-danger"> </span>`),aF=V(`<div class="text-xs p-2 bg-surface rounded border border-line"><div class="flex items-center gap-1 text-fg-muted"><span class="font-medium"> </span> <!></div> <div class="flex items-center gap-2 mt-1 text-fg-subtle"><span> </span> <!> <span> </span></div></div>`),oF=V(`<div class="mt-4 pt-4 border-t border-line"><div class="group flex items-center justify-between mb-2"><h5 class="text-xs font-medium text-fg-muted">Connections</h5> <!></div> <div class="space-y-2"></div></div>`),sF=V(`<div class="w-64 border-l border-line bg-subtle overflow-auto"><div class="p-4"><div class="flex items-center justify-between mb-4"><div class="group flex items-center gap-1 min-w-0"><h4 class="font-semibold text-fg truncate"> </h4> <!></div> <button class="text-fg-subtle hover:text-fg-muted">×</button></div> <!> <!></div></div>`),cF=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3> <div class="text-xs text-fg-subtle"> </div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!></div> <div class="flex-1 overflow-hidden flex"><div class="relative flex-1 overflow-auto p-4"><svg role="application" aria-label="Service map. Drag to pan, ctrl or cmd and scroll to zoom."><defs><marker id="arrowhead" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0, 10 3.5, 0 7" fill="#94a3b8"></polygon></marker><marker id="arrowhead-error" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0, 10 3.5, 0 7" fill="#ef4444"></polygon></marker><filter id="nodeShadow" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#0f172a" flood-opacity="0.14"></feDropShadow></filter></defs><g><!><!></g></svg> <div class="absolute bottom-3 right-3 flex flex-col gap-1 rounded-md border border-line bg-surface p-1 shadow-sm"><button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Zoom in" aria-label="Zoom in"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Zoom out" aria-label="Zoom out"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Fit to content" aria-label="Fit to content"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Reset to 1:1" aria-label="Reset zoom to 1:1"><!></button></div></div> <!></div> <div class="flex items-center gap-4 px-4 py-2 border-t border-line bg-subtle text-xs"><div class="flex items-center gap-1"><div class="w-4 h-4 rounded-full border-2 border-accent bg-surface"></div> <span class="text-fg-muted">Healthy</span></div> <div class="flex items-center gap-1"><div class="w-4 h-4 rounded-full border-2 border-danger-border bg-surface"></div> <span class="text-fg-muted">Has Errors</span></div> <div class="flex items-center gap-1"><div class="w-6 h-0.5 bg-fg-subtle"></div> <span class="text-fg-muted">Connection</span></div></div></div>`);function lF(e,t){it(t,!0);let n=M(()=>vl.value),r=N(null),i=N(null),a=N(``),o=M(()=>RP(z(n))),s=M(()=>z(o).nodes),c=M(()=>z(o).connections),l=M(()=>z(a).length>0);function u(e){return R_(z(a).toLowerCase(),[e.name])}let d=M(()=>z(s).filter(u)),f=M(()=>new Set(z(d).map(e=>e.id))),p=M(()=>z(d).length>0),m=M(()=>zP(z(s),z(c))),h=M(()=>{let e=400;for(let[,t]of z(m))t.x+140+20>e&&(e=t.x+140+20);return e}),g=M(()=>{let e=300;for(let[,t]of z(m))t.y+52+20>e&&(e=t.y+52+20);return e}),_=N(null),v=UP({viewWidth:()=>z(h),viewHeight:()=>z(g),svg:()=>z(_),contentBounds:()=>{let e=1/0,t=1/0,n=-1/0,r=-1/0;for(let[,i]of z(m))e=Math.min(e,i.x),t=Math.min(t,i.y),n=Math.max(n,i.x+140),r=Math.max(r,i.y+52);return Number.isFinite(e)?{minX:e,minY:t,maxX:n,maxY:r}:null}}),y=M(()=>z(r)?z(s).find(e=>e.id===z(r))??null:null);function b(e,t){if(e.key===`Enter`||e.key===` `){e.preventDefault(),P(r,z(r)===t?null:t,!0);return}e.key===`Escape`&&z(r)&&(e.stopPropagation(),P(r,null))}let x=M(()=>z(r)?z(c).filter(e=>e.source===z(r)||e.target===z(r)):[]),S=M(()=>z(x).length>0?JSON.stringify(z(x).map(e=>({source:e.source,target:e.target,requests:e.requestCount,errors:e.errorCount,avgLatency:ad(e.avgLatency)})),null,2):``),C=M(()=>{if(!z(y))return``;let e=z(y);return JSON.stringify({service:e.name,requests:e.requestCount,errors:e.errorCount,errorRate:`${(e.errorCount/e.requestCount*100).toFixed(1)}%`,avgLatency:ad(e.avgLatency),minLatency:ad(e.minLatency),maxLatency:ad(e.maxLatency),connections:z(x).map(e=>({source:e.source,target:e.target,requests:e.requestCount,errors:e.errorCount,avgLatency:ad(e.avgLatency)}))},null,2)});var w=la(),T=I(w),ee=e=>{var t=KP();Zf(F(t),{size:48,class:`mb-4 opacity-50`}),Ke(2),D(t),H(e,t)},te=e=>{var t=qP();Th(F(t),{size:48,class:`mb-4 opacity-50`}),Ke(2),D(t),H(e,t)},ne=e=>{var t=cF(),n=F(t),o=F(n),u=F(o);Zf(u,{size:16});var w=L(u);D(o);var T=L(o,2),ee=F(T);D(T),D(n);var te=L(n,2),ne=F(te);L_(ne,{placeholder:`Find a service by name…`,ariaLabel:`Find a service by name`,get value(){return z(a)},set value(e){P(a,e,!0)}});var re=L(ne,2),ie=e=>{H(e,JP())};W(re,e=>{z(l)&&!z(p)&&e(ie)}),D(te);var ae=L(te,2),oe=F(ae),se=F(oe);oo(se,`min-height: 300px;`);var ce=L(F(se)),le=F(ce);G(le,17,()=>z(c),e=>e.id,(e,t)=>{let n=M(()=>z(m).get(z(t).source)),i=M(()=>z(m).get(z(t).target));var a=la(),o=I(a),s=e=>{let a=M(()=>z(r)===z(t).source||z(r)===z(t).target),o=M(()=>z(t).errorCount>0),s=M(()=>z(n).x+140),c=M(()=>z(n).y+26),l=M(()=>z(i).x),u=M(()=>z(i).y+26),d=M(()=>Math.abs(z(l)-z(s))*.5),f=M(()=>z(t).requestCount>0?z(t).errorCount/z(t).requestCount*100:0),p=M(()=>z(o)?`${z(t).requestCount}× · ${z(f).toFixed(0)}% err · ${ad(z(t).p50Latency)}`:`${z(t).requestCount}× · ${ad(z(t).p50Latency)}`);var m=YP(),h=F(m),g=L(h),_=F(g,!0);D(g),D(m),R(e=>{J(h,`d`,`M${z(s)},${z(c)} C${z(s)+z(d)},${z(c)} ${z(l)-z(d)},${z(u)} ${z(l)},${z(u)}`),J(h,`stroke`,z(o)?`#ef4444`:`#94a3b8`),J(h,`stroke-width`,z(o)||z(a)?2.5:1.5),J(h,`stroke-dasharray`,z(o)?`6 4`:void 0),J(h,`stroke-opacity`,z(r)&&!z(a)?.2:1),J(h,`marker-end`,`url(#${z(o)?`arrowhead-error`:`arrowhead`})`),J(g,`x`,(z(s)+z(l))/2),J(g,`y`,(z(c)+z(u))/2-6),q(g,0,e),J(g,`opacity`,z(r)&&!z(a)?.25:1),U(_,z(p))},[()=>K($(`at-edge-label text-[10px]`,z(o)?`fill-danger font-medium`:`fill-fg-subtle`))]),H(e,m)};W(o,e=>{z(n)&&z(i)&&e(s)}),H(e,a)}),G(L(le),17,()=>z(s),e=>e.id,(e,t)=>{let n=M(()=>z(m).get(z(t).id));var a=la(),o=I(a),s=e=>{let a=M(()=>z(r)===z(t).id),o=M(()=>z(i)===z(t).id),s=M(()=>z(t).errorCount>0),c=M(()=>z(f).has(z(t).id)),u=M(()=>z(l)&&!z(c)),d=M(()=>hg(z(t).id)),p=M(()=>z(d).fill),m=M(()=>z(s)?`#ef4444`:z(d).stroke),h=M(()=>z(a)||z(s)?2.5:z(o)?2:1.5);var g=nF(),_=F(g),v=e=>{var t=XP();J(t,`x`,-3),J(t,`y`,-3),J(t,`rx`,11),J(t,`stroke-width`,2.5),R(()=>{J(t,`width`,146),J(t,`height`,58)}),H(e,t)};W(_,e=>{z(l)&&z(c)&&e(v)});var y=L(_),S=F(y),C=e=>{var t=ZP(),n=I(t);J(n,`x`,2),J(n,`y`,6);var r=L(n),i=L(r);J(i,`cy`,6),J(i,`ry`,6),R(()=>{J(n,`width`,136),J(n,`height`,40),J(n,`fill`,z(p)),J(r,`d`,`M2,46 A68,6 0 0,0 138,46 L138,6 A68,6 0 0,1 2,6 Z`),J(r,`fill`,z(p)),J(r,`stroke`,z(m)),J(r,`stroke-width`,z(h)),J(i,`cx`,70),J(i,`rx`,68),J(i,`fill`,z(p)),J(i,`stroke`,z(m)),J(i,`stroke-width`,z(h))}),H(e,t)},w=e=>{var t=QP();R(()=>{J(t,`points`,`70,2 138,13 138,39 70,50 2,39 2,13`),J(t,`fill`,z(p)),J(t,`stroke`,z(m)),J(t,`stroke-width`,z(h))}),H(e,t)},T=e=>{var t=$P();J(t,`x`,2),J(t,`y`,2),J(t,`rx`,8),R(()=>{J(t,`width`,136),J(t,`height`,48),J(t,`fill`,z(p)),J(t,`stroke`,z(m)),J(t,`stroke-width`,z(h))}),H(e,t)};W(S,e=>{z(t).nodeType===`database`?e(C):z(t).nodeType===`messaging`?e(w,1):e(T,-1)}),D(y);var ee=L(y),te=e=>{var t=eF();J(t,`x`,0),J(t,`y`,0),J(t,`rx`,8),J(t,`opacity`,.4),R(()=>{J(t,`width`,140),J(t,`height`,52)}),H(e,t)},ne=M(()=>z(r)&&!z(a)&&!z(x).some(e=>e.source===z(t).id||e.target===z(t).id));W(ee,e=>{z(ne)&&e(te)});var re=L(ee),ie=F(re,!0);D(re);var ae=L(re),oe=F(ae),se=L(oe),ce=e=>{var n=tF(),r=F(n);D(n),R(()=>U(r,` · ${z(t).errorCount??``} err`)),H(e,n)};W(se,e=>{z(s)&&e(ce)}),D(ae),D(g),R((e,r)=>{J(g,`data-node`,z(t).id),J(g,`transform`,`translate(${z(n).x}, ${z(n).y})`),q(g,0,e),J(g,`aria-label`,z(t).name),J(re,`x`,70),J(re,`y`,23),U(ie,r),J(ae,`x`,70),J(ae,`y`,38),U(oe,`${z(t).requestCount??``} span${z(t).requestCount===1?``:`s`} `)},[()=>K($(`cursor-pointer`,z(u)&&`opacity-30`)),()=>z(t).name.length>16?z(t).name.slice(0,14)+`…`:z(t).name]),B(`click`,g,()=>P(r,z(a)?null:z(t).id,!0)),B(`keydown`,g,e=>b(e,z(t).id)),$i(`mouseenter`,g,()=>P(i,z(t).id,!0)),$i(`mouseleave`,g,()=>P(i,null)),H(e,g)};W(o,e=>{z(n)&&e(s)}),H(e,a)}),D(ce),D(se),Vo(se,e=>P(_,e),()=>z(_));var E=L(se,2),ue=F(E);lh(F(ue),{size:14}),D(ue);var de=L(ue,2);Vm(F(de),{size:14}),D(de);var fe=L(de,2);yh(F(fe),{size:14}),D(fe);var pe=L(fe,2);hh(F(pe),{size:14}),D(pe),D(E),D(oe);var me=L(oe,2),he=e=>{var t=sF(),n=F(t),i=F(n),a=F(i),o=F(a),s=F(o,!0);D(o),Q_(L(o,2),{get value(){return z(y).name},label:`Copy service name`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(a);var c=L(a,2);D(i);var l=L(i,2);P_(l,{get content(){return z(C)},children:(e,t)=>{var n=rF(),r=F(n);{let e=M(()=>z(y).requestCount.toString());WP(r,()=>`Requests`,()=>z(e))}var i=L(r,2);{let e=M(()=>z(y).errorCount.toString());WP(i,()=>`Errors`,()=>z(e),()=>z(y).errorCount>0)}var a=L(i,2);{let e=M(()=>`${(z(y).errorCount/z(y).requestCount*100).toFixed(1)}%`);WP(a,()=>`Error Rate`,()=>z(e),()=>z(y).errorCount>0)}var o=L(a,2);{let e=M(()=>ad(z(y).avgLatency));WP(o,()=>`Avg Latency`,()=>z(e))}var s=L(o,2);{let e=M(()=>ad(z(y).minLatency));WP(s,()=>`Min Latency`,()=>z(e))}var c=L(s,2);{let e=M(()=>ad(z(y).maxLatency));WP(c,()=>`Max Latency`,()=>z(e))}D(n),H(e,n)},$$slots:{default:!0}});var u=L(l,2),d=e=>{var t=oF(),n=F(t);Q_(L(F(n),2),{get value(){return z(S)},label:`Copy connections`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(n);var i=L(n,2);G(i,21,()=>z(x),e=>e.id,(e,t)=>{var n=aF(),i=F(n),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=e=>{rp(e,{size:10})},l=e=>{rp(e,{size:10,class:`rotate-180`})};W(s,e=>{z(t).source===z(r)?e(c):e(l,-1)}),D(i);var u=L(i,2),d=F(u),f=F(d);D(d);var p=L(d,2),m=e=>{var n=iF(),r=F(n);D(n),R(()=>U(r,`${z(t).errorCount??``} err`)),H(e,n)};W(p,e=>{z(t).errorCount>0&&e(m)});var h=L(p,2),g=F(h,!0);D(h),D(u),D(n),R(e=>{U(o,z(t).source===z(r)?z(t).target:z(t).source),U(f,`${z(t).requestCount??``} req`),U(g,e)},[()=>ad(z(t).avgLatency)]),H(e,n)}),D(i),D(t),H(e,t)};W(u,e=>{z(x).length>0&&e(d)}),D(n),D(t),R(()=>U(s,z(y).name)),B(`click`,c,()=>P(r,null)),H(e,t)};W(me,e=>{z(y)&&e(he)}),D(ae),Ke(2),D(t),R(e=>{U(w,` Service Map (${(z(l)?`${z(d).length} of ${z(s).length}`:z(s).length)??``} services)`),U(ee,`${z(c).length??``} connections`),J(se,`viewBox`,`0 0 ${z(h)} ${z(g)}`),q(se,0,e),J(ce,`transform`,`translate(${v.translate.x}, ${v.translate.y}) scale(${v.scale})`)},[()=>K($(`w-full h-full`,v.isPanning?`cursor-grabbing`:`cursor-grab`))]),$i(`wheel`,se,function(...e){v.onWheel?.apply(this,e)}),B(`pointerdown`,se,function(...e){v.onPointerDown?.apply(this,e)}),B(`pointermove`,se,function(...e){v.onPointerMove?.apply(this,e)}),B(`pointerup`,se,function(...e){v.onPointerEnd?.apply(this,e)}),$i(`pointercancel`,se,function(...e){v.onPointerEnd?.apply(this,e)}),$i(`pointerleave`,se,function(...e){v.onPointerEnd?.apply(this,e)}),B(`click`,ue,function(...e){v.zoomIn?.apply(this,e)}),B(`click`,de,function(...e){v.zoomOut?.apply(this,e)}),B(`click`,fe,function(...e){v.fit?.apply(this,e)}),B(`click`,pe,function(...e){v.reset?.apply(this,e)}),H(e,t)};W(T,e=>{z(n).length===0?e(ee):z(s).length===0?e(te,1):e(ne,-1)}),H(e,w),at()}ea([`pointerdown`,`pointermove`,`pointerup`,`click`,`keydown`]);async function uF(e,t=``){let n=t?`?q=${encodeURIComponent(t)}`:``;return pF(`${e.baseUrl}/api/metrics${n}`,{method:`GET`,signal:e.signal},e,e=>e.metrics??[])}async function dF(e,t){let n={name:e.name};return e.window&&(n.window=e.window),n.maxPoints=e.maxPoints??1500,pF(`${t.baseUrl}/api/query/metrics`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(n),signal:t.signal},t,e=>e.series??[])}async function fF(e,t){return pF(`${t.baseUrl}/api/metrics?name=${encodeURIComponent(e)}`,{method:`DELETE`,signal:t.signal},t,e=>e.deletedSeries??0)}async function pF(e,t,n,r){let i;try{i=await n.fetch(e,t)}catch(e){return mF(e)?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}if(i.status===403)return{status:`error`,message:`Forbidden: the devtools server rejected this origin. Open the viewer from the same machine.`};let a;try{a=await i.json()}catch{return{status:`error`,message:`Unexpected response from ${n.baseUrl} (not JSON)`}}return i.ok?{status:`ok`,data:r(a)}:{status:`error`,message:`Server error: ${a.error??i.statusText}`}}function mF(e){return typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`}function hF(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function gF(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function _F(e){let t,n,r;e.length===2?(t=e===hF||e===gF?e:vF,n=e,r=e):(t=hF,n=(t,n)=>hF(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function vF(){return 0}function yF(e){return e===null?NaN:+e}var bF=_F(hF),xF=bF.right;bF.left,_F(yF).center;var SF=Math.sqrt(50),CF=Math.sqrt(10),wF=Math.sqrt(2);function TF(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=SF?10:a>=CF?5:a>=wF?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?TF(e,t,n*2):[s,c,l]}function EF(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?TF(t,e,n):TF(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r){if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o}else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function DF(e,t,n){return t=+t,e=+e,n=+n,TF(e,t,n)[2]}function OF(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?DF(t,e,n):DF(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function kF(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function AF(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function jF(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function MF(){}var NF=.7,PF=1/NF,FF=`\\s*([+-]?\\d+)\\s*`,IF=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,LF=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,RF=/^#([0-9a-f]{3,8})$/,zF=RegExp(`^rgb\\(${FF},${FF},${FF}\\)$`),BF=RegExp(`^rgb\\(${LF},${LF},${LF}\\)$`),VF=RegExp(`^rgba\\(${FF},${FF},${FF},${IF}\\)$`),HF=RegExp(`^rgba\\(${LF},${LF},${LF},${IF}\\)$`),UF=RegExp(`^hsl\\(${IF},${LF},${LF}\\)$`),WF=RegExp(`^hsla\\(${IF},${LF},${LF},${IF}\\)$`),GF={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};AF(MF,XF,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:KF,formatHex:KF,formatHex8:qF,formatHsl:JF,formatRgb:YF,toString:YF});function KF(){return this.rgb().formatHex()}function qF(){return this.rgb().formatHex8()}function JF(){return lI(this).formatHsl()}function YF(){return this.rgb().formatRgb()}function XF(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=RF.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?ZF(t):n===3?new tI(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?QF(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?QF(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=zF.exec(e))?new tI(t[1],t[2],t[3],1):(t=BF.exec(e))?new tI(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=VF.exec(e))?QF(t[1],t[2],t[3],t[4]):(t=HF.exec(e))?QF(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=UF.exec(e))?cI(t[1],t[2]/100,t[3]/100,1):(t=WF.exec(e))?cI(t[1],t[2]/100,t[3]/100,t[4]):GF.hasOwnProperty(e)?ZF(GF[e]):e===`transparent`?new tI(NaN,NaN,NaN,0):null}function ZF(e){return new tI(e>>16&255,e>>8&255,e&255,1)}function QF(e,t,n,r){return r<=0&&(e=t=n=NaN),new tI(e,t,n,r)}function $F(e){return e instanceof MF||(e=XF(e)),e?(e=e.rgb(),new tI(e.r,e.g,e.b,e.opacity)):new tI}function eI(e,t,n,r){return arguments.length===1?$F(e):new tI(e,t,n,r??1)}function tI(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}AF(tI,eI,jF(MF,{brighter(e){return e=e==null?PF:PF**+e,new tI(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?NF:NF**+e,new tI(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tI(oI(this.r),oI(this.g),oI(this.b),aI(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:nI,formatHex:nI,formatHex8:rI,formatRgb:iI,toString:iI}));function nI(){return`#${sI(this.r)}${sI(this.g)}${sI(this.b)}`}function rI(){return`#${sI(this.r)}${sI(this.g)}${sI(this.b)}${sI((isNaN(this.opacity)?1:this.opacity)*255)}`}function iI(){let e=aI(this.opacity);return`${e===1?`rgb(`:`rgba(`}${oI(this.r)}, ${oI(this.g)}, ${oI(this.b)}${e===1?`)`:`, ${e})`}`}function aI(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function oI(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function sI(e){return e=oI(e),(e<16?`0`:``)+e.toString(16)}function cI(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new dI(e,t,n,r)}function lI(e){if(e instanceof dI)return new dI(e.h,e.s,e.l,e.opacity);if(e instanceof MF||(e=XF(e)),!e)return new dI;if(e instanceof dI)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new dI(o,s,c,e.opacity)}function uI(e,t,n,r){return arguments.length===1?lI(e):new dI(e,t,n,r??1)}function dI(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}AF(dI,uI,jF(MF,{brighter(e){return e=e==null?PF:PF**+e,new dI(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?NF:NF**+e,new dI(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new tI(mI(e>=240?e-240:e+120,i,r),mI(e,i,r),mI(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new dI(fI(this.h),pI(this.s),pI(this.l),aI(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=aI(this.opacity);return`${e===1?`hsl(`:`hsla(`}${fI(this.h)}, ${pI(this.s)*100}%, ${pI(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function fI(e){return e=(e||0)%360,e<0?e+360:e}function pI(e){return Math.max(0,Math.min(1,e||0))}function mI(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var hI=e=>()=>e;function gI(e,t){return function(n){return e+n*t}}function _I(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function vI(e){return(e=+e)==1?yI:function(t,n){return n-t?_I(t,n,e):hI(isNaN(t)?n:t)}}function yI(e,t){var n=t-e;return n?gI(e,n):hI(isNaN(e)?t:e)}var bI=(function e(t){var n=vI(t);function r(e,t){var r=n((e=eI(e)).r,(t=eI(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=yI(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function xI(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function SI(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function CI(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=MI(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function wI(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function TI(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function EI(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=MI(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var DI=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,OI=new RegExp(DI.source,`g`);function kI(e){return function(){return e}}function AI(e){return function(t){return e(t)+``}}function jI(e,t){var n=DI.lastIndex=OI.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=DI.exec(e))&&(i=OI.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:TI(r,i)})),n=OI.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?AI(c[0].x):kI(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function MI(e,t){var n=typeof t,r;return t==null||n===`boolean`?hI(t):(n===`number`?TI:n===`string`?(r=XF(t))?(t=r,bI):jI:t instanceof XF?bI:t instanceof Date?wI:SI(t)?xI:Array.isArray(t)?CI:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?EI:TI)(e,t)}function NI(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function PI(e){return function(){return e}}function FI(e){return+e}var II=[0,1];function LI(e){return e}function RI(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:PI(isNaN(t)?NaN:.5)}function zI(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function BI(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=RI(i,r),a=n(o,a)):(r=RI(r,i),a=n(a,o)),function(e){return a(r(e))}}function VI(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=RI(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=xF(e,t,1,r)-1;return a[n](i[n](t))}}function HI(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function UI(){var e=II,t=II,n=MI,r,i,a,o=LI,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==LI&&(o=zI(e[0],e[n-1])),s=n>2?VI:BI,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||(c=s(e.map(r),t,n)))(r(o(i)))}return d.invert=function(n){return o(i((l||(l=s(t,e.map(r),TI)))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,FI),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=NI,u()},d.clamp=function(e){return arguments.length?(o=e?!0:LI,u()):o!==LI},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function WI(){return UI()(LI,LI)}function GI(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function KI(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function qI(e){return e=KI(Math.abs(e)),e?e[1]:NaN}function JI(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function YI(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var XI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ZI(e){if(!(t=XI.exec(e)))throw Error(`invalid format: `+e);var t;return new QI({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}ZI.prototype=QI.prototype;function QI(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}QI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function $I(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var eL;function tL(e,t){var n=KI(e,t);if(!n)return e+``;var r=n[0],i=n[1],a=i-(eL=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+KI(e,Math.max(0,t+a-1))[0]}function nL(e,t){var n=KI(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var rL={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:GI,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>nL(e*100,t),r:nL,s:tL,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function iL(e){return e}var aL=Array.prototype.map,oL=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function sL(e){var t=e.grouping===void 0||e.thousands===void 0?iL:JI(aL.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?iL:YI(aL.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e){e=ZI(e);var l=e.fill,u=e.align,d=e.sign,f=e.symbol,p=e.zero,m=e.width,h=e.comma,g=e.precision,_=e.trim,v=e.type;v===`n`?(h=!0,v=`g`):rL[v]||(g===void 0&&(g=12),_=!0,v=`g`),(p||l===`0`&&u===`=`)&&(p=!0,l=`0`,u=`=`);var y=f===`$`?n:f===`#`&&/[boxX]/.test(v)?`0`+v.toLowerCase():``,b=f===`$`?r:/[%p]/.test(v)?o:``,x=rL[v],S=/[defgprs%]/.test(v);g=g===void 0?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function C(e){var n=y,r=b,o,f,C;if(v===`c`)r=x(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),g),_&&(e=$I(e)),w&&+e==0&&d!==`+`&&(w=!1),n=(w?d===`(`?d:s:d===`-`||d===`(`?``:d)+n,r=(v===`s`?oL[8+eL/3]:``)+r+(w&&d===`(`?`)`:``),S){for(o=-1,f=e.length;++o<f;)if(C=e.charCodeAt(o),48>C||C>57){r=(C===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}h&&!p&&(e=t(e,1/0));var T=n.length+e.length+r.length,ee=T<m?Array(m-T+1).join(l):``;switch(h&&p&&(e=t(ee+e,ee.length?m-r.length:1/0),ee=``),u){case`<`:e=n+e+r+ee;break;case`=`:e=n+ee+e+r;break;case`^`:e=ee.slice(0,T=ee.length>>1)+n+e+r+ee.slice(T);break;default:e=ee+n+e+r}return a(e)}return C.toString=function(){return e+``},C}function u(e,t){var n=l((e=ZI(e),e.type=`f`,e)),r=Math.max(-8,Math.min(8,Math.floor(qI(t)/3)))*3,i=10**-r,a=oL[8+r/3];return function(e){return n(i*e)+a}}return{format:l,formatPrefix:u}}var cL,lL,uL;dL({thousands:`,`,grouping:[3],currency:[`$`,``]});function dL(e){return cL=sL(e),lL=cL.format,uL=cL.formatPrefix,cL}function fL(e){return Math.max(0,-qI(Math.abs(e)))}function pL(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(qI(t)/3)))*3-qI(Math.abs(e)))}function mL(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,qI(t)-qI(e))+1}function hL(e,t,n,r){var i=OF(e,t,n),a;switch(r=ZI(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=pL(i,o))&&(r.precision=a),uL(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=mL(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=fL(i))&&(r.precision=a-(r.type===`%`)*2)}return lL(r)}function gL(e){var t=e.domain;return e.ticks=function(e){var n=t();return EF(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return hL(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=DF(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function _L(){var e=WI();return e.copy=function(){return HI(e,_L())},kF.apply(e,arguments),gL(e)}function vL(e){return function(){return e}}var yL=Math.PI,bL=2*yL,xL=1e-6,SL=bL-xL;function CL(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function wL(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return CL;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var TL=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?CL:wL(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>xL){if(!(Math.abs(u*s-c*l)>xL)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((yL-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>xL&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>xL||Math.abs(this._y1-l)>xL)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%bL+bL),d>SL?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>xL&&this._append`A${n},${n},0,${+(d>=yL)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};TL.prototype;function EL(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new TL(t)}Array.prototype.slice;function DL(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function OL(e){this._context=e}OL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function kL(e){return new OL(e)}function AL(e){return e[0]}function jL(e){return e[1]}function ML(e,t){var n=vL(!0),r=null,i=kL,a=null,o=EL(s);e=typeof e==`function`?e:e===void 0?AL:vL(e),t=typeof t==`function`?t:t===void 0?jL:vL(t);function s(s){var c,l=(s=DL(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:vL(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:vL(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:vL(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function NL(e,t,n){var r=null,i=vL(!0),a=null,o=kL,s=null,c=EL(l);e=typeof e==`function`?e:e===void 0?AL:vL(+e),t=typeof t==`function`?t:vL(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?jL:vL(+n);function l(l){var u,d,f,p=(l=DL(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return ML().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:vL(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:vL(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:vL(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:vL(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:vL(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:vL(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:vL(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var PL=ca(`<svg role="img"><path fill="none" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"></path></svg>`),FL=V(`<span>—</span>`);function IL(e,t){it(t,!0);let n=Z(t,`width`,3,80),r=Z(t,`height`,3,20),i=Z(t,`color`,3,`var(--color-accent)`),a=M(()=>t.points.map(e=>e.value??0)),o=M(()=>{if(t.points.length<2)return null;let e=_L().domain([t.points[0].timestamp,t.points[t.points.length-1].timestamp]).range([1,n()-1]),i=Math.min(...z(a)),o=Math.max(...z(a)),s=_L().domain(i===o?[i-1,o+1]:[i,o]).range([r()-1,1]);return ML().x(t=>e(t.timestamp)).y(e=>s(e.value??0))(t.points)});var s=la(),c=I(s),l=e=>{var a=PL(),s=F(a);D(a),R(e=>{J(a,`width`,n()),J(a,`height`,r()),J(a,`viewBox`,`0 0 ${n()??``} ${r()??``}`),J(a,`aria-label`,t.ariaLabel??`Sparkline, ${t.points.length} points`),q(a,0,e),J(s,`d`,z(o)),J(s,`stroke`,i())},[()=>K($(`overflow-visible`,t.class))]),H(e,a)},u=e=>{var i=FL();R(e=>{q(i,1,e),oo(i,`width:${n()??``}px;height:${r()??``}px`)},[()=>K($(`text-[10px] text-fg-subtle`,t.class))]),H(e,i)};W(c,e=>{z(o)?e(l):e(u,-1)}),H(e,s),at()}function LL(e,t){if(t===void 0)return e;if(t===`cumulative`&&e.length<2)return[];let n=[],r=+(t===`cumulative`);for(let i=r;i<e.length;i++){let r=e[i-1],a=r?.value??0,o=e[i].value??0,s=o;t===`cumulative`&&o>=a&&(s=o-a);let c=e[i].startTimestamp??r?.timestamp,l=c===void 0?0:(e[i].timestamp-c)/1e3;n.push({...e[i],value:l>0?s/l:s})}return n}function RL(e,t,n){if(e.length!==t.length+1)return;let r=e.reduce((e,t)=>e+t,0);if(r===0)return;let i=n*r,a=0;for(let n=0;n<e.length;n++){let r=e[n];if(a+r>=i){let e=n===0?0:t[n-1],o=n<t.length?t[n]:t[t.length-1];if(r===0)return o;let s=(i-a)/r;return e+(o-e)*s}a+=r}return t[t.length-1]}function zL(e,t){return e.length===t.length+1?t.length===0?[{label:`all`,count:e[0],from:-1/0,to:1/0}]:e.map((e,n)=>{let r=n===0?-1/0:t[n-1],i=n<t.length?t[n]:1/0;return{label:n===0?`≤${KL(t[0])}`:n===t.length?`>${KL(t[t.length-1])}`:`${KL(t[n-1])}–${KL(t[n])}`,count:e,from:r,to:i}}):[]}function BL(e){if(e.bucketCounts&&e.explicitBounds)return zL(e.bucketCounts,e.explicitBounds);if(e.scale===void 0)return[];let t=2**2**-e.scale,n=[];if(VL(n,e.negative,t,!0),e.zeroCount!==void 0){let t=e.zeroThreshold??0;n.push({label:t>0?`−${KL(t)}–${KL(t)}`:`0`,count:e.zeroCount,from:-t,to:t})}return VL(n,e.positive,t,!1),n.sort((e,t)=>e.from-t.from)}function VL(e,t,n,r){if(t)for(let i=0;i<t.bucketCounts.length;i++){let a=t.offset+i,o=n**a,s=n**(a+1),c=r?-s:o,l=r?-o:s;e.push({label:`${KL(c)}–${KL(l)}`,count:t.bucketCounts[i],from:c,to:l})}}function HL(e,t){if(e.bucketCounts&&e.explicitBounds)return RL(e.bucketCounts,e.explicitBounds,t);let n=BL(e),r=n.reduce((e,t)=>e+t.count,0);if(r===0)return;let i=t*r,a=0;for(let e of n){if(a+e.count>=i)return e.count===0?e.to:e.from+(i-a)/e.count*(e.to-e.from);a+=e.count}return n[n.length-1]?.to}function UL(e,t){if(e.length===0)return;let n=e.map(e=>e.value??0);switch(t){case`sum`:return n.reduce((e,t)=>e+t,0);case`avg`:return n.reduce((e,t)=>e+t,0)/n.length;case`min`:return Math.min(...n);case`max`:return Math.max(...n);case`last`:return n[n.length-1];case`count`:return e.length}}function WL(e,t,n){if(!Number.isFinite(e)||!Number.isFinite(t)||e===t)return[e];let r=(t-e)/Math.max(1,n),i=10**Math.floor(Math.log10(r)),a=r/i,o=(a<=1?1:a<=2?2:a<=5?5:10)*i,s=Math.floor(e/o)*o,c=Math.ceil(t/o)*o,l=[],u=Math.round((c-s)/o);for(let e=0;e<=u;e++)l.push(s+e*o);return l}function GL(e,t){if(e.length<=t||t<3)return e;let n=Math.max(1,Math.floor((t-2)/2)),r=e.length/n,i=new Map;i.set(0,e[0]),i.set(e.length-1,e[e.length-1]);for(let t=0;t<n;t++){let n=Math.floor(t*r),a=Math.min(e.length,Math.floor((t+1)*r));if(n>=a)continue;let o=n,s=n;for(let t=n;t<a;t++){let n=e[t].value??0;n<(e[o].value??0)&&(o=t),n>(e[s].value??0)&&(s=t)}i.set(o,e[o]),i.set(s,e[s])}return[...i.entries()].sort((e,t)=>e[0]-t[0]).map(([,e])=>e)}function KL(e){return Number.isFinite(e)?Math.abs(e)>=1e3?e.toLocaleString(void 0,{maximumFractionDigits:0}):String(Math.round(e*100)/100):`∞`}function qL(e){if(e.length===0)return[];let t=[...new Set(e.flatMap(e=>e.map(e=>e.timestamp)))].sort((e,t)=>e-t),n=e.map(e=>new Map(e.map(e=>[e.timestamp,e.value??0]))),r=new Map(t.map(e=>[e,0]));return n.map(e=>t.map(t=>{let n=r.get(t)??0,i=e.get(t)??0,a=n+Math.max(0,i);return r.set(t,a),{timestamp:t,y0:n,y1:a}}))}function JL(e,t){return t.map(t=>({quantile:t,points:e.flatMap(e=>{let n=HL(e,t);return n===void 0?[]:[{timestamp:e.timestamp,value:n}]})}))}function YL(e){let t=e.filter(e=>BL(e).length>0);if(t.length===0)return{columns:[],rows:[],max:0};let n=t[0],r=BL(n),i=r.map(e=>({label:e.label,from:e.from,to:e.to}));if(i.length===0)return{columns:[],rows:[],max:0};let a=t.filter(e=>BL(e).length===r.length&&BL(e).every((e,t)=>e.label===r[t].label)),o=Math.max(0,...a.flatMap(e=>BL(e).map(e=>e.count)));return{columns:a.slice().sort((e,t)=>e.timestamp-t.timestamp).map(e=>({timestamp:e.timestamp,cells:BL(e).map(({count:e})=>({count:e,intensity:o>0?e/o:0}))})),rows:i,max:o}}var XL=V(`<div>No data in this window</div>`),ZL=ca(`<line x1="0" stroke="var(--color-line-subtle)" stroke-width="1"></line><text x="-6" text-anchor="end" dominant-baseline="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`,1),QL=ca(`<text text-anchor="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`),$L=ca(`<path opacity="0.75" stroke="var(--color-surface)" stroke-width="0.5" data-testid="stack-band"></path>`),eR=ca(`<path opacity="0.15"></path>`),tR=ca(`<path fill="none" stroke-width="1.5" stroke-linejoin="round"></path>`),nR=ca(`<circle r="2.5"></circle>`),rR=ca(`<!><!>`,1),iR=ca(`<circle r="3.5" fill="var(--color-warning)" stroke="var(--color-surface)" stroke-width="1" role="button" tabindex="0" class="cursor-pointer"></circle>`),aR=ca(`<svg role="img"><g><!><!><!><!></g></svg>`);function oR(e,t){it(t,!0);let n=Z(t,`width`,3,640),r=Z(t,`height`,3,220),i=Z(t,`area`,3,!1),a=Z(t,`stacked`,3,!1),o={top:8,right:12,bottom:22,left:44},s=M(()=>Math.max(1,n()-o.left-o.right)),c=M(()=>Math.max(1,r()-o.top-o.bottom)),l=M(()=>t.series.map(e=>({...e,points:GL(e.points,400)}))),u=M(()=>z(l).filter(e=>!t.isolated?.size||t.isolated.has(e.seriesId))),d=M(()=>a()?qL(z(u).map(e=>e.points)):null),f=M(()=>{let e=z(u).flatMap(e=>e.points);if(e.length===0)return null;let t=e.map(e=>e.timestamp),n=z(d)?z(d).flatMap(e=>e.map(e=>e.y1)):e.map(e=>e.value??0),r=Math.min(...t),i=Math.max(...t),a=Math.min(0,...n),o=Math.max(...n);return{minTime:r,maxTime:i===r?r+1:i,minValue:a,maxValue:o===a?a+1:o}}),p=M(()=>z(f)?_L().domain([z(f).minTime,z(f).maxTime]).range([0,z(s)]):null),m=M(()=>z(f)?_L().domain([z(f).minValue,z(f).maxValue]).range([z(c),0]):null),h=M(()=>z(f)?WL(z(f).minValue,z(f).maxValue,4):[]),g=M(()=>z(f)?WL(z(f).minTime,z(f).maxTime,4):[]);function _(e){return!z(p)||!z(m)||e.length===0||e.length===1?null:ML().x(e=>z(p)(e.timestamp)).y(e=>z(m)(e.value??0))(e)}function v(e){return!z(p)||!z(m)||e.length<2?null:NL().x(e=>z(p)(e.timestamp)).y0(z(m)(Math.max(0,z(f)?.minValue??0))).y1(e=>z(m)(e.value??0))(e)}function y(e){return hg(e.seriesId).stroke}function b(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function x(e){return Math.abs(e)>=1e3?e.toLocaleString(void 0,{maximumFractionDigits:0}):String(Math.round(e*1e3)/1e3)}function S(e){return!z(p)||!z(m)||e.length<2?null:NL().x(e=>z(p)(e.timestamp)).y0(e=>z(m)(e.y0)).y1(e=>z(m)(e.y1))(e)}let C=M(()=>!z(p)||!z(m)?[]:z(u).flatMap(e=>e.points.flatMap(t=>(t.exemplars??[]).filter(e=>e.traceId).map(n=>({key:`${e.seriesId}:${n.timestamp}:${n.traceId}`,x:z(p)(n.timestamp||t.timestamp),y:z(m)(n.value),traceId:n.traceId,spanId:n.spanId,value:n.value})))));var w=la(),T=I(w),ee=e=>{var n=XL();R(e=>{q(n,1,e),oo(n,`height:${r()??``}px`)},[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,n)},te=e=>{var a=aR(),l=F(a),f=F(l);G(f,16,()=>z(h),e=>e,(e,t)=>{let n=M(()=>z(m)?z(m)(t):0);var r=la(),i=I(r),a=e=>{var r=ZL(),i=I(r),a=L(i),o=F(a,!0);D(a),R(e=>{J(i,`x2`,z(s)),J(i,`y1`,z(n)),J(i,`y2`,z(n)),J(a,`y`,z(n)),U(o,e)},[()=>x(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(c)&&e(a)}),H(e,r)});var w=L(f);G(w,16,()=>z(g),e=>e,(e,t)=>{let n=M(()=>z(p)?z(p)(t):0);var r=la(),i=I(r),a=e=>{var r=QL(),i=F(r,!0);D(r),R(e=>{J(r,`x`,z(n)),J(r,`y`,z(c)+14),U(i,e)},[()=>b(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(s)&&e(a)}),H(e,r)});var T=L(w),ee=e=>{var t=la();G(I(t),19,()=>z(u),e=>e.seriesId,(e,t,n)=>{let r=M(()=>S(z(d)[z(n)]));var i=la(),a=I(i),o=e=>{var n=$L();R(e=>{J(n,`d`,z(r)),J(n,`fill`,e)},[()=>y(z(t))]),H(e,n)};W(a,e=>{z(r)&&e(o)}),H(e,i)}),H(e,t)},te=e=>{var t=la();G(I(t),17,()=>z(u),e=>e.seriesId,(e,t)=>{let n=M(()=>_(z(t).points));var r=rR(),a=I(r),o=e=>{let n=M(()=>v(z(t).points));var r=la(),i=I(r),a=e=>{var r=eR();R(e=>{J(r,`d`,z(n)),J(r,`fill`,e)},[()=>y(z(t))]),H(e,r)};W(i,e=>{z(n)&&e(a)}),H(e,r)};W(a,e=>{i()&&e(o)});var s=L(a),c=e=>{var r=tR();R(e=>{J(r,`d`,z(n)),J(r,`stroke`,e)},[()=>y(z(t))]),H(e,r)},l=e=>{var n=nR();R((e,t,r)=>{J(n,`cx`,e),J(n,`cy`,t),J(n,`fill`,r)},[()=>z(p)?z(p)(z(t).points[0].timestamp):0,()=>z(m)?z(m)(z(t).points[0].value??0):0,()=>y(z(t))]),H(e,n)};W(s,e=>{z(n)?e(c):z(t).points.length===1&&e(l,1)}),H(e,r)}),H(e,t)};W(T,e=>{z(d)?e(ee):e(te,-1)}),G(L(T),17,()=>z(C),e=>e.key,(e,n)=>{var r=iR();R(e=>{J(r,`cx`,z(n).x),J(r,`cy`,z(n).y),J(r,`aria-label`,`Open trace ${z(n).traceId??``} (${e??``})`)},[()=>x(z(n).value)]),B(`click`,r,()=>t.onExemplar?.(z(n).traceId,z(n).spanId)),B(`keydown`,r,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t.onExemplar?.(z(n).traceId,z(n).spanId))}),H(e,r)}),D(l),D(a),R(e=>{J(a,`width`,n()),J(a,`height`,r()),J(a,`viewBox`,`0 0 ${n()??``} ${r()??``}`),J(a,`aria-label`,`Time series chart, ${z(u).length??``} series`),q(a,0,e),J(l,`transform`,`translate(${o.left??``},${o.top??``})`)},[()=>K($(`overflow-visible`,t.class))]),H(e,a)};W(T,e=>{z(f)?e(te,-1):e(ee)}),H(e,w),at()}ea([`click`,`keydown`]);var sR=V(`<div>No bucket data on this point</div>`),cR=V(`<div class="flex-1 flex flex-col items-center justify-end h-full gap-1"><span class="text-[10px] text-fg-subtle tabular-nums"> </span> <div class="w-full rounded-t bg-accent/70 hover:bg-accent transition-colors"></div> <span class="text-[10px] text-fg-subtle truncate w-full text-center"> </span></div>`),lR=V(`<span><span class="text-fg-subtle"> </span> <span class="font-mono text-fg"> </span></span>`),uR=V(`<span class="ml-auto"><span class="text-fg-subtle">count</span> <span class="font-mono text-fg"> </span></span>`),dR=V(`<div><div class="flex items-end gap-1" role="img"></div> <div class="flex items-center gap-4 text-[11px] text-fg-muted border-t border-line pt-2"><!> <!></div></div>`);function fR(e,t){it(t,!0);let n=Z(t,`height`,3,160),r=M(()=>BL(t.point)),i=M(()=>Math.max(1,...z(r).map(e=>e.count))),a=M(()=>z(r).reduce((e,t)=>e+t.count,0)),o=M(()=>[.5,.9,.99].map(e=>({label:`p${e*100}`,value:HL(t.point,e)})));function s(e){if(e===void 0)return`—`;let n=Math.round(e*100)/100;return t.unit?`${n}${t.unit}`:String(n)}function c(e){return z(a)===0?`0%`:`${Math.round(e/z(a)*100)}%`}var l=la(),u=I(l),d=e=>{var r=sR();R(e=>{q(r,1,e),oo(r,`height:${n()??``}px`)},[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,r)},f=e=>{var l=dR(),u=F(l);G(u,21,()=>z(r),e=>e.label,(e,t)=>{var n=cR(),r=F(n),a=F(r,!0);D(r);var o=L(r,2),s=L(o,2),l=F(s,!0);D(s),D(n),R(e=>{U(a,z(t).count),oo(o,`height:${z(t).count/z(i)*100}%`),J(o,`title`,`${z(t).label??``}: ${z(t).count??``} (${e??``})`),U(l,z(t).label)},[()=>c(z(t).count)]),H(e,n)}),D(u);var d=L(u,2),f=F(d);G(f,17,()=>z(o),e=>e.label,(e,t)=>{var n=lR(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a,!0);D(a),D(n),R(e=>{U(i,z(t).label),U(o,e)},[()=>s(z(t).value)]),H(e,n)});var p=L(f,2),m=e=>{var n=uR(),r=L(F(n),2),i=F(r,!0);D(r),D(n),R(()=>U(i,t.point.count)),H(e,n)};W(p,e=>{t.point.count!==void 0&&e(m)}),D(d),D(l),R(e=>{q(l,1,e),oo(u,`height:${n()??``}px`),J(u,`aria-label`,`Histogram, ${z(r).length??``} buckets, ${z(a)??``} observations`)},[()=>K($(`flex flex-col gap-2`,t.class))]),H(e,l)};W(u,e=>{z(r).length===0?e(d):e(f,-1)}),H(e,l),at()}var pR=V(`<div>No bucketed data in this window</div>`),mR=V(`<span class="ml-0.5"> </span>`),hR=V(`<div class="text-[10px] text-fg-subtle flex items-center justify-end"> <!></div>`),gR=V(`<button type="button" class="w-full rounded-[1px] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent"></button>`),_R=V(`<div class="flex-1 min-w-[8px] flex flex-col gap-px"></div>`),vR=V(`<div><div class="flex" role="img"><div class="shrink-0 pr-2 text-right"></div> <div class="flex-1 min-w-0 overflow-x-auto"><div class="flex gap-px h-full"></div></div></div> <div class="flex items-center gap-2 text-[10px] text-fg-subtle pl-2"><span> </span> <span class="flex-1 border-t border-line-subtle"></span> <span> </span> <span class="ml-2"> </span></div></div>`);function yR(e,t){it(t,!0);let n=Z(t,`rowHeight`,3,22),r=M(()=>YL(t.points));function i(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function a(e){return e===0?`background: var(--color-subtle)`:`background: color-mix(in oklch, var(--color-accent) ${(.12+e*.88)*100}%, transparent)`}var o=la(),s=I(o),c=e=>{var n=pR();R(e=>q(n,1,e),[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded p-6`,t.class))]),H(e,n)},l=e=>{var o=vR(),s=F(o),c=F(s);G(c,21,()=>[...z(r).rows].reverse(),e=>e.label,(e,r)=>{var i=hR(),a=F(i,!0),o=L(a),s=e=>{var n=mR(),r=F(n,!0);D(n),R(()=>U(r,t.unit)),H(e,n)};W(o,e=>{t.unit&&e(s)}),D(i),R(()=>{oo(i,`height:${n()??``}px`),U(a,z(r).label)}),H(e,i)}),D(c);var l=L(c,2),u=F(l);G(u,21,()=>z(r).columns,e=>e.timestamp,(e,o)=>{var s=_R();G(s,21,()=>[...z(o).cells].reverse(),Oa,(e,s,c)=>{let l=M(()=>z(o).cells.length-1-c);var u=gR();R((e,i,a)=>{oo(u,`height:${n()??``}px; ${e??``}`),J(u,`title`,`${z(r).rows[z(l)].label??``}${t.unit??``??``} at ${i??``}: ${z(s).count??``}`),J(u,`aria-label`,`${z(r).rows[z(l)].label??``} at ${a??``}: ${z(s).count??``} observations`)},[()=>a(z(s).intensity),()=>i(z(o).timestamp),()=>i(z(o).timestamp)]),B(`click`,u,()=>t.onCell?.(z(o).timestamp,z(l))),H(e,u)}),D(s),H(e,s)}),D(u),D(l),D(s);var d=L(s,2),f=F(d),p=F(f,!0);D(f);var m=L(f,4),h=F(m,!0);D(m);var g=L(m,2),_=F(g);D(g),D(d),D(o),R((e,t,n)=>{q(o,1,e),J(s,`aria-label`,`Distribution heatmap, ${z(r).rows.length??``} buckets over ${z(r).columns.length??``} intervals, busiest cell ${z(r).max??``}`),U(p,t),U(h,n),U(_,`busiest ${z(r).max??``}`)},[()=>K($(`flex flex-col gap-1`,t.class)),()=>i(z(r).columns[0].timestamp),()=>i(z(r).columns[z(r).columns.length-1].timestamp)]),H(e,o)};W(s,e=>{z(r).columns.length===0?e(c):e(l,-1)}),H(e,o),at()}ea([`click`]);var bR=V(`<div>No bucketed data in this window</div>`),xR=ca(`<line x1="0" stroke="var(--color-line-subtle)"></line><text x="-6" text-anchor="end" dominant-baseline="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`,1),SR=ca(`<text text-anchor="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`),CR=ca(`<path fill="var(--color-accent)"></path>`),wR=ca(`<path fill="none" stroke="var(--color-accent)" stroke-width="1.25"></path>`),TR=V(`<span><span class="text-fg-subtle"> </span> <span class="font-mono text-fg ml-1"> </span></span>`),ER=V(`<div><svg role="img" class="overflow-visible"><g><!><!><!><!></g></svg> <div class="flex items-center gap-4 text-[11px] border-t border-line pt-2"></div></div>`);function DR(e,t){it(t,!0);let n=Z(t,`quantiles`,19,()=>[.5,.9,.99]),r=Z(t,`width`,3,640),i=Z(t,`height`,3,220),a={top:8,right:12,bottom:22,left:48},o=M(()=>Math.max(1,r()-a.left-a.right)),s=M(()=>Math.max(1,i()-a.top-a.bottom)),c=M(()=>[...n()].sort((e,t)=>e-t)),l=M(()=>JL(t.points,z(c))),u=M(()=>{let e=z(l).flatMap(e=>e.points);if(e.length===0)return null;let t=e.map(e=>e.timestamp),n=e.map(e=>e.value),r=Math.min(...t),i=Math.max(...t),a=Math.max(...n);return{minTime:r,maxTime:i===r?r+1:i,maxValue:a===0?1:a}}),d=M(()=>z(u)?_L().domain([z(u).minTime,z(u).maxTime]).range([0,z(o)]):null),f=M(()=>z(u)?_L().domain([0,z(u).maxValue]).range([z(s),0]):null),p=M(()=>z(u)?WL(0,z(u).maxValue,4):[]),m=M(()=>z(u)?WL(z(u).minTime,z(u).maxTime,4):[]);function h(e){return!z(d)||!z(f)||e.points.length<2?null:NL().x(e=>z(d)(e.timestamp)).y0(z(s)).y1(e=>z(f)(e.value))(e.points)}function g(e){return!z(d)||!z(f)||e.points.length<2?null:ML().x(e=>z(d)(e.timestamp)).y(e=>z(f)(e.value))(e.points)}function _(e){return .3-e*.08}function v(e){return`p${Math.round(e*100)}`}function y(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`})}function b(e){let n=Math.round(e*10)/10;return t.unit?`${n}${t.unit}`:String(n)}let x=M(()=>z(l).map(e=>({quantile:e.quantile,value:e.points[e.points.length-1]?.value})));var S=la(),C=I(S),w=e=>{var n=bR();R(e=>{q(n,1,e),oo(n,`height:${i()??``}px`)},[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,n)},T=e=>{var n=ER(),u=F(n),S=F(u),C=F(S);G(C,16,()=>z(p),e=>e,(e,t)=>{let n=M(()=>z(f)?z(f)(t):0);var r=la(),i=I(r),a=e=>{var r=xR(),i=I(r),a=L(i),s=F(a,!0);D(a),R(e=>{J(i,`x2`,z(o)),J(i,`y1`,z(n)),J(i,`y2`,z(n)),J(a,`y`,z(n)),U(s,e)},[()=>b(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(s)&&e(a)}),H(e,r)});var w=L(C);G(w,16,()=>z(m),e=>e,(e,t)=>{let n=M(()=>z(d)?z(d)(t):0);var r=la(),i=I(r),a=e=>{var r=SR(),i=F(r,!0);D(r),R(e=>{J(r,`x`,z(n)),J(r,`y`,z(s)+14),U(i,e)},[()=>y(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(o)&&e(a)}),H(e,r)});var T=L(w);G(T,19,()=>[...z(l)].reverse(),e=>e.quantile,(e,t,n)=>{let r=M(()=>h(z(t)));var i=la(),a=I(i),o=e=>{var i=CR();R((e,t)=>{J(i,`d`,z(r)),J(i,`opacity`,e),J(i,`data-testid`,`band-${t??``}`)},[()=>_(z(l).length-1-z(n)),()=>v(z(t).quantile)]),H(e,i)};W(a,e=>{z(r)&&e(o)}),H(e,i)}),G(L(T),17,()=>z(l),e=>e.quantile,(e,t)=>{let n=M(()=>g(z(t)));var r=la(),i=I(r),a=e=>{var r=wR();R(e=>{J(r,`d`,z(n)),J(r,`data-testid`,`line-${e??``}`)},[()=>v(z(t).quantile)]),H(e,r)};W(i,e=>{z(n)&&e(a)}),H(e,r)}),D(S),D(u);var ee=L(u,2);G(ee,21,()=>z(x),e=>e.quantile,(e,t)=>{var n=TR(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a,!0);D(a),D(n),R((e,t)=>{U(i,e),U(o,t)},[()=>v(z(t).quantile),()=>z(t).value===void 0?`—`:b(z(t).value)]),H(e,n)}),D(ee),D(n),R((e,t)=>{q(n,1,e),J(u,`width`,r()),J(u,`height`,i()),J(u,`viewBox`,`0 0 ${r()??``} ${i()??``}`),J(u,`aria-label`,`Percentile bands: ${t??``}`),J(S,`transform`,`translate(${a.left??``},${a.top??``})`)},[()=>K($(`flex flex-col gap-2`,t.class)),()=>z(c).map(v).join(`, `)]),H(e,n)};W(C,e=>{z(u)?e(T,-1):e(w)}),H(e,S),at()}var OR=V(`<button type="button"><!> </button>`),kR=V(`<div class="flex rounded border border-line overflow-hidden" role="group" aria-label="Chart type"></div>`),AR=V(`<option> </option>`),jR=V(`<label class="flex items-center gap-1.5 text-[11px] text-fg-muted cursor-pointer" title="Show cumulative or delta counter change per second"><input type="checkbox" class="w-3 h-3 rounded border-line"/> Rate</label>`),MR=V(`<label class="flex items-center gap-1.5 text-[11px] text-fg-muted cursor-pointer" title="Stack the series so each sits on the sum of those below"><input type="checkbox" class="w-3 h-3 rounded border-line"/> <!> Stack</label>`),NR=V(`<label class="flex items-center gap-1 text-[11px] text-fg-muted"><span class="text-fg-subtle">Summarise</span> <select aria-label="Summary statistic" class="rounded border border-line bg-surface px-1.5 py-1 text-[11px] text-fg"></select></label> <!> <!>`,1),PR=V(`<div><!> <!></div>`);function FR(e,t){it(t,!0);let n=M(()=>t.kind===`histogram`||t.kind===`exponentialHistogram`),r=M(()=>t.kind!==`gauge`),i=M(()=>t.kind===`sum`),a=[{id:`timeseries`,label:`Time series`,icon:Uh},{id:`percentiles`,label:`Percentiles`,icon:_p},{id:`heatmap`,label:`Heatmap`,icon:_m}],o=M(()=>z(n)?a:a.filter(e=>e.id===`timeseries`)),s=[{id:`sum`,label:`Sum`},{id:`avg`,label:`Avg`},{id:`min`,label:`Min`},{id:`max`,label:`Max`},{id:`last`,label:`Last`},{id:`count`,label:`Count`}];var c=PR(),l=F(c),u=e=>{var n=kR();G(n,21,()=>z(o),e=>e.id,(e,n)=>{let r=M(()=>z(n).icon);var i=OR(),a=F(i);Ra(a,()=>z(r),(e,t)=>{t(e,{size:11})});var o=L(a);D(i),R(e=>{J(i,`aria-pressed`,t.mode===z(n).id),J(i,`title`,z(n).label),q(i,1,e),U(o,` ${z(n).label??``}`)},[()=>K($(`flex items-center gap-1 px-2 py-1 text-[11px] transition-colors`,`focus-visible:outline-none focus-visible:bg-hover`,t.mode===z(n).id?`bg-selected text-fg font-medium`:`text-fg-muted hover:bg-hover`))]),B(`click`,i,()=>t.onMode(z(n).id)),H(e,i)}),D(n),H(e,n)};W(l,e=>{z(o).length>1&&e(u)});var d=L(l,2),f=e=>{var n=NR(),a=I(n),o=L(F(a),2);G(o,21,()=>s,e=>e.id,(e,t)=>{var n=AR(),r=F(n,!0);D(n);var i={};R(()=>{U(r,z(t).label),i!==(i=z(t).id)&&(n.value=(n.__value=z(t).id)??``)}),H(e,n)}),D(o);var c;co(o),D(a);var l=L(a,2),u=e=>{var n=jR(),r=F(n);xo(r),Ke(),D(n),R(()=>Co(r,t.rate)),B(`change`,r,e=>t.onRate(e.currentTarget.checked)),H(e,n)};W(l,e=>{z(i)&&e(u)});var d=L(l,2),f=e=>{var n=MR(),r=F(n);xo(r),Tm(L(r,2),{size:11}),Ke(),D(n),R(()=>Co(r,t.stacked)),B(`change`,r,e=>t.onStacked(e.currentTarget.checked)),H(e,n)};W(d,e=>{z(r)&&e(f)}),R(()=>{c!==(c=t.aggregate)&&(o.value=(o.__value=t.aggregate)??``,so(o,t.aggregate))}),B(`change`,o,e=>t.onAggregate(e.currentTarget.value)),H(e,n)};W(d,e=>{t.mode===`timeseries`&&e(f)}),D(c),R(e=>q(c,1,e),[()=>K($(`flex items-center gap-3 flex-wrap`,t.class))]),H(e,c),at()}ea([`click`,`change`]);var IR=V(`<button type="button" title="Delete this metric stream" aria-label="Delete selected metric" class="p-1.5 hover:bg-danger-bg rounded transition-colors text-fg-subtle hover:text-danger"><!></button>`),LR=V(`<div role="alert" class="m-4 rounded border border-danger-border bg-danger-bg px-3 py-2 text-xs text-danger"> </div>`),RR=V(`<div class="flex-1 flex items-center justify-center text-sm text-fg-subtle">No metrics received yet. Point an OTLP exporter at this server.</div>`),zR=V(`<span> </span>`),BR=V(`<button type="button" role="option"><div class="flex items-center justify-between gap-2"><span class="text-xs font-medium text-fg truncate"> </span> <!></div> <div class="mt-0.5 flex items-center gap-2 text-[10px] text-fg-subtle"><span class="uppercase tracking-wide"> </span> <!> <span> </span></div></button>`),VR=V(`<div class="p-3 text-xs text-fg-subtle">No metric matches that filter.</div>`),HR=V(`<div class="text-sm text-fg-subtle">Select a metric.</div>`),UR=V(`<p class="text-xs text-fg-muted mt-0.5"> </p>`),WR=V(`<div class="text-xs text-fg-subtle">No data for this metric in the selected window.</div>`),GR=V(`<button type="button"><span class="w-2.5 h-2.5 rounded-sm shrink-0"></span> <span class="truncate text-fg-muted font-mono"> </span> <span class="ml-auto font-mono text-fg tabular-nums"> </span></button>`),KR=V(`<div class="mt-3 border-t border-line pt-2 space-y-1" role="group" aria-label="Series"></div>`),qR=V(`<div class="mb-3"><h4 class="text-sm font-semibold text-fg"> </h4> <!></div> <!> <!> <!>`,1),JR=V(`<div class="flex-1 flex min-h-0"><div class="w-72 shrink-0 border-r border-line flex flex-col min-h-0"><div class="p-2 border-b border-line"><!></div> <div class="flex-1 overflow-auto" role="listbox" aria-label="Metrics"><!> <!></div></div> <div class="flex-1 min-w-0 overflow-auto p-4"><!></div></div>`),YR=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between px-4 py-2 border-b border-line gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg shrink-0"><!> Metrics</h3> <!> <div class="flex items-center gap-1"><!> <button type="button" title="Refresh" aria-label="Refresh metrics" class="p-1.5 hover:bg-hover rounded transition-colors text-fg-subtle"><!></button></div></div> <!> <!></div>`);function XR(e,t){it(t,!0);function n(){let e=pl.value;return(e?Zo(e):null)??globalThis.location.origin}let r=N(_r([])),i=N(null),a=N(_r([])),o=N(null),s=N(!1),c=N(``),l=M(()=>ml.value),u=N(_r(new Set)),d=N(`timeseries`),f=N(`sum`),p=N(!1),m=N(!0),h=()=>({fetch:globalThis.fetch.bind(globalThis),baseUrl:n()});async function g(e=z(c)){let t=await uF(h(),e);t.status===`ok`?(P(r,t.data,!0),P(o,null),!z(i)&&z(r).length>0&&v(z(r)[0].name)):t.status===`error`&&P(o,t.message,!0)}async function _(e){P(s,!0);let t=await dF({name:e,window:ks(Cs(ml.value,Date.now()))},h());t.status!==`aborted`&&(P(s,!1),t.status===`ok`?(P(a,t.data,!0),P(o,null)):P(o,t.message,!0))}function v(e){P(i,e,!0),P(u,new Set,!0),P(d,`timeseries`),P(f,`sum`),P(p,!1),_(e)}function y(){g(),z(i)&&_(z(i))}function b(e){ml.value=e,z(i)&&_(z(i))}function x(e,t){Nu(e),Wc(e,t),Mu(`traces`)}function S(e){let t=new Set(z(u));t.has(e)?t.delete(e):t.add(e),P(u,t,!0)}async function C(){if(!z(i)||!globalThis.confirm(`Delete every stored series for “${z(i)}”?`))return;let e=await fF(z(i),h());if(e.status!==`ok`){e.status===`error`&&P(o,e.message,!0);return}P(i,null),P(a,[],!0),await g(``)}Lr(()=>{let e=z(c),t=setTimeout(()=>void g(e),200);return()=>clearTimeout(t)});let w=M(()=>z(r).find(e=>e.name===z(i))),T=M(()=>z(w)?.kind===`histogram`||z(w)?.kind===`exponentialHistogram`),ee=M(()=>z(a).map(e=>({...e,points:z(m)?LL(e.points,e.temporality):e.points}))),te=M(()=>z(a).flatMap(e=>e.points).sort((e,t)=>e.timestamp-t.timestamp)),ne=M(()=>z(r)),re=M(()=>z(a).map(e=>({id:e.seriesId,color:hg(e.seriesId).stroke,label:ie(e),value:UL(z(m)?LL(e.points,e.temporality):e.points,e.kind===`gauge`?`last`:z(f))})));function ie(e){let t=Object.entries(e.attributes),n=Object.entries(e.resource??{}).filter(([e])=>e!==`service.name`);return[...t,...n].map(([e,t])=>`${e}=${String(t)}`).join(` `)||e.service}function ae(e,t){return e===void 0?`—`:`${(Math.round(e*100)/100).toLocaleString(void 0,{maximumFractionDigits:2})}${t&&t!==`1`?` ${t}`:``}${z(m)&&z(w)?.kind===`sum`?`/s`:``}`}var oe=YR(),se=F(oe),ce=F(se);yp(F(ce),{size:16}),Ke(),D(ce);var le=L(ce,2);uA(le,{get selection(){return z(l)},onChange:b});var E=L(le,2),ue=F(E),de=e=>{var t=IR();Vh(F(t),{size:14}),D(t),B(`click`,t,C),H(e,t)};W(ue,e=>{z(i)&&e(de)});var fe=L(ue,2),pe=F(fe);{let e=M(()=>z(s)?`animate-spin`:``);ph(pe,{size:14,get class(){return z(e)}})}D(fe),D(E),D(se);var me=L(se,2),he=e=>{var t=LR(),n=F(t,!0);D(t),R(()=>U(n,z(o))),H(e,t)};W(me,e=>{z(o)&&e(he)});var ge=L(me,2),_e=e=>{H(e,RR())},ve=e=>{var t=JR(),n=F(t),r=F(n);L_(F(r),{get value(){return z(c)},onValue:e=>P(c,e,!0),placeholder:`Filter metrics…`,ariaLabel:`Filter metrics`}),D(r);var o=L(r,2),s=F(o);G(s,17,()=>z(ne),e=>e.name+e.kind,(e,t)=>{var n=BR(),r=F(n),o=F(r),s=F(o,!0);D(o);var c=L(o,2),l=e=>{{let n=M(()=>z(m)?LL(z(a)[0].points,z(a)[0].temporality):z(a)[0].points);IL(e,{get points(){return z(n)},width:48,height:14,get ariaLabel(){return`${z(t).name??``} trend`}})}};W(c,e=>{z(t).name===z(i)&&z(a).length>0&&e(l)}),D(r);var u=L(r,2),d=F(u),f=F(d,!0);D(d);var p=L(d,2),h=e=>{var n=zR(),r=F(n,!0);D(n),R(()=>U(r,z(t).unit)),H(e,n)};W(p,e=>{z(t).unit&&z(t).unit!==`1`&&e(h)});var g=L(p,2),_=F(g);D(g),D(u),D(n),R(e=>{J(n,`aria-selected`,z(t).name===z(i)),q(n,1,e),U(s,z(t).name),U(f,z(t).kind),U(_,`${z(t).seriesCount??``}
|
|
29
|
+
series`)},[()=>K($(`w-full text-left px-3 py-2 border-b border-line-subtle hover:bg-hover`,`focus-visible:outline-none focus-visible:bg-hover`,z(t).name===z(i)&&`bg-selected`))]),B(`click`,n,()=>v(z(t).name)),H(e,n)});var l=L(s,2),h=e=>{H(e,VR())};W(l,e=>{z(ne).length===0&&e(h)}),D(o),D(n);var g=L(n,2),_=F(g),y=e=>{H(e,HR())},b=e=>{var t=qR(),n=I(t),r=F(n),i=F(r,!0);D(r);var o=L(r,2),s=e=>{var t=UR(),n=F(t,!0);D(t),R(()=>U(n,z(w).description)),H(e,t)};W(o,e=>{z(w).description&&e(s)}),D(n);var c=L(n,2);FR(c,{get kind(){return z(w).kind},get mode(){return z(d)},onMode:e=>P(d,e,!0),get aggregate(){return z(f)},onAggregate:e=>P(f,e,!0),get stacked(){return z(p)},onStacked:e=>P(p,e,!0),get rate(){return z(m)},onRate:e=>P(m,e,!0),class:`mb-3`});var l=L(c,2),h=e=>{H(e,WR())},g=e=>{yR(e,{get points(){return z(te)},get unit(){return z(w).unit}})},_=e=>{DR(e,{get points(){return z(te)},get unit(){return z(w).unit}})},v=e=>{fR(e,{get point(){return z(te)[z(te).length-1]},get unit(){return z(w).unit}})},y=e=>{{let t=M(()=>z(ee).length===1&&!z(p));oR(e,{get series(){return z(ee)},get isolated(){return z(u)},get stacked(){return z(p)},get area(){return z(t)},onExemplar:x})}};W(l,e=>{z(a).length===0?e(h):z(d)===`heatmap`?e(g,1):z(d)===`percentiles`?e(_,2):z(T)?e(v,3):e(y,-1)});var b=L(l,2),C=e=>{var t=KR();G(t,21,()=>z(re),e=>e.id,(e,t)=>{var n=GR(),r=F(n),i=L(r,2),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(n),R((e,i,o)=>{J(n,`aria-pressed`,e),q(n,1,i),oo(r,`background:${z(t).color??``}`),U(a,z(t).label),U(s,o)},[()=>z(u).has(z(t).id),()=>K($(`w-full flex items-center gap-2 px-1 py-0.5 rounded text-[11px] hover:bg-hover`,`focus-visible:outline-none focus-visible:bg-hover`,z(u).size>0&&!z(u).has(z(t).id)&&`opacity-40`)),()=>ae(z(t).value,z(w).unit)]),B(`click`,n,()=>S(z(t).id)),H(e,n)}),D(t),H(e,t)};W(b,e=>{z(a).length>0&&z(d)===`timeseries`&&e(C)}),R(()=>U(i,z(w).name)),H(e,t)};W(_,e=>{z(w)?e(b,-1):e(y)}),D(g),D(t),H(e,t)};W(ge,e=>{z(r).length===0?e(_e):e(ve,-1)}),D(oe),B(`click`,fe,y),H(e,oe),at()}ea([`click`]);function ZR(e){let t=e.severityNumber,n=(e.severityText??``).toUpperCase();return n===`ERROR`||t!==void 0&&t>=17?`error`:n===`WARN`||n===`WARNING`||t!==void 0&&t>=13?`warn`:`info`}function QR(e){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function $R(e){try{return JSON.stringify({body:e.body,severity:e.severityText??null,severityNumber:e.severityNumber??null,timestamp:e.timestamp,traceId:e.traceId??null,attributes:e.attributes??{}},null,2)}catch{return QR(e.body)}}function ez(e,t,n){if(n!==`all`){let t=ZR(e);if(n===`error`&&t!==`error`||n===`warn`&&t!==`warn`&&t!==`error`||n===`info`&&t!==`info`)return!1}return R_(t.toLowerCase(),[QR(e.body),e.severityText,e.resourceName,e.traceId])}function tz(e){let t=ZR(e);return t===`error`?`text-danger`:t===`warn`?`text-warning`:`text-fg-subtle`}function nz(e){let t=ZR(e);return t===`error`?`bg-danger`:t===`warn`?`bg-warning`:`bg-line`}function rz(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function iz(e){try{return JSON.stringify(e.attributes??{},null,2)}catch{return`{}`}}var az=V(`<span class="flex-shrink-0 text-fg-subtle truncate max-w-[10rem]"> </span>`),oz=V(`<button type="button" title="Go to trace" aria-label="Go to trace" class="flex-shrink-0 inline-flex items-center justify-center p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity"><!></button>`),sz=V(`<div class="font-mono text-xs break-words whitespace-pre-wrap pr-6"> </div>`),cz=V(`<pre class="font-mono text-[11px] text-fg-muted whitespace-pre-wrap break-words pr-6"> </pre>`),lz=V(`<div class="flex items-center gap-1"><button type="button" class="inline-flex items-center gap-1 text-xs text-fg-muted hover:underline"><!> Go to trace</button> <!></div>`),uz=V(`<div class="pl-3 pr-2 pb-2 space-y-2"><!> <!> <!></div>`),dz=V(`<div class="group relative flex flex-col border-b border-line-subtle hover:bg-hover"><span aria-hidden="true"></span> <div class="flex items-center gap-2 pl-3 pr-2 py-1 text-xs"><button type="button" class="flex flex-1 items-center gap-2 min-w-0 text-left"><span class="font-mono tabular-nums text-fg-subtle flex-shrink-0"> </span> <span> </span> <span class="font-mono text-fg truncate min-w-0 flex-1"> </span> <!></button> <!> <!></div> <!></div>`),fz=V(`<button class="px-2 py-1 text-xs rounded text-fg-subtle hover:bg-hover transition-colors" title="Drop buffered logs received while paused">Drop buffer</button>`),pz=V(`<div class="text-center text-fg-subtle text-sm py-12">Loading logs…</div>`),mz=V(`<div class="text-center text-fg-subtle text-sm py-12">No logs yet. Send logs via AutotelLogExporter or POST /ingest/logs.</div>`),hz=V(`<div class="text-center text-fg-subtle text-sm py-12">No logs match the current filter.</div>`),gz=V(`<div class="px-4 py-3 text-center text-xs text-fg-subtle"> </div>`),_z=V(`<!> <!>`,1),vz=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3> <div class="flex items-center gap-1"><button><!> </button> <!></div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!> <!> <select class="text-xs border border-line rounded px-1.5 py-1 bg-surface text-fg-muted"><option>All</option><option>Errors</option><option>Warn+</option><option>Info</option></select></div> <div class="flex-1 overflow-auto space-y-0"><!></div></div>`);function yz(e,t){it(t,!0);let n=(e,t=p)=>{let n=M(()=>QR(t().body)),r=M(()=>tz(t())),i=M(()=>nz(t())),a=M(()=>z(c).has(t().id));var o=dz(),s=F(o),u=L(s,2),d=F(u),f=F(d),m=F(f,!0);D(f);var h=L(f,2),g=F(h,!0);D(h);var _=L(h,2),v=F(_,!0);D(_);var b=L(_,2),x=e=>{var n=az(),r=F(n,!0);D(n),R(()=>U(r,t().resourceName)),H(e,n)};W(b,e=>{t().resourceName&&e(x)}),D(d);var S=L(d,2),C=e=>{var n=oz();km(F(n),{size:12}),D(n),B(`click`,n,()=>y(t())),H(e,n)};W(S,e=>{t().traceId&&e(C)});var w=L(S,2);{let e=M(()=>$R(t()));Q_(w,{get value(){return z(e)},label:`Copy log as JSON`,class:`flex-shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`})}D(u);var T=L(u,2),ee=e=>{var r=uz(),i=F(r);P_(i,{get content(){return z(n)},children:(e,t)=>{var r=sz(),i=F(r,!0);D(r),R(()=>U(i,z(n))),H(e,r)},$$slots:{default:!0}});var a=L(i,2),o=e=>{{let n=M(()=>iz(t()));P_(e,{get content(){return z(n)},children:(e,n)=>{var r=cz(),i=F(r,!0);D(r),R(e=>U(i,e),[()=>iz(t())]),H(e,r)},$$slots:{default:!0}})}},s=M(()=>t().attributes&&Object.keys(t().attributes).length>0);W(a,e=>{z(s)&&e(o)});var c=L(a,2),l=e=>{var n=lz(),r=F(n);km(F(r),{size:12}),Ke(),D(r),Q_(L(r,2),{get value(){return t().traceId},label:`Copy trace ID`}),D(n),B(`click`,r,()=>y(t())),H(e,n)};W(c,e=>{t().traceId&&e(l)}),D(r),H(e,r)};W(T,e=>{z(a)&&e(ee)}),D(o),R((e,r,i)=>{q(s,1,e),J(d,`aria-expanded`,z(a)),J(d,`title`,z(a)?`Collapse log`:`Expand log`),U(m,r),q(h,1,i),U(g,t().severityText??`LOG`),U(v,z(n))},[()=>K($(`absolute inset-y-0 left-0 w-0.5`,z(i))),()=>rz(t().timestamp),()=>K($(`flex-shrink-0 font-medium uppercase tracking-wide text-[10px]`,z(r)))]),B(`click`,d,()=>l(t().id)),H(e,o)},r=M(()=>ql.value),i=M(()=>wl.value),a=M(()=>Ol.value),o=N(``),s=N(`all`),c=N(_r(new Set));function l(e){let t=new Set(z(c));t.has(e)?t.delete(e):t.add(e),P(c,t,!0)}let u=jA({client:{fetch:globalThis.fetch.bind(globalThis),baseUrl:()=>(pl.value?Zo(pl.value):null)??globalThis.location.origin}});Lr(()=>()=>u.dispose());let d=N(null),f=N(_r([]));Lr(()=>{let e=(pl.value?Zo(pl.value):null)??globalThis.location.origin;e!==z(d)&&(P(d,e,!0),pA(`logs`,{fetch:globalThis.fetch.bind(globalThis),baseUrl:e}).then(e=>P(f,e,!0)),u.refresh())});let m=N(0);Lr(()=>{let e=z(r).length;e>z(m)&&u.arrived(e-z(m)),P(m,e,!0)});let h=M(()=>u.results.value),g=M(()=>{let e=u.ready.value&&u.failure.value===null,t=z(r);return e&&(t=z(o).length>0?z(h):_(z(h),z(r))),t.filter(t=>ez(t,e?``:z(o),z(s)))});function _(e,t){let n=new Set(e.map(e=>e.id));return[...e,...t.filter(e=>!n.has(e.id))]}let v=M(()=>z(o).length>0||z(s)!==`all`);function y(e){e.traceId&&(Nu(e.traceId),Mu(`traces`))}var b=vz(),x=F(b),S=F(x),C=F(S);rm(C,{size:16});var w=L(C);D(S);var T=L(S,2),ee=F(T),te=F(ee),ne=e=>{ah(e,{size:12})},re=e=>{th(e,{size:12})};W(te,e=>{z(i)?e(ne):e(re,-1)});var ie=L(te);D(ee);var ae=L(ee,2),oe=e=>{var t=fz();B(`click`,t,function(...e){Ou?.apply(this,e)}),H(e,t)};W(ae,e=>{z(i)&&z(a)>0&&e(oe)}),D(T),D(x);var se=L(x,2),ce=F(se);jb(ce,{get value(){return u.text.value},onInput:e=>{u.setText(e),P(o,e,!0)},onSubmit:()=>u.submit(),get serverErrors(){return u.errors.value},get fields(){return z(f)},placeholder:`Filter — e.g. severity_number >= 17 AND service = api`,class:`flex-1`});var le=L(ce,2);uA(le,{get selection(){return u.window.value},onChange:e=>u.setWindow(e)});var E=L(le,2);fA(E,{get count(){return u.pending},get live(){return u.live},onResume:()=>{P(o,``),u.resume()}});var ue=L(E,2),de=F(ue);de.value=de.__value=`all`;var fe=L(de);fe.value=fe.__value=`error`;var pe=L(fe);pe.value=pe.__value=`warn`;var me=L(pe);me.value=me.__value=`info`,D(ue);var he;co(ue),D(se);var ge=L(se,2),_e=F(ge),ve=e=>{H(e,pz())},ye=e=>{H(e,mz())},be=e=>{H(e,hz())},xe=e=>{var t=_z(),r=I(t);G(r,17,()=>z(g),e=>e.id,(e,t)=>{n(e,()=>z(t))});var i=L(r,2),a=e=>{var t=gz(),n=F(t,!0);D(t),Xa(t,(e,t)=>MA?.(e,t),()=>({onReach:()=>u.loadMore(),disabled:u.loading.value})),R(()=>U(n,u.loading.value?`Loading…`:`Scroll for more`)),H(e,t)};W(i,e=>{u.nextCursor.value&&e(a)}),H(e,t)};W(_e,e=>{u.loading.value&&!u.ready.value&&z(r).length===0?e(ve):z(g).length===0&&!z(v)?e(ye,1):z(g).length===0?e(be,2):e(xe,-1)}),D(ge),D(b),R(e=>{U(w,` Logs (${z(g).length??``})`),q(ee,1,e),J(ee,`title`,z(i)?`Resume live tail`:`Pause live tail`),U(ie,` ${z(i)?`Resume${z(a)>0?` (+${z(a)})`:``}`:`Pause`}`),he!==(he=z(s))&&(ue.value=(ue.__value=z(s))??``,so(ue,z(s)))},[()=>K($(`flex items-center gap-1 px-2 py-1 text-xs rounded transition-colors`,z(i)?`bg-warning-bg text-warning hover:bg-warning-bg`:`hover:bg-hover text-fg-muted`))]),B(`click`,ee,function(...e){Du?.apply(this,e)}),B(`change`,ue,e=>P(s,e.currentTarget.value,!0)),H(e,b),at()}ea([`click`,`change`]);var bz=V(`<p class="p-3 text-xs text-fg-muted">No stack frames on this error.</p>`),xz=V(`<button type="button"><span class="font-mono text-xs text-fg"> </span> <span class="font-mono text-[11px] text-fg-subtle"> </span></button>`),Sz=V(`<div class="flex flex-col items-start gap-0.5 px-3 py-2"><span class="flex items-center gap-2"><span class="font-mono text-xs text-fg-muted"> </span> <span class="rounded bg-subtle px-1.5 py-0.5 text-[10px] text-fg-subtle"> </span></span> <span class="font-mono text-[11px] text-fg-muted"> </span></div>`),Cz=V(`<li><!></li>`),wz=V(`<ol class="divide-y divide-line-subtle"></ol>`);function Tz(e,t){it(t,!0);let n=Z(t,`selected`,3,null),r={dependency:`node_modules`,native:`runtime`};function i(e){return`${e.file}:${e.line}:${e.column}`}function a(e){return n()!==null&&n().file===e.file&&n().line===e.line&&n().column===e.column}var o=la(),s=I(o),c=e=>{H(e,bz())},l=e=>{var n=wz();G(n,21,()=>t.frames,Oa,(e,n)=>{let o=M(()=>z(n).kind===`app`?null:r[z(n).kind]);var s=Cz(),c=F(s),l=e=>{var r=xz(),o=F(r),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(r),R((e,t)=>{q(r,1,e),U(s,z(n).function??`(anonymous)`),U(l,t)},[()=>K($(`flex w-full flex-col items-start gap-0.5 px-3 py-2 text-left transition-colors hover:bg-hover`,a(z(n))&&`bg-subtle border-l-2 border-accent`)),()=>i(z(n))]),B(`click`,r,()=>t.onselect?.(z(n))),H(e,r)},u=e=>{var t=Sz(),r=F(t),a=F(r),s=F(a,!0);D(a);var c=L(a,2),l=F(c,!0);D(c),D(r);var u=L(r,2),d=F(u,!0);D(u),D(t),R(e=>{U(s,z(n).function??`(anonymous)`),U(l,z(o)),U(d,e)},[()=>i(z(n))]),H(e,t)};W(c,e=>{z(n).kind===`app`?e(l):e(u,-1)}),D(s),H(e,s)}),D(n),H(e,n)};W(s,e=>{t.frames.length===0?e(c):e(l,-1)}),H(e,o),at()}ea([`click`]);var Ez=V(`<p class="p-3 text-xs text-fg-muted">This file could not be read. It may be outside the project, or generated
|
|
30
|
+
rather than written.</p>`),Dz=V(`<button type="button" class="rounded px-1.5 py-0.5 text-[11px] text-accent hover:bg-hover">Open in editor</button>`),Oz=V(`<li><span class="w-8 shrink-0 select-none text-right text-fg-subtle"> </span> <span class="whitespace-pre"> </span></li>`),kz=V(`<div class="flex flex-col"><div class="flex items-center justify-between border-b border-line px-3 py-1.5"><span class="font-mono text-[11px] text-fg-subtle"> </span> <!></div> <ol class="overflow-x-auto py-1"></ol></div>`);function Az(e,t){it(t,!0);var n=la(),r=I(n),i=e=>{H(e,Ez())},a=e=>{var n=kz(),r=F(n),i=F(r),a=F(i);D(i);var o=L(i,2),s=e=>{var n=Dz();B(`click`,n,()=>t.onopen?.(t.window)),H(e,n)};W(o,e=>{t.onopen&&e(s)}),D(r);var c=L(r,2);G(c,21,()=>t.window.lines,Oa,(e,n,r)=>{let i=M(()=>t.window.startLine+r),a=M(()=>z(i)===t.window.line);var o=Oz(),s=F(o),c=F(s,!0);D(s);var l=L(s,2),u=F(l,!0);D(l),D(o),R(e=>{J(o,`aria-current`,z(a)?`true`:void 0),q(o,1,e),U(c,z(i)),U(u,z(n))},[()=>K($(`flex gap-3 px-3 font-mono text-[11px] leading-5`,z(a)?`bg-danger-bg text-fg`:`text-fg-muted`))]),H(e,o)}),D(c),D(n),R(()=>U(a,`${t.window.file??``}:${t.window.line??``}`)),H(e,n)};W(r,e=>{t.window===null?e(i):e(a,-1)}),H(e,n),at()}ea([`click`]);function jz(e){return e.startsWith(`node:`)||e.startsWith(`[`)||e.startsWith(`<`)?`native`:/(^|[/\\])node_modules([/\\]|$)/.test(e)?`dependency`:`app`}var Mz=/^\s*at\s+(?:async\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/,Nz=/^\s*at\s+(?:async\s+)?(.+?):(\d+):(\d+)$/;function Pz(e){if(!e.startsWith(`file://`))return e;try{let t=decodeURIComponent(new URL(e).pathname);return/^\/[A-Za-z]:/.test(t)?t.slice(1):t}catch{return e}}function Fz(e){let t=[];for(let n of e.split(`
|
|
31
|
+
`)){let e=Mz.exec(n);if(e){let n=Pz(e[2]);t.push({function:e[1],file:n,line:Number(e[3]),column:Number(e[4]),kind:jz(n)});continue}let r=Nz.exec(n);if(r){let e=Pz(r[1]);t.push({file:e,line:Number(r[2]),column:Number(r[3]),kind:jz(e)})}}return t}var Iz=V(`<div class="overflow-hidden rounded border border-line"><!></div>`),Lz=V(`<div class="flex flex-col gap-2"><div class="overflow-hidden rounded border border-line"><!></div> <!></div>`);function Rz(e,t){it(t,!0);let n=Z(t,`context`,3,4),r=M(()=>Fz(t.stackTrace)),i=N(null),a=N(null),o=N(!1),s=0;async function c(e){P(i,e,!0),P(o,!1);let r=++s,c=await t.loadSource(e,n());r===s&&(P(a,c,!0),P(o,!0))}var l=la(),u=I(l),d=e=>{var t=Lz(),n=F(t);Tz(F(n),{get frames(){return z(r)},get selected(){return z(i)},onselect:c}),D(n);var s=L(n,2),l=e=>{var t=Iz();Az(F(t),{get window(){return z(a)}}),D(t),H(e,t)};W(s,e=>{z(o)&&e(l)}),D(t),H(e,t)};W(u,e=>{z(r).length>0&&e(d)}),H(e,l),at()}function zz(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s ago`;let n=Math.floor(t/60);if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}var Bz=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded"> </span>`),Vz=V(`<pre class="text-xs font-mono bg-code text-fg p-2 rounded overflow-x-auto whitespace-pre-wrap"> </pre>`),Hz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Stack Trace</h5> <!> <details class="mt-2"><summary class="cursor-pointer text-[11px] text-fg-subtle hover:text-fg">Raw stack</summary> <!></details></div>`),Uz=V(`<span class="px-2 py-0.5 text-xs font-mono bg-hover text-fg-muted rounded"> </span>`),Wz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Affected Operations</h5> <div class="flex flex-wrap gap-1"></div></div>`),Gz=V(`<div class="group flex items-center gap-1"><button class="flex items-center gap-1 text-xs text-fg-muted hover:text-fg font-mono"><!> <!></button> <!></div>`),Kz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Recent Traces</h5> <div class="space-y-1"></div></div>`),qz=V(`<div class="flex gap-2"><span class="text-fg-subtle"> </span> <span class="font-mono text-fg-muted"> </span></div>`),Jz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Context</h5> <div class="text-xs space-y-0.5"></div></div>`),Yz=V(`<div class="border-t border-line p-3 bg-subtle space-y-3"><!> <!> <!> <!> <div class="text-xs text-fg-subtle pt-2 border-t border-line"><div class="flex gap-4"><span> </span> <span> </span></div></div></div>`),Xz=V(`<div role="option"><button class="w-full p-3 flex items-start gap-3 hover:bg-subtle transition-colors text-left"><div class="mt-0.5"><!></div> <div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-1"><span class="text-sm font-semibold text-danger"> </span> <span class="px-1.5 py-0.5 text-xs font-medium bg-danger-bg text-danger rounded"> </span> <!></div> <div class="group flex items-start gap-1 mb-2"><p class="text-sm text-fg-muted truncate"> </p> <!></div> <div class="flex items-center gap-4 text-xs text-fg-subtle"><span class="flex items-center gap-1"><!> </span> <span class="flex items-center gap-1"><!> </span></div></div></button> <!></div>`),Zz=V(`<span class="text-xs font-normal text-fg-muted"> </span>`),Qz=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-danger-bg text-danger rounded-full"> </span>`),$z=V(`<div class="flex gap-4 mb-4 p-3 bg-subtle rounded-md border border-line"><div class="text-sm"><span class="text-fg-muted">Groups:</span> <span class="font-semibold text-fg"> </span></div> <div class="text-sm"><span class="text-fg-muted">Total:</span> <span class="font-semibold text-fg"> </span></div> <div class="text-sm"><span class="text-fg-muted">Last hour:</span> <span class="font-semibold text-danger"> </span></div></div>`),eB=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No errors captured</p> <p class="text-xs text-fg-subtle mt-1">Errors from failed traces will appear here</p></div>`),tB=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No matching errors</p> <p class="text-xs text-fg-subtle mt-1">No error groups match the current filter</p></div>`),nB=V(`<div class="flex flex-col h-full p-4"><div class="flex items-center justify-between mb-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Errors <!> <!></h3> <div class="flex items-center gap-2"><select class="text-xs border border-line rounded px-2 py-1 bg-surface text-fg-muted"><option>Most Recent</option><option>Most Frequent</option></select></div></div> <!> <!> <div role="listbox" tabindex="0" aria-label="Error groups" class="flex-1 overflow-auto space-y-2 focus:outline-none"><!></div></div>`);function rB(e,t){it(t,!0);let n=(e,t=p,n=p,r=p,i=p)=>{let a=M(()=>Date.now()-t().firstSeen),o=M(()=>Date.now()-t().lastSeen);var s=Xz(),c=F(s),l=F(c),u=F(l),d=e=>{Cp(e,{size:16,class:`text-fg-subtle`})},f=e=>{Dp(e,{size:16,class:`text-fg-subtle`})};W(u,e=>{n()?e(d):e(f,-1)}),D(l);var v=L(l,2),y=F(v),b=F(y),x=F(b,!0);D(b);var S=L(b,2),C=F(S);D(S);var w=L(S,2),T=e=>{var n=Bz(),r=F(n,!0);D(n),R(()=>U(r,t().service)),H(e,n)};W(w,e=>{t().service&&e(T)}),D(y);var ee=L(y,2),te=F(ee),ne=F(te,!0);D(te);var re=L(te,2);{let e=M(()=>`${t().type}: ${t().message}`);Q_(re,{get value(){return z(e)},label:`Copy error message`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`})}D(ee);var ie=L(ee,2),ae=F(ie),oe=F(ae);Np(oe,{size:12});var se=L(oe);D(ae);var ce=L(ae,2),le=F(ce);Np(le,{size:12});var E=L(le);D(ce),D(ie),D(v),D(c);var ue=L(c,2),de=e=>{var n=Yz(),r=F(n),i=e=>{var n=Hz(),r=L(F(n),2);Rz(r,{get stackTrace(){return t().stackTrace},get loadSource(){return ts}});var i=L(r,2);P_(L(F(i),2),{get content(){return t().stackTrace},children:(e,n)=>{var r=Vz(),i=F(r,!0);D(r),R(()=>U(i,t().stackTrace)),H(e,r)},$$slots:{default:!0}}),D(i),D(n),H(e,n)};W(r,e=>{t().stackTrace&&e(i)});var a=L(r,2),o=e=>{var n=Wz(),r=L(F(n),2);G(r,21,()=>t().affectedSpans,Oa,(e,t)=>{var n=Uz(),r=F(n,!0);D(n),R(()=>U(r,z(t))),H(e,n)}),D(r),D(n),H(e,n)};W(a,e=>{t().affectedSpans.length>0&&e(o)});var s=L(a,2),c=e=>{var n=Kz(),r=L(F(n),2);G(r,20,()=>t().affectedTraces.slice(0,5),e=>e,(e,t)=>{var n=Gz(),r=F(n),i=F(r);xm(i,{size:10});var a=L(i);Yp(L(a),{size:10}),D(r),Q_(L(r,2),{get value(){return t},label:`Copy trace ID`,size:10,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(n),R(e=>U(a,` ${e??``}... `),[()=>t.slice(0,16)]),B(`click`,r,()=>g(t)),H(e,n)}),D(r),D(n),H(e,n)};W(s,e=>{t().affectedTraces.length>0&&e(c)});var l=L(s,2),u=e=>{var n=Jz(),r=L(F(n),2);G(r,21,()=>Object.entries(t().attributes),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=qz(),o=F(a),s=F(o);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,`${r()??``}:`),U(l,e)},[()=>String(i())]),H(e,a)}),D(r),D(n),H(e,n)},d=M(()=>t().attributes&&Object.keys(t().attributes).length>0);W(l,e=>{z(d)&&e(u)});var f=L(l,2),p=F(f),m=F(p),h=F(m);D(m);var v=L(m,2),y=F(v);D(v),D(p),D(f),D(n),R((e,t)=>{U(h,`First seen: ${e??``}`),U(y,`Last seen: ${t??``}`)},[()=>od(t().firstSeen),()=>od(t().lastSeen)]),H(e,n)};W(ue,e=>{n()&&e(de)}),D(s),R((e,n)=>{J(s,`aria-selected`,i()),J(s,`data-row-index`,r()),q(s,1,`border border-line rounded-md bg-surface overflow-hidden${i()?` ring-1 ring-inset ring-accent bg-accent/10`:``}`),U(x,t().type),U(C,`${t().count??``}x`),U(ne,t().message),U(se,` First: ${e??``}`),U(E,` Last: ${n??``}`)},[()=>zz(z(a)),()=>zz(z(o))]),B(`click`,c,()=>{m.cursor=r(),h(t().fingerprint)}),H(e,s)};function r(e,t){return R_(t.toLowerCase(),[e.type,e.message,...e.affectedTraces])}let i=N(`recent`),a=N(null),o=N(``),s=N(void 0),c=M(()=>z(i)===`recent`?au.value:ou.value),l=M(()=>z(c).filter(e=>r(e,z(o)))),u=M(()=>z(o).length>0),d=M(()=>su.value),f=M(()=>cu.value),m=IA({count:()=>z(l).length,onActivate:e=>{let t=z(l)[e];t&&h(t.fingerprint)},scrollToIndex:e=>z(s)?.querySelector(`[data-row-index="${e}"]`)?.scrollIntoView({block:`nearest`})});function h(e){P(a,z(a)===e?null:e,!0)}function g(e){Nu(e),Mu(`traces`)}var v=nB(),y=F(v),b=F(y),x=F(b);Gh(x,{size:16,class:`text-danger`});var S=L(x,2),C=e=>{var t=Zz(),n=F(t);D(t),R(()=>U(n,`(${z(l).length??``} of ${z(c).length??``})`)),H(e,t)};W(S,e=>{z(u)&&e(C)});var w=L(S,2),T=e=>{var t=Qz(),n=F(t,!0);D(t),R(()=>U(n,z(d))),H(e,t)};W(w,e=>{z(d)>0&&e(T)}),D(b);var ee=L(b,2),te=F(ee),ne=F(te);ne.value=ne.__value=`recent`;var re=L(ne);re.value=re.__value=`frequent`,D(te);var ie;co(te),D(ee),D(y);var ae=L(y,2),oe=e=>{L_(e,{class:`mb-4`,inputClass:`border-line bg-subtle text-fg focus:border-line focus:ring-1 focus:ring-accent`,placeholder:`Filter by type, message, trace id…`,ariaLabel:`Filter errors`,get value(){return z(o)},set value(e){P(o,e,!0)}})};W(ae,e=>{z(c).length>0&&e(oe)});var se=L(ae,2),ce=e=>{var t=$z(),n=F(t),r=L(F(n),2),i=F(r,!0);D(r),D(n);var a=L(n,2),o=L(F(a),2),s=F(o,!0);D(o),D(a);var p=L(a,2),m=L(F(p),2),h=F(m,!0);D(m),D(p),D(t),R(()=>{U(i,z(u)?`${z(l).length} of ${z(c).length}`:z(c).length),U(s,z(d)),U(h,z(f))}),H(e,t)};W(se,e=>{z(d)>0&&e(ce)});var le=L(se,2),E=F(le),ue=e=>{var t=eB();Gh(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},de=e=>{var t=tB();Ch(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},fe=e=>{var t=la();G(I(t),19,()=>z(l),e=>e.fingerprint,(e,t,r)=>{n(e,()=>z(t),()=>z(a)===z(t).fingerprint,()=>z(r),()=>m.cursor===z(r))}),H(e,t)};W(E,e=>{z(c).length===0?e(ue):z(l).length===0?e(de,1):e(fe,-1)}),D(le),Vo(le,e=>P(s,e),()=>z(s)),D(v),R(()=>{ie!==(ie=z(i))&&(te.value=(te.__value=z(i))??``,so(te,z(i)))}),B(`change`,te,e=>P(i,e.target.value,!0)),B(`keydown`,le,function(...e){m.onKeyDown?.apply(this,e)}),H(e,v),at()}ea([`click`,`change`,`keydown`]);var iB={info:0,warning:1,error:2,critical:3};function aB(e,t=`info`){return typeof e==`string`&&e in iB?e:t}function oB(e,t){return iB[e]>=iB[t]}var sB={marker:`autotel.security`,forceKeep:`autotel.security.force_keep`,event:`security.event`,category:`security.category`,outcome:`security.outcome`,severity:`security.severity`,actorId:`security.actor_id`,targetType:`security.target_type`,targetId:`security.target_id`,tenantId:`security.tenant_id`,reason:`security.reason`,droppedKeys:`security.dropped_keys`,suspiciousRequest:`security.suspicious_request`,signal:`security.signal`};function cB(e){return typeof e==`string`&&e.length>0?e:void 0}function lB(e,t){let n=e.attributes??{},r=cB(n[sB.event]),i=n[sB.suspiciousRequest]===!0;return!r&&!i?null:{traceId:e.traceId,spanId:e.spanId,spanName:e.name,service:t,timestamp:e.startTime,event:r,category:cB(n[sB.category]),outcome:cB(n[sB.outcome]),severity:aB(n[sB.severity],i?`warning`:`info`),reason:cB(n[sB.reason]),suspicious:i,signal:cB(n[sB.signal])}}function uB(e){let t=[];for(let n of e)for(let e of n.spans){let r=lB(e,n.service);r&&t.push(r)}return t.sort((e,t)=>t.timestamp-e.timestamp)}function dB(e){let t={info:0,warning:0,error:0,critical:0};for(let n of e)t[n.severity]+=1;return t}function fB(e,t){return oB(e.severity,t)}function pB(e){switch(e){case`critical`:return`bg-red-100 text-red-700`;case`error`:return`bg-orange-100 text-orange-700`;case`warning`:return`bg-amber-100 text-amber-700`;default:return`bg-hover text-fg-muted`}}var mB=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-red-100 text-red-700 rounded-full"> </span>`),hB=V(`<div class="flex gap-4 mb-4 p-3 bg-subtle rounded-md border border-line"><div class="text-sm"><span class="text-fg-muted">Critical:</span> <span class="font-semibold text-red-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Error:</span> <span class="font-semibold text-orange-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Warning:</span> <span class="font-semibold text-amber-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Info:</span> <span class="font-semibold text-fg"> </span></div></div>`),gB=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No security events captured</p> <p class="text-xs text-fg-subtle mt-1">Spans with security.* attributes (autotel-audit) will appear here</p></div>`),_B=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded"> </span>`),vB=V(`<span class="text-fg-subtle"> </span>`),yB=V(`<div class="border border-line rounded-md bg-surface p-3"><div class="flex items-center gap-2 mb-1"><!> <span class="text-sm font-semibold text-fg"> </span> <span> </span> <!> <!> <!></div> <p class="text-xs text-fg-muted truncate mb-2 font-mono"> <!></p> <div class="flex items-center gap-4 text-xs text-fg-subtle"><span> </span> <button class="flex items-center gap-1 text-fg-muted hover:text-fg font-mono"><!> <!></button></div></div>`),bB=V(`<div class="flex flex-col h-full p-4"><div class="flex items-center justify-between mb-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Security <!></h3> <select class="text-xs border border-line rounded px-2 py-1 bg-surface text-fg-muted"><option>All severities</option><option>Warning+</option><option>Error+</option><option>Critical only</option></select></div> <!> <div class="flex-1 overflow-auto space-y-2"><!></div></div>`);function xB(e,t){it(t,!0);let n=N(`info`),r=M(()=>uB(vl.value)),i=M(()=>dB(z(r))),a=M(()=>z(r).filter(e=>fB(e,z(n))));function o(e,t){Nu(e,t),Mu(`traces`)}function s(e){return e.event?e.event:e.signal?`probe: ${e.signal}`:`suspicious request`}var c=bB(),l=F(c),u=F(l),d=F(u);kh(d,{size:16,class:`text-red-500`});var f=L(d,2),p=e=>{var t=mB(),n=F(t,!0);D(t),R(()=>U(n,z(r).length)),H(e,t)};W(f,e=>{z(r).length>0&&e(p)}),D(u);var m=L(u,2),h=F(m);h.value=h.__value=`info`;var g=L(h);g.value=g.__value=`warning`;var _=L(g);_.value=_.__value=`error`;var v=L(_);v.value=v.__value=`critical`,D(m);var y;co(m),D(l);var b=L(l,2),x=e=>{var t=hB(),n=F(t),r=L(F(n),2),a=F(r,!0);D(r),D(n);var o=L(n,2),s=L(F(o),2),c=F(s,!0);D(s),D(o);var l=L(o,2),u=L(F(l),2),d=F(u,!0);D(u),D(l);var f=L(l,2),p=L(F(f),2),m=F(p,!0);D(p),D(f),D(t),R(()=>{U(a,z(i).critical),U(c,z(i).error),U(d,z(i).warning),U(m,z(i).info)}),H(e,t)};W(b,e=>{z(r).length>0&&e(x)});var S=L(b,2),C=F(S),w=e=>{var t=gB();kh(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},T=e=>{var t=la();G(I(t),17,()=>z(a),e=>e.traceId+e.spanId,(e,t)=>{var n=yB(),r=F(n),i=F(r),a=e=>{dh(e,{size:14,class:`text-amber-500`})};W(i,e=>{z(t).suspicious&&e(a)});var c=L(i,2),l=F(c,!0);D(c);var u=L(c,2),d=F(u,!0);D(u);var f=L(u,2),p=e=>{var n=_B(),r=F(n,!0);D(n),R(()=>U(r,z(t).category)),H(e,n)};W(f,e=>{z(t).category&&e(p)});var m=L(f,2),h=e=>{var n=_B(),r=F(n,!0);D(n),R(()=>U(r,z(t).outcome)),H(e,n)};W(m,e=>{z(t).outcome&&e(h)});var g=L(m,2),_=e=>{var n=_B(),r=F(n,!0);D(n),R(()=>U(r,z(t).service)),H(e,n)};W(g,e=>{z(t).service&&e(_)}),D(r);var v=L(r,2),y=F(v),b=L(y),x=e=>{var n=vB(),r=F(n);D(n),R(()=>U(r,`— ${z(t).reason??``}`)),H(e,n)};W(b,e=>{z(t).reason&&e(x)}),D(v);var S=L(v,2),C=F(S),w=F(C,!0);D(C);var T=L(C,2),ee=F(T);xm(ee,{size:10});var te=L(ee);Yp(L(te),{size:10}),D(T),D(S),D(n),R((e,n,r,i)=>{U(l,e),q(u,1,n),U(d,z(t).severity),U(y,`${z(t).spanName??``} `),U(w,r),U(te,` ${i??``}... `)},[()=>s(z(t)),()=>`px-1.5 py-0.5 text-xs font-medium rounded `+pB(z(t).severity),()=>od(z(t).timestamp),()=>z(t).traceId.slice(0,16)]),B(`click`,T,()=>o(z(t).traceId,z(t).spanId)),H(e,n)}),H(e,t)};W(C,e=>{z(a).length===0?e(w):e(T,-1)}),D(S),D(c),R(()=>{y!==(y=z(n))&&(m.value=(m.__value=z(n))??``,so(m,z(n)))}),B(`change`,m,e=>P(n,e.target.value,!0)),H(e,c),at()}ea([`change`,`click`]);async function SB(e,t){let n;try{n=await t.fetch(`${t.baseUrl}/api/analysis/compare`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e),signal:t.signal})}catch(e){return e?.name===`AbortError`?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}let r;try{r=await n.json()}catch{return{status:`error`,message:`Unexpected response (not JSON)`}}let i=r;if(n.status===501)return{status:`unavailable`,message:i.message??`Comparison is unavailable on this server.`};if(n.status===400)return{status:`invalid`,message:i.message??i.error??`Invalid query`};if(!n.ok)return{status:`error`,message:i.error??n.statusText};let a=i.outlierCount??0,o=i.baselineCount??0;return a===0||o===0?{status:`empty`,outlierCount:a,baselineCount:o}:{status:`ok`,differences:i.differences??[],outlierCount:a,baselineCount:o}}var CB=V(`<!> Mark now`,1),wB=V(`<!> Comparing since mark`,1),TB=V(`<option> </option>`),EB=V(`<div class="mb-2 grid grid-cols-2 gap-2"><label class="block text-[11px] text-fg-muted">Arm <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"></select></label> <label class="block text-[11px] text-fg-muted">Against <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"><option>Every other arm</option><!></select></label></div>`),DB=V(`<label class="mb-2 block text-[11px] text-fg-muted">Experiment <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"><option>Compare by query instead</option><!></select></label> <!>`,1),OB=V(`<label class="mb-1 block text-[11px] text-fg-muted">Investigating <input placeholder="duration > 500" class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 font-mono text-xs text-fg focus:border-accent focus:outline-none"/></label>`),kB=V(`<p class="mb-1 text-[11px] text-fg-subtle">Comparing spans since the mark against those before it, within the
|
|
32
|
+
current time window.</p>`),AB=V(`<p class="text-xs text-fg-subtle">Describe the spans you are investigating, or mark a moment and compare
|
|
33
33
|
what came after it. The result ranks the attributes that tell the two
|
|
34
|
-
groups apart.</p>`),
|
|
35
|
-
spans. A share of zero events says nothing about either group.`)),H(e,t)},_e=e=>{var t=
|
|
36
|
-
${z(_).baselineCount??``} they were compared with.`)),H(e,t)},i=e=>{var t=
|
|
37
|
-
hypothesis to check against individual traces, not a conclusion.`)),H(e,t)};W(n,e=>{z(_).differences.length===0?e(r):e(i,-1)}),H(e,t)};W(pe,e=>{z(_)?z(_).status===`unavailable`||z(_).status===`invalid`||z(_).status===`error`?e(he,1):z(_).status===`empty`?e(ge,2):z(_).status===`ok`&&e(_e,3):e(me)}),D(fe),D(x),R(e=>{q(w,1,e),ne.disabled=z(g),U(ie,` ${z(g)?`Comparing…`:`Compare`}`),U(ue,`${z(h)===null?`Compared with`:`Restricted to`} `)},[()=>K(
|
|
38
|
-
nothing`)),H(e,t)},u=e=>{H(e,
|
|
39
|
-
that happen after it runs — call it before registering your tools.`)),H(e,t)};W(te,e=>{z(l).emptyInstallations>0&&e(ne)});var re=L(te,2);G(re,21,()=>z(c).tools,e=>o(e),(e,t)=>{let n=M(()=>o(z(t)));var i=
|
|
34
|
+
groups apart.</p>`),jB=V(`<p class="text-xs text-danger"> </p>`),MB=V(`<p class="text-xs text-fg-muted"> </p>`),NB=V(`<tr class="border-t border-line-subtle"><td class="py-1 pr-2 font-mono"> <span class="text-fg-subtle">=</span> </td><td class="py-1 pr-2 tabular-nums"> </td><td class="py-1 pr-2 tabular-nums text-fg-muted"> </td></tr>`),PB=V(`<p class="mb-2 text-[11px] text-fg-subtle"> </p> <table class="w-full text-left text-xs"><thead class="text-[11px] uppercase tracking-wide text-fg-muted"><tr><th class="py-1 pr-2 font-medium">Attribute</th><th class="py-1 pr-2 font-medium">These</th><th class="py-1 pr-2 font-medium">Those</th></tr></thead><tbody></tbody></table>`,1),FB=V(`<div class="flex h-full flex-col overflow-hidden"><div class="border-b border-line px-4 py-3"><div class="mb-2 flex items-center gap-2"><button type="button"><!></button> <button type="button" class="flex items-center gap-1 rounded bg-accent px-2 py-1 text-xs text-white hover:opacity-90 disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"><!> </button></div> <!> <!> <label class="block text-[11px] text-fg-muted"> <input placeholder="everything else" class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 font-mono text-xs text-fg focus:border-accent focus:outline-none"/></label></div> <div class="flex-1 overflow-auto px-4 py-3"><!></div></div>`);function IB(e,t){it(t,!0);let n=N(`duration > 500`),r=N(``),i=N(_r([])),a=N(``),o=N(``),s=N(``),c=e=>z(i).find(t=>t.name===e)?.arms??[];function l(){let e=pl.value;return e===null?null:Zo(e)}let u=e=>`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`;async function d(){let e=l();if(e!==null)try{let t=await fetch(`${e}/api/query/attributes?key=experiment.name&pair=experiment.variant`);if(!t.ok)return;let n=await t.json(),r=new Map;for(let e of n.pairs??[]){let t=String(e.value),n=String(e.paired);if(t===``||n===``)continue;let i=r.get(t)??[];i.includes(n)||i.push(n),r.set(t,i)}P(i,[...r].map(([e,t])=>({name:e,arms:t})),!0)}catch{}}Lr(()=>{d()});function f(e){P(a,e,!0);let t=c(e);P(o,t[0]??``,!0),P(s,t[1]??``,!0),e!==``&&P(h,null),m()}function p(e){P(o,e,!0),z(s)===e&&P(s,``),m()}function m(){if(z(a)===``||z(o)===``)return;let e=`experiment.name = ${u(z(a))}`;P(n,`${e} AND experiment.variant = ${u(z(o))}`),P(r,z(s)===``?`${e} AND experiment.variant != ${u(z(o))}`:`${e} AND experiment.variant = ${u(z(s))}`,!0)}let h=N(null),g=N(!1),_=N(null),v=e=>`${Math.round(e*100)}%`;function y(){let e=Cs(ml.value,Date.now());if(z(h)===null){let t=ks(e);return{outlier:{query:z(n),window:t},baseline:{query:z(r),window:t}}}return{outlier:{query:z(r),window:{start:z(h),end:Date.now()}},baseline:{query:z(r),window:{start:e?.start??0,end:z(h)}}}}async function b(){let e=pl.value,t=e===null?null:Zo(e);if(t===null){P(_,{status:`error`,message:`The telemetry receiver is not connected.`},!0);return}P(g,!0);try{P(_,await SB({...y(),ignoreFields:z(a)===``?void 0:[`experiment.name`,`experiment.variant`]},{fetch:globalThis.fetch.bind(globalThis),baseUrl:t}),!0)}finally{P(g,!1)}}var x=FB(),S=F(x),C=F(S),w=F(C),T=F(w),ee=e=>{var t=CB();am(I(t),{size:12}),Ke(),H(e,t)},te=e=>{var t=wB();rg(I(t),{size:12}),Ke(),H(e,t)};W(T,e=>{z(h)===null?e(ee):e(te,-1)}),D(w);var ne=L(w,2),re=F(ne);ah(re,{size:12});var ie=L(re);D(ne),D(C);var ae=L(C,2),oe=e=>{var t=DB(),n=I(t),r=L(F(n)),l=F(r);l.value=l.__value=``,G(L(l),17,()=>z(i),e=>e.name,(e,t)=>{var n=TB(),r=F(n,!0);D(n);var i={};R(()=>{U(r,z(t).name),i!==(i=z(t).name)&&(n.value=(n.__value=z(t).name)??``)}),H(e,n)}),D(r);var u;co(r),D(n);var d=L(n,2),h=e=>{var t=EB(),n=F(t),r=L(F(n));G(r,20,()=>c(z(a)),e=>e,(e,t)=>{var n=TB(),r=F(n,!0);D(n);var i={};R(()=>{U(r,t),i!==(i=t)&&(n.value=(n.__value=t)??``)}),H(e,n)}),D(r);var i;co(r),D(n);var l=L(n,2),u=L(F(l)),d=F(u);d.value=d.__value=``,G(L(d),16,()=>c(z(a)).filter(e=>e!==z(o)),e=>e,(e,t)=>{var n=TB(),r=F(n,!0);D(n);var i={};R(()=>{U(r,t),i!==(i=t)&&(n.value=(n.__value=t)??``)}),H(e,n)}),D(u);var f;co(u),D(l),D(t),R(()=>{i!==(i=z(o))&&(r.value=(r.__value=z(o))??``,so(r,z(o))),f!==(f=z(s))&&(u.value=(u.__value=z(s))??``,so(u,z(s)))}),B(`change`,r,e=>p(e.currentTarget.value)),B(`change`,u,e=>{P(s,e.currentTarget.value,!0),m()}),H(e,t)};W(d,e=>{z(a)!==``&&e(h)}),R(()=>{u!==(u=z(a))&&(r.value=(r.__value=z(a))??``,so(r,z(a)))}),B(`change`,r,e=>f(e.currentTarget.value)),H(e,t)};W(ae,e=>{z(i).length>0&&e(oe)});var se=L(ae,2),ce=e=>{var t=OB(),r=L(F(t));xo(r),D(t),Ao(r,()=>z(n),e=>P(n,e)),H(e,t)},le=e=>{H(e,kB())};W(se,e=>{z(h)===null?e(ce):e(le,-1)});var E=L(se,2),ue=F(E),de=L(ue);xo(de),D(E),D(S);var fe=L(S,2),pe=F(fe),me=e=>{H(e,AB())},he=e=>{var t=jB(),n=F(t,!0);D(t),R(()=>U(n,z(_).message)),H(e,t)},ge=e=>{var t=MB(),n=F(t);D(t),R(()=>U(n,`Nothing to compare: ${z(_).outlierCount??``} against ${z(_).baselineCount??``}
|
|
35
|
+
spans. A share of zero events says nothing about either group.`)),H(e,t)},_e=e=>{var t=la(),n=I(t),r=e=>{var t=MB(),n=F(t);D(t),R(()=>U(n,`No attribute separates these ${z(_).outlierCount??``} spans from the
|
|
36
|
+
${z(_).baselineCount??``} they were compared with.`)),H(e,t)},i=e=>{var t=PB(),n=I(t),r=F(n);D(n);var i=L(n,2),a=L(F(i));G(a,21,()=>z(_).differences,e=>`${e.field}=${e.value}`,(e,t)=>{var n=NB(),r=F(n),i=F(r,!0),a=L(i,2,!0);D(r);var o=L(r),s=F(o,!0);D(o);var c=L(o),l=F(c,!0);D(c),D(n),R((e,n)=>{U(i,z(t).field),U(a,z(t).value),U(s,e),U(l,n)},[()=>v(z(t).outlierFraction),()=>v(z(t).baselineFraction)]),H(e,n)}),D(a),D(i),R(()=>U(r,`${z(_).outlierCount??``} spans against ${z(_).baselineCount??``}. A
|
|
37
|
+
hypothesis to check against individual traces, not a conclusion.`)),H(e,t)};W(n,e=>{z(_).differences.length===0?e(r):e(i,-1)}),H(e,t)};W(pe,e=>{z(_)?z(_).status===`unavailable`||z(_).status===`invalid`||z(_).status===`error`?e(he,1):z(_).status===`empty`?e(ge,2):z(_).status===`ok`&&e(_e,3):e(me)}),D(fe),D(x),R(e=>{q(w,1,e),ne.disabled=z(g),U(ie,` ${z(g)?`Comparing…`:`Compare`}`),U(ue,`${z(h)===null?`Compared with`:`Restricted to`} `)},[()=>K($(`flex items-center gap-1 rounded px-2 py-1 text-xs`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,z(h)===null?`border border-line text-fg-muted hover:text-fg`:`bg-accent text-white`))]),B(`click`,w,()=>P(h,z(h)===null?Date.now():null,!0)),B(`click`,ne,b),Ao(de,()=>z(r),e=>P(r,e)),H(e,x),at()}ea([`click`,`change`]);var LB=V(`<span class="text-xs text-fg"> </span>`),RB=V(`<span class="text-xs text-fg-muted">Instrumentation coverage</span>`),zB=V(`<p class="text-xs text-fg-subtle">Loading…</p>`),BB=V(`<div class="flex items-start gap-2 text-xs text-fg-muted"><!> <p> </p></div>`),VB=V(`<p class="text-xs text-danger"> </p>`),HB=V(`<p class="text-xs text-fg-muted">The map records no entry points.</p>`),UB=V(`<span class="mr-1 inline-block h-1.5 w-1.5 rounded-full bg-danger" aria-label="never seen"></span>`),WB=V(`<tr class="border-t border-line-subtle"><td class="py-1 pr-2 font-mono"><!> </td><td> </td><td class="py-1"><a class="text-fg-subtle hover:text-accent hover:underline"> </a></td></tr>`),GB=V(`<table class="w-full text-left text-xs"><thead class="text-[11px] uppercase tracking-wide text-fg-muted"><tr><th class="py-1 pr-2 font-medium">Entry point</th><th class="py-1 pr-2 font-medium">Spans</th><th class="py-1 font-medium">Source</th></tr></thead><tbody></tbody></table>`),KB=V(`<div class="flex h-full flex-col overflow-hidden"><div class="flex items-center justify-between border-b border-line px-4 py-3"><div><!></div> <button type="button" class="flex items-center gap-1 rounded border border-line px-2 py-1 text-xs text-fg-muted hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"><!> Refresh</button></div> <div class="flex-1 overflow-auto px-4 py-3"><!></div></div>`);function qB(e,t){it(t,!0);let n=N(_r({status:`idle`}));async function r(){P(n,{status:`loading`},!0);try{let e=pl.value,t=e===null?null:Zo(e);if(t===null){P(n,{status:`error`,message:`The telemetry receiver is not connected.`},!0);return}let r=await fetch(`${t}/api/coverage`),i=await r.json();r.status===404?P(n,{status:`missing`,message:i.message??`No map found.`},!0):r.ok?P(n,{status:`ok`,...i},!0):P(n,{status:`error`,message:i.message??r.statusText},!0)}catch(e){P(n,{status:`error`,message:e instanceof Error?e.message:`Request failed`},!0)}}Lr(()=>{r()});let i=e=>`vscode://file/${e.file}${e.handler?.line?`:${e.handler.line}`:``}`;var a=KB(),o=F(a),s=F(o),c=F(s),l=e=>{var t=LB(),r=F(t);D(t),R(()=>U(r,`${z(n).total-z(n).seenCount} of ${z(n).total??``} entry points have emitted
|
|
38
|
+
nothing`)),H(e,t)},u=e=>{H(e,RB())};W(c,e=>{z(n).status===`ok`?e(l):e(u,-1)}),D(s);var d=L(s,2);ph(F(d),{size:12}),Ke(),D(d),D(o);var f=L(o,2),p=F(f),m=e=>{H(e,zB())},h=e=>{var t=BB(),r=F(t);tm(r,{size:14,class:`mt-0.5 shrink-0`});var i=L(r,2),a=F(i,!0);D(i),D(t),R(()=>U(a,z(n).message)),H(e,t)},g=e=>{var t=VB(),r=F(t,!0);D(t),R(()=>U(r,z(n).message)),H(e,t)},_=e=>{H(e,HB())},v=e=>{var t=GB(),r=L(F(t));G(r,21,()=>z(n).entries,e=>`${e.method??``} ${e.path}`,(e,t)=>{var n=WB(),r=F(n),a=F(r),o=e=>{H(e,UB())};W(a,e=>{z(t).seen||e(o)});var s=L(a);D(r);var c=L(r),l=F(c,!0);D(c);var u=L(c),d=F(u),f=F(d,!0);D(d),D(u),D(n),R(e=>{U(s,` ${z(t).method?`${z(t).method} `:``}${z(t).path??``}`),q(c,1,K(z(t).seen?`py-1 pr-2 tabular-nums text-fg-muted`:`py-1 pr-2 text-danger`)),U(l,z(t).seen?z(t).spanCount:`none`),J(d,`href`,e),U(f,z(t).file)},[()=>i(z(t))]),H(e,n)}),D(r),D(t),H(e,t)};W(p,e=>{z(n).status===`loading`||z(n).status===`idle`?e(m):z(n).status===`missing`?e(h,1):z(n).status===`error`?e(g,2):z(n).entries.length===0?e(_,3):e(v,-1)}),D(f),D(a),B(`click`,d,r),H(e,a),at()}ea([`click`]);var JB=V(`<p class="p-4 text-sm text-fg-muted">Loading…</p>`),YB=V(`<p class="p-4 text-sm text-danger"> </p>`),XB=V(`<div class="flex items-start gap-2 m-3 p-2 rounded bg-warning-bg text-warning text-xs"><!> <span> </span></div>`),ZB=V(`<span class="text-xs text-fg-muted font-normal"> </span>`),QB=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-success-bg text-success rounded">offered</span>`),$B=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded">withdrawn</span>`),eV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="The title the browser may show does not match the name that runs">label mismatch</span>`),tV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="This name came back with a different descriptor after it was first offered">redefined</span>`),nV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded" title="A known library refusal — the handler did not run"> </span>`),rV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="The browser discarded these at registration"> </span>`),iV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="Chrome does not unwrap the MCP envelope; the agent parses it">envelope</span>`),aV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded" title="The browser replaced an empty result with its own text">substituted</span>`),oV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="The agent was not told what arguments to send">no schema</span>`),sV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-subtle rounded" title="Seen executing but never at registration — annotations and schema are unknown">not observed at registration</span>`),cV=V(`<span class="text-danger"> </span>`),lV=V(`<span>session <code class="font-mono"> </code></span>`),uV=V(`<span> </span>`),dV=V(`<div class="flex items-start gap-2 text-fg-muted"><span> <code class="font-mono"></code> </span></div>`),fV=V(`, kept <code class="font-mono"> </code>`,1),pV=V(`<div class="text-fg-muted">annotations sent <code class="font-mono"> </code><!></div>`),mV=V(`<button type="button" class="flex items-center gap-1 text-fg-subtle hover:text-fg"> </button>`),hV=V(`<span class="text-fg-subtle"> </span>`),gV=V(`<span class="text-fg-muted"> </span>`),_V=V(`<span class="text-fg-muted break-all"> </span>`),vV=V(`<li class="font-mono text-[11px] flex flex-wrap gap-2"><!> <span class="text-fg-subtle"> </span> <!> <span> </span> <!></li>`),yV=V(`<div><div class="flex items-center justify-between mb-1.5"><h5 class="font-semibold text-fg-muted">Recent calls</h5> <!></div> <ul class="space-y-1"></ul></div>`),bV=V(`<div class="border-t border-line p-3 bg-subtle space-y-3 text-xs"><div class="flex flex-wrap gap-4 text-fg-muted"><span>service <code class="font-mono"> </code></span> <!> <span>installation <code class="font-mono"> </code></span> <!></div> <!> <!> <!></div>`),xV=V(`<li><button type="button" class="w-full p-3 flex items-start gap-3 hover:bg-subtle transition-colors text-left"><div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-1 flex-wrap"><span class="text-sm font-mono font-semibold"> </span> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <div class="flex items-center gap-4 text-xs text-fg-subtle"><span> </span> <!> <span> </span> <span> </span></div></div></button> <!></li>`),SV=V(`<div class="grid grid-cols-2 sm:grid-cols-4 gap-3 p-3 border-b border-line"><div><div class="text-lg font-semibold"> </div> <div class="text-xs text-fg-subtle">offered now</div></div> <div><div class="text-lg font-semibold"> </div> <div class="text-xs text-fg-subtle"> </div></div> <div><div> </div> <div class="text-xs text-fg-subtle">with dropped annotations</div></div> <div><div class="text-lg font-semibold"> </div> <div class="text-xs text-fg-subtle"> </div></div></div> <!> <ul class="divide-y divide-line"></ul>`,1),CV=V(`<div class="p-6 max-w-xl space-y-3 text-sm"><p class="text-fg-muted">No WebMCP tools observed in this window.</p> <p class="text-fg-subtle text-xs">WebMCP needs Chrome 151+ with <code class="font-mono bg-code px-1 rounded">chrome://flags/#web-machine-learning-model-context</code> enabled. Check with <code class="font-mono">'modelContext' in document</code>.</p> <pre class="bg-code text-fg p-2 rounded text-xs overflow-x-auto"></pre> <p class="text-fg-subtle text-xs">Registrations that happen before <code class="font-mono">instrumentWebMCP()</code> runs are invisible to it.</p></div>`),wV=V(`<div class="h-full overflow-auto"><div class="flex items-center justify-between p-3 border-b border-line"><div class="flex items-center gap-2"><!> <h2 class="text-sm font-semibold">WebMCP tools</h2></div> <button type="button" class="flex items-center gap-1 text-xs text-fg-subtle hover:text-fg">Refresh</button></div> <!></div>`);function TV(e,t){it(t,!0);let n=N(_r({status:`idle`})),r=N(null),i,a=N(!1),o=e=>`${e.service}/${e.installationId}/${e.name}`;async function s(){i?.abort();let e=new AbortController;i=e;let t=pl.value,r=t===null?null:Zo(t);if(r===null){P(n,{status:`error`,message:`The telemetry receiver is not connected.`},!0);return}P(n,{status:`loading`},!0);let a=await yA({window:ks(Cs(ml.value,Date.now()))},{fetch,baseUrl:r,signal:e.signal});e.signal.aborted||(a.status===`ok`?P(n,{status:`ok`,inventory:a.webmcp},!0):a.status===`invalid`?P(n,{status:`error`,message:`The server rejected the query.`},!0):a.status===`error`&&P(n,{status:`error`,message:a.message},!0))}Lr(()=>{ml.value,pl.value,s()});let c=M(()=>z(n).status===`ok`?z(n).inventory:void 0),l=M(()=>z(c)?.summary),u=e=>e<1024?`${e} B`:`${(e/1024).toFixed(1)} kB`,d=e=>z(a)?dd(e):`•`.repeat(Math.min(e.length,32));var f=wV(),p=F(f),m=F(p);tg(F(m),{size:16,class:`text-fg-muted`}),Ke(2),D(m);var h=L(m,2);D(p);var g=L(p,2),_=e=>{H(e,JB())},v=e=>{var t=YB(),r=F(t,!0);D(t),R(()=>U(r,z(n).message)),H(e,t)},y=e=>{var t=SV(),n=I(t),i=F(n),s=F(i),f=F(s,!0);D(s),Ke(2),D(i);var p=L(i,2),m=F(p),h=F(m,!0);D(m);var g=L(m,2),_=F(g);D(g),D(p);var v=L(p,2),y=F(v);let b;var x=F(y,!0);D(y),Ke(2),D(v);var S=L(v,2),C=F(S),w=F(C,!0);D(C);var T=L(C,2),ee=F(T);D(T),D(S),D(n);var te=L(n,2),ne=e=>{var t=XB(),n=F(t);Gh(n,{size:14,class:`mt-0.5 shrink-0`});var r=L(n,2),i=F(r);D(r),D(t),R(()=>U(i,`${z(l).emptyInstallations??``} installation${z(l).emptyInstallations===1?``:`s`} registered no tools. \`instrumentWebMCP()\` only sees registrations
|
|
39
|
+
that happen after it runs — call it before registering your tools.`)),H(e,t)};W(te,e=>{z(l).emptyInstallations>0&&e(ne)});var re=L(te,2);G(re,21,()=>z(c).tools,e=>o(e),(e,t)=>{let n=M(()=>o(z(t)));var i=xV(),s=F(i),c=F(s),l=F(c),f=F(l),p=F(f,!0);D(f);var m=L(f,2),h=e=>{var n=ZB(),r=F(n);D(n),R(()=>U(r,`title ${z(t).title??``}`)),H(e,n)};W(m,e=>{z(t).title&&z(t).labelMismatch&&e(h)});var g=L(m,2),_=e=>{H(e,QB())},v=e=>{H(e,$B())};W(g,e=>{z(t).offered?e(_):e(v,-1)});var y=L(g,2),b=e=>{H(e,eV())};W(y,e=>{z(t).labelMismatch&&e(b)});var x=L(y,2),S=e=>{H(e,tV())};W(x,e=>{z(t).redefined&&e(S)});var C=L(x,2),w=e=>{var n=nV(),r=F(n);D(n),R(()=>U(r,`refused ${z(t).refusedCalls??``}`)),H(e,n)};W(C,e=>{z(t).refusedCalls>0&&e(w)});var T=L(C,2),ee=e=>{var n=rV(),r=F(n);D(n),R(e=>U(r,`dropped ${e??``}`),[()=>z(t).annotationsDropped.join(`, `)]),H(e,n)};W(T,e=>{z(t).annotationsDropped.length>0&&e(ee)});var te=L(T,2),ne=e=>{H(e,iV())};W(te,e=>{z(t).envelopeCalls>0&&e(ne)});var re=L(te,2),ie=e=>{H(e,aV())};W(re,e=>{z(t).substitutedCalls>0&&e(ie)});var ae=L(re,2),oe=e=>{H(e,oV())};W(ae,e=>{z(t).observedAtRegistration&&z(t).hasInputSchema===!1&&e(oe)});var se=L(ae,2),ce=e=>{H(e,sV())};W(se,e=>{z(t).observedAtRegistration||e(ce)}),D(l);var le=L(l,2),E=F(le),ue=F(E);D(E);var de=L(E,2),fe=e=>{var n=cV(),r=F(n);D(n),R(()=>U(r,`${z(t).errors??``} failed`)),H(e,n)};W(de,e=>{z(t).errors>0&&e(fe)});var pe=L(de,2),me=F(pe);D(pe);var he=L(pe,2),ge=F(he,!0);D(he),D(le),D(c),D(s);var _e=L(s,2),ve=e=>{var n=bV(),r=F(n),i=F(r),o=L(F(i)),s=F(o,!0);D(o),D(i);var c=L(i,2),l=e=>{var n=lV(),r=L(F(n)),i=F(r,!0);D(r),D(n),R(()=>U(i,z(t).sessionId)),H(e,n)};W(c,e=>{z(t).sessionId&&e(l)});var f=L(c,2),p=L(F(f)),m=F(p,!0);D(p),D(f);var h=L(f,2),g=e=>{var n=uV(),r=F(n);D(n),R(()=>U(r,`${z(t).descriptionLength??``}-char description`)),H(e,n)};W(h,e=>{z(t).descriptionLength!==void 0&&e(g)}),D(r);var _=L(r,2),v=e=>{var n=dV(),r=F(n),i=F(r),a=L(i);a.textContent=`{ content: [...] }`;var o=L(a);D(r),D(n),R((e,n)=>{U(i,`${z(t).envelopeCalls??``} of ${z(t).calls??``} results arrived as an MCP `),U(o,` envelope. Chrome hands the agent the wrapper unparsed, so
|
|
40
40
|
${e??``} would be about
|
|
41
41
|
${n??``}
|
|
42
|
-
returning the text plainly.`)},[()=>u(z(t).resultBytes),()=>u(Math.max(0,z(t).resultBytes-z(t).envelopeBytes))]),H(e,n)};W(_,e=>{z(t).envelopeCalls>0&&e(v)});var y=L(_,2),b=e=>{var n=
|
|
42
|
+
returning the text plainly.`)},[()=>u(z(t).resultBytes),()=>u(Math.max(0,z(t).resultBytes-z(t).envelopeBytes))]),H(e,n)};W(_,e=>{z(t).envelopeCalls>0&&e(v)});var y=L(_,2),b=e=>{var n=pV(),r=L(F(n)),i=F(r,!0);D(r);var a=L(r),o=e=>{var n=fV(),r=L(I(n)),i=F(r,!0);D(r),R(e=>U(i,e),[()=>z(t).annotationsSent.filter(e=>!z(t).annotationsDropped.includes(e)).join(`, `)||`none`]),H(e,n)};W(a,e=>{z(t).annotationsDropped.length>0&&e(o)}),D(n),R(e=>U(i,e),[()=>z(t).annotationsSent.join(`, `)]),H(e,n)};W(y,e=>{z(t).annotationsSent.length>0&&e(b)});var x=L(y,2),S=e=>{var n=yV(),r=F(n),i=L(F(r),2),o=e=>{var t=mV(),n=F(t,!0);D(t),R(()=>U(n,z(a)?`Hide payloads`:`Reveal payloads`)),B(`click`,t,()=>P(a,!z(a))),H(e,t)},s=M(()=>z(t).recentCalls.some(e=>e.input||e.result));W(i,e=>{z(s)&&e(o)}),D(r);var c=L(r,2);G(c,21,()=>z(t).recentCalls,e=>e.spanId,(e,t)=>{var n=vV(),r=F(n),i=e=>{var n=hV(),r=F(n);D(n),R(()=>U(r,`#${z(t).seq??``}`)),H(e,n)};W(r,e=>{z(t).seq!==void 0&&e(i)});var a=L(r,2),o=F(a,!0);D(a);var s=L(a,2),c=e=>{var n=gV(),r=F(n,!0);D(n),R(()=>U(r,z(t).refusal??`refused`)),H(e,n)};W(s,e=>{z(t).refused&&e(c)});var l=L(s,2);let f;var p=F(l);D(l);var m=L(l,2),h=e=>{var n=_V(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>d(z(t).result)]),H(e,n)};W(m,e=>{z(t).result&&e(h)}),D(n),R((e,n)=>{U(o,e),f=q(l,1,``,null,f,{"text-danger":z(t).error}),U(p,`${z(t).resultType??`result`??``} · ${n??``}`)},[()=>od(z(t).timestamp),()=>u(z(t).resultBytes)]),H(e,n)}),D(c),D(n),H(e,n)};W(x,e=>{z(t).recentCalls.length>0&&e(S)}),D(n),R(()=>{U(s,z(t).service),U(m,z(t).installationId)}),H(e,n)};W(_e,e=>{z(r)===z(n)&&e(ve)}),D(i),R((e,n,r)=>{U(p,z(t).name),U(ue,`${e??``} calls`),U(me,`${n??``} median result`),U(ge,r)},[()=>sd(z(t).calls),()=>u(z(t).medianResultBytes),()=>od(z(t).lastSeen)]),B(`click`,s,()=>P(r,z(r)===z(n)?null:z(n),!0)),H(e,i)}),D(re),R((e,t,n)=>{U(f,z(l).toolsOffered),U(h,e),U(_,`calls${z(l).errors>0?`, ${z(l).errors} failed`:``}`),b=q(y,1,`text-lg font-semibold`,null,b,{"text-warning":z(l).toolsWithDroppedAnnotations>0}),U(x,z(l).toolsWithDroppedAnnotations),U(w,t),U(ee,`result bytes${n??``}`)},[()=>sd(z(l).calls),()=>u(z(l).resultBytes),()=>z(l).envelopeBytes>0?` · ${u(z(l).envelopeBytes)} envelope`:``]),H(e,t)},b=e=>{var t=CV(),n=L(F(t),4);n.textContent=`npm install autotel-webmcp autotel-web
|
|
43
43
|
|
|
44
44
|
import { instrumentWebMCP } from 'autotel-webmcp';
|
|
45
|
-
instrumentWebMCP(); // before you register any tools`,Ke(2),D(t),H(e,t)};W(g,e=>{z(n).status===`loading`?e(_):z(n).status===`error`?e(v,1):z(c)&&z(l)&&z(c).tools.length>0?e(y,2):e(b,-1)}),D(f),B(`click`,h,()=>void s()),H(e,f),at()}na([`click`]);var PV={traces:rj,agents:Nj,genai:FN,flow:OP,resources:RP,"service-map":gF,metrics:iz,logs:Dz,errors:dB,security:kB,compare:WB,coverage:tV,webmcp:NV},FV=[{id:`traces`,label:`Traces`,icon:Hp},{id:`agents`,label:`Agents`,icon:cp},{id:`genai`,label:`GenAI`,icon:Mh},{id:`flow`,label:`Flow`,icon:Qh},{id:`resources`,label:`Resources`,icon:up},{id:`service-map`,label:`Service Map`,icon:Km},{id:`metrics`,label:`Metrics`,icon:vp},{id:`logs`,label:`Logs`,icon:nm},{id:`errors`,label:`Errors`,icon:Wh},{id:`security`,label:`Security`,icon:Oh},{id:`compare`,label:`Compare`,icon:mm},{id:`coverage`,label:`Coverage`,icon:gh},{id:`webmcp`,label:`WebMCP`,icon:eg}].filter(e=>PV[e.id]!==void 0),IV=FV.map(e=>e.id),LV=16,RV=48;function zV(e){let{isVertical:t,dock:n,axisSize:r,setSize:i,resetSize:a}=e,o=N(!1);return{get resizing(){return z(o)},onPointerDown:e=>{e.stopPropagation();let a=t(),s=a?`vertical`:`horizontal`,c=a?e.clientY:e.clientX,l=r(),u=n()===`bottom`||n()===`right`?-1:1;_y(e,{cursor:a?`ns-resize`:`ew-resize`,onStart:()=>P(o,!0),onMove:e=>{let t=a?e.clientY:e.clientX;i(s,l+(t-c)*u)},onEnd:()=>P(o,!1)})},onKeyDown:e=>{let a=t()?`vertical`:`horizontal`,o=e.shiftKey?RV:LV,s=t()?{ArrowUp:n()===`bottom`?o:-o,ArrowDown:n()===`bottom`?-o:o}:{ArrowLeft:n()===`right`?o:-o,ArrowRight:n()===`right`?-o:o};e.key in s&&(e.preventDefault(),i(a,r()+s[e.key]))},onDblClick:()=>a(t()?`vertical`:`horizontal`)}}function BV(e,t,n,r){let i={left:e,right:n-e,top:t,bottom:r-t};return Object.keys(i).reduce((e,t)=>i[t]<i[e]?t:e)}function VV(e){let{dock:t,pipActive:n,onDock:r}=e,i=N(!1),a=N(null);return{get dragging(){return z(i)},get dropTarget(){return z(a)},onHeaderPointerDown:e=>{e.button===0&&(e.target.closest(`button`)||n()||_y(e,{cursor:`grabbing`,onStart:()=>{P(i,!0),P(a,t(),!0)},onMove:e=>{P(a,BV(e.clientX,e.clientY,window.innerWidth,window.innerHeight),!0)},onEnd:()=>{P(i,!1),z(a)&&z(a)!==t()&&r(z(a)),P(a,null)}}))}}}function HV(e,t){it(t,!0);let n=M(()=>Bc.value),r=M(()=>PV[z(n)]??PV.traces);var i=da(),a=I(i),o=e=>{var t=da();Ba(I(t),()=>z(r),(e,t)=>{t(e,{})}),H(e,t)};W(a,e=>{z(r)&&e(o)}),H(e,i),at()}var UV=V(`<span class="absolute inset-0 rounded-full bg-success opacity-75 animate-ping" aria-hidden="true"></span>`),WV=V(`<span class="text-xs font-mono tabular-nums text-fg-subtle" title="Telemetry ingest rate"> </span>`),GV=V(`<span class="text-xs font-mono tabular-nums text-fg-subtle" title="Telemetry store usage and retention cap"> </span>`),KV=V(`<span> </span> <!> <!>`,1),qV=V(`<div role="status"><span class="relative inline-flex w-2 h-2 shrink-0"><!> <span aria-hidden="true"></span></span> <!></div>`);function JV(e,t){it(t,!0);let n=Z(t,`compact`,3,!1),r=M(()=>fl.value),i=M(()=>z(r)===`connected`?{dot:`bg-success`,label:`Connected`,text:`text-success`}:z(r)===`connecting`?{dot:`bg-warning animate-pulse`,label:`Connecting…`,text:`text-warning`}:{dot:`bg-danger`,label:`Disconnected`,text:`text-fg-subtle`}),a=M(()=>yl.value),o=N(!1);zr(()=>{if(z(a),z(a)===0)return;P(o,!0);let e=setTimeout(()=>P(o,!1),900);return()=>clearTimeout(e)});let s=N(0);zr(()=>{if(n())return;let e=()=>{P(s,Math.round(Cl(5e3).total),!0)};e();let t=setInterval(e,1e3);return()=>clearInterval(t)});let c=M(()=>!n()&&z(r)===`connected`&&z(s)>0),l=N(null);zr(()=>{if(n()||z(r)!==`connected`)return;let e=!0,t=async()=>{let t=pl.value,n=(t?$o(t):null)??globalThis.location?.origin;if(n)try{let t=await fetch(`${n}/api/stats`);t.ok&&e&&P(l,await t.json(),!0)}catch{}};t();let i=setInterval(t,3e4);return()=>{e=!1,clearInterval(i)}});function u(e){return e<1024**2?`${Math.round(e/1024)} KB`:e<1024**3?`${(e/1024**2).toFixed(1)} MB`:`${(e/1024**3).toFixed(1)} GB`}var d=qV(),f=F(d),p=F(f),m=e=>{H(e,UV())};W(p,e=>{z(o)&&z(r)===`connected`&&e(m)});var h=L(p,2);D(f);var g=L(f,2),_=e=>{var t=KV(),n=I(t),r=F(n,!0);D(n);var a=L(n,2),o=e=>{var t=WV(),n=F(t);D(t),R(()=>U(n,`· ${z(s)??``}/s`)),H(e,t)};W(a,e=>{z(c)&&e(o)});var d=L(a,2),f=e=>{var t=GV(),n=F(t);D(t),R((e,t)=>U(n,`· ${e??``} / ${t??``}`),[()=>u(z(l).bytesUsed),()=>u(z(l).maxBytes)]),H(e,t)};W(d,e=>{z(l)&&e(f)}),R(e=>{q(n,1,e),U(r,z(i).label)},[()=>K(Q(`text-xs font-medium`,z(i).text))]),H(e,t)};W(g,e=>{n()||e(_)}),D(d),R((e,t)=>{q(d,1,e),J(d,`aria-label`,`OTLP receiver: ${z(i).label}`),J(d,`title`,`OTLP receiver: ${z(i).label}${z(s)>0?` · ${z(s)}/s`:``}`),q(h,1,t)},[()=>K(Q(`flex items-center gap-1.5`,!n()&&`px-3 py-2`)),()=>K(Q(`relative inline-block w-2 h-2 rounded-full`,z(i).dot))]),H(e,d),at()}var YV=V(`<kbd class="inline-block px-1.5 py-0.5 font-mono text-xs font-semibold bg-hover border border-line rounded text-fg mr-1 last:mr-0 shadow-[0_1px_0_#d4d4d8]"> </kbd>`),XV=V(`<tr class="border-b border-line-subtle last:border-b-0"><td class="py-2.5 px-4 whitespace-nowrap align-middle w-[1%]"></td><td class="py-2.5 pr-4 pl-1 text-sm text-fg-muted align-middle"> </td></tr>`),ZV=V(`<div class="fixed inset-0 z-[1000] flex items-center justify-center" role="dialog" aria-modal="true" aria-label="Keyboard shortcuts"><button type="button" aria-label="Close" class="absolute inset-0 bg-black/55 backdrop-blur-[2px] at-backdrop-in"></button> <div tabindex="-1" class="at-modal-in relative z-[1] bg-surface border border-line rounded-lg shadow-xl w-[480px] max-w-[90vw] max-h-[80vh] flex flex-col overflow-hidden outline-none"><div class="flex items-center justify-between px-4 py-3 border-b border-line bg-subtle flex-shrink-0"><span class="text-sm font-semibold text-fg">Keyboard Shortcuts</span> <button class="inline-flex items-center justify-center w-7 h-7 p-0 bg-transparent border border-line rounded cursor-pointer text-sm text-fg-subtle hover:bg-danger-bg hover:border-danger-border hover:text-danger transition-colors" title="Close (Esc)"><!></button></div> <div class="overflow-y-auto py-2"><table class="w-full border-collapse"><tbody></tbody></table></div></div></div>`);function QV(e,t){it(t,!0);let n=N(void 0);zr(()=>{let e=e=>{e.key===`Escape`&&(e.stopPropagation(),t.onClose())},r=z(n);return r&&(r.addEventListener(`keydown`,e),r.focus()),window.addEventListener(`keydown`,e),()=>{r&&r.removeEventListener(`keydown`,e),window.removeEventListener(`keydown`,e)}});var r=ZV(),i=F(r),a=L(i,2),o=F(a),s=L(F(o),2);ng(F(s),{size:14}),D(s),D(o);var c=L(o,2),l=F(c),u=F(l);G(u,21,()=>t.shortcuts,Aa,(e,t)=>{var n=XV(),r=F(n);G(r,21,()=>z(t).keys,Aa,(e,t)=>{var n=YV(),r=F(n,!0);D(n),R(()=>U(r,z(t)===`CmdOrCtrl`?bg?`⌘`:`Ctrl`:z(t)===`AltOrOpt`?bg?`⌥`:`Alt`:z(t))),H(e,n)}),D(r);var i=L(r),a=F(i,!0);D(i),D(n),R(()=>U(a,z(t).description)),H(e,n)}),D(u),D(l),D(c),D(a),Uo(a,e=>P(n,e),()=>z(n)),D(r),B(`click`,i,function(...e){t.onClose?.apply(this,e)}),B(`click`,s,function(...e){t.onClose?.apply(this,e)}),H(e,r),at()}na([`click`]);var $V=V(`<div role="separator" aria-label="Resize panel" tabindex="0" title="Drag to resize · double-click to reset"><div></div> <div></div></div>`),eH=V(`<span class="text-fg-subtle/60 flex-shrink-0 pl-0.5" aria-hidden="true"><!></span>`),tH=V(`<span> </span>`),nH=V(`<button><!> <span> </span> <!></button>`),rH=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Dock position (click to cycle: bottom → right → left) — or drag the header to an edge" aria-label="Change dock position"><!></button>`),iH=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors"><!></button>`),aH=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Close (Esc)" aria-label="Close devtools"><!></button>`),oH=V(`<span class="px-2.5 py-1 rounded-md bg-accent text-white text-xs font-semibold shadow-lg"> </span>`),sH=V(`<div><!></div>`),cH=V(`<div class="fixed inset-0 z-[1001] pointer-events-none" aria-hidden="true"></div>`),lH=V(`<section aria-label="Autotel devtools"><!> <header><!> <div class="flex items-center gap-2 flex-shrink-0 pr-1 mr-0.5"><!> <span class="text-xs font-semibold tracking-tight text-fg hidden sm:inline">autotel</span></div> <nav class="flex items-center gap-0.5 overflow-x-auto min-w-0 flex-1 at-no-scrollbar" aria-label="Devtools sections"></nav> <div class="flex items-center gap-1 flex-shrink-0 pl-1"><!> <button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Keyboard shortcuts (?)" aria-label="Keyboard shortcuts"><!></button> <!> <!> <!></div></header> <div class="flex-1 min-h-0 overflow-hidden"><!></div> <!></section> <!>`,1);function uH(e,t){it(t,!0);let n=N(void 0),r=M(()=>Fc.value),i=M(()=>Bc.value),a=M(()=>Rc.value??`bottom`),o=M(()=>il.value),s=M(()=>zc.value),c=sg(),l=M(()=>z(a)===`bottom`||z(a)===`top`),u=M(()=>z(l)?z(o).vertical:z(o).horizontal),d=M(()=>al(z(l)?`vertical`:`horizontal`)),f=M(()=>su.value),p=M(()=>nu.value),m=M(()=>ru.value),h=M(()=>({genai:z(p)>0?z(p):void 0,flow:z(m)>0?z(m):void 0,errors:z(f)>0?z(f):void 0})),g=M(()=>FV.map(e=>({...e,badge:z(h)[e.id]}))),_=zV({isVertical:()=>z(l),dock:()=>z(a),axisSize:()=>z(u),setSize:ol,resetSize:sl}),v=VV({dock:()=>z(a),pipActive:()=>z(s),onDock:Lu});async function y(){if(z(s)){dg(()=>zc.value=!1);return}let e=z(n)?.getRootNode(),t=e instanceof ShadowRoot?e.host:null;t&&await ug(t,()=>zc.value=!1,{width:760,height:600})&&(zc.value=!0)}let b=globalThis.window!==void 0&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;function x(e,{dock:t}){if(b||z(s))return{duration:0};let n=t===`left`||t===`right`?`X`:`Y`,r=t===`bottom`||t===`right`?1:-1;return{duration:240,easing:ag,css:(e,t)=>`transform: translate${n}(${t*r*100}%)`}}let S=[`traces`,`genai`,`flow`,`service-map`,`metrics`,`logs`,`errors`],C=M(()=>$c.value);function w(){return Vc.value?_g:Bc.value===`traces`?gg:hg}zr(()=>{let e=z(n)?.getRootNode(),t=e instanceof ShadowRoot||e instanceof Document?e:window,r=e=>{let t=e;if(t.key===`Escape`){if($c.value){tl();return}if(vg())return;if(zc.value){dg(()=>zc.value=!1);return}ju();return}if(t.key===`?`&&!vg()){t.preventDefault(),nl(w());return}if(!$c.value&&!vg()&&t.key>=`1`&&t.key<=`7`){let e=Number.parseInt(t.key,10)-1;e<S.length&&Mu(S[e])}};return t.addEventListener(`keydown`,r),()=>t.removeEventListener(`keydown`,r)});let T=M(()=>z(s)?`inset-0`:{bottom:`left-0 right-0 bottom-0`,top:`left-0 right-0 top-0`,right:`top-0 bottom-0 right-0`,left:`top-0 bottom-0 left-0`}[z(a)]),ee=M(()=>z(s)?``:{bottom:`border-t`,top:`border-b`,right:`border-l`,left:`border-r`}[z(a)]),te=M(()=>({bottom:`-top-1 left-0 right-0 h-2 cursor-ns-resize`,top:`-bottom-1 left-0 right-0 h-2 cursor-ns-resize`,right:`-left-1 top-0 bottom-0 w-2 cursor-ew-resize`,left:`-right-1 top-0 bottom-0 w-2 cursor-ew-resize`})[z(a)]),ne=M(()=>({bottom:`inset-x-0 top-1 h-px`,top:`inset-x-0 bottom-1 h-px`,right:`inset-y-0 left-1 w-px`,left:`inset-y-0 right-1 w-px`})[z(a)]),re=M(()=>z(s)?``:z(l)?`height: ${z(u)}px;`:`width: ${z(u)}px;`),ie=M(()=>z(s)?``:{bottom:`box-shadow: 0 -12px 32px -14px var(--at-shadow), 0 -2px 6px -4px var(--at-shadow);`,top:`box-shadow: 0 12px 32px -14px var(--at-shadow), 0 2px 6px -4px var(--at-shadow);`,right:`box-shadow: -12px 0 32px -14px var(--at-shadow), -2px 0 6px -4px var(--at-shadow);`,left:`box-shadow: 12px 0 32px -14px var(--at-shadow), 2px 0 6px -4px var(--at-shadow);`}[z(a)]),ae=M(()=>z(a)===`right`?Qm:z(a)===`left`?Xm:Jm),oe=[{edge:`bottom`,pos:`left-0 right-0 bottom-0 h-24`,label:`Dock bottom`},{edge:`top`,pos:`left-0 right-0 top-0 h-24`,label:`Dock top`},{edge:`left`,pos:`top-0 bottom-0 left-0 w-44`,label:`Dock left`},{edge:`right`,pos:`top-0 bottom-0 right-0 w-44`,label:`Dock right`}];var se=da(),ce=I(se),le=e=>{var t=lH(),r=I(t),o=F(r),f=e=>{var t=$V(),n=F(t),r=L(n,2);D(t),R((e,i,a,o)=>{J(t,`aria-orientation`,z(l)?`horizontal`:`vertical`),J(t,`aria-valuenow`,e),J(t,`aria-valuemin`,z(d).min),J(t,`aria-valuemax`,z(d).max),q(t,1,i),q(n,1,a),q(r,1,o)},[()=>Math.round(z(u)),()=>K(Q(`absolute z-20 group touch-none select-none outline-none`,z(te))),()=>K(Q(`absolute bg-line-subtle transition-colors duration-150`,`group-hover:bg-accent group-focus-visible:bg-accent`,_.resizing&&`!bg-accent`,z(ne))),()=>K(Q(`absolute rounded-full bg-line transition-colors duration-150`,`group-hover:bg-accent group-focus-visible:bg-accent`,_.resizing&&`!bg-accent`,z(l)?`left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2 w-9 h-1`:`top-1/2 -translate-y-1/2 left-1/2 -translate-x-1/2 h-9 w-1`))]),B(`pointerdown`,t,function(...e){_.onPointerDown?.apply(this,e)}),B(`keydown`,t,function(...e){_.onKeyDown?.apply(this,e)}),B(`dblclick`,t,function(...e){_.onDblClick?.apply(this,e)}),H(e,t)};W(o,e=>{z(s)||e(f)});var p=L(o,2),m=F(p),h=e=>{var t=eH();vm(F(t),{size:14}),D(t),H(e,t)};W(m,e=>{z(s)||e(h)});var b=L(m,2);id(F(b),{width:18,height:18}),Ke(2),D(b);var S=L(b,2);G(S,21,()=>z(g),e=>e.id,(e,t)=>{let n=M(()=>z(t).icon),r=M(()=>z(i)===z(t).id);var a=nH(),o=F(a);{let e=M(()=>z(t).id===`errors`&&z(t).badge?`text-danger`:void 0);Ba(o,()=>z(n),(t,n)=>{n(t,{size:14,get class(){return z(e)}})})}var s=L(o,2),c=F(s,!0);D(s);var l=L(s,2),u=e=>{var n=tH(),r=F(n,!0);D(n),R(e=>{q(n,1,e),U(r,z(t).badge>99?`99+`:z(t).badge)},[()=>K(Q(`px-1.5 py-px text-[10px] font-semibold rounded-full`,z(t).id===`errors`?`bg-danger-bg text-danger`:`bg-accent/15 text-fg-muted`))]),H(e,n)};W(l,e=>{z(t).badge&&e(u)}),D(a),R(e=>{J(a,`aria-current`,z(r)?`page`:void 0),q(a,1,e),U(c,z(t).label)},[()=>K(Q(`flex items-center gap-1.5 px-2.5 h-8 rounded-md flex-shrink-0`,`text-xs transition-colors cursor-pointer`,z(r)?`bg-accent/12 text-fg font-semibold ring-1 ring-inset ring-accent/20`:`text-fg-subtle font-medium hover:text-fg hover:bg-subtle`))]),B(`click`,a,()=>Mu(z(t).id)),H(e,a)}),D(S);var se=L(S,2);{let e=e=>{let t=M(()=>z(ae));var n=da();Ba(I(n),()=>z(t),(e,t)=>{t(e,{size:15})}),H(e,n)};var ce=F(se);JV(ce,{compact:!0});var le=L(ce,2);Ap(F(le),{size:15}),D(le);var E=L(le,2),ue=t=>{var n=rH(),r=F(n);e(r),D(n),B(`click`,n,function(...e){Ru?.apply(this,e)}),H(t,n)};W(E,e=>{z(s)||e(ue)});var de=L(E,2),fe=e=>{var t=iH(),n=F(t),r=e=>{Rm(e,{size:15})},i=e=>{nh(e,{size:15})};W(n,e=>{z(s)?e(r):e(i,-1)}),D(t),R(()=>{J(t,`title`,z(s)?`Return to docked panel`:`Pop out to a separate window`),J(t,`aria-label`,z(s)?`Return to docked panel`:`Pop out to window`)}),B(`click`,t,y),H(e,t)};W(de,e=>{c&&e(fe)});var pe=L(de,2),me=e=>{var t=aH();ng(F(t),{size:16}),D(t),B(`click`,t,function(...e){ju?.apply(this,e)}),H(e,t)};W(pe,e=>{z(s)||e(me)}),D(se),B(`click`,le,()=>nl(w()))}D(p);var he=L(p,2);HV(F(he),{}),D(he);var ge=L(he,2),_e=e=>{QV(e,{get shortcuts(){return z(C)},get onClose(){return tl}})};W(ge,e=>{z(C)&&e(_e)}),D(r),Uo(r,e=>P(n,e),()=>z(n));var ve=L(r,2),ye=e=>{var t=cH();G(t,21,()=>oe,e=>e.edge,(e,t)=>{let n=M(()=>v.dropTarget===z(t).edge);var r=sH(),i=F(r),a=e=>{var n=oH(),r=F(n,!0);D(n),R(()=>U(r,z(t).label)),H(e,n)};W(i,e=>{z(n)&&e(a)}),D(r),R(e=>q(r,1,e),[()=>K(Q(`absolute flex items-center justify-center transition-colors duration-100`,z(t).pos,z(n)?`bg-accent/15 ring-2 ring-inset ring-accent`:`bg-accent/5`))]),H(e,r)}),D(t),H(e,t)};W(ve,e=>{v.dragging&&e(ye)}),R((e,t)=>{q(r,1,e),co(r,`${z(re)} ${z(ie)}`),q(p,1,t)},[()=>K(Q(`fixed z-[1000] flex flex-col`,`bg-surface text-fg`,z(T),z(ee),`border-line`)),()=>K(Q(`flex items-center gap-1 pl-2 pr-2 h-11 flex-shrink-0`,`border-b border-line bg-surface`,z(s)?``:`cursor-grab active:cursor-grabbing`))]),B(`pointerdown`,p,function(...e){v.onHeaderPointerDown?.apply(this,e)}),Ya(3,r,()=>x,()=>({dock:z(a)})),H(e,t)};W(ce,e=>{z(r)&&e(le)}),H(e,se),at()}na([`pointerdown`,`keydown`,`dblclick`,`click`]);var dH=V(`<button><!> </button>`),fH=V(`<nav></nav>`);function pH(e,t){it(t,!0);let n=Z(t,`orientation`,3,`horizontal`),r=M(()=>Bc.value);var i=fH();G(i,21,()=>FV,({id:e,label:t,icon:n})=>e,(e,t)=>{let n=()=>z(t).id,i=()=>z(t).label,a=()=>z(t).icon;var o=dH(),s=F(o);Ba(s,a,(e,t)=>{t(e,{size:14})});var c=L(s);D(o),R(e=>{q(o,1,e),U(c,` ${i()??``}`)},[()=>K(Q(`flex items-center gap-2 px-3 py-2 text-xs font-medium rounded transition-colors whitespace-nowrap`,z(r)===n()?`bg-accent text-white`:`text-fg-subtle hover:bg-hover hover:text-fg`))]),B(`click`,o,()=>Mu(n())),H(e,o)}),D(i),R(e=>q(i,1,e),[()=>K(Q(`flex gap-1 p-1`,n()===`vertical`?`flex-col w-48 border-r border-line`:`border-b border-line overflow-x-auto`))]),H(e,i),at()}na([`click`]);var mH=V(`<!> <span class="font-medium">Snapshot mode</span> <span class="text-warning">— live updates paused.</span> <button class="ml-auto inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-warning-bg transition-colors" title="Exit snapshot and clear data"><!> Exit</button>`,1),hH=V(`<span class="text-fg-subtle"> </span> <button class="ml-auto inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover transition-colors disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent"><!> Download snapshot</button> <button class="inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover transition-colors" title="Load a snapshot file"><!> Load snapshot</button> <button class="inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover hover:text-danger transition-colors" title="Clear all captured data — traces, logs, metrics and errors"><!> Clear</button>`,1),gH=V(`<span class="text-danger truncate"> </span>`),_H=V(`<span class="text-warning truncate"> </span>`),vH=V(`<div><!> <input type="file" accept="application/json,.json" class="hidden"/> <!> <!></div>`);function yH(e,t){it(t,!0);let n=N(void 0),r=N(null),i=N(null),a=M(()=>kl.value),o=M(()=>[{n:cl.value.length,one:`trace`,many:`traces`},{n:dl.value.length,one:`log`,many:`logs`},{n:ul.value.length,one:`error`,many:`errors`}].filter(e=>e.n>0).map(e=>`${e.n} ${e.n===1?e.one:e.many}`)),s=M(()=>z(o).length===0),c=()=>{P(r,null),P(i,null),qy({traces:cl.value,logs:dl.value,errors:ul.value})},l=()=>{z(n)?.click()},u=()=>{P(r,null),P(i,null),Bu()},d=async e=>{P(r,null),P(i,null);let t=e.currentTarget,n=t.files?.[0];if(t.value=``,!n)return;let a=await Xy(n);if(!a.success||!a.snapshot){P(r,a.errors.join(`; `)||`Failed to load snapshot`,!0);return}a.warnings.length>0&&P(i,a.warnings.join(`; `),!0),ku(a.snapshot)};var f=vH(),p=F(f),m=e=>{var t=mH(),n=I(t);mp(n,{size:12});var r=L(n,6);ng(F(r),{size:12}),Ke(),D(r),B(`click`,r,function(...e){Au?.apply(this,e)}),H(e,t)},h=e=>{var t=hH(),n=I(t),r=F(n,!0);D(n);var i=L(n,2);mp(F(i),{size:12}),Ke(),D(i);var a=L(i,2);Kh(F(a),{size:12}),Ke(),D(a);var d=L(a,2);Bh(F(d),{size:12}),Ke(),D(d),R(e=>{U(r,e),i.disabled=z(s),J(i,`title`,z(s)?`Nothing captured yet`:`Download a snapshot of traces, logs, errors and metrics`)},[()=>z(s)?`No data captured`:z(o).join(` · `)]),B(`click`,i,c),B(`click`,a,l),B(`click`,d,u),H(e,t)};W(p,e=>{z(a)?e(m):e(h,-1)});var g=L(p,2);Uo(g,e=>P(n,e),()=>z(n));var _=L(g,2),v=e=>{var t=gH(),n=F(t,!0);D(t),R(()=>{J(t,`title`,z(r)),U(n,z(r))}),H(e,t)};W(_,e=>{z(r)&&e(v)});var y=L(_,2),b=e=>{var t=_H(),n=F(t,!0);D(t),R(()=>{J(t,`title`,z(i)),U(n,z(i))}),H(e,t)};W(y,e=>{z(i)&&!z(r)&&e(b)}),D(f),R(e=>q(f,1,e),[()=>K(Q(`border-b border-line px-3 py-1.5 text-xs flex items-center gap-2`,z(a)?`bg-warning-bg text-warning`:`bg-subtle text-fg-muted`))]),B(`change`,g,d),H(e,f),at()}na([`click`,`change`]);var bH=V(`<div class="flex h-screen w-screen bg-surface text-fg"><div class="hidden md:flex flex-col border-r border-line"><!> <div class="mt-auto p-2 border-t border-line flex flex-col gap-1"><!> <button class="flex items-center gap-2 px-3 py-2 text-xs text-fg-subtle hover:bg-hover hover:text-fg rounded transition-colors"><!> </button> <button class="flex items-center gap-2 px-3 py-2 text-xs text-fg-subtle hover:bg-hover hover:text-fg rounded transition-colors" title="Keyboard shortcuts (?)"><!> Shortcuts</button></div></div> <div class="flex-1 flex flex-col min-w-0"><!> <div class="md:hidden"><!></div> <div class="flex-1 overflow-hidden"><!></div></div> <!></div>`);function xH(e,t){it(t,!0);function n(){return Vc.value?_g:Bc.value===`traces`?gg:hg}let r=M(()=>Gc.value),i=M(()=>$c.value);zr(()=>{Gc.value=Kc()});let a=N(void 0);zr(()=>{let e=null,t=z(a)?.getRootNode();t instanceof ShadowRoot?e=t.host:globalThis.document!==void 0&&(e=document.documentElement),e&&e.setAttribute(`data-theme`,z(r))}),zr(()=>{let e=e=>{if(e.key===`?`&&!vg()){e.preventDefault(),nl(n());return}if(!$c.value&&!vg()&&e.key>=`1`&&e.key<=`9`){let t=parseInt(e.key,10)-1;t<IV.length&&Mu(IV[t])}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});let o=M(()=>z(r)===`dark`?`Dark`:z(r)===`light`?`Light`:`System`);var s=bH(),c=F(s),l=F(c);pH(l,{orientation:`vertical`});var u=L(l,2),d=F(u);JV(d,{});var f=L(d,2),p=F(f),m=e=>{Wm(e,{size:14})},h=e=>{Ph(e,{size:14})},g=e=>{Hm(e,{size:14})};W(p,e=>{z(r)===`dark`?e(m):z(r)===`light`?e(h,1):e(g,-1)});var _=L(p);D(f);var v=L(f,2);Ap(F(v),{size:14}),Ke(),D(v),D(u),D(c);var y=L(c,2),b=F(y);yH(b,{});var x=L(b,2);pH(F(x),{orientation:`horizontal`}),D(x);var S=L(x,2);HV(F(S),{}),D(S),D(y);var C=L(y,2),w=e=>{QV(e,{get shortcuts(){return z(i)},get onClose(){return tl}})};W(C,e=>{z(i)&&e(w)}),D(s),Uo(s,e=>P(a,e),()=>z(a)),R(()=>{J(f,`title`,`Theme: ${z(o)} (click to cycle)`),U(_,` ${z(o)??``}`)}),B(`click`,f,function(...e){Jc?.apply(this,e)}),B(`click`,v,()=>el(n())),H(e,s),at()}na([`click`]);var SH=250,CH=5e3;function wH(e={}){let t=e.now??(()=>Date.now()),n=e.debounceMs??SH,r=e.limit??CH,i=0,a=null,o=null,s=!1;function c(){let t=pl.value,n=e.baseUrl??(t?$o(t):null)??globalThis.location?.origin??``;return{fetch:e.fetch??globalThis.fetch.bind(globalThis),baseUrl:n}}async function l(){if(s)return;let e=++i;a?.abort();let n=new AbortController;a=n;let o={query:``,window:Ms(Es(ml.value,t())),limit:r},l={...c(),signal:n.signal},[u,d]=await Promise.all([TH(o,l),TA(o,l)]);e!==i||s||(u.status===`ok`?(hl.value=u.traces,_l.value=`ready`):u.status===`error`&&(_l.value=`unavailable`),d.status===`ok`&&(gl.value=d.errors))}function u(){if(!s){if(o&&clearTimeout(o),n<=0){l();return}o=setTimeout(()=>{o=null,l()},n)}}return{refresh:l,invalidate:u,dispose(){s=!0,o&&clearTimeout(o),a?.abort()}}}async function TH(e,t){let n=[],r=new Set,i;do{let a=await SA({...e,cursor:i},t);if(a.status!==`ok`)return a;if(n.push(...a.traces),i=a.nextCursor??void 0,i&&r.has(i))return{status:`error`,message:`The trace query returned a repeated pagination cursor.`};i&&r.add(i)}while(i);return{status:`ok`,traces:n,nextCursor:null}}var EH=`data-autotel-portal`;function DH(e){let t=e.querySelector(`[${EH}]`);if(t)return t;let n=document.createElement(`div`);return n.setAttribute(EH,``),n.style.position=`absolute`,n.style.top=`0`,n.style.left=`0`,n.style.zIndex=`2147483000`,e.appendChild(n),n}var OH=V(`<!> <!>`,1),kH=V(`<div class="contents"><!></div>`);function AH(e,t){it(t,!0);function n(e){Mu(e.tab??`traces`),Nl.value=e.q??``,Pl.value=e.status??`all`,Fl.value=e.minDuration??0,ml.value=e.window??Cs,Ml.value=e.sort??Zu,zl.value=e.genaiQuery??``,e.traceId&&Wc(e.traceId,e.spanId)}zr(()=>{pl.value=t.wsUrl});let r=wH();zr(()=>(r.refresh(),()=>r.dispose())),zr(()=>{ml.value,cl.value.length,r.invalidate()});let i=N(void 0),a=N(void 0);zr(()=>{if(!z(i))return;let e=z(i).getRootNode();P(a,DH(e instanceof ShadowRoot?e:document.body),!0)}),zr(()=>{t.deepLink&&n(t.deepLink)}),zr(()=>{let e=Uc.value;e&&cl.value.some(t=>t.traceId===e.traceId)&&(Nu(e.traceId,e.spanId??null),Mu(`traces`),Uc.value=null)});let o=null;zr(()=>{if(t.mode!==`fullpage`)return;let e={tab:Bc.value,traceId:Vc.value??void 0,spanId:Hc.value??void 0,q:Nl.value||void 0,status:Pl.value,minDuration:Fl.value,window:ml.value,sort:Ml.value,genaiQuery:zl.value||void 0};if(Uc.value)return;let n=ed(e);if(n===location.hash)return;let r=td(o,e);o=e;let i=`${location.pathname}${location.search}${n}`;r===`push`?history.pushState(history.state,``,i):history.replaceState(history.state,``,i)}),zr(()=>{if(t.mode!==`fullpage`)return;let e=()=>{let e=$u(location.hash);o=e,n(e)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)}),zr(()=>{Wu(),ns($o(t.wsUrl));let e=new Qo(t.wsUrl);fl.value=`connecting`;let n=e.onStatusChange(e=>{fl.value=e}),r=e.onMessage(Tu);return e.connect(),()=>{r(),n(),e.disconnect()}});var s=kH();dE(F(s),{get defaultPortalTo(){return z(a)},children:(e,n)=>{var r=da(),i=I(r),a=e=>{xH(e,{})},o=e=>{var t=OH(),n=I(t);Hf(n,{}),uH(L(n,2),{}),H(e,t)};W(i,e=>{t.mode===`fullpage`?e(a):e(o,-1)}),H(e,r)},$$slots:{default:!0}}),D(s),Uo(s,e=>P(i,e),()=>z(i)),H(e,s),at()}function jH(e,t){let n=ha(AH,{target:e,props:t});return()=>{ya(n)}}var MH=`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
46
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-outline-style:solid}::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:"Hanken Grotesk", system-ui, -apple-system, sans-serif;--font-mono:"JetBrains Mono", ui-monospace, "SF Mono", monospace;--color-red-100:#ffe2e2;--color-red-400:#ff6568;--color-red-500:#fb2c36;--color-red-600:#e40014;--color-red-700:#bf000f;--color-orange-100:#ffedd5;--color-orange-400:#ff8b1a;--color-orange-500:#fe6e00;--color-orange-600:#f05100;--color-orange-700:#c53c00;--color-amber-100:#fef3c6;--color-amber-500:#f99c00;--color-amber-600:#dd7400;--color-amber-700:#b75000;--color-yellow-100:#fef9c2;--color-yellow-500:#edb200;--color-yellow-600:#cd8900;--color-green-100:#dcfce7;--color-green-400:#05df72;--color-green-500:#00c758;--color-green-600:#00a544;--color-emerald-500:#00bb7f;--color-emerald-600:#009767;--color-teal-500:#00baa7;--color-teal-600:#009588;--color-cyan-100:#cefafe;--color-cyan-500:#00b7d7;--color-cyan-600:#0092b5;--color-sky-500:#00a5ef;--color-sky-600:#0084cc;--color-blue-100:#dbeafe;--color-blue-400:#54a2ff;--color-blue-500:#3080ff;--color-blue-600:#155dfc;--color-indigo-500:#625fff;--color-indigo-600:#4f39f6;--color-violet-100:#ede9fe;--color-violet-500:#8d54ff;--color-violet-600:#7f22fe;--color-violet-700:#7008e7;--color-purple-100:#f3e8ff;--color-purple-400:#c07eff;--color-purple-500:#ac4bff;--color-purple-600:#9810fa;--color-fuchsia-500:#e12afb;--color-fuchsia-600:#c600db;--color-rose-500:#ff2357;--color-rose-600:#e70044;--color-gray-50:#f9fafb;--color-gray-100:#f3f4f6;--color-gray-400:#99a1af;--color-gray-500:#6a7282;--color-gray-900:#101828;--color-stone-500:#79716b;--color-stone-600:#57534d;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-surface:var(--at-surface);--color-subtle:var(--at-muted);--color-hover:var(--at-surface-hover);--color-code:var(--at-code);--color-fg:var(--at-text-primary);--color-fg-muted:var(--at-text-secondary);--color-fg-subtle:var(--at-text-muted);--color-line:var(--at-border);--color-line-subtle:var(--at-border-light);--color-accent:var(--at-accent);--color-danger:var(--at-error-text);--color-danger-bg:var(--at-error-bg);--color-danger-border:var(--at-error-border);--color-success:var(--at-ok-text);--color-success-bg:var(--at-ok-bg);--color-success-border:var(--at-ok-border);--color-warning:var(--at-warn-text);--color-warning-bg:var(--at-warn-bg);--color-warning-border:var(--at-warn-border);--color-selected:var(--at-selected-bg)}@supports (color:color(display-p3 0 0 0)){:root,:host{--color-red-100:color(display-p3 .980386 .889727 .887779);--color-red-400:color(display-p3 .933534 .431676 .423491);--color-red-500:color(display-p3 .903738 .262579 .253307);--color-red-600:color(display-p3 .830323 .140383 .133196);--color-red-700:color(display-p3 .692737 .116232 .104679);--color-orange-100:color(display-p3 .988762 .931393 .843273);--color-orange-400:color(display-p3 .950192 .561807 .211017);--color-orange-500:color(display-p3 .946589 .449788 .0757345);--color-orange-600:color(display-p3 .887467 .341665 .0219962);--color-orange-700:color(display-p3 .729844 .257256 .0511062);--color-amber-100:color(display-p3 .989391 .954583 .796328);--color-amber-500:color(display-p3 .93994 .620584 .0585367);--color-amber-600:color(display-p3 .827144 .467166 .0336006);--color-amber-700:color(display-p3 .67989 .32771 .0520514);--color-yellow-100:color(display-p3 .993436 .977463 .782913);--color-yellow-500:color(display-p3 .903651 .703062 .0745389);--color-yellow-600:color(display-p3 .776342 .542492 .041709);--color-green-100:color(display-p3 .885269 .984329 .910368);--color-green-400:color(display-p3 .399536 .862346 .49324);--color-green-500:color(display-p3 .308734 .774754 .374307);--color-green-600:color(display-p3 .243882 .640824 .294808);--color-emerald-500:color(display-p3 .267113 .726847 .508397);--color-emerald-600:color(display-p3 .206557 .589057 .413962);--color-teal-500:color(display-p3 .266569 .721518 .655462);--color-teal-600:color(display-p3 .207114 .579584 .53668);--color-cyan-100:color(display-p3 .843085 .97553 .992573);--color-cyan-500:color(display-p3 .246703 .710032 .841444);--color-cyan-600:color(display-p3 .193249 .564651 .707197);--color-sky-500:color(display-p3 .219113 .639027 .931479);--color-sky-600:color(display-p3 .162505 .509376 .796082);--color-blue-100:color(display-p3 .869214 .915931 .989622);--color-blue-400:color(display-p3 .397443 .62813 .992116);--color-blue-500:color(display-p3 .266422 .491219 .988624);--color-blue-600:color(display-p3 .174493 .358974 .950247);--color-indigo-500:color(display-p3 .380374 .372235 .971707);--color-indigo-600:color(display-p3 .297656 .227891 .929242);--color-violet-100:color(display-p3 .926222 .913546 .990178);--color-violet-500:color(display-p3 .523372 .329605 .990884);--color-violet-600:color(display-p3 .459951 .162666 .957985);--color-violet-700:color(display-p3 .40161 .0841901 .871151);--color-purple-100:color(display-p3 .945034 .910569 .992972);--color-purple-400:color(display-p3 .719919 .492497 .995173);--color-purple-500:color(display-p3 .629519 .30089 .990817);--color-purple-600:color(display-p3 .546729 .130167 .94439);--color-fuchsia-500:color(display-p3 .81268 .241966 .951571);--color-fuchsia-600:color(display-p3 .716587 .083681 .841036);--color-rose-500:color(display-p3 .921824 .240748 .355666);--color-rose-600:color(display-p3 .848792 .102011 .269259);--color-gray-50:color(display-p3 .977213 .98084 .985102);--color-gray-100:color(display-p3 .953567 .956796 .964321);--color-gray-400:color(display-p3 .605734 .630385 .680158);--color-gray-500:color(display-p3 .421287 .446085 .504784);--color-gray-900:color(display-p3 .070423 .0928982 .151928);--color-stone-500:color(display-p3 .467445 .443064 .42264);--color-stone-600:color(display-p3 .339543 .325291 .304619)}}@supports (color:lab(0% 0 0)){:root,:host{--color-red-100:lab(92.243% 10.2865 3.83865);--color-red-400:lab(63.7053% 60.745 31.3109);--color-red-500:lab(55.4814% 75.0732 48.8528);--color-red-600:lab(48.4493% 77.4328 61.5452);--color-red-700:lab(40.4273% 67.2623 53.7441);--color-orange-100:lab(94.7127% 3.58394 14.3151);--color-orange-400:lab(70.0429% 42.5156 75.8207);--color-orange-500:lab(64.272% 57.1788 90.3583);--color-orange-600:lab(57.1026% 64.2584 89.8886);--color-orange-700:lab(46.4615% 57.7275 70.8507);--color-amber-100:lab(95.916% -1.21653 23.111);--color-amber-500:lab(72.7183% 31.8672 97.9407);--color-amber-600:lab(60.3514% 40.5624 87.1228);--color-amber-700:lab(47.2709% 42.9082 69.2966);--color-yellow-100:lab(97.3564% -4.51407 27.344);--color-yellow-500:lab(76.3898% 14.5258 98.4589);--color-yellow-600:lab(62.7799% 22.4197 86.1544);--color-green-100:lab(96.1861% -13.8464 6.52365);--color-green-400:lab(78.503% -64.9265 39.7492);--color-green-500:lab(70.5521% -66.5147 45.8073);--color-green-600:lab(59.0978% -58.6621 41.2579);--color-emerald-500:lab(66.9756% -58.27 19.5419);--color-emerald-600:lab(55.0481% -49.9246 15.93);--color-teal-500:lab(67.3859% -49.0983 -2.63511);--color-teal-600:lab(55.0223% -41.0774 -3.90277);--color-cyan-100:lab(95.3146% -13.8285 -6.84732);--color-cyan-500:lab(67.805% -35.3952 -30.2018);--color-cyan-600:lab(55.1767% -26.7496 -30.5139);--color-sky-500:lab(63.3038% -18.433 -51.0407);--color-sky-600:lab(51.7754% -11.4712 -49.8349);--color-blue-100:lab(92.0301% -2.24757 -11.6453);--color-blue-400:lab(65.0361% -1.42065 -56.9802);--color-blue-500:lab(54.1736% 13.3369 -74.6839);--color-blue-600:lab(44.0605% 29.0279 -86.0352);--color-indigo-500:lab(48.295% 38.3129 -81.9673);--color-indigo-600:lab(38.4009% 52.6132 -92.3857);--color-violet-100:lab(93.0838% 4.35197 -9.88284);--color-violet-500:lab(49.9355% 55.1776 -81.8963);--color-violet-600:lab(41.088% 68.9966 -91.995);--color-violet-700:lab(35.2783% 67.9912 -88.793);--color-purple-100:lab(93.3333% 6.97437 -9.83434);--color-purple-400:lab(63.6946% 47.6127 -59.2066);--color-purple-500:lab(52.0183% 66.11 -78.2316);--color-purple-600:lab(43.0295% 75.21 -86.5669);--color-fuchsia-500:lab(56.4256% 83.132 -64.639);--color-fuchsia-600:lab(47.5131% 83.4271 -63.0363);--color-rose-500:lab(56.101% 79.4328 31.4532);--color-rose-600:lab(49.1882% 81.577 36.0311);--color-gray-50:lab(98.2596% -.247031 -.706708);--color-gray-100:lab(96.1596% -.0823438 -1.13575);--color-gray-400:lab(65.9269% -.832707 -8.17473);--color-gray-500:lab(47.7841% -.393182 -10.0268);--color-gray-900:lab(8.11897% .811279 -12.254);--color-stone-500:lab(48.1164% 2.35701 4.26852);--color-stone-600:lab(35.5168% 1.08604 4.07829)}}}@layer base{*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::-webkit-file-upload-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:-webkit-any([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::-webkit-file-upload-button{margin-inline-end:4px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button{-webkit-appearance:button;appearance:button}input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.\\@container{container-type:inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;bottom:0;left:0;right:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-top-1{top:calc(var(--spacing) * -1)}.top-0{top:0}.top-0\\.5{top:calc(var(--spacing) * .5)}.top-1{top:var(--spacing)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-3{top:calc(var(--spacing) * 3)}.top-10{top:calc(var(--spacing) * 10)}.top-\\[7px\\]{top:7px}.top-\\[9px\\]{top:9px}.top-\\[calc\\(100\\%-2px\\)\\]{top:calc(100% - 2px)}.top-full{top:100%}.-right-1{right:calc(var(--spacing) * -1)}.-right-1\\.5{right:calc(var(--spacing) * -1.5)}.right-0{right:0}.right-1{right:var(--spacing)}.right-1\\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.-bottom-1{bottom:calc(var(--spacing) * -1)}.bottom-0{bottom:0}.bottom-0\\.5{bottom:calc(var(--spacing) * .5)}.bottom-1{bottom:var(--spacing)}.bottom-3{bottom:calc(var(--spacing) * 3)}.-left-1{left:calc(var(--spacing) * -1)}.-left-1\\.5{left:calc(var(--spacing) * -1.5)}.-left-px{left:-1px}.left-0{left:0}.left-1{left:var(--spacing)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[1000\\]{z-index:1000}.z-\\[1001\\]{z-index:1001}.z-\\[1100\\]{z-index:1100}.z-\\[1200\\]{z-index:1200}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.-m-1{margin:calc(var(--spacing) * -1)}.m-3{margin:calc(var(--spacing) * 3)}.m-4{margin:calc(var(--spacing) * 4)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline-start:auto;margin-inline-end:auto}.my-1{margin-block:var(--spacing)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mt-px{margin-top:1px}.mr-0\\.5{margin-right:calc(var(--spacing) * .5)}.mr-1{margin-right:var(--spacing)}.mr-1\\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-0\\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-0\\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-1{height:var(--spacing)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-1\\/2{height:50%}.h-2{height:calc(var(--spacing) * 2)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-11{height:calc(var(--spacing) * 11)}.h-24{height:calc(var(--spacing) * 24)}.h-\\[300px\\]{height:300px}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[80vh\\]{max-height:80vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[160px\\]{max-height:160px}.max-h-\\[200px\\]{max-height:200px}.max-h-\\[240px\\]{max-height:240px}.min-h-0{min-height:0}.min-h-\\[120px\\]{min-height:120px}.w-0\\.5{width:calc(var(--spacing) * .5)}.w-1{width:var(--spacing)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-14{width:calc(var(--spacing) * 14)}.w-24{width:calc(var(--spacing) * 24)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-\\[1\\%\\]{width:1%}.w-\\[80px\\]{width:80px}.w-\\[200px\\]{width:200px}.w-\\[480px\\]{width:480px}.w-\\[min\\(560px\\,92vw\\)\\]{width:min(560px,92vw)}.w-\\[min\\(700px\\,92vw\\)\\]{width:min(700px,92vw)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[10rem\\]{max-width:10rem}.max-w-\\[14rem\\]{max-width:14rem}.max-w-\\[16rem\\]{max-width:16rem}.max-w-\\[90vw\\]{max-width:90vw}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[420px\\]{max-width:420px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-\\[8px\\]{min-width:8px}.min-w-\\[16px\\]{min-width:16px}.min-w-\\[180px\\]{min-width:180px}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.-rotate-90{rotate:-90deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-ew-resize{cursor:ew-resize}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-ns-resize{cursor:ns-resize}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.resize-y{resize:vertical}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\\[80px_1fr\\]{grid-template-columns:80px 1fr}.grid-cols-\\[100px_1fr\\]{grid-template-columns:100px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-px{gap:1px}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:0;margin-block-end:0}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}.gap-y-2{row-gap:calc(var(--spacing) * 2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-line>:not(:last-child)){border-color:var(--color-line)}:where(.divide-line-subtle>:not(:last-child)){border-color:var(--color-line-subtle)}.self-stretch{align-self:stretch}.justify-self-end{justify-self:flex-end}.justify-self-start{justify-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[1px\\]{border-radius:1px}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent,.border-accent\\/30{border-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\\/30{border-color:color-mix(in oklab, var(--color-accent) 30%, transparent)}}.border-accent\\/40{border-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\\/40{border-color:color-mix(in oklab, var(--color-accent) 40%, transparent)}}.border-amber-500\\/20{border-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.border-amber-500\\/20{border-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-blue-500\\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab, red, red)){.border-blue-500\\/30{border-color:color-mix(in oklab, var(--color-blue-500) 30%, transparent)}}.border-cyan-500\\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab, red, red)){.border-cyan-500\\/30{border-color:color-mix(in oklab, var(--color-cyan-500) 30%, transparent)}}.border-danger-border{border-color:var(--color-danger-border)}.border-danger\\/30{border-color:var(--color-danger)}@supports (color:color-mix(in lab, red, red)){.border-danger\\/30{border-color:color-mix(in oklab, var(--color-danger) 30%, transparent)}}.border-emerald-500\\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\\/30{border-color:color-mix(in oklab, var(--color-emerald-500) 30%, transparent)}}.border-fuchsia-500\\/30{border-color:#e12afb4d}@supports (color:color-mix(in lab, red, red)){.border-fuchsia-500\\/30{border-color:color-mix(in oklab, var(--color-fuchsia-500) 30%, transparent)}}.border-green-500\\/30{border-color:#00c7584d}@supports (color:color-mix(in lab, red, red)){.border-green-500\\/30{border-color:color-mix(in oklab, var(--color-green-500) 30%, transparent)}}.border-indigo-500\\/30{border-color:#625fff4d}@supports (color:color-mix(in lab, red, red)){.border-indigo-500\\/30{border-color:color-mix(in oklab, var(--color-indigo-500) 30%, transparent)}}.border-line{border-color:var(--color-line)}.border-line-subtle{border-color:var(--color-line-subtle)}.border-line\\/50{border-color:var(--color-line)}@supports (color:color-mix(in lab, red, red)){.border-line\\/50{border-color:color-mix(in oklab, var(--color-line) 50%, transparent)}}.border-line\\/60{border-color:var(--color-line)}@supports (color:color-mix(in lab, red, red)){.border-line\\/60{border-color:color-mix(in oklab, var(--color-line) 60%, transparent)}}.border-orange-500\\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab, red, red)){.border-orange-500\\/30{border-color:color-mix(in oklab, var(--color-orange-500) 30%, transparent)}}.border-purple-500\\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab, red, red)){.border-purple-500\\/30{border-color:color-mix(in oklab, var(--color-purple-500) 30%, transparent)}}.border-red-500\\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab, red, red)){.border-red-500\\/30{border-color:color-mix(in oklab, var(--color-red-500) 30%, transparent)}}.border-stone-500\\/30{border-color:#79716b4d}@supports (color:color-mix(in lab, red, red)){.border-stone-500\\/30{border-color:color-mix(in oklab, var(--color-stone-500) 30%, transparent)}}.border-success-border{border-color:var(--color-success-border)}.border-violet-500\\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab, red, red)){.border-violet-500\\/30{border-color:color-mix(in oklab, var(--color-violet-500) 30%, transparent)}}.border-warning-border{border-color:var(--color-warning-border)}.border-white{border-color:var(--color-white)}.border-l-warning{border-left-color:var(--color-warning)}.\\!bg-accent{background-color:var(--color-accent)!important}.bg-accent,.bg-accent\\/5{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/5{background-color:color-mix(in oklab, var(--color-accent) 5%, transparent)}}.bg-accent\\/10{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/10{background-color:color-mix(in oklab, var(--color-accent) 10%, transparent)}}.bg-accent\\/12{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/12{background-color:color-mix(in oklab, var(--color-accent) 12%, transparent)}}.bg-accent\\/15{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/15{background-color:color-mix(in oklab, var(--color-accent) 15%, transparent)}}.bg-accent\\/70{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/70{background-color:color-mix(in oklab, var(--color-accent) 70%, transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\\/10{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.bg-amber-500\\/15{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\\/15{background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.bg-black\\/55{background-color:#0000008c}@supports (color:color-mix(in lab, red, red)){.bg-black\\/55{background-color:color-mix(in oklab, var(--color-black) 55%, transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\\/10{background-color:color-mix(in oklab, var(--color-blue-500) 10%, transparent)}}.bg-blue-500\\/15{background-color:#3080ff26}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\\/15{background-color:color-mix(in oklab, var(--color-blue-500) 15%, transparent)}}.bg-code{background-color:var(--color-code)}.bg-cyan-100{background-color:var(--color-cyan-100)}.bg-cyan-500\\/15{background-color:#00b7d726}@supports (color:color-mix(in lab, red, red)){.bg-cyan-500\\/15{background-color:color-mix(in oklab, var(--color-cyan-500) 15%, transparent)}}.bg-danger{background-color:var(--color-danger)}.bg-danger-bg,.bg-danger-bg\\/40{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.bg-danger-bg\\/40{background-color:color-mix(in oklab, var(--color-danger-bg) 40%, transparent)}}.bg-danger\\/5{background-color:var(--color-danger)}@supports (color:color-mix(in lab, red, red)){.bg-danger\\/5{background-color:color-mix(in oklab, var(--color-danger) 5%, transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\\/10{background-color:color-mix(in oklab, var(--color-emerald-500) 10%, transparent)}}.bg-emerald-500\\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\\/15{background-color:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.bg-fg-subtle{background-color:var(--color-fg-subtle)}.bg-fuchsia-500\\/15{background-color:#e12afb26}@supports (color:color-mix(in lab, red, red)){.bg-fuchsia-500\\/15{background-color:color-mix(in oklab, var(--color-fuchsia-500) 15%, transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\\/15{background-color:#00c75826}@supports (color:color-mix(in lab, red, red)){.bg-green-500\\/15{background-color:color-mix(in oklab, var(--color-green-500) 15%, transparent)}}.bg-hover{background-color:var(--color-hover)}.bg-indigo-500\\/15{background-color:#625fff26}@supports (color:color-mix(in lab, red, red)){.bg-indigo-500\\/15{background-color:color-mix(in oklab, var(--color-indigo-500) 15%, transparent)}}.bg-line{background-color:var(--color-line)}.bg-line-subtle{background-color:var(--color-line-subtle)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-500\\/15{background-color:#fe6e0026}@supports (color:color-mix(in lab, red, red)){.bg-orange-500\\/15{background-color:color-mix(in oklab, var(--color-orange-500) 15%, transparent)}}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-400{background-color:var(--color-purple-400)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-500\\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab, red, red)){.bg-purple-500\\/15{background-color:color-mix(in oklab, var(--color-purple-500) 15%, transparent)}}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab, red, red)){.bg-red-500\\/15{background-color:color-mix(in oklab, var(--color-red-500) 15%, transparent)}}.bg-rose-500{background-color:var(--color-rose-500)}.bg-selected{background-color:var(--color-selected)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-stone-500\\/15{background-color:#79716b26}@supports (color:color-mix(in lab, red, red)){.bg-stone-500\\/15{background-color:color-mix(in oklab, var(--color-stone-500) 15%, transparent)}}.bg-subtle,.bg-subtle\\/40{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/40{background-color:color-mix(in oklab, var(--color-subtle) 40%, transparent)}}.bg-subtle\\/50{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/50{background-color:color-mix(in oklab, var(--color-subtle) 50%, transparent)}}.bg-subtle\\/60{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/60{background-color:color-mix(in oklab, var(--color-subtle) 60%, transparent)}}.bg-success{background-color:var(--color-success)}.bg-success-bg{background-color:var(--color-success-bg)}.bg-surface{background-color:var(--color-surface)}.bg-teal-500{background-color:var(--color-teal-500)}.bg-transparent{background-color:#0000}.bg-violet-100{background-color:var(--color-violet-100)}.bg-violet-500{background-color:var(--color-violet-500)}.bg-violet-500\\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab, red, red)){.bg-violet-500\\/10{background-color:color-mix(in oklab, var(--color-violet-500) 10%, transparent)}}.bg-violet-500\\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab, red, red)){.bg-violet-500\\/15{background-color:color-mix(in oklab, var(--color-violet-500) 15%, transparent)}}.bg-warning{background-color:var(--color-warning)}.bg-warning-bg{background-color:var(--color-warning-bg)}.bg-warning\\/5{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/5{background-color:color-mix(in oklab, var(--color-warning) 5%, transparent)}}.bg-yellow-100{background-color:var(--color-yellow-100)}.fill-\\[var\\(--color-fg-subtle\\)\\]{fill:var(--color-fg-subtle)}.fill-amber-500\\/15{fill:#f99c0026}@supports (color:color-mix(in lab, red, red)){.fill-amber-500\\/15{fill:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.fill-amber-600{fill:var(--color-amber-600)}.fill-blue-500\\/15{fill:#3080ff26}@supports (color:color-mix(in lab, red, red)){.fill-blue-500\\/15{fill:color-mix(in oklab, var(--color-blue-500) 15%, transparent)}}.fill-blue-600{fill:var(--color-blue-600)}.fill-danger{fill:var(--color-danger)}.fill-emerald-500\\/15{fill:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.fill-emerald-500\\/15{fill:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.fill-emerald-600{fill:var(--color-emerald-600)}.fill-fg-muted{fill:var(--color-fg-muted)}.fill-fg-subtle{fill:var(--color-fg-subtle)}.fill-red-500{fill:var(--color-red-500)}.fill-rose-500\\/15{fill:#ff235726}@supports (color:color-mix(in lab, red, red)){.fill-rose-500\\/15{fill:color-mix(in oklab, var(--color-rose-500) 15%, transparent)}}.fill-rose-600{fill:var(--color-rose-600)}.fill-sky-500\\/15{fill:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.fill-sky-500\\/15{fill:color-mix(in oklab, var(--color-sky-500) 15%, transparent)}}.fill-sky-600{fill:var(--color-sky-600)}.fill-teal-500\\/15{fill:#00baa726}@supports (color:color-mix(in lab, red, red)){.fill-teal-500\\/15{fill:color-mix(in oklab, var(--color-teal-500) 15%, transparent)}}.fill-teal-600{fill:var(--color-teal-600)}.fill-violet-500\\/15{fill:#8d54ff26}@supports (color:color-mix(in lab, red, red)){.fill-violet-500\\/15{fill:color-mix(in oklab, var(--color-violet-500) 15%, transparent)}}.fill-violet-600{fill:var(--color-violet-600)}.fill-warning{fill:var(--color-warning)}.fill-white{fill:var(--color-white)}.stroke-accent{stroke:var(--color-accent)}.stroke-amber-500\\/60{stroke:#f99c0099}@supports (color:color-mix(in lab, red, red)){.stroke-amber-500\\/60{stroke:color-mix(in oklab, var(--color-amber-500) 60%, transparent)}}.stroke-blue-500\\/60{stroke:#3080ff99}@supports (color:color-mix(in lab, red, red)){.stroke-blue-500\\/60{stroke:color-mix(in oklab, var(--color-blue-500) 60%, transparent)}}.stroke-emerald-500\\/60{stroke:#00bb7f99}@supports (color:color-mix(in lab, red, red)){.stroke-emerald-500\\/60{stroke:color-mix(in oklab, var(--color-emerald-500) 60%, transparent)}}.stroke-fg-subtle{stroke:var(--color-fg-subtle)}.stroke-red-500{stroke:var(--color-red-500)}.stroke-rose-500\\/60{stroke:#ff235799}@supports (color:color-mix(in lab, red, red)){.stroke-rose-500\\/60{stroke:color-mix(in oklab, var(--color-rose-500) 60%, transparent)}}.stroke-sky-500\\/60{stroke:#00a5ef99}@supports (color:color-mix(in lab, red, red)){.stroke-sky-500\\/60{stroke:color-mix(in oklab, var(--color-sky-500) 60%, transparent)}}.stroke-teal-500\\/60{stroke:#00baa799}@supports (color:color-mix(in lab, red, red)){.stroke-teal-500\\/60{stroke:color-mix(in oklab, var(--color-teal-500) 60%, transparent)}}.stroke-violet-500\\/60{stroke:#8d54ff99}@supports (color:color-mix(in lab, red, red)){.stroke-violet-500\\/60{stroke:color-mix(in oklab, var(--color-violet-500) 60%, transparent)}}.stroke-\\[2\\.5px\\]{stroke-width:2.5px}.p-0{padding:0}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-0\\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-px{padding-block-start:1px;padding-block-end:1px}.pt-0\\.5{padding-top:calc(var(--spacing) * .5)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-7{padding-right:calc(var(--spacing) * 7)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-1{padding-bottom:var(--spacing)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-0\\.5{padding-left:calc(var(--spacing) * .5)}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-7{padding-left:calc(var(--spacing) * 7)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent,.text-accent\\/80{color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.text-accent\\/80{color:color-mix(in oklab, var(--color-accent) 80%, transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-cyan-500{color:var(--color-cyan-500)}.text-cyan-600{color:var(--color-cyan-600)}.text-danger{color:var(--color-danger)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-fg{color:var(--color-fg)}.text-fg-muted,.text-fg-muted\\/70{color:var(--color-fg-muted)}@supports (color:color-mix(in lab, red, red)){.text-fg-muted\\/70{color:color-mix(in oklab, var(--color-fg-muted) 70%, transparent)}}.text-fg-muted\\/80{color:var(--color-fg-muted)}@supports (color:color-mix(in lab, red, red)){.text-fg-muted\\/80{color:color-mix(in oklab, var(--color-fg-muted) 80%, transparent)}}.text-fg-subtle,.text-fg-subtle\\/60{color:var(--color-fg-subtle)}@supports (color:color-mix(in lab, red, red)){.text-fg-subtle\\/60{color:color-mix(in oklab, var(--color-fg-subtle) 60%, transparent)}}.text-fuchsia-500{color:var(--color-fuchsia-500)}.text-fuchsia-600{color:var(--color-fuchsia-600)}.text-gray-50{color:var(--color-gray-50)}.text-gray-100{color:var(--color-gray-100)}.text-gray-500{color:var(--color-gray-500)}.text-gray-900{color:var(--color-gray-900)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-600{color:var(--color-indigo-600)}.text-line{color:var(--color-line)}.text-line-subtle{color:var(--color-line-subtle)}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-purple-500{color:var(--color-purple-500)}.text-purple-600{color:var(--color-purple-600)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-stone-600{color:var(--color-stone-600)}.text-success{color:var(--color-success)}.text-surface{color:var(--color-surface)}.text-violet-500{color:var(--color-violet-500)}.text-violet-600{color:var(--color-violet-600)}.text-violet-600\\/70{color:#7f22feb3}@supports (color:color-mix(in lab, red, red)){.text-violet-600\\/70{color:color-mix(in oklab, var(--color-violet-600) 70%, transparent)}}.text-violet-700{color:var(--color-violet-700)}.text-warning{color:var(--color-warning)}.text-white{color:var(--color-white)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-600{color:var(--color-yellow-600)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_0_\\#d4d4d8\\]{--tw-shadow:0 1px 0 var(--tw-shadow-color,#d4d4d8);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-accent,.ring-accent\\/20{--tw-ring-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.ring-accent\\/20{--tw-ring-color:color-mix(in oklab, var(--color-accent) 20%, transparent)}}.ring-danger{--tw-ring-color:var(--color-danger)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-\\[2px\\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.row-virtual{content-visibility:auto;contain-intrinsic-size:auto 32px}.select-none{-webkit-user-select:none;user-select:none}.ring-inset{--tw-ring-inset:inset}@media (hover:hover){.group-hover\\:bg-accent:is(:where(.group):hover *){background-color:var(--color-accent)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\/stat\\:underline:is(:where(.group\\/stat):hover *){text-decoration-line:underline}}.group-focus-visible\\:bg-accent:is(:where(.group):focus-visible *){background-color:var(--color-accent)}.last\\:mr-0:last-child{margin-right:0}.last\\:mb-0:last-child{margin-bottom:0}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.hover\\:scale-125:hover{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:border-danger-border:hover{border-color:var(--color-danger-border)}.hover\\:bg-accent:hover,.hover\\:bg-accent\\/5:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/5:hover{background-color:color-mix(in oklab, var(--color-accent) 5%, transparent)}}.hover\\:bg-accent\\/10:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/10:hover{background-color:color-mix(in oklab, var(--color-accent) 10%, transparent)}}.hover\\:bg-accent\\/15:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/15:hover{background-color:color-mix(in oklab, var(--color-accent) 15%, transparent)}}.hover\\:bg-accent\\/20:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/20:hover{background-color:color-mix(in oklab, var(--color-accent) 20%, transparent)}}.hover\\:bg-accent\\/90:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/90:hover{background-color:color-mix(in oklab, var(--color-accent) 90%, transparent)}}.hover\\:bg-blue-400:hover{background-color:var(--color-blue-400)}.hover\\:bg-danger-bg:hover,.hover\\:bg-danger-bg\\/60:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/60:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 60%, transparent)}}.hover\\:bg-danger-bg\\/70:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/70:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 70%, transparent)}}.hover\\:bg-danger-bg\\/80:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/80:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 80%, transparent)}}.hover\\:bg-emerald-500\\/25:hover{background-color:#00bb7f40}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-emerald-500\\/25:hover{background-color:color-mix(in oklab, var(--color-emerald-500) 25%, transparent)}}.hover\\:bg-gray-400:hover{background-color:var(--color-gray-400)}.hover\\:bg-green-400:hover{background-color:var(--color-green-400)}.hover\\:bg-hover:hover,.hover\\:bg-hover\\/50:hover{background-color:var(--color-hover)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-hover\\/50:hover{background-color:color-mix(in oklab, var(--color-hover) 50%, transparent)}}.hover\\:bg-orange-400:hover{background-color:var(--color-orange-400)}.hover\\:bg-purple-400:hover{background-color:var(--color-purple-400)}.hover\\:bg-red-400:hover{background-color:var(--color-red-400)}.hover\\:bg-red-500\\/25:hover{background-color:#fb2c3640}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-red-500\\/25:hover{background-color:color-mix(in oklab, var(--color-red-500) 25%, transparent)}}.hover\\:bg-subtle:hover{background-color:var(--color-subtle)}.hover\\:bg-violet-500\\/25:hover{background-color:#8d54ff40}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-violet-500\\/25:hover{background-color:color-mix(in oklab, var(--color-violet-500) 25%, transparent)}}.hover\\:bg-warning-bg:hover,.hover\\:bg-warning-bg\\/80:hover{background-color:var(--color-warning-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-warning-bg\\/80:hover{background-color:color-mix(in oklab, var(--color-warning-bg) 80%, transparent)}}.hover\\:text-accent:hover{color:var(--color-accent)}.hover\\:text-danger:hover{color:var(--color-danger)}.hover\\:text-fg:hover{color:var(--color-fg)}.hover\\:text-fg-muted:hover{color:var(--color-fg-muted)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.focus\\:border-accent:focus{border-color:var(--color-accent)}.focus\\:border-line:focus{border-color:var(--color-line)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-accent:focus{--tw-ring-color:var(--color-accent)}.focus\\:ring-danger:focus{--tw-ring-color:var(--color-danger)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:bg-hover:focus-visible{background-color:var(--color-hover)}.focus-visible\\:opacity-100:focus-visible{opacity:1}.focus-visible\\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-accent:focus-visible{--tw-ring-color:var(--color-accent)}.focus-visible\\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-accent:focus-visible{outline-color:var(--color-accent)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}@media (hover:hover){.disabled\\:hover\\:bg-transparent:disabled:hover{background-color:#0000}}@media (min-width:40rem){.sm\\:inline{display:inline}.sm\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (min-width:48rem){.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@container (width>=28rem){.\\@md\\:block{display:block}.\\@md\\:flex{display:flex}.\\@md\\:hidden{display:none}.\\@md\\:w-72{width:calc(var(--spacing) * 72)}.\\@md\\:shrink-0{flex-shrink:0}.\\@md\\:border-r{border-right-style:var(--tw-border-style);border-right-width:1px}}}*{box-sizing:border-box}:host,:root{--at-surface:#fcfdfe;--at-surface-hover:#f5f6f9;--at-muted:#f2f5f8;--at-code:#f3f6fa;--at-text-primary:#1a1f29;--at-text-secondary:#515864;--at-text-muted:#868d97;--at-border:#dfe1e5;--at-border-light:#eef0f3;--at-shadow:#171f2e1a;--at-accent:#3177dc;--at-error-bg:#ffecea;--at-error-text:#cc2827;--at-error-border:#f8a49d;--at-ok-bg:#e0fae4;--at-ok-text:#0e8c41;--at-ok-border:#89da9b;--at-warn-bg:#fff0d1;--at-warn-text:#a16500;--at-warn-border:#e5c379;--at-highlight-bg:#fff6d1;--at-selected-bg:#e9f3ff;--at-scrollbar-thumb:#ced1d6;--at-scrollbar-thumb-hover:#999fa8}@supports (color:color(display-p3 0 0 0)){:host,:root{--at-surface:color(display-p3 .989609 .992382 .997175);--at-surface-hover:color(display-p3 .960878 .966392 .975929);--at-muted:color(display-p3 .951795 .958673 .970576);--at-code:color(display-p3 .955784 .964045 .978342);--at-text-primary:color(display-p3 .106201 .12247 .157281);--at-text-secondary:color(display-p3 .323937 .346032 .388256);--at-text-muted:color(display-p3 .528711 .550898 .589512);--at-border:color(display-p3 .875378 .883503 .897566);--at-border-light:color(display-p3 .934839 .941694 .953557);--at-shadow:color(display-p3 .0979137 .121845 .174352/.1);--at-accent:color(display-p3 .266557 .461859 .837181);--at-error-bg:color(display-p3 1.00853 .923821 .911661);--at-error-text:color(display-p3 .7372 .221951 .191652);--at-error-border:color(display-p3 .924106 .659231 .626897);--at-ok-bg:color(display-p3 .896905 .977035 .900254);--at-ok-text:color(display-p3 .247857 .539374 .286752);--at-ok-border:color(display-p3 .609805 .847347 .627399);--at-warn-bg:color(display-p3 .997819 .943515 .816698);--at-warn-text:color(display-p3 .607081 .403503 .0845266);--at-warn-border:color(display-p3 .876737 .768181 .515098);--at-highlight-bg:color(display-p3 .994932 .96424 .830533);--at-selected-bg:color(display-p3 .910207 .951093 1.02232);--at-scrollbar-thumb:color(display-p3 .80912 .819793 .838278);--at-scrollbar-thumb-hover:color(display-p3 .60332 .622263 .655172)}}@supports (color:lab(0% 0 0)){:host,:root{--at-surface:lab(99.2988% -.132054 -.745118);--at-surface-hover:lab(96.9735% -.261605 -1.48877);--at-muted:lab(96.2747% -.325292 -1.86008);--at-code:lab(96.736% -.388592 -2.23104);--at-text-primary:lab(11.741% -.349499 -7.30943);--at-text-secondary:lab(37.2801% -.862852 -7.73156);--at-text-muted:lab(58.1854% -1.04666 -6.62941);--at-border:lab(89.5439% -.387847 -2.23061);--at-border-light:lab(94.7667% -.325233 -1.86);--at-shadow:lab(11.6682% -.113927 -10.842/.1);--at-accent:lab(49.8997% 5.63273 -59.1615);--at-error-bg:lab(95.0829% 9.19622 4.96011);--at-error-text:lab(45.8049% 62.9533 44.1);--at-error-border:lab(75.8489% 31.0226 17.1029);--at-ok-bg:lab(95.8936% -11.84 7.56052);--at-ok-text:lab(50.824% -45.5785 30.3918);--at-ok-border:lab(80.6679% -35.8792 23.2774);--at-warn-bg:lab(95.5261% 2.02972 19.535);--at-warn-text:lab(48.6413% 21.7782 63.415);--at-warn-border:lab(80.5062% 5.88706 41.41);--at-highlight-bg:lab(96.7959% -.972748 19.4827);--at-selected-bg:lab(95.2674% -1.71572 -11.035);--at-scrollbar-thumb:lab(83.7382% -.510752 -2.97043);--at-scrollbar-thumb-hover:lab(65.1562% -.902712 -5.53997)}}:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:#151b25;--at-surface-hover:#1d2431;--at-muted:#191f2b;--at-code:#1b222d;--at-text-primary:#dfe5ed;--at-text-secondary:#9ca5b3;--at-text-muted:#727b88;--at-border:#2e3643;--at-border-light:#232934;--at-shadow:#00000073;--at-accent:#63a6ff;--at-error-bg:#742e2940;--at-error-text:#ff7f73;--at-error-border:#cf413a;--at-ok-bg:#39794933;--at-ok-text:#6ed889;--at-ok-border:#2e9e52;--at-warn-bg:#7e5d1d38;--at-warn-text:#f1bf5b;--at-warn-border:#b07b00;--at-highlight-bg:#b8a4571f;--at-selected-bg:#6087c22e;--at-scrollbar-thumb:#3d434d;--at-scrollbar-thumb-hover:#565e6c}@supports (color:color(display-p3 0 0 0)){:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:color(display-p3 .0866362 .104012 .141551);--at-surface-hover:color(display-p3 .119527 .140938 .187194);--at-muted:color(display-p3 .10291 .122282 .164135);--at-code:color(display-p3 .112011 .131618 .173879);--at-text-primary:color(display-p3 .880198 .897517 .925177);--at-text-secondary:color(display-p3 .618009 .647763 .695453);--at-text-muted:color(display-p3 .454817 .481202 .527256);--at-border:color(display-p3 .187231 .209329 .256415);--at-border-light:color(display-p3 .14159 .16023 .200008);--at-shadow:color(display-p3 0 0 0/.45);--at-accent:color(display-p3 .445537 .644287 .978823);--at-error-bg:color(display-p3 .422373 .197971 .171651/.25);--at-error-text:color(display-p3 .938127 .52257 .468553);--at-error-border:color(display-p3 .751519 .297873 .256966);--at-ok-bg:color(display-p3 .287508 .467968 .304198/.2);--at-ok-text:color(display-p3 .538207 .838899 .565385);--at-ok-border:color(display-p3 .319936 .612208 .354223);--at-warn-bg:color(display-p3 .474062 .369044 .161788/.22);--at-warn-text:color(display-p3 .915105 .755059 .421563);--at-warn-border:color(display-p3 .660566 .489104 .15495);--at-highlight-bg:color(display-p3 .708898 .646062 .385093/.12);--at-selected-bg:color(display-p3 .407909 .526271 .742584/.18);--at-scrollbar-thumb:color(display-p3 .241934 .260441 .299404);--at-scrollbar-thumb-hover:color(display-p3 .342885 .367416 .419047)}}@supports (color:lab(0% 0 0)){:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:lab(9.40435% -.26536 -8.00193);--at-surface-hover:lab(14.0233% -.313595 -9.45683);--at-muted:lab(11.7138% -.289485 -8.72938);--at-code:lab(12.8756% -.320837 -8.73908);--at-text-primary:lab(90.6923% -.891328 -4.41389);--at-text-secondary:lab(67.4629% -1.51783 -8.03232);--at-text-muted:lab(51.2096% -1.21292 -8.07107);--at-border:lab(22.1597% -.497714 -9.15806);--at-border-light:lab(16.373% -.418156 -8.05204);--at-shadow:lab(0% 0 0/.45);--at-accent:lab(66.6499% -1.4444 -52.3046);--at-error-bg:lab(29.4384% 31.1218 19.7271/.25);--at-error-text:lab(68.3188% 49.5998 30.86);--at-error-border:lab(49.5145% 56.3761 37.3383);--at-ok-bg:lab(45.5916% -30.0637 19.6786/.2);--at-ok-text:lab(78.7102% -45.0683 29.4705);--at-ok-border:lab(57.7987% -45.4011 30.0617);--at-warn-bg:lab(42.0282% 9.23485 40.2236/.22);--at-warn-text:lab(80.4197% 11.1201 56.0991);--at-warn-border:lab(55.853% 15.6735 62.0226);--at-highlight-bg:lab(67.9375% .259876 42.1122/.12);--at-selected-bg:lab(55.3782% -1.45972 -35.4324/.18);--at-scrollbar-thumb:lab(27.992% -.544697 -7.38333);--at-scrollbar-thumb-hover:lab(39.5702% -.685155 -9.23098)}}@media (prefers-color-scheme:dark){:host([data-theme=system]),:root[data-theme=system]{--at-surface:#151b25;--at-surface-hover:#1d2431;--at-muted:#191f2b;--at-code:#1b222d;--at-text-primary:#dfe5ed;--at-text-secondary:#9ca5b3;--at-text-muted:#727b88;--at-border:#2e3643;--at-border-light:#232934;--at-shadow:#00000073;--at-accent:#63a6ff;--at-error-bg:#742e2940;--at-error-text:#ff7f73;--at-error-border:#cf413a;--at-ok-bg:#39794933;--at-ok-text:#6ed889;--at-ok-border:#2e9e52;--at-highlight-bg:#b8a4571f;--at-selected-bg:#6087c22e;--at-scrollbar-thumb:#3d434d;--at-scrollbar-thumb-hover:#565e6c}@supports (color:color(display-p3 0 0 0)){:host([data-theme=system]),:root[data-theme=system]{--at-surface:color(display-p3 .0866362 .104012 .141551);--at-surface-hover:color(display-p3 .119527 .140938 .187194);--at-muted:color(display-p3 .10291 .122282 .164135);--at-code:color(display-p3 .112011 .131618 .173879);--at-text-primary:color(display-p3 .880198 .897517 .925177);--at-text-secondary:color(display-p3 .618009 .647763 .695453);--at-text-muted:color(display-p3 .454817 .481202 .527256);--at-border:color(display-p3 .187231 .209329 .256415);--at-border-light:color(display-p3 .14159 .16023 .200008);--at-shadow:color(display-p3 0 0 0/.45);--at-accent:color(display-p3 .445537 .644287 .978823);--at-error-bg:color(display-p3 .422373 .197971 .171651/.25);--at-error-text:color(display-p3 .938127 .52257 .468553);--at-error-border:color(display-p3 .751519 .297873 .256966);--at-ok-bg:color(display-p3 .287508 .467968 .304198/.2);--at-ok-text:color(display-p3 .538207 .838899 .565385);--at-ok-border:color(display-p3 .319936 .612208 .354223);--at-highlight-bg:color(display-p3 .708898 .646062 .385093/.12);--at-selected-bg:color(display-p3 .407909 .526271 .742584/.18);--at-scrollbar-thumb:color(display-p3 .241934 .260441 .299404);--at-scrollbar-thumb-hover:color(display-p3 .342885 .367416 .419047)}}@supports (color:lab(0% 0 0)){:host([data-theme=system]),:root[data-theme=system]{--at-surface:lab(9.40435% -.26536 -8.00193);--at-surface-hover:lab(14.0233% -.313595 -9.45683);--at-muted:lab(11.7138% -.289485 -8.72938);--at-code:lab(12.8756% -.320837 -8.73908);--at-text-primary:lab(90.6923% -.891328 -4.41389);--at-text-secondary:lab(67.4629% -1.51783 -8.03232);--at-text-muted:lab(51.2096% -1.21292 -8.07107);--at-border:lab(22.1597% -.497714 -9.15806);--at-border-light:lab(16.373% -.418156 -8.05204);--at-shadow:lab(0% 0 0/.45);--at-accent:lab(66.6499% -1.4444 -52.3046);--at-error-bg:lab(29.4384% 31.1218 19.7271/.25);--at-error-text:lab(68.3188% 49.5998 30.86);--at-error-border:lab(49.5145% 56.3761 37.3383);--at-ok-bg:lab(45.5916% -30.0637 19.6786/.2);--at-ok-text:lab(78.7102% -45.0683 29.4705);--at-ok-border:lab(57.7987% -45.4011 30.0617);--at-highlight-bg:lab(67.9375% .259876 42.1122/.12);--at-selected-bg:lab(55.3782% -1.45972 -35.4324/.18);--at-scrollbar-thumb:lab(27.992% -.544697 -7.38333);--at-scrollbar-thumb-hover:lab(39.5702% -.685155 -9.23098)}}}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--at-scrollbar-thumb,#d4d4d8);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--at-scrollbar-thumb-hover,#a1a1aa)}.waterfall-row:hover .waterfall-bar{filter:brightness(1.1)}.waterfall-bar{transition:all .15s ease-out}.trace-list-container{container-type:inline-size}.trace-grid{grid-template-columns:20px 104px minmax(0,1fr) 84px 52px 88px 60px 16px;align-items:center;gap:.75rem;display:grid}@container (width<=640px){.trace-grid{grid-template-columns:20px 92px minmax(0,1fr) 80px 58px 16px}.trace-col-spans,.trace-col-time{display:none}}@keyframes at-modal-in{0%{opacity:0;transform:translateY(6px)scale(.985)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes at-fade-in{0%{opacity:0}to{opacity:1}}.at-modal-in{animation:.17s cubic-bezier(.22,1,.36,1) at-modal-in}.at-backdrop-in{animation:.17s ease-out at-fade-in}.at-wrap-anywhere{overflow-wrap:anywhere;word-break:normal}.at-no-scrollbar{scrollbar-width:none}.at-no-scrollbar::-webkit-scrollbar{display:none}@media (prefers-reduced-motion:reduce){.at-modal-in,.at-backdrop-in{animation:none}}.at-edge-label{paint-order:stroke;stroke:var(--color-surface);stroke-width:3px;stroke-linejoin:round}:where(a,button,[role=button],input,select,textarea,summary,[tabindex]:not([tabindex="-1"])):focus-visible{outline:2px solid var(--at-accent);outline-offset:2px}:where([data-focus-inset]):focus-visible{outline-offset:-2px}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}`,NH=class extends HTMLElement{constructor(...e){super(...e),x(this,`cleanup`,null)}connectedCallback(){let e=this.attachShadow({mode:`open`}),t=document.createElement(`link`);t.rel=`stylesheet`,t.href=`https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap`,e.appendChild(t);let n=document.createElement(`style`);n.textContent=MH,e.appendChild(n);let r=this.getAttribute(`mode`)||`widget`,i=this.getAttribute(`ws-url`)||this.deriveWsUrl();this.cleanup=jH(e,{mode:r,wsUrl:i})}disconnectedCallback(){this.cleanup?.(),this.cleanup=null}deriveWsUrl(){return`ws://${location.host}/ws`}};x(NH,`observedAttributes`,[`mode`,`ws-url`]);function PH(){customElements.get(`autotel-devtools`)||customElements.define(`autotel-devtools`,NH)}var FH=document.currentScript;function IH(){let e=$u(location.hash);return Object.keys(e).length>0?e:void 0}function LH(){let e=IH();if(!FH?.src)return{mode:`widget`,wsUrl:`ws://${location.host}/ws`,deepLink:e};let t=new URL(FH.src),n=t.searchParams;return{mode:n.get(`mode`)||`widget`,wsUrl:n.get(`ws`)||`ws://${t.host}/ws`,deepLink:e}}function RH(){if(PH(),document.querySelector(`autotel-devtools`))return;let{mode:e,wsUrl:t,deepLink:n}=LH(),r=document.createElement(`div`);r.id=`autotel-devtools-root`,document.body.appendChild(r);let i=r.attachShadow({mode:`open`}),a=document.createElement(`style`);a.textContent=MH,i.appendChild(a),jH(i,{mode:e,wsUrl:t,deepLink:n})}return document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,RH):RH(),e.mountWidget=jH,e.registerElement=PH,e})({});
|
|
45
|
+
instrumentWebMCP(); // before you register any tools`,Ke(2),D(t),H(e,t)};W(g,e=>{z(n).status===`loading`?e(_):z(n).status===`error`?e(v,1):z(c)&&z(l)&&z(c).tools.length>0?e(y,2):e(b,-1)}),D(f),B(`click`,h,()=>void s()),H(e,f),at()}ea([`click`]);var EV={traces:XA,agents:Ej,genai:ON,flow:xP,resources:jP,"service-map":lF,metrics:XR,logs:yz,errors:rB,security:xB,compare:IB,coverage:qB,webmcp:TV},DV=[{id:`traces`,label:`Traces`,icon:Up},{id:`agents`,label:`Agents`,icon:lp},{id:`genai`,label:`GenAI`,icon:Nh},{id:`flow`,label:`Flow`,icon:$h},{id:`resources`,label:`Resources`,icon:dp},{id:`service-map`,label:`Service Map`,icon:qm},{id:`metrics`,label:`Metrics`,icon:yp},{id:`logs`,label:`Logs`,icon:rm},{id:`errors`,label:`Errors`,icon:Gh},{id:`security`,label:`Security`,icon:kh},{id:`compare`,label:`Compare`,icon:hm},{id:`coverage`,label:`Coverage`,icon:_h},{id:`webmcp`,label:`WebMCP`,icon:tg}].filter(e=>EV[e.id]!==void 0),OV=DV.map(e=>e.id),kV=16,AV=48;function jV(e){let{isVertical:t,dock:n,axisSize:r,setSize:i,resetSize:a}=e,o=N(!1);return{get resizing(){return z(o)},onPointerDown:e=>{e.stopPropagation();let a=t(),s=a?`vertical`:`horizontal`,c=a?e.clientY:e.clientX,l=r(),u=n()===`bottom`||n()===`right`?-1:1;vy(e,{cursor:a?`ns-resize`:`ew-resize`,onStart:()=>P(o,!0),onMove:e=>{let t=a?e.clientY:e.clientX;i(s,l+(t-c)*u)},onEnd:()=>P(o,!1)})},onKeyDown:e=>{let a=t()?`vertical`:`horizontal`,o=e.shiftKey?AV:kV,s=t()?{ArrowUp:n()===`bottom`?o:-o,ArrowDown:n()===`bottom`?-o:o}:{ArrowLeft:n()===`right`?o:-o,ArrowRight:n()===`right`?-o:o};e.key in s&&(e.preventDefault(),i(a,r()+s[e.key]))},onDblClick:()=>a(t()?`vertical`:`horizontal`)}}function MV(e,t,n,r){let i={left:e,right:n-e,top:t,bottom:r-t};return Object.keys(i).reduce((e,t)=>i[t]<i[e]?t:e)}function NV(e){let{dock:t,pipActive:n,onDock:r}=e,i=N(!1),a=N(null);return{get dragging(){return z(i)},get dropTarget(){return z(a)},onHeaderPointerDown:e=>{e.button===0&&(e.target.closest(`button`)||n()||vy(e,{cursor:`grabbing`,onStart:()=>{P(i,!0),P(a,t(),!0)},onMove:e=>{P(a,MV(e.clientX,e.clientY,window.innerWidth,window.innerHeight),!0)},onEnd:()=>{P(i,!1),z(a)&&z(a)!==t()&&r(z(a)),P(a,null)}}))}}}function PV(e,t){it(t,!0);let n=M(()=>Bc.value),r=M(()=>EV[z(n)]??EV.traces);var i=la(),a=I(i),o=e=>{var t=la();Ra(I(t),()=>z(r),(e,t)=>{t(e,{})}),H(e,t)};W(a,e=>{z(r)&&e(o)}),H(e,i),at()}var FV=V(`<span class="absolute inset-0 rounded-full bg-success opacity-75 animate-ping" aria-hidden="true"></span>`),IV=V(`<span class="text-xs font-mono tabular-nums text-fg-subtle" title="Telemetry ingest rate"> </span>`),LV=V(`<span class="text-xs font-mono tabular-nums text-fg-subtle" title="Telemetry store usage and retention cap"> </span>`),RV=V(`<span> </span> <!> <!>`,1),zV=V(`<div role="status"><span class="relative inline-flex w-2 h-2 shrink-0"><!> <span aria-hidden="true"></span></span> <!></div>`);function BV(e,t){it(t,!0);let n=Z(t,`compact`,3,!1),r=M(()=>fl.value),i=M(()=>z(r)===`connected`?{dot:`bg-success`,label:`Connected`,text:`text-success`}:z(r)===`connecting`?{dot:`bg-warning animate-pulse`,label:`Connecting…`,text:`text-warning`}:{dot:`bg-danger`,label:`Disconnected`,text:`text-fg-subtle`}),a=M(()=>yl.value),o=N(!1);Lr(()=>{if(z(a),z(a)===0)return;P(o,!0);let e=setTimeout(()=>P(o,!1),900);return()=>clearTimeout(e)});let s=N(0);Lr(()=>{if(n())return;let e=()=>{P(s,Math.round(Cl(5e3).total),!0)};e();let t=setInterval(e,1e3);return()=>clearInterval(t)});let c=M(()=>!n()&&z(r)===`connected`&&z(s)>0),l=N(null);Lr(()=>{if(n()||z(r)!==`connected`)return;let e=!0,t=async()=>{let t=pl.value,n=(t?Zo(t):null)??globalThis.location?.origin;if(n)try{let t=await fetch(`${n}/api/stats`);t.ok&&e&&P(l,await t.json(),!0)}catch{}};t();let i=setInterval(t,3e4);return()=>{e=!1,clearInterval(i)}});function u(e){return e<1024**2?`${Math.round(e/1024)} KB`:e<1024**3?`${(e/1024**2).toFixed(1)} MB`:`${(e/1024**3).toFixed(1)} GB`}var d=zV(),f=F(d),p=F(f),m=e=>{H(e,FV())};W(p,e=>{z(o)&&z(r)===`connected`&&e(m)});var h=L(p,2);D(f);var g=L(f,2),_=e=>{var t=RV(),n=I(t),r=F(n,!0);D(n);var a=L(n,2),o=e=>{var t=IV(),n=F(t);D(t),R(()=>U(n,`· ${z(s)??``}/s`)),H(e,t)};W(a,e=>{z(c)&&e(o)});var d=L(a,2),f=e=>{var t=LV(),n=F(t);D(t),R((e,t)=>U(n,`· ${e??``} / ${t??``}`),[()=>u(z(l).bytesUsed),()=>u(z(l).maxBytes)]),H(e,t)};W(d,e=>{z(l)&&e(f)}),R(e=>{q(n,1,e),U(r,z(i).label)},[()=>K($(`text-xs font-medium`,z(i).text))]),H(e,t)};W(g,e=>{n()||e(_)}),D(d),R((e,t)=>{q(d,1,e),J(d,`aria-label`,`OTLP receiver: ${z(i).label}`),J(d,`title`,`OTLP receiver: ${z(i).label}${z(s)>0?` · ${z(s)}/s`:``}`),q(h,1,t)},[()=>K($(`flex items-center gap-1.5`,!n()&&`px-3 py-2`)),()=>K($(`relative inline-block w-2 h-2 rounded-full`,z(i).dot))]),H(e,d),at()}var VV=V(`<kbd class="inline-block px-1.5 py-0.5 font-mono text-xs font-semibold bg-hover border border-line rounded text-fg mr-1 last:mr-0 shadow-[0_1px_0_#d4d4d8]"> </kbd>`),HV=V(`<tr class="border-b border-line-subtle last:border-b-0"><td class="py-2.5 px-4 whitespace-nowrap align-middle w-[1%]"></td><td class="py-2.5 pr-4 pl-1 text-sm text-fg-muted align-middle"> </td></tr>`),UV=V(`<div class="fixed inset-0 z-[1000] flex items-center justify-center" role="dialog" aria-modal="true" aria-label="Keyboard shortcuts"><button type="button" aria-label="Close" class="absolute inset-0 bg-black/55 backdrop-blur-[2px] at-backdrop-in"></button> <div tabindex="-1" class="at-modal-in relative z-[1] bg-surface border border-line rounded-lg shadow-xl w-[480px] max-w-[90vw] max-h-[80vh] flex flex-col overflow-hidden outline-none"><div class="flex items-center justify-between px-4 py-3 border-b border-line bg-subtle flex-shrink-0"><span class="text-sm font-semibold text-fg">Keyboard Shortcuts</span> <button class="inline-flex items-center justify-center w-7 h-7 p-0 bg-transparent border border-line rounded cursor-pointer text-sm text-fg-subtle hover:bg-danger-bg hover:border-danger-border hover:text-danger transition-colors" title="Close (Esc)"><!></button></div> <div class="overflow-y-auto py-2"><table class="w-full border-collapse"><tbody></tbody></table></div></div></div>`);function WV(e,t){it(t,!0);let n=N(void 0);Lr(()=>{let e=e=>{e.key===`Escape`&&(e.stopPropagation(),t.onClose())},r=z(n);return r&&(r.addEventListener(`keydown`,e),r.focus()),window.addEventListener(`keydown`,e),()=>{r&&r.removeEventListener(`keydown`,e),window.removeEventListener(`keydown`,e)}});var r=UV(),i=F(r),a=L(i,2),o=F(a),s=L(F(o),2);rg(F(s),{size:14}),D(s),D(o);var c=L(o,2),l=F(c),u=F(l);G(u,21,()=>t.shortcuts,Oa,(e,t)=>{var n=HV(),r=F(n);G(r,21,()=>z(t).keys,Oa,(e,t)=>{var n=VV(),r=F(n,!0);D(n),R(()=>U(r,z(t)===`CmdOrCtrl`?xg?`⌘`:`Ctrl`:z(t)===`AltOrOpt`?xg?`⌥`:`Alt`:z(t))),H(e,n)}),D(r);var i=L(r),a=F(i,!0);D(i),D(n),R(()=>U(a,z(t).description)),H(e,n)}),D(u),D(l),D(c),D(a),Vo(a,e=>P(n,e),()=>z(n)),D(r),B(`click`,i,function(...e){t.onClose?.apply(this,e)}),B(`click`,s,function(...e){t.onClose?.apply(this,e)}),H(e,r),at()}ea([`click`]);var GV=V(`<div role="separator" aria-label="Resize panel" tabindex="0" title="Drag to resize · double-click to reset"><div></div> <div></div></div>`),KV=V(`<span class="text-fg-subtle/60 flex-shrink-0 pl-0.5" aria-hidden="true"><!></span>`),qV=V(`<span> </span>`),JV=V(`<button><!> <span> </span> <!></button>`),YV=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Dock position (click to cycle: bottom → right → left) — or drag the header to an edge" aria-label="Change dock position"><!></button>`),XV=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors"><!></button>`),ZV=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Close (Esc)" aria-label="Close devtools"><!></button>`),QV=V(`<span class="px-2.5 py-1 rounded-md bg-accent text-white text-xs font-semibold shadow-lg"> </span>`),$V=V(`<div><!></div>`),eH=V(`<div class="fixed inset-0 z-[1001] pointer-events-none" aria-hidden="true"></div>`),tH=V(`<section aria-label="Autotel devtools"><!> <header><!> <div class="flex items-center gap-2 flex-shrink-0 pr-1 mr-0.5"><!> <span class="text-xs font-semibold tracking-tight text-fg hidden sm:inline">autotel</span></div> <nav class="flex items-center gap-0.5 overflow-x-auto min-w-0 flex-1 at-no-scrollbar" aria-label="Devtools sections"></nav> <div class="flex items-center gap-1 flex-shrink-0 pl-1"><!> <button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Keyboard shortcuts (?)" aria-label="Keyboard shortcuts"><!></button> <!> <!> <!></div></header> <div class="flex-1 min-h-0 overflow-hidden"><!></div> <!></section> <!>`,1);function nH(e,t){it(t,!0);let n=N(void 0),r=M(()=>Fc.value),i=M(()=>Bc.value),a=M(()=>Rc.value??`bottom`),o=M(()=>il.value),s=M(()=>zc.value),c=cg(),l=M(()=>z(a)===`bottom`||z(a)===`top`),u=M(()=>z(l)?z(o).vertical:z(o).horizontal),d=M(()=>al(z(l)?`vertical`:`horizontal`)),f=M(()=>su.value),p=M(()=>nu.value),m=M(()=>ru.value),h=M(()=>({genai:z(p)>0?z(p):void 0,flow:z(m)>0?z(m):void 0,errors:z(f)>0?z(f):void 0})),g=M(()=>DV.map(e=>({...e,badge:z(h)[e.id]}))),_=jV({isVertical:()=>z(l),dock:()=>z(a),axisSize:()=>z(u),setSize:ol,resetSize:sl}),v=NV({dock:()=>z(a),pipActive:()=>z(s),onDock:Lu});async function y(){if(z(s)){fg(()=>zc.value=!1);return}let e=z(n)?.getRootNode(),t=e instanceof ShadowRoot?e.host:null;t&&await dg(t,()=>zc.value=!1,{width:760,height:600})&&(zc.value=!0)}let b=globalThis.window!==void 0&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;function x(e,{dock:t}){if(b||z(s))return{duration:0};let n=t===`left`||t===`right`?`X`:`Y`,r=t===`bottom`||t===`right`?1:-1;return{duration:240,easing:og,css:(e,t)=>`transform: translate${n}(${t*r*100}%)`}}let S=[`traces`,`genai`,`flow`,`service-map`,`metrics`,`logs`,`errors`],C=M(()=>$c.value);function w(){return Vc.value?vg:Bc.value===`traces`?_g:gg}Lr(()=>{let e=z(n)?.getRootNode(),t=e instanceof ShadowRoot||e instanceof Document?e:window,r=e=>{let t=e;if(t.key===`Escape`){if($c.value){tl();return}if(yg())return;if(zc.value){fg(()=>zc.value=!1);return}ju();return}if(t.key===`?`&&!yg()){t.preventDefault(),nl(w());return}if(!$c.value&&!yg()&&t.key>=`1`&&t.key<=`7`){let e=Number.parseInt(t.key,10)-1;e<S.length&&Mu(S[e])}};return t.addEventListener(`keydown`,r),()=>t.removeEventListener(`keydown`,r)});let T=M(()=>z(s)?`inset-0`:{bottom:`left-0 right-0 bottom-0`,top:`left-0 right-0 top-0`,right:`top-0 bottom-0 right-0`,left:`top-0 bottom-0 left-0`}[z(a)]),ee=M(()=>z(s)?``:{bottom:`border-t`,top:`border-b`,right:`border-l`,left:`border-r`}[z(a)]),te=M(()=>({bottom:`-top-1 left-0 right-0 h-2 cursor-ns-resize`,top:`-bottom-1 left-0 right-0 h-2 cursor-ns-resize`,right:`-left-1 top-0 bottom-0 w-2 cursor-ew-resize`,left:`-right-1 top-0 bottom-0 w-2 cursor-ew-resize`})[z(a)]),ne=M(()=>({bottom:`inset-x-0 top-1 h-px`,top:`inset-x-0 bottom-1 h-px`,right:`inset-y-0 left-1 w-px`,left:`inset-y-0 right-1 w-px`})[z(a)]),re=M(()=>z(s)?``:z(l)?`height: ${z(u)}px;`:`width: ${z(u)}px;`),ie=M(()=>z(s)?``:{bottom:`box-shadow: 0 -12px 32px -14px var(--at-shadow), 0 -2px 6px -4px var(--at-shadow);`,top:`box-shadow: 0 12px 32px -14px var(--at-shadow), 0 2px 6px -4px var(--at-shadow);`,right:`box-shadow: -12px 0 32px -14px var(--at-shadow), -2px 0 6px -4px var(--at-shadow);`,left:`box-shadow: 12px 0 32px -14px var(--at-shadow), 2px 0 6px -4px var(--at-shadow);`}[z(a)]),ae=M(()=>z(a)===`right`?$m:z(a)===`left`?Zm:Ym),oe=[{edge:`bottom`,pos:`left-0 right-0 bottom-0 h-24`,label:`Dock bottom`},{edge:`top`,pos:`left-0 right-0 top-0 h-24`,label:`Dock top`},{edge:`left`,pos:`top-0 bottom-0 left-0 w-44`,label:`Dock left`},{edge:`right`,pos:`top-0 bottom-0 right-0 w-44`,label:`Dock right`}];var se=la(),ce=I(se),le=e=>{var t=tH(),r=I(t),o=F(r),f=e=>{var t=GV(),n=F(t),r=L(n,2);D(t),R((e,i,a,o)=>{J(t,`aria-orientation`,z(l)?`horizontal`:`vertical`),J(t,`aria-valuenow`,e),J(t,`aria-valuemin`,z(d).min),J(t,`aria-valuemax`,z(d).max),q(t,1,i),q(n,1,a),q(r,1,o)},[()=>Math.round(z(u)),()=>K($(`absolute z-20 group touch-none select-none outline-none`,z(te))),()=>K($(`absolute bg-line-subtle transition-colors duration-150`,`group-hover:bg-accent group-focus-visible:bg-accent`,_.resizing&&`!bg-accent`,z(ne))),()=>K($(`absolute rounded-full bg-line transition-colors duration-150`,`group-hover:bg-accent group-focus-visible:bg-accent`,_.resizing&&`!bg-accent`,z(l)?`left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2 w-9 h-1`:`top-1/2 -translate-y-1/2 left-1/2 -translate-x-1/2 h-9 w-1`))]),B(`pointerdown`,t,function(...e){_.onPointerDown?.apply(this,e)}),B(`keydown`,t,function(...e){_.onKeyDown?.apply(this,e)}),B(`dblclick`,t,function(...e){_.onDblClick?.apply(this,e)}),H(e,t)};W(o,e=>{z(s)||e(f)});var p=L(o,2),m=F(p),h=e=>{var t=KV();ym(F(t),{size:14}),D(t),H(e,t)};W(m,e=>{z(s)||e(h)});var b=L(m,2);id(F(b),{width:18,height:18}),Ke(2),D(b);var S=L(b,2);G(S,21,()=>z(g),e=>e.id,(e,t)=>{let n=M(()=>z(t).icon),r=M(()=>z(i)===z(t).id);var a=JV(),o=F(a);{let e=M(()=>z(t).id===`errors`&&z(t).badge?`text-danger`:void 0);Ra(o,()=>z(n),(t,n)=>{n(t,{size:14,get class(){return z(e)}})})}var s=L(o,2),c=F(s,!0);D(s);var l=L(s,2),u=e=>{var n=qV(),r=F(n,!0);D(n),R(e=>{q(n,1,e),U(r,z(t).badge>99?`99+`:z(t).badge)},[()=>K($(`px-1.5 py-px text-[10px] font-semibold rounded-full`,z(t).id===`errors`?`bg-danger-bg text-danger`:`bg-accent/15 text-fg-muted`))]),H(e,n)};W(l,e=>{z(t).badge&&e(u)}),D(a),R(e=>{J(a,`aria-current`,z(r)?`page`:void 0),q(a,1,e),U(c,z(t).label)},[()=>K($(`flex items-center gap-1.5 px-2.5 h-8 rounded-md flex-shrink-0`,`text-xs transition-colors cursor-pointer`,z(r)?`bg-accent/12 text-fg font-semibold ring-1 ring-inset ring-accent/20`:`text-fg-subtle font-medium hover:text-fg hover:bg-subtle`))]),B(`click`,a,()=>Mu(z(t).id)),H(e,a)}),D(S);var se=L(S,2);{let e=e=>{let t=M(()=>z(ae));var n=la();Ra(I(n),()=>z(t),(e,t)=>{t(e,{size:15})}),H(e,n)};var ce=F(se);BV(ce,{compact:!0});var le=L(ce,2);jp(F(le),{size:15}),D(le);var E=L(le,2),ue=t=>{var n=YV(),r=F(n);e(r),D(n),B(`click`,n,function(...e){Ru?.apply(this,e)}),H(t,n)};W(E,e=>{z(s)||e(ue)});var de=L(E,2),fe=e=>{var t=XV(),n=F(t),r=e=>{zm(e,{size:15})},i=e=>{rh(e,{size:15})};W(n,e=>{z(s)?e(r):e(i,-1)}),D(t),R(()=>{J(t,`title`,z(s)?`Return to docked panel`:`Pop out to a separate window`),J(t,`aria-label`,z(s)?`Return to docked panel`:`Pop out to window`)}),B(`click`,t,y),H(e,t)};W(de,e=>{c&&e(fe)});var pe=L(de,2),me=e=>{var t=ZV();rg(F(t),{size:16}),D(t),B(`click`,t,function(...e){ju?.apply(this,e)}),H(e,t)};W(pe,e=>{z(s)||e(me)}),D(se),B(`click`,le,()=>nl(w()))}D(p);var he=L(p,2);PV(F(he),{}),D(he);var ge=L(he,2),_e=e=>{WV(e,{get shortcuts(){return z(C)},get onClose(){return tl}})};W(ge,e=>{z(C)&&e(_e)}),D(r),Vo(r,e=>P(n,e),()=>z(n));var ve=L(r,2),ye=e=>{var t=eH();G(t,21,()=>oe,e=>e.edge,(e,t)=>{let n=M(()=>v.dropTarget===z(t).edge);var r=$V(),i=F(r),a=e=>{var n=QV(),r=F(n,!0);D(n),R(()=>U(r,z(t).label)),H(e,n)};W(i,e=>{z(n)&&e(a)}),D(r),R(e=>q(r,1,e),[()=>K($(`absolute flex items-center justify-center transition-colors duration-100`,z(t).pos,z(n)?`bg-accent/15 ring-2 ring-inset ring-accent`:`bg-accent/5`))]),H(e,r)}),D(t),H(e,t)};W(ve,e=>{v.dragging&&e(ye)}),R((e,t)=>{q(r,1,e),oo(r,`${z(re)} ${z(ie)}`),q(p,1,t)},[()=>K($(`fixed z-[1000] flex flex-col`,`bg-surface text-fg`,z(T),z(ee),`border-line`)),()=>K($(`flex items-center gap-1 pl-2 pr-2 h-11 flex-shrink-0`,`border-b border-line bg-surface`,z(s)?``:`cursor-grab active:cursor-grabbing`))]),B(`pointerdown`,p,function(...e){v.onHeaderPointerDown?.apply(this,e)}),qa(3,r,()=>x,()=>({dock:z(a)})),H(e,t)};W(ce,e=>{z(r)&&e(le)}),H(e,se),at()}ea([`pointerdown`,`keydown`,`dblclick`,`click`]);var rH=V(`<button><!> </button>`),iH=V(`<nav></nav>`);function aH(e,t){it(t,!0);let n=Z(t,`orientation`,3,`horizontal`),r=M(()=>Bc.value);var i=iH();G(i,21,()=>DV,({id:e,label:t,icon:n})=>e,(e,t)=>{let n=()=>z(t).id,i=()=>z(t).label,a=()=>z(t).icon;var o=rH(),s=F(o);Ra(s,a,(e,t)=>{t(e,{size:14})});var c=L(s);D(o),R(e=>{q(o,1,e),U(c,` ${i()??``}`)},[()=>K($(`flex items-center gap-2 px-3 py-2 text-xs font-medium rounded transition-colors whitespace-nowrap`,z(r)===n()?`bg-accent text-white`:`text-fg-subtle hover:bg-hover hover:text-fg`))]),B(`click`,o,()=>Mu(n())),H(e,o)}),D(i),R(e=>q(i,1,e),[()=>K($(`flex gap-1 p-1`,n()===`vertical`?`flex-col w-48 border-r border-line`:`border-b border-line overflow-x-auto`))]),H(e,i),at()}ea([`click`]);var oH=V(`<!> <span class="font-medium">Snapshot mode</span> <span class="text-warning">— live updates paused.</span> <button class="ml-auto inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-warning-bg transition-colors" title="Exit snapshot and clear data"><!> Exit</button>`,1),sH=V(`<span class="text-fg-subtle"> </span> <button class="ml-auto inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover transition-colors disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent"><!> Download snapshot</button> <button class="inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover transition-colors" title="Load a snapshot file"><!> Load snapshot</button> <button class="inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover hover:text-danger transition-colors" title="Clear all captured data — traces, logs, metrics and errors"><!> Clear</button>`,1),cH=V(`<span class="text-danger truncate"> </span>`),lH=V(`<span class="text-warning truncate"> </span>`),uH=V(`<div><!> <input type="file" accept="application/json,.json" class="hidden"/> <!> <!></div>`);function dH(e,t){it(t,!0);let n=N(void 0),r=N(null),i=N(null),a=M(()=>kl.value),o=M(()=>[{n:cl.value.length,one:`trace`,many:`traces`},{n:dl.value.length,one:`log`,many:`logs`},{n:ul.value.length,one:`error`,many:`errors`}].filter(e=>e.n>0).map(e=>`${e.n} ${e.n===1?e.one:e.many}`)),s=M(()=>z(o).length===0),c=()=>{P(r,null),P(i,null),Jy({traces:cl.value,logs:dl.value,errors:ul.value})},l=()=>{z(n)?.click()},u=()=>{P(r,null),P(i,null),Bu()},d=async e=>{P(r,null),P(i,null);let t=e.currentTarget,n=t.files?.[0];if(t.value=``,!n)return;let a=await Zy(n);if(!a.success||!a.snapshot){P(r,a.errors.join(`; `)||`Failed to load snapshot`,!0);return}a.warnings.length>0&&P(i,a.warnings.join(`; `),!0),ku(a.snapshot)};var f=uH(),p=F(f),m=e=>{var t=oH(),n=I(t);hp(n,{size:12});var r=L(n,6);rg(F(r),{size:12}),Ke(),D(r),B(`click`,r,function(...e){Au?.apply(this,e)}),H(e,t)},h=e=>{var t=sH(),n=I(t),r=F(n,!0);D(n);var i=L(n,2);hp(F(i),{size:12}),Ke(),D(i);var a=L(i,2);qh(F(a),{size:12}),Ke(),D(a);var d=L(a,2);Vh(F(d),{size:12}),Ke(),D(d),R(e=>{U(r,e),i.disabled=z(s),J(i,`title`,z(s)?`Nothing captured yet`:`Download a snapshot of traces, logs, errors and metrics`)},[()=>z(s)?`No data captured`:z(o).join(` · `)]),B(`click`,i,c),B(`click`,a,l),B(`click`,d,u),H(e,t)};W(p,e=>{z(a)?e(m):e(h,-1)});var g=L(p,2);Vo(g,e=>P(n,e),()=>z(n));var _=L(g,2),v=e=>{var t=cH(),n=F(t,!0);D(t),R(()=>{J(t,`title`,z(r)),U(n,z(r))}),H(e,t)};W(_,e=>{z(r)&&e(v)});var y=L(_,2),b=e=>{var t=lH(),n=F(t,!0);D(t),R(()=>{J(t,`title`,z(i)),U(n,z(i))}),H(e,t)};W(y,e=>{z(i)&&!z(r)&&e(b)}),D(f),R(e=>q(f,1,e),[()=>K($(`border-b border-line px-3 py-1.5 text-xs flex items-center gap-2`,z(a)?`bg-warning-bg text-warning`:`bg-subtle text-fg-muted`))]),B(`change`,g,d),H(e,f),at()}ea([`click`,`change`]);var fH=V(`<div class="flex h-screen w-screen bg-surface text-fg"><div class="hidden md:flex flex-col border-r border-line"><!> <div class="mt-auto p-2 border-t border-line flex flex-col gap-1"><!> <button class="flex items-center gap-2 px-3 py-2 text-xs text-fg-subtle hover:bg-hover hover:text-fg rounded transition-colors"><!> </button> <button class="flex items-center gap-2 px-3 py-2 text-xs text-fg-subtle hover:bg-hover hover:text-fg rounded transition-colors" title="Keyboard shortcuts (?)"><!> Shortcuts</button></div></div> <div class="flex-1 flex flex-col min-w-0"><!> <div class="md:hidden"><!></div> <div class="flex-1 overflow-hidden"><!></div></div> <!></div>`);function pH(e,t){it(t,!0);function n(){return Vc.value?vg:Bc.value===`traces`?_g:gg}let r=M(()=>Gc.value),i=M(()=>$c.value);Lr(()=>{Gc.value=Kc()});let a=N(void 0);Lr(()=>{let e=null,t=z(a)?.getRootNode();t instanceof ShadowRoot?e=t.host:globalThis.document!==void 0&&(e=document.documentElement),e&&e.setAttribute(`data-theme`,z(r))}),Lr(()=>{let e=e=>{if(e.key===`?`&&!yg()){e.preventDefault(),nl(n());return}if(!$c.value&&!yg()&&e.key>=`1`&&e.key<=`9`){let t=parseInt(e.key,10)-1;t<OV.length&&Mu(OV[t])}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});let o=M(()=>z(r)===`dark`?`Dark`:z(r)===`light`?`Light`:`System`);var s=fH(),c=F(s),l=F(c);aH(l,{orientation:`vertical`});var u=L(l,2),d=F(u);BV(d,{});var f=L(d,2),p=F(f),m=e=>{Gm(e,{size:14})},h=e=>{Fh(e,{size:14})},g=e=>{Um(e,{size:14})};W(p,e=>{z(r)===`dark`?e(m):z(r)===`light`?e(h,1):e(g,-1)});var _=L(p);D(f);var v=L(f,2);jp(F(v),{size:14}),Ke(),D(v),D(u),D(c);var y=L(c,2),b=F(y);dH(b,{});var x=L(b,2);aH(F(x),{orientation:`horizontal`}),D(x);var S=L(x,2);PV(F(S),{}),D(S),D(y);var C=L(y,2),w=e=>{WV(e,{get shortcuts(){return z(i)},get onClose(){return tl}})};W(C,e=>{z(i)&&e(w)}),D(s),Vo(s,e=>P(a,e),()=>z(a)),R(()=>{J(f,`title`,`Theme: ${z(o)} (click to cycle)`),U(_,` ${z(o)??``}`)}),B(`click`,f,function(...e){Jc?.apply(this,e)}),B(`click`,v,()=>el(n())),H(e,s),at()}ea([`click`]);var mH=250,hH=5e3;function gH(e={}){let t=e.now??(()=>Date.now()),n=e.debounceMs??mH,r=e.limit??hH,i=0,a=null,o=null,s=!1;function c(){let t=pl.value,n=e.baseUrl??(t?Zo(t):null)??globalThis.location?.origin??``;return{fetch:e.fetch??globalThis.fetch.bind(globalThis),baseUrl:n}}async function l(){if(s)return;let e=++i;a?.abort();let n=new AbortController;a=n;let o={query:``,window:ks(Cs(ml.value,t())),limit:r},l={...c(),signal:n.signal},[u,d]=await Promise.all([_H(o,l),vA(o,l)]);e!==i||s||(u.status===`ok`?(hl.value=u.traces,_l.value=`ready`):u.status===`error`&&(_l.value=`unavailable`),d.status===`ok`&&(gl.value=d.errors))}function u(){if(!s){if(o&&clearTimeout(o),n<=0){l();return}o=setTimeout(()=>{o=null,l()},n)}}return{refresh:l,invalidate:u,dispose(){s=!0,o&&clearTimeout(o),a?.abort()}}}async function _H(e,t){let n=[],r=new Set,i;do{let a=await hA({...e,cursor:i},t);if(a.status!==`ok`)return a;if(n.push(...a.traces),i=a.nextCursor??void 0,i&&r.has(i))return{status:`error`,message:`The trace query returned a repeated pagination cursor.`};i&&r.add(i)}while(i);return{status:`ok`,traces:n,nextCursor:null}}var vH=`data-autotel-portal`;function yH(e){let t=e.querySelector(`[${vH}]`);if(t)return t;let n=document.createElement(`div`);return n.setAttribute(vH,``),n.style.position=`absolute`,n.style.top=`0`,n.style.left=`0`,n.style.zIndex=`2147483000`,e.appendChild(n),n}var bH=V(`<!> <!>`,1),xH=V(`<div class="contents"><!></div>`);function SH(e,t){it(t,!0);function n(e){Mu(e.tab??`traces`),Nl.value=e.q??``,Pl.value=e.status??`all`,Fl.value=e.minDuration??0,ml.value=e.window??bs,Ml.value=e.sort??Zu,zl.value=e.genaiQuery??``,e.traceId&&Wc(e.traceId,e.spanId)}Lr(()=>{pl.value=t.wsUrl});let r=gH();Lr(()=>(r.refresh(),()=>r.dispose())),Lr(()=>{ml.value,cl.value.length,r.invalidate()});let i=N(void 0),a=N(void 0);Lr(()=>{if(!z(i))return;let e=z(i).getRootNode();P(a,yH(e instanceof ShadowRoot?e:document.body),!0)}),Lr(()=>{t.deepLink&&n(t.deepLink)}),Lr(()=>{let e=Uc.value;e&&cl.value.some(t=>t.traceId===e.traceId)&&(Nu(e.traceId,e.spanId??null),Mu(`traces`),Uc.value=null)});let o=null;Lr(()=>{if(t.mode!==`fullpage`)return;let e={tab:Bc.value,traceId:Vc.value??void 0,spanId:Hc.value??void 0,q:Nl.value||void 0,status:Pl.value,minDuration:Fl.value,window:ml.value,sort:Ml.value,genaiQuery:zl.value||void 0};if(Uc.value)return;let n=ed(e);if(n===location.hash)return;let r=td(o,e);o=e;let i=`${location.pathname}${location.search}${n}`;r===`push`?history.pushState(history.state,``,i):history.replaceState(history.state,``,i)}),Lr(()=>{if(t.mode!==`fullpage`)return;let e=()=>{let e=$u(location.hash);o=e,n(e)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)}),Lr(()=>{Wu(),es(Zo(t.wsUrl));let e=new Xo(t.wsUrl);fl.value=`connecting`;let n=e.onStatusChange(e=>{fl.value=e}),r=e.onMessage(Tu);return e.connect(),()=>{r(),n(),e.disconnect()}});var s=xH();iE(F(s),{get defaultPortalTo(){return z(a)},children:(e,n)=>{var r=la(),i=I(r),a=e=>{pH(e,{})},o=e=>{var t=bH(),n=I(t);Hf(n,{}),nH(L(n,2),{}),H(e,t)};W(i,e=>{t.mode===`fullpage`?e(a):e(o,-1)}),H(e,r)},$$slots:{default:!0}}),D(s),Vo(s,e=>P(i,e),()=>z(i)),H(e,s),at()}function CH(e,t){let n=pa(SH,{target:e,props:t});return()=>{_a(n)}}var wH=`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
46
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-outline-style:solid}::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:"Hanken Grotesk", system-ui, -apple-system, sans-serif;--font-mono:"JetBrains Mono", ui-monospace, "SF Mono", monospace;--color-red-100:#ffe2e2;--color-red-400:#ff6568;--color-red-500:#fb2c36;--color-red-600:#e40014;--color-red-700:#bf000f;--color-orange-100:#ffedd5;--color-orange-400:#ff8b1a;--color-orange-500:#fe6e00;--color-orange-600:#f05100;--color-orange-700:#c53c00;--color-amber-100:#fef3c6;--color-amber-500:#f99c00;--color-amber-600:#dd7400;--color-amber-700:#b75000;--color-yellow-100:#fef9c2;--color-yellow-500:#edb200;--color-yellow-600:#cd8900;--color-green-100:#dcfce7;--color-green-400:#05df72;--color-green-500:#00c758;--color-green-600:#00a544;--color-emerald-500:#00bb7f;--color-emerald-600:#009767;--color-teal-500:#00baa7;--color-teal-600:#009588;--color-cyan-100:#cefafe;--color-cyan-500:#00b7d7;--color-cyan-600:#0092b5;--color-sky-500:#00a5ef;--color-sky-600:#0084cc;--color-blue-100:#dbeafe;--color-blue-400:#54a2ff;--color-blue-500:#3080ff;--color-blue-600:#155dfc;--color-indigo-500:#625fff;--color-indigo-600:#4f39f6;--color-violet-100:#ede9fe;--color-violet-500:#8d54ff;--color-violet-600:#7f22fe;--color-violet-700:#7008e7;--color-purple-100:#f3e8ff;--color-purple-400:#c07eff;--color-purple-500:#ac4bff;--color-purple-600:#9810fa;--color-fuchsia-500:#e12afb;--color-fuchsia-600:#c600db;--color-rose-500:#ff2357;--color-rose-600:#e70044;--color-gray-50:#f9fafb;--color-gray-100:#f3f4f6;--color-gray-400:#99a1af;--color-gray-500:#6a7282;--color-gray-900:#101828;--color-stone-500:#79716b;--color-stone-600:#57534d;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-surface:var(--at-surface);--color-subtle:var(--at-muted);--color-hover:var(--at-surface-hover);--color-code:var(--at-code);--color-fg:var(--at-text-primary);--color-fg-muted:var(--at-text-secondary);--color-fg-subtle:var(--at-text-muted);--color-line:var(--at-border);--color-line-subtle:var(--at-border-light);--color-accent:var(--at-accent);--color-danger:var(--at-error-text);--color-danger-bg:var(--at-error-bg);--color-danger-border:var(--at-error-border);--color-success:var(--at-ok-text);--color-success-bg:var(--at-ok-bg);--color-success-border:var(--at-ok-border);--color-warning:var(--at-warn-text);--color-warning-bg:var(--at-warn-bg);--color-warning-border:var(--at-warn-border);--color-selected:var(--at-selected-bg)}@supports (color:color(display-p3 0 0 0)){:root,:host{--color-red-100:color(display-p3 .980386 .889727 .887779);--color-red-400:color(display-p3 .933534 .431676 .423491);--color-red-500:color(display-p3 .903738 .262579 .253307);--color-red-600:color(display-p3 .830323 .140383 .133196);--color-red-700:color(display-p3 .692737 .116232 .104679);--color-orange-100:color(display-p3 .988762 .931393 .843273);--color-orange-400:color(display-p3 .950192 .561807 .211017);--color-orange-500:color(display-p3 .946589 .449788 .0757345);--color-orange-600:color(display-p3 .887467 .341665 .0219962);--color-orange-700:color(display-p3 .729844 .257256 .0511062);--color-amber-100:color(display-p3 .989391 .954583 .796328);--color-amber-500:color(display-p3 .93994 .620584 .0585367);--color-amber-600:color(display-p3 .827144 .467166 .0336006);--color-amber-700:color(display-p3 .67989 .32771 .0520514);--color-yellow-100:color(display-p3 .993436 .977463 .782913);--color-yellow-500:color(display-p3 .903651 .703062 .0745389);--color-yellow-600:color(display-p3 .776342 .542492 .041709);--color-green-100:color(display-p3 .885269 .984329 .910368);--color-green-400:color(display-p3 .399536 .862346 .49324);--color-green-500:color(display-p3 .308734 .774754 .374307);--color-green-600:color(display-p3 .243882 .640824 .294808);--color-emerald-500:color(display-p3 .267113 .726847 .508397);--color-emerald-600:color(display-p3 .206557 .589057 .413962);--color-teal-500:color(display-p3 .266569 .721518 .655462);--color-teal-600:color(display-p3 .207114 .579584 .53668);--color-cyan-100:color(display-p3 .843085 .97553 .992573);--color-cyan-500:color(display-p3 .246703 .710032 .841444);--color-cyan-600:color(display-p3 .193249 .564651 .707197);--color-sky-500:color(display-p3 .219113 .639027 .931479);--color-sky-600:color(display-p3 .162505 .509376 .796082);--color-blue-100:color(display-p3 .869214 .915931 .989622);--color-blue-400:color(display-p3 .397443 .62813 .992116);--color-blue-500:color(display-p3 .266422 .491219 .988624);--color-blue-600:color(display-p3 .174493 .358974 .950247);--color-indigo-500:color(display-p3 .380374 .372235 .971707);--color-indigo-600:color(display-p3 .297656 .227891 .929242);--color-violet-100:color(display-p3 .926222 .913546 .990178);--color-violet-500:color(display-p3 .523372 .329605 .990884);--color-violet-600:color(display-p3 .459951 .162666 .957985);--color-violet-700:color(display-p3 .40161 .0841901 .871151);--color-purple-100:color(display-p3 .945034 .910569 .992972);--color-purple-400:color(display-p3 .719919 .492497 .995173);--color-purple-500:color(display-p3 .629519 .30089 .990817);--color-purple-600:color(display-p3 .546729 .130167 .94439);--color-fuchsia-500:color(display-p3 .81268 .241966 .951571);--color-fuchsia-600:color(display-p3 .716587 .083681 .841036);--color-rose-500:color(display-p3 .921824 .240748 .355666);--color-rose-600:color(display-p3 .848792 .102011 .269259);--color-gray-50:color(display-p3 .977213 .98084 .985102);--color-gray-100:color(display-p3 .953567 .956796 .964321);--color-gray-400:color(display-p3 .605734 .630385 .680158);--color-gray-500:color(display-p3 .421287 .446085 .504784);--color-gray-900:color(display-p3 .070423 .0928982 .151928);--color-stone-500:color(display-p3 .467445 .443064 .42264);--color-stone-600:color(display-p3 .339543 .325291 .304619)}}@supports (color:lab(0% 0 0)){:root,:host{--color-red-100:lab(92.243% 10.2865 3.83865);--color-red-400:lab(63.7053% 60.745 31.3109);--color-red-500:lab(55.4814% 75.0732 48.8528);--color-red-600:lab(48.4493% 77.4328 61.5452);--color-red-700:lab(40.4273% 67.2623 53.7441);--color-orange-100:lab(94.7127% 3.58394 14.3151);--color-orange-400:lab(70.0429% 42.5156 75.8207);--color-orange-500:lab(64.272% 57.1788 90.3583);--color-orange-600:lab(57.1026% 64.2584 89.8886);--color-orange-700:lab(46.4615% 57.7275 70.8507);--color-amber-100:lab(95.916% -1.21653 23.111);--color-amber-500:lab(72.7183% 31.8672 97.9407);--color-amber-600:lab(60.3514% 40.5624 87.1228);--color-amber-700:lab(47.2709% 42.9082 69.2966);--color-yellow-100:lab(97.3564% -4.51407 27.344);--color-yellow-500:lab(76.3898% 14.5258 98.4589);--color-yellow-600:lab(62.7799% 22.4197 86.1544);--color-green-100:lab(96.1861% -13.8464 6.52365);--color-green-400:lab(78.503% -64.9265 39.7492);--color-green-500:lab(70.5521% -66.5147 45.8073);--color-green-600:lab(59.0978% -58.6621 41.2579);--color-emerald-500:lab(66.9756% -58.27 19.5419);--color-emerald-600:lab(55.0481% -49.9246 15.93);--color-teal-500:lab(67.3859% -49.0983 -2.63511);--color-teal-600:lab(55.0223% -41.0774 -3.90277);--color-cyan-100:lab(95.3146% -13.8285 -6.84732);--color-cyan-500:lab(67.805% -35.3952 -30.2018);--color-cyan-600:lab(55.1767% -26.7496 -30.5139);--color-sky-500:lab(63.3038% -18.433 -51.0407);--color-sky-600:lab(51.7754% -11.4712 -49.8349);--color-blue-100:lab(92.0301% -2.24757 -11.6453);--color-blue-400:lab(65.0361% -1.42065 -56.9802);--color-blue-500:lab(54.1736% 13.3369 -74.6839);--color-blue-600:lab(44.0605% 29.0279 -86.0352);--color-indigo-500:lab(48.295% 38.3129 -81.9673);--color-indigo-600:lab(38.4009% 52.6132 -92.3857);--color-violet-100:lab(93.0838% 4.35197 -9.88284);--color-violet-500:lab(49.9355% 55.1776 -81.8963);--color-violet-600:lab(41.088% 68.9966 -91.995);--color-violet-700:lab(35.2783% 67.9912 -88.793);--color-purple-100:lab(93.3333% 6.97437 -9.83434);--color-purple-400:lab(63.6946% 47.6127 -59.2066);--color-purple-500:lab(52.0183% 66.11 -78.2316);--color-purple-600:lab(43.0295% 75.21 -86.5669);--color-fuchsia-500:lab(56.4256% 83.132 -64.639);--color-fuchsia-600:lab(47.5131% 83.4271 -63.0363);--color-rose-500:lab(56.101% 79.4328 31.4532);--color-rose-600:lab(49.1882% 81.577 36.0311);--color-gray-50:lab(98.2596% -.247031 -.706708);--color-gray-100:lab(96.1596% -.0823438 -1.13575);--color-gray-400:lab(65.9269% -.832707 -8.17473);--color-gray-500:lab(47.7841% -.393182 -10.0268);--color-gray-900:lab(8.11897% .811279 -12.254);--color-stone-500:lab(48.1164% 2.35701 4.26852);--color-stone-600:lab(35.5168% 1.08604 4.07829)}}}@layer base{*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::-webkit-file-upload-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:-webkit-any([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::-webkit-file-upload-button{margin-inline-end:4px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button{-webkit-appearance:button;appearance:button}input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.\\@container{container-type:inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;bottom:0;left:0;right:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-top-1{top:calc(var(--spacing) * -1)}.top-0{top:0}.top-0\\.5{top:calc(var(--spacing) * .5)}.top-1{top:var(--spacing)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-3{top:calc(var(--spacing) * 3)}.top-10{top:calc(var(--spacing) * 10)}.top-\\[7px\\]{top:7px}.top-\\[9px\\]{top:9px}.top-\\[calc\\(100\\%-2px\\)\\]{top:calc(100% - 2px)}.top-full{top:100%}.-right-1{right:calc(var(--spacing) * -1)}.-right-1\\.5{right:calc(var(--spacing) * -1.5)}.right-0{right:0}.right-1{right:var(--spacing)}.right-1\\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.-bottom-1{bottom:calc(var(--spacing) * -1)}.bottom-0{bottom:0}.bottom-0\\.5{bottom:calc(var(--spacing) * .5)}.bottom-1{bottom:var(--spacing)}.bottom-3{bottom:calc(var(--spacing) * 3)}.-left-1{left:calc(var(--spacing) * -1)}.-left-1\\.5{left:calc(var(--spacing) * -1.5)}.-left-px{left:-1px}.left-0{left:0}.left-1{left:var(--spacing)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[1000\\]{z-index:1000}.z-\\[1001\\]{z-index:1001}.z-\\[1100\\]{z-index:1100}.z-\\[1200\\]{z-index:1200}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.-m-1{margin:calc(var(--spacing) * -1)}.m-3{margin:calc(var(--spacing) * 3)}.m-4{margin:calc(var(--spacing) * 4)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline-start:auto;margin-inline-end:auto}.my-1{margin-block:var(--spacing)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mt-px{margin-top:1px}.mr-0\\.5{margin-right:calc(var(--spacing) * .5)}.mr-1{margin-right:var(--spacing)}.mr-1\\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-0\\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-0\\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-1{height:var(--spacing)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-1\\/2{height:50%}.h-2{height:calc(var(--spacing) * 2)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-11{height:calc(var(--spacing) * 11)}.h-24{height:calc(var(--spacing) * 24)}.h-\\[300px\\]{height:300px}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[80vh\\]{max-height:80vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[160px\\]{max-height:160px}.max-h-\\[200px\\]{max-height:200px}.max-h-\\[240px\\]{max-height:240px}.min-h-0{min-height:0}.min-h-\\[120px\\]{min-height:120px}.w-0\\.5{width:calc(var(--spacing) * .5)}.w-1{width:var(--spacing)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-14{width:calc(var(--spacing) * 14)}.w-24{width:calc(var(--spacing) * 24)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-\\[1\\%\\]{width:1%}.w-\\[80px\\]{width:80px}.w-\\[200px\\]{width:200px}.w-\\[480px\\]{width:480px}.w-\\[min\\(560px\\,92vw\\)\\]{width:min(560px,92vw)}.w-\\[min\\(700px\\,92vw\\)\\]{width:min(700px,92vw)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[10rem\\]{max-width:10rem}.max-w-\\[14rem\\]{max-width:14rem}.max-w-\\[16rem\\]{max-width:16rem}.max-w-\\[90vw\\]{max-width:90vw}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[420px\\]{max-width:420px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-\\[8px\\]{min-width:8px}.min-w-\\[16px\\]{min-width:16px}.min-w-\\[180px\\]{min-width:180px}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.-rotate-90{rotate:-90deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-ew-resize{cursor:ew-resize}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-ns-resize{cursor:ns-resize}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.resize-y{resize:vertical}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\\[80px_1fr\\]{grid-template-columns:80px 1fr}.grid-cols-\\[100px_1fr\\]{grid-template-columns:100px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-px{gap:1px}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:0;margin-block-end:0}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}.gap-y-2{row-gap:calc(var(--spacing) * 2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-line>:not(:last-child)){border-color:var(--color-line)}:where(.divide-line-subtle>:not(:last-child)){border-color:var(--color-line-subtle)}.self-stretch{align-self:stretch}.justify-self-end{justify-self:flex-end}.justify-self-start{justify-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[1px\\]{border-radius:1px}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent,.border-accent\\/30{border-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\\/30{border-color:color-mix(in oklab, var(--color-accent) 30%, transparent)}}.border-accent\\/40{border-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\\/40{border-color:color-mix(in oklab, var(--color-accent) 40%, transparent)}}.border-amber-500\\/20{border-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.border-amber-500\\/20{border-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-blue-500\\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab, red, red)){.border-blue-500\\/30{border-color:color-mix(in oklab, var(--color-blue-500) 30%, transparent)}}.border-cyan-500\\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab, red, red)){.border-cyan-500\\/30{border-color:color-mix(in oklab, var(--color-cyan-500) 30%, transparent)}}.border-danger-border{border-color:var(--color-danger-border)}.border-danger\\/30{border-color:var(--color-danger)}@supports (color:color-mix(in lab, red, red)){.border-danger\\/30{border-color:color-mix(in oklab, var(--color-danger) 30%, transparent)}}.border-emerald-500\\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\\/30{border-color:color-mix(in oklab, var(--color-emerald-500) 30%, transparent)}}.border-fuchsia-500\\/30{border-color:#e12afb4d}@supports (color:color-mix(in lab, red, red)){.border-fuchsia-500\\/30{border-color:color-mix(in oklab, var(--color-fuchsia-500) 30%, transparent)}}.border-green-500\\/30{border-color:#00c7584d}@supports (color:color-mix(in lab, red, red)){.border-green-500\\/30{border-color:color-mix(in oklab, var(--color-green-500) 30%, transparent)}}.border-indigo-500\\/30{border-color:#625fff4d}@supports (color:color-mix(in lab, red, red)){.border-indigo-500\\/30{border-color:color-mix(in oklab, var(--color-indigo-500) 30%, transparent)}}.border-line{border-color:var(--color-line)}.border-line-subtle{border-color:var(--color-line-subtle)}.border-line\\/50{border-color:var(--color-line)}@supports (color:color-mix(in lab, red, red)){.border-line\\/50{border-color:color-mix(in oklab, var(--color-line) 50%, transparent)}}.border-line\\/60{border-color:var(--color-line)}@supports (color:color-mix(in lab, red, red)){.border-line\\/60{border-color:color-mix(in oklab, var(--color-line) 60%, transparent)}}.border-orange-500\\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab, red, red)){.border-orange-500\\/30{border-color:color-mix(in oklab, var(--color-orange-500) 30%, transparent)}}.border-purple-500\\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab, red, red)){.border-purple-500\\/30{border-color:color-mix(in oklab, var(--color-purple-500) 30%, transparent)}}.border-red-500\\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab, red, red)){.border-red-500\\/30{border-color:color-mix(in oklab, var(--color-red-500) 30%, transparent)}}.border-stone-500\\/30{border-color:#79716b4d}@supports (color:color-mix(in lab, red, red)){.border-stone-500\\/30{border-color:color-mix(in oklab, var(--color-stone-500) 30%, transparent)}}.border-success-border{border-color:var(--color-success-border)}.border-violet-500\\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab, red, red)){.border-violet-500\\/30{border-color:color-mix(in oklab, var(--color-violet-500) 30%, transparent)}}.border-warning-border{border-color:var(--color-warning-border)}.border-white{border-color:var(--color-white)}.border-l-warning{border-left-color:var(--color-warning)}.\\!bg-accent{background-color:var(--color-accent)!important}.bg-accent,.bg-accent\\/5{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/5{background-color:color-mix(in oklab, var(--color-accent) 5%, transparent)}}.bg-accent\\/10{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/10{background-color:color-mix(in oklab, var(--color-accent) 10%, transparent)}}.bg-accent\\/12{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/12{background-color:color-mix(in oklab, var(--color-accent) 12%, transparent)}}.bg-accent\\/15{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/15{background-color:color-mix(in oklab, var(--color-accent) 15%, transparent)}}.bg-accent\\/70{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/70{background-color:color-mix(in oklab, var(--color-accent) 70%, transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\\/10{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.bg-amber-500\\/15{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\\/15{background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.bg-black\\/55{background-color:#0000008c}@supports (color:color-mix(in lab, red, red)){.bg-black\\/55{background-color:color-mix(in oklab, var(--color-black) 55%, transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\\/10{background-color:color-mix(in oklab, var(--color-blue-500) 10%, transparent)}}.bg-blue-500\\/15{background-color:#3080ff26}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\\/15{background-color:color-mix(in oklab, var(--color-blue-500) 15%, transparent)}}.bg-code{background-color:var(--color-code)}.bg-cyan-100{background-color:var(--color-cyan-100)}.bg-cyan-500\\/15{background-color:#00b7d726}@supports (color:color-mix(in lab, red, red)){.bg-cyan-500\\/15{background-color:color-mix(in oklab, var(--color-cyan-500) 15%, transparent)}}.bg-danger{background-color:var(--color-danger)}.bg-danger-bg,.bg-danger-bg\\/40{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.bg-danger-bg\\/40{background-color:color-mix(in oklab, var(--color-danger-bg) 40%, transparent)}}.bg-danger\\/5{background-color:var(--color-danger)}@supports (color:color-mix(in lab, red, red)){.bg-danger\\/5{background-color:color-mix(in oklab, var(--color-danger) 5%, transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\\/10{background-color:color-mix(in oklab, var(--color-emerald-500) 10%, transparent)}}.bg-emerald-500\\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\\/15{background-color:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.bg-fg-subtle{background-color:var(--color-fg-subtle)}.bg-fuchsia-500\\/15{background-color:#e12afb26}@supports (color:color-mix(in lab, red, red)){.bg-fuchsia-500\\/15{background-color:color-mix(in oklab, var(--color-fuchsia-500) 15%, transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\\/15{background-color:#00c75826}@supports (color:color-mix(in lab, red, red)){.bg-green-500\\/15{background-color:color-mix(in oklab, var(--color-green-500) 15%, transparent)}}.bg-hover{background-color:var(--color-hover)}.bg-indigo-500\\/15{background-color:#625fff26}@supports (color:color-mix(in lab, red, red)){.bg-indigo-500\\/15{background-color:color-mix(in oklab, var(--color-indigo-500) 15%, transparent)}}.bg-line{background-color:var(--color-line)}.bg-line-subtle{background-color:var(--color-line-subtle)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-500\\/15{background-color:#fe6e0026}@supports (color:color-mix(in lab, red, red)){.bg-orange-500\\/15{background-color:color-mix(in oklab, var(--color-orange-500) 15%, transparent)}}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-400{background-color:var(--color-purple-400)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-500\\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab, red, red)){.bg-purple-500\\/15{background-color:color-mix(in oklab, var(--color-purple-500) 15%, transparent)}}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab, red, red)){.bg-red-500\\/15{background-color:color-mix(in oklab, var(--color-red-500) 15%, transparent)}}.bg-rose-500{background-color:var(--color-rose-500)}.bg-selected{background-color:var(--color-selected)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-stone-500\\/15{background-color:#79716b26}@supports (color:color-mix(in lab, red, red)){.bg-stone-500\\/15{background-color:color-mix(in oklab, var(--color-stone-500) 15%, transparent)}}.bg-subtle,.bg-subtle\\/40{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/40{background-color:color-mix(in oklab, var(--color-subtle) 40%, transparent)}}.bg-subtle\\/50{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/50{background-color:color-mix(in oklab, var(--color-subtle) 50%, transparent)}}.bg-subtle\\/60{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/60{background-color:color-mix(in oklab, var(--color-subtle) 60%, transparent)}}.bg-success{background-color:var(--color-success)}.bg-success-bg{background-color:var(--color-success-bg)}.bg-surface{background-color:var(--color-surface)}.bg-teal-500{background-color:var(--color-teal-500)}.bg-transparent{background-color:#0000}.bg-violet-100{background-color:var(--color-violet-100)}.bg-violet-500{background-color:var(--color-violet-500)}.bg-violet-500\\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab, red, red)){.bg-violet-500\\/10{background-color:color-mix(in oklab, var(--color-violet-500) 10%, transparent)}}.bg-violet-500\\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab, red, red)){.bg-violet-500\\/15{background-color:color-mix(in oklab, var(--color-violet-500) 15%, transparent)}}.bg-warning{background-color:var(--color-warning)}.bg-warning-bg{background-color:var(--color-warning-bg)}.bg-warning\\/5{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/5{background-color:color-mix(in oklab, var(--color-warning) 5%, transparent)}}.bg-yellow-100{background-color:var(--color-yellow-100)}.fill-\\[var\\(--color-fg-subtle\\)\\]{fill:var(--color-fg-subtle)}.fill-amber-500\\/15{fill:#f99c0026}@supports (color:color-mix(in lab, red, red)){.fill-amber-500\\/15{fill:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.fill-amber-600{fill:var(--color-amber-600)}.fill-blue-500\\/15{fill:#3080ff26}@supports (color:color-mix(in lab, red, red)){.fill-blue-500\\/15{fill:color-mix(in oklab, var(--color-blue-500) 15%, transparent)}}.fill-blue-600{fill:var(--color-blue-600)}.fill-danger{fill:var(--color-danger)}.fill-emerald-500\\/15{fill:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.fill-emerald-500\\/15{fill:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.fill-emerald-600{fill:var(--color-emerald-600)}.fill-fg-muted{fill:var(--color-fg-muted)}.fill-fg-subtle{fill:var(--color-fg-subtle)}.fill-red-500{fill:var(--color-red-500)}.fill-rose-500\\/15{fill:#ff235726}@supports (color:color-mix(in lab, red, red)){.fill-rose-500\\/15{fill:color-mix(in oklab, var(--color-rose-500) 15%, transparent)}}.fill-rose-600{fill:var(--color-rose-600)}.fill-sky-500\\/15{fill:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.fill-sky-500\\/15{fill:color-mix(in oklab, var(--color-sky-500) 15%, transparent)}}.fill-sky-600{fill:var(--color-sky-600)}.fill-teal-500\\/15{fill:#00baa726}@supports (color:color-mix(in lab, red, red)){.fill-teal-500\\/15{fill:color-mix(in oklab, var(--color-teal-500) 15%, transparent)}}.fill-teal-600{fill:var(--color-teal-600)}.fill-violet-500\\/15{fill:#8d54ff26}@supports (color:color-mix(in lab, red, red)){.fill-violet-500\\/15{fill:color-mix(in oklab, var(--color-violet-500) 15%, transparent)}}.fill-violet-600{fill:var(--color-violet-600)}.fill-warning{fill:var(--color-warning)}.fill-white{fill:var(--color-white)}.stroke-accent{stroke:var(--color-accent)}.stroke-amber-500\\/60{stroke:#f99c0099}@supports (color:color-mix(in lab, red, red)){.stroke-amber-500\\/60{stroke:color-mix(in oklab, var(--color-amber-500) 60%, transparent)}}.stroke-blue-500\\/60{stroke:#3080ff99}@supports (color:color-mix(in lab, red, red)){.stroke-blue-500\\/60{stroke:color-mix(in oklab, var(--color-blue-500) 60%, transparent)}}.stroke-emerald-500\\/60{stroke:#00bb7f99}@supports (color:color-mix(in lab, red, red)){.stroke-emerald-500\\/60{stroke:color-mix(in oklab, var(--color-emerald-500) 60%, transparent)}}.stroke-fg-subtle{stroke:var(--color-fg-subtle)}.stroke-red-500{stroke:var(--color-red-500)}.stroke-rose-500\\/60{stroke:#ff235799}@supports (color:color-mix(in lab, red, red)){.stroke-rose-500\\/60{stroke:color-mix(in oklab, var(--color-rose-500) 60%, transparent)}}.stroke-sky-500\\/60{stroke:#00a5ef99}@supports (color:color-mix(in lab, red, red)){.stroke-sky-500\\/60{stroke:color-mix(in oklab, var(--color-sky-500) 60%, transparent)}}.stroke-teal-500\\/60{stroke:#00baa799}@supports (color:color-mix(in lab, red, red)){.stroke-teal-500\\/60{stroke:color-mix(in oklab, var(--color-teal-500) 60%, transparent)}}.stroke-violet-500\\/60{stroke:#8d54ff99}@supports (color:color-mix(in lab, red, red)){.stroke-violet-500\\/60{stroke:color-mix(in oklab, var(--color-violet-500) 60%, transparent)}}.stroke-\\[2\\.5px\\]{stroke-width:2.5px}.p-0{padding:0}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-0\\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-px{padding-block-start:1px;padding-block-end:1px}.pt-0\\.5{padding-top:calc(var(--spacing) * .5)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-7{padding-right:calc(var(--spacing) * 7)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-1{padding-bottom:var(--spacing)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-0\\.5{padding-left:calc(var(--spacing) * .5)}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-7{padding-left:calc(var(--spacing) * 7)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent,.text-accent\\/80{color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.text-accent\\/80{color:color-mix(in oklab, var(--color-accent) 80%, transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-cyan-500{color:var(--color-cyan-500)}.text-cyan-600{color:var(--color-cyan-600)}.text-danger{color:var(--color-danger)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-fg{color:var(--color-fg)}.text-fg-muted,.text-fg-muted\\/70{color:var(--color-fg-muted)}@supports (color:color-mix(in lab, red, red)){.text-fg-muted\\/70{color:color-mix(in oklab, var(--color-fg-muted) 70%, transparent)}}.text-fg-muted\\/80{color:var(--color-fg-muted)}@supports (color:color-mix(in lab, red, red)){.text-fg-muted\\/80{color:color-mix(in oklab, var(--color-fg-muted) 80%, transparent)}}.text-fg-subtle,.text-fg-subtle\\/60{color:var(--color-fg-subtle)}@supports (color:color-mix(in lab, red, red)){.text-fg-subtle\\/60{color:color-mix(in oklab, var(--color-fg-subtle) 60%, transparent)}}.text-fuchsia-500{color:var(--color-fuchsia-500)}.text-fuchsia-600{color:var(--color-fuchsia-600)}.text-gray-50{color:var(--color-gray-50)}.text-gray-100{color:var(--color-gray-100)}.text-gray-500{color:var(--color-gray-500)}.text-gray-900{color:var(--color-gray-900)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-600{color:var(--color-indigo-600)}.text-line{color:var(--color-line)}.text-line-subtle{color:var(--color-line-subtle)}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-purple-500{color:var(--color-purple-500)}.text-purple-600{color:var(--color-purple-600)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-stone-600{color:var(--color-stone-600)}.text-success{color:var(--color-success)}.text-surface{color:var(--color-surface)}.text-violet-500{color:var(--color-violet-500)}.text-violet-600{color:var(--color-violet-600)}.text-violet-600\\/70{color:#7f22feb3}@supports (color:color-mix(in lab, red, red)){.text-violet-600\\/70{color:color-mix(in oklab, var(--color-violet-600) 70%, transparent)}}.text-violet-700{color:var(--color-violet-700)}.text-warning{color:var(--color-warning)}.text-white{color:var(--color-white)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-600{color:var(--color-yellow-600)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_0_\\#d4d4d8\\]{--tw-shadow:0 1px 0 var(--tw-shadow-color,#d4d4d8);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-accent,.ring-accent\\/20{--tw-ring-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.ring-accent\\/20{--tw-ring-color:color-mix(in oklab, var(--color-accent) 20%, transparent)}}.ring-danger{--tw-ring-color:var(--color-danger)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-\\[2px\\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.row-virtual{content-visibility:auto;contain-intrinsic-size:auto 32px}.select-none{-webkit-user-select:none;user-select:none}.ring-inset{--tw-ring-inset:inset}@media (hover:hover){.group-hover\\:bg-accent:is(:where(.group):hover *){background-color:var(--color-accent)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\/stat\\:underline:is(:where(.group\\/stat):hover *){text-decoration-line:underline}}.group-focus-visible\\:bg-accent:is(:where(.group):focus-visible *){background-color:var(--color-accent)}.last\\:mr-0:last-child{margin-right:0}.last\\:mb-0:last-child{margin-bottom:0}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.hover\\:scale-125:hover{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:border-danger-border:hover{border-color:var(--color-danger-border)}.hover\\:bg-accent:hover,.hover\\:bg-accent\\/5:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/5:hover{background-color:color-mix(in oklab, var(--color-accent) 5%, transparent)}}.hover\\:bg-accent\\/10:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/10:hover{background-color:color-mix(in oklab, var(--color-accent) 10%, transparent)}}.hover\\:bg-accent\\/15:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/15:hover{background-color:color-mix(in oklab, var(--color-accent) 15%, transparent)}}.hover\\:bg-accent\\/20:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/20:hover{background-color:color-mix(in oklab, var(--color-accent) 20%, transparent)}}.hover\\:bg-accent\\/90:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/90:hover{background-color:color-mix(in oklab, var(--color-accent) 90%, transparent)}}.hover\\:bg-blue-400:hover{background-color:var(--color-blue-400)}.hover\\:bg-danger-bg:hover,.hover\\:bg-danger-bg\\/60:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/60:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 60%, transparent)}}.hover\\:bg-danger-bg\\/70:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/70:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 70%, transparent)}}.hover\\:bg-danger-bg\\/80:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/80:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 80%, transparent)}}.hover\\:bg-emerald-500\\/25:hover{background-color:#00bb7f40}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-emerald-500\\/25:hover{background-color:color-mix(in oklab, var(--color-emerald-500) 25%, transparent)}}.hover\\:bg-gray-400:hover{background-color:var(--color-gray-400)}.hover\\:bg-green-400:hover{background-color:var(--color-green-400)}.hover\\:bg-hover:hover,.hover\\:bg-hover\\/50:hover{background-color:var(--color-hover)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-hover\\/50:hover{background-color:color-mix(in oklab, var(--color-hover) 50%, transparent)}}.hover\\:bg-orange-400:hover{background-color:var(--color-orange-400)}.hover\\:bg-purple-400:hover{background-color:var(--color-purple-400)}.hover\\:bg-red-400:hover{background-color:var(--color-red-400)}.hover\\:bg-red-500\\/25:hover{background-color:#fb2c3640}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-red-500\\/25:hover{background-color:color-mix(in oklab, var(--color-red-500) 25%, transparent)}}.hover\\:bg-subtle:hover{background-color:var(--color-subtle)}.hover\\:bg-violet-500\\/25:hover{background-color:#8d54ff40}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-violet-500\\/25:hover{background-color:color-mix(in oklab, var(--color-violet-500) 25%, transparent)}}.hover\\:bg-warning-bg:hover,.hover\\:bg-warning-bg\\/80:hover{background-color:var(--color-warning-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-warning-bg\\/80:hover{background-color:color-mix(in oklab, var(--color-warning-bg) 80%, transparent)}}.hover\\:text-accent:hover{color:var(--color-accent)}.hover\\:text-danger:hover{color:var(--color-danger)}.hover\\:text-fg:hover{color:var(--color-fg)}.hover\\:text-fg-muted:hover{color:var(--color-fg-muted)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.focus\\:border-accent:focus{border-color:var(--color-accent)}.focus\\:border-line:focus{border-color:var(--color-line)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-accent:focus{--tw-ring-color:var(--color-accent)}.focus\\:ring-danger:focus{--tw-ring-color:var(--color-danger)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:bg-hover:focus-visible{background-color:var(--color-hover)}.focus-visible\\:opacity-100:focus-visible{opacity:1}.focus-visible\\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-accent:focus-visible{--tw-ring-color:var(--color-accent)}.focus-visible\\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-accent:focus-visible{outline-color:var(--color-accent)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}@media (hover:hover){.disabled\\:hover\\:bg-transparent:disabled:hover{background-color:#0000}}@media (min-width:40rem){.sm\\:inline{display:inline}.sm\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (min-width:48rem){.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@container (width>=28rem){.\\@md\\:block{display:block}.\\@md\\:flex{display:flex}.\\@md\\:hidden{display:none}.\\@md\\:w-72{width:calc(var(--spacing) * 72)}.\\@md\\:shrink-0{flex-shrink:0}.\\@md\\:border-r{border-right-style:var(--tw-border-style);border-right-width:1px}}}*{box-sizing:border-box}:host,:root{--at-surface:#fcfdfe;--at-surface-hover:#f5f6f9;--at-muted:#f2f5f8;--at-code:#f3f6fa;--at-text-primary:#1a1f29;--at-text-secondary:#515864;--at-text-muted:#868d97;--at-border:#dfe1e5;--at-border-light:#eef0f3;--at-shadow:#171f2e1a;--at-accent:#3177dc;--at-error-bg:#ffecea;--at-error-text:#cc2827;--at-error-border:#f8a49d;--at-ok-bg:#e0fae4;--at-ok-text:#0e8c41;--at-ok-border:#89da9b;--at-warn-bg:#fff0d1;--at-warn-text:#a16500;--at-warn-border:#e5c379;--at-highlight-bg:#fff6d1;--at-selected-bg:#e9f3ff;--at-scrollbar-thumb:#ced1d6;--at-scrollbar-thumb-hover:#999fa8}@supports (color:color(display-p3 0 0 0)){:host,:root{--at-surface:color(display-p3 .989609 .992382 .997175);--at-surface-hover:color(display-p3 .960878 .966392 .975929);--at-muted:color(display-p3 .951795 .958673 .970576);--at-code:color(display-p3 .955784 .964045 .978342);--at-text-primary:color(display-p3 .106201 .12247 .157281);--at-text-secondary:color(display-p3 .323937 .346032 .388256);--at-text-muted:color(display-p3 .528711 .550898 .589512);--at-border:color(display-p3 .875378 .883503 .897566);--at-border-light:color(display-p3 .934839 .941694 .953557);--at-shadow:color(display-p3 .0979137 .121845 .174352/.1);--at-accent:color(display-p3 .266557 .461859 .837181);--at-error-bg:color(display-p3 1.00853 .923821 .911661);--at-error-text:color(display-p3 .7372 .221951 .191652);--at-error-border:color(display-p3 .924106 .659231 .626897);--at-ok-bg:color(display-p3 .896905 .977035 .900254);--at-ok-text:color(display-p3 .247857 .539374 .286752);--at-ok-border:color(display-p3 .609805 .847347 .627399);--at-warn-bg:color(display-p3 .997819 .943515 .816698);--at-warn-text:color(display-p3 .607081 .403503 .0845266);--at-warn-border:color(display-p3 .876737 .768181 .515098);--at-highlight-bg:color(display-p3 .994932 .96424 .830533);--at-selected-bg:color(display-p3 .910207 .951093 1.02232);--at-scrollbar-thumb:color(display-p3 .80912 .819793 .838278);--at-scrollbar-thumb-hover:color(display-p3 .60332 .622263 .655172)}}@supports (color:lab(0% 0 0)){:host,:root{--at-surface:lab(99.2988% -.132054 -.745118);--at-surface-hover:lab(96.9735% -.261605 -1.48877);--at-muted:lab(96.2747% -.325292 -1.86008);--at-code:lab(96.736% -.388592 -2.23104);--at-text-primary:lab(11.741% -.349499 -7.30943);--at-text-secondary:lab(37.2801% -.862852 -7.73156);--at-text-muted:lab(58.1854% -1.04666 -6.62941);--at-border:lab(89.5439% -.387847 -2.23061);--at-border-light:lab(94.7667% -.325233 -1.86);--at-shadow:lab(11.6682% -.113927 -10.842/.1);--at-accent:lab(49.8997% 5.63273 -59.1615);--at-error-bg:lab(95.0829% 9.19622 4.96011);--at-error-text:lab(45.8049% 62.9533 44.1);--at-error-border:lab(75.8489% 31.0226 17.1029);--at-ok-bg:lab(95.8936% -11.84 7.56052);--at-ok-text:lab(50.824% -45.5785 30.3918);--at-ok-border:lab(80.6679% -35.8792 23.2774);--at-warn-bg:lab(95.5261% 2.02972 19.535);--at-warn-text:lab(48.6413% 21.7782 63.415);--at-warn-border:lab(80.5062% 5.88706 41.41);--at-highlight-bg:lab(96.7959% -.972748 19.4827);--at-selected-bg:lab(95.2674% -1.71572 -11.035);--at-scrollbar-thumb:lab(83.7382% -.510752 -2.97043);--at-scrollbar-thumb-hover:lab(65.1562% -.902712 -5.53997)}}:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:#151b25;--at-surface-hover:#1d2431;--at-muted:#191f2b;--at-code:#1b222d;--at-text-primary:#dfe5ed;--at-text-secondary:#9ca5b3;--at-text-muted:#727b88;--at-border:#2e3643;--at-border-light:#232934;--at-shadow:#00000073;--at-accent:#63a6ff;--at-error-bg:#742e2940;--at-error-text:#ff7f73;--at-error-border:#cf413a;--at-ok-bg:#39794933;--at-ok-text:#6ed889;--at-ok-border:#2e9e52;--at-warn-bg:#7e5d1d38;--at-warn-text:#f1bf5b;--at-warn-border:#b07b00;--at-highlight-bg:#b8a4571f;--at-selected-bg:#6087c22e;--at-scrollbar-thumb:#3d434d;--at-scrollbar-thumb-hover:#565e6c}@supports (color:color(display-p3 0 0 0)){:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:color(display-p3 .0866362 .104012 .141551);--at-surface-hover:color(display-p3 .119527 .140938 .187194);--at-muted:color(display-p3 .10291 .122282 .164135);--at-code:color(display-p3 .112011 .131618 .173879);--at-text-primary:color(display-p3 .880198 .897517 .925177);--at-text-secondary:color(display-p3 .618009 .647763 .695453);--at-text-muted:color(display-p3 .454817 .481202 .527256);--at-border:color(display-p3 .187231 .209329 .256415);--at-border-light:color(display-p3 .14159 .16023 .200008);--at-shadow:color(display-p3 0 0 0/.45);--at-accent:color(display-p3 .445537 .644287 .978823);--at-error-bg:color(display-p3 .422373 .197971 .171651/.25);--at-error-text:color(display-p3 .938127 .52257 .468553);--at-error-border:color(display-p3 .751519 .297873 .256966);--at-ok-bg:color(display-p3 .287508 .467968 .304198/.2);--at-ok-text:color(display-p3 .538207 .838899 .565385);--at-ok-border:color(display-p3 .319936 .612208 .354223);--at-warn-bg:color(display-p3 .474062 .369044 .161788/.22);--at-warn-text:color(display-p3 .915105 .755059 .421563);--at-warn-border:color(display-p3 .660566 .489104 .15495);--at-highlight-bg:color(display-p3 .708898 .646062 .385093/.12);--at-selected-bg:color(display-p3 .407909 .526271 .742584/.18);--at-scrollbar-thumb:color(display-p3 .241934 .260441 .299404);--at-scrollbar-thumb-hover:color(display-p3 .342885 .367416 .419047)}}@supports (color:lab(0% 0 0)){:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:lab(9.40435% -.26536 -8.00193);--at-surface-hover:lab(14.0233% -.313595 -9.45683);--at-muted:lab(11.7138% -.289485 -8.72938);--at-code:lab(12.8756% -.320837 -8.73908);--at-text-primary:lab(90.6923% -.891328 -4.41389);--at-text-secondary:lab(67.4629% -1.51783 -8.03232);--at-text-muted:lab(51.2096% -1.21292 -8.07107);--at-border:lab(22.1597% -.497714 -9.15806);--at-border-light:lab(16.373% -.418156 -8.05204);--at-shadow:lab(0% 0 0/.45);--at-accent:lab(66.6499% -1.4444 -52.3046);--at-error-bg:lab(29.4384% 31.1218 19.7271/.25);--at-error-text:lab(68.3188% 49.5998 30.86);--at-error-border:lab(49.5145% 56.3761 37.3383);--at-ok-bg:lab(45.5916% -30.0637 19.6786/.2);--at-ok-text:lab(78.7102% -45.0683 29.4705);--at-ok-border:lab(57.7987% -45.4011 30.0617);--at-warn-bg:lab(42.0282% 9.23485 40.2236/.22);--at-warn-text:lab(80.4197% 11.1201 56.0991);--at-warn-border:lab(55.853% 15.6735 62.0226);--at-highlight-bg:lab(67.9375% .259876 42.1122/.12);--at-selected-bg:lab(55.3782% -1.45972 -35.4324/.18);--at-scrollbar-thumb:lab(27.992% -.544697 -7.38333);--at-scrollbar-thumb-hover:lab(39.5702% -.685155 -9.23098)}}@media (prefers-color-scheme:dark){:host([data-theme=system]),:root[data-theme=system]{--at-surface:#151b25;--at-surface-hover:#1d2431;--at-muted:#191f2b;--at-code:#1b222d;--at-text-primary:#dfe5ed;--at-text-secondary:#9ca5b3;--at-text-muted:#727b88;--at-border:#2e3643;--at-border-light:#232934;--at-shadow:#00000073;--at-accent:#63a6ff;--at-error-bg:#742e2940;--at-error-text:#ff7f73;--at-error-border:#cf413a;--at-ok-bg:#39794933;--at-ok-text:#6ed889;--at-ok-border:#2e9e52;--at-highlight-bg:#b8a4571f;--at-selected-bg:#6087c22e;--at-scrollbar-thumb:#3d434d;--at-scrollbar-thumb-hover:#565e6c}@supports (color:color(display-p3 0 0 0)){:host([data-theme=system]),:root[data-theme=system]{--at-surface:color(display-p3 .0866362 .104012 .141551);--at-surface-hover:color(display-p3 .119527 .140938 .187194);--at-muted:color(display-p3 .10291 .122282 .164135);--at-code:color(display-p3 .112011 .131618 .173879);--at-text-primary:color(display-p3 .880198 .897517 .925177);--at-text-secondary:color(display-p3 .618009 .647763 .695453);--at-text-muted:color(display-p3 .454817 .481202 .527256);--at-border:color(display-p3 .187231 .209329 .256415);--at-border-light:color(display-p3 .14159 .16023 .200008);--at-shadow:color(display-p3 0 0 0/.45);--at-accent:color(display-p3 .445537 .644287 .978823);--at-error-bg:color(display-p3 .422373 .197971 .171651/.25);--at-error-text:color(display-p3 .938127 .52257 .468553);--at-error-border:color(display-p3 .751519 .297873 .256966);--at-ok-bg:color(display-p3 .287508 .467968 .304198/.2);--at-ok-text:color(display-p3 .538207 .838899 .565385);--at-ok-border:color(display-p3 .319936 .612208 .354223);--at-highlight-bg:color(display-p3 .708898 .646062 .385093/.12);--at-selected-bg:color(display-p3 .407909 .526271 .742584/.18);--at-scrollbar-thumb:color(display-p3 .241934 .260441 .299404);--at-scrollbar-thumb-hover:color(display-p3 .342885 .367416 .419047)}}@supports (color:lab(0% 0 0)){:host([data-theme=system]),:root[data-theme=system]{--at-surface:lab(9.40435% -.26536 -8.00193);--at-surface-hover:lab(14.0233% -.313595 -9.45683);--at-muted:lab(11.7138% -.289485 -8.72938);--at-code:lab(12.8756% -.320837 -8.73908);--at-text-primary:lab(90.6923% -.891328 -4.41389);--at-text-secondary:lab(67.4629% -1.51783 -8.03232);--at-text-muted:lab(51.2096% -1.21292 -8.07107);--at-border:lab(22.1597% -.497714 -9.15806);--at-border-light:lab(16.373% -.418156 -8.05204);--at-shadow:lab(0% 0 0/.45);--at-accent:lab(66.6499% -1.4444 -52.3046);--at-error-bg:lab(29.4384% 31.1218 19.7271/.25);--at-error-text:lab(68.3188% 49.5998 30.86);--at-error-border:lab(49.5145% 56.3761 37.3383);--at-ok-bg:lab(45.5916% -30.0637 19.6786/.2);--at-ok-text:lab(78.7102% -45.0683 29.4705);--at-ok-border:lab(57.7987% -45.4011 30.0617);--at-highlight-bg:lab(67.9375% .259876 42.1122/.12);--at-selected-bg:lab(55.3782% -1.45972 -35.4324/.18);--at-scrollbar-thumb:lab(27.992% -.544697 -7.38333);--at-scrollbar-thumb-hover:lab(39.5702% -.685155 -9.23098)}}}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--at-scrollbar-thumb,#d4d4d8);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--at-scrollbar-thumb-hover,#a1a1aa)}.waterfall-row:hover .waterfall-bar{filter:brightness(1.1)}.waterfall-bar{transition:all .15s ease-out}.trace-list-container{container-type:inline-size}.trace-grid{grid-template-columns:20px 104px minmax(0,1fr) 84px 52px 88px 60px 16px;align-items:center;gap:.75rem;display:grid}@container (width<=640px){.trace-grid{grid-template-columns:20px 92px minmax(0,1fr) 80px 58px 16px}.trace-col-spans,.trace-col-time{display:none}}@keyframes at-modal-in{0%{opacity:0;transform:translateY(6px)scale(.985)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes at-fade-in{0%{opacity:0}to{opacity:1}}.at-modal-in{animation:.17s cubic-bezier(.22,1,.36,1) at-modal-in}.at-backdrop-in{animation:.17s ease-out at-fade-in}.at-wrap-anywhere{overflow-wrap:anywhere;word-break:normal}.at-no-scrollbar{scrollbar-width:none}.at-no-scrollbar::-webkit-scrollbar{display:none}@media (prefers-reduced-motion:reduce){.at-modal-in,.at-backdrop-in{animation:none}}.at-edge-label{paint-order:stroke;stroke:var(--color-surface);stroke-width:3px;stroke-linejoin:round}:where(a,button,[role=button],input,select,textarea,summary,[tabindex]:not([tabindex="-1"])):focus-visible{outline:2px solid var(--at-accent);outline-offset:2px}:where([data-focus-inset]):focus-visible{outline-offset:-2px}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}`,TH=class extends HTMLElement{constructor(...e){super(...e),x(this,`cleanup`,null)}connectedCallback(){let e=this.attachShadow({mode:`open`}),t=document.createElement(`link`);t.rel=`stylesheet`,t.href=`https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap`,e.appendChild(t);let n=document.createElement(`style`);n.textContent=wH,e.appendChild(n);let r=this.getAttribute(`mode`)||`widget`,i=this.getAttribute(`ws-url`)||this.deriveWsUrl();this.cleanup=CH(e,{mode:r,wsUrl:i})}disconnectedCallback(){this.cleanup?.(),this.cleanup=null}deriveWsUrl(){return`ws://${location.host}/ws`}};x(TH,`observedAttributes`,[`mode`,`ws-url`]);function EH(){customElements.get(`autotel-devtools`)||customElements.define(`autotel-devtools`,TH)}var DH=document.currentScript;function OH(){let e=$u(location.hash);return Object.keys(e).length>0?e:void 0}function kH(){let e=OH();if(!DH?.src)return{mode:`widget`,wsUrl:`ws://${location.host}/ws`,deepLink:e};let t=new URL(DH.src),n=t.searchParams;return{mode:n.get(`mode`)||`widget`,wsUrl:n.get(`ws`)||`ws://${t.host}/ws`,deepLink:e}}function AH(){if(EH(),document.querySelector(`autotel-devtools`))return;let{mode:e,wsUrl:t,deepLink:n}=kH(),r=document.createElement(`div`);r.id=`autotel-devtools-root`,document.body.appendChild(r);let i=r.attachShadow({mode:`open`}),a=document.createElement(`style`);a.textContent=wH,i.appendChild(a),CH(i,{mode:e,wsUrl:t,deepLink:n})}return document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,AH):AH(),e.mountWidget=CH,e.registerElement=EH,e})({});
|