From ee6a86cc67214add9bca4b938408d80a14833ecc Mon Sep 17 00:00:00 2001 From: Kion Fallah Date: Sun, 27 Sep 2026 17:09:47 -0700 Subject: [PATCH 1/3] Patch Capture dependencies for exp-mitmproxy post2 --- mitmproxy/tools/web/index.html | 8 +- .../{index-Be7e-cwP.js => index-CTA1_E-g.js} | 8 +- ...{index-DhPPoJ7G.css => index-D52D4jV-.css} | 2 +- mitmproxy/tools/web/static/vendor-BS4xPthR.js | 62 - mitmproxy/tools/web/static/vendor-CTu41YHR.js | 62 + .../tools/web/static/vendor-Cg3S-P9H.css | 1 - .../tools/web/static/vendor-CnwSaDiu.css | 1 + pyproject.toml | 11 +- uv.lock | 253 +- web/jest.config.js | 12 +- web/package-lock.json | 13266 +++++++--------- web/package.json | 9 +- 12 files changed, 6031 insertions(+), 7664 deletions(-) rename mitmproxy/tools/web/static/{index-Be7e-cwP.js => index-CTA1_E-g.js} (62%) rename mitmproxy/tools/web/static/{index-DhPPoJ7G.css => index-D52D4jV-.css} (62%) delete mode 100644 mitmproxy/tools/web/static/vendor-BS4xPthR.js create mode 100644 mitmproxy/tools/web/static/vendor-CTu41YHR.js delete mode 100644 mitmproxy/tools/web/static/vendor-Cg3S-P9H.css create mode 100644 mitmproxy/tools/web/static/vendor-CnwSaDiu.css diff --git a/mitmproxy/tools/web/index.html b/mitmproxy/tools/web/index.html index 74288b6128..938fc0c313 100644 --- a/mitmproxy/tools/web/index.html +++ b/mitmproxy/tools/web/index.html @@ -5,10 +5,10 @@ mitmproxy - - - - + + + +
diff --git a/mitmproxy/tools/web/static/index-Be7e-cwP.js b/mitmproxy/tools/web/static/index-CTA1_E-g.js similarity index 62% rename from mitmproxy/tools/web/static/index-Be7e-cwP.js rename to mitmproxy/tools/web/static/index-CTA1_E-g.js index 54b08644e2..a03e37b2e5 100644 --- a/mitmproxy/tools/web/static/index-Be7e-cwP.js +++ b/mitmproxy/tools/web/static/index-CTA1_E-g.js @@ -1,10 +1,10 @@ -import{c as fe,R as Cl,a as _e,r as I,b as Te,d as je,j as o,e as k,f as ui,u as Nl,g as kl,h as fi,s as Kt,i as El,l as Ht,k as Tl,m as Rl,n as Al,y as Dl,o as Fl,p as Il,q as zt,Q as Ll,t as Pl,P as Ol}from"./vendor-BS4xPthR.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const n of r)if(n.type==="childList")for(const l of n.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function s(r){const n={};return r.integrity&&(n.integrity=r.integrity),r.referrerPolicy&&(n.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?n.credentials="include":r.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(r){if(r.ep)return;r.ep=!0;const n=s(r);fetch(r.href,n)}})();const Ml={tab:"request",contentViewFor:{}},ql=fe({name:"ui/flow",initialState:Ml,reducers:{selectTab(t,e){t.tab=e.payload},setContentViewFor(t,e){t.contentViewFor[e.payload.messageId]=e.payload.contentView}}}),{actions:Hl,reducer:Vl}=ql,{selectTab:Ut,setContentViewFor:pi}=Hl;window.React=Cl;const hi=function(t){if(t===0)return"0";const e=["b","kb","mb","gb","tb"];let s=0;for(;st);s++);let i;return t%Math.pow(1024,s)===0?i=0:i=1,(t/Math.pow(1024,s)).toFixed(i)+e[s]},mi=function(t){let e=t;const s=["ms","s","min","h"],i=[1e3,60,60];let r=0;for(;Math.abs(e)>=i[r]&&r{const t=Ul("_mitmproxy_xsrf");return fs=()=>t,fs()};function ne(t,e={}){return e.method&&e.method!=="GET"&&(e.headers=e.headers||{},e.headers["X-XSRFToken"]=fs()),t.startsWith("/")&&(t="."+t),fetch(t,{credentials:"same-origin",...e})}ne.put=(t,e,s={})=>ne(t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),...s});ne.post=(t,e,s={})=>ne(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),...s});async function Bt(t,...e){return await(await ne(`/commands/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({arguments:e})})).json()}async function gi(t){try{await navigator.clipboard.write([new ClipboardItem({"text/plain":t})]);return}catch(i){console.warn(i)}const e=await t;try{await navigator.clipboard.writeText(e);return}catch(i){console.warn(i)}const s=document.createElement("textarea");s.value=e,s.style.position="absolute",s.style.opacity="0",document.body.appendChild(s);try{if(s.focus(),s.select(),!document.execCommand("copy"))throw"failed to copy"}catch{alert(e)}finally{s.remove()}}async function Bl(t){await gi(Promise.resolve(t?.text||""))}function ps(t,e){const s=t.lastIndexOf(e);if(s===-1)return["",t];const i=t.slice(0,s),r=t.slice(s+e.length);return[i,r]}function vi(t,e){const s=t.indexOf(e);if(s===-1)return[t,""];const i=t.slice(0,s),r=t.slice(s+e.length);return[i,r]}function Ct(t){throw new Error(`Unreachable: ${JSON.stringify(t)}`)}const xi={http:80,https:443},Vn=new WeakMap;class we{static getContentType(e){const s=we.get_first_header(e,/^Content-Type$/i);if(s)return s.split(";")[0].trim()}static get_first_header(e,s){let i=Vn.get(e);i||(i=new Map,Vn.set(e,i));let r=i.get(s);if(r===void 0){const n=e.headers.find(([l,a])=>s.test(l));r=n?n[1]:!1,i.set(s,r)}return r!==!1?r:void 0}static match_header(e,s){const i=e.headers;if(!i)return!1;let r=i.length;for(;r--;)if(s.test(i[r].join(" ")))return i[r];return!1}static getContentURL(e,s,i,r){e.type==="http"&&s===e.request?s="request":e.type==="http"&&s===e.response&&(s="response");const n=r?`?lines=${r}`:"";return`./flows/${e.id}/${s}/`+(i?`content/${encodeURIComponent(i)}.json${n}`:"content.data")}}class ct extends we{static pretty_url(e){let s="";return xi[e.scheme]!==e.port&&(s=":"+e.port),e.scheme+"://"+e.pretty_host+s+e.path}}class mt extends we{}const Wl=/^(?:(https?):\/\/)?([^/:]+)?(?::(\d+))?(\/.*)?$/i,_i=function(t){const e=Wl.exec(t);if(!e)return;const s=e[1],i=e[2],r=parseInt(e[3]),n=e[4],l=s?r||xi[s]:r,a={};return s&&(a.scheme=s),i&&(a.host=i),l&&(a.port=l),n&&(a.path=n),a},Kl=/^HTTP\/\d+(\.\d+)*$/i,ji=function(t){return Kl.test(t)};function Wt(t){switch(t.type){case"http":return t.request.timestamp_start;case"tcp":case"udp":return t.client_conn.timestamp_start;case"dns":return t.request.timestamp}}function yi(t){switch(t.type){case"http":if(t.websocket){if(t.websocket.timestamp_end)return t.websocket.timestamp_end;if(t.websocket.messages_meta.timestamp_last)return t.websocket.messages_meta.timestamp_last}return t.response?t.response.timestamp_end:void 0;case"tcp":return t.server_conn?.timestamp_end;case"udp":return t.messages_meta.timestamp_last;case"dns":return t.response?.timestamp}}const wi=t=>{switch(t.type){case"http":{let e=t.request.contentLength||0;return t.response&&(e+=t.response.contentLength||0),t.websocket&&(e+=t.websocket.messages_meta.contentLength||0),e}case"tcp":case"udp":return t.messages_meta.contentLength||0;case"dns":return t.response?.size??0}},xs=t=>t.type==="http"&&!t.websocket,bi=t=>t.modified,_s=t=>t.intercepted,Si=t=>{if(t.type!=="http")return t.client_conn.tls_version==="QUICv1"?"resource-icon-quic":`resource-icon-${t.type}`;if(t.websocket)return"resource-icon-websocket";if(!t.response)return"resource-icon-plain";const e=mt.getContentType(t.response)||"";return t.response.status_code===304?"resource-icon-not-modified":300<=t.response.status_code&&t.response.status_code<400?"resource-icon-redirect":e.indexOf("image")>=0?"resource-icon-image":e.indexOf("javascript")>=0?"resource-icon-js":e.indexOf("css")>=0?"resource-icon-css":e.indexOf("html")>=0?"resource-icon-document":"resource-icon-plain"},$i=t=>{switch(t.type){case"http":return ct.pretty_url(t.request);case"tcp":case"udp":return`${t.client_conn.peername.join(":")} ↔ ${t.server_conn?.address?.join(":")}`;case"dns":return`${t.request.questions.map(e=>`${e.name} ${e.type}`).join(", ")} = ${(t.response?.answers.map(e=>e.data).join(", ")??"...")||"?"}`}},Ci=t=>{switch(t.type){case"http":return t.response?.status_code;case"dns":return t.response?.response_code;default:return}},Ni=t=>{switch(t.type){case"http":return t.websocket?t.client_conn.tls_established?"WSS":"WS":t.request.method;case"dns":return t.request.op_code;default:return t.type.toUpperCase()}},ki=t=>{switch(t.type){case"http":return t.request.http_version;default:return""}},Ei={tls:t=>t.type==="http"&&t.request.scheme,icon:Si,index:()=>0,path:$i,method:Ni,version:ki,status:Ci,size:wi,time:t=>{const e=Wt(t),s=yi(t);return e&&s&&s-e},timestamp:Wt,quickactions:()=>0,comment:t=>t.comment};function zl(t){return t in Ei}var ve=(t=>(t.Search="search",t.Highlight="highlight",t))(ve||{});const Ti={search:"",highlight:""},Gl=fe({name:"ui/filters",initialState:Ti,reducers:{setFilter(t,e){t.search=e.payload},setHighlight(t,e){t.highlight=e.payload}}}),{actions:Yl,reducer:Jl}=Gl,{setFilter:Ri,setHighlight:Ai}=Yl;function rs(t,e){return t.toSorted?t.toSorted(e):[...t].sort(e)}function js(t,...e){if(t.toSpliced)return t.toSpliced(...e);{const s=[...t];return s.splice(...e),s}}function jt(t){return new Map(t.map((e,s)=>[e.id,s]))}function os(t){return new Set(t.map(e=>e.id))}function Un(t,e){return t.has(e)&&(t=new Set(t),t.delete(e)),t}function Bn(t,e,s){const i=js(t,s,1),r=new Map(e);r.delete(t[s].id);for(let n=i.length-1;n>=s;n--)r.set(i[n].id,n);return{view:i,_viewIndex:r}}function Ql(t,e,s,i){const r=[...t],n=r.length;let l=e,a=l.get(s.id);if(a+10){l=new Map(l);do{const d=r[a+1];r[a]=d,l.set(d.id,a),a++}while(a+10);l.set(s.id,a)}else if(a>0&&i(s,r[a-1])<0){l=new Map(l);do{const d=r[a-1];r[a]=d,l.set(d.id,a),a--}while(a>0&&i(s,r[a-1])<0);l.set(s.id,a)}return r[a]=s,{view:r,_viewIndex:l}}function Wn(t,e,s,i){const r=Xl(t,s,i),n=js(t,r,0,s),l=new Map(e);for(let a=n.length-1;a>=r;a--)l.set(n[a].id,a);return{view:n,_viewIndex:l}}function Xl(t,e,s){let i=0,r=t.length;if(r===0||s(t[r-1],e)<=0)return r;for(;i>>1;s(e,t[n])>=0?i=n+1:r=n}return i}function ys(t){return t=t.filter(_s),()=>Promise.all(t.map(e=>ne(`/flows/${e.id}/resume`,{method:"POST"})))}function Di(){return()=>ne("/flows/resume",{method:"POST"})}function Fi(t){return t=t.filter(_s),()=>Promise.all(t.map(e=>ne(`/flows/${e.id}/kill`,{method:"POST"})))}function Zl(){return()=>ne("/flows/kill",{method:"POST"})}function Ii(t){return()=>Promise.all(t.map(e=>ne(`/flows/${e.id}`,{method:"DELETE"})))}function Li(t){return()=>Promise.all(t.map(e=>ne(`/flows/${e.id}/duplicate`,{method:"POST"})))}function ws(t){return t=t.filter(xs),()=>Promise.all(t.map(e=>ne(`/flows/${e.id}/replay`,{method:"POST"})))}function Pi(t){return t=t.filter(bi),()=>Promise.all(t.map(e=>ne(`/flows/${e.id}/revert`,{method:"POST"})))}function Kn(t,e){return()=>Promise.all(t.map(s=>Le(s,{marked:e})()))}function Le(t,e){return()=>ne.put(`/flows/${t.id}`,e)}function ec(t,e,s){const i=new FormData;return e=new window.Blob([e],{type:"plain/text"}),i.append("file",e),()=>ne(`/flows/${t.id}/${s}/content.data`,{method:"POST",body:i})}function Oi(){return()=>ne("/clear",{method:"POST"})}function tc(t){const e=new FormData;return e.append("file",t),()=>ne("/flows/dump",{method:"POST",body:e})}const Mi=_e("flows/add"),qi=_e("flows/update"),Hi=_e("flows/remove"),bs=_e("flows/receive"),Vi=_e("flows/filterUpdate"),Ui=_e("flows/sort"),Ve=_e("flows/select"),sc={list:[],_listIndex:new Map,byId:new Map,view:[],_viewIndex:new Map,sort:{column:void 0,desc:!1},selected:[],selectedIds:new Set,highlightedIds:new Set};function nc(t=sc,e){if(bs.match(e)){const{sort:s}=t,i=e.payload,r=jt(i),n=new Map(i.map(h=>[h.id,h])),l=rs(i,pt(s)),a=jt(l),d=t.selected.map(h=>n.get(h.id)).filter(h=>h!==void 0),f=os(d);return{list:i,_listIndex:r,byId:n,view:l,_viewIndex:a,sort:s,selected:d,selectedIds:f,highlightedIds:new Set}}else if(Mi.match(e)){const{flow:s,matching_filters:i}=e.payload;if(t._listIndex.has(s.id))return t;const{sort:r,selected:n,selectedIds:l}=t;let{view:a,_viewIndex:d,highlightedIds:f}=t;const p=new Map(t._listIndex);p.set(s.id,t.list.length);const h=[...t.list,s],g=new Map(t.byId);return g.set(s.id,s),(i[ve.Search]===!0||i[ve.Search]===void 0)&&({view:a,_viewIndex:d}=Wn(a,d,s,pt(r))),i[ve.Highlight]===!0&&(f=new Set(f),f.add(s.id)),{list:h,_listIndex:p,byId:g,view:a,_viewIndex:d,sort:r,selected:n,selectedIds:l,highlightedIds:f}}else if(qi.match(e)){const{flow:s,matching_filters:i}=e.payload,{_listIndex:r,sort:n,selectedIds:l}=t;let{view:a,_viewIndex:d,selected:f,highlightedIds:p}=t;const h=t._listIndex.get(s.id),g=[...t.list];h!==void 0?g[h]=s:g.push(s);const _=new Map(t.byId);_.set(s.id,s);const j=d.get(s.id),y=j!==void 0,w=i[ve.Search]===!0||i[ve.Search]===void 0;return w&&!y?{view:a,_viewIndex:d}=Wn(a,d,s,pt(n)):!w&&y?{view:a,_viewIndex:d}=Bn(a,d,j):w&&y&&({view:a,_viewIndex:d}=Ql(a,d,s,pt(n))),l.has(s.id)&&(f=f.map($=>$.id===s.id?s:$)),i[ve.Highlight]===!0?p.has(s.id)||(p=new Set(p),p.add(s.id)):p=Un(p,s.id),{list:g,_listIndex:r,byId:_,view:a,_viewIndex:d,sort:n,selected:f,selectedIds:l,highlightedIds:p}}else if(Hi.match(e)){const s=e.payload,{sort:i}=t;let{view:r,_viewIndex:n,selected:l,selectedIds:a}=t;const d=t._listIndex.get(s);if(d===void 0)return t;const f=js(t.list,d,1),p=jt(f),h=new Map(t.byId);h.delete(s);const g=n.get(s);if(g!==void 0&&({view:r,_viewIndex:n}=Bn(r,n,g)),a.has(s)){if(l.length===1&&g!==void 0){const j=r[g]??r[g-1];l=j?[j]:[]}else l=l.filter(j=>j.id!==s);a=os(l)}const _=Un(t.highlightedIds,s);return{list:f,_listIndex:p,byId:h,view:r,_viewIndex:n,sort:i,selected:l,selectedIds:a,highlightedIds:_}}else if(Vi.match(e)){const{name:s,matching_flow_ids:i}=e.payload;switch(s){case ve.Search:{const r=rs(i===null?t.list:i.map(l=>t.byId.get(l)).filter(l=>l!==void 0),pt(t.sort)),n=jt(r);return{...t,view:r,_viewIndex:n}}case ve.Highlight:return{...t,highlightedIds:new Set(i)};default:Ct(s)}}else if(Ui.match(e)){const s=e.payload;let i;s.column?i=rs(t.view,pt(s)):i=t.list.filter(n=>t._viewIndex.has(n.id));const r=jt(i);return{...t,sort:s,view:i,_viewIndex:r}}else return Ve.match(e)?{...t,selected:e.payload,selectedIds:os(e.payload)}:t}function pt({column:t,desc:e}){if(!t)return(i,r)=>0;const s=Ei[t];return(i,r)=>{const n=s(i),l=s(r);return n>l?e?-1:1:n{const{flows:i}=s();i.selectedIds.has(t.id)?e(Ve(i.selected.filter(r=>r!==t))):e(Ve([...i.selected,t]))}}function rc(t){return(e,s)=>{const{flows:i}=s(),r=i.selected[i.selected.length-1],n=i._viewIndex.get(t.id),l=i._viewIndex.get(r?.id);if(n===void 0||l===void 0)return e(Ve([t]));let a;return n<=l?a=i.view.slice(n,l+1):(a=i.view.slice(l+1,n+1),a.push(r)),e(Ve(a))}}const oc={activeModal:void 0},Bi=fe({name:"ui/modal",initialState:oc,reducers:{setActiveModal(t,e){t.activeModal=e.payload},hideModal(t){t.activeModal=void 0}}}),{actions:lc,reducer:cc}=Bi,ac=Bi.actions.hideModal.type,{setActiveModal:dc,hideModal:Wi}=lc,zn=(()=>{const t=document.createElement("div");return t.setAttribute("contenteditable","PLAINTEXT-ONLY"),t.contentEditable==="plaintext-only"?"plaintext-only":"true"})();class ce extends I.Component{input=Te.createRef();render(){const e=je("inline-input",this.props.className);return o.jsx("span",{ref:this.input,tabIndex:0,className:e,placeholder:this.props.placeholder,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onInput:this.onInput,onPaste:this.onPaste,onMouseDown:this.onMouseDown,onClick:this.onClick,children:this.props.content})}componentDidUpdate(e){e.content!==this.props.content&&this.props.onInput?.(this.props.content)}isEditing=()=>this.input.current?.contentEditable===zn;startEditing=()=>{if(!this.input.current)return console.error("unreachable");this.isEditing()||(this.suppress_events=!0,this.input.current.blur(),this.input.current.contentEditable=zn,window.requestAnimationFrame(()=>{if(this.input.current){if(this.input.current.focus(),this.suppress_events=!1,this.props.selectAllOnClick){const e=document.createRange();e.selectNodeContents(this.input.current);const s=window.getSelection();s?.removeAllRanges(),s?.addRange(e)}this.props.onEditStart?.()}}))};resetValue=()=>{if(!this.input.current)return console.error("unreachable");this.input.current.textContent=this.props.content,this.props.onInput?.(this.props.content)};finishEditing=()=>{if(!this.input.current)return console.error("unreachable");this.props.onEditDone(this.input.current.textContent||""),this.input.current.blur(),this.input.current.contentEditable="inherit"};onPaste=e=>{e.preventDefault();const s=e.clipboardData.getData("text/plain");document.execCommand("insertHTML",!1,s)};suppress_events=!1;onMouseDown=e=>{this.suppress_events=!0,window.addEventListener("mouseup",this.onMouseUp,{once:!0})};onMouseUp=e=>{const s=e.target===this.input.current,i=!window.getSelection()?.toString();this.props.selectAllOnClick?s&&i&&this.startEditing():s&&this.startEditing(),this.suppress_events=!1};onClick=e=>{};onFocus=e=>{if(!this.input.current)throw"unreachable";this.suppress_events||this.startEditing()};onInput=e=>{this.props.onInput?.(this.input.current?.textContent||"")};onBlur=e=>{this.suppress_events||this.finishEditing()};onKeyDown=e=>{switch(e.stopPropagation(),e.key){case"Escape":e.preventDefault(),this.resetValue(),this.finishEditing();break;case"Enter":e.shiftKey||(e.preventDefault(),this.finishEditing());break}this.props.onKeyDown?.(e)}}function bt(t){const e=k.c(15);let s;e[0]!==t.content||e[1]!==t.isValid?(s=t.isValid(t.content),e[0]=t.content,e[1]=t.isValid,e[2]=s):s=e[2];const[i,r]=I.useState(s),n=I.useRef(null);let l;e[3]!==t?(l=_=>{t.isValid(_)?t.onEditDone(_):n.current?.resetValue()},e[3]=t,e[4]=l):l=e[4];const a=l,d=i?"has-success":"has-warning";let f;e[5]!==t.className||e[6]!==d?(f=je(t.className,d),e[5]=t.className,e[6]=d,e[7]=f):f=e[7];const p=f;let h;e[8]!==t?(h=_=>r(t.isValid(_)),e[8]=t,e[9]=h):h=e[9];let g;return e[10]!==p||e[11]!==a||e[12]!==t||e[13]!==h?(g=o.jsx(ce,{...t,className:p,onInput:h,onEditDone:a,ref:n}),e[10]=p,e[11]=a,e[12]=t,e[13]=h,e[14]=g):g=e[14],g}const G=()=>Nl(),D=kl,uc=ui.withTypes(),Ss=_e("EVENTS_ADD"),Ki=_e("EVENTS_RECEIVE"),Gt=_e("events/toggleVisibility"),zi=_e("events/toggleFilter");var Gi=(t=>(t.debug="debug",t.info="info",t.web="web",t.warn="warn",t.error="error",t))(Gi||{});const fc={visible:!1,filters:{debug:!1,info:!0,web:!0,warn:!0,error:!0},list:[],view:[]};function pc(t=fc,e){if(Ss.match(e)){const s=e.payload;return{...t,list:[...t.list,s],view:t.filters[s.level]?[...t.view,s]:t.view}}else{if(Ki.match(e))return{...t,list:e.payload,view:e.payload.filter(s=>t.filters[s.level])};if(Gt.match(e))return{...t,visible:!t.visible};if(zi.match(e)){const s={...t.filters,[e.payload]:!t.filters[e.payload]};return{...t,filters:s,view:t.list.filter(i=>s[i.level])}}else return t}}function hc(t,e="web"){return Ss({id:Math.random().toString(),message:t,level:e})}const Gn={},mc=fe({name:"ui/optionsEditor",initialState:Gn,reducers:{startUpdate(t,e){t[e.payload.option]={isUpdating:!0,value:e.payload.value,error:!1}},updateSuccess(t,e){t[e.payload.option]=void 0},updateError(t,e){let s=t[e.payload.option].value;typeof s=="boolean"&&(s=!s),t[e.payload.option]={value:s,isUpdating:!1,error:e.payload.error}}},extraReducers:t=>{t.addCase(ac,()=>Gn)}}),{actions:gc,reducer:vc}=mc,{startUpdate:xc,updateSuccess:_c,updateError:jc}=gc;var xe=(t=>(t[t.Capture=0]="Capture",t[t.FlowList=1]="FlowList",t[t.Options=2]="Options",t[t.Flow=3]="Flow",t))(xe||{});const yc=fe({name:"ui/tabs",initialState:{current:1},reducers:{setCurrent(t,e){t.current=e.payload}}}),{actions:wc,reducer:bc}=yc,{setCurrent:Vt}=wc,Sc=fi({flow:Vl,modal:cc,optionsEditor:vc,tabs:bc,filter:Jl});var wt=(t=>(t.INIT="CONNECTION_INIT",t.FETCHING="CONNECTION_FETCHING",t.ESTABLISHED="CONNECTION_ESTABLISHED",t.ERROR="CONNECTION_ERROR",t))(wt||{});const $c={state:"CONNECTION_INIT",message:void 0},Yi=fe({name:"connection",initialState:$c,reducers:{startFetching:t=>{t.state==="CONNECTION_INIT"&&(t.state="CONNECTION_FETCHING")},finishFetching:t=>{t.state==="CONNECTION_FETCHING"&&(t.state="CONNECTION_ESTABLISHED")},connectionError:(t,e)=>{t.state="CONNECTION_ERROR",t.message=e.payload}}}),{startFetching:Cc,finishFetching:Nc,connectionError:kc}=Yi.actions,Ec=Yi.reducer,Tc={add_upstream_certs_to_client_chain:!1,allow_hosts:[],anticache:!1,anticomp:!1,block_global:!0,block_list:[],block_private:!1,body_size_limit:void 0,cert_passphrase:void 0,certs:[],ciphers_client:void 0,ciphers_server:void 0,client_certs:void 0,client_replay:[],client_replay_concurrency:1,command_history:!0,confdir:"~/.mitmproxy",connect_addr:void 0,connection_strategy:"eager",console_focus_follow:!1,content_view_lines_cutoff:512,dns_name_servers:[],dns_use_hosts_file:!0,export_preserve_original_ip:!1,hardump:"",http2:!0,http2_ping_keepalive:58,http3:!0,http_connect_send_host_header:!0,ignore_hosts:[],intercept:void 0,intercept_active:!1,keep_alt_svc_header:!1,keep_host_header:!1,key_size:2048,listen_host:"",listen_port:void 0,map_local:[],map_remote:[],mode:["regular"],modify_body:[],modify_headers:[],normalize_outbound_headers:!0,onboarding:!0,onboarding_host:"mitm.it",protobuf_definitions:void 0,proxy_debug:!1,proxyauth:void 0,rawtcp:!0,readfile_filter:void 0,request_client_cert:!1,rfile:void 0,save_stream_file:void 0,save_stream_filter:void 0,scripts:[],server:!0,server_replay:[],server_replay_extra:"forward",server_replay_ignore_content:!1,server_replay_ignore_host:!1,server_replay_ignore_params:[],server_replay_ignore_payload_params:[],server_replay_ignore_port:!1,server_replay_kill_extra:!1,server_replay_nopop:!1,server_replay_refresh:!0,server_replay_reuse:!1,server_replay_use_headers:[],show_ignored_hosts:!1,showhost:!1,ssl_insecure:!1,ssl_verify_upstream_trusted_ca:void 0,ssl_verify_upstream_trusted_confdir:void 0,stickyauth:void 0,stickycookie:void 0,store_streamed_bodies:!1,stream_large_bodies:void 0,strip_ech:!0,tcp_hosts:[],tcp_timeout:600,termlog_verbosity:"info",tls_ecdh_curve_client:void 0,tls_ecdh_curve_server:void 0,tls_version_client_max:"UNBOUNDED",tls_version_client_min:"TLS1_2",tls_version_server_max:"UNBOUNDED",tls_version_server_min:"TLS1_2",udp_hosts:[],upstream_auth:void 0,upstream_cert:!0,validate_inbound_headers:!0,view_filter:void 0,view_order:"time",view_order_reversed:!1,web_columns:["tls","icon","path","method","status","size","time"],web_debug:!1,web_host:"127.0.0.1",web_open_browser:!0,web_password:"",web_port:8081,web_static_viewer:"",websocket:!0},Yt=_e("OPTIONS_RECEIVE"),$s=_e("OPTIONS_UPDATE"),Rc=fe({name:"options",initialState:Tc,reducers:{},extraReducers:t=>{t.addCase(Yt,(e,s)=>{const i={};for(const[r,{value:n}]of Object.entries(s.payload))i[r]=n;return i}).addCase($s,(e,s)=>{for(const[i,{value:r}]of Object.entries(s.payload))e[i]=r})}}),Ac=Rc.reducer;async function Dc(t,e,s){try{const i=await ne.put("/options",{[t]:e});if(i.status===200)s(_c({option:t}));else throw await i.text()}catch(i){s(jc({option:t,error:i.toString()}))}}const Fc=Dc;function Cs(t,e){return s=>{s(xc({option:t,value:e})),Fc(t,e,s)}}const Ic={visible:!1},Lc=fe({name:"commandBar",initialState:Ic,reducers:{toggleVisibility(t){t.visible=!t.visible}}}),{actions:Pc,reducer:Oc}=Lc,{toggleVisibility:Ji}=Pc,Ue=_e("STATE_RECEIVE"),Be=_e("STATE_UPDATE"),Mc={available:!1,version:"",contentViews:[],servers:{},platform:"",localModeUnavailable:null},qc=fe({name:"backendState",initialState:Mc,reducers:{},extraReducers:t=>{t.addCase(Ue,(e,s)=>({...e,available:!0,...s.payload})).addCase(Be,(e,s)=>({...e,...s.payload}))}}),Hc=qc.reducer,Vc={},Uc=fe({name:"optionsMeta",initialState:Vc,reducers:{},extraReducers:t=>{t.addCase(Yt,(e,s)=>s.payload).addCase($s,(e,s)=>({...e,...s.payload}))}}),Bc=Uc.reducer,dt=(t,e)=>e.listen_host&&e.listen_port?`${t}@${e.listen_host}:${e.listen_port}`:e.listen_port?`${t}@${e.listen_port}`:t,Qi=t=>{let[e,s]=ps(t,"@");e||(e=s,s="");const[i,r]=vi(e,":");let n,l;if(s){let a;if(s.includes(":")?[n,a]=ps(s,":"):(n="",a=s),a&&(l=parseInt(a,10),isNaN(l)||l<0||l>65535))throw new Error(`invalid port: ${a}`)}return{full_spec:t,name:i,data:r,listen_host:n,listen_port:l}},Xi=t=>dt("regular",t),Yn=({listen_host:t,listen_port:e})=>({ui_id:Math.random(),active:!0,listen_host:t,listen_port:e}),Zi=t=>t.selectedProcesses?`local:${t.selectedProcesses}`:"local",Jn=({data:t})=>({ui_id:Math.random(),active:!0,selectedProcesses:t}),er=t=>{const e=t.file_path?`wireguard:${t.file_path}`:"wireguard";return dt(e,t)},Qn=({data:t,listen_host:e,listen_port:s})=>({ui_id:Math.random(),active:!0,listen_host:e,listen_port:s,file_path:t});var Jt=(t=>(t.HTTP="http",t.HTTPS="https",t.HTTP3="http3",t.TLS="tls",t.DTLS="dtls",t.TCP="tcp",t.UDP="udp",t.DNS="dns",t.QUIC="quic",t))(Jt||{}),ot=(t=>(t.CSS="css",t.JAVASCRIPT="javascript",t.XML="xml",t.YAML="yaml",t.NONE="none",t.ERROR="error",t))(ot||{});const hs=()=>({active:!1,protocol:Jt.HTTPS,destination:"",ui_id:Math.random()}),Ns=t=>dt(`reverse:${t.protocol}://${t.destination}`,t),Wc=({data:t,listen_host:e,listen_port:s})=>{let[i,r]=vi(t,"://");return r||(r=i,i=Jt.HTTPS),{ui_id:Math.random(),active:!0,protocol:i,destination:r,listen_host:e,listen_port:s}},tr=t=>dt("transparent",t),Xn=({listen_host:t,listen_port:e})=>({ui_id:Math.random(),active:!0,listen_host:t,listen_port:e}),sr=t=>dt("socks5",t),Zn=({listen_host:t,listen_port:e})=>({ui_id:Math.random(),active:!0,listen_host:t,listen_port:e}),nr=t=>dt(`upstream:${t.destination}`,t),ei=({data:t,listen_host:e,listen_port:s})=>({ui_id:Math.random(),active:!0,destination:t||"",listen_host:e,listen_port:s}),ir=t=>dt("dns",t),ti=({listen_host:t,listen_port:e})=>({ui_id:Math.random(),active:!0,listen_host:t,listen_port:e}),Xe=t=>t.active&&!t.error;async function Kc(t,e){const s=e.getState().modes,i=[...s.regular.filter(Xe).map(Xi),...s.local.filter(Xe).map(Zi),...s.wireguard.filter(Xe).map(er),...s.reverse.filter(Xe).map(Ns),...s.transparent.filter(Xe).map(tr),...s.socks.filter(Xe).map(sr),...s.upstream.filter(Xe).map(nr),...s.dns.filter(Xe).map(ir)],r=await ne.put("/options",{mode:i});if(r.status!==200)throw new Error(await r.text())}function ie(t){return uc(t,Kc)}function se(t,e,s){t.addCase(s.pending,(i,r)=>{const{server:n,value:l}=r.meta.arg,a=i.findIndex(d=>d.ui_id===n.ui_id);a>=0&&(i[a][e]=l,i[a].error=void 0)}),t.addCase(s.rejected,(i,r)=>{const{server:n}=r.meta.arg,l=i.findIndex(a=>a.ui_id===n.ui_id);l>=0&&(i[l].error=r.error.message)})}function be(t,e){return function(i,r){if(r.payload.servers){const n=Object.values(r.payload.servers).filter(l=>l.type===t).map(l=>Qi(l.full_spec));if(n.length>0)return n.map(e);for(const l of i)l.active=!1}}}const rr=ie("modes/regular/setActive"),or=ie("modes/regular/setListenHost"),lr=ie("modes/regular/setListenPort"),zc=[{active:!0,ui_id:Math.random()}],Gc=fe({name:"modes/regular",initialState:zc,reducers:{},extraReducers:t=>{se(t,"active",rr),se(t,"listen_host",or),se(t,"listen_port",lr),t.addCase(Ue,be("regular",Yn)),t.addCase(Be,be("regular",Yn))}}),Yc=Gc.reducer,cr=ie("modes/local/setActive"),St=ie("modes/local/setSelectedProcesses"),Jc=[{active:!1,selectedProcesses:"",ui_id:Math.random()}],Qc=fe({name:"modes/local",initialState:Jc,reducers:{},extraReducers:t=>{se(t,"active",cr),se(t,"selectedProcesses",St),t.addCase(Ue,be("local",Jn)),t.addCase(Be,be("local",Jn))}}),Xc=Qc.reducer,ar=ie("modes/wireguard/setActive"),dr=ie("modes/wireguard/setListenHost"),ur=ie("modes/wireguard/setListenPort"),fr=ie("modes/wireguard/setFilePath"),Zc=[{active:!1,ui_id:Math.random()}],ea=fe({name:"modes/wireguard",initialState:Zc,reducers:{},extraReducers:t=>{se(t,"active",ar),se(t,"listen_host",dr),se(t,"listen_port",ur),se(t,"file_path",fr),t.addCase(Ue,be("wireguard",Qn)),t.addCase(Be,be("wireguard",Qn))}}),ta=ea.reducer,ms=ie("modes/reverse/setActive"),pr=ie("modes/reverse/setListenHost"),hr=ie("modes/reverse/setListenPort"),mr=ie("modes/reverse/setProtocol"),gr=ie("modes/reverse/setDestination"),sa=[hs()],vr=fe({name:"modes/reverse",initialState:sa,reducers:{addServer:t=>{t.push(hs())},removeServer:(t,e)=>{const s=t.findIndex(i=>i.ui_id===e.payload.ui_id);s!==-1&&(t[s].active&&console.error("servers should be deactivated before removal"),t.splice(s,1))}},extraReducers:t=>{se(t,"active",ms),se(t,"listen_host",pr),se(t,"listen_port",hr),se(t,"protocol",mr),se(t,"destination",gr),t.addCase(Ue,e),t.addCase(Be,e);function e(s,i){if(i.payload.servers){const r=Object.fromEntries(Object.entries(i.payload.servers).filter(([l,a])=>a.type==="reverse").map(([l,a])=>[l,Qi(l)])),n=[];for(const l of s){const a=Ns(l),d=a in r;delete r[a],n.push({...l,active:d})}for(const l of Object.values(r))n.push(Wc(l));return n.length>1&&Kt({...n[0],ui_id:void 0},{...hs(),ui_id:void 0})&&n.shift(),n}}}}),{addServer:na,removeServer:ia}=vr.actions,ra=vr.reducer,xr=ie("modes/transparent/setActive"),_r=ie("modes/transparent/setListenHost"),jr=ie("modes/transparent/setListenPort"),oa=[{active:!1,ui_id:Math.random()}],la=fe({name:"modes/transparent",initialState:oa,reducers:{},extraReducers:t=>{se(t,"active",xr),se(t,"listen_host",_r),se(t,"listen_port",jr),t.addCase(Ue,be("transparent",Xn)),t.addCase(Be,be("transparent",Xn))}}),ca=la.reducer,yr=ie("modes/socks5/setActive"),wr=ie("modes/socks5/setListenHost"),br=ie("modes/socks5/setListenPort"),aa=[{active:!1,ui_id:Math.random()}],da=fe({name:"modes/socks5",initialState:aa,reducers:{},extraReducers:t=>{se(t,"active",yr),se(t,"listen_host",wr),se(t,"listen_port",br),t.addCase(Ue,be("socks5",Zn)),t.addCase(Be,be("socks5",Zn))}}),ua=da.reducer,Sr=ie("modes/upstream/setActive"),$r=ie("modes/upstream/setListenHost"),Cr=ie("modes/upstream/setListenPort"),Nr=ie("modes/upstream/setDestination"),fa=[{active:!1,destination:"",ui_id:Math.random()}],pa=fe({name:"modes/upstream",initialState:fa,reducers:{},extraReducers:t=>{se(t,"active",Sr),se(t,"listen_host",$r),se(t,"listen_port",Cr),se(t,"destination",Nr),t.addCase(Ue,be("upstream",ei)),t.addCase(Be,be("upstream",ei))}}),ha=pa.reducer,kr=ie("modes/dns/setActive"),Er=ie("modes/dns/setListenHost"),Tr=ie("modes/dns/setListenPort"),ma=[{active:!0,ui_id:Math.random()}],ga=fe({name:"modes/dns",initialState:ma,reducers:{},extraReducers:t=>{se(t,"active",kr),se(t,"listen_host",Er),se(t,"listen_port",Tr),t.addCase(Ue,be("dns",ti)),t.addCase(Be,be("dns",ti))}}),va=ga.reducer,xa=fi({regular:Yc,local:Xc,wireguard:ta,reverse:ra,transparent:ca,socks:ua,upstream:ha,dns:va}),$t=ui("fetchProcesses",async(t,{rejectWithValue:e})=>{try{return(await ne("/processes")).json()}catch(s){return e(s.message)}}),_a={currentProcesses:[],isLoading:!1},ja=fe({name:"processes",initialState:_a,reducers:{},extraReducers:t=>{t.addCase($t.pending,e=>{e.isLoading=!0,e.error=void 0}),t.addCase($t.fulfilled,(e,s)=>{e.isLoading=!1,e.currentProcesses=s.payload}),t.addCase($t.rejected,(e,s)=>{e.isLoading=!1,e.error=s.payload})}}),ya=ja.reducer,wa={commandBar:Oc,eventLog:pc,flows:nc,connection:Ec,modes:xa,ui:Sc,options:Ac,options_meta:Bc,backendState:Hc,processes:ya},ba={immutableCheck:{warnAfter:5e5},serializableCheck:{warnAfter:5e5,ignoredPaths:["flows"]}},Nt=El({reducer:wa,middleware:t=>t(ba),devTools:!1});class Sa extends I.Component{container=Te.createRef();nameInput=Te.createRef();valueInput=Te.createRef();render=()=>{const[e,s]=this.props.item;return o.jsxs("div",{ref:this.container,className:"kv-row",onClick:this.onClick,onKeyDownCapture:this.onKeyDown,children:[o.jsx(ce,{ref:this.nameInput,className:"kv-key",content:e,onEditStart:this.props.onEditStart,onEditDone:i=>this.props.onEditDone([i,s]),selectAllOnClick:!0}),": ",o.jsx(ce,{ref:this.valueInput,className:"kv-value",content:s,onEditStart:this.props.onEditStart,onEditDone:i=>this.props.onEditDone([e,i]),placeholder:"empty",selectAllOnClick:!0})]})};onClick=e=>{e.target===this.container.current&&this.props.onClickEmptyArea()};onKeyDown=e=>{e.target===this.valueInput.current?.input.current&&e.key==="Tab"&&this.props.onTabNext()}}class Rr extends I.Component{rowRefs={};currentlyEditing;justFinishedEditing;state={currentList:this.props.data||[],initialList:this.props.data};static getDerivedStateFromProps(e,s){return e.data!==s.initialList?{currentList:e.data||[],initialList:e.data}:null}render=()=>{this.rowRefs={};const e=this.state.currentList.map((s,i)=>o.jsx(Sa,{item:s,onEditStart:()=>this.currentlyEditing=i,onEditDone:r=>this.onEditDone(i,r),onClickEmptyArea:()=>this.onClickEmptyArea(i),onTabNext:()=>this.onTabNext(i),ref:r=>{this.rowRefs[i]=r}},i));return o.jsxs("div",{className:je("kv-editor",this.props.className),onMouseDown:this.onMouseDown,children:[e,o.jsx("div",{onClick:s=>{s.preventDefault(),this.onClickEmptyArea(this.state.currentList.length-1)},className:"kv-add-row fa fa-plus-square-o",role:"button","aria-label":"Add"})]})};onEditDone=(e,s)=>{const i=[...this.state.currentList];s[0]?i[e]=s:i.splice(e,1),this.currentlyEditing=void 0,Ht.isEqual(this.state.currentList,i)||this.props.onChange(i),this.setState({currentList:i})};onClickEmptyArea=e=>{if(this.justFinishedEditing)return;const s=[...this.state.currentList];s.splice(e+1,0,["",""]),this.setState({currentList:s},()=>this.rowRefs[e+1]?.nameInput.current?.startEditing())};onTabNext=e=>{e==this.state.currentList.length-1&&this.onClickEmptyArea(e)};onMouseDown=e=>{this.justFinishedEditing=this.currentlyEditing}}function Ar(t,e){const s=k.c(6),[i,r]=I.useState(),[n,l]=I.useState();let a;s[0]!==n||s[1]!==t?(a=()=>{n&&n.abort();const f=new AbortController;return ne(t,{signal:f.signal}).then($a).then(p=>{r(p)}).catch(p=>{f.signal.aborted||r(`Error getting content: ${p}.`)}),l(f),()=>{f.signal.aborted||f.abort()}},s[0]=n,s[1]=t,s[2]=a):a=s[2];let d;return s[3]!==e||s[4]!==t?(d=[t,e],s[3]=e,s[4]=t,s[5]=d):d=s[5],I.useEffect(a,d),i}function $a(t){if(!t.ok)throw`${t.status} ${t.statusText}`.trim();return t.text()}function Dr(t,e,s,i,r){const n=k.c(11);let l;n[0]!==t||n[1]!==i||n[2]!==e||n[3]!==s?(l=we.getContentURL(t,e,s,i),n[0]=t,n[1]=i,n[2]=e,n[3]=s,n[4]=l):l=n[4];const d=Ar(l,r);let f;if(d)try{let p;n[5]!==d?(p=JSON.parse(d),n[5]=d,n[6]=p):p=n[6],f=p}catch{let p;n[7]!==d?(p={text:d,description:"Network Error",syntax_highlight:"error",view_name:"raw"},n[7]=d,n[8]=p):p=n[8];const h=p;if(e==="messages"){let g;n[9]!==h?(g=[h],n[9]=h,n[10]=g):g=n[10],f=g}else f=h}else f=void 0;return f}const Fr=Te.memo(function({icon:e,text:s,className:i,title:r,onOpenFile:n,onClick:l}){let a;return o.jsxs("a",{href:"#",onClick:d=>{a.click(),l&&l(d)},className:i,title:r,children:[o.jsx("i",{className:"fa fa-fw "+e}),s,o.jsx("input",{ref:d=>{a=d},className:"hidden",type:"file",onChange:d=>{d.preventDefault(),d.target.files&&d.target.files.length>0&&n(d.target.files[0]),a.value=""}})]})});function pe(t){const e=k.c(11),{onClick:s,children:i,icon:r,disabled:n,className:l,title:a}=t;let d;e[0]!==l?(d=je(l,"btn btn-default"),e[0]=l,e[1]=d):d=e[1];const f=n?void 0:s;let p;e[2]!==r?(p=r&&o.jsxs(o.Fragment,{children:[o.jsx("i",{className:"fa "+r})," "]}),e[2]=r,e[3]=p):p=e[3];let h;return e[4]!==i||e[5]!==n||e[6]!==d||e[7]!==f||e[8]!==p||e[9]!==a?(h=o.jsxs("button",{className:d,onClick:f,disabled:n,title:a,children:[p,i]}),e[4]=i,e[5]=n,e[6]=d,e[7]=f,e[8]=p,e[9]=a,e[10]=h):h=e[10],h}function Ca(t){const e=k.c(11),{initialContent:s,onChange:i,language:r,readonly:n}=t,l=n===void 0?!1:n,a=Na;let d;e:switch(r){case ot.YAML:{let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=[Dl()],e[0]=h):h=e[0],d=h;break e}case ot.XML:{let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=[Al()],e[1]=h):h=e[1],d=h;break e}case ot.JAVASCRIPT:{let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=[Rl()],e[2]=h):h=e[2],d=h;break e}case ot.CSS:{let h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h=[Tl()],e[3]=h):h=e[3],d=h;break e}case void 0:case null:case ot.NONE:case ot.ERROR:{let h;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=[],e[4]=h):h=e[4],d=h;break e}default:{console.error("Unexpected syntax highlighting language: ",r);let g;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=[],e[5]=g):g=e[5],d=g}}const f=d;let p;return e[6]!==f||e[7]!==s||e[8]!==i||e[9]!==l?(p=o.jsx("div",{className:"codeeditor",onKeyDown:a,children:o.jsx(Fl,{value:s,onChange:i,readOnly:l,extensions:f})}),e[6]=f,e[7]=s,e[8]=i,e[9]=l,e[10]=p):p=e[10],p}function Na(t){return t.stopPropagation()}const Ir=Te.memo(function(e){const s=k.c(9),{content:i,maxLines:r,showMore:n}=e;if(i.length===0)return null;let l;if(s[0]!==i||s[1]!==r||s[2]!==n){let d;s[4]!==r||s[5]!==n?(d=(f,p)=>p===r?o.jsxs("button",{onClick:n,className:"btn btn-xs btn-info",children:[o.jsx("i",{className:"fa fa-angle-double-down","aria-hidden":"true"})," ","Show more"]},"showmore"):o.jsx("div",{children:f},p),s[4]=r,s[5]=n,s[6]=d):d=s[6],l=i.split(` +import{c as fe,R as Cl,a as _e,r as I,b as Te,d as je,j as o,e as k,f as ui,u as Nl,g as kl,h as fi,s as Kt,i as El,l as Ht,k as Tl,m as Rl,n as Al,y as Dl,o as Fl,p as Il,q as zt,Q as Ll,t as Pl,P as Ol}from"./vendor-CTu41YHR.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const n of r)if(n.type==="childList")for(const l of n.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function s(r){const n={};return r.integrity&&(n.integrity=r.integrity),r.referrerPolicy&&(n.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?n.credentials="include":r.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(r){if(r.ep)return;r.ep=!0;const n=s(r);fetch(r.href,n)}})();const Ml={tab:"request",contentViewFor:{}},ql=fe({name:"ui/flow",initialState:Ml,reducers:{selectTab(t,e){t.tab=e.payload},setContentViewFor(t,e){t.contentViewFor[e.payload.messageId]=e.payload.contentView}}}),{actions:Hl,reducer:Vl}=ql,{selectTab:Ut,setContentViewFor:pi}=Hl;window.React=Cl;const hi=function(t){if(t===0)return"0";const e=["b","kb","mb","gb","tb"];let s=0;for(;st);s++);let i;return t%Math.pow(1024,s)===0?i=0:i=1,(t/Math.pow(1024,s)).toFixed(i)+e[s]},mi=function(t){let e=t;const s=["ms","s","min","h"],i=[1e3,60,60];let r=0;for(;Math.abs(e)>=i[r]&&r{const t=Ul("_mitmproxy_xsrf");return fs=()=>t,fs()};function ne(t,e={}){return e.method&&e.method!=="GET"&&(e.headers=e.headers||{},e.headers["X-XSRFToken"]=fs()),t.startsWith("/")&&(t="."+t),fetch(t,{credentials:"same-origin",...e})}ne.put=(t,e,s={})=>ne(t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),...s});ne.post=(t,e,s={})=>ne(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),...s});async function Bt(t,...e){return await(await ne(`/commands/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({arguments:e})})).json()}async function gi(t){try{await navigator.clipboard.write([new ClipboardItem({"text/plain":t})]);return}catch(i){console.warn(i)}const e=await t;try{await navigator.clipboard.writeText(e);return}catch(i){console.warn(i)}const s=document.createElement("textarea");s.value=e,s.style.position="absolute",s.style.opacity="0",document.body.appendChild(s);try{if(s.focus(),s.select(),!document.execCommand("copy"))throw"failed to copy"}catch{alert(e)}finally{s.remove()}}async function Bl(t){await gi(Promise.resolve(t?.text||""))}function ps(t,e){const s=t.lastIndexOf(e);if(s===-1)return["",t];const i=t.slice(0,s),r=t.slice(s+e.length);return[i,r]}function vi(t,e){const s=t.indexOf(e);if(s===-1)return[t,""];const i=t.slice(0,s),r=t.slice(s+e.length);return[i,r]}function Ct(t){throw new Error(`Unreachable: ${JSON.stringify(t)}`)}const xi={http:80,https:443},Vn=new WeakMap;class we{static getContentType(e){const s=we.get_first_header(e,/^Content-Type$/i);if(s)return s.split(";")[0].trim()}static get_first_header(e,s){let i=Vn.get(e);i||(i=new Map,Vn.set(e,i));let r=i.get(s);if(r===void 0){const n=e.headers.find(([l,a])=>s.test(l));r=n?n[1]:!1,i.set(s,r)}return r!==!1?r:void 0}static match_header(e,s){const i=e.headers;if(!i)return!1;let r=i.length;for(;r--;)if(s.test(i[r].join(" ")))return i[r];return!1}static getContentURL(e,s,i,r){e.type==="http"&&s===e.request?s="request":e.type==="http"&&s===e.response&&(s="response");const n=r?`?lines=${r}`:"";return`./flows/${e.id}/${s}/`+(i?`content/${encodeURIComponent(i)}.json${n}`:"content.data")}}class ct extends we{static pretty_url(e){let s="";return xi[e.scheme]!==e.port&&(s=":"+e.port),e.scheme+"://"+e.pretty_host+s+e.path}}class mt extends we{}const Wl=/^(?:(https?):\/\/)?([^/:]+)?(?::(\d+))?(\/.*)?$/i,_i=function(t){const e=Wl.exec(t);if(!e)return;const s=e[1],i=e[2],r=parseInt(e[3]),n=e[4],l=s?r||xi[s]:r,a={};return s&&(a.scheme=s),i&&(a.host=i),l&&(a.port=l),n&&(a.path=n),a},Kl=/^HTTP\/\d+(\.\d+)*$/i,ji=function(t){return Kl.test(t)};function Wt(t){switch(t.type){case"http":return t.request.timestamp_start;case"tcp":case"udp":return t.client_conn.timestamp_start;case"dns":return t.request.timestamp}}function yi(t){switch(t.type){case"http":if(t.websocket){if(t.websocket.timestamp_end)return t.websocket.timestamp_end;if(t.websocket.messages_meta.timestamp_last)return t.websocket.messages_meta.timestamp_last}return t.response?t.response.timestamp_end:void 0;case"tcp":return t.server_conn?.timestamp_end;case"udp":return t.messages_meta.timestamp_last;case"dns":return t.response?.timestamp}}const wi=t=>{switch(t.type){case"http":{let e=t.request.contentLength||0;return t.response&&(e+=t.response.contentLength||0),t.websocket&&(e+=t.websocket.messages_meta.contentLength||0),e}case"tcp":case"udp":return t.messages_meta.contentLength||0;case"dns":return t.response?.size??0}},xs=t=>t.type==="http"&&!t.websocket,bi=t=>t.modified,_s=t=>t.intercepted,Si=t=>{if(t.type!=="http")return t.client_conn.tls_version==="QUICv1"?"resource-icon-quic":`resource-icon-${t.type}`;if(t.websocket)return"resource-icon-websocket";if(!t.response)return"resource-icon-plain";const e=mt.getContentType(t.response)||"";return t.response.status_code===304?"resource-icon-not-modified":300<=t.response.status_code&&t.response.status_code<400?"resource-icon-redirect":e.indexOf("image")>=0?"resource-icon-image":e.indexOf("javascript")>=0?"resource-icon-js":e.indexOf("css")>=0?"resource-icon-css":e.indexOf("html")>=0?"resource-icon-document":"resource-icon-plain"},$i=t=>{switch(t.type){case"http":return ct.pretty_url(t.request);case"tcp":case"udp":return`${t.client_conn.peername.join(":")} ↔ ${t.server_conn?.address?.join(":")}`;case"dns":return`${t.request.questions.map(e=>`${e.name} ${e.type}`).join(", ")} = ${(t.response?.answers.map(e=>e.data).join(", ")??"...")||"?"}`}},Ci=t=>{switch(t.type){case"http":return t.response?.status_code;case"dns":return t.response?.response_code;default:return}},Ni=t=>{switch(t.type){case"http":return t.websocket?t.client_conn.tls_established?"WSS":"WS":t.request.method;case"dns":return t.request.op_code;default:return t.type.toUpperCase()}},ki=t=>t.type==="http"?t.request.http_version:"",Ei={tls:t=>t.type==="http"&&t.request.scheme,icon:Si,index:()=>0,path:$i,method:Ni,version:ki,status:Ci,size:wi,time:t=>{const e=Wt(t),s=yi(t);return e&&s&&s-e},timestamp:Wt,quickactions:()=>0,comment:t=>t.comment};function zl(t){return t in Ei}var ve=(t=>(t.Search="search",t.Highlight="highlight",t))(ve||{});const Ti={search:"",highlight:""},Gl=fe({name:"ui/filters",initialState:Ti,reducers:{setFilter(t,e){t.search=e.payload},setHighlight(t,e){t.highlight=e.payload}}}),{actions:Yl,reducer:Jl}=Gl,{setFilter:Ri,setHighlight:Ai}=Yl;function rs(t,e){return t.toSorted?t.toSorted(e):[...t].sort(e)}function js(t,...e){if(t.toSpliced)return t.toSpliced(...e);{const s=[...t];return s.splice(...e),s}}function jt(t){return new Map(t.map((e,s)=>[e.id,s]))}function os(t){return new Set(t.map(e=>e.id))}function Un(t,e){return t.has(e)&&(t=new Set(t),t.delete(e)),t}function Bn(t,e,s){const i=js(t,s,1),r=new Map(e);r.delete(t[s].id);for(let n=i.length-1;n>=s;n--)r.set(i[n].id,n);return{view:i,_viewIndex:r}}function Ql(t,e,s,i){const r=[...t],n=r.length;let l=e,a=l.get(s.id);if(a+10){l=new Map(l);do{const d=r[a+1];r[a]=d,l.set(d.id,a),a++}while(a+10);l.set(s.id,a)}else if(a>0&&i(s,r[a-1])<0){l=new Map(l);do{const d=r[a-1];r[a]=d,l.set(d.id,a),a--}while(a>0&&i(s,r[a-1])<0);l.set(s.id,a)}return r[a]=s,{view:r,_viewIndex:l}}function Wn(t,e,s,i){const r=Xl(t,s,i),n=js(t,r,0,s),l=new Map(e);for(let a=n.length-1;a>=r;a--)l.set(n[a].id,a);return{view:n,_viewIndex:l}}function Xl(t,e,s){let i=0,r=t.length;if(r===0||s(t[r-1],e)<=0)return r;for(;i>>1;s(e,t[n])>=0?i=n+1:r=n}return i}function ys(t){return t=t.filter(_s),()=>Promise.all(t.map(e=>ne(`/flows/${e.id}/resume`,{method:"POST"})))}function Di(){return()=>ne("/flows/resume",{method:"POST"})}function Fi(t){return t=t.filter(_s),()=>Promise.all(t.map(e=>ne(`/flows/${e.id}/kill`,{method:"POST"})))}function Zl(){return()=>ne("/flows/kill",{method:"POST"})}function Ii(t){return()=>Promise.all(t.map(e=>ne(`/flows/${e.id}`,{method:"DELETE"})))}function Li(t){return()=>Promise.all(t.map(e=>ne(`/flows/${e.id}/duplicate`,{method:"POST"})))}function ws(t){return t=t.filter(xs),()=>Promise.all(t.map(e=>ne(`/flows/${e.id}/replay`,{method:"POST"})))}function Pi(t){return t=t.filter(bi),()=>Promise.all(t.map(e=>ne(`/flows/${e.id}/revert`,{method:"POST"})))}function Kn(t,e){return()=>Promise.all(t.map(s=>Le(s,{marked:e})()))}function Le(t,e){return()=>ne.put(`/flows/${t.id}`,e)}function ec(t,e,s){const i=new FormData;return e=new window.Blob([e],{type:"plain/text"}),i.append("file",e),()=>ne(`/flows/${t.id}/${s}/content.data`,{method:"POST",body:i})}function Oi(){return()=>ne("/clear",{method:"POST"})}function tc(t){const e=new FormData;return e.append("file",t),()=>ne("/flows/dump",{method:"POST",body:e})}const Mi=_e("flows/add"),qi=_e("flows/update"),Hi=_e("flows/remove"),bs=_e("flows/receive"),Vi=_e("flows/filterUpdate"),Ui=_e("flows/sort"),Ve=_e("flows/select"),sc={list:[],_listIndex:new Map,byId:new Map,view:[],_viewIndex:new Map,sort:{column:void 0,desc:!1},selected:[],selectedIds:new Set,highlightedIds:new Set};function nc(t=sc,e){if(bs.match(e)){const{sort:s}=t,i=e.payload,r=jt(i),n=new Map(i.map(h=>[h.id,h])),l=rs(i,pt(s)),a=jt(l),d=t.selected.map(h=>n.get(h.id)).filter(h=>h!==void 0),f=os(d);return{list:i,_listIndex:r,byId:n,view:l,_viewIndex:a,sort:s,selected:d,selectedIds:f,highlightedIds:new Set}}else if(Mi.match(e)){const{flow:s,matching_filters:i}=e.payload;if(t._listIndex.has(s.id))return t;const{sort:r,selected:n,selectedIds:l}=t;let{view:a,_viewIndex:d,highlightedIds:f}=t;const p=new Map(t._listIndex);p.set(s.id,t.list.length);const h=[...t.list,s],g=new Map(t.byId);return g.set(s.id,s),(i[ve.Search]===!0||i[ve.Search]===void 0)&&({view:a,_viewIndex:d}=Wn(a,d,s,pt(r))),i[ve.Highlight]===!0&&(f=new Set(f),f.add(s.id)),{list:h,_listIndex:p,byId:g,view:a,_viewIndex:d,sort:r,selected:n,selectedIds:l,highlightedIds:f}}else if(qi.match(e)){const{flow:s,matching_filters:i}=e.payload,{_listIndex:r,sort:n,selectedIds:l}=t;let{view:a,_viewIndex:d,selected:f,highlightedIds:p}=t;const h=t._listIndex.get(s.id),g=[...t.list];h!==void 0?g[h]=s:g.push(s);const _=new Map(t.byId);_.set(s.id,s);const j=d.get(s.id),y=j!==void 0,w=i[ve.Search]===!0||i[ve.Search]===void 0;return w&&!y?{view:a,_viewIndex:d}=Wn(a,d,s,pt(n)):!w&&y?{view:a,_viewIndex:d}=Bn(a,d,j):w&&y&&({view:a,_viewIndex:d}=Ql(a,d,s,pt(n))),l.has(s.id)&&(f=f.map($=>$.id===s.id?s:$)),i[ve.Highlight]===!0?p.has(s.id)||(p=new Set(p),p.add(s.id)):p=Un(p,s.id),{list:g,_listIndex:r,byId:_,view:a,_viewIndex:d,sort:n,selected:f,selectedIds:l,highlightedIds:p}}else if(Hi.match(e)){const s=e.payload,{sort:i}=t;let{view:r,_viewIndex:n,selected:l,selectedIds:a}=t;const d=t._listIndex.get(s);if(d===void 0)return t;const f=js(t.list,d,1),p=jt(f),h=new Map(t.byId);h.delete(s);const g=n.get(s);if(g!==void 0&&({view:r,_viewIndex:n}=Bn(r,n,g)),a.has(s)){if(l.length===1&&g!==void 0){const j=r[g]??r[g-1];l=j?[j]:[]}else l=l.filter(j=>j.id!==s);a=os(l)}const _=Un(t.highlightedIds,s);return{list:f,_listIndex:p,byId:h,view:r,_viewIndex:n,sort:i,selected:l,selectedIds:a,highlightedIds:_}}else if(Vi.match(e)){const{name:s,matching_flow_ids:i}=e.payload;switch(s){case ve.Search:{const r=rs(i===null?t.list:i.map(l=>t.byId.get(l)).filter(l=>l!==void 0),pt(t.sort)),n=jt(r);return{...t,view:r,_viewIndex:n}}case ve.Highlight:return{...t,highlightedIds:new Set(i)};default:Ct(s)}}else if(Ui.match(e)){const s=e.payload;let i;s.column?i=rs(t.view,pt(s)):i=t.list.filter(n=>t._viewIndex.has(n.id));const r=jt(i);return{...t,sort:s,view:i,_viewIndex:r}}else return Ve.match(e)?{...t,selected:e.payload,selectedIds:os(e.payload)}:t}function pt({column:t,desc:e}){if(!t)return(i,r)=>0;const s=Ei[t];return(i,r)=>{const n=s(i),l=s(r);return n>l?e?-1:1:n{const{flows:i}=s();i.selectedIds.has(t.id)?e(Ve(i.selected.filter(r=>r!==t))):e(Ve([...i.selected,t]))}}function rc(t){return(e,s)=>{const{flows:i}=s(),r=i.selected[i.selected.length-1],n=i._viewIndex.get(t.id),l=i._viewIndex.get(r?.id);if(n===void 0||l===void 0)return e(Ve([t]));let a;return n<=l?a=i.view.slice(n,l+1):(a=i.view.slice(l+1,n+1),a.push(r)),e(Ve(a))}}const oc={activeModal:void 0},Bi=fe({name:"ui/modal",initialState:oc,reducers:{setActiveModal(t,e){t.activeModal=e.payload},hideModal(t){t.activeModal=void 0}}}),{actions:lc,reducer:cc}=Bi,ac=Bi.actions.hideModal.type,{setActiveModal:dc,hideModal:Wi}=lc,zn=(()=>{const t=document.createElement("div");return t.setAttribute("contenteditable","PLAINTEXT-ONLY"),t.contentEditable==="plaintext-only"?"plaintext-only":"true"})();class ce extends I.Component{input=Te.createRef();render(){const e=je("inline-input",this.props.className);return o.jsx("span",{ref:this.input,tabIndex:0,className:e,placeholder:this.props.placeholder,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onInput:this.onInput,onPaste:this.onPaste,onMouseDown:this.onMouseDown,onClick:this.onClick,children:this.props.content})}componentDidUpdate(e){e.content!==this.props.content&&this.props.onInput?.(this.props.content)}isEditing=()=>this.input.current?.contentEditable===zn;startEditing=()=>{if(!this.input.current)return console.error("unreachable");this.isEditing()||(this.suppress_events=!0,this.input.current.blur(),this.input.current.contentEditable=zn,window.requestAnimationFrame(()=>{if(this.input.current){if(this.input.current.focus(),this.suppress_events=!1,this.props.selectAllOnClick){const e=document.createRange();e.selectNodeContents(this.input.current);const s=window.getSelection();s?.removeAllRanges(),s?.addRange(e)}this.props.onEditStart?.()}}))};resetValue=()=>{if(!this.input.current)return console.error("unreachable");this.input.current.textContent=this.props.content,this.props.onInput?.(this.props.content)};finishEditing=()=>{if(!this.input.current)return console.error("unreachable");this.props.onEditDone(this.input.current.textContent||""),this.input.current.blur(),this.input.current.contentEditable="inherit"};onPaste=e=>{e.preventDefault();const s=e.clipboardData.getData("text/plain");document.execCommand("insertHTML",!1,s)};suppress_events=!1;onMouseDown=e=>{this.suppress_events=!0,window.addEventListener("mouseup",this.onMouseUp,{once:!0})};onMouseUp=e=>{const s=e.target===this.input.current,i=!window.getSelection()?.toString();this.props.selectAllOnClick?s&&i&&this.startEditing():s&&this.startEditing(),this.suppress_events=!1};onClick=e=>{};onFocus=e=>{if(!this.input.current)throw"unreachable";this.suppress_events||this.startEditing()};onInput=e=>{this.props.onInput?.(this.input.current?.textContent||"")};onBlur=e=>{this.suppress_events||this.finishEditing()};onKeyDown=e=>{switch(e.stopPropagation(),e.key){case"Escape":e.preventDefault(),this.resetValue(),this.finishEditing();break;case"Enter":e.shiftKey||(e.preventDefault(),this.finishEditing());break}this.props.onKeyDown?.(e)}}function bt(t){const e=k.c(15);let s;e[0]!==t.content||e[1]!==t.isValid?(s=t.isValid(t.content),e[0]=t.content,e[1]=t.isValid,e[2]=s):s=e[2];const[i,r]=I.useState(s),n=I.useRef(null);let l;e[3]!==t?(l=_=>{t.isValid(_)?t.onEditDone(_):n.current?.resetValue()},e[3]=t,e[4]=l):l=e[4];const a=l,d=i?"has-success":"has-warning";let f;e[5]!==t.className||e[6]!==d?(f=je(t.className,d),e[5]=t.className,e[6]=d,e[7]=f):f=e[7];const p=f;let h;e[8]!==t?(h=_=>r(t.isValid(_)),e[8]=t,e[9]=h):h=e[9];let g;return e[10]!==p||e[11]!==a||e[12]!==t||e[13]!==h?(g=o.jsx(ce,{...t,className:p,onInput:h,onEditDone:a,ref:n}),e[10]=p,e[11]=a,e[12]=t,e[13]=h,e[14]=g):g=e[14],g}const G=()=>Nl(),D=kl,uc=ui.withTypes(),Ss=_e("EVENTS_ADD"),Ki=_e("EVENTS_RECEIVE"),Gt=_e("events/toggleVisibility"),zi=_e("events/toggleFilter");var Gi=(t=>(t.debug="debug",t.info="info",t.web="web",t.warn="warn",t.error="error",t))(Gi||{});const fc={visible:!1,filters:{debug:!1,info:!0,web:!0,warn:!0,error:!0},list:[],view:[]};function pc(t=fc,e){if(Ss.match(e)){const s=e.payload;return{...t,list:[...t.list,s],view:t.filters[s.level]?[...t.view,s]:t.view}}else{if(Ki.match(e))return{...t,list:e.payload,view:e.payload.filter(s=>t.filters[s.level])};if(Gt.match(e))return{...t,visible:!t.visible};if(zi.match(e)){const s={...t.filters,[e.payload]:!t.filters[e.payload]};return{...t,filters:s,view:t.list.filter(i=>s[i.level])}}else return t}}function hc(t,e="web"){return Ss({id:Math.random().toString(),message:t,level:e})}const Gn={},mc=fe({name:"ui/optionsEditor",initialState:Gn,reducers:{startUpdate(t,e){t[e.payload.option]={isUpdating:!0,value:e.payload.value,error:!1}},updateSuccess(t,e){t[e.payload.option]=void 0},updateError(t,e){let s=t[e.payload.option].value;typeof s=="boolean"&&(s=!s),t[e.payload.option]={value:s,isUpdating:!1,error:e.payload.error}}},extraReducers:t=>{t.addCase(ac,()=>Gn)}}),{actions:gc,reducer:vc}=mc,{startUpdate:xc,updateSuccess:_c,updateError:jc}=gc;var xe=(t=>(t[t.Capture=0]="Capture",t[t.FlowList=1]="FlowList",t[t.Options=2]="Options",t[t.Flow=3]="Flow",t))(xe||{});const yc=fe({name:"ui/tabs",initialState:{current:1},reducers:{setCurrent(t,e){t.current=e.payload}}}),{actions:wc,reducer:bc}=yc,{setCurrent:Vt}=wc,Sc=fi({flow:Vl,modal:cc,optionsEditor:vc,tabs:bc,filter:Jl});var wt=(t=>(t.INIT="CONNECTION_INIT",t.FETCHING="CONNECTION_FETCHING",t.ESTABLISHED="CONNECTION_ESTABLISHED",t.ERROR="CONNECTION_ERROR",t))(wt||{});const $c={state:"CONNECTION_INIT",message:void 0},Yi=fe({name:"connection",initialState:$c,reducers:{startFetching:t=>{t.state==="CONNECTION_INIT"&&(t.state="CONNECTION_FETCHING")},finishFetching:t=>{t.state==="CONNECTION_FETCHING"&&(t.state="CONNECTION_ESTABLISHED")},connectionError:(t,e)=>{t.state="CONNECTION_ERROR",t.message=e.payload}}}),{startFetching:Cc,finishFetching:Nc,connectionError:kc}=Yi.actions,Ec=Yi.reducer,Tc={add_upstream_certs_to_client_chain:!1,allow_hosts:[],anticache:!1,anticomp:!1,block_global:!0,block_list:[],block_private:!1,body_size_limit:void 0,cert_passphrase:void 0,certs:[],ciphers_client:void 0,ciphers_server:void 0,client_certs:void 0,client_replay:[],client_replay_concurrency:1,command_history:!0,confdir:"~/.mitmproxy",connect_addr:void 0,connection_strategy:"eager",console_focus_follow:!1,content_view_lines_cutoff:512,dns_name_servers:[],dns_use_hosts_file:!0,export_preserve_original_ip:!1,hardump:"",http2:!0,http2_ping_keepalive:58,http3:!0,http_connect_send_host_header:!0,ignore_hosts:[],intercept:void 0,intercept_active:!1,keep_alt_svc_header:!1,keep_host_header:!1,key_size:2048,listen_host:"",listen_port:void 0,map_local:[],map_remote:[],mode:["regular"],modify_body:[],modify_headers:[],normalize_outbound_headers:!0,onboarding:!0,onboarding_host:"mitm.it",protobuf_definitions:void 0,proxy_debug:!1,proxyauth:void 0,rawtcp:!0,readfile_filter:void 0,request_client_cert:!1,rfile:void 0,save_stream_file:void 0,save_stream_filter:void 0,scripts:[],server:!0,server_replay:[],server_replay_extra:"forward",server_replay_ignore_content:!1,server_replay_ignore_host:!1,server_replay_ignore_params:[],server_replay_ignore_payload_params:[],server_replay_ignore_port:!1,server_replay_kill_extra:!1,server_replay_nopop:!1,server_replay_refresh:!0,server_replay_reuse:!1,server_replay_use_headers:[],show_ignored_hosts:!1,showhost:!1,ssl_insecure:!1,ssl_verify_upstream_trusted_ca:void 0,ssl_verify_upstream_trusted_confdir:void 0,stickyauth:void 0,stickycookie:void 0,store_streamed_bodies:!1,stream_large_bodies:void 0,strip_ech:!0,tcp_hosts:[],tcp_timeout:600,termlog_verbosity:"info",tls_ecdh_curve_client:void 0,tls_ecdh_curve_server:void 0,tls_version_client_max:"UNBOUNDED",tls_version_client_min:"TLS1_2",tls_version_server_max:"UNBOUNDED",tls_version_server_min:"TLS1_2",udp_hosts:[],upstream_auth:void 0,upstream_cert:!0,validate_inbound_headers:!0,view_filter:void 0,view_order:"time",view_order_reversed:!1,web_columns:["tls","icon","path","method","status","size","time"],web_debug:!1,web_host:"127.0.0.1",web_open_browser:!0,web_password:"",web_port:8081,web_static_viewer:"",websocket:!0},Yt=_e("OPTIONS_RECEIVE"),$s=_e("OPTIONS_UPDATE"),Rc=fe({name:"options",initialState:Tc,reducers:{},extraReducers:t=>{t.addCase(Yt,(e,s)=>{const i={};for(const[r,{value:n}]of Object.entries(s.payload))i[r]=n;return i}).addCase($s,(e,s)=>{for(const[i,{value:r}]of Object.entries(s.payload))e[i]=r})}}),Ac=Rc.reducer;async function Dc(t,e,s){try{const i=await ne.put("/options",{[t]:e});if(i.status===200)s(_c({option:t}));else throw await i.text()}catch(i){s(jc({option:t,error:i.toString()}))}}const Fc=Dc;function Cs(t,e){return s=>{s(xc({option:t,value:e})),Fc(t,e,s)}}const Ic={visible:!1},Lc=fe({name:"commandBar",initialState:Ic,reducers:{toggleVisibility(t){t.visible=!t.visible}}}),{actions:Pc,reducer:Oc}=Lc,{toggleVisibility:Ji}=Pc,Ue=_e("STATE_RECEIVE"),Be=_e("STATE_UPDATE"),Mc={available:!1,version:"",contentViews:[],servers:{},platform:"",localModeUnavailable:null},qc=fe({name:"backendState",initialState:Mc,reducers:{},extraReducers:t=>{t.addCase(Ue,(e,s)=>({...e,available:!0,...s.payload})).addCase(Be,(e,s)=>({...e,...s.payload}))}}),Hc=qc.reducer,Vc={},Uc=fe({name:"optionsMeta",initialState:Vc,reducers:{},extraReducers:t=>{t.addCase(Yt,(e,s)=>s.payload).addCase($s,(e,s)=>({...e,...s.payload}))}}),Bc=Uc.reducer,dt=(t,e)=>e.listen_host&&e.listen_port?`${t}@${e.listen_host}:${e.listen_port}`:e.listen_port?`${t}@${e.listen_port}`:t,Qi=t=>{let[e,s]=ps(t,"@");e||(e=s,s="");const[i,r]=vi(e,":");let n,l;if(s){let a;if(s.includes(":")?[n,a]=ps(s,":"):(n="",a=s),a&&(l=parseInt(a,10),isNaN(l)||l<0||l>65535))throw new Error(`invalid port: ${a}`)}return{full_spec:t,name:i,data:r,listen_host:n,listen_port:l}},Xi=t=>dt("regular",t),Yn=({listen_host:t,listen_port:e})=>({ui_id:Math.random(),active:!0,listen_host:t,listen_port:e}),Zi=t=>t.selectedProcesses?`local:${t.selectedProcesses}`:"local",Jn=({data:t})=>({ui_id:Math.random(),active:!0,selectedProcesses:t}),er=t=>{const e=t.file_path?`wireguard:${t.file_path}`:"wireguard";return dt(e,t)},Qn=({data:t,listen_host:e,listen_port:s})=>({ui_id:Math.random(),active:!0,listen_host:e,listen_port:s,file_path:t});var Jt=(t=>(t.HTTP="http",t.HTTPS="https",t.HTTP3="http3",t.TLS="tls",t.DTLS="dtls",t.TCP="tcp",t.UDP="udp",t.DNS="dns",t.QUIC="quic",t))(Jt||{}),ot=(t=>(t.CSS="css",t.JAVASCRIPT="javascript",t.XML="xml",t.YAML="yaml",t.NONE="none",t.ERROR="error",t))(ot||{});const hs=()=>({active:!1,protocol:Jt.HTTPS,destination:"",ui_id:Math.random()}),Ns=t=>dt(`reverse:${t.protocol}://${t.destination}`,t),Wc=({data:t,listen_host:e,listen_port:s})=>{let[i,r]=vi(t,"://");return r||(r=i,i=Jt.HTTPS),{ui_id:Math.random(),active:!0,protocol:i,destination:r,listen_host:e,listen_port:s}},tr=t=>dt("transparent",t),Xn=({listen_host:t,listen_port:e})=>({ui_id:Math.random(),active:!0,listen_host:t,listen_port:e}),sr=t=>dt("socks5",t),Zn=({listen_host:t,listen_port:e})=>({ui_id:Math.random(),active:!0,listen_host:t,listen_port:e}),nr=t=>dt(`upstream:${t.destination}`,t),ei=({data:t,listen_host:e,listen_port:s})=>({ui_id:Math.random(),active:!0,destination:t||"",listen_host:e,listen_port:s}),ir=t=>dt("dns",t),ti=({listen_host:t,listen_port:e})=>({ui_id:Math.random(),active:!0,listen_host:t,listen_port:e}),Xe=t=>t.active&&!t.error;async function Kc(t,e){const s=e.getState().modes,i=[...s.regular.filter(Xe).map(Xi),...s.local.filter(Xe).map(Zi),...s.wireguard.filter(Xe).map(er),...s.reverse.filter(Xe).map(Ns),...s.transparent.filter(Xe).map(tr),...s.socks.filter(Xe).map(sr),...s.upstream.filter(Xe).map(nr),...s.dns.filter(Xe).map(ir)],r=await ne.put("/options",{mode:i});if(r.status!==200)throw new Error(await r.text())}function ie(t){return uc(t,Kc)}function se(t,e,s){t.addCase(s.pending,(i,r)=>{const{server:n,value:l}=r.meta.arg,a=i.findIndex(d=>d.ui_id===n.ui_id);a>=0&&(i[a][e]=l,i[a].error=void 0)}),t.addCase(s.rejected,(i,r)=>{const{server:n}=r.meta.arg,l=i.findIndex(a=>a.ui_id===n.ui_id);l>=0&&(i[l].error=r.error.message)})}function be(t,e){return function(i,r){if(r.payload.servers){const n=Object.values(r.payload.servers).filter(l=>l.type===t).map(l=>Qi(l.full_spec));if(n.length>0)return n.map(e);for(const l of i)l.active=!1}}}const rr=ie("modes/regular/setActive"),or=ie("modes/regular/setListenHost"),lr=ie("modes/regular/setListenPort"),zc=[{active:!0,ui_id:Math.random()}],Gc=fe({name:"modes/regular",initialState:zc,reducers:{},extraReducers:t=>{se(t,"active",rr),se(t,"listen_host",or),se(t,"listen_port",lr),t.addCase(Ue,be("regular",Yn)),t.addCase(Be,be("regular",Yn))}}),Yc=Gc.reducer,cr=ie("modes/local/setActive"),St=ie("modes/local/setSelectedProcesses"),Jc=[{active:!1,selectedProcesses:"",ui_id:Math.random()}],Qc=fe({name:"modes/local",initialState:Jc,reducers:{},extraReducers:t=>{se(t,"active",cr),se(t,"selectedProcesses",St),t.addCase(Ue,be("local",Jn)),t.addCase(Be,be("local",Jn))}}),Xc=Qc.reducer,ar=ie("modes/wireguard/setActive"),dr=ie("modes/wireguard/setListenHost"),ur=ie("modes/wireguard/setListenPort"),fr=ie("modes/wireguard/setFilePath"),Zc=[{active:!1,ui_id:Math.random()}],ea=fe({name:"modes/wireguard",initialState:Zc,reducers:{},extraReducers:t=>{se(t,"active",ar),se(t,"listen_host",dr),se(t,"listen_port",ur),se(t,"file_path",fr),t.addCase(Ue,be("wireguard",Qn)),t.addCase(Be,be("wireguard",Qn))}}),ta=ea.reducer,ms=ie("modes/reverse/setActive"),pr=ie("modes/reverse/setListenHost"),hr=ie("modes/reverse/setListenPort"),mr=ie("modes/reverse/setProtocol"),gr=ie("modes/reverse/setDestination"),sa=[hs()],vr=fe({name:"modes/reverse",initialState:sa,reducers:{addServer:t=>{t.push(hs())},removeServer:(t,e)=>{const s=t.findIndex(i=>i.ui_id===e.payload.ui_id);s!==-1&&(t[s].active&&console.error("servers should be deactivated before removal"),t.splice(s,1))}},extraReducers:t=>{se(t,"active",ms),se(t,"listen_host",pr),se(t,"listen_port",hr),se(t,"protocol",mr),se(t,"destination",gr),t.addCase(Ue,e),t.addCase(Be,e);function e(s,i){if(i.payload.servers){const r=Object.fromEntries(Object.entries(i.payload.servers).filter(([l,a])=>a.type==="reverse").map(([l,a])=>[l,Qi(l)])),n=[];for(const l of s){const a=Ns(l),d=a in r;delete r[a],n.push({...l,active:d})}for(const l of Object.values(r))n.push(Wc(l));return n.length>1&&Kt({...n[0],ui_id:void 0},{...hs(),ui_id:void 0})&&n.shift(),n}}}}),{addServer:na,removeServer:ia}=vr.actions,ra=vr.reducer,xr=ie("modes/transparent/setActive"),_r=ie("modes/transparent/setListenHost"),jr=ie("modes/transparent/setListenPort"),oa=[{active:!1,ui_id:Math.random()}],la=fe({name:"modes/transparent",initialState:oa,reducers:{},extraReducers:t=>{se(t,"active",xr),se(t,"listen_host",_r),se(t,"listen_port",jr),t.addCase(Ue,be("transparent",Xn)),t.addCase(Be,be("transparent",Xn))}}),ca=la.reducer,yr=ie("modes/socks5/setActive"),wr=ie("modes/socks5/setListenHost"),br=ie("modes/socks5/setListenPort"),aa=[{active:!1,ui_id:Math.random()}],da=fe({name:"modes/socks5",initialState:aa,reducers:{},extraReducers:t=>{se(t,"active",yr),se(t,"listen_host",wr),se(t,"listen_port",br),t.addCase(Ue,be("socks5",Zn)),t.addCase(Be,be("socks5",Zn))}}),ua=da.reducer,Sr=ie("modes/upstream/setActive"),$r=ie("modes/upstream/setListenHost"),Cr=ie("modes/upstream/setListenPort"),Nr=ie("modes/upstream/setDestination"),fa=[{active:!1,destination:"",ui_id:Math.random()}],pa=fe({name:"modes/upstream",initialState:fa,reducers:{},extraReducers:t=>{se(t,"active",Sr),se(t,"listen_host",$r),se(t,"listen_port",Cr),se(t,"destination",Nr),t.addCase(Ue,be("upstream",ei)),t.addCase(Be,be("upstream",ei))}}),ha=pa.reducer,kr=ie("modes/dns/setActive"),Er=ie("modes/dns/setListenHost"),Tr=ie("modes/dns/setListenPort"),ma=[{active:!0,ui_id:Math.random()}],ga=fe({name:"modes/dns",initialState:ma,reducers:{},extraReducers:t=>{se(t,"active",kr),se(t,"listen_host",Er),se(t,"listen_port",Tr),t.addCase(Ue,be("dns",ti)),t.addCase(Be,be("dns",ti))}}),va=ga.reducer,xa=fi({regular:Yc,local:Xc,wireguard:ta,reverse:ra,transparent:ca,socks:ua,upstream:ha,dns:va}),$t=ui("fetchProcesses",async(t,{rejectWithValue:e})=>{try{return(await ne("/processes")).json()}catch(s){return e(s.message)}}),_a={currentProcesses:[],isLoading:!1},ja=fe({name:"processes",initialState:_a,reducers:{},extraReducers:t=>{t.addCase($t.pending,e=>{e.isLoading=!0,e.error=void 0}),t.addCase($t.fulfilled,(e,s)=>{e.isLoading=!1,e.currentProcesses=s.payload}),t.addCase($t.rejected,(e,s)=>{e.isLoading=!1,e.error=s.payload})}}),ya=ja.reducer,wa={commandBar:Oc,eventLog:pc,flows:nc,connection:Ec,modes:xa,ui:Sc,options:Ac,options_meta:Bc,backendState:Hc,processes:ya},ba={immutableCheck:{warnAfter:5e5},serializableCheck:{warnAfter:5e5,ignoredPaths:["flows"]}},Nt=El({reducer:wa,middleware:t=>t(ba),devTools:!1});class Sa extends I.Component{container=Te.createRef();nameInput=Te.createRef();valueInput=Te.createRef();render=()=>{const[e,s]=this.props.item;return o.jsxs("div",{ref:this.container,className:"kv-row",onClick:this.onClick,onKeyDownCapture:this.onKeyDown,children:[o.jsx(ce,{ref:this.nameInput,className:"kv-key",content:e,onEditStart:this.props.onEditStart,onEditDone:i=>this.props.onEditDone([i,s]),selectAllOnClick:!0}),": ",o.jsx(ce,{ref:this.valueInput,className:"kv-value",content:s,onEditStart:this.props.onEditStart,onEditDone:i=>this.props.onEditDone([e,i]),placeholder:"empty",selectAllOnClick:!0})]})};onClick=e=>{e.target===this.container.current&&this.props.onClickEmptyArea()};onKeyDown=e=>{e.target===this.valueInput.current?.input.current&&e.key==="Tab"&&this.props.onTabNext()}}class Rr extends I.Component{rowRefs={};currentlyEditing;justFinishedEditing;state={currentList:this.props.data||[],initialList:this.props.data};static getDerivedStateFromProps(e,s){return e.data!==s.initialList?{currentList:e.data||[],initialList:e.data}:null}render=()=>{this.rowRefs={};const e=this.state.currentList.map((s,i)=>o.jsx(Sa,{item:s,onEditStart:()=>this.currentlyEditing=i,onEditDone:r=>this.onEditDone(i,r),onClickEmptyArea:()=>this.onClickEmptyArea(i),onTabNext:()=>this.onTabNext(i),ref:r=>{this.rowRefs[i]=r}},i));return o.jsxs("div",{className:je("kv-editor",this.props.className),onMouseDown:this.onMouseDown,children:[e,o.jsx("div",{onClick:s=>{s.preventDefault(),this.onClickEmptyArea(this.state.currentList.length-1)},className:"kv-add-row fa fa-plus-square-o",role:"button","aria-label":"Add"})]})};onEditDone=(e,s)=>{const i=[...this.state.currentList];s[0]?i[e]=s:i.splice(e,1),this.currentlyEditing=void 0,Ht.isEqual(this.state.currentList,i)||this.props.onChange(i),this.setState({currentList:i})};onClickEmptyArea=e=>{if(this.justFinishedEditing)return;const s=[...this.state.currentList];s.splice(e+1,0,["",""]),this.setState({currentList:s},()=>this.rowRefs[e+1]?.nameInput.current?.startEditing())};onTabNext=e=>{e==this.state.currentList.length-1&&this.onClickEmptyArea(e)};onMouseDown=e=>{this.justFinishedEditing=this.currentlyEditing}}function Ar(t,e){const s=k.c(6),[i,r]=I.useState(),[n,l]=I.useState();let a;s[0]!==n||s[1]!==t?(a=()=>{n&&n.abort();const f=new AbortController;return ne(t,{signal:f.signal}).then($a).then(p=>{r(p)}).catch(p=>{f.signal.aborted||r(`Error getting content: ${p}.`)}),l(f),()=>{f.signal.aborted||f.abort()}},s[0]=n,s[1]=t,s[2]=a):a=s[2];let d;return s[3]!==e||s[4]!==t?(d=[t,e],s[3]=e,s[4]=t,s[5]=d):d=s[5],I.useEffect(a,d),i}function $a(t){if(!t.ok)throw`${t.status} ${t.statusText}`.trim();return t.text()}function Dr(t,e,s,i,r){const n=k.c(11);let l;n[0]!==t||n[1]!==i||n[2]!==e||n[3]!==s?(l=we.getContentURL(t,e,s,i),n[0]=t,n[1]=i,n[2]=e,n[3]=s,n[4]=l):l=n[4];const d=Ar(l,r);let f;if(d)try{let p;n[5]!==d?(p=JSON.parse(d),n[5]=d,n[6]=p):p=n[6],f=p}catch{let p;n[7]!==d?(p={text:d,description:"Network Error",syntax_highlight:"error",view_name:"raw"},n[7]=d,n[8]=p):p=n[8];const h=p;if(e==="messages"){let g;n[9]!==h?(g=[h],n[9]=h,n[10]=g):g=n[10],f=g}else f=h}else f=void 0;return f}const Fr=Te.memo(function({icon:e,text:s,className:i,title:r,onOpenFile:n,onClick:l}){let a;return o.jsxs("a",{href:"#",onClick:d=>{a.click(),l&&l(d)},className:i,title:r,children:[o.jsx("i",{className:"fa fa-fw "+e}),s,o.jsx("input",{ref:d=>{a=d},className:"hidden",type:"file",onChange:d=>{d.preventDefault(),d.target.files&&d.target.files.length>0&&n(d.target.files[0]),a.value=""}})]})});function pe(t){const e=k.c(11),{onClick:s,children:i,icon:r,disabled:n,className:l,title:a}=t;let d;e[0]!==l?(d=je(l,"btn btn-default"),e[0]=l,e[1]=d):d=e[1];const f=n?void 0:s;let p;e[2]!==r?(p=r&&o.jsxs(o.Fragment,{children:[o.jsx("i",{className:"fa "+r})," "]}),e[2]=r,e[3]=p):p=e[3];let h;return e[4]!==i||e[5]!==n||e[6]!==d||e[7]!==f||e[8]!==p||e[9]!==a?(h=o.jsxs("button",{className:d,onClick:f,disabled:n,title:a,children:[p,i]}),e[4]=i,e[5]=n,e[6]=d,e[7]=f,e[8]=p,e[9]=a,e[10]=h):h=e[10],h}function Ca(t){const e=k.c(11),{initialContent:s,onChange:i,language:r,readonly:n}=t,l=n===void 0?!1:n,a=Na;let d;e:switch(r){case ot.YAML:{let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=[Dl()],e[0]=h):h=e[0],d=h;break e}case ot.XML:{let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=[Al()],e[1]=h):h=e[1],d=h;break e}case ot.JAVASCRIPT:{let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=[Rl()],e[2]=h):h=e[2],d=h;break e}case ot.CSS:{let h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h=[Tl()],e[3]=h):h=e[3],d=h;break e}case void 0:case null:case ot.NONE:case ot.ERROR:{let h;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=[],e[4]=h):h=e[4],d=h;break e}default:{console.error("Unexpected syntax highlighting language: ",r);let g;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=[],e[5]=g):g=e[5],d=g}}const f=d;let p;return e[6]!==f||e[7]!==s||e[8]!==i||e[9]!==l?(p=o.jsx("div",{className:"codeeditor",onKeyDown:a,children:o.jsx(Fl,{value:s,onChange:i,readOnly:l,extensions:f})}),e[6]=f,e[7]=s,e[8]=i,e[9]=l,e[10]=p):p=e[10],p}function Na(t){return t.stopPropagation()}const Ir=Te.memo(function(e){const s=k.c(9),{content:i,maxLines:r,showMore:n}=e;if(i.length===0)return null;let l;if(s[0]!==i||s[1]!==r||s[2]!==n){let d;s[4]!==r||s[5]!==n?(d=(f,p)=>p===r?o.jsxs("button",{onClick:n,className:"btn btn-xs btn-info",children:[o.jsx("i",{className:"fa fa-angle-double-down","aria-hidden":"true"})," ","Show more"]},"showmore"):o.jsx("div",{children:f},p),s[4]=r,s[5]=n,s[6]=d):d=s[6],l=i.split(` `).map(d),s[0]=i,s[1]=r,s[2]=n,s[3]=l}else l=s[3];let a;return s[7]!==l?(a=o.jsx("pre",{children:l}),s[7]=l,s[8]=a):a=s[8],a}),ka=()=>{const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("li",{role:"separator",className:"divider"}),t[0]=e):e=t[0],e};function ke(t){const e=k.c(8);let s,i,r;if(e[0]!==t){const{onClick:a,children:d,...f}=t;i=d,s=f,r=p=>{p.preventDefault(),a()},e[0]=t,e[1]=s,e[2]=i,e[3]=r}else s=e[1],i=e[2],r=e[3];const n=r;let l;return e[4]!==s||e[5]!==i||e[6]!==n?(l=o.jsx("li",{children:o.jsx("a",{href:"#",onClick:n,...s,children:i})}),e[4]=s,e[5]=i,e[6]=n,e[7]=l):l=e[7],l}const Et=Te.memo(function({text:e,children:s,options:i,className:r,onOpen:n,...l}){const[a,d]=I.useState(!1),{refs:f,floatingStyles:p}=Il(i),h=_=>{d(_),n&&n(_)};I.useEffect(()=>{f.floating.current&&document.addEventListener("click",_=>{f.floating.current?.contains(_.target)?document.addEventListener("click",()=>h(!1),{once:!0}):(_.preventDefault(),_.stopPropagation(),h(!1))},{once:!0,capture:!0})},[f.floating.current]);let g;return a?g=o.jsx("ul",{className:"dropdown-menu show",ref:f.setFloating,style:p,children:s}):g=null,o.jsxs(o.Fragment,{children:[o.jsx("a",{href:"#",ref:f.setReference,className:je(r,{open:a}),onClick:_=>{_.preventDefault(),h(!0)},...l,children:e}),g]})});function Lr(t){const e=k.c(16),{value:s,onChange:i}=t,r=D(Ea);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("i",{className:"fa fa-fw fa-files-o"}),e[0]=n):n=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("b",{children:"View:"}),e[1]=l):l=e[1];let a;e[2]!==s?(a=s.toLowerCase(),e[2]=s,e[3]=a):a=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx("span",{className:"caret"}),e[4]=d):d=e[4];let f;e[5]!==a?(f=o.jsxs("span",{children:[n," ",l," ",a," ",d]}),e[5]=a,e[6]=f):f=e[6];const p=f;let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h={placement:"top-end"},e[7]=h):h=e[7];let g;if(e[8]!==r||e[9]!==i){let j;e[11]!==i?(j=y=>o.jsx(ke,{onClick:()=>i(y),children:y.toLowerCase().replace("_"," ")},y),e[11]=i,e[12]=j):j=e[12],g=r.map(j),e[8]=r,e[9]=i,e[10]=g}else g=e[10];let _;return e[13]!==p||e[14]!==g?(_=o.jsx(Et,{text:p,className:"btn btn-default btn-xs",options:h,children:g}),e[13]=p,e[14]=g,e[15]=_):_=e[15],_}function Ea(t){return t.backendState.contentViews||[]}function Ta(t){const e=k.c(8),{flow:s,message:i}=t,[r,n]=I.useState(!1);if(r){let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>n(!1),e[0]=l):l=e[0];let a;return e[1]!==s||e[2]!==i?(a=o.jsx(Ra,{flow:s,message:i,stopEdit:l}),e[1]=s,e[2]=i,e[3]=a):a=e[3],a}else{let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=()=>n(!0),e[4]=l):l=e[4];let a;return e[5]!==s||e[6]!==i?(a=o.jsx(Aa,{flow:s,message:i,startEdit:l}),e[5]=s,e[6]=i,e[7]=a):a=e[7],a}}function Ra(t){const e=k.c(23),{flow:s,message:i,stopEdit:r}=t,n=G(),l=s.request===i?"request":"response";let a;e[0]!==s||e[1]!==i?(a=we.getContentURL(s,i),e[0]=s,e[1]=i,e[2]=a):a=e[2];const f=Ar(a,i.contentHash),[p,h]=I.useState();let g;e[3]!==f||e[4]!==n||e[5]!==p||e[6]!==s||e[7]!==l||e[8]!==r?(g=async()=>{await n(Le(s,{[l]:{content:p??f??""}})),r()},e[3]=f,e[4]=n,e[5]=p,e[6]=s,e[7]=l,e[8]=r,e[9]=g):g=e[9];const _=g;let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx("h5",{children:"[Editing]"}),e[10]=j):j=e[10];let y;e[11]!==_?(y=o.jsx(pe,{onClick:_,icon:"fa-check text-success",className:"btn-xs",children:"Done"}),e[11]=_,e[12]=y):y=e[12];let w;e[13]!==r?(w=o.jsx(pe,{onClick:()=>r(),icon:"fa-times text-danger",className:"btn-xs",children:"Cancel"}),e[13]=r,e[14]=w):w=e[14];let $;e[15]!==y||e[16]!==w?($=o.jsxs("div",{className:"controls",children:[j,y," ",w]}),e[15]=y,e[16]=w,e[17]=$):$=e[17];const N=f||"";let E;e[18]!==N?(E=o.jsx(Ca,{initialContent:N,onChange:h}),e[18]=N,e[19]=E):E=e[19];let T;return e[20]!==$||e[21]!==E?(T=o.jsxs("div",{className:"contentview",children:[$,E]},"edit"),e[20]=$,e[21]=E,e[22]=T):T=e[22],T}function Aa(t){const e=k.c(43),{flow:s,message:i,startEdit:r}=t,n=G(),l=s.request===i?"request":"response";let a;e[0]!==s.id||e[1]!==l?(a=V=>V.ui.flow.contentViewFor[s.id+l]||"Auto",e[0]=s.id,e[1]=l,e[2]=a):a=e[2];const d=D(a),[f,p]=I.useState(D(Da));let h;e[3]!==f?(h=()=>p(Math.max(1024,f*2)),e[3]=f,e[4]=h):h=e[4];const g=h,_=Dr(s,i,d,f+1,i.contentHash);let j;if(i.contentLength===0)j="No content";else if(_===void 0)j="Loading...";else{const V=`${_.view_name} ${_.description}`;let W;e[5]!==V?(W=V.trimEnd(),e[5]=V,e[6]=W):W=e[6],j=W}let y;e[7]!==j?(y=o.jsx("h5",{children:j}),e[7]=j,e[8]=y):y=e[8];let w;e[9]!==_||e[10]!==s||e[11]!==i?(w=_&&_?.text.length>0&&o.jsx(Fa,{flow:s,message:i}),e[9]=_,e[10]=s,e[11]=i,e[12]=w):w=e[12];let $;e[13]!==r?($=o.jsx(pe,{onClick:r,icon:"fa-edit",className:"btn-xs",children:"Edit"}),e[13]=r,e[14]=$):$=e[14];let N;e[15]!==n||e[16]!==s||e[17]!==l?(N=o.jsx(Fr,{icon:"fa-upload",text:"Replace",title:"Upload a file to replace the content.",onOpenFile:V=>n(ec(s,V,l)),className:"btn btn-default btn-xs"}),e[15]=n,e[16]=s,e[17]=l,e[18]=N):N=e[18];let E;e[19]!==n||e[20]!==s.id||e[21]!==l?(E=V=>n(pi({messageId:s.id+l,contentView:V})),e[19]=n,e[20]=s.id,e[21]=l,e[22]=E):E=e[22];let T;e[23]!==d||e[24]!==E?(T=o.jsx(Lr,{value:d,onChange:E}),e[23]=d,e[24]=E,e[25]=T):T=e[25];let P;e[26]!==y||e[27]!==w||e[28]!==$||e[29]!==N||e[30]!==T?(P=o.jsxs("div",{className:"controls",children:[y,w," ",$," ",N," ",T]}),e[26]=y,e[27]=w,e[28]=$,e[29]=N,e[30]=T,e[31]=P):P=e[31];let L;e[32]!==s||e[33]!==i?(L=gs.matches(i)&&o.jsx(gs,{flow:s,message:i}),e[32]=s,e[33]=i,e[34]=L):L=e[34];const O=_?.text??"";let M;e[35]!==f||e[36]!==g||e[37]!==O?(M=o.jsx(Ir,{content:O,maxLines:f,showMore:g}),e[35]=f,e[36]=g,e[37]=O,e[38]=M):M=e[38];let U;return e[39]!==L||e[40]!==M||e[41]!==P?(U=o.jsxs("div",{className:"contentview",children:[P,L,M]},"view"),e[39]=L,e[40]=M,e[41]=P,e[42]=U):U=e[42],U}function Da(t){return t.options.content_view_lines_cutoff}function Fa({flow:t,message:e}){const s=t.request===e?"request":"response",i=D(f=>f.ui.flow.contentViewFor[t.id+s]||"Auto"),[r,n]=I.useState(!1),[l,a]=I.useState(!1),d=async()=>{try{const f=we.getContentURL(t,e,i);a(!0);const p=await ne(f);if(!p.ok)throw new Error(`${p.status} ${p.statusText}`.trim());const h=await p.json();await Bl(h),n(!0),setTimeout(()=>n(!1),2e3)}catch(f){console.error(f)}finally{a(!1)}};return o.jsx(pe,{onClick:d,icon:"fa-clipboard",className:"btn-xs",disabled:l,children:r?"Copied!":"Copy"})}const Ia=/^image\/(png|jpe?g|gif|webp|vnc.microsoft.icon|x-icon|svg\+xml)$/i;gs.matches=t=>Ia.test(we.getContentType(t)||"");function gs(t){const e=k.c(5),{flow:s,message:i}=t;let r;e[0]!==s||e[1]!==i?(r=we.getContentURL(s,i),e[0]=s,e[1]=i,e[2]=r):r=e[2];let n;return e[3]!==r?(n=o.jsx("div",{className:"flowview-image",children:o.jsx("img",{src:r,alt:"preview",className:"img-thumbnail"})}),e[3]=r,e[4]=n):n=e[4],n}function La(t){const e=k.c(24),{flow:s}=t,i=G();let r;e[0]!==i||e[1]!==s?(r=g=>i(Le(s,{request:{method:g}})),e[0]=i,e[1]=s,e[2]=r):r=e[2];let n;e[3]!==s.request.method||e[4]!==r?(n=o.jsx(bt,{content:s.request.method,onEditDone:r,isValid:Oa,selectAllOnClick:!0}),e[3]=s.request.method,e[4]=r,e[5]=n):n=e[5];let l;e[6]!==s.request?(l=ct.pretty_url(s.request),e[6]=s.request,e[7]=l):l=e[7];let a;e[8]!==i||e[9]!==s?(a=g=>i(Le(s,{request:{path:"",..._i(g)}})),e[8]=i,e[9]=s,e[10]=a):a=e[10];let d;e[11]!==l||e[12]!==a?(d=o.jsx(bt,{content:l,onEditDone:a,isValid:Pa}),e[11]=l,e[12]=a,e[13]=d):d=e[13];let f;e[14]!==i||e[15]!==s?(f=g=>i(Le(s,{request:{http_version:g}})),e[14]=i,e[15]=s,e[16]=f):f=e[16];let p;e[17]!==s.request.http_version||e[18]!==f?(p=o.jsx(bt,{content:s.request.http_version,onEditDone:f,isValid:ji,selectAllOnClick:!0}),e[17]=s.request.http_version,e[18]=f,e[19]=p):p=e[19];let h;return e[20]!==n||e[21]!==d||e[22]!==p?(h=o.jsx("div",{className:"first-line request-line",children:o.jsxs("div",{children:[n," ",d," ",p]})}),e[20]=n,e[21]=d,e[22]=p,e[23]=h):h=e[23],h}function Pa(t){return!!_i(t)?.host}function Oa(t){return t.length>0}function Ma(t){const e=k.c(19),{flow:s}=t,i=G();let r;e[0]!==i||e[1]!==s?(r=h=>i(Le(s,{response:{http_version:h}})),e[0]=i,e[1]=s,e[2]=r):r=e[2];let n;e[3]!==s.response.http_version||e[4]!==r?(n=o.jsx(bt,{content:s.response.http_version,onEditDone:r,isValid:ji,selectAllOnClick:!0}),e[3]=s.response.http_version,e[4]=r,e[5]=n):n=e[5];const l=s.response.status_code+"";let a;e[6]!==i||e[7]!==s?(a=h=>i(Le(s,{response:{code:parseInt(h)}})),e[6]=i,e[7]=s,e[8]=a):a=e[8];let d;e[9]!==l||e[10]!==a?(d=o.jsx(bt,{content:l,onEditDone:a,isValid:qa,selectAllOnClick:!0}),e[9]=l,e[10]=a,e[11]=d):d=e[11];let f;e[12]!==i||e[13]!==s?(f=s.response.http_version!=="HTTP/2.0"&&o.jsxs(o.Fragment,{children:[" ",o.jsx(ce,{content:s.response.reason,onEditDone:h=>i(Le(s,{response:{msg:h}})),selectAllOnClick:!0})]}),e[12]=i,e[13]=s,e[14]=f):f=e[14];let p;return e[15]!==n||e[16]!==d||e[17]!==f?(p=o.jsxs("div",{className:"first-line response-line",children:[n," ",d,f]}),e[15]=n,e[16]=d,e[17]=f,e[18]=p):p=e[18],p}function qa(t){return/^\d+$/.test(t)}function Ha(t){const e=k.c(7),{flow:s,message:i}=t,r=G(),n=s.request===i?"request":"response";let l;e[0]!==r||e[1]!==s||e[2]!==n?(l=d=>r(Le(s,{[n]:{headers:d}})),e[0]=r,e[1]=s,e[2]=n,e[3]=l):l=e[3];let a;return e[4]!==i.headers||e[5]!==l?(a=o.jsx(Rr,{className:"headers",data:i.headers,onChange:l}),e[4]=i.headers,e[5]=l,e[6]=a):a=e[6],a}function Va(t){const e=k.c(9),{flow:s,message:i}=t,r=G(),n=s.request===i?"request":"response";if(!!!we.get_first_header(i,/^trailer$/i))return null;let a,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("hr",{}),d=o.jsx("h5",{children:"HTTP Trailers"}),e[0]=a,e[1]=d):(a=e[0],d=e[1]);let f;e[2]!==r||e[3]!==s||e[4]!==n?(f=h=>r(Le(s,{[n]:{trailers:h}})),e[2]=r,e[3]=s,e[4]=n,e[5]=f):f=e[5];let p;return e[6]!==i.trailers||e[7]!==f?(p=o.jsxs(o.Fragment,{children:[a,d,o.jsx(Rr,{className:"trailers",data:i.trailers,onChange:f})]}),e[6]=i.trailers,e[7]=f,e[8]=p):p=e[8],p}const Pr=I.memo(function(e){const s=k.c(20),{flow:i,message:r}=e,n=i.request===r?"request":"response",l=i.request===r?La:Ma;let a;s[0]!==l||s[1]!==i?(a=o.jsx(l,{flow:i}),s[0]=l,s[1]=i,s[2]=a):a=s[2];let d;s[3]!==i||s[4]!==r?(d=o.jsx(Ha,{flow:i,message:r}),s[3]=i,s[4]=r,s[5]=d):d=s[5];let f;s[6]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx("hr",{}),s[6]=f):f=s[6];const p=i.id+n;let h;s[7]!==i||s[8]!==r||s[9]!==p?(h=o.jsx(Ta,{flow:i,message:r},p),s[7]=i,s[8]=r,s[9]=p,s[10]=h):h=s[10];let g;s[11]!==i||s[12]!==r?(g=o.jsx(Va,{flow:i,message:r}),s[11]=i,s[12]=r,s[13]=g):g=s[13];let _;return s[14]!==n||s[15]!==a||s[16]!==d||s[17]!==h||s[18]!==g?(_=o.jsxs("section",{className:n,children:[a,d,f,h,g]}),s[14]=n,s[15]=a,s[16]=d,s[17]=h,s[18]=g,s[19]=_):_=s[19],_});function Or(){const t=k.c(2),e=D(Ua);let s;return t[0]!==e?(s=o.jsx(Pr,{flow:e,message:e.request}),t[0]=e,t[1]=s):s=t[1],s}function Ua(t){return t.flows.selected[0]}Or.displayName="Request";function Mr(){const t=k.c(2),e=D(Ba);let s;return t[0]!==e?(s=o.jsx(Pr,{flow:e,message:e.response}),t[0]=e,t[1]=s):s=t[1],s}function Ba(t){return t.flows.selected[0]}Mr.displayName="Response";const Wa=t=>{const e=k.c(3),{message:s}=t,i=s.query?s.op_code:s.response_code,r=s.truncation?"(Truncated)":"";let n;return e[0]!==i||e[1]!==r?(n=o.jsxs("div",{children:[i," ",r]}),e[0]=i,e[1]=r,e[2]=n):n=e[2],n},Ka=t=>{const e=k.c(10),{message:s}=t,i=s.recursion_desired?"Recursive ":"";let r;e[0]!==i?(r=o.jsxs("h5",{children:[i,"Question"]}),e[0]=i,e[1]=r):r=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{children:"Name"}),o.jsx("th",{children:"Type"}),o.jsx("th",{children:"Class"})]})}),e[2]=n):n=e[2];let l;e[3]!==s.questions?(l=s.questions.map(Ya),e[3]=s.questions,e[4]=l):l=e[4];let a;e[5]!==l?(a=o.jsxs("table",{children:[n,o.jsx("tbody",{children:l})]}),e[5]=l,e[6]=a):a=e[6];let d;return e[7]!==r||e[8]!==a?(d=o.jsxs(o.Fragment,{children:[r,a]}),e[7]=r,e[8]=a,e[9]=d):d=e[9],d},ls=t=>{const e=k.c(7),{name:s,values:i}=t;let r;e[0]!==s?(r=o.jsx("h5",{children:s}),e[0]=s,e[1]=r):r=e[1];let n;e[2]!==i?(n=i.length>0?o.jsxs("table",{children:[o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{children:"Name"}),o.jsx("th",{children:"Type"}),o.jsx("th",{children:"Class"}),o.jsx("th",{children:"TTL"}),o.jsx("th",{children:"Data"})]})}),o.jsx("tbody",{children:i.map(Ja)})]}):"—",e[2]=i,e[3]=n):n=e[3];let l;return e[4]!==r||e[5]!==n?(l=o.jsxs(o.Fragment,{children:[r,n]}),e[4]=r,e[5]=n,e[6]=l):l=e[6],l},qr=t=>{const e=k.c(24),{type:s,message:i}=t,r="dns-"+s,n=`first-line ${s}-line`;let l;e[0]!==i?(l=o.jsx(Wa,{message:i}),e[0]=i,e[1]=l):l=e[1];let a;e[2]!==n||e[3]!==l?(a=o.jsx("div",{className:n,children:l}),e[2]=n,e[3]=l,e[4]=a):a=e[4];let d;e[5]!==i?(d=o.jsx(Ka,{message:i}),e[5]=i,e[6]=d):d=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx("hr",{}),e[7]=f):f=e[7];const p=`${i.authoritative_answer?"Authoritative ":""}${i.recursion_available?"Recursive ":""}Answer`;let h;e[8]!==i.answers||e[9]!==p?(h=o.jsx(ls,{name:p,values:i.answers}),e[8]=i.answers,e[9]=p,e[10]=h):h=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx("hr",{}),e[11]=g):g=e[11];let _;e[12]!==i.authorities?(_=o.jsx(ls,{name:"Authority",values:i.authorities}),e[12]=i.authorities,e[13]=_):_=e[13];let j;e[14]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx("hr",{}),e[14]=j):j=e[14];let y;e[15]!==i.additionals?(y=o.jsx(ls,{name:"Additional",values:i.additionals}),e[15]=i.additionals,e[16]=y):y=e[16];let w;return e[17]!==r||e[18]!==_||e[19]!==y||e[20]!==a||e[21]!==d||e[22]!==h?(w=o.jsxs("section",{className:r,children:[a,d,f,h,g,_,j,y]}),e[17]=r,e[18]=_,e[19]=y,e[20]=a,e[21]=d,e[22]=h,e[23]=w):w=e[23],w};function Hr(){const t=k.c(2),e=D(za);let s;return t[0]!==e.request?(s=o.jsx(qr,{type:"request",message:e.request}),t[0]=e.request,t[1]=s):s=t[1],s}function za(t){return t.flows.selected[0]}Hr.displayName="Request";function Vr(){const t=k.c(2),e=D(Ga);let s;return t[0]!==e.response?(s=o.jsx(qr,{type:"response",message:e.response}),t[0]=e.response,t[1]=s):s=t[1],s}function Ga(t){return t.flows.selected[0]}Vr.displayName="Response";function Ya(t,e){return o.jsxs("tr",{children:[o.jsx("td",{children:t.name}),o.jsx("td",{children:t.type}),o.jsx("td",{children:t.class})]},e)}function Ja(t,e){return o.jsxs("tr",{children:[o.jsx("td",{children:t.name}),o.jsx("td",{children:t.type}),o.jsx("td",{children:t.class}),o.jsx("td",{children:t.ttl}),o.jsx("td",{children:JSON.stringify(t.data).replace(/^"|"$/g,"")})]},e)}function Mt(t,e){return e?(e=[e[0],e[1]],e[0].includes(":")&&(e[0]=`[${e[0]}]`),o.jsxs("tr",{children:[o.jsxs("td",{children:[t,":"]}),o.jsx("td",{children:e.join(":")})]})):o.jsx(o.Fragment,{})}function si(t){const e=k.c(26),{conn:s}=t;let i;if("address"in s){let f;e[0]!==s.address?(f=Mt("Address",s.address),e[0]=s.address,e[1]=f):f=e[1];let p;e[2]!==s.peername?(p=Mt("Resolved address",s.peername),e[2]=s.peername,e[3]=p):p=e[3];let h;e[4]!==s.sockname?(h=Mt("Source address",s.sockname),e[4]=s.sockname,e[5]=h):h=e[5];let g;e[6]!==f||e[7]!==p||e[8]!==h?(g=o.jsxs(o.Fragment,{children:[f,p,h]}),e[6]=f,e[7]=p,e[8]=h,e[9]=g):g=e[9],i=g}else{let f;e[10]!==s.peername?(f=Mt("Address",s.peername),e[10]=s.peername,e[11]=f):f=e[11],i=f}let r;e[12]!==s.sni?(r=s.sni?o.jsxs("tr",{children:[o.jsxs("td",{children:[o.jsx("abbr",{title:"TLS Server Name Indication",children:"SNI"}),":"]}),o.jsx("td",{children:s.sni})]}):null,e[12]=s.sni,e[13]=r):r=e[13];let n;e[14]!==s.alpn?(n=s.alpn?o.jsxs("tr",{children:[o.jsxs("td",{children:[o.jsx("abbr",{title:"ALPN protocol negotiated",children:"ALPN"}),":"]}),o.jsx("td",{children:s.alpn})]}):null,e[14]=s.alpn,e[15]=n):n=e[15];let l;e[16]!==s.tls_version?(l=s.tls_version?o.jsxs("tr",{children:[o.jsx("td",{children:"TLS Version:"}),o.jsx("td",{children:s.tls_version})]}):null,e[16]=s.tls_version,e[17]=l):l=e[17];let a;e[18]!==s.cipher?(a=s.cipher?o.jsxs("tr",{children:[o.jsx("td",{children:"TLS Cipher:"}),o.jsx("td",{children:s.cipher})]}):null,e[18]=s.cipher,e[19]=a):a=e[19];let d;return e[20]!==i||e[21]!==r||e[22]!==n||e[23]!==l||e[24]!==a?(d=o.jsx("table",{className:"connection-table",children:o.jsxs("tbody",{children:[i,r,n,l,a]})}),e[20]=i,e[21]=r,e[22]=n,e[23]=l,e[24]=a,e[25]=d):d=e[25],d}function ni(t){return o.jsx("dl",{className:"cert-attributes",children:t.map(([e,s])=>o.jsxs(I.Fragment,{children:[o.jsx("dt",{children:e}),o.jsx("dd",{children:s})]},e))})}function Qa(t){const e=k.c(46),{flow:s}=t,i=s.server_conn?.cert;if(!i){let W;return e[0]===Symbol.for("react.memo_cache_sentinel")?(W=o.jsx(o.Fragment,{}),e[0]=W):W=e[0],W}let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("h4",{children:"Server Certificate"},"name"),e[1]=r):r=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("td",{children:"Type"}),e[2]=n):n=e[2];let l;e[3]!==i.keyinfo[0]||e[4]!==i.keyinfo[1]?(l=o.jsxs("tr",{children:[n,o.jsxs("td",{children:[i.keyinfo[0],", ",i.keyinfo[1]," bits"]})]}),e[3]=i.keyinfo[0],e[4]=i.keyinfo[1],e[5]=l):l=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("td",{children:"SHA256 digest"}),e[6]=a):a=e[6];let d;e[7]!==i.sha256?(d=o.jsxs("tr",{children:[a,o.jsx("td",{children:i.sha256})]}),e[7]=i.sha256,e[8]=d):d=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx("td",{children:"Valid from"}),e[9]=f):f=e[9];let p;e[10]!==i.notbefore?(p=at(i.notbefore,{includeMilliseconds:!1}),e[10]=i.notbefore,e[11]=p):p=e[11];let h;e[12]!==p?(h=o.jsxs("tr",{children:[f,o.jsx("td",{children:p})]}),e[12]=p,e[13]=h):h=e[13];let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx("td",{children:"Valid to"}),e[14]=g):g=e[14];let _;e[15]!==i.notafter?(_=at(i.notafter,{includeMilliseconds:!1}),e[15]=i.notafter,e[16]=_):_=e[16];let j;e[17]!==_?(j=o.jsxs("tr",{children:[g,o.jsx("td",{children:_})]}),e[17]=_,e[18]=j):j=e[18];let y;e[19]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx("td",{children:"Subject Alternative Names"}),e[19]=y):y=e[19];let w;e[20]!==i.altnames?(w=i.altnames.join(", "),e[20]=i.altnames,e[21]=w):w=e[21];let $;e[22]!==w?($=o.jsxs("tr",{children:[y,o.jsx("td",{children:w})]}),e[22]=w,e[23]=$):$=e[23];let N;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=o.jsx("td",{children:"Subject"}),e[24]=N):N=e[24];let E;e[25]!==i.subject?(E=ni(i.subject),e[25]=i.subject,e[26]=E):E=e[26];let T;e[27]!==E?(T=o.jsxs("tr",{children:[N,o.jsx("td",{children:E})]}),e[27]=E,e[28]=T):T=e[28];let P;e[29]===Symbol.for("react.memo_cache_sentinel")?(P=o.jsx("td",{children:"Issuer"}),e[29]=P):P=e[29];let L;e[30]!==i.issuer?(L=ni(i.issuer),e[30]=i.issuer,e[31]=L):L=e[31];let O;e[32]!==L?(O=o.jsxs("tr",{children:[P,o.jsx("td",{children:L})]}),e[32]=L,e[33]=O):O=e[33];let M;e[34]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx("td",{children:"Serial"}),e[34]=M):M=e[34];let U;e[35]!==i.serial?(U=o.jsxs("tr",{children:[M,o.jsx("td",{children:i.serial})]}),e[35]=i.serial,e[36]=U):U=e[36];let V;return e[37]!==j||e[38]!==$||e[39]!==T||e[40]!==O||e[41]!==U||e[42]!==l||e[43]!==d||e[44]!==h?(V=o.jsxs(o.Fragment,{children:[r,o.jsx("table",{className:"certificate-table",children:o.jsxs("tbody",{children:[l,d,h,j,$,T,O,U]})})]}),e[37]=j,e[38]=$,e[39]=T,e[40]=O,e[41]=U,e[42]=l,e[43]=d,e[44]=h,e[45]=V):V=e[45],V}function Ur(t){const e=k.c(11),{flow:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("h4",{children:"Client Connection"}),e[0]=i):i=e[0];let r;e[1]!==s.client_conn?(r=o.jsx(si,{conn:s.client_conn}),e[1]=s.client_conn,e[2]=r):r=e[2];let n;e[3]!==s.server_conn?(n=s.server_conn?.address&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:"Server Connection"}),o.jsx(si,{conn:s.server_conn})]}),e[3]=s.server_conn,e[4]=n):n=e[4];let l;e[5]!==s?(l=o.jsx(Qa,{flow:s}),e[5]=s,e[6]=l):l=e[6];let a;return e[7]!==r||e[8]!==n||e[9]!==l?(a=o.jsxs("section",{className:"detail",children:[i,r,n,l]}),e[7]=r,e[8]=n,e[9]=l,e[10]=a):a=e[10],a}Ur.displayName="Connection";function Br(t){const e=k.c(7),{flow:s}=t,i=s.error.msg;let r;e[0]!==s.error.timestamp?(r=at(s.error.timestamp),e[0]=s.error.timestamp,e[1]=r):r=e[1];let n;e[2]!==r?(n=o.jsx("div",{children:o.jsx("small",{children:r})}),e[2]=r,e[3]=n):n=e[3];let l;return e[4]!==s.error.msg||e[5]!==n?(l=o.jsx("section",{className:"error",children:o.jsxs("div",{className:"alert alert-warning",children:[i,n]})}),e[4]=s.error.msg,e[5]=n,e[6]=l):l=e[6],l}Br.displayName="Error";function Xa(t){const e=k.c(4),{t:s,deltaTo:i,title:r}=t;let n;return e[0]!==i||e[1]!==s||e[2]!==r?(n=s?o.jsxs("tr",{children:[o.jsxs("td",{children:[r,":"]}),o.jsxs("td",{children:[at(s),i&&o.jsxs("span",{className:"text-muted",children:["(",mi(1e3*(s-i)),")"]})]})]}):o.jsx("tr",{}),e[0]=i,e[1]=s,e[2]=r,e[3]=n):n=e[3],n}function Wr(t){const e=k.c(26),{flow:s}=t;let i;s.type==="http"?i=s.request.timestamp_start:i=s.client_conn.timestamp_start;const r=s.server_conn?.timestamp_start;let n,l,a,d;if(e[0]!==s.client_conn.timestamp_end||e[1]!==s.client_conn.timestamp_start||e[2]!==s.client_conn.timestamp_tls_setup||e[3]!==s.request||e[4]!==s.response?.timestamp_end||e[5]!==s.response?.timestamp_start||e[6]!==s.server_conn?.timestamp_end||e[7]!==s.server_conn?.timestamp_tcp_setup||e[8]!==s.server_conn?.timestamp_tls_setup||e[9]!==s.type||e[10]!==i||e[11]!==r){const g=[{title:"Server conn. initiated",t:r,deltaTo:i},{title:"Server conn. TCP handshake",t:s.server_conn?.timestamp_tcp_setup,deltaTo:i},{title:"Server conn. TLS handshake",t:s.server_conn?.timestamp_tls_setup,deltaTo:i},{title:"Server conn. closed",t:s.server_conn?.timestamp_end,deltaTo:i},{title:"Client conn. established",t:s.client_conn.timestamp_start,deltaTo:s.type==="http"?i:void 0},{title:"Client conn. TLS handshake",t:s.client_conn.timestamp_tls_setup,deltaTo:i},{title:"Client conn. closed",t:s.client_conn.timestamp_end,deltaTo:i}];s.type==="http"&&g.push({title:"First request byte",t:s.request.timestamp_start},{title:"Request complete",t:s.request.timestamp_end,deltaTo:i},{title:"First response byte",t:s.response?.timestamp_start,deltaTo:i},{title:"Response complete",t:s.response?.timestamp_end,deltaTo:i}),a="timing",e[16]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx("h4",{children:"Timing"}),e[16]=d):d=e[16],l="timing-table",n=g.filter(td).sort(ed).map(Za),e[0]=s.client_conn.timestamp_end,e[1]=s.client_conn.timestamp_start,e[2]=s.client_conn.timestamp_tls_setup,e[3]=s.request,e[4]=s.response?.timestamp_end,e[5]=s.response?.timestamp_start,e[6]=s.server_conn?.timestamp_end,e[7]=s.server_conn?.timestamp_tcp_setup,e[8]=s.server_conn?.timestamp_tls_setup,e[9]=s.type,e[10]=i,e[11]=r,e[12]=n,e[13]=l,e[14]=a,e[15]=d}else n=e[12],l=e[13],a=e[14],d=e[15];let f;e[17]!==n?(f=o.jsx("tbody",{children:n}),e[17]=n,e[18]=f):f=e[18];let p;e[19]!==l||e[20]!==f?(p=o.jsx("table",{className:l,children:f}),e[19]=l,e[20]=f,e[21]=p):p=e[21];let h;return e[22]!==a||e[23]!==d||e[24]!==p?(h=o.jsxs("section",{className:a,children:[d,p]}),e[22]=a,e[23]=d,e[24]=p,e[25]=h):h=e[25],h}function Za(t){const{title:e,t:s,deltaTo:i}=t;return o.jsx(Xa,{title:e,t:s,deltaTo:i},e)}function ed(t,e){return t.t-e.t}function td(t){return!!t.t}Wr.displayName="Timing";function ks({flow:t,messages_meta:e}){const s=G(),i=D(f=>f.ui.flow.contentViewFor[t.id+"messages"]||"Auto"),[r,n]=I.useState(D(f=>f.options.content_view_lines_cutoff)),l=I.useCallback(()=>n(Math.max(1024,r*2)),[r]),a=Dr(t,"messages",i,r+1,t.id+e.count)??[];let d=r;return o.jsxs("div",{className:"contentview",children:[o.jsxs("div",{className:"controls",children:[o.jsxs("h5",{children:[e.count," Messages"]}),o.jsx(Lr,{value:i,onChange:f=>s(pi({messageId:t.id+"messages",contentView:f}))})]}),a.map((f,p)=>{const h=`fa fa-fw fa-arrow-${f.from_client?"right text-primary":"left text-danger"}`,g=o.jsxs("div",{children:[o.jsxs("small",{children:[o.jsx("i",{className:h}),o.jsx("span",{className:"pull-right",children:f.timestamp&&at(f.timestamp)})]}),o.jsx(Ir,{content:f.text,maxLines:d,showMore:l})]},p);return d-=f.text.split(` -`).length,g})]})}function Kr(t){const e=k.c(8),{flow:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("h4",{children:"WebSocket"}),e[0]=i):i=e[0];let r;e[1]!==s?(r=o.jsx(ks,{flow:s,messages_meta:s.websocket.messages_meta}),e[1]=s,e[2]=r):r=e[2];let n;e[3]!==s.websocket?(n=o.jsx(sd,{websocket:s.websocket}),e[3]=s.websocket,e[4]=n):n=e[4];let l;return e[5]!==r||e[6]!==n?(l=o.jsxs("section",{className:"websocket",children:[i,r,n]}),e[5]=r,e[6]=n,e[7]=l):l=e[7],l}Kr.displayName="WebSocket";function sd(t){const e=k.c(10),{websocket:s}=t;if(!s.timestamp_end)return null;const i=s.close_reason?`(${s.close_reason})`:"";let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("i",{className:"fa fa-fw fa-window-close text-muted"}),e[0]=r):r=e[0];const n=s.closed_by_client?"client":"server",l=s.close_code;let a;e[1]!==s.timestamp_end?(a=at(s.timestamp_end),e[1]=s.timestamp_end,e[2]=a):a=e[2];let d;e[3]!==a?(d=o.jsx("small",{className:"pull-right",children:a}),e[3]=a,e[4]=d):d=e[4];let f;return e[5]!==i||e[6]!==n||e[7]!==d||e[8]!==s.close_code?(f=o.jsxs("div",{children:[r,"  Closed by ",n," ","with code ",l," ",i,".",d]}),e[5]=i,e[6]=n,e[7]=d,e[8]=s.close_code,e[9]=f):f=e[9],f}function zr(t){const e=k.c(7),{flow:s}=t,i=G();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("h4",{children:"Comment"}),e[0]=r):r=e[0];let n;e[1]!==i||e[2]!==s?(n=a=>{i(Le(s,{comment:a}))},e[1]=i,e[2]=s,e[3]=n):n=e[3];let l;return e[4]!==s.comment||e[5]!==n?(l=o.jsxs("section",{className:"timing",children:[r,o.jsx(ce,{className:"kv-value",content:s.comment,onEditDone:n,placeholder:"empty",selectAllOnClick:!0})]}),e[4]=s.comment,e[5]=n,e[6]=l):l=e[6],l}zr.displayName="Comment";function Gr(t){const e=k.c(2),{flow:s}=t;let i;return e[0]!==s?(i=o.jsx("section",{className:"tcp",children:o.jsx(ks,{flow:s,messages_meta:s.messages_meta})}),e[0]=s,e[1]=i):i=e[1],i}Gr.displayName="Stream Data";function Yr(t){const e=k.c(2),{flow:s}=t;let i;return e[0]!==s?(i=o.jsx("section",{className:"udp",children:o.jsx(ks,{flow:s,messages_meta:s.messages_meta})}),e[0]=s,e[1]=i):i=e[1],i}Yr.displayName="Datagrams";const ii={request:Or,response:Mr,error:Br,connection:Ur,timing:Wr,websocket:Kr,tcpmessages:Gr,udpmessages:Yr,dnsrequest:Hr,dnsresponse:Vr,comment:zr};function vs(t){let e;switch(t.type){case"http":e=["request","response","websocket"].filter(s=>t[s]);break;case"tcp":e=["tcpmessages"];break;case"udp":e=["udpmessages"];break;case"dns":e=["request","response"].filter(s=>t[s]).map(s=>"dns"+s);break}return t.error&&e.push("error"),e.push("connection"),e.push("timing"),e.push("comment"),e}function nd(){const t=k.c(15),e=G(),s=D(rd);let i=D(id);if(s==null){let y;return t[0]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx(o.Fragment,{}),t[0]=y):y=t[0],y}const r=vs(s);r.indexOf(i)<0&&(i==="response"&&s.error?i="error":i==="error"&&"response"in s?i="response":i=r[0]);const n=ii[i],l="flow-detail",a="nav-tabs nav-tabs-sm";let d;t[1]!==e?(d=()=>e(Ve([])),t[1]=e,t[2]=d):d=t[2];let f;t[3]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx("i",{className:"fa fa-times-circle"}),t[3]=f):f=t[3];let p;t[4]!==d?(p=o.jsx("button",{"data-testid":"close-button-id",className:"close-button",onClick:d,children:f}),t[4]=d,t[5]=p):p=t[5];const h=r.map(y=>o.jsx("a",{href:"#",className:je({active:i===y}),onClick:w=>{w.preventDefault(),e(Ut(y))},children:ii[y].displayName},y));let g;t[6]!==p||t[7]!==h?(g=o.jsxs("nav",{className:a,children:[p,h]}),t[6]=p,t[7]=h,t[8]=g):g=t[8];let _;t[9]!==n||t[10]!==s?(_=o.jsx(n,{flow:s}),t[9]=n,t[10]=s,t[11]=_):_=t[11];let j;return t[12]!==g||t[13]!==_?(j=o.jsxs("div",{className:l,children:[g,_]}),t[12]=g,t[13]=_,t[14]=j):j=t[14],j}function id(t){return t.ui.flow.tab}function rd(t){return t.flows.selected[0]}function od(t){if(t.ctrlKey||t.metaKey)return()=>{};const e=t.key;return t.preventDefault(),(s,i)=>{const{flows:r}=i(),n=r.selected,l=n[0];switch(e){case"k":case"ArrowUp":s(ht(r,-1));break;case"j":case"ArrowDown":s(ht(r,1));break;case" ":case"PageDown":s(ht(r,10));break;case"PageUp":s(ht(r,-10));break;case"End":s(ht(r,1e10));break;case"Home":s(ht(r,-1e10));break;case"Escape":i().ui.modal.activeModal?s(Wi()):s(Ve([]));break;case"ArrowLeft":{if(!l)break;const a=vs(l),d=i().ui.flow.tab,f=a[(Math.max(0,a.indexOf(d))-1+a.length)%a.length];s(Ut(f));break}case"Tab":case"ArrowRight":{if(!l)break;const a=vs(l),d=i().ui.flow.tab,f=a[(Math.max(0,a.indexOf(d))+1)%a.length];s(Ut(f));break}case"Delete":case"d":{s(Ii(n));break}case"n":{Bt("view.flows.create","get","https://example.com/");break}case"D":{s(Li(n));break}case"a":{s(ys(n));break}case"A":{s(Di());break}case"r":{s(ws(n));break}case"v":{s(Pi(n));break}case"x":{s(Fi(n));break}case"X":{s(Zl());break}case"z":{s(Oi());break}default:return}}}class ld extends I.Component{static defaultProps={axis:"x"};node=Te.createRef();constructor(e,s){super(e,s),this.state={applied:!1,startPos:0,dragPointer:.1},this.onLostPointerCapture=this.onLostPointerCapture.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this)}onPointerDown(e){this.state.dragPointer===.1&&(e.target.setPointerCapture(e.pointerId),this.setState({startPos:this.props.axis==="x"?e.pageX:e.pageY,dragPointer:e.pointerId}))}onLostPointerCapture(e){if(this.state.dragPointer!==e.pointerId)return;const s=this.node.current,i=s.previousElementSibling,r=s.nextElementSibling;s.style.transform="",i.style.flex=`0 0 ${Math.max(0,(this.props.axis==="x"?i.offsetWidth+e.pageX:i.offsetHeight+e.pageY)-this.state.startPos)}px`,r.style.flex="1 1 auto",this.setState({applied:!0,dragPointer:.1}),this.onResize()}onPointerMove(e){this.state.dragPointer===e.pointerId&&(this.node.current.style.transform=this.props.axis==="x"?`translateX(${e.pageX-this.state.startPos}px)`:`translateY(${e.pageY-this.state.startPos}px)`)}onResize(){window.setTimeout(()=>window.dispatchEvent(new CustomEvent("resize")),1)}reset(e){this.state.applied&&(this.node.current?.previousElementSibling instanceof HTMLElement&&(this.node.current.previousElementSibling.style.flex=""),this.node.current?.nextElementSibling instanceof HTMLElement&&(this.node.current.nextElementSibling.style.flex=""),e||this.setState({applied:!1}),this.onResize())}componentWillUnmount(){this.reset(!0)}render(){return o.jsx("div",{ref:this.node,className:je("splitter",this.props.axis==="x"?"splitter-x":"splitter-y"),children:o.jsx("div",{onLostPointerCapture:this.onLostPointerCapture,onPointerDown:this.onPointerDown,onPointerMove:this.onPointerMove})})}}const Es=t=>{const e=t.current;return e===null||e.scrollTop===0?!1:Math.ceil(e.scrollTop)+e.clientHeight>=e.scrollHeight},Jr=t=>{t.current&&!Es(t)&&(t.current.scrollTop=t.current.scrollHeight)};function kt(t=void 0){if(!t)return{start:0,end:0,paddingTop:0,paddingBottom:0};const{itemCount:e,rowHeight:s,viewportTop:i,viewportHeight:r,itemHeights:n}=t,l=i+r;let a=0,d=0,f=0,p=0;if(n){let h=0;for(let g=0;g0&&ho.jsx("td",{className:je("col-tls",t.client_conn.tls_established?"col-tls-https":"col-tls-http")});Ts.headerName="";const Rs=({rowNumber:t})=>o.jsx("td",{className:"col-index",children:t+1});Rs.headerName="#";const As=({flow:t})=>o.jsx("td",{className:"col-icon",children:o.jsx("div",{className:je("resource-icon",Si(t))})});As.headerName="";const Ds=({flow:t})=>{let e;return t.error&&(t.error.msg==="Connection killed."?e=o.jsx("i",{className:"fa fa-fw fa-times pull-right"}):e=o.jsx("i",{className:"fa fa-fw fa-exclamation pull-right"})),o.jsxs("td",{className:"col-path",children:[t.is_replay==="request"&&o.jsx("i",{className:"fa fa-fw fa-repeat pull-right"}),t.intercepted&&o.jsx("i",{className:"fa fa-fw fa-pause pull-right"}),e,o.jsx("span",{className:"marker pull-right",children:t.marked}),$i(t)]})};Ds.headerName="Path";const Fs=({flow:t})=>o.jsx("td",{className:"col-method",children:Ni(t)});Fs.headerName="Method";const Is=({flow:t})=>o.jsx("td",{className:"col-http-version",children:ki(t)});Is.headerName="Version";const Ls=({flow:t})=>{let e="darkred";return t.type!=="http"&&t.type!="dns"||!t.response?o.jsx("td",{className:"col-status"}):(100<=t.response.status_code&&t.response.status_code<200?e="green":200<=t.response.status_code&&t.response.status_code<300?e="darkgreen":300<=t.response.status_code&&t.response.status_code<400?e="lightblue":(400<=t.response.status_code&&t.response.status_code<500||500<=t.response.status_code&&t.response.status_code<600)&&(e="red"),o.jsx("td",{className:"col-status",style:{color:e},children:Ci(t)}))};Ls.headerName="Status";const Ps=({flow:t})=>o.jsx("td",{className:"col-size",children:hi(wi(t))});Ps.headerName="Size";const Os=({flow:t})=>{const e=Wt(t),s=yi(t);return o.jsx("td",{className:"col-time",children:e&&s?mi(1e3*(s-e)):"..."})};Os.headerName="Time";const Ms=({flow:t})=>{const e=Wt(t);return o.jsx("td",{className:"col-timestamp",children:e?at(e):"..."})};Ms.headerName="Start time";const Qt=({flow:t})=>{const e=G();let s=null;return t.intercepted?s=o.jsx("a",{href:"#",className:"quickaction",onClick:()=>e(ys([t])),children:o.jsx("i",{className:"fa fa-fw fa-play text-success"})}):xs(t)&&(s=o.jsx("a",{href:"#",className:"quickaction",onClick:()=>e(ws([t])),children:o.jsx("i",{className:"fa fa-fw fa-repeat text-primary"})})),o.jsx("td",{className:"col-quickactions",children:s?o.jsx("div",{children:s}):o.jsx(o.Fragment,{})})};Qt.headerName="";const qs=({flow:t})=>{const e=t.comment;return o.jsx("td",{className:"col-comment",children:e})};qs.headerName="Comment";const Qr={icon:As,index:Rs,method:Fs,version:Is,path:Ds,quickactions:Qt,size:Ps,status:Ls,time:Os,timestamp:Ms,tls:Ts,comment:qs},cd=Object.freeze(Object.defineProperty({__proto__:null,comment:qs,default:Qr,icon:As,index:Rs,method:Fs,path:Ds,quickactions:Qt,size:Ps,status:Ls,time:Os,timestamp:Ms,tls:Ts,version:Is},Symbol.toStringTag,{value:"Module"})),ad=I.memo(function(){const e=k.c(13),s=G(),i=D(dd),r=D(ud),n=D(fd),l=i?"sort-desc":"sort-asc";let a;if(e[0]!==s||e[1]!==n||e[2]!==r||e[3]!==i||e[4]!==l){const f=n.filter(zl).concat("quickactions");let p;e[6]!==s||e[7]!==r||e[8]!==i||e[9]!==l?(p=h=>o.jsx("th",{className:je(`col-${h}`,r===h&&l),onClick:()=>s(Ui({column:h===r&&i?void 0:h,desc:h!==r?!1:!i})),children:Qr[h].headerName},h),e[6]=s,e[7]=r,e[8]=i,e[9]=l,e[10]=p):p=e[10],a=f.map(p),e[0]=s,e[1]=n,e[2]=r,e[3]=i,e[4]=l,e[5]=a}else a=e[5];let d;return e[11]!==a?(d=o.jsx("tr",{children:a}),e[11]=a,e[12]=d):d=e[12],d});function dd(t){return t.flows.sort.desc}function ud(t){return t.flows.sort.column}function fd(t){return t.options.web_columns}const pd=Te.memo(function({flow:e,selected:s,highlighted:i,displayColumnNames:r,rowNumber:n}){const l=G(),a=je({selected:s,highlighted:i,intercepted:e.intercepted,"has-request":e.type==="http"&&e.request,"has-response":e.type==="http"&&e.response}),d=I.useCallback(p=>{let h=p.target;for(;h.parentNode;){if(h.classList.contains("col-quickactions"))return;h=h.parentNode}p.metaKey||p.ctrlKey?l(ic(e)):p.shiftKey?(window.getSelection()?.empty(),l(rc(e))):l(Ve([e]))},[e]),f=r.map(p=>cd[p]).filter(p=>p).concat(Qt);return o.jsx("tr",{className:a,onClick:d,children:f.map(p=>o.jsx(p,{flow:e,rowNumber:n},p.name))})});class hd extends I.Component{static defaultProps={rowHeight:32};viewport=I.createRef();head=I.createRef();constructor(e,s){super(e,s),this.state={vScroll:kt(),viewportTop:0},this.onViewportUpdate=this.onViewportUpdate.bind(this)}componentDidMount(){window.addEventListener("resize",this.onViewportUpdate),this.onViewportUpdate()}componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}getSnapshotBeforeUpdate(){return Es(this.viewport)}componentDidUpdate(e,s,i){i&&Jr(this.viewport),this.onViewportUpdate();const{onlySelectedId:r}=this.props;if(r&&r!==e.onlySelectedId){const{rowHeight:l,firstSelectedIndex:a}=this.props,d=this.viewport.current,f=this.head.current,p=f?f.offsetHeight:0,h=a*l+p,g=h+l,_=d.scrollTop,j=d.offsetHeight;h-p<_?d.scrollTop=h-p:g>_+j&&(d.scrollTop=g-j),this.onViewportUpdate()}}onViewportUpdate(){const e=this.viewport.current,s=e.scrollTop||0,i=kt({viewportTop:s,viewportHeight:e.offsetHeight||0,itemCount:this.props.flowView.length,rowHeight:this.props.rowHeight});if(this.state.viewportTop!==s||!Kt(this.state.vScroll,i)){const r=Math.min(s,i.end*this.props.rowHeight);this.setState({vScroll:i,viewportTop:r})}}render(){const{vScroll:e,viewportTop:s}=this.state,{flowView:i,selectedIds:r,highlightedIds:n,displayColumnNames:l,listIndex:a}=this.props;return o.jsx("div",{className:"flow-table",onScroll:this.onViewportUpdate,ref:this.viewport,children:o.jsxs("table",{children:[o.jsx("thead",{ref:this.head,style:{transform:`translateY(${s}px)`},children:o.jsx(ad,{})}),o.jsxs("tbody",{children:[o.jsx("tr",{style:{height:e.paddingTop}}),i.slice(e.start,e.end).map(d=>o.jsx(pd,{flow:d,selected:r.has(d.id),highlighted:n.has(d.id),displayColumnNames:l,rowNumber:a.get(d.id)},d.id)),o.jsx("tr",{style:{height:e.paddingBottom}})]})]})})}}const md=zt(t=>({flowView:t.flows.view,highlightedIds:t.flows.highlightedIds,selectedIds:t.flows.selectedIds,onlySelectedId:t.flows.selected.length===1&&t.flows.selected[0].id,firstSelectedIndex:t.flows._viewIndex.get(t.flows.selected[0]?.id),displayColumnNames:t.options.web_columns,listIndex:t.flows._listIndex}))(hd);function gd(){const t=k.c(3);let e,s;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={padding:"1em 2em"},s=o.jsx("h3",{children:"mitmproxy is running."}),t[0]=e,t[1]=s):(e=t[0],s=t[1]);let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsxs("div",{style:e,children:[s,o.jsxs("p",{children:["No flows have been recorded yet.",o.jsx("br",{}),"To start capturing traffic, please configure your settings in the Capture tab."]})]}),t[2]=i):i=t[2],i}function vd(t){const e=k.c(20);let{description:s,listen_addrs:i,is_running:r,wireguard_conf:n,type:l}=t;const a=I.useRef(null);let d,f;e[0]!==n?(d=()=>{n&&a.current&&Ll.toCanvas(a.current,n,{margin:0,scale:3})},f=[n],e[0]=n,e[1]=d,e[2]=f):(d=e[1],f=e[2]),I.useEffect(d,f);let p;const h=i.length===1||i.length===2&&i[0][1]===i[1][1],g=i.every(xd);if(h&&g){let y;e[3]!==i[0][1]?(y=Hn(["*",i[0][1]]),e[3]=i[0][1],e[4]=y):y=e[4],p=y}else{let y;e[5]!==i?(y=i.map(Hn).join(" and "),e[5]=i,e[6]=y):y=e[6],p=y}s=s[0].toUpperCase()+s.substr(1);let _;if(r){let y;e[9]!==s||e[10]!==p||e[11]!==l?(y=l==="local"?o.jsxs("div",{className:"text-success",children:[s," is active."]}):o.jsxs("div",{className:"text-success",children:[s," listening at ",p,"."]}),e[9]=s,e[10]=p,e[11]=l,e[12]=y):y=e[12];let w;e[13]!==n?(w=n&&o.jsxs("div",{className:"wireguard-config",children:[o.jsx("pre",{children:n}),o.jsx("canvas",{ref:a})]}),e[13]=n,e[14]=w):w=e[14];let $;e[15]!==y||e[16]!==w?($=o.jsxs(o.Fragment,{children:[y,w]}),e[15]=y,e[16]=w,e[17]=$):$=e[17],_=$}else{let y;e[7]!==s?(y=o.jsx(o.Fragment,{children:o.jsxs("div",{className:"text-warning",children:[s," starting..."]})}),e[7]=s,e[8]=y):y=e[8],_=y}let j;return e[18]!==_?(j=o.jsx("div",{children:_}),e[18]=_,e[19]=j):j=e[19],j}function xd(t){return["::","0.0.0.0"].includes(t[0])}function et(t){const e=k.c(5),{error:s,backendState:i}=t;let r;e[0]!==i||e[1]!==s?(r=s?o.jsx("div",{className:"text-danger",children:s}):i&&o.jsx(vd,{...i}),e[0]=i,e[1]=s,e[2]=r):r=e[2];let n;return e[3]!==r?(n=o.jsx("div",{className:"mode-status",children:r}),e[3]=r,e[4]=n):n=e[4],n}function tt(t){const e=k.c(13),{value:s,onChange:i,children:r,label:n}=t,l=I.useId(),a=`mode-checkbox-${l}`,d=`mode-checkbox-${l}`;let f;e[0]!==i||e[1]!==a||e[2]!==d||e[3]!==s?(f=o.jsx("input",{type:"checkbox",name:a,id:d,checked:s,onChange:i}),e[0]=i,e[1]=a,e[2]=d,e[3]=s,e[4]=f):f=e[4];const p=`mode-checkbox-${l}`;let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h={marginBottom:0,fontWeight:"normal"},e[5]=h):h=e[5];let g;e[6]!==n||e[7]!==p?(g=o.jsx("label",{htmlFor:p,style:h,children:n}),e[6]=n,e[7]=p,e[8]=g):g=e[8];let _;return e[9]!==r||e[10]!==f||e[11]!==g?(_=o.jsxs("div",{className:"mode-entry",children:[f,g,r]}),e[9]=r,e[10]=f,e[11]=g,e[12]=_):_=e[12],_}function st(t){const e=k.c(22),{children:s,iconClass:i,classname:r,isVisible:n}=t,l=I.useId();let a;e[0]!==l?(a=[...l].map(_d),e[0]=l,e[1]=a):a=e[1];const d="--"+a.join(""),f=I.useRef(null),p=I.useRef(null);let h;e[2]!==d?(h=()=>{f.current.style.anchorName=d,p.current.style.positionAnchor=d},e[2]=d,e[3]=h):h=e[3];let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=[],e[4]=g):g=e[4],I.useEffect(h,g);let _;e[5]!==l||e[6]!==n?(_=()=>{n===!0&&document.getElementById(l)?.showPopover()},e[5]=l,e[6]=n,e[7]=_):_=e[7];let j;e[8]!==n?(j=[n],e[8]=n,e[9]=j):j=e[9],I.useEffect(_,j);const y=r?`mode-popover ${r}`:"mode-popover";let w;e[10]!==i?(w=o.jsx("i",{className:i,"aria-hidden":"true"}),e[10]=i,e[11]=w):w=e[11];let $;e[12]!==l||e[13]!==w?($=o.jsx("button",{popoverTarget:l,ref:f,children:w}),e[12]=l,e[13]=w,e[14]=$):$=e[14];let N;e[15]!==s||e[16]!==l?(N=o.jsx("div",{id:l,popover:"auto",ref:p,children:s}),e[15]=s,e[16]=l,e[17]=N):N=e[17];let E;return e[18]!==y||e[19]!==$||e[20]!==N?(E=o.jsxs("div",{className:y,children:[$,N]}),e[18]=y,e[19]=$,e[20]=N,e[21]=E):E=e[21],E}function _d(t){return t.charCodeAt(0).toString(16)}function jd(t){const e=k.c(44),{server:s}=t,{currentProcesses:i,isLoading:r}=D(bd),{selectedProcesses:n}=D(wd);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0];const[a,d]=I.useState(l),[f,p]=I.useState(""),h=G(),{platform:g}=D(yd);let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=B=>{p(B.target.value)},e[1]=_):_=e[1];const j=_;let y;e[2]!==g?(y=B=>{const oe=g.startsWith("win32")?"\\":"/";return ps(B.executable,oe)[1]},e[2]=g,e[3]=y):y=e[3];const w=y;let $;e[4]!==h||e[5]!==w||e[6]!==n||e[7]!==s?($=B=>{const oe=typeof B=="string"?B:w(B),q=n?`${n}, ${oe}`:oe;h(St({server:s,value:q}))},e[4]=h,e[5]=w,e[6]=n,e[7]=s,e[8]=$):$=e[8];const N=$;let E;e[9]!==h||e[10]!==w||e[11]!==n||e[12]!==s?(E=B=>{const oe=n?.split(/,\s*/).filter(q=>q!==w(B)).join(", ");h(St({server:s,value:oe}))},e[9]=h,e[10]=w,e[11]=n,e[12]=s,e[13]=E):E=e[13];const T=E,P=B=>{L(B)&&n?T(B):N(B)},L=B=>{const oe=w(B);return n?.includes(oe)};let O;e[14]!==i||e[15]!==h?(O=()=>{i.length===0&&h($t())},e[14]=i,e[15]=h,e[16]=O):O=e[16];let M;e[17]===Symbol.for("react.memo_cache_sentinel")?(M=[],e[17]=M):M=e[17],I.useEffect(O,M);let U;e[18]!==i||e[19]!==f||e[20]!==w||e[21]!==a?(U=()=>{if(f){const B=i.filter(oe=>w(oe).toLowerCase().includes(f.toLowerCase()));d(B)}else a!==i&&d(i)},e[18]=i,e[19]=f,e[20]=w,e[21]=a,e[22]=U):U=e[22];let V;e[23]!==i||e[24]!==f?(V=[f,i],e[23]=i,e[24]=f,e[25]=V):V=e[25],I.useEffect(U,V);let W;e[26]!==N||e[27]!==f?(W=B=>{B.stopPropagation(),B.key==="Enter"&&(N(f),p(""))},e[26]=N,e[27]=f,e[28]=W):W=e[28];const J=W,[z,te]=I.useState(!1),Y="local-dropdown",Q="dropdown-header",X=n&&n?.length>0?"Add more":"all applications";let Z,ae;e[29]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>te(!0),ae=()=>te(!1),e[29]=Z,e[30]=ae):(Z=e[29],ae=e[30]);let le;e[31]!==f||e[32]!==J||e[33]!==X?(le=o.jsx("input",{type:"text",className:"autocomplete-input",placeholder:X,value:f,onChange:j,onKeyDown:J,onClick:Z,onBlur:ae}),e[31]=f,e[32]=J,e[33]=X,e[34]=le):le=e[34];const de=st,ye="fa fa-chevron-down",Pe="local-popover";let Se;e[35]===Symbol.for("react.memo_cache_sentinel")?(Se=o.jsx("h4",{children:"Current Applications running on machine"}),e[35]=Se):Se=e[35];const Ee=r?o.jsx("i",{className:"fa fa-spinner","aria-hidden":"true"}):a.length>0?o.jsxs("ul",{className:"dropdown-list",children:[o.jsxs("li",{className:`dropdown-item ${n===""?"selected":""}`,onClick:()=>{h(St({server:s,value:""}))},role:"menuitem",children:[o.jsxs("div",{className:"process-details",children:[o.jsx("div",{className:"process-icon"}),o.jsx("span",{className:"process-name",children:"All applications"})]}),n===""&&o.jsx("i",{className:"fa fa-check","aria-hidden":"true"})]}),o.jsx("hr",{className:"process-separator"}),a.map((B,oe)=>o.jsxs("li",{className:`dropdown-item ${L(B)?"selected":""}`,onClick:()=>P(B),role:"menuitem",children:[o.jsxs("div",{className:"process-details",children:[o.jsx("img",{className:"process-icon",src:`./executable-icon?path=${B.executable}`,loading:"lazy"}),o.jsx("span",{className:"process-name",children:w(B)})]}),L(B)&&o.jsx("i",{className:"fa fa-check","aria-hidden":"true"})]},oe))]}):o.jsxs("span",{children:["Press ",o.jsx("strong",{children:"Enter"})," to capture traffic for programs matching: ",o.jsx("strong",{children:f})]});let C;e[36]!==de||e[37]!==z||e[38]!==Se||e[39]!==Ee?(C=o.jsxs(de,{iconClass:ye,classname:Pe,isVisible:z,children:[Se,Ee]}),e[36]=de,e[37]=z,e[38]=Se,e[39]=Ee,e[40]=C):C=e[40];let he;return e[41]!==le||e[42]!==C?(he=o.jsx("div",{className:Y,children:o.jsxs("div",{className:Q,children:[le,C]})}),e[41]=le,e[42]=C,e[43]=he):he=e[43],he}function yd(t){return t.backendState}function wd(t){return t.modes.local[0]}function bd(t){return t.processes}function Sd(){const t=k.c(9),e=D(Cd),s=D($d);let i;if(t[0]!==s||t[1]!==e){let d;t[3]!==s?(d=f=>o.jsx(Nd,{server:f,backendState:s[Zi(f)]},f.ui_id),t[3]=s,t[4]=d):d=t[4],i=e.map(d),t[0]=s,t[1]=e,t[2]=i}else i=t[2];const r=i;let n,l;t[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("h4",{className:"mode-title",children:"Local Applications"}),l=o.jsx("p",{className:"mode-description",children:"Transparently Intercept local application(s)."}),t[5]=n,t[6]=l):(n=t[5],l=t[6]);let a;return t[7]!==r?(a=o.jsxs("div",{children:[n,l,r]}),t[7]=r,t[8]=a):a=t[8],a}function $d(t){return t.backendState.servers}function Cd(t){return t.modes.local}function Nd(t){const e=k.c(31),{server:s,backendState:i}=t,r=G(),n=D(Ed),l=s.error||i?.last_exception||n||void 0;let a;e[0]!==r||e[1]!==s?(a=E=>{const T=s.selectedProcesses?.split(/,\s*/).filter(P=>P!==E).join(", ");r(St({server:s,value:T}))},e[0]=r,e[1]=s,e[2]=a):a=e[2];const d=a;let f;e[3]!==r||e[4]!==s?(f=()=>r(cr({server:s,value:!s.active})),e[3]=r,e[4]=s,e[5]=f):f=e[5];let p;e[6]!==d||e[7]!==s.selectedProcesses?(p=s.selectedProcesses?.split(/,\s*/).filter(kd).map(E=>o.jsxs("div",{className:"selected-process",children:[E,o.jsx("i",{className:"fa fa-times","aria-hidden":"true",onClick:()=>d(E)})]},E)),e[6]=d,e[7]=s.selectedProcesses,e[8]=p):p=e[8];let h;e[9]!==p?(h=o.jsx("div",{className:"selected-processes",children:p}),e[9]=p,e[10]=h):h=e[10];let g;e[11]!==s?(g=o.jsx(jd,{server:s}),e[11]=s,e[12]=g):g=e[12];let _;e[13]!==r?(_=o.jsx("i",{className:"fa fa-refresh","aria-hidden":"true",onClick:()=>r($t())}),e[13]=r,e[14]=_):_=e[14];let j;e[15]!==g||e[16]!==_?(j=o.jsxs("div",{className:"dropdown-container",children:[g,_]}),e[15]=g,e[16]=_,e[17]=j):j=e[17];let y;e[18]!==h||e[19]!==j?(y=o.jsxs("div",{className:"processes-container",children:[h,j]}),e[18]=h,e[19]=j,e[20]=y):y=e[20];let w;e[21]!==s.active||e[22]!==f||e[23]!==y?(w=o.jsx(tt,{value:s.active,label:"Intercept traffic for",onChange:f,children:y}),e[21]=s.active,e[22]=f,e[23]=y,e[24]=w):w=e[24];let $;e[25]!==i||e[26]!==l?($=o.jsx(et,{error:l,backendState:i}),e[25]=i,e[26]=l,e[27]=$):$=e[27];let N;return e[28]!==$||e[29]!==w?(N=o.jsxs("div",{className:"mode-local",children:[w,$]}),e[28]=$,e[29]=w,e[30]=N):N=e[30],N}function kd(t){return t.trim()!==""}function Ed(t){return t.processes.error}function Td(){const t=k.c(9),e=D(Ad),s=D(Rd);let i;if(t[0]!==s||t[1]!==e){let d;t[3]!==s?(d=f=>o.jsx(Dd,{server:f,backendState:s[Xi(f)]},f.ui_id),t[3]=s,t[4]=d):d=t[4],i=e.map(d),t[0]=s,t[1]=e,t[2]=i}else i=t[2];const r=i;let n,l;t[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("h4",{className:"mode-title",children:"Explicit HTTP(S) Proxy"}),l=o.jsx("p",{className:"mode-description",children:"You manually configure your client application or device to use an HTTP(S) proxy."}),t[5]=n,t[6]=l):(n=t[5],l=t[6]);let a;return t[7]!==r?(a=o.jsxs("div",{children:[n,l,r]}),t[7]=r,t[8]=a):a=t[8],a}function Rd(t){return t.backendState.servers}function Ad(t){return t.modes.regular}function Dd(t){const e=k.c(33),{server:s,backendState:i}=t,r=G(),n=s.error||i?.last_exception||void 0;let l;e[0]!==r||e[1]!==s?(l=()=>r(rr({server:s,value:!s.active})),e[0]=r,e[1]=s,e[2]=l):l=e[2];let a,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("h4",{children:"Advanced Configuration"}),d=o.jsx("p",{children:"Listen Host"}),e[3]=a,e[4]=d):(a=e[3],d=e[4]);const f=s.listen_host||"";let p;e[5]!==r||e[6]!==s?(p=T=>r(or({server:s,value:T})),e[5]=r,e[6]=s,e[7]=p):p=e[7];let h;e[8]!==f||e[9]!==p?(h=o.jsx(ce,{className:"mode-input",content:f,onEditDone:p}),e[8]=f,e[9]=p,e[10]=h):h=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx("p",{children:"Listen Port"}),e[11]=g):g=e[11];let _;e[12]!==s.listen_port?(_=s.listen_port?s.listen_port.toString():"",e[12]=s.listen_port,e[13]=_):_=e[13];let j;e[14]!==r||e[15]!==s?(j=T=>r(lr({server:s,value:parseInt(T)})),e[14]=r,e[15]=s,e[16]=j):j=e[16];let y;e[17]!==_||e[18]!==j?(y=o.jsx(ce,{className:"mode-input",content:_,placeholder:"8080",onEditDone:j}),e[17]=_,e[18]=j,e[19]=y):y=e[19];let w;e[20]!==y||e[21]!==h?(w=o.jsxs(st,{iconClass:"fa fa-cog",children:[a,d,h,g,y]}),e[20]=y,e[21]=h,e[22]=w):w=e[22];let $;e[23]!==s.active||e[24]!==l||e[25]!==w?($=o.jsx(tt,{value:s.active,label:"Run HTTP/S Proxy",onChange:l,children:w}),e[23]=s.active,e[24]=l,e[25]=w,e[26]=$):$=e[26];let N;e[27]!==i||e[28]!==n?(N=o.jsx(et,{error:n,backendState:i}),e[27]=i,e[28]=n,e[29]=N):N=e[29];let E;return e[30]!==$||e[31]!==N?(E=o.jsxs("div",{children:[$,N]}),e[30]=$,e[31]=N,e[32]=E):E=e[32],E}function Fd(){const t=k.c(9),e=D(Ld),s=D(Id);let i;if(t[0]!==s||t[1]!==e){let d;t[3]!==s?(d=f=>o.jsx(Pd,{server:f,backendState:s[er(f)]},f.ui_id),t[3]=s,t[4]=d):d=t[4],i=e.map(d),t[0]=s,t[1]=e,t[2]=i}else i=t[2];const r=i;let n,l;t[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("h4",{className:"mode-title",children:"WireGuard Server"}),l=o.jsx("p",{className:"mode-description",children:"Start a WireGuard™ server and connect an external device for transparent proxying."}),t[5]=n,t[6]=l):(n=t[5],l=t[6]);let a;return t[7]!==r?(a=o.jsxs("div",{children:[n,l,r]}),t[7]=r,t[8]=a):a=t[8],a}function Id(t){return t.backendState.servers}function Ld(t){return t.modes.wireguard}function Pd(t){const e=k.c(41),{server:s,backendState:i}=t,r=G(),n=s.error||i?.last_exception||void 0;let l;e[0]!==r||e[1]!==s?(l=()=>r(ar({server:s,value:!s.active})),e[0]=r,e[1]=s,e[2]=l):l=e[2];let a,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("h4",{children:"Advanced Configuration"}),d=o.jsx("p",{children:"Listen Host"}),e[3]=a,e[4]=d):(a=e[3],d=e[4]);const f=s.listen_host||"";let p;e[5]!==r||e[6]!==s?(p=M=>r(dr({server:s,value:M})),e[5]=r,e[6]=s,e[7]=p):p=e[7];let h;e[8]!==f||e[9]!==p?(h=o.jsx(ce,{className:"mode-input",content:f,placeholder:"(all interfaces)",onEditDone:p}),e[8]=f,e[9]=p,e[10]=h):h=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx("p",{children:"Listen Port"}),e[11]=g):g=e[11];let _;e[12]!==s.listen_port?(_=s.listen_port?s.listen_port.toString():"",e[12]=s.listen_port,e[13]=_):_=e[13];let j;e[14]!==r||e[15]!==s?(j=M=>r(ur({server:s,value:parseInt(M)})),e[14]=r,e[15]=s,e[16]=j):j=e[16];let y;e[17]!==_||e[18]!==j?(y=o.jsx(ce,{className:"mode-input",content:_,placeholder:"51820",onEditDone:j}),e[17]=_,e[18]=j,e[19]=y):y=e[19];let w;e[20]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx("p",{children:"Configuration File"}),e[20]=w):w=e[20];const $=s.file_path||"";let N;e[21]!==r||e[22]!==s?(N=M=>r(fr({server:s,value:M})),e[21]=r,e[22]=s,e[23]=N):N=e[23];let E;e[24]!==$||e[25]!==N?(E=o.jsx(ce,{className:"mode-input",content:$,placeholder:"~/.mitmproxy/wireguard.conf",onEditDone:N}),e[24]=$,e[25]=N,e[26]=E):E=e[26];let T;e[27]!==y||e[28]!==E||e[29]!==h?(T=o.jsxs(st,{iconClass:"fa fa-cog",children:[a,d,h,g,y,w,E]}),e[27]=y,e[28]=E,e[29]=h,e[30]=T):T=e[30];let P;e[31]!==s.active||e[32]!==l||e[33]!==T?(P=o.jsx(tt,{value:s.active,label:"Run WireGuard Server",onChange:l,children:T}),e[31]=s.active,e[32]=l,e[33]=T,e[34]=P):P=e[34];let L;e[35]!==i||e[36]!==n?(L=o.jsx(et,{error:n,backendState:i}),e[35]=i,e[36]=n,e[37]=L):L=e[37];let O;return e[38]!==P||e[39]!==L?(O=o.jsxs("div",{children:[P,L]}),e[38]=P,e[39]=L,e[40]=O):O=e[40],O}function Od(){const t=k.c(15),e=G(),s=D(qd),i=D(Md);let r,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("h4",{className:"mode-title",children:"Reverse Proxy"}),n=o.jsx("p",{className:"mode-description",children:"Requests are forwarded to a preconfigured destination."}),t[0]=r,t[1]=n):(r=t[0],n=t[1]);let l;if(t[2]!==i||t[3]!==s){let h;t[5]!==i?(h=(g,_)=>o.jsx(Hd,{removable:_>0,server:g,backendState:i[Ns(g)]},g.ui_id),t[5]=i,t[6]=h):h=t[6],l=s.map(h),t[2]=i,t[3]=s,t[4]=l}else l=t[4];let a;t[7]!==e?(a=()=>e(na()),t[7]=e,t[8]=a):a=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx("i",{className:"fa fa-plus-square-o","aria-hidden":"true"}),t[9]=d):d=t[9];let f;t[10]!==a?(f=o.jsxs("div",{className:"mode-reverse-add-server",onClick:a,children:[d,"Add additional server"]}),t[10]=a,t[11]=f):f=t[11];let p;return t[12]!==l||t[13]!==f?(p=o.jsxs("div",{children:[r,n,o.jsxs("div",{className:"mode-reverse-servers",children:[l,f]})]}),t[12]=l,t[13]=f,t[14]=p):p=t[14],p}function Md(t){return t.backendState.servers}function qd(t){return t.modes.reverse}function Hd(t){const e=k.c(56),{removable:s,server:i,backendState:r}=t,n=G();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Object.values(Jt),e[0]=l):l=e[0];const a=l;let d;e[1]!==n||e[2]!==i?(d=async()=>{i.active&&await n(ms({server:i,value:!1})).unwrap(),await n(ia(i))},e[1]=n,e[2]=i,e[3]=d):d=e[3];const f=d,p=i.error||r?.last_exception||void 0,h=i.active;let g;e[4]!==n||e[5]!==i?(g=()=>{n(ms({server:i,value:!i.active}))},e[4]=n,e[5]=i,e[6]=g):g=e[6];const _=i.protocol;let j;e[7]!==n||e[8]!==i?(j=Z=>{n(mr({server:i,value:Z.target.value}))},e[7]=n,e[8]=i,e[9]=j):j=e[9];let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=a.map(Vd),e[10]=y):y=e[10];let w;e[11]!==i.protocol||e[12]!==j?(w=o.jsx("select",{name:"protocols",className:"mode-reverse-dropdown",value:_,onChange:j,children:y}),e[11]=i.protocol,e[12]=j,e[13]=w):w=e[13];let $;e[14]!==i.destination?($=i.destination?.toString()||"",e[14]=i.destination,e[15]=$):$=e[15];let N;e[16]!==n||e[17]!==i?(N=Z=>n(gr({server:i,value:Z})),e[16]=n,e[17]=i,e[18]=N):N=e[18];let E;e[19]!==N||e[20]!==$?(E=o.jsx(ce,{className:"mode-reverse-input",content:$,onEditDone:N,placeholder:"example.com"}),e[19]=N,e[20]=$,e[21]=E):E=e[21];let T,P;e[22]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx("h4",{children:"Advanced Configuration"}),P=o.jsx("p",{children:"Listen Host"}),e[22]=T,e[23]=P):(T=e[22],P=e[23]);const L=i.listen_host||"";let O;e[24]!==n||e[25]!==i?(O=Z=>n(pr({server:i,value:Z})),e[24]=n,e[25]=i,e[26]=O):O=e[26];let M;e[27]!==L||e[28]!==O?(M=o.jsx(ce,{className:"mode-input",content:L,onEditDone:O,placeholder:"*"}),e[27]=L,e[28]=O,e[29]=M):M=e[29];let U;e[30]===Symbol.for("react.memo_cache_sentinel")?(U=o.jsx("p",{children:"Listen Port"}),e[30]=U):U=e[30];const V=String(i.listen_port||"");let W;e[31]!==n||e[32]!==i?(W=Z=>n(hr({server:i,value:Z})),e[31]=n,e[32]=i,e[33]=W):W=e[33];let J;e[34]!==V||e[35]!==W?(J=o.jsx(ce,{className:"mode-input",content:V,onEditDone:W,placeholder:"8080"}),e[34]=V,e[35]=W,e[36]=J):J=e[36];let z;e[37]!==M||e[38]!==J?(z=o.jsxs(st,{iconClass:"fa fa-cog",children:[T,P,M,U,J]}),e[37]=M,e[38]=J,e[39]=z):z=e[39];let te;e[40]!==f||e[41]!==s?(te=s&&o.jsx("i",{className:"fa fa-fw fa-trash fa-lg","aria-hidden":"true",onClick:f}),e[40]=f,e[41]=s,e[42]=te):te=e[42];let Y;e[43]!==i.active||e[44]!==E||e[45]!==z||e[46]!==te||e[47]!==g||e[48]!==w?(Y=o.jsxs(tt,{value:h,label:"Forward",onChange:g,children:[w,"traffic to",E,z,te]}),e[43]=i.active,e[44]=E,e[45]=z,e[46]=te,e[47]=g,e[48]=w,e[49]=Y):Y=e[49];let Q;e[50]!==r||e[51]!==p?(Q=o.jsx(et,{error:p,backendState:r}),e[50]=r,e[51]=p,e[52]=Q):Q=e[52];let X;return e[53]!==Y||e[54]!==Q?(X=o.jsxs("div",{children:[Y,Q]}),e[53]=Y,e[54]=Q,e[55]=X):X=e[55],X}function Vd(t){return o.jsx("option",{value:t,children:t},t)}function Ud(){const t=k.c(9),e=D(Wd),s=D(Bd);let i;if(t[0]!==s||t[1]!==e){let d;t[3]!==s?(d=f=>o.jsx(Kd,{server:f,backendState:s[tr(f)]},f.ui_id),t[3]=s,t[4]=d):d=t[4],i=e.map(d),t[0]=s,t[1]=e,t[2]=i}else i=t[2];const r=i;let n;t[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("h4",{className:"mode-title",children:"Transparent Proxy"}),t[5]=n):n=t[5];let l;t[6]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsxs("p",{className:"mode-description",children:["You"," ",o.jsx("a",{href:"https://docs.mitmproxy.org/stable/howto-transparent/",style:{textDecoration:"underline",color:"inherit"},children:"configure your routing table"})," ","to send traffic through mitmproxy."]}),t[6]=l):l=t[6];let a;return t[7]!==r?(a=o.jsxs("div",{children:[n,l,r]}),t[7]=r,t[8]=a):a=t[8],a}function Bd(t){return t.backendState.servers}function Wd(t){return t.modes.transparent}function Kd(t){const e=k.c(33),{server:s,backendState:i}=t,r=G(),n=s.error||i?.last_exception||void 0;let l;e[0]!==r||e[1]!==s?(l=()=>r(xr({server:s,value:!s.active})),e[0]=r,e[1]=s,e[2]=l):l=e[2];let a,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("h4",{children:"Advanced Configuration"}),d=o.jsx("p",{children:"Listen Host"}),e[3]=a,e[4]=d):(a=e[3],d=e[4]);const f=s.listen_host||"";let p;e[5]!==r||e[6]!==s?(p=T=>r(_r({server:s,value:T})),e[5]=r,e[6]=s,e[7]=p):p=e[7];let h;e[8]!==f||e[9]!==p?(h=o.jsx(ce,{className:"mode-input",content:f,onEditDone:p}),e[8]=f,e[9]=p,e[10]=h):h=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx("p",{children:"Listen Port"}),e[11]=g):g=e[11];let _;e[12]!==s.listen_port?(_=s.listen_port?s.listen_port.toString():"",e[12]=s.listen_port,e[13]=_):_=e[13];let j;e[14]!==r||e[15]!==s?(j=T=>r(jr({server:s,value:parseInt(T)})),e[14]=r,e[15]=s,e[16]=j):j=e[16];let y;e[17]!==_||e[18]!==j?(y=o.jsx(ce,{className:"mode-input",content:_,placeholder:"8080",onEditDone:j}),e[17]=_,e[18]=j,e[19]=y):y=e[19];let w;e[20]!==y||e[21]!==h?(w=o.jsxs(st,{iconClass:"fa fa-cog",children:[a,d,h,g,y]}),e[20]=y,e[21]=h,e[22]=w):w=e[22];let $;e[23]!==s.active||e[24]!==l||e[25]!==w?($=o.jsx(tt,{value:s.active,label:"Run Transparent Proxy",onChange:l,children:w}),e[23]=s.active,e[24]=l,e[25]=w,e[26]=$):$=e[26];let N;e[27]!==i||e[28]!==n?(N=o.jsx(et,{error:n,backendState:i}),e[27]=i,e[28]=n,e[29]=N):N=e[29];let E;return e[30]!==$||e[31]!==N?(E=o.jsxs("div",{children:[$,N]}),e[30]=$,e[31]=N,e[32]=E):E=e[32],E}function zd(){const t=k.c(9),e=D(Yd),s=D(Gd);let i;if(t[0]!==s||t[1]!==e){let d;t[3]!==s?(d=f=>o.jsx(Jd,{server:f,backendState:s[sr(f)]},f.ui_id),t[3]=s,t[4]=d):d=t[4],i=e.map(d),t[0]=s,t[1]=e,t[2]=i}else i=t[2];const r=i;let n,l;t[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("h4",{className:"mode-title",children:"SOCKS Proxy"}),l=o.jsx("p",{className:"mode-description",children:"You manually configure your client application or device to use a SOCKS5 proxy."}),t[5]=n,t[6]=l):(n=t[5],l=t[6]);let a;return t[7]!==r?(a=o.jsxs("div",{children:[n,l,r]}),t[7]=r,t[8]=a):a=t[8],a}function Gd(t){return t.backendState.servers}function Yd(t){return t.modes.socks}function Jd(t){const e=k.c(33),{server:s,backendState:i}=t,r=G(),n=s.error||i?.last_exception||void 0;let l;e[0]!==r||e[1]!==s?(l=()=>r(yr({server:s,value:!s.active})),e[0]=r,e[1]=s,e[2]=l):l=e[2];let a,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("h4",{children:"Advanced Configuration"}),d=o.jsx("p",{children:"Listen Host"}),e[3]=a,e[4]=d):(a=e[3],d=e[4]);const f=s.listen_host||"";let p;e[5]!==r||e[6]!==s?(p=T=>r(wr({server:s,value:T})),e[5]=r,e[6]=s,e[7]=p):p=e[7];let h;e[8]!==f||e[9]!==p?(h=o.jsx(ce,{className:"mode-input",content:f,onEditDone:p}),e[8]=f,e[9]=p,e[10]=h):h=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx("p",{children:"Listen Port"}),e[11]=g):g=e[11];let _;e[12]!==s.listen_port?(_=s.listen_port?s.listen_port.toString():"",e[12]=s.listen_port,e[13]=_):_=e[13];let j;e[14]!==r||e[15]!==s?(j=T=>r(br({server:s,value:parseInt(T)})),e[14]=r,e[15]=s,e[16]=j):j=e[16];let y;e[17]!==_||e[18]!==j?(y=o.jsx(ce,{className:"mode-input",content:_,placeholder:"8080",onEditDone:j}),e[17]=_,e[18]=j,e[19]=y):y=e[19];let w;e[20]!==y||e[21]!==h?(w=o.jsxs(st,{iconClass:"fa fa-cog",children:[a,d,h,g,y]}),e[20]=y,e[21]=h,e[22]=w):w=e[22];let $;e[23]!==s.active||e[24]!==l||e[25]!==w?($=o.jsx(tt,{value:s.active,label:"Run SOCKS Proxy",onChange:l,children:w}),e[23]=s.active,e[24]=l,e[25]=w,e[26]=$):$=e[26];let N;e[27]!==i||e[28]!==n?(N=o.jsx(et,{error:n,backendState:i}),e[27]=i,e[28]=n,e[29]=N):N=e[29];let E;return e[30]!==$||e[31]!==N?(E=o.jsxs("div",{children:[$,N]}),e[30]=$,e[31]=N,e[32]=E):E=e[32],E}function Qd(){const t=k.c(9),e=D(Zd),s=D(Xd);let i;if(t[0]!==s||t[1]!==e){let d;t[3]!==s?(d=f=>o.jsx(eu,{server:f,backendState:s[nr(f)]},f.ui_id),t[3]=s,t[4]=d):d=t[4],i=e.map(d),t[0]=s,t[1]=e,t[2]=i}else i=t[2];const r=i;let n,l;t[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("h4",{className:"mode-title",children:"Explicit HTTP(S) Proxy (With Upstream Proxy)"}),l=o.jsx("p",{className:"mode-description",children:"All requests are forwarded to a second HTTP(S) proxy server."}),t[5]=n,t[6]=l):(n=t[5],l=t[6]);let a;return t[7]!==r?(a=o.jsxs("div",{children:[n,l,r]}),t[7]=r,t[8]=a):a=t[8],a}function Xd(t){return t.backendState.servers}function Zd(t){return t.modes.upstream}function eu(t){const e=k.c(42),{server:s,backendState:i}=t,r=G(),n=s.error||i?.last_exception||void 0;let l;e[0]!==r||e[1]!==s?(l=()=>{r(Sr({server:s,value:!s.active}))},e[0]=r,e[1]=s,e[2]=l):l=e[2];let a;e[3]!==s.destination?(a=s.destination?.toString()||"",e[3]=s.destination,e[4]=a):a=e[4];let d;e[5]!==r||e[6]!==s?(d=O=>r(Nr({server:s,value:O})),e[5]=r,e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a||e[9]!==d?(f=o.jsx(ce,{className:"mode-upstream-input",content:a,onEditDone:d,placeholder:"http://example.com:8080"}),e[8]=a,e[9]=d,e[10]=f):f=e[10];let p,h;e[11]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx("h4",{children:"Advanced Configuration"}),h=o.jsx("p",{children:"Listen Host"}),e[11]=p,e[12]=h):(p=e[11],h=e[12]);const g=s.listen_host||"";let _;e[13]!==r||e[14]!==s?(_=O=>r($r({server:s,value:O})),e[13]=r,e[14]=s,e[15]=_):_=e[15];let j;e[16]!==g||e[17]!==_?(j=o.jsx(ce,{className:"mode-input",content:g,onEditDone:_}),e[16]=g,e[17]=_,e[18]=j):j=e[18];let y;e[19]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx("p",{children:"Listen Port"}),e[19]=y):y=e[19];let w;e[20]!==s.listen_port?(w=s.listen_port?s.listen_port.toString():"",e[20]=s.listen_port,e[21]=w):w=e[21];let $;e[22]!==r||e[23]!==s?($=O=>r(Cr({server:s,value:parseInt(O)})),e[22]=r,e[23]=s,e[24]=$):$=e[24];let N;e[25]!==w||e[26]!==$?(N=o.jsx(ce,{className:"mode-input",content:w,placeholder:"8080",onEditDone:$}),e[25]=w,e[26]=$,e[27]=N):N=e[27];let E;e[28]!==N||e[29]!==j?(E=o.jsxs(st,{iconClass:"fa fa-cog",children:[p,h,j,y,N]}),e[28]=N,e[29]=j,e[30]=E):E=e[30];let T;e[31]!==s.active||e[32]!==l||e[33]!==E||e[34]!==f?(T=o.jsxs(tt,{value:s.active,label:"Run HTTP/S Proxy and forward requests to",onChange:l,children:[f,E]}),e[31]=s.active,e[32]=l,e[33]=E,e[34]=f,e[35]=T):T=e[35];let P;e[36]!==i||e[37]!==n?(P=o.jsx(et,{error:n,backendState:i}),e[36]=i,e[37]=n,e[38]=P):P=e[38];let L;return e[39]!==T||e[40]!==P?(L=o.jsxs("div",{children:[T,P]}),e[39]=T,e[40]=P,e[41]=L):L=e[41],L}function tu(){const t=k.c(9),e=D(nu),s=D(su);let i;if(t[0]!==s||t[1]!==e){let d;t[3]!==s?(d=f=>o.jsx(iu,{server:f,backendState:s[ir(f)]},f.ui_id),t[3]=s,t[4]=d):d=t[4],i=e.map(d),t[0]=s,t[1]=e,t[2]=i}else i=t[2];const r=i;let n,l;t[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("h4",{className:"mode-title",children:"DNS Server"}),l=o.jsx("p",{className:"mode-description",children:"A recursive DNS resolver using the host's DNS configuration."}),t[5]=n,t[6]=l):(n=t[5],l=t[6]);let a;return t[7]!==r?(a=o.jsxs("div",{children:[n,l,r]}),t[7]=r,t[8]=a):a=t[8],a}function su(t){return t.backendState.servers}function nu(t){return t.modes.dns}function iu(t){const e=k.c(33),{server:s,backendState:i}=t,r=G(),n=s.error||i?.last_exception||void 0;let l;e[0]!==r||e[1]!==s?(l=()=>r(kr({server:s,value:!s.active})),e[0]=r,e[1]=s,e[2]=l):l=e[2];let a,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("h4",{children:"Advanced Configuration"}),d=o.jsx("p",{children:"Listen Host"}),e[3]=a,e[4]=d):(a=e[3],d=e[4]);const f=s.listen_host||"";let p;e[5]!==r||e[6]!==s?(p=T=>r(Er({server:s,value:T})),e[5]=r,e[6]=s,e[7]=p):p=e[7];let h;e[8]!==f||e[9]!==p?(h=o.jsx(ce,{className:"mode-input",content:f,onEditDone:p}),e[8]=f,e[9]=p,e[10]=h):h=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx("p",{children:"Listen Port"}),e[11]=g):g=e[11];let _;e[12]!==s.listen_port?(_=s.listen_port?s.listen_port.toString():"",e[12]=s.listen_port,e[13]=_):_=e[13];let j;e[14]!==r||e[15]!==s?(j=T=>r(Tr({server:s,value:parseInt(T)})),e[14]=r,e[15]=s,e[16]=j):j=e[16];let y;e[17]!==_||e[18]!==j?(y=o.jsx(ce,{className:"mode-input",content:_,placeholder:"8080",onEditDone:j}),e[17]=_,e[18]=j,e[19]=y):y=e[19];let w;e[20]!==y||e[21]!==h?(w=o.jsxs(st,{iconClass:"fa fa-cog",children:[a,d,h,g,y]}),e[20]=y,e[21]=h,e[22]=w):w=e[22];let $;e[23]!==s.active||e[24]!==l||e[25]!==w?($=o.jsx(tt,{value:s.active,label:"Run DNS Server",onChange:l,children:w}),e[23]=s.active,e[24]=l,e[25]=w,e[26]=$):$=e[26];let N;e[27]!==i||e[28]!==n?(N=o.jsx(et,{error:n,backendState:i}),e[27]=i,e[28]=n,e[29]=N):N=e[29];let E;return e[30]!==$||e[31]!==N?(E=o.jsxs("div",{children:[$,N]}),e[30]=$,e[31]=N,e[32]=E):E=e[32],E}function ri(t){const e=k.c(10),{title:s,description:i}=t;let r;e[0]!==s?(r=o.jsx("h4",{className:"mode-title",children:s}),e[0]=s,e[1]=r):r=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("i",{className:"fa fa-exclamation-triangle","aria-hidden":"true"}),e[2]=n):n=e[2];let l;e[3]!==r?(l=o.jsxs("div",{className:"title-icon-container",children:[r,n]}),e[3]=r,e[4]=l):l=e[4];let a;e[5]!==i?(a=o.jsx("p",{className:"mode-description",children:i}),e[5]=i,e[6]=a):a=e[6];let d;return e[7]!==l||e[8]!==a?(d=o.jsxs("div",{className:"missing-mode-container",children:[l,a]}),e[7]=l,e[8]=a,e[9]=d):d=e[9],d}function ru(){const t=k.c(19),{platform:e,localModeUnavailable:s}=D(ou);let i,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("h2",{children:"Intercept Traffic"}),r=o.jsx("p",{children:"Configure how you want to intercept traffic with mitmproxy."}),t[0]=i,t[1]=r):(i=t[0],r=t[1]);let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("h3",{children:"Recommended"}),t[2]=n):n=t[2];let l;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(Td,{}),t[3]=l):l=t[3];let a;t[4]!==s?(a=s!==null?o.jsx(ri,{title:"Local Redirect Mode",description:s}):o.jsx(Sd,{}),t[4]=s,t[5]=a):a=t[5];let d,f;t[6]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Fd,{}),f=o.jsx(Od,{}),t[6]=d,t[7]=f):(d=t[6],f=t[7]);let p;t[8]!==a?(p=o.jsxs("div",{className:"modes-category green-left-border",children:[n,o.jsxs("div",{className:"modes-container",children:[l,a,d,f]})]}),t[8]=a,t[9]=p):p=t[9];let h;t[10]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("h3",{children:"Advanced"}),t[10]=h):h=t[10];let g,_,j;t[11]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(zd,{}),g=o.jsx(Qd,{}),_=o.jsx(tu,{}),t[11]=g,t[12]=_,t[13]=j):(g=t[11],_=t[12],j=t[13]);let y;t[14]!==e?(y=o.jsxs("div",{className:"modes-category gray-left-border",children:[h,o.jsxs("div",{className:"modes-container",children:[j,g,_,e.startsWith("win32")?o.jsx(ri,{title:"Transparent Proxy",description:"This mode is only supported on Linux and MacOS."}):o.jsx(Ud,{})]})]}),t[14]=e,t[15]=y):y=t[15];let w;return t[16]!==y||t[17]!==p?(w=o.jsxs("div",{className:"modes",children:[i,r,p,y]}),t[16]=y,t[17]=p,t[18]=w):w=t[18],w}function ou(t){return t.backendState}function lu(){const t=k.c(4),e=D(du),s=D(au),i=D(cu);let r;return t[0]!==i||t[1]!==s||t[2]!==e?(r=o.jsx("div",{className:"main-view",children:i===xe.Capture?o.jsx(ru,{}):o.jsxs(o.Fragment,{children:[s?o.jsx(md,{}):o.jsx(gd,{}),e&&o.jsxs(o.Fragment,{children:[o.jsx(ld,{},"splitter"),o.jsx(nd,{},"flowDetails")]})]})}),t[0]=i,t[1]=s,t[2]=e,t[3]=r):r=t[3],r}function cu(t){return t.ui.tabs.current}function au(t){return t.flows.list.length>0}function du(t){return t.flows.selected.length===1}function gt(t){const e=k.c(2),{children:s}=t;let i;return e[0]!==s?(i=window.MITMWEB_STATIC?null:o.jsx(o.Fragment,{children:s}),e[0]=s,e[1]=i):i=e[1],i}const uu=I.memo(function(){const e=k.c(20),s=G(),i=D(fu);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={placement:"bottom-start"},e[0]=r):r=e[0];let n;e[1]!==s?(n=o.jsx("li",{children:o.jsx(Fr,{icon:"fa-folder-open",text:" Open...",onClick:pu,onOpenFile:w=>{s(tc(w)),document.body.click()}})}),e[1]=s,e[2]=n):n=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsxs(ke,{onClick:hu,children:[o.jsx("i",{className:"fa fa-fw fa-floppy-o"})," Save"]}),e[3]=l):l=e[3];let a;e[4]!==i?(a=()=>location.replace("/flows/dump?filter="+i),e[4]=i,e[5]=a):a=e[5];let d;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx("i",{className:"fa fa-fw fa-floppy-o"}),e[6]=d):d=e[6];let f;e[7]!==a?(f=o.jsxs(ke,{onClick:a,children:[d," Save filtered"]}),e[7]=a,e[8]=f):f=e[8];let p;e[9]!==s?(p=()=>confirm("Delete all flows?")&&s(Oi()),e[9]=s,e[10]=p):p=e[10];let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("i",{className:"fa fa-fw fa-trash"}),e[11]=h):h=e[11];let g;e[12]!==p?(g=o.jsxs(ke,{onClick:p,children:[h," Clear All"]}),e[12]=p,e[13]=g):g=e[13];let _;e[14]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(ka,{}),e[14]=_):_=e[14];let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsxs(gt,{children:[_,o.jsx("li",{children:o.jsxs("a",{href:"http://mitm.it/",target:"_blank",rel:"noreferrer",children:[o.jsx("i",{className:"fa fa-fw fa-external-link"})," Install Certificates..."]})})]}),e[15]=j):j=e[15];let y;return e[16]!==n||e[17]!==f||e[18]!==g?(y=o.jsxs(Et,{className:"pull-left special",text:"File",options:r,children:[n,l,f,g,j]}),e[16]=n,e[17]=f,e[18]=g,e[19]=y):y=e[19],y});function fu(t){return t.ui.filter[ve.Search]}function pu(t){return t.stopPropagation()}function hu(){return location.replace("/flows/dump")}const mu=I.memo(function(){const e=k.c(5),s=D(gu),i=D(vu);switch(s){case wt.INIT:{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("span",{className:"connection-indicator init",children:"connecting…"}),e[0]=r):r=e[0],r}case wt.FETCHING:{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("span",{className:"connection-indicator fetching",children:"fetching data…"}),e[1]=r):r=e[1],r}case wt.ESTABLISHED:{let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("span",{className:"connection-indicator established",children:"connected"}),e[2]=r):r=e[2],r}case wt.ERROR:{let r;return e[3]!==i?(r=o.jsx("span",{className:"connection-indicator error",title:i,children:"connection lost"}),e[3]=i,e[4]=r):r=e[4],r}default:Ct(s)}});function gu(t){return t.connection.state}function vu(t){return t.connection.message}Xr.title="Capture";function Xr(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(o.Fragment,{}),t[0]=e):e=t[0],e}const oi=function(){function t(i,r){function n(){this.constructor=i}n.prototype=r.prototype,i.prototype=new n}function e(i,r,n,l){this.message=i,this.expected=r,this.found=n,this.location=l,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,e)}t(e,Error);function s(i){var r=arguments.length>1?arguments[1]:{},n={},l={start:_n},a=_n,d={type:"other",description:"filter expression"},f=function(c){return c},p={type:"other",description:"whitespace"},h=/^[ \t\n\r]/,g={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},_={type:"other",description:"control character"},j=/^[|&!()~"]/,y={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},w={type:"other",description:"optional whitespace"},$="|",N={type:"literal",value:"|",description:'"|"'},E=function(c,u){return il(c,u)},T="&",P={type:"literal",value:"&",description:'"&"'},L=function(c,u){return rl(c,u)},O="!",M={type:"literal",value:"!",description:'"!"'},U=function(c){return ol(c)},V="(",W={type:"literal",value:"(",description:'"("'},J=")",z={type:"literal",value:")",description:'")"'},te=function(c){return ll(c)},Y="~all",Q={type:"literal",value:"~all",description:'"~all"'},X=function(){return Sn},Z="~a",ae={type:"literal",value:"~a",description:'"~a"'},le=function(){return Cn},de="~b",ye={type:"literal",value:"~b",description:'"~b"'},Pe=function(c){return cl(c)},Se="~bq",Ee={type:"literal",value:"~bq",description:'"~bq"'},C=function(c){return al(c)},he="~bs",B={type:"literal",value:"~bs",description:'"~bs"'},oe=function(c){return dl(c)},q="~c",$e={type:"literal",value:"~c",description:'"~c"'},We=function(c){return ul(c)},Oe="~comment",ee={type:"literal",value:"~comment",description:'"~comment"'},Me=function(c){return fl(c)},Re="~d",re={type:"literal",value:"~d",description:'"~d"'},ue=function(c){return pl(c)},ge="~dns",Ae={type:"literal",value:"~dns",description:'"~dns"'},nt=function(){return Nn},Je="~dst",Zt={type:"literal",value:"~dst",description:'"~dst"'},b=function(c){return hl(c)},S="~e",A={type:"literal",value:"~e",description:'"~e"'},H=function(){return kn},Tt="~h",es={type:"literal",value:"~h",description:'"~h"'},Ce=function(c){return ml(c)},De="~hq",ut={type:"literal",value:"~hq",description:'"~hq"'},Ke=function(c){return gl(c)},vt="~hs",Rt={type:"literal",value:"~hs",description:'"~hs"'},it=function(c){return vl(c)},At="~http",ft={type:"literal",value:"~http",description:'"~http"'},Fe=function(){return En},Us="~marked",no={type:"literal",value:"~marked",description:'"~marked"'},io=function(){return Tn},Bs="~marker",ro={type:"literal",value:"~marker",description:'"~marker"'},oo=function(c){return xl(c)},Ws="~m",lo={type:"literal",value:"~m",description:'"~m"'},co=function(c){return _l(c)},Ks="~q",ao={type:"literal",value:"~q",description:'"~q"'},uo=function(){return Rn},zs="~replayq",fo={type:"literal",value:"~replayq",description:'"~replayq"'},po=function(){return An},Gs="~replays",ho={type:"literal",value:"~replays",description:'"~replays"'},mo=function(){return Dn},Ys="~replay",go={type:"literal",value:"~replay",description:'"~replay"'},vo=function(){return Fn},Js="~src",xo={type:"literal",value:"~src",description:'"~src"'},_o=function(c){return jl(c)},Qs="~s",jo={type:"literal",value:"~s",description:'"~s"'},yo=function(){return In},Xs="~tcp",wo={type:"literal",value:"~tcp",description:'"~tcp"'},bo=function(){return Ln},Zs="~udp",So={type:"literal",value:"~udp",description:'"~udp"'},$o=function(){return Pn},en="~tq",Co={type:"literal",value:"~tq",description:'"~tq"'},No=function(c){return yl(c)},tn="~ts",ko={type:"literal",value:"~ts",description:'"~ts"'},Eo=function(c){return wl(c)},sn="~t",To={type:"literal",value:"~t",description:'"~t"'},Ro=function(c){return bl(c)},nn="~u",Ao={type:"literal",value:"~u",description:'"~u"'},rn=function(c){return Sl(c)},on="~websocket",Do={type:"literal",value:"~websocket",description:'"~websocket"'},Fo=function(){return On},Io={type:"other",description:"integer"},ln=/^['"]/,cn={type:"class",value:`['"]`,description:`['"]`},an=/^[0-9]/,dn={type:"class",value:"[0-9]",description:"[0-9]"},Lo=function(c){return parseInt(c.join(""),10)},Po={type:"other",description:"string"},un='"',fn={type:"literal",value:'"',description:'"\\""'},ts=function(c){return c.join("")},pn="'",hn={type:"literal",value:"'",description:`"'"`},Oo=/^["\\]/,Mo={type:"class",value:'["\\\\]',description:'["\\\\]'},ss={type:"any",description:"any character"},xt=function(c){return c},mn="\\",gn={type:"literal",value:"\\",description:'"\\\\"'},qo=/^['\\]/,Ho={type:"class",value:"['\\\\]",description:"['\\\\]"},Vo=/^['"\\]/,Uo={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},Bo="n",Wo={type:"literal",value:"n",description:'"n"'},Ko=function(){return` +`).length,g})]})}function Kr(t){const e=k.c(8),{flow:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("h4",{children:"WebSocket"}),e[0]=i):i=e[0];let r;e[1]!==s?(r=o.jsx(ks,{flow:s,messages_meta:s.websocket.messages_meta}),e[1]=s,e[2]=r):r=e[2];let n;e[3]!==s.websocket?(n=o.jsx(sd,{websocket:s.websocket}),e[3]=s.websocket,e[4]=n):n=e[4];let l;return e[5]!==r||e[6]!==n?(l=o.jsxs("section",{className:"websocket",children:[i,r,n]}),e[5]=r,e[6]=n,e[7]=l):l=e[7],l}Kr.displayName="WebSocket";function sd(t){const e=k.c(10),{websocket:s}=t;if(!s.timestamp_end)return null;const i=s.close_reason?`(${s.close_reason})`:"";let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("i",{className:"fa fa-fw fa-window-close text-muted"}),e[0]=r):r=e[0];const n=s.closed_by_client?"client":"server",l=s.close_code;let a;e[1]!==s.timestamp_end?(a=at(s.timestamp_end),e[1]=s.timestamp_end,e[2]=a):a=e[2];let d;e[3]!==a?(d=o.jsx("small",{className:"pull-right",children:a}),e[3]=a,e[4]=d):d=e[4];let f;return e[5]!==i||e[6]!==n||e[7]!==d||e[8]!==s.close_code?(f=o.jsxs("div",{children:[r,"  Closed by ",n," ","with code ",l," ",i,".",d]}),e[5]=i,e[6]=n,e[7]=d,e[8]=s.close_code,e[9]=f):f=e[9],f}function zr(t){const e=k.c(7),{flow:s}=t,i=G();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("h4",{children:"Comment"}),e[0]=r):r=e[0];let n;e[1]!==i||e[2]!==s?(n=a=>{i(Le(s,{comment:a}))},e[1]=i,e[2]=s,e[3]=n):n=e[3];let l;return e[4]!==s.comment||e[5]!==n?(l=o.jsxs("section",{className:"timing",children:[r,o.jsx(ce,{className:"kv-value",content:s.comment,onEditDone:n,placeholder:"empty",selectAllOnClick:!0})]}),e[4]=s.comment,e[5]=n,e[6]=l):l=e[6],l}zr.displayName="Comment";function Gr(t){const e=k.c(2),{flow:s}=t;let i;return e[0]!==s?(i=o.jsx("section",{className:"tcp",children:o.jsx(ks,{flow:s,messages_meta:s.messages_meta})}),e[0]=s,e[1]=i):i=e[1],i}Gr.displayName="Stream Data";function Yr(t){const e=k.c(2),{flow:s}=t;let i;return e[0]!==s?(i=o.jsx("section",{className:"udp",children:o.jsx(ks,{flow:s,messages_meta:s.messages_meta})}),e[0]=s,e[1]=i):i=e[1],i}Yr.displayName="Datagrams";const ii={request:Or,response:Mr,error:Br,connection:Ur,timing:Wr,websocket:Kr,tcpmessages:Gr,udpmessages:Yr,dnsrequest:Hr,dnsresponse:Vr,comment:zr};function vs(t){let e;switch(t.type){case"http":e=["request","response","websocket"].filter(s=>t[s]);break;case"tcp":e=["tcpmessages"];break;case"udp":e=["udpmessages"];break;case"dns":e=["request","response"].filter(s=>t[s]).map(s=>"dns"+s);break}return t.error&&e.push("error"),e.push("connection"),e.push("timing"),e.push("comment"),e}function nd(){const t=k.c(15),e=G(),s=D(rd);let i=D(id);if(s==null){let y;return t[0]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx(o.Fragment,{}),t[0]=y):y=t[0],y}const r=vs(s);r.indexOf(i)<0&&(i==="response"&&s.error?i="error":i==="error"&&"response"in s?i="response":i=r[0]);const n=ii[i],l="flow-detail",a="nav-tabs nav-tabs-sm";let d;t[1]!==e?(d=()=>e(Ve([])),t[1]=e,t[2]=d):d=t[2];let f;t[3]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx("i",{className:"fa fa-times-circle"}),t[3]=f):f=t[3];let p;t[4]!==d?(p=o.jsx("button",{"data-testid":"close-button-id",className:"close-button",onClick:d,children:f}),t[4]=d,t[5]=p):p=t[5];const h=r.map(y=>o.jsx("a",{href:"#",className:je({active:i===y}),onClick:w=>{w.preventDefault(),e(Ut(y))},children:ii[y].displayName},y));let g;t[6]!==p||t[7]!==h?(g=o.jsxs("nav",{className:a,children:[p,h]}),t[6]=p,t[7]=h,t[8]=g):g=t[8];let _;t[9]!==n||t[10]!==s?(_=o.jsx(n,{flow:s}),t[9]=n,t[10]=s,t[11]=_):_=t[11];let j;return t[12]!==g||t[13]!==_?(j=o.jsxs("div",{className:l,children:[g,_]}),t[12]=g,t[13]=_,t[14]=j):j=t[14],j}function id(t){return t.ui.flow.tab}function rd(t){return t.flows.selected[0]}function od(t){if(t.ctrlKey||t.metaKey)return()=>{};const e=t.key;return t.preventDefault(),(s,i)=>{const{flows:r}=i(),n=r.selected,l=n[0];switch(e){case"k":case"ArrowUp":s(ht(r,-1));break;case"j":case"ArrowDown":s(ht(r,1));break;case" ":case"PageDown":s(ht(r,10));break;case"PageUp":s(ht(r,-10));break;case"End":s(ht(r,1e10));break;case"Home":s(ht(r,-1e10));break;case"Escape":i().ui.modal.activeModal?s(Wi()):s(Ve([]));break;case"ArrowLeft":{if(!l)break;const a=vs(l),d=i().ui.flow.tab,f=a[(Math.max(0,a.indexOf(d))-1+a.length)%a.length];s(Ut(f));break}case"Tab":case"ArrowRight":{if(!l)break;const a=vs(l),d=i().ui.flow.tab,f=a[(Math.max(0,a.indexOf(d))+1)%a.length];s(Ut(f));break}case"Delete":case"d":{s(Ii(n));break}case"n":{Bt("view.flows.create","get","https://example.com/");break}case"D":{s(Li(n));break}case"a":{s(ys(n));break}case"A":{s(Di());break}case"r":{s(ws(n));break}case"v":{s(Pi(n));break}case"x":{s(Fi(n));break}case"X":{s(Zl());break}case"z":{s(Oi());break}default:return}}}class ld extends I.Component{static defaultProps={axis:"x"};node=Te.createRef();constructor(e,s){super(e,s),this.state={applied:!1,startPos:0,dragPointer:.1},this.onLostPointerCapture=this.onLostPointerCapture.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this)}onPointerDown(e){this.state.dragPointer===.1&&(e.target.setPointerCapture(e.pointerId),this.setState({startPos:this.props.axis==="x"?e.pageX:e.pageY,dragPointer:e.pointerId}))}onLostPointerCapture(e){if(this.state.dragPointer!==e.pointerId)return;const s=this.node.current,i=s.previousElementSibling,r=s.nextElementSibling;s.style.transform="",i.style.flex=`0 0 ${Math.max(0,(this.props.axis==="x"?i.offsetWidth+e.pageX:i.offsetHeight+e.pageY)-this.state.startPos)}px`,r.style.flex="1 1 auto",this.setState({applied:!0,dragPointer:.1}),this.onResize()}onPointerMove(e){this.state.dragPointer===e.pointerId&&(this.node.current.style.transform=this.props.axis==="x"?`translateX(${e.pageX-this.state.startPos}px)`:`translateY(${e.pageY-this.state.startPos}px)`)}onResize(){window.setTimeout(()=>window.dispatchEvent(new CustomEvent("resize")),1)}reset(e){this.state.applied&&(this.node.current?.previousElementSibling instanceof HTMLElement&&(this.node.current.previousElementSibling.style.flex=""),this.node.current?.nextElementSibling instanceof HTMLElement&&(this.node.current.nextElementSibling.style.flex=""),e||this.setState({applied:!1}),this.onResize())}componentWillUnmount(){this.reset(!0)}render(){return o.jsx("div",{ref:this.node,className:je("splitter",this.props.axis==="x"?"splitter-x":"splitter-y"),children:o.jsx("div",{onLostPointerCapture:this.onLostPointerCapture,onPointerDown:this.onPointerDown,onPointerMove:this.onPointerMove})})}}const Es=t=>{const e=t.current;return e===null||e.scrollTop===0?!1:Math.ceil(e.scrollTop)+e.clientHeight>=e.scrollHeight},Jr=t=>{t.current&&!Es(t)&&(t.current.scrollTop=t.current.scrollHeight)};function kt(t=void 0){if(!t)return{start:0,end:0,paddingTop:0,paddingBottom:0};const{itemCount:e,rowHeight:s,viewportTop:i,viewportHeight:r,itemHeights:n}=t,l=i+r;let a=0,d=0,f=0,p=0;if(n){let h=0;for(let g=0;g0&&ho.jsx("td",{className:je("col-tls",t.client_conn.tls_established?"col-tls-https":"col-tls-http")});Ts.headerName="";const Rs=({rowNumber:t})=>o.jsx("td",{className:"col-index",children:t+1});Rs.headerName="#";const As=({flow:t})=>o.jsx("td",{className:"col-icon",children:o.jsx("div",{className:je("resource-icon",Si(t))})});As.headerName="";const Ds=({flow:t})=>{let e;return t.error&&(t.error.msg==="Connection killed."?e=o.jsx("i",{className:"fa fa-fw fa-times pull-right"}):e=o.jsx("i",{className:"fa fa-fw fa-exclamation pull-right"})),o.jsxs("td",{className:"col-path",children:[t.is_replay==="request"&&o.jsx("i",{className:"fa fa-fw fa-repeat pull-right"}),t.intercepted&&o.jsx("i",{className:"fa fa-fw fa-pause pull-right"}),e,o.jsx("span",{className:"marker pull-right",children:t.marked}),$i(t)]})};Ds.headerName="Path";const Fs=({flow:t})=>o.jsx("td",{className:"col-method",children:Ni(t)});Fs.headerName="Method";const Is=({flow:t})=>o.jsx("td",{className:"col-http-version",children:ki(t)});Is.headerName="Version";const Ls=({flow:t})=>{let e="darkred";return t.type!=="http"&&t.type!="dns"||!t.response?o.jsx("td",{className:"col-status"}):(100<=t.response.status_code&&t.response.status_code<200?e="green":200<=t.response.status_code&&t.response.status_code<300?e="darkgreen":300<=t.response.status_code&&t.response.status_code<400?e="lightblue":(400<=t.response.status_code&&t.response.status_code<500||500<=t.response.status_code&&t.response.status_code<600)&&(e="red"),o.jsx("td",{className:"col-status",style:{color:e},children:Ci(t)}))};Ls.headerName="Status";const Ps=({flow:t})=>o.jsx("td",{className:"col-size",children:hi(wi(t))});Ps.headerName="Size";const Os=({flow:t})=>{const e=Wt(t),s=yi(t);return o.jsx("td",{className:"col-time",children:e&&s?mi(1e3*(s-e)):"..."})};Os.headerName="Time";const Ms=({flow:t})=>{const e=Wt(t);return o.jsx("td",{className:"col-timestamp",children:e?at(e):"..."})};Ms.headerName="Start time";const Qt=({flow:t})=>{const e=G();let s=null;return t.intercepted?s=o.jsx("a",{href:"#",className:"quickaction",onClick:()=>e(ys([t])),children:o.jsx("i",{className:"fa fa-fw fa-play text-success"})}):xs(t)&&(s=o.jsx("a",{href:"#",className:"quickaction",onClick:()=>e(ws([t])),children:o.jsx("i",{className:"fa fa-fw fa-repeat text-primary"})})),o.jsx("td",{className:"col-quickactions",children:s?o.jsx("div",{children:s}):o.jsx(o.Fragment,{})})};Qt.headerName="";const qs=({flow:t})=>{const e=t.comment;return o.jsx("td",{className:"col-comment",children:e})};qs.headerName="Comment";const Qr={icon:As,index:Rs,method:Fs,version:Is,path:Ds,quickactions:Qt,size:Ps,status:Ls,time:Os,timestamp:Ms,tls:Ts,comment:qs},cd=Object.freeze(Object.defineProperty({__proto__:null,comment:qs,default:Qr,icon:As,index:Rs,method:Fs,path:Ds,quickactions:Qt,size:Ps,status:Ls,time:Os,timestamp:Ms,tls:Ts,version:Is},Symbol.toStringTag,{value:"Module"})),ad=I.memo(function(){const e=k.c(13),s=G(),i=D(dd),r=D(ud),n=D(fd),l=i?"sort-desc":"sort-asc";let a;if(e[0]!==s||e[1]!==n||e[2]!==r||e[3]!==i||e[4]!==l){const f=n.filter(zl).concat("quickactions");let p;e[6]!==s||e[7]!==r||e[8]!==i||e[9]!==l?(p=h=>o.jsx("th",{className:je(`col-${h}`,r===h&&l),onClick:()=>s(Ui({column:h===r&&i?void 0:h,desc:h!==r?!1:!i})),children:Qr[h].headerName},h),e[6]=s,e[7]=r,e[8]=i,e[9]=l,e[10]=p):p=e[10],a=f.map(p),e[0]=s,e[1]=n,e[2]=r,e[3]=i,e[4]=l,e[5]=a}else a=e[5];let d;return e[11]!==a?(d=o.jsx("tr",{children:a}),e[11]=a,e[12]=d):d=e[12],d});function dd(t){return t.flows.sort.desc}function ud(t){return t.flows.sort.column}function fd(t){return t.options.web_columns}const pd=Te.memo(function({flow:e,selected:s,highlighted:i,displayColumnNames:r,rowNumber:n}){const l=G(),a=je({selected:s,highlighted:i,intercepted:e.intercepted,"has-request":e.type==="http"&&e.request,"has-response":e.type==="http"&&e.response}),d=I.useCallback(p=>{let h=p.target;for(;h.parentNode;){if(h.classList.contains("col-quickactions"))return;h=h.parentNode}p.metaKey||p.ctrlKey?l(ic(e)):p.shiftKey?(window.getSelection()?.empty(),l(rc(e))):l(Ve([e]))},[e]),f=r.map(p=>cd[p]).filter(p=>p).concat(Qt);return o.jsx("tr",{className:a,onClick:d,children:f.map(p=>o.jsx(p,{flow:e,rowNumber:n},p.name))})});class hd extends I.Component{static defaultProps={rowHeight:32};viewport=I.createRef();head=I.createRef();constructor(e,s){super(e,s),this.state={vScroll:kt(),viewportTop:0},this.onViewportUpdate=this.onViewportUpdate.bind(this)}componentDidMount(){window.addEventListener("resize",this.onViewportUpdate),this.onViewportUpdate()}componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}getSnapshotBeforeUpdate(){return Es(this.viewport)}componentDidUpdate(e,s,i){i&&Jr(this.viewport),this.onViewportUpdate();const{onlySelectedId:r}=this.props;if(r&&r!==e.onlySelectedId){const{rowHeight:l,firstSelectedIndex:a}=this.props,d=this.viewport.current,f=this.head.current,p=f?f.offsetHeight:0,h=a*l+p,g=h+l,_=d.scrollTop,j=d.offsetHeight;h-p<_?d.scrollTop=h-p:g>_+j&&(d.scrollTop=g-j),this.onViewportUpdate()}}onViewportUpdate(){const e=this.viewport.current,s=e.scrollTop||0,i=kt({viewportTop:s,viewportHeight:e.offsetHeight||0,itemCount:this.props.flowView.length,rowHeight:this.props.rowHeight});if(this.state.viewportTop!==s||!Kt(this.state.vScroll,i)){const r=Math.min(s,i.end*this.props.rowHeight);this.setState({vScroll:i,viewportTop:r})}}render(){const{vScroll:e,viewportTop:s}=this.state,{flowView:i,selectedIds:r,highlightedIds:n,displayColumnNames:l,listIndex:a}=this.props;return o.jsx("div",{className:"flow-table",onScroll:this.onViewportUpdate,ref:this.viewport,children:o.jsxs("table",{children:[o.jsx("thead",{ref:this.head,style:{transform:`translateY(${s}px)`},children:o.jsx(ad,{})}),o.jsxs("tbody",{children:[o.jsx("tr",{style:{height:e.paddingTop}}),i.slice(e.start,e.end).map(d=>o.jsx(pd,{flow:d,selected:r.has(d.id),highlighted:n.has(d.id),displayColumnNames:l,rowNumber:a.get(d.id)},d.id)),o.jsx("tr",{style:{height:e.paddingBottom}})]})]})})}}const md=zt(t=>({flowView:t.flows.view,highlightedIds:t.flows.highlightedIds,selectedIds:t.flows.selectedIds,onlySelectedId:t.flows.selected.length===1&&t.flows.selected[0].id,firstSelectedIndex:t.flows._viewIndex.get(t.flows.selected[0]?.id),displayColumnNames:t.options.web_columns,listIndex:t.flows._listIndex}))(hd);function gd(){const t=k.c(3);let e,s;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={padding:"1em 2em"},s=o.jsx("h3",{children:"mitmproxy is running."}),t[0]=e,t[1]=s):(e=t[0],s=t[1]);let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsxs("div",{style:e,children:[s,o.jsxs("p",{children:["No flows have been recorded yet.",o.jsx("br",{}),"To start capturing traffic, please configure your settings in the Capture tab."]})]}),t[2]=i):i=t[2],i}function vd(t){const e=k.c(20);let{description:s,listen_addrs:i,is_running:r,wireguard_conf:n,type:l}=t;const a=I.useRef(null);let d,f;e[0]!==n?(d=()=>{n&&a.current&&Ll.toCanvas(a.current,n,{margin:0,scale:3})},f=[n],e[0]=n,e[1]=d,e[2]=f):(d=e[1],f=e[2]),I.useEffect(d,f);let p;const h=i.length===1||i.length===2&&i[0][1]===i[1][1],g=i.every(xd);if(h&&g){let y;e[3]!==i[0][1]?(y=Hn(["*",i[0][1]]),e[3]=i[0][1],e[4]=y):y=e[4],p=y}else{let y;e[5]!==i?(y=i.map(Hn).join(" and "),e[5]=i,e[6]=y):y=e[6],p=y}s=s[0].toUpperCase()+s.substr(1);let _;if(r){let y;e[9]!==s||e[10]!==p||e[11]!==l?(y=l==="local"?o.jsxs("div",{className:"text-success",children:[s," is active."]}):o.jsxs("div",{className:"text-success",children:[s," listening at ",p,"."]}),e[9]=s,e[10]=p,e[11]=l,e[12]=y):y=e[12];let w;e[13]!==n?(w=n&&o.jsxs("div",{className:"wireguard-config",children:[o.jsx("pre",{children:n}),o.jsx("canvas",{ref:a})]}),e[13]=n,e[14]=w):w=e[14];let $;e[15]!==y||e[16]!==w?($=o.jsxs(o.Fragment,{children:[y,w]}),e[15]=y,e[16]=w,e[17]=$):$=e[17],_=$}else{let y;e[7]!==s?(y=o.jsx(o.Fragment,{children:o.jsxs("div",{className:"text-warning",children:[s," starting..."]})}),e[7]=s,e[8]=y):y=e[8],_=y}let j;return e[18]!==_?(j=o.jsx("div",{children:_}),e[18]=_,e[19]=j):j=e[19],j}function xd(t){return["::","0.0.0.0"].includes(t[0])}function et(t){const e=k.c(5),{error:s,backendState:i}=t;let r;e[0]!==i||e[1]!==s?(r=s?o.jsx("div",{className:"text-danger",children:s}):i&&o.jsx(vd,{...i}),e[0]=i,e[1]=s,e[2]=r):r=e[2];let n;return e[3]!==r?(n=o.jsx("div",{className:"mode-status",children:r}),e[3]=r,e[4]=n):n=e[4],n}function tt(t){const e=k.c(13),{value:s,onChange:i,children:r,label:n}=t,l=I.useId(),a=`mode-checkbox-${l}`,d=`mode-checkbox-${l}`;let f;e[0]!==i||e[1]!==a||e[2]!==d||e[3]!==s?(f=o.jsx("input",{type:"checkbox",name:a,id:d,checked:s,onChange:i}),e[0]=i,e[1]=a,e[2]=d,e[3]=s,e[4]=f):f=e[4];const p=`mode-checkbox-${l}`;let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h={marginBottom:0,fontWeight:"normal"},e[5]=h):h=e[5];let g;e[6]!==n||e[7]!==p?(g=o.jsx("label",{htmlFor:p,style:h,children:n}),e[6]=n,e[7]=p,e[8]=g):g=e[8];let _;return e[9]!==r||e[10]!==f||e[11]!==g?(_=o.jsxs("div",{className:"mode-entry",children:[f,g,r]}),e[9]=r,e[10]=f,e[11]=g,e[12]=_):_=e[12],_}function st(t){const e=k.c(22),{children:s,iconClass:i,classname:r,isVisible:n}=t,l=I.useId();let a;e[0]!==l?(a=[...l].map(_d),e[0]=l,e[1]=a):a=e[1];const d="--"+a.join(""),f=I.useRef(null),p=I.useRef(null);let h;e[2]!==d?(h=()=>{f.current.style.anchorName=d,p.current.style.positionAnchor=d},e[2]=d,e[3]=h):h=e[3];let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=[],e[4]=g):g=e[4],I.useEffect(h,g);let _;e[5]!==l||e[6]!==n?(_=()=>{n===!0&&document.getElementById(l)?.showPopover()},e[5]=l,e[6]=n,e[7]=_):_=e[7];let j;e[8]!==n?(j=[n],e[8]=n,e[9]=j):j=e[9],I.useEffect(_,j);const y=r?`mode-popover ${r}`:"mode-popover";let w;e[10]!==i?(w=o.jsx("i",{className:i,"aria-hidden":"true"}),e[10]=i,e[11]=w):w=e[11];let $;e[12]!==l||e[13]!==w?($=o.jsx("button",{popoverTarget:l,ref:f,children:w}),e[12]=l,e[13]=w,e[14]=$):$=e[14];let N;e[15]!==s||e[16]!==l?(N=o.jsx("div",{id:l,popover:"auto",ref:p,children:s}),e[15]=s,e[16]=l,e[17]=N):N=e[17];let E;return e[18]!==y||e[19]!==$||e[20]!==N?(E=o.jsxs("div",{className:y,children:[$,N]}),e[18]=y,e[19]=$,e[20]=N,e[21]=E):E=e[21],E}function _d(t){return t.charCodeAt(0).toString(16)}function jd(t){const e=k.c(44),{server:s}=t,{currentProcesses:i,isLoading:r}=D(bd),{selectedProcesses:n}=D(wd);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0];const[a,d]=I.useState(l),[f,p]=I.useState(""),h=G(),{platform:g}=D(yd);let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=B=>{p(B.target.value)},e[1]=_):_=e[1];const j=_;let y;e[2]!==g?(y=B=>{const oe=g.startsWith("win32")?"\\":"/";return ps(B.executable,oe)[1]},e[2]=g,e[3]=y):y=e[3];const w=y;let $;e[4]!==h||e[5]!==w||e[6]!==n||e[7]!==s?($=B=>{const oe=typeof B=="string"?B:w(B),q=n?`${n}, ${oe}`:oe;h(St({server:s,value:q}))},e[4]=h,e[5]=w,e[6]=n,e[7]=s,e[8]=$):$=e[8];const N=$;let E;e[9]!==h||e[10]!==w||e[11]!==n||e[12]!==s?(E=B=>{const oe=n?.split(/,\s*/).filter(q=>q!==w(B)).join(", ");h(St({server:s,value:oe}))},e[9]=h,e[10]=w,e[11]=n,e[12]=s,e[13]=E):E=e[13];const T=E,P=B=>{L(B)&&n?T(B):N(B)},L=B=>{const oe=w(B);return n?.includes(oe)};let O;e[14]!==i||e[15]!==h?(O=()=>{i.length===0&&h($t())},e[14]=i,e[15]=h,e[16]=O):O=e[16];let M;e[17]===Symbol.for("react.memo_cache_sentinel")?(M=[],e[17]=M):M=e[17],I.useEffect(O,M);let U;e[18]!==i||e[19]!==f||e[20]!==w||e[21]!==a?(U=()=>{if(f){const B=i.filter(oe=>w(oe).toLowerCase().includes(f.toLowerCase()));d(B)}else a!==i&&d(i)},e[18]=i,e[19]=f,e[20]=w,e[21]=a,e[22]=U):U=e[22];let V;e[23]!==i||e[24]!==f?(V=[f,i],e[23]=i,e[24]=f,e[25]=V):V=e[25],I.useEffect(U,V);let W;e[26]!==N||e[27]!==f?(W=B=>{B.stopPropagation(),B.key==="Enter"&&(N(f),p(""))},e[26]=N,e[27]=f,e[28]=W):W=e[28];const J=W,[z,te]=I.useState(!1),Y="local-dropdown",Q="dropdown-header",X=n&&n?.length>0?"Add more":"all applications";let Z,ae;e[29]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>te(!0),ae=()=>te(!1),e[29]=Z,e[30]=ae):(Z=e[29],ae=e[30]);let le;e[31]!==f||e[32]!==J||e[33]!==X?(le=o.jsx("input",{type:"text",className:"autocomplete-input",placeholder:X,value:f,onChange:j,onKeyDown:J,onClick:Z,onBlur:ae}),e[31]=f,e[32]=J,e[33]=X,e[34]=le):le=e[34];const de=st,ye="fa fa-chevron-down",Pe="local-popover";let Se;e[35]===Symbol.for("react.memo_cache_sentinel")?(Se=o.jsx("h4",{children:"Current Applications running on machine"}),e[35]=Se):Se=e[35];const Ee=r?o.jsx("i",{className:"fa fa-spinner","aria-hidden":"true"}):a.length>0?o.jsxs("ul",{className:"dropdown-list",children:[o.jsxs("li",{className:`dropdown-item ${n===""?"selected":""}`,onClick:()=>{h(St({server:s,value:""}))},role:"menuitem",children:[o.jsxs("div",{className:"process-details",children:[o.jsx("div",{className:"process-icon"}),o.jsx("span",{className:"process-name",children:"All applications"})]}),n===""&&o.jsx("i",{className:"fa fa-check","aria-hidden":"true"})]}),o.jsx("hr",{className:"process-separator"}),a.map((B,oe)=>o.jsxs("li",{className:`dropdown-item ${L(B)?"selected":""}`,onClick:()=>P(B),role:"menuitem",children:[o.jsxs("div",{className:"process-details",children:[o.jsx("img",{className:"process-icon",src:`./executable-icon?path=${B.executable}`,loading:"lazy"}),o.jsx("span",{className:"process-name",children:w(B)})]}),L(B)&&o.jsx("i",{className:"fa fa-check","aria-hidden":"true"})]},oe))]}):o.jsxs("span",{children:["Press ",o.jsx("strong",{children:"Enter"})," to capture traffic for programs matching: ",o.jsx("strong",{children:f})]});let C;e[36]!==de||e[37]!==z||e[38]!==Se||e[39]!==Ee?(C=o.jsxs(de,{iconClass:ye,classname:Pe,isVisible:z,children:[Se,Ee]}),e[36]=de,e[37]=z,e[38]=Se,e[39]=Ee,e[40]=C):C=e[40];let he;return e[41]!==le||e[42]!==C?(he=o.jsx("div",{className:Y,children:o.jsxs("div",{className:Q,children:[le,C]})}),e[41]=le,e[42]=C,e[43]=he):he=e[43],he}function yd(t){return t.backendState}function wd(t){return t.modes.local[0]}function bd(t){return t.processes}function Sd(){const t=k.c(9),e=D(Cd),s=D($d);let i;if(t[0]!==s||t[1]!==e){let d;t[3]!==s?(d=f=>o.jsx(Nd,{server:f,backendState:s[Zi(f)]},f.ui_id),t[3]=s,t[4]=d):d=t[4],i=e.map(d),t[0]=s,t[1]=e,t[2]=i}else i=t[2];const r=i;let n,l;t[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("h4",{className:"mode-title",children:"Local Applications"}),l=o.jsx("p",{className:"mode-description",children:"Transparently Intercept local application(s)."}),t[5]=n,t[6]=l):(n=t[5],l=t[6]);let a;return t[7]!==r?(a=o.jsxs("div",{children:[n,l,r]}),t[7]=r,t[8]=a):a=t[8],a}function $d(t){return t.backendState.servers}function Cd(t){return t.modes.local}function Nd(t){const e=k.c(31),{server:s,backendState:i}=t,r=G(),n=D(Ed),l=s.error||i?.last_exception||n||void 0;let a;e[0]!==r||e[1]!==s?(a=E=>{const T=s.selectedProcesses?.split(/,\s*/).filter(P=>P!==E).join(", ");r(St({server:s,value:T}))},e[0]=r,e[1]=s,e[2]=a):a=e[2];const d=a;let f;e[3]!==r||e[4]!==s?(f=()=>r(cr({server:s,value:!s.active})),e[3]=r,e[4]=s,e[5]=f):f=e[5];let p;e[6]!==d||e[7]!==s.selectedProcesses?(p=s.selectedProcesses?.split(/,\s*/).filter(kd).map(E=>o.jsxs("div",{className:"selected-process",children:[E,o.jsx("i",{className:"fa fa-times","aria-hidden":"true",onClick:()=>d(E)})]},E)),e[6]=d,e[7]=s.selectedProcesses,e[8]=p):p=e[8];let h;e[9]!==p?(h=o.jsx("div",{className:"selected-processes",children:p}),e[9]=p,e[10]=h):h=e[10];let g;e[11]!==s?(g=o.jsx(jd,{server:s}),e[11]=s,e[12]=g):g=e[12];let _;e[13]!==r?(_=o.jsx("i",{className:"fa fa-refresh","aria-hidden":"true",onClick:()=>r($t())}),e[13]=r,e[14]=_):_=e[14];let j;e[15]!==g||e[16]!==_?(j=o.jsxs("div",{className:"dropdown-container",children:[g,_]}),e[15]=g,e[16]=_,e[17]=j):j=e[17];let y;e[18]!==h||e[19]!==j?(y=o.jsxs("div",{className:"processes-container",children:[h,j]}),e[18]=h,e[19]=j,e[20]=y):y=e[20];let w;e[21]!==s.active||e[22]!==f||e[23]!==y?(w=o.jsx(tt,{value:s.active,label:"Intercept traffic for",onChange:f,children:y}),e[21]=s.active,e[22]=f,e[23]=y,e[24]=w):w=e[24];let $;e[25]!==i||e[26]!==l?($=o.jsx(et,{error:l,backendState:i}),e[25]=i,e[26]=l,e[27]=$):$=e[27];let N;return e[28]!==$||e[29]!==w?(N=o.jsxs("div",{className:"mode-local",children:[w,$]}),e[28]=$,e[29]=w,e[30]=N):N=e[30],N}function kd(t){return t.trim()!==""}function Ed(t){return t.processes.error}function Td(){const t=k.c(9),e=D(Ad),s=D(Rd);let i;if(t[0]!==s||t[1]!==e){let d;t[3]!==s?(d=f=>o.jsx(Dd,{server:f,backendState:s[Xi(f)]},f.ui_id),t[3]=s,t[4]=d):d=t[4],i=e.map(d),t[0]=s,t[1]=e,t[2]=i}else i=t[2];const r=i;let n,l;t[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("h4",{className:"mode-title",children:"Explicit HTTP(S) Proxy"}),l=o.jsx("p",{className:"mode-description",children:"You manually configure your client application or device to use an HTTP(S) proxy."}),t[5]=n,t[6]=l):(n=t[5],l=t[6]);let a;return t[7]!==r?(a=o.jsxs("div",{children:[n,l,r]}),t[7]=r,t[8]=a):a=t[8],a}function Rd(t){return t.backendState.servers}function Ad(t){return t.modes.regular}function Dd(t){const e=k.c(33),{server:s,backendState:i}=t,r=G(),n=s.error||i?.last_exception||void 0;let l;e[0]!==r||e[1]!==s?(l=()=>r(rr({server:s,value:!s.active})),e[0]=r,e[1]=s,e[2]=l):l=e[2];let a,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("h4",{children:"Advanced Configuration"}),d=o.jsx("p",{children:"Listen Host"}),e[3]=a,e[4]=d):(a=e[3],d=e[4]);const f=s.listen_host||"";let p;e[5]!==r||e[6]!==s?(p=T=>r(or({server:s,value:T})),e[5]=r,e[6]=s,e[7]=p):p=e[7];let h;e[8]!==f||e[9]!==p?(h=o.jsx(ce,{className:"mode-input",content:f,onEditDone:p}),e[8]=f,e[9]=p,e[10]=h):h=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx("p",{children:"Listen Port"}),e[11]=g):g=e[11];let _;e[12]!==s.listen_port?(_=s.listen_port?s.listen_port.toString():"",e[12]=s.listen_port,e[13]=_):_=e[13];let j;e[14]!==r||e[15]!==s?(j=T=>r(lr({server:s,value:parseInt(T)})),e[14]=r,e[15]=s,e[16]=j):j=e[16];let y;e[17]!==_||e[18]!==j?(y=o.jsx(ce,{className:"mode-input",content:_,placeholder:"8080",onEditDone:j}),e[17]=_,e[18]=j,e[19]=y):y=e[19];let w;e[20]!==y||e[21]!==h?(w=o.jsxs(st,{iconClass:"fa fa-cog",children:[a,d,h,g,y]}),e[20]=y,e[21]=h,e[22]=w):w=e[22];let $;e[23]!==s.active||e[24]!==l||e[25]!==w?($=o.jsx(tt,{value:s.active,label:"Run HTTP/S Proxy",onChange:l,children:w}),e[23]=s.active,e[24]=l,e[25]=w,e[26]=$):$=e[26];let N;e[27]!==i||e[28]!==n?(N=o.jsx(et,{error:n,backendState:i}),e[27]=i,e[28]=n,e[29]=N):N=e[29];let E;return e[30]!==$||e[31]!==N?(E=o.jsxs("div",{children:[$,N]}),e[30]=$,e[31]=N,e[32]=E):E=e[32],E}function Fd(){const t=k.c(9),e=D(Ld),s=D(Id);let i;if(t[0]!==s||t[1]!==e){let d;t[3]!==s?(d=f=>o.jsx(Pd,{server:f,backendState:s[er(f)]},f.ui_id),t[3]=s,t[4]=d):d=t[4],i=e.map(d),t[0]=s,t[1]=e,t[2]=i}else i=t[2];const r=i;let n,l;t[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("h4",{className:"mode-title",children:"WireGuard Server"}),l=o.jsx("p",{className:"mode-description",children:"Start a WireGuard™ server and connect an external device for transparent proxying."}),t[5]=n,t[6]=l):(n=t[5],l=t[6]);let a;return t[7]!==r?(a=o.jsxs("div",{children:[n,l,r]}),t[7]=r,t[8]=a):a=t[8],a}function Id(t){return t.backendState.servers}function Ld(t){return t.modes.wireguard}function Pd(t){const e=k.c(41),{server:s,backendState:i}=t,r=G(),n=s.error||i?.last_exception||void 0;let l;e[0]!==r||e[1]!==s?(l=()=>r(ar({server:s,value:!s.active})),e[0]=r,e[1]=s,e[2]=l):l=e[2];let a,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("h4",{children:"Advanced Configuration"}),d=o.jsx("p",{children:"Listen Host"}),e[3]=a,e[4]=d):(a=e[3],d=e[4]);const f=s.listen_host||"";let p;e[5]!==r||e[6]!==s?(p=M=>r(dr({server:s,value:M})),e[5]=r,e[6]=s,e[7]=p):p=e[7];let h;e[8]!==f||e[9]!==p?(h=o.jsx(ce,{className:"mode-input",content:f,placeholder:"(all interfaces)",onEditDone:p}),e[8]=f,e[9]=p,e[10]=h):h=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx("p",{children:"Listen Port"}),e[11]=g):g=e[11];let _;e[12]!==s.listen_port?(_=s.listen_port?s.listen_port.toString():"",e[12]=s.listen_port,e[13]=_):_=e[13];let j;e[14]!==r||e[15]!==s?(j=M=>r(ur({server:s,value:parseInt(M)})),e[14]=r,e[15]=s,e[16]=j):j=e[16];let y;e[17]!==_||e[18]!==j?(y=o.jsx(ce,{className:"mode-input",content:_,placeholder:"51820",onEditDone:j}),e[17]=_,e[18]=j,e[19]=y):y=e[19];let w;e[20]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx("p",{children:"Configuration File"}),e[20]=w):w=e[20];const $=s.file_path||"";let N;e[21]!==r||e[22]!==s?(N=M=>r(fr({server:s,value:M})),e[21]=r,e[22]=s,e[23]=N):N=e[23];let E;e[24]!==$||e[25]!==N?(E=o.jsx(ce,{className:"mode-input",content:$,placeholder:"~/.mitmproxy/wireguard.conf",onEditDone:N}),e[24]=$,e[25]=N,e[26]=E):E=e[26];let T;e[27]!==y||e[28]!==E||e[29]!==h?(T=o.jsxs(st,{iconClass:"fa fa-cog",children:[a,d,h,g,y,w,E]}),e[27]=y,e[28]=E,e[29]=h,e[30]=T):T=e[30];let P;e[31]!==s.active||e[32]!==l||e[33]!==T?(P=o.jsx(tt,{value:s.active,label:"Run WireGuard Server",onChange:l,children:T}),e[31]=s.active,e[32]=l,e[33]=T,e[34]=P):P=e[34];let L;e[35]!==i||e[36]!==n?(L=o.jsx(et,{error:n,backendState:i}),e[35]=i,e[36]=n,e[37]=L):L=e[37];let O;return e[38]!==P||e[39]!==L?(O=o.jsxs("div",{children:[P,L]}),e[38]=P,e[39]=L,e[40]=O):O=e[40],O}function Od(){const t=k.c(15),e=G(),s=D(qd),i=D(Md);let r,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("h4",{className:"mode-title",children:"Reverse Proxy"}),n=o.jsx("p",{className:"mode-description",children:"Requests are forwarded to a preconfigured destination."}),t[0]=r,t[1]=n):(r=t[0],n=t[1]);let l;if(t[2]!==i||t[3]!==s){let h;t[5]!==i?(h=(g,_)=>o.jsx(Hd,{removable:_>0,server:g,backendState:i[Ns(g)]},g.ui_id),t[5]=i,t[6]=h):h=t[6],l=s.map(h),t[2]=i,t[3]=s,t[4]=l}else l=t[4];let a;t[7]!==e?(a=()=>e(na()),t[7]=e,t[8]=a):a=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx("i",{className:"fa fa-plus-square-o","aria-hidden":"true"}),t[9]=d):d=t[9];let f;t[10]!==a?(f=o.jsxs("div",{className:"mode-reverse-add-server",onClick:a,children:[d,"Add additional server"]}),t[10]=a,t[11]=f):f=t[11];let p;return t[12]!==l||t[13]!==f?(p=o.jsxs("div",{children:[r,n,o.jsxs("div",{className:"mode-reverse-servers",children:[l,f]})]}),t[12]=l,t[13]=f,t[14]=p):p=t[14],p}function Md(t){return t.backendState.servers}function qd(t){return t.modes.reverse}function Hd(t){const e=k.c(56),{removable:s,server:i,backendState:r}=t,n=G();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Object.values(Jt),e[0]=l):l=e[0];const a=l;let d;e[1]!==n||e[2]!==i?(d=async()=>{i.active&&await n(ms({server:i,value:!1})).unwrap(),await n(ia(i))},e[1]=n,e[2]=i,e[3]=d):d=e[3];const f=d,p=i.error||r?.last_exception||void 0,h=i.active;let g;e[4]!==n||e[5]!==i?(g=()=>{n(ms({server:i,value:!i.active}))},e[4]=n,e[5]=i,e[6]=g):g=e[6];const _=i.protocol;let j;e[7]!==n||e[8]!==i?(j=Z=>{n(mr({server:i,value:Z.target.value}))},e[7]=n,e[8]=i,e[9]=j):j=e[9];let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=a.map(Vd),e[10]=y):y=e[10];let w;e[11]!==i.protocol||e[12]!==j?(w=o.jsx("select",{name:"protocols",className:"mode-reverse-dropdown",value:_,onChange:j,children:y}),e[11]=i.protocol,e[12]=j,e[13]=w):w=e[13];let $;e[14]!==i.destination?($=i.destination?.toString()||"",e[14]=i.destination,e[15]=$):$=e[15];let N;e[16]!==n||e[17]!==i?(N=Z=>n(gr({server:i,value:Z})),e[16]=n,e[17]=i,e[18]=N):N=e[18];let E;e[19]!==N||e[20]!==$?(E=o.jsx(ce,{className:"mode-reverse-input",content:$,onEditDone:N,placeholder:"example.com"}),e[19]=N,e[20]=$,e[21]=E):E=e[21];let T,P;e[22]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx("h4",{children:"Advanced Configuration"}),P=o.jsx("p",{children:"Listen Host"}),e[22]=T,e[23]=P):(T=e[22],P=e[23]);const L=i.listen_host||"";let O;e[24]!==n||e[25]!==i?(O=Z=>n(pr({server:i,value:Z})),e[24]=n,e[25]=i,e[26]=O):O=e[26];let M;e[27]!==L||e[28]!==O?(M=o.jsx(ce,{className:"mode-input",content:L,onEditDone:O,placeholder:"*"}),e[27]=L,e[28]=O,e[29]=M):M=e[29];let U;e[30]===Symbol.for("react.memo_cache_sentinel")?(U=o.jsx("p",{children:"Listen Port"}),e[30]=U):U=e[30];const V=String(i.listen_port||"");let W;e[31]!==n||e[32]!==i?(W=Z=>n(hr({server:i,value:Z})),e[31]=n,e[32]=i,e[33]=W):W=e[33];let J;e[34]!==V||e[35]!==W?(J=o.jsx(ce,{className:"mode-input",content:V,onEditDone:W,placeholder:"8080"}),e[34]=V,e[35]=W,e[36]=J):J=e[36];let z;e[37]!==M||e[38]!==J?(z=o.jsxs(st,{iconClass:"fa fa-cog",children:[T,P,M,U,J]}),e[37]=M,e[38]=J,e[39]=z):z=e[39];let te;e[40]!==f||e[41]!==s?(te=s&&o.jsx("i",{className:"fa fa-fw fa-trash fa-lg","aria-hidden":"true",onClick:f}),e[40]=f,e[41]=s,e[42]=te):te=e[42];let Y;e[43]!==i.active||e[44]!==E||e[45]!==z||e[46]!==te||e[47]!==g||e[48]!==w?(Y=o.jsxs(tt,{value:h,label:"Forward",onChange:g,children:[w,"traffic to",E,z,te]}),e[43]=i.active,e[44]=E,e[45]=z,e[46]=te,e[47]=g,e[48]=w,e[49]=Y):Y=e[49];let Q;e[50]!==r||e[51]!==p?(Q=o.jsx(et,{error:p,backendState:r}),e[50]=r,e[51]=p,e[52]=Q):Q=e[52];let X;return e[53]!==Y||e[54]!==Q?(X=o.jsxs("div",{children:[Y,Q]}),e[53]=Y,e[54]=Q,e[55]=X):X=e[55],X}function Vd(t){return o.jsx("option",{value:t,children:t},t)}function Ud(){const t=k.c(9),e=D(Wd),s=D(Bd);let i;if(t[0]!==s||t[1]!==e){let d;t[3]!==s?(d=f=>o.jsx(Kd,{server:f,backendState:s[tr(f)]},f.ui_id),t[3]=s,t[4]=d):d=t[4],i=e.map(d),t[0]=s,t[1]=e,t[2]=i}else i=t[2];const r=i;let n;t[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("h4",{className:"mode-title",children:"Transparent Proxy"}),t[5]=n):n=t[5];let l;t[6]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsxs("p",{className:"mode-description",children:["You"," ",o.jsx("a",{href:"https://docs.mitmproxy.org/stable/howto-transparent/",style:{textDecoration:"underline",color:"inherit"},children:"configure your routing table"})," ","to send traffic through mitmproxy."]}),t[6]=l):l=t[6];let a;return t[7]!==r?(a=o.jsxs("div",{children:[n,l,r]}),t[7]=r,t[8]=a):a=t[8],a}function Bd(t){return t.backendState.servers}function Wd(t){return t.modes.transparent}function Kd(t){const e=k.c(33),{server:s,backendState:i}=t,r=G(),n=s.error||i?.last_exception||void 0;let l;e[0]!==r||e[1]!==s?(l=()=>r(xr({server:s,value:!s.active})),e[0]=r,e[1]=s,e[2]=l):l=e[2];let a,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("h4",{children:"Advanced Configuration"}),d=o.jsx("p",{children:"Listen Host"}),e[3]=a,e[4]=d):(a=e[3],d=e[4]);const f=s.listen_host||"";let p;e[5]!==r||e[6]!==s?(p=T=>r(_r({server:s,value:T})),e[5]=r,e[6]=s,e[7]=p):p=e[7];let h;e[8]!==f||e[9]!==p?(h=o.jsx(ce,{className:"mode-input",content:f,onEditDone:p}),e[8]=f,e[9]=p,e[10]=h):h=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx("p",{children:"Listen Port"}),e[11]=g):g=e[11];let _;e[12]!==s.listen_port?(_=s.listen_port?s.listen_port.toString():"",e[12]=s.listen_port,e[13]=_):_=e[13];let j;e[14]!==r||e[15]!==s?(j=T=>r(jr({server:s,value:parseInt(T)})),e[14]=r,e[15]=s,e[16]=j):j=e[16];let y;e[17]!==_||e[18]!==j?(y=o.jsx(ce,{className:"mode-input",content:_,placeholder:"8080",onEditDone:j}),e[17]=_,e[18]=j,e[19]=y):y=e[19];let w;e[20]!==y||e[21]!==h?(w=o.jsxs(st,{iconClass:"fa fa-cog",children:[a,d,h,g,y]}),e[20]=y,e[21]=h,e[22]=w):w=e[22];let $;e[23]!==s.active||e[24]!==l||e[25]!==w?($=o.jsx(tt,{value:s.active,label:"Run Transparent Proxy",onChange:l,children:w}),e[23]=s.active,e[24]=l,e[25]=w,e[26]=$):$=e[26];let N;e[27]!==i||e[28]!==n?(N=o.jsx(et,{error:n,backendState:i}),e[27]=i,e[28]=n,e[29]=N):N=e[29];let E;return e[30]!==$||e[31]!==N?(E=o.jsxs("div",{children:[$,N]}),e[30]=$,e[31]=N,e[32]=E):E=e[32],E}function zd(){const t=k.c(9),e=D(Yd),s=D(Gd);let i;if(t[0]!==s||t[1]!==e){let d;t[3]!==s?(d=f=>o.jsx(Jd,{server:f,backendState:s[sr(f)]},f.ui_id),t[3]=s,t[4]=d):d=t[4],i=e.map(d),t[0]=s,t[1]=e,t[2]=i}else i=t[2];const r=i;let n,l;t[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("h4",{className:"mode-title",children:"SOCKS Proxy"}),l=o.jsx("p",{className:"mode-description",children:"You manually configure your client application or device to use a SOCKS5 proxy."}),t[5]=n,t[6]=l):(n=t[5],l=t[6]);let a;return t[7]!==r?(a=o.jsxs("div",{children:[n,l,r]}),t[7]=r,t[8]=a):a=t[8],a}function Gd(t){return t.backendState.servers}function Yd(t){return t.modes.socks}function Jd(t){const e=k.c(33),{server:s,backendState:i}=t,r=G(),n=s.error||i?.last_exception||void 0;let l;e[0]!==r||e[1]!==s?(l=()=>r(yr({server:s,value:!s.active})),e[0]=r,e[1]=s,e[2]=l):l=e[2];let a,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("h4",{children:"Advanced Configuration"}),d=o.jsx("p",{children:"Listen Host"}),e[3]=a,e[4]=d):(a=e[3],d=e[4]);const f=s.listen_host||"";let p;e[5]!==r||e[6]!==s?(p=T=>r(wr({server:s,value:T})),e[5]=r,e[6]=s,e[7]=p):p=e[7];let h;e[8]!==f||e[9]!==p?(h=o.jsx(ce,{className:"mode-input",content:f,onEditDone:p}),e[8]=f,e[9]=p,e[10]=h):h=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx("p",{children:"Listen Port"}),e[11]=g):g=e[11];let _;e[12]!==s.listen_port?(_=s.listen_port?s.listen_port.toString():"",e[12]=s.listen_port,e[13]=_):_=e[13];let j;e[14]!==r||e[15]!==s?(j=T=>r(br({server:s,value:parseInt(T)})),e[14]=r,e[15]=s,e[16]=j):j=e[16];let y;e[17]!==_||e[18]!==j?(y=o.jsx(ce,{className:"mode-input",content:_,placeholder:"8080",onEditDone:j}),e[17]=_,e[18]=j,e[19]=y):y=e[19];let w;e[20]!==y||e[21]!==h?(w=o.jsxs(st,{iconClass:"fa fa-cog",children:[a,d,h,g,y]}),e[20]=y,e[21]=h,e[22]=w):w=e[22];let $;e[23]!==s.active||e[24]!==l||e[25]!==w?($=o.jsx(tt,{value:s.active,label:"Run SOCKS Proxy",onChange:l,children:w}),e[23]=s.active,e[24]=l,e[25]=w,e[26]=$):$=e[26];let N;e[27]!==i||e[28]!==n?(N=o.jsx(et,{error:n,backendState:i}),e[27]=i,e[28]=n,e[29]=N):N=e[29];let E;return e[30]!==$||e[31]!==N?(E=o.jsxs("div",{children:[$,N]}),e[30]=$,e[31]=N,e[32]=E):E=e[32],E}function Qd(){const t=k.c(9),e=D(Zd),s=D(Xd);let i;if(t[0]!==s||t[1]!==e){let d;t[3]!==s?(d=f=>o.jsx(eu,{server:f,backendState:s[nr(f)]},f.ui_id),t[3]=s,t[4]=d):d=t[4],i=e.map(d),t[0]=s,t[1]=e,t[2]=i}else i=t[2];const r=i;let n,l;t[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("h4",{className:"mode-title",children:"Explicit HTTP(S) Proxy (With Upstream Proxy)"}),l=o.jsx("p",{className:"mode-description",children:"All requests are forwarded to a second HTTP(S) proxy server."}),t[5]=n,t[6]=l):(n=t[5],l=t[6]);let a;return t[7]!==r?(a=o.jsxs("div",{children:[n,l,r]}),t[7]=r,t[8]=a):a=t[8],a}function Xd(t){return t.backendState.servers}function Zd(t){return t.modes.upstream}function eu(t){const e=k.c(42),{server:s,backendState:i}=t,r=G(),n=s.error||i?.last_exception||void 0;let l;e[0]!==r||e[1]!==s?(l=()=>{r(Sr({server:s,value:!s.active}))},e[0]=r,e[1]=s,e[2]=l):l=e[2];let a;e[3]!==s.destination?(a=s.destination?.toString()||"",e[3]=s.destination,e[4]=a):a=e[4];let d;e[5]!==r||e[6]!==s?(d=O=>r(Nr({server:s,value:O})),e[5]=r,e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a||e[9]!==d?(f=o.jsx(ce,{className:"mode-upstream-input",content:a,onEditDone:d,placeholder:"http://example.com:8080"}),e[8]=a,e[9]=d,e[10]=f):f=e[10];let p,h;e[11]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx("h4",{children:"Advanced Configuration"}),h=o.jsx("p",{children:"Listen Host"}),e[11]=p,e[12]=h):(p=e[11],h=e[12]);const g=s.listen_host||"";let _;e[13]!==r||e[14]!==s?(_=O=>r($r({server:s,value:O})),e[13]=r,e[14]=s,e[15]=_):_=e[15];let j;e[16]!==g||e[17]!==_?(j=o.jsx(ce,{className:"mode-input",content:g,onEditDone:_}),e[16]=g,e[17]=_,e[18]=j):j=e[18];let y;e[19]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx("p",{children:"Listen Port"}),e[19]=y):y=e[19];let w;e[20]!==s.listen_port?(w=s.listen_port?s.listen_port.toString():"",e[20]=s.listen_port,e[21]=w):w=e[21];let $;e[22]!==r||e[23]!==s?($=O=>r(Cr({server:s,value:parseInt(O)})),e[22]=r,e[23]=s,e[24]=$):$=e[24];let N;e[25]!==w||e[26]!==$?(N=o.jsx(ce,{className:"mode-input",content:w,placeholder:"8080",onEditDone:$}),e[25]=w,e[26]=$,e[27]=N):N=e[27];let E;e[28]!==N||e[29]!==j?(E=o.jsxs(st,{iconClass:"fa fa-cog",children:[p,h,j,y,N]}),e[28]=N,e[29]=j,e[30]=E):E=e[30];let T;e[31]!==s.active||e[32]!==l||e[33]!==E||e[34]!==f?(T=o.jsxs(tt,{value:s.active,label:"Run HTTP/S Proxy and forward requests to",onChange:l,children:[f,E]}),e[31]=s.active,e[32]=l,e[33]=E,e[34]=f,e[35]=T):T=e[35];let P;e[36]!==i||e[37]!==n?(P=o.jsx(et,{error:n,backendState:i}),e[36]=i,e[37]=n,e[38]=P):P=e[38];let L;return e[39]!==T||e[40]!==P?(L=o.jsxs("div",{children:[T,P]}),e[39]=T,e[40]=P,e[41]=L):L=e[41],L}function tu(){const t=k.c(9),e=D(nu),s=D(su);let i;if(t[0]!==s||t[1]!==e){let d;t[3]!==s?(d=f=>o.jsx(iu,{server:f,backendState:s[ir(f)]},f.ui_id),t[3]=s,t[4]=d):d=t[4],i=e.map(d),t[0]=s,t[1]=e,t[2]=i}else i=t[2];const r=i;let n,l;t[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("h4",{className:"mode-title",children:"DNS Server"}),l=o.jsx("p",{className:"mode-description",children:"A recursive DNS resolver using the host's DNS configuration."}),t[5]=n,t[6]=l):(n=t[5],l=t[6]);let a;return t[7]!==r?(a=o.jsxs("div",{children:[n,l,r]}),t[7]=r,t[8]=a):a=t[8],a}function su(t){return t.backendState.servers}function nu(t){return t.modes.dns}function iu(t){const e=k.c(33),{server:s,backendState:i}=t,r=G(),n=s.error||i?.last_exception||void 0;let l;e[0]!==r||e[1]!==s?(l=()=>r(kr({server:s,value:!s.active})),e[0]=r,e[1]=s,e[2]=l):l=e[2];let a,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("h4",{children:"Advanced Configuration"}),d=o.jsx("p",{children:"Listen Host"}),e[3]=a,e[4]=d):(a=e[3],d=e[4]);const f=s.listen_host||"";let p;e[5]!==r||e[6]!==s?(p=T=>r(Er({server:s,value:T})),e[5]=r,e[6]=s,e[7]=p):p=e[7];let h;e[8]!==f||e[9]!==p?(h=o.jsx(ce,{className:"mode-input",content:f,onEditDone:p}),e[8]=f,e[9]=p,e[10]=h):h=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx("p",{children:"Listen Port"}),e[11]=g):g=e[11];let _;e[12]!==s.listen_port?(_=s.listen_port?s.listen_port.toString():"",e[12]=s.listen_port,e[13]=_):_=e[13];let j;e[14]!==r||e[15]!==s?(j=T=>r(Tr({server:s,value:parseInt(T)})),e[14]=r,e[15]=s,e[16]=j):j=e[16];let y;e[17]!==_||e[18]!==j?(y=o.jsx(ce,{className:"mode-input",content:_,placeholder:"8080",onEditDone:j}),e[17]=_,e[18]=j,e[19]=y):y=e[19];let w;e[20]!==y||e[21]!==h?(w=o.jsxs(st,{iconClass:"fa fa-cog",children:[a,d,h,g,y]}),e[20]=y,e[21]=h,e[22]=w):w=e[22];let $;e[23]!==s.active||e[24]!==l||e[25]!==w?($=o.jsx(tt,{value:s.active,label:"Run DNS Server",onChange:l,children:w}),e[23]=s.active,e[24]=l,e[25]=w,e[26]=$):$=e[26];let N;e[27]!==i||e[28]!==n?(N=o.jsx(et,{error:n,backendState:i}),e[27]=i,e[28]=n,e[29]=N):N=e[29];let E;return e[30]!==$||e[31]!==N?(E=o.jsxs("div",{children:[$,N]}),e[30]=$,e[31]=N,e[32]=E):E=e[32],E}function ri(t){const e=k.c(10),{title:s,description:i}=t;let r;e[0]!==s?(r=o.jsx("h4",{className:"mode-title",children:s}),e[0]=s,e[1]=r):r=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("i",{className:"fa fa-exclamation-triangle","aria-hidden":"true"}),e[2]=n):n=e[2];let l;e[3]!==r?(l=o.jsxs("div",{className:"title-icon-container",children:[r,n]}),e[3]=r,e[4]=l):l=e[4];let a;e[5]!==i?(a=o.jsx("p",{className:"mode-description",children:i}),e[5]=i,e[6]=a):a=e[6];let d;return e[7]!==l||e[8]!==a?(d=o.jsxs("div",{className:"missing-mode-container",children:[l,a]}),e[7]=l,e[8]=a,e[9]=d):d=e[9],d}function ru(){const t=k.c(19),{platform:e,localModeUnavailable:s}=D(ou);let i,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("h2",{children:"Intercept Traffic"}),r=o.jsx("p",{children:"Configure how you want to intercept traffic with mitmproxy."}),t[0]=i,t[1]=r):(i=t[0],r=t[1]);let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("h3",{children:"Recommended"}),t[2]=n):n=t[2];let l;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(Td,{}),t[3]=l):l=t[3];let a;t[4]!==s?(a=s!==null?o.jsx(ri,{title:"Local Redirect Mode",description:s}):o.jsx(Sd,{}),t[4]=s,t[5]=a):a=t[5];let d,f;t[6]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Fd,{}),f=o.jsx(Od,{}),t[6]=d,t[7]=f):(d=t[6],f=t[7]);let p;t[8]!==a?(p=o.jsxs("div",{className:"modes-category green-left-border",children:[n,o.jsxs("div",{className:"modes-container",children:[l,a,d,f]})]}),t[8]=a,t[9]=p):p=t[9];let h;t[10]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("h3",{children:"Advanced"}),t[10]=h):h=t[10];let g,_,j;t[11]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(zd,{}),g=o.jsx(Qd,{}),_=o.jsx(tu,{}),t[11]=g,t[12]=_,t[13]=j):(g=t[11],_=t[12],j=t[13]);let y;t[14]!==e?(y=o.jsxs("div",{className:"modes-category gray-left-border",children:[h,o.jsxs("div",{className:"modes-container",children:[j,g,_,e.startsWith("win32")?o.jsx(ri,{title:"Transparent Proxy",description:"This mode is only supported on Linux and MacOS."}):o.jsx(Ud,{})]})]}),t[14]=e,t[15]=y):y=t[15];let w;return t[16]!==y||t[17]!==p?(w=o.jsxs("div",{className:"modes",children:[i,r,p,y]}),t[16]=y,t[17]=p,t[18]=w):w=t[18],w}function ou(t){return t.backendState}function lu(){const t=k.c(4),e=D(du),s=D(au),i=D(cu);let r;return t[0]!==i||t[1]!==s||t[2]!==e?(r=o.jsx("div",{className:"main-view",children:i===xe.Capture?o.jsx(ru,{}):o.jsxs(o.Fragment,{children:[s?o.jsx(md,{}):o.jsx(gd,{}),e&&o.jsxs(o.Fragment,{children:[o.jsx(ld,{},"splitter"),o.jsx(nd,{},"flowDetails")]})]})}),t[0]=i,t[1]=s,t[2]=e,t[3]=r):r=t[3],r}function cu(t){return t.ui.tabs.current}function au(t){return t.flows.list.length>0}function du(t){return t.flows.selected.length===1}function gt(t){const e=k.c(2),{children:s}=t;let i;return e[0]!==s?(i=window.MITMWEB_STATIC?null:o.jsx(o.Fragment,{children:s}),e[0]=s,e[1]=i):i=e[1],i}const uu=I.memo(function(){const e=k.c(20),s=G(),i=D(fu);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={placement:"bottom-start"},e[0]=r):r=e[0];let n;e[1]!==s?(n=o.jsx("li",{children:o.jsx(Fr,{icon:"fa-folder-open",text:" Open...",onClick:pu,onOpenFile:w=>{s(tc(w)),document.body.click()}})}),e[1]=s,e[2]=n):n=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsxs(ke,{onClick:hu,children:[o.jsx("i",{className:"fa fa-fw fa-floppy-o"})," Save"]}),e[3]=l):l=e[3];let a;e[4]!==i?(a=()=>location.replace("/flows/dump?filter="+i),e[4]=i,e[5]=a):a=e[5];let d;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx("i",{className:"fa fa-fw fa-floppy-o"}),e[6]=d):d=e[6];let f;e[7]!==a?(f=o.jsxs(ke,{onClick:a,children:[d," Save filtered"]}),e[7]=a,e[8]=f):f=e[8];let p;e[9]!==s?(p=()=>confirm("Delete all flows?")&&s(Oi()),e[9]=s,e[10]=p):p=e[10];let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("i",{className:"fa fa-fw fa-trash"}),e[11]=h):h=e[11];let g;e[12]!==p?(g=o.jsxs(ke,{onClick:p,children:[h," Clear All"]}),e[12]=p,e[13]=g):g=e[13];let _;e[14]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(ka,{}),e[14]=_):_=e[14];let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsxs(gt,{children:[_,o.jsx("li",{children:o.jsxs("a",{href:"http://mitm.it/",target:"_blank",rel:"noreferrer",children:[o.jsx("i",{className:"fa fa-fw fa-external-link"})," Install Certificates..."]})})]}),e[15]=j):j=e[15];let y;return e[16]!==n||e[17]!==f||e[18]!==g?(y=o.jsxs(Et,{className:"pull-left special",text:"File",options:r,children:[n,l,f,g,j]}),e[16]=n,e[17]=f,e[18]=g,e[19]=y):y=e[19],y});function fu(t){return t.ui.filter[ve.Search]}function pu(t){return t.stopPropagation()}function hu(){return location.replace("/flows/dump")}const mu=I.memo(function(){const e=k.c(5),s=D(gu),i=D(vu);switch(s){case wt.INIT:{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("span",{className:"connection-indicator init",children:"connecting…"}),e[0]=r):r=e[0],r}case wt.FETCHING:{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("span",{className:"connection-indicator fetching",children:"fetching data…"}),e[1]=r):r=e[1],r}case wt.ESTABLISHED:{let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("span",{className:"connection-indicator established",children:"connected"}),e[2]=r):r=e[2],r}case wt.ERROR:{let r;return e[3]!==i?(r=o.jsx("span",{className:"connection-indicator error",title:i,children:"connection lost"}),e[3]=i,e[4]=r):r=e[4],r}default:Ct(s)}});function gu(t){return t.connection.state}function vu(t){return t.connection.message}Xr.title="Capture";function Xr(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(o.Fragment,{}),t[0]=e):e=t[0],e}const oi=(function(){function t(i,r){function n(){this.constructor=i}n.prototype=r.prototype,i.prototype=new n}function e(i,r,n,l){this.message=i,this.expected=r,this.found=n,this.location=l,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,e)}t(e,Error);function s(i){var r=arguments.length>1?arguments[1]:{},n={},l={start:_n},a=_n,d={type:"other",description:"filter expression"},f=function(c){return c},p={type:"other",description:"whitespace"},h=/^[ \t\n\r]/,g={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},_={type:"other",description:"control character"},j=/^[|&!()~"]/,y={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},w={type:"other",description:"optional whitespace"},$="|",N={type:"literal",value:"|",description:'"|"'},E=function(c,u){return il(c,u)},T="&",P={type:"literal",value:"&",description:'"&"'},L=function(c,u){return rl(c,u)},O="!",M={type:"literal",value:"!",description:'"!"'},U=function(c){return ol(c)},V="(",W={type:"literal",value:"(",description:'"("'},J=")",z={type:"literal",value:")",description:'")"'},te=function(c){return ll(c)},Y="~all",Q={type:"literal",value:"~all",description:'"~all"'},X=function(){return Sn},Z="~a",ae={type:"literal",value:"~a",description:'"~a"'},le=function(){return Cn},de="~b",ye={type:"literal",value:"~b",description:'"~b"'},Pe=function(c){return cl(c)},Se="~bq",Ee={type:"literal",value:"~bq",description:'"~bq"'},C=function(c){return al(c)},he="~bs",B={type:"literal",value:"~bs",description:'"~bs"'},oe=function(c){return dl(c)},q="~c",$e={type:"literal",value:"~c",description:'"~c"'},We=function(c){return ul(c)},Oe="~comment",ee={type:"literal",value:"~comment",description:'"~comment"'},Me=function(c){return fl(c)},Re="~d",re={type:"literal",value:"~d",description:'"~d"'},ue=function(c){return pl(c)},ge="~dns",Ae={type:"literal",value:"~dns",description:'"~dns"'},nt=function(){return Nn},Je="~dst",Zt={type:"literal",value:"~dst",description:'"~dst"'},b=function(c){return hl(c)},S="~e",A={type:"literal",value:"~e",description:'"~e"'},H=function(){return kn},Tt="~h",es={type:"literal",value:"~h",description:'"~h"'},Ce=function(c){return ml(c)},De="~hq",ut={type:"literal",value:"~hq",description:'"~hq"'},Ke=function(c){return gl(c)},vt="~hs",Rt={type:"literal",value:"~hs",description:'"~hs"'},it=function(c){return vl(c)},At="~http",ft={type:"literal",value:"~http",description:'"~http"'},Fe=function(){return En},Us="~marked",no={type:"literal",value:"~marked",description:'"~marked"'},io=function(){return Tn},Bs="~marker",ro={type:"literal",value:"~marker",description:'"~marker"'},oo=function(c){return xl(c)},Ws="~m",lo={type:"literal",value:"~m",description:'"~m"'},co=function(c){return _l(c)},Ks="~q",ao={type:"literal",value:"~q",description:'"~q"'},uo=function(){return Rn},zs="~replayq",fo={type:"literal",value:"~replayq",description:'"~replayq"'},po=function(){return An},Gs="~replays",ho={type:"literal",value:"~replays",description:'"~replays"'},mo=function(){return Dn},Ys="~replay",go={type:"literal",value:"~replay",description:'"~replay"'},vo=function(){return Fn},Js="~src",xo={type:"literal",value:"~src",description:'"~src"'},_o=function(c){return jl(c)},Qs="~s",jo={type:"literal",value:"~s",description:'"~s"'},yo=function(){return In},Xs="~tcp",wo={type:"literal",value:"~tcp",description:'"~tcp"'},bo=function(){return Ln},Zs="~udp",So={type:"literal",value:"~udp",description:'"~udp"'},$o=function(){return Pn},en="~tq",Co={type:"literal",value:"~tq",description:'"~tq"'},No=function(c){return yl(c)},tn="~ts",ko={type:"literal",value:"~ts",description:'"~ts"'},Eo=function(c){return wl(c)},sn="~t",To={type:"literal",value:"~t",description:'"~t"'},Ro=function(c){return bl(c)},nn="~u",Ao={type:"literal",value:"~u",description:'"~u"'},rn=function(c){return Sl(c)},on="~websocket",Do={type:"literal",value:"~websocket",description:'"~websocket"'},Fo=function(){return On},Io={type:"other",description:"integer"},ln=/^['"]/,cn={type:"class",value:`['"]`,description:`['"]`},an=/^[0-9]/,dn={type:"class",value:"[0-9]",description:"[0-9]"},Lo=function(c){return parseInt(c.join(""),10)},Po={type:"other",description:"string"},un='"',fn={type:"literal",value:'"',description:'"\\""'},ts=function(c){return c.join("")},pn="'",hn={type:"literal",value:"'",description:`"'"`},Oo=/^["\\]/,Mo={type:"class",value:'["\\\\]',description:'["\\\\]'},ss={type:"any",description:"any character"},xt=function(c){return c},mn="\\",gn={type:"literal",value:"\\",description:'"\\\\"'},qo=/^['\\]/,Ho={type:"class",value:"['\\\\]",description:"['\\\\]"},Vo=/^['"\\]/,Uo={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},Bo="n",Wo={type:"literal",value:"n",description:'"n"'},Ko=function(){return` `},zo="r",Go={type:"literal",value:"r",description:'"r"'},Yo=function(){return"\r"},Jo="t",Qo={type:"literal",value:"t",description:'"t"'},Xo=function(){return" "},m=0,Dt=[{line:1,column:1,seenCR:!1}],qe=0,ns=[],R=0,Ft;if("startRule"in r){if(!(r.startRule in l))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');a=l[r.startRule]}function vn(c){var u=Dt[c],v,x;if(u)return u;for(v=c-1;!Dt[v];)v--;for(u=Dt[v],u={line:u.line,column:u.column,seenCR:u.seenCR};vqe&&(qe=m,ns=[]),ns.push(c))}function Zo(c,u,v,x){function He(Ie){var Qe=1;for(Ie.sort(function(Pt,rt){return Pt.descriptionrt.description?1:0});Qe1?rt.slice(0,-1).join(", ")+" or "+rt[Ie.length-1]:rt[0],qn=Qe?'"'+Pt(Qe)+'"':"end of input","Expected "+Mn+" but "+qn+" found."}return u!==null&&He(u),new e(Ne(u,v),u,v,x)}function _n(){var c,u,v,x;return R++,c=m,u=ze(),u!==n?(v=is(),v!==n?(x=ze(),x!==n?(u=f(v),c=u):(m=c,c=n)):(m=c,c=n)):(m=c,c=n),R--,c===n&&(u=n,R===0&&F(d)),c}function K(){var c;return R++,h.test(i.charAt(m))?(c=i.charAt(m),m++):(c=n,R===0&&F(g)),R--,c===n&&R===0&&F(p),c}function el(){var c;return R++,j.test(i.charAt(m))?(c=i.charAt(m),m++):(c=n,R===0&&F(y)),R--,c===n&&R===0&&F(_),c}function ze(){var c,u;for(R++,c=[],u=K();u!==n;)c.push(u),u=K();return R--,c===n&&(u=n,R===0&&F(w)),c}function is(){var c,u,v,x,He,Ne;return c=m,u=It(),u!==n?(v=ze(),v!==n?(i.charCodeAt(m)===124?(x=$,m++):(x=n,R===0&&F(N)),x!==n?(He=ze(),He!==n?(Ne=is(),Ne!==n?(u=E(u,Ne),c=u):(m=c,c=n)):(m=c,c=n)):(m=c,c=n)):(m=c,c=n)):(m=c,c=n),c===n&&(c=It()),c}function It(){var c,u,v,x,He,Ne;if(c=m,u=Lt(),u!==n?(v=ze(),v!==n?(i.charCodeAt(m)===38?(x=T,m++):(x=n,R===0&&F(P)),x!==n?(He=ze(),He!==n?(Ne=It(),Ne!==n?(u=L(u,Ne),c=u):(m=c,c=n)):(m=c,c=n)):(m=c,c=n)):(m=c,c=n)):(m=c,c=n),c===n){if(c=m,u=Lt(),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=It(),x!==n?(u=L(u,x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;c===n&&(c=Lt())}return c}function Lt(){var c,u,v,x;return c=m,i.charCodeAt(m)===33?(u=O,m++):(u=n,R===0&&F(M)),u!==n?(v=ze(),v!==n?(x=Lt(),x!==n?(u=U(x),c=u):(m=c,c=n)):(m=c,c=n)):(m=c,c=n),c===n&&(c=tl()),c}function tl(){var c,u,v,x,He,Ne;return c=m,i.charCodeAt(m)===40?(u=V,m++):(u=n,R===0&&F(W)),u!==n?(v=ze(),v!==n?(x=is(),x!==n?(He=ze(),He!==n?(i.charCodeAt(m)===41?(Ne=J,m++):(Ne=n,R===0&&F(z)),Ne!==n?(u=te(x),c=u):(m=c,c=n)):(m=c,c=n)):(m=c,c=n)):(m=c,c=n)):(m=c,c=n),c===n&&(c=sl()),c}function sl(){var c,u,v,x;if(c=m,i.substr(m,4)===Y?(u=Y,m+=4):(u=n,R===0&&F(Q)),u!==n&&(u=X()),c=u,c===n&&(c=m,i.substr(m,2)===Z?(u=Z,m+=2):(u=n,R===0&&F(ae)),u!==n&&(u=le()),c=u,c===n)){if(c=m,i.substr(m,2)===de?(u=de,m+=2):(u=n,R===0&&F(ye)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=Pe(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,3)===Se?(u=Se,m+=3):(u=n,R===0&&F(Ee)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=C(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,3)===he?(u=he,m+=3):(u=n,R===0&&F(B)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=oe(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,2)===q?(u=q,m+=2):(u=n,R===0&&F($e)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=nl(),x!==n?(u=We(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,8)===Oe?(u=Oe,m+=8):(u=n,R===0&&F(ee)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=Me(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,2)===Re?(u=Re,m+=2):(u=n,R===0&&F(re)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=ue(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n&&(c=m,i.substr(m,4)===ge?(u=ge,m+=4):(u=n,R===0&&F(Ae)),u!==n&&(u=nt()),c=u,c===n)){if(c=m,i.substr(m,4)===Je?(u=Je,m+=4):(u=n,R===0&&F(Zt)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=b(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n&&(c=m,i.substr(m,2)===S?(u=S,m+=2):(u=n,R===0&&F(A)),u!==n&&(u=H()),c=u,c===n)){if(c=m,i.substr(m,2)===Tt?(u=Tt,m+=2):(u=n,R===0&&F(es)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=Ce(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,3)===De?(u=De,m+=3):(u=n,R===0&&F(ut)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=Ke(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,3)===vt?(u=vt,m+=3):(u=n,R===0&&F(Rt)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=it(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n&&(c=m,i.substr(m,5)===At?(u=At,m+=5):(u=n,R===0&&F(ft)),u!==n&&(u=Fe()),c=u,c===n&&(c=m,i.substr(m,7)===Us?(u=Us,m+=7):(u=n,R===0&&F(no)),u!==n&&(u=io()),c=u,c===n))){if(c=m,i.substr(m,7)===Bs?(u=Bs,m+=7):(u=n,R===0&&F(ro)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=oo(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,2)===Ws?(u=Ws,m+=2):(u=n,R===0&&F(lo)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=co(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n&&(c=m,i.substr(m,2)===Ks?(u=Ks,m+=2):(u=n,R===0&&F(ao)),u!==n&&(u=uo()),c=u,c===n&&(c=m,i.substr(m,8)===zs?(u=zs,m+=8):(u=n,R===0&&F(fo)),u!==n&&(u=po()),c=u,c===n&&(c=m,i.substr(m,8)===Gs?(u=Gs,m+=8):(u=n,R===0&&F(ho)),u!==n&&(u=mo()),c=u,c===n&&(c=m,i.substr(m,7)===Ys?(u=Ys,m+=7):(u=n,R===0&&F(go)),u!==n&&(u=vo()),c=u,c===n))))){if(c=m,i.substr(m,4)===Js?(u=Js,m+=4):(u=n,R===0&&F(xo)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=_o(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n&&(c=m,i.substr(m,2)===Qs?(u=Qs,m+=2):(u=n,R===0&&F(jo)),u!==n&&(u=yo()),c=u,c===n&&(c=m,i.substr(m,4)===Xs?(u=Xs,m+=4):(u=n,R===0&&F(wo)),u!==n&&(u=bo()),c=u,c===n&&(c=m,i.substr(m,4)===Zs?(u=Zs,m+=4):(u=n,R===0&&F(So)),u!==n&&(u=$o()),c=u,c===n)))){if(c=m,i.substr(m,3)===en?(u=en,m+=3):(u=n,R===0&&F(Co)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=No(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,3)===tn?(u=tn,m+=3):(u=n,R===0&&F(ko)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=Eo(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,2)===sn?(u=sn,m+=2):(u=n,R===0&&F(To)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=Ro(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,2)===nn?(u=nn,m+=2):(u=n,R===0&&F(Ao)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=rn(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;c===n&&(c=m,i.substr(m,10)===on?(u=on,m+=10):(u=n,R===0&&F(Do)),u!==n&&(u=Fo()),c=u,c===n&&(c=m,u=me(),u!==n&&(u=rn(u)),c=u))}}}}}}}}}}}}}}}}}return c}function nl(){var c,u,v,x;if(R++,c=m,ln.test(i.charAt(m))?(u=i.charAt(m),m++):(u=n,R===0&&F(cn)),u===n&&(u=null),u!==n){if(v=[],an.test(i.charAt(m))?(x=i.charAt(m),m++):(x=n,R===0&&F(dn)),x!==n)for(;x!==n;)v.push(x),an.test(i.charAt(m))?(x=i.charAt(m),m++):(x=n,R===0&&F(dn));else v=n;v!==n?(ln.test(i.charAt(m))?(x=i.charAt(m),m++):(x=n,R===0&&F(cn)),x===n&&(x=null),x!==n?(u=Lo(v),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;return R--,c===n&&(u=n,R===0&&F(Io)),c}function me(){var c,u,v,x;if(R++,c=m,i.charCodeAt(m)===34?(u=un,m++):(u=n,R===0&&F(fn)),u!==n){for(v=[],x=jn();x!==n;)v.push(x),x=jn();v!==n?(i.charCodeAt(m)===34?(x=un,m++):(x=n,R===0&&F(fn)),x!==n?(u=ts(v),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.charCodeAt(m)===39?(u=pn,m++):(u=n,R===0&&F(hn)),u!==n){for(v=[],x=yn();x!==n;)v.push(x),x=yn();v!==n?(i.charCodeAt(m)===39?(x=pn,m++):(x=n,R===0&&F(hn)),x!==n?(u=ts(v),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n)if(c=m,u=m,R++,v=el(),R--,v===n?u=void 0:(m=u,u=n),u!==n){if(v=[],x=wn(),x!==n)for(;x!==n;)v.push(x),x=wn();else v=n;v!==n?(u=ts(v),c=u):(m=c,c=n)}else m=c,c=n}return R--,c===n&&(u=n,R===0&&F(Po)),c}function jn(){var c,u,v;return c=m,u=m,R++,Oo.test(i.charAt(m))?(v=i.charAt(m),m++):(v=n,R===0&&F(Mo)),R--,v===n?u=void 0:(m=u,u=n),u!==n?(i.length>m?(v=i.charAt(m),m++):(v=n,R===0&&F(ss)),v!==n?(u=xt(v),c=u):(m=c,c=n)):(m=c,c=n),c===n&&(c=m,i.charCodeAt(m)===92?(u=mn,m++):(u=n,R===0&&F(gn)),u!==n?(v=bn(),v!==n?(u=xt(v),c=u):(m=c,c=n)):(m=c,c=n)),c}function yn(){var c,u,v;return c=m,u=m,R++,qo.test(i.charAt(m))?(v=i.charAt(m),m++):(v=n,R===0&&F(Ho)),R--,v===n?u=void 0:(m=u,u=n),u!==n?(i.length>m?(v=i.charAt(m),m++):(v=n,R===0&&F(ss)),v!==n?(u=xt(v),c=u):(m=c,c=n)):(m=c,c=n),c===n&&(c=m,i.charCodeAt(m)===92?(u=mn,m++):(u=n,R===0&&F(gn)),u!==n?(v=bn(),v!==n?(u=xt(v),c=u):(m=c,c=n)):(m=c,c=n)),c}function wn(){var c,u,v;return c=m,u=m,R++,v=K(),R--,v===n?u=void 0:(m=u,u=n),u!==n?(i.length>m?(v=i.charAt(m),m++):(v=n,R===0&&F(ss)),v!==n?(u=xt(v),c=u):(m=c,c=n)):(m=c,c=n),c}function bn(){var c,u;return Vo.test(i.charAt(m))?(c=i.charAt(m),m++):(c=n,R===0&&F(Uo)),c===n&&(c=m,i.charCodeAt(m)===110?(u=Bo,m++):(u=n,R===0&&F(Wo)),u!==n&&(u=Ko()),c=u,c===n&&(c=m,i.charCodeAt(m)===114?(u=zo,m++):(u=n,R===0&&F(Go)),u!==n&&(u=Yo()),c=u,c===n&&(c=m,i.charCodeAt(m)===116?(u=Jo,m++):(u=n,R===0&&F(Qo)),u!==n&&(u=Xo()),c=u))),c}function il(c,u){function v(){return c.apply(this,arguments)||u.apply(this,arguments)}return v.desc=c.desc+" or "+u.desc,v}function rl(c,u){function v(){return c.apply(this,arguments)&&u.apply(this,arguments)}return v.desc=c.desc+" and "+u.desc,v}function ol(c){function u(){return!c.apply(this,arguments)}return u.desc="not "+c.desc,u}function ll(c){function u(){return c.apply(this,arguments)}return u.desc="("+c.desc+")",u}function Sn(c){return!0}Sn.desc="all flows";var $n=[new RegExp("text/javascript"),new RegExp("application/x-javascript"),new RegExp("application/javascript"),new RegExp("text/css"),new RegExp("image/.*"),new RegExp("font/.*"),new RegExp("application/font.*")];function Cn(c){if(c.response){for(var u=mt.getContentType(c.response),v=$n.length;v--;)if($n[v].test(u))return!0}return!1}Cn.desc="is asset";function cl(c){c=new RegExp(c,"i");function u(v){return!0}return u.desc="body matches "+c,u}function al(c){c=new RegExp(c,"i");function u(v){return!0}return u.desc="body request matches "+c,u}function dl(c){c=new RegExp(c,"i");function u(v){return!0}return u.desc="body response matches "+c,u}function ul(c){function u(v){return v.response&&v.response.status_code===c}return u.desc="resp. code is "+c,u}function fl(c){c=new RegExp(c,"i");function u(v){return c.test(v.comment)}return u.desc="comment matches "+c,u}function pl(c){c=new RegExp(c,"i");function u(v){return v.request&&(c.test(v.request.host)||c.test(v.request.pretty_host))}return u.desc="domain matches "+c,u}function Nn(c){return c.type==="dns"}Nn.desc="is a DNS Flow";function hl(c){c=new RegExp(c,"i");function u(v){return!!v.server_conn.address&&c.test(v.server_conn.address[0]+":"+v.server_conn.address[1])}return u.desc="destination address matches "+c,u}function kn(c){return!!c.error}kn.desc="has error";function ml(c){c=new RegExp(c,"i");function u(v){return v.request&&ct.match_header(v.request,c)||v.response&&mt.match_header(v.response,c)}return u.desc="header matches "+c,u}function gl(c){c=new RegExp(c,"i");function u(v){return v.request&&ct.match_header(v.request,c)}return u.desc="req. header matches "+c,u}function vl(c){c=new RegExp(c,"i");function u(v){return v.response&&mt.match_header(v.response,c)}return u.desc="resp. header matches "+c,u}function En(c){return c.type==="http"}En.desc="is an HTTP Flow";function Tn(c){return c.marked}Tn.desc="is marked";function xl(c){c=new RegExp(c,"i");function u(v){return c.test(v.marked)}return u.desc="marker matches "+c,u}function _l(c){c=new RegExp(c,"i");function u(v){return v.request&&c.test(v.request.method)}return u.desc="method matches "+c,u}function Rn(c){return c.request&&!c.response}Rn.desc="has no response";function An(c){return c.is_replay==="request"}An.desc="request has been replayed";function Dn(c){return c.is_replay==="response"}Dn.desc="response has been replayed";function Fn(c){return!!c.is_replay}Fn.desc="flow has been replayed";function jl(c){c=new RegExp(c,"i");function u(v){return!!v.client_conn.peername&&c.test(v.client_conn.peername[0]+":"+v.client_conn.peername[1])}return u.desc="source address matches "+c,u}function In(c){return!!c.response}In.desc="has response";function Ln(c){return c.type==="tcp"}Ln.desc="is a TCP Flow";function Pn(c){return c.type==="udp"}Pn.desc="is a UDP Flow";function yl(c){c=new RegExp(c,"i");function u(v){return v.request&&c.test(ct.getContentType(v.request))}return u.desc="req. content type matches "+c,u}function wl(c){c=new RegExp(c,"i");function u(v){return v.response&&c.test(mt.getContentType(v.response))}return u.desc="resp. content type matches "+c,u}function bl(c){c=new RegExp(c,"i");function u(v){return v.request&&c.test(ct.getContentType(v.request))||v.response&&c.test(mt.getContentType(v.response))}return u.desc="content type matches "+c,u}function Sl(c){c=new RegExp(c,"i");function u(v){if(v.type==="dns"){const x=v.request?.questions[0];return x&&c.test(x.name)}return v.request&&c.test(ct.pretty_url(v.request))}return u.desc="url matches "+c,u}function On(c){return!!c.websocket}if(On.desc="is a Websocket Flow",Ft=a(),Ft!==n&&m===i.length)return Ft;throw Ft!==n&&me.json()),Ye.xhr.catch(()=>{Ye.xhr=null})),this.state.doc||Ye.xhr.then(e=>{Ye.doc=e,this.setState({doc:e})})}render(){const{doc:e}=this.state;return e?o.jsx("table",{className:"table table-condensed",children:o.jsxs("tbody",{children:[e.commands.map(s=>o.jsxs("tr",{onClick:()=>this.props.selectHandler(s[0].split(" ")[0]+" "),children:[o.jsx("td",{children:s[0].replace(" "," ")}),o.jsx("td",{children:s[1]})]},s[1])),o.jsx("tr",{children:o.jsx("td",{colSpan:2,children:o.jsxs("a",{href:"https://mitmproxy.org/docs/latest/concepts-filters/",target:"_blank",rel:"noreferrer",children:[o.jsx("i",{className:"fa fa-external-link"}),"  mitmproxy docs"]})})},"docs-link")]})}):o.jsx("i",{className:"fa fa-spinner fa-spin"})}}var Xt=(t=>(t.SEARCH="search",t.HIGHLIGHT="tag",t.INTERCEPT="pause",t))(Xt||{});class Hs extends I.Component{inputRef=Te.createRef();constructor(e,s){super(e,s),this.state={value:this.props.value,focus:!1,mousefocus:!1},this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.selectFilter=this.selectFilter.bind(this)}UNSAFE_componentWillReceiveProps(e){this.setState({value:e.value})}isValid(e){try{return e&&oi.parse(e),!0}catch{return!1}}getDesc(){if(!this.state.value)return o.jsx(Ye,{selectHandler:this.selectFilter});try{return oi.parse(this.state.value).desc}catch(e){return""+e}}onChange(e){const s=e.target.value;this.setState({value:s}),this.isValid(s)&&this.props.onChange(s)}onFocus(){this.setState({focus:!0})}onBlur(){this.setState({focus:!1})}onMouseEnter(){this.setState({mousefocus:!0})}onMouseLeave(){this.setState({mousefocus:!1})}onKeyDown(e){(e.key==="Escape"||e.key==="Enter")&&(this.blur(),this.setState({mousefocus:!1})),e.stopPropagation()}selectFilter(e){this.setState({value:e}),this.inputRef.current?.focus(),this.isValid(e)&&this.props.onChange(e)}blur(){this.inputRef.current?.blur()}select(){this.inputRef.current?.select()}render(){const{icon:e,color:s,placeholder:i}=this.props,{value:r,focus:n,mousefocus:l}=this.state;return o.jsxs("div",{className:je("filter-input input-group",{"has-error":!this.isValid(r)}),children:[o.jsx("span",{className:"input-group-addon",children:o.jsx("i",{className:"fa fa-fw fa-"+e,style:{color:s}})}),o.jsx("input",{type:"text",ref:this.inputRef,placeholder:i,className:"form-control",value:r,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown}),(n||l)&&o.jsxs("div",{className:"popover bottom",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,children:[o.jsx("div",{className:"arrow"}),o.jsx("div",{className:"popover-content",children:this.getDesc()})]})]})}}Zr.title="Flow List";function Zr(){const t=k.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsxs("div",{className:"menu-group",children:[o.jsxs("div",{className:"menu-content",children:[o.jsx(ju,{}),o.jsx(wu,{})]}),o.jsx("div",{className:"menu-legend",children:"Find"})]}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsxs("div",{className:"main-menu",children:[e,o.jsxs("div",{className:"menu-group",children:[o.jsxs("div",{className:"menu-content",children:[o.jsx(xu,{}),o.jsx(Su,{})]}),o.jsx("div",{className:"menu-legend",children:"Intercept"})]})]}),t[1]=s):s=t[1],s}function xu(){const t=k.c(5),e=G(),i=D(_u)||"";let r;t[0]!==e?(r=l=>e(Cs("intercept",l)),t[0]=e,t[1]=r):r=t[1];let n;return t[2]!==i||t[3]!==r?(n=o.jsx(Hs,{value:i,placeholder:"Intercept",icon:Xt.INTERCEPT,color:"hsl(208, 56%, 53%)",onChange:r}),t[2]=i,t[3]=r,t[4]=n):n=t[4],n}function _u(t){return t.options.intercept}function ju(){const t=k.c(5),e=G(),s=D(yu);let i;t[0]!==e?(i=n=>e(Ri(n)),t[0]=e,t[1]=i):i=t[1];let r;return t[2]!==i||t[3]!==s?(r=o.jsx(Hs,{value:s,placeholder:"Search",icon:Xt.SEARCH,color:"black",onChange:i}),t[2]=i,t[3]=s,t[4]=r):r=t[4],r}function yu(t){return t.ui.filter[ve.Search]}function wu(){const t=k.c(5),e=G(),s=D(bu);let i;t[0]!==e?(i=n=>e(Ai(n)),t[0]=e,t[1]=i):i=t[1];let r;return t[2]!==i||t[3]!==s?(r=o.jsx(Hs,{value:s,placeholder:"Highlight",icon:Xt.HIGHLIGHT,color:"hsl(48, 100%, 50%)",onChange:i}),t[2]=i,t[3]=s,t[4]=r):r=t[4],r}function bu(t){return t.ui.filter[ve.Highlight]}function Su(){const t=k.c(2),e=G();let s;return t[0]!==e?(s=o.jsx(pe,{className:"btn-sm",title:"[a]ccept all",icon:"fa-forward text-success",onClick:()=>e(Di()),children:"Resume All"}),t[0]=e,t[1]=s):s=t[1],s}function Vs(t){const e=k.c(6),{value:s,onChange:i,children:r}=t;let n;e[0]!==i||e[1]!==s?(n=o.jsx("input",{type:"checkbox",checked:s,onChange:i}),e[0]=i,e[1]=s,e[2]=n):n=e[2];let l;return e[3]!==r||e[4]!==n?(l=o.jsx("div",{className:"menu-entry",children:o.jsxs("label",{children:[n,r]})}),e[3]=r,e[4]=n,e[5]=l):l=e[5],l}function cs(t){const e=k.c(10),{name:s,children:i}=t,r=G();let n;e[0]!==s?(n=p=>p.options[s],e[0]=s,e[1]=n):n=e[1];const l=D(n),a=!!l;let d;e[2]!==r||e[3]!==s||e[4]!==l?(d=()=>r(Cs(s,!l)),e[2]=r,e[3]=s,e[4]=l,e[5]=d):d=e[5];let f;return e[6]!==i||e[7]!==a||e[8]!==d?(f=o.jsx(Vs,{value:a,onChange:d,children:i}),e[6]=i,e[7]=a,e[8]=d,e[9]=f):f=e[9],f}function $u(){const t=k.c(5),e=G(),s=D(Cu);let i;t[0]!==e?(i=()=>e(Gt()),t[0]=e,t[1]=i):i=t[1];let r;return t[2]!==i||t[3]!==s?(r=o.jsx(Vs,{value:s,onChange:i,children:"Display Event Log"}),t[2]=i,t[3]=s,t[4]=r):r=t[4],r}function Cu(t){return t.eventLog.visible}function Nu(){const t=k.c(5),e=G(),s=D(ku);let i;t[0]!==e?(i=()=>e(Ji()),t[0]=e,t[1]=i):i=t[1];let r;return t[2]!==i||t[3]!==s?(r=o.jsx(Vs,{value:s,onChange:i,children:"Display Command Bar"}),t[2]=i,t[3]=s,t[4]=r):r=t[4],r}function ku(t){return t.commandBar.visible}function as(t){const e=k.c(5),{children:s,resource:i}=t,r=`https://docs.mitmproxy.org/stable/${i}`;let n;e[0]!==s?(n=s||o.jsx("i",{className:"fa fa-question-circle"}),e[0]=s,e[1]=n):n=e[1];let l;return e[2]!==n||e[3]!==r?(l=o.jsx("a",{target:"_blank",href:r,rel:"noreferrer",children:n}),e[2]=n,e[3]=r,e[4]=l):l=e[4],l}eo.title="Options";function eo(){const t=k.c(16),e=G(),s=Eu;let i;t[0]!==e?(i=()=>e(s()),t[0]=e,t[1]=i):i=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("sup",{children:"alpha"}),t[2]=r):r=t[2];let n;t[3]!==i?(n=o.jsx("div",{className:"menu-content",children:o.jsxs(pe,{title:"Open Options",icon:"fa-cogs text-primary",onClick:i,children:["Edit Options ",r]})}),t[3]=i,t[4]=n):n=t[4];let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"menu-legend",children:"Options Editor"}),t[5]=l):l=t[5];let a;t[6]!==n?(a=o.jsxs("div",{className:"menu-group",children:[n,l]}),t[6]=n,t[7]=a):a=t[7];let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsxs(cs,{name:"anticache",children:["Strip cache headers"," ",o.jsx(as,{resource:"overview/features/#anticache"})]}),t[8]=d):d=t[8];let f;t[9]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsxs(cs,{name:"showhost",children:["Use host header for display"," ",o.jsx(as,{resource:"concepts/options/#showhost"})]}),t[9]=f):f=t[9];let p;t[10]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs("div",{className:"menu-group",children:[o.jsxs("div",{className:"menu-content",children:[d,f,o.jsxs(cs,{name:"ssl_insecure",children:["Don't verify server certificates"," ",o.jsx(as,{resource:"concepts/options/#ssl_insecure"})]})]}),o.jsx("div",{className:"menu-legend",children:"Quick Options"})]}),t[10]=p):p=t[10];let h;t[11]!==a?(h=o.jsxs(gt,{children:[a,p]}),t[11]=a,t[12]=h):h=t[12];let g;t[13]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsxs("div",{className:"menu-group",children:[o.jsxs("div",{className:"menu-content",children:[o.jsx($u,{}),o.jsx(Nu,{})]}),o.jsx("div",{className:"menu-legend",children:"View Options"})]}),t[13]=g):g=t[13];let _;return t[14]!==h?(_=o.jsxs("div",{children:[h,g]}),t[14]=h,t[15]=_):_=t[15],_}function Eu(){return dc("OptionModal")}const yt=async(t,e)=>{const s=(async()=>{const i=await Bt("export",e,`@${t.id}`);if(i.value)return i.value;throw i.error?i.error:i})();try{await gi(s)}catch(i){alert(i)}};to.title="Flow";function to(){const t=k.c(63),e=G(),s=D(Tu),i=s[0];let r;t[0]!==s?(r=s.some(_s),t[0]=s,t[1]=r):r=t[1];const n=r;if(s.length===0){let X;return t[2]===Symbol.for("react.memo_cache_sentinel")?(X=o.jsx("div",{}),t[2]=X):X=t[2],X}let l;t[3]!==e||t[4]!==s?(l=()=>e(ws(s)),t[3]=e,t[4]=s,t[5]=l):l=t[5];let a;t[6]!==s?(a=s.some(xs),t[6]=s,t[7]=a):a=t[7];const d=!a;let f;t[8]!==l||t[9]!==d?(f=o.jsx(pe,{title:"[r]eplay flow",icon:"fa-repeat text-primary",onClick:l,disabled:d,children:"Replay"}),t[8]=l,t[9]=d,t[10]=f):f=t[10];let p;t[11]!==e||t[12]!==s?(p=o.jsx(pe,{title:"[D]uplicate flow",icon:"fa-copy text-info",onClick:()=>e(Li(s)),children:"Duplicate"}),t[11]=e,t[12]=s,t[13]=p):p=t[13];let h;t[14]!==s?(h=s.some(bi),t[14]=s,t[15]=h):h=t[15];const g=!h;let _;t[16]!==e||t[17]!==s?(_=()=>e(Pi(s)),t[16]=e,t[17]=s,t[18]=_):_=t[18];let j;t[19]!==g||t[20]!==_?(j=o.jsx(pe,{disabled:g,title:"revert changes to flow [V]",icon:"fa-history text-warning",onClick:_,children:"Revert"}),t[19]=g,t[20]=_,t[21]=j):j=t[21];let y;t[22]!==e||t[23]!==s?(y=o.jsx(pe,{title:"[d]elete flow",icon:"fa-trash text-danger",onClick:()=>{e(Ii(s))},children:"Delete"}),t[22]=e,t[23]=s,t[24]=y):y=t[24];let w;t[25]!==s?(w=o.jsx(Mu,{flows:s}),t[25]=s,t[26]=w):w=t[26];let $;t[27]!==y||t[28]!==w||t[29]!==f||t[30]!==p||t[31]!==j?($=o.jsxs("div",{className:"menu-content",children:[f,p,j,y,w]}),t[27]=y,t[28]=w,t[29]=f,t[30]=p,t[31]=j,t[32]=$):$=t[32];let N;t[33]===Symbol.for("react.memo_cache_sentinel")?(N=o.jsx("div",{className:"menu-legend",children:"Flow Modification"}),t[33]=N):N=t[33];let E;t[34]!==$?(E=o.jsx(gt,{children:o.jsxs("div",{className:"menu-group",children:[$,N]})}),t[34]=$,t[35]=E):E=t[35];let T;t[36]!==i?(T=o.jsxs("div",{className:"menu-content",children:[o.jsx(Ru,{flow:i}),o.jsx(Iu,{flow:i})]}),t[36]=i,t[37]=T):T=t[37];let P;t[38]===Symbol.for("react.memo_cache_sentinel")?(P=o.jsx("div",{className:"menu-legend",children:"Export"}),t[38]=P):P=t[38];let L;t[39]!==T?(L=o.jsxs("div",{className:"menu-group",children:[T,P]}),t[39]=T,t[40]=L):L=t[40];const O=!n;let M;t[41]!==e||t[42]!==s?(M=()=>e(ys(s)),t[41]=e,t[42]=s,t[43]=M):M=t[43];let U;t[44]!==O||t[45]!==M?(U=o.jsx(pe,{disabled:O,title:"[a]ccept intercepted flow",icon:"fa-play text-success",onClick:M,children:"Resume"}),t[44]=O,t[45]=M,t[46]=U):U=t[46];const V=!n;let W;t[47]!==e||t[48]!==s?(W=()=>e(Fi(s)),t[47]=e,t[48]=s,t[49]=W):W=t[49];let J;t[50]!==V||t[51]!==W?(J=o.jsx(pe,{disabled:V,title:"kill intercepted flow [x]",icon:"fa-times text-danger",onClick:W,children:"Abort"}),t[50]=V,t[51]=W,t[52]=J):J=t[52];let z;t[53]!==U||t[54]!==J?(z=o.jsxs("div",{className:"menu-content",children:[U,J]}),t[53]=U,t[54]=J,t[55]=z):z=t[55];let te;t[56]===Symbol.for("react.memo_cache_sentinel")?(te=o.jsx("div",{className:"menu-legend",children:"Interception"}),t[56]=te):te=t[56];let Y;t[57]!==z?(Y=o.jsx(gt,{children:o.jsxs("div",{className:"menu-group",children:[z,te]})}),t[57]=z,t[58]=Y):Y=t[58];let Q;return t[59]!==E||t[60]!==L||t[61]!==Y?(Q=o.jsxs("div",{className:"flow-menu",children:[E,L,Y]}),t[59]=E,t[60]=L,t[61]=Y,t[62]=Q):Q=t[62],Q}function Tu(t){return t.flows.selected}const qt=t=>{const e=window.open(t,"_blank","noopener,noreferrer");e&&(e.opener=null)};function Ru(t){const e=k.c(24),{flow:s}=t,i=D(Fu);if(s.type!=="http"){let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(pe,{icon:"fa-download",onClick:Du,disabled:!0,children:"Download"}),e[0]=r):r=e[0],r}if(s.request.contentLength&&!s.response?.contentLength){let r;e[1]!==s?(r=()=>qt(we.getContentURL(s,s.request)),e[1]=s,e[2]=r):r=e[2];const n=!i;let l;return e[3]!==r||e[4]!==n?(l=o.jsx(pe,{icon:"fa-download",onClick:r,disabled:n,children:"Download"}),e[3]=r,e[4]=n,e[5]=l):l=e[5],l}if(s.response){const r=s.response;if(!s.request.contentLength&&s.response.contentLength){let n;e[6]!==s||e[7]!==r?(n=()=>qt(we.getContentURL(s,r)),e[6]=s,e[7]=r,e[8]=n):n=e[8];const l=!i;let a;return e[9]!==n||e[10]!==l?(a=o.jsx(pe,{icon:"fa-download",onClick:n,disabled:l,children:"Download"}),e[9]=n,e[10]=l,e[11]=a):a=e[11],a}if(s.request.contentLength&&s.response.contentLength){const n=!i;let l;e[12]!==n?(l=o.jsx(pe,{icon:"fa-download",onClick:Au,disabled:n,children:"Download▾"}),e[12]=n,e[13]=l):l=e[13];let a;e[14]===Symbol.for("react.memo_cache_sentinel")?(a={placement:"bottom-start"},e[14]=a):a=e[14];let d;e[15]!==s?(d=o.jsx(ke,{onClick:()=>qt(we.getContentURL(s,s.request)),children:"Download request"}),e[15]=s,e[16]=d):d=e[16];let f;e[17]!==s||e[18]!==r?(f=o.jsx(ke,{onClick:()=>qt(we.getContentURL(s,r)),children:"Download response"}),e[17]=s,e[18]=r,e[19]=f):f=e[19];let p;return e[20]!==l||e[21]!==d||e[22]!==f?(p=o.jsxs(Et,{text:l,options:a,children:[d,f]}),e[20]=l,e[21]=d,e[22]=f,e[23]=p):p=e[23],p}}return null}function Au(){return 1}function Du(){return 0}function Fu(t){return t.flows.selected.length===1}function Iu(t){const e=k.c(20),{flow:s}=t,i=D(Pu),r=s.type!=="http"||!i;let n;e[0]!==r?(n=o.jsx(pe,{title:"Export flow.",icon:"fa-clone",onClick:Lu,disabled:r,children:"Export▾"}),e[0]=r,e[1]=n):n=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l={placement:"bottom-start"},e[2]=l):l=e[2];let a;e[3]!==s?(a=o.jsx(ke,{onClick:()=>yt(s,"raw_request"),children:"Copy raw request"}),e[3]=s,e[4]=a):a=e[4];let d;e[5]!==s?(d=o.jsx(ke,{onClick:()=>yt(s,"raw_response"),children:"Copy raw response"}),e[5]=s,e[6]=d):d=e[6];let f;e[7]!==s?(f=o.jsx(ke,{onClick:()=>yt(s,"raw"),children:"Copy raw request and response"}),e[7]=s,e[8]=f):f=e[8];let p;e[9]!==s?(p=o.jsx(ke,{onClick:()=>yt(s,"curl"),children:"Copy as cURL"}),e[9]=s,e[10]=p):p=e[10];let h;e[11]!==s?(h=o.jsx(ke,{onClick:()=>yt(s,"httpie"),children:"Copy as HTTPie"}),e[11]=s,e[12]=h):h=e[12];let g;return e[13]!==n||e[14]!==a||e[15]!==d||e[16]!==f||e[17]!==p||e[18]!==h?(g=o.jsxs(Et,{className:"",text:n,options:l,children:[a,d,f,p,h]}),e[13]=n,e[14]=a,e[15]=d,e[16]=f,e[17]=p,e[18]=h,e[19]=g):g=e[19],g}function Lu(){return 1}function Pu(t){return t.flows.selected.length===1}const Ou={":red_circle:":"🔴",":orange_circle:":"🟠",":yellow_circle:":"🟡",":green_circle:":"🟢",":large_blue_circle:":"🔵",":purple_circle:":"🟣",":brown_circle:":"🟤"};function Mu(t){const e=k.c(5),{flows:s}=t,i=G();let r,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(pe,{title:"mark flow",icon:"fa-paint-brush text-success",onClick:qu,children:"Mark▾"}),n={placement:"bottom-start"},e[0]=r,e[1]=n):(r=e[0],n=e[1]);let l;return e[2]!==i||e[3]!==s?(l=o.jsxs(Et,{className:"",text:r,options:n,children:[o.jsx(ke,{onClick:()=>i(Kn(s,"")),children:"⚪ (no marker)"}),Object.entries(Ou).map(a=>{const[d,f]=a;return o.jsxs(ke,{onClick:()=>i(Kn(s,d)),children:[f," ",d.replace(/[:_]/g," ")]},d)})]}),e[2]=i,e[3]=s,e[4]=l):l=e[4],l}function qu(){return 1}const li={[xe.Capture]:Xr,[xe.FlowList]:Zr,[xe.Options]:eo,[xe.Flow]:to};function Hu(){const t=k.c(26),e=G(),s=D(Uu),i=D(Vu),[r,n]=I.useState(!1);let l;t[0]!==i.length?(l=[xe.Capture,xe.FlowList,xe.Options],i.length>0&&l.push(xe.Flow),t[0]=i.length,t[1]=l):l=t[1];let a;t[2]!==s||t[3]!==e||t[4]!==i.length||t[5]!==r?(a=()=>{i.length>0&&!r?(e(Vt(xe.Flow)),n(!0)):i.length===0&&(r&&n(!1),s===xe.Flow&&e(Vt(xe.FlowList)))},t[2]=s,t[3]=e,t[4]=i.length,t[5]=r,t[6]=a):a=t[6];let d;t[7]!==s||t[8]!==i||t[9]!==r?(d=[i,r,s],t[7]=s,t[8]=i,t[9]=r,t[10]=d):d=t[10],I.useEffect(a,d);let f;t[11]!==e?(f=function(E,T){T.preventDefault(),e(Vt(E))},t[11]=e,t[12]=f):f=t[12];const p=f,h=li[s];let g;t[13]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(uu,{}),t[13]=g):g=t[13];let _;t[14]!==s||t[15]!==l||t[16]!==p?(_=l.map(N=>o.jsx("a",{href:"#",className:je({active:N===s}),onClick:E=>p(N,E),children:li[N].title},N)),t[14]=s,t[15]=l,t[16]=p,t[17]=_):_=t[17];let j;t[18]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(gt,{children:o.jsx(mu,{})}),t[18]=j):j=t[18];let y;t[19]!==_?(y=o.jsxs("nav",{className:"nav-tabs nav-tabs-lg",children:[g,_,j]}),t[19]=_,t[20]=y):y=t[20];let w;t[21]!==h?(w=o.jsx("div",{children:o.jsx(h,{})}),t[21]=h,t[22]=w):w=t[22];let $;return t[23]!==y||t[24]!==w?($=o.jsxs("header",{children:[y,w]}),t[23]=y,t[24]=w,t[25]=$):$=t[25],$}function Vu(t){return t.flows.selected}function Uu(t){return t.ui.tabs.current}const ds=function(){function t(i,r){function n(){this.constructor=i}n.prototype=r.prototype,i.prototype=new n}function e(i,r,n,l){this.message=i,this.expected=r,this.found=n,this.location=l,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,e)}t(e,Error);function s(i){var r=arguments.length>1?arguments[1]:{},n={},l={Expr:Re},a=Re,d=function(b,S){return[b,...S]},f=function(b){return[b]},p=function(){return""},h={type:"other",description:"string"},g='"',_={type:"literal",value:'"',description:'"\\""'},j=function(b){return b.join("")},y="'",w={type:"literal",value:"'",description:`"'"`},$=/^["\\]/,N={type:"class",value:'["\\\\]',description:'["\\\\]'},E={type:"any",description:"any character"},T=function(b){return b},P="\\",L={type:"literal",value:"\\",description:'"\\\\"'},O=/^['\\]/,M={type:"class",value:"['\\\\]",description:"['\\\\]"},U=/^['"\\]/,V={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},W="n",J={type:"literal",value:"n",description:'"n"'},z=function(){return` +`?(u.seenCR||u.line++,u.column=1,u.seenCR=!1):x==="\r"||x==="\u2028"||x==="\u2029"?(u.line++,u.column=1,u.seenCR=!0):(u.column++,u.seenCR=!1),v++;return Dt[c]=u,u}function xn(c,u){var v=vn(c),x=vn(u);return{start:{offset:c,line:v.line,column:v.column},end:{offset:u,line:x.line,column:x.column}}}function F(c){mqe&&(qe=m,ns=[]),ns.push(c))}function Zo(c,u,v,x){function He(Ie){var Qe=1;for(Ie.sort(function(Pt,rt){return Pt.descriptionrt.description?1:0});Qe1?rt.slice(0,-1).join(", ")+" or "+rt[Ie.length-1]:rt[0],qn=Qe?'"'+Pt(Qe)+'"':"end of input","Expected "+Mn+" but "+qn+" found."}return u!==null&&He(u),new e(Ne(u,v),u,v,x)}function _n(){var c,u,v,x;return R++,c=m,u=ze(),u!==n?(v=is(),v!==n?(x=ze(),x!==n?(u=f(v),c=u):(m=c,c=n)):(m=c,c=n)):(m=c,c=n),R--,c===n&&(u=n,R===0&&F(d)),c}function K(){var c;return R++,h.test(i.charAt(m))?(c=i.charAt(m),m++):(c=n,R===0&&F(g)),R--,c===n&&R===0&&F(p),c}function el(){var c;return R++,j.test(i.charAt(m))?(c=i.charAt(m),m++):(c=n,R===0&&F(y)),R--,c===n&&R===0&&F(_),c}function ze(){var c,u;for(R++,c=[],u=K();u!==n;)c.push(u),u=K();return R--,c===n&&(u=n,R===0&&F(w)),c}function is(){var c,u,v,x,He,Ne;return c=m,u=It(),u!==n?(v=ze(),v!==n?(i.charCodeAt(m)===124?(x=$,m++):(x=n,R===0&&F(N)),x!==n?(He=ze(),He!==n?(Ne=is(),Ne!==n?(u=E(u,Ne),c=u):(m=c,c=n)):(m=c,c=n)):(m=c,c=n)):(m=c,c=n)):(m=c,c=n),c===n&&(c=It()),c}function It(){var c,u,v,x,He,Ne;if(c=m,u=Lt(),u!==n?(v=ze(),v!==n?(i.charCodeAt(m)===38?(x=T,m++):(x=n,R===0&&F(P)),x!==n?(He=ze(),He!==n?(Ne=It(),Ne!==n?(u=L(u,Ne),c=u):(m=c,c=n)):(m=c,c=n)):(m=c,c=n)):(m=c,c=n)):(m=c,c=n),c===n){if(c=m,u=Lt(),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=It(),x!==n?(u=L(u,x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;c===n&&(c=Lt())}return c}function Lt(){var c,u,v,x;return c=m,i.charCodeAt(m)===33?(u=O,m++):(u=n,R===0&&F(M)),u!==n?(v=ze(),v!==n?(x=Lt(),x!==n?(u=U(x),c=u):(m=c,c=n)):(m=c,c=n)):(m=c,c=n),c===n&&(c=tl()),c}function tl(){var c,u,v,x,He,Ne;return c=m,i.charCodeAt(m)===40?(u=V,m++):(u=n,R===0&&F(W)),u!==n?(v=ze(),v!==n?(x=is(),x!==n?(He=ze(),He!==n?(i.charCodeAt(m)===41?(Ne=J,m++):(Ne=n,R===0&&F(z)),Ne!==n?(u=te(x),c=u):(m=c,c=n)):(m=c,c=n)):(m=c,c=n)):(m=c,c=n)):(m=c,c=n),c===n&&(c=sl()),c}function sl(){var c,u,v,x;if(c=m,i.substr(m,4)===Y?(u=Y,m+=4):(u=n,R===0&&F(Q)),u!==n&&(u=X()),c=u,c===n&&(c=m,i.substr(m,2)===Z?(u=Z,m+=2):(u=n,R===0&&F(ae)),u!==n&&(u=le()),c=u,c===n)){if(c=m,i.substr(m,2)===de?(u=de,m+=2):(u=n,R===0&&F(ye)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=Pe(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,3)===Se?(u=Se,m+=3):(u=n,R===0&&F(Ee)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=C(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,3)===he?(u=he,m+=3):(u=n,R===0&&F(B)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=oe(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,2)===q?(u=q,m+=2):(u=n,R===0&&F($e)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=nl(),x!==n?(u=We(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,8)===Oe?(u=Oe,m+=8):(u=n,R===0&&F(ee)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=Me(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,2)===Re?(u=Re,m+=2):(u=n,R===0&&F(re)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=ue(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n&&(c=m,i.substr(m,4)===ge?(u=ge,m+=4):(u=n,R===0&&F(Ae)),u!==n&&(u=nt()),c=u,c===n)){if(c=m,i.substr(m,4)===Je?(u=Je,m+=4):(u=n,R===0&&F(Zt)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=b(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n&&(c=m,i.substr(m,2)===S?(u=S,m+=2):(u=n,R===0&&F(A)),u!==n&&(u=H()),c=u,c===n)){if(c=m,i.substr(m,2)===Tt?(u=Tt,m+=2):(u=n,R===0&&F(es)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=Ce(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,3)===De?(u=De,m+=3):(u=n,R===0&&F(ut)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=Ke(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,3)===vt?(u=vt,m+=3):(u=n,R===0&&F(Rt)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=it(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n&&(c=m,i.substr(m,5)===At?(u=At,m+=5):(u=n,R===0&&F(ft)),u!==n&&(u=Fe()),c=u,c===n&&(c=m,i.substr(m,7)===Us?(u=Us,m+=7):(u=n,R===0&&F(no)),u!==n&&(u=io()),c=u,c===n))){if(c=m,i.substr(m,7)===Bs?(u=Bs,m+=7):(u=n,R===0&&F(ro)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=oo(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,2)===Ws?(u=Ws,m+=2):(u=n,R===0&&F(lo)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=co(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n&&(c=m,i.substr(m,2)===Ks?(u=Ks,m+=2):(u=n,R===0&&F(ao)),u!==n&&(u=uo()),c=u,c===n&&(c=m,i.substr(m,8)===zs?(u=zs,m+=8):(u=n,R===0&&F(fo)),u!==n&&(u=po()),c=u,c===n&&(c=m,i.substr(m,8)===Gs?(u=Gs,m+=8):(u=n,R===0&&F(ho)),u!==n&&(u=mo()),c=u,c===n&&(c=m,i.substr(m,7)===Ys?(u=Ys,m+=7):(u=n,R===0&&F(go)),u!==n&&(u=vo()),c=u,c===n))))){if(c=m,i.substr(m,4)===Js?(u=Js,m+=4):(u=n,R===0&&F(xo)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=_o(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n&&(c=m,i.substr(m,2)===Qs?(u=Qs,m+=2):(u=n,R===0&&F(jo)),u!==n&&(u=yo()),c=u,c===n&&(c=m,i.substr(m,4)===Xs?(u=Xs,m+=4):(u=n,R===0&&F(wo)),u!==n&&(u=bo()),c=u,c===n&&(c=m,i.substr(m,4)===Zs?(u=Zs,m+=4):(u=n,R===0&&F(So)),u!==n&&(u=$o()),c=u,c===n)))){if(c=m,i.substr(m,3)===en?(u=en,m+=3):(u=n,R===0&&F(Co)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=No(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,3)===tn?(u=tn,m+=3):(u=n,R===0&&F(ko)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=Eo(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,2)===sn?(u=sn,m+=2):(u=n,R===0&&F(To)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=Ro(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.substr(m,2)===nn?(u=nn,m+=2):(u=n,R===0&&F(Ao)),u!==n){if(v=[],x=K(),x!==n)for(;x!==n;)v.push(x),x=K();else v=n;v!==n?(x=me(),x!==n?(u=rn(x),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;c===n&&(c=m,i.substr(m,10)===on?(u=on,m+=10):(u=n,R===0&&F(Do)),u!==n&&(u=Fo()),c=u,c===n&&(c=m,u=me(),u!==n&&(u=rn(u)),c=u))}}}}}}}}}}}}}}}}}return c}function nl(){var c,u,v,x;if(R++,c=m,ln.test(i.charAt(m))?(u=i.charAt(m),m++):(u=n,R===0&&F(cn)),u===n&&(u=null),u!==n){if(v=[],an.test(i.charAt(m))?(x=i.charAt(m),m++):(x=n,R===0&&F(dn)),x!==n)for(;x!==n;)v.push(x),an.test(i.charAt(m))?(x=i.charAt(m),m++):(x=n,R===0&&F(dn));else v=n;v!==n?(ln.test(i.charAt(m))?(x=i.charAt(m),m++):(x=n,R===0&&F(cn)),x===n&&(x=null),x!==n?(u=Lo(v),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;return R--,c===n&&(u=n,R===0&&F(Io)),c}function me(){var c,u,v,x;if(R++,c=m,i.charCodeAt(m)===34?(u=un,m++):(u=n,R===0&&F(fn)),u!==n){for(v=[],x=jn();x!==n;)v.push(x),x=jn();v!==n?(i.charCodeAt(m)===34?(x=un,m++):(x=n,R===0&&F(fn)),x!==n?(u=ts(v),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n){if(c=m,i.charCodeAt(m)===39?(u=pn,m++):(u=n,R===0&&F(hn)),u!==n){for(v=[],x=yn();x!==n;)v.push(x),x=yn();v!==n?(i.charCodeAt(m)===39?(x=pn,m++):(x=n,R===0&&F(hn)),x!==n?(u=ts(v),c=u):(m=c,c=n)):(m=c,c=n)}else m=c,c=n;if(c===n)if(c=m,u=m,R++,v=el(),R--,v===n?u=void 0:(m=u,u=n),u!==n){if(v=[],x=wn(),x!==n)for(;x!==n;)v.push(x),x=wn();else v=n;v!==n?(u=ts(v),c=u):(m=c,c=n)}else m=c,c=n}return R--,c===n&&(u=n,R===0&&F(Po)),c}function jn(){var c,u,v;return c=m,u=m,R++,Oo.test(i.charAt(m))?(v=i.charAt(m),m++):(v=n,R===0&&F(Mo)),R--,v===n?u=void 0:(m=u,u=n),u!==n?(i.length>m?(v=i.charAt(m),m++):(v=n,R===0&&F(ss)),v!==n?(u=xt(v),c=u):(m=c,c=n)):(m=c,c=n),c===n&&(c=m,i.charCodeAt(m)===92?(u=mn,m++):(u=n,R===0&&F(gn)),u!==n?(v=bn(),v!==n?(u=xt(v),c=u):(m=c,c=n)):(m=c,c=n)),c}function yn(){var c,u,v;return c=m,u=m,R++,qo.test(i.charAt(m))?(v=i.charAt(m),m++):(v=n,R===0&&F(Ho)),R--,v===n?u=void 0:(m=u,u=n),u!==n?(i.length>m?(v=i.charAt(m),m++):(v=n,R===0&&F(ss)),v!==n?(u=xt(v),c=u):(m=c,c=n)):(m=c,c=n),c===n&&(c=m,i.charCodeAt(m)===92?(u=mn,m++):(u=n,R===0&&F(gn)),u!==n?(v=bn(),v!==n?(u=xt(v),c=u):(m=c,c=n)):(m=c,c=n)),c}function wn(){var c,u,v;return c=m,u=m,R++,v=K(),R--,v===n?u=void 0:(m=u,u=n),u!==n?(i.length>m?(v=i.charAt(m),m++):(v=n,R===0&&F(ss)),v!==n?(u=xt(v),c=u):(m=c,c=n)):(m=c,c=n),c}function bn(){var c,u;return Vo.test(i.charAt(m))?(c=i.charAt(m),m++):(c=n,R===0&&F(Uo)),c===n&&(c=m,i.charCodeAt(m)===110?(u=Bo,m++):(u=n,R===0&&F(Wo)),u!==n&&(u=Ko()),c=u,c===n&&(c=m,i.charCodeAt(m)===114?(u=zo,m++):(u=n,R===0&&F(Go)),u!==n&&(u=Yo()),c=u,c===n&&(c=m,i.charCodeAt(m)===116?(u=Jo,m++):(u=n,R===0&&F(Qo)),u!==n&&(u=Xo()),c=u))),c}function il(c,u){function v(){return c.apply(this,arguments)||u.apply(this,arguments)}return v.desc=c.desc+" or "+u.desc,v}function rl(c,u){function v(){return c.apply(this,arguments)&&u.apply(this,arguments)}return v.desc=c.desc+" and "+u.desc,v}function ol(c){function u(){return!c.apply(this,arguments)}return u.desc="not "+c.desc,u}function ll(c){function u(){return c.apply(this,arguments)}return u.desc="("+c.desc+")",u}function Sn(c){return!0}Sn.desc="all flows";var $n=[new RegExp("text/javascript"),new RegExp("application/x-javascript"),new RegExp("application/javascript"),new RegExp("text/css"),new RegExp("image/.*"),new RegExp("font/.*"),new RegExp("application/font.*")];function Cn(c){if(c.response){for(var u=mt.getContentType(c.response),v=$n.length;v--;)if($n[v].test(u))return!0}return!1}Cn.desc="is asset";function cl(c){c=new RegExp(c,"i");function u(v){return!0}return u.desc="body matches "+c,u}function al(c){c=new RegExp(c,"i");function u(v){return!0}return u.desc="body request matches "+c,u}function dl(c){c=new RegExp(c,"i");function u(v){return!0}return u.desc="body response matches "+c,u}function ul(c){function u(v){return v.response&&v.response.status_code===c}return u.desc="resp. code is "+c,u}function fl(c){c=new RegExp(c,"i");function u(v){return c.test(v.comment)}return u.desc="comment matches "+c,u}function pl(c){c=new RegExp(c,"i");function u(v){return v.request&&(c.test(v.request.host)||c.test(v.request.pretty_host))}return u.desc="domain matches "+c,u}function Nn(c){return c.type==="dns"}Nn.desc="is a DNS Flow";function hl(c){c=new RegExp(c,"i");function u(v){return!!v.server_conn.address&&c.test(v.server_conn.address[0]+":"+v.server_conn.address[1])}return u.desc="destination address matches "+c,u}function kn(c){return!!c.error}kn.desc="has error";function ml(c){c=new RegExp(c,"i");function u(v){return v.request&&ct.match_header(v.request,c)||v.response&&mt.match_header(v.response,c)}return u.desc="header matches "+c,u}function gl(c){c=new RegExp(c,"i");function u(v){return v.request&&ct.match_header(v.request,c)}return u.desc="req. header matches "+c,u}function vl(c){c=new RegExp(c,"i");function u(v){return v.response&&mt.match_header(v.response,c)}return u.desc="resp. header matches "+c,u}function En(c){return c.type==="http"}En.desc="is an HTTP Flow";function Tn(c){return c.marked}Tn.desc="is marked";function xl(c){c=new RegExp(c,"i");function u(v){return c.test(v.marked)}return u.desc="marker matches "+c,u}function _l(c){c=new RegExp(c,"i");function u(v){return v.request&&c.test(v.request.method)}return u.desc="method matches "+c,u}function Rn(c){return c.request&&!c.response}Rn.desc="has no response";function An(c){return c.is_replay==="request"}An.desc="request has been replayed";function Dn(c){return c.is_replay==="response"}Dn.desc="response has been replayed";function Fn(c){return!!c.is_replay}Fn.desc="flow has been replayed";function jl(c){c=new RegExp(c,"i");function u(v){return!!v.client_conn.peername&&c.test(v.client_conn.peername[0]+":"+v.client_conn.peername[1])}return u.desc="source address matches "+c,u}function In(c){return!!c.response}In.desc="has response";function Ln(c){return c.type==="tcp"}Ln.desc="is a TCP Flow";function Pn(c){return c.type==="udp"}Pn.desc="is a UDP Flow";function yl(c){c=new RegExp(c,"i");function u(v){return v.request&&c.test(ct.getContentType(v.request))}return u.desc="req. content type matches "+c,u}function wl(c){c=new RegExp(c,"i");function u(v){return v.response&&c.test(mt.getContentType(v.response))}return u.desc="resp. content type matches "+c,u}function bl(c){c=new RegExp(c,"i");function u(v){return v.request&&c.test(ct.getContentType(v.request))||v.response&&c.test(mt.getContentType(v.response))}return u.desc="content type matches "+c,u}function Sl(c){c=new RegExp(c,"i");function u(v){if(v.type==="dns"){const x=v.request?.questions[0];return x&&c.test(x.name)}return v.request&&c.test(ct.pretty_url(v.request))}return u.desc="url matches "+c,u}function On(c){return!!c.websocket}if(On.desc="is a Websocket Flow",Ft=a(),Ft!==n&&m===i.length)return Ft;throw Ft!==n&&me.json()),Ye.xhr.catch(()=>{Ye.xhr=null})),this.state.doc||Ye.xhr.then(e=>{Ye.doc=e,this.setState({doc:e})})}render(){const{doc:e}=this.state;return e?o.jsx("table",{className:"table table-condensed",children:o.jsxs("tbody",{children:[e.commands.map(s=>o.jsxs("tr",{onClick:()=>this.props.selectHandler(s[0].split(" ")[0]+" "),children:[o.jsx("td",{children:s[0].replace(" "," ")}),o.jsx("td",{children:s[1]})]},s[1])),o.jsx("tr",{children:o.jsx("td",{colSpan:2,children:o.jsxs("a",{href:"https://mitmproxy.org/docs/latest/concepts-filters/",target:"_blank",rel:"noreferrer",children:[o.jsx("i",{className:"fa fa-external-link"}),"  mitmproxy docs"]})})},"docs-link")]})}):o.jsx("i",{className:"fa fa-spinner fa-spin"})}}var Xt=(t=>(t.SEARCH="search",t.HIGHLIGHT="tag",t.INTERCEPT="pause",t))(Xt||{});class Hs extends I.Component{inputRef=Te.createRef();constructor(e,s){super(e,s),this.state={value:this.props.value,focus:!1,mousefocus:!1},this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.selectFilter=this.selectFilter.bind(this)}UNSAFE_componentWillReceiveProps(e){this.setState({value:e.value})}isValid(e){try{return e&&oi.parse(e),!0}catch{return!1}}getDesc(){if(!this.state.value)return o.jsx(Ye,{selectHandler:this.selectFilter});try{return oi.parse(this.state.value).desc}catch(e){return""+e}}onChange(e){const s=e.target.value;this.setState({value:s}),this.isValid(s)&&this.props.onChange(s)}onFocus(){this.setState({focus:!0})}onBlur(){this.setState({focus:!1})}onMouseEnter(){this.setState({mousefocus:!0})}onMouseLeave(){this.setState({mousefocus:!1})}onKeyDown(e){(e.key==="Escape"||e.key==="Enter")&&(this.blur(),this.setState({mousefocus:!1})),e.stopPropagation()}selectFilter(e){this.setState({value:e}),this.inputRef.current?.focus(),this.isValid(e)&&this.props.onChange(e)}blur(){this.inputRef.current?.blur()}select(){this.inputRef.current?.select()}render(){const{icon:e,color:s,placeholder:i}=this.props,{value:r,focus:n,mousefocus:l}=this.state;return o.jsxs("div",{className:je("filter-input input-group",{"has-error":!this.isValid(r)}),children:[o.jsx("span",{className:"input-group-addon",children:o.jsx("i",{className:"fa fa-fw fa-"+e,style:{color:s}})}),o.jsx("input",{type:"text",ref:this.inputRef,placeholder:i,className:"form-control",value:r,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown}),(n||l)&&o.jsxs("div",{className:"popover bottom",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,children:[o.jsx("div",{className:"arrow"}),o.jsx("div",{className:"popover-content",children:this.getDesc()})]})]})}}Zr.title="Flow List";function Zr(){const t=k.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsxs("div",{className:"menu-group",children:[o.jsxs("div",{className:"menu-content",children:[o.jsx(ju,{}),o.jsx(wu,{})]}),o.jsx("div",{className:"menu-legend",children:"Find"})]}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsxs("div",{className:"main-menu",children:[e,o.jsxs("div",{className:"menu-group",children:[o.jsxs("div",{className:"menu-content",children:[o.jsx(xu,{}),o.jsx(Su,{})]}),o.jsx("div",{className:"menu-legend",children:"Intercept"})]})]}),t[1]=s):s=t[1],s}function xu(){const t=k.c(5),e=G(),i=D(_u)||"";let r;t[0]!==e?(r=l=>e(Cs("intercept",l)),t[0]=e,t[1]=r):r=t[1];let n;return t[2]!==i||t[3]!==r?(n=o.jsx(Hs,{value:i,placeholder:"Intercept",icon:Xt.INTERCEPT,color:"hsl(208, 56%, 53%)",onChange:r}),t[2]=i,t[3]=r,t[4]=n):n=t[4],n}function _u(t){return t.options.intercept}function ju(){const t=k.c(5),e=G(),s=D(yu);let i;t[0]!==e?(i=n=>e(Ri(n)),t[0]=e,t[1]=i):i=t[1];let r;return t[2]!==i||t[3]!==s?(r=o.jsx(Hs,{value:s,placeholder:"Search",icon:Xt.SEARCH,color:"black",onChange:i}),t[2]=i,t[3]=s,t[4]=r):r=t[4],r}function yu(t){return t.ui.filter[ve.Search]}function wu(){const t=k.c(5),e=G(),s=D(bu);let i;t[0]!==e?(i=n=>e(Ai(n)),t[0]=e,t[1]=i):i=t[1];let r;return t[2]!==i||t[3]!==s?(r=o.jsx(Hs,{value:s,placeholder:"Highlight",icon:Xt.HIGHLIGHT,color:"hsl(48, 100%, 50%)",onChange:i}),t[2]=i,t[3]=s,t[4]=r):r=t[4],r}function bu(t){return t.ui.filter[ve.Highlight]}function Su(){const t=k.c(2),e=G();let s;return t[0]!==e?(s=o.jsx(pe,{className:"btn-sm",title:"[a]ccept all",icon:"fa-forward text-success",onClick:()=>e(Di()),children:"Resume All"}),t[0]=e,t[1]=s):s=t[1],s}function Vs(t){const e=k.c(6),{value:s,onChange:i,children:r}=t;let n;e[0]!==i||e[1]!==s?(n=o.jsx("input",{type:"checkbox",checked:s,onChange:i}),e[0]=i,e[1]=s,e[2]=n):n=e[2];let l;return e[3]!==r||e[4]!==n?(l=o.jsx("div",{className:"menu-entry",children:o.jsxs("label",{children:[n,r]})}),e[3]=r,e[4]=n,e[5]=l):l=e[5],l}function cs(t){const e=k.c(10),{name:s,children:i}=t,r=G();let n;e[0]!==s?(n=p=>p.options[s],e[0]=s,e[1]=n):n=e[1];const l=D(n),a=!!l;let d;e[2]!==r||e[3]!==s||e[4]!==l?(d=()=>r(Cs(s,!l)),e[2]=r,e[3]=s,e[4]=l,e[5]=d):d=e[5];let f;return e[6]!==i||e[7]!==a||e[8]!==d?(f=o.jsx(Vs,{value:a,onChange:d,children:i}),e[6]=i,e[7]=a,e[8]=d,e[9]=f):f=e[9],f}function $u(){const t=k.c(5),e=G(),s=D(Cu);let i;t[0]!==e?(i=()=>e(Gt()),t[0]=e,t[1]=i):i=t[1];let r;return t[2]!==i||t[3]!==s?(r=o.jsx(Vs,{value:s,onChange:i,children:"Display Event Log"}),t[2]=i,t[3]=s,t[4]=r):r=t[4],r}function Cu(t){return t.eventLog.visible}function Nu(){const t=k.c(5),e=G(),s=D(ku);let i;t[0]!==e?(i=()=>e(Ji()),t[0]=e,t[1]=i):i=t[1];let r;return t[2]!==i||t[3]!==s?(r=o.jsx(Vs,{value:s,onChange:i,children:"Display Command Bar"}),t[2]=i,t[3]=s,t[4]=r):r=t[4],r}function ku(t){return t.commandBar.visible}function as(t){const e=k.c(5),{children:s,resource:i}=t,r=`https://docs.mitmproxy.org/stable/${i}`;let n;e[0]!==s?(n=s||o.jsx("i",{className:"fa fa-question-circle"}),e[0]=s,e[1]=n):n=e[1];let l;return e[2]!==n||e[3]!==r?(l=o.jsx("a",{target:"_blank",href:r,rel:"noreferrer",children:n}),e[2]=n,e[3]=r,e[4]=l):l=e[4],l}eo.title="Options";function eo(){const t=k.c(16),e=G(),s=Eu;let i;t[0]!==e?(i=()=>e(s()),t[0]=e,t[1]=i):i=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("sup",{children:"alpha"}),t[2]=r):r=t[2];let n;t[3]!==i?(n=o.jsx("div",{className:"menu-content",children:o.jsxs(pe,{title:"Open Options",icon:"fa-cogs text-primary",onClick:i,children:["Edit Options ",r]})}),t[3]=i,t[4]=n):n=t[4];let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"menu-legend",children:"Options Editor"}),t[5]=l):l=t[5];let a;t[6]!==n?(a=o.jsxs("div",{className:"menu-group",children:[n,l]}),t[6]=n,t[7]=a):a=t[7];let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsxs(cs,{name:"anticache",children:["Strip cache headers"," ",o.jsx(as,{resource:"overview/features/#anticache"})]}),t[8]=d):d=t[8];let f;t[9]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsxs(cs,{name:"showhost",children:["Use host header for display"," ",o.jsx(as,{resource:"concepts/options/#showhost"})]}),t[9]=f):f=t[9];let p;t[10]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs("div",{className:"menu-group",children:[o.jsxs("div",{className:"menu-content",children:[d,f,o.jsxs(cs,{name:"ssl_insecure",children:["Don't verify server certificates"," ",o.jsx(as,{resource:"concepts/options/#ssl_insecure"})]})]}),o.jsx("div",{className:"menu-legend",children:"Quick Options"})]}),t[10]=p):p=t[10];let h;t[11]!==a?(h=o.jsxs(gt,{children:[a,p]}),t[11]=a,t[12]=h):h=t[12];let g;t[13]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsxs("div",{className:"menu-group",children:[o.jsxs("div",{className:"menu-content",children:[o.jsx($u,{}),o.jsx(Nu,{})]}),o.jsx("div",{className:"menu-legend",children:"View Options"})]}),t[13]=g):g=t[13];let _;return t[14]!==h?(_=o.jsxs("div",{children:[h,g]}),t[14]=h,t[15]=_):_=t[15],_}function Eu(){return dc("OptionModal")}const yt=async(t,e)=>{const s=(async()=>{const i=await Bt("export",e,`@${t.id}`);if(i.value)return i.value;throw i.error?i.error:i})();try{await gi(s)}catch(i){alert(i)}};to.title="Flow";function to(){const t=k.c(63),e=G(),s=D(Tu),i=s[0];let r;t[0]!==s?(r=s.some(_s),t[0]=s,t[1]=r):r=t[1];const n=r;if(s.length===0){let X;return t[2]===Symbol.for("react.memo_cache_sentinel")?(X=o.jsx("div",{}),t[2]=X):X=t[2],X}let l;t[3]!==e||t[4]!==s?(l=()=>e(ws(s)),t[3]=e,t[4]=s,t[5]=l):l=t[5];let a;t[6]!==s?(a=s.some(xs),t[6]=s,t[7]=a):a=t[7];const d=!a;let f;t[8]!==l||t[9]!==d?(f=o.jsx(pe,{title:"[r]eplay flow",icon:"fa-repeat text-primary",onClick:l,disabled:d,children:"Replay"}),t[8]=l,t[9]=d,t[10]=f):f=t[10];let p;t[11]!==e||t[12]!==s?(p=o.jsx(pe,{title:"[D]uplicate flow",icon:"fa-copy text-info",onClick:()=>e(Li(s)),children:"Duplicate"}),t[11]=e,t[12]=s,t[13]=p):p=t[13];let h;t[14]!==s?(h=s.some(bi),t[14]=s,t[15]=h):h=t[15];const g=!h;let _;t[16]!==e||t[17]!==s?(_=()=>e(Pi(s)),t[16]=e,t[17]=s,t[18]=_):_=t[18];let j;t[19]!==g||t[20]!==_?(j=o.jsx(pe,{disabled:g,title:"revert changes to flow [V]",icon:"fa-history text-warning",onClick:_,children:"Revert"}),t[19]=g,t[20]=_,t[21]=j):j=t[21];let y;t[22]!==e||t[23]!==s?(y=o.jsx(pe,{title:"[d]elete flow",icon:"fa-trash text-danger",onClick:()=>{e(Ii(s))},children:"Delete"}),t[22]=e,t[23]=s,t[24]=y):y=t[24];let w;t[25]!==s?(w=o.jsx(Mu,{flows:s}),t[25]=s,t[26]=w):w=t[26];let $;t[27]!==y||t[28]!==w||t[29]!==f||t[30]!==p||t[31]!==j?($=o.jsxs("div",{className:"menu-content",children:[f,p,j,y,w]}),t[27]=y,t[28]=w,t[29]=f,t[30]=p,t[31]=j,t[32]=$):$=t[32];let N;t[33]===Symbol.for("react.memo_cache_sentinel")?(N=o.jsx("div",{className:"menu-legend",children:"Flow Modification"}),t[33]=N):N=t[33];let E;t[34]!==$?(E=o.jsx(gt,{children:o.jsxs("div",{className:"menu-group",children:[$,N]})}),t[34]=$,t[35]=E):E=t[35];let T;t[36]!==i?(T=o.jsxs("div",{className:"menu-content",children:[o.jsx(Ru,{flow:i}),o.jsx(Iu,{flow:i})]}),t[36]=i,t[37]=T):T=t[37];let P;t[38]===Symbol.for("react.memo_cache_sentinel")?(P=o.jsx("div",{className:"menu-legend",children:"Export"}),t[38]=P):P=t[38];let L;t[39]!==T?(L=o.jsxs("div",{className:"menu-group",children:[T,P]}),t[39]=T,t[40]=L):L=t[40];const O=!n;let M;t[41]!==e||t[42]!==s?(M=()=>e(ys(s)),t[41]=e,t[42]=s,t[43]=M):M=t[43];let U;t[44]!==O||t[45]!==M?(U=o.jsx(pe,{disabled:O,title:"[a]ccept intercepted flow",icon:"fa-play text-success",onClick:M,children:"Resume"}),t[44]=O,t[45]=M,t[46]=U):U=t[46];const V=!n;let W;t[47]!==e||t[48]!==s?(W=()=>e(Fi(s)),t[47]=e,t[48]=s,t[49]=W):W=t[49];let J;t[50]!==V||t[51]!==W?(J=o.jsx(pe,{disabled:V,title:"kill intercepted flow [x]",icon:"fa-times text-danger",onClick:W,children:"Abort"}),t[50]=V,t[51]=W,t[52]=J):J=t[52];let z;t[53]!==U||t[54]!==J?(z=o.jsxs("div",{className:"menu-content",children:[U,J]}),t[53]=U,t[54]=J,t[55]=z):z=t[55];let te;t[56]===Symbol.for("react.memo_cache_sentinel")?(te=o.jsx("div",{className:"menu-legend",children:"Interception"}),t[56]=te):te=t[56];let Y;t[57]!==z?(Y=o.jsx(gt,{children:o.jsxs("div",{className:"menu-group",children:[z,te]})}),t[57]=z,t[58]=Y):Y=t[58];let Q;return t[59]!==E||t[60]!==L||t[61]!==Y?(Q=o.jsxs("div",{className:"flow-menu",children:[E,L,Y]}),t[59]=E,t[60]=L,t[61]=Y,t[62]=Q):Q=t[62],Q}function Tu(t){return t.flows.selected}const qt=t=>{const e=window.open(t,"_blank","noopener,noreferrer");e&&(e.opener=null)};function Ru(t){const e=k.c(24),{flow:s}=t,i=D(Fu);if(s.type!=="http"){let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(pe,{icon:"fa-download",onClick:Du,disabled:!0,children:"Download"}),e[0]=r):r=e[0],r}if(s.request.contentLength&&!s.response?.contentLength){let r;e[1]!==s?(r=()=>qt(we.getContentURL(s,s.request)),e[1]=s,e[2]=r):r=e[2];const n=!i;let l;return e[3]!==r||e[4]!==n?(l=o.jsx(pe,{icon:"fa-download",onClick:r,disabled:n,children:"Download"}),e[3]=r,e[4]=n,e[5]=l):l=e[5],l}if(s.response){const r=s.response;if(!s.request.contentLength&&s.response.contentLength){let n;e[6]!==s||e[7]!==r?(n=()=>qt(we.getContentURL(s,r)),e[6]=s,e[7]=r,e[8]=n):n=e[8];const l=!i;let a;return e[9]!==n||e[10]!==l?(a=o.jsx(pe,{icon:"fa-download",onClick:n,disabled:l,children:"Download"}),e[9]=n,e[10]=l,e[11]=a):a=e[11],a}if(s.request.contentLength&&s.response.contentLength){const n=!i;let l;e[12]!==n?(l=o.jsx(pe,{icon:"fa-download",onClick:Au,disabled:n,children:"Download▾"}),e[12]=n,e[13]=l):l=e[13];let a;e[14]===Symbol.for("react.memo_cache_sentinel")?(a={placement:"bottom-start"},e[14]=a):a=e[14];let d;e[15]!==s?(d=o.jsx(ke,{onClick:()=>qt(we.getContentURL(s,s.request)),children:"Download request"}),e[15]=s,e[16]=d):d=e[16];let f;e[17]!==s||e[18]!==r?(f=o.jsx(ke,{onClick:()=>qt(we.getContentURL(s,r)),children:"Download response"}),e[17]=s,e[18]=r,e[19]=f):f=e[19];let p;return e[20]!==l||e[21]!==d||e[22]!==f?(p=o.jsxs(Et,{text:l,options:a,children:[d,f]}),e[20]=l,e[21]=d,e[22]=f,e[23]=p):p=e[23],p}}return null}function Au(){return 1}function Du(){return 0}function Fu(t){return t.flows.selected.length===1}function Iu(t){const e=k.c(20),{flow:s}=t,i=D(Pu),r=s.type!=="http"||!i;let n;e[0]!==r?(n=o.jsx(pe,{title:"Export flow.",icon:"fa-clone",onClick:Lu,disabled:r,children:"Export▾"}),e[0]=r,e[1]=n):n=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l={placement:"bottom-start"},e[2]=l):l=e[2];let a;e[3]!==s?(a=o.jsx(ke,{onClick:()=>yt(s,"raw_request"),children:"Copy raw request"}),e[3]=s,e[4]=a):a=e[4];let d;e[5]!==s?(d=o.jsx(ke,{onClick:()=>yt(s,"raw_response"),children:"Copy raw response"}),e[5]=s,e[6]=d):d=e[6];let f;e[7]!==s?(f=o.jsx(ke,{onClick:()=>yt(s,"raw"),children:"Copy raw request and response"}),e[7]=s,e[8]=f):f=e[8];let p;e[9]!==s?(p=o.jsx(ke,{onClick:()=>yt(s,"curl"),children:"Copy as cURL"}),e[9]=s,e[10]=p):p=e[10];let h;e[11]!==s?(h=o.jsx(ke,{onClick:()=>yt(s,"httpie"),children:"Copy as HTTPie"}),e[11]=s,e[12]=h):h=e[12];let g;return e[13]!==n||e[14]!==a||e[15]!==d||e[16]!==f||e[17]!==p||e[18]!==h?(g=o.jsxs(Et,{className:"",text:n,options:l,children:[a,d,f,p,h]}),e[13]=n,e[14]=a,e[15]=d,e[16]=f,e[17]=p,e[18]=h,e[19]=g):g=e[19],g}function Lu(){return 1}function Pu(t){return t.flows.selected.length===1}const Ou={":red_circle:":"🔴",":orange_circle:":"🟠",":yellow_circle:":"🟡",":green_circle:":"🟢",":large_blue_circle:":"🔵",":purple_circle:":"🟣",":brown_circle:":"🟤"};function Mu(t){const e=k.c(5),{flows:s}=t,i=G();let r,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(pe,{title:"mark flow",icon:"fa-paint-brush text-success",onClick:qu,children:"Mark▾"}),n={placement:"bottom-start"},e[0]=r,e[1]=n):(r=e[0],n=e[1]);let l;return e[2]!==i||e[3]!==s?(l=o.jsxs(Et,{className:"",text:r,options:n,children:[o.jsx(ke,{onClick:()=>i(Kn(s,"")),children:"⚪ (no marker)"}),Object.entries(Ou).map(a=>{const[d,f]=a;return o.jsxs(ke,{onClick:()=>i(Kn(s,d)),children:[f," ",d.replace(/[:_]/g," ")]},d)})]}),e[2]=i,e[3]=s,e[4]=l):l=e[4],l}function qu(){return 1}const li={[xe.Capture]:Xr,[xe.FlowList]:Zr,[xe.Options]:eo,[xe.Flow]:to};function Hu(){const t=k.c(26),e=G(),s=D(Uu),i=D(Vu),[r,n]=I.useState(!1);let l;t[0]!==i.length?(l=[xe.Capture,xe.FlowList,xe.Options],i.length>0&&l.push(xe.Flow),t[0]=i.length,t[1]=l):l=t[1];let a;t[2]!==s||t[3]!==e||t[4]!==i.length||t[5]!==r?(a=()=>{i.length>0&&!r?(e(Vt(xe.Flow)),n(!0)):i.length===0&&(r&&n(!1),s===xe.Flow&&e(Vt(xe.FlowList)))},t[2]=s,t[3]=e,t[4]=i.length,t[5]=r,t[6]=a):a=t[6];let d;t[7]!==s||t[8]!==i||t[9]!==r?(d=[i,r,s],t[7]=s,t[8]=i,t[9]=r,t[10]=d):d=t[10],I.useEffect(a,d);let f;t[11]!==e?(f=function(E,T){T.preventDefault(),e(Vt(E))},t[11]=e,t[12]=f):f=t[12];const p=f,h=li[s];let g;t[13]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(uu,{}),t[13]=g):g=t[13];let _;t[14]!==s||t[15]!==l||t[16]!==p?(_=l.map(N=>o.jsx("a",{href:"#",className:je({active:N===s}),onClick:E=>p(N,E),children:li[N].title},N)),t[14]=s,t[15]=l,t[16]=p,t[17]=_):_=t[17];let j;t[18]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(gt,{children:o.jsx(mu,{})}),t[18]=j):j=t[18];let y;t[19]!==_?(y=o.jsxs("nav",{className:"nav-tabs nav-tabs-lg",children:[g,_,j]}),t[19]=_,t[20]=y):y=t[20];let w;t[21]!==h?(w=o.jsx("div",{children:o.jsx(h,{})}),t[21]=h,t[22]=w):w=t[22];let $;return t[23]!==y||t[24]!==w?($=o.jsxs("header",{children:[y,w]}),t[23]=y,t[24]=w,t[25]=$):$=t[25],$}function Vu(t){return t.flows.selected}function Uu(t){return t.ui.tabs.current}const ds=(function(){function t(i,r){function n(){this.constructor=i}n.prototype=r.prototype,i.prototype=new n}function e(i,r,n,l){this.message=i,this.expected=r,this.found=n,this.location=l,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,e)}t(e,Error);function s(i){var r=arguments.length>1?arguments[1]:{},n={},l={Expr:Re},a=Re,d=function(b,S){return[b,...S]},f=function(b){return[b]},p=function(){return""},h={type:"other",description:"string"},g='"',_={type:"literal",value:'"',description:'"\\""'},j=function(b){return b.join("")},y="'",w={type:"literal",value:"'",description:`"'"`},$=/^["\\]/,N={type:"class",value:'["\\\\]',description:'["\\\\]'},E={type:"any",description:"any character"},T=function(b){return b},P="\\",L={type:"literal",value:"\\",description:'"\\\\"'},O=/^['\\]/,M={type:"class",value:"['\\\\]",description:"['\\\\]"},U=/^['"\\]/,V={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},W="n",J={type:"literal",value:"n",description:'"n"'},z=function(){return` `},te="r",Y={type:"literal",value:"r",description:'"r"'},Q=function(){return"\r"},X="t",Z={type:"literal",value:"t",description:'"t"'},ae=function(){return" "},le={type:"other",description:"whitespace"},de=/^[ \t\n\r]/,ye={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},Pe={type:"other",description:"control character"},Se=/^[|&!()~"]/,Ee={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},C=0,he=[{line:1,column:1,seenCR:!1}],B=0,oe=[],q=0,$e;if("startRule"in r){if(!(r.startRule in l))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');a=l[r.startRule]}function We(b){var S=he[b],A,H;if(S)return S;for(A=b-1;!he[A];)A--;for(S=he[A],S={line:S.line,column:S.column,seenCR:S.seenCR};AB&&(B=C,oe=[]),oe.push(b))}function Me(b,S,A,H){function Tt(Ce){var De=1;for(Ce.sort(function(ut,Ke){return ut.descriptionKe.description?1:0});De1?Ke.slice(0,-1).join(", ")+" or "+Ke[Ce.length-1]:Ke[0],Rt=De?'"'+ut(De)+'"':"end of input","Expected "+vt+" but "+Rt+" found."}return S!==null&&Tt(S),new e(es(S,A),S,A,H)}function Re(){var b,S,A,H;if(b=C,S=re(),S!==n){if(A=[],H=Je(),H!==n)for(;H!==n;)A.push(H),H=Je();else A=n;A!==n?(H=Re(),H!==n?(S=d(S,H),b=S):(C=b,b=n)):(C=b,b=n)}else C=b,b=n;if(b===n&&(b=C,S=re(),S!==n&&(S=f(S)),b=S,b===n)){for(b=C,S=[],A=Je();A!==n;)S.push(A),A=Je();S!==n&&(S=p()),b=S}return b}function re(){var b,S,A,H;if(q++,b=C,i.charCodeAt(C)===34?(S=g,C++):(S=n,q===0&&ee(_)),S!==n){for(A=[],H=ue();H!==n;)A.push(H),H=ue();A!==n?(i.charCodeAt(C)===34?(H=g,C++):(H=n,q===0&&ee(_)),H!==n?(S=j(A),b=S):(C=b,b=n)):(C=b,b=n)}else C=b,b=n;if(b===n){if(b=C,i.charCodeAt(C)===39?(S=y,C++):(S=n,q===0&&ee(w)),S!==n){for(A=[],H=ge();H!==n;)A.push(H),H=ge();A!==n?(i.charCodeAt(C)===39?(H=y,C++):(H=n,q===0&&ee(w)),H!==n?(S=j(A),b=S):(C=b,b=n)):(C=b,b=n)}else C=b,b=n;if(b===n){if(b=C,S=C,q++,A=Zt(),q--,A===n?S=void 0:(C=S,S=n),S!==n){if(A=[],H=Ae(),H!==n)for(;H!==n;)A.push(H),H=Ae();else A=n;A!==n?(S=j(A),b=S):(C=b,b=n)}else C=b,b=n;if(b===n){if(b=C,i.charCodeAt(C)===34?(S=g,C++):(S=n,q===0&&ee(_)),S!==n){for(A=[],H=ue();H!==n;)A.push(H),H=ue();A!==n?(S=j(A),b=S):(C=b,b=n)}else C=b,b=n;if(b===n)if(b=C,i.charCodeAt(C)===39?(S=y,C++):(S=n,q===0&&ee(w)),S!==n){for(A=[],H=ge();H!==n;)A.push(H),H=ge();A!==n?(S=j(A),b=S):(C=b,b=n)}else C=b,b=n}}}return q--,b===n&&(S=n,q===0&&ee(h)),b}function ue(){var b,S,A;return b=C,S=C,q++,$.test(i.charAt(C))?(A=i.charAt(C),C++):(A=n,q===0&&ee(N)),q--,A===n?S=void 0:(C=S,S=n),S!==n?(i.length>C?(A=i.charAt(C),C++):(A=n,q===0&&ee(E)),A!==n?(S=T(A),b=S):(C=b,b=n)):(C=b,b=n),b===n&&(b=C,i.charCodeAt(C)===92?(S=P,C++):(S=n,q===0&&ee(L)),S!==n?(A=nt(),A!==n?(S=T(A),b=S):(C=b,b=n)):(C=b,b=n)),b}function ge(){var b,S,A;return b=C,S=C,q++,O.test(i.charAt(C))?(A=i.charAt(C),C++):(A=n,q===0&&ee(M)),q--,A===n?S=void 0:(C=S,S=n),S!==n?(i.length>C?(A=i.charAt(C),C++):(A=n,q===0&&ee(E)),A!==n?(S=T(A),b=S):(C=b,b=n)):(C=b,b=n),b===n&&(b=C,i.charCodeAt(C)===92?(S=P,C++):(S=n,q===0&&ee(L)),S!==n?(A=nt(),A!==n?(S=T(A),b=S):(C=b,b=n)):(C=b,b=n)),b}function Ae(){var b,S,A;return b=C,S=C,q++,A=Je(),q--,A===n?S=void 0:(C=S,S=n),S!==n?(i.length>C?(A=i.charAt(C),C++):(A=n,q===0&&ee(E)),A!==n?(S=T(A),b=S):(C=b,b=n)):(C=b,b=n),b}function nt(){var b,S;return U.test(i.charAt(C))?(b=i.charAt(C),C++):(b=n,q===0&&ee(V)),b===n&&(b=C,i.charCodeAt(C)===110?(S=W,C++):(S=n,q===0&&ee(J)),S!==n&&(S=z()),b=S,b===n&&(b=C,i.charCodeAt(C)===114?(S=te,C++):(S=n,q===0&&ee(Y)),S!==n&&(S=Q()),b=S,b===n&&(b=C,i.charCodeAt(C)===116?(S=X,C++):(S=n,q===0&&ee(Z)),S!==n&&(S=ae()),b=S))),b}function Je(){var b;return q++,de.test(i.charAt(C))?(b=i.charAt(C),C++):(b=n,q===0&&ee(ye)),q--,b===n&&q===0&&ee(le),b}function Zt(){var b;return q++,Se.test(i.charAt(C))?(b=i.charAt(C),C++):(b=n,q===0&&ee(Ee)),q--,b===n&&q===0&&ee(Pe),b}if($e=a(),$e!==n&&C===i.length)return $e;throw $e!==n&&C{i&&i.current.addEventListener("DOMNodeInserted",Ku)},n=[],e[0]=r,e[1]=n):(r=e[0],n=e[1]),I.useEffect(r,n);let l;e[2]!==s?(l=s.map(Wu),e[2]=s,e[3]=l):l=e[3];let a;return e[4]!==l?(a=o.jsx("div",{className:"command-result",ref:i,children:l}),e[4]=l,e[5]=a):a=e[5],a}function Wu(t,e){return o.jsxs("div",{children:[o.jsx("div",{children:o.jsxs("strong",{children:["$ ",t.command]})}),t.result]},e)}function Ku(t){const e=t.currentTarget;e.scroll({top:e.scrollHeight,behavior:"auto"})}function zu(t){const e=k.c(20),{nextArgs:s,currentArg:i,help:r,description:n,availableCommands:l}=t;let a;if(e[0]!==i||e[1]!==s){a=[];for(let w=0;w0&&o.jsxs("div",{children:[o.jsx("strong",{children:"Argument suggestion:"})," ",a]}),e[4]=a,e[5]=f):f=e[5];let p;e[6]!==r?(p=r?.includes("->")&&o.jsxs("div",{children:[o.jsx("strong",{children:"Signature help: "}),r]}),e[6]=r,e[7]=p):p=e[7];let h;e[8]!==n?(h=n&&o.jsxs("div",{children:["# ",n]}),e[8]=n,e[9]=h):h=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx("strong",{children:"Available Commands: "}),e[10]=g):g=e[10];let _;e[11]!==l?(_=JSON.stringify(l),e[11]=l,e[12]=_):_=e[12];let j;e[13]!==_?(j=o.jsxs("div",{children:[g,o.jsx("p",{className:"available-commands",children:_})]}),e[13]=_,e[14]=j):j=e[14];let y;return e[15]!==f||e[16]!==p||e[17]!==h||e[18]!==j?(y=o.jsxs("div",{className:"argument-suggestion popover top",children:[d,o.jsxs("div",{className:"popover-content",children:[f,p,h,j]})]}),e[15]=f,e[16]=p,e[17]=h,e[18]=j,e[19]=y):y=e[19],y}function Gu(){const t=k.c(45),[e,s]=I.useState(""),[i,r]=I.useState(""),[n,l]=I.useState(0);let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],t[0]=a):a=t[0];const[d,f]=I.useState(a);let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=[],t[1]=p):p=t[1];const[h,g]=I.useState(p);let _;t[2]===Symbol.for("react.memo_cache_sentinel")?(_={},t[2]=_):_=t[2];const[j,y]=I.useState(_);let w;t[3]===Symbol.for("react.memo_cache_sentinel")?(w=[],t[3]=w):w=t[3];const[$,N]=I.useState(w),[E,T]=I.useState(0),[P,L]=I.useState(""),[O,M]=I.useState("");let U;t[4]===Symbol.for("react.memo_cache_sentinel")?(U=[],t[4]=U):U=t[4];const[V,W]=I.useState(U);let J;t[5]===Symbol.for("react.memo_cache_sentinel")?(J=[],t[5]=J):J=t[5];const[z,te]=I.useState(J),[Y,Q]=I.useState(void 0);let X,Z;t[6]===Symbol.for("react.memo_cache_sentinel")?(X=()=>{ne("/commands",{method:"GET"}).then(ef).then(re=>{y(re),f(us(re)),g(Object.keys(re))}).catch(Zu)},Z=[],t[6]=X,t[7]=Z):(X=t[6],Z=t[7]),I.useEffect(X,Z);let ae,le;t[8]===Symbol.for("react.memo_cache_sentinel")?(ae=()=>{Bt("commands.history.get").then(re=>{te(re.value)}).catch(Xu)},le=[],t[8]=ae,t[9]=le):(ae=t[8],le=t[9]),I.useEffect(ae,le);let de;t[10]!==j?(de=(re,ue)=>{const ge=ds.parse(ue),Ae=ds.parse(re);L(j[ge[0]]?.signature_help),M(j[ge[0]]?.help||""),f(us(j,Ae[0])),g(us(j,ge[0]));const nt=j[ge[0]]?.parameters.map(Qu);nt&&(N([ge[0],...nt]),T(ge.length-1))},t[10]=j,t[11]=de):de=t[11];const ye=de;let Pe;t[12]===Symbol.for("react.memo_cache_sentinel")?(Pe=re=>{s(re.target.value),r(re.target.value),l(0)},t[12]=Pe):Pe=t[12];const Se=Pe;let Ee;t[13]!==h||t[14]!==d||t[15]!==n||t[16]!==Y||t[17]!==z||t[18]!==e||t[19]!==V?(Ee=re=>{if(re.key==="Enter"){const[ue,...ge]=ds.parse(e);te([...z,e]),Bt("commands.history.add",e).catch(Ju),ne.post(`/commands/${ue}`,{arguments:ge}).then(Yu).then(Ae=>{Q(void 0),N([]),W([...V,{command:e,result:JSON.stringify(Ae.value||Ae.error)}])}).catch(Ae=>{Q(void 0),N([]),W([...V,{command:e,result:Ae.toString()}])}),L(""),M(""),s(""),r(""),l(0),f(h)}if(re.key==="ArrowUp"){let ue;Y===void 0?ue=z.length-1:ue=Math.max(0,Y-1),s(z[ue]),r(z[ue]),Q(ue)}if(re.key==="ArrowDown"){if(Y===void 0)return;if(Y==z.length-1)s(""),r(""),Q(void 0);else{const ue=Y+1;s(z[ue]),r(z[ue]),Q(ue)}}re.key==="Tab"&&(s(d[n]),l((n+1)%d.length),re.preventDefault()),re.stopPropagation()},t[13]=h,t[14]=d,t[15]=n,t[16]=Y,t[17]=z,t[18]=e,t[19]=V,t[20]=Ee):Ee=t[20];const C=Ee;let he;t[21]!==j||t[22]!==e||t[23]!==i||t[24]!==ye?(he=re=>{if(!e){g(Object.keys(j));return}ye(i,e),re.stopPropagation()},t[21]=j,t[22]=e,t[23]=i,t[24]=ye,t[25]=he):he=t[25];const B=he;let oe;t[26]===Symbol.for("react.memo_cache_sentinel")?(oe=o.jsx("div",{className:"command-title",children:"Command Result"}),t[26]=oe):oe=t[26];let q;t[27]!==V?(q=o.jsx(Bu,{results:V}),t[27]=V,t[28]=q):q=t[28];let $e;t[29]!==h||t[30]!==E||t[31]!==O||t[32]!==$||t[33]!==P?($e=o.jsx(zu,{nextArgs:$,currentArg:E,help:P,description:O,availableCommands:h}),t[29]=h,t[30]=E,t[31]=O,t[32]=$,t[33]=P,t[34]=$e):$e=t[34];let We;t[35]===Symbol.for("react.memo_cache_sentinel")?(We=je("command-input input-group"),t[35]=We):We=t[35];let Oe;t[36]===Symbol.for("react.memo_cache_sentinel")?(Oe=o.jsx("span",{className:"input-group-addon",children:o.jsx("i",{className:"fa fa-fw fa-terminal"})}),t[36]=Oe):Oe=t[36];const ee=e||"";let Me;t[37]!==C||t[38]!==B||t[39]!==ee?(Me=o.jsxs("div",{className:We,children:[Oe,o.jsx("input",{type:"text",placeholder:"Enter command",className:"form-control",value:ee,onChange:Se,onKeyDown:C,onKeyUp:B})]}),t[37]=C,t[38]=B,t[39]=ee,t[40]=Me):Me=t[40];let Re;return t[41]!==q||t[42]!==$e||t[43]!==Me?(Re=o.jsxs("div",{className:"command",children:[oe,q,$e,Me]}),t[41]=q,t[42]=$e,t[43]=Me,t[44]=Re):Re=t[44],Re}function Yu(t){return t.json()}function Ju(){return 0}function Qu(t){return t.name}function Xu(t){return console.error(t)}function Zu(t){return console.error(t)}function ef(t){return t.json()}function tf(t){const e=k.c(7),{checked:s,onToggle:i,text:r}=t,n="btn btn-toggle "+(s?"btn-primary":"btn-default"),l="fa fa-fw "+(s?"fa-check-square-o":"fa-square-o");let a;e[0]!==l?(a=o.jsx("i",{className:l}),e[0]=l,e[1]=a):a=e[1];let d;return e[2]!==i||e[3]!==n||e[4]!==a||e[5]!==r?(d=o.jsxs("div",{className:n,onClick:i,children:[a," ",r]}),e[2]=i,e[3]=n,e[4]=a,e[5]=r,e[6]=d):d=e[6],d}class sf extends I.Component{static defaultProps={rowHeight:18};heights;viewport=Te.createRef();constructor(e){super(e),this.heights={},this.state={vScroll:kt()},this.onViewportUpdate=this.onViewportUpdate.bind(this)}componentDidMount(){window.addEventListener("resize",this.onViewportUpdate),this.onViewportUpdate()}componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}getSnapshotBeforeUpdate(){return Es(this.viewport)}componentDidUpdate(e,s,i){i&&Jr(this.viewport),this.onViewportUpdate()}onViewportUpdate(){const e=this.viewport.current,s=kt({itemCount:this.props.events.length,rowHeight:this.props.rowHeight,viewportTop:e.scrollTop,viewportHeight:e.offsetHeight,itemHeights:this.props.events.map(i=>this.heights[i.id])});Kt(this.state.vScroll,s)||this.setState({vScroll:s})}setHeight(e,s){if(s&&!this.heights[e]){const i=s.offsetHeight;this.heights[e]!==i&&(this.heights[e]=i,this.onViewportUpdate())}}render(){const{vScroll:e}=this.state,{events:s}=this.props;return o.jsxs("pre",{ref:this.viewport,onScroll:this.onViewportUpdate,children:[o.jsx("div",{style:{height:e.paddingTop}}),s.slice(e.start,e.end).map(i=>o.jsxs("div",{ref:r=>{this.setHeight(i.id,r)},children:[o.jsx(nf,{event:i}),i.message]},i.id)),o.jsx("div",{style:{height:e.paddingBottom}})]})}}function nf(t){const e=k.c(4),{event:s}=t;let i;e[0]!==s.level?(i={web:"html5",debug:"bug",warn:"exclamation-triangle",error:"ban"}[s.level]||"info",e[0]=s.level,e[1]=i):i=e[1];const n=`fa fa-fw fa-${i}`;let l;return e[2]!==n?(l=o.jsx("i",{className:n}),e[2]=n,e[3]=l):l=e[3],l}class rf extends I.Component{static defaultProps={defaultHeight:200};dragStart;constructor(e,s){super(e,s),this.state={height:this.props.defaultHeight},this.onDragStart=this.onDragStart.bind(this),this.onDragMove=this.onDragMove.bind(this),this.onDragStop=this.onDragStop.bind(this)}onDragStart(e){e.preventDefault(),this.dragStart=this.state.height+e.pageY,window.addEventListener("mousemove",this.onDragMove),window.addEventListener("mouseup",this.onDragStop),window.addEventListener("dragend",this.onDragStop)}onDragMove(e){e.preventDefault(),this.setState({height:this.dragStart-e.pageY})}onDragStop(e){e.preventDefault(),window.removeEventListener("mousemove",this.onDragMove)}render(){const{height:e}=this.state,{filters:s,events:i,toggleFilter:r,close:n}=this.props;return o.jsxs("div",{className:"eventlog",style:{height:e},children:[o.jsxs("div",{onMouseDown:this.onDragStart,children:["Eventlog",o.jsxs("div",{className:"pull-right",children:[Object.values(Gi).map(l=>o.jsx(tf,{text:l,checked:s[l],onToggle:()=>r(l)},l)),o.jsx("i",{onClick:n,className:"fa fa-close"})]})]}),o.jsx(sf,{events:i})]})}}const of=zt(t=>({filters:t.eventLog.filters,events:t.eventLog.view}),{close:Gt,toggleFilter:zi})(rf);function lf(){const t=k.c(56),e=D(uf),{mode:s,intercept:i,showhost:r,upstream_cert:n,rawtcp:l,http2:a,websocket:d,anticache:f,anticomp:p,stickyauth:h,stickycookie:g,stream_large_bodies:_,listen_host:j,listen_port:y,server:w,ssl_insecure:$}=D(df),N=D(af),E=D(cf);let T;t[0]!==s?(T=s&&(s.length!==1||s[0]!=="regular")&&o.jsx("span",{className:"label label-success",children:s.join(",")}),t[0]=s,t[1]=T):T=t[1];let P;t[2]!==i?(P=i&&o.jsxs("span",{className:"label label-success",children:["Intercept: ",i]}),t[2]=i,t[3]=P):P=t[3];let L;t[4]!==$?(L=$&&o.jsx("span",{className:"label label-danger",children:"ssl_insecure"}),t[4]=$,t[5]=L):L=t[5];let O;t[6]!==r?(O=r&&o.jsx("span",{className:"label label-success",children:"showhost"}),t[6]=r,t[7]=O):O=t[7];let M;t[8]!==n?(M=!n&&o.jsx("span",{className:"label label-success",children:"no-upstream-cert"}),t[8]=n,t[9]=M):M=t[9];let U;t[10]!==l?(U=!l&&o.jsx("span",{className:"label label-success",children:"no-raw-tcp"}),t[10]=l,t[11]=U):U=t[11];let V;t[12]!==a?(V=!a&&o.jsx("span",{className:"label label-success",children:"no-http2"}),t[12]=a,t[13]=V):V=t[13];let W;t[14]!==d?(W=!d&&o.jsx("span",{className:"label label-success",children:"no-websocket"}),t[14]=d,t[15]=W):W=t[15];let J;t[16]!==f?(J=f&&o.jsx("span",{className:"label label-success",children:"anticache"}),t[16]=f,t[17]=J):J=t[17];let z;t[18]!==p?(z=p&&o.jsx("span",{className:"label label-success",children:"anticomp"}),t[18]=p,t[19]=z):z=t[19];let te;t[20]!==h?(te=h&&o.jsxs("span",{className:"label label-success",children:["stickyauth: ",h]}),t[20]=h,t[21]=te):te=t[21];let Y;t[22]!==g?(Y=g&&o.jsxs("span",{className:"label label-success",children:["stickycookie: ",g]}),t[22]=g,t[23]=Y):Y=t[23];let Q;t[24]!==_?(Q=_&&o.jsxs("span",{className:"label label-success",children:["stream: ",hi(_)]}),t[24]=_,t[25]=Q):Q=t[25];let X;t[26]!==N||t[27]!==E?(X=E>0&&o.jsxs("span",{className:"label label-default",children:[N," of ",E," flows selected"]}),t[26]=N,t[27]=E,t[28]=X):X=t[28];let Z;t[29]!==j||t[30]!==y||t[31]!==w?(Z=w&&o.jsxs("span",{className:"label label-primary",title:"HTTP Proxy Server Address",children:[j||"*",":",y||8080]}),t[29]=j,t[30]=y,t[31]=w,t[32]=Z):Z=t[32];let ae;t[33]!==Z?(ae=o.jsx(gt,{children:Z}),t[33]=Z,t[34]=ae):ae=t[34];let le;t[35]!==e?(le=o.jsxs("span",{className:"label label-default",title:"Mitmproxy Version",children:["mitmproxy ",e]}),t[35]=e,t[36]=le):le=t[36];let de;t[37]!==ae||t[38]!==le?(de=o.jsxs("div",{className:"pull-right",children:[ae,le]}),t[37]=ae,t[38]=le,t[39]=de):de=t[39];let ye;return t[40]!==T||t[41]!==P||t[42]!==te||t[43]!==Y||t[44]!==Q||t[45]!==X||t[46]!==de||t[47]!==L||t[48]!==O||t[49]!==M||t[50]!==U||t[51]!==V||t[52]!==W||t[53]!==J||t[54]!==z?(ye=o.jsxs("footer",{children:[T,P,L,O,M,U,V,W,J,z,te,Y,Q,X,de]}),t[40]=T,t[41]=P,t[42]=te,t[43]=Y,t[44]=Q,t[45]=X,t[46]=de,t[47]=L,t[48]=O,t[49]=M,t[50]=U,t[51]=V,t[52]=W,t[53]=J,t[54]=z,t[55]=ye):ye=t[55],ye}function cf(t){return t.flows.list.length}function af(t){return t.flows.selected.length}function df(t){return t.options}function uf(t){return t.backendState.version}function ff(t){const e=k.c(3),{children:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"modal-backdrop fade in"}),e[0]=i):i=e[0];let r;return e[1]!==s?(r=o.jsxs("div",{children:[i,o.jsx("div",{className:"modal modal-visible",id:"optionsModal",tabIndex:-1,role:"dialog","aria-labelledby":"options",children:o.jsx("div",{className:"modal-dialog modal-lg",role:"document",children:o.jsx("div",{className:"modal-content",children:s})})})]}),e[1]=s,e[2]=r):r=e[2],r}const pf=t=>{t.key!=="Escape"&&t.stopPropagation()};function so(t){const e=k.c(10);let s,i,r;e[0]!==t?({value:r,onChange:s,...i}=t,e[0]=t,e[1]=s,e[2]=i,e[3]=r):(s=e[1],i=e[2],r=e[3]);let n;e[4]!==s?(n=a=>s(a.target.checked),e[4]=s,e[5]=n):n=e[5];let l;return e[6]!==i||e[7]!==n||e[8]!==r?(l=o.jsx("div",{className:"checkbox",children:o.jsxs("label",{children:[o.jsx("input",{type:"checkbox",checked:r,onChange:n,...i}),"Enable"]})}),e[6]=i,e[7]=n,e[8]=r,e[9]=l):l=e[9],l}function ci(t){const e=k.c(10);let s,i,r;e[0]!==t?({value:r,onChange:s,...i}=t,e[0]=t,e[1]=s,e[2]=i,e[3]=r):(s=e[1],i=e[2],r=e[3]);const n=r||"";let l;e[4]!==s?(l=d=>s(d.target.value),e[4]=s,e[5]=l):l=e[5];let a;return e[6]!==i||e[7]!==n||e[8]!==l?(a=o.jsx("input",{type:"text",value:n,onChange:l,...i}),e[6]=i,e[7]=n,e[8]=l,e[9]=a):a=e[9],a}function ai(t){return function({onChange:s,...i}){return o.jsx(t,{onChange:r=>s(r||null),...i})}}function di(t){const e=k.c(10);let s,i,r;e[0]!==t?({value:r,onChange:s,...i}=t,e[0]=t,e[1]=s,e[2]=i,e[3]=r):(s=e[1],i=e[2],r=e[3]);let n;e[4]!==s?(n=a=>s(parseInt(a.target.value)),e[4]=s,e[5]=n):n=e[5];let l;return e[6]!==i||e[7]!==n||e[8]!==r?(l=o.jsx("input",{type:"number",value:r,onChange:n,...i}),e[6]=i,e[7]=n,e[8]=r,e[9]=l):l=e[9],l}function hf(t){const e=k.c(12);let s,i,r,n;if(e[0]!==t){const{value:d,onChange:f,choices:p,...h}=t;n=d,s=p,i=h,r=g=>f(g.target.value),e[0]=t,e[1]=s,e[2]=i,e[3]=r,e[4]=n}else s=e[1],i=e[2],r=e[3],n=e[4];let l;e[5]!==s?(l=s.map(mf),e[5]=s,e[6]=l):l=e[6];let a;return e[7]!==i||e[8]!==r||e[9]!==l||e[10]!==n?(a=o.jsx("select",{onChange:r,value:n,...i,children:l}),e[7]=i,e[8]=r,e[9]=l,e[10]=n,e[11]=a):a=e[11],a}function mf(t){return o.jsx("option",{value:t,children:t},t)}function gf(t){const e=k.c(13);let s,i,r;e[0]!==t?({value:r,onChange:s,...i}=t,e[0]=t,e[1]=s,e[2]=i,e[3]=r):(s=e[1],i=e[2],r=e[3]);const n=Math.max(r.length,1);let l;e[4]!==r?(l=r.join(` +`?(S.seenCR||S.line++,S.column=1,S.seenCR=!1):H==="\r"||H==="\u2028"||H==="\u2029"?(S.line++,S.column=1,S.seenCR=!0):(S.column++,S.seenCR=!1),A++;return he[b]=S,S}function Oe(b,S){var A=We(b),H=We(S);return{start:{offset:b,line:A.line,column:A.column},end:{offset:S,line:H.line,column:H.column}}}function ee(b){CB&&(B=C,oe=[]),oe.push(b))}function Me(b,S,A,H){function Tt(Ce){var De=1;for(Ce.sort(function(ut,Ke){return ut.descriptionKe.description?1:0});De1?Ke.slice(0,-1).join(", ")+" or "+Ke[Ce.length-1]:Ke[0],Rt=De?'"'+ut(De)+'"':"end of input","Expected "+vt+" but "+Rt+" found."}return S!==null&&Tt(S),new e(es(S,A),S,A,H)}function Re(){var b,S,A,H;if(b=C,S=re(),S!==n){if(A=[],H=Je(),H!==n)for(;H!==n;)A.push(H),H=Je();else A=n;A!==n?(H=Re(),H!==n?(S=d(S,H),b=S):(C=b,b=n)):(C=b,b=n)}else C=b,b=n;if(b===n&&(b=C,S=re(),S!==n&&(S=f(S)),b=S,b===n)){for(b=C,S=[],A=Je();A!==n;)S.push(A),A=Je();S!==n&&(S=p()),b=S}return b}function re(){var b,S,A,H;if(q++,b=C,i.charCodeAt(C)===34?(S=g,C++):(S=n,q===0&&ee(_)),S!==n){for(A=[],H=ue();H!==n;)A.push(H),H=ue();A!==n?(i.charCodeAt(C)===34?(H=g,C++):(H=n,q===0&&ee(_)),H!==n?(S=j(A),b=S):(C=b,b=n)):(C=b,b=n)}else C=b,b=n;if(b===n){if(b=C,i.charCodeAt(C)===39?(S=y,C++):(S=n,q===0&&ee(w)),S!==n){for(A=[],H=ge();H!==n;)A.push(H),H=ge();A!==n?(i.charCodeAt(C)===39?(H=y,C++):(H=n,q===0&&ee(w)),H!==n?(S=j(A),b=S):(C=b,b=n)):(C=b,b=n)}else C=b,b=n;if(b===n){if(b=C,S=C,q++,A=Zt(),q--,A===n?S=void 0:(C=S,S=n),S!==n){if(A=[],H=Ae(),H!==n)for(;H!==n;)A.push(H),H=Ae();else A=n;A!==n?(S=j(A),b=S):(C=b,b=n)}else C=b,b=n;if(b===n){if(b=C,i.charCodeAt(C)===34?(S=g,C++):(S=n,q===0&&ee(_)),S!==n){for(A=[],H=ue();H!==n;)A.push(H),H=ue();A!==n?(S=j(A),b=S):(C=b,b=n)}else C=b,b=n;if(b===n)if(b=C,i.charCodeAt(C)===39?(S=y,C++):(S=n,q===0&&ee(w)),S!==n){for(A=[],H=ge();H!==n;)A.push(H),H=ge();A!==n?(S=j(A),b=S):(C=b,b=n)}else C=b,b=n}}}return q--,b===n&&(S=n,q===0&&ee(h)),b}function ue(){var b,S,A;return b=C,S=C,q++,$.test(i.charAt(C))?(A=i.charAt(C),C++):(A=n,q===0&&ee(N)),q--,A===n?S=void 0:(C=S,S=n),S!==n?(i.length>C?(A=i.charAt(C),C++):(A=n,q===0&&ee(E)),A!==n?(S=T(A),b=S):(C=b,b=n)):(C=b,b=n),b===n&&(b=C,i.charCodeAt(C)===92?(S=P,C++):(S=n,q===0&&ee(L)),S!==n?(A=nt(),A!==n?(S=T(A),b=S):(C=b,b=n)):(C=b,b=n)),b}function ge(){var b,S,A;return b=C,S=C,q++,O.test(i.charAt(C))?(A=i.charAt(C),C++):(A=n,q===0&&ee(M)),q--,A===n?S=void 0:(C=S,S=n),S!==n?(i.length>C?(A=i.charAt(C),C++):(A=n,q===0&&ee(E)),A!==n?(S=T(A),b=S):(C=b,b=n)):(C=b,b=n),b===n&&(b=C,i.charCodeAt(C)===92?(S=P,C++):(S=n,q===0&&ee(L)),S!==n?(A=nt(),A!==n?(S=T(A),b=S):(C=b,b=n)):(C=b,b=n)),b}function Ae(){var b,S,A;return b=C,S=C,q++,A=Je(),q--,A===n?S=void 0:(C=S,S=n),S!==n?(i.length>C?(A=i.charAt(C),C++):(A=n,q===0&&ee(E)),A!==n?(S=T(A),b=S):(C=b,b=n)):(C=b,b=n),b}function nt(){var b,S;return U.test(i.charAt(C))?(b=i.charAt(C),C++):(b=n,q===0&&ee(V)),b===n&&(b=C,i.charCodeAt(C)===110?(S=W,C++):(S=n,q===0&&ee(J)),S!==n&&(S=z()),b=S,b===n&&(b=C,i.charCodeAt(C)===114?(S=te,C++):(S=n,q===0&&ee(Y)),S!==n&&(S=Q()),b=S,b===n&&(b=C,i.charCodeAt(C)===116?(S=X,C++):(S=n,q===0&&ee(Z)),S!==n&&(S=ae()),b=S))),b}function Je(){var b;return q++,de.test(i.charAt(C))?(b=i.charAt(C),C++):(b=n,q===0&&ee(ye)),q--,b===n&&q===0&&ee(le),b}function Zt(){var b;return q++,Se.test(i.charAt(C))?(b=i.charAt(C),C++):(b=n,q===0&&ee(Ee)),q--,b===n&&q===0&&ee(Pe),b}if($e=a(),$e!==n&&C===i.length)return $e;throw $e!==n&&C{i&&i.current.addEventListener("DOMNodeInserted",Ku)},n=[],e[0]=r,e[1]=n):(r=e[0],n=e[1]),I.useEffect(r,n);let l;e[2]!==s?(l=s.map(Wu),e[2]=s,e[3]=l):l=e[3];let a;return e[4]!==l?(a=o.jsx("div",{className:"command-result",ref:i,children:l}),e[4]=l,e[5]=a):a=e[5],a}function Wu(t,e){return o.jsxs("div",{children:[o.jsx("div",{children:o.jsxs("strong",{children:["$ ",t.command]})}),t.result]},e)}function Ku(t){const e=t.currentTarget;e.scroll({top:e.scrollHeight,behavior:"auto"})}function zu(t){const e=k.c(20),{nextArgs:s,currentArg:i,help:r,description:n,availableCommands:l}=t;let a;if(e[0]!==i||e[1]!==s){a=[];for(let w=0;w0&&o.jsxs("div",{children:[o.jsx("strong",{children:"Argument suggestion:"})," ",a]}),e[4]=a,e[5]=f):f=e[5];let p;e[6]!==r?(p=r?.includes("->")&&o.jsxs("div",{children:[o.jsx("strong",{children:"Signature help: "}),r]}),e[6]=r,e[7]=p):p=e[7];let h;e[8]!==n?(h=n&&o.jsxs("div",{children:["# ",n]}),e[8]=n,e[9]=h):h=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx("strong",{children:"Available Commands: "}),e[10]=g):g=e[10];let _;e[11]!==l?(_=JSON.stringify(l),e[11]=l,e[12]=_):_=e[12];let j;e[13]!==_?(j=o.jsxs("div",{children:[g,o.jsx("p",{className:"available-commands",children:_})]}),e[13]=_,e[14]=j):j=e[14];let y;return e[15]!==f||e[16]!==p||e[17]!==h||e[18]!==j?(y=o.jsxs("div",{className:"argument-suggestion popover top",children:[d,o.jsxs("div",{className:"popover-content",children:[f,p,h,j]})]}),e[15]=f,e[16]=p,e[17]=h,e[18]=j,e[19]=y):y=e[19],y}function Gu(){const t=k.c(45),[e,s]=I.useState(""),[i,r]=I.useState(""),[n,l]=I.useState(0);let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],t[0]=a):a=t[0];const[d,f]=I.useState(a);let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=[],t[1]=p):p=t[1];const[h,g]=I.useState(p);let _;t[2]===Symbol.for("react.memo_cache_sentinel")?(_={},t[2]=_):_=t[2];const[j,y]=I.useState(_);let w;t[3]===Symbol.for("react.memo_cache_sentinel")?(w=[],t[3]=w):w=t[3];const[$,N]=I.useState(w),[E,T]=I.useState(0),[P,L]=I.useState(""),[O,M]=I.useState("");let U;t[4]===Symbol.for("react.memo_cache_sentinel")?(U=[],t[4]=U):U=t[4];const[V,W]=I.useState(U);let J;t[5]===Symbol.for("react.memo_cache_sentinel")?(J=[],t[5]=J):J=t[5];const[z,te]=I.useState(J),[Y,Q]=I.useState(void 0);let X,Z;t[6]===Symbol.for("react.memo_cache_sentinel")?(X=()=>{ne("/commands",{method:"GET"}).then(ef).then(re=>{y(re),f(us(re)),g(Object.keys(re))}).catch(Zu)},Z=[],t[6]=X,t[7]=Z):(X=t[6],Z=t[7]),I.useEffect(X,Z);let ae,le;t[8]===Symbol.for("react.memo_cache_sentinel")?(ae=()=>{Bt("commands.history.get").then(re=>{te(re.value)}).catch(Xu)},le=[],t[8]=ae,t[9]=le):(ae=t[8],le=t[9]),I.useEffect(ae,le);let de;t[10]!==j?(de=(re,ue)=>{const ge=ds.parse(ue),Ae=ds.parse(re);L(j[ge[0]]?.signature_help),M(j[ge[0]]?.help||""),f(us(j,Ae[0])),g(us(j,ge[0]));const nt=j[ge[0]]?.parameters.map(Qu);nt&&(N([ge[0],...nt]),T(ge.length-1))},t[10]=j,t[11]=de):de=t[11];const ye=de;let Pe;t[12]===Symbol.for("react.memo_cache_sentinel")?(Pe=re=>{s(re.target.value),r(re.target.value),l(0)},t[12]=Pe):Pe=t[12];const Se=Pe;let Ee;t[13]!==h||t[14]!==d||t[15]!==n||t[16]!==Y||t[17]!==z||t[18]!==e||t[19]!==V?(Ee=re=>{if(re.key==="Enter"){const[ue,...ge]=ds.parse(e);te([...z,e]),Bt("commands.history.add",e).catch(Ju),ne.post(`/commands/${ue}`,{arguments:ge}).then(Yu).then(Ae=>{Q(void 0),N([]),W([...V,{command:e,result:JSON.stringify(Ae.value||Ae.error)}])}).catch(Ae=>{Q(void 0),N([]),W([...V,{command:e,result:Ae.toString()}])}),L(""),M(""),s(""),r(""),l(0),f(h)}if(re.key==="ArrowUp"){let ue;Y===void 0?ue=z.length-1:ue=Math.max(0,Y-1),s(z[ue]),r(z[ue]),Q(ue)}if(re.key==="ArrowDown"){if(Y===void 0)return;if(Y==z.length-1)s(""),r(""),Q(void 0);else{const ue=Y+1;s(z[ue]),r(z[ue]),Q(ue)}}re.key==="Tab"&&(s(d[n]),l((n+1)%d.length),re.preventDefault()),re.stopPropagation()},t[13]=h,t[14]=d,t[15]=n,t[16]=Y,t[17]=z,t[18]=e,t[19]=V,t[20]=Ee):Ee=t[20];const C=Ee;let he;t[21]!==j||t[22]!==e||t[23]!==i||t[24]!==ye?(he=re=>{if(!e){g(Object.keys(j));return}ye(i,e),re.stopPropagation()},t[21]=j,t[22]=e,t[23]=i,t[24]=ye,t[25]=he):he=t[25];const B=he;let oe;t[26]===Symbol.for("react.memo_cache_sentinel")?(oe=o.jsx("div",{className:"command-title",children:"Command Result"}),t[26]=oe):oe=t[26];let q;t[27]!==V?(q=o.jsx(Bu,{results:V}),t[27]=V,t[28]=q):q=t[28];let $e;t[29]!==h||t[30]!==E||t[31]!==O||t[32]!==$||t[33]!==P?($e=o.jsx(zu,{nextArgs:$,currentArg:E,help:P,description:O,availableCommands:h}),t[29]=h,t[30]=E,t[31]=O,t[32]=$,t[33]=P,t[34]=$e):$e=t[34];let We;t[35]===Symbol.for("react.memo_cache_sentinel")?(We=je("command-input input-group"),t[35]=We):We=t[35];let Oe;t[36]===Symbol.for("react.memo_cache_sentinel")?(Oe=o.jsx("span",{className:"input-group-addon",children:o.jsx("i",{className:"fa fa-fw fa-terminal"})}),t[36]=Oe):Oe=t[36];const ee=e||"";let Me;t[37]!==C||t[38]!==B||t[39]!==ee?(Me=o.jsxs("div",{className:We,children:[Oe,o.jsx("input",{type:"text",placeholder:"Enter command",className:"form-control",value:ee,onChange:Se,onKeyDown:C,onKeyUp:B})]}),t[37]=C,t[38]=B,t[39]=ee,t[40]=Me):Me=t[40];let Re;return t[41]!==q||t[42]!==$e||t[43]!==Me?(Re=o.jsxs("div",{className:"command",children:[oe,q,$e,Me]}),t[41]=q,t[42]=$e,t[43]=Me,t[44]=Re):Re=t[44],Re}function Yu(t){return t.json()}function Ju(){return 0}function Qu(t){return t.name}function Xu(t){return console.error(t)}function Zu(t){return console.error(t)}function ef(t){return t.json()}function tf(t){const e=k.c(7),{checked:s,onToggle:i,text:r}=t,n="btn btn-toggle "+(s?"btn-primary":"btn-default"),l="fa fa-fw "+(s?"fa-check-square-o":"fa-square-o");let a;e[0]!==l?(a=o.jsx("i",{className:l}),e[0]=l,e[1]=a):a=e[1];let d;return e[2]!==i||e[3]!==n||e[4]!==a||e[5]!==r?(d=o.jsxs("div",{className:n,onClick:i,children:[a," ",r]}),e[2]=i,e[3]=n,e[4]=a,e[5]=r,e[6]=d):d=e[6],d}class sf extends I.Component{static defaultProps={rowHeight:18};heights;viewport=Te.createRef();constructor(e){super(e),this.heights={},this.state={vScroll:kt()},this.onViewportUpdate=this.onViewportUpdate.bind(this)}componentDidMount(){window.addEventListener("resize",this.onViewportUpdate),this.onViewportUpdate()}componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}getSnapshotBeforeUpdate(){return Es(this.viewport)}componentDidUpdate(e,s,i){i&&Jr(this.viewport),this.onViewportUpdate()}onViewportUpdate(){const e=this.viewport.current,s=kt({itemCount:this.props.events.length,rowHeight:this.props.rowHeight,viewportTop:e.scrollTop,viewportHeight:e.offsetHeight,itemHeights:this.props.events.map(i=>this.heights[i.id])});Kt(this.state.vScroll,s)||this.setState({vScroll:s})}setHeight(e,s){if(s&&!this.heights[e]){const i=s.offsetHeight;this.heights[e]!==i&&(this.heights[e]=i,this.onViewportUpdate())}}render(){const{vScroll:e}=this.state,{events:s}=this.props;return o.jsxs("pre",{ref:this.viewport,onScroll:this.onViewportUpdate,children:[o.jsx("div",{style:{height:e.paddingTop}}),s.slice(e.start,e.end).map(i=>o.jsxs("div",{ref:r=>{this.setHeight(i.id,r)},children:[o.jsx(nf,{event:i}),i.message]},i.id)),o.jsx("div",{style:{height:e.paddingBottom}})]})}}function nf(t){const e=k.c(4),{event:s}=t;let i;e[0]!==s.level?(i={web:"html5",debug:"bug",warn:"exclamation-triangle",error:"ban"}[s.level]||"info",e[0]=s.level,e[1]=i):i=e[1];const n=`fa fa-fw fa-${i}`;let l;return e[2]!==n?(l=o.jsx("i",{className:n}),e[2]=n,e[3]=l):l=e[3],l}class rf extends I.Component{static defaultProps={defaultHeight:200};dragStart;constructor(e,s){super(e,s),this.state={height:this.props.defaultHeight},this.onDragStart=this.onDragStart.bind(this),this.onDragMove=this.onDragMove.bind(this),this.onDragStop=this.onDragStop.bind(this)}onDragStart(e){e.preventDefault(),this.dragStart=this.state.height+e.pageY,window.addEventListener("mousemove",this.onDragMove),window.addEventListener("mouseup",this.onDragStop),window.addEventListener("dragend",this.onDragStop)}onDragMove(e){e.preventDefault(),this.setState({height:this.dragStart-e.pageY})}onDragStop(e){e.preventDefault(),window.removeEventListener("mousemove",this.onDragMove)}render(){const{height:e}=this.state,{filters:s,events:i,toggleFilter:r,close:n}=this.props;return o.jsxs("div",{className:"eventlog",style:{height:e},children:[o.jsxs("div",{onMouseDown:this.onDragStart,children:["Eventlog",o.jsxs("div",{className:"pull-right",children:[Object.values(Gi).map(l=>o.jsx(tf,{text:l,checked:s[l],onToggle:()=>r(l)},l)),o.jsx("i",{onClick:n,className:"fa fa-close"})]})]}),o.jsx(sf,{events:i})]})}}const of=zt(t=>({filters:t.eventLog.filters,events:t.eventLog.view}),{close:Gt,toggleFilter:zi})(rf);function lf(){const t=k.c(56),e=D(uf),{mode:s,intercept:i,showhost:r,upstream_cert:n,rawtcp:l,http2:a,websocket:d,anticache:f,anticomp:p,stickyauth:h,stickycookie:g,stream_large_bodies:_,listen_host:j,listen_port:y,server:w,ssl_insecure:$}=D(df),N=D(af),E=D(cf);let T;t[0]!==s?(T=s&&(s.length!==1||s[0]!=="regular")&&o.jsx("span",{className:"label label-success",children:s.join(",")}),t[0]=s,t[1]=T):T=t[1];let P;t[2]!==i?(P=i&&o.jsxs("span",{className:"label label-success",children:["Intercept: ",i]}),t[2]=i,t[3]=P):P=t[3];let L;t[4]!==$?(L=$&&o.jsx("span",{className:"label label-danger",children:"ssl_insecure"}),t[4]=$,t[5]=L):L=t[5];let O;t[6]!==r?(O=r&&o.jsx("span",{className:"label label-success",children:"showhost"}),t[6]=r,t[7]=O):O=t[7];let M;t[8]!==n?(M=!n&&o.jsx("span",{className:"label label-success",children:"no-upstream-cert"}),t[8]=n,t[9]=M):M=t[9];let U;t[10]!==l?(U=!l&&o.jsx("span",{className:"label label-success",children:"no-raw-tcp"}),t[10]=l,t[11]=U):U=t[11];let V;t[12]!==a?(V=!a&&o.jsx("span",{className:"label label-success",children:"no-http2"}),t[12]=a,t[13]=V):V=t[13];let W;t[14]!==d?(W=!d&&o.jsx("span",{className:"label label-success",children:"no-websocket"}),t[14]=d,t[15]=W):W=t[15];let J;t[16]!==f?(J=f&&o.jsx("span",{className:"label label-success",children:"anticache"}),t[16]=f,t[17]=J):J=t[17];let z;t[18]!==p?(z=p&&o.jsx("span",{className:"label label-success",children:"anticomp"}),t[18]=p,t[19]=z):z=t[19];let te;t[20]!==h?(te=h&&o.jsxs("span",{className:"label label-success",children:["stickyauth: ",h]}),t[20]=h,t[21]=te):te=t[21];let Y;t[22]!==g?(Y=g&&o.jsxs("span",{className:"label label-success",children:["stickycookie: ",g]}),t[22]=g,t[23]=Y):Y=t[23];let Q;t[24]!==_?(Q=_&&o.jsxs("span",{className:"label label-success",children:["stream: ",hi(_)]}),t[24]=_,t[25]=Q):Q=t[25];let X;t[26]!==N||t[27]!==E?(X=E>0&&o.jsxs("span",{className:"label label-default",children:[N," of ",E," flows selected"]}),t[26]=N,t[27]=E,t[28]=X):X=t[28];let Z;t[29]!==j||t[30]!==y||t[31]!==w?(Z=w&&o.jsxs("span",{className:"label label-primary",title:"HTTP Proxy Server Address",children:[j||"*",":",y||8080]}),t[29]=j,t[30]=y,t[31]=w,t[32]=Z):Z=t[32];let ae;t[33]!==Z?(ae=o.jsx(gt,{children:Z}),t[33]=Z,t[34]=ae):ae=t[34];let le;t[35]!==e?(le=o.jsxs("span",{className:"label label-default",title:"Mitmproxy Version",children:["mitmproxy ",e]}),t[35]=e,t[36]=le):le=t[36];let de;t[37]!==ae||t[38]!==le?(de=o.jsxs("div",{className:"pull-right",children:[ae,le]}),t[37]=ae,t[38]=le,t[39]=de):de=t[39];let ye;return t[40]!==T||t[41]!==P||t[42]!==te||t[43]!==Y||t[44]!==Q||t[45]!==X||t[46]!==de||t[47]!==L||t[48]!==O||t[49]!==M||t[50]!==U||t[51]!==V||t[52]!==W||t[53]!==J||t[54]!==z?(ye=o.jsxs("footer",{children:[T,P,L,O,M,U,V,W,J,z,te,Y,Q,X,de]}),t[40]=T,t[41]=P,t[42]=te,t[43]=Y,t[44]=Q,t[45]=X,t[46]=de,t[47]=L,t[48]=O,t[49]=M,t[50]=U,t[51]=V,t[52]=W,t[53]=J,t[54]=z,t[55]=ye):ye=t[55],ye}function cf(t){return t.flows.list.length}function af(t){return t.flows.selected.length}function df(t){return t.options}function uf(t){return t.backendState.version}function ff(t){const e=k.c(3),{children:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"modal-backdrop fade in"}),e[0]=i):i=e[0];let r;return e[1]!==s?(r=o.jsxs("div",{children:[i,o.jsx("div",{className:"modal modal-visible",id:"optionsModal",tabIndex:-1,role:"dialog","aria-labelledby":"options",children:o.jsx("div",{className:"modal-dialog modal-lg",role:"document",children:o.jsx("div",{className:"modal-content",children:s})})})]}),e[1]=s,e[2]=r):r=e[2],r}const pf=t=>{t.key!=="Escape"&&t.stopPropagation()};function so(t){const e=k.c(10);let s,i,r;e[0]!==t?({value:r,onChange:s,...i}=t,e[0]=t,e[1]=s,e[2]=i,e[3]=r):(s=e[1],i=e[2],r=e[3]);let n;e[4]!==s?(n=a=>s(a.target.checked),e[4]=s,e[5]=n):n=e[5];let l;return e[6]!==i||e[7]!==n||e[8]!==r?(l=o.jsx("div",{className:"checkbox",children:o.jsxs("label",{children:[o.jsx("input",{type:"checkbox",checked:r,onChange:n,...i}),"Enable"]})}),e[6]=i,e[7]=n,e[8]=r,e[9]=l):l=e[9],l}function ci(t){const e=k.c(10);let s,i,r;e[0]!==t?({value:r,onChange:s,...i}=t,e[0]=t,e[1]=s,e[2]=i,e[3]=r):(s=e[1],i=e[2],r=e[3]);const n=r||"";let l;e[4]!==s?(l=d=>s(d.target.value),e[4]=s,e[5]=l):l=e[5];let a;return e[6]!==i||e[7]!==n||e[8]!==l?(a=o.jsx("input",{type:"text",value:n,onChange:l,...i}),e[6]=i,e[7]=n,e[8]=l,e[9]=a):a=e[9],a}function ai(t){return function({onChange:s,...i}){return o.jsx(t,{onChange:r=>s(r||null),...i})}}function di(t){const e=k.c(10);let s,i,r;e[0]!==t?({value:r,onChange:s,...i}=t,e[0]=t,e[1]=s,e[2]=i,e[3]=r):(s=e[1],i=e[2],r=e[3]);let n;e[4]!==s?(n=a=>s(parseInt(a.target.value)),e[4]=s,e[5]=n):n=e[5];let l;return e[6]!==i||e[7]!==n||e[8]!==r?(l=o.jsx("input",{type:"number",value:r,onChange:n,...i}),e[6]=i,e[7]=n,e[8]=r,e[9]=l):l=e[9],l}function hf(t){const e=k.c(12);let s,i,r,n;if(e[0]!==t){const{value:d,onChange:f,choices:p,...h}=t;n=d,s=p,i=h,r=g=>f(g.target.value),e[0]=t,e[1]=s,e[2]=i,e[3]=r,e[4]=n}else s=e[1],i=e[2],r=e[3],n=e[4];let l;e[5]!==s?(l=s.map(mf),e[5]=s,e[6]=l):l=e[6];let a;return e[7]!==i||e[8]!==r||e[9]!==l||e[10]!==n?(a=o.jsx("select",{onChange:r,value:n,...i,children:l}),e[7]=i,e[8]=r,e[9]=l,e[10]=n,e[11]=a):a=e[11],a}function mf(t){return o.jsx("option",{value:t,children:t},t)}function gf(t){const e=k.c(13);let s,i,r;e[0]!==t?({value:r,onChange:s,...i}=t,e[0]=t,e[1]=s,e[2]=i,e[3]=r):(s=e[1],i=e[2],r=e[3]);const n=Math.max(r.length,1);let l;e[4]!==r?(l=r.join(` `),e[4]=r,e[5]=l):l=e[5];const[a,d]=Te.useState(l);let f;e[6]!==s?(f=g=>{const _=g.target.value;d(_),s(_.split(` `).map(xf).filter(vf))},e[6]=s,e[7]=f):f=e[7];const p=f;let h;return e[8]!==p||e[9]!==n||e[10]!==i||e[11]!==a?(h=o.jsx("textarea",{rows:n,value:a,onChange:p,...i}),e[8]=p,e[9]=n,e[10]=i,e[11]=a,e[12]=h):h=e[12],h}function vf(t){return t!==""}function xf(t){return t.trim()}const _f={bool:so,str:ci,int:di,"optional str":ai(ci),"optional int":ai(di),"sequence of str":gf};function jf(t){const e=k.c(16),{choices:s,type:i,value:r,onChange:n,name:l,error:a}=t;let d,f;if(e[0]!==d||e[1]!==s||e[2]!==n||e[3]!==i||e[4]!==r){if(f={onChange:n,value:r},s)d=hf,f.choices=s;else if(d=_f[i],!d)throw`unknown option type ${i}`;d!==so&&(f.className="form-control"),e[0]=d,e[1]=s,e[2]=n,e[3]=i,e[4]=r,e[5]=f,e[6]=d}else f=e[5],d=e[6];let p;e[7]!==a?(p=je({"has-error":a}),e[7]=a,e[8]=p):p=e[8];let h;e[9]!==d||e[10]!==l||e[11]!==f?(h=o.jsx(d,{name:l,onKeyDown:pf,...f}),e[9]=d,e[10]=l,e[11]=f,e[12]=h):h=e[12];let g;return e[13]!==p||e[14]!==h?(g=o.jsx("div",{className:p,children:h}),e[13]=p,e[14]=h,e[15]=g):g=e[15],g}function yf(t){const e=k.c(18),{name:s}=t,i=G();let r;e[0]!==s?(r=j=>j.options_meta[s]?.choices,e[0]=s,e[1]=r):r=e[1];const n=D(r);let l;e[2]!==s?(l=j=>j.options_meta[s]?.type,e[2]=s,e[3]=l):l=e[3];const a=D(l);let d;e[4]!==s?(d=j=>{const y=j.ui.optionsEditor[s];return y?y.value:j.options_meta[s]?.value},e[4]=s,e[5]=d):d=e[5];const f=D(d);let p;e[6]!==s?(p=j=>j.ui.optionsEditor[s]?.error,e[6]=s,e[7]=p):p=e[7];const h=D(p);let g;e[8]!==i||e[9]!==s?(g=j=>i(Cs(s,j)),e[8]=i,e[9]=s,e[10]=g):g=e[10];let _;return e[11]!==n||e[12]!==h||e[13]!==s||e[14]!==g||e[15]!==a||e[16]!==f?(_=o.jsx(jf,{name:s,choices:n,type:a,value:f,error:h,onChange:g}),e[11]=n,e[12]=h,e[13]=s,e[14]=g,e[15]=a,e[16]=f,e[17]=_):_=e[17],_}function wf(t){const e=k.c(4),{name:s}=t;let i;e[0]!==s?(i=l=>l.options_meta[s]?.help,e[0]=s,e[1]=i):i=e[1];const r=D(i);let n;return e[2]!==r?(n=o.jsx("div",{className:"help-block small",children:r}),e[2]=r,e[3]=n):n=e[3],n}function bf(t){const e=k.c(4),{name:s}=t;let i;e[0]!==s?(i=l=>l.options_meta[s]?.error,e[0]=s,e[1]=i):i=e[1];const r=D(i);if(!r)return null;let n;return e[2]!==r?(n=o.jsx("div",{className:"small text-danger",children:r}),e[2]=r,e[3]=n):n=e[3],n}function Sf(t){const e=k.c(2);let{value:s,defaultVal:i}=t;if(s===i)return null;{if(typeof i=="boolean")i=i?"true":"false";else if(Array.isArray(i)){if(Ht.isEmpty(Ht.compact(s))&&Ht.isEmpty(i))return null;i="[ ]"}else i===""?i='""':i===null&&(i="null");let r;return e[0]!==i?(r=o.jsxs("div",{className:"small",children:["Default: ",o.jsxs("strong",{children:[" ",i," "]})," "]}),e[0]=i,e[1]=r):r=e[1],r}}const $f=zt((t,{name:e})=>({value:t.options[e],defaultVal:t.options_meta[e]?.default}))(Sf);function Cf(){const t=k.c(24),e=G(),s=D(kf,Kt);let i,r,n,l;if(t[0]!==e||t[1]!==s){const h=s.sort();let g;t[6]!==e?(g=()=>e(Wi()),t[6]=e,t[7]=g):g=t[7];let _;t[8]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx("i",{className:"fa fa-fw fa-times"}),t[8]=_):_=t[8];let j;t[9]!==g?(j=o.jsx("button",{type:"button",className:"close","data-dismiss":"modal",onClick:g,children:_}),t[9]=g,t[10]=j):j=t[10];let y;t[11]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx("div",{className:"modal-title",children:o.jsx("h4",{children:"Options"})}),t[11]=y):y=t[11],t[12]!==j?(l=o.jsxs("div",{className:"modal-header",children:[j,y]}),t[12]=j,t[13]=l):l=t[13],n="modal-body",i="form-horizontal",r=h.map(Nf),t[0]=e,t[1]=s,t[2]=i,t[3]=r,t[4]=n,t[5]=l}else i=t[2],r=t[3],n=t[4],l=t[5];let a;t[14]!==i||t[15]!==r?(a=o.jsx("div",{className:i,children:r}),t[14]=i,t[15]=r,t[16]=a):a=t[16];let d;t[17]!==n||t[18]!==a?(d=o.jsx("div",{className:n,children:a}),t[17]=n,t[18]=a,t[19]=d):d=t[19];let f;t[20]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx("div",{className:"modal-footer"}),t[20]=f):f=t[20];let p;return t[21]!==l||t[22]!==d?(p=o.jsxs("div",{children:[l,d,f]}),t[21]=l,t[22]=d,t[23]=p):p=t[23],p}function Nf(t){return o.jsxs("div",{className:"form-group",children:[o.jsxs("div",{className:"col-xs-6",children:[o.jsx("label",{htmlFor:t,children:t}),o.jsx(wf,{name:t})]}),o.jsxs("div",{className:"col-xs-6",children:[o.jsx(yf,{name:t}),o.jsx(bf,{name:t}),o.jsx($f,{name:t})]})]},t)}function kf(t){return Object.keys(t.options_meta)}function Ef(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(ff,{children:o.jsx(Cf,{})}),t[0]=e):e=t[0],e}const Tf={OptionModal:Ef};function Rf(){const t=k.c(3),e=D(Af),s=e?Tf[e]:void 0;if(s){let i;return t[0]!==s?(i=o.jsx(s,{}),t[0]=s,t[1]=i):i=t[1],i}else{let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(o.Fragment,{}),t[2]=i):i=t[2],i}}function Af(t){return t.ui.modal.activeModal}class Df extends I.Component{state={};render=()=>{const{showEventLog:e,showCommandBar:s}=this.props;return this.state.error?(console.log("ERR",this.state),o.jsxs("div",{className:"container",children:[o.jsx("h1",{children:"mitmproxy has crashed."}),o.jsxs("pre",{children:[this.state.error.stack,o.jsx("br",{}),o.jsx("br",{}),"Component Stack:",this.state.errorInfo?.componentStack]}),o.jsxs("p",{children:["Please lodge a bug report at"," ",o.jsx("a",{href:"https://github.com/mitmproxy/mitmproxy/issues",children:"https://github.com/mitmproxy/mitmproxy/issues"}),"."]})]})):o.jsxs("div",{id:"container",tabIndex:0,children:[o.jsx(Hu,{}),o.jsx(lu,{}),s&&o.jsx(Gu,{},"commandbar"),e&&o.jsx(of,{},"eventlog"),o.jsx(lf,{}),o.jsx(Rf,{})]})};componentDidMount(){window.addEventListener("keydown",this.props.onKeyDown)}componentWillUnmount(){window.removeEventListener("keydown",this.props.onKeyDown)}componentDidCatch(e,s){this.setState({error:e,errorInfo:s})}}const Ff=zt(t=>({showEventLog:t.eventLog.visible,showCommandBar:t.commandBar.visible}),{onKeyDown:od})(Df),Ze={SEARCH:"s",HIGHLIGHT:"h",SHOW_EVENTLOG:"e",SHOW_COMMANDBAR:"c"};function If(t){const[e,s]=window.location.hash.substr(1).split("?",2),i=e.substr(1).split("/");if(i[0]==="flows"){if(i.length==3){const[r,n]=i.slice(1);t.dispatch(Ut(n));const l=()=>{const d=t.getState().flows.byId.get(r);d!==void 0&&(a(),t.dispatch(Ve([d])))},a=t.subscribe(l);l()}}else i[0]==="capture"&&t.dispatch(Vt(xe.Capture));s&&s.split("&").forEach(r=>{const[n,l]=r.split("=",2),a=decodeURIComponent(l);switch(n){case Ze.SEARCH:t.dispatch(Ri(a));break;case Ze.HIGHLIGHT:t.dispatch(Ai(a));break;case Ze.SHOW_EVENTLOG:t.getState().eventLog.visible||t.dispatch(Gt());break;case Ze.SHOW_COMMANDBAR:t.getState().commandBar.visible||t.dispatch(Ji());break;default:console.error(`unimplemented query arg: ${r}`)}})}function Lf(t){const e=t.getState(),s={[Ze.SEARCH]:e.ui.filter[ve.Search],[Ze.HIGHLIGHT]:e.ui.filter[ve.Highlight],[Ze.SHOW_EVENTLOG]:e.eventLog.visible,[Ze.SHOW_COMMANDBAR]:e.commandBar.visible},i=Object.keys(s).filter(l=>s[l]).map(l=>`${l}=${encodeURIComponent(s[l])}`).join("&");let r;e.ui.tabs.current===xe.Capture?r="/capture":e.flows.selected.length>0?r=`/flows/${e.flows.selected[0].id}/${e.ui.flow.tab}`:r="/flows",i&&(r+="?"+i);let n=window.location.pathname;n==="blank"&&(n="/"),window.location.hash.substr(1)!==r&&history.replaceState(void 0,"",`${n}#${r}`)}function Pf(t){If(t),t.subscribe(()=>Lf(t))}var lt=(t=>(t.State="state",t.Flows="flows",t.Events="events",t.Options="options",t))(lt||{});class Of{activeFetches;store;filterState;socket;messageQueue;constructor(e){this.activeFetches={},this.store=e,this.filterState=Ti,this.messageQueue=[],this.connect(),this.store.subscribe(this.onStoreUpdate.bind(this))}connect(){this.socket=new WebSocket(location.origin.replace("http","ws")+location.pathname.replace(/\/$/,"")+"/updates"),this.socket.addEventListener("open",()=>this.onOpen()),this.socket.addEventListener("close",e=>this.onClose(e)),this.socket.addEventListener("message",e=>this.onMessage(JSON.parse(e.data))),this.socket.addEventListener("error",e=>this.onError(e))}async onOpen(){for(const e of this.messageQueue)this.socket.send(JSON.stringify(e));this.messageQueue=[],this.store.dispatch(Cc()),await Promise.all([this.fetchData("state"),this.fetchData("flows"),this.fetchData("events"),this.fetchData("options")]),this.store.dispatch(Nc())}onStoreUpdate(){const e=this.store.getState().ui.filter;if(e!==this.filterState){for(const s of Object.values(ve))this.filterState[s]!==e[s]&&this.sendMessage({type:"flows/updateFilter",payload:{name:s,expr:e[s]}});this.filterState=e}}fetchData(e){const s=[];return this.activeFetches[e]=s,ne(`./${e}`).then(i=>i.json()).then(i=>{this.activeFetches[e]===s&&this.receive(e,i)})}onMessage(e){switch(e.type){case"flows/add":return this.queueOrDispatch("flows",Mi(e.payload));case"flows/update":return this.queueOrDispatch("flows",qi(e.payload));case"flows/filterUpdate":return this.queueOrDispatch("flows",Vi(e.payload));case"flows/remove":return this.queueOrDispatch("flows",Hi(e.payload));case"events/add":return this.queueOrDispatch("events",Ss(e.payload));case"options/update":return this.queueOrDispatch("options",$s(e.payload));case"state/update":return this.queueOrDispatch("state",Be(e.payload));case"flows/reset":return this.fetchData("flows");case"events/reset":return this.fetchData("events");default:Ct(e.type)}}sendMessage(e){this.socket.readyState===WebSocket.OPEN?this.socket.send(JSON.stringify(e)):this.socket.readyState===WebSocket.CONNECTING?this.messageQueue.push(e):console.error("WebSocket is not open. Cannot send:",e)}queueOrDispatch(e,s){const i=this.activeFetches[e];i!==void 0?i.push(s):this.store.dispatch(s)}receive(e,s){switch(e){case"state":this.store.dispatch(Ue(s));break;case"options":this.store.dispatch(Yt(s));break;case"events":this.store.dispatch(Ki(s));break;case"flows":this.store.dispatch(bs(s));break;default:Ct(e)}const i=this.activeFetches[e];delete this.activeFetches[e],i.forEach(r=>this.store.dispatch(r))}onClose(e){this.store.dispatch(kc(`Connection closed at ${new Date().toUTCString()} with error code ${e.code}.`)),console.error("websocket connection closed",e)}onError(...e){console.error("websocket connection errored",e)}}class Mf{store;constructor(e){this.store=e,this.onOpen()}onOpen(){this.fetchData(lt.Flows),this.fetchData(lt.Options)}fetchData(e){ne(`./${e}`).then(s=>s.json()).then(s=>{this.receive(e,s)})}receive(e,s){switch(e){case lt.Flows:this.store.dispatch(bs(s));break;case lt.Options:this.store.dispatch(Yt(s));break;case lt.State:throw"unreachable";case lt.Events:throw"unreachable";default:Ct(e)}}}window.MITMWEB_STATIC?window.backend=new Mf(Nt):window.backend=new Of(Nt);Pf(Nt);window.addEventListener("error",t=>{Nt.dispatch(hc(`${t.message} ${t.error.stack}`))});document.addEventListener("DOMContentLoaded",()=>{const t=document.getElementById("mitmproxy");Pl.createRoot(t).render(o.jsx(Ol,{store:Nt,children:o.jsx(Ff,{})}))}); diff --git a/mitmproxy/tools/web/static/index-DhPPoJ7G.css b/mitmproxy/tools/web/static/index-D52D4jV-.css similarity index 62% rename from mitmproxy/tools/web/static/index-DhPPoJ7G.css rename to mitmproxy/tools/web/static/index-D52D4jV-.css index 4e0da77b11..20b152825e 100644 --- a/mitmproxy/tools/web/static/index-DhPPoJ7G.css +++ b/mitmproxy/tools/web/static/index-D52D4jV-.css @@ -1 +1 @@ -html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}.resource-icon{width:32px;height:32px}.resource-icon-css{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADtElEQVR42uWXaUhUURTH/7MoNq6Nhjpq0WSlMplOvgm0TWMUkTawsMUSqi9FtCBhEYFUFPSpCFopqYjMyqGopBRDmCidcKBSwyWX0Q+aKw5U6Ez3XnqPyalX7zFR0IHLvfecu/zOOffeN6N2u934m6Im5d8BUCgUKq1WyyUnJ0dRm2dxuVwqpVLpR2s67pue1Xzf00Zq5RSdqq2tze5wOM6LRUBJUqKtra2thAwhc39YCASrNRrN9j+VAn4TUQgiAb4G8NpEDIKInyQAq9XK6sHBQVZzHIeOjg6+7wWQl5cnBsFSLAkgIyPDSxcdHf3TfE9OTvKRkA4gIRLCBmlpaXxEhE087UajkdYUmre5RAAkRULYUKfT/SwC9FrzetkRELzX6/VoaGjg1XRRAYQKeT9gMplEDyQRhUQA5r3nIfM+9eJ9CQDy7/fv2iR9C4RJz1pv40XXE6IAFsflIEufz/Q17RV45XgKauB0ZiyftY7pn3feh62vmg7HoqgsLIld7Qng9gIQ89ry7hIsTZexkyuFm+iuvC6lNrZO+ZszKEo9QklRZj8h6O82n0OhoYTtdPPtKWJ2IV23SkiBJIBnbXewMfkATDFmIaTjX8bg/DIKjX8wNOogJEaYED4tGgGqIOJ5DTR+IQgg+gRtGrSLojCNtPm5kgH6x3swQxMj9DkCQtpE70Dth3s4/WIX2TAYSQQiR18IY2Qm6rorcaZhL9PPJxDmWRsx3T9SOAOSAAL9QzD+eUTov+1/yTZfNnMtTmZVonOkGU0D9ajrsaCq/Tp2LDyG0iXl6BptQcuQDdbeh3jaeQtFSUclAfAhY6F/+P4qEiI4OD+PoazxOHLjt+Fxaxnx1ILD6deQPXszOkeb2ZyqjhuwOh6gmLuIlXEF6CYg+LaWrAjkJ+1Bxbuz2P1oBdPnztmKpXFr4CTnoN/pwP7qbKpm+S5ILGb5HnD2oqRuFdPPm25Efvw++QAadTAKFxzCFkPJd3c7QBWITUkHUZBQ7HX3N8zbj/Vz93m+AzIBxB8aqXZ5APX19aw9NDTE+ikpKWhsbPxuwdDQUAwPD7M++S2J8PDwH0HIe4g4jvPywmw2S31y+TGSAVix2Wy0plGgen5BwWO73c7aYWFhbAwRoR8bG0vb9Esp6yVkJTU1VdTbzMxMEbu8FPju4Hmn5ZOEh8g3EFNk9FcAbiJOg8FwAUAMDQZ8I0pSekn5+CsAl1qtbp2YmCgnv+cCWc58IwrqGIDnogBkEPW4j5b/5t/xV4iXgWA3JaZUAAAAAElFTkSuQmCC)}.resource-icon-document{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADfklEQVR42u1WS0gVURj+zsy9Nx/lq4uvS1nWplCxe70usghFskKEFhK0MRCKFrWoRYt0E7iIiKCN0SaUCFwZQRg9sBZWKmQaEpGJULdIrlrm46ozc5pzdMY7M9f7GO+uPvj555wz58z3f//5zxn88yAwQszJyfGXlZXlA3CEm6IooiAITuYJIeJaP/daO3xM9YKpTxwbG3sfCATaEQYHjBAopTm9vb3dsAF1bkRTSXCflpbWDBMEJAfsIxuZTkJFCkxwIAr6+vq4n5qa4t7v92N8fFxrW6L2+XzauNbmPi8vj3sVzoQIVFVVwYyCgoKocufm5m6YAq64fQV06AtWVFSER8zMMO71es0KCJtVwCJ9YWFhpGgjGedmS4Hi4mIMDg5CA8vtwMCAToRBLV8Eg0FNAd4uKipKngINDQ2GaOrr65mPXnrWPUDslKG2iMGWpfW+pZUNS89gdghYFvk+I+HygzlcvD/HPyLLCs53hnD7+TLmQiYiJmOINwUWOccnJdzoCWFhiYLBvZWES4sP3ygudUnYmwucOQhkplhToYLGQ8Aw6dMPCW2PFmDG0RJRf8+/i2BwgoJhbBJoeQh4soDmKorsVOMeiJvA4rKCc/fmYMbZIw54iwiwHh2P+HQl8HSUomeUgCHwi+DaYxEpTgGtx5bgFKLuASuB2UVrzu42ueDdCdAI+RWJgrr9Mq6fXEE4QisEf0Lr5Ro3gTSnYo2+Yxlvvihs40WsiiejAq50G4/77FS2lpzQJuRsXSLlEU8EFdx6JqkpAUfHa0U1oNFHcWjPago63wp499UYS2GmgqbKRWRs0UoyfgUMdbwjm+Jmo4CrJwhSXdDx4iN7j6th+Pju7TJa6xZw4fA8trlkW2UY8RTLz6Bqfil+zlK0vxKwKPEy1CPbly/j1IElpDgsczXbFAHd3OkULcdlrMhY61PQVr8AkWiqWY5kWwRi3nACWL/2zJSIei/YO4j6+/u5n56e5n3l5eUYGhoynJRZWVlsnD+XlpZiZGREj7akpGRVNbebzU+UAP/hsERSW1sbNdLq6upoCpBECLA7X1eAwbQYj3h4eBgMTImZmRltnLc9Ho+mgJ0U8J/KmHd9TU1NtHG9vYZQPARi/VolNG7C71gEqIp5dfPcAeBhYiA5EAAEAARjEVAcDsdnSZK6CCHpPGfJAWGBAXiJ/zDhL423UWlXBx5dAAAAAElFTkSuQmCC)}.resource-icon-js{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAC2klEQVR4Xu1XTWgTURD+3u4Gbaymbi8mqSL1IjYuScgWJBd7KCo9CQpFj17Eqz2IdxXvih710IMXFbwVJEWoQlpIqIKCIVVIvdik2tKa2maffY8+SLKdJs9UevGDYWZ2dne++clulnHOsZcwsMew6h3GmGnbtus4zhERqxfP80zDMAJCi/O2jkut/PrYpjaajpmFQiFfKpUeEQQkDM65nclkXkAf4JxvK5skpA4Gg9f+1QhEElIUCQD7/SPoDNtVSgqAgBaBqakpqcvlstSu66JYLCrfR2BkZGRHEgAMLQLpdBrNCIfD5LxrtRrdCX0CdCdUglQqpTqikjTEk8mk0IK0inkkAd1OqISRSITsAGNMHdfoAFF9f38/pqenoSBuqogI2LaNwcHBHRcSAKMJ0NXXLxmx9aTfkoCxC7/vdkXrXVBfgT9xKQP+8Ym0sfQFxtubsCYuw3w3Br40RxIEwNsh0LJS/j0HNvdS2ubEJcEW66duSL3v9Sh1bdsjaNFuNVdImy1/hdd9DLXgUVSdW6im7hHX6hEgSSgNSBu/47cRyN1F8FUaXZkrYOVZ8lofdAhgfhLs01Nxo4YOrJ28juWLs1g98xC1wzF0vb8PozLb0RJuu3hYyMP88EDafO0HeOCQtLufn4ZVGMda9AKqx0eJAmgCFvzwtVvaJ66CfXuD4HhUzFxULOOryTuiaik8EMLKwBjWQwPEg0iPQCMJ6yBWz477HjTVyHn8Cp9rTOYvoMMdoJdSJ67fgWw2K+1KpSL9eDyOXC7XUFEoFMLi4qL0HcdBb28v+ZcMANci4Lqur5XDw8NUAiXUUmsTkDIzMyO06IK6ifRVxfl8Xto9PT3yHAHl9/X1Sdu2bUWMaRNIJBI7Vjs0NETEOx8BJX8V30K1LQL6Seh4E362IsA3sRKLxR4DiALwdvETcB7AQisCnmVZnzc2Np4xxg7Ime0OmCgMwCSa8P/r+A9UZe+5GbcPsQAAAABJRU5ErkJggg==)}.resource-icon-plain{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAA7klEQVR4XsXVPwrCMBgF8Jc/BdGtk+AVxM0TeSi9gpNH0CO469pOXRwKDvJ9KgohCeFRVPxKqW/Iry80oMeH8zXA1cvFFP51ibOVOOPg4eCfz1cy9v3LnY/NOgas1vsdiqPhgkAxXg3agkATAqMEIO/OCFQpwIvHgM0BXnwoYOPlUYb8uEG6JMswZSBdEmcCkOIhhfGF4oQIhs/ezYnSFoQVD5kBnAAYkBMc4MV5A07wLXCCA4QgACeEHiROEIAR9CRygjbgH/HKD1Ihv+eSAqr9fIMZBHwsGnQpIP5025oJFHyM9jhkQNei/cu/8x2MBu0IhSW4oAAAAABJRU5ErkJggg==)}.resource-icon-executable{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAvdJREFUeNrkV72rE0EQn9xX7nxJkZDCh42iEp/GKMrrtFLwA0RU7CWdvMpGxH/AToSHaCGoYKPYWGhto4UgBhUtTBk7BY35vlzWmc1tuNvcVy6RVzgw7Ca7M/PbmdmZvQxjDLaSFNhi0rw/MpmMWiwW16vV6nZ3bcrj8VhVFEWnkfa5//NR/Pau4ahI/6mNRqPebDbv+RBQCAQj6YVC4SxLSWiMOY7DRqMRs22bDYdDNhgMWK/XY91ulwzUvPaItWW5Eo2DrNzLtI5kRoYgDclGokCQh5cGIOqkEQCUpQBI4u5/CgBvQ6TxsHXCnhgACWBGA2Y0V+omUSIPiOKG1w9UVeWAwupOKAAy3u/34cHDJwsl6eWL58AwDA6EMCUGQCfvdDp8fvLUmVhDdx+9gI0r531jedWAdrsN+Xyee2MuAORm8gBR78/PWAC1S8f4Pu/45u07wAIElmWBpmnxpVgOAVYyPl8/eiQ0T8Qo8oTkxEgAsCJO84i2JgIglHk75fGNx4CdAFTDATXrgGY68Orm1UBgp68/h5e3LsyASxwCIeDNfNV0DWdHoFk0H3Hl7z/UfbIH1vaBVepNZcVBFgagb7P5qVUTARAbEwCHqwen+4T7c6vtmfCEvTsSAzDyNj819wAa13SbK61//OSTLe/dA/niL58HZF2xAOSCwj2wMpwYNmxunJiUVvavzXjg9olrYSFI7gFZyLCGE8McAM61SWZ//vLVJ7t7106frJSEkPoWPKvd8CkTV42STr5+Xtm4EChJcyCqYMnsDV+qHBCbRRO5s3k/dS9we8D8hYjHHZvIoUoZWq0W4LvOdzJ57o05McnmcjnQdT0dAGoepmlCqVTiikQ5DWq7QQ8ROjmByGaz0/fBXIWIABB6Mk7NhJIr6KRhryG3+6UPASkh5ASCOtk8j88wTyH1ExeitO8+eV2i33EA6PuiU6lUKO13BL3hFvgE/I78Iw7AGN39DRPuKcZwJShmKSlDB8PxddDC//11/FeAAQBAYeksv+aJbgAAAABJRU5ErkJggg==)}.resource-icon-flash{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAztJREFUeNrkV79PFEEUfjt3B4f8CHcxQSOJwURp4GxOGkoSSPQvoCKxI3RUFFpqSei0VwpDQwJ/gB1HYowxpw1YcUTxNEiA29vdmR3fG2bMsizHsnuEwkkms7szO9/3vvdjdi0pJVxnY3DNLRu8sSwrUywWH5VKpVt67l/3fT/DGMvRSOv0czWa++Acjiz0LLO9vf2pVqu9OsWAXGA6tlyhUHgsEzYEk0IIyTmXnudJ13Wl4zjStm3ZaDQI4GkQj3q2XVIiOIQ3D3aax5Zv6YIkLQzSigQp3DYCrSxtQYC1hUAcua+UAGZDS/Dz5ol7IgI/enqgoQuWS7vQhnSNo7As4AgqPA88muvoUHN1nHtSr7dHAQc71/Q9TYRGesZdF2whAAYHQSK42NkBSQr09Z1xBZWaRJXQgHkBFQR1BHf6+2FgaQnK1SrcX1yEJiqBaGpjIhDsUQSycQJOgYVc4HMOzXwe7i0vw92pKeB7e/C9sqEQfLPurAIQm8CpwNIWc+17UqOJBIpzcwq8vr4OH2dmwPmzD6yzU63jERlB28ZyQVg6B18m+YkEBZpAcNnbC4Ozs2rH/cNDyI2Po8AMXHoH11oB8Eu7ICyd0OBcm4C1HromJ6F3eFip82B6Gm4UCrCxtnayQSYDPmZHcJ9UBHggC4TjQAPHIbSedvv28gUcV7/Aca2mgPHkO0nHNDEQftEz0uNzG9NrYH4ebk9MwO9KBb4+ew42rqHzluVy4CIB8ivH1ExMIBw8ZA1Hy9noKDxcXYWbQ0Ng7+7C1sIC+JgJOUw9gbnf1C5SSoVccB4B1koBEzxkPQWihRHejbn/8+0b+IAxUN/cBIYETHCCdpWJlYg6cHkXqDqgwW0sNpVyGdyjIwVqZbPQxGsfrbd0qkrdRbtigK6PtIU+Sk2u8BGYgo2TzEZyE3g61A8wNSPqQLIg/Dw2pgqLySFxEihgKovQcWKOO0ZzXV2nXHleIYpFYHZlJdE3QEQdSEYg7idXjE8yKxWBtCRSK5CGhG7NRIUoDYlQO7iIAP1fHI+MjLzG6ztR33ApfgF3sf+6iACmeHYLT7t3mOfdUT5L2CwyDMf3URP/99/xXwEGANgxwaTRsGhXAAAAAElFTkSuQmCC)}.resource-icon-image{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3JJREFUeNrkV0trE1EU/uaRJjZN0iTWthZaq1hclEgXRcGdbsSFP0LwX7jwV6i4c6l/wIUI1qIVIigKSjVUKE3TmvSVxkzmced6zkwS0jS0maTShQcOd+5j7vnudx5zR5FS4jRFxSmL3tpRFEVLpVLzmUxmrD7XVNd1NVVVQ9zyuvq41zb6rXPUqm1jWi6X+7y2tvb4AAJ2QUNJQslk8o7sUciYFEJIx3GkbdvSsixpmqY0DENWq1U2cK/VHqt+UlSScbRv3qo8TxI50gW9SLuRo0AwwycG4KiTHgFAPREA3dD9TwFQNhxgop2Z9mcKRlBQetgDAbAsgdXNvU4cgGOK93el23Z6Zkg05zKXxz3A9SAMxsB6qYwHj155G2iqxGBEoGqqMC0JyjbYQnit4wh6duGwOq43zi33s8/uN93GpSYQAF1TcXZ4EAMUu3NXKrh+NY1f+SLefQqjUNR9g6SC1CaDwvXb5phwm27oCQCVPgwPRTA2UsOtaxdxPj2PydE8GXiPhWzMM+IbIxaYjVoZwiZ/6wkPjHMYAAIBUFUF8WgY0bCg53pwURPWNSRoXLjsc+kBYYN7Wx9h7heRvHATNtUccRiA7AoAL6b6TSoRI0O2E8KXHxswL7zExpaB9WKSgEUoyHwAvL68tYrqTh6VSgVG7i0m5+4eyIZALuDFmqZ5DCSifvXc3plGtmwRrTqFMrkm1oh6Ckai/dviImoWB6EDZ3cdo6mhAwUrMAAvdYjCdDziseHLGX9D3tj105H9/GHhNbZLm0iNjKNWLePc+BTGU9FOHzt0DYDFNC0sZb/7sBlEw5/U2HRSo2bDMmvYWFmGMpDEzm4V6kAce1UNi0tfvbW3b0y3MtAdgAZirl6/S0WPAS/YaBPLcjzj3G9mS2IGO6U8nb5CzGlQqK2IZQzF0+0uCMaAUTORW1ntqjwroTj0SAj7uxuwLQO2SwXLRn8AHMdGaasU8I4Vg206VDEFDKvUOwB+KUT5PjWR8tNXtiZxa7/TXLzZ5334YxQYAOvMpUm8ePqw669ep76u6ygUCsELUblcDnTb6fJKJgO5oBcjx1zJlL4A9Auibwb6AVGXWteF6KRAtMnecQD4/+LP7OzsE3qe6HSH6+MXME9aOg6AS2nzk75oz6n8Rjv5rEdR+GCkbzpN/N9/x38FGAA04HAMRDx3awAAAABJRU5ErkJggg==)}.resource-icon-java{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAv9JREFUeNrkV81rE0EUf7NJaEpFSSChYooIxVPJwQ+wJiePHsWb4sFrT/4X0pM3/QcExZsnEUETWpFSSQULral6SUGw0Gya3c3X7vjebGa73W63m0mgB9/mZXZnJvN+83sfmWWcczhL0eCMJel/YIwlstnszWKxODsc89RxnISmaSlqad6wX7Ty2T+GrRboS+zs7Gw0Go3nRxCQC6SipDKZzF2uKGiM27bNB4MB7/f7vNfr8W63yy3L4qZpkoHHfnukyUlRicYhuLhfaRwlHekCFQkaiQJBDE8MQNROIwBoEwEQh+6JA6hUKrGAYRBCqVQ6CYAzFgNlXBiYSFeZtp5hTFFYX/8KzWYTVlZXYPHWYiwGtJF8jpf4DKunbMk4CaYelMtlcGwH1tbWBDC/goCvwIDfr4IBzgQYYoD6JBOGYUC1WhX35IpgLCgB8C+CX/D5+2+YTk/hSswDJ4Dglc5dhvn8OcACBD/q9TAAEBtAMKq9xewBXLs674Ez1l/CzI0Hwg0rtS2YvTgrxra2t49lBAgHxoiBoO/8C1mdLmCpFf7WPz6DvsPA2Hwn+mgsjL2oGIgFQKYXbcK0LEEx1nhw0Ch8ewX23G3AWi/GJNUyBvwgYsdAWCGRfQYa6nQ68LZag9TeFPALDyG/+Qt+7v6F89NJESfctwmlGDgJAC1umi4DhXwGaq0rwHoMCgk3JGnM9TSPDUCLSju/ko+pf4DUtswuag/mclko5DLwZ9+A+3eugy1TFT80P6QOjMZAGBP7egs+fNk4FtBv3q+C3m57tSLs90oukPe6rguTTx7dcwsPqmhA3rsqY4DmTxTAwcGBuzhzN88kB6IyHuWDxmh+SB1QC0J6pjQTVQ8v7lk8RHMIwu2j+UFXhhWi2FnQRv8+XV5WPjcMg1AdwNLS0sgHEeU/oyhDqqehsV0wLoihdGIBGHengcDzi34aAHq/MBYWFl7g/aWwM9wYr4C7qHunAXCSyWQdy+hrLCozYT5TFEYbw/ZT2MD//Xb8T4ABAGtLxURbEDriAAAAAElFTkSuQmCC)}.resource-icon-not-modified{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA9JJREFUeNrkV7tLo0EQn++7JGJUjMYHGgUxCioiiohgJ2gXtLAxKNeICIJYyOE14vkHCNdZKGojWGqRTrGIxSGKnkUKH+DrLMRLoha+YnI7w7d7m3e+zwOLW1hmZne/md88drJRIpEIfORQ4YOHSRYURbEUFhZ+bmpqcjLRzKZFo+ZwOGxSVdXC6Cd2zqR9+wn3mIzUpO0hj1TV1lRtTT05Ofl5dXXlTgoAZZYSx9bW1lcj3mA6E00GgqjVav2RMgLvGdxIKhBsWHUDuL6+hvLycsFnZ2fDw8PDXwUmE7y+vgojubm5tI9yfn4+5OTkCBBaSvUBmJ+fh+npacEPDw/D0tKS2B8aGoLl5WUhDwwMwMrKStQ+AtEAqIZuwcXFBU0ceXl5MDU1Rfz4+DiUlpbC2NgYyZOTk2QMx8TEBFGMBkZGS4FqqAZkj0mLqvJbQzyXkeIajtnZWaJlZWW0rkUgbAgAT8HMzIwoOF71kneiEHGMjIyI/Evr6rtvgWyEG5cBcJ5dubibgUGL1afIrZiFz1pQUPDF7/d/42uPj49U+agM+aysLFKGvMViEcpj95CPBVBcXOxh1KUrAqjo7e2NFKBBrpQbl+VYPkEEIOMU8I8CgQCcnZ1BMBiE2tpaKCkpEXt4M5A6HI64xsNaLtjtdjCbzTKASEYAZOTr6+u0htdrcXER+vv7obKyElZXV6O86uvrE9/4fD7Y3NyE3t5eamJS3Si6AaBintvz83OKBO7f3NzA6Ogorc/NzcHl5SUZOz09Ba/XS/1CTpFWnEpGjUiubszn4eEhGUEgTqeTQLCCEmeKiorg7u6OQG1vb0NPTw+1ZFlPshpICwAn5rijowPu7+/h+PgYnp6eonoA8ri2trZGjQf5l5cXuL29JV6+nhkBkJXjxHDW19eT9+gpeoxg+D62Wyw4nMjv7e0RPTo6ijqX8S2Q87awsAANDQ3kCXtQQHd3Nxl6fn6GjY0NOo88e8iAy+UStePxeKC5uRlsNpvxFOBH7e3tQmlXVxdUVVXR1RocHKQ843S73fSzLEetpqZGdEPDEcBZV1eX8HWDIFpbW6OiJZ+rrq6OW9cNYGdnh3jWmknGkO7v70cpxP6AzQpl9pak9CR7kuluRG1tbXFeYA0kM5DMU6kP6O+Eu7u7RDEK8s8w9/jg4IB4LDY8w/dRrqioIB4L1HAnbGlpSeltZ2dnyv13pSDdM1vPPv91zwiAUSNJvJaHPx2AMPso0NjY6GO8PVHIDA7M/W82f6UDEGINxRsKhfDvlO1fAmCOBRn9nvJJ9l/+O/4jwAATI0GMJl2ikwAAAABJRU5ErkJggg==)}.resource-icon-redirect{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABDhJREFUeNrkV01MG0cU/rzsruO1zRo7xrGxCkqqkhACRogLVRtxoFWbVo16q1AiRQhxQqhCEbkgyqknpCSHXDjABfXWVqpIpFYVSKhqhKhMkjahqiM1xBiigJfUgBNs7M4Mu9s1mPUPkXLok0bvvXmeed97b97M2pLNZvEmicMbJt6oWCwW0e12X25qajpFVIEMUeVCJpPhOY4TCa8gv+PVtRXURnTKedVGZco5dY5T57hIJHIvGo1+cSgAqpOS1ExPT18rJxpaznyDgGBckqS7phk4CmlOzEAQkkoGEIvFEAgEdNlmsyGRSPy3Ac8jlUrpThwOB7NTXZZl2O12HYRa0tIAjI2NYXh4WJd7enowPj6u27u7uzExMaHrXV1dmJyczLFTICoArqwuWFpaYoOS0+nE0NAQk/v7++Hz+dDX18f0wcFB5ozSwMAA4zQbNDNqCbiyzoAxYrYLx2ldw2RNp5zOURodHWXc7/ezeTUDmbIAaCUYGRnRD5x26g3R6QeRUm9vr15/wzx35C4wOtGcGwFoMmm5A51Bk7Z/P4vxKibpk6qqqq7G4/GvtLlkMslOPt2MylarlW1GZVEU9c3326i8H4DX650i/JOSMkA32t3dZRtQh9qmmnOjvl/OkwEUXQJt0cvtFJb/VLAW3UTtOTfcAUm3JdZfYiXyD062ugvegiqAbFFtaKzt/Z+f4rfbT5izqZsP8GBmmc3f/e5v3Ln1EKuRF/j26/vMblxnzIDhbFiKyoAR9dnzfoQ+DKp6BuvRLWZ/NLuKi9fOwe4ScPvGIyz9oWAnuctG6KMTUFaSuHdnBa2fBWCT+fIB8FYOa08TmP3mMTbjr3DhywaS9hd7J13duOZMJXNcG5Lx063HkH0i/vo1Dv9pB45VVuR0TskloENyiWjuDMBeZSWRPyNzuW2ogZVkgUTsx/z3MbKGR/177gOtWhQAY93o4K0W1DTICJ6VEV/ehnzCunfNxvfqTtOtrdna2IFAsra1kcKr7XRBAKYloHxmIkIiFyEc47D4y3PUtx9nDrx1doSnaKQCYosJnH7fAyWWxOLMGtovBfH7j88R/uEZWj+vNm1D0xLQRe+86wVPnG8qO2j5OICGjmpmO3+lDv56JzsjH/SdhLNaxMZqEqFPfXB6BTRf8JI5AVtkXdkZYLdXnYTjtba8ff1Wc2VOtmoaHbpsdXJ4u13OCaZkAHNzc0wmVzPTQ6EQwuFwTkrp86soCtPJtyQ8Hs+hl1G+i8gUQFtb24GoOzs7TW+7fJEaPsmyJZdgfn6ecZoF4zOsRbywsMBkl8vFfqPZqR4M7l1g5Ev70NewIICWlhbTaDs6OkztRypBMQ9MsXbtdS8KQLlODonaSPFCADJkkdLY2PiQyJ58KSuTaO3XyVguBCBNvvNn0+k0/Tvlep0ASGAbhF83/ST7X/47/leAAQBGWDbA0N7wPgAAAABJRU5ErkJggg==)}.resource-icon-websocket{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAkNQTFRFAAAAAAAAEhISQEBAQEBAQEBAQEBAQEBAPj4+QEBAPj4+Pz8/Pz8/Pz8/Pz8/QEBAQEBAPj4+Pz8/Pz8/QEBAQEBAPj4+Pz8/Pz8/GxsbAAAAERER/////v7+/f39/Pz8+/v7+vr6+fn59/f39vb2AAAA+Pj49PT0AAAA+sr29fX18/PzAAAA/7/5/wDm/w/n/b33/Kz0/Jzz/xDm+nvu8vLy8fHxAAAA/9/8/3/y/Nz5/Lz2+7v0/h7o99f096fw+Ijt8PDw7+/vAAAA/x/p/r74/o7z+9z6/V3t/1/v/6/3/z/s/Y3y/X3w/i7o/F3r9dXy/3/x/k7t/l7u/X3v/U3s/T3q9+f2+1vs9pbt7u7u7e3tAAAA/2/w/zDq/m7w/Ezr9NTx/R3n79/u7Ozs6+vrAAAA/n7w/j7r+5vy+qry+nrs93fq8bHr6urq6enp+7v1/h/o+bnz+Ljy+Jju8uLx+zzp87Pt8NDt/C3n/g7m7Nzr6Ojo5+fn9ub19eX09bXu8eHw+zvo8pLp5ubm5eXl7s7q76/p4+PjAAAA5OTk4uLi4eHh4ODgjY2N1dXV0dHRi4uL3t7e39/fhoaGbm5uvLy8uLi4hISE29vb3d3d3Nzcg4OD2NjY2traurq6tLS02dnZdnZ2yMjIdXV1gYGB19fX1tbW0tLS1NTUrq6uw8PDwsLCwcHBq6ur09PTiYmJysrKxsbGiIiI0NDQAAAAAAAAAAAAEBAQERERERERERERAAAAAAAAFBQUEBAQERERzBhqngAAAMF0Uk5TAAM4UFRYXGBjaGtucnV5fICDhoqMkJOWmWkFSv///////////2L//2r///9v/////////////3H//////////////3P///////////////////////////////90////////////df////////////////////////////////////////////92/////////////////////////////////////////////////////////2xdBD+XsrBJAhpAS89MUjoAAAIASURBVHicY2CgBmBkYmZhZWPn4OTi5uHl4xcQFBIWERUTl5CEKZCSlkEBsnLyCopKyiqqOBSApdWUVdQ1sCoAalfUBEprqWvroCjQ1dOV0deTNdAzNDLW0zNR1zY1M0dRYKFnKaOnZ2WtZ6Nva2fvYGrm6OSMaoWepa6+i6ubnrueB9gCdBNkXDy9vL19fPWU/PT8A7SxmODtHRgUHBIaphweoacX6egUFR2DqiA2Lt4XKJ8AND0xSS85OiU1DUWBXLpeRmZWmG02yPQcvdzUvHxkBUDfF+gVFhXr6ZWUlpVXVFZV59fUIlkBCjwbPb26ej29hsYmPb2q5vyallYkE6BhC3Z7VEpbO1B7S2tHJ0KBEiRsQdJAx4Gluzq6kRRAQ8YRJJ0HMh0o3dOLpABiem1fP0h6wsRJIOnJk5AUgE1vmTJ1Gsj06VNnzARKz5qNpABkeuuUqXAwZ+6s2TPnISkAuX3G1PlgtwNNXzB1zux5C+ciKQA5bsaiCWDHAU1fvGTpvIXLliOFA8jtvXMQVixdMXfZ8pVIIZkHctykOVNXrV6zdu26qUsnLFvev3I9kgmQkJm5YSPQ7TM3bZ4Akl4xAckEaMhMBrl9Ich0oPSWLVsRClohITNrNlgaqB0ovWXLNpiC7Tt27tqNAXbt3ANTsHff/gPSGODAfgbqAACmh/JxEXYKVQAAAABJRU5ErkJggg==)}.resource-icon-tcp{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAeNQTFRFAAAAAAAAEhISQEBAQEBAQEBAQEBAQEBAPj4+QEBAPj4+Pz8/Pz8/Pz8/Pz8/QEBAQEBAPj4+Pz8/Pz8/QEBAQEBAPj4+Pz8/Pz8/GxsbAAAAERER/////v7+/f39/Pz8+/v7+vr6+fn59/f39vb2AAAA+Pj49PT0AAAA/+/v/t7e9fX18/PzAAAA/z8//wAA/2Bg/h8f+9vb/j4+/S4u+Xp68vLy8fHxAAAA/8/P/7+//y8v/n5+/Y2N/IyM/T0997e3+1tb9paW8PDw7+/vAAAA/w8P/9/f/l5e9OTk+Wlp/b29/X19+zw887Oz7u7u7e3tAAAA/V1d/Dw8+zs78rKy7Ozs6+vrAAAA6urq6enp+3t7+YqK9re3+Wpq8eHh6Ojo5+fn9eXl/Cws8cHB5ubm5eXl8sLC4+PjAAAA5OTk4uLi4eHh4ODgjY2N1dXV0dHRi4uL3t7e39/fhoaGbm5uvLy8uLi4hISE29vb3d3d3Nzcg4OD2NjY2traurq6tLS02dnZdnZ2yMjIdXV1gYGB19fX1tbW0tLS1NTUrq6uw8PDwsLCwcHBq6ur09PTiYmJysrKxsbGiIiI0NDQAAAAAAAAAAAAEBAQERERERERERERAAAAAAAAFBQUEBAQERERcTpMiAAAAKF0Uk5TAAM4UFRYXGBjaGtucnV5fICDhoqMkJOWmWkFSv///////////2L//2r/////b/////////////9x////////////////c///////////////dP///////3X/////////////////////dv////////////////////////////////////////////////////////9sXQQ/l7KwSQIaQEvOHw6iAAAB7klEQVR4nK2Q6V9SQRiFMS3TyqVcKhFUrpCCvCYKqSUiuGuoIJorWNxsMW/oLXZFBdwtRXPJ9E91ZoAYXL75fj3PPHN+RyC4jUu5k5p29176/YzMBw8fZWXn5D5+kpdfUPj0WRx4XiRMumKRuKS0TMKU3wCQWCphZC+uAyoqRWISy2WKKhpQAjplRTXAyxoVQG2dQq15RQP1DdDYUP8a3tQ0SbXQrIMWvaE1+QtQCoVtjbiAChg56C4ZCNAOHbifFmSd0HWNobgbenA/LdT1wltjX/9lQFwCA7i+CUzmwT7L0HASIAJVaVlbLSNTqE1gMFqG3o3QABoPVFLJKIyNT0yaAT0fsdqoL3B30DLyKR3A+w9mQM+tdpYyxLZF40x+JHarzc5Of0oAsW01eoMxarezn6e/UACJ1Ro9jokdxV9nKIDY9bZvszjmvjtwPOegAGK3z/M/sP0n73Sh2O2hAGxn5/n/5/W5PS4/BaByFie/QLoj+yLv9fgDPgrA5ZxLHCmH7MsrQX8gFKZ2wN1nvIkvgqu+UHiNWpIs4/Dy6xubW1vbfJALhWfXdihDdBnXr9+ou2t3j8PxKkcZYsvM4e4BbEdxJLKfANjoMm4PidFzFEciB3Hgz+HR8cmVOz76GwdO/52dF1258zPB7dwFbUXIeSfgDeUAAAAASUVORK5CYII=)}.resource-icon-udp{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADb0lEQVRYw+2Xz0tbWRTHP/e9PBMpbckvFKtboZBmN0hLF25cKNLoQtHqaqD/QWEK/Q8GunY2aZCoMEjdtKUgLgak0O6G4q4uGiQkxEJji0nU5J5Z5Nfz+WJeM9nNHLhw7z3v5nzv95zzfS/wXzflWJuhUOiXeDw+DPjsQ2ttGoZhaa1NpZTZ2DcBX3Nt9ymlDMeeeXh4+Hc2m127DpAVDAZnpEfTWkutVpNqtSoXFxdyfn4uZ2dnUi6XpVQqCfCrM6CvX1RqrRGRjkNrDRDoOwBnkOtAAJbzvNHxl9+8AaXg0SP49Kk+VwpOT2Fvr7VWsRjGkyfw/j0igrG3hz8QIDA4yGA8TuDpU9SXL00GDO8AutwagAcPqG1swMuXmI8fIz9+QMMnExNUNjYw1tYYePWqvwCUajePunWrPslmMcrlOjPNZ27frgc5OcEwDADdXwYaxdfar9XaDIjAt2/1ud/fPwa01q0giCA2AM0iBFAfPxKYmkISCSozM00AqqcuEJHWSS2CoXV93W6v+nNatwDJxATFd+/aXfDTAEyzfUs7AEDZUnCJAREMGzvOtnSzjgBkeLgetFhEvn+v7yUSaMvCsAVVxWJrXrMszKbPRRsA8VQDWmv0vXvo16+Ru3cxnz1DP3/O+YsXaPttPnzA//Ahcv8+Z6kU1Zs3rxRoE0SnGlAu74KpQqHwtpOcXie13aR4bGzsN+D3rinoNZAHKfZWA15u04vPzYxObdfMm32USiWSySS5XO6KL5/Pk06nqVQqrmft7eqpCJ0gSqUSqVSKTCbjCiCXy3F0dMTW1lZHEF6+iKxgMDiVyWTe2iktl8usr6+Tz+c9qWU0GmVhYQHLsi6lYHx8/OeLUGtNKpWiUCgwOztLPB6/NucHBwfs7u6yvb3N8vKyUwd6K0KAQCDA0NCQa5HZ9yKRCP7Gy8eeyk5C5AnA6uoq6XSaZDLpKQXhcJj5+fkrTPYMYGBggJWVFTY3Nzk+PmZycpJoNHqJoUKhwP7+PuFwmLm5OSzLcmNS9awDlmWxtLTEzs4Oo6OjRCKRK/6RkRGmp6ddg/+rFNiDLC4uXspvc4RCIRKJREcxaljFEwCv2u7F77CTbgBERE5jsdgfwB23b7gezQCywNduALTP5/tcrVb/VErdcMtZr38BReQU+Iv/zWH/AMyRVKUN0udlAAAAAElFTkSuQmCC)}.resource-icon-dns{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAD4ElEQVRYw+2X3U9bZRjAf+e0p8XJR057KpOCEmJIFkkTQbNME2VGVAwJIxEGwtWyJf4DzsTEC6NRs/0BMyZNhxUSQ+BuN0TJJkOd2QguZFFBYiGspBwyGLaFtryvF6WklH5RuNMneS/O87znPL/3+TrnwH9dlIxri8PheMnj8ZwErOlLCGFRVVUTQlgURbHs6i2ANXWdblMURc3QWebn52eWl5ev5QPSdF1/R5YoQgi5s7MjE4mEjMfjMhaLye3tbRmNRmUkEpHAhUyH1uMKpRACKWXOJYQAKDt2gEwn+SAA7dgA8p00D4BaNMDCwhqffHY3WZkWhWefeYKWZhevn23g4cMNPv18GsPQ+Pij05w4oTE1FeC6f4H3LzUSDseYuBkktBqj5mk7ly6eoqLclhVALXTSF1t0vr72Bs0vGIyMBhj030dRks1jmnFGRn9HUZQ93dTPQfzDf+Ny2bnyxWneaqtFClBVFUAcGgDAalU529oAwC931jDN8J7t9pTJnV+XUiHmwYN/AJj57TGjY3/gdpdTVWVPFaFaEgBAebkdTUuecn19C4DWVw1chsb1b+ZZXNxM6l4zsFqS+27/9Igvr97HNMMpAKUkACklm5tR4vHkKXVHspsqKmxcvHCKREIycWsVgIaGSi5/8DwtzVUARKOCublHRwGQbMcSfP/DAgBvv3mSygr7Xu/X1VVy/t26vd23fgwS296ht+c5XEay63TdlgKg6C5I5fTuvXXuTU9Q6y7jvd56Xnm5jsWl9d09yX1nzrj5c+4x0zMb2Gwq3w7/hbkWp/opjfPdNdTXV6YAZKF3gabreptpmjcO09+F7Cmb2+2+DFwtGIFcDyvGSYFRrBSVglIdFTGKOTLAUSCyiZqrAIUQB1YkEsHr9RIMBg/YVlZW8Pv9bG1tZb03Vxeo+SKQ6dzn8xEIBLICBINBlpaWGB4ezglRzBeRput6WyAQuJEe0mg0yuDgICsrK0VNTZfLRXd3N5qm7UtBY2Pjh8CVQ9WAEAKfz0coFKKjowOPx5M357Ozs4yPjzMyMkJfX98+e8lFCFBWVkZ1dXXWIkvXGYaB3W7fC3u6PdsgKgpgYGAAv9+P1+stKgVOp5Ourq4DkSwZwGaz0d/fz9DQEKurq7S2tuJyufZFKBQKMTk5idPp5Ny5c2iali2SpQ8iTdPo7e1lbGyM2tpaDMM4YK+pqaG9vT2r8yOlIN1JT0/PvvymlsPhoLOzM+cw2pWtogCO+vLJKLx02SgEIKWU4aampq8Ad7ZvuBJFBZYBsxCAsFqtc4lE4jtFUZ7MlrNSfwGllGHgJv9LhvwL9JSHUqlHDc4AAAAASUVORK5CYII=)}.resource-icon-quic{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAgpQTFRFAAAAAAAAEhISQEBAQEBAQEBAQEBAQEBAPj4+QEBAPj4+Pz8/Pz8/Pz8/Pz8/QEBAQEBAPj4+Pz8/Pz8/QEBAQEBAPj4+Pz8/Pz8/GxsbAAAAERER/////v7+/f39/Pz8+/v7+vr6+fn59/f39vb2AAAA+Pj49PT0AAAA9fX18/PzAAAA//Pn/5Ap/4QR/86f/5w//cyd/cud/aBI9/Lt993H/oMQ/3wA9tCu8fHxAAAA/3sA/7Rv/9m3/ps+9+vh9end+LqA9c+t97l/7+/vAAAA/8GH/6hX/4MP/pw++Ozi+7Br/oIO8vLy/Jo8/Jk88PDw/Zs9/Zo99enf7u7u7e3tAAAA/5An/sCG8+fd/Y4l7Ozs6+vrAAAA/+bP/fHl/L+E+dSx+6RT8ebb8tnC7uLW7tW+6enp/rNu+eDJ8uba7+TZ+aJR+Zc55+fn+uHK/LBs6urq6Ojo5ubm5eXl4+PjAAAA5OTk4uLi4eHh4ODgjY2N1dXV0dHRi4uL3t7e39/fhoaGbm5uvLy8uLi4hISE29vb3d3d3Nzcg4OD2NjY2traurq6tLS02dnZdnZ2yMjIdXV1gYGB19fX1tbW0tLS1NTUrq6uw8PDwsLCwcHBq6ur09PTiYmJysrKxsbGiIiI0NDQAAAAAAAAAAAAEBAQERERERERERERAAAAAAAAFBQUEBAQERERO29ZqAAAAK50Uk5TAAM4UFRYXGBjaGtucnV5fICDhoqMkJOWmWkFSv///////////2L//2r//2///////////////////3H/////////////c/////////////////////90////////df///////////////////////////////3b/////////////////////////////////////////////////////////bF0EP5eysEkCGkBLwAnvMQAAAfpJREFUeJytkGlbUkEYhsnKyjJbtXQO60nSNGlz1ElapMyMQIJK07TVVlrAJfWInmI3KkAryxL3Sv9jMwPIy2V98/163/PMcz0KxXrchpyNmzbnbtm6LW/7jvydBbt279m7b39h0YGDaaG4BGWdoFSpNVqdeOg/AselOlF/+J8Cfc5xmb78CBQqKo9WIWQQlMeOa06cFE9V45raOiiQ0/WkHmGV2mgsxWfOknPnG0wXgHCRINR4CWFB2WTU4MvNV/Tl5qwEgwGhKryacNVirrVmJSQFJdZoW2wivmaxWE12x3UgNN5Awk2ixlqdzabHrZY2u+NWewcQbpNOFenSkjsiuWvG9+6TB+0Pu6EgPMIEP9Y1E4KfWPFTxzNCnjvBF2y8Fy9xGetuZemvul+73CAhtS3DJjvHTpe7pzcjpLZlmD7nuK+nHwgcw3SK3wwAIZnuHBxiWBr2MDziAQJPd43Kb1n6O9nro9gfAAJLd4/KqxcM+QO+MBBYd688xrvT9PdyMBCOhIDAynk/SLwcTf/4KRqOxOJgB9Z9IJj5IjoeisUnwJJ8GU9Q/vzl6+TkNzkqxeJDE99BQnIZ39QP2t33c1pieFwCCallRlj3CEunOJGYyQju5DL+AMf0OcWJxGxamJtfWFxac4sLv9LC7z/LKyVrbmVZsT73Fy8u3GKpKoI/AAAAAElFTkSuQmCC)}html,body,#container,#mitmproxy{height:100%;margin:0;overflow:hidden}#container{display:flex;flex-direction:column;outline:none}#container>header,#container>footer,#container>.eventlog{flex:0 0 auto}.main-view{flex:1 1 auto;height:0;display:flex;flex-direction:row}.main-view.vertical{flex-direction:column}.main-view .flow-detail,.main-view .flow-table{flex:1 1 auto}.splitter{flex:0 0 1px;background-color:#aaa;position:relative}.splitter>div{position:absolute}.splitter.splitter-x{cursor:col-resize}.splitter.splitter-x>div{margin-left:-1px;width:4px;height:100%}.splitter.splitter-y{cursor:row-resize}.splitter.splitter-y>div{margin-top:-1px;height:4px;width:100%}.nav-tabs{border-bottom:solid #a6a6a6 1px}.nav-tabs>a{display:inline-block;border:solid transparent 1px;text-decoration:none}.nav-tabs>a.active{background-color:#fff;border-color:#a6a6a6;border-bottom-color:#fff}.nav-tabs>a.special{color:#fff;background-color:#396cad;border-bottom-color:#396cad}.nav-tabs>a.special:hover{background-color:#5386c6}.nav-tabs-lg>a{padding:3px 14px;margin:0 2px -1px}.nav-tabs-sm>a{padding:0 7px;margin:2px 2px -1px}header{padding-top:6px;background-color:#fff}header>div:not(:empty){display:block;margin:0;padding:0;border-bottom:solid #a6a6a6 1px;height:95px;overflow:visible}.menu-group{margin:0 5px 0 6px;display:inline-block;height:95px}.menu-content{height:79px;display:flow-root}.menu-content>a{display:inline-block}.menu-content>.btn,.menu-content>a>.btn{height:79px;text-align:center;margin:0 1px;padding:12px 5px;border:none;border-radius:0}.menu-content>.btn i,.menu-content>a>.btn i{font-size:20px;display:block;margin:0 auto 5px}.menu-content>.btn.btn-sm{height:26.33333333px;padding:0 5px}.menu-content>.btn.btn-sm i{display:inline-block;font-size:14px;margin:0}.menu-entry{text-align:left;height:26.33333333px;line-height:1;padding:.5rem 1rem}.menu-entry label{font-size:1.2rem;font-weight:400;margin:0}.menu-entry input[type=checkbox]{margin:0 2px;vertical-align:middle}.menu-legend{color:#777;height:16px;text-align:center;font-size:12px;padding:0 5px}.menu-group+.menu-group:before{margin-left:-6px;content:" ";border-left:solid 1px #e6e6e6;margin-top:10px;height:75px;position:absolute}.main-menu{display:flex}.main-menu .menu-group{width:50%}.main-menu .btn-sm{margin-top:6px}.filter-input{margin:4px 0}.filter-input .popover{top:27px;left:43px;display:block;max-width:none;opacity:.9}@media (max-width: 767px){.filter-input .popover{top:16px;left:29px;right:2px}}.filter-input .popover .popover-content{max-height:500px;overflow-y:auto}.filter-input .popover .popover-content tr{cursor:pointer}.filter-input .popover .popover-content tr:hover{background-color:#c1d7eb80!important}.connection-indicator{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;float:right;margin:5px;opacity:1;transition:all 1s linear}a.connection-indicator:hover,a.connection-indicator:focus{color:#fff;text-decoration:none;cursor:pointer}.connection-indicator:empty{display:none}.btn .connection-indicator{position:relative;top:-1px}.connection-indicator.init,.connection-indicator.fetching{background-color:#5bc0de}.connection-indicator.established{background-color:#5cb85c;opacity:0}.connection-indicator.error{background-color:#d9534f;transition:all .2s linear}.connection-indicator.offline{background-color:#f0ad4e;opacity:1}.flow-table{width:100%;overflow-y:scroll;overflow-x:hidden}.flow-table table{width:100%;table-layout:fixed}.flow-table thead tr{background-color:#f2f2f2;border-bottom:solid #bebebe 1px;line-height:23px}.flow-table th{font-weight:400;position:relative!important;padding-left:1px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flow-table th.sort-asc,.flow-table th.sort-desc{background-color:#fafafa}.flow-table th.sort-asc:after,.flow-table th.sort-desc:after{font: 14px/1 FontAwesome;position:absolute;right:3px;top:3px;padding:2px;background-color:#fafafacc}.flow-table th.sort-asc:after{content:""}.flow-table th.sort-desc:after{content:""}.flow-table tr{cursor:pointer;background-color:#fff}.flow-table tr:nth-child(2n){background-color:#f2f2f2}.flow-table tr.highlighted{background-color:#ffeb99}.flow-table tr.highlighted:nth-child(2n){background-color:#ffe680}.flow-table tr.selected{background-color:#e0ebf5!important}.flow-table tr.selected:nth-child(2n){background-color:#c9dcee!important}.flow-table tr.selected.highlighted{background-color:#7dbffc!important}.flow-table tr.selected.highlighted:nth-child(2n){background-color:#5fb0fc!important}.flow-table td{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.flow-table tr.intercepted:not(.has-response) .col-path,.flow-table tr.intercepted:not(.has-response) .col-method{color:#ff8000}.flow-table tr.intercepted.has-response .col-status,.flow-table tr.intercepted.has-response .col-size,.flow-table tr.intercepted.has-response .col-time{color:#ff8000}.flow-table .fa{line-height:inherit}.flow-table .col-tls{width:10px}.flow-table .col-tls-https{background-color:#00b90080}.flow-table .col-index{text-align:right;width:4ch}.flow-table .col-icon{width:32px}.flow-table .col-path .fa{margin-left:0;font-size:16px}.flow-table .col-path .fa-repeat{color:green}.flow-table .col-path .fa-pause{color:#ff8000}.flow-table .col-path .fa-exclamation,.flow-table .col-path .fa-times{color:#8b0000}.flow-table .col-method{width:60px}.flow-table .col-version{width:80px}.flow-table .col-status{width:50px}.flow-table .col-size{width:70px}.flow-table .col-time{width:50px}.flow-table .col-timestamp{width:170px}.flow-table .col-comment{width:150px;padding-left:5px}.flow-table td.col-time,.flow-table td.col-size,.flow-table td.col-timestamp,.flow-table td.col-comment{text-align:right}.flow-table .col-quickactions{width:0;direction:rtl;overflow:hidden;background-color:inherit;font-size:20px}.flow-table .col-quickactions *{direction:ltr}.flow-table tr:hover .col-quickactions{overflow:visible}.flow-table .col-quickactions>div{height:32px;background-color:inherit;display:inline-flex;align-items:center}.flow-table .col-quickactions>div>a{margin-right:2px;height:32px;width:32px;border-radius:16px;text-align:center}.flow-table .col-quickactions>div>a:hover{background-color:#0000000d}.flow-table .col-quickactions .fa-play{transform:translate(1px,2px)}.flow-table .col-quickactions .fa-repeat{transform:translateY(2px)}.flow-detail{width:100%;overflow:hidden;display:flex;flex-direction:column}.flow-detail nav{background-color:#f2f2f2}.flow-detail section{overflow-y:scroll;flex:1;padding:5px 12px 10px}.flow-detail section>footer{box-shadow:0 0 3px gray;padding:2px;margin:0;height:23px}.flow-detail .close-button{margin-top:2px;padding-left:10px;padding-right:7px;color:gray;font-size:15px;border:none}.flow-detail .close-button:hover{color:#000}.flow-detail .first-line{font-family:Menlo,Monaco,Consolas,Courier New,monospace;background-color:#428bca;color:#fff;margin:0 -8px 2px;padding:4px 8px;border-radius:5px;word-break:break-all;max-height:100px;overflow-y:auto}.flow-detail .contentview{margin:0 -12px;padding:0 12px}.flow-detail .contentview .controls{display:flex;align-items:center}.flow-detail .contentview .controls h5{flex:1;font-size:12px;font-weight:700;margin:10px 0}.flow-detail .contentview pre button:not(:only-child){margin-top:6px}.flow-detail hr{margin:0}.inline-input{display:inline;margin:0 -3px;padding:0 3px;border:solid transparent 1px}.inline-input:hover{box-shadow:0 0 0 1px #00000003,0 2px 4px #0000000d,0 2px 6px #00000006;background-color:#ffffff1a}.inline-input[placeholder]:empty:not(:focus-visible):before{content:attr(placeholder);color:#d3d3d3;font-style:italic}.inline-input[contenteditable]{outline-width:0;box-shadow:0 0 0 1px #0000000d,0 2px 4px #0003,0 2px 6px #0000001a;background-color:#fff3}.inline-input[contenteditable].has-warning{color:#ffb8b8}.connection-table,.timing-table,.certificate-table{width:100%;table-layout:fixed;word-break:break-all}.connection-table td:nth-child(2),.timing-table td:nth-child(2),.certificate-table td:nth-child(2){font-family:Menlo,Monaco,Consolas,Courier New,monospace;width:70%}.connection-table tr:not(:first-child),.timing-table tr:not(:first-child),.certificate-table tr:not(:first-child){border-top:1px solid #f7f7f7}.connection-table td,.timing-table td,.certificate-table td{vertical-align:top}.connection-table td:first-child{padding-right:1em}.headers,.trailers{position:relative;min-height:2ex;overflow-wrap:break-word}.headers .kv-row,.trailers .kv-row{margin-bottom:.3em;max-height:12.4ex;overflow-y:auto}.headers .kv-key,.trailers .kv-key{font-weight:700}.headers .kv-value,.trailers .kv-value{font-family:Menlo,Monaco,Consolas,Courier New,monospace}.headers .inline-input,.trailers .inline-input{background-color:#fff}.headers .kv-add-row,.trailers .kv-add-row{opacity:0;color:#666;position:absolute;bottom:4px;right:4px;transition:all .1s ease-in-out}.headers:hover .kv-add-row,.trailers:hover .kv-add-row{opacity:1}.connection-table td,.timing-table td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}dl.cert-attributes{display:flex;flex-flow:row;flex-wrap:wrap;margin-bottom:0}dl.cert-attributes dt,dl.cert-attributes dd{text-overflow:ellipsis;overflow:hidden}dl.cert-attributes dt{flex:0 0 2em}dl.cert-attributes dd{flex:0 0 calc(100% - 2em)}.dns-request table th,.dns-response table th,.dns-request table td,.dns-response table td{padding-right:1rem}.flowview-image{text-align:center;padding:10px 0}.flowview-image img{max-width:100%;max-height:100%}.edit-flow-container{position:fixed;right:20px}.edit-flow{cursor:pointer;position:absolute;right:0;top:5px;height:40px;width:40px;border-radius:20px;z-index:10000;background-color:#ffffffb3;border:solid 2px rgba(248,145,59,.7);text-align:center;font-size:22px;line-height:37px;transition:all .1s ease-in-out}.edit-flow:hover{background-color:#ef6c00b3;color:#000c;border:solid 2px transparent}.eventlog{height:200px;flex:0 0 auto;display:flex;flex-direction:column}.eventlog>div{background-color:#f2f2f2;padding:0 5px;flex:0 0 auto;border-top:1px solid #aaa;cursor:row-resize}.eventlog>pre{flex:1 1 auto;margin:0;border-radius:0;overflow-x:auto;overflow-y:scroll;background-color:#fcfcfc}.eventlog .fa-close{cursor:pointer;float:right;color:gray;padding:3px 0 3px 10px}.eventlog .fa-close:hover{color:#000}.eventlog .btn-toggle{margin-top:-2px;margin-left:3px;padding:2px;font-size:10px;line-height:10px;border-radius:2px}.eventlog .label{cursor:pointer;vertical-align:middle;display:inline-block;margin-top:-2px;margin-left:3px}footer{box-shadow:0 -1px 3px #d3d3d3;padding:0 0 4px 3px}footer .label{margin-right:3px}.CodeMirror{border:1px solid #ccc;height:auto!important}.contentview .header,.contentview .highlight{font-weight:700}.contentview .offset{color:#00f}.contentview .codeeditor{margin-bottom:12px}.contentview .Token_Name_Tag{color:#006400}.contentview .Token_Literal_String{color:#b22222}.contentview .Token_Literal_Number{color:purple}.contentview .Token_Keyword_Constant{color:#00f}.modal-visible{display:block}.modal-dialog{overflow-y:initial!important}.modal-body{max-height:calc(100vh - 200px);overflow-y:auto}.dropdown-menu{margin:0!important;max-height:250px;overflow-y:scroll}.dropdown-menu>li>a{padding:3px 10px}.command-title{background-color:#f2f2f2;border:1px solid #aaa}.command-result{display:block;margin:0;background-color:#fcfcfc;height:100px;max-height:100px;overflow:auto}.command-suggestion{background-color:#9c9c9c}.argument-suggestion{background-color:#c1d7eb80!important}.command>.popover{display:block;position:relative;max-width:none}.available-commands{overflow:auto}.wireguard-config{margin:1rem 0;display:flex;flex-wrap:wrap;column-gap:2rem;align-items:center}.wireguard-config>*{margin:0}.modes{padding:1em 2em 2em;overflow-y:auto;height:100%;width:100vw}.modes h3{margin-bottom:10px}.modes .modes-category{padding-left:10px}.modes .green-left-border{border-left:10px solid #77c77a}.modes .gray-left-border{border-left:10px solid #b2b2b2}.modes .modes-container{display:flex;flex-direction:column;gap:25px}.modes .mode-title{font-size:16px;font-weight:600}.modes .mode-description{color:#b2b2b2;margin-top:-10px}.modes .mode-entry{text-align:left;display:flex;align-items:center;font-size:1.5rem;font-weight:400;margin:0}.modes .mode-entry input[type=checkbox]{margin:0 10px;vertical-align:middle;width:1.8rem;height:1.8rem}.modes .mode-entry p{margin:0}.modes .mode-status{margin-left:10px;margin-top:5px;font-weight:600}.modes .mode-local i{font-size:1.8rem;cursor:pointer}.modes .mode-local .processes-container{display:flex;flex-direction:row;align-items:center;gap:5px;margin-left:5px}.modes .mode-local .selected-processes{display:flex;flex-wrap:wrap;gap:5px;overflow:hidden}.modes .mode-local .selected-process{display:flex;flex-direction:row;gap:5px;background-color:#e0e0e0;padding:5px;border-radius:4px;height:30px;font-size:12px;font-weight:500;align-content:center;align-items:center}.modes .mode-local .selected-process>i{font-size:15px}.modes .mode-local .dropdown-container{display:flex;flex-direction:row;align-items:center}.modes .mode-local .local-dropdown{position:relative;width:200px}.modes .mode-local .local-dropdown .dropdown-header{padding:5px;border:1px solid #ccc;border-radius:4px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;margin-right:10px;height:30px}.modes .mode-local .local-dropdown input{border:none;flex:1;outline:none;color:#000}.modes .mode-local .local-dropdown .dropdown-list{width:100%;max-height:300px;overflow-y:auto;z-index:1;list-style:none;padding:0;margin-bottom:0}.modes .mode-local .local-dropdown .dropdown-item{display:flex;flex-direction:row;align-items:center;padding:8px 10px;margin:4px 0;border-radius:4px;cursor:pointer;transition:background-color .2s ease;justify-content:space-between}.modes .mode-local .local-dropdown .dropdown-item.selected{background-color:#e0e0e0}.modes .mode-local .local-dropdown .dropdown-item:hover{background-color:#f0f0f0}.modes .mode-local .local-dropdown .process-details{display:flex;flex-direction:row;align-items:center}.modes .mode-local .local-dropdown .process-icon{margin-right:5px;margin-left:5px;color:#5f6368;width:25px;height:25px}.modes .mode-local .local-dropdown .process-name{font-weight:500;color:#333}.modes .mode-local .local-dropdown .process-separator{margin-top:10px;margin-bottom:10px}.modes .mode-local .local-popover button{font-size:1rem}.modes .mode-local .local-popover i{font-size:1.5rem}@supports (anchor-name: --test){.modes .mode-local .local-popover>div{margin:0;position:absolute;top:10px;position-area:bottom}}.modes .mode-local .local-popover>div{gap:.5rem;align-items:center}.modes .mode-local .local-popover>div:popover-open{display:block}.modes .mode-input{border:1px solid #ccc;margin-left:10px;border-radius:4px;min-width:120px;height:25px}.modes .mode-reverse-input{border:1px solid #ccc;margin-left:10px;margin-right:10px;border-radius:4px;min-width:70px;height:25px}.modes .mode-upstream-input{border:1px solid #ccc;margin-left:10px;margin-right:5px;border-radius:4px;min-width:70px;height:25px}.modes .mode-reverse-dropdown{margin:0 5px;border:1px solid #ccc;border-radius:4px;height:25px}.modes .mode-reverse-servers{display:flex;flex-direction:column;gap:10px}.modes .mode-reverse-add-server{margin-left:10px;display:flex;flex-direction:row;cursor:pointer;font-weight:500;opacity:.5;transition:all 50ms ease-in-out}.modes .mode-reverse-add-server:hover{opacity:1}.modes .mode-reverse-add-server i{font-size:2rem;margin-right:5px}.modes .mode-popover>button{background-color:transparent;border:none;cursor:pointer;font-size:2rem}@supports (anchor-name: --test){.modes .mode-popover>div{margin:0;position:absolute;position-area:right}}.modes .mode-popover>div{border:1px solid #ccc;border-radius:4px;padding:10px 15px;background-color:#f9f9f9;box-shadow:0 4px 8px #0000001a;grid-template-columns:9em 1fr;grid-auto-rows:min-content;gap:.5rem;align-items:center}.modes .mode-popover>div:popover-open{display:grid}.modes .mode-popover>div>h4{text-align:center;grid-column:1/-1}.modes .mode-popover>div>.mode-input{text-align:right;background-color:#fff;margin:0}.modes .missing-mode-container{color:#b2b2b2}.modes .missing-mode-container .title-icon-container{display:flex;flex-direction:row;align-items:center;gap:5px}.modes .missing-mode-container .title-icon-container i{font-size:1.8rem} +html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}.resource-icon{width:32px;height:32px}.resource-icon-css{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADtElEQVR42uWXaUhUURTH/7MoNq6Nhjpq0WSlMplOvgm0TWMUkTawsMUSqi9FtCBhEYFUFPSpCFopqYjMyqGopBRDmCidcKBSwyWX0Q+aKw5U6Ez3XnqPyalX7zFR0IHLvfecu/zOOffeN6N2u934m6Im5d8BUCgUKq1WyyUnJ0dRm2dxuVwqpVLpR2s67pue1Xzf00Zq5RSdqq2tze5wOM6LRUBJUqKtra2thAwhc39YCASrNRrN9j+VAn4TUQgiAb4G8NpEDIKInyQAq9XK6sHBQVZzHIeOjg6+7wWQl5cnBsFSLAkgIyPDSxcdHf3TfE9OTvKRkA4gIRLCBmlpaXxEhE087UajkdYUmre5RAAkRULYUKfT/SwC9FrzetkRELzX6/VoaGjg1XRRAYQKeT9gMplEDyQRhUQA5r3nIfM+9eJ9CQDy7/fv2iR9C4RJz1pv40XXE6IAFsflIEufz/Q17RV45XgKauB0ZiyftY7pn3feh62vmg7HoqgsLIld7Qng9gIQ89ry7hIsTZexkyuFm+iuvC6lNrZO+ZszKEo9QklRZj8h6O82n0OhoYTtdPPtKWJ2IV23SkiBJIBnbXewMfkATDFmIaTjX8bg/DIKjX8wNOogJEaYED4tGgGqIOJ5DTR+IQgg+gRtGrSLojCNtPm5kgH6x3swQxMj9DkCQtpE70Dth3s4/WIX2TAYSQQiR18IY2Qm6rorcaZhL9PPJxDmWRsx3T9SOAOSAAL9QzD+eUTov+1/yTZfNnMtTmZVonOkGU0D9ajrsaCq/Tp2LDyG0iXl6BptQcuQDdbeh3jaeQtFSUclAfAhY6F/+P4qEiI4OD+PoazxOHLjt+Fxaxnx1ILD6deQPXszOkeb2ZyqjhuwOh6gmLuIlXEF6CYg+LaWrAjkJ+1Bxbuz2P1oBdPnztmKpXFr4CTnoN/pwP7qbKpm+S5ILGb5HnD2oqRuFdPPm25Efvw++QAadTAKFxzCFkPJd3c7QBWITUkHUZBQ7HX3N8zbj/Vz93m+AzIBxB8aqXZ5APX19aw9NDTE+ikpKWhsbPxuwdDQUAwPD7M++S2J8PDwH0HIe4g4jvPywmw2S31y+TGSAVix2Wy0plGgen5BwWO73c7aYWFhbAwRoR8bG0vb9Esp6yVkJTU1VdTbzMxMEbu8FPju4Hmn5ZOEh8g3EFNk9FcAbiJOg8FwAUAMDQZ8I0pSekn5+CsAl1qtbp2YmCgnv+cCWc58IwrqGIDnogBkEPW4j5b/5t/xV4iXgWA3JaZUAAAAAElFTkSuQmCC)}.resource-icon-document{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADfklEQVR42u1WS0gVURj+zsy9Nx/lq4uvS1nWplCxe70usghFskKEFhK0MRCKFrWoRYt0E7iIiKCN0SaUCFwZQRg9sBZWKmQaEpGJULdIrlrm46ozc5pzdMY7M9f7GO+uPvj555wz58z3f//5zxn88yAwQszJyfGXlZXlA3CEm6IooiAITuYJIeJaP/daO3xM9YKpTxwbG3sfCATaEQYHjBAopTm9vb3dsAF1bkRTSXCflpbWDBMEJAfsIxuZTkJFCkxwIAr6+vq4n5qa4t7v92N8fFxrW6L2+XzauNbmPi8vj3sVzoQIVFVVwYyCgoKocufm5m6YAq64fQV06AtWVFSER8zMMO71es0KCJtVwCJ9YWFhpGgjGedmS4Hi4mIMDg5CA8vtwMCAToRBLV8Eg0FNAd4uKipKngINDQ2GaOrr65mPXnrWPUDslKG2iMGWpfW+pZUNS89gdghYFvk+I+HygzlcvD/HPyLLCs53hnD7+TLmQiYiJmOINwUWOccnJdzoCWFhiYLBvZWES4sP3ygudUnYmwucOQhkplhToYLGQ8Aw6dMPCW2PFmDG0RJRf8+/i2BwgoJhbBJoeQh4soDmKorsVOMeiJvA4rKCc/fmYMbZIw54iwiwHh2P+HQl8HSUomeUgCHwi+DaYxEpTgGtx5bgFKLuASuB2UVrzu42ueDdCdAI+RWJgrr9Mq6fXEE4QisEf0Lr5Ro3gTSnYo2+Yxlvvihs40WsiiejAq50G4/77FS2lpzQJuRsXSLlEU8EFdx6JqkpAUfHa0U1oNFHcWjPago63wp499UYS2GmgqbKRWRs0UoyfgUMdbwjm+Jmo4CrJwhSXdDx4iN7j6th+Pju7TJa6xZw4fA8trlkW2UY8RTLz6Bqfil+zlK0vxKwKPEy1CPbly/j1IElpDgsczXbFAHd3OkULcdlrMhY61PQVr8AkWiqWY5kWwRi3nACWL/2zJSIei/YO4j6+/u5n56e5n3l5eUYGhoynJRZWVlsnD+XlpZiZGREj7akpGRVNbebzU+UAP/hsERSW1sbNdLq6upoCpBECLA7X1eAwbQYj3h4eBgMTImZmRltnLc9Ho+mgJ0U8J/KmHd9TU1NtHG9vYZQPARi/VolNG7C71gEqIp5dfPcAeBhYiA5EAAEAARjEVAcDsdnSZK6CCHpPGfJAWGBAXiJ/zDhL423UWlXBx5dAAAAAElFTkSuQmCC)}.resource-icon-js{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAC2klEQVR4Xu1XTWgTURD+3u4Gbaymbi8mqSL1IjYuScgWJBd7KCo9CQpFj17Eqz2IdxXvih710IMXFbwVJEWoQlpIqIKCIVVIvdik2tKa2maffY8+SLKdJs9UevGDYWZ2dne++clulnHOsZcwsMew6h3GmGnbtus4zhERqxfP80zDMAJCi/O2jkut/PrYpjaajpmFQiFfKpUeEQQkDM65nclkXkAf4JxvK5skpA4Gg9f+1QhEElIUCQD7/SPoDNtVSgqAgBaBqakpqcvlstSu66JYLCrfR2BkZGRHEgAMLQLpdBrNCIfD5LxrtRrdCX0CdCdUglQqpTqikjTEk8mk0IK0inkkAd1OqISRSITsAGNMHdfoAFF9f38/pqenoSBuqogI2LaNwcHBHRcSAKMJ0NXXLxmx9aTfkoCxC7/vdkXrXVBfgT9xKQP+8Ym0sfQFxtubsCYuw3w3Br40RxIEwNsh0LJS/j0HNvdS2ubEJcEW66duSL3v9Sh1bdsjaNFuNVdImy1/hdd9DLXgUVSdW6im7hHX6hEgSSgNSBu/47cRyN1F8FUaXZkrYOVZ8lofdAhgfhLs01Nxo4YOrJ28juWLs1g98xC1wzF0vb8PozLb0RJuu3hYyMP88EDafO0HeOCQtLufn4ZVGMda9AKqx0eJAmgCFvzwtVvaJ66CfXuD4HhUzFxULOOryTuiaik8EMLKwBjWQwPEg0iPQCMJ6yBWz477HjTVyHn8Cp9rTOYvoMMdoJdSJ67fgWw2K+1KpSL9eDyOXC7XUFEoFMLi4qL0HcdBb28v+ZcMANci4Lqur5XDw8NUAiXUUmsTkDIzMyO06IK6ifRVxfl8Xto9PT3yHAHl9/X1Sdu2bUWMaRNIJBI7Vjs0NETEOx8BJX8V30K1LQL6Seh4E362IsA3sRKLxR4DiALwdvETcB7AQisCnmVZnzc2Np4xxg7Ime0OmCgMwCSa8P/r+A9UZe+5GbcPsQAAAABJRU5ErkJggg==)}.resource-icon-plain{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAA7klEQVR4XsXVPwrCMBgF8Jc/BdGtk+AVxM0TeSi9gpNH0CO469pOXRwKDvJ9KgohCeFRVPxKqW/Iry80oMeH8zXA1cvFFP51ibOVOOPg4eCfz1cy9v3LnY/NOgas1vsdiqPhgkAxXg3agkATAqMEIO/OCFQpwIvHgM0BXnwoYOPlUYb8uEG6JMswZSBdEmcCkOIhhfGF4oQIhs/ezYnSFoQVD5kBnAAYkBMc4MV5A07wLXCCA4QgACeEHiROEIAR9CRygjbgH/HKD1Ihv+eSAqr9fIMZBHwsGnQpIP5025oJFHyM9jhkQNei/cu/8x2MBu0IhSW4oAAAAABJRU5ErkJggg==)}.resource-icon-executable{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAvdJREFUeNrkV72rE0EQn9xX7nxJkZDCh42iEp/GKMrrtFLwA0RU7CWdvMpGxH/AToSHaCGoYKPYWGhto4UgBhUtTBk7BY35vlzWmc1tuNvcVy6RVzgw7Ca7M/PbmdmZvQxjDLaSFNhi0rw/MpmMWiwW16vV6nZ3bcrj8VhVFEWnkfa5//NR/Pau4ahI/6mNRqPebDbv+RBQCAQj6YVC4SxLSWiMOY7DRqMRs22bDYdDNhgMWK/XY91ulwzUvPaItWW5Eo2DrNzLtI5kRoYgDclGokCQh5cGIOqkEQCUpQBI4u5/CgBvQ6TxsHXCnhgACWBGA2Y0V+omUSIPiOKG1w9UVeWAwupOKAAy3u/34cHDJwsl6eWL58AwDA6EMCUGQCfvdDp8fvLUmVhDdx+9gI0r531jedWAdrsN+Xyee2MuAORm8gBR78/PWAC1S8f4Pu/45u07wAIElmWBpmnxpVgOAVYyPl8/eiQ0T8Qo8oTkxEgAsCJO84i2JgIglHk75fGNx4CdAFTDATXrgGY68Orm1UBgp68/h5e3LsyASxwCIeDNfNV0DWdHoFk0H3Hl7z/UfbIH1vaBVepNZcVBFgagb7P5qVUTARAbEwCHqwen+4T7c6vtmfCEvTsSAzDyNj819wAa13SbK61//OSTLe/dA/niL58HZF2xAOSCwj2wMpwYNmxunJiUVvavzXjg9olrYSFI7gFZyLCGE8McAM61SWZ//vLVJ7t7106frJSEkPoWPKvd8CkTV42STr5+Xtm4EChJcyCqYMnsDV+qHBCbRRO5s3k/dS9we8D8hYjHHZvIoUoZWq0W4LvOdzJ57o05McnmcjnQdT0dAGoepmlCqVTiikQ5DWq7QQ8ROjmByGaz0/fBXIWIABB6Mk7NhJIr6KRhryG3+6UPASkh5ASCOtk8j88wTyH1ExeitO8+eV2i33EA6PuiU6lUKO13BL3hFvgE/I78Iw7AGN39DRPuKcZwJShmKSlDB8PxddDC//11/FeAAQBAYeksv+aJbgAAAABJRU5ErkJggg==)}.resource-icon-flash{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAztJREFUeNrkV79PFEEUfjt3B4f8CHcxQSOJwURp4GxOGkoSSPQvoCKxI3RUFFpqSei0VwpDQwJ/gB1HYowxpw1YcUTxNEiA29vdmR3fG2bMsizHsnuEwkkms7szO9/3vvdjdi0pJVxnY3DNLRu8sSwrUywWH5VKpVt67l/3fT/DGMvRSOv0czWa++Acjiz0LLO9vf2pVqu9OsWAXGA6tlyhUHgsEzYEk0IIyTmXnudJ13Wl4zjStm3ZaDQI4GkQj3q2XVIiOIQ3D3aax5Zv6YIkLQzSigQp3DYCrSxtQYC1hUAcua+UAGZDS/Dz5ol7IgI/enqgoQuWS7vQhnSNo7As4AgqPA88muvoUHN1nHtSr7dHAQc71/Q9TYRGesZdF2whAAYHQSK42NkBSQr09Z1xBZWaRJXQgHkBFQR1BHf6+2FgaQnK1SrcX1yEJiqBaGpjIhDsUQSycQJOgYVc4HMOzXwe7i0vw92pKeB7e/C9sqEQfLPurAIQm8CpwNIWc+17UqOJBIpzcwq8vr4OH2dmwPmzD6yzU63jERlB28ZyQVg6B18m+YkEBZpAcNnbC4Ozs2rH/cNDyI2Po8AMXHoH11oB8Eu7ICyd0OBcm4C1HromJ6F3eFip82B6Gm4UCrCxtnayQSYDPmZHcJ9UBHggC4TjQAPHIbSedvv28gUcV7/Aca2mgPHkO0nHNDEQftEz0uNzG9NrYH4ebk9MwO9KBb4+ew42rqHzluVy4CIB8ivH1ExMIBw8ZA1Hy9noKDxcXYWbQ0Ng7+7C1sIC+JgJOUw9gbnf1C5SSoVccB4B1koBEzxkPQWihRHejbn/8+0b+IAxUN/cBIYETHCCdpWJlYg6cHkXqDqgwW0sNpVyGdyjIwVqZbPQxGsfrbd0qkrdRbtigK6PtIU+Sk2u8BGYgo2TzEZyE3g61A8wNSPqQLIg/Dw2pgqLySFxEihgKovQcWKOO0ZzXV2nXHleIYpFYHZlJdE3QEQdSEYg7idXjE8yKxWBtCRSK5CGhG7NRIUoDYlQO7iIAP1fHI+MjLzG6ztR33ApfgF3sf+6iACmeHYLT7t3mOfdUT5L2CwyDMf3URP/99/xXwEGANgxwaTRsGhXAAAAAElFTkSuQmCC)}.resource-icon-image{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3JJREFUeNrkV0trE1EU/uaRJjZN0iTWthZaq1hclEgXRcGdbsSFP0LwX7jwV6i4c6l/wIUI1qIVIigKSjVUKE3TmvSVxkzmced6zkwS0jS0maTShQcOd+5j7vnudx5zR5FS4jRFxSmL3tpRFEVLpVLzmUxmrD7XVNd1NVVVQ9zyuvq41zb6rXPUqm1jWi6X+7y2tvb4AAJ2QUNJQslk8o7sUciYFEJIx3GkbdvSsixpmqY0DENWq1U2cK/VHqt+UlSScbRv3qo8TxI50gW9SLuRo0AwwycG4KiTHgFAPREA3dD9TwFQNhxgop2Z9mcKRlBQetgDAbAsgdXNvU4cgGOK93el23Z6Zkg05zKXxz3A9SAMxsB6qYwHj155G2iqxGBEoGqqMC0JyjbYQnit4wh6duGwOq43zi33s8/uN93GpSYQAF1TcXZ4EAMUu3NXKrh+NY1f+SLefQqjUNR9g6SC1CaDwvXb5phwm27oCQCVPgwPRTA2UsOtaxdxPj2PydE8GXiPhWzMM+IbIxaYjVoZwiZ/6wkPjHMYAAIBUFUF8WgY0bCg53pwURPWNSRoXLjsc+kBYYN7Wx9h7heRvHATNtUccRiA7AoAL6b6TSoRI0O2E8KXHxswL7zExpaB9WKSgEUoyHwAvL68tYrqTh6VSgVG7i0m5+4eyIZALuDFmqZ5DCSifvXc3plGtmwRrTqFMrkm1oh6Ckai/dviImoWB6EDZ3cdo6mhAwUrMAAvdYjCdDziseHLGX9D3tj105H9/GHhNbZLm0iNjKNWLePc+BTGU9FOHzt0DYDFNC0sZb/7sBlEw5/U2HRSo2bDMmvYWFmGMpDEzm4V6kAce1UNi0tfvbW3b0y3MtAdgAZirl6/S0WPAS/YaBPLcjzj3G9mS2IGO6U8nb5CzGlQqK2IZQzF0+0uCMaAUTORW1ntqjwroTj0SAj7uxuwLQO2SwXLRn8AHMdGaasU8I4Vg206VDEFDKvUOwB+KUT5PjWR8tNXtiZxa7/TXLzZ5334YxQYAOvMpUm8ePqw669ep76u6ygUCsELUblcDnTb6fJKJgO5oBcjx1zJlL4A9Auibwb6AVGXWteF6KRAtMnecQD4/+LP7OzsE3qe6HSH6+MXME9aOg6AS2nzk75oz6n8Rjv5rEdR+GCkbzpN/N9/x38FGAA04HAMRDx3awAAAABJRU5ErkJggg==)}.resource-icon-java{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAv9JREFUeNrkV81rE0EUf7NJaEpFSSChYooIxVPJwQ+wJiePHsWb4sFrT/4X0pM3/QcExZsnEUETWpFSSQULral6SUGw0Gya3c3X7vjebGa73W63m0mgB9/mZXZnJvN+83sfmWWcczhL0eCMJel/YIwlstnszWKxODsc89RxnISmaSlqad6wX7Ty2T+GrRboS+zs7Gw0Go3nRxCQC6SipDKZzF2uKGiM27bNB4MB7/f7vNfr8W63yy3L4qZpkoHHfnukyUlRicYhuLhfaRwlHekCFQkaiQJBDE8MQNROIwBoEwEQh+6JA6hUKrGAYRBCqVQ6CYAzFgNlXBiYSFeZtp5hTFFYX/8KzWYTVlZXYPHWYiwGtJF8jpf4DKunbMk4CaYelMtlcGwH1tbWBDC/goCvwIDfr4IBzgQYYoD6JBOGYUC1WhX35IpgLCgB8C+CX/D5+2+YTk/hSswDJ4Dglc5dhvn8OcACBD/q9TAAEBtAMKq9xewBXLs674Ez1l/CzI0Hwg0rtS2YvTgrxra2t49lBAgHxoiBoO/8C1mdLmCpFf7WPz6DvsPA2Hwn+mgsjL2oGIgFQKYXbcK0LEEx1nhw0Ch8ewX23G3AWi/GJNUyBvwgYsdAWCGRfQYa6nQ68LZag9TeFPALDyG/+Qt+7v6F89NJESfctwmlGDgJAC1umi4DhXwGaq0rwHoMCgk3JGnM9TSPDUCLSju/ko+pf4DUtswuag/mclko5DLwZ9+A+3eugy1TFT80P6QOjMZAGBP7egs+fNk4FtBv3q+C3m57tSLs90oukPe6rguTTx7dcwsPqmhA3rsqY4DmTxTAwcGBuzhzN88kB6IyHuWDxmh+SB1QC0J6pjQTVQ8v7lk8RHMIwu2j+UFXhhWi2FnQRv8+XV5WPjcMg1AdwNLS0sgHEeU/oyhDqqehsV0wLoihdGIBGHengcDzi34aAHq/MBYWFl7g/aWwM9wYr4C7qHunAXCSyWQdy+hrLCozYT5TFEYbw/ZT2MD//Xb8T4ABAGtLxURbEDriAAAAAElFTkSuQmCC)}.resource-icon-not-modified{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA9JJREFUeNrkV7tLo0EQn++7JGJUjMYHGgUxCioiiohgJ2gXtLAxKNeICIJYyOE14vkHCNdZKGojWGqRTrGIxSGKnkUKH+DrLMRLoha+YnI7w7d7m3e+zwOLW1hmZne/md88drJRIpEIfORQ4YOHSRYURbEUFhZ+bmpqcjLRzKZFo+ZwOGxSVdXC6Cd2zqR9+wn3mIzUpO0hj1TV1lRtTT05Ofl5dXXlTgoAZZYSx9bW1lcj3mA6E00GgqjVav2RMgLvGdxIKhBsWHUDuL6+hvLycsFnZ2fDw8PDXwUmE7y+vgojubm5tI9yfn4+5OTkCBBaSvUBmJ+fh+npacEPDw/D0tKS2B8aGoLl5WUhDwwMwMrKStQ+AtEAqIZuwcXFBU0ceXl5MDU1Rfz4+DiUlpbC2NgYyZOTk2QMx8TEBFGMBkZGS4FqqAZkj0mLqvJbQzyXkeIajtnZWaJlZWW0rkUgbAgAT8HMzIwoOF71kneiEHGMjIyI/Evr6rtvgWyEG5cBcJ5dubibgUGL1afIrZiFz1pQUPDF7/d/42uPj49U+agM+aysLFKGvMViEcpj95CPBVBcXOxh1KUrAqjo7e2NFKBBrpQbl+VYPkEEIOMU8I8CgQCcnZ1BMBiE2tpaKCkpEXt4M5A6HI64xsNaLtjtdjCbzTKASEYAZOTr6+u0htdrcXER+vv7obKyElZXV6O86uvrE9/4fD7Y3NyE3t5eamJS3Si6AaBintvz83OKBO7f3NzA6Ogorc/NzcHl5SUZOz09Ba/XS/1CTpFWnEpGjUiubszn4eEhGUEgTqeTQLCCEmeKiorg7u6OQG1vb0NPTw+1ZFlPshpICwAn5rijowPu7+/h+PgYnp6eonoA8ri2trZGjQf5l5cXuL29JV6+nhkBkJXjxHDW19eT9+gpeoxg+D62Wyw4nMjv7e0RPTo6ijqX8S2Q87awsAANDQ3kCXtQQHd3Nxl6fn6GjY0NOo88e8iAy+UStePxeKC5uRlsNpvxFOBH7e3tQmlXVxdUVVXR1RocHKQ843S73fSzLEetpqZGdEPDEcBZV1eX8HWDIFpbW6OiJZ+rrq6OW9cNYGdnh3jWmknGkO7v70cpxP6AzQpl9pak9CR7kuluRG1tbXFeYA0kM5DMU6kP6O+Eu7u7RDEK8s8w9/jg4IB4LDY8w/dRrqioIB4L1HAnbGlpSeltZ2dnyv13pSDdM1vPPv91zwiAUSNJvJaHPx2AMPso0NjY6GO8PVHIDA7M/W82f6UDEGINxRsKhfDvlO1fAmCOBRn9nvJJ9l/+O/4jwAATI0GMJl2ikwAAAABJRU5ErkJggg==)}.resource-icon-redirect{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABDhJREFUeNrkV01MG0cU/rzsruO1zRo7xrGxCkqqkhACRogLVRtxoFWbVo16q1AiRQhxQqhCEbkgyqknpCSHXDjABfXWVqpIpFYVSKhqhKhMkjahqiM1xBiigJfUgBNs7M4Mu9s1mPUPkXLok0bvvXmeed97b97M2pLNZvEmicMbJt6oWCwW0e12X25qajpFVIEMUeVCJpPhOY4TCa8gv+PVtRXURnTKedVGZco5dY5T57hIJHIvGo1+cSgAqpOS1ExPT18rJxpaznyDgGBckqS7phk4CmlOzEAQkkoGEIvFEAgEdNlmsyGRSPy3Ac8jlUrpThwOB7NTXZZl2O12HYRa0tIAjI2NYXh4WJd7enowPj6u27u7uzExMaHrXV1dmJyczLFTICoArqwuWFpaYoOS0+nE0NAQk/v7++Hz+dDX18f0wcFB5ozSwMAA4zQbNDNqCbiyzoAxYrYLx2ldw2RNp5zOURodHWXc7/ezeTUDmbIAaCUYGRnRD5x26g3R6QeRUm9vr15/wzx35C4wOtGcGwFoMmm5A51Bk7Z/P4vxKibpk6qqqq7G4/GvtLlkMslOPt2MylarlW1GZVEU9c3326i8H4DX650i/JOSMkA32t3dZRtQh9qmmnOjvl/OkwEUXQJt0cvtFJb/VLAW3UTtOTfcAUm3JdZfYiXyD062ugvegiqAbFFtaKzt/Z+f4rfbT5izqZsP8GBmmc3f/e5v3Ln1EKuRF/j26/vMblxnzIDhbFiKyoAR9dnzfoQ+DKp6BuvRLWZ/NLuKi9fOwe4ScPvGIyz9oWAnuctG6KMTUFaSuHdnBa2fBWCT+fIB8FYOa08TmP3mMTbjr3DhywaS9hd7J13duOZMJXNcG5Lx063HkH0i/vo1Dv9pB45VVuR0TskloENyiWjuDMBeZSWRPyNzuW2ogZVkgUTsx/z3MbKGR/177gOtWhQAY93o4K0W1DTICJ6VEV/ehnzCunfNxvfqTtOtrdna2IFAsra1kcKr7XRBAKYloHxmIkIiFyEc47D4y3PUtx9nDrx1doSnaKQCYosJnH7fAyWWxOLMGtovBfH7j88R/uEZWj+vNm1D0xLQRe+86wVPnG8qO2j5OICGjmpmO3+lDv56JzsjH/SdhLNaxMZqEqFPfXB6BTRf8JI5AVtkXdkZYLdXnYTjtba8ff1Wc2VOtmoaHbpsdXJ4u13OCaZkAHNzc0wmVzPTQ6EQwuFwTkrp86soCtPJtyQ8Hs+hl1G+i8gUQFtb24GoOzs7TW+7fJEaPsmyJZdgfn6ecZoF4zOsRbywsMBkl8vFfqPZqR4M7l1g5Ev70NewIICWlhbTaDs6OkztRypBMQ9MsXbtdS8KQLlODonaSPFCADJkkdLY2PiQyJ58KSuTaO3XyVguBCBNvvNn0+k0/Tvlep0ASGAbhF83/ST7X/47/leAAQBGWDbA0N7wPgAAAABJRU5ErkJggg==)}.resource-icon-websocket{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAkNQTFRFAAAAAAAAEhISQEBAQEBAQEBAQEBAQEBAPj4+QEBAPj4+Pz8/Pz8/Pz8/Pz8/QEBAQEBAPj4+Pz8/Pz8/QEBAQEBAPj4+Pz8/Pz8/GxsbAAAAERER/////v7+/f39/Pz8+/v7+vr6+fn59/f39vb2AAAA+Pj49PT0AAAA+sr29fX18/PzAAAA/7/5/wDm/w/n/b33/Kz0/Jzz/xDm+nvu8vLy8fHxAAAA/9/8/3/y/Nz5/Lz2+7v0/h7o99f096fw+Ijt8PDw7+/vAAAA/x/p/r74/o7z+9z6/V3t/1/v/6/3/z/s/Y3y/X3w/i7o/F3r9dXy/3/x/k7t/l7u/X3v/U3s/T3q9+f2+1vs9pbt7u7u7e3tAAAA/2/w/zDq/m7w/Ezr9NTx/R3n79/u7Ozs6+vrAAAA/n7w/j7r+5vy+qry+nrs93fq8bHr6urq6enp+7v1/h/o+bnz+Ljy+Jju8uLx+zzp87Pt8NDt/C3n/g7m7Nzr6Ojo5+fn9ub19eX09bXu8eHw+zvo8pLp5ubm5eXl7s7q76/p4+PjAAAA5OTk4uLi4eHh4ODgjY2N1dXV0dHRi4uL3t7e39/fhoaGbm5uvLy8uLi4hISE29vb3d3d3Nzcg4OD2NjY2traurq6tLS02dnZdnZ2yMjIdXV1gYGB19fX1tbW0tLS1NTUrq6uw8PDwsLCwcHBq6ur09PTiYmJysrKxsbGiIiI0NDQAAAAAAAAAAAAEBAQERERERERERERAAAAAAAAFBQUEBAQERERzBhqngAAAMF0Uk5TAAM4UFRYXGBjaGtucnV5fICDhoqMkJOWmWkFSv///////////2L//2r///9v/////////////3H//////////////3P///////////////////////////////90////////////df////////////////////////////////////////////92/////////////////////////////////////////////////////////2xdBD+XsrBJAhpAS89MUjoAAAIASURBVHicY2CgBmBkYmZhZWPn4OTi5uHl4xcQFBIWERUTl5CEKZCSlkEBsnLyCopKyiqqOBSApdWUVdQ1sCoAalfUBEprqWvroCjQ1dOV0deTNdAzNDLW0zNR1zY1M0dRYKFnKaOnZ2WtZ6Nva2fvYGrm6OSMaoWepa6+i6ubnrueB9gCdBNkXDy9vL19fPWU/PT8A7SxmODtHRgUHBIaphweoacX6egUFR2DqiA2Lt4XKJ8AND0xSS85OiU1DUWBXLpeRmZWmG02yPQcvdzUvHxkBUDfF+gVFhXr6ZWUlpVXVFZV59fUIlkBCjwbPb26ej29hsYmPb2q5vyallYkE6BhC3Z7VEpbO1B7S2tHJ0KBEiRsQdJAx4Gluzq6kRRAQ8YRJJ0HMh0o3dOLpABiem1fP0h6wsRJIOnJk5AUgE1vmTJ1Gsj06VNnzARKz5qNpABkeuuUqXAwZ+6s2TPnISkAuX3G1PlgtwNNXzB1zux5C+ciKQA5bsaiCWDHAU1fvGTpvIXLliOFA8jtvXMQVixdMXfZ8pVIIZkHctykOVNXrV6zdu26qUsnLFvev3I9kgmQkJm5YSPQ7TM3bZ4Akl4xAckEaMhMBrl9Ich0oPSWLVsRClohITNrNlgaqB0ovWXLNpiC7Tt27tqNAXbt3ANTsHff/gPSGODAfgbqAACmh/JxEXYKVQAAAABJRU5ErkJggg==)}.resource-icon-tcp{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAeNQTFRFAAAAAAAAEhISQEBAQEBAQEBAQEBAQEBAPj4+QEBAPj4+Pz8/Pz8/Pz8/Pz8/QEBAQEBAPj4+Pz8/Pz8/QEBAQEBAPj4+Pz8/Pz8/GxsbAAAAERER/////v7+/f39/Pz8+/v7+vr6+fn59/f39vb2AAAA+Pj49PT0AAAA/+/v/t7e9fX18/PzAAAA/z8//wAA/2Bg/h8f+9vb/j4+/S4u+Xp68vLy8fHxAAAA/8/P/7+//y8v/n5+/Y2N/IyM/T0997e3+1tb9paW8PDw7+/vAAAA/w8P/9/f/l5e9OTk+Wlp/b29/X19+zw887Oz7u7u7e3tAAAA/V1d/Dw8+zs78rKy7Ozs6+vrAAAA6urq6enp+3t7+YqK9re3+Wpq8eHh6Ojo5+fn9eXl/Cws8cHB5ubm5eXl8sLC4+PjAAAA5OTk4uLi4eHh4ODgjY2N1dXV0dHRi4uL3t7e39/fhoaGbm5uvLy8uLi4hISE29vb3d3d3Nzcg4OD2NjY2traurq6tLS02dnZdnZ2yMjIdXV1gYGB19fX1tbW0tLS1NTUrq6uw8PDwsLCwcHBq6ur09PTiYmJysrKxsbGiIiI0NDQAAAAAAAAAAAAEBAQERERERERERERAAAAAAAAFBQUEBAQERERcTpMiAAAAKF0Uk5TAAM4UFRYXGBjaGtucnV5fICDhoqMkJOWmWkFSv///////////2L//2r/////b/////////////9x////////////////c///////////////dP///////3X/////////////////////dv////////////////////////////////////////////////////////9sXQQ/l7KwSQIaQEvOHw6iAAAB7klEQVR4nK2Q6V9SQRiFMS3TyqVcKhFUrpCCvCYKqSUiuGuoIJorWNxsMW/oLXZFBdwtRXPJ9E91ZoAYXL75fj3PPHN+RyC4jUu5k5p29176/YzMBw8fZWXn5D5+kpdfUPj0WRx4XiRMumKRuKS0TMKU3wCQWCphZC+uAyoqRWISy2WKKhpQAjplRTXAyxoVQG2dQq15RQP1DdDYUP8a3tQ0SbXQrIMWvaE1+QtQCoVtjbiAChg56C4ZCNAOHbifFmSd0HWNobgbenA/LdT1wltjX/9lQFwCA7i+CUzmwT7L0HASIAJVaVlbLSNTqE1gMFqG3o3QABoPVFLJKIyNT0yaAT0fsdqoL3B30DLyKR3A+w9mQM+tdpYyxLZF40x+JHarzc5Of0oAsW01eoMxarezn6e/UACJ1Ro9jokdxV9nKIDY9bZvszjmvjtwPOegAGK3z/M/sP0n73Sh2O2hAGxn5/n/5/W5PS4/BaByFie/QLoj+yLv9fgDPgrA5ZxLHCmH7MsrQX8gFKZ2wN1nvIkvgqu+UHiNWpIs4/Dy6xubW1vbfJALhWfXdihDdBnXr9+ou2t3j8PxKkcZYsvM4e4BbEdxJLKfANjoMm4PidFzFEciB3Hgz+HR8cmVOz76GwdO/52dF1258zPB7dwFbUXIeSfgDeUAAAAASUVORK5CYII=)}.resource-icon-udp{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADb0lEQVRYw+2Xz0tbWRTHP/e9PBMpbckvFKtboZBmN0hLF25cKNLoQtHqaqD/QWEK/Q8GunY2aZCoMEjdtKUgLgak0O6G4q4uGiQkxEJji0nU5J5Z5Nfz+WJeM9nNHLhw7z3v5nzv95zzfS/wXzflWJuhUOiXeDw+DPjsQ2ttGoZhaa1NpZTZ2DcBX3Nt9ymlDMeeeXh4+Hc2m127DpAVDAZnpEfTWkutVpNqtSoXFxdyfn4uZ2dnUi6XpVQqCfCrM6CvX1RqrRGRjkNrDRDoOwBnkOtAAJbzvNHxl9+8AaXg0SP49Kk+VwpOT2Fvr7VWsRjGkyfw/j0igrG3hz8QIDA4yGA8TuDpU9SXL00GDO8AutwagAcPqG1swMuXmI8fIz9+QMMnExNUNjYw1tYYePWqvwCUajePunWrPslmMcrlOjPNZ27frgc5OcEwDADdXwYaxdfar9XaDIjAt2/1ud/fPwa01q0giCA2AM0iBFAfPxKYmkISCSozM00AqqcuEJHWSS2CoXV93W6v+nNatwDJxATFd+/aXfDTAEyzfUs7AEDZUnCJAREMGzvOtnSzjgBkeLgetFhEvn+v7yUSaMvCsAVVxWJrXrMszKbPRRsA8VQDWmv0vXvo16+Ru3cxnz1DP3/O+YsXaPttPnzA//Ahcv8+Z6kU1Zs3rxRoE0SnGlAu74KpQqHwtpOcXie13aR4bGzsN+D3rinoNZAHKfZWA15u04vPzYxObdfMm32USiWSySS5XO6KL5/Pk06nqVQqrmft7eqpCJ0gSqUSqVSKTCbjCiCXy3F0dMTW1lZHEF6+iKxgMDiVyWTe2iktl8usr6+Tz+c9qWU0GmVhYQHLsi6lYHx8/OeLUGtNKpWiUCgwOztLPB6/NucHBwfs7u6yvb3N8vKyUwd6K0KAQCDA0NCQa5HZ9yKRCP7Gy8eeyk5C5AnA6uoq6XSaZDLpKQXhcJj5+fkrTPYMYGBggJWVFTY3Nzk+PmZycpJoNHqJoUKhwP7+PuFwmLm5OSzLcmNS9awDlmWxtLTEzs4Oo6OjRCKRK/6RkRGmp6ddg/+rFNiDLC4uXspvc4RCIRKJREcxaljFEwCv2u7F77CTbgBERE5jsdgfwB23b7gezQCywNduALTP5/tcrVb/VErdcMtZr38BReQU+Iv/zWH/AMyRVKUN0udlAAAAAElFTkSuQmCC)}.resource-icon-dns{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAD4ElEQVRYw+2X3U9bZRjAf+e0p8XJR057KpOCEmJIFkkTQbNME2VGVAwJIxEGwtWyJf4DzsTEC6NRs/0BMyZNhxUSQ+BuN0TJJkOd2QguZFFBYiGspBwyGLaFtryvF6WklH5RuNMneS/O87znPL/3+TrnwH9dlIxri8PheMnj8ZwErOlLCGFRVVUTQlgURbHs6i2ANXWdblMURc3QWebn52eWl5ev5QPSdF1/R5YoQgi5s7MjE4mEjMfjMhaLye3tbRmNRmUkEpHAhUyH1uMKpRACKWXOJYQAKDt2gEwn+SAA7dgA8p00D4BaNMDCwhqffHY3WZkWhWefeYKWZhevn23g4cMNPv18GsPQ+Pij05w4oTE1FeC6f4H3LzUSDseYuBkktBqj5mk7ly6eoqLclhVALXTSF1t0vr72Bs0vGIyMBhj030dRks1jmnFGRn9HUZQ93dTPQfzDf+Ny2bnyxWneaqtFClBVFUAcGgDAalU529oAwC931jDN8J7t9pTJnV+XUiHmwYN/AJj57TGjY3/gdpdTVWVPFaFaEgBAebkdTUuecn19C4DWVw1chsb1b+ZZXNxM6l4zsFqS+27/9Igvr97HNMMpAKUkACklm5tR4vHkKXVHspsqKmxcvHCKREIycWsVgIaGSi5/8DwtzVUARKOCublHRwGQbMcSfP/DAgBvv3mSygr7Xu/X1VVy/t26vd23fgwS296ht+c5XEay63TdlgKg6C5I5fTuvXXuTU9Q6y7jvd56Xnm5jsWl9d09yX1nzrj5c+4x0zMb2Gwq3w7/hbkWp/opjfPdNdTXV6YAZKF3gabreptpmjcO09+F7Cmb2+2+DFwtGIFcDyvGSYFRrBSVglIdFTGKOTLAUSCyiZqrAIUQB1YkEsHr9RIMBg/YVlZW8Pv9bG1tZb03Vxeo+SKQ6dzn8xEIBLICBINBlpaWGB4ezglRzBeRput6WyAQuJEe0mg0yuDgICsrK0VNTZfLRXd3N5qm7UtBY2Pjh8CVQ9WAEAKfz0coFKKjowOPx5M357Ozs4yPjzMyMkJfX98+e8lFCFBWVkZ1dXXWIkvXGYaB3W7fC3u6PdsgKgpgYGAAv9+P1+stKgVOp5Ourq4DkSwZwGaz0d/fz9DQEKurq7S2tuJyufZFKBQKMTk5idPp5Ny5c2iali2SpQ8iTdPo7e1lbGyM2tpaDMM4YK+pqaG9vT2r8yOlIN1JT0/PvvymlsPhoLOzM+cw2pWtogCO+vLJKLx02SgEIKWU4aampq8Ad7ZvuBJFBZYBsxCAsFqtc4lE4jtFUZ7MlrNSfwGllGHgJv9LhvwL9JSHUqlHDc4AAAAASUVORK5CYII=)}.resource-icon-quic{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAgpQTFRFAAAAAAAAEhISQEBAQEBAQEBAQEBAQEBAPj4+QEBAPj4+Pz8/Pz8/Pz8/Pz8/QEBAQEBAPj4+Pz8/Pz8/QEBAQEBAPj4+Pz8/Pz8/GxsbAAAAERER/////v7+/f39/Pz8+/v7+vr6+fn59/f39vb2AAAA+Pj49PT0AAAA9fX18/PzAAAA//Pn/5Ap/4QR/86f/5w//cyd/cud/aBI9/Lt993H/oMQ/3wA9tCu8fHxAAAA/3sA/7Rv/9m3/ps+9+vh9end+LqA9c+t97l/7+/vAAAA/8GH/6hX/4MP/pw++Ozi+7Br/oIO8vLy/Jo8/Jk88PDw/Zs9/Zo99enf7u7u7e3tAAAA/5An/sCG8+fd/Y4l7Ozs6+vrAAAA/+bP/fHl/L+E+dSx+6RT8ebb8tnC7uLW7tW+6enp/rNu+eDJ8uba7+TZ+aJR+Zc55+fn+uHK/LBs6urq6Ojo5ubm5eXl4+PjAAAA5OTk4uLi4eHh4ODgjY2N1dXV0dHRi4uL3t7e39/fhoaGbm5uvLy8uLi4hISE29vb3d3d3Nzcg4OD2NjY2traurq6tLS02dnZdnZ2yMjIdXV1gYGB19fX1tbW0tLS1NTUrq6uw8PDwsLCwcHBq6ur09PTiYmJysrKxsbGiIiI0NDQAAAAAAAAAAAAEBAQERERERERERERAAAAAAAAFBQUEBAQERERO29ZqAAAAK50Uk5TAAM4UFRYXGBjaGtucnV5fICDhoqMkJOWmWkFSv///////////2L//2r//2///////////////////3H/////////////c/////////////////////90////////df///////////////////////////////3b/////////////////////////////////////////////////////////bF0EP5eysEkCGkBLwAnvMQAAAfpJREFUeJytkGlbUkEYhsnKyjJbtXQO60nSNGlz1ElapMyMQIJK07TVVlrAJfWInmI3KkAryxL3Sv9jMwPIy2V98/163/PMcz0KxXrchpyNmzbnbtm6LW/7jvydBbt279m7b39h0YGDaaG4BGWdoFSpNVqdeOg/AselOlF/+J8Cfc5xmb78CBQqKo9WIWQQlMeOa06cFE9V45raOiiQ0/WkHmGV2mgsxWfOknPnG0wXgHCRINR4CWFB2WTU4MvNV/Tl5qwEgwGhKryacNVirrVmJSQFJdZoW2wivmaxWE12x3UgNN5Awk2ixlqdzabHrZY2u+NWewcQbpNOFenSkjsiuWvG9+6TB+0Pu6EgPMIEP9Y1E4KfWPFTxzNCnjvBF2y8Fy9xGetuZemvul+73CAhtS3DJjvHTpe7pzcjpLZlmD7nuK+nHwgcw3SK3wwAIZnuHBxiWBr2MDziAQJPd43Kb1n6O9nro9gfAAJLd4/KqxcM+QO+MBBYd688xrvT9PdyMBCOhIDAynk/SLwcTf/4KRqOxOJgB9Z9IJj5IjoeisUnwJJ8GU9Q/vzl6+TkNzkqxeJDE99BQnIZ39QP2t33c1pieFwCCallRlj3CEunOJGYyQju5DL+AMf0OcWJxGxamJtfWFxac4sLv9LC7z/LKyVrbmVZsT73Fy8u3GKpKoI/AAAAAElFTkSuQmCC)}html,body,#container,#mitmproxy{height:100%;margin:0;overflow:hidden}#container{display:flex;flex-direction:column;outline:none}#container>header,#container>footer,#container>.eventlog{flex:0 0 auto}.main-view{flex:1 1 auto;height:0;display:flex;flex-direction:row}.main-view.vertical{flex-direction:column}.main-view .flow-detail,.main-view .flow-table{flex:1 1 auto}.splitter{flex:0 0 1px;background-color:#aaa;position:relative}.splitter>div{position:absolute}.splitter.splitter-x{cursor:col-resize}.splitter.splitter-x>div{margin-left:-1px;width:4px;height:100%}.splitter.splitter-y{cursor:row-resize}.splitter.splitter-y>div{margin-top:-1px;height:4px;width:100%}.nav-tabs{border-bottom:solid #a6a6a6 1px}.nav-tabs>a{display:inline-block;border:solid transparent 1px;text-decoration:none}.nav-tabs>a.active{background-color:#fff;border-color:#a6a6a6;border-bottom-color:#fff}.nav-tabs>a.special{color:#fff;background-color:#396cad;border-bottom-color:#396cad}.nav-tabs>a.special:hover{background-color:#5386c6}.nav-tabs-lg>a{padding:3px 14px;margin:0 2px -1px}.nav-tabs-sm>a{padding:0 7px;margin:2px 2px -1px}header{padding-top:6px;background-color:#fff}header>div:not(:empty){display:block;margin:0;padding:0;border-bottom:solid #a6a6a6 1px;height:95px;overflow:visible}.menu-group{margin:0 5px 0 6px;display:inline-block;height:95px}.menu-content{height:79px;display:flow-root}.menu-content>a{display:inline-block}.menu-content>.btn,.menu-content>a>.btn{height:79px;text-align:center;margin:0 1px;padding:12px 5px;border:none;border-radius:0}.menu-content>.btn i,.menu-content>a>.btn i{font-size:20px;display:block;margin:0 auto 5px}.menu-content>.btn.btn-sm{height:26.33333333px;padding:0 5px}.menu-content>.btn.btn-sm i{display:inline-block;font-size:14px;margin:0}.menu-entry{text-align:left;height:26.33333333px;line-height:1;padding:.5rem 1rem}.menu-entry label{font-size:1.2rem;font-weight:400;margin:0}.menu-entry input[type=checkbox]{margin:0 2px;vertical-align:middle}.menu-legend{color:#777;height:16px;text-align:center;font-size:12px;padding:0 5px}.menu-group+.menu-group:before{margin-left:-6px;content:" ";border-left:solid 1px #e6e6e6;margin-top:10px;height:75px;position:absolute}.main-menu{display:flex}.main-menu .menu-group{width:50%}.main-menu .btn-sm{margin-top:6px}.filter-input{margin:4px 0}.filter-input .popover{top:27px;left:43px;display:block;max-width:none;opacity:.9}@media(max-width:767px){.filter-input .popover{top:16px;left:29px;right:2px}}.filter-input .popover .popover-content{max-height:500px;overflow-y:auto}.filter-input .popover .popover-content tr{cursor:pointer}.filter-input .popover .popover-content tr:hover{background-color:#c1d7eb80!important}.connection-indicator{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;float:right;margin:5px;opacity:1;transition:all 1s linear}a.connection-indicator:hover,a.connection-indicator:focus{color:#fff;text-decoration:none;cursor:pointer}.connection-indicator:empty{display:none}.btn .connection-indicator{position:relative;top:-1px}.connection-indicator.init,.connection-indicator.fetching{background-color:#5bc0de}.connection-indicator.established{background-color:#5cb85c;opacity:0}.connection-indicator.error{background-color:#d9534f;transition:all .2s linear}.connection-indicator.offline{background-color:#f0ad4e;opacity:1}.flow-table{width:100%;overflow-y:scroll;overflow-x:hidden}.flow-table table{width:100%;table-layout:fixed}.flow-table thead tr{background-color:#f2f2f2;border-bottom:solid #bebebe 1px;line-height:23px}.flow-table th{font-weight:400;position:relative!important;padding-left:1px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flow-table th.sort-asc,.flow-table th.sort-desc{background-color:#fafafa}.flow-table th.sort-asc:after,.flow-table th.sort-desc:after{font: 14px/1 FontAwesome;position:absolute;right:3px;top:3px;padding:2px;background-color:#fafafacc}.flow-table th.sort-asc:after{content:""}.flow-table th.sort-desc:after{content:""}.flow-table tr{cursor:pointer;background-color:#fff}.flow-table tr:nth-child(2n){background-color:#f2f2f2}.flow-table tr.highlighted{background-color:#ffeb99}.flow-table tr.highlighted:nth-child(2n){background-color:#ffe680}.flow-table tr.selected{background-color:#e0ebf5!important}.flow-table tr.selected:nth-child(2n){background-color:#c9dcee!important}.flow-table tr.selected.highlighted{background-color:#7dbffc!important}.flow-table tr.selected.highlighted:nth-child(2n){background-color:#5fb0fc!important}.flow-table td{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.flow-table tr.intercepted:not(.has-response) .col-path,.flow-table tr.intercepted:not(.has-response) .col-method{color:#ff8000}.flow-table tr.intercepted.has-response .col-status,.flow-table tr.intercepted.has-response .col-size,.flow-table tr.intercepted.has-response .col-time{color:#ff8000}.flow-table .fa{line-height:inherit}.flow-table .col-tls{width:10px}.flow-table .col-tls-https{background-color:#00b90080}.flow-table .col-index{text-align:right;width:4ch}.flow-table .col-icon{width:32px}.flow-table .col-path .fa{margin-left:0;font-size:16px}.flow-table .col-path .fa-repeat{color:green}.flow-table .col-path .fa-pause{color:#ff8000}.flow-table .col-path .fa-exclamation,.flow-table .col-path .fa-times{color:#8b0000}.flow-table .col-method{width:60px}.flow-table .col-version{width:80px}.flow-table .col-status{width:50px}.flow-table .col-size{width:70px}.flow-table .col-time{width:50px}.flow-table .col-timestamp{width:170px}.flow-table .col-comment{width:150px;padding-left:5px}.flow-table td.col-time,.flow-table td.col-size,.flow-table td.col-timestamp,.flow-table td.col-comment{text-align:right}.flow-table .col-quickactions{width:0;direction:rtl;overflow:hidden;background-color:inherit;font-size:20px}.flow-table .col-quickactions *{direction:ltr}.flow-table tr:hover .col-quickactions{overflow:visible}.flow-table .col-quickactions>div{height:32px;background-color:inherit;display:inline-flex;align-items:center}.flow-table .col-quickactions>div>a{margin-right:2px;height:32px;width:32px;border-radius:16px;text-align:center}.flow-table .col-quickactions>div>a:hover{background-color:#0000000d}.flow-table .col-quickactions .fa-play{transform:translate(1px,2px)}.flow-table .col-quickactions .fa-repeat{transform:translateY(2px)}.flow-detail{width:100%;overflow:hidden;display:flex;flex-direction:column}.flow-detail nav{background-color:#f2f2f2}.flow-detail section{overflow-y:scroll;flex:1;padding:5px 12px 10px}.flow-detail section>footer{box-shadow:0 0 3px gray;padding:2px;margin:0;height:23px}.flow-detail .close-button{margin-top:2px;padding-left:10px;padding-right:7px;color:gray;font-size:15px;border:none}.flow-detail .close-button:hover{color:#000}.flow-detail .first-line{font-family:Menlo,Monaco,Consolas,Courier New,monospace;background-color:#428bca;color:#fff;margin:0 -8px 2px;padding:4px 8px;border-radius:5px;word-break:break-all;max-height:100px;overflow-y:auto}.flow-detail .contentview{margin:0 -12px;padding:0 12px}.flow-detail .contentview .controls{display:flex;align-items:center}.flow-detail .contentview .controls h5{flex:1;font-size:12px;font-weight:700;margin:10px 0}.flow-detail .contentview pre button:not(:only-child){margin-top:6px}.flow-detail hr{margin:0}.inline-input{display:inline;margin:0 -3px;padding:0 3px;border:solid transparent 1px}.inline-input:hover{box-shadow:0 0 0 1px #00000003,0 2px 4px #0000000d,0 2px 6px #00000006;background-color:#ffffff1a}.inline-input[placeholder]:empty:not(:focus-visible):before{content:attr(placeholder);color:#d3d3d3;font-style:italic}.inline-input[contenteditable]{outline-width:0;box-shadow:0 0 0 1px #0000000d,0 2px 4px #0003,0 2px 6px #0000001a;background-color:#fff3}.inline-input[contenteditable].has-warning{color:#ffb8b8}.connection-table,.timing-table,.certificate-table{width:100%;table-layout:fixed;word-break:break-all}.connection-table td:nth-child(2),.timing-table td:nth-child(2),.certificate-table td:nth-child(2){font-family:Menlo,Monaco,Consolas,Courier New,monospace;width:70%}.connection-table tr:not(:first-child),.timing-table tr:not(:first-child),.certificate-table tr:not(:first-child){border-top:1px solid #f7f7f7}.connection-table td,.timing-table td,.certificate-table td{vertical-align:top}.connection-table td:first-child{padding-right:1em}.headers,.trailers{position:relative;min-height:2ex;overflow-wrap:break-word}.headers .kv-row,.trailers .kv-row{margin-bottom:.3em;max-height:12.4ex;overflow-y:auto}.headers .kv-key,.trailers .kv-key{font-weight:700}.headers .kv-value,.trailers .kv-value{font-family:Menlo,Monaco,Consolas,Courier New,monospace}.headers .inline-input,.trailers .inline-input{background-color:#fff}.headers .kv-add-row,.trailers .kv-add-row{opacity:0;color:#666;position:absolute;bottom:4px;right:4px;transition:all .1s ease-in-out}.headers:hover .kv-add-row,.trailers:hover .kv-add-row{opacity:1}.connection-table td,.timing-table td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}dl.cert-attributes{display:flex;flex-flow:row;flex-wrap:wrap;margin-bottom:0}dl.cert-attributes dt,dl.cert-attributes dd{text-overflow:ellipsis;overflow:hidden}dl.cert-attributes dt{flex:0 0 2em}dl.cert-attributes dd{flex:0 0 calc(100% - 2em)}.dns-request table th,.dns-response table th,.dns-request table td,.dns-response table td{padding-right:1rem}.flowview-image{text-align:center;padding:10px 0}.flowview-image img{max-width:100%;max-height:100%}.edit-flow-container{position:fixed;right:20px}.edit-flow{cursor:pointer;position:absolute;right:0;top:5px;height:40px;width:40px;border-radius:20px;z-index:10000;background-color:#ffffffb3;border:solid 2px rgba(248,145,59,.7);text-align:center;font-size:22px;line-height:37px;transition:all .1s ease-in-out}.edit-flow:hover{background-color:#ef6c00b3;color:#000c;border:solid 2px transparent}.eventlog{height:200px;flex:0 0 auto;display:flex;flex-direction:column}.eventlog>div{background-color:#f2f2f2;padding:0 5px;flex:0 0 auto;border-top:1px solid #aaa;cursor:row-resize}.eventlog>pre{flex:1 1 auto;margin:0;border-radius:0;overflow-x:auto;overflow-y:scroll;background-color:#fcfcfc}.eventlog .fa-close{cursor:pointer;float:right;color:gray;padding:3px 0 3px 10px}.eventlog .fa-close:hover{color:#000}.eventlog .btn-toggle{margin-top:-2px;margin-left:3px;padding:2px;font-size:10px;line-height:10px;border-radius:2px}.eventlog .label{cursor:pointer;vertical-align:middle;display:inline-block;margin-top:-2px;margin-left:3px}footer{box-shadow:0 -1px 3px #d3d3d3;padding:0 0 4px 3px}footer .label{margin-right:3px}.CodeMirror{border:1px solid #ccc;height:auto!important}.contentview .header,.contentview .highlight{font-weight:700}.contentview .offset{color:#00f}.contentview .codeeditor{margin-bottom:12px}.contentview .Token_Name_Tag{color:#006400}.contentview .Token_Literal_String{color:#b22222}.contentview .Token_Literal_Number{color:purple}.contentview .Token_Keyword_Constant{color:#00f}.modal-visible{display:block}.modal-dialog{overflow-y:initial!important}.modal-body{max-height:calc(100vh - 200px);overflow-y:auto}.dropdown-menu{margin:0!important;max-height:250px;overflow-y:scroll}.dropdown-menu>li>a{padding:3px 10px}.command-title{background-color:#f2f2f2;border:1px solid #aaa}.command-result{display:block;margin:0;background-color:#fcfcfc;height:100px;max-height:100px;overflow:auto}.command-suggestion{background-color:#9c9c9c}.argument-suggestion{background-color:#c1d7eb80!important}.command>.popover{display:block;position:relative;max-width:none}.available-commands{overflow:auto}.wireguard-config{margin:1rem 0;display:flex;flex-wrap:wrap;column-gap:2rem;align-items:center}.wireguard-config>*{margin:0}.modes{padding:1em 2em 2em;overflow-y:auto;height:100%;width:100vw}.modes h3{margin-bottom:10px}.modes .modes-category{padding-left:10px}.modes .green-left-border{border-left:10px solid #77c77a}.modes .gray-left-border{border-left:10px solid #b2b2b2}.modes .modes-container{display:flex;flex-direction:column;gap:25px}.modes .mode-title{font-size:16px;font-weight:600}.modes .mode-description{color:#b2b2b2;margin-top:-10px}.modes .mode-entry{text-align:left;display:flex;align-items:center;font-size:1.5rem;font-weight:400;margin:0}.modes .mode-entry input[type=checkbox]{margin:0 10px;vertical-align:middle;width:1.8rem;height:1.8rem}.modes .mode-entry p{margin:0}.modes .mode-status{margin-left:10px;margin-top:5px;font-weight:600}.modes .mode-local i{font-size:1.8rem;cursor:pointer}.modes .mode-local .processes-container{display:flex;flex-direction:row;align-items:center;gap:5px;margin-left:5px}.modes .mode-local .selected-processes{display:flex;flex-wrap:wrap;gap:5px;overflow:hidden}.modes .mode-local .selected-process{display:flex;flex-direction:row;gap:5px;background-color:#e0e0e0;padding:5px;border-radius:4px;height:30px;font-size:12px;font-weight:500;align-content:center;align-items:center}.modes .mode-local .selected-process>i{font-size:15px}.modes .mode-local .dropdown-container{display:flex;flex-direction:row;align-items:center}.modes .mode-local .local-dropdown{position:relative;width:200px}.modes .mode-local .local-dropdown .dropdown-header{padding:5px;border:1px solid #ccc;border-radius:4px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;margin-right:10px;height:30px}.modes .mode-local .local-dropdown input{border:none;flex:1;outline:none;color:#000}.modes .mode-local .local-dropdown .dropdown-list{width:100%;max-height:300px;overflow-y:auto;z-index:1;list-style:none;padding:0;margin-bottom:0}.modes .mode-local .local-dropdown .dropdown-item{display:flex;flex-direction:row;align-items:center;padding:8px 10px;margin:4px 0;border-radius:4px;cursor:pointer;transition:background-color .2s ease;justify-content:space-between}.modes .mode-local .local-dropdown .dropdown-item.selected{background-color:#e0e0e0}.modes .mode-local .local-dropdown .dropdown-item:hover{background-color:#f0f0f0}.modes .mode-local .local-dropdown .process-details{display:flex;flex-direction:row;align-items:center}.modes .mode-local .local-dropdown .process-icon{margin-right:5px;margin-left:5px;color:#5f6368;width:25px;height:25px}.modes .mode-local .local-dropdown .process-name{font-weight:500;color:#333}.modes .mode-local .local-dropdown .process-separator{margin-top:10px;margin-bottom:10px}.modes .mode-local .local-popover button{font-size:1rem}.modes .mode-local .local-popover i{font-size:1.5rem}@supports (anchor-name: --test){.modes .mode-local .local-popover>div{margin:0;position:absolute;top:10px;position-area:bottom}}.modes .mode-local .local-popover>div{gap:.5rem;align-items:center}.modes .mode-local .local-popover>div:popover-open{display:block}.modes .mode-input{border:1px solid #ccc;margin-left:10px;border-radius:4px;min-width:120px;height:25px}.modes .mode-reverse-input{border:1px solid #ccc;margin-left:10px;margin-right:10px;border-radius:4px;min-width:70px;height:25px}.modes .mode-upstream-input{border:1px solid #ccc;margin-left:10px;margin-right:5px;border-radius:4px;min-width:70px;height:25px}.modes .mode-reverse-dropdown{margin:0 5px;border:1px solid #ccc;border-radius:4px;height:25px}.modes .mode-reverse-servers{display:flex;flex-direction:column;gap:10px}.modes .mode-reverse-add-server{margin-left:10px;display:flex;flex-direction:row;cursor:pointer;font-weight:500;opacity:.5;transition:all 50ms ease-in-out}.modes .mode-reverse-add-server:hover{opacity:1}.modes .mode-reverse-add-server i{font-size:2rem;margin-right:5px}.modes .mode-popover>button{background-color:transparent;border:none;cursor:pointer;font-size:2rem}@supports (anchor-name: --test){.modes .mode-popover>div{margin:0;position:absolute;position-area:right}}.modes .mode-popover>div{border:1px solid #ccc;border-radius:4px;padding:10px 15px;background-color:#f9f9f9;box-shadow:0 4px 8px #0000001a;grid-template-columns:9em 1fr;grid-auto-rows:min-content;gap:.5rem;align-items:center}.modes .mode-popover>div:popover-open{display:grid}.modes .mode-popover>div>h4{text-align:center;grid-column:1/-1}.modes .mode-popover>div>.mode-input{text-align:right;background-color:#fff;margin:0}.modes .missing-mode-container{color:#b2b2b2}.modes .missing-mode-container .title-icon-container{display:flex;flex-direction:row;align-items:center;gap:5px}.modes .missing-mode-container .title-icon-container i{font-size:1.8rem} diff --git a/mitmproxy/tools/web/static/vendor-BS4xPthR.js b/mitmproxy/tools/web/static/vendor-BS4xPthR.js deleted file mode 100644 index 0ceec93567..0000000000 --- a/mitmproxy/tools/web/static/vendor-BS4xPthR.js +++ /dev/null @@ -1,62 +0,0 @@ -function yR(n,e){for(var t=0;ti[r]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}var Um=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xv(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var K1={exports:{}},lO={};var qx;function SR(){if(qx)return lO;qx=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(i,r,s){var o=null;if(s!==void 0&&(o=""+s),r.key!==void 0&&(o=""+r.key),"key"in r){s={};for(var f in r)f!=="key"&&(s[f]=r[f])}else s=r;return r=s.ref,{$$typeof:n,type:i,key:o,ref:r!==void 0?r:null,props:s}}return lO.Fragment=e,lO.jsx=t,lO.jsxs=t,lO}var zx;function bR(){return zx||(zx=1,K1.exports=SR()),K1.exports}var vR=bR(),F1={exports:{}},sO={},J1={exports:{}},eS={};var Bx;function xR(){return Bx||(Bx=1,function(n){function e(I,oe){var ge=I.length;I.push(oe);e:for(;0>>1,X=I[Re];if(0>>1;Rer(me,ge))Cer(De,me)?(I[Re]=De,I[Ce]=ge,Re=Ce):(I[Re]=me,I[Se]=ge,Re=Se);else if(Cer(De,ge))I[Re]=De,I[Ce]=ge,Re=Ce;else break e}}return oe}function r(I,oe){var ge=I.sortIndex-oe.sortIndex;return ge!==0?ge:I.id-oe.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,f=o.now();n.unstable_now=function(){return o.now()-f}}var h=[],p=[],g=1,S=null,v=3,Q=!1,k=!1,C=!1,A=!1,$=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function Y(I){for(var oe=t(p);oe!==null;){if(oe.callback===null)i(p);else if(oe.startTime<=I)i(p),oe.sortIndex=oe.expirationTime,e(h,oe);else break;oe=t(p)}}function q(I){if(C=!1,Y(I),!k)if(t(h)!==null)k=!0,N||(N=!0,te());else{var oe=t(p);oe!==null&&we(q,oe.startTime-I)}}var N=!1,V=-1,J=5,ne=-1;function de(){return A?!0:!(n.unstable_now()-neI&&de());){var Re=S.callback;if(typeof Re=="function"){S.callback=null,v=S.priorityLevel;var X=Re(S.expirationTime<=I);if(I=n.unstable_now(),typeof X=="function"){S.callback=X,Y(I),oe=!0;break t}S===t(h)&&i(h),Y(I)}else i(h);S=t(h)}if(S!==null)oe=!0;else{var ie=t(p);ie!==null&&we(q,ie.startTime-I),oe=!1}}break e}finally{S=null,v=ge,Q=!1}oe=void 0}}finally{oe?te():N=!1}}}var te;if(typeof D=="function")te=function(){D(ae)};else if(typeof MessageChannel<"u"){var Oe=new MessageChannel,ye=Oe.port2;Oe.port1.onmessage=ae,te=function(){ye.postMessage(null)}}else te=function(){$(ae,0)};function we(I,oe){V=$(function(){I(n.unstable_now())},oe)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(I){I.callback=null},n.unstable_forceFrameRate=function(I){0>I||125Re?(I.sortIndex=ge,e(p,I),t(h)===null&&I===t(p)&&(C?(z(V),V=-1):C=!0,we(q,ge-Re))):(I.sortIndex=X,e(h,I),k||Q||(k=!0,N||(N=!0,te()))),I},n.unstable_shouldYield=de,n.unstable_wrapCallback=function(I){var oe=v;return function(){var ge=v;v=oe;try{return I.apply(this,arguments)}finally{v=ge}}}}(eS)),eS}var Yx;function QR(){return Yx||(Yx=1,J1.exports=xR()),J1.exports}var tS={exports:{}},Ie={};var Lx;function wR(){if(Lx)return Ie;Lx=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),S=Symbol.iterator;function v(X){return X===null||typeof X!="object"?null:(X=S&&X[S]||X["@@iterator"],typeof X=="function"?X:null)}var Q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,C={};function A(X,ie,Se){this.props=X,this.context=ie,this.refs=C,this.updater=Se||Q}A.prototype.isReactComponent={},A.prototype.setState=function(X,ie){if(typeof X!="object"&&typeof X!="function"&&X!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,X,ie,"setState")},A.prototype.forceUpdate=function(X){this.updater.enqueueForceUpdate(this,X,"forceUpdate")};function $(){}$.prototype=A.prototype;function z(X,ie,Se){this.props=X,this.context=ie,this.refs=C,this.updater=Se||Q}var D=z.prototype=new $;D.constructor=z,k(D,A.prototype),D.isPureReactComponent=!0;var Y=Array.isArray,q={H:null,A:null,T:null,S:null,V:null},N=Object.prototype.hasOwnProperty;function V(X,ie,Se,me,Ce,De){return Se=De.ref,{$$typeof:n,type:X,key:ie,ref:Se!==void 0?Se:null,props:De}}function J(X,ie){return V(X.type,ie,void 0,void 0,void 0,X.props)}function ne(X){return typeof X=="object"&&X!==null&&X.$$typeof===n}function de(X){var ie={"=":"=0",":":"=2"};return"$"+X.replace(/[=:]/g,function(Se){return ie[Se]})}var ae=/\/+/g;function te(X,ie){return typeof X=="object"&&X!==null&&X.key!=null?de(""+X.key):ie.toString(36)}function Oe(){}function ye(X){switch(X.status){case"fulfilled":return X.value;case"rejected":throw X.reason;default:switch(typeof X.status=="string"?X.then(Oe,Oe):(X.status="pending",X.then(function(ie){X.status==="pending"&&(X.status="fulfilled",X.value=ie)},function(ie){X.status==="pending"&&(X.status="rejected",X.reason=ie)})),X.status){case"fulfilled":return X.value;case"rejected":throw X.reason}}throw X}function we(X,ie,Se,me,Ce){var De=typeof X;(De==="undefined"||De==="boolean")&&(X=null);var Ae=!1;if(X===null)Ae=!0;else switch(De){case"bigint":case"string":case"number":Ae=!0;break;case"object":switch(X.$$typeof){case n:case e:Ae=!0;break;case g:return Ae=X._init,we(Ae(X._payload),ie,Se,me,Ce)}}if(Ae)return Ce=Ce(X),Ae=me===""?"."+te(X,0):me,Y(Ce)?(Se="",Ae!=null&&(Se=Ae.replace(ae,"$&/")+"/"),we(Ce,ie,Se,"",function(Xt){return Xt})):Ce!=null&&(ne(Ce)&&(Ce=J(Ce,Se+(Ce.key==null||X&&X.key===Ce.key?"":(""+Ce.key).replace(ae,"$&/")+"/")+Ae)),ie.push(Ce)),1;Ae=0;var yt=me===""?".":me+":";if(Y(X))for(var We=0;We"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),nS.exports=kR(),nS.exports}var Gx;function TR(){if(Gx)return sO;Gx=1;var n=QR(),e=tp(),t=PT();function i(l){var a="https://react.dev/errors/"+l;if(1X||(l.current=Re[X],Re[X]=null,X--)}function me(l,a){X++,Re[X]=l.current,l.current=a}var Ce=ie(null),De=ie(null),Ae=ie(null),yt=ie(null);function We(l,a){switch(me(Ae,a),me(De,l),me(Ce,null),a.nodeType){case 9:case 11:l=(l=a.documentElement)&&(l=l.namespaceURI)?Bt(l):0;break;default:if(l=a.tagName,a=a.namespaceURI)a=Bt(a),l=Lt(a,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}Se(Ce),me(Ce,l)}function Xt(){Se(Ce),Se(De),Se(Ae)}function Wi(l){l.memoizedState!==null&&me(yt,l);var a=Ce.current,u=Lt(a,l.type);a!==u&&(me(De,l),me(Ce,u))}function sl(l){De.current===l&&(Se(Ce),Se(De)),yt.current===l&&(Se(yt),Wa._currentValue=ge)}var tn=Object.prototype.hasOwnProperty,dr=n.unstable_scheduleCallback,ui=n.unstable_cancelCallback,fo=n.unstable_shouldYield,zy=n.unstable_requestPaint,hn=n.unstable_now,mp=n.unstable_getCurrentPriorityLevel,yp=n.unstable_ImmediatePriority,Ws=n.unstable_UserBlockingPriority,Ln=n.unstable_NormalPriority,ho=n.unstable_LowPriority,Oo=n.unstable_IdlePriority,By=n.log,po=n.unstable_setDisableYieldValue,go=null,vn=null;function ci(l){if(typeof By=="function"&&po(l),vn&&typeof vn.setStrictMode=="function")try{vn.setStrictMode(go,l)}catch{}}var Rn=Math.clz32?Math.clz32:ch,oh=Math.log,uh=Math.LN2;function ch(l){return l>>>=0,l===0?32:31-(oh(l)/uh|0)|0}var js=256,Hs=4194304;function Mr(l){var a=l&42;if(a!==0)return a;switch(l&-l){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:return 64;case 128:return 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 l&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function Is(l,a,u){var O=l.pendingLanes;if(O===0)return 0;var m=0,b=l.suspendedLanes,w=l.pingedLanes;l=l.warmLanes;var _=O&134217727;return _!==0?(O=_&~b,O!==0?m=Mr(O):(w&=_,w!==0?m=Mr(w):u||(u=_&~l,u!==0&&(m=Mr(u))))):(_=O&~b,_!==0?m=Mr(_):w!==0?m=Mr(w):u||(u=O&~l,u!==0&&(m=Mr(u)))),m===0?0:a!==0&&a!==m&&(a&b)===0&&(b=m&-m,u=a&-a,b>=u||b===32&&(u&4194048)!==0)?a:m}function ls(l,a){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&a)===0}function Yy(l,a){switch(l){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32: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 a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Sp(){var l=js;return js<<=1,(js&4194048)===0&&(js=256),l}function bp(){var l=Hs;return Hs<<=1,(Hs&62914560)===0&&(Hs=4194304),l}function Hu(l){for(var a=[],u=0;31>u;u++)a.push(l);return a}function Ks(l,a){l.pendingLanes|=a,a!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function Ly(l,a,u,O,m,b){var w=l.pendingLanes;l.pendingLanes=u,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=u,l.entangledLanes&=u,l.errorRecoveryDisabledLanes&=u,l.shellSuspendCounter=0;var _=l.entanglements,Z=l.expirationTimes,H=l.hiddenUpdates;for(u=w&~u;0)":-1m||Z[O]!==H[m]){var le=` -`+Z[O].replace(" at new "," at ");return l.displayName&&le.includes("")&&(le=le.replace("",l.displayName)),le}while(1<=O&&0<=m);break}}}finally{ph=!1,Error.prepareStackTrace=u}return(u=l?l.displayName||l.name:"")?ia(u):""}function Wy(l){switch(l.tag){case 26:case 27:case 5:return ia(l.type);case 16:return ia("Lazy");case 13:return ia("Suspense");case 19:return ia("SuspenseList");case 0:case 15:return gh(l.type,!1);case 11:return gh(l.type.render,!1);case 1:return gh(l.type,!0);case 31:return ia("Activity");default:return""}}function mh(l){try{var a="";do a+=Wy(l),l=l.return;while(l);return a}catch(u){return` -Error generating stack: `+u.message+` -`+u.stack}}function fi(l){switch(typeof l){case"bigint":case"boolean":case"number":case"string":case"undefined":return l;case"object":return l;default:return""}}function yh(l){var a=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Sh(l){var a=yh(l)?"checked":"value",u=Object.getOwnPropertyDescriptor(l.constructor.prototype,a),O=""+l[a];if(!l.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var m=u.get,b=u.set;return Object.defineProperty(l,a,{configurable:!0,get:function(){return m.call(this)},set:function(w){O=""+w,b.call(this,w)}}),Object.defineProperty(l,a,{enumerable:u.enumerable}),{getValue:function(){return O},setValue:function(w){O=""+w},stopTracking:function(){l._valueTracker=null,delete l[a]}}}}function tc(l){l._valueTracker||(l._valueTracker=Sh(l))}function bh(l){if(!l)return!1;var a=l._valueTracker;if(!a)return!0;var u=a.getValue(),O="";return l&&(O=yh(l)?l.checked?"true":"false":l.value),l=O,l!==u?(a.setValue(l),!0):!1}function as(l){if(l=l||(typeof document<"u"?document:void 0),typeof l>"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var _p=/[\n"\\]/g;function Ti(l){return l.replace(_p,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function nc(l,a,u,O,m,b,w,_){l.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?l.type=w:l.removeAttribute("type"),a!=null?w==="number"?(a===0&&l.value===""||l.value!=a)&&(l.value=""+fi(a)):l.value!==""+fi(a)&&(l.value=""+fi(a)):w!=="submit"&&w!=="reset"||l.removeAttribute("value"),a!=null?So(l,w,fi(a)):u!=null?So(l,w,fi(u)):O!=null&&l.removeAttribute("value"),m==null&&b!=null&&(l.defaultChecked=!!b),m!=null&&(l.checked=m&&typeof m!="function"&&typeof m!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?l.name=""+fi(_):l.removeAttribute("name")}function vh(l,a,u,O,m,b,w,_){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(l.type=b),a!=null||u!=null){if(!(b!=="submit"&&b!=="reset"||a!=null))return;u=u!=null?""+fi(u):"",a=a!=null?""+fi(a):u,_||a===l.value||(l.value=a),l.defaultValue=a}O=O??m,O=typeof O!="function"&&typeof O!="symbol"&&!!O,l.checked=_?l.checked:!!O,l.defaultChecked=!!O,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(l.name=w)}function So(l,a,u){a==="number"&&as(l.ownerDocument)===l||l.defaultValue===""+u||(l.defaultValue=""+u)}function ra(l,a,u,O){if(l=l.options,a){a={};for(var m=0;m"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xo=!1;if(Er)try{var Qo={};Object.defineProperty(Qo,"passive",{get:function(){xo=!0}}),window.addEventListener("test",Qo,Qo),window.removeEventListener("test",Qo,Qo)}catch{xo=!1}var cl=null,Ch=null,lc=null;function $p(){if(lc)return lc;var l,a=Ch,u=a.length,O,m="value"in cl?cl.value:cl.textContent,b=m.length;for(l=0;l=ca),hc=" ",Zh=!1;function Vp(l,a){switch(l){case"keyup":return ua.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dc(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var hl=!1;function t1(l,a){switch(l){case"compositionend":return dc(a);case"keypress":return a.which!==32?null:(Zh=!0,hc);case"textInput":return l=a.data,l===hc&&Zh?null:l;default:return null}}function Np(l,a){if(hl)return l==="compositionend"||!Xh&&Vp(l,a)?(l=$p(),lc=Ch=cl=null,hl=!1,l):null;switch(l){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-l};l=O}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Ci(u)}}function Ip(l,a){return l&&a?l===a?!0:l&&l.nodeType===3?!1:a&&a.nodeType===3?Ip(l,a.parentNode):"contains"in l?l.contains(a):l.compareDocumentPosition?!!(l.compareDocumentPosition(a)&16):!1:!1}function Kp(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var a=as(l.document);a instanceof l.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)l=a.contentWindow;else break;a=as(l.document)}return a}function zh(l){var a=l&&l.nodeName&&l.nodeName.toLowerCase();return a&&(a==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||a==="textarea"||l.contentEditable==="true")}var l1=Er&&"documentMode"in document&&11>=document.documentMode,Oa=null,pl=null,U=null,re=!1;function ee(l,a,u){var O=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;re||Oa==null||Oa!==as(O)||(O=Oa,"selectionStart"in O&&zh(O)?O={start:O.selectionStart,end:O.selectionEnd}:(O=(O.ownerDocument&&O.ownerDocument.defaultView||window).getSelection(),O={anchorNode:O.anchorNode,anchorOffset:O.anchorOffset,focusNode:O.focusNode,focusOffset:O.focusOffset}),U&&gr(U,O)||(U=O,O=hf(pl,"onSelect"),0>=w,m-=w,Dt=1<<32-Rn(a)+m|u<b?b:8;var w=I.T,_={};I.T=_,dd(l,!1,a,u);try{var Z=m(),H=I.S;if(H!==null&&H(_,Z),Z!==null&&typeof Z=="object"&&typeof Z.then=="function"){var le=f1(Z,O);Qs(l,a,le,Pn(l))}else Qs(l,a,O,Pn(l))}catch(fe){Qs(l,a,{then:function(){},status:"rejected",reason:fe},Pn())}finally{oe.p=b,I.T=w}}function bg(){}function jo(l,a,u,O){if(l.tag!==5)throw Error(i(476));var m=fd(l).queue;Wo(l,m,a,ge,u===null?bg:function(){return Yc(l),u(O)})}function fd(l){var a=l.memoizedState;if(a!==null)return a;a={memoizedState:ge,baseState:ge,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yr,lastRenderedState:ge},next:null};var u={};return a.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yr,lastRenderedState:u},next:null},l.memoizedState=a,l=l.alternate,l!==null&&(l.memoizedState=a),a}function Yc(l){var a=fd(l).next.queue;Qs(l,a,{},Pn())}function Ho(){return Ut(Wa)}function Lr(){return Jt().memoizedState}function vg(){return Jt().memoizedState}function xl(l){for(var a=l.return;a!==null;){switch(a.tag){case 24:case 3:var u=Pn();l=Sl(u);var O=zr(a,l,u);O!==null&&(bi(O,a,u),Do(O,a,u)),a={cache:Uh()},l.payload=a;return}a=a.return}}function xg(l,a,u){var O=Pn();u={lane:O,revertLane:0,action:u,hasEagerState:!1,eagerState:null,next:null},Lc(l)?Qg(a,u):(u=ma(l,a,u,O),u!==null&&(bi(u,l,O),Od(u,a,O)))}function hd(l,a,u){var O=Pn();Qs(l,a,u,O)}function Qs(l,a,u,O){var m={lane:O,revertLane:0,action:u,hasEagerState:!1,eagerState:null,next:null};if(Lc(l))Qg(a,m);else{var b=l.alternate;if(l.lanes===0&&(b===null||b.lanes===0)&&(b=a.lastRenderedReducer,b!==null))try{var w=a.lastRenderedState,_=b(w,u);if(m.hasEagerState=!0,m.eagerState=_,di(_,w))return Hi(l,a,m,0),Ct===null&&us(),!1}catch{}finally{}if(u=ma(l,a,m,O),u!==null)return bi(u,l,O),Od(u,a,O),!0}return!1}function dd(l,a,u,O){if(O={lane:2,revertLane:ff(),action:O,hasEagerState:!1,eagerState:null,next:null},Lc(l)){if(a)throw Error(i(479))}else a=ma(l,u,O,2),a!==null&&bi(a,l,2)}function Lc(l){var a=l.alternate;return l===He||a!==null&&a===He}function Qg(l,a){bs=Qa=!0;var u=l.pending;u===null?a.next=a:(a.next=u.next,u.next=a),l.pending=a}function Od(l,a,u){if((u&4194048)!==0){var O=a.lanes;O&=l.pendingLanes,u|=O,a.lanes=u,xp(l,u)}}var Io={readContext:Ut,use:Rc,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useLayoutEffect:lt,useInsertionEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useSyncExternalStore:lt,useId:lt,useHostTransitionStatus:lt,useFormState:lt,useActionState:lt,useOptimistic:lt,useMemoCache:lt,useCacheRefresh:lt},wg={readContext:Ut,use:Rc,useCallback:function(l,a){return In().memoizedState=[l,a===void 0?null:a],l},useContext:Ut,useEffect:yg,useImperativeHandle:function(l,a,u){u=u!=null?u.concat([l]):null,Vo(4194308,4,zc.bind(null,a,l),u)},useLayoutEffect:function(l,a){return Vo(4194308,4,l,a)},useInsertionEffect:function(l,a){Vo(4,2,l,a)},useMemo:function(l,a){var u=In();a=a===void 0?null:a;var O=l();if(kn){ci(!0);try{l()}finally{ci(!1)}}return u.memoizedState=[O,a],O},useReducer:function(l,a,u){var O=In();if(u!==void 0){var m=u(a);if(kn){ci(!0);try{u(a)}finally{ci(!1)}}}else m=a;return O.memoizedState=O.baseState=m,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:m},O.queue=l,l=l.dispatch=xg.bind(null,He,l),[O.memoizedState,l]},useRef:function(l){var a=In();return l={current:l},a.memoizedState=l},useState:function(l){l=Ec(l);var a=l.queue,u=hd.bind(null,He,a);return a.dispatch=u,[l.memoizedState,u]},useDebugValue:Bc,useDeferredValue:function(l,a){var u=In();return Go(u,l,a)},useTransition:function(){var l=Ec(!1);return l=Wo.bind(null,He,l.queue,!0,!1),In().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,a,u){var O=He,m=In();if(it){if(u===void 0)throw Error(i(407));u=u()}else{if(u=a(),Ct===null)throw Error(i(349));(at&124)!==0||$c(O,a,u)}m.memoizedState=u;var b={value:u,getSnapshot:a};return m.queue=b,yg(Mc.bind(null,O,b,l),[l]),O.flags|=2048,ka(9,qc(),Og.bind(null,O,b,u,a),null),u},useId:function(){var l=In(),a=Ct.identifierPrefix;if(it){var u=Dr,O=Dt;u=(O&~(1<<32-Rn(O)-1)).toString(32)+u,a="«"+a+"R"+u,u=wa++,0Be?(yn=Me,Me=null):yn=Me.sibling;var ct=F(G,Me,j[Be],se);if(ct===null){Me===null&&(Me=yn);break}l&&Me&&ct.alternate===null&&a(G,Me),L=b(ct,L,Be),Fe===null?Pe=ct:Fe.sibling=ct,Fe=ct,Me=yn}if(Be===j.length)return u(G,Me),it&&Os(G,Be),Pe;if(Me===null){for(;BeBe?(yn=Me,Me=null):yn=Me.sibling;var ql=F(G,Me,ct.value,se);if(ql===null){Me===null&&(Me=yn);break}l&&Me&&ql.alternate===null&&a(G,Me),L=b(ql,L,Be),Fe===null?Pe=ql:Fe.sibling=ql,Fe=ql,Me=yn}if(ct.done)return u(G,Me),it&&Os(G,Be),Pe;if(Me===null){for(;!ct.done;Be++,ct=j.next())ct=fe(G,ct.value,se),ct!==null&&(L=b(ct,L,Be),Fe===null?Pe=ct:Fe.sibling=ct,Fe=ct);return it&&Os(G,Be),Pe}for(Me=O(Me);!ct.done;Be++,ct=j.next())ct=K(Me,G,Be,ct.value,se),ct!==null&&(l&&ct.alternate!==null&&Me.delete(ct.key===null?Be:ct.key),L=b(ct,L,Be),Fe===null?Pe=ct:Fe.sibling=ct,Fe=ct);return l&&Me.forEach(function(j1){return a(G,j1)}),it&&Os(G,Be),Pe}function kt(G,L,j,se){if(typeof j=="object"&&j!==null&&j.type===k&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case v:e:{for(var Pe=j.key;L!==null;){if(L.key===Pe){if(Pe=j.type,Pe===k){if(L.tag===7){u(G,L.sibling),se=m(L,j.props.children),se.return=G,G=se;break e}}else if(L.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===J&&ks(Pe)===L.type){u(G,L.sibling),se=m(L,j.props),Ko(se,j),se.return=G,G=se;break e}u(G,L);break}else a(G,L);L=L.sibling}j.type===k?(se=ds(j.props.children,G.mode,se,j.key),se.return=G,G=se):(se=vc(j.type,j.key,j.props,null,G.mode,se),Ko(se,j),se.return=G,G=se)}return w(G);case Q:e:{for(Pe=j.key;L!==null;){if(L.key===Pe)if(L.tag===4&&L.stateNode.containerInfo===j.containerInfo&&L.stateNode.implementation===j.implementation){u(G,L.sibling),se=m(L,j.children||[]),se.return=G,G=se;break e}else{u(G,L);break}else a(G,L);L=L.sibling}se=ya(j,G.mode,se),se.return=G,G=se}return w(G);case J:return Pe=j._init,j=Pe(j._payload),kt(G,L,j,se)}if(we(j))return ze(G,L,j,se);if(te(j)){if(Pe=te(j),typeof Pe!="function")throw Error(i(150));return j=Pe.call(j),qe(G,L,j,se)}if(typeof j.then=="function")return kt(G,L,Vc(j),se);if(j.$$typeof===D)return kt(G,L,wc(G,j),se);ws(G,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(j=""+j,L!==null&&L.tag===6?(u(G,L.sibling),se=m(L,j),se.return=G,G=se):(u(G,L),se=Lh(j,G.mode,se),se.return=G,G=se),w(G)):u(G,L)}return function(G,L,j,se){try{Fn=0;var Pe=kt(G,L,j,se);return rn=null,Pe}catch(Me){if(Me===Mn||Me===Tc)throw Me;var Fe=Gn(29,Me,null,G.mode);return Fe.lanes=se,Fe.return=G,Fe}finally{}}}var Ts=gd(!0),Tg=gd(!1),mi=ie(null),En=null;function Zi(l){var a=l.alternate;me(Gt,Gt.current&1),me(mi,l),En===null&&(a===null||Ss.current!==null||a.memoizedState!==null)&&(En=l)}function Pg(l){if(l.tag===22){if(me(Gt,Gt.current),me(mi,l),En===null){var a=l.alternate;a!==null&&a.memoizedState!==null&&(En=l)}}else Vr()}function Vr(){me(Gt,Gt.current),me(mi,mi.current)}function Sr(l){Se(mi),En===l&&(En=null),Se(Gt)}var Gt=ie(0);function Fo(l){for(var a=l;a!==null;){if(a.tag===13){var u=a.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||Zn(u)))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===l)break;for(;a.sibling===null;){if(a.return===null||a.return===l)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}function Pa(l,a,u,O){a=l.memoizedState,u=u(O,a),u=u==null?a:g({},a,u),l.memoizedState=u,l.lanes===0&&(l.updateQueue.baseState=u)}var Jo={enqueueSetState:function(l,a,u){l=l._reactInternals;var O=Pn(),m=Sl(O);m.payload=a,u!=null&&(m.callback=u),a=zr(l,m,O),a!==null&&(bi(a,l,O),Do(a,l,O))},enqueueReplaceState:function(l,a,u){l=l._reactInternals;var O=Pn(),m=Sl(O);m.tag=1,m.payload=a,u!=null&&(m.callback=u),a=zr(l,m,O),a!==null&&(bi(a,l,O),Do(a,l,O))},enqueueForceUpdate:function(l,a){l=l._reactInternals;var u=Pn(),O=Sl(u);O.tag=2,a!=null&&(O.callback=a),a=zr(l,O,u),a!==null&&(bi(a,l,u),Do(a,l,u))}};function eu(l,a,u,O,m,b,w){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(O,b,w):a.prototype&&a.prototype.isPureReactComponent?!gr(u,O)||!gr(m,b):!0}function _g(l,a,u,O){l=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(u,O),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(u,O),a.state!==l&&Jo.enqueueReplaceState(a,a.state,null)}function Ql(l,a){var u=a;if("ref"in a){u={};for(var O in a)O!=="ref"&&(u[O]=a[O])}if(l=l.defaultProps){u===a&&(u=g({},u));for(var m in l)u[m]===void 0&&(u[m]=l[m])}return u}var Ps=typeof reportError=="function"?reportError:function(l){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof l=="object"&&l!==null&&typeof l.message=="string"?String(l.message):String(l),error:l});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",l);return}console.error(l)};function md(l){Ps(l)}function Nc(l){console.error(l)}function Cg(l){Ps(l)}function tu(l,a){try{var u=l.onUncaughtError;u(a.value,{componentStack:a.stack})}catch(O){setTimeout(function(){throw O})}}function br(l,a,u){try{var O=l.onCaughtError;O(u.value,{componentStack:u.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Uc(l,a,u){return u=Sl(u),u.tag=3,u.payload={element:null},u.callback=function(){tu(l,a)},u}function yd(l){return l=Sl(l),l.tag=3,l}function Rg(l,a,u,O){var m=u.type.getDerivedStateFromError;if(typeof m=="function"){var b=O.value;l.payload=function(){return m(b)},l.callback=function(){br(a,u,O)}}var w=u.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(l.callback=function(){br(a,u,O),typeof m!="function"&&(Cl===null?Cl=new Set([this]):Cl.add(this));var _=O.stack;this.componentDidCatch(O.value,{componentStack:_!==null?_:""})})}function Ag(l,a,u,O,m){if(u.flags|=32768,O!==null&&typeof O=="object"&&typeof O.then=="function"){if(a=u.alternate,a!==null&&Eo(a,u,m,!0),u=mi.current,u!==null){switch(u.tag){case 13:return En===null?Dd():u.alternate===null&&Wt===0&&(Wt=3),u.flags&=-257,u.flags|=65536,u.lanes=m,O===Wh?u.flags|=16384:(a=u.updateQueue,a===null?u.updateQueue=new Set([O]):a.add(O),Bd(l,O,m)),!1;case 22:return u.flags|=65536,O===Wh?u.flags|=16384:(a=u.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([O])},u.updateQueue=a):(u=a.retryQueue,u===null?a.retryQueue=new Set([O]):u.add(O)),Bd(l,O,m)),!1}throw Error(i(435,u.tag))}return Bd(l,O,m),Dd(),!1}if(it)return a=mi.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=m,O!==Sa&&(l=Error(i(422),{cause:O}),ml(An(l,u)))):(O!==Sa&&(a=Error(i(423),{cause:O}),ml(An(a,u))),l=l.current.alternate,l.flags|=65536,m&=-m,l.lanes|=m,O=An(O,u),m=Uc(l.stateNode,O,m),Ki(l,m),Wt!==4&&(Wt=2)),!1;var b=Error(i(520),{cause:O});if(b=An(b,u),fu===null?fu=[b]:fu.push(b),Wt!==4&&(Wt=2),a===null)return!0;O=An(O,u),u=a;do{switch(u.tag){case 3:return u.flags|=65536,l=m&-m,u.lanes|=l,l=Uc(u.stateNode,O,l),Ki(u,l),!1;case 1:if(a=u.type,b=u.stateNode,(u.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Cl===null||!Cl.has(b))))return u.flags|=65536,m&=-m,u.lanes|=m,m=yd(m),Rg(m,l,u,O),Ki(u,m),!1}u=u.return}while(u!==null);return!1}var $g=Error(i(461)),pn=!1;function At(l,a,u,O){a.child=l===null?Tg(a,null,u,O):Ts(a,l.child,u,O)}function Gc(l,a,u,O,m){u=u.render;var b=a.ref;if("ref"in O){var w={};for(var _ in O)_!=="ref"&&(w[_]=O[_])}else w=O;return gs(a),O=Kh(l,a,u,w,b,m),_=Jh(),l!==null&&!pn?(vs(l,a,m),Nr(l,a,m)):(it&&_&&Nh(a),a.flags|=1,At(l,a,O,m),a.child)}function Wc(l,a,u,O,m){if(l===null){var b=u.type;return typeof b=="function"&&!hs(b)&&b.defaultProps===void 0&&u.compare===null?(a.tag=15,a.type=b,jc(l,a,b,O,m)):(l=vc(u.type,null,O,a,a.mode,m),l.ref=a.ref,l.return=a,a.child=l)}if(b=l.child,!er(l,m)){var w=b.memoizedProps;if(u=u.compare,u=u!==null?u:gr,u(w,O)&&l.ref===a.ref)return Nr(l,a,m)}return a.flags|=1,l=$n(b,O),l.ref=a.ref,l.return=a,a.child=l}function jc(l,a,u,O,m){if(l!==null){var b=l.memoizedProps;if(gr(b,O)&&l.ref===a.ref)if(pn=!1,a.pendingProps=O=b,er(l,m))(l.flags&131072)!==0&&(pn=!0);else return a.lanes=l.lanes,Nr(l,a,m)}return _a(l,a,u,O,m)}function nu(l,a,u){var O=a.pendingProps,m=O.children,b=l!==null?l.memoizedState:null;if(O.mode==="hidden"){if((a.flags&128)!==0){if(O=b!==null?b.baseLanes|u:u,l!==null){for(m=a.child=l.child,b=0;m!==null;)b=b|m.lanes|m.childLanes,m=m.sibling;a.childLanes=b&~O}else a.childLanes=0,a.child=null;return _s(l,a,O,u)}if((u&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},l!==null&&kc(a,b!==null?b.cachePool:null),b!==null?Br(a,b):_c(),Pg(a);else return a.lanes=a.childLanes=536870912,_s(l,a,b!==null?b.baseLanes|u:u,u)}else b!==null?(kc(a,b.cachePool),Br(a,b),Vr(),a.memoizedState=null):(l!==null&&kc(a,null),_c(),Vr());return At(l,a,m,u),a.child}function _s(l,a,u,O){var m=qr();return m=m===null?null:{parent:Tt._currentValue,pool:m},a.memoizedState={baseLanes:u,cachePool:m},l!==null&&kc(a,null),_c(),Pg(a),l!==null&&Eo(l,a,O,!0),null}function Ze(l,a){var u=a.ref;if(u===null)l!==null&&l.ref!==null&&(a.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(i(284));(l===null||l.ref!==u)&&(a.flags|=4194816)}}function _a(l,a,u,O,m){return gs(a),u=Kh(l,a,u,O,void 0,m),O=Jh(),l!==null&&!pn?(vs(l,a,m),Nr(l,a,m)):(it&&O&&Nh(a),a.flags|=1,At(l,a,u,m),a.child)}function Hc(l,a,u,O,m,b){return gs(a),a.updateQueue=null,u=dg(a,O,u,m),hg(l),O=Jh(),l!==null&&!pn?(vs(l,a,b),Nr(l,a,b)):(it&&O&&Nh(a),a.flags|=1,At(l,a,u,b),a.child)}function wl(l,a,u,O,m){if(gs(a),a.stateNode===null){var b=fs,w=u.contextType;typeof w=="object"&&w!==null&&(b=Ut(w)),b=new u(O,b),a.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Jo,a.stateNode=b,b._reactInternals=a,b=a.stateNode,b.props=O,b.state=a.memoizedState,b.refs={},ys(a),w=u.contextType,b.context=typeof w=="object"&&w!==null?Ut(w):fs,b.state=a.memoizedState,w=u.getDerivedStateFromProps,typeof w=="function"&&(Pa(a,u,w,O),b.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(w=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),w!==b.state&&Jo.enqueueReplaceState(b,b.state,null),wn(a,O,b,m),Fi(),b.state=a.memoizedState),typeof b.componentDidMount=="function"&&(a.flags|=4194308),O=!0}else if(l===null){b=a.stateNode;var _=a.memoizedProps,Z=Ql(u,_);b.props=Z;var H=b.context,le=u.contextType;w=fs,typeof le=="object"&&le!==null&&(w=Ut(le));var fe=u.getDerivedStateFromProps;le=typeof fe=="function"||typeof b.getSnapshotBeforeUpdate=="function",_=a.pendingProps!==_,le||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(_||H!==w)&&_g(a,b,O,w),mr=!1;var F=a.memoizedState;b.state=F,wn(a,O,b,m),Fi(),H=a.memoizedState,_||F!==H||mr?(typeof fe=="function"&&(Pa(a,u,fe,O),H=a.memoizedState),(Z=mr||eu(a,u,Z,O,F,H,w))?(le||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=O,a.memoizedState=H),b.props=O,b.state=H,b.context=w,O=Z):(typeof b.componentDidMount=="function"&&(a.flags|=4194308),O=!1)}else{b=a.stateNode,xa(l,a),w=a.memoizedProps,le=Ql(u,w),b.props=le,fe=a.pendingProps,F=b.context,H=u.contextType,Z=fs,typeof H=="object"&&H!==null&&(Z=Ut(H)),_=u.getDerivedStateFromProps,(H=typeof _=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(w!==fe||F!==Z)&&_g(a,b,O,Z),mr=!1,F=a.memoizedState,b.state=F,wn(a,O,b,m),Fi();var K=a.memoizedState;w!==fe||F!==K||mr||l!==null&&l.dependencies!==null&&Qc(l.dependencies)?(typeof _=="function"&&(Pa(a,u,_,O),K=a.memoizedState),(le=mr||eu(a,u,le,O,F,K,Z)||l!==null&&l.dependencies!==null&&Qc(l.dependencies))?(H||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(O,K,Z),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(O,K,Z)),typeof b.componentDidUpdate=="function"&&(a.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof b.componentDidUpdate!="function"||w===l.memoizedProps&&F===l.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===l.memoizedProps&&F===l.memoizedState||(a.flags|=1024),a.memoizedProps=O,a.memoizedState=K),b.props=O,b.state=K,b.context=Z,O=le):(typeof b.componentDidUpdate!="function"||w===l.memoizedProps&&F===l.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===l.memoizedProps&&F===l.memoizedState||(a.flags|=1024),O=!1)}return b=O,Ze(l,a),O=(a.flags&128)!==0,b||O?(b=a.stateNode,u=O&&typeof u.getDerivedStateFromError!="function"?null:b.render(),a.flags|=1,l!==null&&O?(a.child=Ts(a,l.child,null,m),a.child=Ts(a,null,u,m)):At(l,a,u,m),a.memoizedState=b.state,l=a.child):l=Nr(l,a,m),l}function Mg(l,a,u,O){return Mo(),a.flags|=256,At(l,a,u,O),a.child}var iu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ic(l){return{baseLanes:l,cachePool:lg()}}function gn(l,a,u){return l=l!==null?l.childLanes&~u:0,a&&(l|=qi),l}function Eg(l,a,u){var O=a.pendingProps,m=!1,b=(a.flags&128)!==0,w;if((w=b)||(w=l!==null&&l.memoizedState===null?!1:(Gt.current&2)!==0),w&&(m=!0,a.flags&=-129),w=(a.flags&32)!==0,a.flags&=-33,l===null){if(it){if(m?Zi(a):Vr(),it){var _=qt,Z;if(Z=_){e:{for(Z=_,_=Wn;Z.nodeType!==8;){if(!_){_=null;break e}if(Z=nr(Z.nextSibling),Z===null){_=null;break e}}_=Z}_!==null?(a.memoizedState={dehydrated:_,treeContext:Rt!==null?{id:Dt,overflow:Dr}:null,retryLane:536870912,hydrationErrors:null},Z=Gn(18,null,null,0),Z.stateNode=_,Z.return=a,a.child=Z,nn=a,qt=null,Z=!0):Z=!1}Z||Mi(a)}if(_=a.memoizedState,_!==null&&(_=_.dehydrated,_!==null))return Zn(_)?a.lanes=32:a.lanes=536870912,null;Sr(a)}return _=O.children,O=O.fallback,m?(Vr(),m=a.mode,_=ru({mode:"hidden",children:_},m),O=ds(O,m,u,null),_.return=a,O.return=a,_.sibling=O,a.child=_,m=a.child,m.memoizedState=Ic(u),m.childLanes=gn(l,w,u),a.memoizedState=iu,O):(Zi(a),Sd(a,_))}if(Z=l.memoizedState,Z!==null&&(_=Z.dehydrated,_!==null)){if(b)a.flags&256?(Zi(a),a.flags&=-257,a=bd(l,a,u)):a.memoizedState!==null?(Vr(),a.child=l.child,a.flags|=128,a=null):(Vr(),m=O.fallback,_=a.mode,O=ru({mode:"visible",children:O.children},_),m=ds(m,_,u,null),m.flags|=2,O.return=a,m.return=a,O.sibling=m,a.child=O,Ts(a,l.child,null,u),O=a.child,O.memoizedState=Ic(u),O.childLanes=gn(l,w,u),a.memoizedState=iu,a=m);else if(Zi(a),Zn(_)){if(w=_.nextSibling&&_.nextSibling.dataset,w)var H=w.dgst;w=H,O=Error(i(419)),O.stack="",O.digest=w,ml({value:O,source:null,stack:null}),a=bd(l,a,u)}else if(pn||Eo(l,a,u,!1),w=(u&l.childLanes)!==0,pn||w){if(w=Ct,w!==null&&(O=u&-u,O=(O&42)!==0?1:fh(O),O=(O&(w.suspendedLanes|u))!==0?0:O,O!==0&&O!==Z.retryLane))throw Z.retryLane=O,cs(l,O),bi(w,l,O),$g;_.data==="$?"||Dd(),a=bd(l,a,u)}else _.data==="$?"?(a.flags|=192,a.child=l.child,a=null):(l=Z.treeContext,qt=nr(_.nextSibling),nn=a,it=!0,Ii=null,Wn=!1,l!==null&&(Ai[$i++]=Dt,Ai[$i++]=Dr,Ai[$i++]=Rt,Dt=l.id,Dr=l.overflow,Rt=a),a=Sd(a,O.children),a.flags|=4096);return a}return m?(Vr(),m=O.fallback,_=a.mode,Z=l.child,H=Z.sibling,O=$n(Z,{mode:"hidden",children:O.children}),O.subtreeFlags=Z.subtreeFlags&65011712,H!==null?m=$n(H,m):(m=ds(m,_,u,null),m.flags|=2),m.return=a,O.return=a,O.sibling=m,a.child=O,O=m,m=a.child,_=l.child.memoizedState,_===null?_=Ic(u):(Z=_.cachePool,Z!==null?(H=Tt._currentValue,Z=Z.parent!==H?{parent:H,pool:H}:Z):Z=lg(),_={baseLanes:_.baseLanes|u,cachePool:Z}),m.memoizedState=_,m.childLanes=gn(l,w,u),a.memoizedState=iu,O):(Zi(a),u=l.child,l=u.sibling,u=$n(u,{mode:"visible",children:O.children}),u.return=a,u.sibling=null,l!==null&&(w=a.deletions,w===null?(a.deletions=[l],a.flags|=16):w.push(l)),a.child=u,a.memoizedState=null,u)}function Sd(l,a){return a=ru({mode:"visible",children:a},l.mode),a.return=l,l.child=a}function ru(l,a){return l=Gn(22,l,null,a),l.lanes=0,l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},l}function bd(l,a,u){return Ts(a,l.child,null,u),l=Sd(a,a.pendingProps.children),l.flags|=2,a.memoizedState=null,l}function vd(l,a,u){l.lanes|=a;var O=l.alternate;O!==null&&(O.lanes|=a),jn(l.return,a,u)}function xd(l,a,u,O,m){var b=l.memoizedState;b===null?l.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:O,tail:u,tailMode:m}:(b.isBackwards=a,b.rendering=null,b.renderingStartTime=0,b.last=O,b.tail=u,b.tailMode=m)}function Xg(l,a,u){var O=a.pendingProps,m=O.revealOrder,b=O.tail;if(At(l,a,O.children,u),O=Gt.current,(O&2)!==0)O=O&1|2,a.flags|=128;else{if(l!==null&&(l.flags&128)!==0)e:for(l=a.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&vd(l,u,a);else if(l.tag===19)vd(l,u,a);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break e;for(;l.sibling===null;){if(l.return===null||l.return===a)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}O&=1}switch(me(Gt,O),m){case"forwards":for(u=a.child,m=null;u!==null;)l=u.alternate,l!==null&&Fo(l)===null&&(m=u),u=u.sibling;u=m,u===null?(m=a.child,a.child=null):(m=u.sibling,u.sibling=null),xd(a,!1,m,u,b);break;case"backwards":for(u=null,m=a.child,a.child=null;m!==null;){if(l=m.alternate,l!==null&&Fo(l)===null){a.child=m;break}l=m.sibling,m.sibling=u,u=m,m=l}xd(a,!0,u,null,b);break;case"together":xd(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function Nr(l,a,u){if(l!==null&&(a.dependencies=l.dependencies),_l|=a.lanes,(u&a.childLanes)===0)if(l!==null){if(Eo(l,a,u,!1),(u&a.childLanes)===0)return null}else return null;if(l!==null&&a.child!==l.child)throw Error(i(153));if(a.child!==null){for(l=a.child,u=$n(l,l.pendingProps),a.child=u,u.return=a;l.sibling!==null;)l=l.sibling,u=u.sibling=$n(l,l.pendingProps),u.return=a;u.sibling=null}return a.child}function er(l,a){return(l.lanes&a)!==0?!0:(l=l.dependencies,!!(l!==null&&Qc(l)))}function Xn(l,a,u){switch(a.tag){case 3:We(a,a.stateNode.containerInfo),pi(a,Tt,l.memoizedState.cache),Mo();break;case 27:case 5:Wi(a);break;case 4:We(a,a.stateNode.containerInfo);break;case 10:pi(a,a.type,a.memoizedProps.value);break;case 13:var O=a.memoizedState;if(O!==null)return O.dehydrated!==null?(Zi(a),a.flags|=128,null):(u&a.child.childLanes)!==0?Eg(l,a,u):(Zi(a),l=Nr(l,a,u),l!==null?l.sibling:null);Zi(a);break;case 19:var m=(l.flags&128)!==0;if(O=(u&a.childLanes)!==0,O||(Eo(l,a,u,!1),O=(u&a.childLanes)!==0),m){if(O)return Xg(l,a,u);a.flags|=128}if(m=a.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),me(Gt,Gt.current),O)break;return null;case 22:case 23:return a.lanes=0,nu(l,a,u);case 24:pi(a,Tt,l.memoizedState.cache)}return Nr(l,a,u)}function Kc(l,a,u){if(l!==null)if(l.memoizedProps!==a.pendingProps)pn=!0;else{if(!er(l,u)&&(a.flags&128)===0)return pn=!1,Xn(l,a,u);pn=(l.flags&131072)!==0}else pn=!1,it&&(a.flags&1048576)!==0&&Vh(a,Ro,a.index);switch(a.lanes=0,a.tag){case 16:e:{l=a.pendingProps;var O=a.elementType,m=O._init;if(O=m(O._payload),a.type=O,typeof O=="function")hs(O)?(l=Ql(O,l),a.tag=1,a=wl(null,a,O,l,u)):(a.tag=0,a=_a(null,a,O,l,u));else{if(O!=null){if(m=O.$$typeof,m===Y){a.tag=11,a=Gc(null,a,O,l,u);break e}else if(m===V){a.tag=14,a=Wc(null,a,O,l,u);break e}}throw a=ye(O)||O,Error(i(306,a,""))}}return a;case 0:return _a(l,a,a.type,a.pendingProps,u);case 1:return O=a.type,m=Ql(O,a.pendingProps),wl(l,a,O,m,u);case 3:e:{if(We(a,a.stateNode.containerInfo),l===null)throw Error(i(387));O=a.pendingProps;var b=a.memoizedState;m=b.element,xa(l,a),wn(a,O,null,u);var w=a.memoizedState;if(O=w.cache,pi(a,Tt,O),O!==b.cache&&Ke(a,[Tt],u,!0),Fi(),O=w.element,b.isDehydrated)if(b={element:O,isDehydrated:!1,cache:w.cache},a.updateQueue.baseState=b,a.memoizedState=b,a.flags&256){a=Mg(l,a,O,u);break e}else if(O!==m){m=An(Error(i(424)),a),ml(m),a=Mg(l,a,O,u);break e}else{switch(l=a.stateNode.containerInfo,l.nodeType){case 9:l=l.body;break;default:l=l.nodeName==="HTML"?l.ownerDocument.body:l}for(qt=nr(l.firstChild),nn=a,it=!0,Ii=null,Wn=!0,u=Tg(a,null,O,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(Mo(),O===m){a=Nr(l,a,u);break e}At(l,a,O,u)}a=a.child}return a;case 26:return Ze(l,a),l===null?(u=Am(a.type,null,a.pendingProps,null))?a.memoizedState=u:it||(u=a.type,l=a.pendingProps,O=As(Ae.current).createElement(u),O[dn]=a,O[Vn]=l,an(O,u,l),On(O),a.stateNode=O):a.memoizedState=Am(a.type,l.memoizedProps,a.pendingProps,l.memoizedState),null;case 27:return Wi(a),l===null&&it&&(O=a.stateNode=_m(a.type,a.pendingProps,Ae.current),nn=a,Wn=!0,m=qt,zi(a.type)?(Hd=m,qt=nr(O.firstChild)):qt=m),At(l,a,a.pendingProps.children,u),Ze(l,a),l===null&&(a.flags|=4194304),a.child;case 5:return l===null&&it&&((m=O=qt)&&(O=Tm(O,a.type,a.pendingProps,Wn),O!==null?(a.stateNode=O,nn=a,qt=nr(O.firstChild),Wn=!1,m=!0):m=!1),m||Mi(a)),Wi(a),m=a.type,b=a.pendingProps,w=l!==null?l.memoizedProps:null,O=b.children,pf(m,b)?O=null:w!==null&&pf(m,w)&&(a.flags|=32),a.memoizedState!==null&&(m=Kh(l,a,Fh,null,null,u),Wa._currentValue=m),Ze(l,a),At(l,a,O,u),a.child;case 6:return l===null&&it&&((l=u=qt)&&(u=mf(u,a.pendingProps,Wn),u!==null?(a.stateNode=u,nn=a,qt=null,l=!0):l=!1),l||Mi(a)),null;case 13:return Eg(l,a,u);case 4:return We(a,a.stateNode.containerInfo),O=a.pendingProps,l===null?a.child=Ts(a,null,O,u):At(l,a,O,u),a.child;case 11:return Gc(l,a,a.type,a.pendingProps,u);case 7:return At(l,a,a.pendingProps,u),a.child;case 8:return At(l,a,a.pendingProps.children,u),a.child;case 12:return At(l,a,a.pendingProps.children,u),a.child;case 10:return O=a.pendingProps,pi(a,a.type,O.value),At(l,a,O.children,u),a.child;case 9:return m=a.type._context,O=a.pendingProps.children,gs(a),m=Ut(m),O=O(m),a.flags|=1,At(l,a,O,u),a.child;case 14:return Wc(l,a,a.type,a.pendingProps,u);case 15:return jc(l,a,a.type,a.pendingProps,u);case 19:return Xg(l,a,u);case 31:return O=a.pendingProps,u=a.mode,O={mode:O.mode,children:O.children},l===null?(u=ru(O,u),u.ref=a.ref,a.child=u,u.return=a,a=u):(u=$n(l.child,O),u.ref=a.ref,a.child=u,u.return=a,a=u),a;case 22:return nu(l,a,u);case 24:return gs(a),O=Ut(Tt),l===null?(m=qr(),m===null&&(m=Ct,b=Uh(),m.pooledCache=b,b.refCount++,b!==null&&(m.pooledCacheLanes|=u),m=b),a.memoizedState={parent:O,cache:m},ys(a),pi(a,Tt,m)):((l.lanes&u)!==0&&(xa(l,a),wn(a,null,null,u),Fi()),m=l.memoizedState,b=a.memoizedState,m.parent!==O?(m={parent:O,cache:O},a.memoizedState=m,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=m),pi(a,Tt,O)):(O=b.cache,pi(a,Tt,O),O!==m.cache&&Ke(a,[Tt],u,!0))),At(l,a,a.pendingProps.children,u),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function Ur(l){l.flags|=4}function Fc(l,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)l.flags&=-16777217;else if(l.flags|=16777216,!on(a)){if(a=mi.current,a!==null&&((at&4194048)===at?En!==null:(at&62914560)!==at&&(at&536870912)===0||a!==En))throw va=Wh,sg;l.flags|=8192}}function Jc(l,a){a!==null&&(l.flags|=4),l.flags&16384&&(a=l.tag!==22?bp():536870912,l.lanes|=a,Xa|=a)}function lu(l,a){if(!it)switch(l.tailMode){case"hidden":a=l.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?l.tail=null:u.sibling=null;break;case"collapsed":u=l.tail;for(var O=null;u!==null;)u.alternate!==null&&(O=u),u=u.sibling;O===null?a||l.tail===null?l.tail=null:l.tail.sibling=null:O.sibling=null}}function Pt(l){var a=l.alternate!==null&&l.alternate.child===l.child,u=0,O=0;if(a)for(var m=l.child;m!==null;)u|=m.lanes|m.childLanes,O|=m.subtreeFlags&65011712,O|=m.flags&65011712,m.return=l,m=m.sibling;else for(m=l.child;m!==null;)u|=m.lanes|m.childLanes,O|=m.subtreeFlags,O|=m.flags,m.return=l,m=m.sibling;return l.subtreeFlags|=O,l.childLanes=u,a}function Zg(l,a,u){var O=a.pendingProps;switch(Ao(a),a.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pt(a),null;case 1:return Pt(a),null;case 3:return u=a.stateNode,O=null,l!==null&&(O=l.memoizedState.cache),a.memoizedState.cache!==O&&(a.flags|=2048),Ei(Tt),Xt(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(l===null||l.child===null)&&($o(a)?Ur(a):l===null||l.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,tg())),Pt(a),null;case 26:return u=a.memoizedState,l===null?(Ur(a),u!==null?(Pt(a),Fc(a,u)):(Pt(a),a.flags&=-16777217)):u?u!==l.memoizedState?(Ur(a),Pt(a),Fc(a,u)):(Pt(a),a.flags&=-16777217):(l.memoizedProps!==O&&Ur(a),Pt(a),a.flags&=-16777217),null;case 27:sl(a),u=Ae.current;var m=a.type;if(l!==null&&a.stateNode!=null)l.memoizedProps!==O&&Ur(a);else{if(!O){if(a.stateNode===null)throw Error(i(166));return Pt(a),null}l=Ce.current,$o(a)?Jp(a):(l=_m(m,O,u),a.stateNode=l,Ur(a))}return Pt(a),null;case 5:if(sl(a),u=a.type,l!==null&&a.stateNode!=null)l.memoizedProps!==O&&Ur(a);else{if(!O){if(a.stateNode===null)throw Error(i(166));return Pt(a),null}if(l=Ce.current,$o(a))Jp(a);else{switch(m=As(Ae.current),l){case 1:l=m.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:l=m.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":l=m.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":l=m.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":l=m.createElement("div"),l.innerHTML="