From ef8dd4dd7c2cdd3132699f4353a504f7ba544f8b Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Sat, 28 Feb 2026 03:27:12 +0000 Subject: [PATCH] Sync build v0.9.293 Automated sync from private repository. Commit: 92d02a9543db043717ab7130d570361b281993ba --- frontend/dist/VERSION | 2 +- ...JrB.js => AnalyzerFilterPanel-DW8wllyq.js} | 2 +- ...BrwtCO17.js => AnimatedNumber-CKwUUwqJ.js} | 2 +- ...r-B74HwKhL.js => BasemapLayer-CZ0EXyx3.js} | 4 +- ...ble-DRf3s2tk.js => ChatBubble-B-vyhm2S.js} | 2 +- ....js => CollisionExplorerModal-CKdqxCu4.js} | 2 +- ...-u6Y-7LJR.js => Configuration-BDDHE_lZ.js} | 2 +- ...l-DeWu6kFs.js => ConfirmModal-DkHVYuoH.js} | 2 +- ...tacts-JLJkW45E.js => Contacts-ghJ-BFN_.js} | 6 +- ...WML.js => ContactsMapMapLibre-CuhX2ofh.js} | 2 +- ...oard-Dq25iQxJ.js => Dashboard-BIy4A1QU.js} | 2 +- ...ataBox-ChuBU2q7.js => DataBox-D8nJsUbV.js} | 2 +- ...aW1Hc.js => DeepAnalysisModal-DlQPOGxT.js} | 2 +- .../{Grid-Di163a6N.js => Grid-BUbHrfD3.js} | 2 +- ...n-Bb60ts2O.js => KeycapButton-fLM_SIw1.js} | 2 +- ...YdYUoL-i.js => LightSparkline-CV6le7Ch.js} | 2 +- .../{Login-BuGn30l0.js => Login-ByHhaNVx.js} | 2 +- .../{Logs--UqLuq-v.js => Logs-8gpluICZ.js} | 2 +- ...raph-C1UuX-FI.js => MeshGraph-BkSbmPk2.js} | 6 +- ...TIo.js => NodeInformationCard-xEgWVu4P.js} | 2 +- ...ist-CYo0ntr7.js => PacketList-BhefpQer.js} | 6 +- ...n0Xjt.js => PacketObservatory-BMTHp2HY.js} | 4 +- ...ackets-BuMWYQBd.js => Packets-CiNJvSgJ.js} | 2 +- ...out-9SoN_daN.js => PageLayout-tvsYvfyL.js} | 2 +- ...GbZd6iX.js => PathMapMapLibre-CKiQC9cf.js} | 2 +- ...ver-D62pvIDX.js => RoomServer-CdvnTbeG.js} | 2 +- ...sions-DmHtWaLx.js => Sessions-CKFp1ckr.js} | 2 +- ...Gst_xwg.js => SignalIndicator-CZkLIt0w.js} | 2 +- ...ics-CUr6NoLE.js => Statistics-NNOrMaKt.js} | 2 +- ...{System-CgXq4wrd.js => System-BKSLU2Lj.js} | 2 +- ...minal-B6s9P9o2.js => Terminal-DuyUTw-y.js} | 4 +- ...j5VisG.js => TimeRangeStepper--TSSRhtK.js} | 2 +- ...ivity-DBVB1w-E.js => activity-BgtT9aiG.js} | 2 +- ...ntenna-CYx4bVye.js => antenna-DGAYnG36.js} | 2 +- ...ow-up-Dw_1quvK.js => arrow-up-BCJu40uf.js} | 2 +- ...ils-C0FWA6kK.js => chat-utils-zf_UbwVO.js} | 2 +- ...-tyotcuUX.js => chevron-right-DwaXNeO4.js} | 2 +- ...k-BA0O7QIB.js => circle-check-CMy_4dWl.js} | 2 +- ...CZ.js => circle-question-mark-BpV3PDV1.js} | 2 +- ...zRPA2.js => consumer-registry-BaTbQUiU.js} | 2 +- ...abase-idkjcnGz.js => database-1_qMqgVS.js} | 2 +- ...nload-DQJBs0xV.js => download-Dpt6RSjP.js} | 2 +- ...{easing-jK46ZwcK.js => easing-DxQTD0NL.js} | 2 +- ...WmC4Se.js => element-movement-Bhgekpql.js} | 2 +- ...{funnel-D8VczAEU.js => funnel-D7UU9v8s.js} | 2 +- .../{hash-Cd1zCpVV.js => hash-DswdBqT-.js} | 2 +- .../{index-CLIbpHvY.js => index-2YU-f7O7.js} | 112 +++++++++--------- frontend/dist/assets/index-CgjVNfe7.css | 1 + frontend/dist/assets/index-DUfCykEc.css | 1 - .../{index-EpCuPFqY.js => index-rOrsjUFs.js} | 2 +- ...ound-iBXtesax.js => key-round-CO4nliLv.js} | 2 +- ...{layers-DTsYQqst.js => layers-7MoN93tY.js} | 2 +- ...g-CJzUavtn.js => link-scoring-CPozN6Pj.js} | 2 +- ...istbox-fatOHbDc.js => listbox-CrjQSTKJ.js} | 2 +- ...ap-pin-oP9EChoI.js => map-pin-DwpgbaSS.js} | 2 +- ...gl-D7zwf56T.js => maplibre-gl-CvxGzYNa.js} | 2 +- ...E3uQ.js => monitor-smartphone-BbnIneu-.js} | 2 +- ...etwork-fMhgmV5F.js => network-BfJPFeB2.js} | 2 +- ...pes-CFhZT1Jq.js => node-types--B4HRIdZ.js} | 2 +- ...Vy7I3_.js => payload-decoders-BzIXzxqW.js} | 2 +- .../{ping-DgP-6H7e.js => ping-6o6GOZ8c.js} | 2 +- .../{plus-C2Nq-iqX.js => plus-Ci6eVmWj.js} | 2 +- ...ves-CZFN5gGO.js => primitives-DMQ-qQ8e.js} | 2 +- ...-cw-D45udn5T.js => refresh-cw-CWeSjq0l.js} | 2 +- ...{search-D-1ih5Lf.js => search-5bBDdD-8.js} | 2 +- ...s-2-CFr1Guec.js => settings-2-BkKCvhPk.js} | 2 +- ...{shield-hk2V-Q9a.js => shield-Cg8ViVBZ.js} | 2 +- ...{system-DM3mfcRt.js => system-z5qSDSFJ.js} | 2 +- ...{target-5eLsI-iM.js => target-IYsU06YN.js} | 2 +- ...BPXHBOYA.js => triangle-alert-il1la-RI.js} | 2 +- ...oIRBkXg.js => useMapViewStore-Ce8IV--K.js} | 2 +- ..._PlMjP.js => usePipelineStore-D-0Ba45c.js} | 4 +- ...u.js => webgl-device-QoBMYpnS-xzJlpHEl.js} | 2 +- .../{wifi-B8_91QkI.js => wifi-DFxu_Y_e.js} | 2 +- frontend/dist/index.html | 4 +- frontend/package.json | 2 +- 76 files changed, 141 insertions(+), 141 deletions(-) rename frontend/dist/assets/{AnalyzerFilterPanel-D5iqpJrB.js => AnalyzerFilterPanel-DW8wllyq.js} (98%) rename frontend/dist/assets/{AnimatedNumber-BrwtCO17.js => AnimatedNumber-CKwUUwqJ.js} (89%) rename frontend/dist/assets/{BasemapLayer-B74HwKhL.js => BasemapLayer-CZ0EXyx3.js} (99%) rename frontend/dist/assets/{ChatBubble-DRf3s2tk.js => ChatBubble-B-vyhm2S.js} (93%) rename frontend/dist/assets/{CollisionExplorerModal-CrEVRFBy.js => CollisionExplorerModal-CKdqxCu4.js} (97%) rename frontend/dist/assets/{Configuration-u6Y-7LJR.js => Configuration-BDDHE_lZ.js} (98%) rename frontend/dist/assets/{ConfirmModal-DeWu6kFs.js => ConfirmModal-DkHVYuoH.js} (92%) rename frontend/dist/assets/{Contacts-JLJkW45E.js => Contacts-ghJ-BFN_.js} (93%) rename frontend/dist/assets/{ContactsMapMapLibre-DueKTWML.js => ContactsMapMapLibre-CuhX2ofh.js} (99%) rename frontend/dist/assets/{Dashboard-Dq25iQxJ.js => Dashboard-BIy4A1QU.js} (97%) rename frontend/dist/assets/{DataBox-ChuBU2q7.js => DataBox-D8nJsUbV.js} (97%) rename frontend/dist/assets/{DeepAnalysisModal-lreaW1Hc.js => DeepAnalysisModal-DlQPOGxT.js} (99%) rename frontend/dist/assets/{Grid-Di163a6N.js => Grid-BUbHrfD3.js} (95%) rename frontend/dist/assets/{KeycapButton-Bb60ts2O.js => KeycapButton-fLM_SIw1.js} (98%) rename frontend/dist/assets/{LightSparkline-YdYUoL-i.js => LightSparkline-CV6le7Ch.js} (96%) rename frontend/dist/assets/{Login-BuGn30l0.js => Login-ByHhaNVx.js} (99%) rename frontend/dist/assets/{Logs--UqLuq-v.js => Logs-8gpluICZ.js} (96%) rename frontend/dist/assets/{MeshGraph-C1UuX-FI.js => MeshGraph-BkSbmPk2.js} (99%) rename frontend/dist/assets/{NodeInformationCard-BEL_UTIo.js => NodeInformationCard-xEgWVu4P.js} (90%) rename frontend/dist/assets/{PacketList-CYo0ntr7.js => PacketList-BhefpQer.js} (99%) rename frontend/dist/assets/{PacketObservatory-CQnn0Xjt.js => PacketObservatory-BMTHp2HY.js} (99%) rename frontend/dist/assets/{Packets-BuMWYQBd.js => Packets-CiNJvSgJ.js} (96%) rename frontend/dist/assets/{PageLayout-9SoN_daN.js => PageLayout-tvsYvfyL.js} (93%) rename frontend/dist/assets/{PathMapMapLibre-DGbZd6iX.js => PathMapMapLibre-CKiQC9cf.js} (98%) rename frontend/dist/assets/{RoomServer-D62pvIDX.js => RoomServer-CdvnTbeG.js} (97%) rename frontend/dist/assets/{Sessions-DmHtWaLx.js => Sessions-CKFp1ckr.js} (96%) rename frontend/dist/assets/{SignalIndicator-BGst_xwg.js => SignalIndicator-CZkLIt0w.js} (99%) rename frontend/dist/assets/{Statistics-CUr6NoLE.js => Statistics-NNOrMaKt.js} (98%) rename frontend/dist/assets/{System-CgXq4wrd.js => System-BKSLU2Lj.js} (98%) rename frontend/dist/assets/{Terminal-B6s9P9o2.js => Terminal-DuyUTw-y.js} (99%) rename frontend/dist/assets/{TimeRangeStepper-r-j5VisG.js => TimeRangeStepper--TSSRhtK.js} (98%) rename frontend/dist/assets/{activity-DBVB1w-E.js => activity-BgtT9aiG.js} (89%) rename frontend/dist/assets/{antenna-CYx4bVye.js => antenna-DGAYnG36.js} (90%) rename frontend/dist/assets/{arrow-up-Dw_1quvK.js => arrow-up-BCJu40uf.js} (92%) rename frontend/dist/assets/{chat-utils-C0FWA6kK.js => chat-utils-zf_UbwVO.js} (94%) rename frontend/dist/assets/{chevron-right-tyotcuUX.js => chevron-right-DwaXNeO4.js} (85%) rename frontend/dist/assets/{circle-check-BA0O7QIB.js => circle-check-CMy_4dWl.js} (87%) rename frontend/dist/assets/{circle-question-mark-CW0NICCZ.js => circle-question-mark-BpV3PDV1.js} (89%) rename frontend/dist/assets/{consumer-registry-BrRzRPA2.js => consumer-registry-BaTbQUiU.js} (92%) rename frontend/dist/assets/{database-idkjcnGz.js => database-1_qMqgVS.js} (89%) rename frontend/dist/assets/{download-DQJBs0xV.js => download-Dpt6RSjP.js} (89%) rename frontend/dist/assets/{easing-jK46ZwcK.js => easing-DxQTD0NL.js} (90%) rename frontend/dist/assets/{element-movement-CTWmC4Se.js => element-movement-Bhgekpql.js} (98%) rename frontend/dist/assets/{funnel-D8VczAEU.js => funnel-D7UU9v8s.js} (89%) rename frontend/dist/assets/{hash-Cd1zCpVV.js => hash-DswdBqT-.js} (90%) rename frontend/dist/assets/{index-CLIbpHvY.js => index-2YU-f7O7.js} (67%) create mode 100644 frontend/dist/assets/index-CgjVNfe7.css delete mode 100644 frontend/dist/assets/index-DUfCykEc.css rename frontend/dist/assets/{index-EpCuPFqY.js => index-rOrsjUFs.js} (99%) rename frontend/dist/assets/{key-round-iBXtesax.js => key-round-CO4nliLv.js} (91%) rename frontend/dist/assets/{layers-DTsYQqst.js => layers-7MoN93tY.js} (92%) rename frontend/dist/assets/{link-scoring-CJzUavtn.js => link-scoring-CPozN6Pj.js} (94%) rename frontend/dist/assets/{listbox-fatOHbDc.js => listbox-CrjQSTKJ.js} (99%) rename frontend/dist/assets/{map-pin-oP9EChoI.js => map-pin-DwpgbaSS.js} (99%) rename frontend/dist/assets/{maplibre-gl-D7zwf56T.js => maplibre-gl-CvxGzYNa.js} (99%) rename frontend/dist/assets/{monitor-smartphone-B5v3E3uQ.js => monitor-smartphone-BbnIneu-.js} (91%) rename frontend/dist/assets/{network-fMhgmV5F.js => network-BfJPFeB2.js} (92%) rename frontend/dist/assets/{node-types-CFhZT1Jq.js => node-types--B4HRIdZ.js} (95%) rename frontend/dist/assets/{payload-decoders-BsVy7I3_.js => payload-decoders-BzIXzxqW.js} (98%) rename frontend/dist/assets/{ping-DgP-6H7e.js => ping-6o6GOZ8c.js} (94%) rename frontend/dist/assets/{plus-C2Nq-iqX.js => plus-Ci6eVmWj.js} (86%) rename frontend/dist/assets/{primitives-CZFN5gGO.js => primitives-DMQ-qQ8e.js} (98%) rename frontend/dist/assets/{refresh-cw-D45udn5T.js => refresh-cw-CWeSjq0l.js} (91%) rename frontend/dist/assets/{search-D-1ih5Lf.js => search-5bBDdD-8.js} (87%) rename frontend/dist/assets/{settings-2-CFr1Guec.js => settings-2-BkKCvhPk.js} (89%) rename frontend/dist/assets/{shield-hk2V-Q9a.js => shield-Cg8ViVBZ.js} (90%) rename frontend/dist/assets/{system-DM3mfcRt.js => system-z5qSDSFJ.js} (91%) rename frontend/dist/assets/{target-5eLsI-iM.js => target-IYsU06YN.js} (94%) rename frontend/dist/assets/{triangle-alert-BPXHBOYA.js => triangle-alert-il1la-RI.js} (89%) rename frontend/dist/assets/{useMapViewStore-CoIRBkXg.js => useMapViewStore-Ce8IV--K.js} (97%) rename frontend/dist/assets/{usePipelineStore-7L_PlMjP.js => usePipelineStore-D-0Ba45c.js} (97%) rename frontend/dist/assets/{webgl-device-QoBMYpnS-dbCUwguu.js => webgl-device-QoBMYpnS-xzJlpHEl.js} (99%) rename frontend/dist/assets/{wifi-B8_91QkI.js => wifi-DFxu_Y_e.js} (90%) diff --git a/frontend/dist/VERSION b/frontend/dist/VERSION index 7555e0c3..58e55b0f 100644 --- a/frontend/dist/VERSION +++ b/frontend/dist/VERSION @@ -1 +1 @@ -0.9.292 +0.9.293 diff --git a/frontend/dist/assets/AnalyzerFilterPanel-D5iqpJrB.js b/frontend/dist/assets/AnalyzerFilterPanel-DW8wllyq.js similarity index 98% rename from frontend/dist/assets/AnalyzerFilterPanel-D5iqpJrB.js rename to frontend/dist/assets/AnalyzerFilterPanel-DW8wllyq.js index 7185826a..0847a849 100644 --- a/frontend/dist/assets/AnalyzerFilterPanel-D5iqpJrB.js +++ b/frontend/dist/assets/AnalyzerFilterPanel-DW8wllyq.js @@ -1,4 +1,4 @@ -import{d as U,$ as J,r as u,j as n,bc as K,R as q,bO as G,B as Q}from"./index-CLIbpHvY.js";import{c as V}from"./node-types-CFhZT1Jq.js";import{F as Y}from"./funnel-D8VczAEU.js";import{M as Z}from"./monitor-smartphone-B5v3E3uQ.js";import{C as W}from"./circle-question-mark-CW0NICCZ.js";import{S as ee}from"./search-D-1ih5Lf.js";/** +import{d as U,$ as J,r as u,j as n,bc as K,R as q,bO as G,B as Q}from"./index-2YU-f7O7.js";import{c as V}from"./node-types--B4HRIdZ.js";import{F as Y}from"./funnel-D7UU9v8s.js";import{M as Z}from"./monitor-smartphone-BbnIneu-.js";import{C as W}from"./circle-question-mark-BpV3PDV1.js";import{S as ee}from"./search-5bBDdD-8.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/AnimatedNumber-BrwtCO17.js b/frontend/dist/assets/AnimatedNumber-CKwUUwqJ.js similarity index 89% rename from frontend/dist/assets/AnimatedNumber-BrwtCO17.js rename to frontend/dist/assets/AnimatedNumber-CKwUUwqJ.js index bba84eee..cb18339f 100644 --- a/frontend/dist/assets/AnimatedNumber-BrwtCO17.js +++ b/frontend/dist/assets/AnimatedNumber-CKwUUwqJ.js @@ -1,4 +1,4 @@ -import{d as p,r as e,cl as f,j as m,cm as A}from"./index-CLIbpHvY.js";import{A as h}from"./index-EpCuPFqY.js";/** +import{d as p,r as e,cl as f,j as m,cm as A}from"./index-2YU-f7O7.js";import{A as h}from"./index-rOrsjUFs.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/BasemapLayer-B74HwKhL.js b/frontend/dist/assets/BasemapLayer-CZ0EXyx3.js similarity index 99% rename from frontend/dist/assets/BasemapLayer-B74HwKhL.js rename to frontend/dist/assets/BasemapLayer-CZ0EXyx3.js index f401df68..838b9fa8 100644 --- a/frontend/dist/assets/BasemapLayer-B74HwKhL.js +++ b/frontend/dist/assets/BasemapLayer-CZ0EXyx3.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CLIbpHvY.js","assets/index-DUfCykEc.css"])))=>i.map(i=>d[i]); -import{r as i,bo as $,aD as B,bh as G}from"./index-CLIbpHvY.js";const H=i.createContext(null);function K(){var s;const e=(s=i.useContext(H))==null?void 0:s.maps,t=i.useContext(w);return i.useMemo(()=>({...e,current:t==null?void 0:t.map}),[e,t])}function Y(e,t){const n=Array.isArray(e)?e[0]:e?e.x:0,s=Array.isArray(e)?e[1]:e?e.y:0,o=Array.isArray(t)?t[0]:t?t.x:0,r=Array.isArray(t)?t[1]:t?t.y:0;return n===o&&s===r}function v(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n{let o=null;"interactive"in s&&(o=Object.assign({},s),delete o.interactive);const r=t[s.ref];if(r){o=o||Object.assign({},s),delete o.ref;for(const a of J)a in r&&(o[a]=r[a])}return o||s});return{...e,layers:n}}const A={version:8,sources:{},layers:[]},U={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},F={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},D={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},X=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],Q=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class b{constructor(t,n,s){this._map=null,this._internalUpdate=!1,this._hoveredFeatures=null,this._propsedCameraUpdate=null,this._styleComponents={},this._onEvent=o=>{const r=this.props[D[o.type]];r?r(o):o.type==="error"&&console.error(o.error)},this._onCameraEvent=o=>{if(this._internalUpdate)return;o.viewState=this._propsedCameraUpdate||P(this._map.transform);const r=this.props[F[o.type]];r&&r(o)},this._onCameraUpdate=o=>this._internalUpdate?o:(this._propsedCameraUpdate=P(o),z(o,this.props)),this._onPointerEvent=o=>{(o.type==="mousemove"||o.type==="mouseout")&&this._updateHover(o);const r=this.props[U[o.type]];r&&(this.props.interactiveLayerIds&&o.type!=="mouseover"&&o.type!=="mouseout"&&(o.features=this._hoveredFeatures||this._queryRenderedFeatures(o.point)),r(o),delete o.features)},this._MapClass=t,this.props=n,this._initialize(s)}get map(){return this._map}setProps(t){const n=this.props;this.props=t;const s=this._updateSettings(t,n),o=this._updateSize(t),r=this._updateViewState(t);this._updateStyle(t,n),this._updateStyleComponents(t),this._updateHandlers(t,n),(s||o||r&&!this._map.isMoving())&&this.redraw()}static reuse(t,n){const s=b.savedMaps.pop();if(!s)return null;const o=s.map,r=o.getContainer();for(n.className=r.className;r.childNodes.length>0;)n.appendChild(r.childNodes[0]);o._container=n;const a=o._resizeObserver;a&&(a.disconnect(),a.observe(n)),s.setProps({...t,styleDiffing:!1}),o.resize();const{initialViewState:c}=t;return c&&(c.bounds?o.fitBounds(c.bounds,{...c.fitBoundsOptions,duration:0}):s._updateViewState(c)),o.isStyleLoaded()?o.fire("load"):o.once("style.load",()=>o.fire("load")),o._update(),s}_initialize(t){const{props:n}=this,{mapStyle:s=A}=n,o={...n,...n.initialViewState,container:t,style:O(s)},r=o.initialViewState||o.viewState||o;if(Object.assign(o,{center:[r.longitude||0,r.latitude||0],zoom:r.zoom||0,pitch:r.pitch||0,bearing:r.bearing||0}),n.gl){const c=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=c,n.gl)}const a=new this._MapClass(o);r.padding&&a.setPadding(r.padding),n.cursor&&(a.getCanvas().style.cursor=n.cursor),a.transformCameraUpdate=this._onCameraUpdate,a.on("style.load",()=>{var c;this._styleComponents={light:a.getLight(),sky:a.getSky(),projection:(c=a.getProjection)==null?void 0:c.call(a),terrain:a.getTerrain()},this._updateStyleComponents(this.props)}),a.on("sourcedata",()=>{this._updateStyleComponents(this.props)});for(const c in U)a.on(c,this._onPointerEvent);for(const c in F)a.on(c,this._onCameraEvent);for(const c in D)a.on(c,this._onEvent);this._map=a}recycle(){const n=this.map.getContainer().querySelector("[mapboxgl-children]");n==null||n.remove(),b.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const t=this._map;t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}_updateSize(t){const{viewState:n}=t;if(n){const s=this._map;if(n.width!==s.transform.width||n.height!==s.transform.height)return s.resize(),!0}return!1}_updateViewState(t){const n=this._map,s=n.transform;if(!n.isMoving()){const r=z(s,t);if(Object.keys(r).length>0)return this._internalUpdate=!0,n.jumpTo(r),this._internalUpdate=!1,!0}return!1}_updateSettings(t,n){const s=this._map;let o=!1;for(const r of X)if(r in t&&!v(t[r],n[r])){o=!0;const a=s[`set${r[0].toUpperCase()}${r.slice(1)}`];a==null||a.call(s,t[r])}return o}_updateStyle(t,n){if(t.cursor!==n.cursor&&(this._map.getCanvas().style.cursor=t.cursor||""),t.mapStyle!==n.mapStyle){const{mapStyle:s=A,styleDiffing:o=!0}=t,r={diff:o};"localIdeographFontFamily"in t&&(r.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(O(s),r)}}_updateStyleComponents({light:t,projection:n,sky:s,terrain:o}){var c,u;const r=this._map,a=this._styleComponents;r.style._loaded&&(t&&!v(t,a.light)&&(a.light=t,r.setLight(t)),n&&!v(n,a.projection)&&n!==((c=a.projection)==null?void 0:c.type)&&(a.projection=typeof n=="string"?{type:n}:n,(u=r.setProjection)==null||u.call(r,a.projection)),s&&!v(s,a.sky)&&(a.sky=s,r.setSky(s)),o!==void 0&&!v(o,a.terrain)&&(!o||r.getSource(o.source))&&(a.terrain=o,r.setTerrain(o)))}_updateHandlers(t,n){const s=this._map;for(const o of Q){const r=t[o]??!0,a=n[o]??!0;v(r,a)||(r?s[o].enable(r):s[o].disable())}}_queryRenderedFeatures(t){const n=this._map,{interactiveLayerIds:s=[]}=this.props;try{return n.queryRenderedFeatures(t,{layers:s.filter(n.getLayer.bind(n))})}catch{return[]}}_updateHover(t){var o;const{props:n}=this;if(n.interactiveLayerIds&&(n.onMouseMove||n.onMouseEnter||n.onMouseLeave)){const r=t.type,a=((o=this._hoveredFeatures)==null?void 0:o.length)>0,c=this._queryRenderedFeatures(t.point),u=c.length>0;!u&&a&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=c,u&&!a&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=r}else this._hoveredFeatures=null}}b.savedMaps=[];const ee=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function te(e){if(!e)return null;const t=e.map,n={getMap:()=>t};for(const s of ne(t))!(s in n)&&!ee.includes(s)&&(n[s]=t[s].bind(t));return n}function ne(e){const t=new Set;let n=e;for(;n;){for(const s of Object.getOwnPropertyNames(n))s[0]!=="_"&&typeof e[s]=="function"&&s!=="fire"&&s!=="setEventedParent"&&t.add(s);n=Object.getPrototypeOf(n)}return Array.from(t)}const oe=typeof document<"u"?i.useLayoutEffect:i.useEffect;function re(e,t){const{RTLTextPlugin:n,maxParallelImageRequests:s,workerCount:o,workerUrl:r}=t;if(n&&e.getRTLTextPluginStatus&&e.getRTLTextPluginStatus()==="unavailable"){const{pluginUrl:a,lazy:c=!0}=typeof n=="string"?{pluginUrl:n}:n;e.setRTLTextPlugin(a,u=>{u&&console.error(u)},c)}s!==void 0&&e.setMaxParallelImageRequests(s),o!==void 0&&e.setWorkerCount(o),r!==void 0&&e.setWorkerUrl(r)}const w=i.createContext(null);function se(e,t){const n=i.useContext(H),[s,o]=i.useState(null),r=i.useRef(),{current:a}=i.useRef({mapLib:null,map:null});i.useEffect(()=>{const l=e.mapLib;let d=!0,f;return Promise.resolve(l||$(()=>import("./maplibre-gl-D7zwf56T.js").then(m=>m.m),__vite__mapDeps([0,1]))).then(m=>{if(!d)return;if(!m)throw new Error("Invalid mapLib");const y="Map"in m?m:m.default;if(!y.Map)throw new Error("Invalid mapLib");re(y,e),e.reuseMaps&&(f=b.reuse(e,r.current)),f||(f=new b(y.Map,e,r.current)),a.map=te(f),a.mapLib=y,o(f),n==null||n.onMapMount(a.map,e.id)}).catch(m=>{const{onError:y}=e;y?y({type:"error",target:null,originalEvent:null,error:m}):console.error(m)}),()=>{d=!1,f&&(n==null||n.onMapUnmount(e.id),e.reuseMaps?f.recycle():f.destroy())}},[]),oe(()=>{s&&s.setProps(e)}),i.useImperativeHandle(t,()=>a.map,[s]);const c=i.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]),u={height:"100%"};return i.createElement("div",{id:e.id,ref:r,style:c},s&&i.createElement(w.Provider,{value:a},i.createElement("div",{"mapboxgl-children":"",style:u},e.children)))}const Me=i.forwardRef(se),ae=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function L(e,t){if(!e||!t)return;const n=e.style;for(const s in t){const o=t[s];Number.isFinite(o)&&!ae.test(s)?n[s]=`${o}px`:n[s]=o}}function Z(e,t){if(e===t)return null;const n=N(e),s=N(t),o=[];for(const r of s)n.has(r)||o.push(r);for(const r of n)s.has(r)||o.push(r);return o.length===0?null:o}function N(e){return new Set(e?e.trim().split(/\s+/):[])}const be=i.memo(i.forwardRef((e,t)=>{const{map:n,mapLib:s}=i.useContext(w),o=i.useRef({props:e}),r=i.useMemo(()=>{let E=!1;i.Children.forEach(e.children,h=>{h&&(E=!0)});const k={...e,element:E?document.createElement("div"):void 0},p=new s.Marker(k);return p.setLngLat([e.longitude,e.latitude]),p.getElement().addEventListener("click",h=>{var g,_;(_=(g=o.current.props).onClick)==null||_.call(g,{type:"click",target:p,originalEvent:h})}),p.on("dragstart",h=>{var _,S;const g=h;g.lngLat=r.getLngLat(),(S=(_=o.current.props).onDragStart)==null||S.call(_,g)}),p.on("drag",h=>{var _,S;const g=h;g.lngLat=r.getLngLat(),(S=(_=o.current.props).onDrag)==null||S.call(_,g)}),p.on("dragend",h=>{var _,S;const g=h;g.lngLat=r.getLngLat(),(S=(_=o.current.props).onDragEnd)==null||S.call(_,g)}),p},[]);i.useEffect(()=>(r.addTo(n.getMap()),()=>{r.remove()}),[]);const{longitude:a,latitude:c,offset:u,style:l,draggable:d=!1,popup:f=null,rotation:m=0,rotationAlignment:y="auto",pitchAlignment:C="auto"}=e;i.useEffect(()=>{L(r.getElement(),l)},[l]),i.useImperativeHandle(t,()=>r,[]);const T=o.current.props;(r.getLngLat().lng!==a||r.getLngLat().lat!==c)&&r.setLngLat([a,c]),u&&!Y(r.getOffset(),u)&&r.setOffset(u),r.isDraggable()!==d&&r.setDraggable(d),r.getRotation()!==m&&r.setRotation(m),r.getRotationAlignment()!==y&&r.setRotationAlignment(y),r.getPitchAlignment()!==C&&r.setPitchAlignment(C),r.getPopup()!==f&&r.setPopup(f);const x=Z(T.className,e.className);if(x)for(const E of x)r.toggleClassName(E);return o.current.props=e,B.createPortal(e.children,r.getElement())})),xe=i.memo(i.forwardRef((e,t)=>{const{map:n,mapLib:s}=i.useContext(w),o=i.useMemo(()=>document.createElement("div"),[]),r=i.useRef({props:e}),a=i.useMemo(()=>{const c={...e},u=new s.Popup(c);return u.setLngLat([e.longitude,e.latitude]),u.once("open",l=>{var d,f;(f=(d=r.current.props).onOpen)==null||f.call(d,l)}),u},[]);if(i.useEffect(()=>{const c=u=>{var l,d;(d=(l=r.current.props).onClose)==null||d.call(l,u)};return a.on("close",c),a.setDOMContent(o).addTo(n.getMap()),()=>{a.off("close",c),a.isOpen()&&a.remove()}},[]),i.useEffect(()=>{L(a.getElement(),e.style)},[e.style]),i.useImperativeHandle(t,()=>a,[]),a.isOpen()){const c=r.current.props;(a.getLngLat().lng!==e.longitude||a.getLngLat().lat!==e.latitude)&&a.setLngLat([e.longitude,e.latitude]),e.offset&&!v(c.offset,e.offset)&&a.setOffset(e.offset),(c.anchor!==e.anchor||c.maxWidth!==e.maxWidth)&&(a.options.anchor=e.anchor,a.setMaxWidth(e.maxWidth));const u=Z(c.className,e.className);if(u)for(const l of u)a.toggleClassName(l);r.current.props=e}return B.createPortal(e.children,o)}));function M(e,t,n,s){const o=i.useContext(w),r=i.useMemo(()=>e(o),[]);return i.useEffect(()=>{const a=t,c=null,u=typeof t=="function"?t:null,{map:l}=o;return l.hasControl(r)||(l.addControl(r,a==null?void 0:a.position),c&&c(o)),()=>{u&&u(o),l.hasControl(r)&&l.removeControl(r)}},[]),r}function ie(e){const t=M(({mapLib:n})=>new n.AttributionControl(e),{position:e.position});return i.useEffect(()=>{L(t._container,e.style)},[e.style]),null}i.memo(ie);function ce(e){const t=M(({mapLib:n})=>new n.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return i.useEffect(()=>{L(t._controlContainer,e.style)},[e.style]),null}i.memo(ce);function le(e,t){const n=i.useRef({props:e}),s=M(({mapLib:o})=>{const r=new o.GeolocateControl(e),a=r._setupUI;return r._setupUI=()=>{r._container.hasChildNodes()||a()},r.on("geolocate",c=>{var u,l;(l=(u=n.current.props).onGeolocate)==null||l.call(u,c)}),r.on("error",c=>{var u,l;(l=(u=n.current.props).onError)==null||l.call(u,c)}),r.on("outofmaxbounds",c=>{var u,l;(l=(u=n.current.props).onOutOfMaxBounds)==null||l.call(u,c)}),r.on("trackuserlocationstart",c=>{var u,l;(l=(u=n.current.props).onTrackUserLocationStart)==null||l.call(u,c)}),r.on("trackuserlocationend",c=>{var u,l;(l=(u=n.current.props).onTrackUserLocationEnd)==null||l.call(u,c)}),r},{position:e.position});return n.current.props=e,i.useImperativeHandle(t,()=>s,[]),i.useEffect(()=>{L(s._container,e.style)},[e.style]),null}i.memo(i.forwardRef(le));function ue(e){const t=M(({mapLib:n})=>new n.NavigationControl(e),{position:e.position});return i.useEffect(()=>{L(t._container,e.style)},[e.style]),null}i.memo(ue);function fe(e){const t=M(({mapLib:r})=>new r.ScaleControl(e),{position:e.position}),n=i.useRef(e),s=n.current;n.current=e;const{style:o}=e;return e.maxWidth!==void 0&&e.maxWidth!==s.maxWidth&&(t.options.maxWidth=e.maxWidth),e.unit!==void 0&&e.unit!==s.unit&&t.setUnit(e.unit),i.useEffect(()=>{L(t._container,o)},[o]),null}const ke=i.memo(fe);function de(e){const t=M(({mapLib:n})=>new n.TerrainControl(e),{position:e.position});return i.useEffect(()=>{L(t._container,e.style)},[e.style]),null}i.memo(de);function me(e){const t=M(({mapLib:n})=>new n.LogoControl(e),{position:e.position});return i.useEffect(()=>{L(t._container,e.style)},[e.style]),null}i.memo(me);function R(e,t){if(!e)throw new Error(t)}let ye=0;function ge(e,t,n){if(e.style&&e.style._loaded){const s={...n};return delete s.id,delete s.children,e.addSource(t,s),e.getSource(t)}return null}function he(e,t,n){var a,c,u;R(t.id===n.id,"source id changed"),R(t.type===n.type,"source type changed");let s="",o=0;for(const l in t)l!=="children"&&l!=="id"&&!v(n[l],t[l])&&(s=l,o++);if(!o)return;const r=t.type;if(r==="geojson")e.setData(t.data);else if(r==="image")e.updateImage({url:t.url,coordinates:t.coordinates});else switch(s){case"coordinates":(a=e.setCoordinates)==null||a.call(e,t.coordinates);break;case"url":(c=e.setUrl)==null||c.call(e,t.url);break;case"tiles":(u=e.setTiles)==null||u.call(e,t.tiles);break;default:console.warn(`Unable to update prop: ${s}`)}}function Re(e){const t=i.useContext(w).map.getMap(),n=i.useRef(e),[,s]=i.useState(0),o=i.useMemo(()=>e.id||`jsx-source-${ye++}`,[]);i.useEffect(()=>{if(t){const a=()=>setTimeout(()=>s(c=>c+1),0);return t.on("styledata",a),a(),()=>{var c;if(t.off("styledata",a),t.style&&t.style._loaded&&t.getSource(o)){const u=(c=t.getStyle())==null?void 0:c.layers;if(u)for(const l of u)l.source===o&&t.removeLayer(l.id);t.removeSource(o)}}}},[t]);let r=t&&t.style&&t.getSource(o);return r?he(r,e,n.current):r=ge(t,o,e),n.current=e,r&&i.Children.map(e.children,a=>a&&i.cloneElement(a,{source:o}))||null}function pe(e,t,n,s){if(R(n.id===s.id,"layer id changed"),R(n.type===s.type,"layer type changed"),n.type==="custom"||s.type==="custom")return;const{layout:o={},paint:r={},filter:a,minzoom:c,maxzoom:u,beforeId:l}=n;if(l!==s.beforeId&&e.moveLayer(t,l),o!==s.layout){const d=s.layout||{};for(const f in o)v(o[f],d[f])||e.setLayoutProperty(t,f,o[f]);for(const f in d)o.hasOwnProperty(f)||e.setLayoutProperty(t,f,void 0)}if(r!==s.paint){const d=s.paint||{};for(const f in r)v(r[f],d[f])||e.setPaintProperty(t,f,r[f]);for(const f in d)r.hasOwnProperty(f)||e.setPaintProperty(t,f,void 0)}v(a,s.filter)||e.setFilter(t,a),(c!==s.minzoom||u!==s.maxzoom)&&e.setLayerZoomRange(t,c,u)}function ve(e,t,n){if(e.style&&e.style._loaded&&(!("source"in n)||e.getSource(n.source))){const s={...n,id:t};delete s.beforeId,e.addLayer(s,n.beforeId)}}let _e=0;function Ie(e){const t=i.useContext(w).map.getMap(),n=i.useRef(e),[,s]=i.useState(0),o=i.useMemo(()=>e.id||`jsx-layer-${_e++}`,[]);if(i.useEffect(()=>{if(t){const a=()=>s(c=>c+1);return t.on("styledata",a),a(),()=>{t.off("styledata",a),t.style&&t.style._loaded&&t.getLayer(o)&&t.removeLayer(o)}}},[t]),t&&t.style&&t.getLayer(o))try{pe(t,o,e,n.current)}catch(a){console.warn(a)}else ve(t,o,e);return n.current=e,null}const V="pymc-basemap-mode",j="dark";function Le(){if(typeof window>"u")return j;try{const e=localStorage.getItem(V);if(e==="light"||e==="dark")return e}catch{}return j}function W(e){if(!(typeof window>"u"))try{localStorage.setItem(V,e)}catch{}}const q=G(e=>({mode:Le(),toggle:()=>e(t=>{const n=t.mode==="light"?"dark":"light";return W(n),{mode:n}}),setMode:t=>{W(t),e({mode:t})}})),Te=()=>q(e=>e.mode),Pe=()=>q(e=>e.toggle),Ce={light:"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",dark:"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"},Se={light:"basemap-light-",dark:"basemap-dark-"},I={};async function Ee(e){if(I[e])return I[e];const n=await(await fetch(Ce[e])).json();return I[e]=n,n}function ze({mode:e}){const{current:t}=K(),[n,s]=i.useState(null),o=i.useRef({light:!1,dark:!1}),r=i.useRef({light:[],dark:[]});i.useEffect(()=>{const l=()=>{var y;const m=(y=t==null?void 0:t.getMap)==null?void 0:y.call(t);m&&!n&&s(m)};l();const d=setInterval(l,50),f=setTimeout(()=>clearInterval(d),5e3);return()=>{clearInterval(d),clearTimeout(f)}},[t,n]);const a=i.useCallback(async(l,d,f)=>{var E,k;if(o.current[d])return;const m=Se[d],y=await Ee(d),C=[];for(const[p,h]of Object.entries(y.sources||{})){const g=m+p;l.getSource(g)||l.addSource(g,h)}const x=(k=(((E=l.getStyle())==null?void 0:E.layers)||[]).find(p=>!p.id.startsWith("basemap-light-")&&!p.id.startsWith("basemap-dark-")))==null?void 0:k.id;for(const p of y.layers||[]){const h=m+p.id;if(C.push(h),l.getLayer(h))continue;const g={...p,id:h};"source"in g&&typeof g.source=="string"&&(g.source=m+g.source),g.layout||(g.layout={}),g.layout.visibility=f?"visible":"none";try{l.addLayer(g,x)}catch(_){console.warn(`[BasemapLayer] Failed to add layer ${h}:`,_)}}r.current[d]=C,o.current[d]=!0},[]),c=i.useCallback((l,d,f)=>{const m=r.current[d],y=f?"visible":"none";for(const C of m)if(l.getLayer(C))try{l.setLayoutProperty(C,"visibility",y)}catch{}},[]),u=i.useCallback(l=>{var m;const f=(((m=l.getStyle())==null?void 0:m.layers)||[]).filter(y=>!y.id.startsWith("basemap-light-")&&!y.id.startsWith("basemap-dark-"));for(const y of f)try{l.moveLayer(y.id)}catch{}},[]);return i.useEffect(()=>{if(!n)return;const l=d=>{n.hasImage(d.id)||n.addImage(d.id,{width:1,height:1,data:new Uint8Array([0,0,0,0])})};return n.on("styleimagemissing",l),()=>{n.off("styleimagemissing",l)}},[n]),i.useEffect(()=>{if(!n)return;let l=!1;const d=async()=>{if(!l)try{await Promise.all([a(n,"light",e==="light"),a(n,"dark",e==="dark")]),l||u(n)}catch(m){console.error("[BasemapLayer] Setup error:",m)}};n.isStyleLoaded()?d():(n.once("style.load",d),n.once("load",()=>{!l&&!o.current.light&&d()}));const f=()=>{l||setTimeout(()=>{!l&&o.current.light&&o.current.dark&&u(n)},100)};return n.on("styledata",f),()=>{l=!0,n.off("styledata",f)}},[n,a,u,e]),i.useEffect(()=>{n&&(!o.current.light||!o.current.dark||(c(n,"light",e==="light"),c(n,"dark",e==="dark")))},[n,e,c]),null}export{ze as B,Ie as L,Me as M,xe as P,Re as S,be as a,K as b,Pe as c,ke as d,Te as u}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-2YU-f7O7.js","assets/index-CgjVNfe7.css"])))=>i.map(i=>d[i]); +import{r as i,bo as $,aD as B,bh as G}from"./index-2YU-f7O7.js";const H=i.createContext(null);function K(){var s;const e=(s=i.useContext(H))==null?void 0:s.maps,t=i.useContext(w);return i.useMemo(()=>({...e,current:t==null?void 0:t.map}),[e,t])}function Y(e,t){const n=Array.isArray(e)?e[0]:e?e.x:0,s=Array.isArray(e)?e[1]:e?e.y:0,o=Array.isArray(t)?t[0]:t?t.x:0,r=Array.isArray(t)?t[1]:t?t.y:0;return n===o&&s===r}function v(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n{let o=null;"interactive"in s&&(o=Object.assign({},s),delete o.interactive);const r=t[s.ref];if(r){o=o||Object.assign({},s),delete o.ref;for(const a of J)a in r&&(o[a]=r[a])}return o||s});return{...e,layers:n}}const A={version:8,sources:{},layers:[]},U={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},F={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},D={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},X=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],Q=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class b{constructor(t,n,s){this._map=null,this._internalUpdate=!1,this._hoveredFeatures=null,this._propsedCameraUpdate=null,this._styleComponents={},this._onEvent=o=>{const r=this.props[D[o.type]];r?r(o):o.type==="error"&&console.error(o.error)},this._onCameraEvent=o=>{if(this._internalUpdate)return;o.viewState=this._propsedCameraUpdate||P(this._map.transform);const r=this.props[F[o.type]];r&&r(o)},this._onCameraUpdate=o=>this._internalUpdate?o:(this._propsedCameraUpdate=P(o),z(o,this.props)),this._onPointerEvent=o=>{(o.type==="mousemove"||o.type==="mouseout")&&this._updateHover(o);const r=this.props[U[o.type]];r&&(this.props.interactiveLayerIds&&o.type!=="mouseover"&&o.type!=="mouseout"&&(o.features=this._hoveredFeatures||this._queryRenderedFeatures(o.point)),r(o),delete o.features)},this._MapClass=t,this.props=n,this._initialize(s)}get map(){return this._map}setProps(t){const n=this.props;this.props=t;const s=this._updateSettings(t,n),o=this._updateSize(t),r=this._updateViewState(t);this._updateStyle(t,n),this._updateStyleComponents(t),this._updateHandlers(t,n),(s||o||r&&!this._map.isMoving())&&this.redraw()}static reuse(t,n){const s=b.savedMaps.pop();if(!s)return null;const o=s.map,r=o.getContainer();for(n.className=r.className;r.childNodes.length>0;)n.appendChild(r.childNodes[0]);o._container=n;const a=o._resizeObserver;a&&(a.disconnect(),a.observe(n)),s.setProps({...t,styleDiffing:!1}),o.resize();const{initialViewState:c}=t;return c&&(c.bounds?o.fitBounds(c.bounds,{...c.fitBoundsOptions,duration:0}):s._updateViewState(c)),o.isStyleLoaded()?o.fire("load"):o.once("style.load",()=>o.fire("load")),o._update(),s}_initialize(t){const{props:n}=this,{mapStyle:s=A}=n,o={...n,...n.initialViewState,container:t,style:O(s)},r=o.initialViewState||o.viewState||o;if(Object.assign(o,{center:[r.longitude||0,r.latitude||0],zoom:r.zoom||0,pitch:r.pitch||0,bearing:r.bearing||0}),n.gl){const c=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=c,n.gl)}const a=new this._MapClass(o);r.padding&&a.setPadding(r.padding),n.cursor&&(a.getCanvas().style.cursor=n.cursor),a.transformCameraUpdate=this._onCameraUpdate,a.on("style.load",()=>{var c;this._styleComponents={light:a.getLight(),sky:a.getSky(),projection:(c=a.getProjection)==null?void 0:c.call(a),terrain:a.getTerrain()},this._updateStyleComponents(this.props)}),a.on("sourcedata",()=>{this._updateStyleComponents(this.props)});for(const c in U)a.on(c,this._onPointerEvent);for(const c in F)a.on(c,this._onCameraEvent);for(const c in D)a.on(c,this._onEvent);this._map=a}recycle(){const n=this.map.getContainer().querySelector("[mapboxgl-children]");n==null||n.remove(),b.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const t=this._map;t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}_updateSize(t){const{viewState:n}=t;if(n){const s=this._map;if(n.width!==s.transform.width||n.height!==s.transform.height)return s.resize(),!0}return!1}_updateViewState(t){const n=this._map,s=n.transform;if(!n.isMoving()){const r=z(s,t);if(Object.keys(r).length>0)return this._internalUpdate=!0,n.jumpTo(r),this._internalUpdate=!1,!0}return!1}_updateSettings(t,n){const s=this._map;let o=!1;for(const r of X)if(r in t&&!v(t[r],n[r])){o=!0;const a=s[`set${r[0].toUpperCase()}${r.slice(1)}`];a==null||a.call(s,t[r])}return o}_updateStyle(t,n){if(t.cursor!==n.cursor&&(this._map.getCanvas().style.cursor=t.cursor||""),t.mapStyle!==n.mapStyle){const{mapStyle:s=A,styleDiffing:o=!0}=t,r={diff:o};"localIdeographFontFamily"in t&&(r.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(O(s),r)}}_updateStyleComponents({light:t,projection:n,sky:s,terrain:o}){var c,u;const r=this._map,a=this._styleComponents;r.style._loaded&&(t&&!v(t,a.light)&&(a.light=t,r.setLight(t)),n&&!v(n,a.projection)&&n!==((c=a.projection)==null?void 0:c.type)&&(a.projection=typeof n=="string"?{type:n}:n,(u=r.setProjection)==null||u.call(r,a.projection)),s&&!v(s,a.sky)&&(a.sky=s,r.setSky(s)),o!==void 0&&!v(o,a.terrain)&&(!o||r.getSource(o.source))&&(a.terrain=o,r.setTerrain(o)))}_updateHandlers(t,n){const s=this._map;for(const o of Q){const r=t[o]??!0,a=n[o]??!0;v(r,a)||(r?s[o].enable(r):s[o].disable())}}_queryRenderedFeatures(t){const n=this._map,{interactiveLayerIds:s=[]}=this.props;try{return n.queryRenderedFeatures(t,{layers:s.filter(n.getLayer.bind(n))})}catch{return[]}}_updateHover(t){var o;const{props:n}=this;if(n.interactiveLayerIds&&(n.onMouseMove||n.onMouseEnter||n.onMouseLeave)){const r=t.type,a=((o=this._hoveredFeatures)==null?void 0:o.length)>0,c=this._queryRenderedFeatures(t.point),u=c.length>0;!u&&a&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=c,u&&!a&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=r}else this._hoveredFeatures=null}}b.savedMaps=[];const ee=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function te(e){if(!e)return null;const t=e.map,n={getMap:()=>t};for(const s of ne(t))!(s in n)&&!ee.includes(s)&&(n[s]=t[s].bind(t));return n}function ne(e){const t=new Set;let n=e;for(;n;){for(const s of Object.getOwnPropertyNames(n))s[0]!=="_"&&typeof e[s]=="function"&&s!=="fire"&&s!=="setEventedParent"&&t.add(s);n=Object.getPrototypeOf(n)}return Array.from(t)}const oe=typeof document<"u"?i.useLayoutEffect:i.useEffect;function re(e,t){const{RTLTextPlugin:n,maxParallelImageRequests:s,workerCount:o,workerUrl:r}=t;if(n&&e.getRTLTextPluginStatus&&e.getRTLTextPluginStatus()==="unavailable"){const{pluginUrl:a,lazy:c=!0}=typeof n=="string"?{pluginUrl:n}:n;e.setRTLTextPlugin(a,u=>{u&&console.error(u)},c)}s!==void 0&&e.setMaxParallelImageRequests(s),o!==void 0&&e.setWorkerCount(o),r!==void 0&&e.setWorkerUrl(r)}const w=i.createContext(null);function se(e,t){const n=i.useContext(H),[s,o]=i.useState(null),r=i.useRef(),{current:a}=i.useRef({mapLib:null,map:null});i.useEffect(()=>{const l=e.mapLib;let d=!0,f;return Promise.resolve(l||$(()=>import("./maplibre-gl-CvxGzYNa.js").then(m=>m.m),__vite__mapDeps([0,1]))).then(m=>{if(!d)return;if(!m)throw new Error("Invalid mapLib");const y="Map"in m?m:m.default;if(!y.Map)throw new Error("Invalid mapLib");re(y,e),e.reuseMaps&&(f=b.reuse(e,r.current)),f||(f=new b(y.Map,e,r.current)),a.map=te(f),a.mapLib=y,o(f),n==null||n.onMapMount(a.map,e.id)}).catch(m=>{const{onError:y}=e;y?y({type:"error",target:null,originalEvent:null,error:m}):console.error(m)}),()=>{d=!1,f&&(n==null||n.onMapUnmount(e.id),e.reuseMaps?f.recycle():f.destroy())}},[]),oe(()=>{s&&s.setProps(e)}),i.useImperativeHandle(t,()=>a.map,[s]);const c=i.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]),u={height:"100%"};return i.createElement("div",{id:e.id,ref:r,style:c},s&&i.createElement(w.Provider,{value:a},i.createElement("div",{"mapboxgl-children":"",style:u},e.children)))}const Me=i.forwardRef(se),ae=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function L(e,t){if(!e||!t)return;const n=e.style;for(const s in t){const o=t[s];Number.isFinite(o)&&!ae.test(s)?n[s]=`${o}px`:n[s]=o}}function Z(e,t){if(e===t)return null;const n=N(e),s=N(t),o=[];for(const r of s)n.has(r)||o.push(r);for(const r of n)s.has(r)||o.push(r);return o.length===0?null:o}function N(e){return new Set(e?e.trim().split(/\s+/):[])}const be=i.memo(i.forwardRef((e,t)=>{const{map:n,mapLib:s}=i.useContext(w),o=i.useRef({props:e}),r=i.useMemo(()=>{let E=!1;i.Children.forEach(e.children,h=>{h&&(E=!0)});const k={...e,element:E?document.createElement("div"):void 0},p=new s.Marker(k);return p.setLngLat([e.longitude,e.latitude]),p.getElement().addEventListener("click",h=>{var g,_;(_=(g=o.current.props).onClick)==null||_.call(g,{type:"click",target:p,originalEvent:h})}),p.on("dragstart",h=>{var _,S;const g=h;g.lngLat=r.getLngLat(),(S=(_=o.current.props).onDragStart)==null||S.call(_,g)}),p.on("drag",h=>{var _,S;const g=h;g.lngLat=r.getLngLat(),(S=(_=o.current.props).onDrag)==null||S.call(_,g)}),p.on("dragend",h=>{var _,S;const g=h;g.lngLat=r.getLngLat(),(S=(_=o.current.props).onDragEnd)==null||S.call(_,g)}),p},[]);i.useEffect(()=>(r.addTo(n.getMap()),()=>{r.remove()}),[]);const{longitude:a,latitude:c,offset:u,style:l,draggable:d=!1,popup:f=null,rotation:m=0,rotationAlignment:y="auto",pitchAlignment:C="auto"}=e;i.useEffect(()=>{L(r.getElement(),l)},[l]),i.useImperativeHandle(t,()=>r,[]);const T=o.current.props;(r.getLngLat().lng!==a||r.getLngLat().lat!==c)&&r.setLngLat([a,c]),u&&!Y(r.getOffset(),u)&&r.setOffset(u),r.isDraggable()!==d&&r.setDraggable(d),r.getRotation()!==m&&r.setRotation(m),r.getRotationAlignment()!==y&&r.setRotationAlignment(y),r.getPitchAlignment()!==C&&r.setPitchAlignment(C),r.getPopup()!==f&&r.setPopup(f);const x=Z(T.className,e.className);if(x)for(const E of x)r.toggleClassName(E);return o.current.props=e,B.createPortal(e.children,r.getElement())})),xe=i.memo(i.forwardRef((e,t)=>{const{map:n,mapLib:s}=i.useContext(w),o=i.useMemo(()=>document.createElement("div"),[]),r=i.useRef({props:e}),a=i.useMemo(()=>{const c={...e},u=new s.Popup(c);return u.setLngLat([e.longitude,e.latitude]),u.once("open",l=>{var d,f;(f=(d=r.current.props).onOpen)==null||f.call(d,l)}),u},[]);if(i.useEffect(()=>{const c=u=>{var l,d;(d=(l=r.current.props).onClose)==null||d.call(l,u)};return a.on("close",c),a.setDOMContent(o).addTo(n.getMap()),()=>{a.off("close",c),a.isOpen()&&a.remove()}},[]),i.useEffect(()=>{L(a.getElement(),e.style)},[e.style]),i.useImperativeHandle(t,()=>a,[]),a.isOpen()){const c=r.current.props;(a.getLngLat().lng!==e.longitude||a.getLngLat().lat!==e.latitude)&&a.setLngLat([e.longitude,e.latitude]),e.offset&&!v(c.offset,e.offset)&&a.setOffset(e.offset),(c.anchor!==e.anchor||c.maxWidth!==e.maxWidth)&&(a.options.anchor=e.anchor,a.setMaxWidth(e.maxWidth));const u=Z(c.className,e.className);if(u)for(const l of u)a.toggleClassName(l);r.current.props=e}return B.createPortal(e.children,o)}));function M(e,t,n,s){const o=i.useContext(w),r=i.useMemo(()=>e(o),[]);return i.useEffect(()=>{const a=t,c=null,u=typeof t=="function"?t:null,{map:l}=o;return l.hasControl(r)||(l.addControl(r,a==null?void 0:a.position),c&&c(o)),()=>{u&&u(o),l.hasControl(r)&&l.removeControl(r)}},[]),r}function ie(e){const t=M(({mapLib:n})=>new n.AttributionControl(e),{position:e.position});return i.useEffect(()=>{L(t._container,e.style)},[e.style]),null}i.memo(ie);function ce(e){const t=M(({mapLib:n})=>new n.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return i.useEffect(()=>{L(t._controlContainer,e.style)},[e.style]),null}i.memo(ce);function le(e,t){const n=i.useRef({props:e}),s=M(({mapLib:o})=>{const r=new o.GeolocateControl(e),a=r._setupUI;return r._setupUI=()=>{r._container.hasChildNodes()||a()},r.on("geolocate",c=>{var u,l;(l=(u=n.current.props).onGeolocate)==null||l.call(u,c)}),r.on("error",c=>{var u,l;(l=(u=n.current.props).onError)==null||l.call(u,c)}),r.on("outofmaxbounds",c=>{var u,l;(l=(u=n.current.props).onOutOfMaxBounds)==null||l.call(u,c)}),r.on("trackuserlocationstart",c=>{var u,l;(l=(u=n.current.props).onTrackUserLocationStart)==null||l.call(u,c)}),r.on("trackuserlocationend",c=>{var u,l;(l=(u=n.current.props).onTrackUserLocationEnd)==null||l.call(u,c)}),r},{position:e.position});return n.current.props=e,i.useImperativeHandle(t,()=>s,[]),i.useEffect(()=>{L(s._container,e.style)},[e.style]),null}i.memo(i.forwardRef(le));function ue(e){const t=M(({mapLib:n})=>new n.NavigationControl(e),{position:e.position});return i.useEffect(()=>{L(t._container,e.style)},[e.style]),null}i.memo(ue);function fe(e){const t=M(({mapLib:r})=>new r.ScaleControl(e),{position:e.position}),n=i.useRef(e),s=n.current;n.current=e;const{style:o}=e;return e.maxWidth!==void 0&&e.maxWidth!==s.maxWidth&&(t.options.maxWidth=e.maxWidth),e.unit!==void 0&&e.unit!==s.unit&&t.setUnit(e.unit),i.useEffect(()=>{L(t._container,o)},[o]),null}const ke=i.memo(fe);function de(e){const t=M(({mapLib:n})=>new n.TerrainControl(e),{position:e.position});return i.useEffect(()=>{L(t._container,e.style)},[e.style]),null}i.memo(de);function me(e){const t=M(({mapLib:n})=>new n.LogoControl(e),{position:e.position});return i.useEffect(()=>{L(t._container,e.style)},[e.style]),null}i.memo(me);function R(e,t){if(!e)throw new Error(t)}let ye=0;function ge(e,t,n){if(e.style&&e.style._loaded){const s={...n};return delete s.id,delete s.children,e.addSource(t,s),e.getSource(t)}return null}function he(e,t,n){var a,c,u;R(t.id===n.id,"source id changed"),R(t.type===n.type,"source type changed");let s="",o=0;for(const l in t)l!=="children"&&l!=="id"&&!v(n[l],t[l])&&(s=l,o++);if(!o)return;const r=t.type;if(r==="geojson")e.setData(t.data);else if(r==="image")e.updateImage({url:t.url,coordinates:t.coordinates});else switch(s){case"coordinates":(a=e.setCoordinates)==null||a.call(e,t.coordinates);break;case"url":(c=e.setUrl)==null||c.call(e,t.url);break;case"tiles":(u=e.setTiles)==null||u.call(e,t.tiles);break;default:console.warn(`Unable to update prop: ${s}`)}}function Re(e){const t=i.useContext(w).map.getMap(),n=i.useRef(e),[,s]=i.useState(0),o=i.useMemo(()=>e.id||`jsx-source-${ye++}`,[]);i.useEffect(()=>{if(t){const a=()=>setTimeout(()=>s(c=>c+1),0);return t.on("styledata",a),a(),()=>{var c;if(t.off("styledata",a),t.style&&t.style._loaded&&t.getSource(o)){const u=(c=t.getStyle())==null?void 0:c.layers;if(u)for(const l of u)l.source===o&&t.removeLayer(l.id);t.removeSource(o)}}}},[t]);let r=t&&t.style&&t.getSource(o);return r?he(r,e,n.current):r=ge(t,o,e),n.current=e,r&&i.Children.map(e.children,a=>a&&i.cloneElement(a,{source:o}))||null}function pe(e,t,n,s){if(R(n.id===s.id,"layer id changed"),R(n.type===s.type,"layer type changed"),n.type==="custom"||s.type==="custom")return;const{layout:o={},paint:r={},filter:a,minzoom:c,maxzoom:u,beforeId:l}=n;if(l!==s.beforeId&&e.moveLayer(t,l),o!==s.layout){const d=s.layout||{};for(const f in o)v(o[f],d[f])||e.setLayoutProperty(t,f,o[f]);for(const f in d)o.hasOwnProperty(f)||e.setLayoutProperty(t,f,void 0)}if(r!==s.paint){const d=s.paint||{};for(const f in r)v(r[f],d[f])||e.setPaintProperty(t,f,r[f]);for(const f in d)r.hasOwnProperty(f)||e.setPaintProperty(t,f,void 0)}v(a,s.filter)||e.setFilter(t,a),(c!==s.minzoom||u!==s.maxzoom)&&e.setLayerZoomRange(t,c,u)}function ve(e,t,n){if(e.style&&e.style._loaded&&(!("source"in n)||e.getSource(n.source))){const s={...n,id:t};delete s.beforeId,e.addLayer(s,n.beforeId)}}let _e=0;function Ie(e){const t=i.useContext(w).map.getMap(),n=i.useRef(e),[,s]=i.useState(0),o=i.useMemo(()=>e.id||`jsx-layer-${_e++}`,[]);if(i.useEffect(()=>{if(t){const a=()=>s(c=>c+1);return t.on("styledata",a),a(),()=>{t.off("styledata",a),t.style&&t.style._loaded&&t.getLayer(o)&&t.removeLayer(o)}}},[t]),t&&t.style&&t.getLayer(o))try{pe(t,o,e,n.current)}catch(a){console.warn(a)}else ve(t,o,e);return n.current=e,null}const V="pymc-basemap-mode",j="dark";function Le(){if(typeof window>"u")return j;try{const e=localStorage.getItem(V);if(e==="light"||e==="dark")return e}catch{}return j}function W(e){if(!(typeof window>"u"))try{localStorage.setItem(V,e)}catch{}}const q=G(e=>({mode:Le(),toggle:()=>e(t=>{const n=t.mode==="light"?"dark":"light";return W(n),{mode:n}}),setMode:t=>{W(t),e({mode:t})}})),Te=()=>q(e=>e.mode),Pe=()=>q(e=>e.toggle),Ce={light:"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",dark:"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"},Se={light:"basemap-light-",dark:"basemap-dark-"},I={};async function Ee(e){if(I[e])return I[e];const n=await(await fetch(Ce[e])).json();return I[e]=n,n}function ze({mode:e}){const{current:t}=K(),[n,s]=i.useState(null),o=i.useRef({light:!1,dark:!1}),r=i.useRef({light:[],dark:[]});i.useEffect(()=>{const l=()=>{var y;const m=(y=t==null?void 0:t.getMap)==null?void 0:y.call(t);m&&!n&&s(m)};l();const d=setInterval(l,50),f=setTimeout(()=>clearInterval(d),5e3);return()=>{clearInterval(d),clearTimeout(f)}},[t,n]);const a=i.useCallback(async(l,d,f)=>{var E,k;if(o.current[d])return;const m=Se[d],y=await Ee(d),C=[];for(const[p,h]of Object.entries(y.sources||{})){const g=m+p;l.getSource(g)||l.addSource(g,h)}const x=(k=(((E=l.getStyle())==null?void 0:E.layers)||[]).find(p=>!p.id.startsWith("basemap-light-")&&!p.id.startsWith("basemap-dark-")))==null?void 0:k.id;for(const p of y.layers||[]){const h=m+p.id;if(C.push(h),l.getLayer(h))continue;const g={...p,id:h};"source"in g&&typeof g.source=="string"&&(g.source=m+g.source),g.layout||(g.layout={}),g.layout.visibility=f?"visible":"none";try{l.addLayer(g,x)}catch(_){console.warn(`[BasemapLayer] Failed to add layer ${h}:`,_)}}r.current[d]=C,o.current[d]=!0},[]),c=i.useCallback((l,d,f)=>{const m=r.current[d],y=f?"visible":"none";for(const C of m)if(l.getLayer(C))try{l.setLayoutProperty(C,"visibility",y)}catch{}},[]),u=i.useCallback(l=>{var m;const f=(((m=l.getStyle())==null?void 0:m.layers)||[]).filter(y=>!y.id.startsWith("basemap-light-")&&!y.id.startsWith("basemap-dark-"));for(const y of f)try{l.moveLayer(y.id)}catch{}},[]);return i.useEffect(()=>{if(!n)return;const l=d=>{n.hasImage(d.id)||n.addImage(d.id,{width:1,height:1,data:new Uint8Array([0,0,0,0])})};return n.on("styleimagemissing",l),()=>{n.off("styleimagemissing",l)}},[n]),i.useEffect(()=>{if(!n)return;let l=!1;const d=async()=>{if(!l)try{await Promise.all([a(n,"light",e==="light"),a(n,"dark",e==="dark")]),l||u(n)}catch(m){console.error("[BasemapLayer] Setup error:",m)}};n.isStyleLoaded()?d():(n.once("style.load",d),n.once("load",()=>{!l&&!o.current.light&&d()}));const f=()=>{l||setTimeout(()=>{!l&&o.current.light&&o.current.dark&&u(n)},100)};return n.on("styledata",f),()=>{l=!0,n.off("styledata",f)}},[n,a,u,e]),i.useEffect(()=>{n&&(!o.current.light||!o.current.dark||(c(n,"light",e==="light"),c(n,"dark",e==="dark")))},[n,e,c]),null}export{ze as B,Ie as L,Me as M,xe as P,Re as S,be as a,K as b,Pe as c,ke as d,Te as u}; diff --git a/frontend/dist/assets/ChatBubble-DRf3s2tk.js b/frontend/dist/assets/ChatBubble-B-vyhm2S.js similarity index 93% rename from frontend/dist/assets/ChatBubble-DRf3s2tk.js rename to frontend/dist/assets/ChatBubble-B-vyhm2S.js index 555faf4a..1864c847 100644 --- a/frontend/dist/assets/ChatBubble-DRf3s2tk.js +++ b/frontend/dist/assets/ChatBubble-B-vyhm2S.js @@ -1,4 +1,4 @@ -import{d as h,r as u,j as e,c as t}from"./index-CLIbpHvY.js";import{e as f,g as p,a as g,b as j,f as b}from"./chat-utils-C0FWA6kK.js";/** +import{d as h,r as u,j as e,c as t}from"./index-2YU-f7O7.js";import{e as f,g as p,a as g,b as j,f as b}from"./chat-utils-zf_UbwVO.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/CollisionExplorerModal-CrEVRFBy.js b/frontend/dist/assets/CollisionExplorerModal-CKdqxCu4.js similarity index 97% rename from frontend/dist/assets/CollisionExplorerModal-CrEVRFBy.js rename to frontend/dist/assets/CollisionExplorerModal-CKdqxCu4.js index cd5de9df..6e8655bc 100644 --- a/frontend/dist/assets/CollisionExplorerModal-CrEVRFBy.js +++ b/frontend/dist/assets/CollisionExplorerModal-CKdqxCu4.js @@ -1,4 +1,4 @@ -import{d as k,r as c,E as L,bE as S,H,j as e,ac as R,ad as T,br as E,c as N,q as w,w as B,x as _,bO as D}from"./index-CLIbpHvY.js";import{u as I,M as P,B as q,S as z,L as W,a as U}from"./BasemapLayer-B74HwKhL.js";import{T as F}from"./triangle-alert-BPXHBOYA.js";import{M as A}from"./map-pin-oP9EChoI.js";import{M as Y}from"./monitor-smartphone-B5v3E3uQ.js";/** +import{d as k,r as c,E as L,bE as S,H,j as e,ac as R,ad as T,br as E,c as N,q as w,w as B,x as _,bO as D}from"./index-2YU-f7O7.js";import{u as I,M as P,B as q,S as z,L as W,a as U}from"./BasemapLayer-CZ0EXyx3.js";import{T as F}from"./triangle-alert-il1la-RI.js";import{M as A}from"./map-pin-DwpgbaSS.js";import{M as Y}from"./monitor-smartphone-BbnIneu-.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/Configuration-u6Y-7LJR.js b/frontend/dist/assets/Configuration-BDDHE_lZ.js similarity index 98% rename from frontend/dist/assets/Configuration-u6Y-7LJR.js rename to frontend/dist/assets/Configuration-BDDHE_lZ.js index bc3f0046..9bf0717b 100644 --- a/frontend/dist/assets/Configuration-u6Y-7LJR.js +++ b/frontend/dist/assets/Configuration-BDDHE_lZ.js @@ -1,5 +1,5 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/latin-400-BcR6IdUc.css","assets/latin-500-DCnAHIrw.css","assets/latin-600-CnkPk-vb.css","assets/latin-700-UC1i-VSI.css"])))=>i.map(i=>d[i]); -import{d as ue,r as t,j as e,c as l,L as $,w as B,bc as J,ae as Ss,dF as Ee,dG as es,dH as Je,bo as Se,T as ie,M as Zs,S as et,dI as st,F as X,ce as Qe,bQ as tt,v as at,dJ as Ts,dK as nt,dL as lt,dM as rt,R as it,B as F,dN as $e,I as ot,x as ct}from"./index-CLIbpHvY.js";import{g as dt,a as ut,c as mt,r as xt,s as ft,b as ht,u as pt,d as yt}from"./system-DM3mfcRt.js";import{T as Ps,C as gt}from"./ConfirmModal-DeWu6kFs.js";import{N as bt}from"./NodeInformationCard-BEL_UTIo.js";import{i as jt,g as vt,s as Nt,a as kt,k as wt}from"./keycap-sfx-ByZp-njj.js";import{C as Y,P as Ct,a as St,B as Tt}from"./PageLayout-9SoN_daN.js";import{R as te,C as Te}from"./Grid-Di163a6N.js";import{A as _t}from"./antenna-CYx4bVye.js";import{P as _s}from"./plus-C2Nq-iqX.js";import{K as qe}from"./key-round-iBXtesax.js";import{C as Ft}from"./circle-check-BA0O7QIB.js";import{T as Ge}from"./triangle-alert-BPXHBOYA.js";import{R as Et}from"./refresh-cw-D45udn5T.js";import{C as Rt}from"./chevron-right-tyotcuUX.js";import"./DataBox-ChuBU2q7.js";/** +import{d as ue,r as t,j as e,c as l,L as $,w as B,bc as J,ae as Ss,dF as Ee,dG as es,dH as Je,bo as Se,T as ie,M as Zs,S as et,dI as st,F as X,ce as Qe,bQ as tt,v as at,dJ as Ts,dK as nt,dL as lt,dM as rt,R as it,B as F,dN as $e,I as ot,x as ct}from"./index-2YU-f7O7.js";import{g as dt,a as ut,c as mt,r as xt,s as ft,b as ht,u as pt,d as yt}from"./system-z5qSDSFJ.js";import{T as Ps,C as gt}from"./ConfirmModal-DkHVYuoH.js";import{N as bt}from"./NodeInformationCard-xEgWVu4P.js";import{i as jt,g as vt,s as Nt,a as kt,k as wt}from"./keycap-sfx-ByZp-njj.js";import{C as Y,P as Ct,a as St,B as Tt}from"./PageLayout-tvsYvfyL.js";import{R as te,C as Te}from"./Grid-BUbHrfD3.js";import{A as _t}from"./antenna-DGAYnG36.js";import{P as _s}from"./plus-Ci6eVmWj.js";import{K as qe}from"./key-round-CO4nliLv.js";import{C as Ft}from"./circle-check-CMy_4dWl.js";import{T as Ge}from"./triangle-alert-il1la-RI.js";import{R as Et}from"./refresh-cw-CWeSjq0l.js";import{C as Rt}from"./chevron-right-DwaXNeO4.js";import"./DataBox-D8nJsUbV.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/ConfirmModal-DeWu6kFs.js b/frontend/dist/assets/ConfirmModal-DkHVYuoH.js similarity index 92% rename from frontend/dist/assets/ConfirmModal-DeWu6kFs.js rename to frontend/dist/assets/ConfirmModal-DkHVYuoH.js index acf8a238..8b11866f 100644 --- a/frontend/dist/assets/ConfirmModal-DeWu6kFs.js +++ b/frontend/dist/assets/ConfirmModal-DkHVYuoH.js @@ -1,4 +1,4 @@ -import{d as l,r as m,j as s,ac as x,dw as h,c as p,ad as f,dP as g,B as o}from"./index-CLIbpHvY.js";import{T as j}from"./triangle-alert-BPXHBOYA.js";/** +import{d as l,r as m,j as s,ac as x,dw as h,c as p,ad as f,dP as g,B as o}from"./index-2YU-f7O7.js";import{T as j}from"./triangle-alert-il1la-RI.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/Contacts-JLJkW45E.js b/frontend/dist/assets/Contacts-ghJ-BFN_.js similarity index 93% rename from frontend/dist/assets/Contacts-JLJkW45E.js rename to frontend/dist/assets/Contacts-ghJ-BFN_.js index 162f58b1..91a7b1f0 100644 --- a/frontend/dist/assets/Contacts-JLJkW45E.js +++ b/frontend/dist/assets/Contacts-ghJ-BFN_.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ContactsMapMapLibre-DueKTWML.js","assets/index-CLIbpHvY.js","assets/BasemapLayer-B74HwKhL.js","assets/consumer-registry-BrRzRPA2.js","assets/link-scoring-CJzUavtn.js","assets/ConfirmModal-DeWu6kFs.js","assets/triangle-alert-BPXHBOYA.js","assets/DeepAnalysisModal-lreaW1Hc.js","assets/download-DQJBs0xV.js","assets/database-idkjcnGz.js","assets/useMapViewStore-CoIRBkXg.js","assets/index-EpCuPFqY.js","assets/refresh-cw-D45udn5T.js","assets/target-5eLsI-iM.js","assets/funnel-D8VczAEU.js","assets/plus-C2Nq-iqX.js","assets/easing-jK46ZwcK.js","assets/wifi-B8_91QkI.js","assets/SignalIndicator-BGst_xwg.js","assets/chevron-right-tyotcuUX.js","assets/node-types-CFhZT1Jq.js","assets/badge-colors-BNUqIXCA.js","assets/LightSparkline-YdYUoL-i.js","assets/map-pin-oP9EChoI.js","assets/usePipelineStore-7L_PlMjP.js","assets/ping-DgP-6H7e.js","assets/PageLayout-9SoN_daN.js","assets/listbox-fatOHbDc.js","assets/element-movement-CTWmC4Se.js","assets/TimeRangeStepper-r-j5VisG.js","assets/chat-utils-C0FWA6kK.js","assets/CollisionExplorerModal-CrEVRFBy.js","assets/monitor-smartphone-B5v3E3uQ.js","assets/DataBox-ChuBU2q7.js","assets/circle-question-mark-CW0NICCZ.js","assets/network-fMhgmV5F.js","assets/activity-DBVB1w-E.js","assets/search-D-1ih5Lf.js","assets/index-DUfCykEc.css","assets/BasemapLayer-B1CfjdFi.css","assets/ContactsMapMapLibre-BwWOEply.css"])))=>i.map(i=>d[i]); -import{d as L,j as e,r as n,bo as ss,bL as Ee,bM as Fe,$ as ne,w as Ce,a9 as Le,bN as ts,bO as fe,R as he,q as k,bP as as,L as Oe,bQ as ns,J as rs,bR as os,bS as is,bT as cs,H as ls,bU as ds,bV as ms,bW as xs,K as us,aa as ps,N as ve,bX as hs,bY as fs,b8 as ae,o as gs,I as js,bc as bs,c as ke}from"./index-CLIbpHvY.js";import{useDiscoveredNodes as ys}from"./usePipelineStore-7L_PlMjP.js";import{p as Ns}from"./ping-DgP-6H7e.js";import{c as Me}from"./node-types-CFhZT1Jq.js";import{P as vs,a as ws,B as ks}from"./PageLayout-9SoN_daN.js";import{L as Cs,a as pe}from"./listbox-fatOHbDc.js";import{T as Te}from"./TimeRangeStepper-r-j5VisG.js";import{u as Ms,e as Ss,f as _s,r as Ps}from"./consumer-registry-BrRzRPA2.js";import{e as Rs,g as Ls,a as Ts}from"./chat-utils-C0FWA6kK.js";import{A as $s,b as Es,C as Fs}from"./SignalIndicator-BGst_xwg.js";import{C as Os,S as zs}from"./CollisionExplorerModal-CrEVRFBy.js";import{E as Hs,T as Ds}from"./target-5eLsI-iM.js";import{D as As}from"./DataBox-ChuBU2q7.js";import{C as G}from"./badge-colors-BNUqIXCA.js";import{C as ze}from"./circle-question-mark-CW0NICCZ.js";import{N as Is}from"./network-fMhgmV5F.js";import{A as He}from"./activity-DBVB1w-E.js";import{T as Bs,C as Vs}from"./ConfirmModal-DeWu6kFs.js";import{M as $e}from"./monitor-smartphone-B5v3E3uQ.js";import{M as Us}from"./map-pin-oP9EChoI.js";import{S as qs}from"./search-D-1ih5Lf.js";/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ContactsMapMapLibre-CuhX2ofh.js","assets/index-2YU-f7O7.js","assets/BasemapLayer-CZ0EXyx3.js","assets/consumer-registry-BaTbQUiU.js","assets/link-scoring-CPozN6Pj.js","assets/ConfirmModal-DkHVYuoH.js","assets/triangle-alert-il1la-RI.js","assets/DeepAnalysisModal-DlQPOGxT.js","assets/download-Dpt6RSjP.js","assets/database-1_qMqgVS.js","assets/useMapViewStore-Ce8IV--K.js","assets/index-rOrsjUFs.js","assets/refresh-cw-CWeSjq0l.js","assets/target-IYsU06YN.js","assets/funnel-D7UU9v8s.js","assets/plus-Ci6eVmWj.js","assets/easing-DxQTD0NL.js","assets/wifi-DFxu_Y_e.js","assets/SignalIndicator-CZkLIt0w.js","assets/chevron-right-DwaXNeO4.js","assets/node-types--B4HRIdZ.js","assets/badge-colors-BNUqIXCA.js","assets/LightSparkline-CV6le7Ch.js","assets/map-pin-DwpgbaSS.js","assets/usePipelineStore-D-0Ba45c.js","assets/ping-6o6GOZ8c.js","assets/PageLayout-tvsYvfyL.js","assets/listbox-CrjQSTKJ.js","assets/element-movement-Bhgekpql.js","assets/TimeRangeStepper--TSSRhtK.js","assets/chat-utils-zf_UbwVO.js","assets/CollisionExplorerModal-CKdqxCu4.js","assets/monitor-smartphone-BbnIneu-.js","assets/DataBox-D8nJsUbV.js","assets/circle-question-mark-BpV3PDV1.js","assets/network-BfJPFeB2.js","assets/activity-BgtT9aiG.js","assets/search-5bBDdD-8.js","assets/index-CgjVNfe7.css","assets/BasemapLayer-B1CfjdFi.css","assets/ContactsMapMapLibre-BwWOEply.css"])))=>i.map(i=>d[i]); +import{d as L,j as e,r as n,bo as ss,bL as Ee,bM as Fe,$ as ne,w as Ce,a9 as Le,bN as ts,bO as fe,R as he,q as k,bP as as,L as Oe,bQ as ns,J as rs,bR as os,bS as is,bT as cs,H as ls,bU as ds,bV as ms,bW as xs,K as us,aa as ps,N as ve,bX as hs,bY as fs,b8 as ae,o as gs,I as js,bc as bs,c as ke}from"./index-2YU-f7O7.js";import{useDiscoveredNodes as ys}from"./usePipelineStore-D-0Ba45c.js";import{p as Ns}from"./ping-6o6GOZ8c.js";import{c as Me}from"./node-types--B4HRIdZ.js";import{P as vs,a as ws,B as ks}from"./PageLayout-tvsYvfyL.js";import{L as Cs,a as pe}from"./listbox-CrjQSTKJ.js";import{T as Te}from"./TimeRangeStepper--TSSRhtK.js";import{u as Ms,e as Ss,f as _s,r as Ps}from"./consumer-registry-BaTbQUiU.js";import{e as Rs,g as Ls,a as Ts}from"./chat-utils-zf_UbwVO.js";import{A as $s,b as Es,C as Fs}from"./SignalIndicator-CZkLIt0w.js";import{C as Os,S as zs}from"./CollisionExplorerModal-CKdqxCu4.js";import{E as Hs,T as Ds}from"./target-IYsU06YN.js";import{D as As}from"./DataBox-D8nJsUbV.js";import{C as G}from"./badge-colors-BNUqIXCA.js";import{C as ze}from"./circle-question-mark-BpV3PDV1.js";import{N as Is}from"./network-BfJPFeB2.js";import{A as He}from"./activity-BgtT9aiG.js";import{T as Bs,C as Vs}from"./ConfirmModal-DkHVYuoH.js";import{M as $e}from"./monitor-smartphone-BbnIneu-.js";import{M as Us}from"./map-pin-DwpgbaSS.js";import{S as qs}from"./search-5bBDdD-8.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. @@ -49,4 +49,4 @@ import{d as L,j as e,r as n,bo as ss,bL as Ee,bM as Fe,$ as ne,w as Ce,a9 as Le, * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const lt=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],dt=L("trending-down",lt);class mt extends n.Component{constructor(i){super(i),this.state={hasError:!1}}static getDerivedStateFromError(i){return{hasError:!0,error:i}}render(){var i;return this.state.hasError?e.jsx("div",{className:"map-container-16-9 flex items-center justify-center rounded-2xl surface-base",role:"alert","aria-live":"assertive",children:e.jsxs("div",{className:"text-center text-fg-muted p-4",children:[e.jsx("p",{className:"text-lg mb-2",children:"Map failed to load"}),e.jsx("p",{className:"text-sm text-fg-muted",children:((i=this.state.error)==null?void 0:i.message)||"Unknown error"}),e.jsx("p",{className:"text-xs text-fg-muted mt-2",children:"Try refreshing the page or check your browser's WebGL support."})]})}):this.props.children}}const xt=n.lazy(()=>ss(()=>import("./ContactsMapMapLibre-DueKTWML.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40])));function ut({neighbors:o,localNode:i,localHash:f,onRemoveNode:x,selectedNodeHash:g,onNodeSelected:y,highlightedEdgeKey:h,highlightedGhost:d}){return e.jsx(mt,{children:e.jsx(n.Suspense,{fallback:e.jsx("div",{className:"map-container-16-9 flex items-center justify-center rounded-2xl surface-base",role:"status","aria-live":"polite","aria-label":"Loading map",children:e.jsxs("div",{className:"text-fg-muted flex items-center gap-3",children:[e.jsx("div",{className:"w-5 h-5 border-2 border-sys-blue border-t-transparent rounded-full animate-spin","aria-hidden":"true"}),e.jsx("span",{children:"Loading map..."})]})}),children:e.jsx(xt,{neighbors:o,localNode:i,localHash:f,onRemoveNode:x,selectedNodeHash:g,onNodeSelected:y,highlightedEdgeKey:h,highlightedGhost:d})})})}function pt({hash:o,className:i="",size:f="sm",collisionInfo:x,isViterbiResolved:g}){const y=Ee(),h=Fe(),[d,H]=n.useState(!1),C=n.useMemo(()=>ne(o),[o]),T=n.useMemo(()=>x!==void 0?x:C?y.find(u=>u.prefix===C)??null:null,[C,y,x]),$=g??(h.totalPaths>0&&h.avgPathConfidence>=.7),z=n.useCallback(u=>{u.preventDefault(),u.stopPropagation(),H(!0)},[]),D=n.useCallback(()=>{H(!1)},[]);if(!T)return null;const N=f==="sm"?"w-3.5 h-3.5":"w-4 h-4",A=$?"text-sys-cyan hover:text-sys-cyan hover:bg-sys-cyan/10 focus:ring-sys-cyan/50":"text-signal-fair hover:text-sys-indigo hover:bg-signal-fair/10 focus:ring-signal-fair/50",Q=$?`Prefix conflict resolved by Viterbi HMM (${(h.avgPathConfidence*100).toFixed(0)}% confidence)`:`Prefix conflict: ${T.candidateCount} nodes share prefix "${C}"`;return e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:z,className:`inline-flex items-center justify-center p-0.5 rounded focus:outline-none focus:ring-2 transition-colors cursor-pointer touch-manipulation ${A} ${i}`,title:Q,"aria-label":`View prefix conflict for ${C}${$?" (Viterbi resolved)":""}`,children:$?e.jsxs("span",{className:"relative",children:[e.jsx(Hs,{className:N}),e.jsx(Ce,{className:"absolute -bottom-0.5 -right-0.5 w-2 h-2 text-sys-green"})]}):e.jsx(Zs,{className:N})}),e.jsx(Os,{isOpen:d,prefix:T.prefix,candidateHashes:T.candidateHashes,onClose:D})]})}const ht=n.memo(pt),Ae=[{target:"Contacts",fn:"name",minStage:1,when:Ss},{target:"Contacts",fn:"traceLinks.directed",minStage:2,when:_s}];Ps(Ae);function ft(o){return o<1e3?`${Math.round(o)}m`:`${(o/1e3).toFixed(1)}km`}function gt({hash:o,contact:i,isHub:f,isNeighbor:x,distance:g,centrality:y,sparklineData:h,neighborSignal:d,collisionInfo:H,isViterbiResolved:C,isPinging:T,isPingingThis:$,pingResult:z,pingError:D,gatewayInfo:N,lastForwarderPrefix:A,isMobile:Q,pathStability:u,onRowClick:K,onPing:E,onRemove:ge}){Ms(Ae);const I=i.latitude&&i.longitude&&i.latitude!==0&&i.longitude!==0,F=i.node_name||i.name||"Unknown",v=x&&d,re=Me(i),{isRepeater:_,isCompanion:Y,isRoomServer:j,isClient:X,label:J}=re,oe=x?`${J} — Direct RF contact (zero-hop neighbor)`:`${J} — Flood routing (multi-hop via mesh)`,Z=i.first_seen?Le(i.first_seen).replace(/ ago$/i," old"):null;return e.jsxs("div",{className:`contacts-grid-row ${f?"bg-sys-amber/5 border-l-2 border-l-sys-amber":""} ${I?"cursor-pointer hover:bg-subtle-fill":""}`,onClick:()=>K(o),children:[e.jsxs("div",{className:"contacts-col-node flex items-center gap-2 min-w-0",children:[v&&(d==null?void 0:d.avgSnr)!==null?e.jsx("div",{className:`w-2 h-2 rounded-full flex-shrink-0 self-center ${ts(d.avgSnr)}`}):e.jsx("div",{className:"w-2 flex-shrink-0"}),e.jsx("div",{className:"w-6 h-6 flex items-center justify-center flex-shrink-0",title:oe,children:(()=>{if(j&&_)return e.jsxs("div",{className:"relative w-5 h-5",children:[e.jsx(fe,{className:"w-5 h-5 absolute inset-0 text-sys-pink"}),e.jsx(zs,{className:"w-2.5 h-2.5 absolute -bottom-0.5 -right-0.5 text-sys-teal"})]});if(j)return e.jsx(fe,{className:"w-5 h-5 text-sys-pink"});if(_)return e.jsx("div",{className:"w-5 h-5 rounded-full flex items-center justify-center ring-[1.5px] ring-sys-blue",children:e.jsx(he,{className:"w-3.5 h-3.5 text-sys-blue"})});if((Y||X)&&F!=="Unknown"){const{emoji:w,cleanName:P}=Rs(F);return e.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center",style:{backgroundColor:Ls(P)},children:w?e.jsx("span",{className:"text-sm leading-none",children:w}):e.jsx("span",{className:"text-white text-[9px] font-bold tracking-tighter",children:Ts(F)})})}return e.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center bg-zinc-500/20",children:e.jsx(ze,{className:"w-3.5 h-3.5 text-sys-amber"})})})()}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 overflow-hidden",children:[e.jsx("span",{className:"roster-title truncate",title:F,children:F}),x&&e.jsx(k,{color:G.neighbor,compact:!0,className:"flex-shrink-0",children:"NBR"}),f&&e.jsxs(k,{color:G.hub,compact:!0,className:"flex items-center gap-1 flex-shrink-0",children:[e.jsx(Is,{className:"w-3 h-3"}),"HUB"]}),_&&e.jsx(k,{color:G.repeater,compact:!0,className:"flex-shrink-0",children:"RPT"}),j&&e.jsx(k,{color:G.room,compact:!0,className:"flex-shrink-0",children:"ROOM"}),Y&&e.jsx(k,{color:G.companion,compact:!0,className:"flex-shrink-0",children:"COMP"}),X&&e.jsx(k,{color:G.client,compact:!0,className:"flex-shrink-0",children:"CLIENT"}),Q&&e.jsxs(k,{color:"cyan",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0",children:[e.jsx(rt,{className:"w-2.5 h-2.5"}),"MOBILE"]}),!I&&e.jsx("span",{className:"flex items-center gap-0.5 flex-shrink-0 text-fg-muted/50",title:"No GPS location provided",children:e.jsx(at,{className:"w-3 h-3"})})]}),e.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[e.jsx(As,{copy:!0,size:"compact",truncate:[8,6],children:o}),e.jsx(ht,{hash:o,collisionInfo:H,isViterbiResolved:C}),!x&&N&&e.jsxs(k,{color:"zinc",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0",title:`Via ${N.name||N.prefix} (${N.hopCount} hop${N.hopCount!==1?"s":""})`,children:[e.jsx($s,{className:"w-2.5 h-2.5"}),e.jsx("span",{className:"font-mono",children:N.prefix}),N.hopCount>1&&e.jsxs("span",{className:"opacity-60",children:["+",N.hopCount-1]})]}),A&&!x&&e.jsxs(k,{color:"zinc",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0",title:`Last forwarded by ${A}`,children:[e.jsx(Gs,{className:"w-2.5 h-2.5"}),e.jsx("span",{className:"font-mono",children:A})]}),u!=null&&u!==0&&e.jsx(k,{color:u>0?"green":"amber",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0",title:u>0?"Path stability improving":"Path stability declining",children:u>0?e.jsx(as,{className:"w-2.5 h-2.5"}):e.jsx(dt,{className:"w-2.5 h-2.5"})}),h.length>0&&(()=>{const w=h.reduce((ie,je)=>ie+je.count,0);if(w===0)return null;const P=w/24;return e.jsxs(k,{color:"zinc",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0",title:`${w} packets in last 24h (~${P.toFixed(1)}/hr)`,children:[e.jsx(it,{className:"w-2.5 h-2.5"}),e.jsxs("span",{children:[P<1?"<1":P.toFixed(0),"/hr"]})]})})(),Z&&e.jsxs(k,{color:"zinc",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0 opacity-70",title:`First discovered ${Z}`,children:[e.jsx(Xs,{className:"w-2.5 h-2.5"}),e.jsx("span",{children:Z})]})]})]})]}),e.jsxs("div",{className:"contacts-col-signal flex items-center justify-end gap-2",children:[v&&(d==null?void 0:d.avgRssi)!==null&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Es,{rssi:d.avgRssi,className:"w-3.5 h-3.5"}),e.jsx("span",{className:"type-data-xs text-fg-muted",children:Math.round(d.avgRssi)})]}),v&&(d==null?void 0:d.avgSnr)!==null&&e.jsxs("span",{className:"type-data-xs text-fg-muted",children:[d.avgSnr.toFixed(1)," dB"]})]}),e.jsx("div",{className:"contacts-col-distance flex items-center justify-end gap-1 text-fg-muted",children:g!=null&&e.jsxs(e.Fragment,{children:[e.jsx(De,{className:"w-3 h-3"}),e.jsx("span",{className:"type-data-xs",children:ft(g)})]})}),e.jsx("div",{className:"contacts-col-centrality flex items-center justify-end gap-1",children:y>0&&e.jsxs(e.Fragment,{children:[e.jsx(He,{className:"w-3 h-3 text-sys-indigo"}),e.jsxs("span",{className:"type-data-xs text-fg-muted",children:[(y*100).toFixed(0),"%"]})]})}),e.jsx("div",{className:"contacts-col-seen flex items-center justify-end",children:e.jsx("span",{className:"type-data-xs text-fg-primary whitespace-nowrap",children:i.last_seen?Le(i.last_seen):"—"})}),e.jsxs("div",{className:"contacts-col-actions flex items-center justify-end gap-1",children:[x&&e.jsx(e.Fragment,{children:z?e.jsxs("div",{className:"flex items-center gap-1 text-sys-green",title:`RTT: ${z.rtt_ms.toFixed(0)}ms`,children:[e.jsx(Ce,{className:"w-3.5 h-3.5"}),e.jsxs("span",{className:"type-data-xs hidden sm:inline",children:[z.snr_db.toFixed(1),"dB"]})]}):D?e.jsx("span",{className:"text-sys-red text-xs",title:D,children:"✗"}):e.jsx("button",{onClick:w=>E(o,w),disabled:T,className:"p-1 sm:p-1.5 radius-inner text-fg-muted/50 hover:text-sys-blue hover:bg-sys-blue/10 transition-base disabled:opacity-50 disabled:cursor-not-allowed",title:"Ping neighbor for updated signal info",children:$?e.jsx(Oe,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 animate-spin"}):e.jsx(Ds,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4"})})}),e.jsx("button",{onClick:w=>{w.stopPropagation(),ge(o,F)},className:"p-1 sm:p-1.5 radius-inner text-fg-muted/50 hover:text-sys-red hover:bg-sys-red/10 transition-base",title:"Remove contact",children:e.jsx(Bs,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4"})})]})]})}const jt=n.memo(gt),bt=6371e3,yt=[],Nt=[{field:"lastHeard",icon:Fs,label:"Recent"},{field:"distance",icon:De,label:"Distance"},{field:"centrality",icon:He,label:"Centrality"}];function vt(o){switch(o){case"room_server":return"room";case"repeater":return"repeater";case"companion":return"companion";case"unknown":return"companion"}}function wt(o){const i=Me(o);return vt(i.type)}function we(o,i){const{color:f="primary",border:x=!1}=i??{};return ke("flex items-center gap-1.5 px-2 py-1.5 text-sm radius-inner transition-base",o?f==="success"?"bg-sys-green/20 text-sys-green":"bg-sys-blue/20 text-sys-blue":"text-fg-muted hover:text-fg-secondary hover-bg",x&&(o?f==="success"?"border border-sys-green/30":"border border-sys-blue/30":"border border-transparent"))}function kt(o,i,f,x){const g=(f-o)*Math.PI/180,y=(x-i)*Math.PI/180,h=Math.sin(g/2)*Math.sin(g/2)+Math.cos(o*Math.PI/180)*Math.cos(f*Math.PI/180)*Math.sin(y/2)*Math.sin(y/2),d=2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h));return bt*d}function Ct(){const{stats:o}=ns(),i=rs(),f=os(),x=is(),g=cs(),y=ls(),h=ds(),d=ms(),H=xs(),C=us(),T=ps(),$=ve[C],z=Ee(),D=Fe(),N=hs(),A=D.totalPaths>0&&D.avgPathConfidence>=.7,Q=n.useMemo(()=>{const s=new Map;for(const t of z)s.set(t.prefix,t);return s},[z]),[u,K]=n.useState(null),[E,ge]=n.useState("lastHeard"),[I,F]=n.useState("desc"),[v,re]=n.useState(""),[_,Y]=n.useState(!1),[j,X]=n.useState(new Set),[J,oe]=n.useState(!1),[Z,w]=n.useState(null),[P,ie]=n.useState(null),[je,be]=n.useState(new Map),[Ie,ee]=n.useState(new Map),[M,Be]=n.useState(25),[U,ce]=n.useState(25),ye=n.useRef(null),se=n.useMemo(()=>(o==null?void 0:o.neighbors)??{},[o==null?void 0:o.neighbors]),Ne=ys(),le=n.useMemo(()=>{if(Ne.size===0)return se;const s=new Set;for(const a of Object.keys(se))s.add((a.startsWith("0x")?a.slice(2):a).toLowerCase());let t=null;for(const[a,r]of Ne){const c=(a.startsWith("0x")?a.slice(2):a).toLowerCase();s.has(c)||(t||(t={...se}),t[a]={last_seen:r.lastSeen,name:r.name??void 0,node_name:r.name??void 0,latitude:r.latitude,longitude:r.longitude,is_repeater:r.nodeType==="repeater",contact_type:r.nodeType==="repeater"?"Repeater":r.nodeType==="companion"?"Companion":r.nodeType==="room_server"?"Room Server":void 0})}return t??se},[se,Ne]),B=n.useMemo(()=>{const t=Date.now()/1e3-$.minutes*60;return Object.fromEntries(Object.entries(le).filter(([a,r])=>i.has(a)?!1:(r.last_seen??0)>=t))},[le,i,$.minutes]),R=fs(),q=o==null?void 0:o.local_hash,Ve=n.useMemo(()=>{const s=new Map;if(!q||h.size===0)return s;for(const[t,a]of h)if(t.endsWith(`→${q}`)&&a.hops.length>1){const r=t.split("→")[0],c=a.hops[a.hops.length-1];s.set(r,c)}return s},[h,q]),de=n.useMemo(()=>{const s=new Map;if(!(R!=null&&R.latitude)||!(R!=null&&R.longitude))return s;for(const[t,a]of Object.entries(B))a.latitude&&a.longitude&&a.latitude!==0&&a.longitude!==0?s.set(t,kt(R.latitude,R.longitude,a.latitude,a.longitude)):s.set(t,null);return s},[B,R]),{neighborHashSet:me,neighborSignalMap:Ue}=n.useMemo(()=>{const s=new Set,t=new Map;for(const a of y)s.add(a.hash),t.set(a.hash,{avgRssi:a.avgRssi,avgSnr:a.avgSnr});return{neighborHashSet:s,neighborSignalMap:t}},[y]),Se=n.useMemo(()=>{const s=v.toLowerCase().trim(),t=s==="neighbor"||s==="neighbors",a=_||t,r=j.size>0;return Object.fromEntries(Object.entries(B).filter(([c,l])=>{if(r){const S=wt(l);if(!j.has(S))return!1}if(a&&!me.has(c))return!1;if(t||!s)return!0;const V=(l.node_name||l.name||"").toLowerCase(),b=ne(c).toLowerCase();return V.includes(s)||b.includes(s)||c.toLowerCase().includes(s)}))},[B,v,_,me,j]),p=n.useMemo(()=>{const s=Object.entries(Se),t=v.toLowerCase().trim(),a=t.length===2&&/^[0-9a-f]{2}$/i.test(t);return s.sort(([r,c],[l,V])=>{if(a){const S=ne(r).toLowerCase(),O=ne(l).toLowerCase(),te=S===t,xe=O===t;if(te&&!xe)return-1;if(xe&&!te)return 1}let b=0;switch(E){case"lastHeard":b=(c.last_seen||0)-(V.last_seen||0);break;case"distance":{const S=de.get(r)??null,O=de.get(l)??null;S===null&&O===null?b=0:S===null?b=1:O===null?b=-1:b=S-O;break}case"centrality":{const S=g.get(r)||0,O=g.get(l)||0;b=S-O;break}}return I==="desc"?-b:b})},[Se,E,I,de,g,v]),m=n.useMemo(()=>{let s=0,t=0,a=0,r=0,c=0;for(const[,l]of p){const V=Me(l),b=l.latitude&&l.longitude&&l.latitude!==0&&l.longitude!==0;switch(V.type){case"room_server":a++;break;case"repeater":t++;break;case"companion":s++;break;case"unknown":c++;break}b&&r++}return{companions:s,repeaters:t,roomServers:a,total:p.length,withLocation:r,unknown:c}},[p]),qe=n.useMemo(()=>new Set(x),[x]),_e=n.useMemo(()=>M===0?p:p.slice(0,U),[p,U,M]);n.useEffect(()=>{ce(M||p.length)},[E,I,v,_,j,M,p.length]),n.useEffect(()=>{const s=t=>{t.target.closest("[data-dropdown]")||oe(!1)};return document.addEventListener("click",s),()=>document.removeEventListener("click",s)},[]),n.useEffect(()=>{if(M===0)return;const s=new IntersectionObserver(t=>{t[0].isIntersecting&&UMath.min(a+M,p.length))},{threshold:.1,rootMargin:"100px"});return ye.current&&s.observe(ye.current),()=>s.disconnect()},[M,U,p.length]);const We=n.useCallback(s=>{Be(s),ce(s||p.length)},[p.length]),Ge=n.useCallback(s=>{E===s?F(t=>t==="desc"?"asc":"desc"):(ge(s),F("desc"))},[E]),Qe=n.useCallback(s=>{const t=B[s];t!=null&&t.latitude&&(t!=null&&t.longitude)&&t.latitude!==0&&t.longitude!==0&&w(s)},[B]),Ke=n.useCallback(()=>{w(null)},[]),Ye=n.useCallback((s,t)=>{K({hash:s,name:t})},[]),Xe=n.useCallback(async(s,t)=>{if(t.stopPropagation(),!P){ie(s),be(a=>{const r=new Map(a);return r.delete(s),r}),ee(a=>{const r=new Map(a);return r.delete(s),r});try{const a=s.startsWith("0x")?s.slice(0,4):`0x${s.slice(0,2)}`,r=await Ns(a,30);r.success&&r.data?(be(c=>new Map(c).set(s,r.data)),setTimeout(()=>{be(c=>{const l=new Map(c);return l.delete(s),l})},1e4)):(ee(c=>new Map(c).set(s,r.error||"Ping failed")),setTimeout(()=>{ee(c=>{const l=new Map(c);return l.delete(s),l})},5e3))}catch(a){const r=a instanceof Error?a.message:"Ping failed";ee(c=>new Map(c).set(s,r)),setTimeout(()=>{ee(c=>{const l=new Map(c);return l.delete(s),l})},5e3)}finally{ie(null)}}},[P]);return e.jsxs(vs,{children:[e.jsx(ws,{title:"Contacts",icon:e.jsx(ae,{}),controls:e.jsxs("div",{className:"flex items-center gap-3 sm:gap-5",children:[e.jsxs("div",{className:"hidden sm:flex items-center gap-4",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Total:"}),e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:`${m.total} discovered node${m.total!==1?"s":""} on the mesh network`,children:[e.jsx(ae,{className:"w-3.5 h-3.5 text-fg-secondary"}),e.jsx("span",{children:m.total})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Types:"}),m.repeaters>0&&e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:"Repeaters",children:[e.jsx(he,{className:"w-3.5 h-3.5 text-sys-blue"}),e.jsx("span",{children:m.repeaters})]}),m.companions>0&&e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:"Companions",children:[e.jsx($e,{className:"w-3.5 h-3.5 text-fg-muted"}),e.jsx("span",{children:m.companions})]}),m.roomServers>0&&e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:"Room Servers",children:[e.jsx(fe,{className:"w-3.5 h-3.5 text-sys-pink"}),e.jsx("span",{children:m.roomServers})]}),m.withLocation>0&&e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:"With GPS location",children:[e.jsx(Us,{className:"w-3.5 h-3.5 text-sys-green"}),e.jsx("span",{children:m.withLocation})]}),m.unknown>0&&e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:"Unknown type",children:[e.jsx(ze,{className:"w-3.5 h-3.5 text-sys-amber"}),e.jsx("span",{children:m.unknown})]})]})]}),e.jsxs("div",{className:"flex sm:hidden items-center gap-1.5",children:[e.jsxs("span",{className:"data-box !px-1.5 !py-0.5 !text-[10px] flex items-center gap-1",children:[e.jsx(ae,{className:"w-3 h-3 text-fg-secondary"}),e.jsx("span",{children:m.total})]}),m.repeaters>0&&e.jsxs("span",{className:"data-box !px-1.5 !py-0.5 !text-[10px] flex items-center gap-1",children:[e.jsx(he,{className:"w-3 h-3 text-sys-blue"}),e.jsx("span",{children:m.repeaters})]}),m.companions>0&&e.jsxs("span",{className:"data-box !px-1.5 !py-0.5 !text-[10px] flex items-center gap-1",children:[e.jsx($e,{className:"w-3 h-3 text-fg-muted"}),e.jsx("span",{children:m.companions})]}),m.roomServers>0&&e.jsxs("span",{className:"data-box !px-1.5 !py-0.5 !text-[10px] flex items-center gap-1",children:[e.jsx(fe,{className:"w-3 h-3 text-sys-pink"}),e.jsx("span",{children:m.roomServers})]}),e.jsx(Te,{ranges:ve,selectedIndex:C,onSelect:T,size:"sm"})]}),e.jsx("div",{className:"hidden sm:block",children:e.jsx(Te,{ranges:ve,selectedIndex:C,onSelect:T})})]})}),e.jsxs(ks,{children:[H?e.jsx(ut,{neighbors:B,localNode:R??void 0,localHash:q,onRemoveNode:f,selectedNodeHash:Z,onNodeSelected:Ke}):e.jsx("div",{className:"surface-base radius-card aspect-video flex items-center justify-center",children:e.jsxs("div",{className:"flex flex-col items-center gap-3",children:[e.jsx("div",{className:"w-6 h-6 border-2 border-sys-blue border-t-transparent rounded-full animate-spin"}),e.jsx("span",{className:"text-sm text-fg-muted",children:"Loading map..."})]})}),e.jsx(gs,{noPadding:!0,children:H?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 px-3 sm:px-4 py-2.5 border-b border-edge-subtle",children:[e.jsx("span",{className:"icon-md flex items-center justify-center text-icon-card-title flex-shrink-0",children:e.jsx(ae,{})}),e.jsx("span",{className:"type-micro flex-shrink-0 mr-auto hidden sm:block",children:"Discovered Contacts"}),e.jsx(js,{type:"search",size:"sm",value:v,onChange:s=>re(s.target.value),placeholder:"Search...",leadingIcon:e.jsx(qs,{className:"w-3.5 h-3.5"}),trailingIcon:v?e.jsx("button",{onClick:()=>{re(""),(v.toLowerCase().trim()==="neighbor"||v.toLowerCase().trim()==="neighbors")&&Y(!1)},className:"text-fg-muted hover:text-fg-secondary",children:e.jsx(bs,{className:"w-3 h-3"})}):void 0,className:"w-24 sm:w-32 xl:w-44","aria-label":"Search contacts"}),e.jsx("div",{className:"h-4 w-px bg-border-subtle flex-shrink-0"}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[e.jsxs("div",{className:"relative","data-dropdown":!0,children:[e.jsxs("button",{onClick:()=>oe(!J),className:we(j.size>0,{border:!0}),title:"Filter by contact type",children:[e.jsx(st,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"hidden xl:inline",children:"Filter"}),j.size>0&&e.jsx("span",{className:"tabular-nums text-xs bg-sys-blue/30 px-1 rounded",children:j.size})]}),J&&e.jsxs("div",{className:"absolute right-0 top-full mt-1 z-50 surface-elevated radius-inner py-1 min-w-[140px]",children:[[{key:"repeater",label:"Repeaters"},{key:"companion",label:"Companions"},{key:"room",label:"Rooms"}].map(({key:s,label:t})=>e.jsxs("button",{onClick:()=>{X(a=>{const r=new Set(a);return r.has(s)?r.delete(s):r.add(s),r})},className:"w-full px-3 py-1.5 text-sm text-left hover-bg transition-base flex items-center gap-2",children:[e.jsx("span",{className:ke("w-4 h-4 flex items-center justify-center radius-badge border",j.has(s)?"bg-sys-blue border-sys-blue text-white":"border-edge-subtle"),children:j.has(s)&&e.jsx(Ce,{className:"w-3 h-3"})}),e.jsx("span",{className:j.has(s)?"text-fg-primary":"text-fg-secondary",children:t})]},s)),j.size>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"border-t border-edge-subtle my-1"}),e.jsx("button",{onClick:()=>X(new Set),className:"w-full px-3 py-1.5 text-sm text-left text-fg-muted hover:text-fg-secondary hover-bg transition-base",children:"Clear filters"})]})]})]}),me.size>0&&e.jsxs("button",{onClick:()=>Y(!_),className:we(_,{color:"success",border:!0}),title:_?"Show all contacts":"Show only MeshCore neighbors (direct RF contact)",children:[e.jsx(he,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"hidden xl:inline",children:"Neighbors"})]})]}),e.jsx("div",{className:"h-4 w-px bg-border-subtle flex-shrink-0"}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[Nt.map(({field:s,icon:t,label:a})=>e.jsxs("button",{onClick:()=>Ge(s),className:we(E===s),title:`Sort by ${a.toLowerCase()}`,children:[e.jsx(t,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"hidden xl:inline",children:a}),E===s&&e.jsx(Ks,{className:ke("w-3 h-3",I==="asc"&&"rotate-180")})]},s)),e.jsx("div",{className:"h-4 w-px bg-border-subtle"}),e.jsxs(Cs,{value:M,onChange:We,className:"w-auto min-w-[50px] [&_button]:py-1 [&_button]:px-2 [&_button]:text-xs [&_button]:min-h-0","aria-label":"Items per page",children:[e.jsx(pe,{value:25,children:"25"}),e.jsx(pe,{value:50,children:"50"}),e.jsx(pe,{value:100,children:"100"}),e.jsx(pe,{value:0,children:"All"})]})]})]}),p.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hidden sm:grid contacts-grid-header border-b border-edge-subtle/50 px-3 py-2 type-micro text-fg-muted",children:[e.jsx("div",{className:"contacts-col-node",children:"Node"}),e.jsx("div",{className:"contacts-col-signal text-right",children:"Signal"}),e.jsx("div",{className:"contacts-col-distance text-right",children:"Distance"}),e.jsx("div",{className:"contacts-col-centrality text-right",children:"Centrality"}),e.jsx("div",{className:"contacts-col-seen text-right",children:"Last Seen"}),e.jsx("div",{className:"contacts-col-actions"})]}),e.jsx("div",{className:"divide-y divide-edge-subtle/30",children:_e.map(([s,t])=>{const a=ne(s),r=qe.has(s),c=me.has(s),l=de.get(s)??null,V=g.get(s)||0,b=c?Ue.get(s):void 0,S=a?Q.get(a)??null:null,O=N.get(s)??yt;let te=null;if(!c&&q&&h.size>0){const Ze=`${s}→${q}`,ue=h.get(Ze);if(ue&&ue.hops.length>0){const Pe=ue.hops[0],Re=Object.keys(le).find(es=>es.toUpperCase().startsWith(Pe.toUpperCase())),W=Re?le[Re]:null;te={prefix:Pe,name:(W==null?void 0:W.node_name)??(W==null?void 0:W.name)??null,hopCount:ue.hopCount}}}const xe=d.has(s),Je=Ve.get(s)??null;return e.jsx(jt,{hash:s,contact:t,isHub:r,isNeighbor:c,distance:l,centrality:V,sparklineData:O,neighborSignal:b,collisionInfo:S,isViterbiResolved:A,isPinging:P!==null,isPingingThis:P===s,pingResult:je.get(s),pingError:Ie.get(s),gatewayInfo:te,lastForwarderPrefix:Je,isMobile:xe,onRowClick:Qe,onPing:Xe,onRemove:Ye},s)})}),M>0&&U0&&Uce(s=>Math.min(s+M,p.length)),className:"text-sys-blue hover:text-sys-blue/80 transition-base",children:"Load more"})]})]}):e.jsxs("div",{className:"roster-empty",children:[e.jsx(ae,{className:"roster-empty-icon"}),e.jsx("div",{className:"type-label text-fg-secondary",children:"No Contacts Discovered"}),e.jsx("div",{className:"type-data-xs text-fg-muted mt-1",children:"Contacts will appear here as they advertise on the mesh network."})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-edge-subtle",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 rounded bg-elevated animate-pulse"}),e.jsx("div",{className:"w-32 h-4 rounded bg-elevated animate-pulse"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-16 h-6 rounded bg-elevated animate-pulse"}),e.jsx("div",{className:"w-24 h-6 rounded bg-elevated animate-pulse"}),e.jsx("div",{className:"w-16 h-6 rounded bg-elevated animate-pulse"})]})]}),e.jsx("div",{className:"px-3 py-3 space-y-3",children:[...Array(5)].map((s,t)=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-5 h-5 rounded bg-elevated animate-pulse"}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx("div",{className:"h-4 w-32 rounded bg-elevated animate-pulse"}),e.jsx("div",{className:"h-3 w-24 rounded bg-elevated animate-pulse"})]}),e.jsx("div",{className:"w-12 h-4 rounded bg-elevated animate-pulse"}),e.jsx("div",{className:"w-16 h-4 rounded bg-elevated animate-pulse"})]},t))})]})})]}),e.jsx(Vs,{isOpen:!!u,title:"Remove Contact",message:`Are you sure you would like to remove ${(u==null?void 0:u.name)||"this contact"}?`,confirmLabel:"Remove",cancelLabel:"Cancel",variant:"danger",onConfirm:()=>{u&&f(u.hash),K(null)},onCancel:()=>K(null)})]})}const Gt=Object.freeze(Object.defineProperty({__proto__:null,default:Ct},Symbol.toStringTag,{value:"Module"}));export{Gt as C,ht as P,De as R,dt as T}; + */const lt=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],dt=L("trending-down",lt);class mt extends n.Component{constructor(i){super(i),this.state={hasError:!1}}static getDerivedStateFromError(i){return{hasError:!0,error:i}}render(){var i;return this.state.hasError?e.jsx("div",{className:"map-container-16-9 flex items-center justify-center rounded-2xl surface-base",role:"alert","aria-live":"assertive",children:e.jsxs("div",{className:"text-center text-fg-muted p-4",children:[e.jsx("p",{className:"text-lg mb-2",children:"Map failed to load"}),e.jsx("p",{className:"text-sm text-fg-muted",children:((i=this.state.error)==null?void 0:i.message)||"Unknown error"}),e.jsx("p",{className:"text-xs text-fg-muted mt-2",children:"Try refreshing the page or check your browser's WebGL support."})]})}):this.props.children}}const xt=n.lazy(()=>ss(()=>import("./ContactsMapMapLibre-CuhX2ofh.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40])));function ut({neighbors:o,localNode:i,localHash:f,onRemoveNode:x,selectedNodeHash:g,onNodeSelected:y,highlightedEdgeKey:h,highlightedGhost:d}){return e.jsx(mt,{children:e.jsx(n.Suspense,{fallback:e.jsx("div",{className:"map-container-16-9 flex items-center justify-center rounded-2xl surface-base",role:"status","aria-live":"polite","aria-label":"Loading map",children:e.jsxs("div",{className:"text-fg-muted flex items-center gap-3",children:[e.jsx("div",{className:"w-5 h-5 border-2 border-sys-blue border-t-transparent rounded-full animate-spin","aria-hidden":"true"}),e.jsx("span",{children:"Loading map..."})]})}),children:e.jsx(xt,{neighbors:o,localNode:i,localHash:f,onRemoveNode:x,selectedNodeHash:g,onNodeSelected:y,highlightedEdgeKey:h,highlightedGhost:d})})})}function pt({hash:o,className:i="",size:f="sm",collisionInfo:x,isViterbiResolved:g}){const y=Ee(),h=Fe(),[d,H]=n.useState(!1),C=n.useMemo(()=>ne(o),[o]),T=n.useMemo(()=>x!==void 0?x:C?y.find(u=>u.prefix===C)??null:null,[C,y,x]),$=g??(h.totalPaths>0&&h.avgPathConfidence>=.7),z=n.useCallback(u=>{u.preventDefault(),u.stopPropagation(),H(!0)},[]),D=n.useCallback(()=>{H(!1)},[]);if(!T)return null;const N=f==="sm"?"w-3.5 h-3.5":"w-4 h-4",A=$?"text-sys-cyan hover:text-sys-cyan hover:bg-sys-cyan/10 focus:ring-sys-cyan/50":"text-signal-fair hover:text-sys-indigo hover:bg-signal-fair/10 focus:ring-signal-fair/50",Q=$?`Prefix conflict resolved by Viterbi HMM (${(h.avgPathConfidence*100).toFixed(0)}% confidence)`:`Prefix conflict: ${T.candidateCount} nodes share prefix "${C}"`;return e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:z,className:`inline-flex items-center justify-center p-0.5 rounded focus:outline-none focus:ring-2 transition-colors cursor-pointer touch-manipulation ${A} ${i}`,title:Q,"aria-label":`View prefix conflict for ${C}${$?" (Viterbi resolved)":""}`,children:$?e.jsxs("span",{className:"relative",children:[e.jsx(Hs,{className:N}),e.jsx(Ce,{className:"absolute -bottom-0.5 -right-0.5 w-2 h-2 text-sys-green"})]}):e.jsx(Zs,{className:N})}),e.jsx(Os,{isOpen:d,prefix:T.prefix,candidateHashes:T.candidateHashes,onClose:D})]})}const ht=n.memo(pt),Ae=[{target:"Contacts",fn:"name",minStage:1,when:Ss},{target:"Contacts",fn:"traceLinks.directed",minStage:2,when:_s}];Ps(Ae);function ft(o){return o<1e3?`${Math.round(o)}m`:`${(o/1e3).toFixed(1)}km`}function gt({hash:o,contact:i,isHub:f,isNeighbor:x,distance:g,centrality:y,sparklineData:h,neighborSignal:d,collisionInfo:H,isViterbiResolved:C,isPinging:T,isPingingThis:$,pingResult:z,pingError:D,gatewayInfo:N,lastForwarderPrefix:A,isMobile:Q,pathStability:u,onRowClick:K,onPing:E,onRemove:ge}){Ms(Ae);const I=i.latitude&&i.longitude&&i.latitude!==0&&i.longitude!==0,F=i.node_name||i.name||"Unknown",v=x&&d,re=Me(i),{isRepeater:_,isCompanion:Y,isRoomServer:j,isClient:X,label:J}=re,oe=x?`${J} — Direct RF contact (zero-hop neighbor)`:`${J} — Flood routing (multi-hop via mesh)`,Z=i.first_seen?Le(i.first_seen).replace(/ ago$/i," old"):null;return e.jsxs("div",{className:`contacts-grid-row ${f?"bg-sys-amber/5 border-l-2 border-l-sys-amber":""} ${I?"cursor-pointer hover:bg-subtle-fill":""}`,onClick:()=>K(o),children:[e.jsxs("div",{className:"contacts-col-node flex items-center gap-2 min-w-0",children:[v&&(d==null?void 0:d.avgSnr)!==null?e.jsx("div",{className:`w-2 h-2 rounded-full flex-shrink-0 self-center ${ts(d.avgSnr)}`}):e.jsx("div",{className:"w-2 flex-shrink-0"}),e.jsx("div",{className:"w-6 h-6 flex items-center justify-center flex-shrink-0",title:oe,children:(()=>{if(j&&_)return e.jsxs("div",{className:"relative w-5 h-5",children:[e.jsx(fe,{className:"w-5 h-5 absolute inset-0 text-sys-pink"}),e.jsx(zs,{className:"w-2.5 h-2.5 absolute -bottom-0.5 -right-0.5 text-sys-teal"})]});if(j)return e.jsx(fe,{className:"w-5 h-5 text-sys-pink"});if(_)return e.jsx("div",{className:"w-5 h-5 rounded-full flex items-center justify-center ring-[1.5px] ring-sys-blue",children:e.jsx(he,{className:"w-3.5 h-3.5 text-sys-blue"})});if((Y||X)&&F!=="Unknown"){const{emoji:w,cleanName:P}=Rs(F);return e.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center",style:{backgroundColor:Ls(P)},children:w?e.jsx("span",{className:"text-sm leading-none",children:w}):e.jsx("span",{className:"text-white text-[9px] font-bold tracking-tighter",children:Ts(F)})})}return e.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center bg-zinc-500/20",children:e.jsx(ze,{className:"w-3.5 h-3.5 text-sys-amber"})})})()}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 overflow-hidden",children:[e.jsx("span",{className:"roster-title truncate",title:F,children:F}),x&&e.jsx(k,{color:G.neighbor,compact:!0,className:"flex-shrink-0",children:"NBR"}),f&&e.jsxs(k,{color:G.hub,compact:!0,className:"flex items-center gap-1 flex-shrink-0",children:[e.jsx(Is,{className:"w-3 h-3"}),"HUB"]}),_&&e.jsx(k,{color:G.repeater,compact:!0,className:"flex-shrink-0",children:"RPT"}),j&&e.jsx(k,{color:G.room,compact:!0,className:"flex-shrink-0",children:"ROOM"}),Y&&e.jsx(k,{color:G.companion,compact:!0,className:"flex-shrink-0",children:"COMP"}),X&&e.jsx(k,{color:G.client,compact:!0,className:"flex-shrink-0",children:"CLIENT"}),Q&&e.jsxs(k,{color:"cyan",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0",children:[e.jsx(rt,{className:"w-2.5 h-2.5"}),"MOBILE"]}),!I&&e.jsx("span",{className:"flex items-center gap-0.5 flex-shrink-0 text-fg-muted/50",title:"No GPS location provided",children:e.jsx(at,{className:"w-3 h-3"})})]}),e.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[e.jsx(As,{copy:!0,size:"compact",truncate:[8,6],children:o}),e.jsx(ht,{hash:o,collisionInfo:H,isViterbiResolved:C}),!x&&N&&e.jsxs(k,{color:"zinc",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0",title:`Via ${N.name||N.prefix} (${N.hopCount} hop${N.hopCount!==1?"s":""})`,children:[e.jsx($s,{className:"w-2.5 h-2.5"}),e.jsx("span",{className:"font-mono",children:N.prefix}),N.hopCount>1&&e.jsxs("span",{className:"opacity-60",children:["+",N.hopCount-1]})]}),A&&!x&&e.jsxs(k,{color:"zinc",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0",title:`Last forwarded by ${A}`,children:[e.jsx(Gs,{className:"w-2.5 h-2.5"}),e.jsx("span",{className:"font-mono",children:A})]}),u!=null&&u!==0&&e.jsx(k,{color:u>0?"green":"amber",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0",title:u>0?"Path stability improving":"Path stability declining",children:u>0?e.jsx(as,{className:"w-2.5 h-2.5"}):e.jsx(dt,{className:"w-2.5 h-2.5"})}),h.length>0&&(()=>{const w=h.reduce((ie,je)=>ie+je.count,0);if(w===0)return null;const P=w/24;return e.jsxs(k,{color:"zinc",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0",title:`${w} packets in last 24h (~${P.toFixed(1)}/hr)`,children:[e.jsx(it,{className:"w-2.5 h-2.5"}),e.jsxs("span",{children:[P<1?"<1":P.toFixed(0),"/hr"]})]})})(),Z&&e.jsxs(k,{color:"zinc",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0 opacity-70",title:`First discovered ${Z}`,children:[e.jsx(Xs,{className:"w-2.5 h-2.5"}),e.jsx("span",{children:Z})]})]})]})]}),e.jsxs("div",{className:"contacts-col-signal flex items-center justify-end gap-2",children:[v&&(d==null?void 0:d.avgRssi)!==null&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Es,{rssi:d.avgRssi,className:"w-3.5 h-3.5"}),e.jsx("span",{className:"type-data-xs text-fg-muted",children:Math.round(d.avgRssi)})]}),v&&(d==null?void 0:d.avgSnr)!==null&&e.jsxs("span",{className:"type-data-xs text-fg-muted",children:[d.avgSnr.toFixed(1)," dB"]})]}),e.jsx("div",{className:"contacts-col-distance flex items-center justify-end gap-1 text-fg-muted",children:g!=null&&e.jsxs(e.Fragment,{children:[e.jsx(De,{className:"w-3 h-3"}),e.jsx("span",{className:"type-data-xs",children:ft(g)})]})}),e.jsx("div",{className:"contacts-col-centrality flex items-center justify-end gap-1",children:y>0&&e.jsxs(e.Fragment,{children:[e.jsx(He,{className:"w-3 h-3 text-sys-indigo"}),e.jsxs("span",{className:"type-data-xs text-fg-muted",children:[(y*100).toFixed(0),"%"]})]})}),e.jsx("div",{className:"contacts-col-seen flex items-center justify-end",children:e.jsx("span",{className:"type-data-xs text-fg-primary whitespace-nowrap",children:i.last_seen?Le(i.last_seen):"—"})}),e.jsxs("div",{className:"contacts-col-actions flex items-center justify-end gap-1",children:[x&&e.jsx(e.Fragment,{children:z?e.jsxs("div",{className:"flex items-center gap-1 text-sys-green",title:`RTT: ${z.rtt_ms.toFixed(0)}ms`,children:[e.jsx(Ce,{className:"w-3.5 h-3.5"}),e.jsxs("span",{className:"type-data-xs hidden sm:inline",children:[z.snr_db.toFixed(1),"dB"]})]}):D?e.jsx("span",{className:"text-sys-red text-xs",title:D,children:"✗"}):e.jsx("button",{onClick:w=>E(o,w),disabled:T,className:"p-1 sm:p-1.5 radius-inner text-fg-muted/50 hover:text-sys-blue hover:bg-sys-blue/10 transition-base disabled:opacity-50 disabled:cursor-not-allowed",title:"Ping neighbor for updated signal info",children:$?e.jsx(Oe,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 animate-spin"}):e.jsx(Ds,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4"})})}),e.jsx("button",{onClick:w=>{w.stopPropagation(),ge(o,F)},className:"p-1 sm:p-1.5 radius-inner text-fg-muted/50 hover:text-sys-red hover:bg-sys-red/10 transition-base",title:"Remove contact",children:e.jsx(Bs,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4"})})]})]})}const jt=n.memo(gt),bt=6371e3,yt=[],Nt=[{field:"lastHeard",icon:Fs,label:"Recent"},{field:"distance",icon:De,label:"Distance"},{field:"centrality",icon:He,label:"Centrality"}];function vt(o){switch(o){case"room_server":return"room";case"repeater":return"repeater";case"companion":return"companion";case"unknown":return"companion"}}function wt(o){const i=Me(o);return vt(i.type)}function we(o,i){const{color:f="primary",border:x=!1}=i??{};return ke("flex items-center gap-1.5 px-2 py-1.5 text-sm radius-inner transition-base",o?f==="success"?"bg-sys-green/20 text-sys-green":"bg-sys-blue/20 text-sys-blue":"text-fg-muted hover:text-fg-secondary hover-bg",x&&(o?f==="success"?"border border-sys-green/30":"border border-sys-blue/30":"border border-transparent"))}function kt(o,i,f,x){const g=(f-o)*Math.PI/180,y=(x-i)*Math.PI/180,h=Math.sin(g/2)*Math.sin(g/2)+Math.cos(o*Math.PI/180)*Math.cos(f*Math.PI/180)*Math.sin(y/2)*Math.sin(y/2),d=2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h));return bt*d}function Ct(){const{stats:o}=ns(),i=rs(),f=os(),x=is(),g=cs(),y=ls(),h=ds(),d=ms(),H=xs(),C=us(),T=ps(),$=ve[C],z=Ee(),D=Fe(),N=hs(),A=D.totalPaths>0&&D.avgPathConfidence>=.7,Q=n.useMemo(()=>{const s=new Map;for(const t of z)s.set(t.prefix,t);return s},[z]),[u,K]=n.useState(null),[E,ge]=n.useState("lastHeard"),[I,F]=n.useState("desc"),[v,re]=n.useState(""),[_,Y]=n.useState(!1),[j,X]=n.useState(new Set),[J,oe]=n.useState(!1),[Z,w]=n.useState(null),[P,ie]=n.useState(null),[je,be]=n.useState(new Map),[Ie,ee]=n.useState(new Map),[M,Be]=n.useState(25),[U,ce]=n.useState(25),ye=n.useRef(null),se=n.useMemo(()=>(o==null?void 0:o.neighbors)??{},[o==null?void 0:o.neighbors]),Ne=ys(),le=n.useMemo(()=>{if(Ne.size===0)return se;const s=new Set;for(const a of Object.keys(se))s.add((a.startsWith("0x")?a.slice(2):a).toLowerCase());let t=null;for(const[a,r]of Ne){const c=(a.startsWith("0x")?a.slice(2):a).toLowerCase();s.has(c)||(t||(t={...se}),t[a]={last_seen:r.lastSeen,name:r.name??void 0,node_name:r.name??void 0,latitude:r.latitude,longitude:r.longitude,is_repeater:r.nodeType==="repeater",contact_type:r.nodeType==="repeater"?"Repeater":r.nodeType==="companion"?"Companion":r.nodeType==="room_server"?"Room Server":void 0})}return t??se},[se,Ne]),B=n.useMemo(()=>{const t=Date.now()/1e3-$.minutes*60;return Object.fromEntries(Object.entries(le).filter(([a,r])=>i.has(a)?!1:(r.last_seen??0)>=t))},[le,i,$.minutes]),R=fs(),q=o==null?void 0:o.local_hash,Ve=n.useMemo(()=>{const s=new Map;if(!q||h.size===0)return s;for(const[t,a]of h)if(t.endsWith(`→${q}`)&&a.hops.length>1){const r=t.split("→")[0],c=a.hops[a.hops.length-1];s.set(r,c)}return s},[h,q]),de=n.useMemo(()=>{const s=new Map;if(!(R!=null&&R.latitude)||!(R!=null&&R.longitude))return s;for(const[t,a]of Object.entries(B))a.latitude&&a.longitude&&a.latitude!==0&&a.longitude!==0?s.set(t,kt(R.latitude,R.longitude,a.latitude,a.longitude)):s.set(t,null);return s},[B,R]),{neighborHashSet:me,neighborSignalMap:Ue}=n.useMemo(()=>{const s=new Set,t=new Map;for(const a of y)s.add(a.hash),t.set(a.hash,{avgRssi:a.avgRssi,avgSnr:a.avgSnr});return{neighborHashSet:s,neighborSignalMap:t}},[y]),Se=n.useMemo(()=>{const s=v.toLowerCase().trim(),t=s==="neighbor"||s==="neighbors",a=_||t,r=j.size>0;return Object.fromEntries(Object.entries(B).filter(([c,l])=>{if(r){const S=wt(l);if(!j.has(S))return!1}if(a&&!me.has(c))return!1;if(t||!s)return!0;const V=(l.node_name||l.name||"").toLowerCase(),b=ne(c).toLowerCase();return V.includes(s)||b.includes(s)||c.toLowerCase().includes(s)}))},[B,v,_,me,j]),p=n.useMemo(()=>{const s=Object.entries(Se),t=v.toLowerCase().trim(),a=t.length===2&&/^[0-9a-f]{2}$/i.test(t);return s.sort(([r,c],[l,V])=>{if(a){const S=ne(r).toLowerCase(),O=ne(l).toLowerCase(),te=S===t,xe=O===t;if(te&&!xe)return-1;if(xe&&!te)return 1}let b=0;switch(E){case"lastHeard":b=(c.last_seen||0)-(V.last_seen||0);break;case"distance":{const S=de.get(r)??null,O=de.get(l)??null;S===null&&O===null?b=0:S===null?b=1:O===null?b=-1:b=S-O;break}case"centrality":{const S=g.get(r)||0,O=g.get(l)||0;b=S-O;break}}return I==="desc"?-b:b})},[Se,E,I,de,g,v]),m=n.useMemo(()=>{let s=0,t=0,a=0,r=0,c=0;for(const[,l]of p){const V=Me(l),b=l.latitude&&l.longitude&&l.latitude!==0&&l.longitude!==0;switch(V.type){case"room_server":a++;break;case"repeater":t++;break;case"companion":s++;break;case"unknown":c++;break}b&&r++}return{companions:s,repeaters:t,roomServers:a,total:p.length,withLocation:r,unknown:c}},[p]),qe=n.useMemo(()=>new Set(x),[x]),_e=n.useMemo(()=>M===0?p:p.slice(0,U),[p,U,M]);n.useEffect(()=>{ce(M||p.length)},[E,I,v,_,j,M,p.length]),n.useEffect(()=>{const s=t=>{t.target.closest("[data-dropdown]")||oe(!1)};return document.addEventListener("click",s),()=>document.removeEventListener("click",s)},[]),n.useEffect(()=>{if(M===0)return;const s=new IntersectionObserver(t=>{t[0].isIntersecting&&UMath.min(a+M,p.length))},{threshold:.1,rootMargin:"100px"});return ye.current&&s.observe(ye.current),()=>s.disconnect()},[M,U,p.length]);const We=n.useCallback(s=>{Be(s),ce(s||p.length)},[p.length]),Ge=n.useCallback(s=>{E===s?F(t=>t==="desc"?"asc":"desc"):(ge(s),F("desc"))},[E]),Qe=n.useCallback(s=>{const t=B[s];t!=null&&t.latitude&&(t!=null&&t.longitude)&&t.latitude!==0&&t.longitude!==0&&w(s)},[B]),Ke=n.useCallback(()=>{w(null)},[]),Ye=n.useCallback((s,t)=>{K({hash:s,name:t})},[]),Xe=n.useCallback(async(s,t)=>{if(t.stopPropagation(),!P){ie(s),be(a=>{const r=new Map(a);return r.delete(s),r}),ee(a=>{const r=new Map(a);return r.delete(s),r});try{const a=s.startsWith("0x")?s.slice(0,4):`0x${s.slice(0,2)}`,r=await Ns(a,30);r.success&&r.data?(be(c=>new Map(c).set(s,r.data)),setTimeout(()=>{be(c=>{const l=new Map(c);return l.delete(s),l})},1e4)):(ee(c=>new Map(c).set(s,r.error||"Ping failed")),setTimeout(()=>{ee(c=>{const l=new Map(c);return l.delete(s),l})},5e3))}catch(a){const r=a instanceof Error?a.message:"Ping failed";ee(c=>new Map(c).set(s,r)),setTimeout(()=>{ee(c=>{const l=new Map(c);return l.delete(s),l})},5e3)}finally{ie(null)}}},[P]);return e.jsxs(vs,{children:[e.jsx(ws,{title:"Contacts",icon:e.jsx(ae,{}),controls:e.jsxs("div",{className:"flex items-center gap-3 sm:gap-5",children:[e.jsxs("div",{className:"hidden sm:flex items-center gap-4",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Total:"}),e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:`${m.total} discovered node${m.total!==1?"s":""} on the mesh network`,children:[e.jsx(ae,{className:"w-3.5 h-3.5 text-fg-secondary"}),e.jsx("span",{children:m.total})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Types:"}),m.repeaters>0&&e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:"Repeaters",children:[e.jsx(he,{className:"w-3.5 h-3.5 text-sys-blue"}),e.jsx("span",{children:m.repeaters})]}),m.companions>0&&e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:"Companions",children:[e.jsx($e,{className:"w-3.5 h-3.5 text-fg-muted"}),e.jsx("span",{children:m.companions})]}),m.roomServers>0&&e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:"Room Servers",children:[e.jsx(fe,{className:"w-3.5 h-3.5 text-sys-pink"}),e.jsx("span",{children:m.roomServers})]}),m.withLocation>0&&e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:"With GPS location",children:[e.jsx(Us,{className:"w-3.5 h-3.5 text-sys-green"}),e.jsx("span",{children:m.withLocation})]}),m.unknown>0&&e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:"Unknown type",children:[e.jsx(ze,{className:"w-3.5 h-3.5 text-sys-amber"}),e.jsx("span",{children:m.unknown})]})]})]}),e.jsxs("div",{className:"flex sm:hidden items-center gap-1.5",children:[e.jsxs("span",{className:"data-box !px-1.5 !py-0.5 !text-[10px] flex items-center gap-1",children:[e.jsx(ae,{className:"w-3 h-3 text-fg-secondary"}),e.jsx("span",{children:m.total})]}),m.repeaters>0&&e.jsxs("span",{className:"data-box !px-1.5 !py-0.5 !text-[10px] flex items-center gap-1",children:[e.jsx(he,{className:"w-3 h-3 text-sys-blue"}),e.jsx("span",{children:m.repeaters})]}),m.companions>0&&e.jsxs("span",{className:"data-box !px-1.5 !py-0.5 !text-[10px] flex items-center gap-1",children:[e.jsx($e,{className:"w-3 h-3 text-fg-muted"}),e.jsx("span",{children:m.companions})]}),m.roomServers>0&&e.jsxs("span",{className:"data-box !px-1.5 !py-0.5 !text-[10px] flex items-center gap-1",children:[e.jsx(fe,{className:"w-3 h-3 text-sys-pink"}),e.jsx("span",{children:m.roomServers})]}),e.jsx(Te,{ranges:ve,selectedIndex:C,onSelect:T,size:"sm"})]}),e.jsx("div",{className:"hidden sm:block",children:e.jsx(Te,{ranges:ve,selectedIndex:C,onSelect:T})})]})}),e.jsxs(ks,{children:[H?e.jsx(ut,{neighbors:B,localNode:R??void 0,localHash:q,onRemoveNode:f,selectedNodeHash:Z,onNodeSelected:Ke}):e.jsx("div",{className:"surface-base radius-card aspect-video flex items-center justify-center",children:e.jsxs("div",{className:"flex flex-col items-center gap-3",children:[e.jsx("div",{className:"w-6 h-6 border-2 border-sys-blue border-t-transparent rounded-full animate-spin"}),e.jsx("span",{className:"text-sm text-fg-muted",children:"Loading map..."})]})}),e.jsx(gs,{noPadding:!0,children:H?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 px-3 sm:px-4 py-2.5 border-b border-edge-subtle",children:[e.jsx("span",{className:"icon-md flex items-center justify-center text-icon-card-title flex-shrink-0",children:e.jsx(ae,{})}),e.jsx("span",{className:"type-micro flex-shrink-0 mr-auto hidden sm:block",children:"Discovered Contacts"}),e.jsx(js,{type:"search",size:"sm",value:v,onChange:s=>re(s.target.value),placeholder:"Search...",leadingIcon:e.jsx(qs,{className:"w-3.5 h-3.5"}),trailingIcon:v?e.jsx("button",{onClick:()=>{re(""),(v.toLowerCase().trim()==="neighbor"||v.toLowerCase().trim()==="neighbors")&&Y(!1)},className:"text-fg-muted hover:text-fg-secondary",children:e.jsx(bs,{className:"w-3 h-3"})}):void 0,className:"w-24 sm:w-32 xl:w-44","aria-label":"Search contacts"}),e.jsx("div",{className:"h-4 w-px bg-border-subtle flex-shrink-0"}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[e.jsxs("div",{className:"relative","data-dropdown":!0,children:[e.jsxs("button",{onClick:()=>oe(!J),className:we(j.size>0,{border:!0}),title:"Filter by contact type",children:[e.jsx(st,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"hidden xl:inline",children:"Filter"}),j.size>0&&e.jsx("span",{className:"tabular-nums text-xs bg-sys-blue/30 px-1 rounded",children:j.size})]}),J&&e.jsxs("div",{className:"absolute right-0 top-full mt-1 z-50 surface-elevated radius-inner py-1 min-w-[140px]",children:[[{key:"repeater",label:"Repeaters"},{key:"companion",label:"Companions"},{key:"room",label:"Rooms"}].map(({key:s,label:t})=>e.jsxs("button",{onClick:()=>{X(a=>{const r=new Set(a);return r.has(s)?r.delete(s):r.add(s),r})},className:"w-full px-3 py-1.5 text-sm text-left hover-bg transition-base flex items-center gap-2",children:[e.jsx("span",{className:ke("w-4 h-4 flex items-center justify-center radius-badge border",j.has(s)?"bg-sys-blue border-sys-blue text-white":"border-edge-subtle"),children:j.has(s)&&e.jsx(Ce,{className:"w-3 h-3"})}),e.jsx("span",{className:j.has(s)?"text-fg-primary":"text-fg-secondary",children:t})]},s)),j.size>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"border-t border-edge-subtle my-1"}),e.jsx("button",{onClick:()=>X(new Set),className:"w-full px-3 py-1.5 text-sm text-left text-fg-muted hover:text-fg-secondary hover-bg transition-base",children:"Clear filters"})]})]})]}),me.size>0&&e.jsxs("button",{onClick:()=>Y(!_),className:we(_,{color:"success",border:!0}),title:_?"Show all contacts":"Show only MeshCore neighbors (direct RF contact)",children:[e.jsx(he,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"hidden xl:inline",children:"Neighbors"})]})]}),e.jsx("div",{className:"h-4 w-px bg-border-subtle flex-shrink-0"}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[Nt.map(({field:s,icon:t,label:a})=>e.jsxs("button",{onClick:()=>Ge(s),className:we(E===s),title:`Sort by ${a.toLowerCase()}`,children:[e.jsx(t,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"hidden xl:inline",children:a}),E===s&&e.jsx(Ks,{className:ke("w-3 h-3",I==="asc"&&"rotate-180")})]},s)),e.jsx("div",{className:"h-4 w-px bg-border-subtle"}),e.jsxs(Cs,{value:M,onChange:We,className:"w-auto min-w-[50px] [&_button]:py-1 [&_button]:px-2 [&_button]:text-xs [&_button]:min-h-0","aria-label":"Items per page",children:[e.jsx(pe,{value:25,children:"25"}),e.jsx(pe,{value:50,children:"50"}),e.jsx(pe,{value:100,children:"100"}),e.jsx(pe,{value:0,children:"All"})]})]})]}),p.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hidden sm:grid contacts-grid-header border-b border-edge-subtle/50 px-3 py-2 type-micro text-fg-muted",children:[e.jsx("div",{className:"contacts-col-node",children:"Node"}),e.jsx("div",{className:"contacts-col-signal text-right",children:"Signal"}),e.jsx("div",{className:"contacts-col-distance text-right",children:"Distance"}),e.jsx("div",{className:"contacts-col-centrality text-right",children:"Centrality"}),e.jsx("div",{className:"contacts-col-seen text-right",children:"Last Seen"}),e.jsx("div",{className:"contacts-col-actions"})]}),e.jsx("div",{className:"divide-y divide-edge-subtle/30",children:_e.map(([s,t])=>{const a=ne(s),r=qe.has(s),c=me.has(s),l=de.get(s)??null,V=g.get(s)||0,b=c?Ue.get(s):void 0,S=a?Q.get(a)??null:null,O=N.get(s)??yt;let te=null;if(!c&&q&&h.size>0){const Ze=`${s}→${q}`,ue=h.get(Ze);if(ue&&ue.hops.length>0){const Pe=ue.hops[0],Re=Object.keys(le).find(es=>es.toUpperCase().startsWith(Pe.toUpperCase())),W=Re?le[Re]:null;te={prefix:Pe,name:(W==null?void 0:W.node_name)??(W==null?void 0:W.name)??null,hopCount:ue.hopCount}}}const xe=d.has(s),Je=Ve.get(s)??null;return e.jsx(jt,{hash:s,contact:t,isHub:r,isNeighbor:c,distance:l,centrality:V,sparklineData:O,neighborSignal:b,collisionInfo:S,isViterbiResolved:A,isPinging:P!==null,isPingingThis:P===s,pingResult:je.get(s),pingError:Ie.get(s),gatewayInfo:te,lastForwarderPrefix:Je,isMobile:xe,onRowClick:Qe,onPing:Xe,onRemove:Ye},s)})}),M>0&&U0&&Uce(s=>Math.min(s+M,p.length)),className:"text-sys-blue hover:text-sys-blue/80 transition-base",children:"Load more"})]})]}):e.jsxs("div",{className:"roster-empty",children:[e.jsx(ae,{className:"roster-empty-icon"}),e.jsx("div",{className:"type-label text-fg-secondary",children:"No Contacts Discovered"}),e.jsx("div",{className:"type-data-xs text-fg-muted mt-1",children:"Contacts will appear here as they advertise on the mesh network."})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-edge-subtle",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 rounded bg-elevated animate-pulse"}),e.jsx("div",{className:"w-32 h-4 rounded bg-elevated animate-pulse"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-16 h-6 rounded bg-elevated animate-pulse"}),e.jsx("div",{className:"w-24 h-6 rounded bg-elevated animate-pulse"}),e.jsx("div",{className:"w-16 h-6 rounded bg-elevated animate-pulse"})]})]}),e.jsx("div",{className:"px-3 py-3 space-y-3",children:[...Array(5)].map((s,t)=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-5 h-5 rounded bg-elevated animate-pulse"}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx("div",{className:"h-4 w-32 rounded bg-elevated animate-pulse"}),e.jsx("div",{className:"h-3 w-24 rounded bg-elevated animate-pulse"})]}),e.jsx("div",{className:"w-12 h-4 rounded bg-elevated animate-pulse"}),e.jsx("div",{className:"w-16 h-4 rounded bg-elevated animate-pulse"})]},t))})]})})]}),e.jsx(Vs,{isOpen:!!u,title:"Remove Contact",message:`Are you sure you would like to remove ${(u==null?void 0:u.name)||"this contact"}?`,confirmLabel:"Remove",cancelLabel:"Cancel",variant:"danger",onConfirm:()=>{u&&f(u.hash),K(null)},onCancel:()=>K(null)})]})}const Gt=Object.freeze(Object.defineProperty({__proto__:null,default:Ct},Symbol.toStringTag,{value:"Module"}));export{Gt as C,ht as P,De as R,dt as T}; diff --git a/frontend/dist/assets/ContactsMapMapLibre-DueKTWML.js b/frontend/dist/assets/ContactsMapMapLibre-CuhX2ofh.js similarity index 99% rename from frontend/dist/assets/ContactsMapMapLibre-DueKTWML.js rename to frontend/dist/assets/ContactsMapMapLibre-CuhX2ofh.js index f23fd748..06b09dfc 100644 --- a/frontend/dist/assets/ContactsMapMapLibre-DueKTWML.js +++ b/frontend/dist/assets/ContactsMapMapLibre-CuhX2ofh.js @@ -1,4 +1,4 @@ -import{d as L0,_ as ta,r as R,fg as ra,cW as e0,Z as j0,fh as Fo,fi as gs,fj as na,bG as oa,bM as ia,j as p,bO as sa,c as I0,a0 as ps,m as u0,ae as ys,A as R0,b as Ur,B as Ot,cX as la,bI as so,M as Po,S as Qo,cN as xs,L as Oo,bh as ws,ac as aa,R as vs,bc as dn,ad as ua,w as zo,b8 as gi,fk as ks,y as ca,E as fa,cV as ha,fl as da,a9 as bs,bj as pi,bl as ma,x as Ho,bK as ga,aD as pa,ed as Cs,fm as ya,bP as xa,fn as wa,fo as Es,$ as hn,b_ as va,fp as Ss,fq as ka,fr as ba,ah as Ms,q as y0,fs as Bs,by as Ca,fe as Ea,bB as Sa,cL as Ds,cO as Ma,H as Ba,ft as Da,ep as _a,fu as lo}from"./index-CLIbpHvY.js";import{u as _s,b as Ar,S as X0,L as t0,P as Ta,c as Ra,M as ja,d as Ia,B as La}from"./BasemapLayer-B74HwKhL.js";import{u as Ts,r as Rs,e as yi,f as xi,g as Na}from"./consumer-registry-BrRzRPA2.js";import{L as On,c as Fa}from"./link-scoring-CJzUavtn.js";import{T as Go,C as Pa}from"./ConfirmModal-DeWu6kFs.js";import{b as Qa,e as Oa,a as js,m as wi,f as za,d as Ha,M as Ga,g as Ua,E as Va,u as Wa,G as Ya,h as Ka,i as Za,j as $a,D as qa}from"./DeepAnalysisModal-lreaW1Hc.js";import{H as Ja,A as un,Z as Xa,D as vi,p as Au,c as eu,u as ur}from"./useMapViewStore-CoIRBkXg.js";import{R as Is}from"./refresh-cw-D45udn5T.js";import{E as Ls}from"./target-5eLsI-iM.js";import{F as tu}from"./funnel-D8VczAEU.js";import{P as ru}from"./plus-C2Nq-iqX.js";import{C as nu,a as Ns,b as ko,c as ou}from"./easing-jK46ZwcK.js";import{D as iu}from"./download-DQJBs0xV.js";import{W as su}from"./wifi-B8_91QkI.js";import{C as Fs}from"./SignalIndicator-BGst_xwg.js";import{C as lu}from"./chevron-right-tyotcuUX.js";import{T as au,P as uu,R as cu}from"./Contacts-JLJkW45E.js";import{c as fu}from"./node-types-CFhZT1Jq.js";import{H as ki,C as Lr,N as hu,a as du}from"./badge-colors-BNUqIXCA.js";import{L as mu}from"./LightSparkline-YdYUoL-i.js";import{M as gu}from"./map-pin-oP9EChoI.js";import"./triangle-alert-BPXHBOYA.js";import"./database-idkjcnGz.js";import"./index-EpCuPFqY.js";import"./usePipelineStore-7L_PlMjP.js";import"./ping-DgP-6H7e.js";import"./PageLayout-9SoN_daN.js";import"./listbox-fatOHbDc.js";import"./element-movement-CTWmC4Se.js";import"./TimeRangeStepper-r-j5VisG.js";import"./chat-utils-C0FWA6kK.js";import"./CollisionExplorerModal-CrEVRFBy.js";import"./monitor-smartphone-B5v3E3uQ.js";import"./DataBox-ChuBU2q7.js";import"./circle-question-mark-CW0NICCZ.js";import"./network-fMhgmV5F.js";import"./activity-DBVB1w-E.js";import"./search-D-1ih5Lf.js";/** +import{d as L0,_ as ta,r as R,fg as ra,cW as e0,Z as j0,fh as Fo,fi as gs,fj as na,bG as oa,bM as ia,j as p,bO as sa,c as I0,a0 as ps,m as u0,ae as ys,A as R0,b as Ur,B as Ot,cX as la,bI as so,M as Po,S as Qo,cN as xs,L as Oo,bh as ws,ac as aa,R as vs,bc as dn,ad as ua,w as zo,b8 as gi,fk as ks,y as ca,E as fa,cV as ha,fl as da,a9 as bs,bj as pi,bl as ma,x as Ho,bK as ga,aD as pa,ed as Cs,fm as ya,bP as xa,fn as wa,fo as Es,$ as hn,b_ as va,fp as Ss,fq as ka,fr as ba,ah as Ms,q as y0,fs as Bs,by as Ca,fe as Ea,bB as Sa,cL as Ds,cO as Ma,H as Ba,ft as Da,ep as _a,fu as lo}from"./index-2YU-f7O7.js";import{u as _s,b as Ar,S as X0,L as t0,P as Ta,c as Ra,M as ja,d as Ia,B as La}from"./BasemapLayer-CZ0EXyx3.js";import{u as Ts,r as Rs,e as yi,f as xi,g as Na}from"./consumer-registry-BaTbQUiU.js";import{L as On,c as Fa}from"./link-scoring-CPozN6Pj.js";import{T as Go,C as Pa}from"./ConfirmModal-DkHVYuoH.js";import{b as Qa,e as Oa,a as js,m as wi,f as za,d as Ha,M as Ga,g as Ua,E as Va,u as Wa,G as Ya,h as Ka,i as Za,j as $a,D as qa}from"./DeepAnalysisModal-DlQPOGxT.js";import{H as Ja,A as un,Z as Xa,D as vi,p as Au,c as eu,u as ur}from"./useMapViewStore-Ce8IV--K.js";import{R as Is}from"./refresh-cw-CWeSjq0l.js";import{E as Ls}from"./target-IYsU06YN.js";import{F as tu}from"./funnel-D7UU9v8s.js";import{P as ru}from"./plus-Ci6eVmWj.js";import{C as nu,a as Ns,b as ko,c as ou}from"./easing-DxQTD0NL.js";import{D as iu}from"./download-Dpt6RSjP.js";import{W as su}from"./wifi-DFxu_Y_e.js";import{C as Fs}from"./SignalIndicator-CZkLIt0w.js";import{C as lu}from"./chevron-right-DwaXNeO4.js";import{T as au,P as uu,R as cu}from"./Contacts-ghJ-BFN_.js";import{c as fu}from"./node-types--B4HRIdZ.js";import{H as ki,C as Lr,N as hu,a as du}from"./badge-colors-BNUqIXCA.js";import{L as mu}from"./LightSparkline-CV6le7Ch.js";import{M as gu}from"./map-pin-DwpgbaSS.js";import"./triangle-alert-il1la-RI.js";import"./database-1_qMqgVS.js";import"./index-rOrsjUFs.js";import"./usePipelineStore-D-0Ba45c.js";import"./ping-6o6GOZ8c.js";import"./PageLayout-tvsYvfyL.js";import"./listbox-CrjQSTKJ.js";import"./element-movement-Bhgekpql.js";import"./TimeRangeStepper--TSSRhtK.js";import"./chat-utils-zf_UbwVO.js";import"./CollisionExplorerModal-CKdqxCu4.js";import"./monitor-smartphone-BbnIneu-.js";import"./DataBox-D8nJsUbV.js";import"./circle-question-mark-BpV3PDV1.js";import"./network-BfJPFeB2.js";import"./activity-BgtT9aiG.js";import"./search-5bBDdD-8.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/Dashboard-Dq25iQxJ.js b/frontend/dist/assets/Dashboard-BIy4A1QU.js similarity index 97% rename from frontend/dist/assets/Dashboard-Dq25iQxJ.js rename to frontend/dist/assets/Dashboard-BIy4A1QU.js index 56e5795b..a265e1b9 100644 --- a/frontend/dist/assets/Dashboard-Dq25iQxJ.js +++ b/frontend/dist/assets/Dashboard-BIy4A1QU.js @@ -1,4 +1,4 @@ -import{d as A,e as st,r as f,j as e,A as Re,m as Q,S as nt,M as at,U as ot,f as it,h as rt,k as lt,n as ct,o as H,p as ue,q as U,t as dt,v as mt,w as be,x as ut,L as ee,y as G,z as xt,D as ht,E as te,F as Be,T as ft,G as pt,B as je,R as Le,H as Fe,J as gt,K as X,N as P,O as yt,P as bt,Q as jt,V as Nt,W as vt,X as wt,Y as ne,u as xe,_ as kt,$ as Ne,a0 as ae,a1 as K,a2 as Mt,a3 as J,a4 as Ct,a5 as Tt,a6 as St,a7 as ve,a8 as _t,c as F,a9 as Dt,aa as Pe,ab as we,ac as Rt,ad as Bt,ae as Lt,af as Ft,ag as Pt,ah as At,ai as $t}from"./index-CLIbpHvY.js";import{C as ke,P as Et,a as Ht,B as It}from"./PageLayout-9SoN_daN.js";import{u as I,r as O,h as Ot,a as zt,b as Wt,i as qt}from"./consumer-registry-BrRzRPA2.js";import{A as V,E as Ut}from"./AnimatedNumber-BrwtCO17.js";import{c as Vt}from"./node-types-CFhZT1Jq.js";import{b as Ae,c as q,a as Gt,d as Xt,F as Z}from"./meshcore-tx-constants-DgpFTAmf.js";import{S as Yt,u as ce,P as Kt,T as Jt,C as $e,a as Zt}from"./PacketList-CYo0ntr7.js";import{useGetDecodedContent as Qt,useResolveSource as es}from"./usePipelineStore-7L_PlMjP.js";import{A as Me}from"./SignalIndicator-BGst_xwg.js";import{T as Ee}from"./TimeRangeStepper-r-j5VisG.js";import{L as he}from"./LightSparkline-YdYUoL-i.js";import{c as ts}from"./link-scoring-CJzUavtn.js";import{Z as ss,H as ns}from"./useMapViewStore-CoIRBkXg.js";import{N as as}from"./NodeInformationCard-BEL_UTIo.js";import{g as os,e as oe,a as is,f as rs}from"./chat-utils-C0FWA6kK.js";import{M as He,C as ls}from"./ChatBubble-DRf3s2tk.js";import{C as Ce}from"./chevron-right-tyotcuUX.js";import{H as cs}from"./hash-Cd1zCpVV.js";import{R as ie,C as re}from"./Grid-Di163a6N.js";import"./index-EpCuPFqY.js";import"./primitives-CZFN5gGO.js";import"./payload-decoders-BsVy7I3_.js";import"./badge-colors-BNUqIXCA.js";import"./arrow-up-Dw_1quvK.js";import"./map-pin-oP9EChoI.js";import"./circle-question-mark-CW0NICCZ.js";import"./triangle-alert-BPXHBOYA.js";import"./DataBox-ChuBU2q7.js";import"./layers-DTsYQqst.js";import"./activity-DBVB1w-E.js";import"./circle-check-BA0O7QIB.js";import"./database-idkjcnGz.js";import"./shield-hk2V-Q9a.js";/** +import{d as A,e as st,r as f,j as e,A as Re,m as Q,S as nt,M as at,U as ot,f as it,h as rt,k as lt,n as ct,o as H,p as ue,q as U,t as dt,v as mt,w as be,x as ut,L as ee,y as G,z as xt,D as ht,E as te,F as Be,T as ft,G as pt,B as je,R as Le,H as Fe,J as gt,K as X,N as P,O as yt,P as bt,Q as jt,V as Nt,W as vt,X as wt,Y as ne,u as xe,_ as kt,$ as Ne,a0 as ae,a1 as K,a2 as Mt,a3 as J,a4 as Ct,a5 as Tt,a6 as St,a7 as ve,a8 as _t,c as F,a9 as Dt,aa as Pe,ab as we,ac as Rt,ad as Bt,ae as Lt,af as Ft,ag as Pt,ah as At,ai as $t}from"./index-2YU-f7O7.js";import{C as ke,P as Et,a as Ht,B as It}from"./PageLayout-tvsYvfyL.js";import{u as I,r as O,h as Ot,a as zt,b as Wt,i as qt}from"./consumer-registry-BaTbQUiU.js";import{A as V,E as Ut}from"./AnimatedNumber-CKwUUwqJ.js";import{c as Vt}from"./node-types--B4HRIdZ.js";import{b as Ae,c as q,a as Gt,d as Xt,F as Z}from"./meshcore-tx-constants-DgpFTAmf.js";import{S as Yt,u as ce,P as Kt,T as Jt,C as $e,a as Zt}from"./PacketList-BhefpQer.js";import{useGetDecodedContent as Qt,useResolveSource as es}from"./usePipelineStore-D-0Ba45c.js";import{A as Me}from"./SignalIndicator-CZkLIt0w.js";import{T as Ee}from"./TimeRangeStepper--TSSRhtK.js";import{L as he}from"./LightSparkline-CV6le7Ch.js";import{c as ts}from"./link-scoring-CPozN6Pj.js";import{Z as ss,H as ns}from"./useMapViewStore-Ce8IV--K.js";import{N as as}from"./NodeInformationCard-xEgWVu4P.js";import{g as os,e as oe,a as is,f as rs}from"./chat-utils-zf_UbwVO.js";import{M as He,C as ls}from"./ChatBubble-B-vyhm2S.js";import{C as Ce}from"./chevron-right-DwaXNeO4.js";import{H as cs}from"./hash-DswdBqT-.js";import{R as ie,C as re}from"./Grid-BUbHrfD3.js";import"./index-rOrsjUFs.js";import"./primitives-DMQ-qQ8e.js";import"./payload-decoders-BzIXzxqW.js";import"./badge-colors-BNUqIXCA.js";import"./arrow-up-BCJu40uf.js";import"./map-pin-DwpgbaSS.js";import"./circle-question-mark-BpV3PDV1.js";import"./triangle-alert-il1la-RI.js";import"./DataBox-D8nJsUbV.js";import"./layers-7MoN93tY.js";import"./activity-BgtT9aiG.js";import"./circle-check-CMy_4dWl.js";import"./database-1_qMqgVS.js";import"./shield-Cg8ViVBZ.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/DataBox-ChuBU2q7.js b/frontend/dist/assets/DataBox-D8nJsUbV.js similarity index 97% rename from frontend/dist/assets/DataBox-ChuBU2q7.js rename to frontend/dist/assets/DataBox-D8nJsUbV.js index e503ac8d..88ca0b05 100644 --- a/frontend/dist/assets/DataBox-ChuBU2q7.js +++ b/frontend/dist/assets/DataBox-D8nJsUbV.js @@ -1 +1 @@ -import{r as u,j as a,c as r,w as T,x as N}from"./index-CLIbpHvY.js";const E={standard:"w-3 h-3",compact:"w-2.5 h-2.5",responsive:"w-2.5 h-2.5 sm:w-3 sm:h-3"};function k(t){var s;if(typeof window<"u"&&(window.isSecureContext||window.location.protocol==="https:"||window.location.hostname==="localhost")&&((s=navigator.clipboard)!=null&&s.writeText))return navigator.clipboard.writeText(t).catch(()=>{}),!0;try{const{scrollX:o,scrollY:i}=window,e=document.createElement("textarea");e.value=t,e.style.cssText="position:fixed;left:-9999px;top:-9999px;opacity:0;pointer-events:none",e.setAttribute("readonly",""),document.body.appendChild(e),e.focus({preventScroll:!0}),e.select(),e.setSelectionRange(0,t.length);const l=document.execCommand("copy");return document.body.removeChild(e),window.scrollTo(o,i),l}catch(o){return console.error("Copy failed:",o),!1}}function $({children:t,copyValue:x,copy:s=!1,size:o="standard",className:i,title:e,color:l,truncate:d}){const[m,y]=u.useState(!1),[S,w]=u.useState(!1),f=u.useRef(null),c=x??(typeof t=="string"?t:""),C=E[o],h=(()=>{if(!d||typeof t!="string")return t;const n=t,[p,g]=d===!0?[6,4]:d;return n.length<=p+g+3?n:`${n.slice(0,p)}…${n.slice(-g)}`})(),j=u.useCallback(n=>{if(!s)return;n.preventDefault(),n.stopPropagation(),f.current&&clearTimeout(f.current);const p=k(c);y(!0),f.current=setTimeout(()=>y(!1),2e3),p||console.warn("Copy may have failed for:",c.slice(0,16)+"...")},[s,c]),v=o==="compact"?"data-box-compact":o==="responsive"?"data-box-responsive":"",b=s?e||`Click to copy: ${c}`:e;return s?a.jsxs("button",{type:"button",onClick:j,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),className:r("data-box interactive",v,"cursor-pointer select-none gap-1","hover-bg",l,i),title:b,"aria-label":`Copy ${c}`,children:[a.jsx("span",{className:r("transition-colors duration-200",m?"text-sys-green":""),children:h}),a.jsx("span",{className:r("flex items-center justify-center",o==="compact"?"w-3 h-3":"w-3.5 h-3.5"),children:m?a.jsx(T,{className:r("text-sys-green",C)}):a.jsx(N,{className:r("transition-opacity duration-200",S?"opacity-70":"opacity-40",C)})})]}):a.jsx("span",{className:r("data-box",v,l,i),title:b,children:h})}export{$ as D}; +import{r as u,j as a,c as r,w as T,x as N}from"./index-2YU-f7O7.js";const E={standard:"w-3 h-3",compact:"w-2.5 h-2.5",responsive:"w-2.5 h-2.5 sm:w-3 sm:h-3"};function k(t){var s;if(typeof window<"u"&&(window.isSecureContext||window.location.protocol==="https:"||window.location.hostname==="localhost")&&((s=navigator.clipboard)!=null&&s.writeText))return navigator.clipboard.writeText(t).catch(()=>{}),!0;try{const{scrollX:o,scrollY:i}=window,e=document.createElement("textarea");e.value=t,e.style.cssText="position:fixed;left:-9999px;top:-9999px;opacity:0;pointer-events:none",e.setAttribute("readonly",""),document.body.appendChild(e),e.focus({preventScroll:!0}),e.select(),e.setSelectionRange(0,t.length);const l=document.execCommand("copy");return document.body.removeChild(e),window.scrollTo(o,i),l}catch(o){return console.error("Copy failed:",o),!1}}function $({children:t,copyValue:x,copy:s=!1,size:o="standard",className:i,title:e,color:l,truncate:d}){const[m,y]=u.useState(!1),[S,w]=u.useState(!1),f=u.useRef(null),c=x??(typeof t=="string"?t:""),C=E[o],h=(()=>{if(!d||typeof t!="string")return t;const n=t,[p,g]=d===!0?[6,4]:d;return n.length<=p+g+3?n:`${n.slice(0,p)}…${n.slice(-g)}`})(),j=u.useCallback(n=>{if(!s)return;n.preventDefault(),n.stopPropagation(),f.current&&clearTimeout(f.current);const p=k(c);y(!0),f.current=setTimeout(()=>y(!1),2e3),p||console.warn("Copy may have failed for:",c.slice(0,16)+"...")},[s,c]),v=o==="compact"?"data-box-compact":o==="responsive"?"data-box-responsive":"",b=s?e||`Click to copy: ${c}`:e;return s?a.jsxs("button",{type:"button",onClick:j,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),className:r("data-box interactive",v,"cursor-pointer select-none gap-1","hover-bg",l,i),title:b,"aria-label":`Copy ${c}`,children:[a.jsx("span",{className:r("transition-colors duration-200",m?"text-sys-green":""),children:h}),a.jsx("span",{className:r("flex items-center justify-center",o==="compact"?"w-3 h-3":"w-3.5 h-3.5"),children:m?a.jsx(T,{className:r("text-sys-green",C)}):a.jsx(N,{className:r("transition-opacity duration-200",S?"opacity-70":"opacity-40",C)})})]}):a.jsx("span",{className:r("data-box",v,l,i),title:b,children:h})}export{$ as D}; diff --git a/frontend/dist/assets/DeepAnalysisModal-lreaW1Hc.js b/frontend/dist/assets/DeepAnalysisModal-DlQPOGxT.js similarity index 99% rename from frontend/dist/assets/DeepAnalysisModal-lreaW1Hc.js rename to frontend/dist/assets/DeepAnalysisModal-DlQPOGxT.js index 6d67b5ec..e57ed40c 100644 --- a/frontend/dist/assets/DeepAnalysisModal-lreaW1Hc.js +++ b/frontend/dist/assets/DeepAnalysisModal-DlQPOGxT.js @@ -1,4 +1,4 @@ -import{d as b,bf as G,dx as q,dy as D,cL as L,r as M,bQ as F,fY as P,fZ as W,j as f,ac as $,f_ as B,ad as Y,m as H,w as R,c as w,L as U}from"./index-CLIbpHvY.js";import{D as K}from"./download-DQJBs0xV.js";import{D as X}from"./database-idkjcnGz.js";/** +import{d as b,bf as G,dx as q,dy as D,cL as L,r as M,bQ as F,fY as P,fZ as W,j as f,ac as $,f_ as B,ad as Y,m as H,w as R,c as w,L as U}from"./index-2YU-f7O7.js";import{D as K}from"./download-Dpt6RSjP.js";import{D as X}from"./database-1_qMqgVS.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/Grid-Di163a6N.js b/frontend/dist/assets/Grid-BUbHrfD3.js similarity index 95% rename from frontend/dist/assets/Grid-Di163a6N.js rename to frontend/dist/assets/Grid-BUbHrfD3.js index f1d8f0ec..c56c9111 100644 --- a/frontend/dist/assets/Grid-Di163a6N.js +++ b/frontend/dist/assets/Grid-BUbHrfD3.js @@ -1 +1 @@ -import{r as b,j as c,c as d}from"./index-CLIbpHvY.js";const g={hero:{mobile:12},"hero-tall":{mobile:12},"hero-auto":{mobile:12},panel:{mobile:12,md:6},feature:{mobile:12,md:6,lg:4},standard:{mobile:12,sm:6,lg:4,xl:3},compact:{mobile:6,lg:3},widget:{mobile:6,sm:4,md:3,lg:2},auto:{mobile:12}},p={hero:"bento-row-hero","hero-tall":"bento-row-hero-tall","hero-auto":"bento-row-hero-auto",panel:"bento-row-panel",feature:"bento-row-feature",standard:"bento-row-standard",compact:"bento-row-compact",widget:"bento-row-widget",auto:"bento-row-auto"};function w({template:o,children:r,className:e,gap:n}){const t=g[o],m=p[o],a=n==="none"?"gap-0":n==="sm"?"bento-gap-sm":n==="lg"?"bento-gap-lg":"bento-gap",i=b.Children.map(r,l=>!b.isValidElement(l)||l.type===u?l:c.jsx(u,{span:t.mobile,sm:t.sm,md:t.md,lg:t.lg,xl:t.xl,children:l}));return c.jsx("div",{className:d("bento-row",m,a,e),children:i})}function s(o,r=""){const e=r?`${r}:`:"";return o==="full"?`${e}col-span-full`:o==="auto"?`${e}col-auto`:o===1.5?`${e}bento-col-1-5`:`${e}bento-col-${o}`}function u({children:o,span:r,sm:e,md:n,lg:t,xl:m,ratio:a,className:i}){const l=d("bento-cell",s(r),e&&s(e,"sm"),n&&s(n,"md"),t&&s(t,"lg"),m&&s(m,"xl"),i);return c.jsx("div",{className:l,"data-ratio":a??void 0,style:a?{"--cell-ratio":a}:void 0,children:o})}export{u as C,w as R}; +import{r as b,j as c,c as d}from"./index-2YU-f7O7.js";const g={hero:{mobile:12},"hero-tall":{mobile:12},"hero-auto":{mobile:12},panel:{mobile:12,md:6},feature:{mobile:12,md:6,lg:4},standard:{mobile:12,sm:6,lg:4,xl:3},compact:{mobile:6,lg:3},widget:{mobile:6,sm:4,md:3,lg:2},auto:{mobile:12}},p={hero:"bento-row-hero","hero-tall":"bento-row-hero-tall","hero-auto":"bento-row-hero-auto",panel:"bento-row-panel",feature:"bento-row-feature",standard:"bento-row-standard",compact:"bento-row-compact",widget:"bento-row-widget",auto:"bento-row-auto"};function w({template:o,children:r,className:e,gap:n}){const t=g[o],m=p[o],a=n==="none"?"gap-0":n==="sm"?"bento-gap-sm":n==="lg"?"bento-gap-lg":"bento-gap",i=b.Children.map(r,l=>!b.isValidElement(l)||l.type===u?l:c.jsx(u,{span:t.mobile,sm:t.sm,md:t.md,lg:t.lg,xl:t.xl,children:l}));return c.jsx("div",{className:d("bento-row",m,a,e),children:i})}function s(o,r=""){const e=r?`${r}:`:"";return o==="full"?`${e}col-span-full`:o==="auto"?`${e}col-auto`:o===1.5?`${e}bento-col-1-5`:`${e}bento-col-${o}`}function u({children:o,span:r,sm:e,md:n,lg:t,xl:m,ratio:a,className:i}){const l=d("bento-cell",s(r),e&&s(e,"sm"),n&&s(n,"md"),t&&s(t,"lg"),m&&s(m,"xl"),i);return c.jsx("div",{className:l,"data-ratio":a??void 0,style:a?{"--cell-ratio":a}:void 0,children:o})}export{u as C,w as R}; diff --git a/frontend/dist/assets/KeycapButton-Bb60ts2O.js b/frontend/dist/assets/KeycapButton-fLM_SIw1.js similarity index 98% rename from frontend/dist/assets/KeycapButton-Bb60ts2O.js rename to frontend/dist/assets/KeycapButton-fLM_SIw1.js index 7c2a800d..defcc1bf 100644 --- a/frontend/dist/assets/KeycapButton-Bb60ts2O.js +++ b/frontend/dist/assets/KeycapButton-fLM_SIw1.js @@ -1 +1 @@ -import{r as l,j as t,Z as O}from"./index-CLIbpHvY.js";import{b as F,c as x}from"./keycap-sfx-ByZp-njj.js";const R={a:"24,3 76,3 83,7 76,11 24,11 17,7",b:"88,22 93,27 93,71 88,76 83,71 83,27",c:"88,106 93,111 93,155 88,160 83,155 83,111",d:"24,171 76,171 83,175 76,179 24,179 17,175",e:"12,106 17,111 17,155 12,160 7,155 7,111",f:"12,22 17,27 17,71 12,76 7,71 7,27",g:"24,86 76,86 83,91 76,96 24,96 17,91"},w=Object.keys(R),N={0:"abcdef",1:"bc",2:"abdeg",3:"abcdg",4:"bcfg",5:"acdfg",6:"acdefg",7:"abc",8:"abcdefg",9:"abcdfg",A:"abcefg",B:"cdefg",C:"adef",D:"bcdeg",E:"adefg",F:"aefg",G:"acdef",H:"bcefg",I:"ef",J:"bcde",L:"def",M:"abcefg",N:"ceg",O:"abcdef",P:"abefg",Q:"abcfg",R:"eg",S:"acdfg",T:"defg",U:"bcdef",V:"cde",Y:"bcdfg",Z:"abdeg",a:"abcefg",b:"cdefg",c:"deg",d:"bcdeg",e:"adefg",f:"aefg",g:"abcdfg",h:"cefg",i:"c",j:"bcde",l:"def",m:"abcef",n:"ceg",o:"cdeg",p:"abefg",r:"eg",s:"acdfg",t:"defg",u:"cde",v:"cde",y:"bcdfg"," ":"",_:"d","-":"g","=":"dg","°":"abfg",'"':"bf","'":"f","(":"adef",")":"abcd","[":"adef","]":"abcd","!":"bc",".":"d"},C=6,D=56,L=2;function B(){return w.filter(()=>Math.random()>.45).join("")}function $(r,i){const n=Array.from(r).map(a=>N[a.toUpperCase()]??N[a]??""),d=Math.max(0,(i??0)-r.length);for(let a=0;a{if(a)return;const e=$(r,d),o=e.length,g=C+(o-1)*L;let y=0,b,E=!1;const k=()=>{if(!E){if(y++,y>=g){f(null);return}f(e.map((j,_)=>{const v=C+_*L;return y>=v?j:B()})),b=setTimeout(k,D)}};return k(),()=>{E=!0,clearTimeout(b)}},[r,d,a]);const c=(e,o)=>t.jsx("svg",{viewBox:"0 0 100 182",width:h,height:n,className:"seven-seg__char","aria-hidden":"true",children:w.map(g=>t.jsx("polygon",{points:R[g],fill:i,stroke:i,strokeWidth:4,strokeLinejoin:"round",opacity:e.includes(g)?1:M},g))},o),s=$(r,d),u=T??s;return t.jsxs("span",{className:`seven-seg${S?` ${S}`:""}`,children:[u.map((e,o)=>c(e,`${o}-${e}`)),t.jsx("span",{className:"sr-only",children:r})]})}const G={grey:"/assets/keycap.svg",red:"/assets/keycap-red.svg"},I=O[900],P="#FFDEB0";function Z({icon:r,variant:i="grey",onClick:n,onPress:d,sentDuration:a=2e3,title:S,disabled:h=!1,className:m,iconColor:M=I,iconActiveColor:T=P,indicators:f}){const c=!!d,[s,u]=l.useState("idle"),[e,o]=l.useState(!1),g=l.useRef(),y=c?s==="held":e,b=c&&(s==="sending"||s==="sent"),E=c?s==="held"||s==="sending":e;l.useEffect(()=>()=>clearTimeout(g.current),[]);const k=l.useCallback(()=>{h||b||(F(),c?u("held"):o(!0))},[h,b,c]),j=l.useCallback(async()=>{if(c){if(s!=="held")return;x(),u("sending");const p=await d();u(p?"sent":"idle"),p&&(g.current=setTimeout(()=>u("idle"),a))}else{if(!e)return;o(!1),x(),n==null||n()}},[c,s,d,a,e,n]),_=l.useCallback(()=>{c?s==="held"&&(x(),u("idle")):(e&&x(),o(!1))},[c,s,e]),v=t.jsx("button",{onMouseDown:k,onMouseUp:j,onMouseLeave:_,onTouchStart:k,onTouchEnd:j,onTouchCancel:_,disabled:h||b,className:`keycap-btn${i==="red"?" keycap-btn--red-cap":""}${E?" keycap-btn--pressed":""}${m&&!f?` ${m}`:""}`,title:S,children:t.jsxs("div",{className:"keycap-wrap",children:[t.jsx("img",{src:G[i],alt:"",className:"keycap-btn__img",draggable:!1}),t.jsx("span",{className:"keycap-icon-overlay",style:{color:y||s==="sending"?T:M},children:r})]})});return f!=null&&f.length?t.jsxs("div",{className:`keycap-group${m?` ${m}`:""}`,children:[v,t.jsx("div",{className:"indicator-key-pair",children:f.map(p=>{const A=p.trackPress?s:p.active?"active":"idle";return t.jsxs("div",{className:`indicator-key${A!=="idle"?` indicator-key--${A}`:""}`,children:[t.jsx("span",{className:"indicator-key__label",children:p.label}),t.jsx("span",{className:"indicator-key__led"})]},p.label)})})]}):v}export{Z as K,Y as S}; +import{r as l,j as t,Z as O}from"./index-2YU-f7O7.js";import{b as F,c as x}from"./keycap-sfx-ByZp-njj.js";const R={a:"24,3 76,3 83,7 76,11 24,11 17,7",b:"88,22 93,27 93,71 88,76 83,71 83,27",c:"88,106 93,111 93,155 88,160 83,155 83,111",d:"24,171 76,171 83,175 76,179 24,179 17,175",e:"12,106 17,111 17,155 12,160 7,155 7,111",f:"12,22 17,27 17,71 12,76 7,71 7,27",g:"24,86 76,86 83,91 76,96 24,96 17,91"},w=Object.keys(R),N={0:"abcdef",1:"bc",2:"abdeg",3:"abcdg",4:"bcfg",5:"acdfg",6:"acdefg",7:"abc",8:"abcdefg",9:"abcdfg",A:"abcefg",B:"cdefg",C:"adef",D:"bcdeg",E:"adefg",F:"aefg",G:"acdef",H:"bcefg",I:"ef",J:"bcde",L:"def",M:"abcefg",N:"ceg",O:"abcdef",P:"abefg",Q:"abcfg",R:"eg",S:"acdfg",T:"defg",U:"bcdef",V:"cde",Y:"bcdfg",Z:"abdeg",a:"abcefg",b:"cdefg",c:"deg",d:"bcdeg",e:"adefg",f:"aefg",g:"abcdfg",h:"cefg",i:"c",j:"bcde",l:"def",m:"abcef",n:"ceg",o:"cdeg",p:"abefg",r:"eg",s:"acdfg",t:"defg",u:"cde",v:"cde",y:"bcdfg"," ":"",_:"d","-":"g","=":"dg","°":"abfg",'"':"bf","'":"f","(":"adef",")":"abcd","[":"adef","]":"abcd","!":"bc",".":"d"},C=6,D=56,L=2;function B(){return w.filter(()=>Math.random()>.45).join("")}function $(r,i){const n=Array.from(r).map(a=>N[a.toUpperCase()]??N[a]??""),d=Math.max(0,(i??0)-r.length);for(let a=0;a{if(a)return;const e=$(r,d),o=e.length,g=C+(o-1)*L;let y=0,b,E=!1;const k=()=>{if(!E){if(y++,y>=g){f(null);return}f(e.map((j,_)=>{const v=C+_*L;return y>=v?j:B()})),b=setTimeout(k,D)}};return k(),()=>{E=!0,clearTimeout(b)}},[r,d,a]);const c=(e,o)=>t.jsx("svg",{viewBox:"0 0 100 182",width:h,height:n,className:"seven-seg__char","aria-hidden":"true",children:w.map(g=>t.jsx("polygon",{points:R[g],fill:i,stroke:i,strokeWidth:4,strokeLinejoin:"round",opacity:e.includes(g)?1:M},g))},o),s=$(r,d),u=T??s;return t.jsxs("span",{className:`seven-seg${S?` ${S}`:""}`,children:[u.map((e,o)=>c(e,`${o}-${e}`)),t.jsx("span",{className:"sr-only",children:r})]})}const G={grey:"/assets/keycap.svg",red:"/assets/keycap-red.svg"},I=O[900],P="#FFDEB0";function Z({icon:r,variant:i="grey",onClick:n,onPress:d,sentDuration:a=2e3,title:S,disabled:h=!1,className:m,iconColor:M=I,iconActiveColor:T=P,indicators:f}){const c=!!d,[s,u]=l.useState("idle"),[e,o]=l.useState(!1),g=l.useRef(),y=c?s==="held":e,b=c&&(s==="sending"||s==="sent"),E=c?s==="held"||s==="sending":e;l.useEffect(()=>()=>clearTimeout(g.current),[]);const k=l.useCallback(()=>{h||b||(F(),c?u("held"):o(!0))},[h,b,c]),j=l.useCallback(async()=>{if(c){if(s!=="held")return;x(),u("sending");const p=await d();u(p?"sent":"idle"),p&&(g.current=setTimeout(()=>u("idle"),a))}else{if(!e)return;o(!1),x(),n==null||n()}},[c,s,d,a,e,n]),_=l.useCallback(()=>{c?s==="held"&&(x(),u("idle")):(e&&x(),o(!1))},[c,s,e]),v=t.jsx("button",{onMouseDown:k,onMouseUp:j,onMouseLeave:_,onTouchStart:k,onTouchEnd:j,onTouchCancel:_,disabled:h||b,className:`keycap-btn${i==="red"?" keycap-btn--red-cap":""}${E?" keycap-btn--pressed":""}${m&&!f?` ${m}`:""}`,title:S,children:t.jsxs("div",{className:"keycap-wrap",children:[t.jsx("img",{src:G[i],alt:"",className:"keycap-btn__img",draggable:!1}),t.jsx("span",{className:"keycap-icon-overlay",style:{color:y||s==="sending"?T:M},children:r})]})});return f!=null&&f.length?t.jsxs("div",{className:`keycap-group${m?` ${m}`:""}`,children:[v,t.jsx("div",{className:"indicator-key-pair",children:f.map(p=>{const A=p.trackPress?s:p.active?"active":"idle";return t.jsxs("div",{className:`indicator-key${A!=="idle"?` indicator-key--${A}`:""}`,children:[t.jsx("span",{className:"indicator-key__label",children:p.label}),t.jsx("span",{className:"indicator-key__led"})]},p.label)})})]}):v}export{Z as K,Y as S}; diff --git a/frontend/dist/assets/LightSparkline-YdYUoL-i.js b/frontend/dist/assets/LightSparkline-CV6le7Ch.js similarity index 96% rename from frontend/dist/assets/LightSparkline-YdYUoL-i.js rename to frontend/dist/assets/LightSparkline-CV6le7Ch.js index c5f576c1..ae65fddb 100644 --- a/frontend/dist/assets/LightSparkline-YdYUoL-i.js +++ b/frontend/dist/assets/LightSparkline-CV6le7Ch.js @@ -1 +1 @@ -import{r as m,j as u}from"./index-CLIbpHvY.js";const a="var(--sparkline-critical)",C="var(--sparkline-poor)",L="var(--sparkline-fair)",g="var(--sparkline-good)",y="var(--sparkline-excellent)",$="var(--fg-muted)";function j(o){if(o.length===0)return a;const r=o.slice(-4),e=r.reduce((t,c)=>t+c.count,0),n=e/r.length,l=o.reduce((t,c)=>t+c.count,0)/o.length;if(e===0)return a;if(l>0){const t=n/l;return t>=1.2?y:t>=.8?g:t>=.4?L:t>=.1?C:a}return e>=10?y:e>=5?g:e>=2?L:e>=1?C:a}function h(o,r,e,n=2){if(o.length<2)return"";const s=o.map(i=>i.count),l=Math.max(...s,1),t=Math.min(...s),c=l-t||1,p=r-n*2,O=e-n*2,x=s.map((i,f)=>({x:n+f/(s.length-1)*p,y:n+O-(i-t)/c*O}));let k=`M ${x[0].x.toFixed(1)} ${x[0].y.toFixed(1)}`;for(let i=1;ih(r,e,n),[r,e,n]),p=m.useMemo(()=>s??(r.length>0?j(r):$),[s,r]);return l&&r.length<2?u.jsx("div",{className:`flex items-center justify-center ${t}`,style:{width:e,height:n},children:u.jsx("div",{className:"rounded animate-pulse bg-subtle-fill-hover",style:{width:e-8,height:n-6}})}):r.length<2?u.jsx("svg",{width:e,height:n,viewBox:`0 0 ${e} ${n}`,className:t,"aria-hidden":"true",children:u.jsx("line",{x1:4,y1:n/2,x2:e-4,y2:n/2,stroke:a,strokeWidth:1.5,strokeDasharray:"3,2"})}):u.jsx("svg",{width:e,height:n,viewBox:`0 0 ${e} ${n}`,preserveAspectRatio:"none",className:t,"aria-hidden":"true",style:{maxWidth:"100%"},children:u.jsx("path",{d:c,fill:"none",stroke:p,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})})});export{A as L}; +import{r as m,j as u}from"./index-2YU-f7O7.js";const a="var(--sparkline-critical)",C="var(--sparkline-poor)",L="var(--sparkline-fair)",g="var(--sparkline-good)",y="var(--sparkline-excellent)",$="var(--fg-muted)";function j(o){if(o.length===0)return a;const r=o.slice(-4),e=r.reduce((t,c)=>t+c.count,0),n=e/r.length,l=o.reduce((t,c)=>t+c.count,0)/o.length;if(e===0)return a;if(l>0){const t=n/l;return t>=1.2?y:t>=.8?g:t>=.4?L:t>=.1?C:a}return e>=10?y:e>=5?g:e>=2?L:e>=1?C:a}function h(o,r,e,n=2){if(o.length<2)return"";const s=o.map(i=>i.count),l=Math.max(...s,1),t=Math.min(...s),c=l-t||1,p=r-n*2,O=e-n*2,x=s.map((i,f)=>({x:n+f/(s.length-1)*p,y:n+O-(i-t)/c*O}));let k=`M ${x[0].x.toFixed(1)} ${x[0].y.toFixed(1)}`;for(let i=1;ih(r,e,n),[r,e,n]),p=m.useMemo(()=>s??(r.length>0?j(r):$),[s,r]);return l&&r.length<2?u.jsx("div",{className:`flex items-center justify-center ${t}`,style:{width:e,height:n},children:u.jsx("div",{className:"rounded animate-pulse bg-subtle-fill-hover",style:{width:e-8,height:n-6}})}):r.length<2?u.jsx("svg",{width:e,height:n,viewBox:`0 0 ${e} ${n}`,className:t,"aria-hidden":"true",children:u.jsx("line",{x1:4,y1:n/2,x2:e-4,y2:n/2,stroke:a,strokeWidth:1.5,strokeDasharray:"3,2"})}):u.jsx("svg",{width:e,height:n,viewBox:`0 0 ${e} ${n}`,preserveAspectRatio:"none",className:t,"aria-hidden":"true",style:{maxWidth:"100%"},children:u.jsx("path",{d:c,fill:"none",stroke:p,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})})});export{A as L}; diff --git a/frontend/dist/assets/Login-BuGn30l0.js b/frontend/dist/assets/Login-ByHhaNVx.js similarity index 99% rename from frontend/dist/assets/Login-BuGn30l0.js rename to frontend/dist/assets/Login-ByHhaNVx.js index 0e5e9725..f3292043 100644 --- a/frontend/dist/assets/Login-BuGn30l0.js +++ b/frontend/dist/assets/Login-ByHhaNVx.js @@ -1,3 +1,3 @@ -import{r as o,j as e,u as F,g as Y,i as $,s as Z,l as X,m as L,a as q,b as S,c as H,I as A,C as O,A as z,B as U,Z as V}from"./index-CLIbpHvY.js";import{g as T,B as G,r as K,T as J}from"./ascii-burst-DN6etEs5.js";const w=["@@@@@@@ @@@ @@@ @@@@@@@@@@ @@@@@@@ ","@@@@@@@@ @@@ @@@ @@@@@@@@@@@ @@@@@@@@ ","@@! @@@ @@! !@@ @@! @@! @@! !@@ ","!@! @!@ !@! @!! !@! !@! !@! !@! ","@!@@!@! !@!@! @!! !!@ @!@ !@! ","!!@!!! @!!! !@! ! !@! !!! ","!!: !!: !!: !!: :!! ",":!: :!: :!: :!: :!: "," :: :: ::: :: ::: ::: "," : : : : :: :: : "],Q=J-1,ee=w.length,te=Math.max(...w.map(s=>s.length)),se=.994,ne=.08,re=.25,ae=8,oe=9.6,ie=20,W=.008,k=20,_=" . ˙·∙⁺˚°:;~*+✧✩×✴░✦✶✳oO▒#%&xX▓@MW8B█████",ce={" ":0,".":.08,":":.15,"!":.5,"@":.85,"#":.6,$:.7,"%":.65,"&":.6,"*":.3,"+":.25,"-":.1,"=":.2,_:.05,"~":.2,"^":.15,"|":.4,"/":.3,"\\":.3,"(":.35,")":.35,"[":.4,"]":.4,"{":.45,"}":.45,"<":.3,">":.3,"?":.4,";":.2,"'":.1,'"':.15,",":.08,"`":.05};function le(s){let t="",n=0,a=!1,x="",p=!1,l=!1,g=!1;for(;n",a=!1),x="",p=!1,l=!1,g=!1;else if(u==="1")p=!0,g=!0;else if(u==="2")l=!0,g=!0;else if(u.startsWith("38;2;")){const C=u.split(";");x=`rgb(${C[2]},${C[3]},${C[4]})`,g=!0}}else{if(g){a&&(t+="");const u=[];x&&u.push(`color:${x}`),p&&u.push("font-weight:700"),l&&u.push("opacity:0.6"),u.length>0?(t+=``,a=!0):a=!1,g=!1}const h=s[n];h==="<"?t+="<":h===">"?t+=">":h==="&"?t+="&":t+=h,n++}return a&&(t+=""),t}function P(s){let t="";for(let n=0;n0&&(t+=` +import{r as o,j as e,u as F,g as Y,i as $,s as Z,l as X,m as L,a as q,b as S,c as H,I as A,C as O,A as z,B as U,Z as V}from"./index-2YU-f7O7.js";import{g as T,B as G,r as K,T as J}from"./ascii-burst-DN6etEs5.js";const w=["@@@@@@@ @@@ @@@ @@@@@@@@@@ @@@@@@@ ","@@@@@@@@ @@@ @@@ @@@@@@@@@@@ @@@@@@@@ ","@@! @@@ @@! !@@ @@! @@! @@! !@@ ","!@! @!@ !@! @!! !@! !@! !@! !@! ","@!@@!@! !@!@! @!! !!@ @!@ !@! ","!!@!!! @!!! !@! ! !@! !!! ","!!: !!: !!: !!: :!! ",":!: :!: :!: :!: :!: "," :: :: ::: :: ::: ::: "," : : : : :: :: : "],Q=J-1,ee=w.length,te=Math.max(...w.map(s=>s.length)),se=.994,ne=.08,re=.25,ae=8,oe=9.6,ie=20,W=.008,k=20,_=" . ˙·∙⁺˚°:;~*+✧✩×✴░✦✶✳oO▒#%&xX▓@MW8B█████",ce={" ":0,".":.08,":":.15,"!":.5,"@":.85,"#":.6,$:.7,"%":.65,"&":.6,"*":.3,"+":.25,"-":.1,"=":.2,_:.05,"~":.2,"^":.15,"|":.4,"/":.3,"\\":.3,"(":.35,")":.35,"[":.4,"]":.4,"{":.45,"}":.45,"<":.3,">":.3,"?":.4,";":.2,"'":.1,'"':.15,",":.08,"`":.05};function le(s){let t="",n=0,a=!1,x="",p=!1,l=!1,g=!1;for(;n",a=!1),x="",p=!1,l=!1,g=!1;else if(u==="1")p=!0,g=!0;else if(u==="2")l=!0,g=!0;else if(u.startsWith("38;2;")){const C=u.split(";");x=`rgb(${C[2]},${C[3]},${C[4]})`,g=!0}}else{if(g){a&&(t+="");const u=[];x&&u.push(`color:${x}`),p&&u.push("font-weight:700"),l&&u.push("opacity:0.6"),u.length>0?(t+=``,a=!0):a=!1,g=!1}const h=s[n];h==="<"?t+="<":h===">"?t+=">":h==="&"?t+="&":t+=h,n++}return a&&(t+=""),t}function P(s){let t="";for(let n=0;n0&&(t+=` `),t+=le(s[n]);return t}const ue="rgb(91,91,214)",y=[[91,91,214],[72,70,200],[110,110,230],[150,150,245],[190,210,255],[0,240,255],[255,50,180],[80,255,180]];function R(s,t,n){return`rgb(${Math.round(s[0]+(t[0]-s[0])*n)},${Math.round(s[1]+(t[1]-s[1])*n)},${Math.round(s[2]+(t[2]-s[2])*n)})`}function de(s){const t=Math.max(0,Math.min(.999,s));return _[Math.floor(t*_.length)]}function me(s){return ce[s]??.5}function he(s,t){const n=Math.abs(s);if(n<.3)return R(y[0],y[2],n/.3);if(n<.6){const a=(n-.3)/.3;return R(y[3],y[4],a)}else{const a=Math.sin(t*17.3)*.5+.5;return a<.4?R(y[4],y[5],(n-.6)/.4):a<.6?`rgb(${y[6].join(",")})`:a<.7?`rgb(${y[7].join(",")})`:"rgb(255,252,255)"}}function I(s){let t="";for(let n=0;n0&&(t+=` `);const a=w[n]||"";for(let x=0;x0?Math.exp(-m*m/2):Math.exp(-m*m/12),j=c*re-C.radius*.4,M=Math.sin(j*Math.PI),d=b*C.strength;l+=b*M*C.strength,d>h&&(h=d,g=j+n*.1+x*.05)}if(l=Math.max(-1,Math.min(1,l)),Math.abs(l)${p}`;else{const r=me(p)+l*.5,i=Math.max(.02,Math.min(.98,r)),c=de(i),f=he(l,g);t+=`${c}`}}}return t}function Ce(){const s=o.useRef(null),t=o.useRef([]),n=o.useRef(0),[a,x]=o.useState(!1);o.useEffect(()=>{const r=s.current;if(!r)return;let i=0;r.innerHTML=P(T(w,0));const c=setInterval(()=>{if(i++,i>Q){clearInterval(c),x(!0);return}r.innerHTML=P(T(w,i))},G);return()=>{clearInterval(c),K()}},[]),o.useEffect(()=>{if(!a)return;const r=s.current;if(!r)return;let i=!0;const c=()=>{if(!i)return;const f=t.current;for(const m of f)m.radius+=ne,m.strength*=se;t.current=f.filter(m=>m.strength>W),t.current.length>0?r.innerHTML=I(t.current):r.innerHTML=I([]),n.current=requestAnimationFrame(c)};return n.current=requestAnimationFrame(c),()=>{i=!1,cancelAnimationFrame(n.current)}},[a]);const p=o.useRef(null),l=o.useCallback((r,i,c=1)=>{const f=s.current;if(!f||!a)return;const m=f.getBoundingClientRect(),b=r-m.left,j=i-m.top,M=b/oe,d=j/ie;t.current.length>=ae&&t.current.shift(),t.current.push({cx:M,cy:d,radius:0,strength:c}),p.current={x:r,y:i}},[a]),g=o.useCallback(r=>{const i=p.current;if(i){const c=r.clientX-i.x,f=r.clientY-i.y;if(Math.sqrt(c*c+f*f){l(r.clientX,r.clientY,1)},[l]),u=o.useCallback(r=>{p.current=null,l(r.clientX,r.clientY,.6)},[l]),C=o.useCallback(r=>{if(r.touches.length>0){const i=r.touches[0],c=p.current;if(c){const f=i.clientX-c.x,m=i.clientY-c.y;if(Math.sqrt(f*f+m*m)e.jsx("span",{className:"text-white/20 text-xs","aria-hidden":"true",children:"•"}),be=o.memo(function(){return e.jsx("div",{className:"fixed inset-0 -z-10",style:{backgroundColor:V[950]},"aria-hidden":"true"})}),ve=o.memo(function(){return e.jsxs(L.footer,{variants:v.footer,initial:"hidden",animate:"visible",className:"fixed bottom-0 inset-x-0 px-4 py-6",children:[e.jsx("p",{className:"text-center type-badge text-white/40 mb-3",children:"Powered By"}),e.jsx("div",{className:"mx-auto max-w-xs",children:e.jsxs("div",{className:"flex items-center justify-center gap-4",children:[e.jsx(E,{href:"https://github.com/rightup/pyMC_Repeater",children:e.jsx("img",{src:Le,alt:"pyMC",className:"h-14"})}),e.jsx(D,{}),e.jsx(E,{href:"https://meshcore.co.uk",children:e.jsx(xe,{height:12,className:"text-white"})}),e.jsx(D,{}),e.jsxs(E,{href:"https://wcmesh.com",children:[e.jsx("div",{className:"size-14 overflow-hidden radius-badge border border-white/10 -translate-y-1",children:e.jsx("img",{src:ge,alt:"",className:"size-full object-cover"})}),e.jsx("span",{className:"font-mono text-sm font-semibold tracking-tight text-white",children:"WCM"})]})]})})]})}),je={session_expired:"Your session has expired. Please sign in again.",no_token:"Authentication required. Please sign in.",token_expired_away:"Your session expired while you were away."};function Ne(){const s=F(),[t,n]=o.useState("admin"),[a,x]=o.useState(""),[p,l]=o.useState(Y),[g,h]=o.useState(!1),[u,C]=o.useState(null),[r]=o.useState(()=>{try{const d=sessionStorage.getItem("auth_redirect_reason");return sessionStorage.removeItem("auth_redirect_reason"),d?je[d]??null:null}catch{return null}}),i=t.length>0&&a.length>0&&!g;o.useEffect(()=>{$()&&s("/",{replace:!0})},[s]);const c=o.useCallback(()=>C(null),[]),f=o.useCallback(d=>{n(d.target.value),u&&c()},[u,c]),m=o.useCallback(d=>{x(d.target.value),u&&c()},[u,c]),b=o.useCallback(d=>{l(d),Z(d)},[]),j=o.useCallback(async d=>{if(d.preventDefault(),!i)return;h(!0),C(null);const N=await X(t,a,p);h(!1),N.success?window.location.href="/":C(N.error??"Login failed")},[i,t,a,p]),M=o.useCallback(d=>{d.key==="Enter"&&i&&d.target.tagName==="INPUT"&&(d.preventDefault(),d.currentTarget.requestSubmit())},[i]);return e.jsxs(e.Fragment,{children:[e.jsx(be,{}),e.jsx("main",{className:"flex min-h-svh items-center justify-center px-4 py-6 sm:px-6 lg:px-8 -mt-6",children:e.jsxs(L.div,{variants:v.container,initial:"hidden",animate:"visible",className:"w-full max-w-sm space-y-10",children:[e.jsx(L.div,{variants:v.item,className:"flex justify-center",children:e.jsx(fe,{})}),r&&!u&&e.jsx(L.div,{variants:v.item,className:"rounded-md bg-sys-amber/10 px-3 py-2.5 text-center",children:e.jsx("p",{className:"text-sm text-sys-amber",children:r})}),e.jsxs(L.form,{variants:v.item,onSubmit:j,onKeyDown:M,className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"username",className:B,children:"Username"}),e.jsx("div",{className:"mt-2",children:e.jsx(A,{id:"username",name:"username",type:"text",value:t,onChange:f,required:!0,autoComplete:"username",className:"font-mono text-sm font-semibold"})})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"password",className:B,children:"Password"}),e.jsx("div",{className:"mt-2",children:e.jsx(A,{id:"password",name:"password",type:"password",value:a,onChange:m,required:!0,autoComplete:"current-password",autoFocus:!0,className:"font-mono text-sm font-semibold"})})]}),e.jsx("div",{className:"-mt-2",children:e.jsx(O,{checked:p,onChange:b,label:e.jsx("span",{className:"type-badge text-fg-secondary",children:"Remember me"}),size:"sm"})}),e.jsx(z,{mode:"wait",children:u&&e.jsx(L.div,{variants:v.error,initial:"hidden",animate:"visible",exit:"exit",role:"alert",className:"rounded-md bg-sys-red/10 p-3 overflow-hidden",children:e.jsx("p",{className:"text-sm text-sys-red text-center",children:u})},"error")}),e.jsx(L.div,{whileTap:i?{scale:.98}:void 0,children:e.jsx(U,{type:"submit",disabled:!i,className:"w-full py-3 radius-pill font-mono text-sm font-semibold uppercase tracking-wide text-white bg-sys-indigo hover:bg-sys-blue shadow-sm transition-colors",children:g?e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(ye,{className:"size-4"}),"Signing in…"]}):"Sign in"})})]}),e.jsxs(L.p,{variants:v.item,className:"text-center text-sm/6 text-fg-muted",children:["A ",e.jsx("span",{className:"text-sys-blue",children:"@RightUp"})," X"," ",e.jsx("span",{className:"text-sys-blue",children:"@Treehouse⚡"})," Collab"]})]})}),e.jsx(ve,{})]})}export{Ne as default}; diff --git a/frontend/dist/assets/Logs--UqLuq-v.js b/frontend/dist/assets/Logs-8gpluICZ.js similarity index 96% rename from frontend/dist/assets/Logs--UqLuq-v.js rename to frontend/dist/assets/Logs-8gpluICZ.js index 8d36101f..56294235 100644 --- a/frontend/dist/assets/Logs--UqLuq-v.js +++ b/frontend/dist/assets/Logs-8gpluICZ.js @@ -1,4 +1,4 @@ -import{d as g,db as y,dc as f,D as j,dd as L,de as v,r as o,df as N,j as e,dg as m,F as w,B as b,c as n,dh as k,d0 as C,m as S,di as E}from"./index-CLIbpHvY.js";import{P,a as R,B,C as I}from"./PageLayout-9SoN_daN.js";/** +import{d as g,db as y,dc as f,D as j,dd as L,de as v,r as o,df as N,j as e,dg as m,F as w,B as b,c as n,dh as k,d0 as C,m as S,di as E}from"./index-2YU-f7O7.js";import{P,a as R,B,C as I}from"./PageLayout-tvsYvfyL.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/MeshGraph-C1UuX-FI.js b/frontend/dist/assets/MeshGraph-BkSbmPk2.js similarity index 99% rename from frontend/dist/assets/MeshGraph-C1UuX-FI.js rename to frontend/dist/assets/MeshGraph-BkSbmPk2.js index 47af9d38..e981c40d 100644 --- a/frontend/dist/assets/MeshGraph-C1UuX-FI.js +++ b/frontend/dist/assets/MeshGraph-BkSbmPk2.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/webgl-device-QoBMYpnS-dbCUwguu.js","assets/index-CLIbpHvY.js","assets/DeepAnalysisModal-lreaW1Hc.js","assets/download-DQJBs0xV.js","assets/database-idkjcnGz.js","assets/consumer-registry-BrRzRPA2.js","assets/DataBox-ChuBU2q7.js","assets/badge-colors-BNUqIXCA.js","assets/meshcore-tx-constants-DgpFTAmf.js","assets/target-5eLsI-iM.js","assets/layers-DTsYQqst.js","assets/search-D-1ih5Lf.js","assets/settings-2-CFr1Guec.js","assets/chevron-right-tyotcuUX.js","assets/network-fMhgmV5F.js","assets/index-DUfCykEc.css"])))=>i.map(i=>d[i]); -var tL=Object.defineProperty;var iL=(i,e,t)=>e in i?tL(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var b=(i,e,t)=>iL(i,typeof e!="symbol"?e+"":e,t);import{d as Vl,r as $,bo as l0,aX as cn,cJ as CS,cK as Uh,cL as TS,cM as nL,b_ as sL,j as f,A as Qc,m as Sl,cN as rL,bc as $u,bW as oL,cO as aL,cP as lL,cQ as cL,cR as uL,cS as dL,cT as hL,cU as fL,E as pL,ca as mL,cV as gL,cW as Ge,Z as qt,cX as c0,q as Di,a0 as be,cY as _L,cZ as yL,R as dg,c_ as bL,ae as Rc,L as u0,c$ as vL,aw as xL,d0 as wL,d1 as SL,B as q_,w as EL,x as CL,d2 as TL,bQ as d0}from"./index-CLIbpHvY.js";import{m as h0,t as hg,a as kL,b as AL,e as Rn,u as IL,G as LL,M as kS,c as RL,E as PL,d as f0,D as NL,s as X_}from"./DeepAnalysisModal-lreaW1Hc.js";import{u as DL,r as ML,f as p0,g as OL,e as BL}from"./consumer-registry-BrRzRPA2.js";import{D as FL}from"./DataBox-ChuBU2q7.js";import{N as zL,a as UL}from"./badge-colors-BNUqIXCA.js";import{e as $L,f as m0,g as jL}from"./meshcore-tx-constants-DgpFTAmf.js";import{E as HL,T as VL}from"./target-5eLsI-iM.js";import{L as g0}from"./layers-DTsYQqst.js";import{S as _0}from"./search-D-1ih5Lf.js";import{D as y0}from"./download-DQJBs0xV.js";import{S as b0}from"./settings-2-CFr1Guec.js";import{C as Hp}from"./chevron-right-tyotcuUX.js";import{N as GL}from"./network-fMhgmV5F.js";/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/webgl-device-QoBMYpnS-xzJlpHEl.js","assets/index-2YU-f7O7.js","assets/DeepAnalysisModal-DlQPOGxT.js","assets/download-Dpt6RSjP.js","assets/database-1_qMqgVS.js","assets/consumer-registry-BaTbQUiU.js","assets/DataBox-D8nJsUbV.js","assets/badge-colors-BNUqIXCA.js","assets/meshcore-tx-constants-DgpFTAmf.js","assets/target-IYsU06YN.js","assets/layers-7MoN93tY.js","assets/search-5bBDdD-8.js","assets/settings-2-BkKCvhPk.js","assets/chevron-right-DwaXNeO4.js","assets/network-BfJPFeB2.js","assets/index-CgjVNfe7.css"])))=>i.map(i=>d[i]); +var tL=Object.defineProperty;var iL=(i,e,t)=>e in i?tL(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var b=(i,e,t)=>iL(i,typeof e!="symbol"?e+"":e,t);import{d as Vl,r as $,bo as l0,aX as cn,cJ as CS,cK as Uh,cL as TS,cM as nL,b_ as sL,j as f,A as Qc,m as Sl,cN as rL,bc as $u,bW as oL,cO as aL,cP as lL,cQ as cL,cR as uL,cS as dL,cT as hL,cU as fL,E as pL,ca as mL,cV as gL,cW as Ge,Z as qt,cX as c0,q as Di,a0 as be,cY as _L,cZ as yL,R as dg,c_ as bL,ae as Rc,L as u0,c$ as vL,aw as xL,d0 as wL,d1 as SL,B as q_,w as EL,x as CL,d2 as TL,bQ as d0}from"./index-2YU-f7O7.js";import{m as h0,t as hg,a as kL,b as AL,e as Rn,u as IL,G as LL,M as kS,c as RL,E as PL,d as f0,D as NL,s as X_}from"./DeepAnalysisModal-DlQPOGxT.js";import{u as DL,r as ML,f as p0,g as OL,e as BL}from"./consumer-registry-BaTbQUiU.js";import{D as FL}from"./DataBox-D8nJsUbV.js";import{N as zL,a as UL}from"./badge-colors-BNUqIXCA.js";import{e as $L,f as m0,g as jL}from"./meshcore-tx-constants-DgpFTAmf.js";import{E as HL,T as VL}from"./target-IYsU06YN.js";import{L as g0}from"./layers-7MoN93tY.js";import{S as _0}from"./search-5bBDdD-8.js";import{D as y0}from"./download-Dpt6RSjP.js";import{S as b0}from"./settings-2-BkKCvhPk.js";import{C as Hp}from"./chevron-right-DwaXNeO4.js";import{N as GL}from"./network-BfJPFeB2.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. @@ -39,7 +39,7 @@ ${r}${o}${i.type.toUpperCase()}: ${i.message}

Compilation error in ${r}



 ${o}
-
`,l.style.top="10px",l.style.left="10px",l.style.position="absolute",l.style.zIndex="9999",l.style.width="100%",l.style.textAlign="left",document.body.appendChild(l),(n=document.getElementsByClassName("luma-compiler-log-error")[0])==null||n.scrollIntoView(),l.onclick=()=>{const c=`data:text/plain,${encodeURIComponent(this.source)}`;navigator.clipboard.writeText(c)}}};U(p2,"defaultProps",{..._n.defaultProps,language:"auto",stage:void 0,source:"",sourceMap:null,entryPoint:"main",debugShaders:void 0});let SN=p2;function EN(i){return CN(i.source)||i.id||oy(`unnamed ${i.stage}-shader`)}function CN(i,e="unnamed"){const t=/#define[\s*]SHADER_NAME[\s*]([A-Za-z0-9_-]+)[\s*]/.exec(i);return t?t[1]:e}const g2=class _2 extends _n{constructor(e,t){super(e,t,_2.defaultProps),U(this,"shaderLayout"),U(this,"bufferLayout"),U(this,"linkStatus","pending"),U(this,"hash",""),this.shaderLayout=this.props.shaderLayout,this.bufferLayout=this.props.bufferLayout||[]}get[Symbol.toStringTag](){return"RenderPipeline"}};U(g2,"defaultProps",{..._n.defaultProps,vs:null,vertexEntryPoint:"vertexMain",vsConstants:{},fs:null,fragmentEntryPoint:"fragmentMain",fsConstants:{},shaderLayout:null,bufferLayout:[],topology:"triangle-list",colorAttachmentFormats:void 0,depthStencilAttachmentFormat:void 0,parameters:{},bindings:{},uniforms:{}});let Xh=g2;const y2=class b2 extends _n{constructor(e,t){super(e,t,b2.defaultProps),U(this,"hash",""),U(this,"shaderLayout"),this.shaderLayout=t.shaderLayout}get[Symbol.toStringTag](){return"ComputePipeline"}};U(y2,"defaultProps",{..._n.defaultProps,shader:void 0,entryPoint:void 0,constants:{},shaderLayout:void 0});let W0=y2;function TN(i){return LN[i]}function kN(i){const[e,t]=IN[i],n=e==="i32"||e==="u32",s=e!=="u32",r=AN[e]*t;return{primitiveType:e,components:t,byteLength:r,integer:n,signed:s}}const AN={f32:4,f16:2,i32:4,u32:4},IN={f32:["f32",1],"vec2":["f32",2],"vec3":["f32",3],"vec4":["f32",4],f16:["f16",1],"vec2":["f16",2],"vec3":["f16",3],"vec4":["f16",4],i32:["i32",1],"vec2":["i32",2],"vec3":["i32",3],"vec4":["i32",4],u32:["u32",1],"vec2":["u32",2],"vec3":["u32",3],"vec4":["u32",4]},LN={f32:{type:"f32",components:1},f16:{type:"f16",components:1},i32:{type:"i32",components:1},u32:{type:"u32",components:1},"vec2":{type:"f32",components:2},"vec3":{type:"f32",components:3},"vec4":{type:"f32",components:4},"vec2":{type:"f16",components:2},"vec3":{type:"f16",components:3},"vec4":{type:"f16",components:4},"vec2":{type:"i32",components:2},"vec3":{type:"i32",components:3},"vec4":{type:"i32",components:4},"vec2":{type:"u32",components:2},"vec3":{type:"u32",components:3},"vec4":{type:"u32",components:4},"mat2x2":{type:"f32",components:4},"mat2x3":{type:"f32",components:6},"mat2x4":{type:"f32",components:8},"mat3x2":{type:"f32",components:6},"mat3x3":{type:"f32",components:9},"mat3x4":{type:"f32",components:12},"mat4x2":{type:"f32",components:8},"mat4x3":{type:"f32",components:12},"mat4x4":{type:"f32",components:16},"mat2x2":{type:"f16",components:4},"mat2x3":{type:"f16",components:6},"mat2x4":{type:"f16",components:8},"mat3x2":{type:"f16",components:6},"mat3x3":{type:"f16",components:9},"mat3x4":{type:"f16",components:12},"mat4x2":{type:"f16",components:8},"mat4x3":{type:"f16",components:12},"mat4x4":{type:"f16",components:16},"mat2x2":{type:"i32",components:4},"mat2x3":{type:"i32",components:6},"mat2x4":{type:"i32",components:8},"mat3x2":{type:"i32",components:6},"mat3x3":{type:"i32",components:9},"mat3x4":{type:"i32",components:12},"mat4x2":{type:"i32",components:8},"mat4x3":{type:"i32",components:12},"mat4x4":{type:"i32",components:16},"mat2x2":{type:"u32",components:4},"mat2x3":{type:"u32",components:6},"mat2x4":{type:"u32",components:8},"mat3x2":{type:"u32",components:6},"mat3x3":{type:"u32",components:9},"mat3x4":{type:"u32",components:12},"mat4x2":{type:"u32",components:8},"mat4x3":{type:"u32",components:12},"mat4x4":{type:"u32",components:16}};function v2(i,e){const t={};for(const n of i.attributes){const s=RN(i,e,n.name);s&&(t[n.name]=s)}return t}function fte(i,e,t=16){const n=v2(i,e),s=new Array(t).fill(null);for(const r of Object.values(n))s[r.location]=r;return s}function RN(i,e,t){const n=PN(i,t),s=NN(e,t);if(!n)return null;const r=kN(n.type),o=ZP(r),a=(s==null?void 0:s.vertexFormat)||o,l=ly(a);return{attributeName:(s==null?void 0:s.attributeName)||n.name,bufferName:(s==null?void 0:s.bufferName)||n.name,location:n.location,shaderType:n.type,primitiveType:r.primitiveType,shaderComponents:r.components,vertexFormat:a,bufferDataType:l.type,bufferComponents:l.components,normalized:l.normalized,integer:r.integer,stepMode:(s==null?void 0:s.stepMode)||n.stepMode||"vertex",byteOffset:(s==null?void 0:s.byteOffset)||0,byteStride:(s==null?void 0:s.byteStride)||0}}function PN(i,e){const t=i.attributes.find(n=>n.name===e);return t||le.warn(`shader layout attribute "${e}" not present in shader`),t||null}function NN(i,e){DN(i);let t=MN(i,e);return t||(t=ON(i,e),t)?t:(le.warn(`layout for attribute "${e}" not present in buffer layout`),null)}function DN(i){for(const e of i)(e.attributes&&e.format||!e.attributes&&!e.format)&&le.warn(`BufferLayout ${name} must have either 'attributes' or 'format' field`)}function MN(i,e){for(const t of i)if(t.format&&t.name===e)return{attributeName:t.name,bufferName:e,stepMode:t.stepMode,vertexFormat:t.format,byteOffset:0,byteStride:t.byteStride||0};return null}function ON(i,e){var t;for(const n of i){let s=n.byteStride;if(typeof n.byteStride!="number")for(const o of n.attributes||[]){const a=ly(o.format);s+=a.byteLength}const r=(t=n.attributes)==null?void 0:t.find(o=>o.attribute===e);if(r)return{attributeName:r.attribute,bufferName:n.name,stepMode:n.stepMode,vertexFormat:r.format,byteOffset:r.byteOffset,byteStride:s}}return null}let xd;function x2(i){return(!xd||xd.byteLengthr.type==="uniform"&&r.name===(e==null?void 0:e.name));if(!n)throw new Error(e==null?void 0:e.name);const s=n;for(const r of s.uniforms||[])this.bindingLayout[r.name]=r}}setUniforms(e){for(const[t,n]of Object.entries(e))this._setUniform(t,n),this.needsRedraw||this.setNeedsRedraw(`${this.name}.${t}=${n}`)}setNeedsRedraw(e){this.needsRedraw=this.needsRedraw||e}getAllUniforms(){return this.modifiedUniforms={},this.needsRedraw=!1,this.uniforms||{}}_setUniform(e,t){UN(this.uniforms[e],t)||(this.uniforms[e]=$N(t),this.modifiedUniforms[e]=!0,this.modified=!0)}}let ri=class{constructor(e){U(this,"uniformBlocks",new Map),U(this,"uniformBufferLayouts",new Map),U(this,"uniformBuffers",new Map);for(const[t,n]of Object.entries(e)){const s=t,r=new zN(n.uniformTypes??{},n.uniformSizes??{});this.uniformBufferLayouts.set(s,r);const o=new jN({name:t});o.setUniforms(n.defaultUniforms||{}),this.uniformBlocks.set(s,o)}}destroy(){for(const e of this.uniformBuffers.values())e.destroy()}setUniforms(e){var t;for(const[n,s]of Object.entries(e))(t=this.uniformBlocks.get(n))==null||t.setUniforms(s);this.updateUniformBuffers()}getUniformBufferByteLength(e){var t;return((t=this.uniformBufferLayouts.get(e))==null?void 0:t.byteLength)||0}getUniformBufferData(e){var t,n;const s=((t=this.uniformBlocks.get(e))==null?void 0:t.getAllUniforms())||{};return(n=this.uniformBufferLayouts.get(e))==null?void 0:n.getData(s)}createUniformBuffer(e,t,n){n&&this.setUniforms(n);const s=this.getUniformBufferByteLength(t),r=e.createBuffer({usage:ge.UNIFORM|ge.COPY_DST,byteLength:s}),o=this.getUniformBufferData(t);return r.write(o),r}getManagedUniformBuffer(e,t){if(!this.uniformBuffers.get(t)){const n=this.getUniformBufferByteLength(t),s=e.createBuffer({usage:ge.UNIFORM|ge.COPY_DST,byteLength:n});this.uniformBuffers.set(t,s)}return this.uniformBuffers.get(t)}updateUniformBuffers(){let e=!1;for(const t of this.uniformBlocks.keys()){const n=this.updateUniformBuffer(t);e||(e=n)}return e&&le.log(3,`UniformStore.updateUniformBuffers(): ${e}`)(),e}updateUniformBuffer(e){var t;const n=this.uniformBlocks.get(e);let s=this.uniformBuffers.get(e),r=!1;if(s&&n!=null&&n.needsRedraw){r||(r=n.needsRedraw);const o=this.getUniformBufferData(e);s=this.uniformBuffers.get(e),s==null||s.write(o);const a=(t=this.uniformBlocks.get(e))==null?void 0:t.getAllUniforms();le.log(4,`Writing to uniform buffer ${String(e)}`,o,a)()}return r}};var Do;(function(i){i[i.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",i[i.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",i[i.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT",i[i.POINTS=0]="POINTS",i[i.LINES=1]="LINES",i[i.LINE_LOOP=2]="LINE_LOOP",i[i.LINE_STRIP=3]="LINE_STRIP",i[i.TRIANGLES=4]="TRIANGLES",i[i.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",i[i.TRIANGLE_FAN=6]="TRIANGLE_FAN",i[i.ZERO=0]="ZERO",i[i.ONE=1]="ONE",i[i.SRC_COLOR=768]="SRC_COLOR",i[i.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",i[i.SRC_ALPHA=770]="SRC_ALPHA",i[i.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",i[i.DST_ALPHA=772]="DST_ALPHA",i[i.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",i[i.DST_COLOR=774]="DST_COLOR",i[i.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",i[i.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",i[i.CONSTANT_COLOR=32769]="CONSTANT_COLOR",i[i.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",i[i.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",i[i.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA",i[i.FUNC_ADD=32774]="FUNC_ADD",i[i.FUNC_SUBTRACT=32778]="FUNC_SUBTRACT",i[i.FUNC_REVERSE_SUBTRACT=32779]="FUNC_REVERSE_SUBTRACT",i[i.BLEND_EQUATION=32777]="BLEND_EQUATION",i[i.BLEND_EQUATION_RGB=32777]="BLEND_EQUATION_RGB",i[i.BLEND_EQUATION_ALPHA=34877]="BLEND_EQUATION_ALPHA",i[i.BLEND_DST_RGB=32968]="BLEND_DST_RGB",i[i.BLEND_SRC_RGB=32969]="BLEND_SRC_RGB",i[i.BLEND_DST_ALPHA=32970]="BLEND_DST_ALPHA",i[i.BLEND_SRC_ALPHA=32971]="BLEND_SRC_ALPHA",i[i.BLEND_COLOR=32773]="BLEND_COLOR",i[i.ARRAY_BUFFER_BINDING=34964]="ARRAY_BUFFER_BINDING",i[i.ELEMENT_ARRAY_BUFFER_BINDING=34965]="ELEMENT_ARRAY_BUFFER_BINDING",i[i.LINE_WIDTH=2849]="LINE_WIDTH",i[i.ALIASED_POINT_SIZE_RANGE=33901]="ALIASED_POINT_SIZE_RANGE",i[i.ALIASED_LINE_WIDTH_RANGE=33902]="ALIASED_LINE_WIDTH_RANGE",i[i.CULL_FACE_MODE=2885]="CULL_FACE_MODE",i[i.FRONT_FACE=2886]="FRONT_FACE",i[i.DEPTH_RANGE=2928]="DEPTH_RANGE",i[i.DEPTH_WRITEMASK=2930]="DEPTH_WRITEMASK",i[i.DEPTH_CLEAR_VALUE=2931]="DEPTH_CLEAR_VALUE",i[i.DEPTH_FUNC=2932]="DEPTH_FUNC",i[i.STENCIL_CLEAR_VALUE=2961]="STENCIL_CLEAR_VALUE",i[i.STENCIL_FUNC=2962]="STENCIL_FUNC",i[i.STENCIL_FAIL=2964]="STENCIL_FAIL",i[i.STENCIL_PASS_DEPTH_FAIL=2965]="STENCIL_PASS_DEPTH_FAIL",i[i.STENCIL_PASS_DEPTH_PASS=2966]="STENCIL_PASS_DEPTH_PASS",i[i.STENCIL_REF=2967]="STENCIL_REF",i[i.STENCIL_VALUE_MASK=2963]="STENCIL_VALUE_MASK",i[i.STENCIL_WRITEMASK=2968]="STENCIL_WRITEMASK",i[i.STENCIL_BACK_FUNC=34816]="STENCIL_BACK_FUNC",i[i.STENCIL_BACK_FAIL=34817]="STENCIL_BACK_FAIL",i[i.STENCIL_BACK_PASS_DEPTH_FAIL=34818]="STENCIL_BACK_PASS_DEPTH_FAIL",i[i.STENCIL_BACK_PASS_DEPTH_PASS=34819]="STENCIL_BACK_PASS_DEPTH_PASS",i[i.STENCIL_BACK_REF=36003]="STENCIL_BACK_REF",i[i.STENCIL_BACK_VALUE_MASK=36004]="STENCIL_BACK_VALUE_MASK",i[i.STENCIL_BACK_WRITEMASK=36005]="STENCIL_BACK_WRITEMASK",i[i.VIEWPORT=2978]="VIEWPORT",i[i.SCISSOR_BOX=3088]="SCISSOR_BOX",i[i.COLOR_CLEAR_VALUE=3106]="COLOR_CLEAR_VALUE",i[i.COLOR_WRITEMASK=3107]="COLOR_WRITEMASK",i[i.UNPACK_ALIGNMENT=3317]="UNPACK_ALIGNMENT",i[i.PACK_ALIGNMENT=3333]="PACK_ALIGNMENT",i[i.MAX_TEXTURE_SIZE=3379]="MAX_TEXTURE_SIZE",i[i.MAX_VIEWPORT_DIMS=3386]="MAX_VIEWPORT_DIMS",i[i.SUBPIXEL_BITS=3408]="SUBPIXEL_BITS",i[i.RED_BITS=3410]="RED_BITS",i[i.GREEN_BITS=3411]="GREEN_BITS",i[i.BLUE_BITS=3412]="BLUE_BITS",i[i.ALPHA_BITS=3413]="ALPHA_BITS",i[i.DEPTH_BITS=3414]="DEPTH_BITS",i[i.STENCIL_BITS=3415]="STENCIL_BITS",i[i.POLYGON_OFFSET_UNITS=10752]="POLYGON_OFFSET_UNITS",i[i.POLYGON_OFFSET_FACTOR=32824]="POLYGON_OFFSET_FACTOR",i[i.TEXTURE_BINDING_2D=32873]="TEXTURE_BINDING_2D",i[i.SAMPLE_BUFFERS=32936]="SAMPLE_BUFFERS",i[i.SAMPLES=32937]="SAMPLES",i[i.SAMPLE_COVERAGE_VALUE=32938]="SAMPLE_COVERAGE_VALUE",i[i.SAMPLE_COVERAGE_INVERT=32939]="SAMPLE_COVERAGE_INVERT",i[i.COMPRESSED_TEXTURE_FORMATS=34467]="COMPRESSED_TEXTURE_FORMATS",i[i.VENDOR=7936]="VENDOR",i[i.RENDERER=7937]="RENDERER",i[i.VERSION=7938]="VERSION",i[i.IMPLEMENTATION_COLOR_READ_TYPE=35738]="IMPLEMENTATION_COLOR_READ_TYPE",i[i.IMPLEMENTATION_COLOR_READ_FORMAT=35739]="IMPLEMENTATION_COLOR_READ_FORMAT",i[i.BROWSER_DEFAULT_WEBGL=37444]="BROWSER_DEFAULT_WEBGL",i[i.STATIC_DRAW=35044]="STATIC_DRAW",i[i.STREAM_DRAW=35040]="STREAM_DRAW",i[i.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",i[i.ARRAY_BUFFER=34962]="ARRAY_BUFFER",i[i.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",i[i.BUFFER_SIZE=34660]="BUFFER_SIZE",i[i.BUFFER_USAGE=34661]="BUFFER_USAGE",i[i.CURRENT_VERTEX_ATTRIB=34342]="CURRENT_VERTEX_ATTRIB",i[i.VERTEX_ATTRIB_ARRAY_ENABLED=34338]="VERTEX_ATTRIB_ARRAY_ENABLED",i[i.VERTEX_ATTRIB_ARRAY_SIZE=34339]="VERTEX_ATTRIB_ARRAY_SIZE",i[i.VERTEX_ATTRIB_ARRAY_STRIDE=34340]="VERTEX_ATTRIB_ARRAY_STRIDE",i[i.VERTEX_ATTRIB_ARRAY_TYPE=34341]="VERTEX_ATTRIB_ARRAY_TYPE",i[i.VERTEX_ATTRIB_ARRAY_NORMALIZED=34922]="VERTEX_ATTRIB_ARRAY_NORMALIZED",i[i.VERTEX_ATTRIB_ARRAY_POINTER=34373]="VERTEX_ATTRIB_ARRAY_POINTER",i[i.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING=34975]="VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",i[i.CULL_FACE=2884]="CULL_FACE",i[i.FRONT=1028]="FRONT",i[i.BACK=1029]="BACK",i[i.FRONT_AND_BACK=1032]="FRONT_AND_BACK",i[i.BLEND=3042]="BLEND",i[i.DEPTH_TEST=2929]="DEPTH_TEST",i[i.DITHER=3024]="DITHER",i[i.POLYGON_OFFSET_FILL=32823]="POLYGON_OFFSET_FILL",i[i.SAMPLE_ALPHA_TO_COVERAGE=32926]="SAMPLE_ALPHA_TO_COVERAGE",i[i.SAMPLE_COVERAGE=32928]="SAMPLE_COVERAGE",i[i.SCISSOR_TEST=3089]="SCISSOR_TEST",i[i.STENCIL_TEST=2960]="STENCIL_TEST",i[i.NO_ERROR=0]="NO_ERROR",i[i.INVALID_ENUM=1280]="INVALID_ENUM",i[i.INVALID_VALUE=1281]="INVALID_VALUE",i[i.INVALID_OPERATION=1282]="INVALID_OPERATION",i[i.OUT_OF_MEMORY=1285]="OUT_OF_MEMORY",i[i.CONTEXT_LOST_WEBGL=37442]="CONTEXT_LOST_WEBGL",i[i.CW=2304]="CW",i[i.CCW=2305]="CCW",i[i.DONT_CARE=4352]="DONT_CARE",i[i.FASTEST=4353]="FASTEST",i[i.NICEST=4354]="NICEST",i[i.GENERATE_MIPMAP_HINT=33170]="GENERATE_MIPMAP_HINT",i[i.BYTE=5120]="BYTE",i[i.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",i[i.SHORT=5122]="SHORT",i[i.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",i[i.INT=5124]="INT",i[i.UNSIGNED_INT=5125]="UNSIGNED_INT",i[i.FLOAT=5126]="FLOAT",i[i.DOUBLE=5130]="DOUBLE",i[i.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",i[i.ALPHA=6406]="ALPHA",i[i.RGB=6407]="RGB",i[i.RGBA=6408]="RGBA",i[i.LUMINANCE=6409]="LUMINANCE",i[i.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",i[i.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",i[i.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",i[i.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",i[i.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",i[i.VERTEX_SHADER=35633]="VERTEX_SHADER",i[i.COMPILE_STATUS=35713]="COMPILE_STATUS",i[i.DELETE_STATUS=35712]="DELETE_STATUS",i[i.LINK_STATUS=35714]="LINK_STATUS",i[i.VALIDATE_STATUS=35715]="VALIDATE_STATUS",i[i.ATTACHED_SHADERS=35717]="ATTACHED_SHADERS",i[i.ACTIVE_ATTRIBUTES=35721]="ACTIVE_ATTRIBUTES",i[i.ACTIVE_UNIFORMS=35718]="ACTIVE_UNIFORMS",i[i.MAX_VERTEX_ATTRIBS=34921]="MAX_VERTEX_ATTRIBS",i[i.MAX_VERTEX_UNIFORM_VECTORS=36347]="MAX_VERTEX_UNIFORM_VECTORS",i[i.MAX_VARYING_VECTORS=36348]="MAX_VARYING_VECTORS",i[i.MAX_COMBINED_TEXTURE_IMAGE_UNITS=35661]="MAX_COMBINED_TEXTURE_IMAGE_UNITS",i[i.MAX_VERTEX_TEXTURE_IMAGE_UNITS=35660]="MAX_VERTEX_TEXTURE_IMAGE_UNITS",i[i.MAX_TEXTURE_IMAGE_UNITS=34930]="MAX_TEXTURE_IMAGE_UNITS",i[i.MAX_FRAGMENT_UNIFORM_VECTORS=36349]="MAX_FRAGMENT_UNIFORM_VECTORS",i[i.SHADER_TYPE=35663]="SHADER_TYPE",i[i.SHADING_LANGUAGE_VERSION=35724]="SHADING_LANGUAGE_VERSION",i[i.CURRENT_PROGRAM=35725]="CURRENT_PROGRAM",i[i.NEVER=512]="NEVER",i[i.LESS=513]="LESS",i[i.EQUAL=514]="EQUAL",i[i.LEQUAL=515]="LEQUAL",i[i.GREATER=516]="GREATER",i[i.NOTEQUAL=517]="NOTEQUAL",i[i.GEQUAL=518]="GEQUAL",i[i.ALWAYS=519]="ALWAYS",i[i.KEEP=7680]="KEEP",i[i.REPLACE=7681]="REPLACE",i[i.INCR=7682]="INCR",i[i.DECR=7683]="DECR",i[i.INVERT=5386]="INVERT",i[i.INCR_WRAP=34055]="INCR_WRAP",i[i.DECR_WRAP=34056]="DECR_WRAP",i[i.NEAREST=9728]="NEAREST",i[i.LINEAR=9729]="LINEAR",i[i.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",i[i.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",i[i.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",i[i.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR",i[i.TEXTURE_MAG_FILTER=10240]="TEXTURE_MAG_FILTER",i[i.TEXTURE_MIN_FILTER=10241]="TEXTURE_MIN_FILTER",i[i.TEXTURE_WRAP_S=10242]="TEXTURE_WRAP_S",i[i.TEXTURE_WRAP_T=10243]="TEXTURE_WRAP_T",i[i.TEXTURE_2D=3553]="TEXTURE_2D",i[i.TEXTURE=5890]="TEXTURE",i[i.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",i[i.TEXTURE_BINDING_CUBE_MAP=34068]="TEXTURE_BINDING_CUBE_MAP",i[i.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",i[i.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",i[i.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",i[i.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",i[i.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",i[i.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",i[i.MAX_CUBE_MAP_TEXTURE_SIZE=34076]="MAX_CUBE_MAP_TEXTURE_SIZE",i[i.TEXTURE0=33984]="TEXTURE0",i[i.ACTIVE_TEXTURE=34016]="ACTIVE_TEXTURE",i[i.REPEAT=10497]="REPEAT",i[i.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",i[i.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",i[i.TEXTURE_WIDTH=4096]="TEXTURE_WIDTH",i[i.TEXTURE_HEIGHT=4097]="TEXTURE_HEIGHT",i[i.FLOAT_VEC2=35664]="FLOAT_VEC2",i[i.FLOAT_VEC3=35665]="FLOAT_VEC3",i[i.FLOAT_VEC4=35666]="FLOAT_VEC4",i[i.INT_VEC2=35667]="INT_VEC2",i[i.INT_VEC3=35668]="INT_VEC3",i[i.INT_VEC4=35669]="INT_VEC4",i[i.BOOL=35670]="BOOL",i[i.BOOL_VEC2=35671]="BOOL_VEC2",i[i.BOOL_VEC3=35672]="BOOL_VEC3",i[i.BOOL_VEC4=35673]="BOOL_VEC4",i[i.FLOAT_MAT2=35674]="FLOAT_MAT2",i[i.FLOAT_MAT3=35675]="FLOAT_MAT3",i[i.FLOAT_MAT4=35676]="FLOAT_MAT4",i[i.SAMPLER_2D=35678]="SAMPLER_2D",i[i.SAMPLER_CUBE=35680]="SAMPLER_CUBE",i[i.LOW_FLOAT=36336]="LOW_FLOAT",i[i.MEDIUM_FLOAT=36337]="MEDIUM_FLOAT",i[i.HIGH_FLOAT=36338]="HIGH_FLOAT",i[i.LOW_INT=36339]="LOW_INT",i[i.MEDIUM_INT=36340]="MEDIUM_INT",i[i.HIGH_INT=36341]="HIGH_INT",i[i.FRAMEBUFFER=36160]="FRAMEBUFFER",i[i.RENDERBUFFER=36161]="RENDERBUFFER",i[i.RGBA4=32854]="RGBA4",i[i.RGB5_A1=32855]="RGB5_A1",i[i.RGB565=36194]="RGB565",i[i.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",i[i.STENCIL_INDEX=6401]="STENCIL_INDEX",i[i.STENCIL_INDEX8=36168]="STENCIL_INDEX8",i[i.DEPTH_STENCIL=34041]="DEPTH_STENCIL",i[i.RENDERBUFFER_WIDTH=36162]="RENDERBUFFER_WIDTH",i[i.RENDERBUFFER_HEIGHT=36163]="RENDERBUFFER_HEIGHT",i[i.RENDERBUFFER_INTERNAL_FORMAT=36164]="RENDERBUFFER_INTERNAL_FORMAT",i[i.RENDERBUFFER_RED_SIZE=36176]="RENDERBUFFER_RED_SIZE",i[i.RENDERBUFFER_GREEN_SIZE=36177]="RENDERBUFFER_GREEN_SIZE",i[i.RENDERBUFFER_BLUE_SIZE=36178]="RENDERBUFFER_BLUE_SIZE",i[i.RENDERBUFFER_ALPHA_SIZE=36179]="RENDERBUFFER_ALPHA_SIZE",i[i.RENDERBUFFER_DEPTH_SIZE=36180]="RENDERBUFFER_DEPTH_SIZE",i[i.RENDERBUFFER_STENCIL_SIZE=36181]="RENDERBUFFER_STENCIL_SIZE",i[i.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE=36048]="FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",i[i.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME=36049]="FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",i[i.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL=36050]="FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",i[i.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE=36051]="FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",i[i.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",i[i.DEPTH_ATTACHMENT=36096]="DEPTH_ATTACHMENT",i[i.STENCIL_ATTACHMENT=36128]="STENCIL_ATTACHMENT",i[i.DEPTH_STENCIL_ATTACHMENT=33306]="DEPTH_STENCIL_ATTACHMENT",i[i.NONE=0]="NONE",i[i.FRAMEBUFFER_COMPLETE=36053]="FRAMEBUFFER_COMPLETE",i[i.FRAMEBUFFER_INCOMPLETE_ATTACHMENT=36054]="FRAMEBUFFER_INCOMPLETE_ATTACHMENT",i[i.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT=36055]="FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",i[i.FRAMEBUFFER_INCOMPLETE_DIMENSIONS=36057]="FRAMEBUFFER_INCOMPLETE_DIMENSIONS",i[i.FRAMEBUFFER_UNSUPPORTED=36061]="FRAMEBUFFER_UNSUPPORTED",i[i.FRAMEBUFFER_BINDING=36006]="FRAMEBUFFER_BINDING",i[i.RENDERBUFFER_BINDING=36007]="RENDERBUFFER_BINDING",i[i.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",i[i.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER",i[i.MAX_RENDERBUFFER_SIZE=34024]="MAX_RENDERBUFFER_SIZE",i[i.INVALID_FRAMEBUFFER_OPERATION=1286]="INVALID_FRAMEBUFFER_OPERATION",i[i.UNPACK_FLIP_Y_WEBGL=37440]="UNPACK_FLIP_Y_WEBGL",i[i.UNPACK_PREMULTIPLY_ALPHA_WEBGL=37441]="UNPACK_PREMULTIPLY_ALPHA_WEBGL",i[i.UNPACK_COLORSPACE_CONVERSION_WEBGL=37443]="UNPACK_COLORSPACE_CONVERSION_WEBGL",i[i.READ_BUFFER=3074]="READ_BUFFER",i[i.UNPACK_ROW_LENGTH=3314]="UNPACK_ROW_LENGTH",i[i.UNPACK_SKIP_ROWS=3315]="UNPACK_SKIP_ROWS",i[i.UNPACK_SKIP_PIXELS=3316]="UNPACK_SKIP_PIXELS",i[i.PACK_ROW_LENGTH=3330]="PACK_ROW_LENGTH",i[i.PACK_SKIP_ROWS=3331]="PACK_SKIP_ROWS",i[i.PACK_SKIP_PIXELS=3332]="PACK_SKIP_PIXELS",i[i.TEXTURE_BINDING_3D=32874]="TEXTURE_BINDING_3D",i[i.UNPACK_SKIP_IMAGES=32877]="UNPACK_SKIP_IMAGES",i[i.UNPACK_IMAGE_HEIGHT=32878]="UNPACK_IMAGE_HEIGHT",i[i.MAX_3D_TEXTURE_SIZE=32883]="MAX_3D_TEXTURE_SIZE",i[i.MAX_ELEMENTS_VERTICES=33e3]="MAX_ELEMENTS_VERTICES",i[i.MAX_ELEMENTS_INDICES=33001]="MAX_ELEMENTS_INDICES",i[i.MAX_TEXTURE_LOD_BIAS=34045]="MAX_TEXTURE_LOD_BIAS",i[i.MAX_FRAGMENT_UNIFORM_COMPONENTS=35657]="MAX_FRAGMENT_UNIFORM_COMPONENTS",i[i.MAX_VERTEX_UNIFORM_COMPONENTS=35658]="MAX_VERTEX_UNIFORM_COMPONENTS",i[i.MAX_ARRAY_TEXTURE_LAYERS=35071]="MAX_ARRAY_TEXTURE_LAYERS",i[i.MIN_PROGRAM_TEXEL_OFFSET=35076]="MIN_PROGRAM_TEXEL_OFFSET",i[i.MAX_PROGRAM_TEXEL_OFFSET=35077]="MAX_PROGRAM_TEXEL_OFFSET",i[i.MAX_VARYING_COMPONENTS=35659]="MAX_VARYING_COMPONENTS",i[i.FRAGMENT_SHADER_DERIVATIVE_HINT=35723]="FRAGMENT_SHADER_DERIVATIVE_HINT",i[i.RASTERIZER_DISCARD=35977]="RASTERIZER_DISCARD",i[i.VERTEX_ARRAY_BINDING=34229]="VERTEX_ARRAY_BINDING",i[i.MAX_VERTEX_OUTPUT_COMPONENTS=37154]="MAX_VERTEX_OUTPUT_COMPONENTS",i[i.MAX_FRAGMENT_INPUT_COMPONENTS=37157]="MAX_FRAGMENT_INPUT_COMPONENTS",i[i.MAX_SERVER_WAIT_TIMEOUT=37137]="MAX_SERVER_WAIT_TIMEOUT",i[i.MAX_ELEMENT_INDEX=36203]="MAX_ELEMENT_INDEX",i[i.RED=6403]="RED",i[i.RGB8=32849]="RGB8",i[i.RGBA8=32856]="RGBA8",i[i.RGB10_A2=32857]="RGB10_A2",i[i.TEXTURE_3D=32879]="TEXTURE_3D",i[i.TEXTURE_WRAP_R=32882]="TEXTURE_WRAP_R",i[i.TEXTURE_MIN_LOD=33082]="TEXTURE_MIN_LOD",i[i.TEXTURE_MAX_LOD=33083]="TEXTURE_MAX_LOD",i[i.TEXTURE_BASE_LEVEL=33084]="TEXTURE_BASE_LEVEL",i[i.TEXTURE_MAX_LEVEL=33085]="TEXTURE_MAX_LEVEL",i[i.TEXTURE_COMPARE_MODE=34892]="TEXTURE_COMPARE_MODE",i[i.TEXTURE_COMPARE_FUNC=34893]="TEXTURE_COMPARE_FUNC",i[i.SRGB=35904]="SRGB",i[i.SRGB8=35905]="SRGB8",i[i.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",i[i.COMPARE_REF_TO_TEXTURE=34894]="COMPARE_REF_TO_TEXTURE",i[i.RGBA32F=34836]="RGBA32F",i[i.RGB32F=34837]="RGB32F",i[i.RGBA16F=34842]="RGBA16F",i[i.RGB16F=34843]="RGB16F",i[i.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",i[i.TEXTURE_BINDING_2D_ARRAY=35869]="TEXTURE_BINDING_2D_ARRAY",i[i.R11F_G11F_B10F=35898]="R11F_G11F_B10F",i[i.RGB9_E5=35901]="RGB9_E5",i[i.RGBA32UI=36208]="RGBA32UI",i[i.RGB32UI=36209]="RGB32UI",i[i.RGBA16UI=36214]="RGBA16UI",i[i.RGB16UI=36215]="RGB16UI",i[i.RGBA8UI=36220]="RGBA8UI",i[i.RGB8UI=36221]="RGB8UI",i[i.RGBA32I=36226]="RGBA32I",i[i.RGB32I=36227]="RGB32I",i[i.RGBA16I=36232]="RGBA16I",i[i.RGB16I=36233]="RGB16I",i[i.RGBA8I=36238]="RGBA8I",i[i.RGB8I=36239]="RGB8I",i[i.RED_INTEGER=36244]="RED_INTEGER",i[i.RGB_INTEGER=36248]="RGB_INTEGER",i[i.RGBA_INTEGER=36249]="RGBA_INTEGER",i[i.R8=33321]="R8",i[i.RG8=33323]="RG8",i[i.R16F=33325]="R16F",i[i.R32F=33326]="R32F",i[i.RG16F=33327]="RG16F",i[i.RG32F=33328]="RG32F",i[i.R8I=33329]="R8I",i[i.R8UI=33330]="R8UI",i[i.R16I=33331]="R16I",i[i.R16UI=33332]="R16UI",i[i.R32I=33333]="R32I",i[i.R32UI=33334]="R32UI",i[i.RG8I=33335]="RG8I",i[i.RG8UI=33336]="RG8UI",i[i.RG16I=33337]="RG16I",i[i.RG16UI=33338]="RG16UI",i[i.RG32I=33339]="RG32I",i[i.RG32UI=33340]="RG32UI",i[i.R8_SNORM=36756]="R8_SNORM",i[i.RG8_SNORM=36757]="RG8_SNORM",i[i.RGB8_SNORM=36758]="RGB8_SNORM",i[i.RGBA8_SNORM=36759]="RGBA8_SNORM",i[i.RGB10_A2UI=36975]="RGB10_A2UI",i[i.TEXTURE_IMMUTABLE_FORMAT=37167]="TEXTURE_IMMUTABLE_FORMAT",i[i.TEXTURE_IMMUTABLE_LEVELS=33503]="TEXTURE_IMMUTABLE_LEVELS",i[i.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",i[i.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",i[i.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",i[i.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",i[i.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",i[i.HALF_FLOAT=5131]="HALF_FLOAT",i[i.RG=33319]="RG",i[i.RG_INTEGER=33320]="RG_INTEGER",i[i.INT_2_10_10_10_REV=36255]="INT_2_10_10_10_REV",i[i.CURRENT_QUERY=34917]="CURRENT_QUERY",i[i.QUERY_RESULT=34918]="QUERY_RESULT",i[i.QUERY_RESULT_AVAILABLE=34919]="QUERY_RESULT_AVAILABLE",i[i.ANY_SAMPLES_PASSED=35887]="ANY_SAMPLES_PASSED",i[i.ANY_SAMPLES_PASSED_CONSERVATIVE=36202]="ANY_SAMPLES_PASSED_CONSERVATIVE",i[i.MAX_DRAW_BUFFERS=34852]="MAX_DRAW_BUFFERS",i[i.DRAW_BUFFER0=34853]="DRAW_BUFFER0",i[i.DRAW_BUFFER1=34854]="DRAW_BUFFER1",i[i.DRAW_BUFFER2=34855]="DRAW_BUFFER2",i[i.DRAW_BUFFER3=34856]="DRAW_BUFFER3",i[i.DRAW_BUFFER4=34857]="DRAW_BUFFER4",i[i.DRAW_BUFFER5=34858]="DRAW_BUFFER5",i[i.DRAW_BUFFER6=34859]="DRAW_BUFFER6",i[i.DRAW_BUFFER7=34860]="DRAW_BUFFER7",i[i.DRAW_BUFFER8=34861]="DRAW_BUFFER8",i[i.DRAW_BUFFER9=34862]="DRAW_BUFFER9",i[i.DRAW_BUFFER10=34863]="DRAW_BUFFER10",i[i.DRAW_BUFFER11=34864]="DRAW_BUFFER11",i[i.DRAW_BUFFER12=34865]="DRAW_BUFFER12",i[i.DRAW_BUFFER13=34866]="DRAW_BUFFER13",i[i.DRAW_BUFFER14=34867]="DRAW_BUFFER14",i[i.DRAW_BUFFER15=34868]="DRAW_BUFFER15",i[i.MAX_COLOR_ATTACHMENTS=36063]="MAX_COLOR_ATTACHMENTS",i[i.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",i[i.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",i[i.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",i[i.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",i[i.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",i[i.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",i[i.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",i[i.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",i[i.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",i[i.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",i[i.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",i[i.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",i[i.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",i[i.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",i[i.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15",i[i.SAMPLER_3D=35679]="SAMPLER_3D",i[i.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",i[i.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",i[i.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",i[i.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",i[i.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",i[i.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",i[i.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",i[i.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",i[i.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",i[i.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",i[i.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",i[i.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY",i[i.MAX_SAMPLES=36183]="MAX_SAMPLES",i[i.SAMPLER_BINDING=35097]="SAMPLER_BINDING",i[i.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",i[i.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",i[i.PIXEL_PACK_BUFFER_BINDING=35053]="PIXEL_PACK_BUFFER_BINDING",i[i.PIXEL_UNPACK_BUFFER_BINDING=35055]="PIXEL_UNPACK_BUFFER_BINDING",i[i.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",i[i.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",i[i.COPY_READ_BUFFER_BINDING=36662]="COPY_READ_BUFFER_BINDING",i[i.COPY_WRITE_BUFFER_BINDING=36663]="COPY_WRITE_BUFFER_BINDING",i[i.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",i[i.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",i[i.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",i[i.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",i[i.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",i[i.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",i[i.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",i[i.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",i[i.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",i[i.UNSIGNED_NORMALIZED=35863]="UNSIGNED_NORMALIZED",i[i.SIGNED_NORMALIZED=36764]="SIGNED_NORMALIZED",i[i.VERTEX_ATTRIB_ARRAY_INTEGER=35069]="VERTEX_ATTRIB_ARRAY_INTEGER",i[i.VERTEX_ATTRIB_ARRAY_DIVISOR=35070]="VERTEX_ATTRIB_ARRAY_DIVISOR",i[i.TRANSFORM_FEEDBACK_BUFFER_MODE=35967]="TRANSFORM_FEEDBACK_BUFFER_MODE",i[i.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS=35968]="MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS",i[i.TRANSFORM_FEEDBACK_VARYINGS=35971]="TRANSFORM_FEEDBACK_VARYINGS",i[i.TRANSFORM_FEEDBACK_BUFFER_START=35972]="TRANSFORM_FEEDBACK_BUFFER_START",i[i.TRANSFORM_FEEDBACK_BUFFER_SIZE=35973]="TRANSFORM_FEEDBACK_BUFFER_SIZE",i[i.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN=35976]="TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN",i[i.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS=35978]="MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS",i[i.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS=35979]="MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS",i[i.INTERLEAVED_ATTRIBS=35980]="INTERLEAVED_ATTRIBS",i[i.SEPARATE_ATTRIBS=35981]="SEPARATE_ATTRIBS",i[i.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER",i[i.TRANSFORM_FEEDBACK_BUFFER_BINDING=35983]="TRANSFORM_FEEDBACK_BUFFER_BINDING",i[i.TRANSFORM_FEEDBACK=36386]="TRANSFORM_FEEDBACK",i[i.TRANSFORM_FEEDBACK_PAUSED=36387]="TRANSFORM_FEEDBACK_PAUSED",i[i.TRANSFORM_FEEDBACK_ACTIVE=36388]="TRANSFORM_FEEDBACK_ACTIVE",i[i.TRANSFORM_FEEDBACK_BINDING=36389]="TRANSFORM_FEEDBACK_BINDING",i[i.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING=33296]="FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING",i[i.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE=33297]="FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE",i[i.FRAMEBUFFER_ATTACHMENT_RED_SIZE=33298]="FRAMEBUFFER_ATTACHMENT_RED_SIZE",i[i.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE=33299]="FRAMEBUFFER_ATTACHMENT_GREEN_SIZE",i[i.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE=33300]="FRAMEBUFFER_ATTACHMENT_BLUE_SIZE",i[i.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE=33301]="FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE",i[i.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE=33302]="FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE",i[i.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE=33303]="FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE",i[i.FRAMEBUFFER_DEFAULT=33304]="FRAMEBUFFER_DEFAULT",i[i.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",i[i.DRAW_FRAMEBUFFER_BINDING=36006]="DRAW_FRAMEBUFFER_BINDING",i[i.READ_FRAMEBUFFER_BINDING=36010]="READ_FRAMEBUFFER_BINDING",i[i.RENDERBUFFER_SAMPLES=36011]="RENDERBUFFER_SAMPLES",i[i.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER=36052]="FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER",i[i.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE=36182]="FRAMEBUFFER_INCOMPLETE_MULTISAMPLE",i[i.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",i[i.UNIFORM_BUFFER_BINDING=35368]="UNIFORM_BUFFER_BINDING",i[i.UNIFORM_BUFFER_START=35369]="UNIFORM_BUFFER_START",i[i.UNIFORM_BUFFER_SIZE=35370]="UNIFORM_BUFFER_SIZE",i[i.MAX_VERTEX_UNIFORM_BLOCKS=35371]="MAX_VERTEX_UNIFORM_BLOCKS",i[i.MAX_FRAGMENT_UNIFORM_BLOCKS=35373]="MAX_FRAGMENT_UNIFORM_BLOCKS",i[i.MAX_COMBINED_UNIFORM_BLOCKS=35374]="MAX_COMBINED_UNIFORM_BLOCKS",i[i.MAX_UNIFORM_BUFFER_BINDINGS=35375]="MAX_UNIFORM_BUFFER_BINDINGS",i[i.MAX_UNIFORM_BLOCK_SIZE=35376]="MAX_UNIFORM_BLOCK_SIZE",i[i.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS=35377]="MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS",i[i.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS=35379]="MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS",i[i.UNIFORM_BUFFER_OFFSET_ALIGNMENT=35380]="UNIFORM_BUFFER_OFFSET_ALIGNMENT",i[i.ACTIVE_UNIFORM_BLOCKS=35382]="ACTIVE_UNIFORM_BLOCKS",i[i.UNIFORM_TYPE=35383]="UNIFORM_TYPE",i[i.UNIFORM_SIZE=35384]="UNIFORM_SIZE",i[i.UNIFORM_BLOCK_INDEX=35386]="UNIFORM_BLOCK_INDEX",i[i.UNIFORM_OFFSET=35387]="UNIFORM_OFFSET",i[i.UNIFORM_ARRAY_STRIDE=35388]="UNIFORM_ARRAY_STRIDE",i[i.UNIFORM_MATRIX_STRIDE=35389]="UNIFORM_MATRIX_STRIDE",i[i.UNIFORM_IS_ROW_MAJOR=35390]="UNIFORM_IS_ROW_MAJOR",i[i.UNIFORM_BLOCK_BINDING=35391]="UNIFORM_BLOCK_BINDING",i[i.UNIFORM_BLOCK_DATA_SIZE=35392]="UNIFORM_BLOCK_DATA_SIZE",i[i.UNIFORM_BLOCK_ACTIVE_UNIFORMS=35394]="UNIFORM_BLOCK_ACTIVE_UNIFORMS",i[i.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES=35395]="UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES",i[i.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER=35396]="UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER",i[i.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER=35398]="UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER",i[i.OBJECT_TYPE=37138]="OBJECT_TYPE",i[i.SYNC_CONDITION=37139]="SYNC_CONDITION",i[i.SYNC_STATUS=37140]="SYNC_STATUS",i[i.SYNC_FLAGS=37141]="SYNC_FLAGS",i[i.SYNC_FENCE=37142]="SYNC_FENCE",i[i.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE",i[i.UNSIGNALED=37144]="UNSIGNALED",i[i.SIGNALED=37145]="SIGNALED",i[i.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",i[i.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",i[i.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",i[i.WAIT_FAILED=37149]="WAIT_FAILED",i[i.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT",i[i.COLOR=6144]="COLOR",i[i.DEPTH=6145]="DEPTH",i[i.STENCIL=6146]="STENCIL",i[i.MIN=32775]="MIN",i[i.MAX=32776]="MAX",i[i.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",i[i.STREAM_READ=35041]="STREAM_READ",i[i.STREAM_COPY=35042]="STREAM_COPY",i[i.STATIC_READ=35045]="STATIC_READ",i[i.STATIC_COPY=35046]="STATIC_COPY",i[i.DYNAMIC_READ=35049]="DYNAMIC_READ",i[i.DYNAMIC_COPY=35050]="DYNAMIC_COPY",i[i.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",i[i.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8",i[i.INVALID_INDEX=4294967295]="INVALID_INDEX",i[i.TIMEOUT_IGNORED=-1]="TIMEOUT_IGNORED",i[i.MAX_CLIENT_WAIT_TIMEOUT_WEBGL=37447]="MAX_CLIENT_WAIT_TIMEOUT_WEBGL",i[i.UNMASKED_VENDOR_WEBGL=37445]="UNMASKED_VENDOR_WEBGL",i[i.UNMASKED_RENDERER_WEBGL=37446]="UNMASKED_RENDERER_WEBGL",i[i.MAX_TEXTURE_MAX_ANISOTROPY_EXT=34047]="MAX_TEXTURE_MAX_ANISOTROPY_EXT",i[i.TEXTURE_MAX_ANISOTROPY_EXT=34046]="TEXTURE_MAX_ANISOTROPY_EXT",i[i.R16_EXT=33322]="R16_EXT",i[i.RG16_EXT=33324]="RG16_EXT",i[i.RGB16_EXT=32852]="RGB16_EXT",i[i.RGBA16_EXT=32859]="RGBA16_EXT",i[i.R16_SNORM_EXT=36760]="R16_SNORM_EXT",i[i.RG16_SNORM_EXT=36761]="RG16_SNORM_EXT",i[i.RGB16_SNORM_EXT=36762]="RGB16_SNORM_EXT",i[i.RGBA16_SNORM_EXT=36763]="RGBA16_SNORM_EXT",i[i.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",i[i.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",i[i.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",i[i.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",i[i.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",i[i.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",i[i.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",i[i.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",i[i.COMPRESSED_RED_RGTC1_EXT=36283]="COMPRESSED_RED_RGTC1_EXT",i[i.COMPRESSED_SIGNED_RED_RGTC1_EXT=36284]="COMPRESSED_SIGNED_RED_RGTC1_EXT",i[i.COMPRESSED_RED_GREEN_RGTC2_EXT=36285]="COMPRESSED_RED_GREEN_RGTC2_EXT",i[i.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT=36286]="COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT",i[i.COMPRESSED_RGBA_BPTC_UNORM_EXT=36492]="COMPRESSED_RGBA_BPTC_UNORM_EXT",i[i.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=36493]="COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT",i[i.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT=36494]="COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT",i[i.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT=36495]="COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT",i[i.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",i[i.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",i[i.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",i[i.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",i[i.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",i[i.COMPRESSED_RGBA8_ETC2_EAC=37493]="COMPRESSED_RGBA8_ETC2_EAC",i[i.COMPRESSED_SRGB8_ETC2=37494]="COMPRESSED_SRGB8_ETC2",i[i.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37495]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",i[i.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37496]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",i[i.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37497]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",i[i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",i[i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",i[i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",i[i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",i[i.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",i[i.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",i[i.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35986]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",i[i.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",i[i.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",i[i.COMPRESSED_RGBA_ASTC_5x4_KHR=37809]="COMPRESSED_RGBA_ASTC_5x4_KHR",i[i.COMPRESSED_RGBA_ASTC_5x5_KHR=37810]="COMPRESSED_RGBA_ASTC_5x5_KHR",i[i.COMPRESSED_RGBA_ASTC_6x5_KHR=37811]="COMPRESSED_RGBA_ASTC_6x5_KHR",i[i.COMPRESSED_RGBA_ASTC_6x6_KHR=37812]="COMPRESSED_RGBA_ASTC_6x6_KHR",i[i.COMPRESSED_RGBA_ASTC_8x5_KHR=37813]="COMPRESSED_RGBA_ASTC_8x5_KHR",i[i.COMPRESSED_RGBA_ASTC_8x6_KHR=37814]="COMPRESSED_RGBA_ASTC_8x6_KHR",i[i.COMPRESSED_RGBA_ASTC_8x8_KHR=37815]="COMPRESSED_RGBA_ASTC_8x8_KHR",i[i.COMPRESSED_RGBA_ASTC_10x5_KHR=37816]="COMPRESSED_RGBA_ASTC_10x5_KHR",i[i.COMPRESSED_RGBA_ASTC_10x6_KHR=37817]="COMPRESSED_RGBA_ASTC_10x6_KHR",i[i.COMPRESSED_RGBA_ASTC_10x8_KHR=37818]="COMPRESSED_RGBA_ASTC_10x8_KHR",i[i.COMPRESSED_RGBA_ASTC_10x10_KHR=37819]="COMPRESSED_RGBA_ASTC_10x10_KHR",i[i.COMPRESSED_RGBA_ASTC_12x10_KHR=37820]="COMPRESSED_RGBA_ASTC_12x10_KHR",i[i.COMPRESSED_RGBA_ASTC_12x12_KHR=37821]="COMPRESSED_RGBA_ASTC_12x12_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=37840]="COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR=37841]="COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR=37842]="COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR=37843]="COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR=37844]="COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR=37845]="COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR=37846]="COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR=37847]="COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR=37848]="COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR=37849]="COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR=37850]="COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR=37851]="COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR=37852]="COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR=37853]="COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR",i[i.QUERY_COUNTER_BITS_EXT=34916]="QUERY_COUNTER_BITS_EXT",i[i.CURRENT_QUERY_EXT=34917]="CURRENT_QUERY_EXT",i[i.QUERY_RESULT_EXT=34918]="QUERY_RESULT_EXT",i[i.QUERY_RESULT_AVAILABLE_EXT=34919]="QUERY_RESULT_AVAILABLE_EXT",i[i.TIME_ELAPSED_EXT=35007]="TIME_ELAPSED_EXT",i[i.TIMESTAMP_EXT=36392]="TIMESTAMP_EXT",i[i.GPU_DISJOINT_EXT=36795]="GPU_DISJOINT_EXT",i[i.COMPLETION_STATUS_KHR=37297]="COMPLETION_STATUS_KHR",i[i.DEPTH_CLAMP_EXT=34383]="DEPTH_CLAMP_EXT",i[i.FIRST_VERTEX_CONVENTION_WEBGL=36429]="FIRST_VERTEX_CONVENTION_WEBGL",i[i.LAST_VERTEX_CONVENTION_WEBGL=36430]="LAST_VERTEX_CONVENTION_WEBGL",i[i.PROVOKING_VERTEX_WEBL=36431]="PROVOKING_VERTEX_WEBL",i[i.POLYGON_MODE_WEBGL=2880]="POLYGON_MODE_WEBGL",i[i.POLYGON_OFFSET_LINE_WEBGL=10754]="POLYGON_OFFSET_LINE_WEBGL",i[i.LINE_WEBGL=6913]="LINE_WEBGL",i[i.FILL_WEBGL=6914]="FILL_WEBGL",i[i.MAX_CLIP_DISTANCES_WEBGL=3378]="MAX_CLIP_DISTANCES_WEBGL",i[i.MAX_CULL_DISTANCES_WEBGL=33529]="MAX_CULL_DISTANCES_WEBGL",i[i.MAX_COMBINED_CLIP_AND_CULL_DISTANCES_WEBGL=33530]="MAX_COMBINED_CLIP_AND_CULL_DISTANCES_WEBGL",i[i.CLIP_DISTANCE0_WEBGL=12288]="CLIP_DISTANCE0_WEBGL",i[i.CLIP_DISTANCE1_WEBGL=12289]="CLIP_DISTANCE1_WEBGL",i[i.CLIP_DISTANCE2_WEBGL=12290]="CLIP_DISTANCE2_WEBGL",i[i.CLIP_DISTANCE3_WEBGL=12291]="CLIP_DISTANCE3_WEBGL",i[i.CLIP_DISTANCE4_WEBGL=12292]="CLIP_DISTANCE4_WEBGL",i[i.CLIP_DISTANCE5_WEBGL=12293]="CLIP_DISTANCE5_WEBGL",i[i.CLIP_DISTANCE6_WEBGL=12294]="CLIP_DISTANCE6_WEBGL",i[i.CLIP_DISTANCE7_WEBGL=12295]="CLIP_DISTANCE7_WEBGL",i[i.POLYGON_OFFSET_CLAMP_EXT=36379]="POLYGON_OFFSET_CLAMP_EXT",i[i.LOWER_LEFT_EXT=36001]="LOWER_LEFT_EXT",i[i.UPPER_LEFT_EXT=36002]="UPPER_LEFT_EXT",i[i.NEGATIVE_ONE_TO_ONE_EXT=37726]="NEGATIVE_ONE_TO_ONE_EXT",i[i.ZERO_TO_ONE_EXT=37727]="ZERO_TO_ONE_EXT",i[i.CLIP_ORIGIN_EXT=37724]="CLIP_ORIGIN_EXT",i[i.CLIP_DEPTH_MODE_EXT=37725]="CLIP_DEPTH_MODE_EXT",i[i.SRC1_COLOR_WEBGL=35065]="SRC1_COLOR_WEBGL",i[i.SRC1_ALPHA_WEBGL=34185]="SRC1_ALPHA_WEBGL",i[i.ONE_MINUS_SRC1_COLOR_WEBGL=35066]="ONE_MINUS_SRC1_COLOR_WEBGL",i[i.ONE_MINUS_SRC1_ALPHA_WEBGL=35067]="ONE_MINUS_SRC1_ALPHA_WEBGL",i[i.MAX_DUAL_SOURCE_DRAW_BUFFERS_WEBGL=35068]="MAX_DUAL_SOURCE_DRAW_BUFFERS_WEBGL",i[i.MIRROR_CLAMP_TO_EDGE_EXT=34627]="MIRROR_CLAMP_TO_EDGE_EXT"})(Do||(Do={}));const HN={WEBGL_depth_texture:{UNSIGNED_INT_24_8_WEBGL:34042},OES_element_index_uint:{},OES_texture_float:{},OES_texture_half_float:{HALF_FLOAT_OES:5131},EXT_color_buffer_float:{},OES_standard_derivatives:{FRAGMENT_SHADER_DERIVATIVE_HINT_OES:35723},EXT_frag_depth:{},EXT_blend_minmax:{MIN_EXT:32775,MAX_EXT:32776},EXT_shader_texture_lod:{}},VN=i=>({drawBuffersWEBGL(e){return i.drawBuffers(e)},COLOR_ATTACHMENT0_WEBGL:36064,COLOR_ATTACHMENT1_WEBGL:36065,COLOR_ATTACHMENT2_WEBGL:36066,COLOR_ATTACHMENT3_WEBGL:36067}),GN=i=>({VERTEX_ARRAY_BINDING_OES:34229,createVertexArrayOES(){return i.createVertexArray()},deleteVertexArrayOES(e){return i.deleteVertexArray(e)},isVertexArrayOES(e){return i.isVertexArray(e)},bindVertexArrayOES(e){return i.bindVertexArray(e)}}),WN=i=>({VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE:35070,drawArraysInstancedANGLE(...e){return i.drawArraysInstanced(...e)},drawElementsInstancedANGLE(...e){return i.drawElementsInstanced(...e)},vertexAttribDivisorANGLE(...e){return i.vertexAttribDivisor(...e)}});function YN(i=!0){const e=HTMLCanvasElement.prototype;if(!i&&e.originalGetContext){e.getContext=e.originalGetContext,e.originalGetContext=void 0;return}e.originalGetContext=e.getContext,e.getContext=function(t,n){if(t==="webgl"||t==="experimental-webgl"){const s=this.originalGetContext("webgl2",n);return s instanceof HTMLElement&&qN(s),s}return this.originalGetContext(t,n)}}function qN(i){i.getExtension("EXT_color_buffer_float");const e={...HN,WEBGL_disjoint_timer_query:i.getExtension("EXT_disjoint_timer_query_webgl2"),WEBGL_draw_buffers:VN(i),OES_vertex_array_object:GN(i),ANGLE_instanced_arrays:WN(i)},t=i.getExtension;i.getExtension=function(s){return t.call(i,s)||(s in e?e[s]:null)};const n=i.getSupportedExtensions;i.getSupportedExtensions=function(){const s=n.apply(i)||[];return s==null?void 0:s.concat(Object.keys(e))}}async function w2(i,e){const t=document.getElementsByTagName("head")[0];if(!t)throw new Error("loadScript");const n=document.createElement("script");return n.setAttribute("type","text/javascript"),n.setAttribute("src",i),new Promise((s,r)=>{n.onload=s,n.onerror=o=>r(new Error(`Unable to load script '${i}': ${o}`)),t.appendChild(n)})}const XN=1;let hi=null,Y0=!1;const uy={debugSpectorJS:le.get("debug-spectorjs"),debugSpectorJSUrl:"https://cdn.jsdelivr.net/npm/spectorjs@0.9.30/dist/spector.bundle.js",gl:void 0};async function KN(i){if(!globalThis.SPECTOR)try{await w2(i.debugSpectorJSUrl||uy.debugSpectorJSUrl)}catch(e){le.warn(String(e))}}function gte(i){var e;if(i={...uy,...i},!i.debugSpectorJS)return null;if(!hi&&globalThis.SPECTOR&&!((e=globalThis.luma)!=null&&e.spector)){le.probe(XN,"SPECTOR found and initialized. Start with `luma.spector.displayUI()`")();const{Spector:t}=globalThis.SPECTOR;hi=new t,globalThis.luma&&(globalThis.luma.spector=hi)}if(!hi)return null;if(Y0||(Y0=!0,hi.spyCanvases(),hi==null||hi.onCaptureStarted.add(t=>le.info("Spector capture started:",t)()),hi==null||hi.onCapture.add(t=>{le.info("Spector capture complete:",t)(),hi==null||hi.getResultUI(),hi==null||hi.resultView.display(),hi==null||hi.resultView.addCapture(t)})),i.gl){const t=i.gl,n=t.device;hi==null||hi.startCapture(i.gl,500),t.device=n,new Promise(s=>setTimeout(s,2e3)).then(s=>{le.info("Spector capture stopped after 2 seconds")(),hi==null||hi.stopCapture()})}return hi}const ZN="https://unpkg.com/webgl-debug@2.0.1/index.js";function S2(i){return i.luma=i.luma||{},i.luma}async function QN(){Vu()&&!globalThis.WebGLDebugUtils&&(globalThis.global=globalThis.global||globalThis,globalThis.global.module={},await w2(ZN))}function _te(i,e={}){return e.debugWebGL||e.traceWebGL?eD(i,e):JN(i)}function JN(i){const e=S2(i);return e.realContext?e.realContext:i}function eD(i,e){if(!globalThis.WebGLDebugUtils)return le.warn("webgl-debug not loaded")(),i;const t=S2(i);if(t.debugContext)return t.debugContext;globalThis.WebGLDebugUtils.init({...Do,...i});const n=globalThis.WebGLDebugUtils.makeDebugContext(i,tD.bind(null,e),iD.bind(null,e));for(const o in Do)!(o in n)&&typeof Do[o]=="number"&&(n[o]=Do[o]);class s{}Object.setPrototypeOf(n,Object.getPrototypeOf(i)),Object.setPrototypeOf(s,n);const r=Object.create(s);return t.realContext=i,t.debugContext=r,r.debug=!0,r}function q0(i,e){e=Array.from(e).map(n=>n===void 0?"undefined":n);let t=globalThis.WebGLDebugUtils.glFunctionArgsToString(i,e);return t=`${t.slice(0,100)}${t.length>100?"...":""}`,`gl.${i}(${t})`}function tD(i,e,t,n){n=Array.from(n).map(a=>a===void 0?"undefined":a);const s=globalThis.WebGLDebugUtils.glEnumToString(e),r=globalThis.WebGLDebugUtils.glFunctionArgsToString(t,n),o=`${s} in gl.${t}(${r})`;le.error(o)();debugger}function iD(i,e,t){let n="";le.level>=1&&(n=q0(e,t),i.traceWebGL&&le.log(1,n)());for(const s of t)if(s===void 0){n=n||q0(e,t);debugger}}const wd=1;class nD extends fN{constructor(){super(),U(this,"type","webgl"),bg.defaultProps={...bg.defaultProps,...uy}}enforceWebGL2(e){YN(e)}isSupported(){return typeof WebGL2RenderingContext<"u"}isDeviceHandle(e){return typeof WebGL2RenderingContext<"u"&&e instanceof WebGL2RenderingContext?!0:(typeof WebGLRenderingContext<"u"&&e instanceof WebGLRenderingContext&&le.warn("WebGL1 is not supported",e)(),!1)}async attach(e,t={}){const{WebGLDevice:n}=await l0(async()=>{const{WebGLDevice:r}=await import("./webgl-device-QoBMYpnS-dbCUwguu.js");return{WebGLDevice:r}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]));if(e instanceof n)return e;if((e==null?void 0:e.device)instanceof n)return e.device;if(!sD(e))throw new Error("Invalid WebGL2RenderingContext");const s=t.createCanvasContext===!0?{}:t.createCanvasContext;return new n({...t,_handle:e,createCanvasContext:{canvas:e.canvas,autoResize:!1,...s}})}async create(e={}){const{WebGLDevice:t}=await l0(async()=>{const{WebGLDevice:n}=await import("./webgl-device-QoBMYpnS-dbCUwguu.js");return{WebGLDevice:n}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]));le.groupCollapsed(wd,"WebGLDevice created")();try{const n=[];(e.debugWebGL||e.debug)&&n.push(QN()),e.debugSpectorJS&&n.push(KN(e));const s=await Promise.allSettled(n);for(const a of s)a.status==="rejected"&&le.error(`Failed to initialize debug libraries ${a.reason}`)();const r=new t(e),o=`${r._reused?"Reusing":"Created"} device with WebGL2 ${r.props.debug?"debug ":""}context: ${r.info.vendor}, ${r.info.renderer} for canvas: ${r.canvasContext.id}`;return le.probe(wd,o)(),le.table(wd,r.info)(),r}finally{le.groupEnd(wd)()}}}function sD(i){return typeof WebGL2RenderingContext<"u"&&i instanceof WebGL2RenderingContext?!0:!!(i&&Number.isFinite(i._version))}const rD=new nD,oD="#b3b3b3",aD=void 0,wg=void 0,lD=1,cD=4,uD="#666666",dD=.1,hD=1,fD=1,E2="#222222",pe={enableSimulation:!0,spaceSize:8192,pointSizeScale:1,linkWidthScale:1,linkArrowsSizeScale:1,renderLinks:!0,curvedLinks:!1,curvedLinkSegments:19,curvedLinkWeight:.8,curvedLinkControlPointDistance:.5,linkArrows:!1,linkVisibilityDistanceRange:[50,150],linkVisibilityMinTransparency:.25,hoveredPointCursor:"auto",hoveredLinkCursor:"auto",renderHoveredPointRing:!1,hoveredPointRingColor:"white",hoveredLinkColor:void 0,hoveredLinkWidthIncrease:5,focusedPointRingColor:"white",focusedPointIndex:void 0,simulation:{decay:5e3,gravity:.25,center:0,repulsion:1,repulsionTheta:1.15,linkSpring:1,linkDistance:10,linkDistRandomVariationRange:[1,1.2],repulsionFromMouse:2,friction:.85,cluster:.1},showFPSMonitor:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||2,scalePointsOnZoom:!1,scaleLinksOnZoom:!1,enableZoom:!0,enableSimulationDuringZoom:!1,enableDrag:!1,fitViewOnInit:!0,fitViewDelay:250,fitViewPadding:.1,fitViewDuration:250,pointSamplingDistance:150,attribution:"",rescalePositions:void 0,enableRightClickRepulsion:!1},pD=.7,mD=.95,gD=3;/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:C2,setPrototypeOf:X0,isFrozen:_D,getPrototypeOf:yD,getOwnPropertyDescriptor:bD}=Object;let{freeze:hn,seal:_s,create:T2}=Object,{apply:Sg,construct:Eg}=typeof Reflect<"u"&&Reflect;hn||(hn=function(i){return i});_s||(_s=function(i){return i});Sg||(Sg=function(i,e,t){return i.apply(e,t)});Eg||(Eg=function(i,e){return new i(...e)});const Sd=fn(Array.prototype.forEach),vD=fn(Array.prototype.lastIndexOf),K0=fn(Array.prototype.pop),ac=fn(Array.prototype.push),xD=fn(Array.prototype.splice),uh=fn(String.prototype.toLowerCase),Jp=fn(String.prototype.toString),Z0=fn(String.prototype.match),lc=fn(String.prototype.replace),wD=fn(String.prototype.indexOf),SD=fn(String.prototype.trim),Ms=fn(Object.prototype.hasOwnProperty),sn=fn(RegExp.prototype.test),cc=ED(TypeError);function fn(i){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s2&&arguments[2]!==void 0?arguments[2]:uh;X0&&X0(i,null);let n=e.length;for(;n--;){let s=e[n];if(typeof s=="string"){const r=t(s);r!==s&&(_D(e)||(e[n]=r),s=r)}i[s]=!0}return i}function CD(i){for(let e=0;e/gm),LD=_s(/\$\{[\w\W]*/gm),RD=_s(/^data-[\-\w.\u00B7-\uFFFF]+$/),PD=_s(/^aria-[\-\w]+$/),k2=_s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ND=_s(/^(?:\w+script|data):/i),DD=_s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),A2=_s(/^html$/i),MD=_s(/^[a-z][.\w]*(-[.\w]+)+$/i);var ix=Object.freeze({__proto__:null,ARIA_ATTR:PD,ATTR_WHITESPACE:DD,CUSTOM_ELEMENT:MD,DATA_ATTR:RD,DOCTYPE_NAME:A2,ERB_EXPR:ID,IS_ALLOWED_URI:k2,IS_SCRIPT_OR_DATA:ND,MUSTACHE_EXPR:AD,TMPLIT_EXPR:LD});const dc={element:1,text:3,progressingInstruction:7,comment:8,document:9},OD=function(){return typeof window>"u"?null:window},BD=function(i,e){if(typeof i!="object"||typeof i.createPolicy!="function")return null;let t=null;const n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(t=e.getAttribute(n));const s="dompurify"+(t?"#"+t:"");try{return i.createPolicy(s,{createHTML(r){return r},createScriptURL(r){return r}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},nx=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function I2(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:OD();const e=I=>I2(I);if(e.version="3.2.6",e.removed=[],!i||!i.document||i.document.nodeType!==dc.document||!i.Element)return e.isSupported=!1,e;let{document:t}=i;const n=t,s=n.currentScript,{DocumentFragment:r,HTMLTemplateElement:o,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:p}=i,m=l.prototype,y=uc(m,"cloneNode"),g=uc(m,"remove"),_=uc(m,"nextSibling"),S=uc(m,"childNodes"),C=uc(m,"parentNode");if(typeof o=="function"){const I=t.createElement("template");I.content&&I.content.ownerDocument&&(t=I.content.ownerDocument)}let x,A="";const{implementation:L,createNodeIterator:B,createDocumentFragment:H,getElementsByTagName:Q}=t,{importNode:te}=n;let M=nx();e.isSupported=typeof C2=="function"&&typeof C=="function"&&L&&L.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:he,ERB_EXPR:se,TMPLIT_EXPR:R,DATA_ATTR:J,ARIA_ATTR:F,IS_SCRIPT_OR_DATA:X,ATTR_WHITESPACE:ie,CUSTOM_ELEMENT:ee}=ix;let{IS_ALLOWED_URI:ae}=ix,Z=null;const Se=ot({},[...Q0,...em,...tm,...im,...J0]);let xe=null;const Je=ot({},[...ex,...nm,...tx,...Ed]);let de=Object.seal(T2(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),bt=null,Xe=null,ht=!0,re=!0,Te=!1,Pe=!0,q=!1,We=!0,He=!1,it=!1,Vt=!1,me=!1,nt=!1,ui=!1,_i=!0,Zn=!1;const Qo="user-content-";let Zs=!0,Li=!1,en={},Ri=null;const ai=ot({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let vo=null;const Es=ot({},["audio","video","img","source","image","track"]);let Qn=null;const Jn=ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Cs="http://www.w3.org/1998/Math/MathML",zi="http://www.w3.org/2000/svg",Ei="http://www.w3.org/1999/xhtml";let ii=Ei,bn=!1,vn=null;const Ts=ot({},[Cs,zi,Ei],Jp);let On=ot({},["mi","mo","mn","ms","mtext"]),es=ot({},["annotation-xml"]);const Dr=ot({},["title","style","font","a","script"]);let xn=null;const Qs=["application/xhtml+xml","text/html"],Jo="text/html";let Zt=null,Ot=null;const ks=t.createElement("form"),xo=function(I){return I instanceof RegExp||I instanceof Function},Js=function(){let I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ot&&Ot===I)){if((!I||typeof I!="object")&&(I={}),I=Hr(I),xn=Qs.indexOf(I.PARSER_MEDIA_TYPE)===-1?Jo:I.PARSER_MEDIA_TYPE,Zt=xn==="application/xhtml+xml"?Jp:uh,Z=Ms(I,"ALLOWED_TAGS")?ot({},I.ALLOWED_TAGS,Zt):Se,xe=Ms(I,"ALLOWED_ATTR")?ot({},I.ALLOWED_ATTR,Zt):Je,vn=Ms(I,"ALLOWED_NAMESPACES")?ot({},I.ALLOWED_NAMESPACES,Jp):Ts,Qn=Ms(I,"ADD_URI_SAFE_ATTR")?ot(Hr(Jn),I.ADD_URI_SAFE_ATTR,Zt):Jn,vo=Ms(I,"ADD_DATA_URI_TAGS")?ot(Hr(Es),I.ADD_DATA_URI_TAGS,Zt):Es,Ri=Ms(I,"FORBID_CONTENTS")?ot({},I.FORBID_CONTENTS,Zt):ai,bt=Ms(I,"FORBID_TAGS")?ot({},I.FORBID_TAGS,Zt):Hr({}),Xe=Ms(I,"FORBID_ATTR")?ot({},I.FORBID_ATTR,Zt):Hr({}),en=Ms(I,"USE_PROFILES")?I.USE_PROFILES:!1,ht=I.ALLOW_ARIA_ATTR!==!1,re=I.ALLOW_DATA_ATTR!==!1,Te=I.ALLOW_UNKNOWN_PROTOCOLS||!1,Pe=I.ALLOW_SELF_CLOSE_IN_ATTR!==!1,q=I.SAFE_FOR_TEMPLATES||!1,We=I.SAFE_FOR_XML!==!1,He=I.WHOLE_DOCUMENT||!1,me=I.RETURN_DOM||!1,nt=I.RETURN_DOM_FRAGMENT||!1,ui=I.RETURN_TRUSTED_TYPE||!1,Vt=I.FORCE_BODY||!1,_i=I.SANITIZE_DOM!==!1,Zn=I.SANITIZE_NAMED_PROPS||!1,Zs=I.KEEP_CONTENT!==!1,Li=I.IN_PLACE||!1,ae=I.ALLOWED_URI_REGEXP||k2,ii=I.NAMESPACE||Ei,On=I.MATHML_TEXT_INTEGRATION_POINTS||On,es=I.HTML_INTEGRATION_POINTS||es,de=I.CUSTOM_ELEMENT_HANDLING||{},I.CUSTOM_ELEMENT_HANDLING&&xo(I.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(de.tagNameCheck=I.CUSTOM_ELEMENT_HANDLING.tagNameCheck),I.CUSTOM_ELEMENT_HANDLING&&xo(I.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(de.attributeNameCheck=I.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),I.CUSTOM_ELEMENT_HANDLING&&typeof I.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(de.allowCustomizedBuiltInElements=I.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),q&&(re=!1),nt&&(me=!0),en&&(Z=ot({},J0),xe=[],en.html===!0&&(ot(Z,Q0),ot(xe,ex)),en.svg===!0&&(ot(Z,em),ot(xe,nm),ot(xe,Ed)),en.svgFilters===!0&&(ot(Z,tm),ot(xe,nm),ot(xe,Ed)),en.mathMl===!0&&(ot(Z,im),ot(xe,tx),ot(xe,Ed))),I.ADD_TAGS&&(Z===Se&&(Z=Hr(Z)),ot(Z,I.ADD_TAGS,Zt)),I.ADD_ATTR&&(xe===Je&&(xe=Hr(xe)),ot(xe,I.ADD_ATTR,Zt)),I.ADD_URI_SAFE_ATTR&&ot(Qn,I.ADD_URI_SAFE_ATTR,Zt),I.FORBID_CONTENTS&&(Ri===ai&&(Ri=Hr(Ri)),ot(Ri,I.FORBID_CONTENTS,Zt)),Zs&&(Z["#text"]=!0),He&&ot(Z,["html","head","body"]),Z.table&&(ot(Z,["tbody"]),delete bt.tbody),I.TRUSTED_TYPES_POLICY){if(typeof I.TRUSTED_TYPES_POLICY.createHTML!="function")throw cc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof I.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw cc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=I.TRUSTED_TYPES_POLICY,A=x.createHTML("")}else x===void 0&&(x=BD(p,s)),x!==null&&typeof A=="string"&&(A=x.createHTML(""));hn&&hn(I),Ot=I}},Rt=ot({},[...em,...tm,...TD]),Mr=ot({},[...im,...kD]),ea=function(I){let V=C(I);(!V||!V.tagName)&&(V={namespaceURI:ii,tagName:"template"});const E=uh(I.tagName),G=uh(V.tagName);return vn[I.namespaceURI]?I.namespaceURI===zi?V.namespaceURI===Ei?E==="svg":V.namespaceURI===Cs?E==="svg"&&(G==="annotation-xml"||On[G]):!!Rt[E]:I.namespaceURI===Cs?V.namespaceURI===Ei?E==="math":V.namespaceURI===zi?E==="math"&&es[G]:!!Mr[E]:I.namespaceURI===Ei?V.namespaceURI===zi&&!es[G]||V.namespaceURI===Cs&&!On[G]?!1:!Mr[E]&&(Dr[E]||!Rt[E]):!!(xn==="application/xhtml+xml"&&vn[I.namespaceURI]):!1},ts=function(I){ac(e.removed,{element:I});try{C(I).removeChild(I)}catch{g(I)}},di=function(I,V){try{ac(e.removed,{attribute:V.getAttributeNode(I),from:V})}catch{ac(e.removed,{attribute:null,from:V})}if(V.removeAttribute(I),I==="is")if(me||nt)try{ts(V)}catch{}else try{V.setAttribute(I,"")}catch{}},Bn=function(I){let V=null,E=null;if(Vt)I=""+I;else{const Ce=Z0(I,/^[\r\n\t ]+/);E=Ce&&Ce[0]}xn==="application/xhtml+xml"&&ii===Ei&&(I=''+I+"");const G=x?x.createHTML(I):I;if(ii===Ei)try{V=new h().parseFromString(G,xn)}catch{}if(!V||!V.documentElement){V=L.createDocument(ii,"template",null);try{V.documentElement.innerHTML=bn?A:G}catch{}}const ne=V.body||V.documentElement;return I&&E&&ne.insertBefore(t.createTextNode(E),ne.childNodes[0]||null),ii===Ei?Q.call(V,He?"html":"body")[0]:He?V.documentElement:ne},wo=function(I){return B.call(I.ownerDocument||I,I,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ut=function(I){return I instanceof d&&(typeof I.nodeName!="string"||typeof I.textContent!="string"||typeof I.removeChild!="function"||!(I.attributes instanceof u)||typeof I.removeAttribute!="function"||typeof I.setAttribute!="function"||typeof I.namespaceURI!="string"||typeof I.insertBefore!="function"||typeof I.hasChildNodes!="function")},Or=function(I){return typeof a=="function"&&I instanceof a};function st(I,V,E){Sd(I,G=>{G.call(e,V,E,Ot)})}const wn=function(I){let V=null;if(st(M.beforeSanitizeElements,I,null),ut(I))return ts(I),!0;const E=Zt(I.nodeName);if(st(M.uponSanitizeElement,I,{tagName:E,allowedTags:Z}),We&&I.hasChildNodes()&&!Or(I.firstElementChild)&&sn(/<[/\w!]/g,I.innerHTML)&&sn(/<[/\w!]/g,I.textContent)||I.nodeType===dc.progressingInstruction||We&&I.nodeType===dc.comment&&sn(/<[/\w]/g,I.data))return ts(I),!0;if(!Z[E]||bt[E]){if(!bt[E]&&er(E)&&(de.tagNameCheck instanceof RegExp&&sn(de.tagNameCheck,E)||de.tagNameCheck instanceof Function&&de.tagNameCheck(E)))return!1;if(Zs&&!Ri[E]){const G=C(I)||I.parentNode,ne=S(I)||I.childNodes;if(ne&&G){const Ce=ne.length;for(let At=Ce-1;At>=0;--At){const rt=y(ne[At],!0);rt.__removalCount=(I.__removalCount||0)+1,G.insertBefore(rt,_(I))}}}return ts(I),!0}return I instanceof l&&!ea(I)||(E==="noscript"||E==="noembed"||E==="noframes")&&sn(/<\/no(script|embed|frames)/i,I.innerHTML)?(ts(I),!0):(q&&I.nodeType===dc.text&&(V=I.textContent,Sd([he,se,R],G=>{V=lc(V,G," ")}),I.textContent!==V&&(ac(e.removed,{element:I.cloneNode()}),I.textContent=V)),st(M.afterSanitizeElements,I,null),!1)},Br=function(I,V,E){if(_i&&(V==="id"||V==="name")&&(E in t||E in ks))return!1;if(!(re&&!Xe[V]&&sn(J,V))&&!(ht&&sn(F,V))){if(!xe[V]||Xe[V]){if(!(er(I)&&(de.tagNameCheck instanceof RegExp&&sn(de.tagNameCheck,I)||de.tagNameCheck instanceof Function&&de.tagNameCheck(I))&&(de.attributeNameCheck instanceof RegExp&&sn(de.attributeNameCheck,V)||de.attributeNameCheck instanceof Function&&de.attributeNameCheck(V))||V==="is"&&de.allowCustomizedBuiltInElements&&(de.tagNameCheck instanceof RegExp&&sn(de.tagNameCheck,E)||de.tagNameCheck instanceof Function&&de.tagNameCheck(E))))return!1}else if(!Qn[V]&&!sn(ae,lc(E,ie,""))&&!((V==="src"||V==="xlink:href"||V==="href")&&I!=="script"&&wD(E,"data:")===0&&vo[I])&&!(Te&&!sn(X,lc(E,ie,"")))&&E)return!1}return!0},er=function(I){return I!=="annotation-xml"&&Z0(I,ee)},Fn=function(I){st(M.beforeSanitizeAttributes,I,null);const{attributes:V}=I;if(!V||ut(I))return;const E={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xe,forceKeepAttr:void 0};let G=V.length;for(;G--;){const ne=V[G],{name:Ce,namespaceURI:At,value:rt}=ne,et=Zt(Ce),yi=rt;let ft=Ce==="value"?yi:SD(yi);if(E.attrName=et,E.attrValue=ft,E.keepAttr=!0,E.forceKeepAttr=void 0,st(M.uponSanitizeAttribute,I,E),ft=E.attrValue,Zn&&(et==="id"||et==="name")&&(di(Ce,I),ft=Qo+ft),We&&sn(/((--!?|])>)|<\/(style|title)/i,ft)){di(Ce,I);continue}if(E.forceKeepAttr)continue;if(!E.keepAttr){di(Ce,I);continue}if(!Pe&&sn(/\/>/i,ft)){di(Ce,I);continue}q&&Sd([he,se,R],Bt=>{ft=lc(ft,Bt," ")});const tr=Zt(I.nodeName);if(!Br(tr,et,ft)){di(Ce,I);continue}if(x&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!At)switch(p.getAttributeType(tr,et)){case"TrustedHTML":{ft=x.createHTML(ft);break}case"TrustedScriptURL":{ft=x.createScriptURL(ft);break}}if(ft!==yi)try{At?I.setAttributeNS(At,Ce,ft):I.setAttribute(Ce,ft),ut(I)?ts(I):K0(e.removed)}catch{di(Ce,I)}}st(M.afterSanitizeAttributes,I,null)},tn=function I(V){let E=null;const G=wo(V);for(st(M.beforeSanitizeShadowDOM,V,null);E=G.nextNode();)st(M.uponSanitizeShadowNode,E,null),wn(E),Fn(E),E.content instanceof r&&I(E.content);st(M.afterSanitizeShadowDOM,V,null)};return e.sanitize=function(I){let V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=null,G=null,ne=null,Ce=null;if(bn=!I,bn&&(I=""),typeof I!="string"&&!Or(I))if(typeof I.toString=="function"){if(I=I.toString(),typeof I!="string")throw cc("dirty is not a string, aborting")}else throw cc("toString is not a function");if(!e.isSupported)return I;if(it||Js(V),e.removed=[],typeof I=="string"&&(Li=!1),Li){if(I.nodeName){const et=Zt(I.nodeName);if(!Z[et]||bt[et])throw cc("root node is forbidden and cannot be sanitized in-place")}}else if(I instanceof a)E=Bn(""),G=E.ownerDocument.importNode(I,!0),G.nodeType===dc.element&&G.nodeName==="BODY"||G.nodeName==="HTML"?E=G:E.appendChild(G);else{if(!me&&!q&&!He&&I.indexOf("<")===-1)return x&&ui?x.createHTML(I):I;if(E=Bn(I),!E)return me?null:ui?A:""}E&&Vt&&ts(E.firstChild);const At=wo(Li?I:E);for(;ne=At.nextNode();)wn(ne),Fn(ne),ne.content instanceof r&&tn(ne.content);if(Li)return I;if(me){if(nt)for(Ce=H.call(E.ownerDocument);E.firstChild;)Ce.appendChild(E.firstChild);else Ce=E;return(xe.shadowroot||xe.shadowrootmode)&&(Ce=te.call(n,Ce,!0)),Ce}let rt=He?E.outerHTML:E.innerHTML;return He&&Z["!doctype"]&&E.ownerDocument&&E.ownerDocument.doctype&&E.ownerDocument.doctype.name&&sn(A2,E.ownerDocument.doctype.name)&&(rt=" +`,l.style.top="10px",l.style.left="10px",l.style.position="absolute",l.style.zIndex="9999",l.style.width="100%",l.style.textAlign="left",document.body.appendChild(l),(n=document.getElementsByClassName("luma-compiler-log-error")[0])==null||n.scrollIntoView(),l.onclick=()=>{const c=`data:text/plain,${encodeURIComponent(this.source)}`;navigator.clipboard.writeText(c)}}};U(p2,"defaultProps",{..._n.defaultProps,language:"auto",stage:void 0,source:"",sourceMap:null,entryPoint:"main",debugShaders:void 0});let SN=p2;function EN(i){return CN(i.source)||i.id||oy(`unnamed ${i.stage}-shader`)}function CN(i,e="unnamed"){const t=/#define[\s*]SHADER_NAME[\s*]([A-Za-z0-9_-]+)[\s*]/.exec(i);return t?t[1]:e}const g2=class _2 extends _n{constructor(e,t){super(e,t,_2.defaultProps),U(this,"shaderLayout"),U(this,"bufferLayout"),U(this,"linkStatus","pending"),U(this,"hash",""),this.shaderLayout=this.props.shaderLayout,this.bufferLayout=this.props.bufferLayout||[]}get[Symbol.toStringTag](){return"RenderPipeline"}};U(g2,"defaultProps",{..._n.defaultProps,vs:null,vertexEntryPoint:"vertexMain",vsConstants:{},fs:null,fragmentEntryPoint:"fragmentMain",fsConstants:{},shaderLayout:null,bufferLayout:[],topology:"triangle-list",colorAttachmentFormats:void 0,depthStencilAttachmentFormat:void 0,parameters:{},bindings:{},uniforms:{}});let Xh=g2;const y2=class b2 extends _n{constructor(e,t){super(e,t,b2.defaultProps),U(this,"hash",""),U(this,"shaderLayout"),this.shaderLayout=t.shaderLayout}get[Symbol.toStringTag](){return"ComputePipeline"}};U(y2,"defaultProps",{..._n.defaultProps,shader:void 0,entryPoint:void 0,constants:{},shaderLayout:void 0});let W0=y2;function TN(i){return LN[i]}function kN(i){const[e,t]=IN[i],n=e==="i32"||e==="u32",s=e!=="u32",r=AN[e]*t;return{primitiveType:e,components:t,byteLength:r,integer:n,signed:s}}const AN={f32:4,f16:2,i32:4,u32:4},IN={f32:["f32",1],"vec2":["f32",2],"vec3":["f32",3],"vec4":["f32",4],f16:["f16",1],"vec2":["f16",2],"vec3":["f16",3],"vec4":["f16",4],i32:["i32",1],"vec2":["i32",2],"vec3":["i32",3],"vec4":["i32",4],u32:["u32",1],"vec2":["u32",2],"vec3":["u32",3],"vec4":["u32",4]},LN={f32:{type:"f32",components:1},f16:{type:"f16",components:1},i32:{type:"i32",components:1},u32:{type:"u32",components:1},"vec2":{type:"f32",components:2},"vec3":{type:"f32",components:3},"vec4":{type:"f32",components:4},"vec2":{type:"f16",components:2},"vec3":{type:"f16",components:3},"vec4":{type:"f16",components:4},"vec2":{type:"i32",components:2},"vec3":{type:"i32",components:3},"vec4":{type:"i32",components:4},"vec2":{type:"u32",components:2},"vec3":{type:"u32",components:3},"vec4":{type:"u32",components:4},"mat2x2":{type:"f32",components:4},"mat2x3":{type:"f32",components:6},"mat2x4":{type:"f32",components:8},"mat3x2":{type:"f32",components:6},"mat3x3":{type:"f32",components:9},"mat3x4":{type:"f32",components:12},"mat4x2":{type:"f32",components:8},"mat4x3":{type:"f32",components:12},"mat4x4":{type:"f32",components:16},"mat2x2":{type:"f16",components:4},"mat2x3":{type:"f16",components:6},"mat2x4":{type:"f16",components:8},"mat3x2":{type:"f16",components:6},"mat3x3":{type:"f16",components:9},"mat3x4":{type:"f16",components:12},"mat4x2":{type:"f16",components:8},"mat4x3":{type:"f16",components:12},"mat4x4":{type:"f16",components:16},"mat2x2":{type:"i32",components:4},"mat2x3":{type:"i32",components:6},"mat2x4":{type:"i32",components:8},"mat3x2":{type:"i32",components:6},"mat3x3":{type:"i32",components:9},"mat3x4":{type:"i32",components:12},"mat4x2":{type:"i32",components:8},"mat4x3":{type:"i32",components:12},"mat4x4":{type:"i32",components:16},"mat2x2":{type:"u32",components:4},"mat2x3":{type:"u32",components:6},"mat2x4":{type:"u32",components:8},"mat3x2":{type:"u32",components:6},"mat3x3":{type:"u32",components:9},"mat3x4":{type:"u32",components:12},"mat4x2":{type:"u32",components:8},"mat4x3":{type:"u32",components:12},"mat4x4":{type:"u32",components:16}};function v2(i,e){const t={};for(const n of i.attributes){const s=RN(i,e,n.name);s&&(t[n.name]=s)}return t}function fte(i,e,t=16){const n=v2(i,e),s=new Array(t).fill(null);for(const r of Object.values(n))s[r.location]=r;return s}function RN(i,e,t){const n=PN(i,t),s=NN(e,t);if(!n)return null;const r=kN(n.type),o=ZP(r),a=(s==null?void 0:s.vertexFormat)||o,l=ly(a);return{attributeName:(s==null?void 0:s.attributeName)||n.name,bufferName:(s==null?void 0:s.bufferName)||n.name,location:n.location,shaderType:n.type,primitiveType:r.primitiveType,shaderComponents:r.components,vertexFormat:a,bufferDataType:l.type,bufferComponents:l.components,normalized:l.normalized,integer:r.integer,stepMode:(s==null?void 0:s.stepMode)||n.stepMode||"vertex",byteOffset:(s==null?void 0:s.byteOffset)||0,byteStride:(s==null?void 0:s.byteStride)||0}}function PN(i,e){const t=i.attributes.find(n=>n.name===e);return t||le.warn(`shader layout attribute "${e}" not present in shader`),t||null}function NN(i,e){DN(i);let t=MN(i,e);return t||(t=ON(i,e),t)?t:(le.warn(`layout for attribute "${e}" not present in buffer layout`),null)}function DN(i){for(const e of i)(e.attributes&&e.format||!e.attributes&&!e.format)&&le.warn(`BufferLayout ${name} must have either 'attributes' or 'format' field`)}function MN(i,e){for(const t of i)if(t.format&&t.name===e)return{attributeName:t.name,bufferName:e,stepMode:t.stepMode,vertexFormat:t.format,byteOffset:0,byteStride:t.byteStride||0};return null}function ON(i,e){var t;for(const n of i){let s=n.byteStride;if(typeof n.byteStride!="number")for(const o of n.attributes||[]){const a=ly(o.format);s+=a.byteLength}const r=(t=n.attributes)==null?void 0:t.find(o=>o.attribute===e);if(r)return{attributeName:r.attribute,bufferName:n.name,stepMode:n.stepMode,vertexFormat:r.format,byteOffset:r.byteOffset,byteStride:s}}return null}let xd;function x2(i){return(!xd||xd.byteLengthr.type==="uniform"&&r.name===(e==null?void 0:e.name));if(!n)throw new Error(e==null?void 0:e.name);const s=n;for(const r of s.uniforms||[])this.bindingLayout[r.name]=r}}setUniforms(e){for(const[t,n]of Object.entries(e))this._setUniform(t,n),this.needsRedraw||this.setNeedsRedraw(`${this.name}.${t}=${n}`)}setNeedsRedraw(e){this.needsRedraw=this.needsRedraw||e}getAllUniforms(){return this.modifiedUniforms={},this.needsRedraw=!1,this.uniforms||{}}_setUniform(e,t){UN(this.uniforms[e],t)||(this.uniforms[e]=$N(t),this.modifiedUniforms[e]=!0,this.modified=!0)}}let ri=class{constructor(e){U(this,"uniformBlocks",new Map),U(this,"uniformBufferLayouts",new Map),U(this,"uniformBuffers",new Map);for(const[t,n]of Object.entries(e)){const s=t,r=new zN(n.uniformTypes??{},n.uniformSizes??{});this.uniformBufferLayouts.set(s,r);const o=new jN({name:t});o.setUniforms(n.defaultUniforms||{}),this.uniformBlocks.set(s,o)}}destroy(){for(const e of this.uniformBuffers.values())e.destroy()}setUniforms(e){var t;for(const[n,s]of Object.entries(e))(t=this.uniformBlocks.get(n))==null||t.setUniforms(s);this.updateUniformBuffers()}getUniformBufferByteLength(e){var t;return((t=this.uniformBufferLayouts.get(e))==null?void 0:t.byteLength)||0}getUniformBufferData(e){var t,n;const s=((t=this.uniformBlocks.get(e))==null?void 0:t.getAllUniforms())||{};return(n=this.uniformBufferLayouts.get(e))==null?void 0:n.getData(s)}createUniformBuffer(e,t,n){n&&this.setUniforms(n);const s=this.getUniformBufferByteLength(t),r=e.createBuffer({usage:ge.UNIFORM|ge.COPY_DST,byteLength:s}),o=this.getUniformBufferData(t);return r.write(o),r}getManagedUniformBuffer(e,t){if(!this.uniformBuffers.get(t)){const n=this.getUniformBufferByteLength(t),s=e.createBuffer({usage:ge.UNIFORM|ge.COPY_DST,byteLength:n});this.uniformBuffers.set(t,s)}return this.uniformBuffers.get(t)}updateUniformBuffers(){let e=!1;for(const t of this.uniformBlocks.keys()){const n=this.updateUniformBuffer(t);e||(e=n)}return e&&le.log(3,`UniformStore.updateUniformBuffers(): ${e}`)(),e}updateUniformBuffer(e){var t;const n=this.uniformBlocks.get(e);let s=this.uniformBuffers.get(e),r=!1;if(s&&n!=null&&n.needsRedraw){r||(r=n.needsRedraw);const o=this.getUniformBufferData(e);s=this.uniformBuffers.get(e),s==null||s.write(o);const a=(t=this.uniformBlocks.get(e))==null?void 0:t.getAllUniforms();le.log(4,`Writing to uniform buffer ${String(e)}`,o,a)()}return r}};var Do;(function(i){i[i.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",i[i.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",i[i.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT",i[i.POINTS=0]="POINTS",i[i.LINES=1]="LINES",i[i.LINE_LOOP=2]="LINE_LOOP",i[i.LINE_STRIP=3]="LINE_STRIP",i[i.TRIANGLES=4]="TRIANGLES",i[i.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",i[i.TRIANGLE_FAN=6]="TRIANGLE_FAN",i[i.ZERO=0]="ZERO",i[i.ONE=1]="ONE",i[i.SRC_COLOR=768]="SRC_COLOR",i[i.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",i[i.SRC_ALPHA=770]="SRC_ALPHA",i[i.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",i[i.DST_ALPHA=772]="DST_ALPHA",i[i.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",i[i.DST_COLOR=774]="DST_COLOR",i[i.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",i[i.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",i[i.CONSTANT_COLOR=32769]="CONSTANT_COLOR",i[i.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",i[i.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",i[i.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA",i[i.FUNC_ADD=32774]="FUNC_ADD",i[i.FUNC_SUBTRACT=32778]="FUNC_SUBTRACT",i[i.FUNC_REVERSE_SUBTRACT=32779]="FUNC_REVERSE_SUBTRACT",i[i.BLEND_EQUATION=32777]="BLEND_EQUATION",i[i.BLEND_EQUATION_RGB=32777]="BLEND_EQUATION_RGB",i[i.BLEND_EQUATION_ALPHA=34877]="BLEND_EQUATION_ALPHA",i[i.BLEND_DST_RGB=32968]="BLEND_DST_RGB",i[i.BLEND_SRC_RGB=32969]="BLEND_SRC_RGB",i[i.BLEND_DST_ALPHA=32970]="BLEND_DST_ALPHA",i[i.BLEND_SRC_ALPHA=32971]="BLEND_SRC_ALPHA",i[i.BLEND_COLOR=32773]="BLEND_COLOR",i[i.ARRAY_BUFFER_BINDING=34964]="ARRAY_BUFFER_BINDING",i[i.ELEMENT_ARRAY_BUFFER_BINDING=34965]="ELEMENT_ARRAY_BUFFER_BINDING",i[i.LINE_WIDTH=2849]="LINE_WIDTH",i[i.ALIASED_POINT_SIZE_RANGE=33901]="ALIASED_POINT_SIZE_RANGE",i[i.ALIASED_LINE_WIDTH_RANGE=33902]="ALIASED_LINE_WIDTH_RANGE",i[i.CULL_FACE_MODE=2885]="CULL_FACE_MODE",i[i.FRONT_FACE=2886]="FRONT_FACE",i[i.DEPTH_RANGE=2928]="DEPTH_RANGE",i[i.DEPTH_WRITEMASK=2930]="DEPTH_WRITEMASK",i[i.DEPTH_CLEAR_VALUE=2931]="DEPTH_CLEAR_VALUE",i[i.DEPTH_FUNC=2932]="DEPTH_FUNC",i[i.STENCIL_CLEAR_VALUE=2961]="STENCIL_CLEAR_VALUE",i[i.STENCIL_FUNC=2962]="STENCIL_FUNC",i[i.STENCIL_FAIL=2964]="STENCIL_FAIL",i[i.STENCIL_PASS_DEPTH_FAIL=2965]="STENCIL_PASS_DEPTH_FAIL",i[i.STENCIL_PASS_DEPTH_PASS=2966]="STENCIL_PASS_DEPTH_PASS",i[i.STENCIL_REF=2967]="STENCIL_REF",i[i.STENCIL_VALUE_MASK=2963]="STENCIL_VALUE_MASK",i[i.STENCIL_WRITEMASK=2968]="STENCIL_WRITEMASK",i[i.STENCIL_BACK_FUNC=34816]="STENCIL_BACK_FUNC",i[i.STENCIL_BACK_FAIL=34817]="STENCIL_BACK_FAIL",i[i.STENCIL_BACK_PASS_DEPTH_FAIL=34818]="STENCIL_BACK_PASS_DEPTH_FAIL",i[i.STENCIL_BACK_PASS_DEPTH_PASS=34819]="STENCIL_BACK_PASS_DEPTH_PASS",i[i.STENCIL_BACK_REF=36003]="STENCIL_BACK_REF",i[i.STENCIL_BACK_VALUE_MASK=36004]="STENCIL_BACK_VALUE_MASK",i[i.STENCIL_BACK_WRITEMASK=36005]="STENCIL_BACK_WRITEMASK",i[i.VIEWPORT=2978]="VIEWPORT",i[i.SCISSOR_BOX=3088]="SCISSOR_BOX",i[i.COLOR_CLEAR_VALUE=3106]="COLOR_CLEAR_VALUE",i[i.COLOR_WRITEMASK=3107]="COLOR_WRITEMASK",i[i.UNPACK_ALIGNMENT=3317]="UNPACK_ALIGNMENT",i[i.PACK_ALIGNMENT=3333]="PACK_ALIGNMENT",i[i.MAX_TEXTURE_SIZE=3379]="MAX_TEXTURE_SIZE",i[i.MAX_VIEWPORT_DIMS=3386]="MAX_VIEWPORT_DIMS",i[i.SUBPIXEL_BITS=3408]="SUBPIXEL_BITS",i[i.RED_BITS=3410]="RED_BITS",i[i.GREEN_BITS=3411]="GREEN_BITS",i[i.BLUE_BITS=3412]="BLUE_BITS",i[i.ALPHA_BITS=3413]="ALPHA_BITS",i[i.DEPTH_BITS=3414]="DEPTH_BITS",i[i.STENCIL_BITS=3415]="STENCIL_BITS",i[i.POLYGON_OFFSET_UNITS=10752]="POLYGON_OFFSET_UNITS",i[i.POLYGON_OFFSET_FACTOR=32824]="POLYGON_OFFSET_FACTOR",i[i.TEXTURE_BINDING_2D=32873]="TEXTURE_BINDING_2D",i[i.SAMPLE_BUFFERS=32936]="SAMPLE_BUFFERS",i[i.SAMPLES=32937]="SAMPLES",i[i.SAMPLE_COVERAGE_VALUE=32938]="SAMPLE_COVERAGE_VALUE",i[i.SAMPLE_COVERAGE_INVERT=32939]="SAMPLE_COVERAGE_INVERT",i[i.COMPRESSED_TEXTURE_FORMATS=34467]="COMPRESSED_TEXTURE_FORMATS",i[i.VENDOR=7936]="VENDOR",i[i.RENDERER=7937]="RENDERER",i[i.VERSION=7938]="VERSION",i[i.IMPLEMENTATION_COLOR_READ_TYPE=35738]="IMPLEMENTATION_COLOR_READ_TYPE",i[i.IMPLEMENTATION_COLOR_READ_FORMAT=35739]="IMPLEMENTATION_COLOR_READ_FORMAT",i[i.BROWSER_DEFAULT_WEBGL=37444]="BROWSER_DEFAULT_WEBGL",i[i.STATIC_DRAW=35044]="STATIC_DRAW",i[i.STREAM_DRAW=35040]="STREAM_DRAW",i[i.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",i[i.ARRAY_BUFFER=34962]="ARRAY_BUFFER",i[i.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",i[i.BUFFER_SIZE=34660]="BUFFER_SIZE",i[i.BUFFER_USAGE=34661]="BUFFER_USAGE",i[i.CURRENT_VERTEX_ATTRIB=34342]="CURRENT_VERTEX_ATTRIB",i[i.VERTEX_ATTRIB_ARRAY_ENABLED=34338]="VERTEX_ATTRIB_ARRAY_ENABLED",i[i.VERTEX_ATTRIB_ARRAY_SIZE=34339]="VERTEX_ATTRIB_ARRAY_SIZE",i[i.VERTEX_ATTRIB_ARRAY_STRIDE=34340]="VERTEX_ATTRIB_ARRAY_STRIDE",i[i.VERTEX_ATTRIB_ARRAY_TYPE=34341]="VERTEX_ATTRIB_ARRAY_TYPE",i[i.VERTEX_ATTRIB_ARRAY_NORMALIZED=34922]="VERTEX_ATTRIB_ARRAY_NORMALIZED",i[i.VERTEX_ATTRIB_ARRAY_POINTER=34373]="VERTEX_ATTRIB_ARRAY_POINTER",i[i.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING=34975]="VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",i[i.CULL_FACE=2884]="CULL_FACE",i[i.FRONT=1028]="FRONT",i[i.BACK=1029]="BACK",i[i.FRONT_AND_BACK=1032]="FRONT_AND_BACK",i[i.BLEND=3042]="BLEND",i[i.DEPTH_TEST=2929]="DEPTH_TEST",i[i.DITHER=3024]="DITHER",i[i.POLYGON_OFFSET_FILL=32823]="POLYGON_OFFSET_FILL",i[i.SAMPLE_ALPHA_TO_COVERAGE=32926]="SAMPLE_ALPHA_TO_COVERAGE",i[i.SAMPLE_COVERAGE=32928]="SAMPLE_COVERAGE",i[i.SCISSOR_TEST=3089]="SCISSOR_TEST",i[i.STENCIL_TEST=2960]="STENCIL_TEST",i[i.NO_ERROR=0]="NO_ERROR",i[i.INVALID_ENUM=1280]="INVALID_ENUM",i[i.INVALID_VALUE=1281]="INVALID_VALUE",i[i.INVALID_OPERATION=1282]="INVALID_OPERATION",i[i.OUT_OF_MEMORY=1285]="OUT_OF_MEMORY",i[i.CONTEXT_LOST_WEBGL=37442]="CONTEXT_LOST_WEBGL",i[i.CW=2304]="CW",i[i.CCW=2305]="CCW",i[i.DONT_CARE=4352]="DONT_CARE",i[i.FASTEST=4353]="FASTEST",i[i.NICEST=4354]="NICEST",i[i.GENERATE_MIPMAP_HINT=33170]="GENERATE_MIPMAP_HINT",i[i.BYTE=5120]="BYTE",i[i.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",i[i.SHORT=5122]="SHORT",i[i.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",i[i.INT=5124]="INT",i[i.UNSIGNED_INT=5125]="UNSIGNED_INT",i[i.FLOAT=5126]="FLOAT",i[i.DOUBLE=5130]="DOUBLE",i[i.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",i[i.ALPHA=6406]="ALPHA",i[i.RGB=6407]="RGB",i[i.RGBA=6408]="RGBA",i[i.LUMINANCE=6409]="LUMINANCE",i[i.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",i[i.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",i[i.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",i[i.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",i[i.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",i[i.VERTEX_SHADER=35633]="VERTEX_SHADER",i[i.COMPILE_STATUS=35713]="COMPILE_STATUS",i[i.DELETE_STATUS=35712]="DELETE_STATUS",i[i.LINK_STATUS=35714]="LINK_STATUS",i[i.VALIDATE_STATUS=35715]="VALIDATE_STATUS",i[i.ATTACHED_SHADERS=35717]="ATTACHED_SHADERS",i[i.ACTIVE_ATTRIBUTES=35721]="ACTIVE_ATTRIBUTES",i[i.ACTIVE_UNIFORMS=35718]="ACTIVE_UNIFORMS",i[i.MAX_VERTEX_ATTRIBS=34921]="MAX_VERTEX_ATTRIBS",i[i.MAX_VERTEX_UNIFORM_VECTORS=36347]="MAX_VERTEX_UNIFORM_VECTORS",i[i.MAX_VARYING_VECTORS=36348]="MAX_VARYING_VECTORS",i[i.MAX_COMBINED_TEXTURE_IMAGE_UNITS=35661]="MAX_COMBINED_TEXTURE_IMAGE_UNITS",i[i.MAX_VERTEX_TEXTURE_IMAGE_UNITS=35660]="MAX_VERTEX_TEXTURE_IMAGE_UNITS",i[i.MAX_TEXTURE_IMAGE_UNITS=34930]="MAX_TEXTURE_IMAGE_UNITS",i[i.MAX_FRAGMENT_UNIFORM_VECTORS=36349]="MAX_FRAGMENT_UNIFORM_VECTORS",i[i.SHADER_TYPE=35663]="SHADER_TYPE",i[i.SHADING_LANGUAGE_VERSION=35724]="SHADING_LANGUAGE_VERSION",i[i.CURRENT_PROGRAM=35725]="CURRENT_PROGRAM",i[i.NEVER=512]="NEVER",i[i.LESS=513]="LESS",i[i.EQUAL=514]="EQUAL",i[i.LEQUAL=515]="LEQUAL",i[i.GREATER=516]="GREATER",i[i.NOTEQUAL=517]="NOTEQUAL",i[i.GEQUAL=518]="GEQUAL",i[i.ALWAYS=519]="ALWAYS",i[i.KEEP=7680]="KEEP",i[i.REPLACE=7681]="REPLACE",i[i.INCR=7682]="INCR",i[i.DECR=7683]="DECR",i[i.INVERT=5386]="INVERT",i[i.INCR_WRAP=34055]="INCR_WRAP",i[i.DECR_WRAP=34056]="DECR_WRAP",i[i.NEAREST=9728]="NEAREST",i[i.LINEAR=9729]="LINEAR",i[i.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",i[i.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",i[i.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",i[i.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR",i[i.TEXTURE_MAG_FILTER=10240]="TEXTURE_MAG_FILTER",i[i.TEXTURE_MIN_FILTER=10241]="TEXTURE_MIN_FILTER",i[i.TEXTURE_WRAP_S=10242]="TEXTURE_WRAP_S",i[i.TEXTURE_WRAP_T=10243]="TEXTURE_WRAP_T",i[i.TEXTURE_2D=3553]="TEXTURE_2D",i[i.TEXTURE=5890]="TEXTURE",i[i.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",i[i.TEXTURE_BINDING_CUBE_MAP=34068]="TEXTURE_BINDING_CUBE_MAP",i[i.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",i[i.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",i[i.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",i[i.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",i[i.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",i[i.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",i[i.MAX_CUBE_MAP_TEXTURE_SIZE=34076]="MAX_CUBE_MAP_TEXTURE_SIZE",i[i.TEXTURE0=33984]="TEXTURE0",i[i.ACTIVE_TEXTURE=34016]="ACTIVE_TEXTURE",i[i.REPEAT=10497]="REPEAT",i[i.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",i[i.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",i[i.TEXTURE_WIDTH=4096]="TEXTURE_WIDTH",i[i.TEXTURE_HEIGHT=4097]="TEXTURE_HEIGHT",i[i.FLOAT_VEC2=35664]="FLOAT_VEC2",i[i.FLOAT_VEC3=35665]="FLOAT_VEC3",i[i.FLOAT_VEC4=35666]="FLOAT_VEC4",i[i.INT_VEC2=35667]="INT_VEC2",i[i.INT_VEC3=35668]="INT_VEC3",i[i.INT_VEC4=35669]="INT_VEC4",i[i.BOOL=35670]="BOOL",i[i.BOOL_VEC2=35671]="BOOL_VEC2",i[i.BOOL_VEC3=35672]="BOOL_VEC3",i[i.BOOL_VEC4=35673]="BOOL_VEC4",i[i.FLOAT_MAT2=35674]="FLOAT_MAT2",i[i.FLOAT_MAT3=35675]="FLOAT_MAT3",i[i.FLOAT_MAT4=35676]="FLOAT_MAT4",i[i.SAMPLER_2D=35678]="SAMPLER_2D",i[i.SAMPLER_CUBE=35680]="SAMPLER_CUBE",i[i.LOW_FLOAT=36336]="LOW_FLOAT",i[i.MEDIUM_FLOAT=36337]="MEDIUM_FLOAT",i[i.HIGH_FLOAT=36338]="HIGH_FLOAT",i[i.LOW_INT=36339]="LOW_INT",i[i.MEDIUM_INT=36340]="MEDIUM_INT",i[i.HIGH_INT=36341]="HIGH_INT",i[i.FRAMEBUFFER=36160]="FRAMEBUFFER",i[i.RENDERBUFFER=36161]="RENDERBUFFER",i[i.RGBA4=32854]="RGBA4",i[i.RGB5_A1=32855]="RGB5_A1",i[i.RGB565=36194]="RGB565",i[i.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",i[i.STENCIL_INDEX=6401]="STENCIL_INDEX",i[i.STENCIL_INDEX8=36168]="STENCIL_INDEX8",i[i.DEPTH_STENCIL=34041]="DEPTH_STENCIL",i[i.RENDERBUFFER_WIDTH=36162]="RENDERBUFFER_WIDTH",i[i.RENDERBUFFER_HEIGHT=36163]="RENDERBUFFER_HEIGHT",i[i.RENDERBUFFER_INTERNAL_FORMAT=36164]="RENDERBUFFER_INTERNAL_FORMAT",i[i.RENDERBUFFER_RED_SIZE=36176]="RENDERBUFFER_RED_SIZE",i[i.RENDERBUFFER_GREEN_SIZE=36177]="RENDERBUFFER_GREEN_SIZE",i[i.RENDERBUFFER_BLUE_SIZE=36178]="RENDERBUFFER_BLUE_SIZE",i[i.RENDERBUFFER_ALPHA_SIZE=36179]="RENDERBUFFER_ALPHA_SIZE",i[i.RENDERBUFFER_DEPTH_SIZE=36180]="RENDERBUFFER_DEPTH_SIZE",i[i.RENDERBUFFER_STENCIL_SIZE=36181]="RENDERBUFFER_STENCIL_SIZE",i[i.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE=36048]="FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",i[i.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME=36049]="FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",i[i.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL=36050]="FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",i[i.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE=36051]="FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",i[i.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",i[i.DEPTH_ATTACHMENT=36096]="DEPTH_ATTACHMENT",i[i.STENCIL_ATTACHMENT=36128]="STENCIL_ATTACHMENT",i[i.DEPTH_STENCIL_ATTACHMENT=33306]="DEPTH_STENCIL_ATTACHMENT",i[i.NONE=0]="NONE",i[i.FRAMEBUFFER_COMPLETE=36053]="FRAMEBUFFER_COMPLETE",i[i.FRAMEBUFFER_INCOMPLETE_ATTACHMENT=36054]="FRAMEBUFFER_INCOMPLETE_ATTACHMENT",i[i.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT=36055]="FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",i[i.FRAMEBUFFER_INCOMPLETE_DIMENSIONS=36057]="FRAMEBUFFER_INCOMPLETE_DIMENSIONS",i[i.FRAMEBUFFER_UNSUPPORTED=36061]="FRAMEBUFFER_UNSUPPORTED",i[i.FRAMEBUFFER_BINDING=36006]="FRAMEBUFFER_BINDING",i[i.RENDERBUFFER_BINDING=36007]="RENDERBUFFER_BINDING",i[i.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",i[i.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER",i[i.MAX_RENDERBUFFER_SIZE=34024]="MAX_RENDERBUFFER_SIZE",i[i.INVALID_FRAMEBUFFER_OPERATION=1286]="INVALID_FRAMEBUFFER_OPERATION",i[i.UNPACK_FLIP_Y_WEBGL=37440]="UNPACK_FLIP_Y_WEBGL",i[i.UNPACK_PREMULTIPLY_ALPHA_WEBGL=37441]="UNPACK_PREMULTIPLY_ALPHA_WEBGL",i[i.UNPACK_COLORSPACE_CONVERSION_WEBGL=37443]="UNPACK_COLORSPACE_CONVERSION_WEBGL",i[i.READ_BUFFER=3074]="READ_BUFFER",i[i.UNPACK_ROW_LENGTH=3314]="UNPACK_ROW_LENGTH",i[i.UNPACK_SKIP_ROWS=3315]="UNPACK_SKIP_ROWS",i[i.UNPACK_SKIP_PIXELS=3316]="UNPACK_SKIP_PIXELS",i[i.PACK_ROW_LENGTH=3330]="PACK_ROW_LENGTH",i[i.PACK_SKIP_ROWS=3331]="PACK_SKIP_ROWS",i[i.PACK_SKIP_PIXELS=3332]="PACK_SKIP_PIXELS",i[i.TEXTURE_BINDING_3D=32874]="TEXTURE_BINDING_3D",i[i.UNPACK_SKIP_IMAGES=32877]="UNPACK_SKIP_IMAGES",i[i.UNPACK_IMAGE_HEIGHT=32878]="UNPACK_IMAGE_HEIGHT",i[i.MAX_3D_TEXTURE_SIZE=32883]="MAX_3D_TEXTURE_SIZE",i[i.MAX_ELEMENTS_VERTICES=33e3]="MAX_ELEMENTS_VERTICES",i[i.MAX_ELEMENTS_INDICES=33001]="MAX_ELEMENTS_INDICES",i[i.MAX_TEXTURE_LOD_BIAS=34045]="MAX_TEXTURE_LOD_BIAS",i[i.MAX_FRAGMENT_UNIFORM_COMPONENTS=35657]="MAX_FRAGMENT_UNIFORM_COMPONENTS",i[i.MAX_VERTEX_UNIFORM_COMPONENTS=35658]="MAX_VERTEX_UNIFORM_COMPONENTS",i[i.MAX_ARRAY_TEXTURE_LAYERS=35071]="MAX_ARRAY_TEXTURE_LAYERS",i[i.MIN_PROGRAM_TEXEL_OFFSET=35076]="MIN_PROGRAM_TEXEL_OFFSET",i[i.MAX_PROGRAM_TEXEL_OFFSET=35077]="MAX_PROGRAM_TEXEL_OFFSET",i[i.MAX_VARYING_COMPONENTS=35659]="MAX_VARYING_COMPONENTS",i[i.FRAGMENT_SHADER_DERIVATIVE_HINT=35723]="FRAGMENT_SHADER_DERIVATIVE_HINT",i[i.RASTERIZER_DISCARD=35977]="RASTERIZER_DISCARD",i[i.VERTEX_ARRAY_BINDING=34229]="VERTEX_ARRAY_BINDING",i[i.MAX_VERTEX_OUTPUT_COMPONENTS=37154]="MAX_VERTEX_OUTPUT_COMPONENTS",i[i.MAX_FRAGMENT_INPUT_COMPONENTS=37157]="MAX_FRAGMENT_INPUT_COMPONENTS",i[i.MAX_SERVER_WAIT_TIMEOUT=37137]="MAX_SERVER_WAIT_TIMEOUT",i[i.MAX_ELEMENT_INDEX=36203]="MAX_ELEMENT_INDEX",i[i.RED=6403]="RED",i[i.RGB8=32849]="RGB8",i[i.RGBA8=32856]="RGBA8",i[i.RGB10_A2=32857]="RGB10_A2",i[i.TEXTURE_3D=32879]="TEXTURE_3D",i[i.TEXTURE_WRAP_R=32882]="TEXTURE_WRAP_R",i[i.TEXTURE_MIN_LOD=33082]="TEXTURE_MIN_LOD",i[i.TEXTURE_MAX_LOD=33083]="TEXTURE_MAX_LOD",i[i.TEXTURE_BASE_LEVEL=33084]="TEXTURE_BASE_LEVEL",i[i.TEXTURE_MAX_LEVEL=33085]="TEXTURE_MAX_LEVEL",i[i.TEXTURE_COMPARE_MODE=34892]="TEXTURE_COMPARE_MODE",i[i.TEXTURE_COMPARE_FUNC=34893]="TEXTURE_COMPARE_FUNC",i[i.SRGB=35904]="SRGB",i[i.SRGB8=35905]="SRGB8",i[i.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",i[i.COMPARE_REF_TO_TEXTURE=34894]="COMPARE_REF_TO_TEXTURE",i[i.RGBA32F=34836]="RGBA32F",i[i.RGB32F=34837]="RGB32F",i[i.RGBA16F=34842]="RGBA16F",i[i.RGB16F=34843]="RGB16F",i[i.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",i[i.TEXTURE_BINDING_2D_ARRAY=35869]="TEXTURE_BINDING_2D_ARRAY",i[i.R11F_G11F_B10F=35898]="R11F_G11F_B10F",i[i.RGB9_E5=35901]="RGB9_E5",i[i.RGBA32UI=36208]="RGBA32UI",i[i.RGB32UI=36209]="RGB32UI",i[i.RGBA16UI=36214]="RGBA16UI",i[i.RGB16UI=36215]="RGB16UI",i[i.RGBA8UI=36220]="RGBA8UI",i[i.RGB8UI=36221]="RGB8UI",i[i.RGBA32I=36226]="RGBA32I",i[i.RGB32I=36227]="RGB32I",i[i.RGBA16I=36232]="RGBA16I",i[i.RGB16I=36233]="RGB16I",i[i.RGBA8I=36238]="RGBA8I",i[i.RGB8I=36239]="RGB8I",i[i.RED_INTEGER=36244]="RED_INTEGER",i[i.RGB_INTEGER=36248]="RGB_INTEGER",i[i.RGBA_INTEGER=36249]="RGBA_INTEGER",i[i.R8=33321]="R8",i[i.RG8=33323]="RG8",i[i.R16F=33325]="R16F",i[i.R32F=33326]="R32F",i[i.RG16F=33327]="RG16F",i[i.RG32F=33328]="RG32F",i[i.R8I=33329]="R8I",i[i.R8UI=33330]="R8UI",i[i.R16I=33331]="R16I",i[i.R16UI=33332]="R16UI",i[i.R32I=33333]="R32I",i[i.R32UI=33334]="R32UI",i[i.RG8I=33335]="RG8I",i[i.RG8UI=33336]="RG8UI",i[i.RG16I=33337]="RG16I",i[i.RG16UI=33338]="RG16UI",i[i.RG32I=33339]="RG32I",i[i.RG32UI=33340]="RG32UI",i[i.R8_SNORM=36756]="R8_SNORM",i[i.RG8_SNORM=36757]="RG8_SNORM",i[i.RGB8_SNORM=36758]="RGB8_SNORM",i[i.RGBA8_SNORM=36759]="RGBA8_SNORM",i[i.RGB10_A2UI=36975]="RGB10_A2UI",i[i.TEXTURE_IMMUTABLE_FORMAT=37167]="TEXTURE_IMMUTABLE_FORMAT",i[i.TEXTURE_IMMUTABLE_LEVELS=33503]="TEXTURE_IMMUTABLE_LEVELS",i[i.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",i[i.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",i[i.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",i[i.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",i[i.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",i[i.HALF_FLOAT=5131]="HALF_FLOAT",i[i.RG=33319]="RG",i[i.RG_INTEGER=33320]="RG_INTEGER",i[i.INT_2_10_10_10_REV=36255]="INT_2_10_10_10_REV",i[i.CURRENT_QUERY=34917]="CURRENT_QUERY",i[i.QUERY_RESULT=34918]="QUERY_RESULT",i[i.QUERY_RESULT_AVAILABLE=34919]="QUERY_RESULT_AVAILABLE",i[i.ANY_SAMPLES_PASSED=35887]="ANY_SAMPLES_PASSED",i[i.ANY_SAMPLES_PASSED_CONSERVATIVE=36202]="ANY_SAMPLES_PASSED_CONSERVATIVE",i[i.MAX_DRAW_BUFFERS=34852]="MAX_DRAW_BUFFERS",i[i.DRAW_BUFFER0=34853]="DRAW_BUFFER0",i[i.DRAW_BUFFER1=34854]="DRAW_BUFFER1",i[i.DRAW_BUFFER2=34855]="DRAW_BUFFER2",i[i.DRAW_BUFFER3=34856]="DRAW_BUFFER3",i[i.DRAW_BUFFER4=34857]="DRAW_BUFFER4",i[i.DRAW_BUFFER5=34858]="DRAW_BUFFER5",i[i.DRAW_BUFFER6=34859]="DRAW_BUFFER6",i[i.DRAW_BUFFER7=34860]="DRAW_BUFFER7",i[i.DRAW_BUFFER8=34861]="DRAW_BUFFER8",i[i.DRAW_BUFFER9=34862]="DRAW_BUFFER9",i[i.DRAW_BUFFER10=34863]="DRAW_BUFFER10",i[i.DRAW_BUFFER11=34864]="DRAW_BUFFER11",i[i.DRAW_BUFFER12=34865]="DRAW_BUFFER12",i[i.DRAW_BUFFER13=34866]="DRAW_BUFFER13",i[i.DRAW_BUFFER14=34867]="DRAW_BUFFER14",i[i.DRAW_BUFFER15=34868]="DRAW_BUFFER15",i[i.MAX_COLOR_ATTACHMENTS=36063]="MAX_COLOR_ATTACHMENTS",i[i.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",i[i.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",i[i.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",i[i.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",i[i.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",i[i.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",i[i.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",i[i.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",i[i.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",i[i.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",i[i.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",i[i.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",i[i.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",i[i.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",i[i.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15",i[i.SAMPLER_3D=35679]="SAMPLER_3D",i[i.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",i[i.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",i[i.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",i[i.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",i[i.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",i[i.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",i[i.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",i[i.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",i[i.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",i[i.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",i[i.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",i[i.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY",i[i.MAX_SAMPLES=36183]="MAX_SAMPLES",i[i.SAMPLER_BINDING=35097]="SAMPLER_BINDING",i[i.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",i[i.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",i[i.PIXEL_PACK_BUFFER_BINDING=35053]="PIXEL_PACK_BUFFER_BINDING",i[i.PIXEL_UNPACK_BUFFER_BINDING=35055]="PIXEL_UNPACK_BUFFER_BINDING",i[i.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",i[i.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",i[i.COPY_READ_BUFFER_BINDING=36662]="COPY_READ_BUFFER_BINDING",i[i.COPY_WRITE_BUFFER_BINDING=36663]="COPY_WRITE_BUFFER_BINDING",i[i.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",i[i.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",i[i.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",i[i.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",i[i.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",i[i.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",i[i.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",i[i.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",i[i.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",i[i.UNSIGNED_NORMALIZED=35863]="UNSIGNED_NORMALIZED",i[i.SIGNED_NORMALIZED=36764]="SIGNED_NORMALIZED",i[i.VERTEX_ATTRIB_ARRAY_INTEGER=35069]="VERTEX_ATTRIB_ARRAY_INTEGER",i[i.VERTEX_ATTRIB_ARRAY_DIVISOR=35070]="VERTEX_ATTRIB_ARRAY_DIVISOR",i[i.TRANSFORM_FEEDBACK_BUFFER_MODE=35967]="TRANSFORM_FEEDBACK_BUFFER_MODE",i[i.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS=35968]="MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS",i[i.TRANSFORM_FEEDBACK_VARYINGS=35971]="TRANSFORM_FEEDBACK_VARYINGS",i[i.TRANSFORM_FEEDBACK_BUFFER_START=35972]="TRANSFORM_FEEDBACK_BUFFER_START",i[i.TRANSFORM_FEEDBACK_BUFFER_SIZE=35973]="TRANSFORM_FEEDBACK_BUFFER_SIZE",i[i.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN=35976]="TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN",i[i.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS=35978]="MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS",i[i.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS=35979]="MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS",i[i.INTERLEAVED_ATTRIBS=35980]="INTERLEAVED_ATTRIBS",i[i.SEPARATE_ATTRIBS=35981]="SEPARATE_ATTRIBS",i[i.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER",i[i.TRANSFORM_FEEDBACK_BUFFER_BINDING=35983]="TRANSFORM_FEEDBACK_BUFFER_BINDING",i[i.TRANSFORM_FEEDBACK=36386]="TRANSFORM_FEEDBACK",i[i.TRANSFORM_FEEDBACK_PAUSED=36387]="TRANSFORM_FEEDBACK_PAUSED",i[i.TRANSFORM_FEEDBACK_ACTIVE=36388]="TRANSFORM_FEEDBACK_ACTIVE",i[i.TRANSFORM_FEEDBACK_BINDING=36389]="TRANSFORM_FEEDBACK_BINDING",i[i.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING=33296]="FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING",i[i.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE=33297]="FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE",i[i.FRAMEBUFFER_ATTACHMENT_RED_SIZE=33298]="FRAMEBUFFER_ATTACHMENT_RED_SIZE",i[i.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE=33299]="FRAMEBUFFER_ATTACHMENT_GREEN_SIZE",i[i.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE=33300]="FRAMEBUFFER_ATTACHMENT_BLUE_SIZE",i[i.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE=33301]="FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE",i[i.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE=33302]="FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE",i[i.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE=33303]="FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE",i[i.FRAMEBUFFER_DEFAULT=33304]="FRAMEBUFFER_DEFAULT",i[i.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",i[i.DRAW_FRAMEBUFFER_BINDING=36006]="DRAW_FRAMEBUFFER_BINDING",i[i.READ_FRAMEBUFFER_BINDING=36010]="READ_FRAMEBUFFER_BINDING",i[i.RENDERBUFFER_SAMPLES=36011]="RENDERBUFFER_SAMPLES",i[i.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER=36052]="FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER",i[i.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE=36182]="FRAMEBUFFER_INCOMPLETE_MULTISAMPLE",i[i.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",i[i.UNIFORM_BUFFER_BINDING=35368]="UNIFORM_BUFFER_BINDING",i[i.UNIFORM_BUFFER_START=35369]="UNIFORM_BUFFER_START",i[i.UNIFORM_BUFFER_SIZE=35370]="UNIFORM_BUFFER_SIZE",i[i.MAX_VERTEX_UNIFORM_BLOCKS=35371]="MAX_VERTEX_UNIFORM_BLOCKS",i[i.MAX_FRAGMENT_UNIFORM_BLOCKS=35373]="MAX_FRAGMENT_UNIFORM_BLOCKS",i[i.MAX_COMBINED_UNIFORM_BLOCKS=35374]="MAX_COMBINED_UNIFORM_BLOCKS",i[i.MAX_UNIFORM_BUFFER_BINDINGS=35375]="MAX_UNIFORM_BUFFER_BINDINGS",i[i.MAX_UNIFORM_BLOCK_SIZE=35376]="MAX_UNIFORM_BLOCK_SIZE",i[i.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS=35377]="MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS",i[i.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS=35379]="MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS",i[i.UNIFORM_BUFFER_OFFSET_ALIGNMENT=35380]="UNIFORM_BUFFER_OFFSET_ALIGNMENT",i[i.ACTIVE_UNIFORM_BLOCKS=35382]="ACTIVE_UNIFORM_BLOCKS",i[i.UNIFORM_TYPE=35383]="UNIFORM_TYPE",i[i.UNIFORM_SIZE=35384]="UNIFORM_SIZE",i[i.UNIFORM_BLOCK_INDEX=35386]="UNIFORM_BLOCK_INDEX",i[i.UNIFORM_OFFSET=35387]="UNIFORM_OFFSET",i[i.UNIFORM_ARRAY_STRIDE=35388]="UNIFORM_ARRAY_STRIDE",i[i.UNIFORM_MATRIX_STRIDE=35389]="UNIFORM_MATRIX_STRIDE",i[i.UNIFORM_IS_ROW_MAJOR=35390]="UNIFORM_IS_ROW_MAJOR",i[i.UNIFORM_BLOCK_BINDING=35391]="UNIFORM_BLOCK_BINDING",i[i.UNIFORM_BLOCK_DATA_SIZE=35392]="UNIFORM_BLOCK_DATA_SIZE",i[i.UNIFORM_BLOCK_ACTIVE_UNIFORMS=35394]="UNIFORM_BLOCK_ACTIVE_UNIFORMS",i[i.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES=35395]="UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES",i[i.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER=35396]="UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER",i[i.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER=35398]="UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER",i[i.OBJECT_TYPE=37138]="OBJECT_TYPE",i[i.SYNC_CONDITION=37139]="SYNC_CONDITION",i[i.SYNC_STATUS=37140]="SYNC_STATUS",i[i.SYNC_FLAGS=37141]="SYNC_FLAGS",i[i.SYNC_FENCE=37142]="SYNC_FENCE",i[i.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE",i[i.UNSIGNALED=37144]="UNSIGNALED",i[i.SIGNALED=37145]="SIGNALED",i[i.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",i[i.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",i[i.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",i[i.WAIT_FAILED=37149]="WAIT_FAILED",i[i.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT",i[i.COLOR=6144]="COLOR",i[i.DEPTH=6145]="DEPTH",i[i.STENCIL=6146]="STENCIL",i[i.MIN=32775]="MIN",i[i.MAX=32776]="MAX",i[i.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",i[i.STREAM_READ=35041]="STREAM_READ",i[i.STREAM_COPY=35042]="STREAM_COPY",i[i.STATIC_READ=35045]="STATIC_READ",i[i.STATIC_COPY=35046]="STATIC_COPY",i[i.DYNAMIC_READ=35049]="DYNAMIC_READ",i[i.DYNAMIC_COPY=35050]="DYNAMIC_COPY",i[i.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",i[i.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8",i[i.INVALID_INDEX=4294967295]="INVALID_INDEX",i[i.TIMEOUT_IGNORED=-1]="TIMEOUT_IGNORED",i[i.MAX_CLIENT_WAIT_TIMEOUT_WEBGL=37447]="MAX_CLIENT_WAIT_TIMEOUT_WEBGL",i[i.UNMASKED_VENDOR_WEBGL=37445]="UNMASKED_VENDOR_WEBGL",i[i.UNMASKED_RENDERER_WEBGL=37446]="UNMASKED_RENDERER_WEBGL",i[i.MAX_TEXTURE_MAX_ANISOTROPY_EXT=34047]="MAX_TEXTURE_MAX_ANISOTROPY_EXT",i[i.TEXTURE_MAX_ANISOTROPY_EXT=34046]="TEXTURE_MAX_ANISOTROPY_EXT",i[i.R16_EXT=33322]="R16_EXT",i[i.RG16_EXT=33324]="RG16_EXT",i[i.RGB16_EXT=32852]="RGB16_EXT",i[i.RGBA16_EXT=32859]="RGBA16_EXT",i[i.R16_SNORM_EXT=36760]="R16_SNORM_EXT",i[i.RG16_SNORM_EXT=36761]="RG16_SNORM_EXT",i[i.RGB16_SNORM_EXT=36762]="RGB16_SNORM_EXT",i[i.RGBA16_SNORM_EXT=36763]="RGBA16_SNORM_EXT",i[i.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",i[i.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",i[i.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",i[i.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",i[i.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",i[i.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",i[i.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",i[i.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",i[i.COMPRESSED_RED_RGTC1_EXT=36283]="COMPRESSED_RED_RGTC1_EXT",i[i.COMPRESSED_SIGNED_RED_RGTC1_EXT=36284]="COMPRESSED_SIGNED_RED_RGTC1_EXT",i[i.COMPRESSED_RED_GREEN_RGTC2_EXT=36285]="COMPRESSED_RED_GREEN_RGTC2_EXT",i[i.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT=36286]="COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT",i[i.COMPRESSED_RGBA_BPTC_UNORM_EXT=36492]="COMPRESSED_RGBA_BPTC_UNORM_EXT",i[i.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=36493]="COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT",i[i.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT=36494]="COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT",i[i.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT=36495]="COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT",i[i.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",i[i.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",i[i.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",i[i.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",i[i.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",i[i.COMPRESSED_RGBA8_ETC2_EAC=37493]="COMPRESSED_RGBA8_ETC2_EAC",i[i.COMPRESSED_SRGB8_ETC2=37494]="COMPRESSED_SRGB8_ETC2",i[i.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37495]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",i[i.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37496]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",i[i.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37497]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",i[i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",i[i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",i[i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",i[i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",i[i.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",i[i.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",i[i.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35986]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",i[i.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",i[i.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",i[i.COMPRESSED_RGBA_ASTC_5x4_KHR=37809]="COMPRESSED_RGBA_ASTC_5x4_KHR",i[i.COMPRESSED_RGBA_ASTC_5x5_KHR=37810]="COMPRESSED_RGBA_ASTC_5x5_KHR",i[i.COMPRESSED_RGBA_ASTC_6x5_KHR=37811]="COMPRESSED_RGBA_ASTC_6x5_KHR",i[i.COMPRESSED_RGBA_ASTC_6x6_KHR=37812]="COMPRESSED_RGBA_ASTC_6x6_KHR",i[i.COMPRESSED_RGBA_ASTC_8x5_KHR=37813]="COMPRESSED_RGBA_ASTC_8x5_KHR",i[i.COMPRESSED_RGBA_ASTC_8x6_KHR=37814]="COMPRESSED_RGBA_ASTC_8x6_KHR",i[i.COMPRESSED_RGBA_ASTC_8x8_KHR=37815]="COMPRESSED_RGBA_ASTC_8x8_KHR",i[i.COMPRESSED_RGBA_ASTC_10x5_KHR=37816]="COMPRESSED_RGBA_ASTC_10x5_KHR",i[i.COMPRESSED_RGBA_ASTC_10x6_KHR=37817]="COMPRESSED_RGBA_ASTC_10x6_KHR",i[i.COMPRESSED_RGBA_ASTC_10x8_KHR=37818]="COMPRESSED_RGBA_ASTC_10x8_KHR",i[i.COMPRESSED_RGBA_ASTC_10x10_KHR=37819]="COMPRESSED_RGBA_ASTC_10x10_KHR",i[i.COMPRESSED_RGBA_ASTC_12x10_KHR=37820]="COMPRESSED_RGBA_ASTC_12x10_KHR",i[i.COMPRESSED_RGBA_ASTC_12x12_KHR=37821]="COMPRESSED_RGBA_ASTC_12x12_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=37840]="COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR=37841]="COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR=37842]="COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR=37843]="COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR=37844]="COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR=37845]="COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR=37846]="COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR=37847]="COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR=37848]="COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR=37849]="COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR=37850]="COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR=37851]="COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR=37852]="COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR",i[i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR=37853]="COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR",i[i.QUERY_COUNTER_BITS_EXT=34916]="QUERY_COUNTER_BITS_EXT",i[i.CURRENT_QUERY_EXT=34917]="CURRENT_QUERY_EXT",i[i.QUERY_RESULT_EXT=34918]="QUERY_RESULT_EXT",i[i.QUERY_RESULT_AVAILABLE_EXT=34919]="QUERY_RESULT_AVAILABLE_EXT",i[i.TIME_ELAPSED_EXT=35007]="TIME_ELAPSED_EXT",i[i.TIMESTAMP_EXT=36392]="TIMESTAMP_EXT",i[i.GPU_DISJOINT_EXT=36795]="GPU_DISJOINT_EXT",i[i.COMPLETION_STATUS_KHR=37297]="COMPLETION_STATUS_KHR",i[i.DEPTH_CLAMP_EXT=34383]="DEPTH_CLAMP_EXT",i[i.FIRST_VERTEX_CONVENTION_WEBGL=36429]="FIRST_VERTEX_CONVENTION_WEBGL",i[i.LAST_VERTEX_CONVENTION_WEBGL=36430]="LAST_VERTEX_CONVENTION_WEBGL",i[i.PROVOKING_VERTEX_WEBL=36431]="PROVOKING_VERTEX_WEBL",i[i.POLYGON_MODE_WEBGL=2880]="POLYGON_MODE_WEBGL",i[i.POLYGON_OFFSET_LINE_WEBGL=10754]="POLYGON_OFFSET_LINE_WEBGL",i[i.LINE_WEBGL=6913]="LINE_WEBGL",i[i.FILL_WEBGL=6914]="FILL_WEBGL",i[i.MAX_CLIP_DISTANCES_WEBGL=3378]="MAX_CLIP_DISTANCES_WEBGL",i[i.MAX_CULL_DISTANCES_WEBGL=33529]="MAX_CULL_DISTANCES_WEBGL",i[i.MAX_COMBINED_CLIP_AND_CULL_DISTANCES_WEBGL=33530]="MAX_COMBINED_CLIP_AND_CULL_DISTANCES_WEBGL",i[i.CLIP_DISTANCE0_WEBGL=12288]="CLIP_DISTANCE0_WEBGL",i[i.CLIP_DISTANCE1_WEBGL=12289]="CLIP_DISTANCE1_WEBGL",i[i.CLIP_DISTANCE2_WEBGL=12290]="CLIP_DISTANCE2_WEBGL",i[i.CLIP_DISTANCE3_WEBGL=12291]="CLIP_DISTANCE3_WEBGL",i[i.CLIP_DISTANCE4_WEBGL=12292]="CLIP_DISTANCE4_WEBGL",i[i.CLIP_DISTANCE5_WEBGL=12293]="CLIP_DISTANCE5_WEBGL",i[i.CLIP_DISTANCE6_WEBGL=12294]="CLIP_DISTANCE6_WEBGL",i[i.CLIP_DISTANCE7_WEBGL=12295]="CLIP_DISTANCE7_WEBGL",i[i.POLYGON_OFFSET_CLAMP_EXT=36379]="POLYGON_OFFSET_CLAMP_EXT",i[i.LOWER_LEFT_EXT=36001]="LOWER_LEFT_EXT",i[i.UPPER_LEFT_EXT=36002]="UPPER_LEFT_EXT",i[i.NEGATIVE_ONE_TO_ONE_EXT=37726]="NEGATIVE_ONE_TO_ONE_EXT",i[i.ZERO_TO_ONE_EXT=37727]="ZERO_TO_ONE_EXT",i[i.CLIP_ORIGIN_EXT=37724]="CLIP_ORIGIN_EXT",i[i.CLIP_DEPTH_MODE_EXT=37725]="CLIP_DEPTH_MODE_EXT",i[i.SRC1_COLOR_WEBGL=35065]="SRC1_COLOR_WEBGL",i[i.SRC1_ALPHA_WEBGL=34185]="SRC1_ALPHA_WEBGL",i[i.ONE_MINUS_SRC1_COLOR_WEBGL=35066]="ONE_MINUS_SRC1_COLOR_WEBGL",i[i.ONE_MINUS_SRC1_ALPHA_WEBGL=35067]="ONE_MINUS_SRC1_ALPHA_WEBGL",i[i.MAX_DUAL_SOURCE_DRAW_BUFFERS_WEBGL=35068]="MAX_DUAL_SOURCE_DRAW_BUFFERS_WEBGL",i[i.MIRROR_CLAMP_TO_EDGE_EXT=34627]="MIRROR_CLAMP_TO_EDGE_EXT"})(Do||(Do={}));const HN={WEBGL_depth_texture:{UNSIGNED_INT_24_8_WEBGL:34042},OES_element_index_uint:{},OES_texture_float:{},OES_texture_half_float:{HALF_FLOAT_OES:5131},EXT_color_buffer_float:{},OES_standard_derivatives:{FRAGMENT_SHADER_DERIVATIVE_HINT_OES:35723},EXT_frag_depth:{},EXT_blend_minmax:{MIN_EXT:32775,MAX_EXT:32776},EXT_shader_texture_lod:{}},VN=i=>({drawBuffersWEBGL(e){return i.drawBuffers(e)},COLOR_ATTACHMENT0_WEBGL:36064,COLOR_ATTACHMENT1_WEBGL:36065,COLOR_ATTACHMENT2_WEBGL:36066,COLOR_ATTACHMENT3_WEBGL:36067}),GN=i=>({VERTEX_ARRAY_BINDING_OES:34229,createVertexArrayOES(){return i.createVertexArray()},deleteVertexArrayOES(e){return i.deleteVertexArray(e)},isVertexArrayOES(e){return i.isVertexArray(e)},bindVertexArrayOES(e){return i.bindVertexArray(e)}}),WN=i=>({VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE:35070,drawArraysInstancedANGLE(...e){return i.drawArraysInstanced(...e)},drawElementsInstancedANGLE(...e){return i.drawElementsInstanced(...e)},vertexAttribDivisorANGLE(...e){return i.vertexAttribDivisor(...e)}});function YN(i=!0){const e=HTMLCanvasElement.prototype;if(!i&&e.originalGetContext){e.getContext=e.originalGetContext,e.originalGetContext=void 0;return}e.originalGetContext=e.getContext,e.getContext=function(t,n){if(t==="webgl"||t==="experimental-webgl"){const s=this.originalGetContext("webgl2",n);return s instanceof HTMLElement&&qN(s),s}return this.originalGetContext(t,n)}}function qN(i){i.getExtension("EXT_color_buffer_float");const e={...HN,WEBGL_disjoint_timer_query:i.getExtension("EXT_disjoint_timer_query_webgl2"),WEBGL_draw_buffers:VN(i),OES_vertex_array_object:GN(i),ANGLE_instanced_arrays:WN(i)},t=i.getExtension;i.getExtension=function(s){return t.call(i,s)||(s in e?e[s]:null)};const n=i.getSupportedExtensions;i.getSupportedExtensions=function(){const s=n.apply(i)||[];return s==null?void 0:s.concat(Object.keys(e))}}async function w2(i,e){const t=document.getElementsByTagName("head")[0];if(!t)throw new Error("loadScript");const n=document.createElement("script");return n.setAttribute("type","text/javascript"),n.setAttribute("src",i),new Promise((s,r)=>{n.onload=s,n.onerror=o=>r(new Error(`Unable to load script '${i}': ${o}`)),t.appendChild(n)})}const XN=1;let hi=null,Y0=!1;const uy={debugSpectorJS:le.get("debug-spectorjs"),debugSpectorJSUrl:"https://cdn.jsdelivr.net/npm/spectorjs@0.9.30/dist/spector.bundle.js",gl:void 0};async function KN(i){if(!globalThis.SPECTOR)try{await w2(i.debugSpectorJSUrl||uy.debugSpectorJSUrl)}catch(e){le.warn(String(e))}}function gte(i){var e;if(i={...uy,...i},!i.debugSpectorJS)return null;if(!hi&&globalThis.SPECTOR&&!((e=globalThis.luma)!=null&&e.spector)){le.probe(XN,"SPECTOR found and initialized. Start with `luma.spector.displayUI()`")();const{Spector:t}=globalThis.SPECTOR;hi=new t,globalThis.luma&&(globalThis.luma.spector=hi)}if(!hi)return null;if(Y0||(Y0=!0,hi.spyCanvases(),hi==null||hi.onCaptureStarted.add(t=>le.info("Spector capture started:",t)()),hi==null||hi.onCapture.add(t=>{le.info("Spector capture complete:",t)(),hi==null||hi.getResultUI(),hi==null||hi.resultView.display(),hi==null||hi.resultView.addCapture(t)})),i.gl){const t=i.gl,n=t.device;hi==null||hi.startCapture(i.gl,500),t.device=n,new Promise(s=>setTimeout(s,2e3)).then(s=>{le.info("Spector capture stopped after 2 seconds")(),hi==null||hi.stopCapture()})}return hi}const ZN="https://unpkg.com/webgl-debug@2.0.1/index.js";function S2(i){return i.luma=i.luma||{},i.luma}async function QN(){Vu()&&!globalThis.WebGLDebugUtils&&(globalThis.global=globalThis.global||globalThis,globalThis.global.module={},await w2(ZN))}function _te(i,e={}){return e.debugWebGL||e.traceWebGL?eD(i,e):JN(i)}function JN(i){const e=S2(i);return e.realContext?e.realContext:i}function eD(i,e){if(!globalThis.WebGLDebugUtils)return le.warn("webgl-debug not loaded")(),i;const t=S2(i);if(t.debugContext)return t.debugContext;globalThis.WebGLDebugUtils.init({...Do,...i});const n=globalThis.WebGLDebugUtils.makeDebugContext(i,tD.bind(null,e),iD.bind(null,e));for(const o in Do)!(o in n)&&typeof Do[o]=="number"&&(n[o]=Do[o]);class s{}Object.setPrototypeOf(n,Object.getPrototypeOf(i)),Object.setPrototypeOf(s,n);const r=Object.create(s);return t.realContext=i,t.debugContext=r,r.debug=!0,r}function q0(i,e){e=Array.from(e).map(n=>n===void 0?"undefined":n);let t=globalThis.WebGLDebugUtils.glFunctionArgsToString(i,e);return t=`${t.slice(0,100)}${t.length>100?"...":""}`,`gl.${i}(${t})`}function tD(i,e,t,n){n=Array.from(n).map(a=>a===void 0?"undefined":a);const s=globalThis.WebGLDebugUtils.glEnumToString(e),r=globalThis.WebGLDebugUtils.glFunctionArgsToString(t,n),o=`${s} in gl.${t}(${r})`;le.error(o)();debugger}function iD(i,e,t){let n="";le.level>=1&&(n=q0(e,t),i.traceWebGL&&le.log(1,n)());for(const s of t)if(s===void 0){n=n||q0(e,t);debugger}}const wd=1;class nD extends fN{constructor(){super(),U(this,"type","webgl"),bg.defaultProps={...bg.defaultProps,...uy}}enforceWebGL2(e){YN(e)}isSupported(){return typeof WebGL2RenderingContext<"u"}isDeviceHandle(e){return typeof WebGL2RenderingContext<"u"&&e instanceof WebGL2RenderingContext?!0:(typeof WebGLRenderingContext<"u"&&e instanceof WebGLRenderingContext&&le.warn("WebGL1 is not supported",e)(),!1)}async attach(e,t={}){const{WebGLDevice:n}=await l0(async()=>{const{WebGLDevice:r}=await import("./webgl-device-QoBMYpnS-xzJlpHEl.js");return{WebGLDevice:r}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]));if(e instanceof n)return e;if((e==null?void 0:e.device)instanceof n)return e.device;if(!sD(e))throw new Error("Invalid WebGL2RenderingContext");const s=t.createCanvasContext===!0?{}:t.createCanvasContext;return new n({...t,_handle:e,createCanvasContext:{canvas:e.canvas,autoResize:!1,...s}})}async create(e={}){const{WebGLDevice:t}=await l0(async()=>{const{WebGLDevice:n}=await import("./webgl-device-QoBMYpnS-xzJlpHEl.js");return{WebGLDevice:n}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]));le.groupCollapsed(wd,"WebGLDevice created")();try{const n=[];(e.debugWebGL||e.debug)&&n.push(QN()),e.debugSpectorJS&&n.push(KN(e));const s=await Promise.allSettled(n);for(const a of s)a.status==="rejected"&&le.error(`Failed to initialize debug libraries ${a.reason}`)();const r=new t(e),o=`${r._reused?"Reusing":"Created"} device with WebGL2 ${r.props.debug?"debug ":""}context: ${r.info.vendor}, ${r.info.renderer} for canvas: ${r.canvasContext.id}`;return le.probe(wd,o)(),le.table(wd,r.info)(),r}finally{le.groupEnd(wd)()}}}function sD(i){return typeof WebGL2RenderingContext<"u"&&i instanceof WebGL2RenderingContext?!0:!!(i&&Number.isFinite(i._version))}const rD=new nD,oD="#b3b3b3",aD=void 0,wg=void 0,lD=1,cD=4,uD="#666666",dD=.1,hD=1,fD=1,E2="#222222",pe={enableSimulation:!0,spaceSize:8192,pointSizeScale:1,linkWidthScale:1,linkArrowsSizeScale:1,renderLinks:!0,curvedLinks:!1,curvedLinkSegments:19,curvedLinkWeight:.8,curvedLinkControlPointDistance:.5,linkArrows:!1,linkVisibilityDistanceRange:[50,150],linkVisibilityMinTransparency:.25,hoveredPointCursor:"auto",hoveredLinkCursor:"auto",renderHoveredPointRing:!1,hoveredPointRingColor:"white",hoveredLinkColor:void 0,hoveredLinkWidthIncrease:5,focusedPointRingColor:"white",focusedPointIndex:void 0,simulation:{decay:5e3,gravity:.25,center:0,repulsion:1,repulsionTheta:1.15,linkSpring:1,linkDistance:10,linkDistRandomVariationRange:[1,1.2],repulsionFromMouse:2,friction:.85,cluster:.1},showFPSMonitor:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||2,scalePointsOnZoom:!1,scaleLinksOnZoom:!1,enableZoom:!0,enableSimulationDuringZoom:!1,enableDrag:!1,fitViewOnInit:!0,fitViewDelay:250,fitViewPadding:.1,fitViewDuration:250,pointSamplingDistance:150,attribution:"",rescalePositions:void 0,enableRightClickRepulsion:!1},pD=.7,mD=.95,gD=3;/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:C2,setPrototypeOf:X0,isFrozen:_D,getPrototypeOf:yD,getOwnPropertyDescriptor:bD}=Object;let{freeze:hn,seal:_s,create:T2}=Object,{apply:Sg,construct:Eg}=typeof Reflect<"u"&&Reflect;hn||(hn=function(i){return i});_s||(_s=function(i){return i});Sg||(Sg=function(i,e,t){return i.apply(e,t)});Eg||(Eg=function(i,e){return new i(...e)});const Sd=fn(Array.prototype.forEach),vD=fn(Array.prototype.lastIndexOf),K0=fn(Array.prototype.pop),ac=fn(Array.prototype.push),xD=fn(Array.prototype.splice),uh=fn(String.prototype.toLowerCase),Jp=fn(String.prototype.toString),Z0=fn(String.prototype.match),lc=fn(String.prototype.replace),wD=fn(String.prototype.indexOf),SD=fn(String.prototype.trim),Ms=fn(Object.prototype.hasOwnProperty),sn=fn(RegExp.prototype.test),cc=ED(TypeError);function fn(i){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s2&&arguments[2]!==void 0?arguments[2]:uh;X0&&X0(i,null);let n=e.length;for(;n--;){let s=e[n];if(typeof s=="string"){const r=t(s);r!==s&&(_D(e)||(e[n]=r),s=r)}i[s]=!0}return i}function CD(i){for(let e=0;e/gm),LD=_s(/\$\{[\w\W]*/gm),RD=_s(/^data-[\-\w.\u00B7-\uFFFF]+$/),PD=_s(/^aria-[\-\w]+$/),k2=_s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ND=_s(/^(?:\w+script|data):/i),DD=_s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),A2=_s(/^html$/i),MD=_s(/^[a-z][.\w]*(-[.\w]+)+$/i);var ix=Object.freeze({__proto__:null,ARIA_ATTR:PD,ATTR_WHITESPACE:DD,CUSTOM_ELEMENT:MD,DATA_ATTR:RD,DOCTYPE_NAME:A2,ERB_EXPR:ID,IS_ALLOWED_URI:k2,IS_SCRIPT_OR_DATA:ND,MUSTACHE_EXPR:AD,TMPLIT_EXPR:LD});const dc={element:1,text:3,progressingInstruction:7,comment:8,document:9},OD=function(){return typeof window>"u"?null:window},BD=function(i,e){if(typeof i!="object"||typeof i.createPolicy!="function")return null;let t=null;const n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(t=e.getAttribute(n));const s="dompurify"+(t?"#"+t:"");try{return i.createPolicy(s,{createHTML(r){return r},createScriptURL(r){return r}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},nx=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function I2(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:OD();const e=I=>I2(I);if(e.version="3.2.6",e.removed=[],!i||!i.document||i.document.nodeType!==dc.document||!i.Element)return e.isSupported=!1,e;let{document:t}=i;const n=t,s=n.currentScript,{DocumentFragment:r,HTMLTemplateElement:o,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:p}=i,m=l.prototype,y=uc(m,"cloneNode"),g=uc(m,"remove"),_=uc(m,"nextSibling"),S=uc(m,"childNodes"),C=uc(m,"parentNode");if(typeof o=="function"){const I=t.createElement("template");I.content&&I.content.ownerDocument&&(t=I.content.ownerDocument)}let x,A="";const{implementation:L,createNodeIterator:B,createDocumentFragment:H,getElementsByTagName:Q}=t,{importNode:te}=n;let M=nx();e.isSupported=typeof C2=="function"&&typeof C=="function"&&L&&L.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:he,ERB_EXPR:se,TMPLIT_EXPR:R,DATA_ATTR:J,ARIA_ATTR:F,IS_SCRIPT_OR_DATA:X,ATTR_WHITESPACE:ie,CUSTOM_ELEMENT:ee}=ix;let{IS_ALLOWED_URI:ae}=ix,Z=null;const Se=ot({},[...Q0,...em,...tm,...im,...J0]);let xe=null;const Je=ot({},[...ex,...nm,...tx,...Ed]);let de=Object.seal(T2(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),bt=null,Xe=null,ht=!0,re=!0,Te=!1,Pe=!0,q=!1,We=!0,He=!1,it=!1,Vt=!1,me=!1,nt=!1,ui=!1,_i=!0,Zn=!1;const Qo="user-content-";let Zs=!0,Li=!1,en={},Ri=null;const ai=ot({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let vo=null;const Es=ot({},["audio","video","img","source","image","track"]);let Qn=null;const Jn=ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Cs="http://www.w3.org/1998/Math/MathML",zi="http://www.w3.org/2000/svg",Ei="http://www.w3.org/1999/xhtml";let ii=Ei,bn=!1,vn=null;const Ts=ot({},[Cs,zi,Ei],Jp);let On=ot({},["mi","mo","mn","ms","mtext"]),es=ot({},["annotation-xml"]);const Dr=ot({},["title","style","font","a","script"]);let xn=null;const Qs=["application/xhtml+xml","text/html"],Jo="text/html";let Zt=null,Ot=null;const ks=t.createElement("form"),xo=function(I){return I instanceof RegExp||I instanceof Function},Js=function(){let I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ot&&Ot===I)){if((!I||typeof I!="object")&&(I={}),I=Hr(I),xn=Qs.indexOf(I.PARSER_MEDIA_TYPE)===-1?Jo:I.PARSER_MEDIA_TYPE,Zt=xn==="application/xhtml+xml"?Jp:uh,Z=Ms(I,"ALLOWED_TAGS")?ot({},I.ALLOWED_TAGS,Zt):Se,xe=Ms(I,"ALLOWED_ATTR")?ot({},I.ALLOWED_ATTR,Zt):Je,vn=Ms(I,"ALLOWED_NAMESPACES")?ot({},I.ALLOWED_NAMESPACES,Jp):Ts,Qn=Ms(I,"ADD_URI_SAFE_ATTR")?ot(Hr(Jn),I.ADD_URI_SAFE_ATTR,Zt):Jn,vo=Ms(I,"ADD_DATA_URI_TAGS")?ot(Hr(Es),I.ADD_DATA_URI_TAGS,Zt):Es,Ri=Ms(I,"FORBID_CONTENTS")?ot({},I.FORBID_CONTENTS,Zt):ai,bt=Ms(I,"FORBID_TAGS")?ot({},I.FORBID_TAGS,Zt):Hr({}),Xe=Ms(I,"FORBID_ATTR")?ot({},I.FORBID_ATTR,Zt):Hr({}),en=Ms(I,"USE_PROFILES")?I.USE_PROFILES:!1,ht=I.ALLOW_ARIA_ATTR!==!1,re=I.ALLOW_DATA_ATTR!==!1,Te=I.ALLOW_UNKNOWN_PROTOCOLS||!1,Pe=I.ALLOW_SELF_CLOSE_IN_ATTR!==!1,q=I.SAFE_FOR_TEMPLATES||!1,We=I.SAFE_FOR_XML!==!1,He=I.WHOLE_DOCUMENT||!1,me=I.RETURN_DOM||!1,nt=I.RETURN_DOM_FRAGMENT||!1,ui=I.RETURN_TRUSTED_TYPE||!1,Vt=I.FORCE_BODY||!1,_i=I.SANITIZE_DOM!==!1,Zn=I.SANITIZE_NAMED_PROPS||!1,Zs=I.KEEP_CONTENT!==!1,Li=I.IN_PLACE||!1,ae=I.ALLOWED_URI_REGEXP||k2,ii=I.NAMESPACE||Ei,On=I.MATHML_TEXT_INTEGRATION_POINTS||On,es=I.HTML_INTEGRATION_POINTS||es,de=I.CUSTOM_ELEMENT_HANDLING||{},I.CUSTOM_ELEMENT_HANDLING&&xo(I.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(de.tagNameCheck=I.CUSTOM_ELEMENT_HANDLING.tagNameCheck),I.CUSTOM_ELEMENT_HANDLING&&xo(I.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(de.attributeNameCheck=I.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),I.CUSTOM_ELEMENT_HANDLING&&typeof I.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(de.allowCustomizedBuiltInElements=I.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),q&&(re=!1),nt&&(me=!0),en&&(Z=ot({},J0),xe=[],en.html===!0&&(ot(Z,Q0),ot(xe,ex)),en.svg===!0&&(ot(Z,em),ot(xe,nm),ot(xe,Ed)),en.svgFilters===!0&&(ot(Z,tm),ot(xe,nm),ot(xe,Ed)),en.mathMl===!0&&(ot(Z,im),ot(xe,tx),ot(xe,Ed))),I.ADD_TAGS&&(Z===Se&&(Z=Hr(Z)),ot(Z,I.ADD_TAGS,Zt)),I.ADD_ATTR&&(xe===Je&&(xe=Hr(xe)),ot(xe,I.ADD_ATTR,Zt)),I.ADD_URI_SAFE_ATTR&&ot(Qn,I.ADD_URI_SAFE_ATTR,Zt),I.FORBID_CONTENTS&&(Ri===ai&&(Ri=Hr(Ri)),ot(Ri,I.FORBID_CONTENTS,Zt)),Zs&&(Z["#text"]=!0),He&&ot(Z,["html","head","body"]),Z.table&&(ot(Z,["tbody"]),delete bt.tbody),I.TRUSTED_TYPES_POLICY){if(typeof I.TRUSTED_TYPES_POLICY.createHTML!="function")throw cc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof I.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw cc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=I.TRUSTED_TYPES_POLICY,A=x.createHTML("")}else x===void 0&&(x=BD(p,s)),x!==null&&typeof A=="string"&&(A=x.createHTML(""));hn&&hn(I),Ot=I}},Rt=ot({},[...em,...tm,...TD]),Mr=ot({},[...im,...kD]),ea=function(I){let V=C(I);(!V||!V.tagName)&&(V={namespaceURI:ii,tagName:"template"});const E=uh(I.tagName),G=uh(V.tagName);return vn[I.namespaceURI]?I.namespaceURI===zi?V.namespaceURI===Ei?E==="svg":V.namespaceURI===Cs?E==="svg"&&(G==="annotation-xml"||On[G]):!!Rt[E]:I.namespaceURI===Cs?V.namespaceURI===Ei?E==="math":V.namespaceURI===zi?E==="math"&&es[G]:!!Mr[E]:I.namespaceURI===Ei?V.namespaceURI===zi&&!es[G]||V.namespaceURI===Cs&&!On[G]?!1:!Mr[E]&&(Dr[E]||!Rt[E]):!!(xn==="application/xhtml+xml"&&vn[I.namespaceURI]):!1},ts=function(I){ac(e.removed,{element:I});try{C(I).removeChild(I)}catch{g(I)}},di=function(I,V){try{ac(e.removed,{attribute:V.getAttributeNode(I),from:V})}catch{ac(e.removed,{attribute:null,from:V})}if(V.removeAttribute(I),I==="is")if(me||nt)try{ts(V)}catch{}else try{V.setAttribute(I,"")}catch{}},Bn=function(I){let V=null,E=null;if(Vt)I=""+I;else{const Ce=Z0(I,/^[\r\n\t ]+/);E=Ce&&Ce[0]}xn==="application/xhtml+xml"&&ii===Ei&&(I=''+I+"");const G=x?x.createHTML(I):I;if(ii===Ei)try{V=new h().parseFromString(G,xn)}catch{}if(!V||!V.documentElement){V=L.createDocument(ii,"template",null);try{V.documentElement.innerHTML=bn?A:G}catch{}}const ne=V.body||V.documentElement;return I&&E&&ne.insertBefore(t.createTextNode(E),ne.childNodes[0]||null),ii===Ei?Q.call(V,He?"html":"body")[0]:He?V.documentElement:ne},wo=function(I){return B.call(I.ownerDocument||I,I,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ut=function(I){return I instanceof d&&(typeof I.nodeName!="string"||typeof I.textContent!="string"||typeof I.removeChild!="function"||!(I.attributes instanceof u)||typeof I.removeAttribute!="function"||typeof I.setAttribute!="function"||typeof I.namespaceURI!="string"||typeof I.insertBefore!="function"||typeof I.hasChildNodes!="function")},Or=function(I){return typeof a=="function"&&I instanceof a};function st(I,V,E){Sd(I,G=>{G.call(e,V,E,Ot)})}const wn=function(I){let V=null;if(st(M.beforeSanitizeElements,I,null),ut(I))return ts(I),!0;const E=Zt(I.nodeName);if(st(M.uponSanitizeElement,I,{tagName:E,allowedTags:Z}),We&&I.hasChildNodes()&&!Or(I.firstElementChild)&&sn(/<[/\w!]/g,I.innerHTML)&&sn(/<[/\w!]/g,I.textContent)||I.nodeType===dc.progressingInstruction||We&&I.nodeType===dc.comment&&sn(/<[/\w]/g,I.data))return ts(I),!0;if(!Z[E]||bt[E]){if(!bt[E]&&er(E)&&(de.tagNameCheck instanceof RegExp&&sn(de.tagNameCheck,E)||de.tagNameCheck instanceof Function&&de.tagNameCheck(E)))return!1;if(Zs&&!Ri[E]){const G=C(I)||I.parentNode,ne=S(I)||I.childNodes;if(ne&&G){const Ce=ne.length;for(let At=Ce-1;At>=0;--At){const rt=y(ne[At],!0);rt.__removalCount=(I.__removalCount||0)+1,G.insertBefore(rt,_(I))}}}return ts(I),!0}return I instanceof l&&!ea(I)||(E==="noscript"||E==="noembed"||E==="noframes")&&sn(/<\/no(script|embed|frames)/i,I.innerHTML)?(ts(I),!0):(q&&I.nodeType===dc.text&&(V=I.textContent,Sd([he,se,R],G=>{V=lc(V,G," ")}),I.textContent!==V&&(ac(e.removed,{element:I.cloneNode()}),I.textContent=V)),st(M.afterSanitizeElements,I,null),!1)},Br=function(I,V,E){if(_i&&(V==="id"||V==="name")&&(E in t||E in ks))return!1;if(!(re&&!Xe[V]&&sn(J,V))&&!(ht&&sn(F,V))){if(!xe[V]||Xe[V]){if(!(er(I)&&(de.tagNameCheck instanceof RegExp&&sn(de.tagNameCheck,I)||de.tagNameCheck instanceof Function&&de.tagNameCheck(I))&&(de.attributeNameCheck instanceof RegExp&&sn(de.attributeNameCheck,V)||de.attributeNameCheck instanceof Function&&de.attributeNameCheck(V))||V==="is"&&de.allowCustomizedBuiltInElements&&(de.tagNameCheck instanceof RegExp&&sn(de.tagNameCheck,E)||de.tagNameCheck instanceof Function&&de.tagNameCheck(E))))return!1}else if(!Qn[V]&&!sn(ae,lc(E,ie,""))&&!((V==="src"||V==="xlink:href"||V==="href")&&I!=="script"&&wD(E,"data:")===0&&vo[I])&&!(Te&&!sn(X,lc(E,ie,"")))&&E)return!1}return!0},er=function(I){return I!=="annotation-xml"&&Z0(I,ee)},Fn=function(I){st(M.beforeSanitizeAttributes,I,null);const{attributes:V}=I;if(!V||ut(I))return;const E={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xe,forceKeepAttr:void 0};let G=V.length;for(;G--;){const ne=V[G],{name:Ce,namespaceURI:At,value:rt}=ne,et=Zt(Ce),yi=rt;let ft=Ce==="value"?yi:SD(yi);if(E.attrName=et,E.attrValue=ft,E.keepAttr=!0,E.forceKeepAttr=void 0,st(M.uponSanitizeAttribute,I,E),ft=E.attrValue,Zn&&(et==="id"||et==="name")&&(di(Ce,I),ft=Qo+ft),We&&sn(/((--!?|])>)|<\/(style|title)/i,ft)){di(Ce,I);continue}if(E.forceKeepAttr)continue;if(!E.keepAttr){di(Ce,I);continue}if(!Pe&&sn(/\/>/i,ft)){di(Ce,I);continue}q&&Sd([he,se,R],Bt=>{ft=lc(ft,Bt," ")});const tr=Zt(I.nodeName);if(!Br(tr,et,ft)){di(Ce,I);continue}if(x&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!At)switch(p.getAttributeType(tr,et)){case"TrustedHTML":{ft=x.createHTML(ft);break}case"TrustedScriptURL":{ft=x.createScriptURL(ft);break}}if(ft!==yi)try{At?I.setAttributeNS(At,Ce,ft):I.setAttribute(Ce,ft),ut(I)?ts(I):K0(e.removed)}catch{di(Ce,I)}}st(M.afterSanitizeAttributes,I,null)},tn=function I(V){let E=null;const G=wo(V);for(st(M.beforeSanitizeShadowDOM,V,null);E=G.nextNode();)st(M.uponSanitizeShadowNode,E,null),wn(E),Fn(E),E.content instanceof r&&I(E.content);st(M.afterSanitizeShadowDOM,V,null)};return e.sanitize=function(I){let V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=null,G=null,ne=null,Ce=null;if(bn=!I,bn&&(I=""),typeof I!="string"&&!Or(I))if(typeof I.toString=="function"){if(I=I.toString(),typeof I!="string")throw cc("dirty is not a string, aborting")}else throw cc("toString is not a function");if(!e.isSupported)return I;if(it||Js(V),e.removed=[],typeof I=="string"&&(Li=!1),Li){if(I.nodeName){const et=Zt(I.nodeName);if(!Z[et]||bt[et])throw cc("root node is forbidden and cannot be sanitized in-place")}}else if(I instanceof a)E=Bn(""),G=E.ownerDocument.importNode(I,!0),G.nodeType===dc.element&&G.nodeName==="BODY"||G.nodeName==="HTML"?E=G:E.appendChild(G);else{if(!me&&!q&&!He&&I.indexOf("<")===-1)return x&&ui?x.createHTML(I):I;if(E=Bn(I),!E)return me?null:ui?A:""}E&&Vt&&ts(E.firstChild);const At=wo(Li?I:E);for(;ne=At.nextNode();)wn(ne),Fn(ne),ne.content instanceof r&&tn(ne.content);if(Li)return I;if(me){if(nt)for(Ce=H.call(E.ownerDocument);E.firstChild;)Ce.appendChild(E.firstChild);else Ce=E;return(xe.shadowroot||xe.shadowrootmode)&&(Ce=te.call(n,Ce,!0)),Ce}let rt=He?E.outerHTML:E.innerHTML;return He&&Z["!doctype"]&&E.ownerDocument&&E.ownerDocument.doctype&&E.ownerDocument.doctype.name&&sn(A2,E.ownerDocument.doctype.name)&&(rt=" `+rt),q&&Sd([he,se,R],et=>{rt=lc(rt,et," ")}),x&&ui?x.createHTML(rt):rt},e.setConfig=function(){let I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Js(I),it=!0},e.clearConfig=function(){Ot=null,it=!1},e.isValidAttribute=function(I,V,E){Ot||Js({});const G=Zt(I),ne=Zt(V);return Br(G,ne,E)},e.addHook=function(I,V){typeof V=="function"&&ac(M[I],V)},e.removeHook=function(I,V){if(V!==void 0){const E=vD(M[I],V);return E===-1?void 0:xD(M[I],E,1)[0]}return K0(M[I])},e.removeHooks=function(I){M[I]=[]},e.removeAllHooks=function(){M=nx()},e}var FD=I2();const zD=i=>typeof i=="function",L2=i=>Array.isArray(i),UD=i=>i instanceof Object,$D=i=>i instanceof Object?i.constructor.name!=="Function"&&i.constructor.name!=="Object":!1,sx=i=>UD(i)&&!L2(i)&&!zD(i)&&!$D(i);function Mo(i){let e;if(L2(i))e=i;else{const t=Uo(i),n=t==null?void 0:t.rgb();e=[(n==null?void 0:n.r)||0,(n==null?void 0:n.g)||0,(n==null?void 0:n.b)||0,(t==null?void 0:t.opacity)??1]}return[e[0]/255,e[1]/255,e[2]/255,e[3]]}function jD(i,e,t){return .2126*i+.7152*e+.0722*t}function jn(i,e,t=0,n=0,s,r){return i.readPixelsToArrayWebGL(e,{sourceX:t,sourceY:n,sourceWidth:s,sourceHeight:r})}function HD(i,e,t){return Math.min(Math.max(i,e),t)}function rs(i){return i!=null&&!Number.isNaN(i)}function VD(i,e){return FD.sanitize(i,{ALLOWED_TAGS:["a","b","i","em","strong","span","div","p","br"],ALLOWED_ATTR:["href","target","class","id","style"],ALLOW_DATA_ATTR:!1,...e})}class GD{constructor(){this.enableSimulation=pe.enableSimulation,this.backgroundColor=E2,this.spaceSize=pe.spaceSize,this.pointColor=oD,this.pointDefaultColor=void 0,this.pointGreyoutOpacity=aD,this.pointGreyoutColor=wg,this.pointSize=cD,this.pointDefaultSize=void 0,this.pointOpacity=lD,this.pointSizeScale=pe.pointSizeScale,this.hoveredPointCursor=pe.hoveredPointCursor,this.hoveredLinkCursor=pe.hoveredLinkCursor,this.renderHoveredPointRing=pe.renderHoveredPointRing,this.hoveredPointRingColor=pe.hoveredPointRingColor,this.focusedPointRingColor=pe.focusedPointRingColor,this.focusedPointIndex=pe.focusedPointIndex,this.linkColor=uD,this.linkDefaultColor=void 0,this.linkOpacity=hD,this.linkGreyoutOpacity=dD,this.linkWidth=fD,this.linkDefaultWidth=void 0,this.linkWidthScale=pe.linkWidthScale,this.hoveredLinkColor=pe.hoveredLinkColor,this.hoveredLinkWidthIncrease=pe.hoveredLinkWidthIncrease,this.renderLinks=pe.renderLinks,this.curvedLinks=pe.curvedLinks,this.curvedLinkSegments=pe.curvedLinkSegments,this.curvedLinkWeight=pe.curvedLinkWeight,this.curvedLinkControlPointDistance=pe.curvedLinkControlPointDistance,this.linkArrows=pe.linkArrows,this.linkDefaultArrows=void 0,this.linkArrowsSizeScale=pe.linkArrowsSizeScale,this.scaleLinksOnZoom=pe.scaleLinksOnZoom,this.linkVisibilityDistanceRange=pe.linkVisibilityDistanceRange,this.linkVisibilityMinTransparency=pe.linkVisibilityMinTransparency,this.simulationDecay=pe.simulation.decay,this.simulationGravity=pe.simulation.gravity,this.simulationCenter=pe.simulation.center,this.simulationRepulsion=pe.simulation.repulsion,this.simulationRepulsionTheta=pe.simulation.repulsionTheta,this.simulationLinkSpring=pe.simulation.linkSpring,this.simulationLinkDistance=pe.simulation.linkDistance,this.simulationLinkDistRandomVariationRange=pe.simulation.linkDistRandomVariationRange,this.simulationRepulsionFromMouse=pe.simulation.repulsionFromMouse,this.enableRightClickRepulsion=pe.enableRightClickRepulsion,this.simulationFriction=pe.simulation.friction,this.simulationCluster=pe.simulation.cluster,this.onSimulationStart=void 0,this.onSimulationTick=void 0,this.onSimulationEnd=void 0,this.onSimulationPause=void 0,this.onSimulationRestart=void 0,this.onSimulationUnpause=void 0,this.onClick=void 0,this.onPointClick=void 0,this.onLinkClick=void 0,this.onBackgroundClick=void 0,this.onMouseMove=void 0,this.onPointMouseOver=void 0,this.onPointMouseOut=void 0,this.onLinkMouseOver=void 0,this.onLinkMouseOut=void 0,this.onZoomStart=void 0,this.onZoom=void 0,this.onZoomEnd=void 0,this.onDragStart=void 0,this.onDrag=void 0,this.onDragEnd=void 0,this.showFPSMonitor=pe.showFPSMonitor,this.pixelRatio=pe.pixelRatio,this.scalePointsOnZoom=pe.scalePointsOnZoom,this.initialZoomLevel=void 0,this.enableZoom=pe.enableZoom,this.enableSimulationDuringZoom=pe.enableSimulationDuringZoom,this.enableDrag=pe.enableDrag,this.fitViewOnInit=pe.fitViewOnInit,this.fitViewDelay=pe.fitViewDelay,this.fitViewPadding=pe.fitViewPadding,this.fitViewDuration=pe.fitViewDuration,this.fitViewByPointsInRect=void 0,this.fitViewByPointIndices=void 0,this.randomSeed=void 0,this.pointSamplingDistance=pe.pointSamplingDistance,this.attribution=pe.attribution,this.rescalePositions=pe.rescalePositions}init(e){Object.keys(e).forEach(t=>{this.deepMergeConfig(this.getConfig(),e,t)})}deepMergeConfig(e,t,n){sx(e[n])&&sx(t[n])?Object.keys(t[n]).forEach(s=>{this.deepMergeConfig(e[n],t[n],s)}):e[n]=t[n]}getConfig(){return this}}function dy(i,e){if(!i)throw new Error(e||"shadertools: assertion failed.")}const sm={number:{type:"number",validate(i,e){return Number.isFinite(i)&&typeof e=="object"&&(e.max===void 0||i<=e.max)&&(e.min===void 0||i>=e.min)}},array:{type:"array",validate(i,e){return Array.isArray(i)||ArrayBuffer.isView(i)}}};function WD(i){const e={};for(const[t,n]of Object.entries(i))e[t]=YD(n);return e}function YD(i){let e=rx(i);if(e!=="object")return{value:i,...sm[e],type:e};if(typeof i=="object")return i?i.type!==void 0?{...i,...sm[i.type],type:i.type}:i.value===void 0?{type:"object",value:i}:(e=rx(i.value),{...i,...sm[e],type:e}):{type:"object",value:null};throw new Error("props")}function rx(i){return Array.isArray(i)||ArrayBuffer.isView(i)?"array":typeof i}const qD=`#ifdef MODULE_LOGDEPTH logdepth_adjustPosition(gl_Position); #endif diff --git a/frontend/dist/assets/NodeInformationCard-BEL_UTIo.js b/frontend/dist/assets/NodeInformationCard-xEgWVu4P.js similarity index 90% rename from frontend/dist/assets/NodeInformationCard-BEL_UTIo.js rename to frontend/dist/assets/NodeInformationCard-xEgWVu4P.js index e6c56383..94b97602 100644 --- a/frontend/dist/assets/NodeInformationCard-BEL_UTIo.js +++ b/frontend/dist/assets/NodeInformationCard-xEgWVu4P.js @@ -1 +1 @@ -import{j as s,F as i,R as d,cJ as c}from"./index-CLIbpHvY.js";import{C as n}from"./PageLayout-9SoN_daN.js";import{D as m}from"./DataBox-ChuBU2q7.js";function j({nodeName:e,repeaterVersion:a,coreVersion:t,localHash:r,publicKey:l}){return s.jsxs(n,{neomorphic:!0,children:[s.jsx(i,{icon:s.jsx(d,{}),title:"Node Information"}),s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3 sm:gap-4",children:[s.jsxs("div",{className:"min-w-0 col-span-2 sm:col-span-1",children:[s.jsx("span",{className:"type-label text-fg-secondary",children:"Node Name"}),s.jsx("p",{className:"type-body text-fg-primary mt-0.5 sm:mt-1 truncate",title:e,children:e})]}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{className:"type-label text-fg-secondary",children:"Repeater"}),s.jsxs("p",{className:"type-data text-fg-primary mt-0.5 sm:mt-1 truncate",title:`v${a}`,children:["v",a]})]}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{className:"type-label text-fg-secondary",children:"Core"}),s.jsxs("p",{className:"type-data text-fg-primary mt-0.5 sm:mt-1 truncate",title:`v${t}`,children:["v",t]})]}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{className:"type-label text-fg-secondary",children:"Console"}),s.jsxs("p",{className:"type-data text-fg-primary mt-0.5 sm:mt-1 truncate",title:`v${c}`,children:["v",c]})]}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{className:"type-label text-fg-secondary",children:"Local Hash"}),s.jsx("div",{className:"mt-0.5 sm:mt-1",children:r?s.jsx(m,{copy:!0,size:"compact",children:r}):s.jsx("span",{className:"type-data-sm text-fg-secondary",children:"N/A"})})]})]}),l&&s.jsxs("div",{className:"mt-3 sm:mt-4 pt-3 sm:pt-4 border-t border-edge-subtle",children:[s.jsx("span",{className:"type-label text-fg-secondary",children:"Public Key"}),s.jsx("div",{className:"mt-0.5 sm:mt-1",children:s.jsx(m,{copy:!0,size:"responsive",children:l})})]})]})}export{j as N}; +import{j as s,F as i,R as d,cJ as c}from"./index-2YU-f7O7.js";import{C as n}from"./PageLayout-tvsYvfyL.js";import{D as m}from"./DataBox-D8nJsUbV.js";function j({nodeName:e,repeaterVersion:a,coreVersion:t,localHash:r,publicKey:l}){return s.jsxs(n,{neomorphic:!0,children:[s.jsx(i,{icon:s.jsx(d,{}),title:"Node Information"}),s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3 sm:gap-4",children:[s.jsxs("div",{className:"min-w-0 col-span-2 sm:col-span-1",children:[s.jsx("span",{className:"type-label text-fg-secondary",children:"Node Name"}),s.jsx("p",{className:"type-body text-fg-primary mt-0.5 sm:mt-1 truncate",title:e,children:e})]}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{className:"type-label text-fg-secondary",children:"Repeater"}),s.jsxs("p",{className:"type-data text-fg-primary mt-0.5 sm:mt-1 truncate",title:`v${a}`,children:["v",a]})]}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{className:"type-label text-fg-secondary",children:"Core"}),s.jsxs("p",{className:"type-data text-fg-primary mt-0.5 sm:mt-1 truncate",title:`v${t}`,children:["v",t]})]}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{className:"type-label text-fg-secondary",children:"Console"}),s.jsxs("p",{className:"type-data text-fg-primary mt-0.5 sm:mt-1 truncate",title:`v${c}`,children:["v",c]})]}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{className:"type-label text-fg-secondary",children:"Local Hash"}),s.jsx("div",{className:"mt-0.5 sm:mt-1",children:r?s.jsx(m,{copy:!0,size:"compact",children:r}):s.jsx("span",{className:"type-data-sm text-fg-secondary",children:"N/A"})})]})]}),l&&s.jsxs("div",{className:"mt-3 sm:mt-4 pt-3 sm:pt-4 border-t border-edge-subtle",children:[s.jsx("span",{className:"type-label text-fg-secondary",children:"Public Key"}),s.jsx("div",{className:"mt-0.5 sm:mt-1",children:s.jsx(m,{copy:!0,size:"responsive",children:l})})]})]})}export{j as N}; diff --git a/frontend/dist/assets/PacketList-CYo0ntr7.js b/frontend/dist/assets/PacketList-BhefpQer.js similarity index 99% rename from frontend/dist/assets/PacketList-CYo0ntr7.js rename to frontend/dist/assets/PacketList-BhefpQer.js index 188e489b..3211f3e7 100644 --- a/frontend/dist/assets/PacketList-CYo0ntr7.js +++ b/frontend/dist/assets/PacketList-BhefpQer.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PathMapMapLibre-DGbZd6iX.js","assets/index-CLIbpHvY.js","assets/BasemapLayer-B74HwKhL.js","assets/useMapViewStore-CoIRBkXg.js","assets/index-EpCuPFqY.js","assets/index-DUfCykEc.css","assets/BasemapLayer-B1CfjdFi.css"])))=>i.map(i=>d[i]); -import{r as p,aD as ds,d as me,bd as xs,be as zt,bf as ms,bg as hs,j as e,c as R,B as rt,bh as us,x as it,q as B,bi as Ft,R as de,bj as It,bk as At,bl as Dt,bm as ue,bn as Ze,$ as De,bo as ps,bp as fs,bq as gs,br as ys,bs as js,m as oe,a7 as re,w as bs,bt as Ns,bu as ie,bv as ut,bw as vs,bx as ws,by as ks,bz as Cs,bA as Ss,bB as _s,bC as Je,bD as Ms,a3 as Ts,E as Ht,bE as Ps,bF as Bs,bG as Ls,bH as Rs,ac as Ot,ad as $t,A as Ke,bI as Es,ae as zs,bJ as Fs,bK as lt}from"./index-CLIbpHvY.js";import{p as Is,d as As,e as Ut,g as Ds,b as Hs}from"./primitives-CZFN5gGO.js";import{u as Os,r as $s,a as Us,b as Vs,c as Ws,d as Gs,i as Qs}from"./consumer-registry-BrRzRPA2.js";import{D as Pe,R as He,P as Be,g as qs}from"./badge-colors-BNUqIXCA.js";import{g as Vt,e as _e,a as Wt}from"./chat-utils-C0FWA6kK.js";import{P as Gt,d as Qt,a as Ks,b as Ys}from"./payload-decoders-BsVy7I3_.js";import{A as pe,S as Oe,i as $e,C as xe,a as Xs,g as pt}from"./SignalIndicator-BGst_xwg.js";import{a as Zs,A as qt}from"./arrow-up-Dw_1quvK.js";import{C as ct}from"./chevron-right-tyotcuUX.js";import{M as Ue}from"./map-pin-oP9EChoI.js";import{C as Js}from"./circle-question-mark-CW0NICCZ.js";import{T as et}from"./triangle-alert-BPXHBOYA.js";import{D as X}from"./DataBox-ChuBU2q7.js";import{L as ea}from"./layers-DTsYQqst.js";import{H as Kt}from"./hash-Cd1zCpVV.js";import{A as ta}from"./activity-DBVB1w-E.js";import{C as sa}from"./circle-check-BA0O7QIB.js";import{D as aa}from"./database-idkjcnGz.js";import{H as na,D as tt,Z as ft,u as ra}from"./useMapViewStore-CoIRBkXg.js";import{S as we}from"./shield-hk2V-Q9a.js";import{C as Yt}from"./TimeRangeStepper-r-j5VisG.js";function ke(t,n,s){let a=s.initialDeps??[],r,i=!0;function l(){var c,o,u;let x;s.key&&((c=s.debug)!=null&&c.call(s))&&(x=Date.now());const g=t();if(!(g.length!==a.length||g.some((m,v)=>a[v]!==m)))return r;a=g;let y;if(s.key&&((o=s.debug)!=null&&o.call(s))&&(y=Date.now()),r=n(...g),s.key&&((u=s.debug)!=null&&u.call(s))){const m=Math.round((Date.now()-x)*100)/100,v=Math.round((Date.now()-y)*100)/100,T=v/16,h=(N,j)=>{for(N=String(N);N.lengthi.map(i=>d[i]); +import{r as p,aD as ds,d as me,bd as xs,be as zt,bf as ms,bg as hs,j as e,c as R,B as rt,bh as us,x as it,q as B,bi as Ft,R as de,bj as It,bk as At,bl as Dt,bm as ue,bn as Ze,$ as De,bo as ps,bp as fs,bq as gs,br as ys,bs as js,m as oe,a7 as re,w as bs,bt as Ns,bu as ie,bv as ut,bw as vs,bx as ws,by as ks,bz as Cs,bA as Ss,bB as _s,bC as Je,bD as Ms,a3 as Ts,E as Ht,bE as Ps,bF as Bs,bG as Ls,bH as Rs,ac as Ot,ad as $t,A as Ke,bI as Es,ae as zs,bJ as Fs,bK as lt}from"./index-2YU-f7O7.js";import{p as Is,d as As,e as Ut,g as Ds,b as Hs}from"./primitives-DMQ-qQ8e.js";import{u as Os,r as $s,a as Us,b as Vs,c as Ws,d as Gs,i as Qs}from"./consumer-registry-BaTbQUiU.js";import{D as Pe,R as He,P as Be,g as qs}from"./badge-colors-BNUqIXCA.js";import{g as Vt,e as _e,a as Wt}from"./chat-utils-zf_UbwVO.js";import{P as Gt,d as Qt,a as Ks,b as Ys}from"./payload-decoders-BzIXzxqW.js";import{A as pe,S as Oe,i as $e,C as xe,a as Xs,g as pt}from"./SignalIndicator-CZkLIt0w.js";import{a as Zs,A as qt}from"./arrow-up-BCJu40uf.js";import{C as ct}from"./chevron-right-DwaXNeO4.js";import{M as Ue}from"./map-pin-DwpgbaSS.js";import{C as Js}from"./circle-question-mark-BpV3PDV1.js";import{T as et}from"./triangle-alert-il1la-RI.js";import{D as X}from"./DataBox-D8nJsUbV.js";import{L as ea}from"./layers-7MoN93tY.js";import{H as Kt}from"./hash-DswdBqT-.js";import{A as ta}from"./activity-BgtT9aiG.js";import{C as sa}from"./circle-check-CMy_4dWl.js";import{D as aa}from"./database-1_qMqgVS.js";import{H as na,D as tt,Z as ft,u as ra}from"./useMapViewStore-Ce8IV--K.js";import{S as we}from"./shield-Cg8ViVBZ.js";import{C as Yt}from"./TimeRangeStepper--TSSRhtK.js";function ke(t,n,s){let a=s.initialDeps??[],r,i=!0;function l(){var c,o,u;let x;s.key&&((c=s.debug)!=null&&c.call(s))&&(x=Date.now());const g=t();if(!(g.length!==a.length||g.some((m,v)=>a[v]!==m)))return r;a=g;let y;if(s.key&&((o=s.debug)!=null&&o.call(s))&&(y=Date.now()),r=n(...g),s.key&&((u=s.debug)!=null&&u.call(s))){const m=Math.round((Date.now()-x)*100)/100,v=Math.round((Date.now()-y)*100)/100,T=v/16,h=(N,j)=>{for(N=String(N);N.length{a=c},l}function gt(t,n){if(t===void 0)throw new Error("Unexpected undefined");return t}const ia=(t,n)=>Math.abs(t-n)<1.01,la=(t,n,s)=>{let a;return function(...r){t.clearTimeout(a),a=t.setTimeout(()=>n.apply(this,r),s)}},yt=t=>{const{offsetWidth:n,offsetHeight:s}=t;return{width:n,height:s}},ca=t=>t,oa=t=>{const n=Math.max(t.startIndex-t.overscan,0),s=Math.min(t.endIndex+t.overscan,t.count-1),a=[];for(let r=n;r<=s;r++)a.push(r);return a},da=(t,n)=>{const s=t.scrollElement;if(!s)return;const a=t.targetWindow;if(!a)return;const r=l=>{const{width:c,height:o}=l;n({width:Math.round(c),height:Math.round(o)})};if(r(yt(s)),!a.ResizeObserver)return()=>{};const i=new a.ResizeObserver(l=>{const c=()=>{const o=l[0];if(o!=null&&o.borderBoxSize){const u=o.borderBoxSize[0];if(u){r({width:u.inlineSize,height:u.blockSize});return}}r(yt(s))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return i.observe(s,{box:"border-box"}),()=>{i.unobserve(s)}},jt={passive:!0},bt=typeof window>"u"?!0:"onscrollend"in window,xa=(t,n)=>{const s=t.scrollElement;if(!s)return;const a=t.targetWindow;if(!a)return;let r=0;const i=t.options.useScrollendEvent&&bt?()=>{}:la(a,()=>{n(r,!1)},t.options.isScrollingResetDelay),l=x=>()=>{const{horizontal:g,isRtl:f}=t.options;r=g?s.scrollLeft*(f&&-1||1):s.scrollTop,i(),n(r,x)},c=l(!0),o=l(!1);s.addEventListener("scroll",c,jt);const u=t.options.useScrollendEvent&&bt;return u&&s.addEventListener("scrollend",o,jt),()=>{s.removeEventListener("scroll",c),u&&s.removeEventListener("scrollend",o)}},ma=(t,n,s)=>{if(n!=null&&n.borderBoxSize){const a=n.borderBoxSize[0];if(a)return Math.round(a[s.options.horizontal?"inlineSize":"blockSize"])}return t[s.options.horizontal?"offsetWidth":"offsetHeight"]},ha=(t,{adjustments:n=0,behavior:s},a)=>{var r,i;const l=t+n;(i=(r=a.scrollElement)==null?void 0:r.scrollTo)==null||i.call(r,{[a.options.horizontal?"left":"top"]:l,behavior:s})};class ua{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let s=null;const a=()=>s||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:s=new this.targetWindow.ResizeObserver(r=>{r.forEach(i=>{const l=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var r;(r=a())==null||r.disconnect(),s=null},observe:r=>{var i;return(i=a())==null?void 0:i.observe(r,{box:"border-box"})},unobserve:r=>{var i;return(i=a())==null?void 0:i.unobserve(r)}}})(),this.range=null,this.setOptions=s=>{Object.entries(s).forEach(([a,r])=>{typeof r>"u"&&delete s[a]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:ca,rangeExtractor:oa,onChange:()=>{},measureElement:ma,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...s}},this.notify=s=>{var a,r;(r=(a=this.options).onChange)==null||r.call(a,this,s)},this.maybeNotify=ke(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),s=>{this.notify(s)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(s=>s()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var s;const a=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==a){if(this.cleanup(),!a){this.maybeNotify();return}this.scrollElement=a,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((s=this.scrollElement)==null?void 0:s.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(s,a)=>{const r=new Map,i=new Map;for(let l=a-1;l>=0;l--){const c=s[l];if(r.has(c.lane))continue;const o=i.get(c.lane);if(o==null||c.end>o.end?i.set(c.lane,c):c.endl.end===c.end?l.index-c.index:l.end-c.end)[0]:void 0},this.getMeasurementOptions=ke(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(s,a,r,i,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==c&&(this.lanesChangedFlag=!0),this.prevLanes=c,this.pendingMeasuredCacheIndexes=[],{count:s,paddingStart:a,scrollMargin:r,getItemKey:i,enabled:l,lanes:c}),{key:!1}),this.getMeasurements=ke(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:s,paddingStart:a,scrollMargin:r,getItemKey:i,enabled:l,lanes:c},o)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>s)for(const f of this.laneAssignments.keys())f>=s&&this.laneAssignments.delete(f);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const u=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===s&&(this.lanesSettling=!1);const x=this.measurementsCache.slice(0,u),g=new Array(c).fill(void 0);for(let f=0;f1){v=m;const C=g[v],k=C!==void 0?x[C]:void 0;T=k?k.end+this.options.gap:a+r}else{const C=this.options.lanes===1?x[f-1]:this.getFurthestMeasurement(x,f);T=C?C.end+this.options.gap:a+r,v=C?C.lane:f%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(f,v)}const h=o.get(y),N=typeof h=="number"?h:this.options.estimateSize(f),j=T+N;x[f]={index:f,start:T,size:N,end:j,key:y,lane:v},g[v]=f}return this.measurementsCache=x,x},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ke(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(s,a,r,i)=>this.range=s.length>0&&a>0?pa({measurements:s,outerSize:a,scrollOffset:r,lanes:i}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=ke(()=>{let s=null,a=null;const r=this.calculateRange();return r&&(s=r.startIndex,a=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,s,a]),[this.options.rangeExtractor,this.options.overscan,this.options.count,s,a]},(s,a,r,i,l)=>i===null||l===null?[]:s({startIndex:i,endIndex:l,overscan:a,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=s=>{const a=this.options.indexAttribute,r=s.getAttribute(a);return r?parseInt(r,10):(console.warn(`Missing attribute name '${a}={index}' on measured element.`),-1)},this._measureElement=(s,a)=>{const r=this.indexFromElement(s),i=this.measurementsCache[r];if(!i)return;const l=i.key,c=this.elementsCache.get(l);c!==s&&(c&&this.observer.unobserve(c),this.observer.observe(s),this.elementsCache.set(l,s)),s.isConnected&&this.resizeItem(r,this.options.measureElement(s,a,this))},this.resizeItem=(s,a)=>{const r=this.measurementsCache[s];if(!r)return;const i=this.itemSizeCache.get(r.key)??r.size,l=a-i;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,l,this):r.start{if(!s){this.elementsCache.forEach((a,r)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(r))});return}this._measureElement(s,void 0)},this.getVirtualItems=ke(()=>[this.getVirtualIndexes(),this.getMeasurements()],(s,a)=>{const r=[];for(let i=0,l=s.length;ithis.options.debug}),this.getVirtualItemForOffset=s=>{const a=this.getMeasurements();if(a.length!==0)return gt(a[Xt(0,a.length-1,r=>gt(a[r]).start,s)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const s=this.scrollElement.document.documentElement;return this.options.horizontal?s.scrollWidth-this.scrollElement.innerWidth:s.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(s,a,r=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),l=this.getScrollOffset();a==="auto"&&(a=s>=l+i?"end":"start"),a==="center"?s+=(r-i)/2:a==="end"&&(s-=i);const c=this.getMaxScrollOffset();return Math.max(Math.min(c,s),0)},this.getOffsetForIndex=(s,a="auto")=>{s=Math.max(0,Math.min(s,this.options.count-1));const r=this.measurementsCache[s];if(!r)return;const i=this.getSize(),l=this.getScrollOffset();if(a==="auto")if(r.end>=l+i-this.options.scrollPaddingEnd)a="end";else if(r.start<=l+this.options.scrollPaddingStart)a="start";else return[l,a];if(a==="end"&&s===this.options.count-1)return[this.getMaxScrollOffset(),a];const c=a==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,a,r.size),a]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(s,{align:a="start",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(s,a),{adjustments:void 0,behavior:r})},this.scrollToIndex=(s,{align:a="auto",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),s=Math.max(0,Math.min(s,this.options.count-1)),this.currentScrollToIndex=s;let i=0;const l=10,c=u=>{if(!this.targetWindow)return;const x=this.getOffsetForIndex(s,u);if(!x){console.warn("Failed to get offset for index:",s);return}const[g,f]=x;this._scrollToOffset(g,{adjustments:void 0,behavior:r}),this.targetWindow.requestAnimationFrame(()=>{const y=()=>{if(this.currentScrollToIndex!==s)return;const m=this.getScrollOffset(),v=this.getOffsetForIndex(s,f);if(!v){console.warn("Failed to get offset for index:",s);return}ia(v[0],m)||o(f)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(y):y()})},o=u=>{this.targetWindow&&this.currentScrollToIndex===s&&(i++,ic(u)):console.warn(`Failed to scroll to index ${s} after ${l} attempts.`))};c(a)},this.scrollBy=(s,{behavior:a}={})=>{a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+s,{adjustments:void 0,behavior:a})},this.getTotalSize=()=>{var s;const a=this.getMeasurements();let r;if(a.length===0)r=this.options.paddingStart;else if(this.options.lanes===1)r=((s=a[a.length-1])==null?void 0:s.end)??0;else{const i=Array(this.options.lanes).fill(null);let l=a.length-1;for(;l>=0&&i.some(c=>c===null);){const c=a[l];i[c.lane]===null&&(i[c.lane]=c.end),l--}r=Math.max(...i.filter(c=>c!==null))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(s,{adjustments:a,behavior:r})=>{this.options.scrollToFn(s,{behavior:r,adjustments:a},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(n)}}const Xt=(t,n,s,a)=>{for(;t<=n;){const r=(t+n)/2|0,i=s(r);if(ia)n=r-1;else return r}return t>0?t-1:0};function pa({measurements:t,outerSize:n,scrollOffset:s,lanes:a}){const r=t.length-1,i=o=>t[o].start;if(t.length<=a)return{startIndex:0,endIndex:r};let l=Xt(0,r,i,s),c=l;if(a===1)for(;c1){const o=Array(a).fill(0);for(;cx=0&&u.some(x=>x>=s);){const x=t[l];u[x.lane]=x.start,l--}l=Math.max(0,l-l%a),c=Math.min(r,c+(a-1-c%a))}return{startIndex:l,endIndex:c}}const Nt=typeof document<"u"?p.useLayoutEffect:p.useEffect;function fa({useFlushSync:t=!0,...n}){const s=p.useReducer(()=>({}),{})[1],a={...n,onChange:(i,l)=>{var c;t&&l?ds.flushSync(s):s(),(c=n.onChange)==null||c.call(n,i,l)}},[r]=p.useState(()=>new ua(a));return r.setOptions(a),Nt(()=>r._didMount(),[]),Nt(()=>r._willUpdate()),r}function ga(t){return fa({observeElementRect:da,observeElementOffset:xa,scrollToFn:ha,...t})}/** @@ -52,7 +52,7 @@ import{r as p,aD as ds,d as me,bd as xs,be as zt,bf as ms,bg as hs,j as e,c as R * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ba=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Ce=me("user",Ba);function La(t){t.values.forEach(n=>n.stop())}function st(t,n){[...n].reverse().forEach(a=>{const r=t.getVariant(a);r&&zt(t,r),t.variantChildren&&t.variantChildren.forEach(i=>{st(i,n)})})}function Ra(t,n){if(Array.isArray(n))return st(t,n);if(typeof n=="string")return st(t,[n]);zt(t,n)}function Ea(){const t=new Set,n={subscribe(s){return t.add(s),()=>void t.delete(s)},start(s,a){const r=[];return t.forEach(i=>{r.push(xs(i,s,{transitionOverride:a}))}),Promise.all(r)},set(s){return t.forEach(a=>{Ra(a,s)})},stop(){t.forEach(s=>{La(s)})},mount(){return()=>{n.stop()}}};return n}function za(){const t=ms(Ea);return hs(t.mount,[]),t}function Fa({"aria-label":t="Page navigation",className:n,...s}){return e.jsx("nav",{"aria-label":t,...s,className:R("flex gap-x-2",n)})}function Ia({onClick:t,disabled:n=!1,className:s,children:a="Previous"}){return e.jsx("span",{className:R("grow basis-0",s),children:e.jsxs(rt,{plain:!0,onClick:t,disabled:n,"aria-label":"Previous page",className:R("gap-1",n&&"invisible"),children:[e.jsx("svg",{className:"size-4 stroke-current",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M2.75 8H13.25M2.75 8L5.25 5.5M2.75 8L5.25 10.5",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})}),a]})})}function Aa({onClick:t,disabled:n=!1,className:s,children:a="Next"}){return e.jsx("span",{className:R("flex grow basis-0 justify-end",s),children:e.jsxs(rt,{plain:!0,onClick:t,disabled:n,"aria-label":"Next page",className:R("gap-1",n&&"invisible"),children:[a,e.jsx("svg",{className:"size-4 stroke-current",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M13.25 8L2.75 8M13.25 8L10.75 10.5M13.25 8L10.75 5.5",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})]})})}function Da({className:t,...n}){return e.jsx("span",{...n,className:R("hidden items-baseline gap-x-2 sm:flex",t)})}function Ha({page:t,current:n=!1,onClick:s,className:a,children:r}){return e.jsx(rt,{plain:!n,outline:n,onClick:()=>s==null?void 0:s(t),"aria-label":`Page ${t}`,"aria-current":n?"page":void 0,className:R("min-w-[2.25rem] before:absolute before:-inset-px before:rounded-lg",n&&"before:bg-subtle-fill",a),children:r??t})}function Oa({className:t,...n}){return e.jsx("span",{"aria-hidden":"true",...n,className:R("w-[2.25rem] select-none text-center text-sm text-fg-muted",t),children:"…"})}function $a(t,n,s=1){if(n<=7)return Array.from({length:n},(o,u)=>u+1);const a=Math.max(t-s,1),r=Math.min(t+s,n),i=a>2,l=rg+1),"gap",n]}if(i&&!l){const o=3+2*s;return[1,"gap",...Array.from({length:o},(x,g)=>n-o+g+1)]}return[1,"gap",...Array.from({length:r-a+1},(o,u)=>a+u),"gap",n]}const Pr=us(t=>({requestedHash:null,requestChannel:n=>t({requestedHash:n}),clearRequest:()=>t({requestedHash:null})}));function Ua(t){if(t.length===0)return[];const n=[];let s=0;for(;s{const l=i===t.length-1,c=a&&r.toUpperCase()===a;return e.jsxs("span",{className:"flex items-center flex-shrink-0",children:[c?e.jsx("span",{className:"px-1 py-0.5 rounded bg-sys-amber/20 text-sys-amber text-[9px] font-medium",children:"You"}):e.jsx("span",{className:"px-1 py-0.5 rounded bg-subtle-fill-hover text-fg-secondary",children:r.toUpperCase()}),!l&&e.jsx(ct,{className:"w-2.5 h-2.5 text-fg-muted mx-0.5 flex-shrink-0"})]},`${r}-${i}`)})})}const es=p.memo(qa);function ts({channelName:t,onClick:n,active:s,compact:a,className:r}){const i=t.startsWith("#")?t:`#${t}`,l=R("inline-flex items-center flex-shrink-0","font-medium",a?"px-1.5 h-4 leading-4 rounded text-[10px]":"px-2 h-5 leading-5 rounded text-xs",s?"bg-sys-blue/20 text-sys-blue":"bg-sys-blue/10 text-sys-blue",n&&!s&&"hover:bg-sys-blue/20 cursor-pointer",r);return n?e.jsx("button",{type:"button",onClick:n,className:l,children:i}):e.jsx("span",{className:l,children:i})}function Me(t){return{"--data-box-accent":ue[t]}}function ss(t){const n=t.payload_type_name||At(t.payload_type??t.type),s=t.route_type_name||Dt(t.route_type??t.route),a=Be[n]??"zinc",r=He[s]??"zinc";return{payloadType:n,routeType:s,payloadColor:a,routeColor:r}}function Ve(t){if(!t)return[];if(Array.isArray(t))return t;try{const n=JSON.parse(t);return Array.isArray(n)?n:[]}catch{return[]}}function as(t,n){if(n){const s=n(t);return{name:s.name,isCompanion:s.isCompanion,isRepeater:s.isRepeater}}return{name:null,isCompanion:!1,isRepeater:!1}}function Ka({packet:t,onClick:n,localHash:s,neighbors:a,resolveSource:r,isFlashing:i=!1,isTraceHighlighted:l,onTraceHover:c,traceTag:o,onViewTraceReport:u,dupeGroupPosition:x,isDupeGroupHovered:g=!1,onDupeGroupHover:f,dupeCount:y,getDecodedContent:m,onChannelClick:v}){const T=y?!1:Ft(t.is_duplicate),h=x!==void 0,{payloadType:N,routeType:j,payloadColor:C,routeColor:k}=ss(t),b=t.packet_origin==="tx_local",A=N==="TRACE",U=Ve(t.original_path),W=Ve(t.forwarded_path),K=W.length>0?W:U,F=t.src_hash?(t.src_hash.startsWith("0x")?t.src_hash.slice(2,6):t.src_hash.slice(0,4)).toUpperCase():null,{name:Y,isRepeater:D}=as(t,r);let E=null,O=null,$=null,J=null;if(N==="GRP_TXT"&&m){const _=m(t);_!=null&&_.decrypted&&(O=_.senderName,$=_.channelName,J=_.channelHash,_.text&&(E=_.text))}else if(N==="TXT_MSG"&&t.raw_packet)try{const _=Gt.fromHex(t.raw_packet);if(_.success&&_.packet){const ce=Qt(_.packet.payload);ce&&!ce.encrypted&&(E=ce.text)}}catch{}const M=O||(D?null:Y),H=!!M,te=!H&&D&&!!Y,se=!H&&!te&&N==="GRP_TXT"&&!E,d=t.payload_length??t.length??0;t.lbt_attempts;const Z=p.useCallback(()=>{A&&o&&u?u(o):n(t)},[A,o,u,n,t]),q=p.useCallback(()=>{A&&o&&c&&c(o),h&&f&&t.packet_hash&&f(t.packet_hash)},[A,o,c,h,f,t.packet_hash]),le=p.useCallback(()=>{c&&c(null),f&&f(null)},[c,f]),P=ue[C]||ue.zinc,z=g,ae=()=>{const _={pointerEvents:"none"};return x==="first"?{..._,borderTop:`2px solid ${P}`,borderLeft:`2px solid ${P}`,borderRight:`2px solid ${P}`,borderBottom:"none",borderRadius:"8px 8px 0 0",inset:"-2px -2px 0 -2px"}:x==="middle"?{..._,borderTop:"none",borderLeft:`2px solid ${P}`,borderRight:`2px solid ${P}`,borderBottom:"none",borderRadius:0,inset:"0 -2px"}:x==="last"?{..._,borderTop:"none",borderLeft:`2px solid ${P}`,borderRight:`2px solid ${P}`,borderBottom:`2px solid ${P}`,borderRadius:"0 0 8px 8px",inset:"0 -2px -2px -2px"}:{..._,border:`2px solid ${P}`,borderRadius:"8px",inset:"-2px"}};return e.jsxs("div",{onClick:Z,onMouseEnter:q,onMouseLeave:le,className:R("group relative cursor-pointer","hover:bg-subtle-fill",T&&!g&&"opacity-40",i&&"flash-row",b&&"bg-sys-indigo/5",l&&"bg-sys-teal/10"),children:[e.jsx("div",{className:R("absolute pointer-events-none transition-opacity duration-75",h?z?"opacity-100":"opacity-0":"opacity-0 group-hover:opacity-100"),style:ae()}),e.jsxs("div",{className:"relative flex items-center gap-2 min-[600px]:gap-3 px-2 py-2 min-[600px]:px-3 min-[600px]:py-2.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[e.jsx("div",{className:"relative flex-shrink-0",children:H?e.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center ring-1 ring-edge-subtle",style:{backgroundColor:Vt(_e(M).cleanName)},children:_e(M).emoji?e.jsx("span",{className:"text-base leading-none",children:_e(M).emoji}):e.jsx("span",{className:"text-white text-[10px] font-bold tracking-tighter",children:Wt(M)})}):te?e.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center ring-[1.5px] ring-sys-blue",children:e.jsx(de,{className:"size-5 text-sys-blue"})}):se?e.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center bg-zinc-500/20 ring-1 ring-edge-subtle",children:e.jsx(Zt,{className:"size-4 text-fg-muted"})}):e.jsx(Jt,{packet:t,variant:"avatar",size:"sm"})}),e.jsx("div",{className:"min-w-0",children:H?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"font-semibold text-[13px] text-fg-primary font-sans truncate max-w-[90px]",children:M}),F&&e.jsx("div",{className:"hidden min-[900px]:block text-[9px] text-fg-muted truncate",children:F})]}):te?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"font-semibold text-[13px] text-fg-primary font-sans truncate max-w-[90px]",children:Y}),F&&e.jsx("div",{className:"hidden min-[900px]:block text-[9px] text-fg-muted truncate",children:F})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"font-bold text-[13px] text-fg-primary font-sans truncate",children:F||"—"}),Y&&e.jsx("div",{className:"hidden min-[900px]:block text-[9px] text-fg-muted truncate max-w-[70px]",children:Y})]})})]}),e.jsxs("div",{className:"flex-1 flex items-center gap-1 min-[600px]:gap-1.5 min-[900px]:gap-2 min-w-0",children:[e.jsx("span",{className:"data-box data-box-compact data-box-outlined flex-shrink-0",style:Me(C),children:N}),b&&e.jsx("span",{className:"data-box data-box-compact data-box-outlined flex-shrink-0",style:Me("indigo"),children:"LOCAL"}),y&&y>1&&e.jsxs("span",{className:"data-box data-box-compact flex-shrink-0",children:["×",y]}),e.jsx("span",{className:"data-box data-box-compact data-box-outlined flex-shrink-0",style:Me(k),children:j}),e.jsxs("span",{className:"hidden min-[520px]:inline type-data-xs text-fg-muted flex-shrink-0",children:[d,"B"]}),e.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:E||$?e.jsxs("span",{className:"text-[11px] text-fg-secondary truncate block flex items-center gap-1",children:[$&&e.jsx(ts,{channelName:$,compact:!0,onClick:v&&J?_=>{_.stopPropagation(),v(J)}:void 0}),E&&e.jsx("span",{className:"italic truncate",children:E})]}):e.jsx(es,{path:K,localHash:s})})]}),e.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[e.jsx("span",{className:"data-box data-box-compact",children:It(t.timestamp)}),e.jsx(Oe,{rssi:t.rssi,snr:t.snr,compact:!0,showValues:!0,validated:$e(t)})]})]})]})}function Ya({packet:t,onClick:n,localHash:s,neighbors:a,resolveSource:r,isFlashing:i=!1,isTraceHighlighted:l,traceTag:c,onViewTraceReport:o,dupeGroupPosition:u,isDupeGroupHovered:x=!1,onDupeGroupHover:g,dupeCount:f,getDecodedContent:y,onChannelClick:m}){const{payloadType:v,routeType:T,payloadColor:h,routeColor:N}=ss(t),j=t.packet_origin==="tx_local",C=v==="TRACE",k=f?!1:Ft(t.is_duplicate),b=Ve(t.original_path),A=Ve(t.forwarded_path),U=A.length>0?A:b,W=t._hopCount??U.length,K=t.src_hash?(t.src_hash.startsWith("0x")?t.src_hash.slice(2,6):t.src_hash.slice(0,4)).toUpperCase():null,{name:F,isRepeater:Y}=as(t,r);let D=null,E=null,O=null,$=null;if(v==="GRP_TXT"&&y){const P=y(t);P!=null&&P.decrypted&&(E=P.senderName,O=P.channelName,$=P.channelHash,P.text&&(D=P.text))}else if(v==="TXT_MSG"&&t.raw_packet)try{const P=Gt.fromHex(t.raw_packet);if(P.success&&P.packet){const z=Qt(P.packet.payload);z&&!z.encrypted&&(D=z.text)}}catch{}const J=E||(Y?null:F),M=!!J,H=!M&&Y&&!!F,te=!M&&!H&&v==="GRP_TXT"&&!D,se=t.payload_length??t.length??0,d=t.lbt_attempts??0,Z=()=>{C&&c&&o?o(c):n(t)},q=ue[h]||ue.zinc,le=()=>{if(!u)return{opacity:0};const P=x?1:.4,z=x?"3px":"2px";return u==="first"?{backgroundColor:q,opacity:P,width:z,top:"6px",bottom:0,borderRadius:"0 9999px 0 0"}:u==="middle"?{backgroundColor:q,opacity:P,width:z,top:0,bottom:0,borderRadius:0}:u==="last"?{backgroundColor:q,opacity:P,width:z,top:0,bottom:"6px",borderRadius:"0 0 9999px 0"}:{backgroundColor:q,opacity:P,width:z,top:"6px",bottom:"6px",borderRadius:"9999px"}};return e.jsxs("div",{onClick:Z,className:R("relative pl-3 pr-2.5 py-2 cursor-pointer","active:bg-subtle-fill-hover",k&&"opacity-40",i&&"flash-row",j&&"bg-sys-indigo/5",l&&"bg-sys-teal/10"),children:[e.jsx("div",{className:"absolute left-0 transition-all",style:le()}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("div",{className:"relative flex-shrink-0 mt-0.5",children:M?e.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center ring-1 ring-edge-subtle",style:{backgroundColor:Vt(_e(J).cleanName)},children:_e(J).emoji?e.jsx("span",{className:"text-base leading-none",children:_e(J).emoji}):e.jsx("span",{className:"text-white text-[10px] font-bold tracking-tighter",children:Wt(J)})}):H?e.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center ring-[1.5px] ring-sys-blue",children:e.jsx(de,{className:"size-5 text-sys-blue"})}):te?e.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center bg-zinc-500/20 ring-1 ring-edge-subtle",children:e.jsx(Zt,{className:"size-4 text-fg-muted"})}):e.jsx(Jt,{packet:t,variant:"avatar",size:"sm"})}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[M?e.jsx("span",{className:"font-medium text-[14px] text-fg-primary tracking-tight truncate min-w-0",children:J}):H?e.jsx("span",{className:"font-medium text-[14px] text-fg-primary tracking-tight truncate min-w-0",children:F}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-semibold text-[14px] text-fg-primary tracking-tight flex-shrink-0",children:K||"—"}),F&&e.jsx("span",{className:"text-[12px] text-fg-muted truncate min-w-0",children:F})]}),e.jsx("div",{className:"flex-1"}),e.jsx("span",{className:"data-box data-box-compact data-box-outlined flex-shrink-0",style:Me(h),children:v}),j&&e.jsx("span",{className:"data-box data-box-compact data-box-outlined flex-shrink-0",style:Me("indigo"),children:"LOCAL"}),e.jsx("span",{className:"data-box data-box-compact data-box-outlined flex-shrink-0",style:Me(N),children:T}),f&&f>1&&e.jsxs("span",{className:"data-box data-box-compact flex-shrink-0",children:["×",f]}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[e.jsx("span",{className:"type-data-xs text-fg-muted w-[28px] text-right",children:t.rssi}),e.jsx(Oe,{rssi:t.rssi,compact:!0,showValues:!1,validated:$e(t)})]})]}),e.jsxs("div",{className:"flex items-center gap-1 type-data-xs text-fg-muted",children:[e.jsx("span",{className:"data-box data-box-compact flex-shrink-0",children:It(t.timestamp)}),se>0&&e.jsxs("span",{children:[se,"B"]}),d>0&&e.jsxs("span",{className:d>1?"text-sys-amber/60":void 0,children:["LBT:",d]}),t.snr!=null&&e.jsxs("span",{children:[t.snr.toFixed(0),"dB"]}),D||O?e.jsxs("span",{className:"text-[11px] text-fg-secondary truncate flex items-center gap-1 min-w-0",children:[O&&e.jsx(ts,{channelName:O,compact:!0,onClick:m&&$?P=>{P.stopPropagation(),m($)}:void 0}),D&&e.jsx("span",{className:"italic truncate",children:D})]}):W>0?e.jsx(es,{path:U,localHash:s}):null]})]})]})]})}const Xa=p.memo(Ka),Za=p.memo(Ya);function Ja(t,n,s,a,r=!1){const i=t.toUpperCase(),l=[],c=s&&Ze(i,s);c&&l.push(s);for(const y of Object.keys(n))Ze(i,y)&&l.push(y);if(r&&c&&s&&l.length===1)return{matches:l,probability:1,bestMatch:s};if(r&&c&&l.length>1){const y=l.filter(m=>m!==s);if(y.length===1)return{matches:l,probability:1,bestMatch:y[0]}}const o=l.length>0?1/l.length:0,u=[...l].sort();let x=null,g=-1;if(u.length===1)x=u[0];else if(u.length>1&&a){for(const y of u){const m=a.get(y),v=m?typeof m=="number"?m:m.combinedScore:0;v>g&&(g=v,x=y)}x||(x=u[0])}else u.length>0&&(x=u[0]);let f=o;if(l.length>1&&a&&g>0){let y=0;for(const m of l){const v=a.get(m);y+=v?typeof v=="number"?v:v.combinedScore:0}y>0&&(f=Math.min(.95,g/y))}return{matches:l,probability:f,bestMatch:x}}function en(t,n,s,a){const i=(s-t)*Math.PI/180,l=(a-n)*Math.PI/180,c=Math.sin(i/2)*Math.sin(i/2)+Math.cos(t*Math.PI/180)*Math.cos(s*Math.PI/180)*Math.sin(l/2)*Math.sin(l/2);return 6371e3*(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)))}function tn(t){return t<100?1:t<500?.9:t<1e3?.7:t<5e3?.5:t<1e4?.3:.1}const sn=p.lazy(()=>ps(()=>import("./PathMapMapLibre-DGbZd6iX.js"),__vite__mapDeps([0,1,2,3,4,5,6])));function an(t,n,s,a,r=!1,i,l,c){const o=fs(n);let u;l&&(u=gs(l,t,{position:c,isLastHop:r}).confidence);const{matches:x,probability:g}=Ja(t,o,a,i,r),f=x.length,y=[],m=t.toUpperCase(),v=s&&s.latitude!==void 0&&s.longitude!==void 0&&(s.latitude!==0||s.longitude!==0);for(const h of x){if(a&&Ze(m,a)&&h===a&&v&&s){y.push({hash:h,name:s.name||"Local Node",latitude:s.latitude,longitude:s.longitude,probability:r?1:g,isLocal:!0});continue}const N=o[h];N!=null&&N.latitude&&(N!=null&&N.longitude)&&!(N.latitude===0&&N.longitude===0)&&y.push({hash:h,name:N.node_name||N.name||"Unknown",latitude:N.latitude,longitude:N.longitude,probability:g,isLocal:!1,isDirectNeighbor:N.zero_hop===!0})}const T=y.length;if(T===1)y[0].probability=u??1;else if(T>1)if(u!==void 0&&u>0){const h=y[0];h.probability=u;const N=1-u,j=T-1;y.slice(1).forEach(C=>{C.probability=N/j})}else{let h=0;const N=y.map(j=>{if(j.isLocal)return{candidate:j,score:1};const C=i==null?void 0:i.get(j.hash);let k=.5;if(v&&s){const A=en(s.latitude,s.longitude,j.latitude,j.longitude);k=tn(A)}let b;return C?b=k*.3+C.hopConsistencyScore*.3+C.frequencyScore*.4:(b=k,j.isDirectNeighbor&&(b=Math.max(b,.8))),h+=b,{candidate:j,score:b}});if(h>0)N.forEach(({candidate:j,score:C})=>{j.probability=Math.min(.95,C/h)});else{const j=1/T;y.forEach(C=>C.probability=j)}}return{candidates:y,totalMatches:f}}function nn(t,n,s,a,r,i){if(!t||t.length===0)return{hops:[],overallConfidence:0,hasValidPath:!1};const l=t.length-1,c=t.map((x,g)=>{const f=g===l,y=t.length-g,{candidates:m,totalMatches:v}=an(x,n,s,a,f,r,i,y),T=m.length>0?Math.max(...m.map(h=>h.probability)):0;return{prefix:x,candidates:m,confidence:T,totalMatches:v}}),o=c.reduce((x,g)=>g.confidence===0?0:x*g.confidence,1),u=c.some(x=>x.candidates.length>0);return{hops:c,overallConfidence:o,hasValidPath:u}}function rn(t){return`${(t*100).toFixed(0)}%`}function ln(t){return t>=1?"text-sys-green":t>=.5?"text-sys-indigo":t>=.25?"text-signal-poor":t>0?"text-sys-red":"text-fg-muted"}function cn(t,n,s){let a;return n===0?a=s.muted:t>=1?a=s.success:t>=.5?a=s.secondary:t>=.25?a=s.poor:t>0?a=s.danger:a=s.muted,{color:a}}class on extends p.Component{constructor(n){super(n),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?e.jsxs("div",{className:"h-[200px] flex items-center justify-center text-fg-muted",children:[e.jsx(et,{className:"w-4 h-4 mr-2"}),"Map failed to load"]}):this.props.children}}function We({path:t,neighbors:n,localNode:s,localHash:a,srcHash:r,dstHash:i,neighborAffinity:l,prefixLookup:c,hubNodes:o,traceSnr:u,advertiserSource:x}){const[g,f]=p.useState(null),y=p.useMemo(()=>{if(!x)return null;const j=x.nodeType==="wardrive";return{prefix:x.prefix||"??",candidates:[{hash:x.publicKey||x.prefix||"source",name:x.name,latitude:x.latitude,longitude:x.longitude,probability:1,isLocal:!1,isWardrive:j}],confidence:1,totalMatches:1,isSource:!0}},[x]),m=p.useMemo(()=>{if(x||!r)return null;const j=De(r),C=n[r];if((C==null?void 0:C.latitude)&&(C==null?void 0:C.longitude)&&!(C.latitude===0&&C.longitude===0))return{prefix:j,candidates:[{hash:r,name:C.node_name||C.name||"Source",latitude:C.latitude,longitude:C.longitude,probability:1,isLocal:!1,isDirectNeighbor:C.zero_hop===!0}],confidence:1,totalMatches:1,isSource:!0};const b=(C==null?void 0:C.node_name)||(C==null?void 0:C.name)||r.slice(0,8);return{prefix:j,candidates:[{hash:r,name:b,latitude:0,longitude:0,probability:1,isLocal:!1}],confidence:1,totalMatches:1,isSource:!0}},[x,r,n]),v=p.useMemo(()=>{const j=i!=null&&i.startsWith("0x")?i.slice(2):i;if((!j||j==="00"||j==="0000000000000000")&&s&&a){const W=De(a),K=s.latitude!==0||s.longitude!==0;return{prefix:W,candidates:[{hash:a,name:s.name||"Local Node",latitude:K?s.latitude:0,longitude:K?s.longitude:0,probability:1,isLocal:!0}],confidence:1,totalMatches:1,isDestination:!0}}if(!i)return null;const k=De(i);if(a&&i===a&&s){const W=s.latitude!==0||s.longitude!==0;return{prefix:k,candidates:[{hash:i,name:s.name||"Local Node",latitude:W?s.latitude:0,longitude:W?s.longitude:0,probability:1,isLocal:!0}],confidence:1,totalMatches:1,isDestination:!0}}const b=n[i];if((b==null?void 0:b.latitude)&&(b==null?void 0:b.longitude)&&!(b.latitude===0&&b.longitude===0))return{prefix:k,candidates:[{hash:i,name:b.node_name||b.name||"Destination",latitude:b.latitude,longitude:b.longitude,probability:1,isLocal:!1,isDirectNeighbor:b.zero_hop===!0}],confidence:1,totalMatches:1,isDestination:!0};const U=(b==null?void 0:b.node_name)||(b==null?void 0:b.name)||i.slice(0,8);return{prefix:k,candidates:[{hash:i,name:U,latitude:0,longitude:0,probability:1,isLocal:!1}],confidence:1,totalMatches:1,isDestination:!0}},[i,n,s,a]),T=p.useMemo(()=>nn(t,n,s,a,l,c),[t,n,s,a,l,c]),h=p.useMemo(()=>{const j=[];y?j.push(y):m&&j.push(m),j.push(...T.hops),v&&j.push(v);const C=j.reduce((b,A)=>A.confidence===0?0:b*A.confidence,1),k=j.some(b=>b.candidates.some(A=>A.latitude!==0||A.longitude!==0));return{hops:j,overallConfidence:C,hasValidPath:k}},[y,m,T,v]),N=p.useMemo(()=>{const j=getComputedStyle(document.documentElement);return{success:j.getPropertyValue("--sys-green").trim()||"#39D98A",secondary:j.getPropertyValue("--sys-indigo").trim()||"#F9D26F",poor:j.getPropertyValue("--signal-poor").trim()||"#FF8A5C",danger:j.getPropertyValue("--sys-red").trim()||"#FF5C7A",muted:j.getPropertyValue("--text-muted").trim()||"#767688"}},[]);return h.hasValidPath?e.jsxs("div",{className:"h-full flex flex-col space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-fg-muted",children:"Path Confidence:"}),e.jsx("span",{className:ln(h.overallConfidence),children:rn(h.overallConfidence)}),e.jsx("button",{className:"text-fg-muted hover:text-fg-secondary transition-colors",title:"Confidence is calculated based on how many known nodes match each path prefix. Multiple matches reduce confidence due to collision probability.",children:e.jsx(Js,{className:"w-3 h-3"})})]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-sys-green"}),e.jsx("span",{className:"text-fg-muted",children:"Exact"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-sys-indigo"}),e.jsx("span",{className:"text-fg-muted",children:"Multi"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-fg-muted"}),e.jsx("span",{className:"text-fg-muted",children:"Unknown"})]})]})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:e.jsx(on,{children:e.jsx(p.Suspense,{fallback:e.jsx("div",{className:"h-full bg-elevated flex items-center justify-center text-fg-muted text-sm",children:"Loading map..."}),children:e.jsx(sn,{resolvedPath:h,localNode:s,hubNodes:o,hoveredHopIndex:g,onHoverHop:f,traceSnr:u})})})}),e.jsx("div",{className:"flex flex-wrap items-center gap-1.5",children:h.hops.map((j,C)=>{var W,K,F;const k=j.isSource===!0,b=j.isDestination===!0,A=g===C;let U;return k?U=`Source: ${((W=j.candidates[0])==null?void 0:W.name)||"Unknown"}`:b?U=`Destination: ${((K=j.candidates[0])==null?void 0:K.name)||"Unknown"}`:j.totalMatches===0?U="No matching nodes found":j.totalMatches===1?U=`Exact match: ${((F=j.candidates[0])==null?void 0:F.name)||"Unknown"}`:U=`${j.totalMatches} possible matches (${(j.confidence*100).toFixed(0)}% confidence)`,e.jsxs("div",{className:R("flex items-center gap-1 px-1.5 py-0.5 rounded type-data-xs cursor-pointer transition-all",A?"bg-sys-blue/20 ring-1 ring-sys-blue/50":"bg-elevated hover:bg-subtle",k&&"border border-sys-green/30",b&&"border border-sys-blue/30"),title:U,onMouseEnter:()=>f(C),onMouseLeave:()=>f(null),children:[k&&e.jsx("span",{className:"text-sys-green text-[8px] mr-0.5",children:"SRC"}),b&&e.jsx("span",{className:"text-sys-blue text-[8px] mr-0.5",children:"DST"}),e.jsx("span",{style:cn(j.confidence,j.totalMatches,N),children:j.prefix}),!k&&!b&&j.totalMatches>1&&e.jsxs("span",{className:"text-fg-muted",children:["×",j.totalMatches]}),!k&&!b&&j.totalMatches===0&&e.jsx("span",{className:"text-fg-muted",children:"?"})]},C)})})]}):e.jsxs("div",{className:"flex items-center justify-center text-fg-muted text-xs py-4",children:[e.jsx(Ue,{className:"w-3.5 h-3.5 mr-1.5 opacity-50"}),"No location data available for path nodes"]})}const Ye=16;function Ge(t){return t.match(/.{1,2}/g)||[]}function je(t){return t!==null&&t.startsWith("payload:")}const Te={hexRestOpacity:15,cardRestBg:"color-mix(in srgb, var(--elevated) 60%, var(--body))",cardRestShadow:` + */const Ba=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Ce=me("user",Ba);function La(t){t.values.forEach(n=>n.stop())}function st(t,n){[...n].reverse().forEach(a=>{const r=t.getVariant(a);r&&zt(t,r),t.variantChildren&&t.variantChildren.forEach(i=>{st(i,n)})})}function Ra(t,n){if(Array.isArray(n))return st(t,n);if(typeof n=="string")return st(t,[n]);zt(t,n)}function Ea(){const t=new Set,n={subscribe(s){return t.add(s),()=>void t.delete(s)},start(s,a){const r=[];return t.forEach(i=>{r.push(xs(i,s,{transitionOverride:a}))}),Promise.all(r)},set(s){return t.forEach(a=>{Ra(a,s)})},stop(){t.forEach(s=>{La(s)})},mount(){return()=>{n.stop()}}};return n}function za(){const t=ms(Ea);return hs(t.mount,[]),t}function Fa({"aria-label":t="Page navigation",className:n,...s}){return e.jsx("nav",{"aria-label":t,...s,className:R("flex gap-x-2",n)})}function Ia({onClick:t,disabled:n=!1,className:s,children:a="Previous"}){return e.jsx("span",{className:R("grow basis-0",s),children:e.jsxs(rt,{plain:!0,onClick:t,disabled:n,"aria-label":"Previous page",className:R("gap-1",n&&"invisible"),children:[e.jsx("svg",{className:"size-4 stroke-current",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M2.75 8H13.25M2.75 8L5.25 5.5M2.75 8L5.25 10.5",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})}),a]})})}function Aa({onClick:t,disabled:n=!1,className:s,children:a="Next"}){return e.jsx("span",{className:R("flex grow basis-0 justify-end",s),children:e.jsxs(rt,{plain:!0,onClick:t,disabled:n,"aria-label":"Next page",className:R("gap-1",n&&"invisible"),children:[a,e.jsx("svg",{className:"size-4 stroke-current",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M13.25 8L2.75 8M13.25 8L10.75 10.5M13.25 8L10.75 5.5",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})]})})}function Da({className:t,...n}){return e.jsx("span",{...n,className:R("hidden items-baseline gap-x-2 sm:flex",t)})}function Ha({page:t,current:n=!1,onClick:s,className:a,children:r}){return e.jsx(rt,{plain:!n,outline:n,onClick:()=>s==null?void 0:s(t),"aria-label":`Page ${t}`,"aria-current":n?"page":void 0,className:R("min-w-[2.25rem] before:absolute before:-inset-px before:rounded-lg",n&&"before:bg-subtle-fill",a),children:r??t})}function Oa({className:t,...n}){return e.jsx("span",{"aria-hidden":"true",...n,className:R("w-[2.25rem] select-none text-center text-sm text-fg-muted",t),children:"…"})}function $a(t,n,s=1){if(n<=7)return Array.from({length:n},(o,u)=>u+1);const a=Math.max(t-s,1),r=Math.min(t+s,n),i=a>2,l=rg+1),"gap",n]}if(i&&!l){const o=3+2*s;return[1,"gap",...Array.from({length:o},(x,g)=>n-o+g+1)]}return[1,"gap",...Array.from({length:r-a+1},(o,u)=>a+u),"gap",n]}const Pr=us(t=>({requestedHash:null,requestChannel:n=>t({requestedHash:n}),clearRequest:()=>t({requestedHash:null})}));function Ua(t){if(t.length===0)return[];const n=[];let s=0;for(;s{const l=i===t.length-1,c=a&&r.toUpperCase()===a;return e.jsxs("span",{className:"flex items-center flex-shrink-0",children:[c?e.jsx("span",{className:"px-1 py-0.5 rounded bg-sys-amber/20 text-sys-amber text-[9px] font-medium",children:"You"}):e.jsx("span",{className:"px-1 py-0.5 rounded bg-subtle-fill-hover text-fg-secondary",children:r.toUpperCase()}),!l&&e.jsx(ct,{className:"w-2.5 h-2.5 text-fg-muted mx-0.5 flex-shrink-0"})]},`${r}-${i}`)})})}const es=p.memo(qa);function ts({channelName:t,onClick:n,active:s,compact:a,className:r}){const i=t.startsWith("#")?t:`#${t}`,l=R("inline-flex items-center flex-shrink-0","font-medium",a?"px-1.5 h-4 leading-4 rounded text-[10px]":"px-2 h-5 leading-5 rounded text-xs",s?"bg-sys-blue/20 text-sys-blue":"bg-sys-blue/10 text-sys-blue",n&&!s&&"hover:bg-sys-blue/20 cursor-pointer",r);return n?e.jsx("button",{type:"button",onClick:n,className:l,children:i}):e.jsx("span",{className:l,children:i})}function Me(t){return{"--data-box-accent":ue[t]}}function ss(t){const n=t.payload_type_name||At(t.payload_type??t.type),s=t.route_type_name||Dt(t.route_type??t.route),a=Be[n]??"zinc",r=He[s]??"zinc";return{payloadType:n,routeType:s,payloadColor:a,routeColor:r}}function Ve(t){if(!t)return[];if(Array.isArray(t))return t;try{const n=JSON.parse(t);return Array.isArray(n)?n:[]}catch{return[]}}function as(t,n){if(n){const s=n(t);return{name:s.name,isCompanion:s.isCompanion,isRepeater:s.isRepeater}}return{name:null,isCompanion:!1,isRepeater:!1}}function Ka({packet:t,onClick:n,localHash:s,neighbors:a,resolveSource:r,isFlashing:i=!1,isTraceHighlighted:l,onTraceHover:c,traceTag:o,onViewTraceReport:u,dupeGroupPosition:x,isDupeGroupHovered:g=!1,onDupeGroupHover:f,dupeCount:y,getDecodedContent:m,onChannelClick:v}){const T=y?!1:Ft(t.is_duplicate),h=x!==void 0,{payloadType:N,routeType:j,payloadColor:C,routeColor:k}=ss(t),b=t.packet_origin==="tx_local",A=N==="TRACE",U=Ve(t.original_path),W=Ve(t.forwarded_path),K=W.length>0?W:U,F=t.src_hash?(t.src_hash.startsWith("0x")?t.src_hash.slice(2,6):t.src_hash.slice(0,4)).toUpperCase():null,{name:Y,isRepeater:D}=as(t,r);let E=null,O=null,$=null,J=null;if(N==="GRP_TXT"&&m){const _=m(t);_!=null&&_.decrypted&&(O=_.senderName,$=_.channelName,J=_.channelHash,_.text&&(E=_.text))}else if(N==="TXT_MSG"&&t.raw_packet)try{const _=Gt.fromHex(t.raw_packet);if(_.success&&_.packet){const ce=Qt(_.packet.payload);ce&&!ce.encrypted&&(E=ce.text)}}catch{}const M=O||(D?null:Y),H=!!M,te=!H&&D&&!!Y,se=!H&&!te&&N==="GRP_TXT"&&!E,d=t.payload_length??t.length??0;t.lbt_attempts;const Z=p.useCallback(()=>{A&&o&&u?u(o):n(t)},[A,o,u,n,t]),q=p.useCallback(()=>{A&&o&&c&&c(o),h&&f&&t.packet_hash&&f(t.packet_hash)},[A,o,c,h,f,t.packet_hash]),le=p.useCallback(()=>{c&&c(null),f&&f(null)},[c,f]),P=ue[C]||ue.zinc,z=g,ae=()=>{const _={pointerEvents:"none"};return x==="first"?{..._,borderTop:`2px solid ${P}`,borderLeft:`2px solid ${P}`,borderRight:`2px solid ${P}`,borderBottom:"none",borderRadius:"8px 8px 0 0",inset:"-2px -2px 0 -2px"}:x==="middle"?{..._,borderTop:"none",borderLeft:`2px solid ${P}`,borderRight:`2px solid ${P}`,borderBottom:"none",borderRadius:0,inset:"0 -2px"}:x==="last"?{..._,borderTop:"none",borderLeft:`2px solid ${P}`,borderRight:`2px solid ${P}`,borderBottom:`2px solid ${P}`,borderRadius:"0 0 8px 8px",inset:"0 -2px -2px -2px"}:{..._,border:`2px solid ${P}`,borderRadius:"8px",inset:"-2px"}};return e.jsxs("div",{onClick:Z,onMouseEnter:q,onMouseLeave:le,className:R("group relative cursor-pointer","hover:bg-subtle-fill",T&&!g&&"opacity-40",i&&"flash-row",b&&"bg-sys-indigo/5",l&&"bg-sys-teal/10"),children:[e.jsx("div",{className:R("absolute pointer-events-none transition-opacity duration-75",h?z?"opacity-100":"opacity-0":"opacity-0 group-hover:opacity-100"),style:ae()}),e.jsxs("div",{className:"relative flex items-center gap-2 min-[600px]:gap-3 px-2 py-2 min-[600px]:px-3 min-[600px]:py-2.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[e.jsx("div",{className:"relative flex-shrink-0",children:H?e.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center ring-1 ring-edge-subtle",style:{backgroundColor:Vt(_e(M).cleanName)},children:_e(M).emoji?e.jsx("span",{className:"text-base leading-none",children:_e(M).emoji}):e.jsx("span",{className:"text-white text-[10px] font-bold tracking-tighter",children:Wt(M)})}):te?e.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center ring-[1.5px] ring-sys-blue",children:e.jsx(de,{className:"size-5 text-sys-blue"})}):se?e.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center bg-zinc-500/20 ring-1 ring-edge-subtle",children:e.jsx(Zt,{className:"size-4 text-fg-muted"})}):e.jsx(Jt,{packet:t,variant:"avatar",size:"sm"})}),e.jsx("div",{className:"min-w-0",children:H?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"font-semibold text-[13px] text-fg-primary font-sans truncate max-w-[90px]",children:M}),F&&e.jsx("div",{className:"hidden min-[900px]:block text-[9px] text-fg-muted truncate",children:F})]}):te?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"font-semibold text-[13px] text-fg-primary font-sans truncate max-w-[90px]",children:Y}),F&&e.jsx("div",{className:"hidden min-[900px]:block text-[9px] text-fg-muted truncate",children:F})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"font-bold text-[13px] text-fg-primary font-sans truncate",children:F||"—"}),Y&&e.jsx("div",{className:"hidden min-[900px]:block text-[9px] text-fg-muted truncate max-w-[70px]",children:Y})]})})]}),e.jsxs("div",{className:"flex-1 flex items-center gap-1 min-[600px]:gap-1.5 min-[900px]:gap-2 min-w-0",children:[e.jsx("span",{className:"data-box data-box-compact data-box-outlined flex-shrink-0",style:Me(C),children:N}),b&&e.jsx("span",{className:"data-box data-box-compact data-box-outlined flex-shrink-0",style:Me("indigo"),children:"LOCAL"}),y&&y>1&&e.jsxs("span",{className:"data-box data-box-compact flex-shrink-0",children:["×",y]}),e.jsx("span",{className:"data-box data-box-compact data-box-outlined flex-shrink-0",style:Me(k),children:j}),e.jsxs("span",{className:"hidden min-[520px]:inline type-data-xs text-fg-muted flex-shrink-0",children:[d,"B"]}),e.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:E||$?e.jsxs("span",{className:"text-[11px] text-fg-secondary truncate block flex items-center gap-1",children:[$&&e.jsx(ts,{channelName:$,compact:!0,onClick:v&&J?_=>{_.stopPropagation(),v(J)}:void 0}),E&&e.jsx("span",{className:"italic truncate",children:E})]}):e.jsx(es,{path:K,localHash:s})})]}),e.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[e.jsx("span",{className:"data-box data-box-compact",children:It(t.timestamp)}),e.jsx(Oe,{rssi:t.rssi,snr:t.snr,compact:!0,showValues:!0,validated:$e(t)})]})]})]})}function Ya({packet:t,onClick:n,localHash:s,neighbors:a,resolveSource:r,isFlashing:i=!1,isTraceHighlighted:l,traceTag:c,onViewTraceReport:o,dupeGroupPosition:u,isDupeGroupHovered:x=!1,onDupeGroupHover:g,dupeCount:f,getDecodedContent:y,onChannelClick:m}){const{payloadType:v,routeType:T,payloadColor:h,routeColor:N}=ss(t),j=t.packet_origin==="tx_local",C=v==="TRACE",k=f?!1:Ft(t.is_duplicate),b=Ve(t.original_path),A=Ve(t.forwarded_path),U=A.length>0?A:b,W=t._hopCount??U.length,K=t.src_hash?(t.src_hash.startsWith("0x")?t.src_hash.slice(2,6):t.src_hash.slice(0,4)).toUpperCase():null,{name:F,isRepeater:Y}=as(t,r);let D=null,E=null,O=null,$=null;if(v==="GRP_TXT"&&y){const P=y(t);P!=null&&P.decrypted&&(E=P.senderName,O=P.channelName,$=P.channelHash,P.text&&(D=P.text))}else if(v==="TXT_MSG"&&t.raw_packet)try{const P=Gt.fromHex(t.raw_packet);if(P.success&&P.packet){const z=Qt(P.packet.payload);z&&!z.encrypted&&(D=z.text)}}catch{}const J=E||(Y?null:F),M=!!J,H=!M&&Y&&!!F,te=!M&&!H&&v==="GRP_TXT"&&!D,se=t.payload_length??t.length??0,d=t.lbt_attempts??0,Z=()=>{C&&c&&o?o(c):n(t)},q=ue[h]||ue.zinc,le=()=>{if(!u)return{opacity:0};const P=x?1:.4,z=x?"3px":"2px";return u==="first"?{backgroundColor:q,opacity:P,width:z,top:"6px",bottom:0,borderRadius:"0 9999px 0 0"}:u==="middle"?{backgroundColor:q,opacity:P,width:z,top:0,bottom:0,borderRadius:0}:u==="last"?{backgroundColor:q,opacity:P,width:z,top:0,bottom:"6px",borderRadius:"0 0 9999px 0"}:{backgroundColor:q,opacity:P,width:z,top:"6px",bottom:"6px",borderRadius:"9999px"}};return e.jsxs("div",{onClick:Z,className:R("relative pl-3 pr-2.5 py-2 cursor-pointer","active:bg-subtle-fill-hover",k&&"opacity-40",i&&"flash-row",j&&"bg-sys-indigo/5",l&&"bg-sys-teal/10"),children:[e.jsx("div",{className:"absolute left-0 transition-all",style:le()}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("div",{className:"relative flex-shrink-0 mt-0.5",children:M?e.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center ring-1 ring-edge-subtle",style:{backgroundColor:Vt(_e(J).cleanName)},children:_e(J).emoji?e.jsx("span",{className:"text-base leading-none",children:_e(J).emoji}):e.jsx("span",{className:"text-white text-[10px] font-bold tracking-tighter",children:Wt(J)})}):H?e.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center ring-[1.5px] ring-sys-blue",children:e.jsx(de,{className:"size-5 text-sys-blue"})}):te?e.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center bg-zinc-500/20 ring-1 ring-edge-subtle",children:e.jsx(Zt,{className:"size-4 text-fg-muted"})}):e.jsx(Jt,{packet:t,variant:"avatar",size:"sm"})}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[M?e.jsx("span",{className:"font-medium text-[14px] text-fg-primary tracking-tight truncate min-w-0",children:J}):H?e.jsx("span",{className:"font-medium text-[14px] text-fg-primary tracking-tight truncate min-w-0",children:F}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-semibold text-[14px] text-fg-primary tracking-tight flex-shrink-0",children:K||"—"}),F&&e.jsx("span",{className:"text-[12px] text-fg-muted truncate min-w-0",children:F})]}),e.jsx("div",{className:"flex-1"}),e.jsx("span",{className:"data-box data-box-compact data-box-outlined flex-shrink-0",style:Me(h),children:v}),j&&e.jsx("span",{className:"data-box data-box-compact data-box-outlined flex-shrink-0",style:Me("indigo"),children:"LOCAL"}),e.jsx("span",{className:"data-box data-box-compact data-box-outlined flex-shrink-0",style:Me(N),children:T}),f&&f>1&&e.jsxs("span",{className:"data-box data-box-compact flex-shrink-0",children:["×",f]}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[e.jsx("span",{className:"type-data-xs text-fg-muted w-[28px] text-right",children:t.rssi}),e.jsx(Oe,{rssi:t.rssi,compact:!0,showValues:!1,validated:$e(t)})]})]}),e.jsxs("div",{className:"flex items-center gap-1 type-data-xs text-fg-muted",children:[e.jsx("span",{className:"data-box data-box-compact flex-shrink-0",children:It(t.timestamp)}),se>0&&e.jsxs("span",{children:[se,"B"]}),d>0&&e.jsxs("span",{className:d>1?"text-sys-amber/60":void 0,children:["LBT:",d]}),t.snr!=null&&e.jsxs("span",{children:[t.snr.toFixed(0),"dB"]}),D||O?e.jsxs("span",{className:"text-[11px] text-fg-secondary truncate flex items-center gap-1 min-w-0",children:[O&&e.jsx(ts,{channelName:O,compact:!0,onClick:m&&$?P=>{P.stopPropagation(),m($)}:void 0}),D&&e.jsx("span",{className:"italic truncate",children:D})]}):W>0?e.jsx(es,{path:U,localHash:s}):null]})]})]})]})}const Xa=p.memo(Ka),Za=p.memo(Ya);function Ja(t,n,s,a,r=!1){const i=t.toUpperCase(),l=[],c=s&&Ze(i,s);c&&l.push(s);for(const y of Object.keys(n))Ze(i,y)&&l.push(y);if(r&&c&&s&&l.length===1)return{matches:l,probability:1,bestMatch:s};if(r&&c&&l.length>1){const y=l.filter(m=>m!==s);if(y.length===1)return{matches:l,probability:1,bestMatch:y[0]}}const o=l.length>0?1/l.length:0,u=[...l].sort();let x=null,g=-1;if(u.length===1)x=u[0];else if(u.length>1&&a){for(const y of u){const m=a.get(y),v=m?typeof m=="number"?m:m.combinedScore:0;v>g&&(g=v,x=y)}x||(x=u[0])}else u.length>0&&(x=u[0]);let f=o;if(l.length>1&&a&&g>0){let y=0;for(const m of l){const v=a.get(m);y+=v?typeof v=="number"?v:v.combinedScore:0}y>0&&(f=Math.min(.95,g/y))}return{matches:l,probability:f,bestMatch:x}}function en(t,n,s,a){const i=(s-t)*Math.PI/180,l=(a-n)*Math.PI/180,c=Math.sin(i/2)*Math.sin(i/2)+Math.cos(t*Math.PI/180)*Math.cos(s*Math.PI/180)*Math.sin(l/2)*Math.sin(l/2);return 6371e3*(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)))}function tn(t){return t<100?1:t<500?.9:t<1e3?.7:t<5e3?.5:t<1e4?.3:.1}const sn=p.lazy(()=>ps(()=>import("./PathMapMapLibre-CKiQC9cf.js"),__vite__mapDeps([0,1,2,3,4,5,6])));function an(t,n,s,a,r=!1,i,l,c){const o=fs(n);let u;l&&(u=gs(l,t,{position:c,isLastHop:r}).confidence);const{matches:x,probability:g}=Ja(t,o,a,i,r),f=x.length,y=[],m=t.toUpperCase(),v=s&&s.latitude!==void 0&&s.longitude!==void 0&&(s.latitude!==0||s.longitude!==0);for(const h of x){if(a&&Ze(m,a)&&h===a&&v&&s){y.push({hash:h,name:s.name||"Local Node",latitude:s.latitude,longitude:s.longitude,probability:r?1:g,isLocal:!0});continue}const N=o[h];N!=null&&N.latitude&&(N!=null&&N.longitude)&&!(N.latitude===0&&N.longitude===0)&&y.push({hash:h,name:N.node_name||N.name||"Unknown",latitude:N.latitude,longitude:N.longitude,probability:g,isLocal:!1,isDirectNeighbor:N.zero_hop===!0})}const T=y.length;if(T===1)y[0].probability=u??1;else if(T>1)if(u!==void 0&&u>0){const h=y[0];h.probability=u;const N=1-u,j=T-1;y.slice(1).forEach(C=>{C.probability=N/j})}else{let h=0;const N=y.map(j=>{if(j.isLocal)return{candidate:j,score:1};const C=i==null?void 0:i.get(j.hash);let k=.5;if(v&&s){const A=en(s.latitude,s.longitude,j.latitude,j.longitude);k=tn(A)}let b;return C?b=k*.3+C.hopConsistencyScore*.3+C.frequencyScore*.4:(b=k,j.isDirectNeighbor&&(b=Math.max(b,.8))),h+=b,{candidate:j,score:b}});if(h>0)N.forEach(({candidate:j,score:C})=>{j.probability=Math.min(.95,C/h)});else{const j=1/T;y.forEach(C=>C.probability=j)}}return{candidates:y,totalMatches:f}}function nn(t,n,s,a,r,i){if(!t||t.length===0)return{hops:[],overallConfidence:0,hasValidPath:!1};const l=t.length-1,c=t.map((x,g)=>{const f=g===l,y=t.length-g,{candidates:m,totalMatches:v}=an(x,n,s,a,f,r,i,y),T=m.length>0?Math.max(...m.map(h=>h.probability)):0;return{prefix:x,candidates:m,confidence:T,totalMatches:v}}),o=c.reduce((x,g)=>g.confidence===0?0:x*g.confidence,1),u=c.some(x=>x.candidates.length>0);return{hops:c,overallConfidence:o,hasValidPath:u}}function rn(t){return`${(t*100).toFixed(0)}%`}function ln(t){return t>=1?"text-sys-green":t>=.5?"text-sys-indigo":t>=.25?"text-signal-poor":t>0?"text-sys-red":"text-fg-muted"}function cn(t,n,s){let a;return n===0?a=s.muted:t>=1?a=s.success:t>=.5?a=s.secondary:t>=.25?a=s.poor:t>0?a=s.danger:a=s.muted,{color:a}}class on extends p.Component{constructor(n){super(n),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?e.jsxs("div",{className:"h-[200px] flex items-center justify-center text-fg-muted",children:[e.jsx(et,{className:"w-4 h-4 mr-2"}),"Map failed to load"]}):this.props.children}}function We({path:t,neighbors:n,localNode:s,localHash:a,srcHash:r,dstHash:i,neighborAffinity:l,prefixLookup:c,hubNodes:o,traceSnr:u,advertiserSource:x}){const[g,f]=p.useState(null),y=p.useMemo(()=>{if(!x)return null;const j=x.nodeType==="wardrive";return{prefix:x.prefix||"??",candidates:[{hash:x.publicKey||x.prefix||"source",name:x.name,latitude:x.latitude,longitude:x.longitude,probability:1,isLocal:!1,isWardrive:j}],confidence:1,totalMatches:1,isSource:!0}},[x]),m=p.useMemo(()=>{if(x||!r)return null;const j=De(r),C=n[r];if((C==null?void 0:C.latitude)&&(C==null?void 0:C.longitude)&&!(C.latitude===0&&C.longitude===0))return{prefix:j,candidates:[{hash:r,name:C.node_name||C.name||"Source",latitude:C.latitude,longitude:C.longitude,probability:1,isLocal:!1,isDirectNeighbor:C.zero_hop===!0}],confidence:1,totalMatches:1,isSource:!0};const b=(C==null?void 0:C.node_name)||(C==null?void 0:C.name)||r.slice(0,8);return{prefix:j,candidates:[{hash:r,name:b,latitude:0,longitude:0,probability:1,isLocal:!1}],confidence:1,totalMatches:1,isSource:!0}},[x,r,n]),v=p.useMemo(()=>{const j=i!=null&&i.startsWith("0x")?i.slice(2):i;if((!j||j==="00"||j==="0000000000000000")&&s&&a){const W=De(a),K=s.latitude!==0||s.longitude!==0;return{prefix:W,candidates:[{hash:a,name:s.name||"Local Node",latitude:K?s.latitude:0,longitude:K?s.longitude:0,probability:1,isLocal:!0}],confidence:1,totalMatches:1,isDestination:!0}}if(!i)return null;const k=De(i);if(a&&i===a&&s){const W=s.latitude!==0||s.longitude!==0;return{prefix:k,candidates:[{hash:i,name:s.name||"Local Node",latitude:W?s.latitude:0,longitude:W?s.longitude:0,probability:1,isLocal:!0}],confidence:1,totalMatches:1,isDestination:!0}}const b=n[i];if((b==null?void 0:b.latitude)&&(b==null?void 0:b.longitude)&&!(b.latitude===0&&b.longitude===0))return{prefix:k,candidates:[{hash:i,name:b.node_name||b.name||"Destination",latitude:b.latitude,longitude:b.longitude,probability:1,isLocal:!1,isDirectNeighbor:b.zero_hop===!0}],confidence:1,totalMatches:1,isDestination:!0};const U=(b==null?void 0:b.node_name)||(b==null?void 0:b.name)||i.slice(0,8);return{prefix:k,candidates:[{hash:i,name:U,latitude:0,longitude:0,probability:1,isLocal:!1}],confidence:1,totalMatches:1,isDestination:!0}},[i,n,s,a]),T=p.useMemo(()=>nn(t,n,s,a,l,c),[t,n,s,a,l,c]),h=p.useMemo(()=>{const j=[];y?j.push(y):m&&j.push(m),j.push(...T.hops),v&&j.push(v);const C=j.reduce((b,A)=>A.confidence===0?0:b*A.confidence,1),k=j.some(b=>b.candidates.some(A=>A.latitude!==0||A.longitude!==0));return{hops:j,overallConfidence:C,hasValidPath:k}},[y,m,T,v]),N=p.useMemo(()=>{const j=getComputedStyle(document.documentElement);return{success:j.getPropertyValue("--sys-green").trim()||"#39D98A",secondary:j.getPropertyValue("--sys-indigo").trim()||"#F9D26F",poor:j.getPropertyValue("--signal-poor").trim()||"#FF8A5C",danger:j.getPropertyValue("--sys-red").trim()||"#FF5C7A",muted:j.getPropertyValue("--text-muted").trim()||"#767688"}},[]);return h.hasValidPath?e.jsxs("div",{className:"h-full flex flex-col space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-fg-muted",children:"Path Confidence:"}),e.jsx("span",{className:ln(h.overallConfidence),children:rn(h.overallConfidence)}),e.jsx("button",{className:"text-fg-muted hover:text-fg-secondary transition-colors",title:"Confidence is calculated based on how many known nodes match each path prefix. Multiple matches reduce confidence due to collision probability.",children:e.jsx(Js,{className:"w-3 h-3"})})]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-sys-green"}),e.jsx("span",{className:"text-fg-muted",children:"Exact"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-sys-indigo"}),e.jsx("span",{className:"text-fg-muted",children:"Multi"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-fg-muted"}),e.jsx("span",{className:"text-fg-muted",children:"Unknown"})]})]})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:e.jsx(on,{children:e.jsx(p.Suspense,{fallback:e.jsx("div",{className:"h-full bg-elevated flex items-center justify-center text-fg-muted text-sm",children:"Loading map..."}),children:e.jsx(sn,{resolvedPath:h,localNode:s,hubNodes:o,hoveredHopIndex:g,onHoverHop:f,traceSnr:u})})})}),e.jsx("div",{className:"flex flex-wrap items-center gap-1.5",children:h.hops.map((j,C)=>{var W,K,F;const k=j.isSource===!0,b=j.isDestination===!0,A=g===C;let U;return k?U=`Source: ${((W=j.candidates[0])==null?void 0:W.name)||"Unknown"}`:b?U=`Destination: ${((K=j.candidates[0])==null?void 0:K.name)||"Unknown"}`:j.totalMatches===0?U="No matching nodes found":j.totalMatches===1?U=`Exact match: ${((F=j.candidates[0])==null?void 0:F.name)||"Unknown"}`:U=`${j.totalMatches} possible matches (${(j.confidence*100).toFixed(0)}% confidence)`,e.jsxs("div",{className:R("flex items-center gap-1 px-1.5 py-0.5 rounded type-data-xs cursor-pointer transition-all",A?"bg-sys-blue/20 ring-1 ring-sys-blue/50":"bg-elevated hover:bg-subtle",k&&"border border-sys-green/30",b&&"border border-sys-blue/30"),title:U,onMouseEnter:()=>f(C),onMouseLeave:()=>f(null),children:[k&&e.jsx("span",{className:"text-sys-green text-[8px] mr-0.5",children:"SRC"}),b&&e.jsx("span",{className:"text-sys-blue text-[8px] mr-0.5",children:"DST"}),e.jsx("span",{style:cn(j.confidence,j.totalMatches,N),children:j.prefix}),!k&&!b&&j.totalMatches>1&&e.jsxs("span",{className:"text-fg-muted",children:["×",j.totalMatches]}),!k&&!b&&j.totalMatches===0&&e.jsx("span",{className:"text-fg-muted",children:"?"})]},C)})})]}):e.jsxs("div",{className:"flex items-center justify-center text-fg-muted text-xs py-4",children:[e.jsx(Ue,{className:"w-3.5 h-3.5 mr-1.5 opacity-50"}),"No location data available for path nodes"]})}const Ye=16;function Ge(t){return t.match(/.{1,2}/g)||[]}function je(t){return t!==null&&t.startsWith("payload:")}const Te={hexRestOpacity:15,cardRestBg:"color-mix(in srgb, var(--elevated) 60%, var(--body))",cardRestShadow:` inset 0 0 0 1px color-mix(in srgb, var(--fg-primary) 6%, transparent), inset 0 1px 0 color-mix(in srgb, white 3%, transparent), 0 1px 2px color-mix(in srgb, black 5%, transparent) diff --git a/frontend/dist/assets/PacketObservatory-CQnn0Xjt.js b/frontend/dist/assets/PacketObservatory-BMTHp2HY.js similarity index 99% rename from frontend/dist/assets/PacketObservatory-CQnn0Xjt.js rename to frontend/dist/assets/PacketObservatory-BMTHp2HY.js index f090835d..e51c2151 100644 --- a/frontend/dist/assets/PacketObservatory-CQnn0Xjt.js +++ b/frontend/dist/assets/PacketObservatory-BMTHp2HY.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/usePipelineStore-7L_PlMjP.js","assets/index-CLIbpHvY.js","assets/node-types-CFhZT1Jq.js","assets/index-DUfCykEc.css"])))=>i.map(i=>d[i]); -import{bK as O,r as T,e4 as Fe,e5 as Ee,e6 as Oe,e7 as ze,bl as Be,e8 as Ie,e9 as Ge,ea as Ke,eb as Ve,bk as Ne,bo as ue,ec as qe,ed as we,bq as pe,j as e,ee as G,ef as K,eg as V,dE as xe,eh as Ue,q as M,bw as We,bH as Ce,bQ as Ye,ei as Ze,ej as Xe,ek as Qe,el as Je,em as et,en as J,eo as tt,ep as st,eq as nt,er as he,a3 as me,$ as Se,bh as rt,es as at,y as lt,E as ot,et as ct,b9 as it,c_ as dt}from"./index-CLIbpHvY.js";import{usePipelineStore as Y}from"./usePipelineStore-7L_PlMjP.js";import{e as Te,p as ut,a as pt,A as I,S as q,c as se,f as E,K as i,H as A,B as xt,R as F,T as d,P as re,h as ht,i as S,C as _e,s as ee,j as mt}from"./primitives-CZFN5gGO.js";import{m as ke,i as gt}from"./node-types-CFhZT1Jq.js";import"./payload-decoders-BsVy7I3_.js";function ft(t){const s=t.type??t.payload_type,r=t.duplicates??[],c=t.is_duplicate,a=r.length;let n=null,l=null;if(a>0){const x=[t.rssi,...r.map(g=>g.rssi).filter(g=>g!=null)],m=[t.snr,...r.map(g=>g.snr).filter(g=>g!=null)];x.length>1&&(n=[Math.min(...x),Math.max(...x)]),m.length>1&&(l=[Math.min(...m),Math.max(...m)])}const o=s===O.TRACE;return{isDuplicate:c,dupeCount:a,rssiRange:n,snrRange:l,hashIncludesPathLen:o}}function bt(t,s,r){const c={traceTag:null,siblingCount:0,isLocallyOriginated:!1,method:"none",confidence:"none",inferredSrc:null,inferredName:null,evidence:[],thisPathLen:0,minPathLen:0,firstHopPrefix:null};let a=t._traceTag;if(!a&&t.payload&&(a=Te(t.payload)),!a)return{...c,evidence:["no traceTag — cannot correlate"]};const n=s.get(a)??[],l=N=>N.path_length!=null?N.path_length:Array.isArray(N.original_path)?N.original_path.length:0,o=l(t),x=n.length>0?Math.min(...n.map(l)):o,m=t.payload?t.payload.slice(18):"",g=m.length>=2?m.slice(0,2).toUpperCase():null,u=[];if(u.push(`traceTag: ${a}`),u.push(`siblings: ${n.length} observation${n.length!==1?"s":""}`),t.packet_origin==="tx_local")return u.push("packet_origin = tx_local → we initiated this trace"),{traceTag:a,siblingCount:n.length,isLocallyOriginated:!0,method:"tx_local",confidence:"certain",inferredSrc:"LOCAL",inferredName:null,evidence:u,thisPathLen:o,minPathLen:x,firstHopPrefix:g};const v=n.find(N=>N.packet_origin==="tx_local");if(v)return u.push(`sibling (hash ${v.packet_hash}) has packet_origin = tx_local`),{traceTag:a,siblingCount:n.length,isLocallyOriginated:!0,method:"tx_local",confidence:"certain",inferredSrc:"LOCAL",inferredName:null,evidence:u,thisPathLen:o,minPathLen:x,firstHopPrefix:g};if(u.push(`this observation: path_len=${o}, min across siblings: ${x}`),g){if(u.push(`first hop in target path: ${g}`),o===0)return u.push("path_len = 0 → heard directly from initiator (no SNR appended yet)"),u.push("initiator is a direct RF neighbor"),{traceTag:a,siblingCount:n.length,isLocallyOriginated:!1,method:"min_path_len",confidence:"speculative",inferredSrc:null,inferredName:null,evidence:[...u,"initiator is within direct RF range (zero forwarding hops)"],thisPathLen:o,minPathLen:x,firstHopPrefix:g};const f=Object.entries(r).filter(([k])=>k.replace(/^0x/i,"").slice(0,2).toUpperCase()===g);if(f.length===1){const[k,$]=f[0],h=$.name||$.node_name||null;return u.push(`first hop ${g} → unique neighbor: ${h??k}`),u.push("initiator is whoever sent TO this first hop"),{traceTag:a,siblingCount:n.length,isLocallyOriginated:!1,method:"first_hop_neighbor",confidence:"likely",inferredSrc:g,inferredName:h,evidence:u,thisPathLen:o,minPathLen:x,firstHopPrefix:g}}else f.length>1?u.push(`first hop ${g} matches ${f.length} neighbors (ambiguous)`):u.push(`first hop ${g} is not a known neighbor`)}return u.push("insufficient data to identify initiator"),{traceTag:a,siblingCount:n.length,isLocallyOriginated:!1,method:"none",confidence:"none",inferredSrc:null,inferredName:null,evidence:u,thisPathLen:o,minPathLen:x,firstHopPrefix:g}}let ne=null,ce=null;typeof window<"u"&&setTimeout(()=>{ue(()=>import("./usePipelineStore-7L_PlMjP.js"),__vite__mapDeps([0,1,2,3])).then(t=>{ne=t}),ue(()=>import("./index-CLIbpHvY.js").then(t=>t.g1),__vite__mapDeps([1,3])).then(t=>{ce=t})},0);const He={advertSender:null,advertNodeType:null,advertFlags:null,advertHasLocation:null,advertHasName:null,advertName:null,advertLatitude:null,advertLongitude:null,channelHash:null,byteLength:void 0,hopCount:0,isZeroHop:!0,preComputed:!1};function yt(t,s){const r=t.type??t.payload_type,c=Ne(r),a=Be(t.route),n=r===O.ADVERT,l=r===O.TRACE,o=r===O.PATH,x=r===O.GRP_TXT||r===O.GRP_DATA,m=Ie(t.snr,t.rssi),g=(m==null?void 0:m.finalGrade)??"critical",u=Ge(t.route),v=Ke(t.route),N=Ve(t.route),f=t.route==null?"unknown":u?"flood":v?"direct":"unknown",k=N?`transport-${f}`:f,$=!!s.advertSender;let h="none";$?h="pubkey":x?h="encrypted":t.src_hash&&(h="prefix");const y=gt(r),p=s.advertNodeType!=null?ke(s.advertNodeType):"unknown",_=y!=="unknown"?y:p,H=t.packet_origin??"rx",C=Math.floor(Date.now()/1e3)-t.timestamp,D=C<10?"live":C<300?"recent":C<3600?"warm":C<86400?"stale":"historic",L=t.path_length??(Array.isArray(t.original_path)?t.original_path.length:void 0),P=Array.isArray(t.original_path)&&t.original_path.length>0,R=L??0,b=s.byteLength??(t.raw_packet?Math.floor(t.raw_packet.length/2):0),w=ft(t);return{pType:r,payloadTypeName:c,routeTypeName:a,isAdvert:n,isTrace:l,isPath:o,isGrp:x,signalClass:g,routeClass:k,isFlood:u,isDirect:v,hasTransport:N,senderTier:h,hasPubkey:$,inferredType:y,advertType:p,effectiveType:_,origin:H,age:D,pathLen:L,pathAvail:P,pathHopCount:R,byteLen:b,dupeAnalysis:w}}function jt(t){var f,k,$,h,y,p;const s=pt(t);if(!s||s.pathHashes.length===0)return null;const{pathHashes:r,snrValues:c}=s;if(r.length<2||!ne||!ce)return null;const a=ne.usePipelineStore.getState().srcHashResolverMap,n=ne.usePipelineStore.getState().neighborContext,l=(n==null?void 0:n.hashToName)??new Map,o=ce.useStore.getState().stats,x=(o==null?void 0:o.neighbors)??{},m=o==null?void 0:o.local_hash,g=(k=(f=o==null?void 0:o.config)==null?void 0:f.repeater)==null?void 0:k.latitude,u=(h=($=o==null?void 0:o.config)==null?void 0:$.repeater)==null?void 0:h.longitude,v=Object.keys(x).length>0?qe([],x,m,g,u):null,N=[];for(let _=0;_0?[r[_-1].toUpperCase()]:[]],P=ge(H,_,L,a,v),R=[H,..._+20?N:null}function ge(t,s,r,c,a){if(s===0){const l=c==null?void 0:c.get(t);if(l)return{hash:l,confidence:.8};if(a){const o=pe(a,t,{position:s,adjacentPrefixes:r});if(o.hash)return{hash:o.hash,confidence:o.confidence}}}else{if(a){const o=pe(a,t,{position:s,adjacentPrefixes:r});if(o.hash)return{hash:o.hash,confidence:o.confidence}}const l=c==null?void 0:c.get(t);if(l)return{hash:l,confidence:.6}}return{hash:null,confidence:0}}function vt(t){var l;const s=t.raw_packet;if(!s||s.length<2)return null;const r=s.replace(/\s/g,""),c=Math.floor(r.length/2),a=((l=r.match(/.{1,2}/g))==null?void 0:l.join(" "))??"";let n="";for(let o=0;o=32&&x<=126?String.fromCharCode(x):"·"}return{hexBytes:a,utf8:n,byteCount:c}}function Nt(t){const s=new Map;let r=0,c="";for(const a of t){if((a.type??a.payload_type)!==O.TRACE)continue;r++,c=a.packet_hash;const l=a._traceTag??(a.payload?Te(a.payload):null);if(!l)continue;let o=s.get(l);o||(o=[],s.set(l,o)),o.push(a)}return{index:s,fingerprint:`${r}:${c}`}}function wt(t,s,r){const c=T.useRef({parse:0,decode:0,enrich:0,traceIndex:0,total:0}),a=T.useMemo(()=>t?vt(t):null,[t]),n=T.useMemo(()=>{if(!s||s.length<4)return c.current.parse=0,c.current.decode=0,null;const h=performance.now(),y=ut(s),p=performance.now()-h;return y?(c.current.parse=p,c.current.decode=0,{protocolPacket:y.packet,display:{headerFields:y.headerFields,transportCodesHex:y.transportCodesHex,pathLengthHex:y.pathLengthHex,pathDataHex:y.pathDataHex,payloadHex:y.payloadHex,payloadByteOffset:y.payloadStartByte,pathByteOffset:y.pathByteOffset,pathLenByteOffset:y.pathLenByteOffset},decoded:y.decoded,error:null}):(c.current.parse=p,c.current.decode=0,{protocolPacket:null,display:null,decoded:null,error:"Packet.fromHex() returned failure"})},[s]),l=T.useMemo(()=>{if(!t)return c.current.enrich=0,He;const h=performance.now();if(t._advertSender!==void 0)return c.current.enrich=performance.now()-h,{advertSender:t._advertSender??null,advertNodeType:t._advertNodeType??null,advertFlags:t._advertFlags??null,advertHasLocation:t._advertHasLocation??null,advertHasName:t._advertHasName??null,advertName:t._advertName??null,advertLatitude:t._advertLatitude??null,advertLongitude:t._advertLongitude??null,channelHash:t._channelHash??null,byteLength:t._byteLength,hopCount:t._hopCount??0,isZeroHop:t._isZeroHop??!0,preComputed:!0};const y=t.type??t.payload_type,p=Fe(s,y),_=Ee(s,y),H=Oe(s,t),C=ze(t);return c.current.enrich=performance.now()-h,{...p,channelHash:_,byteLength:H,...C,preComputed:!1}},[t,s]),o=T.useRef({fingerprint:"",index:new Map}),x=T.useMemo(()=>{const h=performance.now(),{index:y,fingerprint:p}=Nt(r);return c.current.traceIndex=performance.now()-h,p===o.current.fingerprint?o.current.index:(o.current={fingerprint:p,index:y},y)},[r]),m=T.useMemo(()=>{const h=c.current;return{parse:h.parse,decode:h.decode,enrich:h.enrich,traceIndex:h.traceIndex,total:h.parse+h.decode+h.enrich+h.traceIndex}},[n,l,x]);if(!t)return null;const g=s?n?n.error:"rawHex too short":"No raw_packet (warm-tier)",u=(n==null?void 0:n.protocolPacket)??null,v=u?u.payloadVersion:null,N=v===0,f=v===1,k=yt(t,l);let $=null;return k.isTrace&&($=jt(t)),{wire:a,display:(n==null?void 0:n.display)??null,parseError:g,protocolPacket:u,decoded:(n==null?void 0:n.decoded)??null,payloadVersion:v,isV1:N,isV2:f,enrichment:l,traceTagIndex:x,analysis:k,traceHopDetail:$,timing:m}}function ae({options:t,nextFn:s}){var n;const r=t.find(l=>l.active),c=(r==null?void 0:r.color)??"green",a=((n=I[c])==null?void 0:n.stem)??"bg-edge-subtle";return e.jsxs("div",{className:"flex flex-col items-start py-1 gap-0 px-2",children:[e.jsx("div",{className:`w-px h-2 ml-4 ${a}`}),e.jsxs("div",{className:"border border-dashed border-edge-subtle rounded-md overflow-hidden w-full",children:[t.map((l,o)=>{const x=I[l.color??"green"]??I.green;return e.jsxs("div",{className:`flex items-center gap-1.5 px-2 py-px font-mono text-[10px] leading-relaxed transition-opacity ${l.active?x.row:"opacity-25"}`,children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${l.active?x.dot:"border border-zinc-500/40"}`}),e.jsx("span",{className:`w-16 shrink-0 font-medium ${l.active?"text-fg-primary":"text-fg-muted"}`,children:l.label}),l.detail&&e.jsx("span",{className:l.active?"text-fg-primary/70":"text-fg-muted",children:l.detail})]},o)}),s&&e.jsx("div",{className:"flex items-center px-2 py-0.5 border-t border-edge-subtle",children:e.jsxs("span",{className:"text-[10px] text-fg-muted font-mono",children:["→ ",s]})})]}),e.jsx("div",{className:`w-px h-2 ml-4 ${a}`})]})}function Ct({tokens:t,nextFn:s}){var n;const r=t.find(l=>l.active),c=(r==null?void 0:r.color)??"green",a=((n=I[c])==null?void 0:n.stem)??"bg-edge-subtle";return e.jsxs("div",{className:"flex flex-col items-start py-1 gap-0 px-2",children:[e.jsx("div",{className:`w-px h-2 ml-4 ${a}`}),e.jsxs("div",{className:"border border-dashed border-edge-subtle rounded-md overflow-hidden w-full",children:[t.map((l,o)=>{const x=I[l.color??"green"]??I.green;return e.jsxs("div",{className:`flex items-center gap-1 px-2 py-px font-mono text-[10px] leading-relaxed transition-opacity ${l.active?x.row:"opacity-25"}`,children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${l.active?x.dot:"border border-zinc-500/40"}`}),e.jsx("span",{className:"text-fg-muted shrink-0",children:l.fn}),e.jsxs("span",{className:l.active?"text-fg-primary":"text-fg-muted",children:["(",l.value??"",")"]})]},o)}),s&&e.jsx("div",{className:"flex items-center px-2 py-0.5 border-t border-edge-subtle",children:e.jsxs("span",{className:"text-[10px] text-fg-muted font-mono",children:["→ ",s]})})]}),e.jsx("div",{className:`w-px h-2 ml-4 ${a}`})]})}const St={0:"border-l-sys-green",1:"border-l-sys-blue",2:"border-l-sys-teal",3:"border-l-sys-purple"};function le({stage:t,name:s,fn:r,verdict:c,timeMs:a,skipped:n,skipReason:l,children:o}){const x=St[t]??"";return e.jsx(e.Fragment,{children:e.jsx(G,{defaultOpen:!n,children:e.jsxs("div",{className:`surface-base rounded-lg border border-edge-subtle overflow-hidden border-l-2 ${x}`,children:[e.jsxs(K,{className:"px-3 py-2 w-full",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("span",{className:"font-mono text-xs font-bold text-sys-blue shrink-0",children:t}),e.jsx("span",{className:"font-mono text-xs font-medium text-fg-primary truncate",children:s}),r&&!c&&e.jsx("span",{className:"font-mono text-[11px] text-fg-muted truncate hidden sm:inline",children:r}),c&&e.jsx("span",{className:"font-mono text-[11px] text-fg-muted/70 truncate hidden sm:inline",children:c})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[n&&e.jsx("span",{className:"font-mono text-[10px] px-1.5 py-0.5 rounded bg-zinc-500/20 text-fg-muted",children:"N/A"}),a!=null&&!n&&e.jsx("span",{className:"font-mono text-[10px] px-1.5 py-0.5 rounded bg-sys-green/15 text-sys-green",children:a<1?`${(a*1e3).toFixed(0)}µs`:`${a.toFixed(2)}ms`})]})]}),e.jsx(V,{children:e.jsx("div",{className:"px-3 pb-3 font-mono text-xs",children:n?e.jsx("p",{className:"text-fg-muted italic",children:l??"Not applicable for this packet type"}):o})})]})})})}function Tt(t,s){return s?"manual":t._stripped?"bulk-tier":Ue.isConnected()?"ws-push":"rest-poll"}const _t={connected:"green",degraded:"amber",offline:"red"};function kt({packet:t,isSynthetic:s}){const r=xe(g=>g.wsState),c=xe(g=>g.health),a=Tt(t,s),l=!!t._stripped?"WARM":"HOT",o=[{label:"ws-push",detail:"wsConnected && onPacket()",active:a==="ws-push",color:"green"},{label:"rest-poll",detail:"!wsConnected, 3s interval",active:a==="rest-poll",color:"amber"},{label:"catchup",detail:"wsReconnected, delta > 50",active:a==="catchup",color:"amber"},{label:"bulk-tier",detail:"user extends time range → gzip",active:a==="bulk-tier",color:"blue"},{label:"manual",detail:"hex input — no transport",active:a==="manual",color:"zinc"}],x=[{fn:"transport",value:a,group:"transport",color:a==="ws-push"?"green":a==="bulk-tier"?"blue":"amber"},{fn:"tier",value:l,group:"transport",color:"blue"},{fn:"wsState",value:r,group:"transport",color:r==="connected"?"green":"amber"},{fn:"health",value:c,group:"transport",color:_t[c]}],m=s?"manual hex input":`${a} (${c})`;return e.jsx(le,{stage:0,name:"TRANSPORT",fn:"websocketService / useStore.startPolling",verdict:m,children:s?e.jsx("p",{className:"text-fg-muted italic",children:"Manual hex input — no transport context"}):e.jsx(q,{prefix:"transport",children:e.jsxs("div",{className:"space-y-0",children:[e.jsx(ae,{options:o,nextFn:"ingest()"}),e.jsx(se,{tokens:x})]})})})}function U({start:t,end:s}){const r=s!=null&&s!==t?`[${t}..${s}]`:`[${t}]`;return e.jsx("span",{className:"text-fg-muted text-[9px] font-mono mr-1 select-none",children:r})}const Ht={advert:"decodeAdvert()",ack:"decodeAck()",path:"decodePath()",trace:"decodeTraceWithSnr()",txt_msg:"decodeTextMessage()",grp_txt:"decodeGroupText()",grp_data:"decodeGroupData()",multipart:"decodeMultipart()",control:"decodeControl()",req:"decodeRequest()",response:"decodeResponse()",anon_req:"decodeAnonReq()",generic:"decodeGeneric()"};function $t({rawHex:t,display:s,protocolPacket:r,parseError:c,parseTimeMs:a,payloadVersion:n,isV1:l,isV2:o}){return e.jsx("dl",{className:"space-y-0.5",children:s&&r&&t?e.jsxs(e.Fragment,{children:[e.jsx(E,{title:"A. Parse — Packet.fromHex()"}),a>0&&e.jsx("div",{className:"flex justify-end",children:e.jsx("span",{className:"font-mono text-[10px] px-1.5 py-0.5 rounded bg-sys-green/15 text-sys-green",children:a<1?`${(a*1e3).toFixed(0)}µs`:`${a.toFixed(2)}ms`})}),e.jsxs(i,{label:"header byte",children:[e.jsx(U,{start:0}),e.jsx(A,{value:t.slice(0,2)})," ",e.jsx(xt,{value:parseInt(t.slice(0,2),16)})]}),s.headerFields.map(x=>e.jsx(i,{label:` ${x.field}`,children:e.jsx(F,{raw:e.jsxs("span",{className:"text-[10px]",children:["bits[",x.bits,"] = ",x.binary]}),children:e.jsx("span",{className:"inline-block border border-edge-subtle rounded px-2 py-0.5 font-mono text-[11px] text-sys-amber",children:x.value})})},x.field)),e.jsx(i,{label:" version",children:n!=null?e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(d,{fn:"payloadVer",value:`${n}`,color:"amber"}),e.jsx(M,{color:l?"green":o?"blue":"zinc",children:l?"v1":o?"v2":`v${n}`}),l&&e.jsx("span",{className:"text-fg-muted text-[10px]",children:"1-byte hashes, 2-byte MAC"}),o&&e.jsx("span",{className:"text-sys-blue text-[10px]",children:"2-byte hashes, 4-byte MAC (speculative)"})]}):e.jsx("span",{className:"text-fg-muted",children:"unknown"})}),e.jsx(E,{title:"Wire Framing"}),e.jsx(i,{label:"transportCodes",children:s.transportCodesHex?e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(U,{start:1,end:4}),e.jsx(d,{fn:"transport",value:s.transportCodesHex,color:"amber"})]}):e.jsx("span",{className:"text-fg-muted",children:"N/A (non-transport route)"})}),e.jsx(i,{label:"pathLen",children:e.jsx(F,{raw:e.jsxs(e.Fragment,{children:[e.jsx(U,{start:s.pathLenByteOffset}),e.jsx(A,{value:s.pathLengthHex})]}),children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(U,{start:s.pathLenByteOffset}),e.jsx(d,{fn:"pathLen",value:`${r.pathLen} hop${r.pathLen!==1?"s":""}`,color:"amber"})]})})}),e.jsx(i,{label:"path",children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.pathLen>0&&e.jsx(U,{start:s.pathByteOffset,end:s.pathByteOffset+r.pathLen-1}),e.jsx(re,{hops:r.pathHexArray,hexPrefix:s.pathDataHex||void 0})]})}),e.jsx(i,{label:"payloadLen",children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(U,{start:s.payloadByteOffset,end:s.payloadByteOffset+s.payloadHex.length/2-1}),e.jsx(d,{fn:"payloadLen",value:`${s.payloadHex.length/2} bytes`,color:"amber"})]})}),e.jsx(i,{label:"payloadHex",children:e.jsx("span",{className:"inline-block border border-edge-subtle rounded px-2 py-0.5 font-mono text-[11px] text-sys-amber break-all",children:s.payloadHex})})]}):e.jsxs(e.Fragment,{children:[e.jsx(E,{title:"A. Parse"}),e.jsxs(i,{label:"result",children:[e.jsx("span",{className:"inline-block border border-edge-subtle rounded px-2 py-0.5 font-mono text-[11px] text-sys-amber",children:"Skipped"}),e.jsx("span",{className:"ml-1 text-fg-muted",children:c??"No raw_packet (warm-tier)"})]})]})})}function Dt({decoded:t,packet:s}){if(!t)return e.jsxs(e.Fragment,{children:[e.jsx(E,{title:"B. Decode"}),e.jsx("p",{className:"text-fg-muted italic text-[10px]",children:"No decoded payload"})]});const r=Ht[t.type]??`decode${t.type}()`;return e.jsxs(e.Fragment,{children:[e.jsx(E,{title:"B. Decode — decodePayload()"}),e.jsx(q,{prefix:"decodePayload",children:e.jsxs("dl",{className:"space-y-0.5",children:[e.jsx(i,{label:"dispatched",children:r}),e.jsx(E,{}),e.jsx(Lt,{decoded:t,packet:s})]})})]})}function Lt({decoded:t,packet:s}){var r;switch(t.type){case"advert":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"publicKey",children:e.jsx(F,{raw:e.jsx("span",{className:"text-[10px] break-all",children:t.publicKey}),children:e.jsx(d,{fn:"publicKey",value:t.publicKey,color:"green"})})}),e.jsx(i,{label:"timestamp",children:e.jsx(d,{fn:"timestamp",value:String(t.timestamp),color:"green"})}),e.jsx(i,{label:"flags",children:e.jsx(F,{raw:e.jsx(A,{value:t.flags}),children:e.jsx(d,{fn:"flags",value:t.flagsDescription,color:"green"})})}),e.jsx(i,{label:"nodeType",children:e.jsx(d,{fn:"nodeType",value:t.nodeType,color:"green"})}),t.latitude!=null&&e.jsx(i,{label:"latitude",children:e.jsx(d,{fn:"lat",value:t.latitude.toFixed(6),color:"green"})}),t.longitude!=null&&e.jsx(i,{label:"longitude",children:e.jsx(d,{fn:"lon",value:t.longitude.toFixed(6),color:"green"})}),t.name&&e.jsx(i,{label:"name",children:e.jsx(d,{fn:"name",value:t.name,color:"green"})})]});case"ack":return e.jsx(i,{label:"crc",children:e.jsx(F,{raw:e.jsx("span",{className:"text-[10px]",children:t.crc}),children:e.jsx(d,{fn:"crc",value:t.crc,color:"green"})})});case"trace":{const c=s!=null&&s.src_hash?s.src_hash.replace(/^0x/i,"").slice(0,2).toUpperCase():null;return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"traceTag",children:e.jsx(d,{fn:"traceTag",value:t.traceTag,color:"green"})}),e.jsx(i,{label:"authCode",children:e.jsx(d,{fn:"authCode",value:String(t.authCode),color:"green"})}),e.jsx(i,{label:"flags",children:e.jsx(A,{value:t.flags})}),e.jsx(i,{label:"target path",children:t.pathHashes.length>0?e.jsx(re,{hops:t.pathHashes.map(a=>a.toUpperCase()),color:"green"}):e.jsx("span",{className:"text-fg-muted italic",children:"∅ empty"})}),e.jsx(i,{label:"complete",children:t.isComplete?e.jsxs("span",{className:"text-sys-green",children:["✓ all ",t.pathHashes.length," hops reported SNR"]}):e.jsxs("span",{className:"text-sys-amber",children:["✗ ",t.snrValues.length,"/",t.pathHashes.length," hops reported"]})}),e.jsx(E,{}),e.jsxs("div",{children:[e.jsx("p",{className:"text-fg-muted mb-1 text-[10px]",children:"Directional Edge SNR — per-hop link quality"}),t.snrValues.length===0?e.jsx("p",{className:"text-fg-muted italic text-[11px] ml-2",children:"No SNR values in path field"}):e.jsx("div",{className:"space-y-0.5 ml-2",children:t.snrValues.map((a,n)=>{var g,u,v,N,f;const l=((g=t.pathHashes[n])==null?void 0:g.toUpperCase())??"??",o=n===0?c??"SRC":((u=t.pathHashes[n-1])==null?void 0:u.toUpperCase())??"??",x=(f=(N=(v=Ye.getState().stats)==null?void 0:v.config)==null?void 0:N.radio)==null?void 0:f.spreading_factor,m=we(a,x);return e.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-mono",children:[e.jsx("span",{className:"text-fg-muted w-3 text-right",children:n}),e.jsx("span",{className:"text-fg-primary",children:o}),e.jsx("span",{className:"text-fg-muted",children:"→"}),e.jsx("span",{className:"text-fg-primary",children:l}),e.jsx("span",{className:"text-fg-muted",children:"@"}),e.jsxs("span",{className:"font-bold text-sys-green",children:[a>0?"+":"",a.toFixed(1)," dB"]}),e.jsx(M,{color:"green",children:m})]},n)})})]})]})}case"path":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"pathLength",children:e.jsx(d,{fn:"pathLength",value:String(t.pathLength),color:"green"})}),e.jsx(i,{label:"path",children:t.path&&t.path.length>0?e.jsx(re,{hops:t.path.map(c=>c.toUpperCase()),color:"green"}):e.jsx("span",{className:"text-fg-muted italic",children:"∅ empty"})}),t.extraType!=null&&e.jsx(i,{label:"extraType",children:e.jsx(d,{fn:"extraType",value:t.extraTypeName??String(t.extraType),color:"purple"})}),t.extraData&&e.jsxs(i,{label:"extraData",children:[e.jsx("span",{className:"break-all text-[10px] font-mono",children:t.extraData}),e.jsxs("span",{className:"text-fg-muted ml-1",children:["(",t.extraData.length/2,"B)"]})]})]});case"txt_msg":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"destHash",children:e.jsx(F,{raw:e.jsx(A,{value:t.destHash}),children:e.jsx(d,{fn:"destHash",value:t.destHash,color:"green"})})}),e.jsx(i,{label:"srcHash",children:e.jsx(F,{raw:e.jsx(A,{value:t.srcHash}),children:e.jsx(d,{fn:"srcHash",value:t.srcHash,color:"green"})})}),e.jsx(i,{label:"cipherMac",children:e.jsx(d,{fn:"cipherMac",value:t.cipherMac,color:"purple"})}),e.jsx(i,{label:"timestamp",children:e.jsx(d,{fn:"timestamp",value:String(t.timestamp),color:"green"})}),e.jsx(i,{label:"text",children:e.jsx(d,{fn:"text",value:t.text,color:"green"})}),e.jsx(i,{label:"encrypted",children:e.jsx(d,{fn:"encrypted",value:String(t.encrypted),color:"green"})})]});case"grp_txt":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"channelHash",children:e.jsx(A,{value:t.channelHash})}),t.channelName&&e.jsx(i,{label:"channelName",children:e.jsx(d,{fn:"channel",value:t.channelName,color:"green"})}),e.jsx(i,{label:"decrypted",children:e.jsx(d,{fn:"decrypted",value:String(t.decrypted),color:"green"})}),t.text&&e.jsx(i,{label:"text",children:e.jsx(d,{fn:"text",value:t.text,color:"green"})}),t.senderName&&e.jsx(i,{label:"senderName",children:e.jsx(d,{fn:"sender",value:t.senderName,color:"green"})}),t.macCorrupted&&e.jsx(i,{label:"macCorrupted",children:e.jsx(d,{fn:"macCorrupted",value:"true",color:"green"})})]});case"grp_data":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"channelHash",children:e.jsx(A,{value:t.channelHash})}),e.jsx(i,{label:"dataLength",children:t.dataLength}),e.jsx(i,{label:"decrypted",children:String(t.decrypted)})]});case"multipart":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"messageId",children:t.messageId}),e.jsxs(i,{label:"part",children:[t.partNumber+1," / ",t.totalParts]})]});case"control":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"controlType",children:e.jsx(F,{raw:e.jsx(A,{value:t.controlType}),children:e.jsx(d,{fn:"controlType",value:t.subtypeName,color:"green"})})}),e.jsx(i,{label:"subtype",children:e.jsx(d,{fn:"subtype",value:`0x${t.subtype.toString(16).padStart(2,"0")}`,color:"green"})}),t.nodeTypeName&&e.jsxs(i,{label:"nodeType",children:[e.jsx(d,{fn:"nodeType",value:t.nodeTypeName,color:"green"}),e.jsxs("span",{className:"text-fg-muted text-[10px] ml-1",children:["(flags & 0x0F = 0x",(r=t.nodeType)==null?void 0:r.toString(16).padStart(2,"0"),")"]})]}),t.snrDb!=null&&e.jsxs(i,{label:"snr",children:[e.jsxs("span",{className:"font-bold text-sys-green",children:[t.snrDb>0?"+":"",t.snrDb.toFixed(1)," dB"]}),e.jsx(M,{color:"green",children:t.snrDb>=5?"strong":t.snrDb>=0?"fair":"weak"})]}),t.tag&&e.jsx(i,{label:"tag",children:e.jsx(d,{fn:"tag",value:t.tag,color:"green"})}),t.publicKey&&e.jsxs(i,{label:"publicKey",children:[e.jsx("span",{className:"break-all text-[10px] font-mono text-sys-green",children:t.publicKey}),e.jsx(M,{color:t.publicKeyFull?"green":"amber",children:t.publicKeyFull?"32B full":`${t.publicKey.length/2}B prefix`})]}),t.typeFilter!=null&&e.jsx(i,{label:"typeFilter",children:e.jsx(F,{raw:e.jsx(A,{value:t.typeFilter}),children:e.jsx(d,{fn:"typeFilter",value:t.typeFilterDescription??"none",color:"green"})})}),t.prefixOnly!=null&&e.jsx(i,{label:"prefixOnly",children:e.jsx(d,{fn:"prefixOnly",value:String(t.prefixOnly),color:"green"})}),t.since!=null&&e.jsx(i,{label:"since",children:e.jsx(d,{fn:"since",value:t.since===0?"all (0)":String(t.since),color:"green"})}),!t.nodeTypeName&&t.typeFilter==null&&t.dataLength>0&&e.jsxs(i,{label:"data",children:[e.jsx("span",{className:"break-all text-[10px] font-mono",children:t.dataHex}),e.jsxs("span",{className:"text-fg-muted ml-1",children:["(",t.dataLength,"B)"]})]})]});case"req":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"destHash",children:e.jsx(F,{raw:e.jsx(A,{value:t.destHash}),children:e.jsx(d,{fn:"destHash",value:t.destHash,color:"green"})})}),e.jsx(i,{label:"srcHash",children:e.jsx(F,{raw:e.jsx(A,{value:t.srcHash}),children:e.jsx(d,{fn:"srcHash",value:t.srcHash,color:"green"})})}),e.jsx(i,{label:"cipherMac",children:e.jsx(d,{fn:"cipherMac",value:t.cipherMac,color:"purple"})}),e.jsxs(i,{label:"ciphertext",children:[e.jsx("span",{className:"break-all text-[10px] font-mono",children:t.ciphertextHex}),e.jsxs("span",{className:"text-fg-muted ml-1",children:["(",t.ciphertextLength,"B)"]})]})]});case"response":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"destHash",children:e.jsx(F,{raw:e.jsx(A,{value:t.destHash}),children:e.jsx(d,{fn:"destHash",value:t.destHash,color:"green"})})}),e.jsx(i,{label:"srcHash",children:e.jsx(F,{raw:e.jsx(A,{value:t.srcHash}),children:e.jsx(d,{fn:"srcHash",value:t.srcHash,color:"green"})})}),e.jsx(i,{label:"cipherMac",children:e.jsx(d,{fn:"cipherMac",value:t.cipherMac,color:"purple"})}),e.jsxs(i,{label:"ciphertext",children:[e.jsx("span",{className:"break-all text-[10px] font-mono",children:t.ciphertextHex}),e.jsxs("span",{className:"text-fg-muted ml-1",children:["(",t.ciphertextLength,"B)"]})]})]});case"anon_req":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"destHash",children:e.jsx(F,{raw:e.jsx(A,{value:t.destHash}),children:e.jsx(d,{fn:"destHash",value:t.destHash,color:"green"})})}),e.jsx(i,{label:"senderPubKey",children:e.jsx("span",{className:"break-all text-[10px] font-mono text-sys-green",children:t.senderPublicKey})}),e.jsx(i,{label:"cipherMac",children:e.jsx(d,{fn:"cipherMac",value:t.cipherMac,color:"purple"})}),e.jsxs(i,{label:"ciphertext",children:[e.jsx("span",{className:"break-all text-[10px] font-mono",children:t.ciphertextHex}),e.jsxs("span",{className:"text-fg-muted ml-1",children:["(",t.ciphertextLength,"B)"]})]})]});case"generic":return e.jsxs(e.Fragment,{children:[e.jsxs(i,{label:"payloadType",children:[e.jsx(ht,{value:t.payloadType})," (",t.payloadTypeName,")"]}),e.jsx(i,{label:"length",children:t.length}),e.jsx(i,{label:"rawHex",children:e.jsx("span",{className:"break-all",children:t.rawHex})})]});default:return e.jsx("p",{className:"text-fg-muted",children:"Unknown decoded type"})}}function Pt({protocolPacket:t,packetHash:s}){const r=t==null?void 0:t.payloadType,c=r===Ze||r===Xe,a=T.useMemo(()=>{if(!c||!t)return null;const p=t.payload;return p.length<4?null:{channelHash:p[0],mac:p.slice(1,3),ciphertext:p.slice(3)}},[t,c]),[n,l]=T.useState("pending"),[o,x]=T.useState([]),[m,g]=T.useState(0);T.useEffect(()=>{if(!a){l(null);return}let p=!1;return(async()=>{const H=performance.now(),C=await Qe(a.channelHash,a.mac,a.ciphertext);p||(l(C),g(performance.now()-H));const D=await Je(a.channelHash);p||x(D)})(),()=>{p=!0}},[a]);const[u,v]=T.useState(""),[N,f]=T.useState(null),[k,$]=T.useState(!1),h=T.useCallback(async()=>{if(!(!a||!u.trim())){$(!0);try{const p=await We(u.trim(),a.channelHash,a.mac,a.ciphertext);if(p.success){const _=new TextDecoder("utf-8",{fatal:!1}).decode(p.result.plaintext.slice(5));f({success:!0,text:_})}else f({success:!1,error:p.error})}catch(p){f({success:!1,error:String(p)})}finally{$(!1)}}},[a,u]),y=Ce(s);return!c||!a?null:e.jsxs(e.Fragment,{children:[e.jsx(E,{title:"C. Decrypt — tryDecryptGroupMessage()"}),m>0&&e.jsx("div",{className:"flex justify-end",children:e.jsx("span",{className:"font-mono text-[10px] px-1.5 py-0.5 rounded bg-sys-green/15 text-sys-green",children:m<1?`${(m*1e3).toFixed(0)}µs`:`${m.toFixed(2)}ms`})}),e.jsx(q,{prefix:"tryDecryptGroupMessage",children:e.jsxs("dl",{className:"space-y-0.5",children:[e.jsx(i,{label:"channelHash",children:e.jsx(d,{fn:"channelHash",value:`0x${a.channelHash.toString(16).toUpperCase().padStart(2,"0")}`,color:"teal"})}),e.jsx(i,{label:"mac",children:e.jsx(d,{fn:"mac",value:Array.from(a.mac).map(p=>p.toString(16).padStart(2,"0")).join(""),color:"teal"})}),e.jsx(i,{label:"cipherLen",children:e.jsx(d,{fn:"cipherLen",value:`${a.ciphertext.length}B`,color:"teal"})}),e.jsx(i,{label:"candidates",children:e.jsx(d,{fn:"candidates",value:o.length>0?`${o.length} names`:"0",color:o.length>0?"teal":"zinc"})}),o.length>0&&e.jsxs("details",{className:"mt-1",children:[e.jsx("summary",{className:"text-fg-muted cursor-pointer hover:text-fg-primary text-[10px]",children:"show candidate names"}),e.jsx("div",{className:"mt-1 text-[10px] text-fg-muted break-all max-h-24 overflow-y-auto",children:o.join(", ")})]}),e.jsx(E,{}),e.jsxs("div",{children:[e.jsx("p",{className:"text-fg-muted mb-1",children:"Result:"}),n==="pending"?e.jsx("p",{className:"text-fg-muted italic",children:"decrypting…"}):n?e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"channel",children:e.jsx(d,{fn:"channel",value:n.channelName,color:"teal"})}),e.jsx(i,{label:"plaintext",children:e.jsx(d,{fn:"plaintext",value:new TextDecoder("utf-8",{fatal:!1}).decode(n.plaintext.slice(5)).trim()||"(empty)",color:"teal"})}),e.jsx(i,{label:"macValid",children:e.jsx(d,{fn:"macValid",value:n.macCorrupted?"false":"true",color:"teal"})})]}):e.jsxs(i,{label:"decrypt",children:[e.jsx(d,{fn:"decrypt",value:"failed",color:"red"}),e.jsx("span",{className:"text-fg-muted ml-1",children:"channel not in known list"})]})]}),e.jsx(E,{}),e.jsxs("div",{children:[e.jsx("p",{className:"text-fg-muted mb-1",children:"testChannelName() — manual test:"}),e.jsxs("div",{className:"flex gap-1.5 items-center",children:[e.jsx("input",{type:"text",value:u,onChange:p=>{v(p.target.value),f(null)},onKeyDown:p=>p.key==="Enter"&&h(),placeholder:"channel name",className:"surface-input px-2 py-1 rounded text-[11px] font-mono text-fg-primary w-40"}),e.jsx("button",{onClick:h,disabled:k||!u.trim(),className:"px-2 py-1 rounded text-[10px] font-mono bg-sys-blue/20 text-sys-blue hover:bg-sys-blue/30 disabled:opacity-40 transition-colors",children:k?"…":"Try"})]}),N&&e.jsx("div",{className:"mt-1",children:N.success?e.jsx(i,{label:"result",children:e.jsx(d,{fn:"plaintext",value:N.text??"(empty)",color:"teal"})}):e.jsx(i,{label:"error",children:e.jsx(d,{fn:"error",value:N.error??"unknown",color:"red"})})})]}),e.jsx(E,{}),e.jsxs("div",{children:[e.jsx("p",{className:"text-fg-muted mb-1",children:"useDecodedMessage() store result:"}),y?y.decoded?e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"channel",children:e.jsx(d,{fn:"channel",value:y.decoded.channelName??"?",color:"teal"})}),e.jsx(i,{label:"text",children:e.jsx(d,{fn:"text",value:y.decoded.text,color:"teal"})})]}):e.jsx(i,{label:"decrypt",children:e.jsx(d,{fn:"decrypt",value:"failed",color:"red"})}):e.jsx(i,{label:"decrypt",children:e.jsx(d,{fn:"decrypt",value:"pending",color:"zinc"})})]})]})})]})}function Mt(t){const{rawHex:s,display:r,protocolPacket:c,decoded:a,parseError:n,parseTimeMs:l,payloadVersion:o,isV1:x,isV2:m,packetHash:g,packet:u}=t,v=!!s&&s.length>=4;return e.jsxs(G,{children:[e.jsx(K,{className:"w-full mt-2 mb-1",children:e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("span",{className:"text-[10px] font-mono text-fg-muted",children:"🔬"}),e.jsx("span",{className:"text-[10px] font-mono font-medium text-fg-muted",children:"Wire Inspection"}),e.jsx("span",{className:"text-[9px] text-fg-muted/50",children:"observatory diagnostic — not a runtime stage"})]})}),e.jsx(V,{children:e.jsxs("div",{className:"border border-dashed border-edge-subtle rounded-lg p-3 space-y-1 bg-surface/30",children:[e.jsx("p",{className:"text-[9px] text-fg-muted/50 mb-2",children:"The backend parsed these fields server-side. This panel verifies the wire-level encoding client-side."}),v?e.jsxs(e.Fragment,{children:[e.jsx($t,{rawHex:s,display:r,protocolPacket:c,parseError:n,parseTimeMs:l,payloadVersion:o,isV1:x,isV2:m}),e.jsx(Dt,{decoded:a,packet:u}),e.jsx(Pt,{protocolPacket:c,packetHash:g})]}):e.jsx("p",{className:"text-fg-muted italic text-[10px]",children:n??"No raw_packet — wire inspection unavailable (warm-tier packet)"})]})})]})}function fe(t){if(!t)return[{fn:"decode",value:"no raw_packet",group:"decode",color:"zinc"}];switch(t.type){case"advert":{const s=t,r=[{fn:"decode.nodeType",value:s.nodeType,group:"decode",color:"blue"}];return s.name&&r.push({fn:"decode.name",value:s.name,group:"decode",color:"blue"}),s.latitude!=null&&s.longitude!=null&&r.push({fn:"decode.location",value:`${s.latitude.toFixed(4)}, ${s.longitude.toFixed(4)}`,group:"decode",color:"blue"}),r.push({fn:"decode.publicKey",value:s.publicKey,group:"decode",color:"blue"}),r}case"trace":{const s=t;return[{fn:"decode.traceTag",value:s.traceTag,group:"decode",color:"blue"},{fn:"decode.hops",value:s.pathHashes.length>0?s.pathString:"empty",group:"decode",color:"blue"},{fn:"decode.snr",value:s.snrValues.length>0?`${s.snrValues.length} values`:"none",group:"decode",color:s.snrValues.length>0?"blue":"zinc"},{fn:"decode.complete",value:s.isComplete?"yes":"partial",group:"decode",color:s.isComplete?"green":"amber"}]}case"path":{const s=t,r=[{fn:"decode.pathLength",value:String(s.pathLength),group:"decode",color:"blue"},{fn:"decode.path",value:s.path.length>0?s.pathString:"empty",group:"decode",color:"blue"}];return s.extraType!=null&&r.push({fn:"decode.extraType",value:s.extraTypeName??String(s.extraType),group:"decode",color:"purple"}),s.extraData&&r.push({fn:"decode.extraData",value:`${s.extraData.length/2}B`,group:"decode",color:"purple"}),r}case"ack":return[{fn:"decode.crc",value:t.crc,group:"decode",color:"blue"}];case"grp_txt":return[{fn:"decode.channelHash",value:t.channelHash,group:"decode",color:"blue"},{fn:"decode.encrypted",value:"true — decrypt at cascade",group:"decode",color:"zinc"}];case"grp_data":{const s=t;return[{fn:"decode.channelHash",value:s.channelHash,group:"decode",color:"blue"},{fn:"decode.dataLength",value:`${s.dataLength}B`,group:"decode",color:"blue"}]}case"txt_msg":{const s=t;return[{fn:"decode.srcHash",value:s.srcHash,group:"decode",color:"blue"},{fn:"decode.destHash",value:s.destHash,group:"decode",color:"blue"},{fn:"decode.encrypted",value:s.encrypted?"true":"false",group:"decode",color:s.encrypted?"zinc":"green"},...s.encrypted?[]:[{fn:"decode.text",value:s.text,group:"decode",color:"blue"}]]}case"multipart":{const s=t;return[{fn:"decode.part",value:`${s.partNumber+1}/${s.totalParts}`,group:"decode",color:"blue"},{fn:"decode.msgId",value:s.messageId,group:"decode",color:"blue"}]}case"control":{const s=t,r=[{fn:"decode.subtype",value:s.subtypeName,group:"decode",color:"blue"}];return s.nodeTypeName&&r.push({fn:"decode.nodeType",value:s.nodeTypeName,group:"decode",color:"blue"}),s.snrDb!=null&&r.push({fn:"decode.snr",value:`${s.snrDb>0?"+":""}${s.snrDb.toFixed(1)} dB`,group:"decode",color:"blue"}),s.tag&&r.push({fn:"decode.tag",value:s.tag,group:"decode",color:"blue"}),s.publicKey&&r.push({fn:"decode.publicKey",value:s.publicKey,group:"decode",color:s.publicKeyFull?"green":"blue"}),s.typeFilter!=null&&r.push({fn:"decode.typeFilter",value:s.typeFilterDescription??`0x${s.typeFilter.toString(16)}`,group:"decode",color:"blue"}),s.prefixOnly!=null&&r.push({fn:"decode.prefixOnly",value:String(s.prefixOnly),group:"decode",color:"blue"}),!s.nodeTypeName&&!s.tag&&(r.push({fn:"decode.subtypeFlags",value:`0x${s.subtypeFlags.toString(16)}`,group:"decode",color:"blue"}),r.push({fn:"decode.dataLength",value:`${s.dataLength}B`,group:"decode",color:"blue"})),r}case"req":{const s=t;return[{fn:"decode.destHash",value:s.destHash,group:"decode",color:"blue"},{fn:"decode.srcHash",value:s.srcHash,group:"decode",color:"blue"},{fn:"decode.cipherMac",value:s.cipherMac,group:"decode",color:"purple"},{fn:"decode.ciphertext",value:`${s.ciphertextLength}B`,group:"decode",color:"zinc"}]}case"response":{const s=t;return[{fn:"decode.destHash",value:s.destHash,group:"decode",color:"blue"},{fn:"decode.srcHash",value:s.srcHash,group:"decode",color:"blue"},{fn:"decode.cipherMac",value:s.cipherMac,group:"decode",color:"purple"},{fn:"decode.ciphertext",value:`${s.ciphertextLength}B`,group:"decode",color:"zinc"}]}case"anon_req":{const s=t;return[{fn:"decode.destHash",value:s.destHash,group:"decode",color:"blue"},{fn:"decode.senderPubKey",value:s.senderPublicKey,group:"decode",color:"green"},{fn:"decode.cipherMac",value:s.cipherMac,group:"decode",color:"purple"},{fn:"decode.ciphertext",value:`${s.ciphertextLength}B`,group:"decode",color:"zinc"}]}case"generic":return[{fn:"decode.raw",value:`${t.length}B`,group:"decode",color:"zinc"}];default:return[]}}function Rt({packet:t,pipeline:s,rawHex:r,traceTagIndex:c,neighbors:a}){const{enrichment:n,timing:l,display:o,protocolPacket:x,decoded:m,parseError:g,payloadVersion:u,isV1:v,isV2:N,analysis:f}=s,$=(t.type??t.payload_type)===et,h=f.dupeAnalysis,y=T.useRef(0),p=T.useMemo(()=>{if(!$)return null;const D=performance.now(),L=bt(t,c,a);return y.current=performance.now()-D,L},[t,c,a,$]),_=l.enrich+y.current,H=[];f.byteLen&&H.push(`${f.byteLen}B`),H.push(f.payloadTypeName),n.advertName&&H.push(`"${n.advertName}"`),n.isZeroHop?H.push("zero-hop"):f.pathHopCount>0&&H.push(`${f.pathHopCount}h`),H.push(`${t.rssi}dBm`),h.isDuplicate&&H.push("DUPE");const C=H.join(" — ");return e.jsxs(le,{stage:1,name:"INGEST",fn:n.preComputed?"PacketCache.mergePackets()":"extractAdvertData() + extractHopData() + ...",verdict:C,timeMs:_,children:[e.jsx(Mt,{rawHex:r,display:o,protocolPacket:x,decoded:m,parseError:g,parseTimeMs:l.parse,payloadVersion:u,isV1:v,isV2:N,packetHash:t.packet_hash,packet:t}),e.jsx(E,{title:"Cache Enrichment"}),e.jsx(q,{prefix:"packetCache",children:e.jsxs("dl",{className:"space-y-0.5",children:[e.jsxs("div",{className:"mb-1.5",children:[n.preComputed?e.jsx(M,{color:"green",children:"PacketCache"}):e.jsx(M,{color:"amber",children:"computed"}),e.jsx("span",{className:"text-[10px] text-fg-muted ml-1.5",children:n.preComputed?"pre-enriched by real pipeline":"synthetic — computed on the fly"})]}),e.jsxs("div",{className:"flex flex-wrap gap-x-2 gap-y-1 mb-1",children:[e.jsx(d,{fn:"_byteLength",value:n.byteLength!=null?`${n.byteLength}B`:void 0,color:"blue"}),e.jsx(d,{fn:"_hopCount",value:String(n.hopCount),color:"blue"}),e.jsx(d,{fn:"_isZeroHop",value:String(n.isZeroHop),color:n.isZeroHop?"green":"blue"}),n.isZeroHop&&e.jsx(M,{color:"blue",children:"direct"}),n.channelHash!=null&&e.jsx(d,{fn:"_channelHash",value:n.channelHash,color:"blue"}),$&&t._traceTag&&e.jsx(d,{fn:"_traceTag",value:t._traceTag,color:"blue"})]}),n.advertSender||n.advertNodeType!=null||n.advertName!=null?e.jsxs("div",{className:"mt-1 mb-1",children:[e.jsx("p",{className:"text-[10px] text-sys-blue font-medium mb-0.5",children:"ADVERT Enrichment"}),e.jsxs("div",{className:"flex flex-wrap gap-x-2 gap-y-1",children:[n.advertSender&&e.jsx(d,{fn:"_advertSender",value:n.advertSender.slice(0,16)+"…",color:"blue"}),n.advertNodeType!=null&&e.jsx(d,{fn:"_advertNodeType",value:ke(n.advertNodeType),color:"blue"}),n.advertName!=null&&e.jsx(d,{fn:"_advertName",value:n.advertName,color:"blue"}),n.advertFlags!=null&&e.jsx(d,{fn:"_advertFlags",value:`0x${n.advertFlags.toString(16).padStart(2,"0")}`,color:"blue"}),n.advertHasLocation!=null&&e.jsx(d,{fn:"_advertHasLocation",value:String(n.advertHasLocation),color:"blue"}),n.advertHasName!=null&&e.jsx(d,{fn:"_advertHasName",value:String(n.advertHasName),color:"blue"}),n.advertLatitude!=null&&n.advertLongitude!=null&&e.jsx(d,{fn:"location",value:`${n.advertLatitude.toFixed(4)}, ${n.advertLongitude.toFixed(4)}`,color:"blue"})]})]}):e.jsx("p",{className:"text-[10px] text-fg-muted/30 mb-1",children:"ADVERT fields: N/A (non-ADVERT packet)"}),e.jsx(E,{title:"Payload Decode"}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${m?"bg-sys-blue":"bg-zinc-500/40"}`}),e.jsx("span",{className:"font-mono text-[10px] font-medium text-fg-primary",children:"decodePayload()"}),e.jsx("span",{className:"text-[9px] text-fg-muted",children:"sync — wire data only, no crypto"})]}),e.jsx("div",{className:"ml-3",children:m?e.jsx("div",{className:"flex flex-wrap gap-x-1.5 gap-y-1",children:fe(m).map((D,L)=>e.jsx("span",{className:"inline-block border border-edge-subtle rounded px-1.5 py-0.5",children:e.jsx(d,{fn:D.fn,value:D.value,color:D.color})},L))}):e.jsx(S,{children:"no raw_packet — warm-tier packet, decode unavailable"})})]}),e.jsx(E,{}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px] font-mono",children:[e.jsx("span",{className:"text-fg-muted",children:"dupe:"}),h.isDuplicate?e.jsx(d,{fn:"is_duplicate",value:"true",color:"purple"}):e.jsx(S,{children:"none"}),h.dupeCount>0&&e.jsx(d,{fn:"dupeCount",value:`×${h.dupeCount}`,color:"purple"}),h.rssiRange&&e.jsxs(S,{c:"text-fg-primary",children:["Δ",Math.abs(h.rssiRange[1]-h.rssiRange[0]),"dB RSSI"]})]}),p&&e.jsxs(e.Fragment,{children:[e.jsx(E,{}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px] font-mono",children:[e.jsx("span",{className:"text-fg-muted",children:"TRACE SRC:"}),p.inferredSrc?e.jsxs(e.Fragment,{children:[e.jsx(d,{fn:"inferredSrc",value:p.inferredSrc,color:"purple"}),p.inferredName&&e.jsx(d,{fn:"name",value:p.inferredName,color:"purple"})]}):e.jsx(S,{children:"unresolvable"}),e.jsx(_e,{color:"purple",children:p.method}),e.jsxs(S,{children:["(",p.confidence,")"]}),e.jsxs(S,{children:["siblings=",p.siblingCount]})]})]}),(()=>{const D=f.pType!=null?`0x${f.pType.toString(16).toUpperCase().padStart(2,"0")}`:void 0,L=t.route!=null?`0x${t.route.toString(16).toUpperCase().padStart(2,"0")}`:void 0,P=fe(m),R=f.signalClass==="excellent"||f.signalClass==="good"?"green":f.signalClass==="fair"?"amber":"red",b=f.senderTier==="pubkey"?"green":f.senderTier==="prefix"?"amber":f.senderTier==="encrypted"?"teal":"zinc",w=[{fn:"type",value:f.payloadTypeName,raw:D,group:"wire",color:"blue"},{fn:"route",value:f.routeTypeName,raw:L,group:"wire",color:"blue"},{fn:"src_hash",value:t.src_hash||void 0,group:"wire",color:"blue"},{fn:"rssi",value:`${t.rssi}dBm`,group:"wire",color:"blue"},{fn:"snr",value:`${t.snr}dB`,group:"wire",color:"blue"},{fn:"_byteLength",value:f.byteLen?`${f.byteLen}B`:void 0,group:"enrichment",color:"blue"},{fn:"_hopCount",value:String(n.hopCount),group:"enrichment",color:"blue"},{fn:"_isZeroHop",value:String(n.isZeroHop),group:"enrichment",color:"blue"},{fn:"_advertSender",value:n.advertSender||void 0,group:"enrichment",color:"blue"},{fn:"_advertNodeType",value:f.advertType!=="unknown"?f.advertType:void 0,group:"enrichment",color:"blue"},{fn:"_advertName",value:n.advertName||void 0,group:"enrichment",color:"blue"},{fn:"_channelHash",value:n.channelHash||void 0,group:"enrichment",color:"blue"},...P,{fn:"is_duplicate",value:String(h.isDuplicate),group:"analysis",color:"purple"},p!=null&&p.inferredSrc?{fn:"traceSrc",value:p.inferredSrc,group:"analysis",color:"purple"}:{fn:"traceSrc"},{fn:"_signalClass",value:f.signalClass,group:"analysis",color:R},{fn:"_routeClass",value:f.routeClass,group:"analysis",color:"purple"},{fn:"_senderTier",value:f.senderTier,group:"analysis",color:b},{fn:"_origin",value:f.origin,group:"analysis",color:f.origin==="tx_local"?"green":f.origin==="tx_forward"?"amber":"purple"},{fn:"_pathAvail",value:f.pathAvail?`${f.pathHopCount} hops`:"none",group:"analysis",color:f.pathAvail?"green":"zinc"},{fn:"_age",value:f.age,group:"analysis",color:f.age==="live"||f.age==="recent"?"green":"zinc"},...h.dupeCount>0?[{fn:"_dupeCount",value:`×${h.dupeCount}`,group:"analysis",color:"purple"},...h.rssiRange?[{fn:"_multipath",value:`Δ${Math.abs(h.rssiRange[1]-h.rssiRange[0])}dB`,group:"analysis",color:Math.abs(h.rssiRange[1]-h.rssiRange[0])>6?"amber":"green"}]:[]]:[],...t.lbt_attempts!=null?[{fn:"_lbt",value:`${t.lbt_attempts} attempt${t.lbt_attempts!==1?"s":""}`,group:"analysis",color:(t.lbt_attempts??0)>1?"amber":"green"}]:[],...t.drop_reason?[{fn:"_dropReason",value:t.drop_reason,group:"analysis",color:"red"}]:[]];return e.jsx(se,{tokens:w})})()]})})]})}function be(t){switch(t){case"excellent":return"green";case"good":return"green";case"fair":return"amber";case"poor":return"red";case"critical":return"red";default:return"zinc"}}function ye(t){return`${Math.round(t*100)}%`}function je(t,s,r){return t||(s?s.slice(0,12):`~${r}`)}function At({hops:t}){return t.length===0?null:e.jsxs("div",{className:"mt-2 pt-2 border-t border-edge-subtle/40",children:[e.jsx("p",{className:"text-[9px] text-fg-muted/40 uppercase tracking-widest font-mono mb-1.5",children:"per-hop trace inspection"}),e.jsx("div",{className:"space-y-1",children:t.map(s=>e.jsx(q,{prefix:`trace.hop[${s.hopIndex}]`,children:e.jsxs("div",{className:"border border-edge-subtle/40 rounded px-2 py-1.5",children:[e.jsxs(i,{label:"link",children:[e.jsx(re,{hops:[s.fromPrefix,s.toPrefix],color:"blue"}),e.jsx("span",{className:"ml-1.5",children:e.jsx(_e,{color:be(s.quality),children:s.quality})})]}),e.jsx(i,{label:"snr",children:e.jsx(F,{raw:e.jsx("span",{className:"text-sys-blue",children:s.snrRaw}),children:e.jsx(d,{fn:"snr",value:`${s.snrRaw.toFixed(1)} dB`,color:be(s.quality)})})}),e.jsxs(i,{label:"from",children:[e.jsx(d,{fn:"resolve",value:je(s.fromName,s.fromHash,s.fromPrefix),color:s.fromHash?s.fromConfidence>=.8?"green":"amber":"purple"}),e.jsx("span",{className:"ml-1",children:e.jsx(d,{fn:"conf",value:ye(s.fromConfidence),color:"zinc"})})]}),e.jsxs(i,{label:"to",children:[e.jsx(d,{fn:"resolve",value:je(s.toName,s.toHash,s.toPrefix),color:s.toHash?s.toConfidence>=.8?"green":"amber":"purple"}),e.jsx("span",{className:"ml-1",children:e.jsx(d,{fn:"conf",value:ye(s.toConfidence),color:"zinc"})})]})]})},s.hopIndex))}),e.jsx(se,{label:"trace contributes",tokens:Ft(t)})]})}function Ft(t){const s=t.reduce((n,l)=>n+(l.fromHash?1:0)+(l.toHash?1:0),0),r=t.length*2,c=r-s,a=t.length>0?t.reduce((n,l)=>n+l.snrRaw,0)/t.length:0;return[{fn:"hops",value:String(t.length),group:"wire",color:"blue"},{fn:"resolved",value:`${s}/${r}`,group:"worker",color:"green"},...c>0?[{fn:"ghosts",value:String(c),group:"worker",color:"purple"}]:[],{fn:"avgSnr",value:`${a.toFixed(1)} dB`,group:"analysis",color:a>=5?"green":a>=0?"amber":"red"}]}function Et(t){if(!t)return"never";const s=Math.floor((Date.now()-t)/1e3);return s<60?`${s}s ago`:s<3600?`${Math.floor(s/60)}m ago`:`${Math.floor(s/3600)}h ago`}function Ot(t){if(!t)return[];const s=t.decoded;if(!s)return[{fn:"decrypt.result",value:"failed",group:"crypto",color:"red"}];if(!s.decrypted)return[{fn:"decrypt.result",value:"no key match",group:"crypto",color:"zinc"}];const r=[];return s.channelName&&r.push({fn:"decrypt.channelName",value:s.channelName,group:"crypto",color:"teal"}),s.senderName&&r.push({fn:"decrypt.senderName",value:s.senderName,group:"crypto",color:"teal"}),s.text&&r.push({fn:"decrypt.text",value:s.text,group:"crypto",color:"teal"}),s.timestamp&&r.push({fn:"decrypt.timestamp",value:new Date(s.timestamp*1e3).toISOString().slice(11,19),group:"crypto",color:"teal"}),s.macCorrupted&&r.push({fn:"decrypt.macCorrupted",value:"true",group:"crypto",color:"amber"}),r}function zt({packet:t,decrypted:s,pipeline:r}){var b;const c=J(w=>w.isComputing),a=J(w=>w.lastUpdated),n=J(w=>w.lastComputeTimeMs),l=J(w=>w.topology.edges.length),o=J(w=>w.topology.discoveredNodes.length),x=tt(),m=st(),g=nt(),u=he(w=>w.isComputing),v=he(w=>w.nodeCount),N=me(w=>w.progress),f=me(w=>w.initialDecodeComplete),k=t.type??t.payload_type,$=k===O.GRP_TXT||k===O.GRP_DATA,h=k===O.TRACE,y=k===O.PATH,p=$,_=[{label:"full",detail:"all GRP_TXT → decryption worker",active:p&&f,color:"teal"},{label:"quick",detail:"100 most recent (initial load)",active:p&&!f,color:"amber"},{label:"skip",detail:"non-GRP or catchup path",active:!p,color:"zinc"}],H=Ot(s),C=((b=s==null?void 0:s.decoded)==null?void 0:b.decrypted)===!0,D=c?"running":`${l}e ${o}g`,L=u?"running":`${v}n`,P=p?C?"decrypted":N.isDecoding?`${N.percent}%`:"pending":"N/A",R=`topo ${c?"○":"✓"} ${D} · spark ${u?"○":"✓"} ${L} · decrypt ${P}`;return e.jsx(le,{stage:2,name:"CASCADE",fn:"hydrateDownstream()",verdict:R,children:e.jsx(q,{prefix:"cascade",children:e.jsxs("div",{className:"space-y-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 py-1.5 text-[11px] font-mono",children:[e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${c?"bg-sys-amber animate-pulse":"bg-sys-green"}`}),e.jsx("span",{className:"text-fg-primary",children:"topology"}),e.jsxs("span",{className:"text-fg-muted",children:[l,"e ",o,"g"]}),(h||y)&&e.jsx("span",{className:"text-sys-green text-[9px]",children:"↑signal"})]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${u?"bg-sys-amber animate-pulse":"bg-sys-green"}`}),e.jsx("span",{className:"text-fg-primary",children:"sparkline"}),e.jsxs("span",{className:"text-fg-muted",children:[v,"n"]})]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${N.isDecoding?"bg-sys-amber animate-pulse":p?"bg-sys-teal":"bg-zinc-500/40"}`}),e.jsx("span",{className:"text-fg-primary",children:"decrypt"}),e.jsx("span",{className:p?"text-sys-teal":"text-fg-muted",children:p?C?"decrypted":N.isDecoding?`${N.percent}%`:"pending":"N/A"})]})]}),e.jsxs(G,{defaultOpen:h||y,children:[e.jsx(K,{className:"text-[10px] w-full border-t border-edge-subtle pt-1.5",children:e.jsx("span",{className:"font-mono text-fg-muted/50",children:"topology detail…"})}),e.jsx(V,{children:e.jsxs("div",{className:"ml-3 pb-2",children:[e.jsx(i,{label:"status",children:e.jsx(d,{fn:"isComputing",value:c?"running":"idle",color:c?"amber":"green"})}),e.jsxs(i,{label:"last",children:[e.jsx(d,{fn:"lastUpdated",value:Et(a),color:"zinc"}),n>0&&e.jsxs("span",{className:"ml-2 text-fg-muted text-[10px]",children:["(",n<1e3?`${n.toFixed(0)}ms`:`${(n/1e3).toFixed(1)}s`,")"]})]}),e.jsxs(i,{label:"output",children:[e.jsx(d,{fn:"edges",value:String(l),color:"green"}),e.jsx(d,{fn:"ghostNodes",value:String(o),color:"purple"})]}),m&&e.jsxs(e.Fragment,{children:[e.jsxs(i,{label:"trace links",children:[e.jsx(d,{fn:"directed",value:String(x.totalDirectedLinks),color:"teal"}),e.jsx(d,{fn:"bidir",value:String(x.bidirectionalLinks),color:"teal"}),e.jsx(d,{fn:"traces",value:String(x.totalTraces),color:"zinc"})]}),e.jsxs(i,{label:"trace SNR",children:[e.jsx(d,{fn:"mean",value:`${x.meanSnr.toFixed(1)} dB`,color:x.meanSnr>=5?"green":x.meanSnr>=0?"amber":"red"}),e.jsx(d,{fn:"median",value:`${x.medianSnr.toFixed(1)} dB`,color:"zinc"}),e.jsx(d,{fn:"confidence",value:`${Math.round(x.avgConfidence*100)}%`,color:"zinc"})]}),h&&e.jsxs(i,{label:"quality",children:[e.jsx(d,{fn:"excellent",value:String(x.qualityCounts.excellent),color:"green"}),e.jsx(d,{fn:"good",value:String(x.qualityCounts.good),color:"green"}),e.jsx(d,{fn:"fair",value:String(x.qualityCounts.fair),color:"amber"}),e.jsx(d,{fn:"poor",value:String(x.qualityCounts.poor),color:"red"}),e.jsx(d,{fn:"critical",value:String(x.qualityCounts.critical),color:"red"})]}),g.confirmedResolutions.size>0&&e.jsxs(i,{label:"feedback",children:[e.jsx(d,{fn:"feedback.confirmed",value:String(g.confirmedResolutions.size),color:"teal"}),e.jsx(d,{fn:"feedback.links",value:String(g.confirmedLinks.length),color:"teal"})]})]}),h&&(r==null?void 0:r.traceHopDetail)&&e.jsx(At,{hops:r.traceHopDetail})]})})]}),p&&e.jsx("div",{className:"border-t border-edge-subtle pt-2 pb-2",children:e.jsxs("div",{className:"ml-3",children:[e.jsx(i,{label:"mode",children:e.jsx(ae,{options:_,nextFn:"queueDecryption()"})}),e.jsx(i,{label:"result",children:e.jsx(d,{fn:"decrypt",value:C?"decrypted":s?"failed":"pending",color:C?"teal":s?"red":"zinc"})}),C&&e.jsx("div",{className:"mt-1 flex flex-wrap gap-x-1.5 gap-y-1",children:H.map((w,oe)=>e.jsx("span",{className:"inline-block border border-edge-subtle rounded px-1.5 py-0.5",children:e.jsx(d,{fn:w.fn,value:w.value,color:w.color})},oe))})]})}),(()=>{const w=[{fn:"topology.edges",value:String(l),group:"worker",color:"green"},{fn:"topology.ghostNodes",value:String(o),group:"worker",color:"purple"},{fn:"sparkline.nodes",value:`${v}`,group:"worker",color:"green"},...m?[{fn:"trace.directedLinks",value:String(x.totalDirectedLinks),group:"worker",color:"teal"},{fn:"trace.meanSnr",value:`${x.meanSnr.toFixed(1)} dB`,group:"worker",color:"teal"}]:[],...H];return e.jsx(se,{tokens:w})})()]})})})}function Bt(t,s,r,c){var n;const a=t.src_hash?Se(t.src_hash):"";if(t._advertSender&&s.hash&&s.confident)return{tier:1,label:"_advertSender → pubkey",detail:"ADVERT carried full 32-byte public key — definitive match"};if(c&&s.confident&&((n=s.name)==null?void 0:n.toLowerCase())===c.toLowerCase())return{tier:1.5,label:"decrypt.senderName → nameToHash",detail:`Decrypted sender name “${c}” matched neighbor — high-confidence`};if(a&&r.crossClassPrefixes.has(a))return{tier:2,label:"cross-class prefix",detail:"Prefix has mixed types (repeater + non-repeater); payload type narrows to one class"};if(s.confident){const l=r.prefixIndex.get(a);return(l==null?void 0:l.length)===1?{tier:3,label:"single candidate",detail:"Only one node matches this prefix — unambiguous"}:{tier:3,label:"resolver",detail:"Multi-signal scoring selected best candidate from collision set"}}return{tier:4,label:"ambiguous",detail:"Cannot confidently resolve — multiple same-class candidates, insufficient scoring separation"}}function It(t,s){const r=t.original_path??t.forwarded_path,c=new Set;if(r&&Array.isArray(r))for(const a of r){const n=String(a).toUpperCase().slice(0,2);n.length>=2&&n!==s&&c.add(n)}return c}function Gt(t,s,r,c,a,n,l){const o=Math.floor(Date.now()/1e3),x=new Map(r.map(m=>[m.hash,m]));return t.map(m=>{const g=s[m.hash],u=x.get(m.hash);let v=!0,N="";c!=="unknown"?m.type!=="unknown"&&m.type!==c?(v=!1,N=`${m.type} ≠ required ${c}`):m.type===c?N="type matches":N="type unknown — not ruled out":N="payload ambiguous — all types eligible";const f=!!(g!=null&&g.zero_hop),k=(g==null?void 0:g.last_seen)??0;let $=0;if(f&&k>0){const b=(o-k)/3600;$=50*Math.exp(-b/l)}let h=0;if(k>0){const b=(o-k)/3600;h=Math.exp(-b/n)}const y=h*20,p=!!(g!=null&&g.latitude&&(g!=null&&g.longitude)&&(g.latitude!==0||g.longitude!==0)),_=p?5:0,H=(u==null?void 0:u.advertCount)??0,C=Math.min(H*2,30),D=(u==null?void 0:u.forwarderPrefixes.size)??0,L=Math.min(D*3,15);let P=0;if(u&&u.totalForwarderObservations>0&&a.size>0){let b=0;for(const w of a)u.forwarderPrefixes.has(w)&&b++;P=b/a.size}const R=$+y+_+C+L;return{hash:m.hash,name:m.name,type:m.type,roleCompatible:v,roleReason:N,zeroHop:f,zeroHopScore:$,lastSeen:k,recencyScore:h,recencyPoints:y,hasGps:p,gpsScore:_,advertCount:H,advertScore:C,topoWidth:D,topoScore:L,affinity:P,total:R}}).sort((m,g)=>g.total-m.total)}function Kt({packet:t,pipeline:s,resolved:r,resolveTimeMs:c,advertName:a,neighbors:n,decrypted:l}){var ie,de;const o=Y(j=>j.neighborContext),x=Y(j=>j.topologyProfiles),m=Y(j=>j.config),{analysis:g}=s,u=r??{hash:null,type:"unknown",name:null,confident:!1},v=t.src_hash?Se(t.src_hash):"",N=v?o.prefixIndex.get(v)??[]:[],f=v?x.get(v)??[]:[],k=g.pType??-1,$=k>=0?k.toString(16).toUpperCase().padStart(2,"0"):"??",h=g.inferredType,y=g.advertType,p=g.effectiveType,_=t._advertNodeType!=null?t._advertNodeType.toString(16).padStart(2,"0").toUpperCase():"",H=((ie=l==null?void 0:l.decoded)==null?void 0:ie.senderName)??null,C=Bt(t,u,o,H),D=T.useMemo(()=>It(t,v),[t,v]),L=g.pathLen,P=T.useMemo(()=>Gt(N,n,f,p,D,m.recencyDecayHours,m.zeroHopDecayHours),[N,n,f,p,D,m.recencyDecayHours,m.zeroHopDecayHours]),R=P.filter(j=>!j.roleCompatible),b=P.filter(j=>j.roleCompatible),w=t._advertSender?o.pubKeyMap.get(t._advertSender)??null:null,oe=C.tier===1,De=[{fn:"src_hash",value:v||"",active:!!v,color:"blue"},{fn:"_advertSender",value:t._advertSender?t._advertSender.slice(0,12)+"…":"",active:!!t._advertSender,color:"blue"},{fn:"_advertNodeType",value:_?`0x${_}`:"",active:t._advertNodeType!=null,color:"blue"},{fn:"path_length",value:L!=null?L===0?"zero-hop":String(L):"",active:L!=null,color:"blue"},{fn:"decrypt.senderName",value:H??"",active:!!H,color:"teal"}],Le=[{label:"hit",detail:"pubKeyMap.get(_advertSender) → definitive",active:!!w,color:"green"},{label:"miss",detail:t._advertSender?"pubkey not in neighbor table":"no _advertSender",active:!w,color:"zinc"}],Pe=[{label:"payload",detail:`inferDeviceType(0x${$}) → ${h}`,active:h!=="unknown",color:"amber"},{label:"flags",detail:_?`mapAdvertTypeCode(0x${_}) → ${y}`:"no _advertNodeType",active:h==="unknown"&&y!=="unknown",color:"green"},{label:"ambiguous",detail:"all types eligible",active:p==="unknown",color:"zinc"}],Me=u.name??((de=u.hash)==null?void 0:de.slice(0,12))??"?",Re=u.confident?"confident":"ambiguous",Ae=`→ ${Me} (${Re}, Tier ${C.tier})`;return e.jsx(le,{stage:3,name:"RESOLVE",fn:"usePipelineStore.resolveSource()",verdict:Ae,timeMs:c,children:e.jsx(q,{prefix:"resolvePacketSource",children:e.jsxs("div",{className:"space-y-0",children:[e.jsx("div",{className:"pt-1 pb-1",children:e.jsx(Ct,{tokens:De,nextFn:"resolvePacketSource()"})}),t.src_hash?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"border-t border-edge-subtle pt-2 pb-2",children:[e.jsxs("p",{className:"text-fg-muted mb-1",children:[e.jsx(S,{c:"text-sys-blue font-bold",children:"1"})," ","PUBKEY LOOKUP"]}),e.jsx(ae,{options:Le,nextFn:"pubKeyMap.get()"}),e.jsx("div",{className:"ml-3 mt-1",children:w?e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"resolved",children:e.jsx(d,{fn:"hash",value:w,color:"green"})}),a&&e.jsxs(i,{label:"name",children:[e.jsx(d,{fn:"name",value:a,color:"green"}),u.name&&a===u.name&&e.jsx(S,{c:"text-sys-green ml-1",children:"✓ neighbor match"})]}),e.jsxs(i,{label:"result",children:[e.jsx(M,{color:"green",children:"Tier 1"}),e.jsx(S,{c:"text-fg-primary ml-1",children:"definitive — scoring bypassed"})]})]}):t._advertSender?e.jsx(i,{label:"status",children:e.jsx(S,{c:"text-sys-amber",children:"✗ pubkey not in neighbor table"})}):e.jsx(i,{label:"status",children:e.jsx(S,{children:"no _advertSender — skip to prefix resolution"})})})]}),oe?e.jsx("div",{className:"border-t border-edge-subtle py-2",children:e.jsx("p",{className:"text-[11px] text-fg-muted/40 font-mono ml-3",children:"Steps 2–5 bypassed — pubkey definitive"})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"border-t border-edge-subtle pt-2 pb-2",children:[e.jsxs("p",{className:"text-fg-muted mb-1",children:[e.jsx(S,{c:"text-sys-blue font-bold",children:"2"})," ","CANDIDATE POOL — ",N.length," node",N.length!==1?"s":"",' match "',v,'"']}),e.jsxs("div",{className:"space-y-0.5 ml-3",children:[P.map(j=>e.jsxs("div",{className:"flex gap-2 items-center text-[11px]",children:[e.jsx("span",{className:"break-all text-[10px]",children:j.hash}),e.jsx(M,{color:"zinc",children:j.type||"unknown"}),j.name&&e.jsx(S,{children:j.name})]},j.hash)),N.length===0&&e.jsx(S,{children:"no known nodes for this prefix"})]})]}),e.jsxs("div",{className:"border-t border-edge-subtle pt-2 pb-2",children:[e.jsxs("p",{className:"text-fg-muted mb-1",children:[e.jsx(S,{c:"text-sys-blue font-bold",children:"3"})," ","TYPE INFERENCE"]}),e.jsx(ae,{options:Pe,nextFn:"effectiveType()"}),e.jsx("div",{className:"ml-3 mt-1",children:e.jsx(i,{label:"effective",children:e.jsx(d,{fn:"effectiveType",value:p,color:p!=="unknown"?h!=="unknown"?"amber":"green":"zinc"})})})]}),e.jsxs("div",{className:"border-t border-edge-subtle pt-2 pb-2",children:[e.jsxs("p",{className:"text-fg-muted mb-1",children:[e.jsx(S,{c:"text-sys-blue font-bold",children:"4"})," ","ROLE-TYPE SCRUB"]}),e.jsx("div",{className:"space-y-0.5 ml-3",children:P.map(j=>e.jsxs("div",{className:"flex gap-2 items-center text-[11px]",children:[e.jsx("span",{className:j.roleCompatible?"text-sys-green":"text-sys-red",children:j.roleCompatible?"✓":"✗"}),e.jsx("span",{className:`break-all text-[10px] ${j.roleCompatible?"":"line-through text-fg-muted"}`,children:j.hash}),e.jsx(M,{color:j.roleCompatible?"zinc":"red",children:j.type||"unknown"}),e.jsx(S,{c:j.roleCompatible?"text-fg-muted":"text-sys-red",children:j.roleReason})]},j.hash))}),R.length>0&&e.jsxs("p",{className:"text-[10px] text-fg-muted mt-1 ml-3",children:[R.length," eliminated, ",b.length," surviving"]})]}),e.jsxs("div",{className:"border-t border-edge-subtle pt-2 pb-2",children:[e.jsxs("p",{className:"text-fg-muted mb-1",children:[e.jsx(S,{c:"text-sys-blue font-bold",children:"5"})," ","CANDIDATE SCORING"]}),b.length===0?e.jsx("p",{className:"text-fg-muted italic ml-3",children:"No surviving candidates"}):b.length===1?e.jsxs("div",{className:"ml-3 text-[11px]",children:[e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(S,{c:"text-sys-green",children:"→"}),e.jsx("span",{className:"break-all text-[10px]",children:b[0].hash}),b[0].name&&e.jsx(S,{c:"text-fg-muted ml-1",children:b[0].name})]}),e.jsx("p",{className:"text-fg-muted ml-4",children:"single survivor — scoring not needed"})]}):e.jsxs(G,{children:[e.jsx(K,{className:"text-[10px] ml-3",children:e.jsxs("span",{className:"font-mono text-fg-muted/50",children:[b.length," candidates scored…"]})}),e.jsx(V,{children:e.jsx("div",{className:"space-y-2 ml-3 mt-1",children:b.map(j=>{const Q=j.hash===u.hash;return e.jsxs("div",{className:`text-[11px] leading-relaxed rounded px-2 py-1 ${Q?"bg-sys-green/8 border border-sys-green/20":"bg-zinc-500/5"}`,children:[e.jsxs("div",{className:"flex gap-2 items-center mb-0.5",children:[e.jsx(S,{c:Q?"text-sys-green":"text-fg-muted",children:Q?"→":" "}),e.jsx("span",{className:`break-all text-[10px] ${Q?"text-fg-primary":"text-fg-muted"}`,children:j.hash}),e.jsx(M,{color:Q?"green":"zinc",children:j.type||"unknown"}),j.name&&e.jsx(S,{children:j.name})]}),e.jsxs("div",{className:"ml-4 flex flex-wrap gap-x-3 gap-y-0.5",children:[e.jsxs("span",{children:[e.jsx(S,{children:"zero_hop:"})," ",e.jsx(S,{c:j.zeroHop?"text-sys-green":"text-fg-muted",children:j.zeroHop?"✓":"✗"})," ",e.jsxs(M,{color:ee(j.zeroHopScore),children:["+",j.zeroHopScore]})]}),e.jsxs("span",{children:[e.jsx(S,{children:"recency:"})," ",e.jsx(S,{c:"text-fg-primary",children:mt(j.lastSeen)})," ",e.jsxs(M,{color:ee(j.recencyPoints),children:["+",j.recencyPoints.toFixed(1)]})]}),e.jsxs("span",{children:[e.jsx(S,{children:"gps:"})," ",e.jsx(S,{c:j.hasGps?"text-sys-green":"text-fg-muted",children:j.hasGps?"✓":"✗"})," ",e.jsxs(M,{color:ee(j.gpsScore),children:["+",j.gpsScore]})]}),e.jsxs("span",{children:[e.jsx(S,{children:"adverts:"})," ",e.jsx(S,{c:"text-fg-primary",children:j.advertCount})," ",e.jsxs(M,{color:ee(j.advertScore),children:["+",j.advertScore]})]}),e.jsxs("span",{children:[e.jsx(S,{children:"topo:"})," ",e.jsx(S,{c:"text-fg-primary",children:j.topoWidth})," ",e.jsxs(M,{color:ee(j.topoScore),children:["+",j.topoScore]})]})]}),e.jsxs("div",{className:"ml-4 mt-0.5",children:[e.jsx(S,{children:"score ≈"})," ",e.jsx(S,{c:"text-fg-primary font-bold",children:j.total.toFixed(1)})]})]},j.hash)})})})]})]})]}),e.jsxs("div",{className:"border-t border-edge-subtle pt-2 pb-2",children:[e.jsxs("p",{className:"text-fg-muted mb-1",children:[e.jsx(S,{c:"text-sys-green font-bold",children:"✓"})," ","RESOLUTION"]}),e.jsxs("div",{className:"ml-3",children:[e.jsx(i,{label:"hash",children:u.hash?e.jsx(d,{fn:"resolved.hash",value:u.hash,color:"green"}):e.jsx(S,{children:"null"})}),e.jsx(i,{label:"type",children:e.jsx(d,{fn:"resolved.type",value:u.type,color:u.confident?"green":"zinc"})}),e.jsx(i,{label:"name",children:u.name?e.jsx(d,{fn:"resolved.name",value:u.name,color:u.confident?"green":"amber"}):e.jsx(S,{children:"null"})}),e.jsx(i,{label:"confident",children:e.jsx(S,{c:u.confident?"text-sys-green":"text-sys-red",children:String(u.confident)})}),e.jsxs(i,{label:"tier",children:[e.jsx(M,{color:C.tier<=2?"green":C.tier===3?"amber":"red",children:C.tier}),e.jsx(S,{c:"text-fg-primary ml-1",children:C.label})]})]})]})]}):e.jsx("div",{className:"border-t border-edge-subtle pt-2 pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px] font-mono",children:[e.jsx(S,{c:"text-sys-amber",children:"⚠ no src_hash"}),H&&e.jsx(d,{fn:"decrypt.senderName",value:H,color:"teal"}),u.confident?e.jsxs(S,{c:"text-sys-green",children:["→ resolved via ",C.label]}):e.jsx(S,{c:"text-sys-red",children:"ambiguous"})]})}),(()=>{const j=[{fn:"resolved.hash",value:u.hash??"null",group:"resolution",color:u.confident?"green":"zinc"},{fn:"resolved.type",value:u.type,group:"resolution",color:u.type!=="unknown"?u.confident?"green":"amber":"zinc"},{fn:"resolved.name",value:u.name??"null",group:"resolution",color:u.confident?"green":u.name?"amber":"zinc"},{fn:"resolved.confident",value:String(u.confident),group:"resolution",color:u.confident?"green":"red"}];return e.jsx(se,{tokens:j})})()]})})})}const Vt={id:"packet-parse",label:"Packet Parse",inputs:["rawPacket"],outputs:["parsedPacket","decoded","headerFields"],emits:[{fn:"routeType",group:"wire",color:"blue"},{fn:"payloadType",group:"wire",color:"blue"},{fn:"pathLength",group:"wire",color:"blue"},{fn:"version",group:"wire",color:"blue"}],async:!1,observatoryStage:0},qt={id:"enrichment",label:"Ingestion Enrichment",inputs:["parsedPacket"],outputs:["advertSender","channelHash","hopData","byteLength"],emits:[{fn:"_advertSender",group:"enrichment",color:"blue"},{fn:"_advertNodeType",group:"enrichment",color:"blue"},{fn:"_channelHash",group:"enrichment",color:"blue"},{fn:"_hopCount",group:"enrichment",color:"blue"},{fn:"_isZeroHop",group:"enrichment",color:"blue"},{fn:"_byteLength",group:"enrichment",color:"blue"}],async:!1,observatoryStage:1},Ut={id:"topology",label:"Topology Analysis",inputs:["packets","neighbors","srcHashResolver"],outputs:["edges","nodeMetrics","pathHealth","ghostNodes","centrality","loops"],emits:[{fn:"edges",group:"worker",color:"green"},{fn:"ghostNodes",group:"worker",color:"purple"},{fn:"loops",group:"analysis",color:"amber"},{fn:"nodeMetrics",group:"worker",color:"green"},{fn:"pathHealth",group:"worker",color:"green"},{fn:"centrality",group:"worker",color:"green"}],async:!0,worker:"topology.worker.ts",observatoryStage:2},Wt={id:"trace-enrichment",label:"Trace Link Quality",inputs:["packets","prefixLookup","srcHashResolver","edges","pathHealth","nodeMetrics"],outputs:["traceLinks","traceLinkSummary","traceDisambiguationFeedback"],emits:[{fn:"traceLinks.directed",group:"worker",color:"teal"},{fn:"traceLinks.bidir",group:"worker",color:"teal"},{fn:"traceSummary.meanSnr",group:"analysis",color:"green"},{fn:"traceSummary.medianSnr",group:"analysis",color:"zinc"},{fn:"traceSummary.confidence",group:"analysis",color:"zinc"},{fn:"feedback.confirmed",group:"worker",color:"teal"},{fn:"feedback.links",group:"worker",color:"teal"}],async:!1,observatoryStage:2},Yt={id:"disambiguation",label:"Source Disambiguation",inputs:["packets","neighbors","decodedMessages"],outputs:["srcHashResolverMap","neighborContext"],emits:[{fn:"resolvedHash",group:"resolution",color:"purple"},{fn:"resolvedName",group:"resolution",color:"purple"},{fn:"resolvedType",group:"resolution",color:"purple"},{fn:"confidence",group:"resolution",color:"green"}],async:!1,observatoryStage:3},Zt={id:"sparkline",label:"Sparkline Computation",inputs:["packets","neighbors"],outputs:["sparklineData"],emits:[{fn:"sparklines",group:"worker",color:"blue"}],async:!0,worker:"sparkline.worker.ts"},Xt={id:"decryption",label:"Channel Decryption",inputs:["packets","channelKeys"],outputs:["decodedMessages"],emits:[{fn:"decrypt.text",group:"crypto",color:"teal"},{fn:"decrypt.senderName",group:"crypto",color:"teal"},{fn:"decrypt.channelName",group:"crypto",color:"teal"},{fn:"decrypt.macCorrupted",group:"crypto",color:"amber"}],async:!0,worker:"decryption.worker.ts",observatoryStage:2},Qt={id:"decoded-content",label:"Decoded Content Policy",inputs:["decodedMessages","packets"],outputs:["decodedContent","contentInheritance"],emits:[{fn:"content.senderName",group:"crypto",color:"teal"},{fn:"content.text",group:"crypto",color:"teal"},{fn:"content.channelName",group:"crypto",color:"teal"},{fn:"content.corrupted",group:"crypto",color:"amber"},{fn:"content.inherited",group:"analysis",color:"purple"}],async:!1},Z=[Vt,qt,Ut,Wt,Yt,Zt,Xt,Qt],Jt=new Map(Z.map(t=>[t.id,t])),es=new Map;for(const t of Z)for(const s of t.emits)es.set(s.fn,t);const $e=new Map;for(const t of Z)for(const s of t.outputs)$e.set(s,t);function ts(){const t=new Map,s=new Map;for(const a of Z)t.has(a.id)||t.set(a.id,0),s.has(a.id)||s.set(a.id,new Set);for(const a of Z)for(const n of a.inputs){const l=$e.get(n);if(l&&l.id!==a.id){const o=s.get(l.id);o.has(a.id)||(o.add(a.id),t.set(a.id,(t.get(a.id)??0)+1))}}const r=[];for(const[a,n]of t)n===0&&r.push(a);const c=[];for(;r.length>0;){const a=r.shift(),n=Jt.get(a);n&&c.push(n);for(const l of s.get(a)??[]){const o=(t.get(l)??1)-1;t.set(l,o),o===0&&r.push(l)}}for(const a of Z)c.includes(a)||c.push(a);return c}const ss={0:"text-sys-green",1:"text-sys-blue",2:"text-sys-teal",3:"text-sys-purple"};function ns({stage:t,isActive:s,onClick:r}){const c=t.observatoryStage!=null?ss[t.observatoryStage]??"text-fg-muted":"text-fg-muted/40";return e.jsxs("button",{type:"button",onClick:r,className:` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/usePipelineStore-D-0Ba45c.js","assets/index-2YU-f7O7.js","assets/node-types--B4HRIdZ.js","assets/index-CgjVNfe7.css"])))=>i.map(i=>d[i]); +import{bK as O,r as T,e4 as Fe,e5 as Ee,e6 as Oe,e7 as ze,bl as Be,e8 as Ie,e9 as Ge,ea as Ke,eb as Ve,bk as Ne,bo as ue,ec as qe,ed as we,bq as pe,j as e,ee as G,ef as K,eg as V,dE as xe,eh as Ue,q as M,bw as We,bH as Ce,bQ as Ye,ei as Ze,ej as Xe,ek as Qe,el as Je,em as et,en as J,eo as tt,ep as st,eq as nt,er as he,a3 as me,$ as Se,bh as rt,es as at,y as lt,E as ot,et as ct,b9 as it,c_ as dt}from"./index-2YU-f7O7.js";import{usePipelineStore as Y}from"./usePipelineStore-D-0Ba45c.js";import{e as Te,p as ut,a as pt,A as I,S as q,c as se,f as E,K as i,H as A,B as xt,R as F,T as d,P as re,h as ht,i as S,C as _e,s as ee,j as mt}from"./primitives-DMQ-qQ8e.js";import{m as ke,i as gt}from"./node-types--B4HRIdZ.js";import"./payload-decoders-BzIXzxqW.js";function ft(t){const s=t.type??t.payload_type,r=t.duplicates??[],c=t.is_duplicate,a=r.length;let n=null,l=null;if(a>0){const x=[t.rssi,...r.map(g=>g.rssi).filter(g=>g!=null)],m=[t.snr,...r.map(g=>g.snr).filter(g=>g!=null)];x.length>1&&(n=[Math.min(...x),Math.max(...x)]),m.length>1&&(l=[Math.min(...m),Math.max(...m)])}const o=s===O.TRACE;return{isDuplicate:c,dupeCount:a,rssiRange:n,snrRange:l,hashIncludesPathLen:o}}function bt(t,s,r){const c={traceTag:null,siblingCount:0,isLocallyOriginated:!1,method:"none",confidence:"none",inferredSrc:null,inferredName:null,evidence:[],thisPathLen:0,minPathLen:0,firstHopPrefix:null};let a=t._traceTag;if(!a&&t.payload&&(a=Te(t.payload)),!a)return{...c,evidence:["no traceTag — cannot correlate"]};const n=s.get(a)??[],l=N=>N.path_length!=null?N.path_length:Array.isArray(N.original_path)?N.original_path.length:0,o=l(t),x=n.length>0?Math.min(...n.map(l)):o,m=t.payload?t.payload.slice(18):"",g=m.length>=2?m.slice(0,2).toUpperCase():null,u=[];if(u.push(`traceTag: ${a}`),u.push(`siblings: ${n.length} observation${n.length!==1?"s":""}`),t.packet_origin==="tx_local")return u.push("packet_origin = tx_local → we initiated this trace"),{traceTag:a,siblingCount:n.length,isLocallyOriginated:!0,method:"tx_local",confidence:"certain",inferredSrc:"LOCAL",inferredName:null,evidence:u,thisPathLen:o,minPathLen:x,firstHopPrefix:g};const v=n.find(N=>N.packet_origin==="tx_local");if(v)return u.push(`sibling (hash ${v.packet_hash}) has packet_origin = tx_local`),{traceTag:a,siblingCount:n.length,isLocallyOriginated:!0,method:"tx_local",confidence:"certain",inferredSrc:"LOCAL",inferredName:null,evidence:u,thisPathLen:o,minPathLen:x,firstHopPrefix:g};if(u.push(`this observation: path_len=${o}, min across siblings: ${x}`),g){if(u.push(`first hop in target path: ${g}`),o===0)return u.push("path_len = 0 → heard directly from initiator (no SNR appended yet)"),u.push("initiator is a direct RF neighbor"),{traceTag:a,siblingCount:n.length,isLocallyOriginated:!1,method:"min_path_len",confidence:"speculative",inferredSrc:null,inferredName:null,evidence:[...u,"initiator is within direct RF range (zero forwarding hops)"],thisPathLen:o,minPathLen:x,firstHopPrefix:g};const f=Object.entries(r).filter(([k])=>k.replace(/^0x/i,"").slice(0,2).toUpperCase()===g);if(f.length===1){const[k,$]=f[0],h=$.name||$.node_name||null;return u.push(`first hop ${g} → unique neighbor: ${h??k}`),u.push("initiator is whoever sent TO this first hop"),{traceTag:a,siblingCount:n.length,isLocallyOriginated:!1,method:"first_hop_neighbor",confidence:"likely",inferredSrc:g,inferredName:h,evidence:u,thisPathLen:o,minPathLen:x,firstHopPrefix:g}}else f.length>1?u.push(`first hop ${g} matches ${f.length} neighbors (ambiguous)`):u.push(`first hop ${g} is not a known neighbor`)}return u.push("insufficient data to identify initiator"),{traceTag:a,siblingCount:n.length,isLocallyOriginated:!1,method:"none",confidence:"none",inferredSrc:null,inferredName:null,evidence:u,thisPathLen:o,minPathLen:x,firstHopPrefix:g}}let ne=null,ce=null;typeof window<"u"&&setTimeout(()=>{ue(()=>import("./usePipelineStore-D-0Ba45c.js"),__vite__mapDeps([0,1,2,3])).then(t=>{ne=t}),ue(()=>import("./index-2YU-f7O7.js").then(t=>t.g1),__vite__mapDeps([1,3])).then(t=>{ce=t})},0);const He={advertSender:null,advertNodeType:null,advertFlags:null,advertHasLocation:null,advertHasName:null,advertName:null,advertLatitude:null,advertLongitude:null,channelHash:null,byteLength:void 0,hopCount:0,isZeroHop:!0,preComputed:!1};function yt(t,s){const r=t.type??t.payload_type,c=Ne(r),a=Be(t.route),n=r===O.ADVERT,l=r===O.TRACE,o=r===O.PATH,x=r===O.GRP_TXT||r===O.GRP_DATA,m=Ie(t.snr,t.rssi),g=(m==null?void 0:m.finalGrade)??"critical",u=Ge(t.route),v=Ke(t.route),N=Ve(t.route),f=t.route==null?"unknown":u?"flood":v?"direct":"unknown",k=N?`transport-${f}`:f,$=!!s.advertSender;let h="none";$?h="pubkey":x?h="encrypted":t.src_hash&&(h="prefix");const y=gt(r),p=s.advertNodeType!=null?ke(s.advertNodeType):"unknown",_=y!=="unknown"?y:p,H=t.packet_origin??"rx",C=Math.floor(Date.now()/1e3)-t.timestamp,D=C<10?"live":C<300?"recent":C<3600?"warm":C<86400?"stale":"historic",L=t.path_length??(Array.isArray(t.original_path)?t.original_path.length:void 0),P=Array.isArray(t.original_path)&&t.original_path.length>0,R=L??0,b=s.byteLength??(t.raw_packet?Math.floor(t.raw_packet.length/2):0),w=ft(t);return{pType:r,payloadTypeName:c,routeTypeName:a,isAdvert:n,isTrace:l,isPath:o,isGrp:x,signalClass:g,routeClass:k,isFlood:u,isDirect:v,hasTransport:N,senderTier:h,hasPubkey:$,inferredType:y,advertType:p,effectiveType:_,origin:H,age:D,pathLen:L,pathAvail:P,pathHopCount:R,byteLen:b,dupeAnalysis:w}}function jt(t){var f,k,$,h,y,p;const s=pt(t);if(!s||s.pathHashes.length===0)return null;const{pathHashes:r,snrValues:c}=s;if(r.length<2||!ne||!ce)return null;const a=ne.usePipelineStore.getState().srcHashResolverMap,n=ne.usePipelineStore.getState().neighborContext,l=(n==null?void 0:n.hashToName)??new Map,o=ce.useStore.getState().stats,x=(o==null?void 0:o.neighbors)??{},m=o==null?void 0:o.local_hash,g=(k=(f=o==null?void 0:o.config)==null?void 0:f.repeater)==null?void 0:k.latitude,u=(h=($=o==null?void 0:o.config)==null?void 0:$.repeater)==null?void 0:h.longitude,v=Object.keys(x).length>0?qe([],x,m,g,u):null,N=[];for(let _=0;_0?[r[_-1].toUpperCase()]:[]],P=ge(H,_,L,a,v),R=[H,..._+20?N:null}function ge(t,s,r,c,a){if(s===0){const l=c==null?void 0:c.get(t);if(l)return{hash:l,confidence:.8};if(a){const o=pe(a,t,{position:s,adjacentPrefixes:r});if(o.hash)return{hash:o.hash,confidence:o.confidence}}}else{if(a){const o=pe(a,t,{position:s,adjacentPrefixes:r});if(o.hash)return{hash:o.hash,confidence:o.confidence}}const l=c==null?void 0:c.get(t);if(l)return{hash:l,confidence:.6}}return{hash:null,confidence:0}}function vt(t){var l;const s=t.raw_packet;if(!s||s.length<2)return null;const r=s.replace(/\s/g,""),c=Math.floor(r.length/2),a=((l=r.match(/.{1,2}/g))==null?void 0:l.join(" "))??"";let n="";for(let o=0;o=32&&x<=126?String.fromCharCode(x):"·"}return{hexBytes:a,utf8:n,byteCount:c}}function Nt(t){const s=new Map;let r=0,c="";for(const a of t){if((a.type??a.payload_type)!==O.TRACE)continue;r++,c=a.packet_hash;const l=a._traceTag??(a.payload?Te(a.payload):null);if(!l)continue;let o=s.get(l);o||(o=[],s.set(l,o)),o.push(a)}return{index:s,fingerprint:`${r}:${c}`}}function wt(t,s,r){const c=T.useRef({parse:0,decode:0,enrich:0,traceIndex:0,total:0}),a=T.useMemo(()=>t?vt(t):null,[t]),n=T.useMemo(()=>{if(!s||s.length<4)return c.current.parse=0,c.current.decode=0,null;const h=performance.now(),y=ut(s),p=performance.now()-h;return y?(c.current.parse=p,c.current.decode=0,{protocolPacket:y.packet,display:{headerFields:y.headerFields,transportCodesHex:y.transportCodesHex,pathLengthHex:y.pathLengthHex,pathDataHex:y.pathDataHex,payloadHex:y.payloadHex,payloadByteOffset:y.payloadStartByte,pathByteOffset:y.pathByteOffset,pathLenByteOffset:y.pathLenByteOffset},decoded:y.decoded,error:null}):(c.current.parse=p,c.current.decode=0,{protocolPacket:null,display:null,decoded:null,error:"Packet.fromHex() returned failure"})},[s]),l=T.useMemo(()=>{if(!t)return c.current.enrich=0,He;const h=performance.now();if(t._advertSender!==void 0)return c.current.enrich=performance.now()-h,{advertSender:t._advertSender??null,advertNodeType:t._advertNodeType??null,advertFlags:t._advertFlags??null,advertHasLocation:t._advertHasLocation??null,advertHasName:t._advertHasName??null,advertName:t._advertName??null,advertLatitude:t._advertLatitude??null,advertLongitude:t._advertLongitude??null,channelHash:t._channelHash??null,byteLength:t._byteLength,hopCount:t._hopCount??0,isZeroHop:t._isZeroHop??!0,preComputed:!0};const y=t.type??t.payload_type,p=Fe(s,y),_=Ee(s,y),H=Oe(s,t),C=ze(t);return c.current.enrich=performance.now()-h,{...p,channelHash:_,byteLength:H,...C,preComputed:!1}},[t,s]),o=T.useRef({fingerprint:"",index:new Map}),x=T.useMemo(()=>{const h=performance.now(),{index:y,fingerprint:p}=Nt(r);return c.current.traceIndex=performance.now()-h,p===o.current.fingerprint?o.current.index:(o.current={fingerprint:p,index:y},y)},[r]),m=T.useMemo(()=>{const h=c.current;return{parse:h.parse,decode:h.decode,enrich:h.enrich,traceIndex:h.traceIndex,total:h.parse+h.decode+h.enrich+h.traceIndex}},[n,l,x]);if(!t)return null;const g=s?n?n.error:"rawHex too short":"No raw_packet (warm-tier)",u=(n==null?void 0:n.protocolPacket)??null,v=u?u.payloadVersion:null,N=v===0,f=v===1,k=yt(t,l);let $=null;return k.isTrace&&($=jt(t)),{wire:a,display:(n==null?void 0:n.display)??null,parseError:g,protocolPacket:u,decoded:(n==null?void 0:n.decoded)??null,payloadVersion:v,isV1:N,isV2:f,enrichment:l,traceTagIndex:x,analysis:k,traceHopDetail:$,timing:m}}function ae({options:t,nextFn:s}){var n;const r=t.find(l=>l.active),c=(r==null?void 0:r.color)??"green",a=((n=I[c])==null?void 0:n.stem)??"bg-edge-subtle";return e.jsxs("div",{className:"flex flex-col items-start py-1 gap-0 px-2",children:[e.jsx("div",{className:`w-px h-2 ml-4 ${a}`}),e.jsxs("div",{className:"border border-dashed border-edge-subtle rounded-md overflow-hidden w-full",children:[t.map((l,o)=>{const x=I[l.color??"green"]??I.green;return e.jsxs("div",{className:`flex items-center gap-1.5 px-2 py-px font-mono text-[10px] leading-relaxed transition-opacity ${l.active?x.row:"opacity-25"}`,children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${l.active?x.dot:"border border-zinc-500/40"}`}),e.jsx("span",{className:`w-16 shrink-0 font-medium ${l.active?"text-fg-primary":"text-fg-muted"}`,children:l.label}),l.detail&&e.jsx("span",{className:l.active?"text-fg-primary/70":"text-fg-muted",children:l.detail})]},o)}),s&&e.jsx("div",{className:"flex items-center px-2 py-0.5 border-t border-edge-subtle",children:e.jsxs("span",{className:"text-[10px] text-fg-muted font-mono",children:["→ ",s]})})]}),e.jsx("div",{className:`w-px h-2 ml-4 ${a}`})]})}function Ct({tokens:t,nextFn:s}){var n;const r=t.find(l=>l.active),c=(r==null?void 0:r.color)??"green",a=((n=I[c])==null?void 0:n.stem)??"bg-edge-subtle";return e.jsxs("div",{className:"flex flex-col items-start py-1 gap-0 px-2",children:[e.jsx("div",{className:`w-px h-2 ml-4 ${a}`}),e.jsxs("div",{className:"border border-dashed border-edge-subtle rounded-md overflow-hidden w-full",children:[t.map((l,o)=>{const x=I[l.color??"green"]??I.green;return e.jsxs("div",{className:`flex items-center gap-1 px-2 py-px font-mono text-[10px] leading-relaxed transition-opacity ${l.active?x.row:"opacity-25"}`,children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${l.active?x.dot:"border border-zinc-500/40"}`}),e.jsx("span",{className:"text-fg-muted shrink-0",children:l.fn}),e.jsxs("span",{className:l.active?"text-fg-primary":"text-fg-muted",children:["(",l.value??"",")"]})]},o)}),s&&e.jsx("div",{className:"flex items-center px-2 py-0.5 border-t border-edge-subtle",children:e.jsxs("span",{className:"text-[10px] text-fg-muted font-mono",children:["→ ",s]})})]}),e.jsx("div",{className:`w-px h-2 ml-4 ${a}`})]})}const St={0:"border-l-sys-green",1:"border-l-sys-blue",2:"border-l-sys-teal",3:"border-l-sys-purple"};function le({stage:t,name:s,fn:r,verdict:c,timeMs:a,skipped:n,skipReason:l,children:o}){const x=St[t]??"";return e.jsx(e.Fragment,{children:e.jsx(G,{defaultOpen:!n,children:e.jsxs("div",{className:`surface-base rounded-lg border border-edge-subtle overflow-hidden border-l-2 ${x}`,children:[e.jsxs(K,{className:"px-3 py-2 w-full",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("span",{className:"font-mono text-xs font-bold text-sys-blue shrink-0",children:t}),e.jsx("span",{className:"font-mono text-xs font-medium text-fg-primary truncate",children:s}),r&&!c&&e.jsx("span",{className:"font-mono text-[11px] text-fg-muted truncate hidden sm:inline",children:r}),c&&e.jsx("span",{className:"font-mono text-[11px] text-fg-muted/70 truncate hidden sm:inline",children:c})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[n&&e.jsx("span",{className:"font-mono text-[10px] px-1.5 py-0.5 rounded bg-zinc-500/20 text-fg-muted",children:"N/A"}),a!=null&&!n&&e.jsx("span",{className:"font-mono text-[10px] px-1.5 py-0.5 rounded bg-sys-green/15 text-sys-green",children:a<1?`${(a*1e3).toFixed(0)}µs`:`${a.toFixed(2)}ms`})]})]}),e.jsx(V,{children:e.jsx("div",{className:"px-3 pb-3 font-mono text-xs",children:n?e.jsx("p",{className:"text-fg-muted italic",children:l??"Not applicable for this packet type"}):o})})]})})})}function Tt(t,s){return s?"manual":t._stripped?"bulk-tier":Ue.isConnected()?"ws-push":"rest-poll"}const _t={connected:"green",degraded:"amber",offline:"red"};function kt({packet:t,isSynthetic:s}){const r=xe(g=>g.wsState),c=xe(g=>g.health),a=Tt(t,s),l=!!t._stripped?"WARM":"HOT",o=[{label:"ws-push",detail:"wsConnected && onPacket()",active:a==="ws-push",color:"green"},{label:"rest-poll",detail:"!wsConnected, 3s interval",active:a==="rest-poll",color:"amber"},{label:"catchup",detail:"wsReconnected, delta > 50",active:a==="catchup",color:"amber"},{label:"bulk-tier",detail:"user extends time range → gzip",active:a==="bulk-tier",color:"blue"},{label:"manual",detail:"hex input — no transport",active:a==="manual",color:"zinc"}],x=[{fn:"transport",value:a,group:"transport",color:a==="ws-push"?"green":a==="bulk-tier"?"blue":"amber"},{fn:"tier",value:l,group:"transport",color:"blue"},{fn:"wsState",value:r,group:"transport",color:r==="connected"?"green":"amber"},{fn:"health",value:c,group:"transport",color:_t[c]}],m=s?"manual hex input":`${a} (${c})`;return e.jsx(le,{stage:0,name:"TRANSPORT",fn:"websocketService / useStore.startPolling",verdict:m,children:s?e.jsx("p",{className:"text-fg-muted italic",children:"Manual hex input — no transport context"}):e.jsx(q,{prefix:"transport",children:e.jsxs("div",{className:"space-y-0",children:[e.jsx(ae,{options:o,nextFn:"ingest()"}),e.jsx(se,{tokens:x})]})})})}function U({start:t,end:s}){const r=s!=null&&s!==t?`[${t}..${s}]`:`[${t}]`;return e.jsx("span",{className:"text-fg-muted text-[9px] font-mono mr-1 select-none",children:r})}const Ht={advert:"decodeAdvert()",ack:"decodeAck()",path:"decodePath()",trace:"decodeTraceWithSnr()",txt_msg:"decodeTextMessage()",grp_txt:"decodeGroupText()",grp_data:"decodeGroupData()",multipart:"decodeMultipart()",control:"decodeControl()",req:"decodeRequest()",response:"decodeResponse()",anon_req:"decodeAnonReq()",generic:"decodeGeneric()"};function $t({rawHex:t,display:s,protocolPacket:r,parseError:c,parseTimeMs:a,payloadVersion:n,isV1:l,isV2:o}){return e.jsx("dl",{className:"space-y-0.5",children:s&&r&&t?e.jsxs(e.Fragment,{children:[e.jsx(E,{title:"A. Parse — Packet.fromHex()"}),a>0&&e.jsx("div",{className:"flex justify-end",children:e.jsx("span",{className:"font-mono text-[10px] px-1.5 py-0.5 rounded bg-sys-green/15 text-sys-green",children:a<1?`${(a*1e3).toFixed(0)}µs`:`${a.toFixed(2)}ms`})}),e.jsxs(i,{label:"header byte",children:[e.jsx(U,{start:0}),e.jsx(A,{value:t.slice(0,2)})," ",e.jsx(xt,{value:parseInt(t.slice(0,2),16)})]}),s.headerFields.map(x=>e.jsx(i,{label:` ${x.field}`,children:e.jsx(F,{raw:e.jsxs("span",{className:"text-[10px]",children:["bits[",x.bits,"] = ",x.binary]}),children:e.jsx("span",{className:"inline-block border border-edge-subtle rounded px-2 py-0.5 font-mono text-[11px] text-sys-amber",children:x.value})})},x.field)),e.jsx(i,{label:" version",children:n!=null?e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(d,{fn:"payloadVer",value:`${n}`,color:"amber"}),e.jsx(M,{color:l?"green":o?"blue":"zinc",children:l?"v1":o?"v2":`v${n}`}),l&&e.jsx("span",{className:"text-fg-muted text-[10px]",children:"1-byte hashes, 2-byte MAC"}),o&&e.jsx("span",{className:"text-sys-blue text-[10px]",children:"2-byte hashes, 4-byte MAC (speculative)"})]}):e.jsx("span",{className:"text-fg-muted",children:"unknown"})}),e.jsx(E,{title:"Wire Framing"}),e.jsx(i,{label:"transportCodes",children:s.transportCodesHex?e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(U,{start:1,end:4}),e.jsx(d,{fn:"transport",value:s.transportCodesHex,color:"amber"})]}):e.jsx("span",{className:"text-fg-muted",children:"N/A (non-transport route)"})}),e.jsx(i,{label:"pathLen",children:e.jsx(F,{raw:e.jsxs(e.Fragment,{children:[e.jsx(U,{start:s.pathLenByteOffset}),e.jsx(A,{value:s.pathLengthHex})]}),children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(U,{start:s.pathLenByteOffset}),e.jsx(d,{fn:"pathLen",value:`${r.pathLen} hop${r.pathLen!==1?"s":""}`,color:"amber"})]})})}),e.jsx(i,{label:"path",children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.pathLen>0&&e.jsx(U,{start:s.pathByteOffset,end:s.pathByteOffset+r.pathLen-1}),e.jsx(re,{hops:r.pathHexArray,hexPrefix:s.pathDataHex||void 0})]})}),e.jsx(i,{label:"payloadLen",children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(U,{start:s.payloadByteOffset,end:s.payloadByteOffset+s.payloadHex.length/2-1}),e.jsx(d,{fn:"payloadLen",value:`${s.payloadHex.length/2} bytes`,color:"amber"})]})}),e.jsx(i,{label:"payloadHex",children:e.jsx("span",{className:"inline-block border border-edge-subtle rounded px-2 py-0.5 font-mono text-[11px] text-sys-amber break-all",children:s.payloadHex})})]}):e.jsxs(e.Fragment,{children:[e.jsx(E,{title:"A. Parse"}),e.jsxs(i,{label:"result",children:[e.jsx("span",{className:"inline-block border border-edge-subtle rounded px-2 py-0.5 font-mono text-[11px] text-sys-amber",children:"Skipped"}),e.jsx("span",{className:"ml-1 text-fg-muted",children:c??"No raw_packet (warm-tier)"})]})]})})}function Dt({decoded:t,packet:s}){if(!t)return e.jsxs(e.Fragment,{children:[e.jsx(E,{title:"B. Decode"}),e.jsx("p",{className:"text-fg-muted italic text-[10px]",children:"No decoded payload"})]});const r=Ht[t.type]??`decode${t.type}()`;return e.jsxs(e.Fragment,{children:[e.jsx(E,{title:"B. Decode — decodePayload()"}),e.jsx(q,{prefix:"decodePayload",children:e.jsxs("dl",{className:"space-y-0.5",children:[e.jsx(i,{label:"dispatched",children:r}),e.jsx(E,{}),e.jsx(Lt,{decoded:t,packet:s})]})})]})}function Lt({decoded:t,packet:s}){var r;switch(t.type){case"advert":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"publicKey",children:e.jsx(F,{raw:e.jsx("span",{className:"text-[10px] break-all",children:t.publicKey}),children:e.jsx(d,{fn:"publicKey",value:t.publicKey,color:"green"})})}),e.jsx(i,{label:"timestamp",children:e.jsx(d,{fn:"timestamp",value:String(t.timestamp),color:"green"})}),e.jsx(i,{label:"flags",children:e.jsx(F,{raw:e.jsx(A,{value:t.flags}),children:e.jsx(d,{fn:"flags",value:t.flagsDescription,color:"green"})})}),e.jsx(i,{label:"nodeType",children:e.jsx(d,{fn:"nodeType",value:t.nodeType,color:"green"})}),t.latitude!=null&&e.jsx(i,{label:"latitude",children:e.jsx(d,{fn:"lat",value:t.latitude.toFixed(6),color:"green"})}),t.longitude!=null&&e.jsx(i,{label:"longitude",children:e.jsx(d,{fn:"lon",value:t.longitude.toFixed(6),color:"green"})}),t.name&&e.jsx(i,{label:"name",children:e.jsx(d,{fn:"name",value:t.name,color:"green"})})]});case"ack":return e.jsx(i,{label:"crc",children:e.jsx(F,{raw:e.jsx("span",{className:"text-[10px]",children:t.crc}),children:e.jsx(d,{fn:"crc",value:t.crc,color:"green"})})});case"trace":{const c=s!=null&&s.src_hash?s.src_hash.replace(/^0x/i,"").slice(0,2).toUpperCase():null;return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"traceTag",children:e.jsx(d,{fn:"traceTag",value:t.traceTag,color:"green"})}),e.jsx(i,{label:"authCode",children:e.jsx(d,{fn:"authCode",value:String(t.authCode),color:"green"})}),e.jsx(i,{label:"flags",children:e.jsx(A,{value:t.flags})}),e.jsx(i,{label:"target path",children:t.pathHashes.length>0?e.jsx(re,{hops:t.pathHashes.map(a=>a.toUpperCase()),color:"green"}):e.jsx("span",{className:"text-fg-muted italic",children:"∅ empty"})}),e.jsx(i,{label:"complete",children:t.isComplete?e.jsxs("span",{className:"text-sys-green",children:["✓ all ",t.pathHashes.length," hops reported SNR"]}):e.jsxs("span",{className:"text-sys-amber",children:["✗ ",t.snrValues.length,"/",t.pathHashes.length," hops reported"]})}),e.jsx(E,{}),e.jsxs("div",{children:[e.jsx("p",{className:"text-fg-muted mb-1 text-[10px]",children:"Directional Edge SNR — per-hop link quality"}),t.snrValues.length===0?e.jsx("p",{className:"text-fg-muted italic text-[11px] ml-2",children:"No SNR values in path field"}):e.jsx("div",{className:"space-y-0.5 ml-2",children:t.snrValues.map((a,n)=>{var g,u,v,N,f;const l=((g=t.pathHashes[n])==null?void 0:g.toUpperCase())??"??",o=n===0?c??"SRC":((u=t.pathHashes[n-1])==null?void 0:u.toUpperCase())??"??",x=(f=(N=(v=Ye.getState().stats)==null?void 0:v.config)==null?void 0:N.radio)==null?void 0:f.spreading_factor,m=we(a,x);return e.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-mono",children:[e.jsx("span",{className:"text-fg-muted w-3 text-right",children:n}),e.jsx("span",{className:"text-fg-primary",children:o}),e.jsx("span",{className:"text-fg-muted",children:"→"}),e.jsx("span",{className:"text-fg-primary",children:l}),e.jsx("span",{className:"text-fg-muted",children:"@"}),e.jsxs("span",{className:"font-bold text-sys-green",children:[a>0?"+":"",a.toFixed(1)," dB"]}),e.jsx(M,{color:"green",children:m})]},n)})})]})]})}case"path":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"pathLength",children:e.jsx(d,{fn:"pathLength",value:String(t.pathLength),color:"green"})}),e.jsx(i,{label:"path",children:t.path&&t.path.length>0?e.jsx(re,{hops:t.path.map(c=>c.toUpperCase()),color:"green"}):e.jsx("span",{className:"text-fg-muted italic",children:"∅ empty"})}),t.extraType!=null&&e.jsx(i,{label:"extraType",children:e.jsx(d,{fn:"extraType",value:t.extraTypeName??String(t.extraType),color:"purple"})}),t.extraData&&e.jsxs(i,{label:"extraData",children:[e.jsx("span",{className:"break-all text-[10px] font-mono",children:t.extraData}),e.jsxs("span",{className:"text-fg-muted ml-1",children:["(",t.extraData.length/2,"B)"]})]})]});case"txt_msg":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"destHash",children:e.jsx(F,{raw:e.jsx(A,{value:t.destHash}),children:e.jsx(d,{fn:"destHash",value:t.destHash,color:"green"})})}),e.jsx(i,{label:"srcHash",children:e.jsx(F,{raw:e.jsx(A,{value:t.srcHash}),children:e.jsx(d,{fn:"srcHash",value:t.srcHash,color:"green"})})}),e.jsx(i,{label:"cipherMac",children:e.jsx(d,{fn:"cipherMac",value:t.cipherMac,color:"purple"})}),e.jsx(i,{label:"timestamp",children:e.jsx(d,{fn:"timestamp",value:String(t.timestamp),color:"green"})}),e.jsx(i,{label:"text",children:e.jsx(d,{fn:"text",value:t.text,color:"green"})}),e.jsx(i,{label:"encrypted",children:e.jsx(d,{fn:"encrypted",value:String(t.encrypted),color:"green"})})]});case"grp_txt":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"channelHash",children:e.jsx(A,{value:t.channelHash})}),t.channelName&&e.jsx(i,{label:"channelName",children:e.jsx(d,{fn:"channel",value:t.channelName,color:"green"})}),e.jsx(i,{label:"decrypted",children:e.jsx(d,{fn:"decrypted",value:String(t.decrypted),color:"green"})}),t.text&&e.jsx(i,{label:"text",children:e.jsx(d,{fn:"text",value:t.text,color:"green"})}),t.senderName&&e.jsx(i,{label:"senderName",children:e.jsx(d,{fn:"sender",value:t.senderName,color:"green"})}),t.macCorrupted&&e.jsx(i,{label:"macCorrupted",children:e.jsx(d,{fn:"macCorrupted",value:"true",color:"green"})})]});case"grp_data":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"channelHash",children:e.jsx(A,{value:t.channelHash})}),e.jsx(i,{label:"dataLength",children:t.dataLength}),e.jsx(i,{label:"decrypted",children:String(t.decrypted)})]});case"multipart":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"messageId",children:t.messageId}),e.jsxs(i,{label:"part",children:[t.partNumber+1," / ",t.totalParts]})]});case"control":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"controlType",children:e.jsx(F,{raw:e.jsx(A,{value:t.controlType}),children:e.jsx(d,{fn:"controlType",value:t.subtypeName,color:"green"})})}),e.jsx(i,{label:"subtype",children:e.jsx(d,{fn:"subtype",value:`0x${t.subtype.toString(16).padStart(2,"0")}`,color:"green"})}),t.nodeTypeName&&e.jsxs(i,{label:"nodeType",children:[e.jsx(d,{fn:"nodeType",value:t.nodeTypeName,color:"green"}),e.jsxs("span",{className:"text-fg-muted text-[10px] ml-1",children:["(flags & 0x0F = 0x",(r=t.nodeType)==null?void 0:r.toString(16).padStart(2,"0"),")"]})]}),t.snrDb!=null&&e.jsxs(i,{label:"snr",children:[e.jsxs("span",{className:"font-bold text-sys-green",children:[t.snrDb>0?"+":"",t.snrDb.toFixed(1)," dB"]}),e.jsx(M,{color:"green",children:t.snrDb>=5?"strong":t.snrDb>=0?"fair":"weak"})]}),t.tag&&e.jsx(i,{label:"tag",children:e.jsx(d,{fn:"tag",value:t.tag,color:"green"})}),t.publicKey&&e.jsxs(i,{label:"publicKey",children:[e.jsx("span",{className:"break-all text-[10px] font-mono text-sys-green",children:t.publicKey}),e.jsx(M,{color:t.publicKeyFull?"green":"amber",children:t.publicKeyFull?"32B full":`${t.publicKey.length/2}B prefix`})]}),t.typeFilter!=null&&e.jsx(i,{label:"typeFilter",children:e.jsx(F,{raw:e.jsx(A,{value:t.typeFilter}),children:e.jsx(d,{fn:"typeFilter",value:t.typeFilterDescription??"none",color:"green"})})}),t.prefixOnly!=null&&e.jsx(i,{label:"prefixOnly",children:e.jsx(d,{fn:"prefixOnly",value:String(t.prefixOnly),color:"green"})}),t.since!=null&&e.jsx(i,{label:"since",children:e.jsx(d,{fn:"since",value:t.since===0?"all (0)":String(t.since),color:"green"})}),!t.nodeTypeName&&t.typeFilter==null&&t.dataLength>0&&e.jsxs(i,{label:"data",children:[e.jsx("span",{className:"break-all text-[10px] font-mono",children:t.dataHex}),e.jsxs("span",{className:"text-fg-muted ml-1",children:["(",t.dataLength,"B)"]})]})]});case"req":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"destHash",children:e.jsx(F,{raw:e.jsx(A,{value:t.destHash}),children:e.jsx(d,{fn:"destHash",value:t.destHash,color:"green"})})}),e.jsx(i,{label:"srcHash",children:e.jsx(F,{raw:e.jsx(A,{value:t.srcHash}),children:e.jsx(d,{fn:"srcHash",value:t.srcHash,color:"green"})})}),e.jsx(i,{label:"cipherMac",children:e.jsx(d,{fn:"cipherMac",value:t.cipherMac,color:"purple"})}),e.jsxs(i,{label:"ciphertext",children:[e.jsx("span",{className:"break-all text-[10px] font-mono",children:t.ciphertextHex}),e.jsxs("span",{className:"text-fg-muted ml-1",children:["(",t.ciphertextLength,"B)"]})]})]});case"response":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"destHash",children:e.jsx(F,{raw:e.jsx(A,{value:t.destHash}),children:e.jsx(d,{fn:"destHash",value:t.destHash,color:"green"})})}),e.jsx(i,{label:"srcHash",children:e.jsx(F,{raw:e.jsx(A,{value:t.srcHash}),children:e.jsx(d,{fn:"srcHash",value:t.srcHash,color:"green"})})}),e.jsx(i,{label:"cipherMac",children:e.jsx(d,{fn:"cipherMac",value:t.cipherMac,color:"purple"})}),e.jsxs(i,{label:"ciphertext",children:[e.jsx("span",{className:"break-all text-[10px] font-mono",children:t.ciphertextHex}),e.jsxs("span",{className:"text-fg-muted ml-1",children:["(",t.ciphertextLength,"B)"]})]})]});case"anon_req":return e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"destHash",children:e.jsx(F,{raw:e.jsx(A,{value:t.destHash}),children:e.jsx(d,{fn:"destHash",value:t.destHash,color:"green"})})}),e.jsx(i,{label:"senderPubKey",children:e.jsx("span",{className:"break-all text-[10px] font-mono text-sys-green",children:t.senderPublicKey})}),e.jsx(i,{label:"cipherMac",children:e.jsx(d,{fn:"cipherMac",value:t.cipherMac,color:"purple"})}),e.jsxs(i,{label:"ciphertext",children:[e.jsx("span",{className:"break-all text-[10px] font-mono",children:t.ciphertextHex}),e.jsxs("span",{className:"text-fg-muted ml-1",children:["(",t.ciphertextLength,"B)"]})]})]});case"generic":return e.jsxs(e.Fragment,{children:[e.jsxs(i,{label:"payloadType",children:[e.jsx(ht,{value:t.payloadType})," (",t.payloadTypeName,")"]}),e.jsx(i,{label:"length",children:t.length}),e.jsx(i,{label:"rawHex",children:e.jsx("span",{className:"break-all",children:t.rawHex})})]});default:return e.jsx("p",{className:"text-fg-muted",children:"Unknown decoded type"})}}function Pt({protocolPacket:t,packetHash:s}){const r=t==null?void 0:t.payloadType,c=r===Ze||r===Xe,a=T.useMemo(()=>{if(!c||!t)return null;const p=t.payload;return p.length<4?null:{channelHash:p[0],mac:p.slice(1,3),ciphertext:p.slice(3)}},[t,c]),[n,l]=T.useState("pending"),[o,x]=T.useState([]),[m,g]=T.useState(0);T.useEffect(()=>{if(!a){l(null);return}let p=!1;return(async()=>{const H=performance.now(),C=await Qe(a.channelHash,a.mac,a.ciphertext);p||(l(C),g(performance.now()-H));const D=await Je(a.channelHash);p||x(D)})(),()=>{p=!0}},[a]);const[u,v]=T.useState(""),[N,f]=T.useState(null),[k,$]=T.useState(!1),h=T.useCallback(async()=>{if(!(!a||!u.trim())){$(!0);try{const p=await We(u.trim(),a.channelHash,a.mac,a.ciphertext);if(p.success){const _=new TextDecoder("utf-8",{fatal:!1}).decode(p.result.plaintext.slice(5));f({success:!0,text:_})}else f({success:!1,error:p.error})}catch(p){f({success:!1,error:String(p)})}finally{$(!1)}}},[a,u]),y=Ce(s);return!c||!a?null:e.jsxs(e.Fragment,{children:[e.jsx(E,{title:"C. Decrypt — tryDecryptGroupMessage()"}),m>0&&e.jsx("div",{className:"flex justify-end",children:e.jsx("span",{className:"font-mono text-[10px] px-1.5 py-0.5 rounded bg-sys-green/15 text-sys-green",children:m<1?`${(m*1e3).toFixed(0)}µs`:`${m.toFixed(2)}ms`})}),e.jsx(q,{prefix:"tryDecryptGroupMessage",children:e.jsxs("dl",{className:"space-y-0.5",children:[e.jsx(i,{label:"channelHash",children:e.jsx(d,{fn:"channelHash",value:`0x${a.channelHash.toString(16).toUpperCase().padStart(2,"0")}`,color:"teal"})}),e.jsx(i,{label:"mac",children:e.jsx(d,{fn:"mac",value:Array.from(a.mac).map(p=>p.toString(16).padStart(2,"0")).join(""),color:"teal"})}),e.jsx(i,{label:"cipherLen",children:e.jsx(d,{fn:"cipherLen",value:`${a.ciphertext.length}B`,color:"teal"})}),e.jsx(i,{label:"candidates",children:e.jsx(d,{fn:"candidates",value:o.length>0?`${o.length} names`:"0",color:o.length>0?"teal":"zinc"})}),o.length>0&&e.jsxs("details",{className:"mt-1",children:[e.jsx("summary",{className:"text-fg-muted cursor-pointer hover:text-fg-primary text-[10px]",children:"show candidate names"}),e.jsx("div",{className:"mt-1 text-[10px] text-fg-muted break-all max-h-24 overflow-y-auto",children:o.join(", ")})]}),e.jsx(E,{}),e.jsxs("div",{children:[e.jsx("p",{className:"text-fg-muted mb-1",children:"Result:"}),n==="pending"?e.jsx("p",{className:"text-fg-muted italic",children:"decrypting…"}):n?e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"channel",children:e.jsx(d,{fn:"channel",value:n.channelName,color:"teal"})}),e.jsx(i,{label:"plaintext",children:e.jsx(d,{fn:"plaintext",value:new TextDecoder("utf-8",{fatal:!1}).decode(n.plaintext.slice(5)).trim()||"(empty)",color:"teal"})}),e.jsx(i,{label:"macValid",children:e.jsx(d,{fn:"macValid",value:n.macCorrupted?"false":"true",color:"teal"})})]}):e.jsxs(i,{label:"decrypt",children:[e.jsx(d,{fn:"decrypt",value:"failed",color:"red"}),e.jsx("span",{className:"text-fg-muted ml-1",children:"channel not in known list"})]})]}),e.jsx(E,{}),e.jsxs("div",{children:[e.jsx("p",{className:"text-fg-muted mb-1",children:"testChannelName() — manual test:"}),e.jsxs("div",{className:"flex gap-1.5 items-center",children:[e.jsx("input",{type:"text",value:u,onChange:p=>{v(p.target.value),f(null)},onKeyDown:p=>p.key==="Enter"&&h(),placeholder:"channel name",className:"surface-input px-2 py-1 rounded text-[11px] font-mono text-fg-primary w-40"}),e.jsx("button",{onClick:h,disabled:k||!u.trim(),className:"px-2 py-1 rounded text-[10px] font-mono bg-sys-blue/20 text-sys-blue hover:bg-sys-blue/30 disabled:opacity-40 transition-colors",children:k?"…":"Try"})]}),N&&e.jsx("div",{className:"mt-1",children:N.success?e.jsx(i,{label:"result",children:e.jsx(d,{fn:"plaintext",value:N.text??"(empty)",color:"teal"})}):e.jsx(i,{label:"error",children:e.jsx(d,{fn:"error",value:N.error??"unknown",color:"red"})})})]}),e.jsx(E,{}),e.jsxs("div",{children:[e.jsx("p",{className:"text-fg-muted mb-1",children:"useDecodedMessage() store result:"}),y?y.decoded?e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"channel",children:e.jsx(d,{fn:"channel",value:y.decoded.channelName??"?",color:"teal"})}),e.jsx(i,{label:"text",children:e.jsx(d,{fn:"text",value:y.decoded.text,color:"teal"})})]}):e.jsx(i,{label:"decrypt",children:e.jsx(d,{fn:"decrypt",value:"failed",color:"red"})}):e.jsx(i,{label:"decrypt",children:e.jsx(d,{fn:"decrypt",value:"pending",color:"zinc"})})]})]})})]})}function Mt(t){const{rawHex:s,display:r,protocolPacket:c,decoded:a,parseError:n,parseTimeMs:l,payloadVersion:o,isV1:x,isV2:m,packetHash:g,packet:u}=t,v=!!s&&s.length>=4;return e.jsxs(G,{children:[e.jsx(K,{className:"w-full mt-2 mb-1",children:e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("span",{className:"text-[10px] font-mono text-fg-muted",children:"🔬"}),e.jsx("span",{className:"text-[10px] font-mono font-medium text-fg-muted",children:"Wire Inspection"}),e.jsx("span",{className:"text-[9px] text-fg-muted/50",children:"observatory diagnostic — not a runtime stage"})]})}),e.jsx(V,{children:e.jsxs("div",{className:"border border-dashed border-edge-subtle rounded-lg p-3 space-y-1 bg-surface/30",children:[e.jsx("p",{className:"text-[9px] text-fg-muted/50 mb-2",children:"The backend parsed these fields server-side. This panel verifies the wire-level encoding client-side."}),v?e.jsxs(e.Fragment,{children:[e.jsx($t,{rawHex:s,display:r,protocolPacket:c,parseError:n,parseTimeMs:l,payloadVersion:o,isV1:x,isV2:m}),e.jsx(Dt,{decoded:a,packet:u}),e.jsx(Pt,{protocolPacket:c,packetHash:g})]}):e.jsx("p",{className:"text-fg-muted italic text-[10px]",children:n??"No raw_packet — wire inspection unavailable (warm-tier packet)"})]})})]})}function fe(t){if(!t)return[{fn:"decode",value:"no raw_packet",group:"decode",color:"zinc"}];switch(t.type){case"advert":{const s=t,r=[{fn:"decode.nodeType",value:s.nodeType,group:"decode",color:"blue"}];return s.name&&r.push({fn:"decode.name",value:s.name,group:"decode",color:"blue"}),s.latitude!=null&&s.longitude!=null&&r.push({fn:"decode.location",value:`${s.latitude.toFixed(4)}, ${s.longitude.toFixed(4)}`,group:"decode",color:"blue"}),r.push({fn:"decode.publicKey",value:s.publicKey,group:"decode",color:"blue"}),r}case"trace":{const s=t;return[{fn:"decode.traceTag",value:s.traceTag,group:"decode",color:"blue"},{fn:"decode.hops",value:s.pathHashes.length>0?s.pathString:"empty",group:"decode",color:"blue"},{fn:"decode.snr",value:s.snrValues.length>0?`${s.snrValues.length} values`:"none",group:"decode",color:s.snrValues.length>0?"blue":"zinc"},{fn:"decode.complete",value:s.isComplete?"yes":"partial",group:"decode",color:s.isComplete?"green":"amber"}]}case"path":{const s=t,r=[{fn:"decode.pathLength",value:String(s.pathLength),group:"decode",color:"blue"},{fn:"decode.path",value:s.path.length>0?s.pathString:"empty",group:"decode",color:"blue"}];return s.extraType!=null&&r.push({fn:"decode.extraType",value:s.extraTypeName??String(s.extraType),group:"decode",color:"purple"}),s.extraData&&r.push({fn:"decode.extraData",value:`${s.extraData.length/2}B`,group:"decode",color:"purple"}),r}case"ack":return[{fn:"decode.crc",value:t.crc,group:"decode",color:"blue"}];case"grp_txt":return[{fn:"decode.channelHash",value:t.channelHash,group:"decode",color:"blue"},{fn:"decode.encrypted",value:"true — decrypt at cascade",group:"decode",color:"zinc"}];case"grp_data":{const s=t;return[{fn:"decode.channelHash",value:s.channelHash,group:"decode",color:"blue"},{fn:"decode.dataLength",value:`${s.dataLength}B`,group:"decode",color:"blue"}]}case"txt_msg":{const s=t;return[{fn:"decode.srcHash",value:s.srcHash,group:"decode",color:"blue"},{fn:"decode.destHash",value:s.destHash,group:"decode",color:"blue"},{fn:"decode.encrypted",value:s.encrypted?"true":"false",group:"decode",color:s.encrypted?"zinc":"green"},...s.encrypted?[]:[{fn:"decode.text",value:s.text,group:"decode",color:"blue"}]]}case"multipart":{const s=t;return[{fn:"decode.part",value:`${s.partNumber+1}/${s.totalParts}`,group:"decode",color:"blue"},{fn:"decode.msgId",value:s.messageId,group:"decode",color:"blue"}]}case"control":{const s=t,r=[{fn:"decode.subtype",value:s.subtypeName,group:"decode",color:"blue"}];return s.nodeTypeName&&r.push({fn:"decode.nodeType",value:s.nodeTypeName,group:"decode",color:"blue"}),s.snrDb!=null&&r.push({fn:"decode.snr",value:`${s.snrDb>0?"+":""}${s.snrDb.toFixed(1)} dB`,group:"decode",color:"blue"}),s.tag&&r.push({fn:"decode.tag",value:s.tag,group:"decode",color:"blue"}),s.publicKey&&r.push({fn:"decode.publicKey",value:s.publicKey,group:"decode",color:s.publicKeyFull?"green":"blue"}),s.typeFilter!=null&&r.push({fn:"decode.typeFilter",value:s.typeFilterDescription??`0x${s.typeFilter.toString(16)}`,group:"decode",color:"blue"}),s.prefixOnly!=null&&r.push({fn:"decode.prefixOnly",value:String(s.prefixOnly),group:"decode",color:"blue"}),!s.nodeTypeName&&!s.tag&&(r.push({fn:"decode.subtypeFlags",value:`0x${s.subtypeFlags.toString(16)}`,group:"decode",color:"blue"}),r.push({fn:"decode.dataLength",value:`${s.dataLength}B`,group:"decode",color:"blue"})),r}case"req":{const s=t;return[{fn:"decode.destHash",value:s.destHash,group:"decode",color:"blue"},{fn:"decode.srcHash",value:s.srcHash,group:"decode",color:"blue"},{fn:"decode.cipherMac",value:s.cipherMac,group:"decode",color:"purple"},{fn:"decode.ciphertext",value:`${s.ciphertextLength}B`,group:"decode",color:"zinc"}]}case"response":{const s=t;return[{fn:"decode.destHash",value:s.destHash,group:"decode",color:"blue"},{fn:"decode.srcHash",value:s.srcHash,group:"decode",color:"blue"},{fn:"decode.cipherMac",value:s.cipherMac,group:"decode",color:"purple"},{fn:"decode.ciphertext",value:`${s.ciphertextLength}B`,group:"decode",color:"zinc"}]}case"anon_req":{const s=t;return[{fn:"decode.destHash",value:s.destHash,group:"decode",color:"blue"},{fn:"decode.senderPubKey",value:s.senderPublicKey,group:"decode",color:"green"},{fn:"decode.cipherMac",value:s.cipherMac,group:"decode",color:"purple"},{fn:"decode.ciphertext",value:`${s.ciphertextLength}B`,group:"decode",color:"zinc"}]}case"generic":return[{fn:"decode.raw",value:`${t.length}B`,group:"decode",color:"zinc"}];default:return[]}}function Rt({packet:t,pipeline:s,rawHex:r,traceTagIndex:c,neighbors:a}){const{enrichment:n,timing:l,display:o,protocolPacket:x,decoded:m,parseError:g,payloadVersion:u,isV1:v,isV2:N,analysis:f}=s,$=(t.type??t.payload_type)===et,h=f.dupeAnalysis,y=T.useRef(0),p=T.useMemo(()=>{if(!$)return null;const D=performance.now(),L=bt(t,c,a);return y.current=performance.now()-D,L},[t,c,a,$]),_=l.enrich+y.current,H=[];f.byteLen&&H.push(`${f.byteLen}B`),H.push(f.payloadTypeName),n.advertName&&H.push(`"${n.advertName}"`),n.isZeroHop?H.push("zero-hop"):f.pathHopCount>0&&H.push(`${f.pathHopCount}h`),H.push(`${t.rssi}dBm`),h.isDuplicate&&H.push("DUPE");const C=H.join(" — ");return e.jsxs(le,{stage:1,name:"INGEST",fn:n.preComputed?"PacketCache.mergePackets()":"extractAdvertData() + extractHopData() + ...",verdict:C,timeMs:_,children:[e.jsx(Mt,{rawHex:r,display:o,protocolPacket:x,decoded:m,parseError:g,parseTimeMs:l.parse,payloadVersion:u,isV1:v,isV2:N,packetHash:t.packet_hash,packet:t}),e.jsx(E,{title:"Cache Enrichment"}),e.jsx(q,{prefix:"packetCache",children:e.jsxs("dl",{className:"space-y-0.5",children:[e.jsxs("div",{className:"mb-1.5",children:[n.preComputed?e.jsx(M,{color:"green",children:"PacketCache"}):e.jsx(M,{color:"amber",children:"computed"}),e.jsx("span",{className:"text-[10px] text-fg-muted ml-1.5",children:n.preComputed?"pre-enriched by real pipeline":"synthetic — computed on the fly"})]}),e.jsxs("div",{className:"flex flex-wrap gap-x-2 gap-y-1 mb-1",children:[e.jsx(d,{fn:"_byteLength",value:n.byteLength!=null?`${n.byteLength}B`:void 0,color:"blue"}),e.jsx(d,{fn:"_hopCount",value:String(n.hopCount),color:"blue"}),e.jsx(d,{fn:"_isZeroHop",value:String(n.isZeroHop),color:n.isZeroHop?"green":"blue"}),n.isZeroHop&&e.jsx(M,{color:"blue",children:"direct"}),n.channelHash!=null&&e.jsx(d,{fn:"_channelHash",value:n.channelHash,color:"blue"}),$&&t._traceTag&&e.jsx(d,{fn:"_traceTag",value:t._traceTag,color:"blue"})]}),n.advertSender||n.advertNodeType!=null||n.advertName!=null?e.jsxs("div",{className:"mt-1 mb-1",children:[e.jsx("p",{className:"text-[10px] text-sys-blue font-medium mb-0.5",children:"ADVERT Enrichment"}),e.jsxs("div",{className:"flex flex-wrap gap-x-2 gap-y-1",children:[n.advertSender&&e.jsx(d,{fn:"_advertSender",value:n.advertSender.slice(0,16)+"…",color:"blue"}),n.advertNodeType!=null&&e.jsx(d,{fn:"_advertNodeType",value:ke(n.advertNodeType),color:"blue"}),n.advertName!=null&&e.jsx(d,{fn:"_advertName",value:n.advertName,color:"blue"}),n.advertFlags!=null&&e.jsx(d,{fn:"_advertFlags",value:`0x${n.advertFlags.toString(16).padStart(2,"0")}`,color:"blue"}),n.advertHasLocation!=null&&e.jsx(d,{fn:"_advertHasLocation",value:String(n.advertHasLocation),color:"blue"}),n.advertHasName!=null&&e.jsx(d,{fn:"_advertHasName",value:String(n.advertHasName),color:"blue"}),n.advertLatitude!=null&&n.advertLongitude!=null&&e.jsx(d,{fn:"location",value:`${n.advertLatitude.toFixed(4)}, ${n.advertLongitude.toFixed(4)}`,color:"blue"})]})]}):e.jsx("p",{className:"text-[10px] text-fg-muted/30 mb-1",children:"ADVERT fields: N/A (non-ADVERT packet)"}),e.jsx(E,{title:"Payload Decode"}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${m?"bg-sys-blue":"bg-zinc-500/40"}`}),e.jsx("span",{className:"font-mono text-[10px] font-medium text-fg-primary",children:"decodePayload()"}),e.jsx("span",{className:"text-[9px] text-fg-muted",children:"sync — wire data only, no crypto"})]}),e.jsx("div",{className:"ml-3",children:m?e.jsx("div",{className:"flex flex-wrap gap-x-1.5 gap-y-1",children:fe(m).map((D,L)=>e.jsx("span",{className:"inline-block border border-edge-subtle rounded px-1.5 py-0.5",children:e.jsx(d,{fn:D.fn,value:D.value,color:D.color})},L))}):e.jsx(S,{children:"no raw_packet — warm-tier packet, decode unavailable"})})]}),e.jsx(E,{}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px] font-mono",children:[e.jsx("span",{className:"text-fg-muted",children:"dupe:"}),h.isDuplicate?e.jsx(d,{fn:"is_duplicate",value:"true",color:"purple"}):e.jsx(S,{children:"none"}),h.dupeCount>0&&e.jsx(d,{fn:"dupeCount",value:`×${h.dupeCount}`,color:"purple"}),h.rssiRange&&e.jsxs(S,{c:"text-fg-primary",children:["Δ",Math.abs(h.rssiRange[1]-h.rssiRange[0]),"dB RSSI"]})]}),p&&e.jsxs(e.Fragment,{children:[e.jsx(E,{}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px] font-mono",children:[e.jsx("span",{className:"text-fg-muted",children:"TRACE SRC:"}),p.inferredSrc?e.jsxs(e.Fragment,{children:[e.jsx(d,{fn:"inferredSrc",value:p.inferredSrc,color:"purple"}),p.inferredName&&e.jsx(d,{fn:"name",value:p.inferredName,color:"purple"})]}):e.jsx(S,{children:"unresolvable"}),e.jsx(_e,{color:"purple",children:p.method}),e.jsxs(S,{children:["(",p.confidence,")"]}),e.jsxs(S,{children:["siblings=",p.siblingCount]})]})]}),(()=>{const D=f.pType!=null?`0x${f.pType.toString(16).toUpperCase().padStart(2,"0")}`:void 0,L=t.route!=null?`0x${t.route.toString(16).toUpperCase().padStart(2,"0")}`:void 0,P=fe(m),R=f.signalClass==="excellent"||f.signalClass==="good"?"green":f.signalClass==="fair"?"amber":"red",b=f.senderTier==="pubkey"?"green":f.senderTier==="prefix"?"amber":f.senderTier==="encrypted"?"teal":"zinc",w=[{fn:"type",value:f.payloadTypeName,raw:D,group:"wire",color:"blue"},{fn:"route",value:f.routeTypeName,raw:L,group:"wire",color:"blue"},{fn:"src_hash",value:t.src_hash||void 0,group:"wire",color:"blue"},{fn:"rssi",value:`${t.rssi}dBm`,group:"wire",color:"blue"},{fn:"snr",value:`${t.snr}dB`,group:"wire",color:"blue"},{fn:"_byteLength",value:f.byteLen?`${f.byteLen}B`:void 0,group:"enrichment",color:"blue"},{fn:"_hopCount",value:String(n.hopCount),group:"enrichment",color:"blue"},{fn:"_isZeroHop",value:String(n.isZeroHop),group:"enrichment",color:"blue"},{fn:"_advertSender",value:n.advertSender||void 0,group:"enrichment",color:"blue"},{fn:"_advertNodeType",value:f.advertType!=="unknown"?f.advertType:void 0,group:"enrichment",color:"blue"},{fn:"_advertName",value:n.advertName||void 0,group:"enrichment",color:"blue"},{fn:"_channelHash",value:n.channelHash||void 0,group:"enrichment",color:"blue"},...P,{fn:"is_duplicate",value:String(h.isDuplicate),group:"analysis",color:"purple"},p!=null&&p.inferredSrc?{fn:"traceSrc",value:p.inferredSrc,group:"analysis",color:"purple"}:{fn:"traceSrc"},{fn:"_signalClass",value:f.signalClass,group:"analysis",color:R},{fn:"_routeClass",value:f.routeClass,group:"analysis",color:"purple"},{fn:"_senderTier",value:f.senderTier,group:"analysis",color:b},{fn:"_origin",value:f.origin,group:"analysis",color:f.origin==="tx_local"?"green":f.origin==="tx_forward"?"amber":"purple"},{fn:"_pathAvail",value:f.pathAvail?`${f.pathHopCount} hops`:"none",group:"analysis",color:f.pathAvail?"green":"zinc"},{fn:"_age",value:f.age,group:"analysis",color:f.age==="live"||f.age==="recent"?"green":"zinc"},...h.dupeCount>0?[{fn:"_dupeCount",value:`×${h.dupeCount}`,group:"analysis",color:"purple"},...h.rssiRange?[{fn:"_multipath",value:`Δ${Math.abs(h.rssiRange[1]-h.rssiRange[0])}dB`,group:"analysis",color:Math.abs(h.rssiRange[1]-h.rssiRange[0])>6?"amber":"green"}]:[]]:[],...t.lbt_attempts!=null?[{fn:"_lbt",value:`${t.lbt_attempts} attempt${t.lbt_attempts!==1?"s":""}`,group:"analysis",color:(t.lbt_attempts??0)>1?"amber":"green"}]:[],...t.drop_reason?[{fn:"_dropReason",value:t.drop_reason,group:"analysis",color:"red"}]:[]];return e.jsx(se,{tokens:w})})()]})})]})}function be(t){switch(t){case"excellent":return"green";case"good":return"green";case"fair":return"amber";case"poor":return"red";case"critical":return"red";default:return"zinc"}}function ye(t){return`${Math.round(t*100)}%`}function je(t,s,r){return t||(s?s.slice(0,12):`~${r}`)}function At({hops:t}){return t.length===0?null:e.jsxs("div",{className:"mt-2 pt-2 border-t border-edge-subtle/40",children:[e.jsx("p",{className:"text-[9px] text-fg-muted/40 uppercase tracking-widest font-mono mb-1.5",children:"per-hop trace inspection"}),e.jsx("div",{className:"space-y-1",children:t.map(s=>e.jsx(q,{prefix:`trace.hop[${s.hopIndex}]`,children:e.jsxs("div",{className:"border border-edge-subtle/40 rounded px-2 py-1.5",children:[e.jsxs(i,{label:"link",children:[e.jsx(re,{hops:[s.fromPrefix,s.toPrefix],color:"blue"}),e.jsx("span",{className:"ml-1.5",children:e.jsx(_e,{color:be(s.quality),children:s.quality})})]}),e.jsx(i,{label:"snr",children:e.jsx(F,{raw:e.jsx("span",{className:"text-sys-blue",children:s.snrRaw}),children:e.jsx(d,{fn:"snr",value:`${s.snrRaw.toFixed(1)} dB`,color:be(s.quality)})})}),e.jsxs(i,{label:"from",children:[e.jsx(d,{fn:"resolve",value:je(s.fromName,s.fromHash,s.fromPrefix),color:s.fromHash?s.fromConfidence>=.8?"green":"amber":"purple"}),e.jsx("span",{className:"ml-1",children:e.jsx(d,{fn:"conf",value:ye(s.fromConfidence),color:"zinc"})})]}),e.jsxs(i,{label:"to",children:[e.jsx(d,{fn:"resolve",value:je(s.toName,s.toHash,s.toPrefix),color:s.toHash?s.toConfidence>=.8?"green":"amber":"purple"}),e.jsx("span",{className:"ml-1",children:e.jsx(d,{fn:"conf",value:ye(s.toConfidence),color:"zinc"})})]})]})},s.hopIndex))}),e.jsx(se,{label:"trace contributes",tokens:Ft(t)})]})}function Ft(t){const s=t.reduce((n,l)=>n+(l.fromHash?1:0)+(l.toHash?1:0),0),r=t.length*2,c=r-s,a=t.length>0?t.reduce((n,l)=>n+l.snrRaw,0)/t.length:0;return[{fn:"hops",value:String(t.length),group:"wire",color:"blue"},{fn:"resolved",value:`${s}/${r}`,group:"worker",color:"green"},...c>0?[{fn:"ghosts",value:String(c),group:"worker",color:"purple"}]:[],{fn:"avgSnr",value:`${a.toFixed(1)} dB`,group:"analysis",color:a>=5?"green":a>=0?"amber":"red"}]}function Et(t){if(!t)return"never";const s=Math.floor((Date.now()-t)/1e3);return s<60?`${s}s ago`:s<3600?`${Math.floor(s/60)}m ago`:`${Math.floor(s/3600)}h ago`}function Ot(t){if(!t)return[];const s=t.decoded;if(!s)return[{fn:"decrypt.result",value:"failed",group:"crypto",color:"red"}];if(!s.decrypted)return[{fn:"decrypt.result",value:"no key match",group:"crypto",color:"zinc"}];const r=[];return s.channelName&&r.push({fn:"decrypt.channelName",value:s.channelName,group:"crypto",color:"teal"}),s.senderName&&r.push({fn:"decrypt.senderName",value:s.senderName,group:"crypto",color:"teal"}),s.text&&r.push({fn:"decrypt.text",value:s.text,group:"crypto",color:"teal"}),s.timestamp&&r.push({fn:"decrypt.timestamp",value:new Date(s.timestamp*1e3).toISOString().slice(11,19),group:"crypto",color:"teal"}),s.macCorrupted&&r.push({fn:"decrypt.macCorrupted",value:"true",group:"crypto",color:"amber"}),r}function zt({packet:t,decrypted:s,pipeline:r}){var b;const c=J(w=>w.isComputing),a=J(w=>w.lastUpdated),n=J(w=>w.lastComputeTimeMs),l=J(w=>w.topology.edges.length),o=J(w=>w.topology.discoveredNodes.length),x=tt(),m=st(),g=nt(),u=he(w=>w.isComputing),v=he(w=>w.nodeCount),N=me(w=>w.progress),f=me(w=>w.initialDecodeComplete),k=t.type??t.payload_type,$=k===O.GRP_TXT||k===O.GRP_DATA,h=k===O.TRACE,y=k===O.PATH,p=$,_=[{label:"full",detail:"all GRP_TXT → decryption worker",active:p&&f,color:"teal"},{label:"quick",detail:"100 most recent (initial load)",active:p&&!f,color:"amber"},{label:"skip",detail:"non-GRP or catchup path",active:!p,color:"zinc"}],H=Ot(s),C=((b=s==null?void 0:s.decoded)==null?void 0:b.decrypted)===!0,D=c?"running":`${l}e ${o}g`,L=u?"running":`${v}n`,P=p?C?"decrypted":N.isDecoding?`${N.percent}%`:"pending":"N/A",R=`topo ${c?"○":"✓"} ${D} · spark ${u?"○":"✓"} ${L} · decrypt ${P}`;return e.jsx(le,{stage:2,name:"CASCADE",fn:"hydrateDownstream()",verdict:R,children:e.jsx(q,{prefix:"cascade",children:e.jsxs("div",{className:"space-y-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 py-1.5 text-[11px] font-mono",children:[e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${c?"bg-sys-amber animate-pulse":"bg-sys-green"}`}),e.jsx("span",{className:"text-fg-primary",children:"topology"}),e.jsxs("span",{className:"text-fg-muted",children:[l,"e ",o,"g"]}),(h||y)&&e.jsx("span",{className:"text-sys-green text-[9px]",children:"↑signal"})]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${u?"bg-sys-amber animate-pulse":"bg-sys-green"}`}),e.jsx("span",{className:"text-fg-primary",children:"sparkline"}),e.jsxs("span",{className:"text-fg-muted",children:[v,"n"]})]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${N.isDecoding?"bg-sys-amber animate-pulse":p?"bg-sys-teal":"bg-zinc-500/40"}`}),e.jsx("span",{className:"text-fg-primary",children:"decrypt"}),e.jsx("span",{className:p?"text-sys-teal":"text-fg-muted",children:p?C?"decrypted":N.isDecoding?`${N.percent}%`:"pending":"N/A"})]})]}),e.jsxs(G,{defaultOpen:h||y,children:[e.jsx(K,{className:"text-[10px] w-full border-t border-edge-subtle pt-1.5",children:e.jsx("span",{className:"font-mono text-fg-muted/50",children:"topology detail…"})}),e.jsx(V,{children:e.jsxs("div",{className:"ml-3 pb-2",children:[e.jsx(i,{label:"status",children:e.jsx(d,{fn:"isComputing",value:c?"running":"idle",color:c?"amber":"green"})}),e.jsxs(i,{label:"last",children:[e.jsx(d,{fn:"lastUpdated",value:Et(a),color:"zinc"}),n>0&&e.jsxs("span",{className:"ml-2 text-fg-muted text-[10px]",children:["(",n<1e3?`${n.toFixed(0)}ms`:`${(n/1e3).toFixed(1)}s`,")"]})]}),e.jsxs(i,{label:"output",children:[e.jsx(d,{fn:"edges",value:String(l),color:"green"}),e.jsx(d,{fn:"ghostNodes",value:String(o),color:"purple"})]}),m&&e.jsxs(e.Fragment,{children:[e.jsxs(i,{label:"trace links",children:[e.jsx(d,{fn:"directed",value:String(x.totalDirectedLinks),color:"teal"}),e.jsx(d,{fn:"bidir",value:String(x.bidirectionalLinks),color:"teal"}),e.jsx(d,{fn:"traces",value:String(x.totalTraces),color:"zinc"})]}),e.jsxs(i,{label:"trace SNR",children:[e.jsx(d,{fn:"mean",value:`${x.meanSnr.toFixed(1)} dB`,color:x.meanSnr>=5?"green":x.meanSnr>=0?"amber":"red"}),e.jsx(d,{fn:"median",value:`${x.medianSnr.toFixed(1)} dB`,color:"zinc"}),e.jsx(d,{fn:"confidence",value:`${Math.round(x.avgConfidence*100)}%`,color:"zinc"})]}),h&&e.jsxs(i,{label:"quality",children:[e.jsx(d,{fn:"excellent",value:String(x.qualityCounts.excellent),color:"green"}),e.jsx(d,{fn:"good",value:String(x.qualityCounts.good),color:"green"}),e.jsx(d,{fn:"fair",value:String(x.qualityCounts.fair),color:"amber"}),e.jsx(d,{fn:"poor",value:String(x.qualityCounts.poor),color:"red"}),e.jsx(d,{fn:"critical",value:String(x.qualityCounts.critical),color:"red"})]}),g.confirmedResolutions.size>0&&e.jsxs(i,{label:"feedback",children:[e.jsx(d,{fn:"feedback.confirmed",value:String(g.confirmedResolutions.size),color:"teal"}),e.jsx(d,{fn:"feedback.links",value:String(g.confirmedLinks.length),color:"teal"})]})]}),h&&(r==null?void 0:r.traceHopDetail)&&e.jsx(At,{hops:r.traceHopDetail})]})})]}),p&&e.jsx("div",{className:"border-t border-edge-subtle pt-2 pb-2",children:e.jsxs("div",{className:"ml-3",children:[e.jsx(i,{label:"mode",children:e.jsx(ae,{options:_,nextFn:"queueDecryption()"})}),e.jsx(i,{label:"result",children:e.jsx(d,{fn:"decrypt",value:C?"decrypted":s?"failed":"pending",color:C?"teal":s?"red":"zinc"})}),C&&e.jsx("div",{className:"mt-1 flex flex-wrap gap-x-1.5 gap-y-1",children:H.map((w,oe)=>e.jsx("span",{className:"inline-block border border-edge-subtle rounded px-1.5 py-0.5",children:e.jsx(d,{fn:w.fn,value:w.value,color:w.color})},oe))})]})}),(()=>{const w=[{fn:"topology.edges",value:String(l),group:"worker",color:"green"},{fn:"topology.ghostNodes",value:String(o),group:"worker",color:"purple"},{fn:"sparkline.nodes",value:`${v}`,group:"worker",color:"green"},...m?[{fn:"trace.directedLinks",value:String(x.totalDirectedLinks),group:"worker",color:"teal"},{fn:"trace.meanSnr",value:`${x.meanSnr.toFixed(1)} dB`,group:"worker",color:"teal"}]:[],...H];return e.jsx(se,{tokens:w})})()]})})})}function Bt(t,s,r,c){var n;const a=t.src_hash?Se(t.src_hash):"";if(t._advertSender&&s.hash&&s.confident)return{tier:1,label:"_advertSender → pubkey",detail:"ADVERT carried full 32-byte public key — definitive match"};if(c&&s.confident&&((n=s.name)==null?void 0:n.toLowerCase())===c.toLowerCase())return{tier:1.5,label:"decrypt.senderName → nameToHash",detail:`Decrypted sender name “${c}” matched neighbor — high-confidence`};if(a&&r.crossClassPrefixes.has(a))return{tier:2,label:"cross-class prefix",detail:"Prefix has mixed types (repeater + non-repeater); payload type narrows to one class"};if(s.confident){const l=r.prefixIndex.get(a);return(l==null?void 0:l.length)===1?{tier:3,label:"single candidate",detail:"Only one node matches this prefix — unambiguous"}:{tier:3,label:"resolver",detail:"Multi-signal scoring selected best candidate from collision set"}}return{tier:4,label:"ambiguous",detail:"Cannot confidently resolve — multiple same-class candidates, insufficient scoring separation"}}function It(t,s){const r=t.original_path??t.forwarded_path,c=new Set;if(r&&Array.isArray(r))for(const a of r){const n=String(a).toUpperCase().slice(0,2);n.length>=2&&n!==s&&c.add(n)}return c}function Gt(t,s,r,c,a,n,l){const o=Math.floor(Date.now()/1e3),x=new Map(r.map(m=>[m.hash,m]));return t.map(m=>{const g=s[m.hash],u=x.get(m.hash);let v=!0,N="";c!=="unknown"?m.type!=="unknown"&&m.type!==c?(v=!1,N=`${m.type} ≠ required ${c}`):m.type===c?N="type matches":N="type unknown — not ruled out":N="payload ambiguous — all types eligible";const f=!!(g!=null&&g.zero_hop),k=(g==null?void 0:g.last_seen)??0;let $=0;if(f&&k>0){const b=(o-k)/3600;$=50*Math.exp(-b/l)}let h=0;if(k>0){const b=(o-k)/3600;h=Math.exp(-b/n)}const y=h*20,p=!!(g!=null&&g.latitude&&(g!=null&&g.longitude)&&(g.latitude!==0||g.longitude!==0)),_=p?5:0,H=(u==null?void 0:u.advertCount)??0,C=Math.min(H*2,30),D=(u==null?void 0:u.forwarderPrefixes.size)??0,L=Math.min(D*3,15);let P=0;if(u&&u.totalForwarderObservations>0&&a.size>0){let b=0;for(const w of a)u.forwarderPrefixes.has(w)&&b++;P=b/a.size}const R=$+y+_+C+L;return{hash:m.hash,name:m.name,type:m.type,roleCompatible:v,roleReason:N,zeroHop:f,zeroHopScore:$,lastSeen:k,recencyScore:h,recencyPoints:y,hasGps:p,gpsScore:_,advertCount:H,advertScore:C,topoWidth:D,topoScore:L,affinity:P,total:R}}).sort((m,g)=>g.total-m.total)}function Kt({packet:t,pipeline:s,resolved:r,resolveTimeMs:c,advertName:a,neighbors:n,decrypted:l}){var ie,de;const o=Y(j=>j.neighborContext),x=Y(j=>j.topologyProfiles),m=Y(j=>j.config),{analysis:g}=s,u=r??{hash:null,type:"unknown",name:null,confident:!1},v=t.src_hash?Se(t.src_hash):"",N=v?o.prefixIndex.get(v)??[]:[],f=v?x.get(v)??[]:[],k=g.pType??-1,$=k>=0?k.toString(16).toUpperCase().padStart(2,"0"):"??",h=g.inferredType,y=g.advertType,p=g.effectiveType,_=t._advertNodeType!=null?t._advertNodeType.toString(16).padStart(2,"0").toUpperCase():"",H=((ie=l==null?void 0:l.decoded)==null?void 0:ie.senderName)??null,C=Bt(t,u,o,H),D=T.useMemo(()=>It(t,v),[t,v]),L=g.pathLen,P=T.useMemo(()=>Gt(N,n,f,p,D,m.recencyDecayHours,m.zeroHopDecayHours),[N,n,f,p,D,m.recencyDecayHours,m.zeroHopDecayHours]),R=P.filter(j=>!j.roleCompatible),b=P.filter(j=>j.roleCompatible),w=t._advertSender?o.pubKeyMap.get(t._advertSender)??null:null,oe=C.tier===1,De=[{fn:"src_hash",value:v||"",active:!!v,color:"blue"},{fn:"_advertSender",value:t._advertSender?t._advertSender.slice(0,12)+"…":"",active:!!t._advertSender,color:"blue"},{fn:"_advertNodeType",value:_?`0x${_}`:"",active:t._advertNodeType!=null,color:"blue"},{fn:"path_length",value:L!=null?L===0?"zero-hop":String(L):"",active:L!=null,color:"blue"},{fn:"decrypt.senderName",value:H??"",active:!!H,color:"teal"}],Le=[{label:"hit",detail:"pubKeyMap.get(_advertSender) → definitive",active:!!w,color:"green"},{label:"miss",detail:t._advertSender?"pubkey not in neighbor table":"no _advertSender",active:!w,color:"zinc"}],Pe=[{label:"payload",detail:`inferDeviceType(0x${$}) → ${h}`,active:h!=="unknown",color:"amber"},{label:"flags",detail:_?`mapAdvertTypeCode(0x${_}) → ${y}`:"no _advertNodeType",active:h==="unknown"&&y!=="unknown",color:"green"},{label:"ambiguous",detail:"all types eligible",active:p==="unknown",color:"zinc"}],Me=u.name??((de=u.hash)==null?void 0:de.slice(0,12))??"?",Re=u.confident?"confident":"ambiguous",Ae=`→ ${Me} (${Re}, Tier ${C.tier})`;return e.jsx(le,{stage:3,name:"RESOLVE",fn:"usePipelineStore.resolveSource()",verdict:Ae,timeMs:c,children:e.jsx(q,{prefix:"resolvePacketSource",children:e.jsxs("div",{className:"space-y-0",children:[e.jsx("div",{className:"pt-1 pb-1",children:e.jsx(Ct,{tokens:De,nextFn:"resolvePacketSource()"})}),t.src_hash?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"border-t border-edge-subtle pt-2 pb-2",children:[e.jsxs("p",{className:"text-fg-muted mb-1",children:[e.jsx(S,{c:"text-sys-blue font-bold",children:"1"})," ","PUBKEY LOOKUP"]}),e.jsx(ae,{options:Le,nextFn:"pubKeyMap.get()"}),e.jsx("div",{className:"ml-3 mt-1",children:w?e.jsxs(e.Fragment,{children:[e.jsx(i,{label:"resolved",children:e.jsx(d,{fn:"hash",value:w,color:"green"})}),a&&e.jsxs(i,{label:"name",children:[e.jsx(d,{fn:"name",value:a,color:"green"}),u.name&&a===u.name&&e.jsx(S,{c:"text-sys-green ml-1",children:"✓ neighbor match"})]}),e.jsxs(i,{label:"result",children:[e.jsx(M,{color:"green",children:"Tier 1"}),e.jsx(S,{c:"text-fg-primary ml-1",children:"definitive — scoring bypassed"})]})]}):t._advertSender?e.jsx(i,{label:"status",children:e.jsx(S,{c:"text-sys-amber",children:"✗ pubkey not in neighbor table"})}):e.jsx(i,{label:"status",children:e.jsx(S,{children:"no _advertSender — skip to prefix resolution"})})})]}),oe?e.jsx("div",{className:"border-t border-edge-subtle py-2",children:e.jsx("p",{className:"text-[11px] text-fg-muted/40 font-mono ml-3",children:"Steps 2–5 bypassed — pubkey definitive"})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"border-t border-edge-subtle pt-2 pb-2",children:[e.jsxs("p",{className:"text-fg-muted mb-1",children:[e.jsx(S,{c:"text-sys-blue font-bold",children:"2"})," ","CANDIDATE POOL — ",N.length," node",N.length!==1?"s":"",' match "',v,'"']}),e.jsxs("div",{className:"space-y-0.5 ml-3",children:[P.map(j=>e.jsxs("div",{className:"flex gap-2 items-center text-[11px]",children:[e.jsx("span",{className:"break-all text-[10px]",children:j.hash}),e.jsx(M,{color:"zinc",children:j.type||"unknown"}),j.name&&e.jsx(S,{children:j.name})]},j.hash)),N.length===0&&e.jsx(S,{children:"no known nodes for this prefix"})]})]}),e.jsxs("div",{className:"border-t border-edge-subtle pt-2 pb-2",children:[e.jsxs("p",{className:"text-fg-muted mb-1",children:[e.jsx(S,{c:"text-sys-blue font-bold",children:"3"})," ","TYPE INFERENCE"]}),e.jsx(ae,{options:Pe,nextFn:"effectiveType()"}),e.jsx("div",{className:"ml-3 mt-1",children:e.jsx(i,{label:"effective",children:e.jsx(d,{fn:"effectiveType",value:p,color:p!=="unknown"?h!=="unknown"?"amber":"green":"zinc"})})})]}),e.jsxs("div",{className:"border-t border-edge-subtle pt-2 pb-2",children:[e.jsxs("p",{className:"text-fg-muted mb-1",children:[e.jsx(S,{c:"text-sys-blue font-bold",children:"4"})," ","ROLE-TYPE SCRUB"]}),e.jsx("div",{className:"space-y-0.5 ml-3",children:P.map(j=>e.jsxs("div",{className:"flex gap-2 items-center text-[11px]",children:[e.jsx("span",{className:j.roleCompatible?"text-sys-green":"text-sys-red",children:j.roleCompatible?"✓":"✗"}),e.jsx("span",{className:`break-all text-[10px] ${j.roleCompatible?"":"line-through text-fg-muted"}`,children:j.hash}),e.jsx(M,{color:j.roleCompatible?"zinc":"red",children:j.type||"unknown"}),e.jsx(S,{c:j.roleCompatible?"text-fg-muted":"text-sys-red",children:j.roleReason})]},j.hash))}),R.length>0&&e.jsxs("p",{className:"text-[10px] text-fg-muted mt-1 ml-3",children:[R.length," eliminated, ",b.length," surviving"]})]}),e.jsxs("div",{className:"border-t border-edge-subtle pt-2 pb-2",children:[e.jsxs("p",{className:"text-fg-muted mb-1",children:[e.jsx(S,{c:"text-sys-blue font-bold",children:"5"})," ","CANDIDATE SCORING"]}),b.length===0?e.jsx("p",{className:"text-fg-muted italic ml-3",children:"No surviving candidates"}):b.length===1?e.jsxs("div",{className:"ml-3 text-[11px]",children:[e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(S,{c:"text-sys-green",children:"→"}),e.jsx("span",{className:"break-all text-[10px]",children:b[0].hash}),b[0].name&&e.jsx(S,{c:"text-fg-muted ml-1",children:b[0].name})]}),e.jsx("p",{className:"text-fg-muted ml-4",children:"single survivor — scoring not needed"})]}):e.jsxs(G,{children:[e.jsx(K,{className:"text-[10px] ml-3",children:e.jsxs("span",{className:"font-mono text-fg-muted/50",children:[b.length," candidates scored…"]})}),e.jsx(V,{children:e.jsx("div",{className:"space-y-2 ml-3 mt-1",children:b.map(j=>{const Q=j.hash===u.hash;return e.jsxs("div",{className:`text-[11px] leading-relaxed rounded px-2 py-1 ${Q?"bg-sys-green/8 border border-sys-green/20":"bg-zinc-500/5"}`,children:[e.jsxs("div",{className:"flex gap-2 items-center mb-0.5",children:[e.jsx(S,{c:Q?"text-sys-green":"text-fg-muted",children:Q?"→":" "}),e.jsx("span",{className:`break-all text-[10px] ${Q?"text-fg-primary":"text-fg-muted"}`,children:j.hash}),e.jsx(M,{color:Q?"green":"zinc",children:j.type||"unknown"}),j.name&&e.jsx(S,{children:j.name})]}),e.jsxs("div",{className:"ml-4 flex flex-wrap gap-x-3 gap-y-0.5",children:[e.jsxs("span",{children:[e.jsx(S,{children:"zero_hop:"})," ",e.jsx(S,{c:j.zeroHop?"text-sys-green":"text-fg-muted",children:j.zeroHop?"✓":"✗"})," ",e.jsxs(M,{color:ee(j.zeroHopScore),children:["+",j.zeroHopScore]})]}),e.jsxs("span",{children:[e.jsx(S,{children:"recency:"})," ",e.jsx(S,{c:"text-fg-primary",children:mt(j.lastSeen)})," ",e.jsxs(M,{color:ee(j.recencyPoints),children:["+",j.recencyPoints.toFixed(1)]})]}),e.jsxs("span",{children:[e.jsx(S,{children:"gps:"})," ",e.jsx(S,{c:j.hasGps?"text-sys-green":"text-fg-muted",children:j.hasGps?"✓":"✗"})," ",e.jsxs(M,{color:ee(j.gpsScore),children:["+",j.gpsScore]})]}),e.jsxs("span",{children:[e.jsx(S,{children:"adverts:"})," ",e.jsx(S,{c:"text-fg-primary",children:j.advertCount})," ",e.jsxs(M,{color:ee(j.advertScore),children:["+",j.advertScore]})]}),e.jsxs("span",{children:[e.jsx(S,{children:"topo:"})," ",e.jsx(S,{c:"text-fg-primary",children:j.topoWidth})," ",e.jsxs(M,{color:ee(j.topoScore),children:["+",j.topoScore]})]})]}),e.jsxs("div",{className:"ml-4 mt-0.5",children:[e.jsx(S,{children:"score ≈"})," ",e.jsx(S,{c:"text-fg-primary font-bold",children:j.total.toFixed(1)})]})]},j.hash)})})})]})]})]}),e.jsxs("div",{className:"border-t border-edge-subtle pt-2 pb-2",children:[e.jsxs("p",{className:"text-fg-muted mb-1",children:[e.jsx(S,{c:"text-sys-green font-bold",children:"✓"})," ","RESOLUTION"]}),e.jsxs("div",{className:"ml-3",children:[e.jsx(i,{label:"hash",children:u.hash?e.jsx(d,{fn:"resolved.hash",value:u.hash,color:"green"}):e.jsx(S,{children:"null"})}),e.jsx(i,{label:"type",children:e.jsx(d,{fn:"resolved.type",value:u.type,color:u.confident?"green":"zinc"})}),e.jsx(i,{label:"name",children:u.name?e.jsx(d,{fn:"resolved.name",value:u.name,color:u.confident?"green":"amber"}):e.jsx(S,{children:"null"})}),e.jsx(i,{label:"confident",children:e.jsx(S,{c:u.confident?"text-sys-green":"text-sys-red",children:String(u.confident)})}),e.jsxs(i,{label:"tier",children:[e.jsx(M,{color:C.tier<=2?"green":C.tier===3?"amber":"red",children:C.tier}),e.jsx(S,{c:"text-fg-primary ml-1",children:C.label})]})]})]})]}):e.jsx("div",{className:"border-t border-edge-subtle pt-2 pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px] font-mono",children:[e.jsx(S,{c:"text-sys-amber",children:"⚠ no src_hash"}),H&&e.jsx(d,{fn:"decrypt.senderName",value:H,color:"teal"}),u.confident?e.jsxs(S,{c:"text-sys-green",children:["→ resolved via ",C.label]}):e.jsx(S,{c:"text-sys-red",children:"ambiguous"})]})}),(()=>{const j=[{fn:"resolved.hash",value:u.hash??"null",group:"resolution",color:u.confident?"green":"zinc"},{fn:"resolved.type",value:u.type,group:"resolution",color:u.type!=="unknown"?u.confident?"green":"amber":"zinc"},{fn:"resolved.name",value:u.name??"null",group:"resolution",color:u.confident?"green":u.name?"amber":"zinc"},{fn:"resolved.confident",value:String(u.confident),group:"resolution",color:u.confident?"green":"red"}];return e.jsx(se,{tokens:j})})()]})})})}const Vt={id:"packet-parse",label:"Packet Parse",inputs:["rawPacket"],outputs:["parsedPacket","decoded","headerFields"],emits:[{fn:"routeType",group:"wire",color:"blue"},{fn:"payloadType",group:"wire",color:"blue"},{fn:"pathLength",group:"wire",color:"blue"},{fn:"version",group:"wire",color:"blue"}],async:!1,observatoryStage:0},qt={id:"enrichment",label:"Ingestion Enrichment",inputs:["parsedPacket"],outputs:["advertSender","channelHash","hopData","byteLength"],emits:[{fn:"_advertSender",group:"enrichment",color:"blue"},{fn:"_advertNodeType",group:"enrichment",color:"blue"},{fn:"_channelHash",group:"enrichment",color:"blue"},{fn:"_hopCount",group:"enrichment",color:"blue"},{fn:"_isZeroHop",group:"enrichment",color:"blue"},{fn:"_byteLength",group:"enrichment",color:"blue"}],async:!1,observatoryStage:1},Ut={id:"topology",label:"Topology Analysis",inputs:["packets","neighbors","srcHashResolver"],outputs:["edges","nodeMetrics","pathHealth","ghostNodes","centrality","loops"],emits:[{fn:"edges",group:"worker",color:"green"},{fn:"ghostNodes",group:"worker",color:"purple"},{fn:"loops",group:"analysis",color:"amber"},{fn:"nodeMetrics",group:"worker",color:"green"},{fn:"pathHealth",group:"worker",color:"green"},{fn:"centrality",group:"worker",color:"green"}],async:!0,worker:"topology.worker.ts",observatoryStage:2},Wt={id:"trace-enrichment",label:"Trace Link Quality",inputs:["packets","prefixLookup","srcHashResolver","edges","pathHealth","nodeMetrics"],outputs:["traceLinks","traceLinkSummary","traceDisambiguationFeedback"],emits:[{fn:"traceLinks.directed",group:"worker",color:"teal"},{fn:"traceLinks.bidir",group:"worker",color:"teal"},{fn:"traceSummary.meanSnr",group:"analysis",color:"green"},{fn:"traceSummary.medianSnr",group:"analysis",color:"zinc"},{fn:"traceSummary.confidence",group:"analysis",color:"zinc"},{fn:"feedback.confirmed",group:"worker",color:"teal"},{fn:"feedback.links",group:"worker",color:"teal"}],async:!1,observatoryStage:2},Yt={id:"disambiguation",label:"Source Disambiguation",inputs:["packets","neighbors","decodedMessages"],outputs:["srcHashResolverMap","neighborContext"],emits:[{fn:"resolvedHash",group:"resolution",color:"purple"},{fn:"resolvedName",group:"resolution",color:"purple"},{fn:"resolvedType",group:"resolution",color:"purple"},{fn:"confidence",group:"resolution",color:"green"}],async:!1,observatoryStage:3},Zt={id:"sparkline",label:"Sparkline Computation",inputs:["packets","neighbors"],outputs:["sparklineData"],emits:[{fn:"sparklines",group:"worker",color:"blue"}],async:!0,worker:"sparkline.worker.ts"},Xt={id:"decryption",label:"Channel Decryption",inputs:["packets","channelKeys"],outputs:["decodedMessages"],emits:[{fn:"decrypt.text",group:"crypto",color:"teal"},{fn:"decrypt.senderName",group:"crypto",color:"teal"},{fn:"decrypt.channelName",group:"crypto",color:"teal"},{fn:"decrypt.macCorrupted",group:"crypto",color:"amber"}],async:!0,worker:"decryption.worker.ts",observatoryStage:2},Qt={id:"decoded-content",label:"Decoded Content Policy",inputs:["decodedMessages","packets"],outputs:["decodedContent","contentInheritance"],emits:[{fn:"content.senderName",group:"crypto",color:"teal"},{fn:"content.text",group:"crypto",color:"teal"},{fn:"content.channelName",group:"crypto",color:"teal"},{fn:"content.corrupted",group:"crypto",color:"amber"},{fn:"content.inherited",group:"analysis",color:"purple"}],async:!1},Z=[Vt,qt,Ut,Wt,Yt,Zt,Xt,Qt],Jt=new Map(Z.map(t=>[t.id,t])),es=new Map;for(const t of Z)for(const s of t.emits)es.set(s.fn,t);const $e=new Map;for(const t of Z)for(const s of t.outputs)$e.set(s,t);function ts(){const t=new Map,s=new Map;for(const a of Z)t.has(a.id)||t.set(a.id,0),s.has(a.id)||s.set(a.id,new Set);for(const a of Z)for(const n of a.inputs){const l=$e.get(n);if(l&&l.id!==a.id){const o=s.get(l.id);o.has(a.id)||(o.add(a.id),t.set(a.id,(t.get(a.id)??0)+1))}}const r=[];for(const[a,n]of t)n===0&&r.push(a);const c=[];for(;r.length>0;){const a=r.shift(),n=Jt.get(a);n&&c.push(n);for(const l of s.get(a)??[]){const o=(t.get(l)??1)-1;t.set(l,o),o===0&&r.push(l)}}for(const a of Z)c.includes(a)||c.push(a);return c}const ss={0:"text-sys-green",1:"text-sys-blue",2:"text-sys-teal",3:"text-sys-purple"};function ns({stage:t,isActive:s,onClick:r}){const c=t.observatoryStage!=null?ss[t.observatoryStage]??"text-fg-muted":"text-fg-muted/40";return e.jsxs("button",{type:"button",onClick:r,className:` flex items-center gap-1.5 w-full px-1.5 py-1 rounded transition-base text-left ${s?"bg-sys-blue/10 ring-1 ring-sys-blue/30":"hover:bg-zinc-500/5"} `,children:[e.jsx("span",{className:`font-mono text-[9px] font-bold w-3 shrink-0 text-center ${c}`,children:t.observatoryStage??"·"}),e.jsx("span",{className:"font-mono text-[9px] text-fg-primary truncate flex-1",children:t.label}),t.async&&e.jsx("span",{className:"font-mono text-[7px] px-1 py-px rounded bg-sys-amber/15 text-sys-amber shrink-0 leading-tight",children:"⚡"}),t.emits.length>0&&e.jsxs("span",{className:"flex items-center gap-px shrink-0",children:[t.emits.slice(0,6).map(a=>{var n;return e.jsx("span",{className:`inline-block w-1 h-1 rounded-full ${((n=I[a.color])==null?void 0:n.dot)??"bg-zinc-500"}`,title:`${a.fn} [${a.group}]`},a.fn)}),t.emits.length>6&&e.jsxs("span",{className:"font-mono text-[7px] text-fg-muted/40 ml-0.5",children:["+",t.emits.length-6]})]})]})}function rs({activeStageId:t,onStageClick:s}){const r=T.useMemo(()=>ts(),[]),c=T.useMemo(()=>{const a=new Map;for(const l of r){const o=l.observatoryStage??"other";let x=a.get(o);x||(x=[],a.set(o,x)),x.push(l)}const n=[];for(const l of[0,1,2,3,"other"]){const o=a.get(l);o!=null&&o.length&&n.push({key:l,stages:o})}return n},[r]);return e.jsxs("div",{className:"surface-base rounded-lg border border-edge-subtle p-2",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"font-mono text-[8px] text-fg-muted/40 uppercase tracking-widest",children:"Pipeline DAG"}),e.jsxs("span",{className:"font-mono text-[8px] text-fg-muted/30",children:[r.length," stages"]})]}),e.jsx("div",{className:"space-y-px",children:c.map((a,n)=>e.jsxs("div",{children:[n>0&&e.jsx("div",{className:"flex items-center pl-2.5 py-px",children:e.jsx("svg",{width:"6",height:"8",viewBox:"0 0 6 8",className:"text-fg-muted/20",children:e.jsx("path",{d:"M3 0 L3 6 M1 4 L3 6 L5 4",fill:"none",stroke:"currentColor",strokeWidth:"1"})})}),a.stages.map(l=>e.jsx(ns,{stage:l,isActive:t===l.id,onClick:s?()=>s(l.id):void 0},l.id))]},String(a.key)))})]})}const ve=200,z={status:"idle",lastDurationMs:null,lastTs:null,runCount:0};function as(t,s,r){var c,a,n;switch(t.type){case"transport:ws:state":s.wsState=((c=t.data)==null?void 0:c.state)??r.wsState;break;case"transport:ws:packet":s.wsPacketCount=(s.wsPacketCount??r.wsPacketCount)+1;break;case"transport:ws:stats":s.wsStatsCount=(s.wsStatsCount??r.wsStatsCount)+1;break;case"transport:rest:stats":s.restStatsCount=(s.restStatsCount??r.restStatsCount)+1;break;case"transport:rest:packets":s.restPacketsCount=(s.restPacketsCount??r.restPacketsCount)+1;break;case"store:packets:ws-merge":s.wsMergeCount=(s.wsMergeCount??r.wsMergeCount)+1;break;case"cascade:hydrate":s.lastHydrateTs=t.ts,s.hydrateCount=(s.hydrateCount??r.hydrateCount)+1;break;case"worker:topology:start":case"worker:sparkline:start":{const l=t.type.split(":")[1],o=s.workers??r.workers,x=o[l]??{...z};s.workers={...o,[l]:{...x,status:"running",lastTs:t.ts}}}break;case"worker:topology:done":case"worker:sparkline:done":{const l=t.type.split(":")[1],o=s.workers??r.workers,x=o[l]??{...z},m=((a=t.data)==null?void 0:a.ms)??null;s.workers={...o,[l]:{...x,status:"done",lastDurationMs:m,lastTs:t.ts,runCount:x.runCount+1}}}break;case"worker:decryption:batch":{const l=s.workers??r.workers,o=l.decryption??{...z},x=((n=t.data)==null?void 0:n.ms)??null;s.workers={...l,decryption:{...o,status:"done",lastDurationMs:x,lastTs:t.ts,runCount:o.runCount+1}}}break;case"pipeline:disambig:recompute":s.disambigCount=(s.disambigCount??r.disambigCount)+1;break}}const te=rt(t=>({events:[],eventCount:0,wsState:"disconnected",wsPacketCount:0,wsStatsCount:0,restStatsCount:0,restPacketsCount:0,workers:{topology:{...z},sparkline:{...z},decryption:{...z}},wsMergeCount:0,lastHydrateTs:null,hydrateCount:0,disambigCount:0,lastDisambigMs:null,_pushBatch:s=>t(r=>{if(s.length===0)return r;let c=[...r.events,...s];c.length>ve&&(c=c.slice(c.length-ve));const a={events:c,eventCount:r.eventCount+s.length};for(const n of s)as(n,a,r);return a}),clear:()=>t({events:[],eventCount:0,wsState:"disconnected",wsPacketCount:0,wsStatsCount:0,restStatsCount:0,restPacketsCount:0,workers:{topology:{...z},sparkline:{...z},decryption:{...z}},wsMergeCount:0,lastHydrateTs:null,hydrateCount:0,disambigCount:0,lastDisambigMs:null})}));let W=null,B=[],X=null;function ls(){if(X=null,B.length===0)return;const t=B;B=[],te.getState()._pushBatch(t)}function os(){W||(B=[],W=at.subscribe(t=>{B.push(t),X===null&&(X=requestAnimationFrame(ls))}))}function cs(){if(W==null||W(),W=null,X!==null&&(cancelAnimationFrame(X),X=null),B.length>0){const t=B;B=[],te.getState()._pushBatch(t)}}function is(t){switch(t){case"active":return"●";case"skipped":return"○";case"inferred":return"◌"}}function ds(t){switch(t){case"active":return"text-sys-green";case"skipped":return"text-fg-muted/30";case"inferred":return"text-sys-amber"}}function us(t){switch(t){case"transport":return"text-sys-blue";case"store":return"text-sys-amber";case"worker":return"text-sys-violet";case"pipeline":return"text-sys-green";case"consumer":return"text-sys-teal"}}function ps(t,s,r,c,a){var m,g;const n=[];if(a?n.push({label:"Hex Input",detail:"Manual hex — no transport",status:"skipped",lane:"transport"}):s.age==="live"||s.age==="recent"?n.push({label:"WebSocket",detail:"ws:packet → real-time push",status:"active",lane:"transport"}):n.push({label:"REST Poll",detail:"fetchPackets → packetCache.poll()",status:"inferred",lane:"transport"}),!a){n.push({label:"Cache Merge",detail:"packetCache.mergePacketsDirectly()",status:"active",lane:"store"});const u=s.age==="live"||s.age==="recent";n.push({label:"Flash",detail:u?"flashReceived++ → sidebar blink":"Not newest — no flash",status:u?"active":"skipped",lane:"store"}),n.push({label:"Hydrate Cascade",detail:"hydrateDownstream() → schedule workers",status:"active",lane:"store"})}const l=s.pathAvail||s.pathHopCount>0;n.push({label:"Topology Worker",detail:l?`Path data (${s.pathHopCount} hops) → edge extraction`:"No path data — still included in batch recompute",status:"active",lane:"worker"}),n.push({label:"Sparkline Worker",detail:`Contributes to sparkline for src ${((m=t.src_hash)==null?void 0:m.slice(0,4))??"??"}`,status:"active",lane:"worker"});const o=s.isGrp;n.push({label:"Decryption Worker",detail:o?`GRP_TXT → queued for channel key search${c?" → decrypted ✓":""}`:`${s.payloadTypeName} — not encrypted, skipped`,status:o?"active":"skipped",lane:"worker"}),n.push({label:"Source Disambiguation",detail:r?`→ ${r.name??((g=r.hash)==null?void 0:g.slice(0,8))??"?"} (${r.type}${r.confident?", confident":", ambiguous"})`:"Pending recompute",status:r?"active":"inferred",lane:"pipeline"}),s.isAdvert&&n.push({label:"ADVERT Discovery",detail:"pubkey → extended hash-to-type + name extraction",status:"active",lane:"pipeline"}),o&&(c!=null&&c.decoded)&&n.push({label:"Decoded Content Policy",detail:`macCorrupted=${c.decoded.macCorrupted?"true":"false"} → cross-hash inheritance`,status:"active",lane:"pipeline"});const x=["Packets","Dashboard","Statistics"];return l&&x.push("Map","Graph"),s.isTrace&&x.push("Trace Detail"),n.push({label:"Page Hydration",detail:x.join(", "),status:"active",lane:"consumer"}),n}const xs=[],hs=["transport","store","worker","pipeline","consumer"],ms={transport:"Transport",store:"Store",worker:"Workers",pipeline:"Pipeline",consumer:"Consumers"};function gs(t){return t.replace("transport:","").replace("store:packets:","").replace("cascade:","").replace("worker:","w:").replace("pipeline:","p:").replace("packet","pkt").replace("sparkline","spark").replace("topology","topo").replace("decryption","dec").replace("disambig","dis").replace("recompute","recomp")}function fs(t){return t.startsWith("transport:")?"text-sys-blue":t.startsWith("store:")||t.startsWith("cascade:")?"text-sys-amber":t.startsWith("worker:")?"text-sys-violet":t.startsWith("pipeline:")?"text-sys-green":"text-fg-muted"}const bs=T.memo(function({event:s}){const r=`${(s.ts/1e3).toFixed(1)}s`,c=s.data?Object.entries(s.data).map(([a,n])=>{var l;return`${a}=${typeof n=="number"?((l=n.toFixed)==null?void 0:l.call(n,1))??n:n}`}).join(" "):"";return e.jsxs("div",{className:"flex gap-2 text-[9px] font-mono leading-tight",children:[e.jsx("span",{className:"text-fg-muted/40 w-12 shrink-0 text-right",children:r}),e.jsx("span",{className:`w-20 shrink-0 ${fs(s.type)}`,children:gs(s.type)}),e.jsx("span",{className:"text-fg-muted/60 truncate",children:c})]})});function ys({packet:t,pipeline:s,resolved:r,decrypted:c,isSynthetic:a,liveMode:n}){const[l,o]=T.useState(!1);T.useEffect(()=>{if(l)return os(),()=>{cs()}},[l]);const x=s==null?void 0:s.analysis,m=T.useMemo(()=>!t||!x?null:ps(t,x,r,c,a),[t,x,r,c,a]),g=T.useMemo(()=>{if(!m)return null;const h=new Map;for(const y of m){let p=h.get(y.lane);p||(p=[],h.set(y.lane,p)),p.push(y)}return h},[m]),u=te(h=>l?h.events:xs),v=te(h=>l?h.eventCount:0),N=te(h=>h.clear),f=T.useRef(null);T.useEffect(()=>{l&&f.current&&(f.current.scrollTop=f.current.scrollHeight)},[v,l]);const k=(m==null?void 0:m.filter(h=>h.status==="active").length)??0,$=(m==null?void 0:m.length)??0;return e.jsxs(G,{defaultOpen:!0,children:[e.jsx(K,{className:"text-[10px]",children:e.jsxs("span",{className:"flex items-center gap-2 font-mono",children:[e.jsx("span",{className:"text-sys-green",children:"CFT"}),e.jsx("span",{className:"text-fg-muted/40",children:"Control Flow Trace"}),t&&e.jsxs("span",{className:"text-fg-muted/30",children:["— ",k,"/",$," stages active"]})]})}),e.jsx(V,{children:e.jsxs("div",{className:"surface-base rounded-lg border border-edge-subtle p-3 space-y-3",children:[t?g?e.jsx("div",{className:"space-y-2",children:hs.map(h=>{const y=g.get(h);return y?e.jsxs("div",{children:[e.jsx("div",{className:`text-[8px] uppercase tracking-widest font-mono mb-0.5 ${us(h)}`,children:ms[h]}),y.map((p,_)=>e.jsxs("div",{className:"flex items-start gap-1.5 text-[10px] font-mono leading-snug ml-1",children:[e.jsx("span",{className:`shrink-0 ${ds(p.status)}`,children:is(p.status)}),e.jsx("span",{className:"text-fg-primary",children:p.label}),e.jsx("span",{className:"text-fg-muted/50 truncate",children:p.detail})]},_))]},h):null})}):null:e.jsx("div",{className:"text-[9px] text-fg-muted/30 font-mono py-2 text-center",children:"Select a packet to trace its flow"}),e.jsxs("div",{className:"border-t border-edge-subtle pt-2 flex items-center gap-2",children:[e.jsx("button",{onClick:()=>o(h=>!h),className:`px-2 py-0.5 rounded text-[9px] font-mono transition-colors ${l?"bg-sys-green/20 text-sys-green":"bg-zinc-500/20 text-fg-muted hover:text-fg-primary"}`,children:l?"● LIVE":"○ LIVE"}),e.jsx("span",{className:"text-[9px] text-fg-muted/40 font-mono",children:l?`${v} events`:"Subscribe to all pipeline events"}),l&&e.jsx("button",{onClick:N,className:"text-[9px] text-fg-muted/40 hover:text-fg-muted font-mono transition-colors ml-auto",children:"clear"})]}),l&&e.jsx("div",{ref:f,className:"max-h-32 overflow-y-auto space-y-px",children:u.length===0?e.jsx("div",{className:"text-[9px] text-fg-muted/30 font-mono py-1 text-center",children:"Waiting for events…"}):u.map((h,y)=>e.jsx(bs,{event:h},`${h.ts}-${y}`))})]})})]})}function js(t){const s=Ne(t.type??t.payload_type??-1).padEnd(7),r=t.packet_hash.slice(0,8),c=(t.src_hash??"—").replace(/^0x/i,"").slice(0,4).toUpperCase(),a=t._hopCount!=null?`${t._hopCount}h`:"",n=dt(t.timestamp);return`${r} ${s} ←${c} ${t.rssi}dBm ${a} ${n}`}function Ts(){const t=lt(),s=ot(),r=ct(),c=(s==null?void 0:s.neighbors)??{},a=Y(b=>b.resolveSource),n=Y(b=>b.config),l=Y(b=>b.setConfig),[o,x]=T.useState(-1),m=T.useMemo(()=>{let b=t;return o!==-1&&(b=t.filter(w=>(w.type??w.payload_type)===o)),b.slice(-50).reverse()},[t,o]),[g,u]=T.useState(""),[v,N]=T.useState(""),[f,k]=T.useState(!1),$=T.useRef(r);T.useEffect(()=>{f&&r!==$.current&&m.length>0&&(u(m[0].packet_hash),N("")),$.current=r},[r,f,m]),T.useEffect(()=>{!g&&m.length>0&&!v&&u(m[0].packet_hash)},[g,m,v]);const h=T.useMemo(()=>v.trim()?null:m.find(b=>b.packet_hash===g)??null,[g,m,v]),y=T.useMemo(()=>{const b=v.replace(/\s+/g,"").trim();return b?{packet_hash:"manual-hex-input",timestamp:0,rssi:0,snr:0,transmitted:!1,drop_reason:null,is_duplicate:!1,raw_packet:b}:null},[v]),p=h??y,_=!!v.trim(),H=v.trim().replace(/\s+/g,"")||(p==null?void 0:p.raw_packet),C=wt(p,H,t),D=(C==null?void 0:C.enrichment)??He,L=Ce((p==null?void 0:p.packet_hash)??""),P=T.useRef(0),R=T.useMemo(()=>{if(!p)return null;const b=performance.now(),w=a(p);return P.current=performance.now()-b,w},[p,a]);return e.jsxs("div",{className:"max-w-[960px] mx-auto",children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("h1",{className:"text-sm font-bold text-fg-primary tracking-wide font-mono",children:"PACKET OBSERVATORY"}),e.jsx("p",{className:"text-[11px] text-fg-muted font-mono",children:"Pipeline introspection — select a packet to trace its journey"})]}),e.jsxs("div",{className:"surface-base rounded-lg border border-edge-subtle p-3 mb-3",children:[e.jsxs("div",{className:"flex gap-2 items-center flex-wrap",children:[e.jsxs("select",{value:o,onChange:b=>{x(Number(b.target.value)),u("")},className:"surface-input px-2 py-1 rounded text-[11px] font-mono text-fg-primary w-36",children:[e.jsx("option",{value:-1,children:"ALL TYPES"}),Object.entries(it).map(([b,w])=>e.jsxs("option",{value:Number(b),children:["0x",Number(b).toString(16).toUpperCase().padStart(2,"0")," ",w]},b))]}),e.jsxs("select",{value:g,onChange:b=>{u(b.target.value),N("")},className:"surface-input flex-1 min-w-0 px-2 py-1 rounded text-[11px] font-mono text-fg-primary truncate",children:[m.map((b,w)=>e.jsx("option",{value:b.packet_hash,children:js(b)},`${b.packet_hash}-${w}`)),m.length===0&&e.jsxs("option",{value:"",children:["No packets",o!==-1?" matching filter":" loaded"]})]}),e.jsx("button",{onClick:()=>k(b=>!b),className:`px-2 py-1 rounded text-[11px] font-mono transition-colors shrink-0 ${f?"bg-sys-green/20 text-sys-green":"bg-zinc-500/20 text-fg-muted hover:text-fg-primary"}`,children:f?"● LIVE":"○ LIVE"})]}),e.jsxs(G,{children:[e.jsx(K,{className:"text-[10px] text-fg-muted/50 hover:text-fg-muted mt-1.5",children:e.jsx("span",{className:"font-mono",children:"Paste hex…"})}),e.jsx(V,{children:e.jsx("textarea",{value:v,onChange:b=>N(b.target.value),placeholder:"Paste raw packet hex (overrides dropdown)",rows:2,className:"surface-input w-full mt-1 px-2 py-1 rounded text-[11px] font-mono text-fg-primary resize-y"})})]})]}),e.jsxs(G,{children:[e.jsx(K,{className:"text-[11px] mb-3 w-full",children:e.jsxs("span",{className:"flex items-center gap-2 font-mono",children:[e.jsx("span",{className:"text-fg-muted/50",children:"⚙"}),e.jsx("span",{className:"text-fg-muted/50",children:"Pipeline Config & Dev Tools"}),e.jsxs("span",{className:"text-fg-muted/30 text-[10px]",children:["disambig=",n.disambiguationEnabled?"on":"off"," mac=",n.macCorruptedPolicy," decay=",n.recencyDecayHours,"h"]})]})}),e.jsx(V,{children:e.jsxs("div",{className:"space-y-3 mb-4",children:[e.jsxs("div",{className:"surface-base rounded-lg border border-edge-subtle p-3",children:[e.jsx("h2",{className:"text-[10px] text-fg-muted/50 uppercase tracking-widest font-mono mb-2",children:"Pipeline Config"}),e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-[11px] text-fg-muted w-24 shrink-0",children:"Disambiguation"}),e.jsx("button",{onClick:()=>l({disambiguationEnabled:!n.disambiguationEnabled}),className:`px-2 py-0.5 rounded text-[11px] font-mono transition-colors ${n.disambiguationEnabled?"bg-sys-green/20 text-sys-green":"bg-sys-red/20 text-sys-red"}`,children:n.disambiguationEnabled?"● ON":"○ OFF"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-[11px] text-fg-muted w-24 shrink-0",children:"MAC policy"}),e.jsxs("select",{value:n.macCorruptedPolicy,onChange:b=>l({macCorruptedPolicy:b.target.value}),className:"surface-input px-1.5 py-0.5 rounded text-[11px] font-mono text-fg-primary",children:[e.jsx("option",{value:"strict",children:"strict (drop)"}),e.jsx("option",{value:"name-only",children:"name-only"}),e.jsx("option",{value:"permissive",children:"permissive"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-[11px] text-fg-muted w-24 shrink-0",children:"Recency decay"}),e.jsx("input",{type:"range",min:1,max:48,step:1,value:n.recencyDecayHours,onChange:b=>l({recencyDecayHours:Number(b.target.value)}),className:"flex-1 h-1 accent-sys-blue"}),e.jsxs("span",{className:"text-[11px] font-mono text-fg-primary w-8 text-right",children:[n.recencyDecayHours,"h"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-[11px] text-fg-muted w-24 shrink-0",children:"Zero-hop decay"}),e.jsx("input",{type:"range",min:12,max:168,step:6,value:n.zeroHopDecayHours,onChange:b=>l({zeroHopDecayHours:Number(b.target.value)}),className:"flex-1 h-1 accent-sys-blue"}),e.jsxs("span",{className:"text-[11px] font-mono text-fg-primary w-10 text-right",children:[n.zeroHopDecayHours,"h"]})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsx(ys,{packet:p,pipeline:C,resolved:R,decrypted:L??null,isSynthetic:_,liveMode:f}),e.jsx(rs,{})]})]})})]}),p?e.jsxs("div",{className:"space-y-1",children:[e.jsx(kt,{packet:p,isSynthetic:_}),e.jsx(Rt,{packet:p,pipeline:C,rawHex:H,traceTagIndex:(C==null?void 0:C.traceTagIndex)??new Map,neighbors:c}),e.jsx(zt,{packet:p,decrypted:L??void 0,pipeline:C}),e.jsx(Kt,{packet:p,pipeline:C,resolved:R,decrypted:L??void 0,resolveTimeMs:P.current,neighbors:c,advertName:D.advertName})]}):e.jsx("div",{className:"surface-base rounded-lg border border-edge-subtle p-8 text-center",children:e.jsx("p",{className:"text-fg-muted text-xs",children:"Select a packet from the dropdown or paste hex above"})})]})}export{Ts as default}; diff --git a/frontend/dist/assets/Packets-BuMWYQBd.js b/frontend/dist/assets/Packets-CiNJvSgJ.js similarity index 96% rename from frontend/dist/assets/Packets-BuMWYQBd.js rename to frontend/dist/assets/Packets-CiNJvSgJ.js index 30b9f7aa..30709431 100644 --- a/frontend/dist/assets/Packets-BuMWYQBd.js +++ b/frontend/dist/assets/Packets-CiNJvSgJ.js @@ -1 +1 @@ -import{r as d,aj as D,ak as at,al as Ve,am as Pe,an as te,ao as ot,ap as nt,aq as le,ar as Be,as as st,at as lt,au as it,av as me,aw as rt,ax as ut,ay as xe,az as B,aA as ct,aB as Ee,aC as W,aD as se,aE as Te,aF as Se,aG as dt,aH as ze,aI as He,aJ as be,aK as Ce,aL as ve,aM as pt,aN as mt,aO as bt,aP as Re,aQ as vt,aR as ft,aS as ge,aT as gt,aU as xt,aV as ht,aW as yt,aX as G,aY as St,aZ as Ct,a_ as Ot,a$ as Pt,b0 as Et,b1 as Tt,b2 as Rt,b3 as $t,b4 as wt,b5 as jt,b6 as It,b7 as $e,j as l,c as ne,ae as Nt,w as kt,x as Mt,b8 as Ft,y as Dt,E as At,J as _t,K as Lt,aa as Vt,ah as Bt,N as we,b9 as je,ba as Ie,B as Ne,bb as ke,F as Me,bc as zt,T as Ht}from"./index-CLIbpHvY.js";import{b as Ut,g as Ue,a as Kt,u as Gt,P as qt}from"./PacketList-CYo0ntr7.js";import{c as V,p as Wt,a as de,f as Fe,b as Yt,L as Xt,S as ue,s as Jt,u as De,d as Qt,g as Zt,e as ea,h as ta}from"./element-movement-CTWmC4Se.js";import{F as aa,y as oa,R as na,T as sa,w as Ae,A as la}from"./map-pin-oP9EChoI.js";import{useGetDecodedContent as ia,useResolveSource as ra}from"./usePipelineStore-7L_PlMjP.js";import{c as ua,a as ca,A as da}from"./AnalyzerFilterPanel-D5iqpJrB.js";import{u as pa,r as ma}from"./consumer-registry-BrRzRPA2.js";import{A as ba}from"./arrow-up-Dw_1quvK.js";import{A as va}from"./SignalIndicator-BGst_xwg.js";import{P as fa,a as ga,B as xa,C as he}from"./PageLayout-9SoN_daN.js";import{T as ha}from"./TimeRangeStepper-r-j5VisG.js";import{F as _e}from"./funnel-D8VczAEU.js";import{R as ya}from"./Grid-Di163a6N.js";import"./primitives-CZFN5gGO.js";import"./payload-decoders-BsVy7I3_.js";import"./badge-colors-BNUqIXCA.js";import"./chat-utils-C0FWA6kK.js";import"./chevron-right-tyotcuUX.js";import"./circle-question-mark-CW0NICCZ.js";import"./triangle-alert-BPXHBOYA.js";import"./DataBox-ChuBU2q7.js";import"./layers-DTsYQqst.js";import"./hash-Cd1zCpVV.js";import"./activity-DBVB1w-E.js";import"./circle-check-BA0O7QIB.js";import"./database-idkjcnGz.js";import"./useMapViewStore-CoIRBkXg.js";import"./index-EpCuPFqY.js";import"./shield-hk2V-Q9a.js";import"./node-types-CFhZT1Jq.js";import"./monitor-smartphone-B5v3E3uQ.js";import"./search-D-1ih5Lf.js";function Ke(e){let a=d.useRef({value:"",selectionStart:null,selectionEnd:null});return at(e,"blur",t=>{let n=t.target;Pe(n)&&(a.current={value:n.value,selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})}),D(()=>{if(!Ve(e)&&Pe(e)&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==a.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:t,selectionEnd:n}=a.current;t!==null&&n!==null&&e.setSelectionRange(t,n)}a.current={value:"",selectionStart:null,selectionEnd:null}}})}function Sa(e,{container:a,accept:t,walk:n}){let o=d.useRef(t),s=d.useRef(n);d.useEffect(()=>{o.current=t,s.current=n},[t,n]),te(()=>{if(!a||!e)return;let i=ot(a);if(!i)return;let v=o.current,c=s.current,m=Object.assign(y=>v(y),{acceptNode:v}),g=i.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,m,!1);for(;g.nextNode();)c(g.currentNode)},[a,e,o,s])}var Ca=Object.defineProperty,Oa=(e,a,t)=>a in e?Ca(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,Le=(e,a,t)=>(Oa(e,typeof a!="symbol"?a+"":a,t),t),x=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(x||{}),J=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(J||{}),ee=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(ee||{}),Ge=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.SetTyping=3]="SetTyping",e[e.RegisterOption=4]="RegisterOption",e[e.UnregisterOption=5]="UnregisterOption",e[e.DefaultToFirstOption=6]="DefaultToFirstOption",e[e.SetActivationTrigger=7]="SetActivationTrigger",e[e.UpdateVirtualConfiguration=8]="UpdateVirtualConfiguration",e[e.SetInputElement=9]="SetInputElement",e[e.SetButtonElement=10]="SetButtonElement",e[e.SetOptionsElement=11]="SetOptionsElement",e[e.MarkInputAsMoved=12]="MarkInputAsMoved",e))(Ge||{});function ye(e,a=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=a(e.options.slice()),o=n.length>0&&n[0].dataRef.current.order!==null?n.sort((i,v)=>i.dataRef.current.order-v.dataRef.current.order):lt(n,i=>i.dataRef.current.domRef.current),s=t?o.indexOf(t):null;return s===-1&&(s=null),{options:o,activeOptionIndex:s}}let Pa={1(e){var a;if((a=e.dataRef.current)!=null&&a.disabled||e.comboboxState===1)return e;let t=e.inputElement?de.Tracked(Yt(e.inputElement)):e.inputPositionState;return{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,inputPositionState:t,__demoMode:!1}},0(e){var a,t;if((a=e.dataRef.current)!=null&&a.disabled||e.comboboxState===0)return e;if((t=e.dataRef.current)!=null&&t.value){let n=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(n!==-1)return{...e,activeOptionIndex:n,comboboxState:0,__demoMode:!1,inputPositionState:de.Idle}}return{...e,comboboxState:0,inputPositionState:de.Idle,__demoMode:!1}},3(e,a){return e.isTyping===a.isTyping?e:{...e,isTyping:a.isTyping}},2(e,a){var t,n,o,s;if((t=e.dataRef.current)!=null&&t.disabled||e.optionsElement&&!((n=e.dataRef.current)!=null&&n.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let{options:m,disabled:g}=e.virtual,y=a.focus===V.Specific?a.idx:Fe(a,{resolveItems:()=>m,resolveActiveIndex:()=>{var b,p;return(p=(b=e.activeOptionIndex)!=null?b:m.findIndex(P=>!g(P)))!=null?p:null},resolveDisabled:g,resolveId(){throw new Error("Function not implemented.")}}),h=(o=a.trigger)!=null?o:2;return e.activeOptionIndex===y&&e.activationTrigger===h?e:{...e,activeOptionIndex:y,activationTrigger:h,isTyping:!1,__demoMode:!1}}let i=ye(e);if(i.activeOptionIndex===null){let m=i.options.findIndex(g=>!g.dataRef.current.disabled);m!==-1&&(i.activeOptionIndex=m)}let v=a.focus===V.Specific?a.idx:Fe(a,{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled}),c=(s=a.trigger)!=null?s:2;return e.activeOptionIndex===v&&e.activationTrigger===c?e:{...e,...i,isTyping:!1,activeOptionIndex:v,activationTrigger:c,__demoMode:!1}},4:(e,a)=>{var t,n,o,s;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:[...e.options,a.payload]};let i=a.payload,v=ye(e,m=>(m.push(i),m));e.activeOptionIndex===null&&(o=(n=e.dataRef.current).isSelected)!=null&&o.call(n,a.payload.dataRef.current.value)&&(v.activeOptionIndex=v.options.indexOf(i));let c={...e,...v,activationTrigger:2};return(s=e.dataRef.current)!=null&&s.__demoMode&&e.dataRef.current.value===void 0&&(c.activeOptionIndex=0),c},5:(e,a)=>{var t;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:e.options.filter(o=>o.id!==a.id)};let n=ye(e,o=>{let s=o.findIndex(i=>i.id===a.id);return s!==-1&&o.splice(s,1),o});return{...e,...n,activationTrigger:2}},6:(e,a)=>e.defaultToFirstOption===a.value?e:{...e,defaultToFirstOption:a.value},7:(e,a)=>e.activationTrigger===a.trigger?e:{...e,activationTrigger:a.trigger},8:(e,a)=>{var t,n;if(e.virtual===null)return{...e,virtual:{options:a.options,disabled:(t=a.disabled)!=null?t:()=>!1}};if(e.virtual.options===a.options&&e.virtual.disabled===a.disabled)return e;let o=e.activeOptionIndex;if(e.activeOptionIndex!==null){let s=a.options.indexOf(e.virtual.options[e.activeOptionIndex]);s!==-1?o=s:o=null}return{...e,activeOptionIndex:o,virtual:{options:a.options,disabled:(n=a.disabled)!=null?n:()=>!1}}},9:(e,a)=>e.inputElement===a.element?e:{...e,inputElement:a.element},10:(e,a)=>e.buttonElement===a.element?e:{...e,buttonElement:a.element},11:(e,a)=>e.optionsElement===a.element?e:{...e,optionsElement:a.element},12(e){return e.inputPositionState.kind!=="Tracked"?e:{...e,inputPositionState:de.Moved}}};class Oe extends nt{constructor(a){super(a),Le(this,"actions",{onChange:t=>{let{onChange:n,compare:o,mode:s,value:i}=this.state.dataRef.current;return le(s,{0:()=>n==null?void 0:n(t),1:()=>{let v=i.slice(),c=v.findIndex(m=>o(m,t));return c===-1?v.push(t):v.splice(c,1),n==null?void 0:n(v)}})},registerOption:(t,n)=>(this.send({type:4,payload:{id:t,dataRef:n}}),()=>{this.state.activeOptionIndex===this.state.dataRef.current.calculateIndex(n.current.value)&&this.send({type:6,value:!0}),this.send({type:5,id:t})}),goToOption:(t,n)=>(this.send({type:6,value:!1}),this.send({type:2,...t,trigger:n})),setIsTyping:t=>{this.send({type:3,isTyping:t})},closeCombobox:()=>{var t,n;this.send({type:1}),this.send({type:6,value:!1}),(n=(t=this.state.dataRef.current).onClose)==null||n.call(t)},openCombobox:()=>{this.send({type:0}),this.send({type:6,value:!0})},setActivationTrigger:t=>{this.send({type:7,trigger:t})},selectActiveOption:()=>{let t=this.selectors.activeOptionIndex(this.state);if(t!==null){if(this.actions.setIsTyping(!1),this.state.virtual)this.actions.onChange(this.state.virtual.options[t]);else{let{dataRef:n}=this.state.options[t];this.actions.onChange(n.current.value)}this.actions.goToOption({focus:V.Specific,idx:t})}},setInputElement:t=>{this.send({type:9,element:t})},setButtonElement:t=>{this.send({type:10,element:t})},setOptionsElement:t=>{this.send({type:11,element:t})}}),Le(this,"selectors",{activeDescendantId:t=>{var n,o;let s=this.selectors.activeOptionIndex(t);if(s!==null)return t.virtual?(o=t.options.find(i=>!i.dataRef.current.disabled&&t.dataRef.current.compare(i.dataRef.current.value,t.virtual.options[s])))==null?void 0:o.id:(n=t.options[s])==null?void 0:n.id},activeOptionIndex:t=>{if(t.defaultToFirstOption&&t.activeOptionIndex===null&&(t.virtual?t.virtual.options.length>0:t.options.length>0)){if(t.virtual){let{options:o,disabled:s}=t.virtual,i=o.findIndex(v=>{var c;return!((c=s==null?void 0:s(v))!=null&&c)});if(i!==-1)return i}let n=t.options.findIndex(o=>!o.dataRef.current.disabled);if(n!==-1)return n}return t.activeOptionIndex},activeOption:t=>{var n,o;let s=this.selectors.activeOptionIndex(t);return s===null?null:t.virtual?t.virtual.options[s??0]:(o=(n=t.options[s])==null?void 0:n.dataRef.current.value)!=null?o:null},isActive:(t,n,o)=>{var s;let i=this.selectors.activeOptionIndex(t);return i===null?!1:t.virtual?i===t.dataRef.current.calculateIndex(n):((s=t.options[i])==null?void 0:s.id)===o},shouldScrollIntoView:(t,n,o)=>!(t.virtual||t.__demoMode||t.comboboxState!==0||t.activationTrigger===0||!this.selectors.isActive(t,n,o)),didInputMove(t){return t.inputPositionState.kind==="Moved"}});{let t=this.state.id,n=Be.get(null);this.disposables.add(n.on(st.Push,o=>{!n.selectors.isTop(o,t)&&this.state.comboboxState===0&&this.actions.closeCombobox()})),this.on(0,()=>n.actions.push(t)),this.on(1,()=>n.actions.pop(t))}this.disposables.group(t=>{this.on(1,n=>{n.inputElement&&(t.dispose(),t.add(Wt(n.inputElement,n.inputPositionState,()=>{this.send({type:12})})))})})}static new({id:a,virtual:t=null,__demoMode:n=!1}){var o;return new Oe({id:a,dataRef:{current:{}},comboboxState:n?0:1,isTyping:!1,options:[],virtual:t?{options:t.options,disabled:(o=t.disabled)!=null?o:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:n,inputPositionState:de.Idle})}reduce(a,t){return le(t.type,Pa,a,t)}}const qe=d.createContext(null);function fe(e){let a=d.useContext(qe);if(a===null){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,We),t}return a}function We({id:e,virtual:a=null,__demoMode:t=!1}){let n=d.useMemo(()=>Oe.new({id:e,virtual:a,__demoMode:t}),[]);return it(()=>n.dispose()),n}let pe=d.createContext(null);pe.displayName="ComboboxDataContext";function ie(e){let a=d.useContext(pe);if(a===null){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ie),t}return a}let Ye=d.createContext(null);function Ea(e){let a=fe("VirtualProvider"),t=ie("VirtualProvider"),{options:n}=t.virtual,o=B(a,b=>b.optionsElement),[s,i]=d.useMemo(()=>{let b=o;if(!b)return[0,0];let p=window.getComputedStyle(b);return[parseFloat(p.paddingBlockStart||p.paddingTop),parseFloat(p.paddingBlockEnd||p.paddingBottom)]},[o]),v=Ut({enabled:n.length!==0,scrollPaddingStart:s,scrollPaddingEnd:i,count:n.length,estimateSize(){return 40},getScrollElement(){return a.state.optionsElement},overscan:12}),[c,m]=d.useState(0);te(()=>{m(b=>b+1)},[n]);let g=v.getVirtualItems(),y=B(a,b=>b.activationTrigger===ee.Pointer),h=B(a,a.selectors.activeOptionIndex);return g.length===0?null:G.createElement(Ye.Provider,{value:v},G.createElement("div",{style:{position:"relative",width:"100%",height:`${v.getTotalSize()}px`},ref:b=>{b&&(y||h!==null&&n.length>h&&v.scrollToIndex(h))}},g.map(b=>{var p;return G.createElement(d.Fragment,{key:b.key},G.cloneElement((p=e.children)==null?void 0:p.call(e,{...e.slot,option:n[b.index]}),{key:`${c}-${b.key}`,"data-index":b.index,"aria-setsize":n.length,"aria-posinset":b.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${b.start}px)`,overflowAnchor:"none"}}))})))}let Ta=d.Fragment;function Ra(e,a){let t=d.useId(),n=Et(),{value:o,defaultValue:s,onChange:i,form:v,name:c,by:m,invalid:g=!1,disabled:y=n||!1,onClose:h,__demoMode:b=!1,multiple:p=!1,immediate:P=!1,virtual:r=null,nullable:M,...A}=e,E=Tt(s),[T=p?[]:void 0,z]=Rt(o,i,E),S=We({id:t,virtual:r,__demoMode:b}),_=d.useRef({static:!1,hold:!1}),I=ta(m),F=D($=>r?m===null?r.options.indexOf($):r.options.findIndex(ae=>I(ae,$)):S.state.options.findIndex(ae=>I(ae.dataRef.current.value,$))),q=d.useCallback($=>le(w.mode,{[J.Multi]:()=>T.some(ae=>I(ae,$)),[J.Single]:()=>I(T,$)}),[T]),Y=B(S,$=>$.virtual),C=D(()=>h==null?void 0:h()),w=d.useMemo(()=>({__demoMode:b,immediate:P,optionsPropsRef:_,value:T,defaultValue:E,disabled:y,invalid:g,mode:p?J.Multi:J.Single,virtual:r?Y:null,onChange:z,isSelected:q,calculateIndex:F,compare:I,onClose:C}),[b,P,_,T,E,y,g,p,r,Y,z,q,F,I,C]);te(()=>{var $;r&&S.send({type:Ge.UpdateVirtualConfiguration,options:r.options,disabled:($=r.disabled)!=null?$:null})},[r,r==null?void 0:r.options,r==null?void 0:r.disabled]),te(()=>{S.state.dataRef.current=w},[w]);let[H,O,u,R]=B(S,$=>[$.comboboxState,$.buttonElement,$.inputElement,$.optionsElement]),N=Be.get(null),Q=B(N,d.useCallback($=>N.selectors.isTop($,t),[N,t]));$t(Q,[O,u,R],()=>S.actions.closeCombobox());let Z=B(S,S.selectors.activeOptionIndex),re=B(S,S.selectors.activeOption),f=be({open:H===x.Open,disabled:y,invalid:g,activeIndex:Z,activeOption:re,value:T}),[X,k]=wt(),U=a===null?{}:{ref:a},j=d.useCallback(()=>{if(E!==void 0)return z==null?void 0:z(E)},[z,E]),K=ve();return G.createElement(k,{value:X,props:{htmlFor:u==null?void 0:u.id},slot:{open:H===x.Open,disabled:y}},G.createElement(la,null,G.createElement(pe.Provider,{value:w},G.createElement(qe.Provider,{value:S},G.createElement(jt,{value:le(H,{[x.Open]:ge.Open,[x.Closed]:ge.Closed})},c!=null&&G.createElement(It,{disabled:y,data:T!=null?{[c]:T}:{},form:v,onReset:j}),K({ourProps:U,theirProps:A,slot:f,defaultTag:Ta,name:"Combobox"}))))))}let $a="input";function wa(e,a){var t,n;let o=fe("Combobox.Input"),s=ie("Combobox.Input"),i=d.useId(),v=ut(),{id:c=v||`headlessui-combobox-input-${i}`,onChange:m,displayValue:g,disabled:y=s.disabled||!1,autoFocus:h=!1,type:b="text",...p}=e,P=d.useRef(null),r=xe(P,a,aa(),o.actions.setInputElement),[M,A]=B(o,f=>[f.comboboxState,f.isTyping]),E=ct(),T=D(()=>{o.actions.onChange(null),o.state.optionsElement&&(o.state.optionsElement.scrollTop=0),o.actions.goToOption({focus:V.Nothing})}),z=d.useMemo(()=>{var f;return typeof g=="function"&&s.value!==void 0?(f=g(s.value))!=null?f:"":typeof s.value=="string"?s.value:""},[s.value,g]);Ee(([f,X],[k,U])=>{if(o.state.isTyping)return;let j=P.current;j&&((U===x.Open&&X===x.Closed||f!==k)&&(j.value=f),requestAnimationFrame(()=>{if(o.state.isTyping||!j||Ve(j))return;let{selectionStart:K,selectionEnd:$}=j;Math.abs(($??0)-(K??0))===0&&K===0&&j.setSelectionRange(j.value.length,j.value.length)}))},[z,M,A]),Ee(([f],[X])=>{if(f===x.Open&&X===x.Closed){if(o.state.isTyping)return;let k=P.current;if(!k)return;let U=k.value,{selectionStart:j,selectionEnd:K,selectionDirection:$}=k;k.value="",k.value=U,$!==null?k.setSelectionRange(j,K,$):k.setSelectionRange(j,K)}},[M]);let S=d.useRef(!1),_=D(()=>{S.current=!0}),I=D(()=>{E.nextFrame(()=>{S.current=!1})}),F=D(f=>{switch(o.actions.setIsTyping(!0),f.key){case W.Enter:if(o.state.comboboxState!==x.Open||S.current)return;if(f.preventDefault(),f.stopPropagation(),o.selectors.activeOptionIndex(o.state)===null){o.actions.closeCombobox();return}o.actions.selectActiveOption(),s.mode===J.Single&&o.actions.closeCombobox();break;case W.ArrowDown:return f.preventDefault(),f.stopPropagation(),le(o.state.comboboxState,{[x.Open]:()=>o.actions.goToOption({focus:V.Next}),[x.Closed]:()=>o.actions.openCombobox()});case W.ArrowUp:return f.preventDefault(),f.stopPropagation(),le(o.state.comboboxState,{[x.Open]:()=>o.actions.goToOption({focus:V.Previous}),[x.Closed]:()=>{se.flushSync(()=>o.actions.openCombobox()),s.value||o.actions.goToOption({focus:V.Last})}});case W.Home:if(o.state.comboboxState===x.Closed||f.shiftKey)break;return f.preventDefault(),f.stopPropagation(),o.actions.goToOption({focus:V.First});case W.PageUp:return f.preventDefault(),f.stopPropagation(),o.actions.goToOption({focus:V.First});case W.End:if(o.state.comboboxState===x.Closed||f.shiftKey)break;return f.preventDefault(),f.stopPropagation(),o.actions.goToOption({focus:V.Last});case W.PageDown:return f.preventDefault(),f.stopPropagation(),o.actions.goToOption({focus:V.Last});case W.Escape:return o.state.comboboxState!==x.Open?void 0:(f.preventDefault(),o.state.optionsElement&&!s.optionsPropsRef.current.static&&f.stopPropagation(),s.mode===J.Single&&s.value===null&&T(),o.actions.closeCombobox());case W.Tab:if(o.actions.setIsTyping(!1),o.state.comboboxState!==x.Open)return;s.mode===J.Single&&o.state.activationTrigger!==ee.Focus&&o.actions.selectActiveOption(),o.actions.closeCombobox();break}}),q=D(f=>{m==null||m(f),s.mode===J.Single&&f.target.value===""&&T(),o.actions.openCombobox()}),Y=D(f=>{var X,k,U;let j=(X=f.relatedTarget)!=null?X:Te.find(K=>K!==f.currentTarget);if(!((k=o.state.optionsElement)!=null&&k.contains(j))&&!((U=o.state.buttonElement)!=null&&U.contains(j))&&o.state.comboboxState===x.Open)return f.preventDefault(),s.mode===J.Single&&s.value===null&&T(),o.actions.closeCombobox()}),C=D(f=>{var X,k,U;let j=(X=f.relatedTarget)!=null?X:Te.find(K=>K!==f.currentTarget);(k=o.state.buttonElement)!=null&&k.contains(j)||(U=o.state.optionsElement)!=null&&U.contains(j)||s.disabled||s.immediate&&o.state.comboboxState!==x.Open&&E.microTask(()=>{se.flushSync(()=>o.actions.openCombobox()),o.actions.setActivationTrigger(ee.Focus)})}),w=Se(),H=dt(),{isFocused:O,focusProps:u}=ze({autoFocus:h}),{isHovered:R,hoverProps:N}=He({isDisabled:y}),Q=B(o,f=>f.optionsElement),Z=be({open:M===x.Open,disabled:y,invalid:s.invalid,hover:R,focus:O,autofocus:h}),re=Ce({ref:r,id:c,role:"combobox",type:b,"aria-controls":Q==null?void 0:Q.id,"aria-expanded":M===x.Open,"aria-activedescendant":B(o,o.selectors.activeDescendantId),"aria-labelledby":w,"aria-describedby":H,"aria-autocomplete":"list",defaultValue:(n=(t=e.defaultValue)!=null?t:s.defaultValue!==void 0?g==null?void 0:g(s.defaultValue):null)!=null?n:s.defaultValue,disabled:y||void 0,autoFocus:h,onCompositionStart:_,onCompositionEnd:I,onKeyDown:F,onChange:q,onFocus:C,onBlur:Y},u,N);return ve()({ourProps:re,theirProps:p,slot:Z,defaultTag:$a,name:"Combobox.Input"})}let ja="button";function Ia(e,a){let t=fe("Combobox.Button"),n=ie("Combobox.Button"),[o,s]=d.useState(null),i=xe(a,s,t.actions.setButtonElement),v=d.useId(),{id:c=`headlessui-combobox-button-${v}`,disabled:m=n.disabled||!1,autoFocus:g=!1,...y}=e,[h,b,p]=B(t,C=>[C.comboboxState,C.inputElement,C.optionsElement]),P=Ke(b),r=h===x.Open;Xt(r,{trigger:o,action:d.useCallback(C=>{if(o!=null&&o.contains(C.target))return ue.Ignore;if(b!=null&&b.contains(C.target))return ue.Ignore;let w=C.target.closest('[role="option"]:not([data-disabled])');return pt(w)?ue.Select(w):p!=null&&p.contains(C.target)?ue.Ignore:ue.Close},[o,b,p]),close:t.actions.closeCombobox,select:t.actions.selectActiveOption});let M=D(C=>{switch(C.key){case W.Space:case W.Enter:C.preventDefault(),C.stopPropagation(),t.state.comboboxState===x.Closed&&se.flushSync(()=>t.actions.openCombobox()),P();return;case W.ArrowDown:C.preventDefault(),C.stopPropagation(),t.state.comboboxState===x.Closed&&(se.flushSync(()=>t.actions.openCombobox()),t.state.dataRef.current.value||t.actions.goToOption({focus:V.First})),P();return;case W.ArrowUp:C.preventDefault(),C.stopPropagation(),t.state.comboboxState===x.Closed&&(se.flushSync(()=>t.actions.openCombobox()),t.state.dataRef.current.value||t.actions.goToOption({focus:V.Last})),P();return;case W.Escape:if(t.state.comboboxState!==x.Open)return;C.preventDefault(),t.state.optionsElement&&!n.optionsPropsRef.current.static&&C.stopPropagation(),se.flushSync(()=>t.actions.closeCombobox()),P();return;default:return}}),A=Jt(()=>{t.state.comboboxState===x.Open?t.actions.closeCombobox():t.actions.openCombobox(),P()}),E=Se([c]),{isFocusVisible:T,focusProps:z}=ze({autoFocus:g}),{isHovered:S,hoverProps:_}=He({isDisabled:m}),{pressed:I,pressProps:F}=mt({disabled:m}),q=be({open:h===x.Open,active:I||h===x.Open,disabled:m,invalid:n.invalid,value:n.value,hover:S,focus:T}),Y=Ce({ref:i,id:c,type:bt(e,o),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":p==null?void 0:p.id,"aria-expanded":h===x.Open,"aria-labelledby":E,disabled:m||void 0,autoFocus:g,onKeyDown:M},A,z,_,F);return ve()({ourProps:Y,theirProps:y,slot:q,defaultTag:ja,name:"Combobox.Button"})}let Na="div",ka=$e.RenderStrategy|$e.Static;function Ma(e,a){var t,n,o;let s=d.useId(),{id:i=`headlessui-combobox-options-${s}`,hold:v=!1,anchor:c,portal:m=!1,modal:g=!0,transition:y=!1,...h}=e,b=fe("Combobox.Options"),p=ie("Combobox.Options"),P=oa(c);P&&(m=!0);let[r,M]=na(P),[A,E]=d.useState(null),T=sa(),z=xe(a,P?r:null,b.actions.setOptionsElement,E),[S,_,I,F,q]=B(b,L=>[L.comboboxState,L.inputElement,L.buttonElement,L.optionsElement,L.activationTrigger]),Y=Re(_||I),C=Re(F),w=vt(),[H,O]=ft(y,A,w!==null?(w&ge.Open)===ge.Open:S===x.Open);gt(H,_,b.actions.closeCombobox);let u=p.__demoMode?!1:g&&S===x.Open;xt(u,C);let R=p.__demoMode?!1:g&&S===x.Open;ht(R,{allowed:d.useCallback(()=>[_,I,F],[_,I,F])});let N=B(b,b.selectors.didInputMove)?!1:H;te(()=>{var L;p.optionsPropsRef.current.static=(L=e.static)!=null?L:!1},[p.optionsPropsRef,e.static]),te(()=>{p.optionsPropsRef.current.hold=v},[p.optionsPropsRef,v]),Sa(S===x.Open,{container:F,accept(L){return L.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:L.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(L){L.setAttribute("role","none")}});let Q=Se([I==null?void 0:I.id]),Z=be({open:S===x.Open,option:void 0}),re=D(()=>{b.actions.setActivationTrigger(ee.Pointer)}),f=D(L=>{L.preventDefault(),b.actions.setActivationTrigger(ee.Pointer)}),X=Ce(P?T():{},{"aria-labelledby":Q,role:"listbox","aria-multiselectable":p.mode===J.Multi?!0:void 0,id:i,ref:z,style:{...h.style,...M,"--input-width":Ae(H,_,!0).width,"--button-width":Ae(H,I,!0).width},onWheel:q===ee.Pointer?void 0:re,onMouseDown:f,...yt(O)}),k=H&&S===x.Closed&&!e.static,U=De(k,(t=p.virtual)==null?void 0:t.options),j=De(k,p.value),K=d.useCallback(L=>p.compare(j,L),[p.compare,j]),$=d.useMemo(()=>{if(!p.virtual)return p;if(U===void 0)throw new Error("Missing `options` in virtual mode");return U!==p.virtual.options?{...p,virtual:{...p.virtual,options:U}}:p},[p,U,(n=p.virtual)==null?void 0:n.options]);p.virtual&&Object.assign(h,{children:G.createElement(pe.Provider,{value:$},G.createElement(Ea,{slot:Z},h.children))});let ae=ve(),tt=d.useMemo(()=>p.mode===J.Multi?p:{...p,isSelected:K},[p,K]);return G.createElement(St,{enabled:m?e.static||H:!1,ownerDocument:Y},G.createElement(pe.Provider,{value:tt},ae({ourProps:X,theirProps:{...h,children:G.createElement(Qt,{freeze:k},typeof h.children=="function"?(o=h.children)==null?void 0:o.call(h,Z):h.children)},slot:Z,defaultTag:Na,features:ka,visible:N,name:"Combobox.Options"})))}let Fa="div";function Da(e,a){var t,n,o;let s=ie("Combobox.Option"),i=fe("Combobox.Option"),v=d.useId(),{id:c=`headlessui-combobox-option-${v}`,value:m,disabled:g=(o=(n=(t=s.virtual)==null?void 0:t.disabled)==null?void 0:n.call(t,m))!=null?o:!1,order:y=null,...h}=e,[b]=B(i,O=>[O.inputElement]),p=Ke(b),P=B(i,d.useCallback(O=>i.selectors.isActive(O,m,c),[m,c])),r=s.isSelected(m),M=d.useRef(null),A=Ct({disabled:g,value:m,domRef:M,order:y}),E=d.useContext(Ye),T=xe(a,M,E?E.measureElement:null),z=D(()=>{i.actions.setIsTyping(!1),i.actions.onChange(m)});te(()=>i.actions.registerOption(c,A),[A,c]);let S=B(i,d.useCallback(O=>i.selectors.shouldScrollIntoView(O,m,c),[m,c]));te(()=>{if(S)return Ot().requestAnimationFrame(()=>{var O,u;(u=(O=M.current)==null?void 0:O.scrollIntoView)==null||u.call(O,{block:"nearest"})})},[S,M]);let _=D(O=>{O.preventDefault(),O.button===Zt.Left&&(g||(z(),Pt()||requestAnimationFrame(()=>p()),s.mode===J.Single&&i.actions.closeCombobox()))}),I=D(()=>{if(g)return i.actions.goToOption({focus:V.Nothing});let O=s.calculateIndex(m);i.actions.goToOption({focus:V.Specific,idx:O})}),F=ea(),q=D(O=>F.update(O)),Y=D(O=>{if(!F.wasMoved(O)||g||P&&i.state.activationTrigger===ee.Pointer)return;let u=s.calculateIndex(m);i.actions.goToOption({focus:V.Specific,idx:u},ee.Pointer)}),C=D(O=>{F.wasMoved(O)&&(g||P&&(s.optionsPropsRef.current.hold||i.state.activationTrigger===ee.Pointer&&i.actions.goToOption({focus:V.Nothing})))}),w=be({active:P,focus:P,selected:r,disabled:g}),H={id:c,ref:T,role:"option",tabIndex:g===!0?void 0:-1,"aria-disabled":g===!0?!0:void 0,"aria-selected":r,disabled:void 0,onMouseDown:_,onFocus:I,onPointerEnter:q,onMouseEnter:q,onPointerMove:Y,onMouseMove:Y,onPointerLeave:C,onMouseLeave:C};return ve()({ourProps:H,theirProps:h,slot:w,defaultTag:Fa,name:"Combobox.Option"})}let Aa=me(Ra),Xe=me(Ia),Je=me(wa),_a=rt,Qe=me(Ma),Ze=me(Da),La=Object.assign(Aa,{Input:Je,Button:Xe,Label:_a,Options:Qe,Option:Ze});function Va({options:e,value:a,onChange:t,defaultValue:n,displayValue:o,filter:s,placeholder:i,disabled:v,invalid:c,name:m,"aria-label":g,className:y,children:h}){const[b,p]=d.useState(""),P=o??(E=>E!=null?String(E):""),M=s??((E,T)=>P(E).toLowerCase().includes(T.toLowerCase())),A=d.useMemo(()=>b?e.filter(E=>M(E,b)):e,[e,b,M]);return l.jsx(La,{value:a,onChange:t,defaultValue:n,disabled:v,name:m,onClose:()=>p(""),children:l.jsxs("div",{className:ne("relative",y),children:[l.jsxs("div",{className:"relative",children:[l.jsx(Je,{"aria-label":g,displayValue:P,onChange:E=>p(E.target.value),placeholder:i,className:ne(["w-full radius-inner py-2 pl-3 pr-10","text-sm text-fg-primary placeholder:text-fg-muted","bg-input-bg",c?"border border-sys-red":"border border-input-border","ring-focus-inset","hover:border-edge-strong","disabled:opacity-40 disabled:pointer-events-none disabled:cursor-not-allowed","transition-colors"])}),l.jsx(Xe,{className:"absolute inset-y-0 right-0 flex items-center pr-3 group",children:l.jsx(Nt,{className:"w-4 h-4 text-fg-muted transition-transform duration-200 group-data-[open]:rotate-180"})})]}),l.jsx(Qe,{anchor:"bottom start",transition:!0,className:ne(["w-[var(--input-width)] min-w-[180px]","max-h-60 overflow-y-auto overscroll-contain scroll-py-1","radius-inset p-1 mt-1","surface-elevated","focus:outline-none","transition-opacity","data-[closed]:opacity-0","data-[enter]:duration-150 data-[leave]:duration-100","z-50"]),children:A.length===0&&b!==""?l.jsx("div",{className:"px-3 py-2 text-sm text-fg-muted",children:"No results found"}):A.map((E,T)=>l.jsx(d.Fragment,{children:h(E)},T))})]})})}function Ba({value:e,disabled:a,className:t,children:n}){return l.jsx(Ze,{as:d.Fragment,value:e,disabled:a,children:({selected:o,focus:s})=>l.jsxs("div",{className:ne("flex items-center gap-2 px-3 py-2 radius-control cursor-default","text-sm",s&&"bg-sys-blue text-white",!s&&"text-fg-primary",o&&!s&&"text-sys-blue",a&&"opacity-50 cursor-not-allowed",t),children:[l.jsx("span",{className:"w-4 flex-shrink-0",children:o&&l.jsx(kt,{className:"w-4 h-4"})}),l.jsx("span",{className:"truncate flex-1",children:n})]})})}function za({className:e,...a}){return l.jsx("span",{...a,className:ne("truncate",e)})}function oe({value:e,onChange:a,options:t,placeholder:n,disabled:o,className:s,"aria-label":i}){const v=t.find(c=>c.value===e);return l.jsx(Va,{options:t,value:v,onChange:c=>{c&&a(c.value)},displayValue:c=>(c==null?void 0:c.label)??"",filter:(c,m)=>c.label.toLowerCase().includes(m.toLowerCase()),placeholder:n,disabled:o,className:s,"aria-label":i,children:c=>l.jsx(Ba,{value:c,disabled:c.disabled,children:l.jsx(za,{children:c.label})})})}const et=[{target:"PacketStats",fn:"type",minStage:1}];ma(et);function ce({icon:e,label:a,value:t,color:n,percentage:o}){return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:ne("p-1.5 rounded-md",n),children:e}),l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"text-sm font-semibold text-fg-primary",children:t.toLocaleString()}),l.jsxs("span",{className:"text-xs text-fg-muted leading-tight",children:[a,o!==void 0&&l.jsxs("span",{className:"ml-1 opacity-70",children:["(",o,"%)"]})]})]})]})}function Ha({packets:e}){pa(et);const a=d.useMemo(()=>{let t=0,n=0,o=0;const s=new Set;let i=0,v=0;for(const y of e){switch(Ue(y)){case"forward":t++;break;case"dropped":n++;break;case"duplicate":o++;break}y.src_hash&&s.add(y.src_hash),y.rssi&&(i+=y.rssi,v++)}const c=e.length,m=v>0?Math.round(i/v):0;return{total:c,rx:c,fwd:t,dropped:n,duplicate:o,uniqueSources:s.size,avgRssi:m,rxPercent:100,fwdPercent:c>0?Math.round(t/c*100):0,droppedPercent:c>0?Math.round(n/c*100):0}},[e]);return e.length===0?null:l.jsx("div",{className:"surface-base depth-raised rounded-2xl p-3 pr-4",children:l.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:flex sm:items-center sm:justify-between sm:gap-6",children:[l.jsx(ce,{icon:l.jsx(ba,{className:"w-3.5 h-3.5 text-sys-blue"}),label:"Received",value:a.rx,color:"bg-sys-blue/10",percentage:a.rxPercent}),l.jsx(ce,{icon:l.jsx(va,{className:"w-3.5 h-3.5 text-sys-green"}),label:"Forwarded",value:a.fwd,color:"bg-sys-green/10",percentage:a.fwdPercent}),l.jsx(ce,{icon:l.jsx(Kt,{className:"w-3.5 h-3.5 text-sys-red"}),label:"Dropped",value:a.dropped,color:"bg-sys-red/10",percentage:a.droppedPercent}),l.jsx(ce,{icon:l.jsx(Mt,{className:"w-3.5 h-3.5 text-fg-muted"}),label:"Duplicates",value:a.duplicate,color:"bg-subtle-fill"}),l.jsxs("div",{className:"hidden sm:flex items-center gap-6 ml-auto",children:[l.jsx(ce,{icon:l.jsx(Ft,{className:"w-3.5 h-3.5 text-sys-indigo"}),label:"Sources",value:a.uniqueSources,color:"bg-sys-indigo/10"}),l.jsxs("div",{className:"flex flex-col items-end pr-1",children:[l.jsxs("span",{className:"type-data-sm text-fg-secondary",children:[a.avgRssi," dBm"]}),l.jsx("span",{className:"text-xs text-fg-muted",children:"Avg Signal"})]})]})]})})}const Ua=d.memo(Ha);function Po(){const e=Dt(),a=At(),t=ia(),n=Gt(u=>u.requestChannel),o=_t(),s=a==null?void 0:a.local_hash,i=a==null?void 0:a.neighbors,v=Lt(),c=Vt(),g=Bt().isBackgroundLoading&&v>=5,[y,h]=d.useState(!1),[b,p]=d.useState(!0),P=d.useCallback(u=>p(u),[]),[r,M]=d.useState({limit:500,status:"all"}),[A,E]=d.useState(ua),T=d.useMemo(()=>{const u=Math.floor(Date.now()/1e3),R=we[v].minutes;return{start:u-R*60,end:u}},[v]),z=d.useMemo(()=>{const u=(a==null?void 0:a.neighbors)??{};return Object.fromEntries(Object.entries(u).filter(([R])=>!o.has(R)))},[a==null?void 0:a.neighbors,o]),S=ra(),[_,I]=d.useState(Date.now);d.useEffect(()=>{r.timeRange&&r.timeRange>0&&queueMicrotask(()=>I(Date.now()))},[r.timeRange,e]);const F=d.useMemo(()=>ca(e,A,S,T),[e,A,S,T]),q=d.useMemo(()=>{const u=r.limit??500;return[...F.length<=u?F:F.slice(-u)].sort((N,Q)=>(Q.timestamp??0)-(N.timestamp??0))},[F,r.limit]),Y=e.length===0,C=d.useMemo(()=>{let u=q;if(r.type!==void 0){const R=je[r.type];u=u.filter(N=>{const Q=N.type??N.payload_type,Z=N.payload_type_name;return Q===r.type||Z===R})}if(r.route!==void 0){const R=Ie[r.route];u=u.filter(N=>{const Q=N.route??N.route_type,Z=N.route_type_name;return Q===r.route||Z===R})}if(r.status&&r.status!=="all"&&(u=u.filter(R=>Ue(R)===r.status)),r.signalMin!==void 0&&(u=u.filter(R=>R.rssi>=r.signalMin)),r.timeRange&&r.timeRange>0){const R=_/1e3-r.timeRange*3600;u=u.filter(N=>N.timestamp>=R)}return u},[q,r.type,r.route,r.status,r.signalMin,r.timeRange,_]),w=(u,R)=>M(N=>({...N,[u]:R})),H=()=>M({limit:r.limit,status:"all"}),O=r.type!==void 0||r.route!==void 0||r.status&&r.status!=="all"||r.signalMin!==void 0||r.timeRange&&r.timeRange>0;return l.jsxs(fa,{children:[l.jsx(ga,{title:"Packet History",icon:l.jsx(ke,{}),controls:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(Ne,{outline:!0,color:O?"primary":"muted",onClick:()=>h(!y),className:"sm:hidden",children:[l.jsx(_e,{"data-slot":"icon"}),O&&l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-sys-blue"})]}),l.jsx(ha,{ranges:we,selectedIndex:v,onSelect:c,isPending:g})]})}),l.jsxs(xa,{children:[l.jsx(ya,{template:"auto",className:"relative z-10",children:l.jsx(he,{neomorphic:!0,className:"overflow-visible",children:l.jsx(da,{parentStartTs:T.start,parentEndTs:T.end,neighbors:z,filter:A,onChange:E})})}),l.jsxs(he,{neomorphic:!0,noPadding:!0,className:ne("overflow-hidden transition-all duration-200",y?"max-h-96 opacity-100":"max-h-0 opacity-0 sm:max-h-96 sm:opacity-100"),children:[l.jsx(Me,{listHeader:!0,icon:l.jsx(_e,{className:"icon-sm"}),title:"Filters",actions:O?l.jsxs(Ne,{plain:!0,color:"muted",onClick:H,className:"!text-xs !py-0.5 !px-1.5",children:[l.jsx(zt,{"data-slot":"icon",className:"!w-3 !h-3"}),"Clear"]}):void 0}),l.jsx("div",{className:"p-3 sm:p-4",children:l.jsxs("div",{className:"grid grid-cols-2 sm:flex sm:flex-wrap gap-3",children:[l.jsxs("div",{className:"flex-1 min-w-[140px]",children:[l.jsx("label",{className:"type-micro block mb-1",children:"Type"}),l.jsx(oe,{value:r.type??"",onChange:u=>w("type",u===""?void 0:Number(u)),options:[{value:"",label:"All Types"},...Object.entries(je).map(([u,R])=>({value:Number(u),label:R}))],placeholder:"Search types...","aria-label":"Filter by packet type"})]}),l.jsxs("div",{className:"flex-1 min-w-[140px]",children:[l.jsx("label",{className:"type-micro block mb-1",children:"Route"}),l.jsx(oe,{value:r.route??"",onChange:u=>w("route",u===""?void 0:Number(u)),options:[{value:"",label:"All Routes"},...Object.entries(Ie).map(([u,R])=>({value:Number(u),label:R}))],placeholder:"Search routes...","aria-label":"Filter by route type"})]}),l.jsxs("div",{className:"flex-1 min-w-[140px]",children:[l.jsx("label",{className:"type-micro block mb-1",children:"Status"}),l.jsx(oe,{value:r.status??"all",onChange:u=>w("status",u),options:[{value:"all",label:"All Status"},{value:"rx",label:"Received"},{value:"forward",label:"Forwarded"},{value:"dropped",label:"Dropped"},{value:"duplicate",label:"Duplicate"}],placeholder:"Search status...","aria-label":"Filter by status"})]}),l.jsxs("div",{className:"flex-1 min-w-[120px]",children:[l.jsx("label",{className:"type-micro block mb-1",children:"Time"}),l.jsx(oe,{value:r.timeRange??0,onChange:u=>w("timeRange",u===0?void 0:u),options:[{value:0,label:"All Time"},{value:1,label:"Last 1h"},{value:6,label:"Last 6h"},{value:24,label:"Last 24h"},{value:168,label:"Last 7d"}],placeholder:"Search time...","aria-label":"Filter by time range"})]}),l.jsxs("div",{className:"flex-1 min-w-[130px]",children:[l.jsx("label",{className:"type-micro block mb-1",children:"Signal"}),l.jsx(oe,{value:r.signalMin??"",onChange:u=>w("signalMin",u===""?void 0:Number(u)),options:[{value:"",label:"Any Signal"},{value:-90,label:"Strong (≥-90)"},{value:-100,label:"Good (≥-100)"},{value:-110,label:"Fair (≥-110)"},{value:-120,label:"Weak (≥-120)"}],placeholder:"Search signal...","aria-label":"Filter by signal strength"})]}),l.jsxs("div",{className:"flex-1 min-w-[100px]",children:[l.jsx("label",{className:"type-micro block mb-1",children:"Limit"}),l.jsx(oe,{value:r.limit??500,onChange:u=>w("limit",u),options:[{value:100,label:"100"},{value:200,label:"200"},{value:500,label:"500"},{value:1e3,label:"1K"},{value:2e3,label:"2K"},{value:5e3,label:"5K"},{value:1e4,label:"10K"}],placeholder:"Limit...","aria-label":"Packet limit"})]}),l.jsxs("div",{className:"flex-1 min-w-[100px]",children:[l.jsx("label",{className:"type-micro block mb-1",children:"Per Page"}),l.jsx(oe,{value:r.perPage??50,onChange:u=>w("perPage",u),options:[{value:25,label:"25"},{value:50,label:"50"},{value:100,label:"100"},{value:200,label:"200"},{value:500,label:"500"}],placeholder:"Per page...","aria-label":"Packets per page"})]})]})})]}),l.jsx(Ua,{packets:C}),l.jsxs(he,{neomorphic:!0,noPadding:!0,className:"!overflow-visible",children:[l.jsx(Me,{listHeader:!0,icon:l.jsx(ke,{className:"icon-sm"}),title:"Packet History",actions:l.jsx(Ht,{enabled:b,onChange:P,label:"Hide Dupes",size:"sm"})}),l.jsx(qt,{packets:C,allPackets:e,localHash:s,neighbors:i,resolveSource:S,getDecodedContent:t,onChannelClick:n,loading:Y,showPagination:!0,perPage:r.perPage??50,hideDupes:b,emptyMessage:"No packets found"})]})]})]})}export{Po as default}; +import{r as d,aj as D,ak as at,al as Ve,am as Pe,an as te,ao as ot,ap as nt,aq as le,ar as Be,as as st,at as lt,au as it,av as me,aw as rt,ax as ut,ay as xe,az as B,aA as ct,aB as Ee,aC as W,aD as se,aE as Te,aF as Se,aG as dt,aH as ze,aI as He,aJ as be,aK as Ce,aL as ve,aM as pt,aN as mt,aO as bt,aP as Re,aQ as vt,aR as ft,aS as ge,aT as gt,aU as xt,aV as ht,aW as yt,aX as G,aY as St,aZ as Ct,a_ as Ot,a$ as Pt,b0 as Et,b1 as Tt,b2 as Rt,b3 as $t,b4 as wt,b5 as jt,b6 as It,b7 as $e,j as l,c as ne,ae as Nt,w as kt,x as Mt,b8 as Ft,y as Dt,E as At,J as _t,K as Lt,aa as Vt,ah as Bt,N as we,b9 as je,ba as Ie,B as Ne,bb as ke,F as Me,bc as zt,T as Ht}from"./index-2YU-f7O7.js";import{b as Ut,g as Ue,a as Kt,u as Gt,P as qt}from"./PacketList-BhefpQer.js";import{c as V,p as Wt,a as de,f as Fe,b as Yt,L as Xt,S as ue,s as Jt,u as De,d as Qt,g as Zt,e as ea,h as ta}from"./element-movement-Bhgekpql.js";import{F as aa,y as oa,R as na,T as sa,w as Ae,A as la}from"./map-pin-DwpgbaSS.js";import{useGetDecodedContent as ia,useResolveSource as ra}from"./usePipelineStore-D-0Ba45c.js";import{c as ua,a as ca,A as da}from"./AnalyzerFilterPanel-DW8wllyq.js";import{u as pa,r as ma}from"./consumer-registry-BaTbQUiU.js";import{A as ba}from"./arrow-up-BCJu40uf.js";import{A as va}from"./SignalIndicator-CZkLIt0w.js";import{P as fa,a as ga,B as xa,C as he}from"./PageLayout-tvsYvfyL.js";import{T as ha}from"./TimeRangeStepper--TSSRhtK.js";import{F as _e}from"./funnel-D7UU9v8s.js";import{R as ya}from"./Grid-BUbHrfD3.js";import"./primitives-DMQ-qQ8e.js";import"./payload-decoders-BzIXzxqW.js";import"./badge-colors-BNUqIXCA.js";import"./chat-utils-zf_UbwVO.js";import"./chevron-right-DwaXNeO4.js";import"./circle-question-mark-BpV3PDV1.js";import"./triangle-alert-il1la-RI.js";import"./DataBox-D8nJsUbV.js";import"./layers-7MoN93tY.js";import"./hash-DswdBqT-.js";import"./activity-BgtT9aiG.js";import"./circle-check-CMy_4dWl.js";import"./database-1_qMqgVS.js";import"./useMapViewStore-Ce8IV--K.js";import"./index-rOrsjUFs.js";import"./shield-Cg8ViVBZ.js";import"./node-types--B4HRIdZ.js";import"./monitor-smartphone-BbnIneu-.js";import"./search-5bBDdD-8.js";function Ke(e){let a=d.useRef({value:"",selectionStart:null,selectionEnd:null});return at(e,"blur",t=>{let n=t.target;Pe(n)&&(a.current={value:n.value,selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})}),D(()=>{if(!Ve(e)&&Pe(e)&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==a.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:t,selectionEnd:n}=a.current;t!==null&&n!==null&&e.setSelectionRange(t,n)}a.current={value:"",selectionStart:null,selectionEnd:null}}})}function Sa(e,{container:a,accept:t,walk:n}){let o=d.useRef(t),s=d.useRef(n);d.useEffect(()=>{o.current=t,s.current=n},[t,n]),te(()=>{if(!a||!e)return;let i=ot(a);if(!i)return;let v=o.current,c=s.current,m=Object.assign(y=>v(y),{acceptNode:v}),g=i.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,m,!1);for(;g.nextNode();)c(g.currentNode)},[a,e,o,s])}var Ca=Object.defineProperty,Oa=(e,a,t)=>a in e?Ca(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,Le=(e,a,t)=>(Oa(e,typeof a!="symbol"?a+"":a,t),t),x=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(x||{}),J=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(J||{}),ee=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(ee||{}),Ge=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.SetTyping=3]="SetTyping",e[e.RegisterOption=4]="RegisterOption",e[e.UnregisterOption=5]="UnregisterOption",e[e.DefaultToFirstOption=6]="DefaultToFirstOption",e[e.SetActivationTrigger=7]="SetActivationTrigger",e[e.UpdateVirtualConfiguration=8]="UpdateVirtualConfiguration",e[e.SetInputElement=9]="SetInputElement",e[e.SetButtonElement=10]="SetButtonElement",e[e.SetOptionsElement=11]="SetOptionsElement",e[e.MarkInputAsMoved=12]="MarkInputAsMoved",e))(Ge||{});function ye(e,a=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=a(e.options.slice()),o=n.length>0&&n[0].dataRef.current.order!==null?n.sort((i,v)=>i.dataRef.current.order-v.dataRef.current.order):lt(n,i=>i.dataRef.current.domRef.current),s=t?o.indexOf(t):null;return s===-1&&(s=null),{options:o,activeOptionIndex:s}}let Pa={1(e){var a;if((a=e.dataRef.current)!=null&&a.disabled||e.comboboxState===1)return e;let t=e.inputElement?de.Tracked(Yt(e.inputElement)):e.inputPositionState;return{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,inputPositionState:t,__demoMode:!1}},0(e){var a,t;if((a=e.dataRef.current)!=null&&a.disabled||e.comboboxState===0)return e;if((t=e.dataRef.current)!=null&&t.value){let n=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(n!==-1)return{...e,activeOptionIndex:n,comboboxState:0,__demoMode:!1,inputPositionState:de.Idle}}return{...e,comboboxState:0,inputPositionState:de.Idle,__demoMode:!1}},3(e,a){return e.isTyping===a.isTyping?e:{...e,isTyping:a.isTyping}},2(e,a){var t,n,o,s;if((t=e.dataRef.current)!=null&&t.disabled||e.optionsElement&&!((n=e.dataRef.current)!=null&&n.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let{options:m,disabled:g}=e.virtual,y=a.focus===V.Specific?a.idx:Fe(a,{resolveItems:()=>m,resolveActiveIndex:()=>{var b,p;return(p=(b=e.activeOptionIndex)!=null?b:m.findIndex(P=>!g(P)))!=null?p:null},resolveDisabled:g,resolveId(){throw new Error("Function not implemented.")}}),h=(o=a.trigger)!=null?o:2;return e.activeOptionIndex===y&&e.activationTrigger===h?e:{...e,activeOptionIndex:y,activationTrigger:h,isTyping:!1,__demoMode:!1}}let i=ye(e);if(i.activeOptionIndex===null){let m=i.options.findIndex(g=>!g.dataRef.current.disabled);m!==-1&&(i.activeOptionIndex=m)}let v=a.focus===V.Specific?a.idx:Fe(a,{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled}),c=(s=a.trigger)!=null?s:2;return e.activeOptionIndex===v&&e.activationTrigger===c?e:{...e,...i,isTyping:!1,activeOptionIndex:v,activationTrigger:c,__demoMode:!1}},4:(e,a)=>{var t,n,o,s;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:[...e.options,a.payload]};let i=a.payload,v=ye(e,m=>(m.push(i),m));e.activeOptionIndex===null&&(o=(n=e.dataRef.current).isSelected)!=null&&o.call(n,a.payload.dataRef.current.value)&&(v.activeOptionIndex=v.options.indexOf(i));let c={...e,...v,activationTrigger:2};return(s=e.dataRef.current)!=null&&s.__demoMode&&e.dataRef.current.value===void 0&&(c.activeOptionIndex=0),c},5:(e,a)=>{var t;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:e.options.filter(o=>o.id!==a.id)};let n=ye(e,o=>{let s=o.findIndex(i=>i.id===a.id);return s!==-1&&o.splice(s,1),o});return{...e,...n,activationTrigger:2}},6:(e,a)=>e.defaultToFirstOption===a.value?e:{...e,defaultToFirstOption:a.value},7:(e,a)=>e.activationTrigger===a.trigger?e:{...e,activationTrigger:a.trigger},8:(e,a)=>{var t,n;if(e.virtual===null)return{...e,virtual:{options:a.options,disabled:(t=a.disabled)!=null?t:()=>!1}};if(e.virtual.options===a.options&&e.virtual.disabled===a.disabled)return e;let o=e.activeOptionIndex;if(e.activeOptionIndex!==null){let s=a.options.indexOf(e.virtual.options[e.activeOptionIndex]);s!==-1?o=s:o=null}return{...e,activeOptionIndex:o,virtual:{options:a.options,disabled:(n=a.disabled)!=null?n:()=>!1}}},9:(e,a)=>e.inputElement===a.element?e:{...e,inputElement:a.element},10:(e,a)=>e.buttonElement===a.element?e:{...e,buttonElement:a.element},11:(e,a)=>e.optionsElement===a.element?e:{...e,optionsElement:a.element},12(e){return e.inputPositionState.kind!=="Tracked"?e:{...e,inputPositionState:de.Moved}}};class Oe extends nt{constructor(a){super(a),Le(this,"actions",{onChange:t=>{let{onChange:n,compare:o,mode:s,value:i}=this.state.dataRef.current;return le(s,{0:()=>n==null?void 0:n(t),1:()=>{let v=i.slice(),c=v.findIndex(m=>o(m,t));return c===-1?v.push(t):v.splice(c,1),n==null?void 0:n(v)}})},registerOption:(t,n)=>(this.send({type:4,payload:{id:t,dataRef:n}}),()=>{this.state.activeOptionIndex===this.state.dataRef.current.calculateIndex(n.current.value)&&this.send({type:6,value:!0}),this.send({type:5,id:t})}),goToOption:(t,n)=>(this.send({type:6,value:!1}),this.send({type:2,...t,trigger:n})),setIsTyping:t=>{this.send({type:3,isTyping:t})},closeCombobox:()=>{var t,n;this.send({type:1}),this.send({type:6,value:!1}),(n=(t=this.state.dataRef.current).onClose)==null||n.call(t)},openCombobox:()=>{this.send({type:0}),this.send({type:6,value:!0})},setActivationTrigger:t=>{this.send({type:7,trigger:t})},selectActiveOption:()=>{let t=this.selectors.activeOptionIndex(this.state);if(t!==null){if(this.actions.setIsTyping(!1),this.state.virtual)this.actions.onChange(this.state.virtual.options[t]);else{let{dataRef:n}=this.state.options[t];this.actions.onChange(n.current.value)}this.actions.goToOption({focus:V.Specific,idx:t})}},setInputElement:t=>{this.send({type:9,element:t})},setButtonElement:t=>{this.send({type:10,element:t})},setOptionsElement:t=>{this.send({type:11,element:t})}}),Le(this,"selectors",{activeDescendantId:t=>{var n,o;let s=this.selectors.activeOptionIndex(t);if(s!==null)return t.virtual?(o=t.options.find(i=>!i.dataRef.current.disabled&&t.dataRef.current.compare(i.dataRef.current.value,t.virtual.options[s])))==null?void 0:o.id:(n=t.options[s])==null?void 0:n.id},activeOptionIndex:t=>{if(t.defaultToFirstOption&&t.activeOptionIndex===null&&(t.virtual?t.virtual.options.length>0:t.options.length>0)){if(t.virtual){let{options:o,disabled:s}=t.virtual,i=o.findIndex(v=>{var c;return!((c=s==null?void 0:s(v))!=null&&c)});if(i!==-1)return i}let n=t.options.findIndex(o=>!o.dataRef.current.disabled);if(n!==-1)return n}return t.activeOptionIndex},activeOption:t=>{var n,o;let s=this.selectors.activeOptionIndex(t);return s===null?null:t.virtual?t.virtual.options[s??0]:(o=(n=t.options[s])==null?void 0:n.dataRef.current.value)!=null?o:null},isActive:(t,n,o)=>{var s;let i=this.selectors.activeOptionIndex(t);return i===null?!1:t.virtual?i===t.dataRef.current.calculateIndex(n):((s=t.options[i])==null?void 0:s.id)===o},shouldScrollIntoView:(t,n,o)=>!(t.virtual||t.__demoMode||t.comboboxState!==0||t.activationTrigger===0||!this.selectors.isActive(t,n,o)),didInputMove(t){return t.inputPositionState.kind==="Moved"}});{let t=this.state.id,n=Be.get(null);this.disposables.add(n.on(st.Push,o=>{!n.selectors.isTop(o,t)&&this.state.comboboxState===0&&this.actions.closeCombobox()})),this.on(0,()=>n.actions.push(t)),this.on(1,()=>n.actions.pop(t))}this.disposables.group(t=>{this.on(1,n=>{n.inputElement&&(t.dispose(),t.add(Wt(n.inputElement,n.inputPositionState,()=>{this.send({type:12})})))})})}static new({id:a,virtual:t=null,__demoMode:n=!1}){var o;return new Oe({id:a,dataRef:{current:{}},comboboxState:n?0:1,isTyping:!1,options:[],virtual:t?{options:t.options,disabled:(o=t.disabled)!=null?o:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:n,inputPositionState:de.Idle})}reduce(a,t){return le(t.type,Pa,a,t)}}const qe=d.createContext(null);function fe(e){let a=d.useContext(qe);if(a===null){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,We),t}return a}function We({id:e,virtual:a=null,__demoMode:t=!1}){let n=d.useMemo(()=>Oe.new({id:e,virtual:a,__demoMode:t}),[]);return it(()=>n.dispose()),n}let pe=d.createContext(null);pe.displayName="ComboboxDataContext";function ie(e){let a=d.useContext(pe);if(a===null){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ie),t}return a}let Ye=d.createContext(null);function Ea(e){let a=fe("VirtualProvider"),t=ie("VirtualProvider"),{options:n}=t.virtual,o=B(a,b=>b.optionsElement),[s,i]=d.useMemo(()=>{let b=o;if(!b)return[0,0];let p=window.getComputedStyle(b);return[parseFloat(p.paddingBlockStart||p.paddingTop),parseFloat(p.paddingBlockEnd||p.paddingBottom)]},[o]),v=Ut({enabled:n.length!==0,scrollPaddingStart:s,scrollPaddingEnd:i,count:n.length,estimateSize(){return 40},getScrollElement(){return a.state.optionsElement},overscan:12}),[c,m]=d.useState(0);te(()=>{m(b=>b+1)},[n]);let g=v.getVirtualItems(),y=B(a,b=>b.activationTrigger===ee.Pointer),h=B(a,a.selectors.activeOptionIndex);return g.length===0?null:G.createElement(Ye.Provider,{value:v},G.createElement("div",{style:{position:"relative",width:"100%",height:`${v.getTotalSize()}px`},ref:b=>{b&&(y||h!==null&&n.length>h&&v.scrollToIndex(h))}},g.map(b=>{var p;return G.createElement(d.Fragment,{key:b.key},G.cloneElement((p=e.children)==null?void 0:p.call(e,{...e.slot,option:n[b.index]}),{key:`${c}-${b.key}`,"data-index":b.index,"aria-setsize":n.length,"aria-posinset":b.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${b.start}px)`,overflowAnchor:"none"}}))})))}let Ta=d.Fragment;function Ra(e,a){let t=d.useId(),n=Et(),{value:o,defaultValue:s,onChange:i,form:v,name:c,by:m,invalid:g=!1,disabled:y=n||!1,onClose:h,__demoMode:b=!1,multiple:p=!1,immediate:P=!1,virtual:r=null,nullable:M,...A}=e,E=Tt(s),[T=p?[]:void 0,z]=Rt(o,i,E),S=We({id:t,virtual:r,__demoMode:b}),_=d.useRef({static:!1,hold:!1}),I=ta(m),F=D($=>r?m===null?r.options.indexOf($):r.options.findIndex(ae=>I(ae,$)):S.state.options.findIndex(ae=>I(ae.dataRef.current.value,$))),q=d.useCallback($=>le(w.mode,{[J.Multi]:()=>T.some(ae=>I(ae,$)),[J.Single]:()=>I(T,$)}),[T]),Y=B(S,$=>$.virtual),C=D(()=>h==null?void 0:h()),w=d.useMemo(()=>({__demoMode:b,immediate:P,optionsPropsRef:_,value:T,defaultValue:E,disabled:y,invalid:g,mode:p?J.Multi:J.Single,virtual:r?Y:null,onChange:z,isSelected:q,calculateIndex:F,compare:I,onClose:C}),[b,P,_,T,E,y,g,p,r,Y,z,q,F,I,C]);te(()=>{var $;r&&S.send({type:Ge.UpdateVirtualConfiguration,options:r.options,disabled:($=r.disabled)!=null?$:null})},[r,r==null?void 0:r.options,r==null?void 0:r.disabled]),te(()=>{S.state.dataRef.current=w},[w]);let[H,O,u,R]=B(S,$=>[$.comboboxState,$.buttonElement,$.inputElement,$.optionsElement]),N=Be.get(null),Q=B(N,d.useCallback($=>N.selectors.isTop($,t),[N,t]));$t(Q,[O,u,R],()=>S.actions.closeCombobox());let Z=B(S,S.selectors.activeOptionIndex),re=B(S,S.selectors.activeOption),f=be({open:H===x.Open,disabled:y,invalid:g,activeIndex:Z,activeOption:re,value:T}),[X,k]=wt(),U=a===null?{}:{ref:a},j=d.useCallback(()=>{if(E!==void 0)return z==null?void 0:z(E)},[z,E]),K=ve();return G.createElement(k,{value:X,props:{htmlFor:u==null?void 0:u.id},slot:{open:H===x.Open,disabled:y}},G.createElement(la,null,G.createElement(pe.Provider,{value:w},G.createElement(qe.Provider,{value:S},G.createElement(jt,{value:le(H,{[x.Open]:ge.Open,[x.Closed]:ge.Closed})},c!=null&&G.createElement(It,{disabled:y,data:T!=null?{[c]:T}:{},form:v,onReset:j}),K({ourProps:U,theirProps:A,slot:f,defaultTag:Ta,name:"Combobox"}))))))}let $a="input";function wa(e,a){var t,n;let o=fe("Combobox.Input"),s=ie("Combobox.Input"),i=d.useId(),v=ut(),{id:c=v||`headlessui-combobox-input-${i}`,onChange:m,displayValue:g,disabled:y=s.disabled||!1,autoFocus:h=!1,type:b="text",...p}=e,P=d.useRef(null),r=xe(P,a,aa(),o.actions.setInputElement),[M,A]=B(o,f=>[f.comboboxState,f.isTyping]),E=ct(),T=D(()=>{o.actions.onChange(null),o.state.optionsElement&&(o.state.optionsElement.scrollTop=0),o.actions.goToOption({focus:V.Nothing})}),z=d.useMemo(()=>{var f;return typeof g=="function"&&s.value!==void 0?(f=g(s.value))!=null?f:"":typeof s.value=="string"?s.value:""},[s.value,g]);Ee(([f,X],[k,U])=>{if(o.state.isTyping)return;let j=P.current;j&&((U===x.Open&&X===x.Closed||f!==k)&&(j.value=f),requestAnimationFrame(()=>{if(o.state.isTyping||!j||Ve(j))return;let{selectionStart:K,selectionEnd:$}=j;Math.abs(($??0)-(K??0))===0&&K===0&&j.setSelectionRange(j.value.length,j.value.length)}))},[z,M,A]),Ee(([f],[X])=>{if(f===x.Open&&X===x.Closed){if(o.state.isTyping)return;let k=P.current;if(!k)return;let U=k.value,{selectionStart:j,selectionEnd:K,selectionDirection:$}=k;k.value="",k.value=U,$!==null?k.setSelectionRange(j,K,$):k.setSelectionRange(j,K)}},[M]);let S=d.useRef(!1),_=D(()=>{S.current=!0}),I=D(()=>{E.nextFrame(()=>{S.current=!1})}),F=D(f=>{switch(o.actions.setIsTyping(!0),f.key){case W.Enter:if(o.state.comboboxState!==x.Open||S.current)return;if(f.preventDefault(),f.stopPropagation(),o.selectors.activeOptionIndex(o.state)===null){o.actions.closeCombobox();return}o.actions.selectActiveOption(),s.mode===J.Single&&o.actions.closeCombobox();break;case W.ArrowDown:return f.preventDefault(),f.stopPropagation(),le(o.state.comboboxState,{[x.Open]:()=>o.actions.goToOption({focus:V.Next}),[x.Closed]:()=>o.actions.openCombobox()});case W.ArrowUp:return f.preventDefault(),f.stopPropagation(),le(o.state.comboboxState,{[x.Open]:()=>o.actions.goToOption({focus:V.Previous}),[x.Closed]:()=>{se.flushSync(()=>o.actions.openCombobox()),s.value||o.actions.goToOption({focus:V.Last})}});case W.Home:if(o.state.comboboxState===x.Closed||f.shiftKey)break;return f.preventDefault(),f.stopPropagation(),o.actions.goToOption({focus:V.First});case W.PageUp:return f.preventDefault(),f.stopPropagation(),o.actions.goToOption({focus:V.First});case W.End:if(o.state.comboboxState===x.Closed||f.shiftKey)break;return f.preventDefault(),f.stopPropagation(),o.actions.goToOption({focus:V.Last});case W.PageDown:return f.preventDefault(),f.stopPropagation(),o.actions.goToOption({focus:V.Last});case W.Escape:return o.state.comboboxState!==x.Open?void 0:(f.preventDefault(),o.state.optionsElement&&!s.optionsPropsRef.current.static&&f.stopPropagation(),s.mode===J.Single&&s.value===null&&T(),o.actions.closeCombobox());case W.Tab:if(o.actions.setIsTyping(!1),o.state.comboboxState!==x.Open)return;s.mode===J.Single&&o.state.activationTrigger!==ee.Focus&&o.actions.selectActiveOption(),o.actions.closeCombobox();break}}),q=D(f=>{m==null||m(f),s.mode===J.Single&&f.target.value===""&&T(),o.actions.openCombobox()}),Y=D(f=>{var X,k,U;let j=(X=f.relatedTarget)!=null?X:Te.find(K=>K!==f.currentTarget);if(!((k=o.state.optionsElement)!=null&&k.contains(j))&&!((U=o.state.buttonElement)!=null&&U.contains(j))&&o.state.comboboxState===x.Open)return f.preventDefault(),s.mode===J.Single&&s.value===null&&T(),o.actions.closeCombobox()}),C=D(f=>{var X,k,U;let j=(X=f.relatedTarget)!=null?X:Te.find(K=>K!==f.currentTarget);(k=o.state.buttonElement)!=null&&k.contains(j)||(U=o.state.optionsElement)!=null&&U.contains(j)||s.disabled||s.immediate&&o.state.comboboxState!==x.Open&&E.microTask(()=>{se.flushSync(()=>o.actions.openCombobox()),o.actions.setActivationTrigger(ee.Focus)})}),w=Se(),H=dt(),{isFocused:O,focusProps:u}=ze({autoFocus:h}),{isHovered:R,hoverProps:N}=He({isDisabled:y}),Q=B(o,f=>f.optionsElement),Z=be({open:M===x.Open,disabled:y,invalid:s.invalid,hover:R,focus:O,autofocus:h}),re=Ce({ref:r,id:c,role:"combobox",type:b,"aria-controls":Q==null?void 0:Q.id,"aria-expanded":M===x.Open,"aria-activedescendant":B(o,o.selectors.activeDescendantId),"aria-labelledby":w,"aria-describedby":H,"aria-autocomplete":"list",defaultValue:(n=(t=e.defaultValue)!=null?t:s.defaultValue!==void 0?g==null?void 0:g(s.defaultValue):null)!=null?n:s.defaultValue,disabled:y||void 0,autoFocus:h,onCompositionStart:_,onCompositionEnd:I,onKeyDown:F,onChange:q,onFocus:C,onBlur:Y},u,N);return ve()({ourProps:re,theirProps:p,slot:Z,defaultTag:$a,name:"Combobox.Input"})}let ja="button";function Ia(e,a){let t=fe("Combobox.Button"),n=ie("Combobox.Button"),[o,s]=d.useState(null),i=xe(a,s,t.actions.setButtonElement),v=d.useId(),{id:c=`headlessui-combobox-button-${v}`,disabled:m=n.disabled||!1,autoFocus:g=!1,...y}=e,[h,b,p]=B(t,C=>[C.comboboxState,C.inputElement,C.optionsElement]),P=Ke(b),r=h===x.Open;Xt(r,{trigger:o,action:d.useCallback(C=>{if(o!=null&&o.contains(C.target))return ue.Ignore;if(b!=null&&b.contains(C.target))return ue.Ignore;let w=C.target.closest('[role="option"]:not([data-disabled])');return pt(w)?ue.Select(w):p!=null&&p.contains(C.target)?ue.Ignore:ue.Close},[o,b,p]),close:t.actions.closeCombobox,select:t.actions.selectActiveOption});let M=D(C=>{switch(C.key){case W.Space:case W.Enter:C.preventDefault(),C.stopPropagation(),t.state.comboboxState===x.Closed&&se.flushSync(()=>t.actions.openCombobox()),P();return;case W.ArrowDown:C.preventDefault(),C.stopPropagation(),t.state.comboboxState===x.Closed&&(se.flushSync(()=>t.actions.openCombobox()),t.state.dataRef.current.value||t.actions.goToOption({focus:V.First})),P();return;case W.ArrowUp:C.preventDefault(),C.stopPropagation(),t.state.comboboxState===x.Closed&&(se.flushSync(()=>t.actions.openCombobox()),t.state.dataRef.current.value||t.actions.goToOption({focus:V.Last})),P();return;case W.Escape:if(t.state.comboboxState!==x.Open)return;C.preventDefault(),t.state.optionsElement&&!n.optionsPropsRef.current.static&&C.stopPropagation(),se.flushSync(()=>t.actions.closeCombobox()),P();return;default:return}}),A=Jt(()=>{t.state.comboboxState===x.Open?t.actions.closeCombobox():t.actions.openCombobox(),P()}),E=Se([c]),{isFocusVisible:T,focusProps:z}=ze({autoFocus:g}),{isHovered:S,hoverProps:_}=He({isDisabled:m}),{pressed:I,pressProps:F}=mt({disabled:m}),q=be({open:h===x.Open,active:I||h===x.Open,disabled:m,invalid:n.invalid,value:n.value,hover:S,focus:T}),Y=Ce({ref:i,id:c,type:bt(e,o),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":p==null?void 0:p.id,"aria-expanded":h===x.Open,"aria-labelledby":E,disabled:m||void 0,autoFocus:g,onKeyDown:M},A,z,_,F);return ve()({ourProps:Y,theirProps:y,slot:q,defaultTag:ja,name:"Combobox.Button"})}let Na="div",ka=$e.RenderStrategy|$e.Static;function Ma(e,a){var t,n,o;let s=d.useId(),{id:i=`headlessui-combobox-options-${s}`,hold:v=!1,anchor:c,portal:m=!1,modal:g=!0,transition:y=!1,...h}=e,b=fe("Combobox.Options"),p=ie("Combobox.Options"),P=oa(c);P&&(m=!0);let[r,M]=na(P),[A,E]=d.useState(null),T=sa(),z=xe(a,P?r:null,b.actions.setOptionsElement,E),[S,_,I,F,q]=B(b,L=>[L.comboboxState,L.inputElement,L.buttonElement,L.optionsElement,L.activationTrigger]),Y=Re(_||I),C=Re(F),w=vt(),[H,O]=ft(y,A,w!==null?(w&ge.Open)===ge.Open:S===x.Open);gt(H,_,b.actions.closeCombobox);let u=p.__demoMode?!1:g&&S===x.Open;xt(u,C);let R=p.__demoMode?!1:g&&S===x.Open;ht(R,{allowed:d.useCallback(()=>[_,I,F],[_,I,F])});let N=B(b,b.selectors.didInputMove)?!1:H;te(()=>{var L;p.optionsPropsRef.current.static=(L=e.static)!=null?L:!1},[p.optionsPropsRef,e.static]),te(()=>{p.optionsPropsRef.current.hold=v},[p.optionsPropsRef,v]),Sa(S===x.Open,{container:F,accept(L){return L.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:L.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(L){L.setAttribute("role","none")}});let Q=Se([I==null?void 0:I.id]),Z=be({open:S===x.Open,option:void 0}),re=D(()=>{b.actions.setActivationTrigger(ee.Pointer)}),f=D(L=>{L.preventDefault(),b.actions.setActivationTrigger(ee.Pointer)}),X=Ce(P?T():{},{"aria-labelledby":Q,role:"listbox","aria-multiselectable":p.mode===J.Multi?!0:void 0,id:i,ref:z,style:{...h.style,...M,"--input-width":Ae(H,_,!0).width,"--button-width":Ae(H,I,!0).width},onWheel:q===ee.Pointer?void 0:re,onMouseDown:f,...yt(O)}),k=H&&S===x.Closed&&!e.static,U=De(k,(t=p.virtual)==null?void 0:t.options),j=De(k,p.value),K=d.useCallback(L=>p.compare(j,L),[p.compare,j]),$=d.useMemo(()=>{if(!p.virtual)return p;if(U===void 0)throw new Error("Missing `options` in virtual mode");return U!==p.virtual.options?{...p,virtual:{...p.virtual,options:U}}:p},[p,U,(n=p.virtual)==null?void 0:n.options]);p.virtual&&Object.assign(h,{children:G.createElement(pe.Provider,{value:$},G.createElement(Ea,{slot:Z},h.children))});let ae=ve(),tt=d.useMemo(()=>p.mode===J.Multi?p:{...p,isSelected:K},[p,K]);return G.createElement(St,{enabled:m?e.static||H:!1,ownerDocument:Y},G.createElement(pe.Provider,{value:tt},ae({ourProps:X,theirProps:{...h,children:G.createElement(Qt,{freeze:k},typeof h.children=="function"?(o=h.children)==null?void 0:o.call(h,Z):h.children)},slot:Z,defaultTag:Na,features:ka,visible:N,name:"Combobox.Options"})))}let Fa="div";function Da(e,a){var t,n,o;let s=ie("Combobox.Option"),i=fe("Combobox.Option"),v=d.useId(),{id:c=`headlessui-combobox-option-${v}`,value:m,disabled:g=(o=(n=(t=s.virtual)==null?void 0:t.disabled)==null?void 0:n.call(t,m))!=null?o:!1,order:y=null,...h}=e,[b]=B(i,O=>[O.inputElement]),p=Ke(b),P=B(i,d.useCallback(O=>i.selectors.isActive(O,m,c),[m,c])),r=s.isSelected(m),M=d.useRef(null),A=Ct({disabled:g,value:m,domRef:M,order:y}),E=d.useContext(Ye),T=xe(a,M,E?E.measureElement:null),z=D(()=>{i.actions.setIsTyping(!1),i.actions.onChange(m)});te(()=>i.actions.registerOption(c,A),[A,c]);let S=B(i,d.useCallback(O=>i.selectors.shouldScrollIntoView(O,m,c),[m,c]));te(()=>{if(S)return Ot().requestAnimationFrame(()=>{var O,u;(u=(O=M.current)==null?void 0:O.scrollIntoView)==null||u.call(O,{block:"nearest"})})},[S,M]);let _=D(O=>{O.preventDefault(),O.button===Zt.Left&&(g||(z(),Pt()||requestAnimationFrame(()=>p()),s.mode===J.Single&&i.actions.closeCombobox()))}),I=D(()=>{if(g)return i.actions.goToOption({focus:V.Nothing});let O=s.calculateIndex(m);i.actions.goToOption({focus:V.Specific,idx:O})}),F=ea(),q=D(O=>F.update(O)),Y=D(O=>{if(!F.wasMoved(O)||g||P&&i.state.activationTrigger===ee.Pointer)return;let u=s.calculateIndex(m);i.actions.goToOption({focus:V.Specific,idx:u},ee.Pointer)}),C=D(O=>{F.wasMoved(O)&&(g||P&&(s.optionsPropsRef.current.hold||i.state.activationTrigger===ee.Pointer&&i.actions.goToOption({focus:V.Nothing})))}),w=be({active:P,focus:P,selected:r,disabled:g}),H={id:c,ref:T,role:"option",tabIndex:g===!0?void 0:-1,"aria-disabled":g===!0?!0:void 0,"aria-selected":r,disabled:void 0,onMouseDown:_,onFocus:I,onPointerEnter:q,onMouseEnter:q,onPointerMove:Y,onMouseMove:Y,onPointerLeave:C,onMouseLeave:C};return ve()({ourProps:H,theirProps:h,slot:w,defaultTag:Fa,name:"Combobox.Option"})}let Aa=me(Ra),Xe=me(Ia),Je=me(wa),_a=rt,Qe=me(Ma),Ze=me(Da),La=Object.assign(Aa,{Input:Je,Button:Xe,Label:_a,Options:Qe,Option:Ze});function Va({options:e,value:a,onChange:t,defaultValue:n,displayValue:o,filter:s,placeholder:i,disabled:v,invalid:c,name:m,"aria-label":g,className:y,children:h}){const[b,p]=d.useState(""),P=o??(E=>E!=null?String(E):""),M=s??((E,T)=>P(E).toLowerCase().includes(T.toLowerCase())),A=d.useMemo(()=>b?e.filter(E=>M(E,b)):e,[e,b,M]);return l.jsx(La,{value:a,onChange:t,defaultValue:n,disabled:v,name:m,onClose:()=>p(""),children:l.jsxs("div",{className:ne("relative",y),children:[l.jsxs("div",{className:"relative",children:[l.jsx(Je,{"aria-label":g,displayValue:P,onChange:E=>p(E.target.value),placeholder:i,className:ne(["w-full radius-inner py-2 pl-3 pr-10","text-sm text-fg-primary placeholder:text-fg-muted","bg-input-bg",c?"border border-sys-red":"border border-input-border","ring-focus-inset","hover:border-edge-strong","disabled:opacity-40 disabled:pointer-events-none disabled:cursor-not-allowed","transition-colors"])}),l.jsx(Xe,{className:"absolute inset-y-0 right-0 flex items-center pr-3 group",children:l.jsx(Nt,{className:"w-4 h-4 text-fg-muted transition-transform duration-200 group-data-[open]:rotate-180"})})]}),l.jsx(Qe,{anchor:"bottom start",transition:!0,className:ne(["w-[var(--input-width)] min-w-[180px]","max-h-60 overflow-y-auto overscroll-contain scroll-py-1","radius-inset p-1 mt-1","surface-elevated","focus:outline-none","transition-opacity","data-[closed]:opacity-0","data-[enter]:duration-150 data-[leave]:duration-100","z-50"]),children:A.length===0&&b!==""?l.jsx("div",{className:"px-3 py-2 text-sm text-fg-muted",children:"No results found"}):A.map((E,T)=>l.jsx(d.Fragment,{children:h(E)},T))})]})})}function Ba({value:e,disabled:a,className:t,children:n}){return l.jsx(Ze,{as:d.Fragment,value:e,disabled:a,children:({selected:o,focus:s})=>l.jsxs("div",{className:ne("flex items-center gap-2 px-3 py-2 radius-control cursor-default","text-sm",s&&"bg-sys-blue text-white",!s&&"text-fg-primary",o&&!s&&"text-sys-blue",a&&"opacity-50 cursor-not-allowed",t),children:[l.jsx("span",{className:"w-4 flex-shrink-0",children:o&&l.jsx(kt,{className:"w-4 h-4"})}),l.jsx("span",{className:"truncate flex-1",children:n})]})})}function za({className:e,...a}){return l.jsx("span",{...a,className:ne("truncate",e)})}function oe({value:e,onChange:a,options:t,placeholder:n,disabled:o,className:s,"aria-label":i}){const v=t.find(c=>c.value===e);return l.jsx(Va,{options:t,value:v,onChange:c=>{c&&a(c.value)},displayValue:c=>(c==null?void 0:c.label)??"",filter:(c,m)=>c.label.toLowerCase().includes(m.toLowerCase()),placeholder:n,disabled:o,className:s,"aria-label":i,children:c=>l.jsx(Ba,{value:c,disabled:c.disabled,children:l.jsx(za,{children:c.label})})})}const et=[{target:"PacketStats",fn:"type",minStage:1}];ma(et);function ce({icon:e,label:a,value:t,color:n,percentage:o}){return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:ne("p-1.5 rounded-md",n),children:e}),l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"text-sm font-semibold text-fg-primary",children:t.toLocaleString()}),l.jsxs("span",{className:"text-xs text-fg-muted leading-tight",children:[a,o!==void 0&&l.jsxs("span",{className:"ml-1 opacity-70",children:["(",o,"%)"]})]})]})]})}function Ha({packets:e}){pa(et);const a=d.useMemo(()=>{let t=0,n=0,o=0;const s=new Set;let i=0,v=0;for(const y of e){switch(Ue(y)){case"forward":t++;break;case"dropped":n++;break;case"duplicate":o++;break}y.src_hash&&s.add(y.src_hash),y.rssi&&(i+=y.rssi,v++)}const c=e.length,m=v>0?Math.round(i/v):0;return{total:c,rx:c,fwd:t,dropped:n,duplicate:o,uniqueSources:s.size,avgRssi:m,rxPercent:100,fwdPercent:c>0?Math.round(t/c*100):0,droppedPercent:c>0?Math.round(n/c*100):0}},[e]);return e.length===0?null:l.jsx("div",{className:"surface-base depth-raised rounded-2xl p-3 pr-4",children:l.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:flex sm:items-center sm:justify-between sm:gap-6",children:[l.jsx(ce,{icon:l.jsx(ba,{className:"w-3.5 h-3.5 text-sys-blue"}),label:"Received",value:a.rx,color:"bg-sys-blue/10",percentage:a.rxPercent}),l.jsx(ce,{icon:l.jsx(va,{className:"w-3.5 h-3.5 text-sys-green"}),label:"Forwarded",value:a.fwd,color:"bg-sys-green/10",percentage:a.fwdPercent}),l.jsx(ce,{icon:l.jsx(Kt,{className:"w-3.5 h-3.5 text-sys-red"}),label:"Dropped",value:a.dropped,color:"bg-sys-red/10",percentage:a.droppedPercent}),l.jsx(ce,{icon:l.jsx(Mt,{className:"w-3.5 h-3.5 text-fg-muted"}),label:"Duplicates",value:a.duplicate,color:"bg-subtle-fill"}),l.jsxs("div",{className:"hidden sm:flex items-center gap-6 ml-auto",children:[l.jsx(ce,{icon:l.jsx(Ft,{className:"w-3.5 h-3.5 text-sys-indigo"}),label:"Sources",value:a.uniqueSources,color:"bg-sys-indigo/10"}),l.jsxs("div",{className:"flex flex-col items-end pr-1",children:[l.jsxs("span",{className:"type-data-sm text-fg-secondary",children:[a.avgRssi," dBm"]}),l.jsx("span",{className:"text-xs text-fg-muted",children:"Avg Signal"})]})]})]})})}const Ua=d.memo(Ha);function Po(){const e=Dt(),a=At(),t=ia(),n=Gt(u=>u.requestChannel),o=_t(),s=a==null?void 0:a.local_hash,i=a==null?void 0:a.neighbors,v=Lt(),c=Vt(),g=Bt().isBackgroundLoading&&v>=5,[y,h]=d.useState(!1),[b,p]=d.useState(!0),P=d.useCallback(u=>p(u),[]),[r,M]=d.useState({limit:500,status:"all"}),[A,E]=d.useState(ua),T=d.useMemo(()=>{const u=Math.floor(Date.now()/1e3),R=we[v].minutes;return{start:u-R*60,end:u}},[v]),z=d.useMemo(()=>{const u=(a==null?void 0:a.neighbors)??{};return Object.fromEntries(Object.entries(u).filter(([R])=>!o.has(R)))},[a==null?void 0:a.neighbors,o]),S=ra(),[_,I]=d.useState(Date.now);d.useEffect(()=>{r.timeRange&&r.timeRange>0&&queueMicrotask(()=>I(Date.now()))},[r.timeRange,e]);const F=d.useMemo(()=>ca(e,A,S,T),[e,A,S,T]),q=d.useMemo(()=>{const u=r.limit??500;return[...F.length<=u?F:F.slice(-u)].sort((N,Q)=>(Q.timestamp??0)-(N.timestamp??0))},[F,r.limit]),Y=e.length===0,C=d.useMemo(()=>{let u=q;if(r.type!==void 0){const R=je[r.type];u=u.filter(N=>{const Q=N.type??N.payload_type,Z=N.payload_type_name;return Q===r.type||Z===R})}if(r.route!==void 0){const R=Ie[r.route];u=u.filter(N=>{const Q=N.route??N.route_type,Z=N.route_type_name;return Q===r.route||Z===R})}if(r.status&&r.status!=="all"&&(u=u.filter(R=>Ue(R)===r.status)),r.signalMin!==void 0&&(u=u.filter(R=>R.rssi>=r.signalMin)),r.timeRange&&r.timeRange>0){const R=_/1e3-r.timeRange*3600;u=u.filter(N=>N.timestamp>=R)}return u},[q,r.type,r.route,r.status,r.signalMin,r.timeRange,_]),w=(u,R)=>M(N=>({...N,[u]:R})),H=()=>M({limit:r.limit,status:"all"}),O=r.type!==void 0||r.route!==void 0||r.status&&r.status!=="all"||r.signalMin!==void 0||r.timeRange&&r.timeRange>0;return l.jsxs(fa,{children:[l.jsx(ga,{title:"Packet History",icon:l.jsx(ke,{}),controls:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(Ne,{outline:!0,color:O?"primary":"muted",onClick:()=>h(!y),className:"sm:hidden",children:[l.jsx(_e,{"data-slot":"icon"}),O&&l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-sys-blue"})]}),l.jsx(ha,{ranges:we,selectedIndex:v,onSelect:c,isPending:g})]})}),l.jsxs(xa,{children:[l.jsx(ya,{template:"auto",className:"relative z-10",children:l.jsx(he,{neomorphic:!0,className:"overflow-visible",children:l.jsx(da,{parentStartTs:T.start,parentEndTs:T.end,neighbors:z,filter:A,onChange:E})})}),l.jsxs(he,{neomorphic:!0,noPadding:!0,className:ne("overflow-hidden transition-all duration-200",y?"max-h-96 opacity-100":"max-h-0 opacity-0 sm:max-h-96 sm:opacity-100"),children:[l.jsx(Me,{listHeader:!0,icon:l.jsx(_e,{className:"icon-sm"}),title:"Filters",actions:O?l.jsxs(Ne,{plain:!0,color:"muted",onClick:H,className:"!text-xs !py-0.5 !px-1.5",children:[l.jsx(zt,{"data-slot":"icon",className:"!w-3 !h-3"}),"Clear"]}):void 0}),l.jsx("div",{className:"p-3 sm:p-4",children:l.jsxs("div",{className:"grid grid-cols-2 sm:flex sm:flex-wrap gap-3",children:[l.jsxs("div",{className:"flex-1 min-w-[140px]",children:[l.jsx("label",{className:"type-micro block mb-1",children:"Type"}),l.jsx(oe,{value:r.type??"",onChange:u=>w("type",u===""?void 0:Number(u)),options:[{value:"",label:"All Types"},...Object.entries(je).map(([u,R])=>({value:Number(u),label:R}))],placeholder:"Search types...","aria-label":"Filter by packet type"})]}),l.jsxs("div",{className:"flex-1 min-w-[140px]",children:[l.jsx("label",{className:"type-micro block mb-1",children:"Route"}),l.jsx(oe,{value:r.route??"",onChange:u=>w("route",u===""?void 0:Number(u)),options:[{value:"",label:"All Routes"},...Object.entries(Ie).map(([u,R])=>({value:Number(u),label:R}))],placeholder:"Search routes...","aria-label":"Filter by route type"})]}),l.jsxs("div",{className:"flex-1 min-w-[140px]",children:[l.jsx("label",{className:"type-micro block mb-1",children:"Status"}),l.jsx(oe,{value:r.status??"all",onChange:u=>w("status",u),options:[{value:"all",label:"All Status"},{value:"rx",label:"Received"},{value:"forward",label:"Forwarded"},{value:"dropped",label:"Dropped"},{value:"duplicate",label:"Duplicate"}],placeholder:"Search status...","aria-label":"Filter by status"})]}),l.jsxs("div",{className:"flex-1 min-w-[120px]",children:[l.jsx("label",{className:"type-micro block mb-1",children:"Time"}),l.jsx(oe,{value:r.timeRange??0,onChange:u=>w("timeRange",u===0?void 0:u),options:[{value:0,label:"All Time"},{value:1,label:"Last 1h"},{value:6,label:"Last 6h"},{value:24,label:"Last 24h"},{value:168,label:"Last 7d"}],placeholder:"Search time...","aria-label":"Filter by time range"})]}),l.jsxs("div",{className:"flex-1 min-w-[130px]",children:[l.jsx("label",{className:"type-micro block mb-1",children:"Signal"}),l.jsx(oe,{value:r.signalMin??"",onChange:u=>w("signalMin",u===""?void 0:Number(u)),options:[{value:"",label:"Any Signal"},{value:-90,label:"Strong (≥-90)"},{value:-100,label:"Good (≥-100)"},{value:-110,label:"Fair (≥-110)"},{value:-120,label:"Weak (≥-120)"}],placeholder:"Search signal...","aria-label":"Filter by signal strength"})]}),l.jsxs("div",{className:"flex-1 min-w-[100px]",children:[l.jsx("label",{className:"type-micro block mb-1",children:"Limit"}),l.jsx(oe,{value:r.limit??500,onChange:u=>w("limit",u),options:[{value:100,label:"100"},{value:200,label:"200"},{value:500,label:"500"},{value:1e3,label:"1K"},{value:2e3,label:"2K"},{value:5e3,label:"5K"},{value:1e4,label:"10K"}],placeholder:"Limit...","aria-label":"Packet limit"})]}),l.jsxs("div",{className:"flex-1 min-w-[100px]",children:[l.jsx("label",{className:"type-micro block mb-1",children:"Per Page"}),l.jsx(oe,{value:r.perPage??50,onChange:u=>w("perPage",u),options:[{value:25,label:"25"},{value:50,label:"50"},{value:100,label:"100"},{value:200,label:"200"},{value:500,label:"500"}],placeholder:"Per page...","aria-label":"Packets per page"})]})]})})]}),l.jsx(Ua,{packets:C}),l.jsxs(he,{neomorphic:!0,noPadding:!0,className:"!overflow-visible",children:[l.jsx(Me,{listHeader:!0,icon:l.jsx(ke,{className:"icon-sm"}),title:"Packet History",actions:l.jsx(Ht,{enabled:b,onChange:P,label:"Hide Dupes",size:"sm"})}),l.jsx(qt,{packets:C,allPackets:e,localHash:s,neighbors:i,resolveSource:S,getDecodedContent:t,onChannelClick:n,loading:Y,showPagination:!0,perPage:r.perPage??50,hideDupes:b,emptyMessage:"No packets found"})]})]})]})}export{Po as default}; diff --git a/frontend/dist/assets/PageLayout-9SoN_daN.js b/frontend/dist/assets/PageLayout-tvsYvfyL.js similarity index 93% rename from frontend/dist/assets/PageLayout-9SoN_daN.js rename to frontend/dist/assets/PageLayout-tvsYvfyL.js index 57170c29..cf8417b4 100644 --- a/frontend/dist/assets/PageLayout-9SoN_daN.js +++ b/frontend/dist/assets/PageLayout-tvsYvfyL.js @@ -1 +1 @@ -import{j as e,o as r,c as t}from"./index-CLIbpHvY.js";function l({children:a,className:s}){return e.jsx("div",{className:t("section-gap",s),children:a})}function x({children:a,className:s}){return e.jsx("div",{className:t("bento-section",s),children:a})}function m({title:a,icon:s,controls:n,subtitle:i}){return e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 min-h-9",children:[e.jsxs("h1",{className:"type-title text-fg-primary flex items-baseline gap-2 sm:gap-3 min-w-0",children:[s&&e.jsx("span",{className:"text-icon-page-title flex-shrink-0 translate-y-[0.1em] [&>svg]:h-[1em] [&>svg]:w-[1em] [&>svg]:stroke-[1.5]",children:s}),e.jsx("span",{className:"truncate",children:a})]}),n&&e.jsx("div",{className:"flex items-center gap-2 flex-shrink-0",children:n})]}),i&&e.jsx("div",{children:i})]})}function d({size:a,...s}){return e.jsx(r,{...s})}export{x as B,d as C,l as P,m as a}; +import{j as e,o as r,c as t}from"./index-2YU-f7O7.js";function l({children:a,className:s}){return e.jsx("div",{className:t("section-gap",s),children:a})}function x({children:a,className:s}){return e.jsx("div",{className:t("bento-section",s),children:a})}function m({title:a,icon:s,controls:n,subtitle:i}){return e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 min-h-9",children:[e.jsxs("h1",{className:"type-title text-fg-primary flex items-baseline gap-2 sm:gap-3 min-w-0",children:[s&&e.jsx("span",{className:"text-icon-page-title flex-shrink-0 translate-y-[0.1em] [&>svg]:h-[1em] [&>svg]:w-[1em] [&>svg]:stroke-[1.5]",children:s}),e.jsx("span",{className:"truncate",children:a})]}),n&&e.jsx("div",{className:"flex items-center gap-2 flex-shrink-0",children:n})]}),i&&e.jsx("div",{children:i})]})}function d({size:a,...s}){return e.jsx(r,{...s})}export{x as B,d as C,l as P,m as a}; diff --git a/frontend/dist/assets/PathMapMapLibre-DGbZd6iX.js b/frontend/dist/assets/PathMapMapLibre-CKiQC9cf.js similarity index 98% rename from frontend/dist/assets/PathMapMapLibre-DGbZd6iX.js rename to frontend/dist/assets/PathMapMapLibre-CKiQC9cf.js index 57a411c8..84acdfb8 100644 --- a/frontend/dist/assets/PathMapMapLibre-DGbZd6iX.js +++ b/frontend/dist/assets/PathMapMapLibre-CKiQC9cf.js @@ -1,4 +1,4 @@ -import{d as ae,r as a,by as ie,br as le,fe as de,Z as Y,bB as ce,j as t,q as K,c as G,ff as ue}from"./index-CLIbpHvY.js";import{u as pe,M as me,B as fe,S as ge,L as xe,a as Q,P as he}from"./BasemapLayer-B74HwKhL.js";import{H as ye}from"./useMapViewStore-CoIRBkXg.js";import"./index-EpCuPFqY.js";/** +import{d as ae,r as a,by as ie,br as le,fe as de,Z as Y,bB as ce,j as t,q as K,c as G,ff as ue}from"./index-2YU-f7O7.js";import{u as pe,M as me,B as fe,S as ge,L as xe,a as Q,P as he}from"./BasemapLayer-CZ0EXyx3.js";import{H as ye}from"./useMapViewStore-Ce8IV--K.js";import"./index-rOrsjUFs.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/RoomServer-D62pvIDX.js b/frontend/dist/assets/RoomServer-CdvnTbeG.js similarity index 97% rename from frontend/dist/assets/RoomServer-D62pvIDX.js rename to frontend/dist/assets/RoomServer-CdvnTbeG.js index 71f0b742..f4239b45 100644 --- a/frontend/dist/assets/RoomServer-D62pvIDX.js +++ b/frontend/dist/assets/RoomServer-CdvnTbeG.js @@ -1,4 +1,4 @@ -import{d as V,j as e,c$ as Ke,c as L,aw as Fe,dO as Oe,r as o,bO as Y,R as qe,ac as Be,dw as ze,ad as He,q as W,I as B,dP as Ue,B as F,bx as Me,ae as ue,cW as Ve,F as se,w as G,x as We,dQ as Re,dR as Ge,b8 as Te,dS as Ye,dT as Ie,dU as Qe,dV as Xe,dW as Ze,dX as Je,dY as es,dZ as ss,E as ts,y as as,dJ as ns,bQ as xe}from"./index-CLIbpHvY.js";import{C as U,P as pe,a as he,B as rs}from"./PageLayout-9SoN_daN.js";import{R as ls,C as ge}from"./Grid-Di163a6N.js";import{c as os,m as is}from"./node-types-CFhZT1Jq.js";import{L as cs,a as ds,b as ms}from"./listbox-fatOHbDc.js";import{P as us}from"./plus-C2Nq-iqX.js";import{M as Z}from"./map-pin-oP9EChoI.js";import{T as Le,C as fe}from"./ConfirmModal-DeWu6kFs.js";import{S as J,K as I}from"./KeycapButton-Bb60ts2O.js";import{S as xs,C as ps,M as hs}from"./ChatBubble-DRf3s2tk.js";import{e as gs,g as fs,a as js}from"./chat-utils-C0FWA6kK.js";import{W as ee}from"./wifi-B8_91QkI.js";import{K as vs}from"./key-round-iBXtesax.js";import"./element-movement-CTWmC4Se.js";import"./triangle-alert-BPXHBOYA.js";import"./keycap-sfx-ByZp-njj.js";/** +import{d as V,j as e,c$ as Ke,c as L,aw as Fe,dO as Oe,r as o,bO as Y,R as qe,ac as Be,dw as ze,ad as He,q as W,I as B,dP as Ue,B as F,bx as Me,ae as ue,cW as Ve,F as se,w as G,x as We,dQ as Re,dR as Ge,b8 as Te,dS as Ye,dT as Ie,dU as Qe,dV as Xe,dW as Ze,dX as Je,dY as es,dZ as ss,E as ts,y as as,dJ as ns,bQ as xe}from"./index-2YU-f7O7.js";import{C as U,P as pe,a as he,B as rs}from"./PageLayout-tvsYvfyL.js";import{R as ls,C as ge}from"./Grid-BUbHrfD3.js";import{c as os,m as is}from"./node-types--B4HRIdZ.js";import{L as cs,a as ds,b as ms}from"./listbox-CrjQSTKJ.js";import{P as us}from"./plus-Ci6eVmWj.js";import{M as Z}from"./map-pin-DwpgbaSS.js";import{T as Le,C as fe}from"./ConfirmModal-DkHVYuoH.js";import{S as J,K as I}from"./KeycapButton-fLM_SIw1.js";import{S as xs,C as ps,M as hs}from"./ChatBubble-B-vyhm2S.js";import{e as gs,g as fs,a as js}from"./chat-utils-zf_UbwVO.js";import{W as ee}from"./wifi-DFxu_Y_e.js";import{K as vs}from"./key-round-CO4nliLv.js";import"./element-movement-Bhgekpql.js";import"./triangle-alert-il1la-RI.js";import"./keycap-sfx-ByZp-njj.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/Sessions-DmHtWaLx.js b/frontend/dist/assets/Sessions-CKFp1ckr.js similarity index 96% rename from frontend/dist/assets/Sessions-DmHtWaLx.js rename to frontend/dist/assets/Sessions-CKFp1ckr.js index fe80ef75..ed03c69e 100644 --- a/frontend/dist/assets/Sessions-DmHtWaLx.js +++ b/frontend/dist/assets/Sessions-CKFp1ckr.js @@ -1,4 +1,4 @@ -import{d as x,r as l,fc as O,fd as G,dt as U,j as e,B as b,L as M,w as V,b8 as C,c as N,dR as J,cg as Q,bO as Z}from"./index-CLIbpHvY.js";import{C as W,T as P}from"./ConfirmModal-DeWu6kFs.js";import{D as X}from"./DataBox-ChuBU2q7.js";import{P as Y,a as ee,B as se,C as D}from"./PageLayout-9SoN_daN.js";import{R as ae}from"./refresh-cw-D45udn5T.js";import{R as T,C as j}from"./Grid-Di163a6N.js";import{C as te}from"./circle-question-mark-CW0NICCZ.js";import{T as le}from"./triangle-alert-BPXHBOYA.js";import{S as ie}from"./shield-hk2V-Q9a.js";import{A as ne}from"./antenna-CYx4bVye.js";/** +import{d as x,r as l,fc as O,fd as G,dt as U,j as e,B as b,L as M,w as V,b8 as C,c as N,dR as J,cg as Q,bO as Z}from"./index-2YU-f7O7.js";import{C as W,T as P}from"./ConfirmModal-DkHVYuoH.js";import{D as X}from"./DataBox-D8nJsUbV.js";import{P as Y,a as ee,B as se,C as D}from"./PageLayout-tvsYvfyL.js";import{R as ae}from"./refresh-cw-CWeSjq0l.js";import{R as T,C as j}from"./Grid-BUbHrfD3.js";import{C as te}from"./circle-question-mark-BpV3PDV1.js";import{T as le}from"./triangle-alert-il1la-RI.js";import{S as ie}from"./shield-Cg8ViVBZ.js";import{A as ne}from"./antenna-DGAYnG36.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/SignalIndicator-BGst_xwg.js b/frontend/dist/assets/SignalIndicator-CZkLIt0w.js similarity index 99% rename from frontend/dist/assets/SignalIndicator-BGst_xwg.js rename to frontend/dist/assets/SignalIndicator-CZkLIt0w.js index 5258aaff..42c80ac9 100644 --- a/frontend/dist/assets/SignalIndicator-BGst_xwg.js +++ b/frontend/dist/assets/SignalIndicator-CZkLIt0w.js @@ -1,4 +1,4 @@ -import{d as s,r as m,c as l,j as r,bZ as j,b_ as k,b$ as _}from"./index-CLIbpHvY.js";/** +import{d as s,r as m,c as l,j as r,bZ as j,b_ as k,b$ as _}from"./index-2YU-f7O7.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/Statistics-CUr6NoLE.js b/frontend/dist/assets/Statistics-NNOrMaKt.js similarity index 98% rename from frontend/dist/assets/Statistics-CUr6NoLE.js rename to frontend/dist/assets/Statistics-NNOrMaKt.js index b6bd28a7..e726a127 100644 --- a/frontend/dist/assets/Statistics-CUr6NoLE.js +++ b/frontend/dist/assets/Statistics-NNOrMaKt.js @@ -1,4 +1,4 @@ -var Mt=Object.defineProperty;var Ct=(t,n,s)=>n in t?Mt(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s;var xe=(t,n,s)=>Ct(t,typeof n!="symbol"?n+"":n,s);import{d as Ae,r as c,j as e,k as Ce,c as nt,b9 as yt,c0 as bt,c1 as Je,c2 as ve,c3 as At,q as Fe,c4 as _t,c5 as Rt,e as Lt,c6 as Dt,c7 as Et,c8 as Tt,c9 as It,ca as Pt,by as Ot,cb as Be,bB as Ft,cc as Ht,cd as Bt,F as Ne,ce as $t,cf as zt,cg as Wt,E as Ut,J as Gt,H as qt,y as Vt,ag as Kt,ah as Yt,K as Xt,aa as Zt,ch as Qt,ci as $e,cj as at,a2 as Jt,R as es,ck as ts}from"./index-CLIbpHvY.js";import{L as Se}from"./layers-DTsYQqst.js";import{u as et,h as ss,r as tt}from"./consumer-registry-BrRzRPA2.js";import{C as ze,e as ns}from"./easing-jK46ZwcK.js";import{T as as}from"./TimeRangeStepper-r-j5VisG.js";import{C as le,P as rs,a as is,B as os}from"./PageLayout-9SoN_daN.js";import{D as ls}from"./DataBox-ChuBU2q7.js";import{E as cs,A as Oe}from"./AnimatedNumber-BrwtCO17.js";import{C as ms}from"./CollisionExplorerModal-CrEVRFBy.js";import{H as rt}from"./hash-Cd1zCpVV.js";import{T as Ze}from"./triangle-alert-BPXHBOYA.js";import{L as ds}from"./LightSparkline-YdYUoL-i.js";import{A as us}from"./activity-DBVB1w-E.js";import{c as hs,a as xs,A as ps}from"./AnalyzerFilterPanel-D5iqpJrB.js";import{useResolveSource as fs}from"./usePipelineStore-7L_PlMjP.js";import{R as ge,C as we}from"./Grid-Di163a6N.js";import{S as gs}from"./settings-2-CFr1Guec.js";import{N as ys}from"./network-fMhgmV5F.js";import"./chevron-right-tyotcuUX.js";import"./map-pin-oP9EChoI.js";import"./index-EpCuPFqY.js";import"./BasemapLayer-B74HwKhL.js";import"./monitor-smartphone-B5v3E3uQ.js";import"./node-types-CFhZT1Jq.js";import"./funnel-D8VczAEU.js";import"./circle-question-mark-CW0NICCZ.js";import"./search-D-1ih5Lf.js";/** +var Mt=Object.defineProperty;var Ct=(t,n,s)=>n in t?Mt(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s;var xe=(t,n,s)=>Ct(t,typeof n!="symbol"?n+"":n,s);import{d as Ae,r as c,j as e,k as Ce,c as nt,b9 as yt,c0 as bt,c1 as Je,c2 as ve,c3 as At,q as Fe,c4 as _t,c5 as Rt,e as Lt,c6 as Dt,c7 as Et,c8 as Tt,c9 as It,ca as Pt,by as Ot,cb as Be,bB as Ft,cc as Ht,cd as Bt,F as Ne,ce as $t,cf as zt,cg as Wt,E as Ut,J as Gt,H as qt,y as Vt,ag as Kt,ah as Yt,K as Xt,aa as Zt,ch as Qt,ci as $e,cj as at,a2 as Jt,R as es,ck as ts}from"./index-2YU-f7O7.js";import{L as Se}from"./layers-7MoN93tY.js";import{u as et,h as ss,r as tt}from"./consumer-registry-BaTbQUiU.js";import{C as ze,e as ns}from"./easing-DxQTD0NL.js";import{T as as}from"./TimeRangeStepper--TSSRhtK.js";import{C as le,P as rs,a as is,B as os}from"./PageLayout-tvsYvfyL.js";import{D as ls}from"./DataBox-D8nJsUbV.js";import{E as cs,A as Oe}from"./AnimatedNumber-CKwUUwqJ.js";import{C as ms}from"./CollisionExplorerModal-CKdqxCu4.js";import{H as rt}from"./hash-DswdBqT-.js";import{T as Ze}from"./triangle-alert-il1la-RI.js";import{L as ds}from"./LightSparkline-CV6le7Ch.js";import{A as us}from"./activity-BgtT9aiG.js";import{c as hs,a as xs,A as ps}from"./AnalyzerFilterPanel-DW8wllyq.js";import{useResolveSource as fs}from"./usePipelineStore-D-0Ba45c.js";import{R as ge,C as we}from"./Grid-BUbHrfD3.js";import{S as gs}from"./settings-2-BkKCvhPk.js";import{N as ys}from"./network-BfJPFeB2.js";import"./chevron-right-DwaXNeO4.js";import"./map-pin-DwpgbaSS.js";import"./index-rOrsjUFs.js";import"./BasemapLayer-CZ0EXyx3.js";import"./monitor-smartphone-BbnIneu-.js";import"./node-types--B4HRIdZ.js";import"./funnel-D7UU9v8s.js";import"./circle-question-mark-BpV3PDV1.js";import"./search-5bBDdD-8.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/System-CgXq4wrd.js b/frontend/dist/assets/System-BKSLU2Lj.js similarity index 98% rename from frontend/dist/assets/System-CgXq4wrd.js rename to frontend/dist/assets/System-BKSLU2Lj.js index f49d2163..b713ad8a 100644 --- a/frontend/dist/assets/System-CgXq4wrd.js +++ b/frontend/dist/assets/System-BKSLU2Lj.js @@ -1,4 +1,4 @@ -import{d as Y,d3 as A,cW as F,r as l,h as J,j as e,n as G,c as H,F as B,d4 as te,d5 as se,d6 as ne,d7 as re,d8 as ae,c0 as oe,B as le,d9 as ce,da as W}from"./index-CLIbpHvY.js";import{C as E,P as ie,a as de,B as me}from"./PageLayout-9SoN_daN.js";import{T as ue}from"./triangle-alert-BPXHBOYA.js";import{a as xe,A as pe}from"./arrow-up-Dw_1quvK.js";import{N as fe}from"./network-fMhgmV5F.js";import{A as O}from"./activity-DBVB1w-E.js";import{R as he}from"./refresh-cw-D45udn5T.js";import{R as $,C as L}from"./Grid-Di163a6N.js";/** +import{d as Y,d3 as A,cW as F,r as l,h as J,j as e,n as G,c as H,F as B,d4 as te,d5 as se,d6 as ne,d7 as re,d8 as ae,c0 as oe,B as le,d9 as ce,da as W}from"./index-2YU-f7O7.js";import{C as E,P as ie,a as de,B as me}from"./PageLayout-tvsYvfyL.js";import{T as ue}from"./triangle-alert-il1la-RI.js";import{a as xe,A as pe}from"./arrow-up-BCJu40uf.js";import{N as fe}from"./network-BfJPFeB2.js";import{A as O}from"./activity-BgtT9aiG.js";import{R as he}from"./refresh-cw-CWeSjq0l.js";import{R as $,C as L}from"./Grid-BUbHrfD3.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/Terminal-B6s9P9o2.js b/frontend/dist/assets/Terminal-DuyUTw-y.js similarity index 99% rename from frontend/dist/assets/Terminal-B6s9P9o2.js rename to frontend/dist/assets/Terminal-DuyUTw-y.js index da03a323..9aa100f2 100644 --- a/frontend/dist/assets/Terminal-B6s9P9o2.js +++ b/frontend/dist/assets/Terminal-DuyUTw-y.js @@ -1,4 +1,4 @@ -var za=Object.defineProperty;var Ua=(e,t,i)=>t in e?za(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var D=(e,t,i)=>Ua(e,typeof t!="symbol"?t+"":t,i);import{d as as,Z as ii,cW as pe,dj as ja,dk as rt,dl as Qi,dm as Ka,b$ as wo,cK as Co,cL as qa,v as xo,dn as Va,dp as Ga,dq as Ya,bh as ko,cJ as Xa,bv as Eo,dr as ge,ba as Ja,b9 as Za,bQ as wt,ds as Qa,dt as el,du as tl,dv as il,da as Wr,j as m,ac as Ro,dw as Bo,ad as Mo,B as sl,r as U,A as _s,m as Ti,dx as zr,dy as Ur,cm as rl,dz as nl,c as es,dA as ol,dB as al,E as ll,dC as hl,dD as cl,dE as dl}from"./index-CLIbpHvY.js";import{a as ul}from"./ping-DgP-6H7e.js";import{P as _l,c as fl}from"./payload-decoders-BsVy7I3_.js";import{g as pl,r as ml}from"./system-DM3mfcRt.js";import{g as gi,B as Do,r as Lo,T as To}from"./ascii-burst-DN6etEs5.js";import{P as gl,B as vl,C as Sl}from"./PageLayout-9SoN_daN.js";import{K as $o,S as yl}from"./KeycapButton-Bb60ts2O.js";import{D as jr}from"./download-DQJBs0xV.js";import{S as Kr}from"./search-D-1ih5Lf.js";import{C as bl}from"./chevron-right-tyotcuUX.js";import"./keycap-sfx-ByZp-njj.js";/** +var za=Object.defineProperty;var Ua=(e,t,i)=>t in e?za(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var D=(e,t,i)=>Ua(e,typeof t!="symbol"?t+"":t,i);import{d as as,Z as ii,cW as pe,dj as ja,dk as rt,dl as Qi,dm as Ka,b$ as wo,cK as Co,cL as qa,v as xo,dn as Va,dp as Ga,dq as Ya,bh as ko,cJ as Xa,bv as Eo,dr as ge,ba as Ja,b9 as Za,bQ as wt,ds as Qa,dt as el,du as tl,dv as il,da as Wr,j as m,ac as Ro,dw as Bo,ad as Mo,B as sl,r as U,A as _s,m as Ti,dx as zr,dy as Ur,cm as rl,dz as nl,c as es,dA as ol,dB as al,E as ll,dC as hl,dD as cl,dE as dl}from"./index-2YU-f7O7.js";import{a as ul}from"./ping-6o6GOZ8c.js";import{P as _l,c as fl}from"./payload-decoders-BzIXzxqW.js";import{g as pl,r as ml}from"./system-z5qSDSFJ.js";import{g as gi,B as Do,r as Lo,T as To}from"./ascii-burst-DN6etEs5.js";import{P as gl,B as vl,C as Sl}from"./PageLayout-tvsYvfyL.js";import{K as $o,S as yl}from"./KeycapButton-fLM_SIw1.js";import{D as jr}from"./download-Dpt6RSjP.js";import{S as Kr}from"./search-5bBDdD-8.js";import{C as bl}from"./chevron-right-DwaXNeO4.js";import"./keycap-sfx-ByZp-njj.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. @@ -142,7 +142,7 @@ The web user needs polkit permissions to restart the service. See: /etc/polkit-1/localauthority/50-local.d/pymc-repeater.pkla`,"error");return}i.update(r,n.error||"Restart failed","error")}catch(n){const o=n instanceof Error?n.message:"";o.includes("ERR_NETWORK")||o.includes("ECONNRESET")||o.includes("Failed to fetch")||o.includes("Load failed")||o.includes("network connection was lost")||o.includes("abort")||o.includes("timeout")||n instanceof DOMException&&n.name==="TimeoutError"||n instanceof DOMException&&n.name==="AbortError"?(i.update(r,"Service is restarting (connection dropped).","success"),await this.waitForService(i)):i.update(r,`Error: ${o||"Restart failed"}`,"error")}}waitForService(i){return new Promise(s=>{const r=i.write("Waiting for service...","system");let n=0;const o=30;setTimeout(()=>{const a=setInterval(async()=>{n++,i.update(r,`Waiting for service... ${n}s`,"system");try{const h=new AbortController,l=setTimeout(()=>h.abort(),3e3);await fetch(`${il}/api/stats`,{signal:h.signal}),clearTimeout(l),clearInterval(a),i.update(r,`Service connected. (${n+4}s)`,"success"),s();return}catch{}n>=o&&(clearInterval(a),i.update(r,`Service did not respond within ${o+4}s. Check manually.`,"warning"),s())},1e3)},4e3)})}}const Ot="\x1B[",Ne=`${Ot}0m`,Oa=`${Ot}32m`,Or=`${Ot}33m`,Fr=`${Ot}31m`,E_=`${Ot}36m`,Rt=`${Ot}90m`,Fa=`${Ot}1m`;function Vt(e){return e>=1073741824?`${(e/1073741824).toFixed(1)}G`:e>=1048576?`${(e/1048576).toFixed(0)}M`:e>=1024?`${(e/1024).toFixed(0)}K`:`${e}B`}function ho(e){const t=Math.floor(e/86400),i=Math.floor(e%86400/3600),s=Math.floor(e%3600/60);return t>0?`${t}d ${i}h ${s}m`:i>0?`${i}h ${s}m`:`${s}m`}function R_(e,t){const i=Math.max(0,Math.min(100,e)),s=Math.round(i/100*t),r=t-s,n=i>=90?Fr:i>=70?Or:Oa,o=`${n}${"█".repeat(s)}${Ne}${Rt}${"░".repeat(r)}${Ne}`,a=`${i.toFixed(1)}%`.padStart(6);return`[${o}] ${n}${a}${Ne}`}function B_(e){return e>=80?`${Fr}${Fa}${e.toFixed(1)}°C${Ne}`:e>=60?`${Or}${e.toFixed(1)}°C${Ne}`:`${Oa}${e.toFixed(1)}°C${Ne}`}const wi=2,co=" ";function Gt(e,t){const i=" ".repeat(wi),s=t-wi,r=co.length,n=[];let o="",a=0;for(const h of e){const l=hu(h);a===0?(o=h,a=l):a+r+l<=s?(o+=co+h,a+=r+l):(n.push(i+o),o=h,a=l)}return a>0&&n.push(i+o),n}function M_(e,t,i){var d,u;const s=e.node_name||"unknown",r=e.version?`v${e.version}`:"",n=(d=t.system)!=null&&d.uptime?ho(t.system.uptime):"?",o=ho(e.uptime_seconds||0),a=Math.max(3,i-wi*2),h=((u=t.cpu.load_avg)==null?void 0:u["1min"].toFixed(2))??"?",l=t.cpu.load_avg?`${h} ${t.cpu.load_avg["5min"].toFixed(2)} ${t.cpu.load_avg["15min"].toFixed(2)}`:"?",c=i>=60?l:h;return[` ${E_}${Fa}${s}${Ne} ${Rt}${r}${Ne}`,` ${Rt}${"─".repeat(a)}${Ne}`,...Gt([w("Sys",y(n)),w("Svc",y(o)),w("Load",y(c))],i)]}function D_(e,t){const s=wi+4+1+2+6,r=Math.max(6,Math.min(30,t-s)),n=s+r,o=t-n-2,a=[""],h=`${e.cpu.count} core${e.cpu.count>1?"s":""}`,l=`${Vt(e.memory.used)}/${Vt(e.memory.total)}`,c=`${Vt(e.disk.used)}/${Vt(e.disk.total)}`,d=(f,_,p)=>{const g=R_(_,r),E=o>=p.length?` ${Ae(p)}`:"";return` ${b(f.padEnd(4))}${g}${E}`};a.push(d("CPU",e.cpu.usage_percent,h)),a.push(d("Mem",e.memory.usage_percent,l)),a.push(d("Dsk",e.disk.usage_percent,c));const u=Object.entries(e.temperatures||{});if(u.length>0){const f=u.map(([_,p])=>`${Ae(_+":")} ${B_(p)}`);a.push(...Gt(f,t))}return a}function L_(e,t){var l,c;const i=e.neighbors||{},s=Object.keys(i).length,r=Object.values(i).filter(d=>d.zero_hop).length,n=((c=(l=e.config)==null?void 0:l.repeater)==null?void 0:c.mode)||"?",o=e.noise_floor_dbm!=null?`${e.noise_floor_dbm}dBm`:"?",a=e.duty_cycle_percent??0,h=["",` ${Rt}MESH${Ne}`];return h.push(...Gt([w("Mode",y(n)),w("Nbrs",`${y(String(r))}${Ae(`/${s}`)}`),w("Noise",y(o)),w("Air",y(`${a.toFixed(1)}%`))],t)),h.push(...Gt([w("RX",y(String(e.rx_count??0))),w("TX",y(String(e.tx_count??0))),w("FWD",y(String(e.forwarded_count??0))),w("Drop",y(String(e.dropped_count??0)))],t)),h.push(...Gt([w("RX/h",y(String(Math.round(e.rx_per_hour??0)))),w("FWD/h",y(String(Math.round(e.forwarded_per_hour??0))))],t)),h}function T_(e,t){if(!e.network)return[];const i=["",` ${Rt}NET${Ne}`];return i.push(...Gt([w("TX",y(Vt(e.network.bytes_sent))),w("RX",y(Vt(e.network.bytes_recv))),w("Pkt",`${y(String(e.network.packets_sent))}${Ae("/")}${y(String(e.network.packets_recv))}`)],t)),i}function $_(e,t,i){if(e.length===0)return[];const s=t>=50,r=t>=50?6:5,n=t>=50?6:5,o=s?7:0,a=wi+0,h=Math.max(4,t-a-o-r-n-4),l=3,c=t>=50?8:5,d=i!=null?Math.max(0,Math.min(c,i-l)):c;if(d<=0)return[];const u=["",` ${Rt}PROCS${Ne}`],f=(s?"PID".padEnd(o):"")+"CPU".padStart(r)+"MEM".padStart(n)+" NAME";u.push(` ${Ae(f)}`);for(const _ of e.slice(0,d)){const p=s?Ae(String(_.pid).padEnd(o)):"",g=(t>=50?_.cpu_percent.toFixed(1):_.cpu_percent.toFixed(0)).padStart(r),E=(t>=50?_.memory_percent.toFixed(1):_.memory_percent.toFixed(0)).padStart(n),z=_.name.length>h?_.name.slice(0,h-1)+"…":_.name,O=_.cpu_percent>=50?Fr:_.cpu_percent>=20?Or:"",M=O?`${O}${g}${Ne}`:g;u.push(` ${p}${M}${Ae(E)} ${z}`)}return u}function A_(){return new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function uo(e,t,i,s,r){if(!e||!t)return` ${Rt}Waiting for data…${Ne}`;const n=M_(e,t,s),o=D_(t,s),a=L_(e,s),h=T_(t,s),l=["",` ${Rt}${A_()} · Ctrl+C to exit${Ne}`],c=[...n,...o,...a,...h,...l],d=r?yr(c,s):0,u=r?Math.max(0,r-d):void 0,f=$_(i,s,u),_=[...c.slice(0,-l.length),...f,...l];return r&&_.length>r&&(_.length=r),_.join(` `)}const P_=3e3;class N_ extends ee{constructor(){super(...arguments);D(this,"name","top");D(this,"description","Live system overview (Ctrl+C to exit)");D(this,"aliases",["htop"])}async execute({output:i,rawInput:s,cols:r,signal:n}){var l,c;if(this.argsAfterName(s).toLowerCase().trim()==="help"){i.write([W("top"),` ${b("Live-updating system overview combining hardware")}`,` ${b("stats, mesh metrics, and running processes.")}`,` ${b("Refreshes every 3s. Press Ctrl+C to exit.")}`,"",R("top","start live display"),"",W("Sections"),` ${b("Header Node name, version, uptime, load average")}`,` ${b("Gauges CPU, memory, disk usage with bar charts")}`,` ${b("Mesh Mode, neighbors, packet counts, airtime")}`,` ${b("Network TCP/IP bytes and packet counters")}`,` ${b("Processes Top 8 processes by CPU usage")}`,"",W("Aliases"),` ${b("htop")}`].join(` `));return}let o=null,a=[],h=wt.getState().stats;try{const[d,u]=await Promise.all([Qi(),Wr()]);d.success&&d.data&&(o=d.data),u.success&&u.data&&(a=u.data.processes.sort((f,_)=>_.cpu_percent-f.cpu_percent))}catch{}if(!n.aborted){(l=i.enterFullscreen)==null||l.call(i);try{const d=i.write(uo(h,o,a,i.cols??r,i.rows));await new Promise(u=>{if(n.aborted){u();return}const f=async()=>{h=wt.getState().stats;try{const[p,g]=await Promise.all([Qi(),Wr()]);p.success&&p.data&&(o=p.data),g.success&&g.data&&(a=g.data.processes.sort((E,z)=>z.cpu_percent-E.cpu_percent))}catch{}n.aborted||i.update(d,uo(h,o,a,i.cols??r,i.rows))},_=setInterval(()=>{if(n.aborted){clearInterval(_),u();return}f()},P_);n.addEventListener("abort",()=>{clearInterval(_),u()},{once:!0})})}finally{(c=i.exitFullscreen)==null||c.call(i)}}}}const _o=["DONT PANIC","C0FFEE","FEED C0DE","LOL","I CANNOT DO THAT"];function Hr(){return _o[Math.floor(Math.random()*_o.length)]}const wr=new EventTarget,Cr="shell-phrase";function Ha(e){wr.dispatchEvent(new CustomEvent(Cr,{detail:e??Hr()}))}function I_(e){const t=i=>e(i.detail);return wr.addEventListener(Cr,t),()=>wr.removeEventListener(Cr,t)}class O_ extends ee{constructor(){super(...arguments);D(this,"name","fortune");D(this,"description","Display a fortune on the header");D(this,"aliases",["lol"])}execute({output:i}){const s=Hr();Ha(s),i.write(b(` ${s}`))}}const xr=new EventTarget,kr="party-time";function F_(){xr.dispatchEvent(new Event(kr))}function H_(e){return xr.addEventListener(kr,e),()=>xr.removeEventListener(kr,e)}class W_ extends ee{constructor(){super(...arguments);D(this,"name","partytime");D(this,"description","Party on, Garth!");D(this,"aliases",["party","excellent","waynesworld"])}execute({output:i}){F_(),Ha("PARTY 0N GARTH"),i.write(b(" SCHWING!"))}}class z_ extends ee{constructor(){super(...arguments);D(this,"name","ver");D(this,"description","Show version info");D(this,"aliases",["version"])}async execute({output:i,rawInput:s}){if(this.argsAfterName(s).toLowerCase().trim()==="help"){i.write([W("ver"),` ${b("Display pyMC_Repeater, core, and console version.")}`,` ${b('Equivalent to firmware serial CLI "ver" command.')}`,"",R("ver","show version"),"",W("Aliases"),` ${b("version")}`].join(` -`));return}const r=i.write("processing...","system");try{const n=await rt();i.update(r,[` ${w("pyMC_Repeater",y(`v${n.version||"?"}`))}`,` ${w("pyMC_Core",y(n.core_version||"?"))}`,` ${w("pyMC_Console",y("v0.9.292"))}`].join(` +`));return}const r=i.write("processing...","system");try{const n=await rt();i.update(r,[` ${w("pyMC_Repeater",y(`v${n.version||"?"}`))}`,` ${w("pyMC_Core",y(n.core_version||"?"))}`,` ${w("pyMC_Console",y("v0.9.293"))}`].join(` `),"value")}catch(n){i.update(r,`Error: ${n instanceof Error?n.message:"Command failed"}`,"error")}}}class U_ extends ee{constructor(){super(...arguments);D(this,"name","clock");D(this,"description","Show system UTC time")}execute({output:i,rawInput:s}){if(this.argsAfterName(s).toLowerCase().trim()==="help"){i.write([W("clock"),` ${b("Display the current system UTC time.")}`,` ${b('Equivalent to firmware serial CLI "clock" command.')}`,` ${b("Use to verify NTP sync and correlate packet timestamps.")}`,"",R("clock","show UTC time")].join(` `));return}const r=new Date;i.write([` ${w("UTC",y(r.toUTCString()))}`,` ${w("ISO",y(r.toISOString()))}`,` ${w("Unix",y(String(Math.floor(r.getTime()/1e3))))}`].join(` `),"value")}}class j_ extends ee{constructor(){super(...arguments);D(this,"name","stats-packets");D(this,"description","Packet counters")}async execute({output:i,rawInput:s}){if(this.argsAfterName(s).toLowerCase().trim()==="help"){i.write([W("stats-packets"),` ${b("Display packet counters: sent, received, forwarded, dropped.")}`,` ${b('Equivalent to firmware serial CLI "stats-packets" command.')}`,"",R("stats-packets","show packet counters")].join(` diff --git a/frontend/dist/assets/TimeRangeStepper-r-j5VisG.js b/frontend/dist/assets/TimeRangeStepper--TSSRhtK.js similarity index 98% rename from frontend/dist/assets/TimeRangeStepper-r-j5VisG.js rename to frontend/dist/assets/TimeRangeStepper--TSSRhtK.js index 089b595e..2e83bd27 100644 --- a/frontend/dist/assets/TimeRangeStepper-r-j5VisG.js +++ b/frontend/dist/assets/TimeRangeStepper--TSSRhtK.js @@ -1,4 +1,4 @@ -import{ap as Ge,aM as be,ao as Le,cn as $e,ar as He,aq as q,r as l,au as Ke,av as ee,az as z,ay as U,aj as k,aC as K,co as se,cp as Be,aH as We,aI as Ye,aN as Ve,aJ as re,aO as Xe,aK as me,cq as _e,cr as W,cs as M,ct as he,cu as A,cv as xe,aL as le,aX as g,cw as ye,cx as Pe,aP as we,an as Qe,aQ as Fe,aR as Oe,aT as Ze,aU as qe,aW as Ee,cy as ze,cz as Te,aY as Ue,cA as Je,cB as et,aZ as Ie,cC as tt,cD as nt,cE as at,ak as ot,b3 as st,aS as J,cF as je,b5 as rt,b7 as ie,cG as lt,cH as ut,cI as ct,d as it,j as I,c as H,A as pt,m as dt,cm as ft}from"./index-CLIbpHvY.js";import{C as vt}from"./chevron-right-tyotcuUX.js";import{F as bt,y as mt,R as ht,T as yt,w as Pt,A as $t}from"./map-pin-oP9EChoI.js";var xt=Object.defineProperty,gt=(e,n,t)=>n in e?xt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ke=(e,n,t)=>(gt(e,typeof n!="symbol"?n+"":n,t),t),$=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))($||{}),St=(e=>(e[e.OpenPopover=0]="OpenPopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(St||{});let Ct={0:e=>e.popoverState===0?e:{...e,popoverState:0,__demoMode:!1},1(e){return e.popoverState===1?e:{...e,popoverState:1,__demoMode:!1}},2(e,n){return e.button===n.button?e:{...e,button:n.button}},3(e,n){return e.buttonId===n.buttonId?e:{...e,buttonId:n.buttonId}},4(e,n){return e.panel===n.panel?e:{...e,panel:n.panel}},5(e,n){return e.panelId===n.panelId?e:{...e,panelId:n.panelId}}};class ge extends Ge{constructor(n){super(n),ke(this,"actions",{close:()=>this.send({type:1}),refocusableClose:t=>{this.actions.close();let v=t?be(t)?t:"current"in t&&be(t.current)?t.current:this.state.button:this.state.button;v==null||v.focus()},open:()=>this.send({type:0}),setButtonId:t=>this.send({type:3,buttonId:t}),setButton:t=>this.send({type:2,button:t}),setPanelId:t=>this.send({type:5,panelId:t}),setPanel:t=>this.send({type:4,panel:t})}),ke(this,"selectors",{isPortalled:t=>{var v;if(!t.button||!t.panel)return!1;let h=(v=Le(t.button))!=null?v:document;for(let x of h.querySelectorAll("body > *"))if(Number(x==null?void 0:x.contains(t.button))^Number(x==null?void 0:x.contains(t.panel)))return!0;let b=$e(h),r=b.indexOf(t.button),a=(r+b.length-1)%b.length,C=(r+1)%b.length,y=b[a],s=b[C];return!t.panel.contains(y)&&!t.panel.contains(s)}});{let t=this.state.id,v=He.get(null);this.on(0,()=>v.actions.push(t)),this.on(1,()=>v.actions.pop(t))}}static new({id:n,__demoMode:t=!1}){return new ge({id:n,__demoMode:t,popoverState:t?0:1,buttons:{current:[]},button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:{current:null},afterPanelSentinel:{current:null},afterButtonSentinel:{current:null}})}reduce(n,t){return q(t.type,Ct,n,t)}}const Ne=l.createContext(null);function pe(e){let n=l.useContext(Ne);if(n===null){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,pe),t}return n}function wt({id:e,__demoMode:n=!1}){let t=l.useMemo(()=>ge.new({id:e,__demoMode:n}),[]);return Ke(()=>t.dispose()),t}let Se=l.createContext(null);Se.displayName="PopoverGroupContext";function De(){return l.useContext(Se)}let de=l.createContext(null);de.displayName="PopoverPanelContext";function It(){return l.useContext(de)}let kt="div";function Bt(e,n){var t;let v=l.useId(),{__demoMode:h=!1,...b}=e,r=wt({id:v,__demoMode:h}),a=l.useRef(null),C=U(n,Je(u=>{a.current=u})),[y,s,x,S,B]=z(r,l.useCallback(u=>[u.popoverState,u.button,u.panel,u.buttonId,u.panelId],[])),w=et((t=a.current)!=null?t:s),d=Ie(S),p=Ie(B),f=l.useMemo(()=>({buttonId:d,panelId:p,close:r.actions.close}),[d,p,r]),P=De(),c=P==null?void 0:P.registerPopover,_=k(()=>{var u,F;let E=se((u=a.current)!=null?u:s);return(F=P==null?void 0:P.isFocusWithinPopoverGroup())!=null?F:E&&((s==null?void 0:s.contains(E))||(x==null?void 0:x.contains(E)))});l.useEffect(()=>c==null?void 0:c(f),[c,f]);let[te,ne]=tt(),G=nt(s),D=at({mainTreeNode:G,portals:te,defaultContainers:[{get current(){return r.state.button}},{get current(){return r.state.panel}}]});ot(w,"focus",u=>{var F,E,j,Q,N,Z;u.target!==window&<(u.target)&&r.state.popoverState===$.Open&&(_()||r.state.button&&r.state.panel&&(D.contains(u.target)||(E=(F=r.state.beforePanelSentinel.current)==null?void 0:F.contains)!=null&&E.call(F,u.target)||(Q=(j=r.state.afterPanelSentinel.current)==null?void 0:j.contains)!=null&&Q.call(j,u.target)||(Z=(N=r.state.afterButtonSentinel.current)==null?void 0:N.contains)!=null&&Z.call(N,u.target)||r.actions.close()))},!0);let Y=y===$.Open;st(Y,D.resolveContainers,(u,F)=>{r.actions.close(),ut(F,ct.Loose)||(u.preventDefault(),s==null||s.focus())});let ae=re({open:y===$.Open,close:r.actions.refocusableClose}),oe=z(r,l.useCallback(u=>q(u.popoverState,{[$.Open]:J.Open,[$.Closed]:J.Closed}),[])),V={ref:C},X=le();return g.createElement(je,{node:G},g.createElement($t,null,g.createElement(de.Provider,{value:null},g.createElement(Ne.Provider,{value:r},g.createElement(Te,{value:r.actions.refocusableClose},g.createElement(rt,{value:oe},g.createElement(ne,null,X({ourProps:V,theirProps:b,slot:ae,defaultTag:kt,name:"Popover"}))))))))}let _t="button";function Ft(e,n){let t=l.useId(),{id:v=`headlessui-popover-button-${t}`,disabled:h=!1,autoFocus:b=!1,...r}=e,a=pe("Popover.Button"),[C,y,s,x,S,B,w]=z(a,l.useCallback(o=>[o.popoverState,a.selectors.isPortalled(o),o.button,o.buttonId,o.panel,o.panelId,o.afterButtonSentinel],[])),d=l.useRef(null),p=`headlessui-focus-sentinel-${l.useId()}`,f=De(),P=f==null?void 0:f.closeOthers,c=It()!==null;l.useEffect(()=>{if(!c)return a.actions.setButtonId(v),()=>a.actions.setButtonId(null)},[c,v,a]);let[_]=l.useState(()=>Symbol()),te=U(d,n,bt(),k(o=>{if(!c){if(o)a.state.buttons.current.push(_);else{let i=a.state.buttons.current.indexOf(_);i!==-1&&a.state.buttons.current.splice(i,1)}a.state.buttons.current.length>1&&console.warn("You are already using a but only 1 is supported."),o&&a.actions.setButton(o)}})),ne=U(d,n),G=k(o=>{var i,O,T;if(c){if(a.state.popoverState===$.Closed)return;switch(o.key){case K.Space:case K.Enter:o.preventDefault(),(O=(i=o.target).click)==null||O.call(i),a.actions.close(),(T=a.state.button)==null||T.focus();break}}else switch(o.key){case K.Space:case K.Enter:o.preventDefault(),o.stopPropagation(),a.state.popoverState===$.Closed?(P==null||P(a.state.buttonId),a.actions.open()):a.actions.close();break;case K.Escape:if(a.state.popoverState!==$.Open)return P==null?void 0:P(a.state.buttonId);if(!d.current)return;let R=se(d.current);if(R&&!d.current.contains(R))return;o.preventDefault(),o.stopPropagation(),a.actions.close();break}}),D=k(o=>{c||o.key===K.Space&&o.preventDefault()}),Y=k(o=>{var i,O;Be(o.currentTarget)||h||(c?(a.actions.close(),(i=a.state.button)==null||i.focus()):(o.preventDefault(),o.stopPropagation(),a.state.popoverState===$.Closed?(P==null||P(a.state.buttonId),a.actions.open()):a.actions.close(),(O=a.state.button)==null||O.focus()))}),ae=k(o=>{o.preventDefault(),o.stopPropagation()}),{isFocusVisible:oe,focusProps:V}=We({autoFocus:b}),{isHovered:X,hoverProps:u}=Ye({isDisabled:h}),{pressed:F,pressProps:E}=Ve({disabled:h}),j=C===$.Open,Q=re({open:j,active:F||j,disabled:h,hover:X,focus:oe,autofocus:b}),N=Xe(e,s),Z=c?me({ref:ne,type:N,onKeyDown:G,onClick:Y,disabled:h||void 0,autoFocus:b},V,u,E):me({ref:te,id:x,type:N,"aria-expanded":C===$.Open,"aria-controls":S?B:void 0,disabled:h||void 0,autoFocus:b,onKeyDown:G,onKeyUp:D,onClick:Y,onMouseDown:ae},V,u,E),ue=_e(),fe=k(()=>{if(!be(a.state.panel))return;let o=a.state.panel;function i(){q(ue.current,{[M.Forwards]:()=>W(o,A.First),[M.Backwards]:()=>W(o,A.Last)})===he.Error&&W($e(xe(a.state.button)).filter(O=>O.dataset.headlessuiFocusGuard!=="true"),q(ue.current,{[M.Forwards]:A.Next,[M.Backwards]:A.Previous}),{relativeTo:a.state.button})}i()}),m=le();return g.createElement(g.Fragment,null,m({ourProps:Z,theirProps:r,slot:Q,defaultTag:_t,name:"Popover.Button"}),j&&!c&&y&&g.createElement(ye,{id:p,ref:w,features:Pe.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:fe}))}let Ot="div",Et=ie.RenderStrategy|ie.Static;function Re(e,n){let t=l.useId(),{id:v=`headlessui-popover-backdrop-${t}`,transition:h=!1,...b}=e,r=pe("Popover.Backdrop"),a=z(r,l.useCallback(f=>f.popoverState,[])),[C,y]=l.useState(null),s=U(n,y),x=Fe(),[S,B]=Oe(h,C,x!==null?(x&J.Open)===J.Open:a===$.Open),w=k(f=>{if(Be(f.currentTarget))return f.preventDefault();r.actions.close()}),d=re({open:a===$.Open}),p={ref:s,id:v,"aria-hidden":!0,onClick:w,...Ee(B)};return le()({ourProps:p,theirProps:b,slot:d,defaultTag:Ot,features:Et,visible:S,name:"Popover.Backdrop"})}let Tt="div",jt=ie.RenderStrategy|ie.Static;function Nt(e,n){let t=l.useId(),{id:v=`headlessui-popover-panel-${t}`,focus:h=!1,anchor:b,portal:r=!1,modal:a=!1,transition:C=!1,...y}=e,s=pe("Popover.Panel"),x=z(s,s.selectors.isPortalled),[S,B,w,d,p]=z(s,l.useCallback(m=>[m.popoverState,m.button,m.__demoMode,m.beforePanelSentinel,m.afterPanelSentinel],[])),f=`headlessui-focus-sentinel-before-${t}`,P=`headlessui-focus-sentinel-after-${t}`,c=l.useRef(null),_=mt(b),[te,ne]=ht(_),G=yt();_&&(r=!0);let[D,Y]=l.useState(null),ae=U(c,n,_?te:null,s.actions.setPanel,Y),oe=we(B),V=we(c.current);Qe(()=>(s.actions.setPanelId(v),()=>s.actions.setPanelId(null)),[v,s]);let X=Fe(),[u,F]=Oe(C,D,X!==null?(X&J.Open)===J.Open:S===$.Open);Ze(u,B,s.actions.close),qe(w?!1:a&&u,V);let E=k(m=>{var o;switch(m.key){case K.Escape:if(s.state.popoverState!==$.Open||!c.current)return;let i=se(c.current);if(i&&!c.current.contains(i))return;m.preventDefault(),m.stopPropagation(),s.actions.close(),(o=s.state.button)==null||o.focus();break}});l.useEffect(()=>{var m;e.static||S===$.Closed&&((m=e.unmount)==null||m)&&s.actions.setPanel(null)},[S,e.unmount,e.static,s]),l.useEffect(()=>{if(w||!h||S!==$.Open||!c.current)return;let m=se(c.current);c.current.contains(m)||W(c.current,A.First)},[w,h,c.current,S]);let j=re({open:S===$.Open,close:s.actions.refocusableClose}),Q=me(_?G():{},{ref:ae,id:v,onKeyDown:E,onBlur:h&&S===$.Open?m=>{var o,i,O,T,R;let L=m.relatedTarget;L&&c.current&&((o=c.current)!=null&&o.contains(L)||(s.actions.close(),((O=(i=d.current)==null?void 0:i.contains)!=null&&O.call(i,L)||(R=(T=p.current)==null?void 0:T.contains)!=null&&R.call(T,L))&&L.focus({preventScroll:!0})))}:void 0,tabIndex:-1,style:{...y.style,...ne,"--button-width":Pt(u,B,!0).width},...Ee(F)}),N=_e(),Z=k(()=>{let m=c.current;if(!m)return;function o(){q(N.current,{[M.Forwards]:()=>{var i;W(m,A.First)===he.Error&&((i=s.state.afterPanelSentinel.current)==null||i.focus())},[M.Backwards]:()=>{var i;(i=s.state.button)==null||i.focus({preventScroll:!0})}})}o()}),ue=k(()=>{let m=c.current;if(!m)return;function o(){q(N.current,{[M.Forwards]:()=>{var i;if(!s.state.button)return;let O=(i=xe(s.state.button))!=null?i:document.body,T=$e(O),R=T.indexOf(s.state.button),L=T.slice(0,R+1),ce=[...T.slice(R+1),...L];for(let ve of ce.slice())if(ve.dataset.headlessuiFocusGuard==="true"||D!=null&&D.contains(ve)){let Ce=ce.indexOf(ve);Ce!==-1&&ce.splice(Ce,1)}W(ce,A.First,{sorted:!1})},[M.Backwards]:()=>{var i;W(m,A.Previous)===he.Error&&((i=s.state.button)==null||i.focus())}})}o()}),fe=le();return g.createElement(ze,null,g.createElement(de.Provider,{value:v},g.createElement(Te,{value:s.actions.refocusableClose},g.createElement(Ue,{enabled:r?e.static||u:!1,ownerDocument:oe},u&&x&&g.createElement(ye,{id:f,ref:d,features:Pe.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:Z}),fe({ourProps:Q,theirProps:y,slot:j,defaultTag:Tt,features:jt,visible:u,name:"Popover.Panel"}),u&&x&&g.createElement(ye,{id:P,ref:p,features:Pe.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:ue})))))}let Dt="div";function Rt(e,n){let t=l.useRef(null),v=U(t,n),[h,b]=l.useState([]),r=k(d=>{b(p=>{let f=p.indexOf(d);if(f!==-1){let P=p.slice();return P.splice(f,1),P}return p})}),a=k(d=>(b(p=>[...p,d]),()=>r(d))),C=k(()=>{var d;let p=xe(t.current);if(!p)return!1;let f=se(t.current);return(d=t.current)!=null&&d.contains(f)?!0:h.some(P=>{var c,_;return((c=p.getElementById(P.buttonId.current))==null?void 0:c.contains(f))||((_=p.getElementById(P.panelId.current))==null?void 0:_.contains(f))})}),y=k(d=>{for(let p of h)p.buttonId.current!==d&&p.close()}),s=l.useMemo(()=>({registerPopover:a,unregisterPopover:r,isFocusWithinPopoverGroup:C,closeOthers:y}),[a,r,C,y]),x=re({}),S=e,B={ref:v},w=le();return g.createElement(je,null,g.createElement(Se.Provider,{value:s},w({ourProps:B,theirProps:S,slot:x,defaultTag:Dt,name:"Popover.Group"})))}let Mt=ee(Bt),Me=ee(Ft),At=ee(Re),Gt=ee(Re),Ae=ee(Nt),Lt=ee(Rt),Ht=Object.assign(Mt,{Button:Me,Backdrop:Gt,Overlay:At,Panel:Ae,Group:Lt});/** +import{ap as Ge,aM as be,ao as Le,cn as $e,ar as He,aq as q,r as l,au as Ke,av as ee,az as z,ay as U,aj as k,aC as K,co as se,cp as Be,aH as We,aI as Ye,aN as Ve,aJ as re,aO as Xe,aK as me,cq as _e,cr as W,cs as M,ct as he,cu as A,cv as xe,aL as le,aX as g,cw as ye,cx as Pe,aP as we,an as Qe,aQ as Fe,aR as Oe,aT as Ze,aU as qe,aW as Ee,cy as ze,cz as Te,aY as Ue,cA as Je,cB as et,aZ as Ie,cC as tt,cD as nt,cE as at,ak as ot,b3 as st,aS as J,cF as je,b5 as rt,b7 as ie,cG as lt,cH as ut,cI as ct,d as it,j as I,c as H,A as pt,m as dt,cm as ft}from"./index-2YU-f7O7.js";import{C as vt}from"./chevron-right-DwaXNeO4.js";import{F as bt,y as mt,R as ht,T as yt,w as Pt,A as $t}from"./map-pin-DwpgbaSS.js";var xt=Object.defineProperty,gt=(e,n,t)=>n in e?xt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ke=(e,n,t)=>(gt(e,typeof n!="symbol"?n+"":n,t),t),$=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))($||{}),St=(e=>(e[e.OpenPopover=0]="OpenPopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(St||{});let Ct={0:e=>e.popoverState===0?e:{...e,popoverState:0,__demoMode:!1},1(e){return e.popoverState===1?e:{...e,popoverState:1,__demoMode:!1}},2(e,n){return e.button===n.button?e:{...e,button:n.button}},3(e,n){return e.buttonId===n.buttonId?e:{...e,buttonId:n.buttonId}},4(e,n){return e.panel===n.panel?e:{...e,panel:n.panel}},5(e,n){return e.panelId===n.panelId?e:{...e,panelId:n.panelId}}};class ge extends Ge{constructor(n){super(n),ke(this,"actions",{close:()=>this.send({type:1}),refocusableClose:t=>{this.actions.close();let v=t?be(t)?t:"current"in t&&be(t.current)?t.current:this.state.button:this.state.button;v==null||v.focus()},open:()=>this.send({type:0}),setButtonId:t=>this.send({type:3,buttonId:t}),setButton:t=>this.send({type:2,button:t}),setPanelId:t=>this.send({type:5,panelId:t}),setPanel:t=>this.send({type:4,panel:t})}),ke(this,"selectors",{isPortalled:t=>{var v;if(!t.button||!t.panel)return!1;let h=(v=Le(t.button))!=null?v:document;for(let x of h.querySelectorAll("body > *"))if(Number(x==null?void 0:x.contains(t.button))^Number(x==null?void 0:x.contains(t.panel)))return!0;let b=$e(h),r=b.indexOf(t.button),a=(r+b.length-1)%b.length,C=(r+1)%b.length,y=b[a],s=b[C];return!t.panel.contains(y)&&!t.panel.contains(s)}});{let t=this.state.id,v=He.get(null);this.on(0,()=>v.actions.push(t)),this.on(1,()=>v.actions.pop(t))}}static new({id:n,__demoMode:t=!1}){return new ge({id:n,__demoMode:t,popoverState:t?0:1,buttons:{current:[]},button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:{current:null},afterPanelSentinel:{current:null},afterButtonSentinel:{current:null}})}reduce(n,t){return q(t.type,Ct,n,t)}}const Ne=l.createContext(null);function pe(e){let n=l.useContext(Ne);if(n===null){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,pe),t}return n}function wt({id:e,__demoMode:n=!1}){let t=l.useMemo(()=>ge.new({id:e,__demoMode:n}),[]);return Ke(()=>t.dispose()),t}let Se=l.createContext(null);Se.displayName="PopoverGroupContext";function De(){return l.useContext(Se)}let de=l.createContext(null);de.displayName="PopoverPanelContext";function It(){return l.useContext(de)}let kt="div";function Bt(e,n){var t;let v=l.useId(),{__demoMode:h=!1,...b}=e,r=wt({id:v,__demoMode:h}),a=l.useRef(null),C=U(n,Je(u=>{a.current=u})),[y,s,x,S,B]=z(r,l.useCallback(u=>[u.popoverState,u.button,u.panel,u.buttonId,u.panelId],[])),w=et((t=a.current)!=null?t:s),d=Ie(S),p=Ie(B),f=l.useMemo(()=>({buttonId:d,panelId:p,close:r.actions.close}),[d,p,r]),P=De(),c=P==null?void 0:P.registerPopover,_=k(()=>{var u,F;let E=se((u=a.current)!=null?u:s);return(F=P==null?void 0:P.isFocusWithinPopoverGroup())!=null?F:E&&((s==null?void 0:s.contains(E))||(x==null?void 0:x.contains(E)))});l.useEffect(()=>c==null?void 0:c(f),[c,f]);let[te,ne]=tt(),G=nt(s),D=at({mainTreeNode:G,portals:te,defaultContainers:[{get current(){return r.state.button}},{get current(){return r.state.panel}}]});ot(w,"focus",u=>{var F,E,j,Q,N,Z;u.target!==window&<(u.target)&&r.state.popoverState===$.Open&&(_()||r.state.button&&r.state.panel&&(D.contains(u.target)||(E=(F=r.state.beforePanelSentinel.current)==null?void 0:F.contains)!=null&&E.call(F,u.target)||(Q=(j=r.state.afterPanelSentinel.current)==null?void 0:j.contains)!=null&&Q.call(j,u.target)||(Z=(N=r.state.afterButtonSentinel.current)==null?void 0:N.contains)!=null&&Z.call(N,u.target)||r.actions.close()))},!0);let Y=y===$.Open;st(Y,D.resolveContainers,(u,F)=>{r.actions.close(),ut(F,ct.Loose)||(u.preventDefault(),s==null||s.focus())});let ae=re({open:y===$.Open,close:r.actions.refocusableClose}),oe=z(r,l.useCallback(u=>q(u.popoverState,{[$.Open]:J.Open,[$.Closed]:J.Closed}),[])),V={ref:C},X=le();return g.createElement(je,{node:G},g.createElement($t,null,g.createElement(de.Provider,{value:null},g.createElement(Ne.Provider,{value:r},g.createElement(Te,{value:r.actions.refocusableClose},g.createElement(rt,{value:oe},g.createElement(ne,null,X({ourProps:V,theirProps:b,slot:ae,defaultTag:kt,name:"Popover"}))))))))}let _t="button";function Ft(e,n){let t=l.useId(),{id:v=`headlessui-popover-button-${t}`,disabled:h=!1,autoFocus:b=!1,...r}=e,a=pe("Popover.Button"),[C,y,s,x,S,B,w]=z(a,l.useCallback(o=>[o.popoverState,a.selectors.isPortalled(o),o.button,o.buttonId,o.panel,o.panelId,o.afterButtonSentinel],[])),d=l.useRef(null),p=`headlessui-focus-sentinel-${l.useId()}`,f=De(),P=f==null?void 0:f.closeOthers,c=It()!==null;l.useEffect(()=>{if(!c)return a.actions.setButtonId(v),()=>a.actions.setButtonId(null)},[c,v,a]);let[_]=l.useState(()=>Symbol()),te=U(d,n,bt(),k(o=>{if(!c){if(o)a.state.buttons.current.push(_);else{let i=a.state.buttons.current.indexOf(_);i!==-1&&a.state.buttons.current.splice(i,1)}a.state.buttons.current.length>1&&console.warn("You are already using a but only 1 is supported."),o&&a.actions.setButton(o)}})),ne=U(d,n),G=k(o=>{var i,O,T;if(c){if(a.state.popoverState===$.Closed)return;switch(o.key){case K.Space:case K.Enter:o.preventDefault(),(O=(i=o.target).click)==null||O.call(i),a.actions.close(),(T=a.state.button)==null||T.focus();break}}else switch(o.key){case K.Space:case K.Enter:o.preventDefault(),o.stopPropagation(),a.state.popoverState===$.Closed?(P==null||P(a.state.buttonId),a.actions.open()):a.actions.close();break;case K.Escape:if(a.state.popoverState!==$.Open)return P==null?void 0:P(a.state.buttonId);if(!d.current)return;let R=se(d.current);if(R&&!d.current.contains(R))return;o.preventDefault(),o.stopPropagation(),a.actions.close();break}}),D=k(o=>{c||o.key===K.Space&&o.preventDefault()}),Y=k(o=>{var i,O;Be(o.currentTarget)||h||(c?(a.actions.close(),(i=a.state.button)==null||i.focus()):(o.preventDefault(),o.stopPropagation(),a.state.popoverState===$.Closed?(P==null||P(a.state.buttonId),a.actions.open()):a.actions.close(),(O=a.state.button)==null||O.focus()))}),ae=k(o=>{o.preventDefault(),o.stopPropagation()}),{isFocusVisible:oe,focusProps:V}=We({autoFocus:b}),{isHovered:X,hoverProps:u}=Ye({isDisabled:h}),{pressed:F,pressProps:E}=Ve({disabled:h}),j=C===$.Open,Q=re({open:j,active:F||j,disabled:h,hover:X,focus:oe,autofocus:b}),N=Xe(e,s),Z=c?me({ref:ne,type:N,onKeyDown:G,onClick:Y,disabled:h||void 0,autoFocus:b},V,u,E):me({ref:te,id:x,type:N,"aria-expanded":C===$.Open,"aria-controls":S?B:void 0,disabled:h||void 0,autoFocus:b,onKeyDown:G,onKeyUp:D,onClick:Y,onMouseDown:ae},V,u,E),ue=_e(),fe=k(()=>{if(!be(a.state.panel))return;let o=a.state.panel;function i(){q(ue.current,{[M.Forwards]:()=>W(o,A.First),[M.Backwards]:()=>W(o,A.Last)})===he.Error&&W($e(xe(a.state.button)).filter(O=>O.dataset.headlessuiFocusGuard!=="true"),q(ue.current,{[M.Forwards]:A.Next,[M.Backwards]:A.Previous}),{relativeTo:a.state.button})}i()}),m=le();return g.createElement(g.Fragment,null,m({ourProps:Z,theirProps:r,slot:Q,defaultTag:_t,name:"Popover.Button"}),j&&!c&&y&&g.createElement(ye,{id:p,ref:w,features:Pe.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:fe}))}let Ot="div",Et=ie.RenderStrategy|ie.Static;function Re(e,n){let t=l.useId(),{id:v=`headlessui-popover-backdrop-${t}`,transition:h=!1,...b}=e,r=pe("Popover.Backdrop"),a=z(r,l.useCallback(f=>f.popoverState,[])),[C,y]=l.useState(null),s=U(n,y),x=Fe(),[S,B]=Oe(h,C,x!==null?(x&J.Open)===J.Open:a===$.Open),w=k(f=>{if(Be(f.currentTarget))return f.preventDefault();r.actions.close()}),d=re({open:a===$.Open}),p={ref:s,id:v,"aria-hidden":!0,onClick:w,...Ee(B)};return le()({ourProps:p,theirProps:b,slot:d,defaultTag:Ot,features:Et,visible:S,name:"Popover.Backdrop"})}let Tt="div",jt=ie.RenderStrategy|ie.Static;function Nt(e,n){let t=l.useId(),{id:v=`headlessui-popover-panel-${t}`,focus:h=!1,anchor:b,portal:r=!1,modal:a=!1,transition:C=!1,...y}=e,s=pe("Popover.Panel"),x=z(s,s.selectors.isPortalled),[S,B,w,d,p]=z(s,l.useCallback(m=>[m.popoverState,m.button,m.__demoMode,m.beforePanelSentinel,m.afterPanelSentinel],[])),f=`headlessui-focus-sentinel-before-${t}`,P=`headlessui-focus-sentinel-after-${t}`,c=l.useRef(null),_=mt(b),[te,ne]=ht(_),G=yt();_&&(r=!0);let[D,Y]=l.useState(null),ae=U(c,n,_?te:null,s.actions.setPanel,Y),oe=we(B),V=we(c.current);Qe(()=>(s.actions.setPanelId(v),()=>s.actions.setPanelId(null)),[v,s]);let X=Fe(),[u,F]=Oe(C,D,X!==null?(X&J.Open)===J.Open:S===$.Open);Ze(u,B,s.actions.close),qe(w?!1:a&&u,V);let E=k(m=>{var o;switch(m.key){case K.Escape:if(s.state.popoverState!==$.Open||!c.current)return;let i=se(c.current);if(i&&!c.current.contains(i))return;m.preventDefault(),m.stopPropagation(),s.actions.close(),(o=s.state.button)==null||o.focus();break}});l.useEffect(()=>{var m;e.static||S===$.Closed&&((m=e.unmount)==null||m)&&s.actions.setPanel(null)},[S,e.unmount,e.static,s]),l.useEffect(()=>{if(w||!h||S!==$.Open||!c.current)return;let m=se(c.current);c.current.contains(m)||W(c.current,A.First)},[w,h,c.current,S]);let j=re({open:S===$.Open,close:s.actions.refocusableClose}),Q=me(_?G():{},{ref:ae,id:v,onKeyDown:E,onBlur:h&&S===$.Open?m=>{var o,i,O,T,R;let L=m.relatedTarget;L&&c.current&&((o=c.current)!=null&&o.contains(L)||(s.actions.close(),((O=(i=d.current)==null?void 0:i.contains)!=null&&O.call(i,L)||(R=(T=p.current)==null?void 0:T.contains)!=null&&R.call(T,L))&&L.focus({preventScroll:!0})))}:void 0,tabIndex:-1,style:{...y.style,...ne,"--button-width":Pt(u,B,!0).width},...Ee(F)}),N=_e(),Z=k(()=>{let m=c.current;if(!m)return;function o(){q(N.current,{[M.Forwards]:()=>{var i;W(m,A.First)===he.Error&&((i=s.state.afterPanelSentinel.current)==null||i.focus())},[M.Backwards]:()=>{var i;(i=s.state.button)==null||i.focus({preventScroll:!0})}})}o()}),ue=k(()=>{let m=c.current;if(!m)return;function o(){q(N.current,{[M.Forwards]:()=>{var i;if(!s.state.button)return;let O=(i=xe(s.state.button))!=null?i:document.body,T=$e(O),R=T.indexOf(s.state.button),L=T.slice(0,R+1),ce=[...T.slice(R+1),...L];for(let ve of ce.slice())if(ve.dataset.headlessuiFocusGuard==="true"||D!=null&&D.contains(ve)){let Ce=ce.indexOf(ve);Ce!==-1&&ce.splice(Ce,1)}W(ce,A.First,{sorted:!1})},[M.Backwards]:()=>{var i;W(m,A.Previous)===he.Error&&((i=s.state.button)==null||i.focus())}})}o()}),fe=le();return g.createElement(ze,null,g.createElement(de.Provider,{value:v},g.createElement(Te,{value:s.actions.refocusableClose},g.createElement(Ue,{enabled:r?e.static||u:!1,ownerDocument:oe},u&&x&&g.createElement(ye,{id:f,ref:d,features:Pe.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:Z}),fe({ourProps:Q,theirProps:y,slot:j,defaultTag:Tt,features:jt,visible:u,name:"Popover.Panel"}),u&&x&&g.createElement(ye,{id:P,ref:p,features:Pe.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:ue})))))}let Dt="div";function Rt(e,n){let t=l.useRef(null),v=U(t,n),[h,b]=l.useState([]),r=k(d=>{b(p=>{let f=p.indexOf(d);if(f!==-1){let P=p.slice();return P.splice(f,1),P}return p})}),a=k(d=>(b(p=>[...p,d]),()=>r(d))),C=k(()=>{var d;let p=xe(t.current);if(!p)return!1;let f=se(t.current);return(d=t.current)!=null&&d.contains(f)?!0:h.some(P=>{var c,_;return((c=p.getElementById(P.buttonId.current))==null?void 0:c.contains(f))||((_=p.getElementById(P.panelId.current))==null?void 0:_.contains(f))})}),y=k(d=>{for(let p of h)p.buttonId.current!==d&&p.close()}),s=l.useMemo(()=>({registerPopover:a,unregisterPopover:r,isFocusWithinPopoverGroup:C,closeOthers:y}),[a,r,C,y]),x=re({}),S=e,B={ref:v},w=le();return g.createElement(je,null,g.createElement(Se.Provider,{value:s},w({ourProps:B,theirProps:S,slot:x,defaultTag:Dt,name:"Popover.Group"})))}let Mt=ee(Bt),Me=ee(Ft),At=ee(Re),Gt=ee(Re),Ae=ee(Nt),Lt=ee(Rt),Ht=Object.assign(Mt,{Button:Me,Backdrop:Gt,Overlay:At,Panel:Ae,Group:Lt});/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/activity-DBVB1w-E.js b/frontend/dist/assets/activity-BgtT9aiG.js similarity index 89% rename from frontend/dist/assets/activity-DBVB1w-E.js rename to frontend/dist/assets/activity-BgtT9aiG.js index 63563040..463e2f3b 100644 --- a/frontend/dist/assets/activity-DBVB1w-E.js +++ b/frontend/dist/assets/activity-BgtT9aiG.js @@ -1,4 +1,4 @@ -import{d as t}from"./index-CLIbpHvY.js";/** +import{d as t}from"./index-2YU-f7O7.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/antenna-CYx4bVye.js b/frontend/dist/assets/antenna-DGAYnG36.js similarity index 90% rename from frontend/dist/assets/antenna-CYx4bVye.js rename to frontend/dist/assets/antenna-DGAYnG36.js index fd7b19cb..f3f184ef 100644 --- a/frontend/dist/assets/antenna-CYx4bVye.js +++ b/frontend/dist/assets/antenna-DGAYnG36.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-CLIbpHvY.js";/** +import{d as e}from"./index-2YU-f7O7.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/arrow-up-Dw_1quvK.js b/frontend/dist/assets/arrow-up-BCJu40uf.js similarity index 92% rename from frontend/dist/assets/arrow-up-Dw_1quvK.js rename to frontend/dist/assets/arrow-up-BCJu40uf.js index 750b1135..ddb36252 100644 --- a/frontend/dist/assets/arrow-up-Dw_1quvK.js +++ b/frontend/dist/assets/arrow-up-BCJu40uf.js @@ -1,4 +1,4 @@ -import{d as o}from"./index-CLIbpHvY.js";/** +import{d as o}from"./index-2YU-f7O7.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/chat-utils-C0FWA6kK.js b/frontend/dist/assets/chat-utils-zf_UbwVO.js similarity index 94% rename from frontend/dist/assets/chat-utils-C0FWA6kK.js rename to frontend/dist/assets/chat-utils-zf_UbwVO.js index e278c01a..f6ca4bd1 100644 --- a/frontend/dist/assets/chat-utils-C0FWA6kK.js +++ b/frontend/dist/assets/chat-utils-zf_UbwVO.js @@ -1 +1 @@ -import{cW as a,r as l}from"./index-CLIbpHvY.js";const s=[a.green,a.blue,a.amber,a.pink,a.purple,a.cyan,a.orange,a.teal];function m(e){let n=0;for(let t=0;t0){const t=n[0],o=e.replace(i,"").trim();return{emoji:t,cleanName:o||e}}return{emoji:null,cleanName:e}}function f(e){const{cleanName:n}=u(e),t=n.split(/[\s-_]+/).filter(Boolean);if(t.length>=2){const r=Array.from(t[0])[0]||"",c=Array.from(t[1])[0]||"";return(r+c).toUpperCase()}return Array.from(n).slice(0,2).join("").toUpperCase()}function p(e){return new Date(e*1e3).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}function g(e){const n=/@\[([^\]]+)\]/g,t=[];let o=0,r;for(;(r=n.exec(e))!==null;)r.index>o&&t.push(e.slice(o,r.index)),t.push(l.createElement("span",{key:r.index,className:"font-extrabold text-white"},r[1])),o=r.index+r[0].length;return o0?t:e}export{f as a,p as b,u as e,g as f,m as g}; +import{cW as a,r as l}from"./index-2YU-f7O7.js";const s=[a.green,a.blue,a.amber,a.pink,a.purple,a.cyan,a.orange,a.teal];function m(e){let n=0;for(let t=0;t0){const t=n[0],o=e.replace(i,"").trim();return{emoji:t,cleanName:o||e}}return{emoji:null,cleanName:e}}function f(e){const{cleanName:n}=u(e),t=n.split(/[\s-_]+/).filter(Boolean);if(t.length>=2){const r=Array.from(t[0])[0]||"",c=Array.from(t[1])[0]||"";return(r+c).toUpperCase()}return Array.from(n).slice(0,2).join("").toUpperCase()}function p(e){return new Date(e*1e3).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}function g(e){const n=/@\[([^\]]+)\]/g,t=[];let o=0,r;for(;(r=n.exec(e))!==null;)r.index>o&&t.push(e.slice(o,r.index)),t.push(l.createElement("span",{key:r.index,className:"font-extrabold text-white"},r[1])),o=r.index+r[0].length;return o0?t:e}export{f as a,p as b,u as e,g as f,m as g}; diff --git a/frontend/dist/assets/chevron-right-tyotcuUX.js b/frontend/dist/assets/chevron-right-DwaXNeO4.js similarity index 85% rename from frontend/dist/assets/chevron-right-tyotcuUX.js rename to frontend/dist/assets/chevron-right-DwaXNeO4.js index 7d4306a4..885014ab 100644 --- a/frontend/dist/assets/chevron-right-tyotcuUX.js +++ b/frontend/dist/assets/chevron-right-DwaXNeO4.js @@ -1,4 +1,4 @@ -import{d as o}from"./index-CLIbpHvY.js";/** +import{d as o}from"./index-2YU-f7O7.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/circle-check-BA0O7QIB.js b/frontend/dist/assets/circle-check-CMy_4dWl.js similarity index 87% rename from frontend/dist/assets/circle-check-BA0O7QIB.js rename to frontend/dist/assets/circle-check-CMy_4dWl.js index d7c2b644..2e4dc119 100644 --- a/frontend/dist/assets/circle-check-BA0O7QIB.js +++ b/frontend/dist/assets/circle-check-CMy_4dWl.js @@ -1,4 +1,4 @@ -import{d as c}from"./index-CLIbpHvY.js";/** +import{d as c}from"./index-2YU-f7O7.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/circle-question-mark-CW0NICCZ.js b/frontend/dist/assets/circle-question-mark-BpV3PDV1.js similarity index 89% rename from frontend/dist/assets/circle-question-mark-CW0NICCZ.js rename to frontend/dist/assets/circle-question-mark-BpV3PDV1.js index 5fb1a28b..042111d8 100644 --- a/frontend/dist/assets/circle-question-mark-CW0NICCZ.js +++ b/frontend/dist/assets/circle-question-mark-BpV3PDV1.js @@ -1,4 +1,4 @@ -import{d as c}from"./index-CLIbpHvY.js";/** +import{d as c}from"./index-2YU-f7O7.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/consumer-registry-BrRzRPA2.js b/frontend/dist/assets/consumer-registry-BaTbQUiU.js similarity index 92% rename from frontend/dist/assets/consumer-registry-BrRzRPA2.js rename to frontend/dist/assets/consumer-registry-BaTbQUiU.js index 582f970e..983287b2 100644 --- a/frontend/dist/assets/consumer-registry-BrRzRPA2.js +++ b/frontend/dist/assets/consumer-registry-BaTbQUiU.js @@ -1 +1 @@ -import{a7 as n,r as i}from"./index-CLIbpHvY.js";const p=t=>(t.type??t.payload_type)===n.ADVERT,l=t=>(t.type??t.payload_type)===n.TRACE,h=t=>(t.type??t.payload_type)===n.TXT_MSG,_=t=>(t.type??t.payload_type)===n.PATH,d=t=>(t.type??t.payload_type)===n.ACK,g=t=>{const e=t.type??t.payload_type;return e===n.GRP_TXT||e===n.GRP_DATA},m=t=>(t.path_length??(Array.isArray(t.original_path)?t.original_path.length:0))>0,A=t=>!!t.src_hash,T=t=>t.airtime_ms!=null,c=new Set,o=new Map;function a(t,e){return`${t}|${e}`}function u(t,e){const s=a(t,e);o.set(s,(o.get(s)??0)+1)}function y(t,e){const s=a(t,e),r=o.get(s)??0;r>1?o.set(s,r-1):o.delete(s)}function C(t){for(const e of t){const s=a(e.target,e.fn);c.has(s)||c.add(s)}}function P(t){i.useEffect(()=>{for(const e of t)u(e.target,e.fn);return()=>{for(const e of t)y(e.target,e.fn)}},[t])}export{m as a,A as b,h as c,d,p as e,l as f,_ as g,T as h,g as i,C as r,P as u}; +import{a7 as n,r as i}from"./index-2YU-f7O7.js";const p=t=>(t.type??t.payload_type)===n.ADVERT,l=t=>(t.type??t.payload_type)===n.TRACE,h=t=>(t.type??t.payload_type)===n.TXT_MSG,_=t=>(t.type??t.payload_type)===n.PATH,d=t=>(t.type??t.payload_type)===n.ACK,g=t=>{const e=t.type??t.payload_type;return e===n.GRP_TXT||e===n.GRP_DATA},m=t=>(t.path_length??(Array.isArray(t.original_path)?t.original_path.length:0))>0,A=t=>!!t.src_hash,T=t=>t.airtime_ms!=null,c=new Set,o=new Map;function a(t,e){return`${t}|${e}`}function u(t,e){const s=a(t,e);o.set(s,(o.get(s)??0)+1)}function y(t,e){const s=a(t,e),r=o.get(s)??0;r>1?o.set(s,r-1):o.delete(s)}function C(t){for(const e of t){const s=a(e.target,e.fn);c.has(s)||c.add(s)}}function P(t){i.useEffect(()=>{for(const e of t)u(e.target,e.fn);return()=>{for(const e of t)y(e.target,e.fn)}},[t])}export{m as a,A as b,h as c,d,p as e,l as f,_ as g,T as h,g as i,C as r,P as u}; diff --git a/frontend/dist/assets/database-idkjcnGz.js b/frontend/dist/assets/database-1_qMqgVS.js similarity index 89% rename from frontend/dist/assets/database-idkjcnGz.js rename to frontend/dist/assets/database-1_qMqgVS.js index cbe3f07a..d2134855 100644 --- a/frontend/dist/assets/database-idkjcnGz.js +++ b/frontend/dist/assets/database-1_qMqgVS.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-CLIbpHvY.js";/** +import{d as e}from"./index-2YU-f7O7.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/download-DQJBs0xV.js b/frontend/dist/assets/download-Dpt6RSjP.js similarity index 89% rename from frontend/dist/assets/download-DQJBs0xV.js rename to frontend/dist/assets/download-Dpt6RSjP.js index 270c9f9b..548096a3 100644 --- a/frontend/dist/assets/download-DQJBs0xV.js +++ b/frontend/dist/assets/download-Dpt6RSjP.js @@ -1,4 +1,4 @@ -import{d as o}from"./index-CLIbpHvY.js";/** +import{d as o}from"./index-2YU-f7O7.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/easing-jK46ZwcK.js b/frontend/dist/assets/easing-DxQTD0NL.js similarity index 90% rename from frontend/dist/assets/easing-jK46ZwcK.js rename to frontend/dist/assets/easing-DxQTD0NL.js index 9df0eaa9..66a878b4 100644 --- a/frontend/dist/assets/easing-jK46ZwcK.js +++ b/frontend/dist/assets/easing-DxQTD0NL.js @@ -1,4 +1,4 @@ -import{d as s,fv as a}from"./index-CLIbpHvY.js";/** +import{d as s,fv as a}from"./index-2YU-f7O7.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/element-movement-CTWmC4Se.js b/frontend/dist/assets/element-movement-Bhgekpql.js similarity index 98% rename from frontend/dist/assets/element-movement-CTWmC4Se.js rename to frontend/dist/assets/element-movement-Bhgekpql.js index a25c6a6f..ec1b6a08 100644 --- a/frontend/dist/assets/element-movement-CTWmC4Se.js +++ b/frontend/dist/assets/element-movement-Bhgekpql.js @@ -1 +1 @@ -import{r as o,aj as v,cp as h,e1 as b,e2 as w,cG as x,aX as c,a_ as R}from"./index-CLIbpHvY.js";function y(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function j(e=y){return o.useCallback((t,r)=>{if(typeof e=="string"){let u=e;return(t==null?void 0:t[u])===(r==null?void 0:r[u])}return e(t,r)},[e])}var $=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))($||{});function N(e){let t=o.useRef(null),r=v(l=>{t.current=l.pointerType,!h(l.currentTarget)&&l.pointerType==="mouse"&&l.button===$.Left&&(l.preventDefault(),e(l))}),u=v(l=>{t.current!=="mouse"&&(h(l.currentTarget)||e(l))});return{onPointerDown:r,onClick:u}}var S=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(S||{});const z={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},I=200,k=5;function F(e,{trigger:t,action:r,close:u,select:l}){let n=o.useRef(null),i=o.useRef(null),a=o.useRef(null);b(e&&t!==null,"pointerdown",s=>{w(s==null?void 0:s.target)&&t!=null&&t.contains(s.target)&&(i.current=s.x,a.current=s.y,n.current=s.timeStamp)}),b(e&&t!==null,"pointerup",s=>{var d,f;let p=n.current;if(p===null||(n.current=null,!x(s.target))||Math.abs(s.x-((d=i.current)!=null?d:s.x))I&&(l(g.target),u());break}case 2:{u();break}}},{capture:!0})}function m(e){return[e.screenX,e.screenY]}function P(){let e=o.useRef([-1,-1]);return{wasMoved(t){let r=m(t);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(t){e.current=m(t)}}}function L({children:e,freeze:t},r){let u=E(t,e);return o.isValidElement(u)?o.cloneElement(u,{ref:r}):c.createElement(c.Fragment,null,u)}const X=c.forwardRef(L);function E(e,t){let[r,u]=o.useState(t);return!e&&r!==t&&u(t),e?r:t}function T(e){throw new Error("Unexpected object: "+e)}var C=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(C||{});function A(e,t){let r=t.resolveItems();if(r.length<=0)return null;let u=t.resolveActiveIndex(),l=u??-1;switch(e.focus){case 0:{for(let n=0;n=0;--n)if(!t.resolveDisabled(r[n],n,r))return n;return u}case 2:{for(let n=l+1;n=0;--n)if(!t.resolveDisabled(r[n],n,r))return n;return u}case 4:{for(let n=0;n({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function D(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function G(e,t,r){let u=R();if(t.kind==="Tracked"){let l=function(){n!==D(e)&&(u.dispose(),r())},{position:n}=t,i=new ResizeObserver(l);i.observe(e),u.add(()=>i.disconnect()),u.addEventListener(window,"scroll",l,{passive:!0}),u.addEventListener(window,"resize",l)}return()=>u.dispose()}export{F as L,z as S,B as a,D as b,C as c,X as d,P as e,A as f,$ as g,j as h,G as p,N as s,E as u}; +import{r as o,aj as v,cp as h,e1 as b,e2 as w,cG as x,aX as c,a_ as R}from"./index-2YU-f7O7.js";function y(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function j(e=y){return o.useCallback((t,r)=>{if(typeof e=="string"){let u=e;return(t==null?void 0:t[u])===(r==null?void 0:r[u])}return e(t,r)},[e])}var $=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))($||{});function N(e){let t=o.useRef(null),r=v(l=>{t.current=l.pointerType,!h(l.currentTarget)&&l.pointerType==="mouse"&&l.button===$.Left&&(l.preventDefault(),e(l))}),u=v(l=>{t.current!=="mouse"&&(h(l.currentTarget)||e(l))});return{onPointerDown:r,onClick:u}}var S=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(S||{});const z={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},I=200,k=5;function F(e,{trigger:t,action:r,close:u,select:l}){let n=o.useRef(null),i=o.useRef(null),a=o.useRef(null);b(e&&t!==null,"pointerdown",s=>{w(s==null?void 0:s.target)&&t!=null&&t.contains(s.target)&&(i.current=s.x,a.current=s.y,n.current=s.timeStamp)}),b(e&&t!==null,"pointerup",s=>{var d,f;let p=n.current;if(p===null||(n.current=null,!x(s.target))||Math.abs(s.x-((d=i.current)!=null?d:s.x))I&&(l(g.target),u());break}case 2:{u();break}}},{capture:!0})}function m(e){return[e.screenX,e.screenY]}function P(){let e=o.useRef([-1,-1]);return{wasMoved(t){let r=m(t);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(t){e.current=m(t)}}}function L({children:e,freeze:t},r){let u=E(t,e);return o.isValidElement(u)?o.cloneElement(u,{ref:r}):c.createElement(c.Fragment,null,u)}const X=c.forwardRef(L);function E(e,t){let[r,u]=o.useState(t);return!e&&r!==t&&u(t),e?r:t}function T(e){throw new Error("Unexpected object: "+e)}var C=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(C||{});function A(e,t){let r=t.resolveItems();if(r.length<=0)return null;let u=t.resolveActiveIndex(),l=u??-1;switch(e.focus){case 0:{for(let n=0;n=0;--n)if(!t.resolveDisabled(r[n],n,r))return n;return u}case 2:{for(let n=l+1;n=0;--n)if(!t.resolveDisabled(r[n],n,r))return n;return u}case 4:{for(let n=0;n({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function D(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function G(e,t,r){let u=R();if(t.kind==="Tracked"){let l=function(){n!==D(e)&&(u.dispose(),r())},{position:n}=t,i=new ResizeObserver(l);i.observe(e),u.add(()=>i.disconnect()),u.addEventListener(window,"scroll",l,{passive:!0}),u.addEventListener(window,"resize",l)}return()=>u.dispose()}export{F as L,z as S,B as a,D as b,C as c,X as d,P as e,A as f,$ as g,j as h,G as p,N as s,E as u}; diff --git a/frontend/dist/assets/funnel-D8VczAEU.js b/frontend/dist/assets/funnel-D7UU9v8s.js similarity index 89% rename from frontend/dist/assets/funnel-D8VczAEU.js rename to frontend/dist/assets/funnel-D7UU9v8s.js index c4f0e4f7..e04462fd 100644 --- a/frontend/dist/assets/funnel-D8VczAEU.js +++ b/frontend/dist/assets/funnel-D7UU9v8s.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-CLIbpHvY.js";/** +import{d as e}from"./index-2YU-f7O7.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/hash-Cd1zCpVV.js b/frontend/dist/assets/hash-DswdBqT-.js similarity index 90% rename from frontend/dist/assets/hash-Cd1zCpVV.js rename to frontend/dist/assets/hash-DswdBqT-.js index eda28582..e452cdd4 100644 --- a/frontend/dist/assets/hash-Cd1zCpVV.js +++ b/frontend/dist/assets/hash-DswdBqT-.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-CLIbpHvY.js";/** +import{d as e}from"./index-2YU-f7O7.js";/** * @license lucide-react v0.559.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/index-CLIbpHvY.js b/frontend/dist/assets/index-2YU-f7O7.js similarity index 67% rename from frontend/dist/assets/index-CLIbpHvY.js rename to frontend/dist/assets/index-2YU-f7O7.js index 348a23a0..4af4adb3 100644 --- a/frontend/dist/assets/index-CLIbpHvY.js +++ b/frontend/dist/assets/index-2YU-f7O7.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Login-BuGn30l0.js","assets/ascii-burst-DN6etEs5.js","assets/Dashboard-Dq25iQxJ.js","assets/PageLayout-9SoN_daN.js","assets/consumer-registry-BrRzRPA2.js","assets/AnimatedNumber-BrwtCO17.js","assets/index-EpCuPFqY.js","assets/node-types-CFhZT1Jq.js","assets/meshcore-tx-constants-DgpFTAmf.js","assets/PacketList-CYo0ntr7.js","assets/primitives-CZFN5gGO.js","assets/payload-decoders-BsVy7I3_.js","assets/badge-colors-BNUqIXCA.js","assets/chat-utils-C0FWA6kK.js","assets/SignalIndicator-BGst_xwg.js","assets/arrow-up-Dw_1quvK.js","assets/chevron-right-tyotcuUX.js","assets/map-pin-oP9EChoI.js","assets/circle-question-mark-CW0NICCZ.js","assets/triangle-alert-BPXHBOYA.js","assets/DataBox-ChuBU2q7.js","assets/layers-DTsYQqst.js","assets/hash-Cd1zCpVV.js","assets/activity-DBVB1w-E.js","assets/circle-check-BA0O7QIB.js","assets/database-idkjcnGz.js","assets/useMapViewStore-CoIRBkXg.js","assets/shield-hk2V-Q9a.js","assets/TimeRangeStepper-r-j5VisG.js","assets/usePipelineStore-7L_PlMjP.js","assets/LightSparkline-YdYUoL-i.js","assets/link-scoring-CJzUavtn.js","assets/NodeInformationCard-BEL_UTIo.js","assets/ChatBubble-DRf3s2tk.js","assets/Grid-Di163a6N.js","assets/Packets-BuMWYQBd.js","assets/element-movement-CTWmC4Se.js","assets/AnalyzerFilterPanel-D5iqpJrB.js","assets/funnel-D8VczAEU.js","assets/monitor-smartphone-B5v3E3uQ.js","assets/search-D-1ih5Lf.js","assets/Contacts-JLJkW45E.js","assets/ping-DgP-6H7e.js","assets/listbox-fatOHbDc.js","assets/CollisionExplorerModal-CrEVRFBy.js","assets/BasemapLayer-B74HwKhL.js","assets/target-5eLsI-iM.js","assets/network-fMhgmV5F.js","assets/ConfirmModal-DeWu6kFs.js","assets/BasemapLayer-B1CfjdFi.css","assets/Statistics-CUr6NoLE.js","assets/easing-jK46ZwcK.js","assets/settings-2-CFr1Guec.js","assets/MeshGraph-C1UuX-FI.js","assets/DeepAnalysisModal-lreaW1Hc.js","assets/download-DQJBs0xV.js","assets/System-CgXq4wrd.js","assets/refresh-cw-D45udn5T.js","assets/Logs--UqLuq-v.js","assets/Terminal-B6s9P9o2.js","assets/system-DM3mfcRt.js","assets/KeycapButton-Bb60ts2O.js","assets/keycap-sfx-ByZp-njj.js","assets/Terminal-6GBZ9nXN.css","assets/Configuration-u6Y-7LJR.js","assets/antenna-CYx4bVye.js","assets/plus-C2Nq-iqX.js","assets/key-round-iBXtesax.js","assets/RoomServer-D62pvIDX.js","assets/wifi-B8_91QkI.js","assets/PacketObservatory-CQnn0Xjt.js","assets/Sessions-DmHtWaLx.js"])))=>i.map(i=>d[i]); -var I6=Object.defineProperty;var O6=(e,t,n)=>t in e?I6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Te=(e,t,n)=>O6(e,typeof t!="symbol"?t+"":t,n);function $6(e,t){for(var n=0;nr[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function z6(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var um={exports:{}},bc={},dm={exports:{}},Ye={};/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Login-ByHhaNVx.js","assets/ascii-burst-DN6etEs5.js","assets/Dashboard-BIy4A1QU.js","assets/PageLayout-tvsYvfyL.js","assets/consumer-registry-BaTbQUiU.js","assets/AnimatedNumber-CKwUUwqJ.js","assets/index-rOrsjUFs.js","assets/node-types--B4HRIdZ.js","assets/meshcore-tx-constants-DgpFTAmf.js","assets/PacketList-BhefpQer.js","assets/primitives-DMQ-qQ8e.js","assets/payload-decoders-BzIXzxqW.js","assets/badge-colors-BNUqIXCA.js","assets/chat-utils-zf_UbwVO.js","assets/SignalIndicator-CZkLIt0w.js","assets/arrow-up-BCJu40uf.js","assets/chevron-right-DwaXNeO4.js","assets/map-pin-DwpgbaSS.js","assets/circle-question-mark-BpV3PDV1.js","assets/triangle-alert-il1la-RI.js","assets/DataBox-D8nJsUbV.js","assets/layers-7MoN93tY.js","assets/hash-DswdBqT-.js","assets/activity-BgtT9aiG.js","assets/circle-check-CMy_4dWl.js","assets/database-1_qMqgVS.js","assets/useMapViewStore-Ce8IV--K.js","assets/shield-Cg8ViVBZ.js","assets/TimeRangeStepper--TSSRhtK.js","assets/usePipelineStore-D-0Ba45c.js","assets/LightSparkline-CV6le7Ch.js","assets/link-scoring-CPozN6Pj.js","assets/NodeInformationCard-xEgWVu4P.js","assets/ChatBubble-B-vyhm2S.js","assets/Grid-BUbHrfD3.js","assets/Packets-CiNJvSgJ.js","assets/element-movement-Bhgekpql.js","assets/AnalyzerFilterPanel-DW8wllyq.js","assets/funnel-D7UU9v8s.js","assets/monitor-smartphone-BbnIneu-.js","assets/search-5bBDdD-8.js","assets/Contacts-ghJ-BFN_.js","assets/ping-6o6GOZ8c.js","assets/listbox-CrjQSTKJ.js","assets/CollisionExplorerModal-CKdqxCu4.js","assets/BasemapLayer-CZ0EXyx3.js","assets/target-IYsU06YN.js","assets/network-BfJPFeB2.js","assets/ConfirmModal-DkHVYuoH.js","assets/BasemapLayer-B1CfjdFi.css","assets/Statistics-NNOrMaKt.js","assets/easing-DxQTD0NL.js","assets/settings-2-BkKCvhPk.js","assets/MeshGraph-BkSbmPk2.js","assets/DeepAnalysisModal-DlQPOGxT.js","assets/download-Dpt6RSjP.js","assets/System-BKSLU2Lj.js","assets/refresh-cw-CWeSjq0l.js","assets/Logs-8gpluICZ.js","assets/Terminal-DuyUTw-y.js","assets/system-z5qSDSFJ.js","assets/KeycapButton-fLM_SIw1.js","assets/keycap-sfx-ByZp-njj.js","assets/Terminal-6GBZ9nXN.css","assets/Configuration-BDDHE_lZ.js","assets/antenna-DGAYnG36.js","assets/plus-Ci6eVmWj.js","assets/key-round-CO4nliLv.js","assets/RoomServer-CdvnTbeG.js","assets/wifi-DFxu_Y_e.js","assets/PacketObservatory-BMTHp2HY.js","assets/Sessions-CKFp1ckr.js"])))=>i.map(i=>d[i]); +var O6=Object.defineProperty;var $6=(e,t,n)=>t in e?O6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Te=(e,t,n)=>$6(e,typeof t!="symbol"?t+"":t,n);function z6(e,t){for(var n=0;nr[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function V6(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var um={exports:{}},bc={},dm={exports:{}},Ye={};/** * @license React * react.production.min.js * @@ -7,7 +7,7 @@ var I6=Object.defineProperty;var O6=(e,t,n)=>t in e?I6(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var lb;function V6(){if(lb)return Ye;lb=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.iterator;function g(_){return _===null||typeof _!="object"?null:(_=m&&_[m]||_["@@iterator"],typeof _=="function"?_:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,w={};function x(_,G,K){this.props=_,this.context=G,this.refs=w,this.updater=K||b}x.prototype.isReactComponent={},x.prototype.setState=function(_,G){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,G,"setState")},x.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function D(){}D.prototype=x.prototype;function S(_,G,K){this.props=_,this.context=G,this.refs=w,this.updater=K||b}var F=S.prototype=new D;F.constructor=S,C(F,x.prototype),F.isPureReactComponent=!0;var P=Array.isArray,M=Object.prototype.hasOwnProperty,L={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function I(_,G,K){var me,de={},be=null,ue=null;if(G!=null)for(me in G.ref!==void 0&&(ue=G.ref),G.key!==void 0&&(be=""+G.key),G)M.call(G,me)&&!O.hasOwnProperty(me)&&(de[me]=G[me]);var ke=arguments.length-2;if(ke===1)de.children=K;else if(1t in e?I6(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ub;function H6(){if(ub)return bc;ub=1;var e=uh(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function l(c,d,f){var h,m={},g=null,b=null;f!==void 0&&(g=""+f),d.key!==void 0&&(g=""+d.key),d.ref!==void 0&&(b=d.ref);for(h in d)r.call(d,h)&&!i.hasOwnProperty(h)&&(m[h]=d[h]);if(c&&c.defaultProps)for(h in d=c.defaultProps,d)m[h]===void 0&&(m[h]=d[h]);return{$$typeof:t,type:c,key:g,ref:b,props:m,_owner:s.current}}return bc.Fragment=n,bc.jsx=l,bc.jsxs=l,bc}var db;function U6(){return db||(db=1,um.exports=H6()),um.exports}var k=U6(),v=uh();const we=z6(v),fb=$6({__proto__:null,default:we},[v]);var Ud={},fm={exports:{}},br={},hm={exports:{}},pm={};/** + */var db;function U6(){if(db)return bc;db=1;var e=uh(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function l(c,d,f){var h,m={},g=null,b=null;f!==void 0&&(g=""+f),d.key!==void 0&&(g=""+d.key),d.ref!==void 0&&(b=d.ref);for(h in d)r.call(d,h)&&!i.hasOwnProperty(h)&&(m[h]=d[h]);if(c&&c.defaultProps)for(h in d=c.defaultProps,d)m[h]===void 0&&(m[h]=d[h]);return{$$typeof:t,type:c,key:g,ref:b,props:m,_owner:s.current}}return bc.Fragment=n,bc.jsx=l,bc.jsxs=l,bc}var fb;function W6(){return fb||(fb=1,um.exports=U6()),um.exports}var k=W6(),v=uh();const we=V6(v),hb=z6({__proto__:null,default:we},[v]);var Ud={},fm={exports:{}},br={},hm={exports:{}},pm={};/** * @license React * scheduler.production.min.js * @@ -23,7 +23,7 @@ var I6=Object.defineProperty;var O6=(e,t,n)=>t in e?I6(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var hb;function W6(){return hb||(hb=1,(function(e){function t(Q,ie){var ne=Q.length;Q.push(ie);e:for(;0>>1,G=Q[_];if(0>>1;_s(de,ne))bes(ue,de)?(Q[_]=ue,Q[be]=ne,_=be):(Q[_]=de,Q[me]=ne,_=me);else if(bes(ue,ne))Q[_]=ue,Q[be]=ne,_=be;else break e}}return ie}function s(Q,ie){var ne=Q.sortIndex-ie.sortIndex;return ne!==0?ne:Q.id-ie.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],h=1,m=null,g=3,b=!1,C=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F(Q){for(var ie=n(f);ie!==null;){if(ie.callback===null)r(f);else if(ie.startTime<=Q)r(f),ie.sortIndex=ie.expirationTime,t(d,ie);else break;ie=n(f)}}function P(Q){if(w=!1,F(Q),!C)if(n(d)!==null)C=!0,ae(M);else{var ie=n(f);ie!==null&&re(P,ie.startTime-Q)}}function M(Q,ie){C=!1,w&&(w=!1,D(I),I=-1),b=!0;var ne=g;try{for(F(ie),m=n(d);m!==null&&(!(m.expirationTime>ie)||Q&&!j());){var _=m.callback;if(typeof _=="function"){m.callback=null,g=m.priorityLevel;var G=_(m.expirationTime<=ie);ie=e.unstable_now(),typeof G=="function"?m.callback=G:m===n(d)&&r(d),F(ie)}else r(d);m=n(d)}if(m!==null)var K=!0;else{var me=n(f);me!==null&&re(P,me.startTime-ie),K=!1}return K}finally{m=null,g=ne,b=!1}}var L=!1,O=null,I=-1,V=5,U=-1;function j(){return!(e.unstable_now()-UQ||125_?(Q.sortIndex=ne,t(f,Q),n(d)===null&&Q===n(f)&&(w?(D(I),I=-1):w=!0,re(P,ne-_))):(Q.sortIndex=G,t(d,Q),C||b||(C=!0,ae(M))),Q},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(Q){var ie=g;return function(){var ne=g;g=ie;try{return Q.apply(this,arguments)}finally{g=ne}}}})(pm)),pm}var pb;function q6(){return pb||(pb=1,hm.exports=W6()),hm.exports}/** + */var pb;function q6(){return pb||(pb=1,(function(e){function t(Q,ie){var ne=Q.length;Q.push(ie);e:for(;0>>1,G=Q[R];if(0>>1;Rs(de,ne))bes(ue,de)?(Q[R]=ue,Q[be]=ne,R=be):(Q[R]=de,Q[me]=ne,R=me);else if(bes(ue,ne))Q[R]=ue,Q[be]=ne,R=be;else break e}}return ie}function s(Q,ie){var ne=Q.sortIndex-ie.sortIndex;return ne!==0?ne:Q.id-ie.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],h=1,m=null,g=3,b=!1,C=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F(Q){for(var ie=n(f);ie!==null;){if(ie.callback===null)r(f);else if(ie.startTime<=Q)r(f),ie.sortIndex=ie.expirationTime,t(d,ie);else break;ie=n(f)}}function P(Q){if(w=!1,F(Q),!C)if(n(d)!==null)C=!0,ae(M);else{var ie=n(f);ie!==null&&re(P,ie.startTime-Q)}}function M(Q,ie){C=!1,w&&(w=!1,D(I),I=-1),b=!0;var ne=g;try{for(F(ie),m=n(d);m!==null&&(!(m.expirationTime>ie)||Q&&!j());){var R=m.callback;if(typeof R=="function"){m.callback=null,g=m.priorityLevel;var G=R(m.expirationTime<=ie);ie=e.unstable_now(),typeof G=="function"?m.callback=G:m===n(d)&&r(d),F(ie)}else r(d);m=n(d)}if(m!==null)var K=!0;else{var me=n(f);me!==null&&re(P,me.startTime-ie),K=!1}return K}finally{m=null,g=ne,b=!1}}var L=!1,O=null,I=-1,V=5,U=-1;function j(){return!(e.unstable_now()-UQ||125R?(Q.sortIndex=ne,t(f,Q),n(d)===null&&Q===n(f)&&(w?(D(I),I=-1):w=!0,re(P,ne-R))):(Q.sortIndex=G,t(d,Q),C||b||(C=!0,ae(M))),Q},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(Q){var ie=g;return function(){var ne=g;g=ie;try{return Q.apply(this,arguments)}finally{g=ne}}}})(pm)),pm}var mb;function G6(){return mb||(mb=1,hm.exports=q6()),hm.exports}/** * @license React * react-dom.production.min.js * @@ -31,14 +31,14 @@ var I6=Object.defineProperty;var O6=(e,t,n)=>t in e?I6(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var mb;function G6(){if(mb)return br;mb=1;var e=uh(),t=q6();function n(o){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+o,u=1;u"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},m={};function g(o){return d.call(m,o)?!0:d.call(h,o)?!1:f.test(o)?m[o]=!0:(h[o]=!0,!1)}function b(o,a,u,p){if(u!==null&&u.type===0)return!1;switch(typeof a){case"function":case"symbol":return!0;case"boolean":return p?!1:u!==null?!u.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function C(o,a,u,p){if(a===null||typeof a>"u"||b(o,a,u,p))return!0;if(p)return!1;if(u!==null)switch(u.type){case 3:return!a;case 4:return a===!1;case 5:return isNaN(a);case 6:return isNaN(a)||1>a}return!1}function w(o,a,u,p,y,E,B){this.acceptsBooleans=a===2||a===3||a===4,this.attributeName=p,this.attributeNamespace=y,this.mustUseProperty=u,this.propertyName=o,this.type=a,this.sanitizeURL=E,this.removeEmptyString=B}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){x[o]=new w(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var a=o[0];x[a]=new w(a,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){x[o]=new w(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){x[o]=new w(o,2,!1,o,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(o){x[o]=new w(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){x[o]=new w(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){x[o]=new w(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){x[o]=new w(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){x[o]=new w(o,5,!1,o.toLowerCase(),null,!1,!1)});var D=/[\-:]([a-z])/g;function S(o){return o[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(o){var a=o.replace(D,S);x[a]=new w(a,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var a=o.replace(D,S);x[a]=new w(a,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var a=o.replace(D,S);x[a]=new w(a,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){x[o]=new w(o,1,!1,o.toLowerCase(),null,!1,!1)}),x.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){x[o]=new w(o,1,!1,o.toLowerCase(),null,!0,!0)});function F(o,a,u,p){var y=x.hasOwnProperty(a)?x[a]:null;(y!==null?y.type!==0:p||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},m={};function g(o){return d.call(m,o)?!0:d.call(h,o)?!1:f.test(o)?m[o]=!0:(h[o]=!0,!1)}function b(o,a,u,p){if(u!==null&&u.type===0)return!1;switch(typeof a){case"function":case"symbol":return!0;case"boolean":return p?!1:u!==null?!u.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function C(o,a,u,p){if(a===null||typeof a>"u"||b(o,a,u,p))return!0;if(p)return!1;if(u!==null)switch(u.type){case 3:return!a;case 4:return a===!1;case 5:return isNaN(a);case 6:return isNaN(a)||1>a}return!1}function w(o,a,u,p,y,E,B){this.acceptsBooleans=a===2||a===3||a===4,this.attributeName=p,this.attributeNamespace=y,this.mustUseProperty=u,this.propertyName=o,this.type=a,this.sanitizeURL=E,this.removeEmptyString=B}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){x[o]=new w(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var a=o[0];x[a]=new w(a,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){x[o]=new w(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){x[o]=new w(o,2,!1,o,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(o){x[o]=new w(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){x[o]=new w(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){x[o]=new w(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){x[o]=new w(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){x[o]=new w(o,5,!1,o.toLowerCase(),null,!1,!1)});var D=/[\-:]([a-z])/g;function S(o){return o[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(o){var a=o.replace(D,S);x[a]=new w(a,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var a=o.replace(D,S);x[a]=new w(a,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var a=o.replace(D,S);x[a]=new w(a,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){x[o]=new w(o,1,!1,o.toLowerCase(),null,!1,!1)}),x.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){x[o]=new w(o,1,!1,o.toLowerCase(),null,!0,!0)});function F(o,a,u,p){var y=x.hasOwnProperty(a)?x[a]:null;(y!==null?y.type!==0:p||!(2z||y[B]!==E[z]){var W=` -`+y[B].replace(" at new "," at ");return o.displayName&&W.includes("")&&(W=W.replace("",o.displayName)),W}while(1<=B&&0<=z);break}}}finally{K=!1,Error.prepareStackTrace=u}return(o=o?o.displayName||o.name:"")?G(o):""}function de(o){switch(o.tag){case 5:return G(o.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return o=me(o.type,!1),o;case 11:return o=me(o.type.render,!1),o;case 1:return o=me(o.type,!0),o;default:return""}}function be(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case O:return"Fragment";case L:return"Portal";case V:return"Profiler";case I:return"StrictMode";case $:return"Suspense";case H:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case j:return(o.displayName||"Context")+".Consumer";case U:return(o._context.displayName||"Context")+".Provider";case X:var a=o.render;return o=o.displayName,o||(o=a.displayName||a.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case oe:return a=o.displayName||null,a!==null?a:be(o.type)||"Memo";case ae:a=o._payload,o=o._init;try{return be(o(a))}catch{}}return null}function ue(o){var a=o.type;switch(o.tag){case 24:return"Cache";case 9:return(a.displayName||"Context")+".Consumer";case 10:return(a._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=a.render,o=o.displayName||o.name||"",a.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return be(a);case 8:return a===I?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a}return null}function ke(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function Pe(o){var a=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function je(o){var a=Pe(o)?"checked":"value",u=Object.getOwnPropertyDescriptor(o.constructor.prototype,a),p=""+o[a];if(!o.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var y=u.get,E=u.set;return Object.defineProperty(o,a,{configurable:!0,get:function(){return y.call(this)},set:function(B){p=""+B,E.call(this,B)}}),Object.defineProperty(o,a,{enumerable:u.enumerable}),{getValue:function(){return p},setValue:function(B){p=""+B},stopTracking:function(){o._valueTracker=null,delete o[a]}}}}function tt(o){o._valueTracker||(o._valueTracker=je(o))}function Lt(o){if(!o)return!1;var a=o._valueTracker;if(!a)return!0;var u=a.getValue(),p="";return o&&(p=Pe(o)?o.checked?"true":"false":o.value),o=p,o!==u?(a.setValue(o),!0):!1}function Ee(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function He(o,a){var u=a.checked;return ne({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??o._wrapperState.initialChecked})}function Xe(o,a){var u=a.defaultValue==null?"":a.defaultValue,p=a.checked!=null?a.checked:a.defaultChecked;u=ke(a.value!=null?a.value:u),o._wrapperState={initialChecked:p,initialValue:u,controlled:a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null}}function Ie(o,a){a=a.checked,a!=null&&F(o,"checked",a,!1)}function et(o,a){Ie(o,a);var u=ke(a.value),p=a.type;if(u!=null)p==="number"?(u===0&&o.value===""||o.value!=u)&&(o.value=""+u):o.value!==""+u&&(o.value=""+u);else if(p==="submit"||p==="reset"){o.removeAttribute("value");return}a.hasOwnProperty("value")?St(o,a.type,u):a.hasOwnProperty("defaultValue")&&St(o,a.type,ke(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(o.defaultChecked=!!a.defaultChecked)}function gt(o,a,u){if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var p=a.type;if(!(p!=="submit"&&p!=="reset"||a.value!==void 0&&a.value!==null))return;a=""+o._wrapperState.initialValue,u||a===o.value||(o.value=a),o.defaultValue=a}u=o.name,u!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,u!==""&&(o.name=u)}function St(o,a,u){(a!=="number"||Ee(o.ownerDocument)!==o)&&(u==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+u&&(o.defaultValue=""+u))}var dt=Array.isArray;function Fn(o,a,u,p){if(o=o.options,a){a={};for(var y=0;y"+a.valueOf().toString()+"",a=lo.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;a.firstChild;)o.appendChild(a.firstChild)}});function Bn(o,a){if(a){var u=o.firstChild;if(u&&u===o.lastChild&&u.nodeType===3){u.nodeValue=a;return}}o.textContent=a}var xr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},$n=["Webkit","ms","Moz","O"];Object.keys(xr).forEach(function(o){$n.forEach(function(a){a=a+o.charAt(0).toUpperCase()+o.substring(1),xr[a]=xr[o]})});function zn(o,a,u){return a==null||typeof a=="boolean"||a===""?"":u||typeof a!="number"||a===0||xr.hasOwnProperty(o)&&xr[o]?(""+a).trim():a+"px"}function kn(o,a){o=o.style;for(var u in a)if(a.hasOwnProperty(u)){var p=u.indexOf("--")===0,y=zn(u,a[u],p);u==="float"&&(u="cssFloat"),p?o.setProperty(u,y):o[u]=y}}var Ar=ne({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ca(o,a){if(a){if(Ar[o]&&(a.children!=null||a.dangerouslySetInnerHTML!=null))throw Error(n(137,o));if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error(n(60));if(typeof a.dangerouslySetInnerHTML!="object"||!("__html"in a.dangerouslySetInnerHTML))throw Error(n(61))}if(a.style!=null&&typeof a.style!="object")throw Error(n(62))}}function Ss(o,a){if(o.indexOf("-")===-1)return typeof a.is=="string";switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Po=null;function co(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Fs=null,un=null,Mo=null;function Il(o){if(o=oc(o)){if(typeof Fs!="function")throw Error(n(280));var a=o.stateNode;a&&(a=sd(a),Fs(o.stateNode,o.type,a))}}function Fu(o){un?Mo?Mo.push(o):Mo=[o]:un=o}function Bu(){if(un){var o=un,a=Mo;if(Mo=un=null,Il(o),a)for(o=0;o>>=0,o===0?32:31-(Vl(o)/Tn|0)|0}var xa=64,Ms=4194304;function Ls(o){switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function bi(o,a){var u=o.pendingLanes;if(u===0)return 0;var p=0,y=o.suspendedLanes,E=o.pingedLanes,B=u&268435455;if(B!==0){var z=B&~y;z!==0?p=Ls(z):(E&=B,E!==0&&(p=Ls(E)))}else B=u&~y,B!==0?p=Ls(B):E!==0&&(p=Ls(E));if(p===0)return 0;if(a!==0&&a!==p&&(a&y)===0&&(y=p&-p,E=a&-a,y>=E||y===16&&(E&4194240)!==0))return a;if((p&4)!==0&&(p|=u&16),a=o.entangledLanes,a!==0)for(o=o.entanglements,a&=p;0u;u++)a.push(o);return a}function Rs(o,a,u){o.pendingLanes|=a,a!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,a=31-Hn(a),o[a]=u}function Wl(o,a){var u=o.pendingLanes&~a;o.pendingLanes=a,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=a,o.mutableReadLanes&=a,o.entangledLanes&=a,a=o.entanglements;var p=o.eventTimes;for(o=o.expirationTimes;0=as),Ju=" ",Bi=!1;function A(o,a){switch(o){case"keyup":return Kt.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function T(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var R=!1;function N(o,a){switch(o){case"compositionend":return T(a);case"keypress":return a.which!==32?null:(Bi=!0,Ju);case"textInput":return o=a.data,o===Ju&&Bi?null:o;default:return null}}function q(o,a){if(R)return o==="compositionend"||!Fi&&A(o,a)?(o=Br(),Fr=Yl=Sr=null,R=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1=a)return{node:u,offset:a-o};o=p}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=hr(u)}}function Mn(o,a){return o&&a?o===a?!0:o&&o.nodeType===3?!1:a&&a.nodeType===3?Mn(o,a.parentNode):"contains"in o?o.contains(a):o.compareDocumentPosition?!!(o.compareDocumentPosition(a)&16):!1:!1}function Gn(){for(var o=window,a=Ee();a instanceof o.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)o=a.contentWindow;else break;a=Ee(o.document)}return a}function Kn(o){var a=o&&o.nodeName&&o.nodeName.toLowerCase();return a&&(a==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||a==="textarea"||o.contentEditable==="true")}function Hr(o){var a=Gn(),u=o.focusedElem,p=o.selectionRange;if(a!==u&&u&&u.ownerDocument&&Mn(u.ownerDocument.documentElement,u)){if(p!==null&&Kn(u)){if(a=p.start,o=p.end,o===void 0&&(o=a),"selectionStart"in u)u.selectionStart=a,u.selectionEnd=Math.min(o,u.value.length);else if(o=(a=u.ownerDocument||document)&&a.defaultView||window,o.getSelection){o=o.getSelection();var y=u.textContent.length,E=Math.min(p.start,y);p=p.end===void 0?E:Math.min(p.end,y),!o.extend&&E>p&&(y=p,p=E,E=y),y=Pr(u,E);var B=Pr(u,p);y&&B&&(o.rangeCount!==1||o.anchorNode!==y.node||o.anchorOffset!==y.offset||o.focusNode!==B.node||o.focusOffset!==B.offset)&&(a=a.createRange(),a.setStart(y.node,y.offset),o.removeAllRanges(),E>p?(o.addRange(a),o.extend(B.node,B.offset)):(a.setEnd(B.node,B.offset),o.addRange(a)))}}for(a=[],o=u;o=o.parentNode;)o.nodeType===1&&a.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u=document.documentMode,sn=null,mo=null,en=null,Ti=!1;function m1(o,a,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Ti||sn==null||sn!==Ee(p)||(p=sn,"selectionStart"in p&&Kn(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),en&&bn(en,p)||(en=p,p=nd(mo,"onSelect"),0_i||(o.current=ip[_i],ip[_i]=null,_i--)}function Ft(o,a){_i++,ip[_i]=o.current,o.current=a}var Ks={},Ln=Gs(Ks),pr=Gs(!1),_a=Ks;function Ni(o,a){var u=o.type.contextTypes;if(!u)return Ks;var p=o.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===a)return p.__reactInternalMemoizedMaskedChildContext;var y={},E;for(E in u)y[E]=a[E];return p&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=a,o.__reactInternalMemoizedMaskedChildContext=y),y}function mr(o){return o=o.childContextTypes,o!=null}function ad(){Pt(pr),Pt(Ln)}function T1(o,a,u){if(Ln.current!==Ks)throw Error(n(168));Ft(Ln,a),Ft(pr,u)}function P1(o,a,u){var p=o.stateNode;if(a=a.childContextTypes,typeof p.getChildContext!="function")return u;p=p.getChildContext();for(var y in p)if(!(y in a))throw Error(n(108,ue(o)||"Unknown",y));return ne({},u,p)}function id(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Ks,_a=Ln.current,Ft(Ln,o),Ft(pr,pr.current),!0}function M1(o,a,u){var p=o.stateNode;if(!p)throw Error(n(169));u?(o=P1(o,a,_a),p.__reactInternalMemoizedMergedChildContext=o,Pt(pr),Pt(Ln),Ft(Ln,o)):Pt(pr),Ft(pr,u)}var ls=null,ld=!1,lp=!1;function L1(o){ls===null?ls=[o]:ls.push(o)}function r6(o){ld=!0,L1(o)}function Ys(){if(!lp&&ls!==null){lp=!0;var o=0,a=nt;try{var u=ls;for(nt=1;o>=B,y-=B,cs=1<<32-Hn(a)+y|u<We?(En=ze,ze=null):En=ze.sibling;var it=fe(J,ze,te[We],ve);if(it===null){ze===null&&(ze=En);break}o&&ze&&it.alternate===null&&a(J,ze),Y=E(it,Y,We),$e===null?Ne=it:$e.sibling=it,$e=it,ze=En}if(We===te.length)return u(J,ze),Nt&&ja(J,We),Ne;if(ze===null){for(;WeWe?(En=ze,ze=null):En=ze.sibling;var oa=fe(J,ze,it.value,ve);if(oa===null){ze===null&&(ze=En);break}o&&ze&&oa.alternate===null&&a(J,ze),Y=E(oa,Y,We),$e===null?Ne=oa:$e.sibling=oa,$e=oa,ze=En}if(it.done)return u(J,ze),Nt&&ja(J,We),Ne;if(ze===null){for(;!it.done;We++,it=te.next())it=ge(J,it.value,ve),it!==null&&(Y=E(it,Y,We),$e===null?Ne=it:$e.sibling=it,$e=it);return Nt&&ja(J,We),Ne}for(ze=p(J,ze);!it.done;We++,it=te.next())it=Se(ze,J,We,it.value,ve),it!==null&&(o&&it.alternate!==null&&ze.delete(it.key===null?We:it.key),Y=E(it,Y,We),$e===null?Ne=it:$e.sibling=it,$e=it);return o&&ze.forEach(function(j6){return a(J,j6)}),Nt&&ja(J,We),Ne}function tn(J,Y,te,ve){if(typeof te=="object"&&te!==null&&te.type===O&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case M:e:{for(var Ne=te.key,$e=Y;$e!==null;){if($e.key===Ne){if(Ne=te.type,Ne===O){if($e.tag===7){u(J,$e.sibling),Y=y($e,te.props.children),Y.return=J,J=Y;break e}}else if($e.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===ae&&O1(Ne)===$e.type){u(J,$e.sibling),Y=y($e,te.props),Y.ref=sc(J,$e,te),Y.return=J,J=Y;break e}u(J,$e);break}else a(J,$e);$e=$e.sibling}te.type===O?(Y=Wa(te.props.children,J.mode,ve,te.key),Y.return=J,J=Y):(ve=Nd(te.type,te.key,te.props,null,J.mode,ve),ve.ref=sc(J,Y,te),ve.return=J,J=ve)}return B(J);case L:e:{for($e=te.key;Y!==null;){if(Y.key===$e)if(Y.tag===4&&Y.stateNode.containerInfo===te.containerInfo&&Y.stateNode.implementation===te.implementation){u(J,Y.sibling),Y=y(Y,te.children||[]),Y.return=J,J=Y;break e}else{u(J,Y);break}else a(J,Y);Y=Y.sibling}Y=sm(te,J.mode,ve),Y.return=J,J=Y}return B(J);case ae:return $e=te._init,tn(J,Y,$e(te._payload),ve)}if(dt(te))return Me(J,Y,te,ve);if(ie(te))return Re(J,Y,te,ve);fd(J,te)}return typeof te=="string"&&te!==""||typeof te=="number"?(te=""+te,Y!==null&&Y.tag===6?(u(J,Y.sibling),Y=y(Y,te),Y.return=J,J=Y):(u(J,Y),Y=om(te,J.mode,ve),Y.return=J,J=Y),B(J)):u(J,Y)}return tn}var $i=$1(!0),z1=$1(!1),hd=Gs(null),pd=null,zi=null,pp=null;function mp(){pp=zi=pd=null}function gp(o){var a=hd.current;Pt(hd),o._currentValue=a}function yp(o,a,u){for(;o!==null;){var p=o.alternate;if((o.childLanes&a)!==a?(o.childLanes|=a,p!==null&&(p.childLanes|=a)):p!==null&&(p.childLanes&a)!==a&&(p.childLanes|=a),o===u)break;o=o.return}}function Vi(o,a){pd=o,pp=zi=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&a)!==0&&(gr=!0),o.firstContext=null)}function qr(o){var a=o._currentValue;if(pp!==o)if(o={context:o,memoizedValue:a,next:null},zi===null){if(pd===null)throw Error(n(308));zi=o,pd.dependencies={lanes:0,firstContext:o}}else zi=zi.next=o;return a}var Ia=null;function vp(o){Ia===null?Ia=[o]:Ia.push(o)}function V1(o,a,u,p){var y=a.interleaved;return y===null?(u.next=u,vp(a)):(u.next=y.next,y.next=u),a.interleaved=u,ds(o,p)}function ds(o,a){o.lanes|=a;var u=o.alternate;for(u!==null&&(u.lanes|=a),u=o,o=o.return;o!==null;)o.childLanes|=a,u=o.alternate,u!==null&&(u.childLanes|=a),u=o,o=o.return;return u.tag===3?u.stateNode:null}var Xs=!1;function bp(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function H1(o,a){o=o.updateQueue,a.updateQueue===o&&(a.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function fs(o,a){return{eventTime:o,lane:a,tag:0,payload:null,callback:null,next:null}}function Qs(o,a,u){var p=o.updateQueue;if(p===null)return null;if(p=p.shared,(ot&2)!==0){var y=p.pending;return y===null?a.next=a:(a.next=y.next,y.next=a),p.pending=a,ds(o,u)}return y=p.interleaved,y===null?(a.next=a,vp(p)):(a.next=y.next,y.next=a),p.interleaved=a,ds(o,u)}function md(o,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194240)!==0)){var p=a.lanes;p&=o.pendingLanes,u|=p,a.lanes=u,_s(o,u)}}function U1(o,a){var u=o.updateQueue,p=o.alternate;if(p!==null&&(p=p.updateQueue,u===p)){var y=null,E=null;if(u=u.firstBaseUpdate,u!==null){do{var B={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};E===null?y=E=B:E=E.next=B,u=u.next}while(u!==null);E===null?y=E=a:E=E.next=a}else y=E=a;u={baseState:p.baseState,firstBaseUpdate:y,lastBaseUpdate:E,shared:p.shared,effects:p.effects},o.updateQueue=u;return}o=u.lastBaseUpdate,o===null?u.firstBaseUpdate=a:o.next=a,u.lastBaseUpdate=a}function gd(o,a,u,p){var y=o.updateQueue;Xs=!1;var E=y.firstBaseUpdate,B=y.lastBaseUpdate,z=y.shared.pending;if(z!==null){y.shared.pending=null;var W=z,se=W.next;W.next=null,B===null?E=se:B.next=se,B=W;var pe=o.alternate;pe!==null&&(pe=pe.updateQueue,z=pe.lastBaseUpdate,z!==B&&(z===null?pe.firstBaseUpdate=se:z.next=se,pe.lastBaseUpdate=W))}if(E!==null){var ge=y.baseState;B=0,pe=se=W=null,z=E;do{var fe=z.lane,Se=z.eventTime;if((p&fe)===fe){pe!==null&&(pe=pe.next={eventTime:Se,lane:0,tag:z.tag,payload:z.payload,callback:z.callback,next:null});e:{var Me=o,Re=z;switch(fe=a,Se=u,Re.tag){case 1:if(Me=Re.payload,typeof Me=="function"){ge=Me.call(Se,ge,fe);break e}ge=Me;break e;case 3:Me.flags=Me.flags&-65537|128;case 0:if(Me=Re.payload,fe=typeof Me=="function"?Me.call(Se,ge,fe):Me,fe==null)break e;ge=ne({},ge,fe);break e;case 2:Xs=!0}}z.callback!==null&&z.lane!==0&&(o.flags|=64,fe=y.effects,fe===null?y.effects=[z]:fe.push(z))}else Se={eventTime:Se,lane:fe,tag:z.tag,payload:z.payload,callback:z.callback,next:null},pe===null?(se=pe=Se,W=ge):pe=pe.next=Se,B|=fe;if(z=z.next,z===null){if(z=y.shared.pending,z===null)break;fe=z,z=fe.next,fe.next=null,y.lastBaseUpdate=fe,y.shared.pending=null}}while(!0);if(pe===null&&(W=ge),y.baseState=W,y.firstBaseUpdate=se,y.lastBaseUpdate=pe,a=y.shared.interleaved,a!==null){y=a;do B|=y.lane,y=y.next;while(y!==a)}else E===null&&(y.shared.lanes=0);za|=B,o.lanes=B,o.memoizedState=ge}}function W1(o,a,u){if(o=a.effects,a.effects=null,o!==null)for(a=0;au?u:4,o(!0);var p=xp.transition;xp.transition={};try{o(!1),a()}finally{nt=u,xp.transition=p}}function uv(){return Gr().memoizedState}function i6(o,a,u){var p=ta(o);if(u={lane:p,action:u,hasEagerState:!1,eagerState:null,next:null},dv(o))fv(a,u);else if(u=V1(o,a,u,p),u!==null){var y=Xn();wo(u,o,p,y),hv(u,a,p)}}function l6(o,a,u){var p=ta(o),y={lane:p,action:u,hasEagerState:!1,eagerState:null,next:null};if(dv(o))fv(a,y);else{var E=o.alternate;if(o.lanes===0&&(E===null||E.lanes===0)&&(E=a.lastRenderedReducer,E!==null))try{var B=a.lastRenderedState,z=E(B,u);if(y.hasEagerState=!0,y.eagerState=z,xt(z,B)){var W=a.interleaved;W===null?(y.next=y,vp(a)):(y.next=W.next,W.next=y),a.interleaved=y;return}}catch{}finally{}u=V1(o,a,y,p),u!==null&&(y=Xn(),wo(u,o,p,y),hv(u,a,p))}}function dv(o){var a=o.alternate;return o===Vt||a!==null&&a===Vt}function fv(o,a){cc=bd=!0;var u=o.pending;u===null?a.next=a:(a.next=u.next,u.next=a),o.pending=a}function hv(o,a,u){if((u&4194240)!==0){var p=a.lanes;p&=o.pendingLanes,u|=p,a.lanes=u,_s(o,u)}}var Ed={readContext:qr,useCallback:Rn,useContext:Rn,useEffect:Rn,useImperativeHandle:Rn,useInsertionEffect:Rn,useLayoutEffect:Rn,useMemo:Rn,useReducer:Rn,useRef:Rn,useState:Rn,useDebugValue:Rn,useDeferredValue:Rn,useTransition:Rn,useMutableSource:Rn,useSyncExternalStore:Rn,useId:Rn,unstable_isNewReconciler:!1},c6={readContext:qr,useCallback:function(o,a){return Oo().memoizedState=[o,a===void 0?null:a],o},useContext:qr,useEffect:nv,useImperativeHandle:function(o,a,u){return u=u!=null?u.concat([o]):null,wd(4194308,4,sv.bind(null,a,o),u)},useLayoutEffect:function(o,a){return wd(4194308,4,o,a)},useInsertionEffect:function(o,a){return wd(4,2,o,a)},useMemo:function(o,a){var u=Oo();return a=a===void 0?null:a,o=o(),u.memoizedState=[o,a],o},useReducer:function(o,a,u){var p=Oo();return a=u!==void 0?u(a):a,p.memoizedState=p.baseState=a,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:a},p.queue=o,o=o.dispatch=i6.bind(null,Vt,o),[p.memoizedState,o]},useRef:function(o){var a=Oo();return o={current:o},a.memoizedState=o},useState:ev,useDebugValue:Pp,useDeferredValue:function(o){return Oo().memoizedState=o},useTransition:function(){var o=ev(!1),a=o[0];return o=a6.bind(null,o[1]),Oo().memoizedState=o,[a,o]},useMutableSource:function(){},useSyncExternalStore:function(o,a,u){var p=Vt,y=Oo();if(Nt){if(u===void 0)throw Error(n(407));u=u()}else{if(u=a(),Cn===null)throw Error(n(349));($a&30)!==0||Y1(p,a,u)}y.memoizedState=u;var E={value:u,getSnapshot:a};return y.queue=E,nv(Q1.bind(null,p,E,o),[o]),p.flags|=2048,fc(9,X1.bind(null,p,E,u,a),void 0,null),u},useId:function(){var o=Oo(),a=Cn.identifierPrefix;if(Nt){var u=us,p=cs;u=(p&~(1<<32-Hn(p)-1)).toString(32)+u,a=":"+a+"R"+u,u=uc++,0")&&(W=W.replace("",o.displayName)),W}while(1<=B&&0<=z);break}}}finally{K=!1,Error.prepareStackTrace=u}return(o=o?o.displayName||o.name:"")?G(o):""}function de(o){switch(o.tag){case 5:return G(o.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return o=me(o.type,!1),o;case 11:return o=me(o.type.render,!1),o;case 1:return o=me(o.type,!0),o;default:return""}}function be(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case O:return"Fragment";case L:return"Portal";case V:return"Profiler";case I:return"StrictMode";case $:return"Suspense";case H:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case j:return(o.displayName||"Context")+".Consumer";case U:return(o._context.displayName||"Context")+".Provider";case X:var a=o.render;return o=o.displayName,o||(o=a.displayName||a.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case oe:return a=o.displayName||null,a!==null?a:be(o.type)||"Memo";case ae:a=o._payload,o=o._init;try{return be(o(a))}catch{}}return null}function ue(o){var a=o.type;switch(o.tag){case 24:return"Cache";case 9:return(a.displayName||"Context")+".Consumer";case 10:return(a._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=a.render,o=o.displayName||o.name||"",a.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return be(a);case 8:return a===I?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a}return null}function ke(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function Pe(o){var a=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function je(o){var a=Pe(o)?"checked":"value",u=Object.getOwnPropertyDescriptor(o.constructor.prototype,a),p=""+o[a];if(!o.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var y=u.get,E=u.set;return Object.defineProperty(o,a,{configurable:!0,get:function(){return y.call(this)},set:function(B){p=""+B,E.call(this,B)}}),Object.defineProperty(o,a,{enumerable:u.enumerable}),{getValue:function(){return p},setValue:function(B){p=""+B},stopTracking:function(){o._valueTracker=null,delete o[a]}}}}function tt(o){o._valueTracker||(o._valueTracker=je(o))}function Lt(o){if(!o)return!1;var a=o._valueTracker;if(!a)return!0;var u=a.getValue(),p="";return o&&(p=Pe(o)?o.checked?"true":"false":o.value),o=p,o!==u?(a.setValue(o),!0):!1}function Ee(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function He(o,a){var u=a.checked;return ne({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??o._wrapperState.initialChecked})}function Xe(o,a){var u=a.defaultValue==null?"":a.defaultValue,p=a.checked!=null?a.checked:a.defaultChecked;u=ke(a.value!=null?a.value:u),o._wrapperState={initialChecked:p,initialValue:u,controlled:a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null}}function Ie(o,a){a=a.checked,a!=null&&F(o,"checked",a,!1)}function et(o,a){Ie(o,a);var u=ke(a.value),p=a.type;if(u!=null)p==="number"?(u===0&&o.value===""||o.value!=u)&&(o.value=""+u):o.value!==""+u&&(o.value=""+u);else if(p==="submit"||p==="reset"){o.removeAttribute("value");return}a.hasOwnProperty("value")?St(o,a.type,u):a.hasOwnProperty("defaultValue")&&St(o,a.type,ke(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(o.defaultChecked=!!a.defaultChecked)}function gt(o,a,u){if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var p=a.type;if(!(p!=="submit"&&p!=="reset"||a.value!==void 0&&a.value!==null))return;a=""+o._wrapperState.initialValue,u||a===o.value||(o.value=a),o.defaultValue=a}u=o.name,u!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,u!==""&&(o.name=u)}function St(o,a,u){(a!=="number"||Ee(o.ownerDocument)!==o)&&(u==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+u&&(o.defaultValue=""+u))}var dt=Array.isArray;function Fn(o,a,u,p){if(o=o.options,a){a={};for(var y=0;y"+a.valueOf().toString()+"",a=lo.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;a.firstChild;)o.appendChild(a.firstChild)}});function Bn(o,a){if(a){var u=o.firstChild;if(u&&u===o.lastChild&&u.nodeType===3){u.nodeValue=a;return}}o.textContent=a}var Ar={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},$n=["Webkit","ms","Moz","O"];Object.keys(Ar).forEach(function(o){$n.forEach(function(a){a=a+o.charAt(0).toUpperCase()+o.substring(1),Ar[a]=Ar[o]})});function zn(o,a,u){return a==null||typeof a=="boolean"||a===""?"":u||typeof a!="number"||a===0||Ar.hasOwnProperty(o)&&Ar[o]?(""+a).trim():a+"px"}function kn(o,a){o=o.style;for(var u in a)if(a.hasOwnProperty(u)){var p=u.indexOf("--")===0,y=zn(u,a[u],p);u==="float"&&(u="cssFloat"),p?o.setProperty(u,y):o[u]=y}}var Dr=ne({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ca(o,a){if(a){if(Dr[o]&&(a.children!=null||a.dangerouslySetInnerHTML!=null))throw Error(n(137,o));if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error(n(60));if(typeof a.dangerouslySetInnerHTML!="object"||!("__html"in a.dangerouslySetInnerHTML))throw Error(n(61))}if(a.style!=null&&typeof a.style!="object")throw Error(n(62))}}function Ss(o,a){if(o.indexOf("-")===-1)return typeof a.is=="string";switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Po=null;function co(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Fs=null,un=null,Mo=null;function Il(o){if(o=oc(o)){if(typeof Fs!="function")throw Error(n(280));var a=o.stateNode;a&&(a=sd(a),Fs(o.stateNode,o.type,a))}}function Fu(o){un?Mo?Mo.push(o):Mo=[o]:un=o}function Bu(){if(un){var o=un,a=Mo;if(Mo=un=null,Il(o),a)for(o=0;o>>=0,o===0?32:31-(Vl(o)/Tn|0)|0}var xa=64,Ms=4194304;function Ls(o){switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function bi(o,a){var u=o.pendingLanes;if(u===0)return 0;var p=0,y=o.suspendedLanes,E=o.pingedLanes,B=u&268435455;if(B!==0){var z=B&~y;z!==0?p=Ls(z):(E&=B,E!==0&&(p=Ls(E)))}else B=u&~y,B!==0?p=Ls(B):E!==0&&(p=Ls(E));if(p===0)return 0;if(a!==0&&a!==p&&(a&y)===0&&(y=p&-p,E=a&-a,y>=E||y===16&&(E&4194240)!==0))return a;if((p&4)!==0&&(p|=u&16),a=o.entangledLanes,a!==0)for(o=o.entanglements,a&=p;0u;u++)a.push(o);return a}function _s(o,a,u){o.pendingLanes|=a,a!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,a=31-Hn(a),o[a]=u}function Wl(o,a){var u=o.pendingLanes&~a;o.pendingLanes=a,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=a,o.mutableReadLanes&=a,o.entangledLanes&=a,a=o.entanglements;var p=o.eventTimes;for(o=o.expirationTimes;0=as),Ju=" ",Bi=!1;function A(o,a){switch(o){case"keyup":return Kt.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function T(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var _=!1;function N(o,a){switch(o){case"compositionend":return T(a);case"keypress":return a.which!==32?null:(Bi=!0,Ju);case"textInput":return o=a.data,o===Ju&&Bi?null:o;default:return null}}function q(o,a){if(_)return o==="compositionend"||!Fi&&A(o,a)?(o=Tr(),Br=Yl=Fr=null,_=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1=a)return{node:u,offset:a-o};o=p}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=hr(u)}}function Mn(o,a){return o&&a?o===a?!0:o&&o.nodeType===3?!1:a&&a.nodeType===3?Mn(o,a.parentNode):"contains"in o?o.contains(a):o.compareDocumentPosition?!!(o.compareDocumentPosition(a)&16):!1:!1}function Gn(){for(var o=window,a=Ee();a instanceof o.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)o=a.contentWindow;else break;a=Ee(o.document)}return a}function Kn(o){var a=o&&o.nodeName&&o.nodeName.toLowerCase();return a&&(a==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||a==="textarea"||o.contentEditable==="true")}function Ur(o){var a=Gn(),u=o.focusedElem,p=o.selectionRange;if(a!==u&&u&&u.ownerDocument&&Mn(u.ownerDocument.documentElement,u)){if(p!==null&&Kn(u)){if(a=p.start,o=p.end,o===void 0&&(o=a),"selectionStart"in u)u.selectionStart=a,u.selectionEnd=Math.min(o,u.value.length);else if(o=(a=u.ownerDocument||document)&&a.defaultView||window,o.getSelection){o=o.getSelection();var y=u.textContent.length,E=Math.min(p.start,y);p=p.end===void 0?E:Math.min(p.end,y),!o.extend&&E>p&&(y=p,p=E,E=y),y=Mr(u,E);var B=Mr(u,p);y&&B&&(o.rangeCount!==1||o.anchorNode!==y.node||o.anchorOffset!==y.offset||o.focusNode!==B.node||o.focusOffset!==B.offset)&&(a=a.createRange(),a.setStart(y.node,y.offset),o.removeAllRanges(),E>p?(o.addRange(a),o.extend(B.node,B.offset)):(a.setEnd(B.node,B.offset),o.addRange(a)))}}for(a=[],o=u;o=o.parentNode;)o.nodeType===1&&a.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u=document.documentMode,sn=null,mo=null,en=null,Ti=!1;function g1(o,a,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Ti||sn==null||sn!==Ee(p)||(p=sn,"selectionStart"in p&&Kn(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),en&&bn(en,p)||(en=p,p=nd(mo,"onSelect"),0Ri||(o.current=ip[Ri],ip[Ri]=null,Ri--)}function Ft(o,a){Ri++,ip[Ri]=o.current,o.current=a}var Ks={},Ln=Gs(Ks),pr=Gs(!1),Ra=Ks;function Ni(o,a){var u=o.type.contextTypes;if(!u)return Ks;var p=o.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===a)return p.__reactInternalMemoizedMaskedChildContext;var y={},E;for(E in u)y[E]=a[E];return p&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=a,o.__reactInternalMemoizedMaskedChildContext=y),y}function mr(o){return o=o.childContextTypes,o!=null}function ad(){Pt(pr),Pt(Ln)}function P1(o,a,u){if(Ln.current!==Ks)throw Error(n(168));Ft(Ln,a),Ft(pr,u)}function M1(o,a,u){var p=o.stateNode;if(a=a.childContextTypes,typeof p.getChildContext!="function")return u;p=p.getChildContext();for(var y in p)if(!(y in a))throw Error(n(108,ue(o)||"Unknown",y));return ne({},u,p)}function id(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Ks,Ra=Ln.current,Ft(Ln,o),Ft(pr,pr.current),!0}function L1(o,a,u){var p=o.stateNode;if(!p)throw Error(n(169));u?(o=M1(o,a,Ra),p.__reactInternalMemoizedMergedChildContext=o,Pt(pr),Pt(Ln),Ft(Ln,o)):Pt(pr),Ft(pr,u)}var ls=null,ld=!1,lp=!1;function _1(o){ls===null?ls=[o]:ls.push(o)}function o6(o){ld=!0,_1(o)}function Ys(){if(!lp&&ls!==null){lp=!0;var o=0,a=nt;try{var u=ls;for(nt=1;o>=B,y-=B,cs=1<<32-Hn(a)+y|u<We?(En=ze,ze=null):En=ze.sibling;var it=fe(J,ze,te[We],ve);if(it===null){ze===null&&(ze=En);break}o&&ze&&it.alternate===null&&a(J,ze),Y=E(it,Y,We),$e===null?Ne=it:$e.sibling=it,$e=it,ze=En}if(We===te.length)return u(J,ze),Nt&&ja(J,We),Ne;if(ze===null){for(;WeWe?(En=ze,ze=null):En=ze.sibling;var oa=fe(J,ze,it.value,ve);if(oa===null){ze===null&&(ze=En);break}o&&ze&&oa.alternate===null&&a(J,ze),Y=E(oa,Y,We),$e===null?Ne=oa:$e.sibling=oa,$e=oa,ze=En}if(it.done)return u(J,ze),Nt&&ja(J,We),Ne;if(ze===null){for(;!it.done;We++,it=te.next())it=ge(J,it.value,ve),it!==null&&(Y=E(it,Y,We),$e===null?Ne=it:$e.sibling=it,$e=it);return Nt&&ja(J,We),Ne}for(ze=p(J,ze);!it.done;We++,it=te.next())it=Se(ze,J,We,it.value,ve),it!==null&&(o&&it.alternate!==null&&ze.delete(it.key===null?We:it.key),Y=E(it,Y,We),$e===null?Ne=it:$e.sibling=it,$e=it);return o&&ze.forEach(function(I6){return a(J,I6)}),Nt&&ja(J,We),Ne}function tn(J,Y,te,ve){if(typeof te=="object"&&te!==null&&te.type===O&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case M:e:{for(var Ne=te.key,$e=Y;$e!==null;){if($e.key===Ne){if(Ne=te.type,Ne===O){if($e.tag===7){u(J,$e.sibling),Y=y($e,te.props.children),Y.return=J,J=Y;break e}}else if($e.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===ae&&$1(Ne)===$e.type){u(J,$e.sibling),Y=y($e,te.props),Y.ref=sc(J,$e,te),Y.return=J,J=Y;break e}u(J,$e);break}else a(J,$e);$e=$e.sibling}te.type===O?(Y=Wa(te.props.children,J.mode,ve,te.key),Y.return=J,J=Y):(ve=Nd(te.type,te.key,te.props,null,J.mode,ve),ve.ref=sc(J,Y,te),ve.return=J,J=ve)}return B(J);case L:e:{for($e=te.key;Y!==null;){if(Y.key===$e)if(Y.tag===4&&Y.stateNode.containerInfo===te.containerInfo&&Y.stateNode.implementation===te.implementation){u(J,Y.sibling),Y=y(Y,te.children||[]),Y.return=J,J=Y;break e}else{u(J,Y);break}else a(J,Y);Y=Y.sibling}Y=sm(te,J.mode,ve),Y.return=J,J=Y}return B(J);case ae:return $e=te._init,tn(J,Y,$e(te._payload),ve)}if(dt(te))return Me(J,Y,te,ve);if(ie(te))return _e(J,Y,te,ve);fd(J,te)}return typeof te=="string"&&te!==""||typeof te=="number"?(te=""+te,Y!==null&&Y.tag===6?(u(J,Y.sibling),Y=y(Y,te),Y.return=J,J=Y):(u(J,Y),Y=om(te,J.mode,ve),Y.return=J,J=Y),B(J)):u(J,Y)}return tn}var $i=z1(!0),V1=z1(!1),hd=Gs(null),pd=null,zi=null,pp=null;function mp(){pp=zi=pd=null}function gp(o){var a=hd.current;Pt(hd),o._currentValue=a}function yp(o,a,u){for(;o!==null;){var p=o.alternate;if((o.childLanes&a)!==a?(o.childLanes|=a,p!==null&&(p.childLanes|=a)):p!==null&&(p.childLanes&a)!==a&&(p.childLanes|=a),o===u)break;o=o.return}}function Vi(o,a){pd=o,pp=zi=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&a)!==0&&(gr=!0),o.firstContext=null)}function Gr(o){var a=o._currentValue;if(pp!==o)if(o={context:o,memoizedValue:a,next:null},zi===null){if(pd===null)throw Error(n(308));zi=o,pd.dependencies={lanes:0,firstContext:o}}else zi=zi.next=o;return a}var Ia=null;function vp(o){Ia===null?Ia=[o]:Ia.push(o)}function H1(o,a,u,p){var y=a.interleaved;return y===null?(u.next=u,vp(a)):(u.next=y.next,y.next=u),a.interleaved=u,ds(o,p)}function ds(o,a){o.lanes|=a;var u=o.alternate;for(u!==null&&(u.lanes|=a),u=o,o=o.return;o!==null;)o.childLanes|=a,u=o.alternate,u!==null&&(u.childLanes|=a),u=o,o=o.return;return u.tag===3?u.stateNode:null}var Xs=!1;function bp(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function U1(o,a){o=o.updateQueue,a.updateQueue===o&&(a.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function fs(o,a){return{eventTime:o,lane:a,tag:0,payload:null,callback:null,next:null}}function Qs(o,a,u){var p=o.updateQueue;if(p===null)return null;if(p=p.shared,(ot&2)!==0){var y=p.pending;return y===null?a.next=a:(a.next=y.next,y.next=a),p.pending=a,ds(o,u)}return y=p.interleaved,y===null?(a.next=a,vp(p)):(a.next=y.next,y.next=a),p.interleaved=a,ds(o,u)}function md(o,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194240)!==0)){var p=a.lanes;p&=o.pendingLanes,u|=p,a.lanes=u,Rs(o,u)}}function W1(o,a){var u=o.updateQueue,p=o.alternate;if(p!==null&&(p=p.updateQueue,u===p)){var y=null,E=null;if(u=u.firstBaseUpdate,u!==null){do{var B={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};E===null?y=E=B:E=E.next=B,u=u.next}while(u!==null);E===null?y=E=a:E=E.next=a}else y=E=a;u={baseState:p.baseState,firstBaseUpdate:y,lastBaseUpdate:E,shared:p.shared,effects:p.effects},o.updateQueue=u;return}o=u.lastBaseUpdate,o===null?u.firstBaseUpdate=a:o.next=a,u.lastBaseUpdate=a}function gd(o,a,u,p){var y=o.updateQueue;Xs=!1;var E=y.firstBaseUpdate,B=y.lastBaseUpdate,z=y.shared.pending;if(z!==null){y.shared.pending=null;var W=z,se=W.next;W.next=null,B===null?E=se:B.next=se,B=W;var pe=o.alternate;pe!==null&&(pe=pe.updateQueue,z=pe.lastBaseUpdate,z!==B&&(z===null?pe.firstBaseUpdate=se:z.next=se,pe.lastBaseUpdate=W))}if(E!==null){var ge=y.baseState;B=0,pe=se=W=null,z=E;do{var fe=z.lane,Se=z.eventTime;if((p&fe)===fe){pe!==null&&(pe=pe.next={eventTime:Se,lane:0,tag:z.tag,payload:z.payload,callback:z.callback,next:null});e:{var Me=o,_e=z;switch(fe=a,Se=u,_e.tag){case 1:if(Me=_e.payload,typeof Me=="function"){ge=Me.call(Se,ge,fe);break e}ge=Me;break e;case 3:Me.flags=Me.flags&-65537|128;case 0:if(Me=_e.payload,fe=typeof Me=="function"?Me.call(Se,ge,fe):Me,fe==null)break e;ge=ne({},ge,fe);break e;case 2:Xs=!0}}z.callback!==null&&z.lane!==0&&(o.flags|=64,fe=y.effects,fe===null?y.effects=[z]:fe.push(z))}else Se={eventTime:Se,lane:fe,tag:z.tag,payload:z.payload,callback:z.callback,next:null},pe===null?(se=pe=Se,W=ge):pe=pe.next=Se,B|=fe;if(z=z.next,z===null){if(z=y.shared.pending,z===null)break;fe=z,z=fe.next,fe.next=null,y.lastBaseUpdate=fe,y.shared.pending=null}}while(!0);if(pe===null&&(W=ge),y.baseState=W,y.firstBaseUpdate=se,y.lastBaseUpdate=pe,a=y.shared.interleaved,a!==null){y=a;do B|=y.lane,y=y.next;while(y!==a)}else E===null&&(y.shared.lanes=0);za|=B,o.lanes=B,o.memoizedState=ge}}function q1(o,a,u){if(o=a.effects,a.effects=null,o!==null)for(a=0;au?u:4,o(!0);var p=xp.transition;xp.transition={};try{o(!1),a()}finally{nt=u,xp.transition=p}}function dv(){return Kr().memoizedState}function l6(o,a,u){var p=ta(o);if(u={lane:p,action:u,hasEagerState:!1,eagerState:null,next:null},fv(o))hv(a,u);else if(u=H1(o,a,u,p),u!==null){var y=Xn();wo(u,o,p,y),pv(u,a,p)}}function c6(o,a,u){var p=ta(o),y={lane:p,action:u,hasEagerState:!1,eagerState:null,next:null};if(fv(o))hv(a,y);else{var E=o.alternate;if(o.lanes===0&&(E===null||E.lanes===0)&&(E=a.lastRenderedReducer,E!==null))try{var B=a.lastRenderedState,z=E(B,u);if(y.hasEagerState=!0,y.eagerState=z,xt(z,B)){var W=a.interleaved;W===null?(y.next=y,vp(a)):(y.next=W.next,W.next=y),a.interleaved=y;return}}catch{}finally{}u=H1(o,a,y,p),u!==null&&(y=Xn(),wo(u,o,p,y),pv(u,a,p))}}function fv(o){var a=o.alternate;return o===Vt||a!==null&&a===Vt}function hv(o,a){cc=bd=!0;var u=o.pending;u===null?a.next=a:(a.next=u.next,u.next=a),o.pending=a}function pv(o,a,u){if((u&4194240)!==0){var p=a.lanes;p&=o.pendingLanes,u|=p,a.lanes=u,Rs(o,u)}}var Ed={readContext:Gr,useCallback:_n,useContext:_n,useEffect:_n,useImperativeHandle:_n,useInsertionEffect:_n,useLayoutEffect:_n,useMemo:_n,useReducer:_n,useRef:_n,useState:_n,useDebugValue:_n,useDeferredValue:_n,useTransition:_n,useMutableSource:_n,useSyncExternalStore:_n,useId:_n,unstable_isNewReconciler:!1},u6={readContext:Gr,useCallback:function(o,a){return Oo().memoizedState=[o,a===void 0?null:a],o},useContext:Gr,useEffect:rv,useImperativeHandle:function(o,a,u){return u=u!=null?u.concat([o]):null,wd(4194308,4,av.bind(null,a,o),u)},useLayoutEffect:function(o,a){return wd(4194308,4,o,a)},useInsertionEffect:function(o,a){return wd(4,2,o,a)},useMemo:function(o,a){var u=Oo();return a=a===void 0?null:a,o=o(),u.memoizedState=[o,a],o},useReducer:function(o,a,u){var p=Oo();return a=u!==void 0?u(a):a,p.memoizedState=p.baseState=a,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:a},p.queue=o,o=o.dispatch=l6.bind(null,Vt,o),[p.memoizedState,o]},useRef:function(o){var a=Oo();return o={current:o},a.memoizedState=o},useState:tv,useDebugValue:Pp,useDeferredValue:function(o){return Oo().memoizedState=o},useTransition:function(){var o=tv(!1),a=o[0];return o=i6.bind(null,o[1]),Oo().memoizedState=o,[a,o]},useMutableSource:function(){},useSyncExternalStore:function(o,a,u){var p=Vt,y=Oo();if(Nt){if(u===void 0)throw Error(n(407));u=u()}else{if(u=a(),Cn===null)throw Error(n(349));($a&30)!==0||X1(p,a,u)}y.memoizedState=u;var E={value:u,getSnapshot:a};return y.queue=E,rv(J1.bind(null,p,E,o),[o]),p.flags|=2048,fc(9,Q1.bind(null,p,E,u,a),void 0,null),u},useId:function(){var o=Oo(),a=Cn.identifierPrefix;if(Nt){var u=us,p=cs;u=(p&~(1<<32-Hn(p)-1)).toString(32)+u,a=":"+a+"R"+u,u=uc++,0<\/script>",o=o.removeChild(o.firstChild)):typeof p.is=="string"?o=B.createElement(u,{is:p.is}):(o=B.createElement(u),u==="select"&&(B=o,p.multiple?B.multiple=!0:p.size&&(B.size=p.size))):o=B.createElementNS(o,u),o[jo]=a,o[rc]=p,Lv(o,a,!1,!1),a.stateNode=o;e:{switch(B=Ss(u,p),u){case"dialog":Tt("cancel",o),Tt("close",o),y=p;break;case"iframe":case"object":case"embed":Tt("load",o),y=p;break;case"video":case"audio":for(y=0;yGi&&(a.flags|=128,p=!0,hc(E,!1),a.lanes=4194304)}else{if(!p)if(o=yd(B),o!==null){if(a.flags|=128,p=!0,u=o.updateQueue,u!==null&&(a.updateQueue=u,a.flags|=4),hc(E,!0),E.tail===null&&E.tailMode==="hidden"&&!B.alternate&&!Nt)return _n(a),null}else 2*kt()-E.renderingStartTime>Gi&&u!==1073741824&&(a.flags|=128,p=!0,hc(E,!1),a.lanes=4194304);E.isBackwards?(B.sibling=a.child,a.child=B):(u=E.last,u!==null?u.sibling=B:a.child=B,E.last=B)}return E.tail!==null?(a=E.tail,E.rendering=a,E.tail=a.sibling,E.renderingStartTime=kt(),a.sibling=null,u=zt.current,Ft(zt,p?u&1|2:u&1),a):(_n(a),null);case 22:case 23:return tm(),p=a.memoizedState!==null,o!==null&&o.memoizedState!==null!==p&&(a.flags|=8192),p&&(a.mode&1)!==0?(Rr&1073741824)!==0&&(_n(a),a.subtreeFlags&6&&(a.flags|=8192)):_n(a),null;case 24:return null;case 25:return null}throw Error(n(156,a.tag))}function y6(o,a){switch(up(a),a.tag){case 1:return mr(a.type)&&ad(),o=a.flags,o&65536?(a.flags=o&-65537|128,a):null;case 3:return Hi(),Pt(pr),Pt(Ln),kp(),o=a.flags,(o&65536)!==0&&(o&128)===0?(a.flags=o&-65537|128,a):null;case 5:return Cp(a),null;case 13:if(Pt(zt),o=a.memoizedState,o!==null&&o.dehydrated!==null){if(a.alternate===null)throw Error(n(340));Oi()}return o=a.flags,o&65536?(a.flags=o&-65537|128,a):null;case 19:return Pt(zt),null;case 4:return Hi(),null;case 10:return gp(a.type._context),null;case 22:case 23:return tm(),null;case 24:return null;default:return null}}var Dd=!1,Nn=!1,v6=typeof WeakSet=="function"?WeakSet:Set,Be=null;function Wi(o,a){var u=o.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(p){Yt(o,a,p)}else u.current=null}function Hp(o,a,u){try{u()}catch(p){Yt(o,a,p)}}var Nv=!1;function b6(o,a){if(tp=vt,o=Gn(),Kn(o)){if("selectionStart"in o)var u={start:o.selectionStart,end:o.selectionEnd};else e:{u=(u=o.ownerDocument)&&u.defaultView||window;var p=u.getSelection&&u.getSelection();if(p&&p.rangeCount!==0){u=p.anchorNode;var y=p.anchorOffset,E=p.focusNode;p=p.focusOffset;try{u.nodeType,E.nodeType}catch{u=null;break e}var B=0,z=-1,W=-1,se=0,pe=0,ge=o,fe=null;t:for(;;){for(var Se;ge!==u||y!==0&&ge.nodeType!==3||(z=B+y),ge!==E||p!==0&&ge.nodeType!==3||(W=B+p),ge.nodeType===3&&(B+=ge.nodeValue.length),(Se=ge.firstChild)!==null;)fe=ge,ge=Se;for(;;){if(ge===o)break t;if(fe===u&&++se===y&&(z=B),fe===E&&++pe===p&&(W=B),(Se=ge.nextSibling)!==null)break;ge=fe,fe=ge.parentNode}ge=Se}u=z===-1||W===-1?null:{start:z,end:W}}else u=null}u=u||{start:0,end:0}}else u=null;for(np={focusedElem:o,selectionRange:u},vt=!1,Be=a;Be!==null;)if(a=Be,o=a.child,(a.subtreeFlags&1028)!==0&&o!==null)o.return=a,Be=o;else for(;Be!==null;){a=Be;try{var Me=a.alternate;if((a.flags&1024)!==0)switch(a.tag){case 0:case 11:case 15:break;case 1:if(Me!==null){var Re=Me.memoizedProps,tn=Me.memoizedState,J=a.stateNode,Y=J.getSnapshotBeforeUpdate(a.elementType===a.type?Re:yo(a.type,Re),tn);J.__reactInternalSnapshotBeforeUpdate=Y}break;case 3:var te=a.stateNode.containerInfo;te.nodeType===1?te.textContent="":te.nodeType===9&&te.documentElement&&te.removeChild(te.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ve){Yt(a,a.return,ve)}if(o=a.sibling,o!==null){o.return=a.return,Be=o;break}Be=a.return}return Me=Nv,Nv=!1,Me}function pc(o,a,u){var p=a.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var y=p=p.next;do{if((y.tag&o)===o){var E=y.destroy;y.destroy=void 0,E!==void 0&&Hp(a,u,E)}y=y.next}while(y!==p)}}function Sd(o,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var u=a=a.next;do{if((u.tag&o)===o){var p=u.create;u.destroy=p()}u=u.next}while(u!==a)}}function Up(o){var a=o.ref;if(a!==null){var u=o.stateNode;switch(o.tag){case 5:o=u;break;default:o=u}typeof a=="function"?a(o):a.current=o}}function jv(o){var a=o.alternate;a!==null&&(o.alternate=null,jv(a)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(a=o.stateNode,a!==null&&(delete a[jo],delete a[rc],delete a[ap],delete a[t6],delete a[n6])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function Iv(o){return o.tag===5||o.tag===3||o.tag===4}function Ov(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||Iv(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Wp(o,a,u){var p=o.tag;if(p===5||p===6)o=o.stateNode,a?u.nodeType===8?u.parentNode.insertBefore(o,a):u.insertBefore(o,a):(u.nodeType===8?(a=u.parentNode,a.insertBefore(o,u)):(a=u,a.appendChild(o)),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=od));else if(p!==4&&(o=o.child,o!==null))for(Wp(o,a,u),o=o.sibling;o!==null;)Wp(o,a,u),o=o.sibling}function qp(o,a,u){var p=o.tag;if(p===5||p===6)o=o.stateNode,a?u.insertBefore(o,a):u.appendChild(o);else if(p!==4&&(o=o.child,o!==null))for(qp(o,a,u),o=o.sibling;o!==null;)qp(o,a,u),o=o.sibling}var An=null,vo=!1;function Js(o,a,u){for(u=u.child;u!==null;)$v(o,a,u),u=u.sibling}function $v(o,a,u){if(ur&&typeof ur.onCommitFiberUnmount=="function")try{ur.onCommitFiberUnmount(Ps,u)}catch{}switch(u.tag){case 5:Nn||Wi(u,a);case 6:var p=An,y=vo;An=null,Js(o,a,u),An=p,vo=y,An!==null&&(vo?(o=An,u=u.stateNode,o.nodeType===8?o.parentNode.removeChild(u):o.removeChild(u)):An.removeChild(u.stateNode));break;case 18:An!==null&&(vo?(o=An,u=u.stateNode,o.nodeType===8?sp(o.parentNode,u):o.nodeType===1&&sp(o,u),Vs(o)):sp(An,u.stateNode));break;case 4:p=An,y=vo,An=u.stateNode.containerInfo,vo=!0,Js(o,a,u),An=p,vo=y;break;case 0:case 11:case 14:case 15:if(!Nn&&(p=u.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){y=p=p.next;do{var E=y,B=E.destroy;E=E.tag,B!==void 0&&((E&2)!==0||(E&4)!==0)&&Hp(u,a,B),y=y.next}while(y!==p)}Js(o,a,u);break;case 1:if(!Nn&&(Wi(u,a),p=u.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=u.memoizedProps,p.state=u.memoizedState,p.componentWillUnmount()}catch(z){Yt(u,a,z)}Js(o,a,u);break;case 21:Js(o,a,u);break;case 22:u.mode&1?(Nn=(p=Nn)||u.memoizedState!==null,Js(o,a,u),Nn=p):Js(o,a,u);break;default:Js(o,a,u)}}function zv(o){var a=o.updateQueue;if(a!==null){o.updateQueue=null;var u=o.stateNode;u===null&&(u=o.stateNode=new v6),a.forEach(function(p){var y=F6.bind(null,o,p);u.has(p)||(u.add(p),p.then(y,y))})}}function bo(o,a){var u=a.deletions;if(u!==null)for(var p=0;py&&(y=B),p&=~E}if(p=y,p=kt()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*C6(p/1960))-p,10o?16:o,ea===null)var p=!1;else{if(o=ea,ea=null,Md=0,(ot&6)!==0)throw Error(n(331));var y=ot;for(ot|=4,Be=o.current;Be!==null;){var E=Be,B=E.child;if((Be.flags&16)!==0){var z=E.deletions;if(z!==null){for(var W=0;Wkt()-Yp?Ha(o,0):Kp|=u),vr(o,a)}function eb(o,a){a===0&&((o.mode&1)===0?a=1:(a=Ms,Ms<<=1,(Ms&130023424)===0&&(Ms=4194304)));var u=Xn();o=ds(o,a),o!==null&&(Rs(o,a,u),vr(o,u))}function S6(o){var a=o.memoizedState,u=0;a!==null&&(u=a.retryLane),eb(o,u)}function F6(o,a){var u=0;switch(o.tag){case 13:var p=o.stateNode,y=o.memoizedState;y!==null&&(u=y.retryLane);break;case 19:p=o.stateNode;break;default:throw Error(n(314))}p!==null&&p.delete(a),eb(o,u)}var tb;tb=function(o,a,u){if(o!==null)if(o.memoizedProps!==a.pendingProps||pr.current)gr=!0;else{if((o.lanes&u)===0&&(a.flags&128)===0)return gr=!1,m6(o,a,u);gr=(o.flags&131072)!==0}else gr=!1,Nt&&(a.flags&1048576)!==0&&R1(a,ud,a.index);switch(a.lanes=0,a.tag){case 2:var p=a.type;Ad(o,a),o=a.pendingProps;var y=Ni(a,Ln.current);Vi(a,u),y=Dp(null,a,p,o,y,u);var E=Sp();return a.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,mr(p)?(E=!0,id(a)):E=!1,a.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,bp(a),y.updater=kd,a.stateNode=y,y._reactInternals=a,Lp(a,p,o,u),a=jp(null,a,p,!0,E,u)):(a.tag=0,Nt&&E&&cp(a),Yn(null,a,y,u),a=a.child),a;case 16:p=a.elementType;e:{switch(Ad(o,a),o=a.pendingProps,y=p._init,p=y(p._payload),a.type=p,y=a.tag=T6(p),o=yo(p,o),y){case 0:a=Np(null,a,p,o,u);break e;case 1:a=Sv(null,a,p,o,u);break e;case 11:a=Ev(null,a,p,o,u);break e;case 14:a=kv(null,a,p,yo(p.type,o),u);break e}throw Error(n(306,p,""))}return a;case 0:return p=a.type,y=a.pendingProps,y=a.elementType===p?y:yo(p,y),Np(o,a,p,y,u);case 1:return p=a.type,y=a.pendingProps,y=a.elementType===p?y:yo(p,y),Sv(o,a,p,y,u);case 3:e:{if(Fv(a),o===null)throw Error(n(387));p=a.pendingProps,E=a.memoizedState,y=E.element,H1(o,a),gd(a,p,null,u);var B=a.memoizedState;if(p=B.element,E.isDehydrated)if(E={element:p,isDehydrated:!1,cache:B.cache,pendingSuspenseBoundaries:B.pendingSuspenseBoundaries,transitions:B.transitions},a.updateQueue.baseState=E,a.memoizedState=E,a.flags&256){y=Ui(Error(n(423)),a),a=Bv(o,a,p,u,y);break e}else if(p!==y){y=Ui(Error(n(424)),a),a=Bv(o,a,p,u,y);break e}else for(Lr=qs(a.stateNode.containerInfo.firstChild),Mr=a,Nt=!0,go=null,u=z1(a,null,p,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Oi(),p===y){a=hs(o,a,u);break e}Yn(o,a,p,u)}a=a.child}return a;case 5:return q1(a),o===null&&fp(a),p=a.type,y=a.pendingProps,E=o!==null?o.memoizedProps:null,B=y.children,rp(p,y)?B=null:E!==null&&rp(p,E)&&(a.flags|=32),Dv(o,a),Yn(o,a,B,u),a.child;case 6:return o===null&&fp(a),null;case 13:return Tv(o,a,u);case 4:return wp(a,a.stateNode.containerInfo),p=a.pendingProps,o===null?a.child=$i(a,null,p,u):Yn(o,a,p,u),a.child;case 11:return p=a.type,y=a.pendingProps,y=a.elementType===p?y:yo(p,y),Ev(o,a,p,y,u);case 7:return Yn(o,a,a.pendingProps,u),a.child;case 8:return Yn(o,a,a.pendingProps.children,u),a.child;case 12:return Yn(o,a,a.pendingProps.children,u),a.child;case 10:e:{if(p=a.type._context,y=a.pendingProps,E=a.memoizedProps,B=y.value,Ft(hd,p._currentValue),p._currentValue=B,E!==null)if(xt(E.value,B)){if(E.children===y.children&&!pr.current){a=hs(o,a,u);break e}}else for(E=a.child,E!==null&&(E.return=a);E!==null;){var z=E.dependencies;if(z!==null){B=E.child;for(var W=z.firstContext;W!==null;){if(W.context===p){if(E.tag===1){W=fs(-1,u&-u),W.tag=2;var se=E.updateQueue;if(se!==null){se=se.shared;var pe=se.pending;pe===null?W.next=W:(W.next=pe.next,pe.next=W),se.pending=W}}E.lanes|=u,W=E.alternate,W!==null&&(W.lanes|=u),yp(E.return,u,a),z.lanes|=u;break}W=W.next}}else if(E.tag===10)B=E.type===a.type?null:E.child;else if(E.tag===18){if(B=E.return,B===null)throw Error(n(341));B.lanes|=u,z=B.alternate,z!==null&&(z.lanes|=u),yp(B,u,a),B=E.sibling}else B=E.child;if(B!==null)B.return=E;else for(B=E;B!==null;){if(B===a){B=null;break}if(E=B.sibling,E!==null){E.return=B.return,B=E;break}B=B.return}E=B}Yn(o,a,y.children,u),a=a.child}return a;case 9:return y=a.type,p=a.pendingProps.children,Vi(a,u),y=qr(y),p=p(y),a.flags|=1,Yn(o,a,p,u),a.child;case 14:return p=a.type,y=yo(p,a.pendingProps),y=yo(p.type,y),kv(o,a,p,y,u);case 15:return xv(o,a,a.type,a.pendingProps,u);case 17:return p=a.type,y=a.pendingProps,y=a.elementType===p?y:yo(p,y),Ad(o,a),a.tag=1,mr(p)?(o=!0,id(a)):o=!1,Vi(a,u),mv(a,p,y),Lp(a,p,y,u),jp(null,a,p,!0,o,u);case 19:return Mv(o,a,u);case 22:return Av(o,a,u)}throw Error(n(156,a.tag))};function nb(o,a){return Jt(o,a)}function B6(o,a,u,p){this.tag=o,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yr(o,a,u,p){return new B6(o,a,u,p)}function rm(o){return o=o.prototype,!(!o||!o.isReactComponent)}function T6(o){if(typeof o=="function")return rm(o)?1:0;if(o!=null){if(o=o.$$typeof,o===X)return 11;if(o===oe)return 14}return 2}function ra(o,a){var u=o.alternate;return u===null?(u=Yr(o.tag,a,o.key,o.mode),u.elementType=o.elementType,u.type=o.type,u.stateNode=o.stateNode,u.alternate=o,o.alternate=u):(u.pendingProps=a,u.type=o.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=o.flags&14680064,u.childLanes=o.childLanes,u.lanes=o.lanes,u.child=o.child,u.memoizedProps=o.memoizedProps,u.memoizedState=o.memoizedState,u.updateQueue=o.updateQueue,a=o.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=o.sibling,u.index=o.index,u.ref=o.ref,u}function Nd(o,a,u,p,y,E){var B=2;if(p=o,typeof o=="function")rm(o)&&(B=1);else if(typeof o=="string")B=5;else e:switch(o){case O:return Wa(u.children,y,E,a);case I:B=8,y|=8;break;case V:return o=Yr(12,u,a,y|2),o.elementType=V,o.lanes=E,o;case $:return o=Yr(13,u,a,y),o.elementType=$,o.lanes=E,o;case H:return o=Yr(19,u,a,y),o.elementType=H,o.lanes=E,o;case re:return jd(u,y,E,a);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case U:B=10;break e;case j:B=9;break e;case X:B=11;break e;case oe:B=14;break e;case ae:B=16,p=null;break e}throw Error(n(130,o==null?o:typeof o,""))}return a=Yr(B,u,a,y),a.elementType=o,a.type=p,a.lanes=E,a}function Wa(o,a,u,p){return o=Yr(7,o,p,a),o.lanes=u,o}function jd(o,a,u,p){return o=Yr(22,o,p,a),o.elementType=re,o.lanes=u,o.stateNode={isHidden:!1},o}function om(o,a,u){return o=Yr(6,o,null,a),o.lanes=u,o}function sm(o,a,u){return a=Yr(4,o.children!==null?o.children:[],o.key,a),a.lanes=u,a.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},a}function P6(o,a,u,p,y){this.tag=a,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ul(0),this.expirationTimes=Ul(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ul(0),this.identifierPrefix=p,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function am(o,a,u,p,y,E,B,z,W){return o=new P6(o,a,u,z,W),a===1?(a=1,E===!0&&(a|=8)):a=0,E=Yr(3,null,null,a),o.current=E,E.stateNode=o,E.memoizedState={element:p,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},bp(E),o}function M6(o,a,u){var p=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),fm.exports=G6(),fm.exports}var yb;function K6(){if(yb)return Ud;yb=1;var e=c5();return Ud.createRoot=e.createRoot,Ud.hydrateRoot=e.hydrateRoot,Ud}var Y6=K6();/** +`+E.stack}return{value:o,source:a,stack:y,digest:null}}function _p(o,a,u){return{value:o,source:null,stack:u??null,digest:a??null}}function Rp(o,a){try{console.error(a.value)}catch(u){setTimeout(function(){throw u})}}var h6=typeof WeakMap=="function"?WeakMap:Map;function vv(o,a,u){u=fs(-1,u),u.tag=3,u.payload={element:null};var p=a.value;return u.callback=function(){Td||(Td=!0,Xp=p),Rp(o,a)},u}function bv(o,a,u){u=fs(-1,u),u.tag=3;var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var y=a.value;u.payload=function(){return p(y)},u.callback=function(){Rp(o,a)}}var E=o.stateNode;return E!==null&&typeof E.componentDidCatch=="function"&&(u.callback=function(){Rp(o,a),typeof p!="function"&&(Zs===null?Zs=new Set([this]):Zs.add(this));var B=a.stack;this.componentDidCatch(a.value,{componentStack:B!==null?B:""})}),u}function wv(o,a,u){var p=o.pingCache;if(p===null){p=o.pingCache=new h6;var y=new Set;p.set(a,y)}else y=p.get(a),y===void 0&&(y=new Set,p.set(a,y));y.has(u)||(y.add(u),o=S6.bind(null,o,a,u),a.then(o,o))}function Cv(o){do{var a;if((a=o.tag===13)&&(a=o.memoizedState,a=a!==null?a.dehydrated!==null:!0),a)return o;o=o.return}while(o!==null);return null}function Ev(o,a,u,p,y){return(o.mode&1)===0?(o===a?o.flags|=65536:(o.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(a=fs(-1,1),a.tag=2,Qs(u,a,1))),u.lanes|=1),o):(o.flags|=65536,o.lanes=y,o)}var p6=P.ReactCurrentOwner,gr=!1;function Yn(o,a,u,p){a.child=o===null?V1(a,null,u,p):$i(a,o.child,u,p)}function kv(o,a,u,p,y){u=u.render;var E=a.ref;return Vi(a,y),p=Dp(o,a,u,p,E,y),u=Sp(),o!==null&&!gr?(a.updateQueue=o.updateQueue,a.flags&=-2053,o.lanes&=~y,hs(o,a,y)):(Nt&&u&&cp(a),a.flags|=1,Yn(o,a,p,y),a.child)}function xv(o,a,u,p,y){if(o===null){var E=u.type;return typeof E=="function"&&!rm(E)&&E.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(a.tag=15,a.type=E,Av(o,a,E,p,y)):(o=Nd(u.type,null,p,a,a.mode,y),o.ref=a.ref,o.return=a,a.child=o)}if(E=o.child,(o.lanes&y)===0){var B=E.memoizedProps;if(u=u.compare,u=u!==null?u:bn,u(B,p)&&o.ref===a.ref)return hs(o,a,y)}return a.flags|=1,o=ra(E,p),o.ref=a.ref,o.return=a,a.child=o}function Av(o,a,u,p,y){if(o!==null){var E=o.memoizedProps;if(bn(E,p)&&o.ref===a.ref)if(gr=!1,a.pendingProps=p=E,(o.lanes&y)!==0)(o.flags&131072)!==0&&(gr=!0);else return a.lanes=o.lanes,hs(o,a,y)}return Np(o,a,u,p,y)}function Dv(o,a,u){var p=a.pendingProps,y=p.children,E=o!==null?o.memoizedState:null;if(p.mode==="hidden")if((a.mode&1)===0)a.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ft(qi,Rr),Rr|=u;else{if((u&1073741824)===0)return o=E!==null?E.baseLanes|u:u,a.lanes=a.childLanes=1073741824,a.memoizedState={baseLanes:o,cachePool:null,transitions:null},a.updateQueue=null,Ft(qi,Rr),Rr|=o,null;a.memoizedState={baseLanes:0,cachePool:null,transitions:null},p=E!==null?E.baseLanes:u,Ft(qi,Rr),Rr|=p}else E!==null?(p=E.baseLanes|u,a.memoizedState=null):p=u,Ft(qi,Rr),Rr|=p;return Yn(o,a,y,u),a.child}function Sv(o,a){var u=a.ref;(o===null&&u!==null||o!==null&&o.ref!==u)&&(a.flags|=512,a.flags|=2097152)}function Np(o,a,u,p,y){var E=mr(u)?Ra:Ln.current;return E=Ni(a,E),Vi(a,y),u=Dp(o,a,u,p,E,y),p=Sp(),o!==null&&!gr?(a.updateQueue=o.updateQueue,a.flags&=-2053,o.lanes&=~y,hs(o,a,y)):(Nt&&p&&cp(a),a.flags|=1,Yn(o,a,u,y),a.child)}function Fv(o,a,u,p,y){if(mr(u)){var E=!0;id(a)}else E=!1;if(Vi(a,y),a.stateNode===null)Ad(o,a),gv(a,u,p),Lp(a,u,p,y),p=!0;else if(o===null){var B=a.stateNode,z=a.memoizedProps;B.props=z;var W=B.context,se=u.contextType;typeof se=="object"&&se!==null?se=Gr(se):(se=mr(u)?Ra:Ln.current,se=Ni(a,se));var pe=u.getDerivedStateFromProps,ge=typeof pe=="function"||typeof B.getSnapshotBeforeUpdate=="function";ge||typeof B.UNSAFE_componentWillReceiveProps!="function"&&typeof B.componentWillReceiveProps!="function"||(z!==p||W!==se)&&yv(a,B,p,se),Xs=!1;var fe=a.memoizedState;B.state=fe,gd(a,p,B,y),W=a.memoizedState,z!==p||fe!==W||pr.current||Xs?(typeof pe=="function"&&(Mp(a,u,pe,p),W=a.memoizedState),(z=Xs||mv(a,u,z,p,fe,W,se))?(ge||typeof B.UNSAFE_componentWillMount!="function"&&typeof B.componentWillMount!="function"||(typeof B.componentWillMount=="function"&&B.componentWillMount(),typeof B.UNSAFE_componentWillMount=="function"&&B.UNSAFE_componentWillMount()),typeof B.componentDidMount=="function"&&(a.flags|=4194308)):(typeof B.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=p,a.memoizedState=W),B.props=p,B.state=W,B.context=se,p=z):(typeof B.componentDidMount=="function"&&(a.flags|=4194308),p=!1)}else{B=a.stateNode,U1(o,a),z=a.memoizedProps,se=a.type===a.elementType?z:yo(a.type,z),B.props=se,ge=a.pendingProps,fe=B.context,W=u.contextType,typeof W=="object"&&W!==null?W=Gr(W):(W=mr(u)?Ra:Ln.current,W=Ni(a,W));var Se=u.getDerivedStateFromProps;(pe=typeof Se=="function"||typeof B.getSnapshotBeforeUpdate=="function")||typeof B.UNSAFE_componentWillReceiveProps!="function"&&typeof B.componentWillReceiveProps!="function"||(z!==ge||fe!==W)&&yv(a,B,p,W),Xs=!1,fe=a.memoizedState,B.state=fe,gd(a,p,B,y);var Me=a.memoizedState;z!==ge||fe!==Me||pr.current||Xs?(typeof Se=="function"&&(Mp(a,u,Se,p),Me=a.memoizedState),(se=Xs||mv(a,u,se,p,fe,Me,W)||!1)?(pe||typeof B.UNSAFE_componentWillUpdate!="function"&&typeof B.componentWillUpdate!="function"||(typeof B.componentWillUpdate=="function"&&B.componentWillUpdate(p,Me,W),typeof B.UNSAFE_componentWillUpdate=="function"&&B.UNSAFE_componentWillUpdate(p,Me,W)),typeof B.componentDidUpdate=="function"&&(a.flags|=4),typeof B.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof B.componentDidUpdate!="function"||z===o.memoizedProps&&fe===o.memoizedState||(a.flags|=4),typeof B.getSnapshotBeforeUpdate!="function"||z===o.memoizedProps&&fe===o.memoizedState||(a.flags|=1024),a.memoizedProps=p,a.memoizedState=Me),B.props=p,B.state=Me,B.context=W,p=se):(typeof B.componentDidUpdate!="function"||z===o.memoizedProps&&fe===o.memoizedState||(a.flags|=4),typeof B.getSnapshotBeforeUpdate!="function"||z===o.memoizedProps&&fe===o.memoizedState||(a.flags|=1024),p=!1)}return jp(o,a,u,p,E,y)}function jp(o,a,u,p,y,E){Sv(o,a);var B=(a.flags&128)!==0;if(!p&&!B)return y&&L1(a,u,!1),hs(o,a,E);p=a.stateNode,p6.current=a;var z=B&&typeof u.getDerivedStateFromError!="function"?null:p.render();return a.flags|=1,o!==null&&B?(a.child=$i(a,o.child,null,E),a.child=$i(a,null,z,E)):Yn(o,a,z,E),a.memoizedState=p.state,y&&L1(a,u,!0),a.child}function Bv(o){var a=o.stateNode;a.pendingContext?P1(o,a.pendingContext,a.pendingContext!==a.context):a.context&&P1(o,a.context,!1),wp(o,a.containerInfo)}function Tv(o,a,u,p,y){return Oi(),hp(y),a.flags|=256,Yn(o,a,u,p),a.child}var Ip={dehydrated:null,treeContext:null,retryLane:0};function Op(o){return{baseLanes:o,cachePool:null,transitions:null}}function Pv(o,a,u){var p=a.pendingProps,y=zt.current,E=!1,B=(a.flags&128)!==0,z;if((z=B)||(z=o!==null&&o.memoizedState===null?!1:(y&2)!==0),z?(E=!0,a.flags&=-129):(o===null||o.memoizedState!==null)&&(y|=1),Ft(zt,y&1),o===null)return fp(a),o=a.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((a.mode&1)===0?a.lanes=1:o.data==="$!"?a.lanes=8:a.lanes=1073741824,null):(B=p.children,o=p.fallback,E?(p=a.mode,E=a.child,B={mode:"hidden",children:B},(p&1)===0&&E!==null?(E.childLanes=0,E.pendingProps=B):E=jd(B,p,0,null),o=Wa(o,p,u,null),E.return=a,o.return=a,E.sibling=o,a.child=E,a.child.memoizedState=Op(u),a.memoizedState=Ip,o):$p(a,B));if(y=o.memoizedState,y!==null&&(z=y.dehydrated,z!==null))return m6(o,a,B,p,z,y,u);if(E){E=p.fallback,B=a.mode,y=o.child,z=y.sibling;var W={mode:"hidden",children:p.children};return(B&1)===0&&a.child!==y?(p=a.child,p.childLanes=0,p.pendingProps=W,a.deletions=null):(p=ra(y,W),p.subtreeFlags=y.subtreeFlags&14680064),z!==null?E=ra(z,E):(E=Wa(E,B,u,null),E.flags|=2),E.return=a,p.return=a,p.sibling=E,a.child=p,p=E,E=a.child,B=o.child.memoizedState,B=B===null?Op(u):{baseLanes:B.baseLanes|u,cachePool:null,transitions:B.transitions},E.memoizedState=B,E.childLanes=o.childLanes&~u,a.memoizedState=Ip,p}return E=o.child,o=E.sibling,p=ra(E,{mode:"visible",children:p.children}),(a.mode&1)===0&&(p.lanes=u),p.return=a,p.sibling=null,o!==null&&(u=a.deletions,u===null?(a.deletions=[o],a.flags|=16):u.push(o)),a.child=p,a.memoizedState=null,p}function $p(o,a){return a=jd({mode:"visible",children:a},o.mode,0,null),a.return=o,o.child=a}function xd(o,a,u,p){return p!==null&&hp(p),$i(a,o.child,null,u),o=$p(a,a.pendingProps.children),o.flags|=2,a.memoizedState=null,o}function m6(o,a,u,p,y,E,B){if(u)return a.flags&256?(a.flags&=-257,p=_p(Error(n(422))),xd(o,a,B,p)):a.memoizedState!==null?(a.child=o.child,a.flags|=128,null):(E=p.fallback,y=a.mode,p=jd({mode:"visible",children:p.children},y,0,null),E=Wa(E,y,B,null),E.flags|=2,p.return=a,E.return=a,p.sibling=E,a.child=p,(a.mode&1)!==0&&$i(a,o.child,null,B),a.child.memoizedState=Op(B),a.memoizedState=Ip,E);if((a.mode&1)===0)return xd(o,a,B,null);if(y.data==="$!"){if(p=y.nextSibling&&y.nextSibling.dataset,p)var z=p.dgst;return p=z,E=Error(n(419)),p=_p(E,p,void 0),xd(o,a,B,p)}if(z=(B&o.childLanes)!==0,gr||z){if(p=Cn,p!==null){switch(B&-B){case 4:y=2;break;case 16:y=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(p.suspendedLanes|B))!==0?0:y,y!==0&&y!==E.retryLane&&(E.retryLane=y,ds(o,y),wo(p,o,y,-1))}return nm(),p=_p(Error(n(421))),xd(o,a,B,p)}return y.data==="$?"?(a.flags|=128,a.child=o.child,a=F6.bind(null,o),y._reactRetry=a,null):(o=E.treeContext,_r=qs(y.nextSibling),Lr=a,Nt=!0,go=null,o!==null&&(Wr[qr++]=cs,Wr[qr++]=us,Wr[qr++]=Na,cs=o.id,us=o.overflow,Na=a),a=$p(a,p.children),a.flags|=4096,a)}function Mv(o,a,u){o.lanes|=a;var p=o.alternate;p!==null&&(p.lanes|=a),yp(o.return,a,u)}function zp(o,a,u,p,y){var E=o.memoizedState;E===null?o.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:p,tail:u,tailMode:y}:(E.isBackwards=a,E.rendering=null,E.renderingStartTime=0,E.last=p,E.tail=u,E.tailMode=y)}function Lv(o,a,u){var p=a.pendingProps,y=p.revealOrder,E=p.tail;if(Yn(o,a,p.children,u),p=zt.current,(p&2)!==0)p=p&1|2,a.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=a.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&Mv(o,u,a);else if(o.tag===19)Mv(o,u,a);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break e;for(;o.sibling===null;){if(o.return===null||o.return===a)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}p&=1}if(Ft(zt,p),(a.mode&1)===0)a.memoizedState=null;else switch(y){case"forwards":for(u=a.child,y=null;u!==null;)o=u.alternate,o!==null&&yd(o)===null&&(y=u),u=u.sibling;u=y,u===null?(y=a.child,a.child=null):(y=u.sibling,u.sibling=null),zp(a,!1,y,u,E);break;case"backwards":for(u=null,y=a.child,a.child=null;y!==null;){if(o=y.alternate,o!==null&&yd(o)===null){a.child=y;break}o=y.sibling,y.sibling=u,u=y,y=o}zp(a,!0,u,null,E);break;case"together":zp(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function Ad(o,a){(a.mode&1)===0&&o!==null&&(o.alternate=null,a.alternate=null,a.flags|=2)}function hs(o,a,u){if(o!==null&&(a.dependencies=o.dependencies),za|=a.lanes,(u&a.childLanes)===0)return null;if(o!==null&&a.child!==o.child)throw Error(n(153));if(a.child!==null){for(o=a.child,u=ra(o,o.pendingProps),a.child=u,u.return=a;o.sibling!==null;)o=o.sibling,u=u.sibling=ra(o,o.pendingProps),u.return=a;u.sibling=null}return a.child}function g6(o,a,u){switch(a.tag){case 3:Bv(a),Oi();break;case 5:G1(a);break;case 1:mr(a.type)&&id(a);break;case 4:wp(a,a.stateNode.containerInfo);break;case 10:var p=a.type._context,y=a.memoizedProps.value;Ft(hd,p._currentValue),p._currentValue=y;break;case 13:if(p=a.memoizedState,p!==null)return p.dehydrated!==null?(Ft(zt,zt.current&1),a.flags|=128,null):(u&a.child.childLanes)!==0?Pv(o,a,u):(Ft(zt,zt.current&1),o=hs(o,a,u),o!==null?o.sibling:null);Ft(zt,zt.current&1);break;case 19:if(p=(u&a.childLanes)!==0,(o.flags&128)!==0){if(p)return Lv(o,a,u);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),Ft(zt,zt.current),p)break;return null;case 22:case 23:return a.lanes=0,Dv(o,a,u)}return hs(o,a,u)}var _v,Vp,Rv,Nv;_v=function(o,a){for(var u=a.child;u!==null;){if(u.tag===5||u.tag===6)o.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},Vp=function(){},Rv=function(o,a,u,p){var y=o.memoizedProps;if(y!==p){o=a.stateNode,Oa(Io.current);var E=null;switch(u){case"input":y=He(o,y),p=He(o,p),E=[];break;case"select":y=ne({},y,{value:void 0}),p=ne({},p,{value:void 0}),E=[];break;case"textarea":y=xr(o,y),p=xr(o,p),E=[];break;default:typeof y.onClick!="function"&&typeof p.onClick=="function"&&(o.onclick=od)}Ca(u,p);var B;u=null;for(se in y)if(!p.hasOwnProperty(se)&&y.hasOwnProperty(se)&&y[se]!=null)if(se==="style"){var z=y[se];for(B in z)z.hasOwnProperty(B)&&(u||(u={}),u[B]="")}else se!=="dangerouslySetInnerHTML"&&se!=="children"&&se!=="suppressContentEditableWarning"&&se!=="suppressHydrationWarning"&&se!=="autoFocus"&&(s.hasOwnProperty(se)?E||(E=[]):(E=E||[]).push(se,null));for(se in p){var W=p[se];if(z=y!=null?y[se]:void 0,p.hasOwnProperty(se)&&W!==z&&(W!=null||z!=null))if(se==="style")if(z){for(B in z)!z.hasOwnProperty(B)||W&&W.hasOwnProperty(B)||(u||(u={}),u[B]="");for(B in W)W.hasOwnProperty(B)&&z[B]!==W[B]&&(u||(u={}),u[B]=W[B])}else u||(E||(E=[]),E.push(se,u)),u=W;else se==="dangerouslySetInnerHTML"?(W=W?W.__html:void 0,z=z?z.__html:void 0,W!=null&&z!==W&&(E=E||[]).push(se,W)):se==="children"?typeof W!="string"&&typeof W!="number"||(E=E||[]).push(se,""+W):se!=="suppressContentEditableWarning"&&se!=="suppressHydrationWarning"&&(s.hasOwnProperty(se)?(W!=null&&se==="onScroll"&&Tt("scroll",o),E||z===W||(E=[])):(E=E||[]).push(se,W))}u&&(E=E||[]).push("style",u);var se=E;(a.updateQueue=se)&&(a.flags|=4)}},Nv=function(o,a,u,p){u!==p&&(a.flags|=4)};function hc(o,a){if(!Nt)switch(o.tailMode){case"hidden":a=o.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?o.tail=null:u.sibling=null;break;case"collapsed":u=o.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?a||o.tail===null?o.tail=null:o.tail.sibling=null:p.sibling=null}}function Rn(o){var a=o.alternate!==null&&o.alternate.child===o.child,u=0,p=0;if(a)for(var y=o.child;y!==null;)u|=y.lanes|y.childLanes,p|=y.subtreeFlags&14680064,p|=y.flags&14680064,y.return=o,y=y.sibling;else for(y=o.child;y!==null;)u|=y.lanes|y.childLanes,p|=y.subtreeFlags,p|=y.flags,y.return=o,y=y.sibling;return o.subtreeFlags|=p,o.childLanes=u,a}function y6(o,a,u){var p=a.pendingProps;switch(up(a),a.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rn(a),null;case 1:return mr(a.type)&&ad(),Rn(a),null;case 3:return p=a.stateNode,Hi(),Pt(pr),Pt(Ln),kp(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(o===null||o.child===null)&&(dd(a)?a.flags|=4:o===null||o.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,go!==null&&(Zp(go),go=null))),Vp(o,a),Rn(a),null;case 5:Cp(a);var y=Oa(lc.current);if(u=a.type,o!==null&&a.stateNode!=null)Rv(o,a,u,p,y),o.ref!==a.ref&&(a.flags|=512,a.flags|=2097152);else{if(!p){if(a.stateNode===null)throw Error(n(166));return Rn(a),null}if(o=Oa(Io.current),dd(a)){p=a.stateNode,u=a.type;var E=a.memoizedProps;switch(p[jo]=a,p[rc]=E,o=(a.mode&1)!==0,u){case"dialog":Tt("cancel",p),Tt("close",p);break;case"iframe":case"object":case"embed":Tt("load",p);break;case"video":case"audio":for(y=0;y<\/script>",o=o.removeChild(o.firstChild)):typeof p.is=="string"?o=B.createElement(u,{is:p.is}):(o=B.createElement(u),u==="select"&&(B=o,p.multiple?B.multiple=!0:p.size&&(B.size=p.size))):o=B.createElementNS(o,u),o[jo]=a,o[rc]=p,_v(o,a,!1,!1),a.stateNode=o;e:{switch(B=Ss(u,p),u){case"dialog":Tt("cancel",o),Tt("close",o),y=p;break;case"iframe":case"object":case"embed":Tt("load",o),y=p;break;case"video":case"audio":for(y=0;yGi&&(a.flags|=128,p=!0,hc(E,!1),a.lanes=4194304)}else{if(!p)if(o=yd(B),o!==null){if(a.flags|=128,p=!0,u=o.updateQueue,u!==null&&(a.updateQueue=u,a.flags|=4),hc(E,!0),E.tail===null&&E.tailMode==="hidden"&&!B.alternate&&!Nt)return Rn(a),null}else 2*kt()-E.renderingStartTime>Gi&&u!==1073741824&&(a.flags|=128,p=!0,hc(E,!1),a.lanes=4194304);E.isBackwards?(B.sibling=a.child,a.child=B):(u=E.last,u!==null?u.sibling=B:a.child=B,E.last=B)}return E.tail!==null?(a=E.tail,E.rendering=a,E.tail=a.sibling,E.renderingStartTime=kt(),a.sibling=null,u=zt.current,Ft(zt,p?u&1|2:u&1),a):(Rn(a),null);case 22:case 23:return tm(),p=a.memoizedState!==null,o!==null&&o.memoizedState!==null!==p&&(a.flags|=8192),p&&(a.mode&1)!==0?(Rr&1073741824)!==0&&(Rn(a),a.subtreeFlags&6&&(a.flags|=8192)):Rn(a),null;case 24:return null;case 25:return null}throw Error(n(156,a.tag))}function v6(o,a){switch(up(a),a.tag){case 1:return mr(a.type)&&ad(),o=a.flags,o&65536?(a.flags=o&-65537|128,a):null;case 3:return Hi(),Pt(pr),Pt(Ln),kp(),o=a.flags,(o&65536)!==0&&(o&128)===0?(a.flags=o&-65537|128,a):null;case 5:return Cp(a),null;case 13:if(Pt(zt),o=a.memoizedState,o!==null&&o.dehydrated!==null){if(a.alternate===null)throw Error(n(340));Oi()}return o=a.flags,o&65536?(a.flags=o&-65537|128,a):null;case 19:return Pt(zt),null;case 4:return Hi(),null;case 10:return gp(a.type._context),null;case 22:case 23:return tm(),null;case 24:return null;default:return null}}var Dd=!1,Nn=!1,b6=typeof WeakSet=="function"?WeakSet:Set,Be=null;function Wi(o,a){var u=o.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(p){Yt(o,a,p)}else u.current=null}function Hp(o,a,u){try{u()}catch(p){Yt(o,a,p)}}var jv=!1;function w6(o,a){if(tp=vt,o=Gn(),Kn(o)){if("selectionStart"in o)var u={start:o.selectionStart,end:o.selectionEnd};else e:{u=(u=o.ownerDocument)&&u.defaultView||window;var p=u.getSelection&&u.getSelection();if(p&&p.rangeCount!==0){u=p.anchorNode;var y=p.anchorOffset,E=p.focusNode;p=p.focusOffset;try{u.nodeType,E.nodeType}catch{u=null;break e}var B=0,z=-1,W=-1,se=0,pe=0,ge=o,fe=null;t:for(;;){for(var Se;ge!==u||y!==0&&ge.nodeType!==3||(z=B+y),ge!==E||p!==0&&ge.nodeType!==3||(W=B+p),ge.nodeType===3&&(B+=ge.nodeValue.length),(Se=ge.firstChild)!==null;)fe=ge,ge=Se;for(;;){if(ge===o)break t;if(fe===u&&++se===y&&(z=B),fe===E&&++pe===p&&(W=B),(Se=ge.nextSibling)!==null)break;ge=fe,fe=ge.parentNode}ge=Se}u=z===-1||W===-1?null:{start:z,end:W}}else u=null}u=u||{start:0,end:0}}else u=null;for(np={focusedElem:o,selectionRange:u},vt=!1,Be=a;Be!==null;)if(a=Be,o=a.child,(a.subtreeFlags&1028)!==0&&o!==null)o.return=a,Be=o;else for(;Be!==null;){a=Be;try{var Me=a.alternate;if((a.flags&1024)!==0)switch(a.tag){case 0:case 11:case 15:break;case 1:if(Me!==null){var _e=Me.memoizedProps,tn=Me.memoizedState,J=a.stateNode,Y=J.getSnapshotBeforeUpdate(a.elementType===a.type?_e:yo(a.type,_e),tn);J.__reactInternalSnapshotBeforeUpdate=Y}break;case 3:var te=a.stateNode.containerInfo;te.nodeType===1?te.textContent="":te.nodeType===9&&te.documentElement&&te.removeChild(te.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ve){Yt(a,a.return,ve)}if(o=a.sibling,o!==null){o.return=a.return,Be=o;break}Be=a.return}return Me=jv,jv=!1,Me}function pc(o,a,u){var p=a.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var y=p=p.next;do{if((y.tag&o)===o){var E=y.destroy;y.destroy=void 0,E!==void 0&&Hp(a,u,E)}y=y.next}while(y!==p)}}function Sd(o,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var u=a=a.next;do{if((u.tag&o)===o){var p=u.create;u.destroy=p()}u=u.next}while(u!==a)}}function Up(o){var a=o.ref;if(a!==null){var u=o.stateNode;switch(o.tag){case 5:o=u;break;default:o=u}typeof a=="function"?a(o):a.current=o}}function Iv(o){var a=o.alternate;a!==null&&(o.alternate=null,Iv(a)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(a=o.stateNode,a!==null&&(delete a[jo],delete a[rc],delete a[ap],delete a[n6],delete a[r6])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function Ov(o){return o.tag===5||o.tag===3||o.tag===4}function $v(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||Ov(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Wp(o,a,u){var p=o.tag;if(p===5||p===6)o=o.stateNode,a?u.nodeType===8?u.parentNode.insertBefore(o,a):u.insertBefore(o,a):(u.nodeType===8?(a=u.parentNode,a.insertBefore(o,u)):(a=u,a.appendChild(o)),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=od));else if(p!==4&&(o=o.child,o!==null))for(Wp(o,a,u),o=o.sibling;o!==null;)Wp(o,a,u),o=o.sibling}function qp(o,a,u){var p=o.tag;if(p===5||p===6)o=o.stateNode,a?u.insertBefore(o,a):u.appendChild(o);else if(p!==4&&(o=o.child,o!==null))for(qp(o,a,u),o=o.sibling;o!==null;)qp(o,a,u),o=o.sibling}var An=null,vo=!1;function Js(o,a,u){for(u=u.child;u!==null;)zv(o,a,u),u=u.sibling}function zv(o,a,u){if(ur&&typeof ur.onCommitFiberUnmount=="function")try{ur.onCommitFiberUnmount(Ps,u)}catch{}switch(u.tag){case 5:Nn||Wi(u,a);case 6:var p=An,y=vo;An=null,Js(o,a,u),An=p,vo=y,An!==null&&(vo?(o=An,u=u.stateNode,o.nodeType===8?o.parentNode.removeChild(u):o.removeChild(u)):An.removeChild(u.stateNode));break;case 18:An!==null&&(vo?(o=An,u=u.stateNode,o.nodeType===8?sp(o.parentNode,u):o.nodeType===1&&sp(o,u),Vs(o)):sp(An,u.stateNode));break;case 4:p=An,y=vo,An=u.stateNode.containerInfo,vo=!0,Js(o,a,u),An=p,vo=y;break;case 0:case 11:case 14:case 15:if(!Nn&&(p=u.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){y=p=p.next;do{var E=y,B=E.destroy;E=E.tag,B!==void 0&&((E&2)!==0||(E&4)!==0)&&Hp(u,a,B),y=y.next}while(y!==p)}Js(o,a,u);break;case 1:if(!Nn&&(Wi(u,a),p=u.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=u.memoizedProps,p.state=u.memoizedState,p.componentWillUnmount()}catch(z){Yt(u,a,z)}Js(o,a,u);break;case 21:Js(o,a,u);break;case 22:u.mode&1?(Nn=(p=Nn)||u.memoizedState!==null,Js(o,a,u),Nn=p):Js(o,a,u);break;default:Js(o,a,u)}}function Vv(o){var a=o.updateQueue;if(a!==null){o.updateQueue=null;var u=o.stateNode;u===null&&(u=o.stateNode=new b6),a.forEach(function(p){var y=B6.bind(null,o,p);u.has(p)||(u.add(p),p.then(y,y))})}}function bo(o,a){var u=a.deletions;if(u!==null)for(var p=0;py&&(y=B),p&=~E}if(p=y,p=kt()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*E6(p/1960))-p,10o?16:o,ea===null)var p=!1;else{if(o=ea,ea=null,Md=0,(ot&6)!==0)throw Error(n(331));var y=ot;for(ot|=4,Be=o.current;Be!==null;){var E=Be,B=E.child;if((Be.flags&16)!==0){var z=E.deletions;if(z!==null){for(var W=0;Wkt()-Yp?Ha(o,0):Kp|=u),vr(o,a)}function tb(o,a){a===0&&((o.mode&1)===0?a=1:(a=Ms,Ms<<=1,(Ms&130023424)===0&&(Ms=4194304)));var u=Xn();o=ds(o,a),o!==null&&(_s(o,a,u),vr(o,u))}function F6(o){var a=o.memoizedState,u=0;a!==null&&(u=a.retryLane),tb(o,u)}function B6(o,a){var u=0;switch(o.tag){case 13:var p=o.stateNode,y=o.memoizedState;y!==null&&(u=y.retryLane);break;case 19:p=o.stateNode;break;default:throw Error(n(314))}p!==null&&p.delete(a),tb(o,u)}var nb;nb=function(o,a,u){if(o!==null)if(o.memoizedProps!==a.pendingProps||pr.current)gr=!0;else{if((o.lanes&u)===0&&(a.flags&128)===0)return gr=!1,g6(o,a,u);gr=(o.flags&131072)!==0}else gr=!1,Nt&&(a.flags&1048576)!==0&&R1(a,ud,a.index);switch(a.lanes=0,a.tag){case 2:var p=a.type;Ad(o,a),o=a.pendingProps;var y=Ni(a,Ln.current);Vi(a,u),y=Dp(null,a,p,o,y,u);var E=Sp();return a.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,mr(p)?(E=!0,id(a)):E=!1,a.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,bp(a),y.updater=kd,a.stateNode=y,y._reactInternals=a,Lp(a,p,o,u),a=jp(null,a,p,!0,E,u)):(a.tag=0,Nt&&E&&cp(a),Yn(null,a,y,u),a=a.child),a;case 16:p=a.elementType;e:{switch(Ad(o,a),o=a.pendingProps,y=p._init,p=y(p._payload),a.type=p,y=a.tag=P6(p),o=yo(p,o),y){case 0:a=Np(null,a,p,o,u);break e;case 1:a=Fv(null,a,p,o,u);break e;case 11:a=kv(null,a,p,o,u);break e;case 14:a=xv(null,a,p,yo(p.type,o),u);break e}throw Error(n(306,p,""))}return a;case 0:return p=a.type,y=a.pendingProps,y=a.elementType===p?y:yo(p,y),Np(o,a,p,y,u);case 1:return p=a.type,y=a.pendingProps,y=a.elementType===p?y:yo(p,y),Fv(o,a,p,y,u);case 3:e:{if(Bv(a),o===null)throw Error(n(387));p=a.pendingProps,E=a.memoizedState,y=E.element,U1(o,a),gd(a,p,null,u);var B=a.memoizedState;if(p=B.element,E.isDehydrated)if(E={element:p,isDehydrated:!1,cache:B.cache,pendingSuspenseBoundaries:B.pendingSuspenseBoundaries,transitions:B.transitions},a.updateQueue.baseState=E,a.memoizedState=E,a.flags&256){y=Ui(Error(n(423)),a),a=Tv(o,a,p,u,y);break e}else if(p!==y){y=Ui(Error(n(424)),a),a=Tv(o,a,p,u,y);break e}else for(_r=qs(a.stateNode.containerInfo.firstChild),Lr=a,Nt=!0,go=null,u=V1(a,null,p,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Oi(),p===y){a=hs(o,a,u);break e}Yn(o,a,p,u)}a=a.child}return a;case 5:return G1(a),o===null&&fp(a),p=a.type,y=a.pendingProps,E=o!==null?o.memoizedProps:null,B=y.children,rp(p,y)?B=null:E!==null&&rp(p,E)&&(a.flags|=32),Sv(o,a),Yn(o,a,B,u),a.child;case 6:return o===null&&fp(a),null;case 13:return Pv(o,a,u);case 4:return wp(a,a.stateNode.containerInfo),p=a.pendingProps,o===null?a.child=$i(a,null,p,u):Yn(o,a,p,u),a.child;case 11:return p=a.type,y=a.pendingProps,y=a.elementType===p?y:yo(p,y),kv(o,a,p,y,u);case 7:return Yn(o,a,a.pendingProps,u),a.child;case 8:return Yn(o,a,a.pendingProps.children,u),a.child;case 12:return Yn(o,a,a.pendingProps.children,u),a.child;case 10:e:{if(p=a.type._context,y=a.pendingProps,E=a.memoizedProps,B=y.value,Ft(hd,p._currentValue),p._currentValue=B,E!==null)if(xt(E.value,B)){if(E.children===y.children&&!pr.current){a=hs(o,a,u);break e}}else for(E=a.child,E!==null&&(E.return=a);E!==null;){var z=E.dependencies;if(z!==null){B=E.child;for(var W=z.firstContext;W!==null;){if(W.context===p){if(E.tag===1){W=fs(-1,u&-u),W.tag=2;var se=E.updateQueue;if(se!==null){se=se.shared;var pe=se.pending;pe===null?W.next=W:(W.next=pe.next,pe.next=W),se.pending=W}}E.lanes|=u,W=E.alternate,W!==null&&(W.lanes|=u),yp(E.return,u,a),z.lanes|=u;break}W=W.next}}else if(E.tag===10)B=E.type===a.type?null:E.child;else if(E.tag===18){if(B=E.return,B===null)throw Error(n(341));B.lanes|=u,z=B.alternate,z!==null&&(z.lanes|=u),yp(B,u,a),B=E.sibling}else B=E.child;if(B!==null)B.return=E;else for(B=E;B!==null;){if(B===a){B=null;break}if(E=B.sibling,E!==null){E.return=B.return,B=E;break}B=B.return}E=B}Yn(o,a,y.children,u),a=a.child}return a;case 9:return y=a.type,p=a.pendingProps.children,Vi(a,u),y=Gr(y),p=p(y),a.flags|=1,Yn(o,a,p,u),a.child;case 14:return p=a.type,y=yo(p,a.pendingProps),y=yo(p.type,y),xv(o,a,p,y,u);case 15:return Av(o,a,a.type,a.pendingProps,u);case 17:return p=a.type,y=a.pendingProps,y=a.elementType===p?y:yo(p,y),Ad(o,a),a.tag=1,mr(p)?(o=!0,id(a)):o=!1,Vi(a,u),gv(a,p,y),Lp(a,p,y,u),jp(null,a,p,!0,o,u);case 19:return Lv(o,a,u);case 22:return Dv(o,a,u)}throw Error(n(156,a.tag))};function rb(o,a){return Jt(o,a)}function T6(o,a,u,p){this.tag=o,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xr(o,a,u,p){return new T6(o,a,u,p)}function rm(o){return o=o.prototype,!(!o||!o.isReactComponent)}function P6(o){if(typeof o=="function")return rm(o)?1:0;if(o!=null){if(o=o.$$typeof,o===X)return 11;if(o===oe)return 14}return 2}function ra(o,a){var u=o.alternate;return u===null?(u=Xr(o.tag,a,o.key,o.mode),u.elementType=o.elementType,u.type=o.type,u.stateNode=o.stateNode,u.alternate=o,o.alternate=u):(u.pendingProps=a,u.type=o.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=o.flags&14680064,u.childLanes=o.childLanes,u.lanes=o.lanes,u.child=o.child,u.memoizedProps=o.memoizedProps,u.memoizedState=o.memoizedState,u.updateQueue=o.updateQueue,a=o.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=o.sibling,u.index=o.index,u.ref=o.ref,u}function Nd(o,a,u,p,y,E){var B=2;if(p=o,typeof o=="function")rm(o)&&(B=1);else if(typeof o=="string")B=5;else e:switch(o){case O:return Wa(u.children,y,E,a);case I:B=8,y|=8;break;case V:return o=Xr(12,u,a,y|2),o.elementType=V,o.lanes=E,o;case $:return o=Xr(13,u,a,y),o.elementType=$,o.lanes=E,o;case H:return o=Xr(19,u,a,y),o.elementType=H,o.lanes=E,o;case re:return jd(u,y,E,a);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case U:B=10;break e;case j:B=9;break e;case X:B=11;break e;case oe:B=14;break e;case ae:B=16,p=null;break e}throw Error(n(130,o==null?o:typeof o,""))}return a=Xr(B,u,a,y),a.elementType=o,a.type=p,a.lanes=E,a}function Wa(o,a,u,p){return o=Xr(7,o,p,a),o.lanes=u,o}function jd(o,a,u,p){return o=Xr(22,o,p,a),o.elementType=re,o.lanes=u,o.stateNode={isHidden:!1},o}function om(o,a,u){return o=Xr(6,o,null,a),o.lanes=u,o}function sm(o,a,u){return a=Xr(4,o.children!==null?o.children:[],o.key,a),a.lanes=u,a.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},a}function M6(o,a,u,p,y){this.tag=a,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ul(0),this.expirationTimes=Ul(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ul(0),this.identifierPrefix=p,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function am(o,a,u,p,y,E,B,z,W){return o=new M6(o,a,u,z,W),a===1?(a=1,E===!0&&(a|=8)):a=0,E=Xr(3,null,null,a),o.current=E,E.stateNode=o,E.memoizedState={element:p,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},bp(E),o}function L6(o,a,u){var p=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),fm.exports=K6(),fm.exports}var vb;function Y6(){if(vb)return Ud;vb=1;var e=c5();return Ud.createRoot=e.createRoot,Ud.hydrateRoot=e.hydrateRoot,Ud}var X6=Y6();/** * react-router v7.10.1 * * Copyright (c) Remix Software Inc. @@ -47,19 +47,19 @@ Error generating stack: `+E.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */var vb="popstate";function X6(e={}){function t(r,s){let{pathname:i,search:l,hash:c}=r.location;return kg("",{pathname:i,search:l,hash:c},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:tu(s)}return J6(t,n,null,e)}function jt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ro(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Q6(){return Math.random().toString(36).substring(2,10)}function bb(e,t){return{usr:e.state,key:e.key,idx:t}}function kg(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?kl(t):t,state:n,key:t&&t.key||r||Q6()}}function tu({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function kl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function J6(e,t,n,r={}){let{window:s=document.defaultView,v5Compat:i=!1}=r,l=s.history,c="POP",d=null,f=h();f==null&&(f=0,l.replaceState({...l.state,idx:f},""));function h(){return(l.state||{idx:null}).idx}function m(){c="POP";let x=h(),D=x==null?null:x-f;f=x,d&&d({action:c,location:w.location,delta:D})}function g(x,D){c="PUSH";let S=kg(w.location,x,D);f=h()+1;let F=bb(S,f),P=w.createHref(S);try{l.pushState(F,"",P)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;s.location.assign(P)}i&&d&&d({action:c,location:w.location,delta:1})}function b(x,D){c="REPLACE";let S=kg(w.location,x,D);f=h();let F=bb(S,f),P=w.createHref(S);l.replaceState(F,"",P),i&&d&&d({action:c,location:w.location,delta:0})}function C(x){return Z6(x)}let w={get action(){return c},get location(){return e(s,l)},listen(x){if(d)throw new Error("A history only accepts one active listener");return s.addEventListener(vb,m),d=x,()=>{s.removeEventListener(vb,m),d=null}},createHref(x){return t(s,x)},createURL:C,encodeLocation(x){let D=C(x);return{pathname:D.pathname,search:D.search,hash:D.hash}},push:g,replace:b,go(x){return l.go(x)}};return w}function Z6(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),jt(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:tu(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function u5(e,t,n="/"){return e4(e,t,n,!1)}function e4(e,t,n,r){let s=typeof t=="string"?kl(t):t,i=xs(s.pathname||"/",n);if(i==null)return null;let l=d5(e);t4(l);let c=null;for(let d=0;c==null&&d{let h={relativePath:f===void 0?l.path||"":f,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(r)&&d)return;jt(h.relativePath.startsWith(r),`Absolute route path "${h.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(r.length)}let m=vs([r,h.relativePath]),g=n.concat(h);l.children&&l.children.length>0&&(jt(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),d5(l.children,t,g,m,d)),!(l.path==null&&!l.index)&&t.push({path:m,score:l4(m,l.index),routesMeta:g})};return e.forEach((l,c)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))i(l,c);else for(let f of f5(l.path))i(l,c,!0,f)}),t}function f5(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let l=f5(r.join("/")),c=[];return c.push(...l.map(d=>d===""?i:[i,d].join("/"))),s&&c.push(...l),c.map(d=>e.startsWith("/")&&d===""?"/":d)}function t4(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:c4(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var n4=/^:[\w-]+$/,r4=3,o4=2,s4=1,a4=10,i4=-2,wb=e=>e==="*";function l4(e,t){let n=e.split("/"),r=n.length;return n.some(wb)&&(r+=i4),t&&(r+=o4),n.filter(s=>!wb(s)).reduce((s,i)=>s+(n4.test(i)?r4:i===""?s4:a4),r)}function c4(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function u4(e,t,n=!1){let{routesMeta:r}=e,s={},i="/",l=[];for(let c=0;c{if(h==="*"){let C=c[g]||"";l=i.slice(0,i.length-C.length).replace(/(.)\/+$/,"$1")}const b=c[g];return m&&!b?f[h]=void 0:f[h]=(b||"").replace(/%2F/g,"/"),f},{}),pathname:i,pathnameBase:l,pattern:e}}function d4(e,t=!1,n=!0){ro(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,c,d)=>(r.push({paramName:c,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function f4(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ro(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function xs(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var h4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,p4=e=>h4.test(e);function m4(e,t="/"){let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?kl(e):e,i;if(n)if(p4(n))i=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),ro(!1,`Pathnames cannot have embedded double slashes - normalizing ${l} -> ${n}`)}n.startsWith("/")?i=Cb(n.substring(1),"/"):i=Cb(n,t)}else i=t;return{pathname:i,search:v4(r),hash:b4(s)}}function Cb(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function mm(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function g4(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function B0(e){let t=g4(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function T0(e,t,n,r=!1){let s;typeof e=="string"?s=kl(e):(s={...e},jt(!s.pathname||!s.pathname.includes("?"),mm("?","pathname","search",s)),jt(!s.pathname||!s.pathname.includes("#"),mm("#","pathname","hash",s)),jt(!s.search||!s.search.includes("#"),mm("#","search","hash",s)));let i=e===""||s.pathname==="",l=i?"/":s.pathname,c;if(l==null)c=n;else{let m=t.length-1;if(!r&&l.startsWith("..")){let g=l.split("/");for(;g[0]==="..";)g.shift(),m-=1;s.pathname=g.join("/")}c=m>=0?t[m]:"/"}let d=m4(s,c),f=l&&l!=="/"&&l.endsWith("/"),h=(i||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||h)&&(d.pathname+="/"),d}var vs=e=>e.join("/").replace(/\/\/+/g,"/"),y4=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),v4=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,b4=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function w4(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function C4(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var h5=["POST","PUT","PATCH","DELETE"];new Set(h5);var E4=["GET",...h5];new Set(E4);var xl=v.createContext(null);xl.displayName="DataRouter";var dh=v.createContext(null);dh.displayName="DataRouterState";v.createContext(!1);var p5=v.createContext({isTransitioning:!1});p5.displayName="ViewTransition";var k4=v.createContext(new Map);k4.displayName="Fetchers";var x4=v.createContext(null);x4.displayName="Await";var ao=v.createContext(null);ao.displayName="Navigation";var fu=v.createContext(null);fu.displayName="Location";var Jo=v.createContext({outlet:null,matches:[],isDataRoute:!1});Jo.displayName="Route";var P0=v.createContext(null);P0.displayName="RouteError";function A4(e,{relative:t}={}){jt(Al(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=v.useContext(ao),{hash:s,pathname:i,search:l}=hu(e,{relative:t}),c=i;return n!=="/"&&(c=i==="/"?n:vs([n,i])),r.createHref({pathname:c,search:l,hash:s})}function Al(){return v.useContext(fu)!=null}function Zo(){return jt(Al(),"useLocation() may be used only in the context of a component."),v.useContext(fu).location}var m5="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function g5(e){v.useContext(ao).static||v.useLayoutEffect(e)}function fh(){let{isDataRoute:e}=v.useContext(Jo);return e?I4():D4()}function D4(){jt(Al(),"useNavigate() may be used only in the context of a component.");let e=v.useContext(xl),{basename:t,navigator:n}=v.useContext(ao),{matches:r}=v.useContext(Jo),{pathname:s}=Zo(),i=JSON.stringify(B0(r)),l=v.useRef(!1);return g5(()=>{l.current=!0}),v.useCallback((d,f={})=>{if(ro(l.current,m5),!l.current)return;if(typeof d=="number"){n.go(d);return}let h=T0(d,JSON.parse(i),s,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:vs([t,h.pathname])),(f.replace?n.replace:n.push)(h,f.state,f)},[t,n,i,s,e])}v.createContext(null);function hu(e,{relative:t}={}){let{matches:n}=v.useContext(Jo),{pathname:r}=Zo(),s=JSON.stringify(B0(n));return v.useMemo(()=>T0(e,JSON.parse(s),r,t==="path"),[e,s,r,t])}function S4(e,t){return y5(e,t)}function y5(e,t,n,r,s){var S;jt(Al(),"useRoutes() may be used only in the context of a component.");let{navigator:i}=v.useContext(ao),{matches:l}=v.useContext(Jo),c=l[l.length-1],d=c?c.params:{},f=c?c.pathname:"/",h=c?c.pathnameBase:"/",m=c&&c.route;{let F=m&&m.path||"";v5(f,!m||F.endsWith("*")||F.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${f}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + */var bb="popstate";function Q6(e={}){function t(r,s){let{pathname:i,search:l,hash:c}=r.location;return kg("",{pathname:i,search:l,hash:c},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:tu(s)}return Z6(t,n,null,e)}function jt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function oo(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function J6(){return Math.random().toString(36).substring(2,10)}function wb(e,t){return{usr:e.state,key:e.key,idx:t}}function kg(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?kl(t):t,state:n,key:t&&t.key||r||J6()}}function tu({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function kl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Z6(e,t,n,r={}){let{window:s=document.defaultView,v5Compat:i=!1}=r,l=s.history,c="POP",d=null,f=h();f==null&&(f=0,l.replaceState({...l.state,idx:f},""));function h(){return(l.state||{idx:null}).idx}function m(){c="POP";let x=h(),D=x==null?null:x-f;f=x,d&&d({action:c,location:w.location,delta:D})}function g(x,D){c="PUSH";let S=kg(w.location,x,D);f=h()+1;let F=wb(S,f),P=w.createHref(S);try{l.pushState(F,"",P)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;s.location.assign(P)}i&&d&&d({action:c,location:w.location,delta:1})}function b(x,D){c="REPLACE";let S=kg(w.location,x,D);f=h();let F=wb(S,f),P=w.createHref(S);l.replaceState(F,"",P),i&&d&&d({action:c,location:w.location,delta:0})}function C(x){return e4(x)}let w={get action(){return c},get location(){return e(s,l)},listen(x){if(d)throw new Error("A history only accepts one active listener");return s.addEventListener(bb,m),d=x,()=>{s.removeEventListener(bb,m),d=null}},createHref(x){return t(s,x)},createURL:C,encodeLocation(x){let D=C(x);return{pathname:D.pathname,search:D.search,hash:D.hash}},push:g,replace:b,go(x){return l.go(x)}};return w}function e4(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),jt(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:tu(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function u5(e,t,n="/"){return t4(e,t,n,!1)}function t4(e,t,n,r){let s=typeof t=="string"?kl(t):t,i=xs(s.pathname||"/",n);if(i==null)return null;let l=d5(e);n4(l);let c=null;for(let d=0;c==null&&d{let h={relativePath:f===void 0?l.path||"":f,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(r)&&d)return;jt(h.relativePath.startsWith(r),`Absolute route path "${h.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(r.length)}let m=vs([r,h.relativePath]),g=n.concat(h);l.children&&l.children.length>0&&(jt(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),d5(l.children,t,g,m,d)),!(l.path==null&&!l.index)&&t.push({path:m,score:c4(m,l.index),routesMeta:g})};return e.forEach((l,c)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))i(l,c);else for(let f of f5(l.path))i(l,c,!0,f)}),t}function f5(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let l=f5(r.join("/")),c=[];return c.push(...l.map(d=>d===""?i:[i,d].join("/"))),s&&c.push(...l),c.map(d=>e.startsWith("/")&&d===""?"/":d)}function n4(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:u4(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var r4=/^:[\w-]+$/,o4=3,s4=2,a4=1,i4=10,l4=-2,Cb=e=>e==="*";function c4(e,t){let n=e.split("/"),r=n.length;return n.some(Cb)&&(r+=l4),t&&(r+=s4),n.filter(s=>!Cb(s)).reduce((s,i)=>s+(r4.test(i)?o4:i===""?a4:i4),r)}function u4(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function d4(e,t,n=!1){let{routesMeta:r}=e,s={},i="/",l=[];for(let c=0;c{if(h==="*"){let C=c[g]||"";l=i.slice(0,i.length-C.length).replace(/(.)\/+$/,"$1")}const b=c[g];return m&&!b?f[h]=void 0:f[h]=(b||"").replace(/%2F/g,"/"),f},{}),pathname:i,pathnameBase:l,pattern:e}}function f4(e,t=!1,n=!0){oo(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,c,d)=>(r.push({paramName:c,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function h4(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return oo(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function xs(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var p4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,m4=e=>p4.test(e);function g4(e,t="/"){let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?kl(e):e,i;if(n)if(m4(n))i=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),oo(!1,`Pathnames cannot have embedded double slashes - normalizing ${l} -> ${n}`)}n.startsWith("/")?i=Eb(n.substring(1),"/"):i=Eb(n,t)}else i=t;return{pathname:i,search:b4(r),hash:w4(s)}}function Eb(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function mm(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function y4(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function T0(e){let t=y4(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function P0(e,t,n,r=!1){let s;typeof e=="string"?s=kl(e):(s={...e},jt(!s.pathname||!s.pathname.includes("?"),mm("?","pathname","search",s)),jt(!s.pathname||!s.pathname.includes("#"),mm("#","pathname","hash",s)),jt(!s.search||!s.search.includes("#"),mm("#","search","hash",s)));let i=e===""||s.pathname==="",l=i?"/":s.pathname,c;if(l==null)c=n;else{let m=t.length-1;if(!r&&l.startsWith("..")){let g=l.split("/");for(;g[0]==="..";)g.shift(),m-=1;s.pathname=g.join("/")}c=m>=0?t[m]:"/"}let d=g4(s,c),f=l&&l!=="/"&&l.endsWith("/"),h=(i||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||h)&&(d.pathname+="/"),d}var vs=e=>e.join("/").replace(/\/\/+/g,"/"),v4=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),b4=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,w4=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function C4(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function E4(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var h5=["POST","PUT","PATCH","DELETE"];new Set(h5);var k4=["GET",...h5];new Set(k4);var xl=v.createContext(null);xl.displayName="DataRouter";var dh=v.createContext(null);dh.displayName="DataRouterState";v.createContext(!1);var p5=v.createContext({isTransitioning:!1});p5.displayName="ViewTransition";var x4=v.createContext(new Map);x4.displayName="Fetchers";var A4=v.createContext(null);A4.displayName="Await";var ao=v.createContext(null);ao.displayName="Navigation";var fu=v.createContext(null);fu.displayName="Location";var Jo=v.createContext({outlet:null,matches:[],isDataRoute:!1});Jo.displayName="Route";var M0=v.createContext(null);M0.displayName="RouteError";function D4(e,{relative:t}={}){jt(Al(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=v.useContext(ao),{hash:s,pathname:i,search:l}=hu(e,{relative:t}),c=i;return n!=="/"&&(c=i==="/"?n:vs([n,i])),r.createHref({pathname:c,search:l,hash:s})}function Al(){return v.useContext(fu)!=null}function Zo(){return jt(Al(),"useLocation() may be used only in the context of a component."),v.useContext(fu).location}var m5="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function g5(e){v.useContext(ao).static||v.useLayoutEffect(e)}function fh(){let{isDataRoute:e}=v.useContext(Jo);return e?O4():S4()}function S4(){jt(Al(),"useNavigate() may be used only in the context of a component.");let e=v.useContext(xl),{basename:t,navigator:n}=v.useContext(ao),{matches:r}=v.useContext(Jo),{pathname:s}=Zo(),i=JSON.stringify(T0(r)),l=v.useRef(!1);return g5(()=>{l.current=!0}),v.useCallback((d,f={})=>{if(oo(l.current,m5),!l.current)return;if(typeof d=="number"){n.go(d);return}let h=P0(d,JSON.parse(i),s,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:vs([t,h.pathname])),(f.replace?n.replace:n.push)(h,f.state,f)},[t,n,i,s,e])}v.createContext(null);function hu(e,{relative:t}={}){let{matches:n}=v.useContext(Jo),{pathname:r}=Zo(),s=JSON.stringify(T0(n));return v.useMemo(()=>P0(e,JSON.parse(s),r,t==="path"),[e,s,r,t])}function F4(e,t){return y5(e,t)}function y5(e,t,n,r,s){var S;jt(Al(),"useRoutes() may be used only in the context of a component.");let{navigator:i}=v.useContext(ao),{matches:l}=v.useContext(Jo),c=l[l.length-1],d=c?c.params:{},f=c?c.pathname:"/",h=c?c.pathnameBase:"/",m=c&&c.route;{let F=m&&m.path||"";v5(f,!m||F.endsWith("*")||F.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${f}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. -Please change the parent to .`)}let g=Zo(),b;if(t){let F=typeof t=="string"?kl(t):t;jt(h==="/"||((S=F.pathname)==null?void 0:S.startsWith(h)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${F.pathname}" was given in the \`location\` prop.`),b=F}else b=g;let C=b.pathname||"/",w=C;if(h!=="/"){let F=h.replace(/^\//,"").split("/");w="/"+C.replace(/^\//,"").split("/").slice(F.length).join("/")}let x=u5(e,{pathname:w});ro(m||x!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),ro(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let D=M4(x&&x.map(F=>Object.assign({},F,{params:Object.assign({},d,F.params),pathname:vs([h,i.encodeLocation?i.encodeLocation(F.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:F.pathname]),pathnameBase:F.pathnameBase==="/"?h:vs([h,i.encodeLocation?i.encodeLocation(F.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:F.pathnameBase])})),l,n,r,s);return t&&D?v.createElement(fu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},D):D}function F4(){let e=j4(),t=w4(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:i},"ErrorBoundary")," or"," ",v.createElement("code",{style:i},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:s},n):null,l)}var B4=v.createElement(F4,null),T4=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?v.createElement(Jo.Provider,{value:this.props.routeContext},v.createElement(P0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function P4({routeContext:e,match:t,children:n}){let r=v.useContext(xl);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),v.createElement(Jo.Provider,{value:e},n)}function M4(e,t=[],n=null,r=null,s=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,l=n==null?void 0:n.errors;if(l!=null){let h=i.findIndex(m=>m.route.id&&(l==null?void 0:l[m.route.id])!==void 0);jt(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),i=i.slice(0,Math.min(i.length,h+1))}let c=!1,d=-1;if(n)for(let h=0;h=0?i=i.slice(0,d+1):i=[i[0]];break}}}let f=n&&r?(h,m)=>{var g,b;r(h,{location:n.location,params:((b=(g=n.matches)==null?void 0:g[0])==null?void 0:b.params)??{},unstable_pattern:C4(n.matches),errorInfo:m})}:void 0;return i.reduceRight((h,m,g)=>{let b,C=!1,w=null,x=null;n&&(b=l&&m.route.id?l[m.route.id]:void 0,w=m.route.errorElement||B4,c&&(d<0&&g===0?(v5("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,x=null):d===g&&(C=!0,x=m.route.hydrateFallbackElement||null)));let D=t.concat(i.slice(0,g+1)),S=()=>{let F;return b?F=w:C?F=x:m.route.Component?F=v.createElement(m.route.Component,null):m.route.element?F=m.route.element:F=h,v.createElement(P4,{match:m,routeContext:{outlet:h,matches:D,isDataRoute:n!=null},children:F})};return n&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?v.createElement(T4,{location:n.location,revalidation:n.revalidation,component:w,error:b,children:S(),routeContext:{outlet:null,matches:D,isDataRoute:!0},onError:f}):S()},null)}function M0(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function L4(e){let t=v.useContext(xl);return jt(t,M0(e)),t}function R4(e){let t=v.useContext(dh);return jt(t,M0(e)),t}function _4(e){let t=v.useContext(Jo);return jt(t,M0(e)),t}function L0(e){let t=_4(e),n=t.matches[t.matches.length-1];return jt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function N4(){return L0("useRouteId")}function j4(){var r;let e=v.useContext(P0),t=R4("useRouteError"),n=L0("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function I4(){let{router:e}=L4("useNavigate"),t=L0("useNavigate"),n=v.useRef(!1);return g5(()=>{n.current=!0}),v.useCallback(async(s,i={})=>{ro(n.current,m5),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...i}))},[e,t])}var Eb={};function v5(e,t,n){!t&&!Eb[e]&&(Eb[e]=!0,ro(!1,n))}v.memo(O4);function O4({routes:e,future:t,state:n,unstable_onError:r}){return y5(e,void 0,n,r,t)}function $4({to:e,replace:t,state:n,relative:r}){jt(Al()," may be used only in the context of a component.");let{static:s}=v.useContext(ao);ro(!s," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:i}=v.useContext(Jo),{pathname:l}=Zo(),c=fh(),d=T0(e,B0(i),l,r==="path"),f=JSON.stringify(d);return v.useEffect(()=>{c(JSON.parse(f),{replace:t,state:n,relative:r})},[c,f,r,t,n]),null}function Jn(e){jt(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function z4({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:s,static:i=!1,unstable_useTransitions:l}){jt(!Al(),"You cannot render a inside another . You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),d=v.useMemo(()=>({basename:c,navigator:s,static:i,unstable_useTransitions:l,future:{}}),[c,s,i,l]);typeof n=="string"&&(n=kl(n));let{pathname:f="/",search:h="",hash:m="",state:g=null,key:b="default"}=n,C=v.useMemo(()=>{let w=xs(f,c);return w==null?null:{location:{pathname:w,search:h,hash:m,state:g,key:b},navigationType:r}},[c,f,h,m,g,b,r]);return ro(C!=null,` is not able to match the URL "${f}${h}${m}" because it does not start with the basename, so the won't render anything.`),C==null?null:v.createElement(ao.Provider,{value:d},v.createElement(fu.Provider,{children:t,value:C}))}function kb({children:e,location:t}){return S4(xg(e),t)}function xg(e,t=[]){let n=[];return v.Children.forEach(e,(r,s)=>{if(!v.isValidElement(r))return;let i=[...t,s];if(r.type===v.Fragment){n.push.apply(n,xg(r.props.children,i));return}jt(r.type===Jn,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),jt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=xg(r.props.children,i)),n.push(l)}),n}var Ff="get",Bf="application/x-www-form-urlencoded";function hh(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function V4(e){return hh(e)&&e.tagName.toLowerCase()==="button"}function H4(e){return hh(e)&&e.tagName.toLowerCase()==="form"}function U4(e){return hh(e)&&e.tagName.toLowerCase()==="input"}function W4(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function q4(e,t){return e.button===0&&(!t||t==="_self")&&!W4(e)}var Wd=null;function G4(){if(Wd===null)try{new FormData(document.createElement("form"),0),Wd=!1}catch{Wd=!0}return Wd}var K4=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gm(e){return e!=null&&!K4.has(e)?(ro(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Bf}"`),null):e}function Y4(e,t){let n,r,s,i,l;if(H4(e)){let c=e.getAttribute("action");r=c?xs(c,t):null,n=e.getAttribute("method")||Ff,s=gm(e.getAttribute("enctype"))||Bf,i=new FormData(e)}else if(V4(e)||U4(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a